:root {
    --bg: #060912;
    --bg-deep: #09111f;
    --bg-panel: rgba(8, 16, 31, 0.78);
    --bg-panel-strong: rgba(10, 19, 36, 0.92);
    --bg-card: rgba(255, 255, 255, 0.04);
    --ink: #eef8ff;
    --ink-soft: #96aac8;
    --ink-dim: #647895;
    --line: rgba(73, 222, 255, 0.18);
    --line-strong: rgba(73, 222, 255, 0.34);
    --accent: #00d9ff;
    --accent-strong: #79efff;
    --accent-alt: #a855f7;
    --accent-good: #00ff88;
    --accent-warn: #ffd166;
    --accent-danger: #ff5f6d;
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.48);
    --shadow-md: 0 14px 32px rgba(0, 0, 0, 0.34);
    --glow-cyan: 0 0 0 1px rgba(0, 217, 255, 0.12), 0 0 28px rgba(0, 217, 255, 0.12);
    --glow-purple: 0 0 0 1px rgba(168, 85, 247, 0.12), 0 0 24px rgba(168, 85, 247, 0.12);
    --radius-lg: 30px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: "JetBrains Mono", "Noto Sans SC", monospace;
    background:
        radial-gradient(circle at top left, rgba(0, 217, 255, 0.12), transparent 24%),
        radial-gradient(circle at 82% 12%, rgba(168, 85, 247, 0.12), transparent 24%),
        radial-gradient(circle at 50% 100%, rgba(0, 255, 136, 0.08), transparent 30%),
        linear-gradient(180deg, #05070d 0%, #08101b 45%, #04070e 100%);
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body::before {
    background-image:
        linear-gradient(rgba(0, 217, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 217, 255, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at center, black 56%, transparent 100%);
    opacity: 0.9;
}

body::after {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 14%, transparent 86%, rgba(255, 255, 255, 0.02)),
        repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 4px);
    mix-blend-mode: screen;
    opacity: 0.22;
}

::selection {
    background: rgba(0, 217, 255, 0.28);
    color: #ffffff;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(7, 14, 25, 0.9);
}

::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(0, 217, 255, 0.46), rgba(168, 85, 247, 0.4));
}

.site-shell {
    position: relative;
    max-width: 1440px;
    margin: 0 auto;
    padding: 32px clamp(18px, 3vw, 40px) 48px;
}

.site-shell::before {
    content: "";
    position: absolute;
    inset: 18px 12px auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 217, 255, 0.32), rgba(168, 85, 247, 0.32), transparent);
    opacity: 0.8;
}

.page-glow {
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    opacity: 0.32;
    animation: glowFloat 8s ease-in-out infinite;
}

.glow-left {
    top: -120px;
    left: -110px;
    background: rgba(0, 217, 255, 0.34);
}

.glow-right {
    right: -140px;
    bottom: -120px;
    background: rgba(168, 85, 247, 0.34);
    animation-delay: -4s;
}

@keyframes glowFloat {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(0, 12px, 0) scale(1.06);
    }
}

.topbar,
.journey-rail,
.hero-card,
.panel-card,
.function-card {
    position: relative;
    backdrop-filter: blur(16px);
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.brand-block {
    max-width: 780px;
}

.eyebrow,
.panel-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-strong);
    text-shadow: 0 0 18px rgba(0, 217, 255, 0.3);
}

.eyebrow::before,
.panel-kicker::before {
    content: "";
    width: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent));
    box-shadow: 0 0 14px rgba(0, 217, 255, 0.5);
}

