:root {
    --ink-900: #140b09;
    --ink-800: #24130f;
    --ink-700: #3b221b;
    --paper-100: #f4e8cf;
    --paper-200: #e8d4af;
    --paper-300: #d8bf95;
    --gold-300: #d2ad61;
    --gold-400: #ba8c3d;
    --red-400: #a83e2d;
    --red-500: #822819;
    --border: rgba(210, 173, 97, 0.28);
    --shadow: 0 28px 60px rgba(5, 2, 1, 0.45);
    --font-title: "Noto Serif SC", "Songti SC", serif;
    --font-ui: "Cinzel", "Noto Serif SC", serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-title);
    color: var(--paper-100);
    background:
        radial-gradient(circle at 20% 15%, rgba(168, 62, 45, 0.22), transparent 28%),
        radial-gradient(circle at 80% 10%, rgba(210, 173, 97, 0.12), transparent 24%),
        radial-gradient(circle at 50% 80%, rgba(98, 46, 26, 0.3), transparent 32%),
        linear-gradient(180deg, #150b08 0%, #25120d 40%, #120907 100%);
}

.noise-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.08;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
    background-size: 6px 6px, 7px 7px;
    mix-blend-mode: screen;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

.hero-panel,
.prototype-section,
.notes-section {
    width: min(1340px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-panel {
    padding: 34px 0 72px;
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 36px;
    align-items: stretch;
}

.hero-copy {
    position: relative;
    padding: 42px 44px;
    border-radius: 28px;
    background:
        linear-gradient(150deg, rgba(18, 9, 7, 0.88), rgba(56, 28, 20, 0.84)),
        rgba(20, 11, 9, 0.8);
    border: 1px solid rgba(210, 173, 97, 0.18);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-copy::before {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(210, 173, 97, 0.2);
    border-radius: 22px;
    pointer-events: none;
}

.hero-brand {
    position: relative;
    margin: 0 0 34px;
    padding-bottom: 20px;
}

.hero-brand::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: min(260px, 42%);
    height: 1px;
    background: linear-gradient(90deg, rgba(210, 173, 97, 0.72), rgba(210, 173, 97, 0));
}

.hero-brand-title,
.hero-brand-subtitle {
    margin: 0;
}

.hero-brand-title {
    font-size: clamp(2.2rem, 4.4vw, 3.9rem);
    line-height: 1.02;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #fff4dd;
    text-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.hero-brand-subtitle {
    margin-top: 10px;
    font-family: var(--font-ui);
    font-size: 0.96rem;
    letter-spacing: 0.32em;
    color: rgba(210, 173, 97, 0.9);
}

.eyebrow,
.section-kicker {
    margin: 0 0 14px;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    letter-spacing: 0.4em;
    color: rgba(210, 173, 97, 0.9);
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0;
    max-width: 11em;
    font-size: clamp(1.6rem, 2.8vw, 2.55rem);
    line-height: 1.45;
    font-weight: 500;
    color: #fff5dd;
    letter-spacing: 0.04em;
}

.hero-lead {
    max-width: 760px;
    margin: 24px 0 0;
    font-size: 1.08rem;
    line-height: 1.95;
    color: rgba(244, 232, 207, 0.84);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.hero-button {
    padding: 14px 22px;
    border-radius: 14px;
    font-size: 0.98rem;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.hero-button:hover {
    transform: translateY(-2px);
}

.hero-button-primary {
    background: linear-gradient(135deg, #a7402d, #7f2417);
    color: #fff2e2;
    box-shadow: 0 14px 32px rgba(130, 40, 25, 0.3);
}

.hero-button-secondary {
    border: 1px solid var(--border);
    background: rgba(255, 247, 228, 0.04);
    color: var(--paper-100);
}

.hero-aside {
    display: grid;
    gap: 18px;
}

.hero-card,
.panel,
.note-card {
    border-radius: 24px;
    border: 1px solid rgba(210, 173, 97, 0.18);
    background: linear-gradient(180deg, rgba(45, 23, 17, 0.92), rgba(19, 10, 8, 0.94));
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 24px 26px;
}

.hero-card-label {
    display: inline-block;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(210, 173, 97, 0.25);
    font-family: var(--font-ui);
    font-size: 0.8rem;
    letter-spacing: 0.24em;
    color: var(--gold-300);
}

.hero-card p {
    margin: 0;
    line-height: 1.8;
    color: rgba(244, 232, 207, 0.84);
}

.prototype-section {
    padding: 10px 0 80px;
}

.landing-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr 0.92fr;
    gap: 22px;
    align-items: start;
}

.run-banner {
    width: min(1340px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0 18px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.run-banner-copy h1 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.8rem);
    color: #fff0d5;
}

.run-banner-copy p {
    max-width: 780px;
    margin: 12px 0 0;
    line-height: 1.82;
    color: rgba(244, 232, 207, 0.78);
}

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

.prototype-section-game {
    padding-top: 0;
}

.prototype-layout-game {
    grid-template-columns: minmax(290px, 320px) minmax(0, 1.45fr) minmax(290px, 320px);
    align-items: start;
}

.setup-column,
.game-column,
.status-column {
    display: grid;
    align-content: start;
    gap: 22px;
    min-height: 0;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 28px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.9rem, 4vw, 3rem);
    font-weight: 600;
    color: #fff1d2;
}

.section-heading p {
    margin: 14px 0 0;
    line-height: 1.85;
    color: rgba(244, 232, 207, 0.76);
}

.prototype-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}

.panel {
    padding: 22px 22px 24px;
}

.panel + .panel {
    margin-top: 22px;
}

.setup-column .panel + .panel,
.game-column .panel + .panel,
.status-column .panel + .panel {
    margin-top: 0;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.panel-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff0d4;
}

.panel-copy {
    margin: -4px 0 14px;
    line-height: 1.72;
    font-size: 0.9rem;
    color: rgba(244, 232, 207, 0.64);
}

.panel-section + .panel-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(210, 173, 97, 0.1);
}

.panel-subtitle {
    margin: 0 0 12px;
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    color: rgba(210, 173, 97, 0.88);
}

.panel-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(210, 173, 97, 0.28), rgba(168, 62, 45, 0.28));
    color: var(--gold-300);
    font-family: var(--font-ui);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
}

