:root {
    --bg: #0d1117;
    --panel: rgba(24, 28, 36, 0.94);
    --panel-soft: rgba(255,255,255,0.045);
    --text: #f4efe4;
    --muted: #b8b0a0;
    --gold: #d7b56d;
    --gold-soft: #f0d69a;
    --border: rgba(215,181,109,0.25);
    --shadow: 0 22px 70px rgba(0,0,0,0.35);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 15% 10%, rgba(215,181,109,0.11), transparent 32rem),
        radial-gradient(circle at 85% 90%, rgba(110,91,56,0.13), transparent 34rem),
        linear-gradient(180deg, #111722, #090c12 70%);
}
a { color: inherit; }
.shell {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0 56px;
}
.center-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 0;
}
.hero, .panel, .story-card, .result-card {
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: var(--shadow);
    border-radius: 24px;
}
.hero { padding: clamp(30px, 7vw, 68px); text-align: center; }
.eyebrow {
    margin: 0 0 14px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: .75rem;
    font-weight: 800;
}
h1, h2, h3 { margin-top: 0; }
h1 {
    margin-bottom: 14px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.7rem, 9vw, 5.8rem);
    line-height: .98;
    letter-spacing: -.045em;
}
h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 5vw, 2.7rem);
    line-height: 1.1;
}
.lead {
    max-width: 680px;
    margin: 0 auto;
    color: var(--muted);
    font-size: clamp(1rem, 2.2vw, 1.18rem);
    line-height: 1.75;
}
.note {
    margin: 18px 0 0;
    color: #8f897d;
    font-size: .86rem;
    line-height: 1.55;
}
.actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 30px;
}
.btn {
    appearance: none;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 13px 20px;
    min-height: 48px;
    background: var(--panel-soft);
    color: var(--text);
    font: inherit;
    font-weight: 750;
    cursor: pointer;
    text-decoration: none;
    transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(215,181,109,.55); }
.btn-primary {
    background: linear-gradient(135deg, #d7b56d, #b98d42);
    color: #18140c;
    border-color: transparent;
}
.btn-primary:hover { background: linear-gradient(135deg, #e3c57f, #c99d50); }
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.brand {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    color: var(--gold-soft);
}
.progress-wrap {
    flex: 1;
    max-width: 420px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
    overflow: hidden;
}
.progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #a77e3c, #e2c67f);
    border-radius: inherit;
    transition: width .25s ease;
}
.story-card { overflow: hidden; }
.story-media {
    display: block;
    width: auto;
    max-width: calc(100% - 48px);
    max-height: 480px;
    height: auto;
    margin: 24px auto 0;
    object-fit: contain;
    object-position: center;
    border-radius: 16px;
}
.story-body { padding: clamp(22px, 5vw, 42px); }
.chapter {
    color: var(--gold);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.story-text {
    margin: 0;
    color: #e8e0d2;
    font-size: clamp(1rem, 2.3vw, 1.13rem);
    line-height: 1.72;
}
.options {
    display: grid;
    gap: 11px;
    margin-top: 28px;
}
.option {
    width: 100%;
    text-align: left;
    border: 1px solid rgba(255,255,255,.09);
    background: rgba(255,255,255,.035);
    color: var(--text);
    border-radius: 14px;
    padding: 15px 17px;
    font: inherit;
    line-height: 1.5;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.option:hover {
    background: rgba(215,181,109,.09);
    border-color: rgba(215,181,109,.42);
    transform: translateY(-1px);
}
.hidden { display: none !important; }
.panel { padding: clamp(24px, 5vw, 42px); text-align: center; }
.result-card { padding: clamp(24px, 5vw, 46px); }
.result-head { text-align: center; }
.type-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    border-radius: 999px;
    padding: 9px 15px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
    color: var(--gold-soft);
    background: rgba(215,181,109,.08);
    font-size: 1.12rem;
    font-weight: 900;
    letter-spacing: .13em;
}
.profile-image {
    width: min(290px, 78vw);
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
    margin: 26px auto 30px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: #171b22;
}
.copy {
    max-width: 720px;
    margin: 0 auto;
    color: #ddd5c8;
    line-height: 1.75;
}
.section {
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.section h3 { color: var(--gold-soft); margin-bottom: 8px; }
.dimension-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 16px;
}
.dimension {
    padding: 15px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    background: rgba(255,255,255,.03);
}
.dimension strong { color: var(--gold-soft); }
.dimension small {
    display: block;
    color: var(--muted);
    margin-top: 5px;
    line-height: 1.45;
}
.type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 22px;
}
.type-card {
    display: block;
    text-decoration: none;
    padding: 17px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.03);
    border-radius: 15px;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease;
}
.type-card:hover { transform: translateY(-2px); border-color: rgba(215,181,109,.48); }
.type-card strong {
    display: block;
    color: var(--gold-soft);
    font-size: 1.1rem;
    letter-spacing: .08em;
    margin-bottom: 6px;
}
.type-card span { color: var(--muted); font-size: .86rem; line-height: 1.35; }
.backline { margin-bottom: 18px; }
.backline a { color: var(--muted); text-decoration: none; }
.backline a:hover { color: var(--text); }
@media (max-width: 700px) {
    .shell { width: min(100% - 20px, 920px); padding-top: 18px; }
    .topbar { align-items: flex-start; flex-direction: column; }
    .progress-wrap { width: 100%; max-width: none; }
    .dimension-grid { grid-template-columns: 1fr; }
    .type-grid { grid-template-columns: repeat(2, 1fr); }
    .story-media { aspect-ratio: 4/3; }
}
@media (max-width: 420px) {
    .type-grid { grid-template-columns: 1fr; }
    .hero { border-radius: 20px; }
}