.hero-title,
.journey-title,
.screen-toolbar h2,
.panel-card h3,
.function-card h3 {
    margin: 10px 0 12px;
    font-family: "Orbitron", "JetBrains Mono", "Noto Sans SC", monospace;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.hero-title {
    margin: 12px 0 14px;
    font-size: clamp(3.2rem, 8vw, 6rem);
    line-height: 0.92;
    letter-spacing: -0.04em;
}

.hero-title span:first-child {
    color: #f3fbff;
    text-shadow: 0 0 24px rgba(255, 255, 255, 0.18);
}

.accent-text {
    background: linear-gradient(135deg, var(--accent) 0%, #5ce9ff 28%, #8d7bff 66%, var(--accent-alt) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 26px rgba(0, 217, 255, 0.24);
}

.hero-copy,
.journey-copy,
.panel-note,
.function-card p,
.stage-hint {
    color: var(--ink-soft);
    line-height: 1.78;
}

.hero-copy {
    margin: 0;
    max-width: 760px;
    font-size: 15px;
}

.topbar-actions,
.hero-actions,
.action-row,
.action-column,
.choice-grid,
.choice-stack,
.detail-list,
.focus-meta,
.screen-grid,
.utility-grid {
    display: flex;
    gap: 12px;
}

.topbar-actions,
.hero-actions,
.action-row,
.focus-meta,
.utility-grid {
    flex-wrap: wrap;
}

.action-column,
.choice-stack,
.detail-list {
    flex-direction: column;
}

.button-tag {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 217, 255, 0.18);
    background: rgba(0, 217, 255, 0.08);
    color: var(--accent-strong);
    box-shadow: inset 0 0 14px rgba(0, 217, 255, 0.08);
}

.journey-rail,
.hero-card,
.panel-card,
.function-card {
    background:
        linear-gradient(180deg, rgba(15, 27, 48, 0.9), rgba(8, 15, 28, 0.84)),
        linear-gradient(135deg, rgba(0, 217, 255, 0.05), transparent 40%);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg), var(--glow-cyan);
}

.journey-rail::before,
.hero-card::before,
.panel-card::before,
.function-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.34), transparent 36%, transparent 70%, rgba(168, 85, 247, 0.24));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.9;
}

.journey-rail {
    display: grid;
    grid-template-columns: minmax(280px, 0.45fr) minmax(0, 1fr);
    gap: 18px;
    padding: 22px 24px;
    border-radius: calc(var(--radius-lg) - 2px);
    margin-bottom: 22px;
}

.journey-title {
    margin-top: 8px;
    margin-bottom: 8px;
    color: #f3fbff;
    font-size: clamp(1.3rem, 2.6vw, 2rem);
}

.journey-copy-block {
    min-width: 0;
}

.journey-steps {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    align-self: center;
}

.journey-step {
    display: grid;
    gap: 8px;
    min-height: 92px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(73, 222, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink-soft);
    text-align: left;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.journey-step:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.journey-step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(0, 217, 255, 0.2);
    color: var(--accent-strong);
    font-size: 12px;
}

.journey-step strong {
    font-size: 13px;
    color: #eef8ff;
}

.journey-step small {
    color: var(--ink-dim);
    line-height: 1.5;
}

.journey-step.is-active {
    border-color: rgba(0, 217, 255, 0.34);
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.12), rgba(168, 85, 247, 0.1));
    box-shadow: var(--glow-cyan);
}

.journey-step.is-complete {
    border-color: rgba(0, 255, 136, 0.24);
    background: rgba(0, 255, 136, 0.08);
}

.journey-step.is-disabled {
    opacity: 0.45;
}

.screen-stack {
    position: relative;
}

.screen-view {
    display: none;
    animation: screenEnter 240ms ease;
}

.screen-view.is-active {
    display: block;
}

@keyframes screenEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.screen-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.screen-toolbar h2,
.panel-card h3,
.function-card h3 {
    color: #f3fbff;
    font-size: clamp(1.25rem, 2.6vw, 1.8rem);
}

.screen-grid {
    display: grid;
}

.screen-grid-overview {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.75fr);
    align-items: stretch;
}

.screen-grid-setup {
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
}

.screen-grid-result {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.briefing-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.75fr);
}

.panel-card-stretch {
    height: 100%;
}

.hero-card,
.panel-card,
.function-card {
    padding: 22px;
    border-radius: var(--radius-lg);
}

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

