@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Mono:wght@400;700;800&display=swap");

:root {
    color-scheme: dark;
    --bg: #000;
    --panel: #000;
    --green: #58ff6a;
    --amber: #ffd35c;
    --magenta: #ff5bd8;
    --cyan: #42f5ff;
    --text: #f2fff1;
    --muted: #a8bfa4;
    --line: #1f7a2d;
    --terminal-font: "Noto Sans Mono", "Cascadia Mono", "Cascadia Code", "DejaVu Sans Mono", "Consolas", "Lucida Console", monospace;
}

* {
    box-sizing: border-box;
    font-family: inherit;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 50% 0, rgba(88, 255, 106, 0.12), transparent 36rem),
        repeating-linear-gradient(0deg, rgba(88, 255, 106, 0.055) 0 1px, transparent 1px 5px),
        var(--bg);
    color: var(--text);
    font-family: var(--terminal-font);
    font-variant-ligatures: none;
    font-kerning: none;
    font-synthesis: none;
    text-rendering: geometricPrecision;
}

.shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: clamp(8px, 2vw, 28px);
}

.terminal {
    position: relative;
    width: min(100%, 1480px);
    min-height: calc(100vh - clamp(16px, 4vw, 56px));
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(88, 255, 106, 0.075), transparent 34%),
        #000;
    box-shadow:
        0 0 0 1px rgba(88, 255, 106, 0.14),
        0 0 62px rgba(88, 255, 106, 0.24),
        0 28px 100px rgba(0, 0, 0, 0.8);
    padding: clamp(14px, 3vw, 42px);
    overflow: hidden;
}

.terminal-session {
    min-height: auto;
    max-height: calc(100dvh - clamp(16px, 4vw, 56px));
    padding: clamp(18px, 4vh, 34px);
}

.terminal-session .terminal-art-grid,
.terminal-session .ansi-strip,
.terminal-session .pinata-rig {
    display: none;
}

.terminal-session .terminal-bar {
    margin-bottom: clamp(16px, 2.6vh, 28px);
}

.terminal::after {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(66, 245, 255, 0.06), transparent);
    content: "";
    mix-blend-mode: screen;
    opacity: 0.6;
}

.terminal-bar {
    display: flex;
    gap: 8px;
    margin: 0 0 clamp(18px, 3vw, 34px);
}

.terminal-bar span {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--green);
    box-shadow: 0 0 14px currentColor;
}

.terminal-bar span:nth-child(2) {
    background: var(--amber);
}

.terminal-bar span:nth-child(3) {
    background: var(--magenta);
}

.ansi {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0 0 clamp(22px, 3vw, 44px);
    overflow: visible;
    color: var(--green);
    font-family: var(--terminal-font);
    font-size: clamp(9px, 1.28vw, 23px);
    font-feature-settings: "liga" 0, "calt" 0, "kern" 0;
    font-kerning: none;
    font-variant-ligatures: none;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-shadow: 0 0 10px rgba(88, 255, 106, 0.65);
    white-space: pre;
    tab-size: 4;
}

.splash-art {
    max-width: 100%;
}

.terminal-art-grid {
    --terminal-cell-width: 0.64em;
    --terminal-cell-height: 1em;
    position: relative;
    z-index: 1;
    display: grid;
    width: max-content;
    max-width: 100%;
    grid-template-columns: repeat(var(--cols), var(--terminal-cell-width));
    grid-auto-rows: var(--terminal-cell-height);
    align-items: center;
    color: var(--green);
    font-family: var(--terminal-font);
    font-feature-settings: "liga" 0, "calt" 0, "kern" 0;
    font-size: clamp(9px, 1.28vw, 23px);
    font-kerning: none;
    font-variant-ligatures: none;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    margin: 0 0 clamp(22px, 3vw, 44px);
    overflow: visible;
    text-shadow: 0 0 10px rgba(88, 255, 106, 0.65);
}

.terminal-cell {
    display: inline-flex;
    width: var(--terminal-cell-width);
    height: var(--terminal-cell-height);
    align-items: center;
    justify-content: center;
    line-height: 1;
    overflow: visible;
    white-space: pre;
}

.terminal-cell.is-space {
    text-shadow: none;
}

