:root {
    --desk-bg: #1e1612;
    --desk-accent: #2c2019;
    --paper-bg: #f4ebd9;
    --paper-light: #faf5ea;
    --paper-edge: #d8c8ad;
    --ink-main: #231d19;
    --ink-muted: #615447;
    --ink-faint: #8c7b69;
    --stamp-red: #9f231b;
    --stamp-red-soft: rgba(159, 35, 27, 0.12);
    --brass-gold: #9a7432;
    --brass-bright: #e7c982;
    --brass-soft: rgba(154, 116, 50, 0.16);
    --green-solved: #285d44;
    --line-sepia: rgba(97, 84, 71, 0.24);
    --shadow-heavy: 0 24px 60px rgba(0, 0, 0, 0.58);
    --font-serif: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', Georgia, serif;
    --font-mono: 'Special Elite', 'Courier New', Consolas, monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    color: var(--ink-main);
    font-family: var(--font-serif);
    background-color: var(--desk-bg);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

.desk-surface {
    position: relative;
    min-height: 100vh;
    padding: 24px 16px 40px;
    overflow-x: hidden;
    background: linear-gradient(160deg, #281d17 0%, #150f0c 100%);
}

.ambient-bg-layer {
    position: fixed;
    inset: 0;
    background: url('../images/bg-detective-study.jpg') center center / cover no-repeat;
    opacity: 0.42;
    pointer-events: none;
    z-index: 0;
}

.ambient-mist-layer {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 18% 12%, rgba(231, 201, 130, 0.10), transparent 44%),
        radial-gradient(circle at 82% 88%, rgba(159, 35, 27, 0.14), transparent 46%),
        linear-gradient(180deg, rgba(20, 14, 10, 0.48), rgba(20, 14, 10, 0.72));
    pointer-events: none;
    z-index: 0;
}

.dossier-wrapper {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

/* 上部クローム（フォルダタブ + 音声コントロール） */
.top-chrome {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.folder-tabs {
    display: flex;
    gap: 8px;
    padding-left: 14px;
}

.folder-tab {
    appearance: none;
    border: 1px solid #867159;
    border-bottom: none;
    background: #cab89a;
    color: #463a2e;
    padding: 9px 16px 8px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease;
    box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.08);
}

.folder-tab:hover {
    background: #d8c7ab;
}

.folder-tab.is-active {
    background: var(--paper-bg);
    color: var(--ink-main);
    border-color: var(--paper-edge);
    box-shadow: none;
    padding-bottom: 11px;
    margin-bottom: -2px;
}

.tab-code {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--stamp-red);
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 8px;
}

.audio-pill {
    appearance: none;
    border: 1px solid rgba(231, 201, 130, 0.38);
    background: rgba(26, 19, 15, 0.82);
    color: #e6d7bd;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 99px;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.audio-pill:hover {
    background: rgba(54, 40, 31, 0.95);
    border-color: var(--brass-bright);
    color: #fff6e2;
}

.audio-pill.is-on {
    border-color: rgba(231, 201, 130, 0.72);
    color: var(--brass-bright);
}

.audio-pill.is-off {
    opacity: 0.62;
    color: #b5a694;
}

/* 紙面本体 */
.dossier-paper {
    position: relative;
    background:
        radial-gradient(circle at 92% 8%, rgba(154, 116, 50, 0.08), transparent 28%),
        radial-gradient(circle at 8% 92%, rgba(97, 84, 71, 0.08), transparent 34%),
        linear-gradient(180deg, #f7efe0 0%, var(--paper-bg) 52%, #eee2ca 100%);
    border: 1px solid var(--paper-edge);
    border-radius: 4px 10px 10px 10px;
    padding: 28px 34px 26px;
    box-shadow:
        var(--shadow-heavy),
        inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.paper-clip {
    position: absolute;
    top: -12px;
    right: 34px;
    width: 24px;
    height: 46px;
    border: 3px solid #9c9286;
    border-radius: 12px;
    box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.28);
    pointer-events: none;
}

.paper-clip::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 4px;
    right: 4px;
    bottom: 8px;
    border: 2px solid #b8afa3;
    border-radius: 8px;
}

/* ヘッダ */
.dossier-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--ink-main);
    box-shadow: 0 4px 0 -2px var(--paper-bg), 0 5px 0 -2px var(--ink-muted);
}