.setup-group {
    display: grid;
    gap: 10px;
}

.setup-group + .setup-group {
    margin-top: 18px;
}

.setup-label {
    margin: 0 0 2px;
    font-size: 0.95rem;
    color: rgba(244, 232, 207, 0.7);
}

.setup-option,
.start-button,
.ghost-button,
.choice-button {
    border: 1px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.setup-option {
    padding: 12px 14px;
    text-align: left;
    background: rgba(255, 247, 228, 0.05);
    color: rgba(244, 232, 207, 0.86);
}

.setup-option:hover,
.setup-option.is-selected {
    transform: translateY(-1px);
    border-color: rgba(210, 173, 97, 0.45);
    background: linear-gradient(135deg, rgba(168, 62, 45, 0.24), rgba(210, 173, 97, 0.12));
    color: #fff1d7;
}

.start-button {
    width: 100%;
    margin-top: 20px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #bb8d41, #8b2e1d);
    color: #fff7e7;
    box-shadow: 0 12px 28px rgba(139, 46, 29, 0.25);
}

.start-button:hover,
.ghost-button:hover,
.choice-button:hover:not(:disabled) {
    transform: translateY(-2px);
}

.setup-hint,
.control-hint {
    margin: 14px 0 0;
    line-height: 1.75;
    color: rgba(244, 232, 207, 0.66);
}

.dossier {
    margin: 0;
    display: grid;
    gap: 14px;
}

.dossier-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(210, 173, 97, 0.12);
}

.dossier-row dt {
    color: rgba(244, 232, 207, 0.56);
}

.dossier-row dd {
    margin: 0;
    text-align: right;
    color: #fff0d4;
}

.dossier-row-story {
    align-items: flex-start;
}

.dossier-row-story dd {
    max-width: 180px;
    line-height: 1.7;
}

.official-card {
    width: 100%;
    margin-top: 18px;
    padding: 16px;
    text-align: left;
    background:
        linear-gradient(145deg, rgba(168, 62, 45, 0.22), rgba(255, 247, 228, 0.06));
    border: 1px solid rgba(210, 173, 97, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 247, 228, 0.04);
    color: #fff1d7;
}

.official-card:hover {
    border-color: rgba(210, 173, 97, 0.46);
    background:
        linear-gradient(145deg, rgba(168, 62, 45, 0.3), rgba(255, 247, 228, 0.08));
}