.ansi-strip {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(100%, 1040px);
    align-items: center;
    gap: clamp(10px, 1.6vw, 28px);
    border: 2px solid var(--cyan);
    border-inline-width: 4px;
    color: var(--cyan);
    font-family: var(--terminal-font);
    font-size: clamp(13px, 1.52vw, 25px);
    font-weight: 700;
    font-variant-ligatures: none;
    line-height: 1;
    margin: clamp(-18px, -1.1vw, -8px) 0 clamp(18px, 2.6vw, 34px);
    padding: 8px clamp(10px, 1.4vw, 18px);
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(66, 245, 255, 0.5);
    box-shadow: inset 0 0 12px rgba(66, 245, 255, 0.18), 0 0 16px rgba(66, 245, 255, 0.22);
}

.ansi-strip::before,
.ansi-strip::after {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--cyan);
    content: "";
    opacity: 0.85;
}

.ansi-strip::before {
    top: 4px;
}

.ansi-strip::after {
    bottom: 4px;
}

.strip-fill {
    color: rgba(66, 245, 255, 0.62);
}

.strip-mode {
    margin-left: auto;
}

.strip-bars {
    letter-spacing: 0;
}

.pinata-art {
    font-size: clamp(9px, 1.22vw, 22px);
    line-height: 1;
    margin-top: 0;
}

.pinata-rig {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(100%, 980px);
    grid-template-columns: minmax(260px, 1fr) clamp(70px, 8vw, 118px) minmax(260px, 1fr);
    align-items: center;
    column-gap: clamp(12px, 2vw, 28px);
    margin: 0 0 clamp(28px, 4vw, 54px);
}

.pinata-device {
    position: relative;
    min-height: clamp(132px, 14vw, 178px);
    border: 3px solid var(--amber);
    background: rgba(255, 211, 92, 0.03);
    box-shadow: inset 0 0 18px rgba(255, 211, 92, 0.16), 0 0 18px rgba(255, 211, 92, 0.28);
}

.pinata-device::before,
.pinata-device::after {
    position: absolute;
    top: 28%;
    width: clamp(58px, 7vw, 94px);
    height: clamp(46px, 5.8vw, 72px);
    border: 3px solid var(--amber);
    background: #000;
    content: "";
    box-shadow: 0 0 14px rgba(255, 211, 92, 0.22);
}

.pinata-device::before {
    left: calc(clamp(58px, 7vw, 94px) * -1 - 3px);
}

.pinata-device::after {
    right: calc(clamp(58px, 7vw, 94px) * -1 - 3px);
}

.rig-cap {
    position: absolute;
    top: -18px;
    width: 38%;
    height: 18px;
    border-top: 3px solid var(--amber);
}

.rig-cap.left {
    left: 6%;
    border-left: 3px solid var(--amber);
}

.rig-cap.right {
    right: 6%;
    border-right: 3px solid var(--amber);
}

.rig-core {
    position: absolute;
    inset: 14px 38px;
    display: grid;
    place-items: center;
    border: clamp(10px, 1.5vw, 18px) solid var(--amber);
    background:
        repeating-linear-gradient(90deg, rgba(255, 211, 92, 0.16) 0 7px, transparent 7px 14px),
        #050704;
}

.rig-screen {
    display: grid;
    min-width: 58%;
    min-height: 58%;
    place-items: center;
    background:
        linear-gradient(90deg, rgba(255, 211, 92, 0.18), transparent 28%, transparent 72%, rgba(255, 211, 92, 0.18)),
        rgba(0, 0, 0, 0.72);
    color: var(--amber);
    font-size: clamp(16px, 1.8vw, 26px);
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 0 10px rgba(255, 211, 92, 0.6);
}

.rig-eyes {
    font-size: 0.72em;
}

.rig-mouth {
    width: 44%;
    height: 10px;
    background: var(--amber);
    box-shadow: 0 0 10px rgba(255, 211, 92, 0.45);
}

.rig-tail {
    position: absolute;
    top: 49%;
    width: 18px;
    height: 30px;
    background: var(--amber);
    transform: translateY(-50%);
    box-shadow: 0 0 12px rgba(255, 211, 92, 0.35);
}

.rig-tail.left {
    left: -22px;
}

.rig-tail.right {
    right: -22px;
}

.rig-drop {
    position: absolute;
    left: 50%;
    bottom: -26px;
    width: 3px;
    height: 26px;
    background: var(--amber);
    box-shadow: 0 0 10px rgba(255, 211, 92, 0.35);
}

.rig-link {
    display: grid;
    grid-template-columns: 1fr 12px 1fr;
    align-items: center;
    gap: 10px;
}

.rig-link span {
    height: 3px;
    background: var(--amber);
    box-shadow: 0 0 10px rgba(255, 211, 92, 0.35);
}

.rig-link span:nth-child(2) {
    width: 12px;
    height: 42px;
    background: transparent;
    border-inline: 3px solid var(--amber);
}