.agency-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agency-emblem {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    border: 1px solid rgba(154, 116, 50, 0.55);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.24);
    object-fit: cover;
    flex-shrink: 0;
}

.agency-mark {
    display: flex;
    flex-direction: column;
}

.agency-en {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--ink-muted);
}

.agency-ja {
    font-size: 1.18rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.header-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mini-badge {
    border: 1px solid var(--line-sepia);
    background: rgba(255, 255, 255, 0.44);
    padding: 5px 12px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.mini-badge-accent {
    border-color: rgba(159, 35, 27, 0.35);
    background: var(--stamp-red-soft);
}

.mini-badge-label {
    font-size: 0.7rem;
    color: var(--ink-muted);
    line-height: 1.2;
}

.mini-badge-value {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink-main);
    line-height: 1.25;
}

.mini-badge-accent .mini-badge-value {
    color: var(--stamp-red);
}

/* エラーバナー */
.error-banner {
    background: #fbe9e7;
    border: 1px solid var(--stamp-red);
    color: #6b1510;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
}

.error-banner[hidden] {
    display: none;
}

/* セクション遷移 */
.view-section {
    animation: paperFade 0.28s ease-out;
}

.view-section[hidden] {
    display: none;
}

@keyframes paperFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

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

/* 共通見出し・ボタン */
.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin: 0 0 14px;
    color: var(--ink-main);
}

.section-heading::after {
    content: "";
    flex: 1;
    height: 1px;
    background: repeating-linear-gradient(90deg,
            var(--ink-muted) 0px,
            var(--ink-muted) 4px,
            transparent 4px,
            transparent 8px);
    opacity: 0.45;
}

.btn-primary,
.btn-secondary,
.btn-link {
    font-family: var(--font-serif);
    cursor: pointer;
    transition: transform 0.14s ease, box-shadow 0.16s ease, background-color 0.16s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--stamp-red);
    color: #fff9f2;
    border: 1px solid #751812;
    padding: 13px 26px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 0 #5b120d, 0 8px 18px rgba(159, 35, 27, 0.24);
}

.btn-primary:hover:not(:disabled) {
    background: #b12920;
    transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #5b120d;
}

.btn-primary:disabled,
.btn-secondary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-wax .wax-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ffd7c9;
    box-shadow: inset 0 0 0 2px #9f231b;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.58);
    color: var(--ink-main);
    border: 1px solid #8a7864;
    padding: 11px 20px;
    border-radius: 5px;
    font-size: 0.94rem;
    font-weight: 600;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.9);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 0.84rem;
    box-shadow: none;
}

.btn-link {
    background: none;
    border: none;
    color: var(--ink-muted);
    text-decoration: underline;
    font-size: 0.9rem;
    padding: 6px 8px;
}

.btn-link:hover {
    color: var(--ink-main);
}

/* 表紙ヒーロー（ビジュアル背景付き） */
.cover-hero {
    position: relative;
    border: 1px solid #755b3c;
    border-radius: 8px;
    margin-bottom: 26px;
    overflow: hidden;
    background: #1d1510;
    color: #f6ecda;
    box-shadow: 0 12px 28px rgba(24, 16, 11, 0.28);
}

.cover-hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(95deg, rgba(22, 15, 11, 0.92) 0%, rgba(25, 17, 12, 0.78) 54%, rgba(25, 17, 12, 0.34) 100%),
        url('../images/hero-dossier.jpg') center right / cover no-repeat;
    z-index: 0;
}

.cover-hero-inner {
    position: relative;
    z-index: 1;
    padding: 28px 28px 30px;
}

.stamp-confidential {
    position: absolute;
    top: 18px;
    right: 20px;
    font-family: var(--font-mono);
    font-size: 0.92rem;
    letter-spacing: 0.16em;
    color: #ff9f94;
    border: 2px solid rgba(255, 145, 132, 0.75);
    background: rgba(28, 12, 10, 0.55);
    padding: 4px 11px;
    transform: rotate(-7deg);
    pointer-events: none;
}

.case-tag {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    color: var(--brass-bright);
    margin: 0 0 8px;
}