.metric-strip,
.stat-grid,
.function-grid {
    display: grid;
    gap: 14px;
}

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

.function-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 20px 0;
}

.metric-card,
.stat-box,
.detail-row,
.progress-item,
.recent-item,
.focus-panel,
.table-shell,
.function-card {
    background:
        linear-gradient(180deg, rgba(11, 20, 38, 0.84), rgba(7, 13, 24, 0.88));
    border: 1px solid rgba(115, 225, 255, 0.13);
    box-shadow: var(--shadow-md);
}

.metric-card,
.stat-box,
.detail-row,
.progress-item,
.recent-item {
    border-radius: var(--radius-md);
    padding: 18px;
}

.metric-card span,
.stat-box span,
.detail-row span,
.progress-item span,
.focus-label,
.input-shell span {
    display: block;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-dim);
}

.metric-card strong,
.stat-box strong,
.detail-row strong,
.progress-item strong {
    display: block;
    margin-top: 10px;
    color: var(--ink);
    font-family: "Orbitron", "JetBrains Mono", "Noto Sans SC", monospace;
    text-shadow: 0 0 18px rgba(0, 217, 255, 0.18);
}

.metric-card strong,
.stat-box strong {
    font-size: clamp(1.35rem, 2vw, 2rem);
}

.choice-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.compact-grid {
    gap: 8px;
}

.chip-button,
.book-button,
.ghost-button,
.primary-button,
.journey-step {
    border: 1px solid transparent;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        border-color 180ms ease,
        background 180ms ease,
        color 180ms ease;
}

.chip-button,
.book-button {
    min-width: 120px;
    padding: 14px 16px;
    border-radius: 18px;
    text-align: left;
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(11, 20, 38, 0.92), rgba(7, 13, 24, 0.9));
    border-color: rgba(73, 222, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.chip-button strong,
.book-button strong {
    display: block;
    color: #eef8ff;
}

.chip-button small,
.book-button small {
    display: block;
    margin-top: 8px;
    color: var(--ink-soft);
    line-height: 1.55;
}

.book-button {
    min-width: 170px;
}

.chip-button:hover,
.book-button:hover,
.ghost-button:hover,
.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md), 0 0 24px rgba(0, 217, 255, 0.14);
}

.chip-button.is-active,
.book-button.is-active {
    border-color: rgba(0, 217, 255, 0.34);
    background:
        linear-gradient(135deg, rgba(0, 217, 255, 0.12), rgba(168, 85, 247, 0.14)),
        linear-gradient(180deg, rgba(11, 20, 38, 0.96), rgba(8, 14, 28, 0.96));
    box-shadow: var(--shadow-md), var(--glow-cyan);
}

.ghost-button,
.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 16px;
    font-weight: 700;
}

.ghost-button {
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(11, 20, 38, 0.92), rgba(7, 13, 24, 0.9));
    border-color: rgba(73, 222, 255, 0.12);
}

.ghost-button.is-route-active {
    border-color: rgba(0, 217, 255, 0.34);
    box-shadow: var(--glow-cyan);
}

.primary-button {
    color: #03101b;
    background: linear-gradient(135deg, var(--accent), #78f0ff 42%, #c3fbff 100%);
    border-color: rgba(120, 240, 255, 0.34);
    box-shadow: 0 0 26px rgba(0, 217, 255, 0.18);
}

.compact-button {
    min-height: 42px;
    padding: 0 14px;
}

.accent-button {
    border-color: rgba(168, 85, 247, 0.18);
    background:
        linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(0, 217, 255, 0.1)),
        linear-gradient(180deg, rgba(11, 20, 38, 0.92), rgba(7, 13, 24, 0.9));
}

.danger-button {
    color: #ff9ea6;
    border-color: rgba(255, 95, 109, 0.18);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 217, 255, 0.2);
    background: rgba(0, 217, 255, 0.08);
    color: var(--accent-strong);
    font-size: 13px;
    font-weight: 700;
    box-shadow: inset 0 0 22px rgba(0, 217, 255, 0.06);
}