.official-card-top,
.official-card-summary {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.official-card-label,
.official-card-cta {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

.official-card-label {
    color: rgba(244, 232, 207, 0.66);
}

.official-card-cta {
    color: rgba(210, 173, 97, 0.96);
}

.official-card-title {
    display: block;
    margin-top: 10px;
    font-size: 1.24rem;
    color: #fff5df;
}

.official-card-copy {
    margin: 10px 0 0;
    line-height: 1.68;
    font-size: 0.9rem;
    color: rgba(244, 232, 207, 0.76);
}

.official-card-summary {
    margin-top: 14px;
}

.official-card-summary span {
    min-width: 0;
    font-size: 0.82rem;
    color: rgba(244, 232, 207, 0.82);
}

.canvas-frame {
    position: relative;
    padding: 14px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(210, 173, 97, 0.2), rgba(42, 21, 16, 0.95));
    box-shadow: 0 32px 70px rgba(0, 0, 0, 0.42);
}

#game-canvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 20px;
    background: #150b08;
}

.canvas-choice-panel {
    margin-top: 14px;
    padding: 18px 18px 8px;
    border-radius: 22px;
    border: 1px solid rgba(210, 173, 97, 0.12);
    background: rgba(19, 10, 8, 0.72);
}

.canvas-choice-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.canvas-choice-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff0d4;
}

.choice-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.choice-button {
    width: 100%;
    padding: 16px 18px;
    text-align: left;
    background: rgba(255, 247, 228, 0.05);
    color: rgba(244, 232, 207, 0.92);
}

.choice-button span {
    display: block;
}

.choice-button-title {
    margin-bottom: 6px;
    font-size: 1rem;
    color: #fff3dd;
}

.choice-button-desc {
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(244, 232, 207, 0.66);
}

.choice-button:hover:not(:disabled) {
    border-color: rgba(210, 173, 97, 0.4);
    background: linear-gradient(135deg, rgba(168, 62, 45, 0.2), rgba(255, 247, 228, 0.07));
}

.choice-button.is-highlighted {
    border-color: rgba(210, 173, 97, 0.52);
    background: linear-gradient(135deg, rgba(168, 62, 45, 0.26), rgba(255, 247, 228, 0.08));
    box-shadow: inset 0 0 0 1px rgba(210, 173, 97, 0.16);
}

.choice-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.control-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.ghost-button {
    padding: 10px 14px;
    border: 1px solid rgba(210, 173, 97, 0.18);
    background: transparent;
    color: rgba(244, 232, 207, 0.88);
}

.ghost-button-wide {
    width: 100%;
    margin-top: 14px;
}

.stat-grid {
    display: grid;
    gap: 12px;
}

.route-grid,
.relation-grid {
    display: grid;
    gap: 12px;
}

.speaker-panel,
.archive-list,
.save-summary {
    display: grid;
    gap: 12px;
    min-height: 0;
}

.stat-card {
    padding: 14px 14px 12px;
    border-radius: 16px;
    background: rgba(255, 247, 228, 0.04);
    border: 1px solid rgba(210, 173, 97, 0.08);
}

.stat-card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: rgba(244, 232, 207, 0.8);
}

.stat-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 247, 228, 0.08);
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #b03d2c, #d7af61);
}

.term-help {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-bottom: 1px dashed rgba(215, 175, 97, 0.7);
    color: inherit;
    cursor: help;
    transition: color 0.18s ease, border-color 0.18s ease;
}

.term-help:hover,
.term-help:focus-visible,
.term-help.is-help-active {
    color: #fff2d4;
    border-bottom-color: rgba(255, 226, 166, 0.95);
    outline: none;
}

.term-tooltip {
    position: fixed;
    z-index: 60;
    width: min(340px, calc(100vw - 24px));
    padding: 14px 15px 13px;
    border-radius: 16px;
    border: 1px solid rgba(210, 173, 97, 0.28);
    background:
        linear-gradient(180deg, rgba(63, 23, 17, 0.96), rgba(33, 11, 8, 0.98));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
    pointer-events: none;
}

.term-tooltip-title {
    font-size: 0.98rem;
    font-weight: 600;
    color: #fff0d8;
}