.cover-title {
    margin: 0 0 14px;
    font-size: clamp(1.65rem, 3.8vw, 2.35rem);
    line-height: 1.35;
    letter-spacing: 0.04em;
    color: #fdf6e6;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}

.cover-lead {
    margin: 0 0 24px;
    font-size: 0.98rem;
    color: #dfd2be;
    max-width: 560px;
}

.cover-lead strong {
    color: var(--brass-bright);
}

.cover-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-hero-sec {
    background: rgba(250, 245, 234, 0.14);
    color: #f6ecda;
    border-color: rgba(231, 201, 130, 0.52);
}

.btn-hero-sec:hover:not(:disabled) {
    background: rgba(250, 245, 234, 0.26);
    color: #fff;
}

.mechanism-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.mech-card {
    background: rgba(255, 255, 255, 0.44);
    border: 1px solid var(--line-sepia);
    border-radius: 6px;
    padding: 16px;
}

.mech-num {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--stamp-red);
    font-weight: 700;
}

.mech-card h3 {
    margin: 4px 0 6px;
    font-size: 1rem;
}

.mech-card p {
    margin: 0;
    font-size: 0.87rem;
    color: var(--ink-muted);
    line-height: 1.6;
}

/* SNSで紹介ウィジェット（霧中将棋・YONEDA統一） */
.sns-share-widget {
    margin-top: 24px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.46);
    border: 1px solid var(--line-sepia);
    border-radius: 8px;
}

.sns-share-heading {
    margin: 0 0 12px;
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--ink-main);
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.sns-share-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sns-share-compact {
    margin-top: 12px;
}

.sns-share-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 6px;
    border: 1px solid #9f8c74;
    background: var(--paper-light);
    color: var(--ink-main);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: transform 0.12s ease, border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.sns-share-link:hover {
    border-color: var(--stamp-red);
    background: #fffdf8;
    color: var(--stamp-red);
    transform: translateY(-1px);
}

.sns-share-link svg {
    flex-shrink: 0;
}

/* 尋問ビュー */
.question-topbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.topbar-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.phase-pill {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 99px;
    background: var(--brass-soft);
    border: 1px solid rgba(154, 116, 50, 0.45);
    color: #5c4317;
    font-weight: 700;
}

.case-code-pill {
    font-family: var(--font-mono);
    font-size: 0.86rem;
    letter-spacing: 0.12em;
    padding: 4px 10px;
    border: 1px solid var(--ink-main);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.45);
}

.step-counter {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--stamp-red);
}

.clarity-box {
    background: rgba(255, 255, 255, 0.44);
    border: 1px solid var(--line-sepia);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.clarity-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.clarity-pct {
    font-family: var(--font-mono);
    color: var(--stamp-red);
}

.clarity-track {
    height: 10px;
    background: rgba(97, 84, 71, 0.18);
    border-radius: 99px;
    overflow: hidden;
}

.clarity-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brass-gold), var(--stamp-red));
    border-radius: 99px;
    transition: width 0.35s ease;
}

.focus-status-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 9px;
}

.focus-tag {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--stamp-red);
    background: var(--stamp-red-soft);
    border: 1px solid rgba(159, 35, 27, 0.28);
    border-radius: 4px;
    padding: 2px 9px;
}

.solved-tag {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--green-solved);
    background: rgba(40, 93, 68, 0.1);
    border: 1px solid rgba(40, 93, 68, 0.32);
    border-radius: 4px;
    padding: 2px 9px;
}

.clarity-note {
    margin: 7px 0 0;
    font-size: 0.84rem;
    color: var(--ink-muted);
}

.question-card {
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid #b5a38d;
    border-radius: 8px;
    padding: 22px 24px;
    box-shadow: 0 6px 18px rgba(35, 29, 25, 0.06);
}

.detective-note {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--brass-gold);
    margin: 0 0 8px;
    letter-spacing: 0.05em;
}

.question-text {
    margin: 0 0 20px;
    font-size: 1.24rem;
    line-height: 1.55;
}

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