.rig-boom,
.rig-belt,
.rig-caption {
    grid-column: 1 / -1;
    justify-self: center;
}

.rig-boom {
    display: flex;
    gap: clamp(12px, 1.8vw, 24px);
    align-items: center;
    color: var(--magenta);
    font-size: clamp(15px, 1.55vw, 24px);
    font-weight: 800;
    margin-top: 12px;
    text-shadow: 0 0 10px rgba(255, 91, 216, 0.58);
}

.rig-belt {
    width: min(76%, 720px);
    height: 28px;
    margin-top: -4px;
    background: repeating-linear-gradient(120deg, rgba(255, 91, 216, 0.22) 0 2px, transparent 2px 5px);
    border-block: 1px solid rgba(255, 91, 216, 0.46);
}

.rig-caption {
    color: var(--magenta);
    font-size: clamp(15px, 1.45vw, 24px);
    font-weight: 800;
    line-height: 1;
    margin-top: 6px;
    text-shadow: 0 0 10px rgba(255, 91, 216, 0.58);
    white-space: nowrap;
}

.terminal-literal {
    white-space: break-spaces;
}

.green {
    color: var(--green);
}

.amber {
    color: var(--amber);
    text-shadow: 0 0 8px rgba(255, 211, 92, 0.42);
}

.magenta {
    color: var(--magenta);
    text-shadow: 0 0 8px rgba(255, 91, 216, 0.42);
}

.cyan {
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(66, 245, 255, 0.5);
}

.text {
    color: var(--text);
}

.muted {
    color: var(--muted);
}

.prompt {
    position: relative;
    z-index: 1;
    margin: 0 0 16px;
    color: var(--muted);
    font-size: clamp(16px, 1.65vw, 28px);
    line-height: 1.25;
    white-space: break-spaces;
}

.prompt::before {
    color: var(--green);
    content: "> ";
}

.prompt span {
    color: var(--cyan);
}

.kicker {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    color: var(--amber);
    font-size: clamp(14px, 1.3vw, 22px);
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    position: relative;
    z-index: 1;
    max-width: 24ch;
    margin: 0 0 18px;
    color: var(--text);
    font-size: clamp(34px, 5.6vw, 92px);
    line-height: 0.98;
    letter-spacing: 0;
    text-shadow: 0 0 22px rgba(88, 255, 106, 0.28);
}

h2 {
    position: relative;
    z-index: 1;
    margin: 0 0 16px;
    color: var(--text);
    font-size: clamp(24px, 3vw, 42px);
    line-height: 1.05;
    letter-spacing: 0;
    text-shadow: 0 0 18px rgba(88, 255, 106, 0.22);
}

.terminal-session h1 {
    max-width: 28ch;
    margin-bottom: clamp(12px, 2vh, 18px);
    font-size: clamp(32px, 4.2vw, 58px);
    line-height: 1.02;
}

.terminal-session .prompt {
    margin-bottom: clamp(8px, 1.4vh, 12px);
    font-size: clamp(15px, 1.75vw, 24px);
}

.terminal-session .kicker {
    margin-bottom: clamp(8px, 1.4vh, 12px);
    font-size: clamp(14px, 1.25vw, 19px);
}

.copy {
    position: relative;
    z-index: 1;
    max-width: 58ch;
    margin: 0 0 28px;
    color: var(--muted);
    font-size: clamp(16px, 1.3vw, 22px);
    line-height: 1.45;
}

.terminal-session .copy {
    max-width: 64ch;
    margin-bottom: clamp(18px, 3vh, 26px);
    font-size: clamp(15px, 1.45vw, 21px);
    line-height: 1.35;
}

.actions {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
    width: min(100%, 420px);
    max-width: 420px;
    margin-left: auto;
}

.split-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 640px);
    max-width: 640px;
    margin-left: auto;
}

.terminal-session .actions {
    width: min(100%, 640px);
}

.terminal-session .button {
    min-height: clamp(48px, 7vh, 62px);
    padding: 12px 16px;
    font-size: clamp(14px, 1.35vw, 19px);
}

.account-form {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
    max-width: 520px;
}

.account-form label {
    color: var(--amber);
    font-size: clamp(14px, 1.2vw, 20px);
    text-transform: uppercase;
}

