@charset "UTF-8";

body {
    font-family: sans-serif;
    text-align: center;
    padding: 30px 5px 30px;
}

.main__title {
    margin: 0 auto 10px;
}

#svg {
    width: 350px;
    height: 350px;
    border: 1px solid #ccc;
}

line,
circle,
path {
    stroke-width: 4;
    fill: none;
}

/* line,
circle,
path {
    stroke-width: 4;
    fill: none;
} */

line {
    stroke: seagreen;
}

/* 他のcircleには赤い枠 */
circle {
    stroke: crimson;
}

/* pierceエフェクトだけはstrokeなし */
circle.pierce-effect {
    stroke: none;
}


path {
    stroke: royalblue;
}

#list {
    margin-top: 20px;
    text-align: left;
    display: inline-block;
}

label {
    margin: 0 5px;
}


/* ★ ここを追加 */
input[type="number"] {
    width: 60px;
    padding: 2px 4px;
}

/* 全体の最大幅を設定 */
#controlContainer {
    display: none;
    max-width: 375px;
    margin: 0 auto;
    /* 中央寄せ */
    /*display: flex;*/
    flex-direction: column;

    /* gap: 10px; */
    padding: 10px 10px 10px;


    border: 2px solid #ccc;
    border-radius: 10px;
    margin-bottom: 10px;
    background-color: #fdfdfd;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
}

/* ボックス単位でも最大幅設定 */
.box {
    max-width: 100%;
    box-sizing: border-box;
}

/* 数値入力欄を幅狭めに */
input[type="number"] {
    width: 50px;
    padding: 2px 4px;
    font-size: 14px;
}

select,
button {
    padding: 4px 6px;
    cursor: pointer;
    box-shadow: 1px 1px 1px 0px #181717;
}

select:hover,
button:hover,
input[type="number"]:hover {
    box-shadow: none;
}

select,
input[type="number"],
button {
    border: 1px solid #888;
    border-radius: 4px;
    padding: 4px 6px;
    background-color: #fff;
    /*box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);*/
    box-shadow: 1px 1px 1px 0px #181717;
}

select:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #007acc;
    box-shadow: 0 0 5px rgba(0, 122, 204, 0.5);
}


#commandList {
    position: relative;
    border: 2px solid #ccc;
    border-radius: 10px;
    padding: 4px 6px;
    background-color: #fff;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    margin: 10px auto 10px;
    max-width: 355px;
    width: 100%;
    /* スクロール用追加部分 */
    max-height: 300px;
    overflow-y: auto;
    z-index: 0;
    background-image: url("data:image/svg+xml;utf8,\
    <svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'>\
      <text x='0' y='100' fill='rgba(0,0,0,0.1)' font-size='10' transform='rotate(-30)'>コードリスト　コードリスト</text>\
    </svg>");
    background-repeat: repeat;
}







#commandList:empty {
    display: none;
}


#commandList li {
    border: none;
    outline: none;
    box-shadow: none;
    list-style: none;
    /* リストの点マーカー消し */
    padding: 4px 0;
    margin: 0 auto;
    background: none;
    text-align: left;
    display: flex;
    justify-content: space-between;
}

#commandList li button.delete-btn {
    background-color: #ff4d4d;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

#commandList li button.delete-btn:hover {
    background-color: #e60000;
}

/* 共通の枠デザイン */
.box {
    border: 2px solid #ccc;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #fdfdfd;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

/* 枠内の要素を整列 */
.box button,
.box select,
.box input {
    margin: 5px;
}

#xyijContainer {
    display: flex;
    flex-direction: row;
    /* ← 横並び */
    justify-content: center;
    gap: 4px;
    width: 100%;
    max-width: 375px;
    margin: 0 auto;
    box-sizing: border-box;
    flex-wrap: wrap;
    /* ← 幅が足りない場合は折り返す */
}

.xyijItem {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc(25% - 4px);
    /* 4つ並べる前提（gapぶん引いて調整） */
    box-sizing: border-box;
}

.xyijItem input[type="number"] {
    width: 100%;
    padding: 2px 3px;
    font-size: 12px;
    box-sizing: border-box;
}


#m109Button.active {
    background-color: green;
    color: white;
}

.operation {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.operation__laser {
    /*width: 135px;*/
    display: flex;
    justify-content: center;
    gap: 10px;
}

.operation__correction {
    width: 100%;
    /*height: 90px;*/
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.interpolation {
    width: 100%;
    /*height: 90px;*/
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 10px;
}

#addButton {
    width: 110px;
}



#drawButton {
    display: none;
    width: 110px;
}

#downloadBtn {
    display: none;
    width: 110px;
}



#resetButton {
    height: 40px;
    width: 130px;
    margin: 10px auto 0px;
}




#laser__standby {
    display: none;
}


#laser__on {
    display: none;
}

#laser__off {
    display: none;
}

#laser__pias {
    display: none;
}

.footer__copyright {
    font-size: 14px;
    font-weight: 400;
}


.code__edit {
    display: none;
    /*width: 100%;*/
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

#laser__interpolation {
    display: none;
}


.public__button {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px auto 0;
}


.code__start__text {
    margin-bottom: 5px;
}

.machine__coordinate__text {
    margin-bottom: 5px;
}

.laser__standby__text {
    margin-bottom: 5px;
}


#coordinate {
    display: none;
}

#drawButton.active {
    background-color: green;
    color: white;
}


.laser__correction__title {
    font-weight: 500;
    font-size: 16px;
    margin-bottom: 10px;
}


.correction__line {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 20px;
    margin-top: 10px;
}

.correction__line::before {
    content: "←";
    position: absolute;
    bottom: 2px;
    left: 70px;
}

.correction__line__base {
    content: '';
    position: absolute;
    top: 5px;
    left: 50%;
    translate: -50%;
    background-color: #000;
    height: 5px;
    width: 100px;
}

.correction__line__animate {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    /* 中央に配置 */

    width: 100px;
    height: 5px;

    overflow: hidden;

    /* 背景を使って流れる線を表現 */
}

.correction__line__animate::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background-color: rgb(243, 227, 9);
    transform: translateX(-100%);
    animation: line-flow 2s linear infinite;
}

@keyframes line-flow {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(-100%);
    }
}

.code__end__text {
    margin-bottom: 5px;
}

#machine__coordinate {
    display: none;
}

.home__button {
    width: 80px;
    border: 1px solid #888;
    border-radius: 50%;
    padding: 4px 6px;
    background-color: #fff;
    /*box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);*/
    box-shadow: 1px 1px 1px 0px #181717;
    display: inline-block;
    margin-bottom: 20px;
    text-decoration: none;
    color: #000;

}

.home__button:hover {
    box-shadow: none;
}