.option-btn {
    text-align: left;
    background: var(--paper-light);
    border: 1px solid #a8957e;
    border-radius: 6px;
    padding: 13px 16px;
    cursor: pointer;
    font-family: var(--font-serif);
    font-size: 0.98rem;
    color: var(--ink-main);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: transform 0.12s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.option-btn:hover:not(:disabled) {
    background: #fffdf7;
    border-color: var(--stamp-red);
    transform: translateX(3px);
}

.option-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.option-num {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: var(--ink-main);
    color: var(--paper-light);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.option-btn:hover:not(:disabled) .option-num {
    background: var(--stamp-red);
}

.keyboard-hint {
    margin: 14px 0 0;
    font-size: 0.78rem;
    color: var(--ink-faint);
    text-align: right;
}

/* 解析中ビュー */
.analyzing-box {
    text-align: center;
    padding: 44px 16px;
}

.analyzing-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 18px;
    border: 3px solid rgba(159, 35, 27, 0.2);
    border-top-color: var(--stamp-red);
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.analyzing-tag {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    color: var(--brass-gold);
    margin: 0 0 6px;
}

.analyzing-title {
    margin: 0 0 18px;
    font-size: 1.4rem;
}

.analyzing-log {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 420px;
    text-align: left;
    font-size: 0.9rem;
    color: var(--ink-muted);
}

.analyzing-log li {
    padding: 4px 0;
    border-bottom: 1px dashed var(--line-sepia);
}

/* 報告書ビュー */
.report-top {
    position: relative;
    padding: 20px 22px;
    border: 2px solid var(--ink-main);
    background: rgba(255, 255, 255, 0.54);
    border-radius: 6px;
    margin-bottom: 24px;
}

.report-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.report-case-id {
    font-family: var(--font-mono);
    font-size: 0.92rem;
    letter-spacing: 0.14em;
    color: var(--ink-muted);
}

.stamp-profiled {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    letter-spacing: 0.15em;
    color: var(--stamp-red);
    border: 2px solid var(--stamp-red);
    padding: 3px 10px;
    transform: rotate(-5deg);
    font-weight: 700;
}

.report-hero-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.report-emblem-box {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 2px solid var(--brass-gold);
    background: radial-gradient(circle, rgba(231, 201, 130, 0.24), rgba(159, 35, 27, 0.08));
    color: var(--stamp-red);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.report-kicker {
    margin: 0;
    font-size: 0.82rem;
    color: var(--brass-gold);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.report-codename {
    margin: 2px 0 4px;
    font-size: clamp(1.55rem, 3.6vw, 2.15rem);
    line-height: 1.25;
}

.report-subtitle {
    margin: 0;
    font-size: 0.98rem;
    color: var(--ink-muted);
    font-weight: 600;
}

.report-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.keyword-tag {
    font-size: 0.78rem;
    padding: 2px 10px;
    border: 1px solid var(--brass-gold);
    background: var(--brass-soft);
    color: #5c4317;
    border-radius: 99px;
}

.report-summary {
    margin: 0;
    font-size: 0.98rem;
}

.report-block {
    margin-bottom: 26px;
}

/* 推定属性グリッド（性別・年齢・身長・体型の4枠） */
.attr-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.attr-card {
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid var(--line-sepia);
    border-radius: 6px;
    padding: 12px 10px;
    text-align: center;
}

.attr-label {
    display: block;
    font-size: 0.76rem;
    color: var(--ink-muted);
    margin-bottom: 4px;
}

.attr-value {
    display: block;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 4px;
}

.attr-conf {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--brass-gold);
}

/* 職業20職種スポットライト */
.occ-spotlight {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 16px;
    background: linear-gradient(135deg, rgba(154, 116, 50, 0.11), rgba(255, 255, 255, 0.45));
    border: 1px solid rgba(154, 116, 50, 0.45);
    border-radius: 8px;
    padding: 15px 18px;
    margin-bottom: 12px;
}

.occ-kicker {
    display: block;
    font-size: 0.78rem;
    color: #7d5b1f;
    font-weight: 700;
    margin-bottom: 4px;
}

.occ-name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 10px;
}

.occ-name {
    font-size: 1.32rem;
    line-height: 1.3;
    color: var(--ink-main);
}

.occ-group {
    font-size: 0.78rem;
    padding: 2px 8px;
    background: #5c4317;
    color: var(--paper-light);
    border-radius: 4px;
    white-space: nowrap;
}

.occ-conf {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: #7d5b1f;
    font-weight: 700;
}

.occ-runners {
    border-left: 1px dashed var(--line-sepia);
    padding-left: 16px;
}

.occ-runners ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.occ-runners li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.84rem;
    padding-bottom: 4px;
    border-bottom: 1px dotted var(--line-sepia);
}

/* 都道府県スポットライト */
.pref-spotlight {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 16px;
    background: linear-gradient(135deg, rgba(159, 35, 27, 0.07), rgba(154, 116, 50, 0.08));
    border: 1px solid rgba(159, 35, 27, 0.35);
    border-radius: 8px;
    padding: 16px 18px;
}

.pref-kicker {
    display: block;
    font-size: 0.78rem;
    color: var(--stamp-red);
    font-weight: 700;
    margin-bottom: 4px;
}

.pref-name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}

