.dosha-container {
    max-width: 750px;
    margin: 40px auto;
    padding: 20px;
    color: #444;
    font-family: "Yu Mincho", serif;
    line-height: 1.8;
    box-sizing: border-box;
    position: relative;
}

.dosha-container.therapist-mode {
    max-width: 1150px;
    padding-right: 400px;
    transition: max-width 0.3s ease;
}

.dosha-header {
    text-align: center;
    margin-bottom: 60px;
}

.dosha-header h2 {
    font-size: 1.5rem;
    font-weight: normal;
    color: #bfa480;
    letter-spacing: 0.1em;
    margin: 0;
}

.dosha-header p {
    font-size: 0.9rem;
    color: #888;
    margin-top: 10px;
}

.step-section {
    margin-bottom: 80px;
}

.step-title {
    font-size: 1.2rem;
    color: #bfa480;
    border-bottom: 1px solid #f0ede9;
    padding-bottom: 12px;
    margin-bottom: 40px;
    font-weight: normal;
}

.q-card {
    margin-bottom: 50px;
    position: relative;
}

.q-title {
    font-weight: bold;
    margin-bottom: 18px;
    display: block;
    font-size: 0.95rem;
    color: #555;
}

.q-title small {
    font-size: 0.75rem;
    color: #999;
    font-weight: normal;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.options-grid-single {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.simple-opt {
    border-bottom: 1px solid #f7f7f7;
    padding: 15px 5px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: 0.2s;
}

.simple-opt:hover,
.simple-opt-rich:hover {
    background: #fcfaf7;
}

.simple-opt input,
.simple-opt-rich input {
    accent-color: #bfa480;
}

.simple-opt input {
    margin-right: 12px;
}

.simple-opt-rich {
    display: flex;
    align-items: flex-start;
    padding: 18px 12px;
    border-bottom: 1px solid #f7f7f7;
    cursor: pointer;
    transition: 0.2s;
}

.simple-opt-rich input {
    margin-top: 6px;
    margin-right: 15px;
    flex-shrink: 0;
}

.opt-body {
    flex: 1;
}

.opt-body strong {
    display: block;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 3px;
}

.opt-body span {
    display: block;
    font-size: 0.75rem;
    color: #888;
    line-height: 1.5;
}

.branch-card {
    background: #fcfaf7;
    border: 1px solid #eee6dc;
    padding: 22px;
    border-radius: 7px;
    margin-bottom: 25px;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.3s ease;
    opacity: 0;
}

.accordion-content.open {
    max-height: 800px;
    margin-top: 15px;
    opacity: 1;
}

.mode-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.consent-text-box {
    background: #fcfcfc;
    padding: 25px;
    font-size: 0.85rem;
    color: #666;
    border: 1px solid #eee;
    margin-bottom: 20px;
    border-radius: 4px;
}

.consent-divider {
    margin-top: 15px;
    border-top: 1px dashed #ccc;
    padding-top: 10px;
}

.detail-trigger {
    font-size: 0.82rem;
    font-weight: normal;
    color: #a08e84;
    cursor: pointer;
    text-decoration: underline;
    display: inline-block;
    margin-top: 5px;
}

.detail-content-inline {
    background: #faf9f6;
    border: 1px solid #e8e5df;
    padding: 18px;
    border-radius: 8px;
    font-size: 0.84rem;
    color: #4a4a4a;
    line-height: 1.8;
    margin-top: 10px;
    margin-bottom: 20px;
}

.detail-heading {
    font-weight: bold;
    color: #5f4a3c;
    margin-top: 0;
    margin-bottom: 10px;
}

.detail-list {
    padding-left: 0;
    margin-bottom: 15px;
    font-weight: bold;
    list-style: none;
}

.detail-list li {
    margin-bottom: 5px;
}

.detail-body {
    color: #666;
    margin-bottom: 15px;
}

.detail-note {
    font-size: 0.8rem;
    color: #888;
    border-top: 1px dashed #e8e5df;
    padding-top: 10px;
}

.consent-check-label {
    margin-top: 20px;
    font-weight: bold;
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.consent-check-label input {
    margin-right: 10px;
    margin-top: 5px;
    accent-color: #bfa480;
}

.consent-check-label small {
    display: block;
    color: #666;
    font-weight: normal;
    font-size: 0.75rem;
}

.text-input-line {
    width: 100%;
    border: none;
    border-bottom: 1px solid #ddd;
    padding: 12px 0;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    background: transparent;
    box-sizing: border-box;
}

.text-input-line:focus {
    border-bottom-color: #bfa480;
}

.minimal-btn {
    background: #4a4a4a;
    color: #fff;
    border: none;
    padding: 22px 50px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.3s;
    letter-spacing: 0.05em;
}

.minimal-btn:hover {
    opacity: 0.85;
}

.confirm-button-container {
    text-align: center;
    margin-top: 50px;
    padding-bottom: 50px;
}

.err-msg {
    color: #d9534f;
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 8px;
    display: none;
    min-height: 1.2rem;
}

/* ==========================================
   セラピスト画面
========================================== */

.therapist-floating-panel {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 360px;
    height: calc(100vh - 40px);
    z-index: 999;
    font-family: "Yu Mincho", serif;
    animation: slideIn 0.3s ease-out;
    box-sizing: border-box;
}

.therapist-box {
    background: #fdfbf7;
    border: 1px solid #dcd5cc;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 25px rgba(164, 126, 92, 0.15);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.therapist-heading {
    font-size: 0.95rem;
    color: #a47e5c;
    margin-top: 0;
    border-bottom: 1px solid #e8e3da;
    padding-bottom: 10px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
}

.therapist-heading span:last-child {
    font-size: 0.8rem;
    color: #888;
}

.therapist-summary-card {
    background: #f4ede2;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #555;
    margin-top: 5px;
    margin-bottom: 12px;
    border-left: 3px solid #bfa480;
    line-height: 1.5;
}

.summary-item {
    margin-bottom: 4px;
}

.summary-item:last-child {
    margin-bottom: 0;
}

.summary-danger {
    color: #d9534f;
    font-weight: bold;
}

.therapist-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
    margin-bottom: 10px;
}

.t-q-group {
    background: #fff;
    border: 1px solid #eae5dc;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    position: relative;
}

.t-q-title {
    font-size: 0.8rem;
    font-weight: bold;
    color: #a47e5c;
    display: block;
    margin-bottom: 6px;
    border-left: 2px solid #a47e5c;
    padding-left: 6px;
}

.t-script {
    font-size: 0.75rem;
    color: #6b5a47;
    background: #faf6f0;
    padding: 8px 10px;
    margin: 0 0 8px 0;
    border-radius: 4px;
    font-style: normal;
    line-height: 1.5;
    border-left: 2px dashed #e2d9cd;
}

.text-input-area {
    width: 100%;
    border: 1px solid #ddd;
    padding: 8px;
    font-size: 0.8rem;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    resize: vertical;
    border-radius: 4px;
    background: #fff;
    line-height: 1.4;
}

.text-input-area:focus {
    border-color: #bfa480;
}

.trauma-panel {
    border: 1px solid #d9534f;
    background: #fffcfc;
}

.trauma-script {
    color: #a94442;
    background: #fdf2f2;
    border-left-color: #ebccd1;
}

.t-closing-script-box {
    background: #f4ede2;
    border: 1px solid #dcd5cc;
    padding: 12px;
    border-radius: 6px;
    margin-top: 5px;
    margin-bottom: 15px;
}

.t-closing-badge {
    background: #a47e5c;
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 6px;
}

.t-closing-script-box p {
    font-size: 0.75rem;
    color: #444;
    margin: 0;
    line-height: 1.5;
}

.therapist-submit-area {
    text-align: center;
    margin-top: 5px;
}

.therapist-submit-btn {
    background: #a47e5c;
    color: #fff;
    border: none;
    width: 100%;
    padding: 14px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.therapist-submit-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* ==========================================
   モーダル
========================================== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal-window {
    background: #fff;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    font-family: "Yu Mincho", serif;
    position: relative;
}

.modal-window h4 {
    font-size: 1.2rem;
    color: #bfa480;
    font-weight: normal;
    margin-top: 0;
    letter-spacing: 0.05em;
}

.modal-window p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 40px;
}

.hidden-trigger-zone {
    height: 35px;
    width: 100%;
    margin-top: 10px;
    cursor: default;
    background: transparent;
    border-radius: 4px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
/* ==========================================
   フィードバック
========================================== */

/* ==========================================
   アニメーション
========================================== */

@keyframes slideIn {
    from {
        transform: translateX(50px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==========================================
   レスポンシブ
========================================== */

@media (max-width: 1100px) {

    .dosha-container.therapist-mode {
        padding-right: 20px;
        padding-bottom: 460px;
    }

    .therapist-floating-panel {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 440px;
        position: fixed;
        z-index: 999;
        box-sizing: border-box;
        padding: 10px;
        background: #fff;
        border-top: 2px solid #dcd5cc;
        box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
    }

    .therapist-box {
        border: none;
        padding: 5px 10px;
        box-shadow: none;
        border-radius: 0;
    }

    .therapist-scroll-area {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 5px;
    }

    .t-q-group {
        margin-bottom: 0;
        padding: 10px;
    }

    .t-closing-script-box {
        grid-column: span 2;
        margin-bottom: 5px;
    }

}

@media (max-width: 600px) {

    .dosha-container {
        padding: 15px;
        margin: 20px auto;
    }

    .dosha-header {
        margin-bottom: 40px;
    }

    .dosha-header h2 {
        font-size: 1.3rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .therapist-scroll-area {
        grid-template-columns: 1fr;
    }

    .t-closing-script-box {
        grid-column: span 1;
    }

    .dosha-container.therapist-mode {
        padding-bottom: 500px;
    }

    .therapist-floating-panel {
        height: 480px;
    }

    .modal-window {
        padding: 30px 20px;
    }

}
/* ==========================================
   センシティブ質問
========================================== */

/* ==========================================
   セラピスト画面：簡潔な施術前確認
========================================== */

.therapist-quick-panel {
    background: #fff;
}

.therapist-choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.t-choice {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #e2ddd5;
    border-radius: 4px;
    background: #fff;
    font-size: 0.75rem;
    line-height: 1.3;
    cursor: pointer;
}

.t-choice input {
    margin: 0 6px 0 0;
    accent-color: #a47e5c;
}

.therapist-memo-item {
    background: #fff;
}

.therapist-memo-item .text-input-area {
    min-height: 72px;
}

@media (max-width: 1100px) {
    .therapist-floating-panel {
        height: 390px;
    }

    .dosha-container.therapist-mode {
        padding-bottom: 410px;
    }

    .therapist-scroll-area {
        display: block;
    }

    .t-q-group {
        margin-bottom: 10px;
    }
}

@media (max-width: 600px) {
    .therapist-floating-panel {
        height: 410px;
    }

    .dosha-container.therapist-mode {
        padding-bottom: 430px;
    }

    .therapist-choice-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .t-choice {
        min-height: 38px;
    }
}
/* セラピストモードは日本語固定 */
.dosha-container.therapist-mode .language-switch { display:none !important; }

/* セルフプレジャー頻度：経験ありの場合だけアコーディオン表示 */
.self-pleasure-frequency-card {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-color: transparent;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.35s ease, padding 0.35s ease;
}

.self-pleasure-frequency-card.self-pleasure-frequency-open {
    max-height: 500px;
    opacity: 1;
    margin-top: 15px;
    margin-bottom: 25px;
    padding-top: 22px;
    padding-bottom: 22px;
    border-color: #eee6dc;
}

/* 追加オプションは最初から表示 */
.option-menu-visible {
    display: block;
}

/* v1.1.8: options are always visible; only self-pleasure frequency is conditional. */
[data-susmna-cs] #dynamic-option-menu.option-menu-visible { display:block !important; max-height:none !important; opacity:1 !important; margin-top:0 !important; overflow:visible !important; }

/* 1.6.5 スライダー（0〜10）：つまみの中心と目盛りの数字がそろうよう、つまみ幅の半分ずつ内側に目盛りを置く */
[data-susmna-cs] .scale-wrap{--thumb:24px;padding:6px 0 4px}
/* サイトのテーマが入力欄に付ける枠・余白・背景を打ち消す（これがあると目盛りとずれる） */
[data-susmna-cs] input.scale-input[type="range"]{-webkit-appearance:none!important;appearance:none!important;width:100%!important;max-width:none!important;height:var(--thumb)!important;min-height:0!important;margin:10px 0 0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;cursor:pointer;display:block;box-sizing:border-box!important}
[data-susmna-cs] .scale-input:focus{outline:none}
[data-susmna-cs] .scale-input::-webkit-slider-runnable-track{height:6px;border-radius:3px;background:#e6ddd4}
[data-susmna-cs] .scale-input::-moz-range-track{height:6px;border-radius:3px;background:#e6ddd4}
[data-susmna-cs] .scale-input::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;box-sizing:border-box;width:var(--thumb);height:var(--thumb);border:0;border-radius:50%;background:#c9b8aa;box-shadow:inset 0 0 0 3px #fff,0 1px 4px rgba(0,0,0,.25);margin-top:calc((6px - var(--thumb)) / 2)}
[data-susmna-cs] .scale-input::-moz-range-thumb{box-sizing:border-box;width:var(--thumb);height:var(--thumb);border:0;border-radius:50%;background:#c9b8aa;box-shadow:inset 0 0 0 3px #fff,0 1px 4px rgba(0,0,0,.25)}
[data-susmna-cs] .scale-wrap.is-set .scale-input::-webkit-slider-thumb{background:#9a6f4f}
[data-susmna-cs] .scale-wrap.is-set .scale-input::-moz-range-thumb{background:#9a6f4f}
[data-susmna-cs] .scale-input:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 3px rgba(154,111,79,.35)}
[data-susmna-cs] .scale-ticks{position:relative;height:18px;margin:6px calc(var(--thumb) / 2) 0;font-size:11px;color:#a08e84}
[data-susmna-cs] .scale-ticks span{position:absolute;top:0;transform:translateX(-50%);line-height:18px;white-space:nowrap;width:auto}
[data-susmna-cs] .scale-ends{display:flex;justify-content:space-between;gap:12px;font-size:12px;color:#7c6d64;margin-top:4px}
[data-susmna-cs] .scale-ends span:last-child{text-align:right}
[data-susmna-cs] .scale-value{margin-top:10px;text-align:center;font-weight:600;color:#5f4a3c;min-height:1.6em}
[data-susmna-cs] .scale-wrap:not(.is-set) .scale-value{font-weight:400;color:#a08e84;font-size:13px}
/* 「高まってきたとき」：スライダー2以下のときは、選択肢をたたんで説明を出す */
[data-susmna-cs] [data-question-id="orgasm_stance"] .options-grid-single{transition:opacity .35s ease,max-height .45s ease;max-height:600px;opacity:1;overflow:hidden}
[data-susmna-cs] [data-question-id="orgasm_stance"].is-skipped .options-grid-single{max-height:0;opacity:0}
[data-susmna-cs] [data-question-id="orgasm_stance"] .q-title{transition:opacity .35s ease}
[data-susmna-cs] [data-question-id="orgasm_stance"].is-skipped .q-title{opacity:.5}
[data-susmna-cs] .peak-skip-note{display:none;margin:4px 0 0;padding:10px 12px;border-radius:8px;background:#f7f1ea;color:#7c6d64;font-size:13px;line-height:1.7}
[data-susmna-cs] .is-skipped .peak-skip-note{display:block}