.account-form input {
    width: 100%;
    min-height: clamp(56px, 5vw, 74px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(88, 255, 106, 0.05);
    color: var(--text);
    font-family: var(--terminal-font);
    font-size: clamp(20px, 2.2vw, 34px);
    font-weight: 700;
    line-height: 1.1;
    outline: none;
    padding: 12px 16px;
    text-shadow: 0 0 14px rgba(88, 255, 106, 0.26);
}

.account-form input:focus {
    border-color: var(--green);
    box-shadow: inset 0 0 18px rgba(88, 255, 106, 0.12), 0 0 24px rgba(88, 255, 106, 0.2);
}

.character-panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    max-width: 840px;
    margin: 0 0 28px;
}

.character-panel div {
    min-height: 86px;
    border: 1px solid rgba(66, 245, 255, 0.52);
    border-radius: 8px;
    background: rgba(66, 245, 255, 0.045);
    padding: 12px;
}

.character-panel span,
.character-form span,
.character-form legend {
    color: var(--amber);
    font-size: clamp(13px, 1vw, 17px);
    line-height: 1.2;
    text-transform: uppercase;
}

.character-panel strong {
    display: block;
    margin-top: 8px;
    color: var(--text);
    font-size: clamp(18px, 1.6vw, 26px);
    line-height: 1.12;
}

.character-creator {
    overflow: visible;
}

.character-creator h1 {
    max-width: 30ch;
    font-size: clamp(30px, 4.4vw, 58px);
    line-height: 1.02;
}

.character-creator .copy {
    max-width: 70ch;
    margin-bottom: 22px;
}

.character-form {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 18px;
    max-width: 1080px;
}

.creation-step {
    display: none;
    gap: 18px;
}

.creation-step.is-active {
    display: grid;
}

.compact-prompt {
    margin-bottom: 8px;
    font-size: clamp(14px, 1.3vw, 20px);
}

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

.identity-stack {
    display: grid;
    align-content: start;
    gap: 14px;
}

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

.character-form label {
    display: grid;
    gap: 8px;
}

.character-form input[type="text"],
.character-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(88, 255, 106, 0.05);
    color: var(--text);
    font-family: var(--terminal-font);
    font-size: clamp(17px, 1.4vw, 22px);
    font-weight: 700;
    line-height: 1.25;
    outline: none;
    padding: 12px 14px;
    resize: vertical;
    text-shadow: 0 0 14px rgba(88, 255, 106, 0.18);
}

.character-form input[type="text"] {
    min-height: 58px;
}

.character-form input:focus,
.character-form textarea:focus {
    border-color: var(--green);
    box-shadow: inset 0 0 18px rgba(88, 255, 106, 0.12), 0 0 24px rgba(88, 255, 106, 0.2);
}

.character-form fieldset {
    min-width: 0;
    border: 1px solid rgba(66, 245, 255, 0.42);
    border-radius: 8px;
    margin: 0;
    padding: 16px;
}

.character-form legend {
    padding: 0 8px;
}