.status-pill.status-local {
    border-color: rgba(0, 255, 136, 0.2);
    background: rgba(0, 255, 136, 0.08);
    color: #79ffc0;
}

.status-pill.status-cloud {
    border-color: rgba(0, 217, 255, 0.22);
    background: rgba(0, 217, 255, 0.08);
    color: var(--accent-strong);
}

.status-pill.status-warn {
    border-color: rgba(255, 95, 109, 0.24);
    background: rgba(255, 95, 109, 0.1);
    color: #ff9ea6;
}

.recent-list {
    display: grid;
    gap: 10px;
}

.recent-item {
    display: grid;
    gap: 10px;
}

.recent-item-top,
.recent-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
}

.recent-item strong {
    color: #f5fbff;
    font-family: "Orbitron", "JetBrains Mono", "Noto Sans SC", monospace;
    font-size: 1.35rem;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(255, 209, 102, 0.18);
    background: rgba(255, 209, 102, 0.08);
    color: var(--accent-warn);
    font-family: "Orbitron", "JetBrains Mono", "Noto Sans SC", monospace;
    font-size: 1.25rem;
}

.arena-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
    gap: 20px;
}

.arena-main,
.arena-side {
    display: grid;
    gap: 18px;
}

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

.progress-bar-shell {
    position: relative;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(10, 18, 32, 0.92);
    border: 1px solid rgba(0, 217, 255, 0.14);
}

.progress-bar-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 217, 255, 0.08), transparent 45%, rgba(168, 85, 247, 0.08));
}

.progress-bar-fill {
    position: relative;
    z-index: 1;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #00d9ff, #58e5ff, #a855f7);
    box-shadow: 0 0 24px rgba(0, 217, 255, 0.5);
    transition: width 220ms ease;
}

.typing-stage {
    position: relative;
    min-height: 340px;
    padding: 22px;
    border-radius: calc(var(--radius-lg) + 4px);
    background:
        radial-gradient(circle at top left, rgba(0, 217, 255, 0.16), transparent 26%),
        radial-gradient(circle at top right, rgba(168, 85, 247, 0.14), transparent 28%),
        linear-gradient(180deg, #10203a 0%, #09111f 100%);
    border: 1px solid rgba(0, 217, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), inset 0 0 40px rgba(0, 217, 255, 0.04);
    overflow: hidden;
}

.typing-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 14%, transparent 86%, rgba(255, 255, 255, 0.02));
    pointer-events: none;
}

.typing-stage:focus {
    outline: 2px solid rgba(0, 217, 255, 0.22);
    outline-offset: 3px;
}

.stage-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.stage-badge {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(0, 217, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent-strong);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.word-rack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.word-card {
    min-height: 118px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        opacity 180ms ease,
        box-shadow 180ms ease,
        background 180ms ease;
}

.word-card.is-complete {
    opacity: 0.48;
    background: linear-gradient(180deg, rgba(0, 255, 136, 0.12), rgba(255, 255, 255, 0.02));
}

.word-card.is-current {
    border-color: rgba(0, 217, 255, 0.28);
    background:
        linear-gradient(180deg, rgba(0, 217, 255, 0.12), rgba(255, 255, 255, 0.03)),
        linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.14);
    transform: translateY(-2px);
}

.word-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.word-card-index {
    color: rgba(236, 248, 255, 0.54);
    font-size: 12px;
}

.translation-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 217, 255, 0.12);
    border: 1px solid rgba(0, 217, 255, 0.18);
    font-size: 12px;
    color: var(--accent-strong);
}

.word-text {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    font-size: clamp(1.45rem, 3vw, 1.95rem);
    letter-spacing: 0.02em;
}

.word-char {
    position: relative;
    color: rgba(236, 248, 255, 0.36);
}

.word-char.is-correct {
    color: var(--accent-good);
    text-shadow: 0 0 14px rgba(0, 255, 136, 0.3);
}

.word-char.is-cursor {
    color: #ffffff;
    text-shadow: 0 0 18px rgba(0, 217, 255, 0.36);
}

