@charset "utf-8";

* {
    box-sizing: border-box; /* paddingとborderを高さ・幅に含める設定 */
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden; /* 画面外へのはみ出しを完全に防ぐ */
}

.wrapper {
/* vhを先に書き、dvhを後に書く（dvh未対応ブラウザへの対策） */
    height: 100vh;
    height: 100dvh;
    width: 1024px;
    margin: 0 auto;
}

.market-header {
    display: flex;
    justify-content: flex-start; /* 左寄せに配置 */
    align-items: center; /* 縦方向の中央揃え */
    flex-wrap: wrap; /* 折り返しを許可 */
    gap: 12px;
    width: 100%;
    border-radius: 8px;
    background-color: #fffff1;
    padding: 6px 12px;
    border-bottom: 3px solid black;
}

.header-left, .header-right {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 16px; /* グループ内の要素同士の間隔を一定に */
}

#cn {
    height: calc(100% - 40px);
    width: 100%;
    border-radius: 8px;
    background-color: #fffff1;
    padding: 5px;
}

/* ==========================================================================
   Header Component Styles
   ========================================================================== */
.market-header > span {
    display: inline-flex;
    align-items: center;
    gap: 8px; /* 要素間の隙間を均等に */
}

#text_box {
    width: 80px;
    height: 20px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 1px 4px;
    font-size: 11px;
    font-family: inherit;
    background-color: #ffffff;
    text-transform: uppercase;
}

select[name="select-ticker"] {
    width: 24px;
    height: 20px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 1px 0 1px 2px;
    background-color: #ffffff;
    cursor: pointer;
}

.period-interval select {
    height: 20px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 1px 4px;
    font-size: 11px;
    font-family: inherit;
    background-color: #ffffff;
    cursor: pointer;
}

.market-header button {
    height: 20px;
    width: 20px;
    border: 1.5px solid #000000;
    border-radius: 4px;
    background-color: #ffffff;
    color: #000000;
    font-size: 16px;
    font-family: inherit;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.market-header button:hover {
    background-color: #f1f5f9;
    border-color: #000000;
    color: #000000;
}

/* チェックボックスと絵文字ラベルの整列 */
.market-header input[type="checkbox"] {
    cursor: pointer;
    width: 13px;
    height: 13px;
    margin: 0;
    vertical-align: middle;
}

.market-header label {
    cursor: pointer;
    font-size: 16px;
    vertical-align: middle;
    margin-left: 2px;
    margin-right: 8px;
    user-select: none;
}

/* ==========================================================================
   Responsive (under iPad)
   ========================================================================== */
@media screen and (max-width: 767px) {
    .market-header {
        font-size: 10px;
        padding: 6px 8px;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
    }

    .header-left, .header-right {
        width: auto;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
    }

    #text_box {
        width: 70px;
    }

    .wrapper {
        height: 100vh;
        height: 100dvh;
        width: 100%;
        margin: 0 auto;
    }

    #cn {
        min-height: calc(100% - 30px);
        width: 100%;
        border-radius: 10px;
        background-color: #fffff0;
        padding: 5px;
    }
}