.term-tooltip-current,
.term-tooltip-body,
.term-tooltip-effect {
    margin: 8px 0 0;
    line-height: 1.68;
    font-size: 0.88rem;
}

.term-tooltip-current {
    color: rgba(255, 232, 194, 0.82);
}

.term-tooltip-current strong {
    color: #fff2d9;
}

.term-tooltip-body {
    color: rgba(244, 232, 207, 0.82);
}

.term-tooltip-effect {
    color: rgba(215, 175, 97, 0.9);
}

.route-card,
.relation-card {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 247, 228, 0.04);
    border: 1px solid rgba(210, 173, 97, 0.08);
}

.route-card.is-leading {
    background: linear-gradient(135deg, rgba(168, 62, 45, 0.24), rgba(255, 247, 228, 0.06));
    border-color: rgba(210, 173, 97, 0.3);
}

.route-card-header,
.relation-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.route-card-title,
.relation-card-title {
    font-size: 0.96rem;
    color: #fff1d7;
}

.route-card-meta,
.relation-card-meta {
    font-size: 0.84rem;
    color: rgba(244, 232, 207, 0.6);
}

.route-card-desc,
.relation-card-desc {
    margin: 0;
    line-height: 1.65;
    font-size: 0.9rem;
    color: rgba(244, 232, 207, 0.68);
}

.relation-card-note {
    margin: 8px 0 0;
    line-height: 1.58;
    font-size: 0.84rem;
    color: rgba(244, 232, 207, 0.52);
}

.relation-grid-compact .relation-card {
    padding: 12px 13px;
}

.relation-grid-compact .relation-card-desc {
    font-size: 0.86rem;
    line-height: 1.58;
}

.relation-grid-compact .relation-card-note {
    font-size: 0.8rem;
    line-height: 1.52;
}

.save-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(210, 173, 97, 0.1);
    background: rgba(255, 247, 228, 0.04);
}

.save-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-size: 0.94rem;
    color: rgba(244, 232, 207, 0.76);
}

.save-row strong {
    text-align: right;
    color: #fff0d5;
}

.save-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.archive-empty {
    margin: 0;
    line-height: 1.76;
    color: rgba(244, 232, 207, 0.68);
}