.pref-name {
    font-size: 1.55rem;
    color: var(--ink-main);
}

.pref-region {
    font-size: 0.84rem;
    padding: 2px 8px;
    background: var(--ink-main);
    color: var(--paper-light);
    border-radius: 4px;
}

.pref-conf {
    font-family: var(--font-mono);
    font-size: 0.84rem;
    color: var(--stamp-red);
    font-weight: 700;
}

.pref-clue {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ink-muted);
}

.pref-runners {
    border-left: 1px dashed var(--line-sepia);
    padding-left: 16px;
}

.pref-runners-title {
    display: block;
    font-size: 0.78rem;
    color: var(--ink-muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.pref-runners ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pref-runners li {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    padding-bottom: 4px;
    border-bottom: 1px dotted var(--line-sepia);
}

/* 性格5軸 */
.axes-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid var(--line-sepia);
    border-radius: 6px;
    padding: 16px 18px;
}

.axis-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.axis-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.86rem;
    font-weight: 600;
}

.axis-score-tag {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--ink-muted);
}

.axis-track {
    position: relative;
    height: 10px;
    background: rgba(97, 84, 71, 0.16);
    border-radius: 99px;
}

.axis-center-line {
    position: absolute;
    left: 50%;
    top: -2px;
    bottom: -2px;
    width: 2px;
    background: rgba(35, 29, 25, 0.3);
}

.axis-marker {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--stamp-red);
    border: 2px solid var(--paper-light);
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

/* 人物像3カード */
.persona-notes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.note-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--line-sepia);
    border-radius: 6px;
    padding: 15px;
}

.note-card-secret {
    background: rgba(154, 116, 50, 0.08);
    border-color: rgba(154, 116, 50, 0.4);
}

.note-card h3 {
    margin: 0 0 8px;
    font-size: 0.96rem;
    color: var(--stamp-red);
}

.note-card p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.65;
}

/* 推理メモ */
.clue-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.clue-item {
    background: rgba(255, 255, 255, 0.5);
    border-left: 4px solid var(--brass-gold);
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
}

.clue-item-note {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--ink-muted);
    display: block;
}

.clue-item-evidence {
    font-weight: 700;
    font-size: 0.94rem;
    display: block;
    margin: 2px 0;
}

.clue-item-choice {
    font-size: 0.82rem;
    color: var(--ink-muted);
}

/* 5段階評価 */
.feedback-panel,
.truth-panel,
.share-link-box {
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid #b5a38d;
    border-radius: 8px;
    padding: 18px 20px;
}

.feedback-desc,
.truth-desc {
    margin: 0 0 14px;
    font-size: 0.9rem;
    color: var(--ink-muted);
}

.rating-buttons {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.rating-btn {
    border: 1px solid #8a7864;
    background: var(--paper-light);
    color: var(--ink-main);
    border-radius: 6px;
    padding: 11px 4px;
    cursor: pointer;
    font-family: var(--font-serif);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: transform 0.12s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.rating-btn:hover:not(:disabled) {
    border-color: var(--stamp-red);
    background: #fffdf7;
    transform: translateY(-2px);
}

.rating-btn.is-selected {
    background: var(--stamp-red);
    color: #fff;
    border-color: #751812;
}

.rating-btn:disabled {
    cursor: default;
}

.rating-score {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    opacity: 0.75;
}

.rating-label {
    font-size: 0.77rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    word-break: keep-all;
}

.feedback-result {
    margin-top: 14px;
    padding: 12px 14px;
    background: rgba(40, 93, 68, 0.1);
    border: 1px solid rgba(40, 93, 68, 0.35);
    border-radius: 6px;
    color: var(--green-solved);
    font-size: 0.92rem;
    font-weight: 600;
}

/* 共有リンクボックス */
.share-link-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--ink-main);
    margin-bottom: 6px;
}

.share-link-help {
    margin: 0 0 12px;
    font-size: 0.84rem;
    color: var(--ink-muted);
}

.share-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.share-link-input {
    flex: 1 1 260px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 8px 10px;
    border: 1px solid #9c8a74;
    border-radius: 5px;
    background: #fffdf7;
    color: var(--ink-main);
}