.inline-fieldset {
    align-self: end;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.option-grid[hidden],
.character-form fieldset[hidden] {
    display: none;
}

.compact-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grade-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

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

.option-grid.compact-options-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-options {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

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

.activity-options {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.choice-detail {
    min-height: 56px;
    border: 1px solid rgba(255, 211, 92, 0.46);
    border-radius: 8px;
    background: rgba(255, 211, 92, 0.035);
    color: var(--muted);
    font-size: clamp(13px, 1vw, 16px);
    line-height: 1.35;
    margin: 10px 0 0;
    padding: 10px 12px;
}

.choice-detail[hidden] {
    display: none;
}

.gender-detail {
    border-color: rgba(255, 91, 216, 0.5);
    background: rgba(255, 91, 216, 0.035);
}

.text-fieldset input[type="text"] {
    min-height: 58px;
}

.option-card {
    min-height: 58px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(88, 255, 106, 0.04);
    cursor: pointer;
    padding: 12px;
}

.option-card input {
    position: absolute;
    opacity: 0;
}

.option-card:has(input:checked) {
    border-color: var(--green);
    background: rgba(88, 255, 106, 0.14);
    box-shadow: inset 0 0 18px rgba(88, 255, 106, 0.12), 0 0 18px rgba(88, 255, 106, 0.16);
}

.character-summary {
    max-width: 1040px;
    border: 1px solid rgba(66, 245, 255, 0.52);
    border-radius: 8px;
    background: rgba(66, 245, 255, 0.035);
    padding: 14px 16px;
}

.character-summary > span {
    display: block;
    color: var(--amber);
    font-size: clamp(13px, 1vw, 17px);
    line-height: 1.2;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.character-summary dl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin: 0;
}

.character-summary div {
    min-height: 66px;
    border: 1px solid rgba(88, 255, 106, 0.22);
    border-radius: 8px;
    background: rgba(88, 255, 106, 0.035);
    padding: 10px 12px;
}

.character-summary dt {
    color: var(--muted);
    font-size: clamp(12px, 0.9vw, 14px);
    line-height: 1.2;
    margin: 0 0 6px;
    text-transform: uppercase;
}

.character-summary dd {
    color: var(--text);
    font-size: clamp(15px, 1.2vw, 20px);
    font-weight: 700;
    line-height: 1.15;
    margin: 0;
}

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

.character-form .stat-budget .stat-grid label {
    min-height: 110px;
    border: 1px solid rgba(255, 211, 92, 0.34);
    border-radius: 8px;
    padding: 14px;
}

.stat-budget {
    max-width: 1040px;
}

.stat-budget-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px 16px;
    margin-bottom: 14px;
    color: var(--muted);
}

.stat-budget-line span {
    color: var(--amber);
}

.stat-budget-line strong {
    color: var(--green);
    font-size: clamp(24px, 2.2vw, 36px);
    line-height: 1;
    text-shadow: 0 0 12px rgba(88, 255, 106, 0.42);
}

.stat-budget.is-short .stat-budget-line strong {
    color: var(--magenta);
}

.stat-control {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px 12px;
}

.stat-control output {
    color: var(--green);
    font-weight: 800;
}

.stat-stepper {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 48px minmax(10ch, 1fr) 48px;
    align-items: center;
    gap: 12px;
}

.stat-stepper button {
    min-width: 48px;
    min-height: 42px;
    border: 1px solid var(--green);
    border-radius: 6px;
    background: rgba(88, 255, 106, 0.05);
    color: var(--green);
    cursor: pointer;
    font: inherit;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 0 10px rgba(88, 255, 106, 0.45);
}

.stat-stepper button:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

.stat-control code {
    color: var(--cyan);
    font-size: clamp(14px, 1.15vw, 18px);
    line-height: 1;
    text-align: center;
    text-shadow: 0 0 10px rgba(66, 245, 255, 0.4);
    white-space: nowrap;
}

.form-error {
    position: relative;
    z-index: 1;
    max-width: 720px;
    border: 1px solid var(--magenta);
    border-radius: 8px;
    color: var(--magenta);
    margin: 0 0 20px;
    padding: 12px 14px;
    text-shadow: 0 0 8px rgba(255, 91, 216, 0.35);
}

.generated-note {
    position: relative;
    z-index: 1;
    max-width: 760px;
    border: 1px solid rgba(66, 245, 255, 0.52);
    border-radius: 8px;
    background: rgba(66, 245, 255, 0.045);
    color: var(--muted);
    padding: 14px 16px;
}

.generated-note span {
    display: block;
    color: var(--amber);
    font-size: clamp(13px, 1vw, 17px);
    line-height: 1.2;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.generated-note p {
    margin: 0;
    font-size: clamp(15px, 1.25vw, 20px);
    line-height: 1.4;
}

.content-warning h1 {
    max-width: 18ch;
}

.warning-panel {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 16px;
    max-width: 880px;
    border: 1px solid rgba(255, 211, 92, 0.62);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(255, 211, 92, 0.08), transparent 40%),
        rgba(255, 211, 92, 0.035);
    color: var(--text);
    margin: 0 0 24px;
    padding: clamp(16px, 2.4vw, 26px);
    box-shadow: inset 0 0 24px rgba(255, 211, 92, 0.08), 0 0 28px rgba(255, 211, 92, 0.12);
}

.warning-panel p {
    margin: 0;
    color: var(--muted);
    font-size: clamp(16px, 1.35vw, 22px);
    line-height: 1.45;
}

.warning-panel p:first-child {
    color: var(--text);
}

.warning-modal {
    position: fixed;
    z-index: 20;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.86);
    padding: clamp(16px, 4vw, 42px);
}

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

.context-warning-panel {
    width: min(100%, 860px);
    max-height: min(92vh, 720px);
    overflow: auto;
    background:
        linear-gradient(90deg, rgba(255, 211, 92, 0.1), rgba(3, 12, 8, 0.98) 44%),
        #030c08;
    margin: 0;
}

.context-warning-panel h3 {
    color: var(--text);
    font-size: clamp(28px, 3.5vw, 46px);
    line-height: 1.04;
    margin: 0;
    text-shadow: 0 0 18px rgba(220, 255, 220, 0.35);
}

.warning-modal-actions {
    margin-top: 6px;
}

.warning-actions {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 12px;
    width: min(100%, 720px);
    max-width: 720px;
    margin-left: auto;
}

.main-screen {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 16px;
    max-width: 1240px;
}

.town-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
}

