html {
    height: 100%;
    width: 100%;
}

body {
    height: 100%;
    width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

h1 {
    background-color: pink;
    margin: 0;
    padding: .25em;
    text-align: center;
    line-height: 1em;
}

input[type="text"] {
    width: 100%;
    box-sizing: border-box;
}

.scroll-none {
    overflow: hidden;
}

.scroll-y-auto {
    overflow-y: auto;
}

.container-Y {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.container-X {
    width: 100%;
    display: flex;
    flex-direction: row;
}

.flex1 {
    flex: 1;
}

.grid-table2 {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    box-sizing: border-box;
}

.grid-table4 {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
    box-sizing: border-box;
}

.mt1 {
    margin-top: .25em;
}

.mt2 {
    margin-top: .5em;
}

.mt3 {
    margin-top: 1em;
}

.mb1 {
    margin-bottom: .25em;
}

.mb2 {
    margin-bottom: .5em;
}

.mb3 {
    margin-bottom: 1em;
}

.ml1 {
    margin-left: .25em;
}

.ml2 {
    margin-left: .5em;
}

.ml3 {
    margin-left: 1em;
}

.mla {
    margin-left: auto;
}

.w50 {
    width: 50%;
}

.w100 {
    width: 100%;
}

.note {
    color: red;
    font-size: 11px;
}

.menu-bar {
    background-color: #933;
    color: #FFF;
    display: flex;

    >div {
        border-left: 1px solid #FFF;

        &:last-child {
            border-right: 1px solid #FFF;
        }
    }

    /* ドロップメニューのトップ */
    .drop-menu {
        position: relative;

        /* マウスオーバーされたときに、子メニューを表示する */
        &.open {
            .menu-item-list {
                visibility: visible;
            }
        }
    }

    /* ドロップメニューをマウスオーバーしたときに表示される、子メニュー全体のリスト */
    .menu-item-list {
        background-color: #F33;
        left: 0;
        position: absolute;
        top: 100%;
        /* デフォルトではドロップメニューを非表示。マウスオーバーで表示 */
        visibility: hidden;
        width: max-content;
        z-index: 1;
    }

    /* 子メニュー */
    .menu-item {
        width: 120px;
        align-items: center;
        color: #FFF;
        display: flex;
        height: 1.6em;
        justify-content: center;
        text-decoration: none;

        &:hover {
            background-color: #966;
        }
    }
}

/* オーバーレイ表示のためのCSS */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    z-index: 1;
    pointer-events: none;
    background-image:
        linear-gradient(45deg, #F50 25%, transparent 25%, transparent 75%, #F50 75%, #F50),
        linear-gradient(-45deg, #F50 25%, transparent 25%, transparent 75%, #F50 75%, #F50);
    background-size: 32px 32px;
    /* ハッチングの細かさを調整 */
}

/* 画像をレイアウトするためのダミーブロックを表示するためのCSS */
.img-dummy {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 編集中のデータでデータのない領域を表示するためのCSS */
.nodata {
    min-width: 6px;
    min-height: 6px;
    animation: nodata_blicker 2s linear infinite;
}

@keyframes nodata_blicker {
    50% {
        background-color: red;
    }

    100% {
        background-color: yellow;
    }
}

.left-menu {
    background: #EEE;
    padding: 4px;
    width: 120px;
    box-sizing: border-box;
    font-size: 12px;

    .btn1 {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        padding: 0;
        margin: 2px 3px;
    }

    .btn2 {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 22px;
        padding: 0;
        margin: 2px 3px;
    }

    .btn3 {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 22px;
        padding: 0;
        margin: 2px 3px;
    }

    .btnMax {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: calc(100% - 8px);
        height: 22px;
        padding: 2px;
        margin: 2px 3px;
    }
}

.text-editor {
    display: flex;
    flex-direction: column;
    margin: 8px auto;
    width: 660px;

    textarea {
        flex: 1;
        width: 100%;
        height: 100%;
        resize: none;
        box-sizing: border-box;
    }
}

.attr-setting,
.block-editor {
    display: flex;
    flex-direction: column;
    margin: 8px auto;
    width: 680px;

    textarea {
        flex: 1;
        width: 100%;
        height: 100%;
        resize: none;
        box-sizing: border-box;
    }

    .grid-table2 {
        gap: 4px;
        grid-template-columns: auto 1fr;
        height: min-content;
    }

    .grid-table4 {
        gap: 4px;
        grid-template-columns: auto 1fr auto 1fr;
        height: min-content;
    }

    .tab {
        display: flex;
        flex-direction: row;

        >div {
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 4px 4px 0 0;
            border-top: 1px solid #333;
            border-left: 1px solid #333;
            border-right: 1px solid #333;
            padding: 0 4px;
            margin: 0 1px 4px 1px;
            cursor: pointer;
            background-color: #DDD;

            &.selected {
                background-color: #FFF;
                border-color: #633;
            }
        }
    }

    .greybox {
        background-color: #EEE;
        border: thin black solid;
        padding: 0 4px;
    }
}

.pei-chart-editor {
    .item {
        display: flex;
        height: 26px;

        .color {
            width: 100px;
            margin: 2px 4px;
        }

        .ratio {
            width: 100px;
            margin: 2px 4px;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            height: 22px;
            width: 24px;
            padding: 2px;
            margin: 2px 4px;
        }

        .add-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            height: 22px;
            padding: 2px;
            margin: 2px 4px;
        }
    }
}

.block-type-changer {
    display: flex;
    flex-direction: column;
    margin: 8px auto;
    width: 640px;

    .block-type {
        margin: 8px;
        border: 1px #60F solid;
        padding: 4px;

        .name {
            text-align: center;
        }

        .explain {
            font-size: 80%;
        }
    }

    .selected {
        background-color: #F66;
        color: white;

        .name {
            font-weight: bold;
        }
    }
}

.view-html {
    margin: 8px auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.image-manager {
    margin: 8px 0;
    display: flex;
    flex-direction: column;
    flex: 1;

    h2 {
        margin: 0;
    }

    .namelist {
        margin-right: 16px;
        width: 66%;
        height: 150px;
        overflow-y: auto;

        .namelist-item {
            padding: 2px 4px;
            margin: 2px;
            background-color: #EEF;
            border-radius: 8px;
            justify-items: center;
            text-align: center;

            &.selected {
                background-color: #CCF;
            }
        }
    }

    .grid-table2 {
        gap: 4px;
        grid-template-columns: auto 1fr;
        height: min-content;
    }

}

/* AUCの自由記入欄 */
.auc-free-space,
#auc_free_space {
    font-family: "Noto Sans CJK JP", "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "ＭＳ Ｐゴシック", "MS PGothic", sans-serif;
    margin: 8px auto;
    padding: 0px;
    font-feature-settings: "palt";
    overflow-wrap: break-word;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.3em;
    width: 640px;
    text-align: left;
    color: #000000;
    background: #fff8f3;
    border: 1px solid #CCC;

    .font_rainbow {
        /* 虹色文字 <虹: >*/
        animation-name: rainbow;
        animation-duration: 1s;
        animation-timing-function: linear;
        animation-iteration-count: infinite;
    }
}

#auc_free_space div {
    font-family: "Noto Sans CJK JP", "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "ＭＳ Ｐゴシック", "MS PGothic", sans-serif;
    font-feature-settings: "palt" 1;
}

/* 虹アニメーション */
@keyframes rainbow {

    from {
        color: #fd3838;
    }

    14% {
        color: #ff7f2b;
    }

    29% {
        color: #ffc513;
    }

    43% {
        color: #28b731;
    }

    57% {
        color: #4bd9ea;
    }

    71% {
        color: #5e7dff;
    }

    86% {
        color: #aa6dca;
    }

    to {
        color: #fd3838;
    }
}