/* 答え合わせフォーム */
.truth-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.truth-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.truth-field label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ink-muted);
}

.truth-field select {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    padding: 8px 10px;
    border: 1px solid #9c8a74;
    border-radius: 4px;
    background: #fffcf6;
    color: var(--ink-main);
}

.truth-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.truth-result {
    margin-top: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--green-solved);
    border-radius: 6px;
}

.truth-match-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 14px;
    font-size: 0.86rem;
}

.report-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.copy-toast {
    margin: 10px 0 0;
    font-size: 0.86rem;
    color: var(--green-solved);
    font-weight: 600;
}

/* 統計ページ */
.stats-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.stats-title {
    margin: 0 0 6px;
    font-size: 1.7rem;
}

.stats-lead {
    margin: 0;
    font-size: 0.92rem;
    color: var(--ink-muted);
}

.stats-loading {
    padding: 40px 0;
    text-align: center;
    color: var(--ink-muted);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.kpi-card {
    background: rgba(255, 255, 255, 0.56);
    border: 1px solid var(--line-sepia);
    border-radius: 6px;
    padding: 14px 12px;
    text-align: center;
}

.kpi-label {
    display: block;
    font-size: 0.78rem;
    color: var(--ink-muted);
}

.kpi-val {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--ink-main);
    margin-top: 4px;
}

.kpi-card-accent .kpi-val {
    color: var(--stamp-red);
}

.stats-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.stats-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--line-sepia);
    border-radius: 8px;
    padding: 16px 18px;
}

.stats-card-title {
    margin: 0 0 12px;
    font-size: 1rem;
    border-bottom: 1px solid var(--line-sepia);
    padding-bottom: 6px;
}

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

.bar-item-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.84rem;
    margin-bottom: 3px;
}

.bar-track {
    height: 8px;
    background: rgba(97, 84, 71, 0.16);
    border-radius: 99px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brass-gold), var(--stamp-red));
    border-radius: 99px;
}

.bar-sub-note {
    display: block;
    font-size: 0.75rem;
    color: var(--ink-muted);
    margin-top: 2px;
}

.trend-chart-wrap {
    width: 100%;
    min-height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trend-svg {
    width: 100%;
    height: auto;
    display: block;
}

.empty-note {
    font-size: 0.86rem;
    color: var(--ink-muted);
    margin: 8px 0;
}

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

.top-q-item {
    border-bottom: 1px dotted var(--line-sepia);
    padding-bottom: 8px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: baseline;
    font-size: 0.88rem;
}

.top-q-metrics {
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--stamp-red);
}

.dossier-footer {
    margin-top: 28px;
    padding-top: 14px;
    border-top: 1px solid var(--line-sepia);
    text-align: center;
    font-size: 0.78rem;
    color: var(--ink-faint);
}

/* 自社サイト・姉妹ゲーム統一フッター */
.site-footer {
    margin-top: 18px;
    padding: 12px 10px 4px;
    text-align: center;
}

.site-footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 22px;
}

.site-footer-link {
    color: #d6c5a7;
    text-decoration: none;
    font-size: 0.86rem;
    letter-spacing: 0.04em;
    border-bottom: 1px solid transparent;
    transition: color 0.16s ease, border-color 0.16s ease;
}

.site-footer-link:hover {
    color: var(--brass-bright);
    border-bottom-color: var(--brass-bright);
}

/* 共通モーダル */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(12, 8, 6, 0.76);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-box {
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #faf3e5 0%, var(--paper-bg) 100%);
    border: 2px solid #8a7355;
    border-radius: 10px;
    padding: 22px 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
    color: var(--ink-main);
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line-sepia);
    padding-bottom: 10px;
    margin-bottom: 14px;
}

.modal-title {
    margin: 0;
    font-size: 1.12rem;
    color: var(--ink-main);
}

.modal-close {
    appearance: none;
    border: none;
    background: none;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--ink-muted);
    cursor: pointer;
    padding: 2px 6px;
}

.modal-close:hover {
    color: var(--stamp-red);
}

.modal-footer-end {
    margin-top: 14px;
    text-align: right;
}

/* 共有結果証書カードモーダル */
.share-card-box {
    max-width: 520px;
    text-align: center;
    border: 2px solid var(--ink-main);
}

.share-card-kicker {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: var(--brass-gold);
    margin-bottom: 8px;
}