.town-context {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: clamp(15px, 1.12vw, 18px);
    line-height: 1.35;
    text-transform: uppercase;
}

.town-utility-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 10px;
    min-width: 270px;
    padding-top: 8px;
}

.town-utility-actions .button {
    min-height: 44px;
    padding: 10px 14px;
}

.status-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(86px, 1fr));
    border: 1px solid rgba(66, 245, 255, 0.58);
    background: rgba(66, 245, 255, 0.035);
    box-shadow: inset 0 0 18px rgba(66, 245, 255, 0.08), 0 0 22px rgba(66, 245, 255, 0.12);
}

.status-strip div {
    min-height: 56px;
    border-right: 1px solid rgba(66, 245, 255, 0.24);
    padding: 9px 12px;
}

.status-strip div:last-child {
    border-right: 0;
}

.status-strip span,
.town-option small,
.town-readout dt,
.keyboard-hint {
    color: var(--muted);
    font-size: clamp(11px, 0.82vw, 13px);
    line-height: 1.2;
    text-transform: uppercase;
}

.status-strip strong {
    display: block;
    color: var(--cyan);
    font-size: clamp(14px, 1.08vw, 18px);
    line-height: 1.1;
    margin-top: 7px;
    overflow-wrap: anywhere;
    text-shadow: 0 0 10px rgba(66, 245, 255, 0.42);
    text-transform: uppercase;
}

.town-layout {
    display: grid;
    grid-template-columns: minmax(420px, 1.15fr) minmax(340px, 0.85fr);
    gap: 16px;
    align-items: start;
}

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

.town-option {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    min-height: 54px;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(88, 255, 106, 0.42);
    border-radius: 6px;
    background: rgba(88, 255, 106, 0.035);
    color: var(--text);
    cursor: pointer;
    font: inherit;
    padding: 8px 10px;
    text-align: left;
}

.town-option:hover,
.town-option:focus-visible,
.town-option.is-active {
    border-color: var(--green);
    background: rgba(88, 255, 106, 0.12);
    box-shadow: inset 0 0 16px rgba(88, 255, 106, 0.12), 0 0 18px rgba(88, 255, 106, 0.16);
    outline: none;
}

.town-option kbd {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--amber);
    border-radius: 4px;
    background: rgba(255, 211, 92, 0.08);
    color: var(--amber);
    font: inherit;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 0 10px rgba(255, 211, 92, 0.42);
}

.town-option span {
    min-width: 0;
    color: var(--text);
    font-size: clamp(14px, 1.02vw, 17px);
    font-weight: 800;
    line-height: 1.05;
    overflow-wrap: anywhere;
    text-transform: uppercase;
}

.town-option small {
    color: var(--cyan);
    white-space: nowrap;
}

.town-readout {
    display: grid;
    gap: 14px;
    border: 1px solid rgba(255, 211, 92, 0.48);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 211, 92, 0.06), transparent 44%),
        rgba(255, 211, 92, 0.025);
    padding: 16px;
    box-shadow: inset 0 0 22px rgba(255, 211, 92, 0.08), 0 0 24px rgba(255, 211, 92, 0.12);
}

.readout-map {
    min-height: 0;
    max-width: 100%;
    overflow: auto hidden;
    border: 0;
    border-radius: 6px;
    background: rgba(66, 245, 255, 0.025);
    color: var(--cyan);
    font-size: clamp(10px, 0.86vw, 14px);
    font-weight: 700;
    line-height: 1.08;
    margin: 0;
    padding: 8px 10px;
    text-shadow: 0 0 10px rgba(66, 245, 255, 0.38);
}

.character-art-grid {
    --character-art-cell-width: 0.62em;
    --character-art-cell-height: 1em;
    --character-art-font-size: clamp(10px, 0.86vw, 14px);
    display: grid;
    width: max-content;
    font-feature-settings: "liga" 0, "calt" 0, "kern" 0;
    font-size: var(--character-art-font-size);
    font-kerning: none;
    font-variant-ligatures: none;
    line-height: 1;
    user-select: none;
}

.character-art-cell {
    display: inline-flex;
    width: var(--character-art-cell-width);
    height: var(--character-art-cell-height);
    align-items: center;
    justify-content: center;
    line-height: var(--character-art-cell-height);
    overflow: hidden;
    white-space: pre;
}

.character-art-cell.is-space {
    text-shadow: none;
}

.readout-command {
    margin: 0;
    color: var(--cyan);
    font-size: clamp(18px, 1.8vw, 28px);
    line-height: 1.1;
    text-transform: uppercase;
}

.readout-command span {
    color: var(--amber);
}