.archive-item {
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(210, 173, 97, 0.08);
    background: rgba(255, 247, 228, 0.04);
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.archive-item.is-active {
    border-color: rgba(210, 173, 97, 0.34);
    background: linear-gradient(135deg, rgba(168, 62, 45, 0.18), rgba(255, 247, 228, 0.06));
}

.archive-item-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.archive-item-top strong {
    color: #fff0d7;
}

.archive-item-top span,
.archive-item-meta {
    color: rgba(244, 232, 207, 0.6);
    font-size: 0.84rem;
}

.archive-item-meta,
.archive-item-copy {
    margin: 8px 0 0;
}

.archive-item-copy {
    line-height: 1.68;
    color: rgba(244, 232, 207, 0.76);
}

.archive-item .ghost-button {
    width: 100%;
    margin-top: 12px;
}

.speaker-stack {
    display: grid;
    gap: 12px;
}

.speaker-card {
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(210, 173, 97, 0.08);
    background: rgba(255, 247, 228, 0.04);
}

.speaker-card-primary {
    background:
        linear-gradient(145deg, var(--portrait-a), var(--portrait-b)),
        rgba(255, 247, 228, 0.04);
}

.speaker-card-portrait {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.portrait-emblem,
.speaker-mini-portrait {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(180deg, var(--portrait-a), var(--portrait-b));
    color: #fff3dc;
    box-shadow: inset 0 0 0 1px rgba(255, 247, 228, 0.14);
    font-weight: 700;
}

.portrait-emblem {
    width: 76px;
    height: 92px;
    font-size: 1.7rem;
}

.speaker-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.speaker-card-name {
    color: #fff2da;
    font-size: 1rem;
}

.relation-badge {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(20, 11, 9, 0.2);
    border: 1px solid rgba(255, 247, 228, 0.14);
    color: rgba(255, 243, 221, 0.86);
    font-size: 0.78rem;
}

.speaker-card-role,
.speaker-card-scene,
.speaker-card-note,
.speaker-mini-quote {
    margin: 8px 0 0;
    line-height: 1.68;
}

.speaker-card-role {
    color: rgba(255, 244, 224, 0.68);
    font-size: 0.84rem;
}

.speaker-card-scene {
    color: rgba(255, 244, 224, 0.58);
    font-size: 0.82rem;
}

.speaker-card-note {
    color: rgba(255, 244, 224, 0.72);
    font-size: 0.86rem;
}

.speaker-network {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.speaker-mini {
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(210, 173, 97, 0.08);
    background: rgba(255, 247, 228, 0.04);
}

.speaker-mini.is-active {
    border-color: rgba(210, 173, 97, 0.34);
}

.speaker-mini-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.speaker-mini-name {
    color: #fff1d7;
    font-size: 0.88rem;
}

.speaker-mini-state {
    color: rgba(244, 232, 207, 0.6);
    font-size: 0.78rem;
}

.speaker-mini-portrait {
    width: 44px;
    height: 52px;
    font-size: 1rem;
}

.speaker-mini-quote {
    color: rgba(244, 232, 207, 0.7);
    font-size: 0.82rem;
}

.journal-meta {
    margin: 0 0 2px;
    line-height: 1.68;
    color: rgba(244, 232, 207, 0.66);
    font-size: 0.9rem;
}

.journal-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

@media (min-width: 1121px) {
    .prototype-layout-game {
        grid-template-columns: minmax(300px, 332px) minmax(0, 1.24fr) minmax(300px, 332px);
        gap: 20px;
    }

    .setup-column,
    .game-column,
    .status-column {
        gap: 20px;
        position: static;
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .panel {
        padding: 20px 20px 22px;
    }

    .stat-grid,
    .route-grid,
    .relation-grid-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .panel-journal {
        min-height: clamp(440px, 42vh, 560px);
    }

    .archive-list {
        gap: 10px;
    }

    .archive-item {
        padding: 13px;
    }

    .journal-entry {
        padding: 13px;
    }
}

.journal-entry {
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(210, 173, 97, 0.08);
    background: rgba(255, 247, 228, 0.04);
}

.journal-entry-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.journal-entry-kicker {
    margin: 0;
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(210, 173, 97, 0.8);
}

.journal-entry-title,
.journal-entry-choice,
.journal-entry-result,
.journal-entry-speaker,
.journal-entry-accent {
    margin: 8px 0 0;
}

.journal-entry-title {
    color: #fff0d5;
    font-size: 0.98rem;
}

.journal-entry-order {
    color: rgba(244, 232, 207, 0.58);
    font-size: 0.82rem;
}

.journal-entry-choice {
    color: rgba(244, 232, 207, 0.84);
}

.journal-entry-result {
    line-height: 1.7;
    color: rgba(244, 232, 207, 0.78);
}

.journal-entry-speaker {
    color: rgba(210, 173, 97, 0.86);
    font-size: 0.86rem;
}

.journal-entry-accent {
    line-height: 1.64;
    color: rgba(244, 232, 207, 0.64);
    font-size: 0.86rem;
}

.journal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.journal-tag {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 247, 228, 0.06);
    border: 1px solid rgba(210, 173, 97, 0.08);
    color: rgba(244, 232, 207, 0.76);
    font-size: 0.78rem;
}

.official-tree-modal {
    position: fixed;
    inset: 0;
    z-index: 70;
}

.official-tree-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 4, 3, 0.76);
    backdrop-filter: blur(6px);
}

.official-tree-dialog {
    position: relative;
    width: min(1220px, calc(100% - 32px));
    max-height: calc(100vh - 48px);
    margin: 24px auto;
    padding: 24px;
    overflow: auto;
    border-radius: 28px;
    border: 1px solid rgba(210, 173, 97, 0.2);
    background:
        radial-gradient(circle at top right, rgba(210, 173, 97, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(52, 25, 18, 0.98), rgba(16, 8, 6, 0.98));
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.42);
}

.official-tree-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.official-tree-head h2 {
    margin: 0;
    color: #fff0d6;
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
}

.official-tree-copy {
    margin: 14px 0 0;
    max-width: 860px;
    line-height: 1.8;
    color: rgba(244, 232, 207, 0.76);
}

.official-tree-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.official-tree-tab {
    min-width: 0;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(210, 173, 97, 0.18);
    background: rgba(255, 247, 228, 0.04);
    color: rgba(244, 232, 207, 0.84);
    cursor: pointer;
    text-align: left;
}

.official-tree-tab:hover,
.official-tree-tab[aria-selected="true"] {
    border-color: rgba(210, 173, 97, 0.42);
    background: linear-gradient(135deg, rgba(168, 62, 45, 0.22), rgba(255, 247, 228, 0.08));
    color: #fff1d9;
}

.official-tree-tab strong,
.official-tree-tab span {
    display: block;
}

.official-tree-tab strong {
    font-size: 0.96rem;
}

.official-tree-tab span {
    margin-top: 4px;
    line-height: 1.52;
    font-size: 0.8rem;
    color: rgba(244, 232, 207, 0.68);
}

.official-tree-status {
    display: grid;
    gap: 6px;
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(210, 173, 97, 0.12);
    background: rgba(255, 247, 228, 0.04);
}

.official-tree-status strong {
    color: #fff2dd;
}

.official-tree-status p {
    margin: 0;
    line-height: 1.68;
    color: rgba(244, 232, 207, 0.74);
}

.official-tree-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 340px);
    gap: 18px;
    margin-top: 18px;
}