.word-char.is-cursor::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 3px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 16px rgba(0, 217, 255, 0.7);
    animation: caretBlink 900ms steps(1) infinite;
}

.word-char.is-wrong {
    color: #ff9ea6;
}

.word-char.is-wrong::before {
    content: "";
    position: absolute;
    inset: -4px -2px;
    border-radius: 8px;
    background: rgba(255, 95, 109, 0.18);
    box-shadow: 0 0 18px rgba(255, 95, 109, 0.2);
}

@keyframes caretBlink {
    0%,
    50% {
        opacity: 1;
    }
    50.01%,
    100% {
        opacity: 0.08;
    }
}

.focus-panel {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-radius: var(--radius-md);
}

.focus-word {
    margin-top: 8px;
    color: #ffffff;
    font-family: "Orbitron", "JetBrains Mono", "Noto Sans SC", monospace;
    font-size: clamp(1.9rem, 4vw, 2.75rem);
    line-height: 1;
    text-shadow: 0 0 22px rgba(0, 217, 255, 0.18);
}

.focus-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(0, 217, 255, 0.12);
    color: var(--ink-soft);
    font-size: 13px;
}

.input-shell {
    display: grid;
    gap: 10px;
}

.typing-input {
    width: 100%;
    min-height: 56px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid rgba(0, 217, 255, 0.16);
    background: rgba(6, 13, 25, 0.84);
    color: #f4fbff;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.typing-input::placeholder {
    color: rgba(140, 163, 196, 0.62);
}

.typing-input:focus {
    border-color: rgba(0, 217, 255, 0.34);
    background: rgba(8, 16, 30, 0.94);
    box-shadow: inset 0 0 0 1px rgba(0, 217, 255, 0.08), 0 0 0 4px rgba(0, 217, 255, 0.08), 0 0 26px rgba(0, 217, 255, 0.12);
}

.utility-grid {
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

.choice-stack {
    min-width: min(100%, 460px);
}

.table-shell {
    overflow: auto;
    border-radius: 18px;
    margin-top: 18px;
}

.data-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(73, 222, 255, 0.08);
    text-align: left;
    white-space: nowrap;
}

.data-table th {
    position: sticky;
    top: 0;
    background: rgba(8, 15, 28, 0.98);
    color: var(--ink-dim);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.data-table td {
    color: var(--ink-soft);
}

.data-table tbody tr:hover {
    background: rgba(0, 217, 255, 0.06);
}

.result-card {
    display: grid;
    gap: 18px;
}

.result-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 28px;
    border: 1px solid rgba(0, 217, 255, 0.2);
    background:
        linear-gradient(135deg, rgba(0, 217, 255, 0.14), rgba(168, 85, 247, 0.16)),
        linear-gradient(180deg, rgba(11, 20, 38, 0.96), rgba(7, 13, 24, 0.94));
    color: #ffffff;
    font-family: "Orbitron", "JetBrains Mono", "Noto Sans SC", monospace;
    font-size: 3rem;
    font-weight: 700;
    box-shadow: var(--glow-cyan);
}

.result-message {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.8;
}

@media (max-width: 1240px) {
    .journey-rail,
    .screen-grid-overview,
    .screen-grid-setup,
    .screen-grid-result,
    .briefing-grid,
    .arena-layout {
        grid-template-columns: 1fr;
    }

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

    .journey-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .site-shell {
        padding-inline: 14px;
        padding-top: 22px;
    }

    .topbar,
    .screen-toolbar {
        flex-direction: column;
    }

    .metric-strip,
    .stat-grid,
    .progress-strip,
    .function-grid,
    .journey-steps {
        grid-template-columns: 1fr;
    }

    .stage-callout,
    .focus-panel {
        flex-direction: column;
        align-items: flex-start;
    }

    .word-rack {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .ghost-button,
    .primary-button {
        width: 100%;
    }

    .topbar-actions,
    .hero-actions,
    .action-row {
        width: 100%;
    }
}