.town-readout p {
    margin: 0;
    color: var(--muted);
    font-size: clamp(15px, 1.18vw, 19px);
    line-height: 1.4;
}

.town-readout dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.town-readout dl div {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
    border-top: 1px solid rgba(255, 211, 92, 0.18);
    padding-top: 8px;
}

.town-readout dd {
    margin: 0;
    color: var(--text);
    font-size: clamp(13px, 1.02vw, 16px);
    line-height: 1.3;
}

.readout-actions {
    display: grid;
    grid-template-columns: 1fr;
}

.keyboard-hint {
    margin: 0;
    color: var(--amber);
}

.utility-actions {
    margin-top: 16px;
    max-width: 220px;
}

.location-screen {
    display: grid;
    gap: 16px;
}

.location-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(160px, 220px);
    gap: 18px;
    align-items: start;
}

.location-header .button {
    min-height: 44px;
    padding: 10px 14px;
}

.location-summary {
    max-width: 760px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: clamp(15px, 1.1vw, 18px);
    line-height: 1.45;
}

.location-status {
    grid-template-columns: repeat(5, minmax(110px, 1fr));
}

.location-layout {
    display: grid;
    grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
    gap: 16px;
    align-items: start;
}

.location-console,
.location-actions {
    display: grid;
    gap: 14px;
}

.location-console {
    position: sticky;
    top: 14px;
}

.location-actions {
    max-height: min(66vh, calc(100dvh - 300px));
    align-content: start;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-color: var(--green) rgba(88, 255, 106, 0.08);
    scrollbar-width: thin;
}

.location-actions::-webkit-scrollbar {
    width: 12px;
}

.location-actions::-webkit-scrollbar-track {
    border: 1px solid rgba(88, 255, 106, 0.18);
    background: rgba(88, 255, 106, 0.05);
}

.location-actions::-webkit-scrollbar-thumb {
    border: 2px solid #020802;
    border-radius: 0;
    background: var(--green);
    box-shadow: 0 0 12px rgba(88, 255, 106, 0.35);
}

.location-message,
.location-travel-card,
.location-action-group {
    border: 1px solid rgba(88, 255, 106, 0.36);
    border-radius: 8px;
    background: rgba(0, 18, 9, 0.72);
    box-shadow: inset 0 0 18px rgba(88, 255, 106, 0.08);
}

.location-message {
    display: grid;
    gap: 8px;
    padding: 14px;
}

.location-message strong,
.location-message p {
    margin: 0;
}

.location-message small {
    color: var(--amber);
    text-transform: uppercase;
}

.location-message.is-good {
    border-color: var(--green);
}

.location-message.is-bad {
    border-color: var(--red);
    color: var(--red);
}

.location-travel-card {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.location-travel-card span,
.location-section-title small,
.location-action-copy span,
.location-action-copy em {
    color: var(--muted);
    font-size: clamp(11px, 0.82vw, 13px);
    line-height: 1.25;
    text-transform: uppercase;
}

.location-travel-card strong {
    color: var(--amber);
    font-size: clamp(20px, 1.6vw, 28px);
    line-height: 1;
}

.location-section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    color: var(--amber);
    font-size: clamp(15px, 1vw, 17px);
    font-weight: 800;
    text-transform: uppercase;
}

.location-action-group {
    overflow: hidden;
}

.location-action-group header {
    display: grid;
    gap: 8px;
    border-bottom: 1px solid rgba(88, 255, 106, 0.22);
    padding: 14px 16px;
}

.location-action-group h2,
.location-action-group p {
    margin: 0;
}

.location-action-group h2 {
    color: var(--text);
    font-size: clamp(18px, 1.35vw, 24px);
    line-height: 1.1;
}

.location-action-group p {
    color: var(--muted);
    font-size: clamp(13px, 0.95vw, 16px);
    line-height: 1.4;
}

.location-action-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(94px, 0.2fr);
    gap: 10px;
    align-items: center;
    border-top: 1px solid rgba(88, 255, 106, 0.18);
    padding: 12px 16px;
}

.location-action-row:first-of-type {
    border-top: 0;
}

.location-action-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.location-action-copy strong {
    color: var(--text);
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.18;
}

.location-action-copy em {
    color: var(--amber);
    font-style: normal;
    text-transform: none;
}

.location-action-row .button {
    min-height: 38px;
    padding: 8px 10px;
}

.location-empty {
    margin: 0;
    color: var(--muted);
}

.character-status {
    max-height: none;
}

.status-actions {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(220px, 320px);
    justify-content: end;
    gap: 12px;
    width: 100%;
    margin: 0 0 18px auto;
}