.official-tree-branches {
    display: grid;
    gap: 14px;
}

.official-tree-branch {
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(210, 173, 97, 0.12);
    background: rgba(255, 247, 228, 0.035);
}

.official-tree-branch-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 12px;
}

.official-tree-branch-header strong {
    color: #fff0d5;
}

.official-tree-branch-header span {
    font-size: 0.8rem;
    color: rgba(210, 173, 97, 0.82);
}

.official-tree-node-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: center;
}

.official-tree-node-list.is-vertical {
    display: grid;
    gap: 10px;
}

.official-tree-connector {
    width: 38px;
    height: 2px;
    margin: 0 6px;
    background: linear-gradient(90deg, rgba(210, 173, 97, 0.2), rgba(210, 173, 97, 0.74), rgba(210, 173, 97, 0.2));
    flex: 0 0 auto;
}

.official-tree-node {
    position: relative;
    min-width: 120px;
    max-width: 172px;
    padding: 12px 13px;
    border-radius: 16px;
    border: 1px solid rgba(210, 173, 97, 0.18);
    background: rgba(20, 11, 9, 0.46);
    color: rgba(244, 232, 207, 0.78);
    cursor: pointer;
    text-align: left;
}

.official-tree-node:hover,
.official-tree-node:focus-visible {
    outline: none;
    border-color: rgba(255, 219, 148, 0.72);
    color: #fff3dc;
}

.official-tree-node.is-achieved {
    background: linear-gradient(145deg, rgba(120, 58, 27, 0.92), rgba(204, 156, 73, 0.24));
    border-color: rgba(210, 173, 97, 0.38);
}

.official-tree-node.is-current {
    background: linear-gradient(145deg, rgba(168, 62, 45, 0.95), rgba(215, 175, 97, 0.26));
    border-color: rgba(255, 222, 165, 0.88);
    box-shadow: 0 0 0 1px rgba(255, 239, 204, 0.16), 0 12px 30px rgba(0, 0, 0, 0.2);
}

.official-tree-node.is-next {
    border-color: rgba(210, 173, 97, 0.46);
    box-shadow: inset 0 0 0 1px rgba(210, 173, 97, 0.16);
}

.official-tree-node.is-muted {
    opacity: 0.48;
}

.official-tree-node.is-selected {
    box-shadow: 0 0 0 2px rgba(255, 226, 166, 0.42);
}

.official-tree-node strong,
.official-tree-node span {
    display: block;
}

.official-tree-node strong {
    font-size: 0.92rem;
    color: inherit;
}

.official-tree-node span {
    margin-top: 5px;
    line-height: 1.55;
    font-size: 0.78rem;
    color: rgba(244, 232, 207, 0.68);
}

.official-tree-detail {
    align-self: start;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(210, 173, 97, 0.14);
    background: linear-gradient(180deg, rgba(57, 26, 18, 0.88), rgba(18, 8, 6, 0.92));
}

.official-tree-detail-label {
    margin: 0 0 8px;
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    color: rgba(210, 173, 97, 0.84);
    text-transform: uppercase;
}

.official-tree-detail h3 {
    margin: 0;
    color: #fff0d7;
    font-size: 1.15rem;
}

.official-tree-detail-meta,
.official-tree-detail-summary,
.official-tree-detail-note,
.official-tree-detail-next {
    margin: 12px 0 0;
    line-height: 1.72;
}

