* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

.container {
    max-width: 940px;
    margin: 0 auto;
    background: transparent;
    padding: 20px;
    border-radius: 15px;
    box-shadow: none;
}

/*
h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2em;
    border-bottom: 3px solid #666;
    padding-bottom: 15px;
}
 */
.dialog_title {
    text-align: center !important;
    font-size: 36px !important;
    letter-spacing: 2px;
}

hr.dialog_title_hr {
    border: 0;
    height: 8px;
    margin: 10px 0 30px 0;
    max-width: 940px;
    background: none;
    position: relative;
}

hr.dialog_title_hr::before,
hr.dialog_title_hr::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background-image: linear-gradient(to right, rgba(51, 51, 51, 0), rgba(51, 51, 51, 1), rgba(51, 51, 51, 0));
}

hr.dialog_title_hr::before {
    top: 1px;
}

hr.dialog_title_hr::after {
    top: 5px;
}

.dialog_title_lead {
    font-family: 'Noto Serif JP', serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 1px;
    text-align: center;
    width: 100%;
    max-width: var(--_koda---max_width);
    margin-bottom: 30px;
}

@media screen and (max-width: 479px) {
    .dialog_title_lead {
        padding: 0 20px;
        max-width: reset;
    }
}
    .nav-menu-image-source {
        display: none;
    }

    .nav-menu {
        display: flex;
        flex-wrap: wrap;
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 40px;
        padding: 0;
        background: transparent;
        border-radius: 10px;
        box-shadow: none;
        max-width: 860px;
        margin-left: auto;
        margin-right: auto;
    }

    .nav-item {
        width: 160px;
        min-width: 160px;
        padding: 0;
        background-color: transparent;
        color: #211f54;
        text-decoration: none;
        border-radius: 0;
        font-weight: normal;
        transition: color 0.3s ease;
        box-shadow: none;
        text-align: center;
        font-family: 'Noto Sans JP', sans-serif;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .nav-item:hover {
        color: #32343a;
    }

    .nav-item-image {
        width: 112px;
        height: 136px;
        display: block;
        object-fit: contain;
    }

    .nav-item-label {
        width: 100%;
        padding: 6px 20px;
        background-color: #3898ec;
        color: white;
        border-radius: 0;
        /* box-shadow: 0 2px 5px rgba(0,0,0,0.2); */
        transition: background-color 0.3s ease;
        letter-spacing: 1px;
    }

    .nav-item:hover .nav-item-label {
        background-color: #32343a;
    }

    .category {
        margin-bottom: 40px;
    }

    .category-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 4px;
        padding: 10px 20px;
        background-color: transparent;
        color: black;
        border-radius: 0;
        border: 0;
        border-bottom: 0;
        box-shadow: none;
        position: relative;
        font-family: 'Noto Serif JP', serif;
    }

    .category-title-wrapper {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .back-to-top {
        padding: 2px 4px;
        background-color: transparent;
        color: black;
        text-decoration: none;
        border-radius: 0;
        font-size: 0.85em;
        font-weight: 400;
        transition: color 0.3s ease;
        border: 0;
        position: static;
        font-family: 'Noto Sans JP', sans-serif;
    }

    .back-to-top:hover {
        color: #32343a;
    }

    .category-actions .back-to-top::after {
        content: "\f102";
        margin-left: 6px;
        font: var(--fa-font-solid);
        font-weight: 900;
        font-size: 12px;
    }

    .category-title {
        font-size: 20px;
        color: black;
        font-weight: bold;
        font-family: 'Noto Serif JP', serif;
        letter-spacing: 1px;
        padding: 0;
    }

    .toggle-all-btn {
        padding: 2px 4px;
        background: transparent;
        color: black;
        border: none;
        border-radius: 0;
        cursor: pointer;
        font-size: 0.85em;
        font-weight: 400;
        transition: color 0.3s ease;
        box-shadow: none;
        font-family: 'Noto Sans JP', sans-serif;
        display: inline-flex;
        align-items: center;
    }

    .toggle-all-btn:hover {
        color: #32343a;
    }

    .category-actions {
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 0;
    }

    .action-separator {
        margin: 0 10px;
        color: black;
        font-family: 'Noto Sans JP', sans-serif;
    }

    .qa-item {
        margin-bottom: 15px;
        border: 1px solid #cfcfcf;
        border-radius: 8px;
        overflow: hidden;
        transition: all 0.3s ease;
    }

    .qa-item:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .question {
        background: linear-gradient(180deg, #ffffff 0%, whitesmoke 100%);
        color: #211f54;
        padding: 15px 20px;
        cursor: pointer;
        font-family: 'Klee One', cursive;
        font-weight: 600;
        display: flex;
        align-items: center;
        transition: color 0.3s ease;
        font-size: 16px;
        line-height: 1.6;
        -webkit-text-stroke: 0.6px #211f54;
        position: relative;
    }

    .question-text {
        flex: 1 1 auto;
        min-width: 0;
        padding-right: 26px;
    }

    .question-actions {
        position: absolute;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 16px;
    }

    .q-number {
        -webkit-text-stroke: 0px #ffffff;
    }

    .question:hover {
        color: #32343a;
    }

    .question .q-number {
        color: #d2691e;
        font-family: 'Noto Serif JP', serif;
        font-weight: bold;
        font-size: 1.2em;
        margin-right: 24px;
        flex-shrink: 0;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        min-width: 56px;
    }

    .question .q-number::before {
        content: "";
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 2px 6px;
        min-width: 7ch;
        text-align: center;
        border-radius: 0;
        font-size: 0.56rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        font-family: 'Inter', 'Noto Sans JP', sans-serif;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
        border: 1px solid transparent;
        background: #f5f5f5;
        color: #555;
    }

    /* カテゴリ別のバッジカラー */
    #category-music .question .q-number::before {
        content: "MUSIC";
        background: #f1edff;
        color: #7d6be8;
        border-color: rgba(125, 107, 232, 0.25);
    }

    #category-music .question .q-number {
        color: #7d6be8;
    }

    #category-movie .question .q-number::before {
        content: "MOVIE";
        background: #e7f7ef;
        color: #2ca065;
        border-color: rgba(44, 160, 101, 0.25);
    }

    #category-movie .question .q-number {
        color: #2ca065;
    }

    #category-concert .question .q-number::before {
        content: "CONCERT";
        background: #ffe6ef;
        color: #e15a8d;
        border-color: rgba(225, 90, 141, 0.25);
    }

    #category-concert .question .q-number {
        color: #e15a8d;
    }

    #category-hobby .question .q-number::before {
        content: "HOBBIES";
        background: #e7f7ef;
        color: #2ca065;
        border-color: rgba(44, 160, 101, 0.25);
    }

    #category-hobby .question .q-number {
        color: #2ca065;
    }

    #category-sports .question .q-number::before {
        content: "SPORTS";
        background: #fff1e4;
        color: #ef8c3a;
        border-color: rgba(239, 140, 58, 0.25);
    }

    #category-sports .question .q-number {
        color: #ef8c3a;
    }

    #category-life .question .q-number::before {
        content: "LIFE";
        background: #e6f3ff;
        color: #52a4e9;
        border-color: rgba(82, 164, 233, 0.25);
        letter-spacing: 0.12em;
    }

    #category-life .question .q-number {
        color: #52a4e9;
    }

    .question-back-to-top {
        padding: 0;
        width: 14px;
        height: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: black;
        line-height: 1;
        flex-shrink: 0;
    }

    .question-back-to-top:hover {
        color: #32343a;
    }

    .question-back-to-top::before {
        content: "\f102";
        font: var(--fa-font-solid);
        font-weight: 900;
        font-size: 14px;
    }

    .question-toggle-indicator {
        width: 14px;
        height: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #d2691e;
        line-height: 1;
    }

    .question-toggle-indicator::before {
        content: "\2b"; /*f107*/
        font: var(--fa-font-solid);
        font-weight: 900;
        font-size: 14px;
        transition: transform 0.3s ease;
    }

    .question.open .question-toggle-indicator::before {
        content: "\f068"; /*f106*/
    }

    .answer {
        max-height: 0;
        overflow: hidden;
        background-color: white;
        transition: max-height 0.4s ease, padding 0.4s ease;
    }

    .answer.open {
        max-height: 5000px;
        padding: 30px;
        border-top: 0;
    }

    .answer-content::before {
        content: "";
        display: block;
        float: left;
        width: var(--qa-image-width, 150px);
        /*130*/
        height: var(--qa-image-height, 150px);
        /*130*/
        background-image: var(--qa-image, var(--default-qa-image));
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        margin-right: 25px;
        /*15*/
        margin-top: 0px;
        /*10*/
        margin-bottom: 0px;
    }

    #categories .answer-content.answer-content-image-small {
        --qa-image-width: 150px;
        --qa-image-height: 80px;
    }

    #category-music .answer-content {
        --default-qa-image: url('/images/pics/dialog/pics_qa_music.png');
    }

    #category-movie .answer-content {
        --default-qa-image: url('/images/pics/dialog/pics_qa_movie.png');
    }

    #category-movie .answer-content-compact::before {
        content: "";
        display: block;
        float: left;
        width: 100px;
        height: 73px;
        background-image: url('../imgs/koda-2-comp.png');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        margin-right: 25px;
        /*15*/
        margin-top: 0px;
        /*10*/
        margin-bottom: 0px;
    }

    #category-hobby .answer-content {
        --default-qa-image: url('/images/pics/dialog/pics_qa_sports.png');
        --qa-image-width: 150px;
        --qa-image-height: 150px;
    }

    #category-concert .answer-content {
        --default-qa-image: url('/images/pics/dialog/pics_qa_concert.png');
    }

    #category-sports .answer-content::before {
        content: "";
        display: block;
        float: left;
        width: 100px;
        height: 100px;
        background-image: url('../imgs/koda-4.png');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        margin-right: 25px;
        /*15*/
        margin-top: 0px;
        /*10*/
        margin-bottom: 0px;
    }

    #category-life .answer-content {
        --default-qa-image: url('/images/pics/dialog/pics_qa_life.png');
    }

    .answer-content, .answer-content-compact {
        color: saddlebrown;
        white-space: pre-wrap;
        overflow: hidden;
        font-family: 'Klee One', cursive;
        font-weight: 600;
        font-size: 16px;
        line-height: 1.8;
    }

    .answer-text {
        display: block;
    }

    @media screen and (max-width: 940px) {
        .nav-menu {
            max-width: 510px;
            justify-content: center;
        }
    }

    @media screen and (max-width: 479px) {
        .container {
            padding: 10px;
        }

        .category-header {
            flex-direction: column;
            align-items: stretch;
            gap: 8px;
        }

        .category-title-wrapper {
            width: 100%;
            justify-content: flex-start;
        }

        .category-title {
            white-space: nowrap;
            text-align: left;
        }

        .category-actions {
            width: 100%;
            justify-content: flex-end;
            flex-wrap: nowrap;
            white-space: nowrap;
        }

        .toggle-all-btn,
        .action-separator,
        .back-to-top {
            white-space: nowrap;
        }

        .nav-menu {
            gap: 12px;
        }

        .nav-item {
            width: 160px;
            min-width: 160px;
        }

        .nav-item-image {
            width: 112px;
            height: 136px;
        }

        .nav-item-label {
            padding: 10px 12px;
        }

        .question {
            display: block;
            padding-right: 20px;
        }

        .question-text {
            display: block;
            padding-right: 24px;
        }

        .question .q-number {
            float: left;
            margin: 2px 20px 8px 0;
            min-width: 0;
            align-items: center;
            text-align: center;
        }

        .question-actions {
            right: 20px;
            gap: 16px;
        }

        .answer {
            clear: both;
        }
    }

    @media screen and (max-width: 359px) {
        .nav-menu {
            max-width: 160px;
        }
    }