.status-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.status-card {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
    border: 1px solid rgba(66, 245, 255, 0.46);
    border-radius: 8px;
    background: rgba(66, 245, 255, 0.035);
    padding: 16px;
}

.wide-status-card {
    grid-column: 1 / -1;
}

.status-card h2,
.status-card h3,
.status-card h4 {
    margin: 0;
    letter-spacing: 0;
    line-height: 1.1;
}

.status-card h2 {
    color: var(--amber);
    font-size: clamp(20px, 2vw, 30px);
    text-transform: uppercase;
}

.status-card h3 {
    color: var(--cyan);
    font-size: clamp(15px, 1.2vw, 18px);
    text-transform: uppercase;
}

.status-card h4 {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

.status-dl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
    margin: 0;
}

.status-dl div,
.status-chip,
.status-entry {
    min-width: 0;
    border: 1px solid rgba(88, 255, 106, 0.24);
    border-radius: 6px;
    background: rgba(88, 255, 106, 0.035);
    padding: 10px;
}

.status-dl dt,
.status-chip span,
.stat-readout-grid span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.2;
    text-transform: uppercase;
}

.status-dl dd {
    color: var(--text);
    font-size: clamp(14px, 1vw, 16px);
    font-weight: 700;
    line-height: 1.3;
    margin: 6px 0 0;
    overflow-wrap: anywhere;
}

.stat-readout-grid,
.status-subgrid,
.status-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.stat-readout-grid div {
    display: grid;
    gap: 6px;
    border: 1px solid rgba(255, 211, 92, 0.34);
    border-radius: 6px;
    background: rgba(255, 211, 92, 0.035);
    padding: 10px;
}

.stat-readout-grid strong {
    color: var(--green);
    font-size: 26px;
    line-height: 1;
}

.stat-readout-grid code {
    color: var(--cyan);
    overflow-wrap: anywhere;
}

.status-chip {
    display: grid;
    gap: 5px;
}

.status-chip strong {
    color: var(--text);
    font-size: 14px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.status-entry {
    display: grid;
    gap: 8px;
}

.nested-status {
    display: grid;
    gap: 8px;
}

.empty-status {
    border: 1px solid rgba(255, 211, 92, 0.28);
    border-radius: 6px;
    color: var(--muted);
    margin: 0;
    padding: 10px;
}

.button {
    display: inline-flex;
    min-height: clamp(56px, 5vw, 74px);
    align-items: center;
    justify-content: center;
    border: 1px solid var(--green);
    border-radius: 8px;
    background: rgba(88, 255, 106, 0.06);
    color: var(--green);
    font-family: var(--terminal-font);
    font-weight: 700;
    padding: 14px 20px;
    font-size: clamp(15px, 1.25vw, 22px);
    line-height: 1.1;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: inset 0 0 18px rgba(88, 255, 106, 0.12), 0 0 24px rgba(88, 255, 106, 0.2);
}

.button:hover {
    background: rgba(88, 255, 106, 0.16);
}

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

.button.dark {
    border-color: var(--text);
    background: var(--text);
    color: #000;
}

.button.secondary {
    width: 100%;
}

@media (max-width: 560px) {
    .shell {
        place-items: stretch;
    }

    .terminal {
        min-height: calc(100vh - 24px);
        padding: 14px;
    }

    .terminal-session {
        min-height: auto;
        max-height: none;
    }

    .ansi {
        font-size: 8px;
    }

    .ansi-strip {
        align-items: flex-start;
        flex-direction: column;
        white-space: normal;
    }

    .pinata-rig {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-inline: 48px;
    }

    .pinata-device::before,
    .pinata-device::after,
    .rig-link {
        display: none;
    }

    .rig-caption {
        font-size: 13px;
        white-space: normal;
    }

    .ansi-strip .strip-fill,
    .ansi-strip .strip-bars {
        display: none;
    }

    .strip-mode {
        margin-left: 0;
    }

    h1 {
        font-size: 34px;
    }

    .creation-grid,
    .form-grid,
    .character-form .stat-budget .stat-grid,
    .town-header,
    .town-utility-actions,
    .status-strip,
    .location-header,
    .location-layout,
    .location-status,
    .location-action-row,
    .status-grid,
    .status-actions,
    .town-layout,
    .town-menu,
    .readout-actions,
    .split-actions,
    .warning-actions {
        grid-template-columns: 1fr;
    }

    .option-grid.compact-options-3,
    .religion-options {
        grid-template-columns: 1fr;
    }

    .location-actions {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
}