.official-tree-detail-meta {
    color: rgba(244, 232, 207, 0.68);
}

.official-tree-detail-summary {
    color: rgba(244, 232, 207, 0.8);
}

.official-tree-detail-note,
.official-tree-detail-next {
    color: rgba(210, 173, 97, 0.86);
}

.official-tree-empty {
    margin: 0;
    line-height: 1.72;
    color: rgba(244, 232, 207, 0.64);
}

.notes-section {
    padding: 18px 0 96px;
}

.page-footer {
    width: min(1340px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 64px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.page-footer-link {
    padding: 12px 20px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--paper-200);
    background: rgba(20, 11, 9, 0.42);
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.page-footer-link:hover {
    transform: translateY(-1px);
    border-color: rgba(210, 173, 97, 0.45);
    color: #fff4dc;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.note-card {
    padding: 24px 24px 26px;
}

.note-card h3 {
    margin: 0 0 10px;
    font-size: 1.18rem;
    color: #fff1d7;
}

.note-card p {
    margin: 0;
    line-height: 1.82;
    color: rgba(244, 232, 207, 0.72);
}

@media (max-width: 1120px) {
    .landing-layout,
    .prototype-layout {
        grid-template-columns: 1fr;
    }

    .panel + .panel {
        margin-top: 0;
    }

    .setup-column,
    .status-column {
        display: grid;
        gap: 22px;
    }

    .prototype-layout-game {
        grid-template-columns: 1fr;
    }

    .run-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .official-tree-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .hero-panel {
        grid-template-columns: 1fr;
        padding-top: 30px;
    }

    .hero-copy {
        padding: 30px 24px;
    }

    .hero-copy::before {
        inset: 12px;
    }

    .hero-brand {
        margin-bottom: 28px;
        padding-bottom: 18px;
    }

    .hero-brand-subtitle {
        font-size: 0.88rem;
        letter-spacing: 0.26em;
    }

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

    .speaker-network {
        grid-template-columns: 1fr 1fr;
    }

    .official-tree-dialog {
        width: min(100% - 24px, 1220px);
        margin: 12px auto;
        max-height: calc(100vh - 24px);
        padding: 18px;
    }

    .official-tree-head {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .hero-panel,
    .prototype-section,
    .notes-section,
    .page-footer,
    .run-banner {
        width: min(100% - 20px, 1340px);
    }

    .hero-lead,
    .section-heading p,
    .setup-hint,
    .control-hint,
    .hero-card p,
    .note-card p,
    .log-list li {
        font-size: 0.96rem;
    }

    .panel,
    .hero-card,
    .note-card {
        padding: 18px;
        border-radius: 20px;
    }

    .hero-brand {
        margin-bottom: 20px;
        padding-bottom: 16px;
    }

    .hero-brand::after {
        width: min(210px, 60%);
    }

    .hero-brand-title {
        letter-spacing: 0.06em;
    }

    .hero-brand-subtitle {
        margin-top: 8px;
        font-size: 0.8rem;
        letter-spacing: 0.2em;
    }

    .hero-copy h1 {
        font-size: clamp(1.32rem, 6vw, 1.82rem);
        line-height: 1.55;
    }

    .canvas-frame {
        padding: 10px;
        border-radius: 22px;
    }

    .dossier-row {
        flex-direction: column;
        gap: 6px;
    }

    .dossier-row dd {
        text-align: left;
    }

    .speaker-card-portrait {
        grid-template-columns: 1fr;
    }

    .portrait-emblem {
        width: 100%;
        height: 72px;
    }

    .speaker-network {
        grid-template-columns: 1fr;
    }

    .archive-item-top,
    .save-row,
    .journal-entry-header,
    .official-tree-branch-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .official-card-summary {
        display: grid;
    }

    .official-tree-tabs {
        display: grid;
    }

    .official-tree-node-list {
        display: grid;
        gap: 10px;
    }

    .official-tree-connector {
        width: 2px;
        height: 20px;
        margin: 2px 0 2px 16px;
        background: linear-gradient(180deg, rgba(210, 173, 97, 0.2), rgba(210, 173, 97, 0.74), rgba(210, 173, 97, 0.2));
    }

    .official-tree-node {
        max-width: none;
        width: 100%;
    }
}