.share-card-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.share-card-pill {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    padding: 3px 10px;
    border-radius: 99px;
    border: 1px solid var(--ink-main);
    background: rgba(255, 255, 255, 0.6);
}

.share-card-pill.is-rating {
    border-color: var(--stamp-red);
    color: var(--stamp-red);
    background: var(--stamp-red-soft);
    font-weight: 700;
}

.share-card-emblem {
    width: 72px;
    height: 72px;
    margin: 0 auto 10px;
    border-radius: 50%;
    border: 2px solid var(--brass-gold);
    background: radial-gradient(circle, rgba(231, 201, 130, 0.28), rgba(159, 35, 27, 0.08));
    color: var(--stamp-red);
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-card-title {
    margin: 0 0 4px;
    font-size: 1.55rem;
}

.share-card-sub {
    margin: 0 0 14px;
    font-size: 0.88rem;
    color: var(--ink-muted);
}

.share-card-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.share-card-stat {
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid var(--line-sepia);
    border-radius: 6px;
    padding: 8px 6px;
}

.share-card-stat-label {
    font-size: 0.7rem;
    color: var(--ink-muted);
}

.share-card-stat-val {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ink-main);
}

.share-card-stat.is-pref {
    border-color: rgba(159, 35, 27, 0.45);
    background: rgba(159, 35, 27, 0.07);
}

.share-card-stat.is-pref .share-card-stat-val {
    color: var(--stamp-red);
}

.share-card-note {
    font-size: 0.82rem;
    color: var(--ink-muted);
    margin-bottom: 16px;
    line-height: 1.55;
}

.share-card-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

/* BGMモーダル */
.bgm-now-card {
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid var(--line-sepia);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.bgm-now-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.bgm-status-pill {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 99px;
    background: var(--stamp-red-soft);
    color: var(--stamp-red);
    font-weight: 700;
}

.bgm-now-title {
    font-size: 1rem;
}

.bgm-now-mood {
    font-size: 0.8rem;
    color: var(--ink-muted);
}

.bgm-controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.bgm-volume-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bgm-vol-title {
    font-size: 0.84rem;
    color: var(--ink-muted);
    white-space: nowrap;
}

.bgm-slider {
    flex: 1;
    accent-color: var(--stamp-red);
}

.bgm-vol-pct {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    width: 38px;
    text-align: right;
}

.bgm-track-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
}

.bgm-track-btn {
    appearance: none;
    width: 100%;
    text-align: left;
    padding: 9px 12px;
    border-radius: 6px;
    border: 1px solid var(--line-sepia);
    background: rgba(255, 255, 255, 0.5);
    color: var(--ink-main);
    font-family: var(--font-serif);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    transition: border-color 0.14s ease, background-color 0.14s ease;
}

.bgm-track-btn:hover {
    background: #fffdf7;
    border-color: var(--brass-gold);
}

.bgm-track-btn.is-current {
    border-color: var(--stamp-red);
    background: rgba(159, 35, 27, 0.09);
}

.bgm-track-num {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--stamp-red);
    margin-right: 6px;
}

.bgm-track-mood {
    font-size: 0.76rem;
    color: var(--ink-muted);
}

/* フローティングトースト */
.toast-wrap {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 150;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast-item {
    background: #231d19;
    color: #f7efe0;
    border: 1px solid var(--brass-gold);
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 0.86rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    transition: opacity 0.25s ease;
}

/* レスポンシブ */
@media (max-width: 760px) {
    .dossier-paper {
        padding: 20px 18px 20px;
    }

    .top-chrome {
        align-items: flex-start;
    }

    .folder-tabs {
        padding-left: 6px;
    }

    .cover-hero-inner {
        padding: 22px 18px 24px;
    }

    .stamp-confidential {
        position: static;
        display: inline-block;
        margin-bottom: 10px;
        transform: rotate(-3deg);
    }

    .mechanism-grid,
    .persona-notes,
    .stats-two-col,
    .truth-grid {
        grid-template-columns: 1fr;
    }

    .attr-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .occ-spotlight,
    .pref-spotlight {
        grid-template-columns: 1fr;
    }

    .occ-runners,
    .pref-runners {
        border-left: none;
        border-top: 1px dashed var(--line-sepia);
        padding-left: 0;
        padding-top: 12px;
    }

    .rating-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .truth-match-list,
    .share-card-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}