:root {
    --sea-950: #08141d;
    --sea-900: #0d1d28;
    --sea-800: #173242;
    --sea-700: #224759;
    --parchment-100: #f5e7c2;
    --parchment-200: #ead7aa;
    --parchment-300: #d8c08d;
    --parchment-400: #b99c66;
    --gold: #cda24b;
    --gold-bright: #e3c173;
    --copper: #94562f;
    --mahogany: #462514;
    --mahogany-deep: #2d180e;
    --ink: #20140d;
    --muted: #5a4735;
    --line: rgba(63, 34, 20, 0.28);
    --panel: rgba(247, 232, 196, 0.92);
    --panel-strong: rgba(252, 241, 214, 0.98);
    --panel-dark: rgba(18, 31, 40, 0.92);
    --danger: #8a2d1a;
    --success: #245846;
    --shadow: 0 24px 70px rgba(3, 10, 16, 0.42);
    --shadow-soft: 0 12px 30px rgba(13, 29, 40, 0.18);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 15px;
    --radius-sm: 10px;
    --font-display: "Palatino Linotype", "Book Antiqua", Georgia, serif;
    --font-body: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: var(--font-body);
    background:
        radial-gradient(circle at top, rgba(227, 193, 115, 0.12), transparent 22%),
        radial-gradient(circle at 14% 16%, rgba(67, 118, 141, 0.34), transparent 25%),
        radial-gradient(circle at 85% 12%, rgba(205, 162, 75, 0.11), transparent 19%),
        linear-gradient(180deg, #112531 0%, #0c1a24 34%, #09131b 100%);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at center, rgba(205, 162, 75, 0.2), transparent 55%) center top / 560px 560px no-repeat,
        linear-gradient(rgba(255, 232, 181, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 232, 181, 0.04) 1px, transparent 1px);
    background-size: 560px 560px, 34px 34px, 34px 34px;
    opacity: 0.44;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.82), transparent 88%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 120%, rgba(6, 13, 18, 0.08), rgba(4, 8, 12, 0.72)),
        linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.18));
}

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0 64px;
    position: relative;
    z-index: 1;
}

.shell-admin {
    width: min(1320px, calc(100% - 32px));
}

.play-shell {
    width: min(1240px, calc(100% - 32px));
}

.publication-shell {
    width: min(1380px, calc(100% - 32px));
}

.auth-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding-top: 20px;
    padding-bottom: 20px;
}

.auth-card {
    width: min(560px, 100%);
}

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

.hero {
    display: grid;
    gap: 18px;
    margin-bottom: 28px;
    padding: 34px;
    border: 1px solid rgba(83, 48, 28, 0.36);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(93, 57, 31, 0.08), transparent 36%),
        radial-gradient(circle at top right, rgba(205, 162, 75, 0.18), transparent 28%),
        linear-gradient(180deg, rgba(250, 239, 210, 0.97), rgba(233, 213, 168, 0.95));
    box-shadow: var(--shadow);
    animation: rise-in 460ms ease-out both;
    position: relative;
    overflow: hidden;
}

.hero::before,
.panel::before,
.stage-card::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(118, 80, 45, 0.22);
    border-radius: calc(var(--radius-lg) - 4px);
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -36px -48px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(228, 195, 112, 0.3), transparent 58%),
        repeating-conic-gradient(from 0deg, rgba(70, 37, 20, 0.22) 0deg 10deg, transparent 10deg 20deg);
    opacity: 0.22;
    transform: rotate(12deg);
}

.hero-admin {
    grid-template-columns: 1.6fr 0.9fr;
    align-items: start;
}

.play-hero {
    gap: 20px;
    background:
        linear-gradient(135deg, rgba(93, 57, 31, 0.08), transparent 36%),
        radial-gradient(circle at 15% 18%, rgba(43, 95, 118, 0.16), transparent 22%),
        radial-gradient(circle at top right, rgba(205, 162, 75, 0.22), transparent 28%),
        linear-gradient(180deg, rgba(252, 241, 214, 0.98), rgba(231, 210, 165, 0.95));
}

.play-hero::after {
    inset: auto -22px -42px auto;
    width: 260px;
    height: 260px;
    opacity: 0.26;
}

.eyebrow,
.section-kicker {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--copper);
    font-weight: 700;
    text-shadow: 0 1px 0 rgba(255, 240, 205, 0.5);
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 0.95;
    max-width: 12ch;
    font-family: var(--font-display);
    letter-spacing: 0.02em;
    color: #2f190f;
    text-shadow: 0 1px 0 rgba(255, 244, 219, 0.65);
}

h2 {
    font-size: 1.28rem;
    line-height: 1.15;
    font-family: var(--font-display);
    color: #321c11;
}

h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: #321b11;
}

.lead {
    max-width: 70ch;
    color: var(--muted);
    font-size: 1.04rem;
    line-height: 1.72;
}

.hero-actions,
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.toolbar {
    margin-top: 18px;
}

.toolbar-end {
    justify-content: flex-end;
}

.button {
    appearance: none;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    letter-spacing: 0.04em;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

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

.button.is-disabled,
.button[aria-disabled="true"] {
    opacity: 0.56;
    pointer-events: none;
}

.button-primary {
    color: #211108;
    background:
        linear-gradient(180deg, rgba(255, 234, 182, 0.44), transparent 36%),
        linear-gradient(135deg, var(--gold-bright) 0%, var(--gold) 46%, #9f6f28 100%);
    border: 1px solid rgba(77, 47, 20, 0.28);
    box-shadow:
        0 12px 24px rgba(19, 12, 8, 0.22),
        inset 0 1px 0 rgba(255, 245, 214, 0.58);
}

.button-secondary {
    color: #f9ebcb;
    background:
        linear-gradient(180deg, rgba(145, 94, 56, 0.24), transparent 38%),
        linear-gradient(135deg, #6e452b 0%, var(--mahogany) 100%);
    border: 1px solid rgba(223, 190, 112, 0.22);
    box-shadow: 0 12px 24px rgba(8, 14, 19, 0.26);
}

.grid,
.admin-layout,
.play-layout,
.publication-layout,
.publication-grid {
    display: grid;
    gap: 22px;
}

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

.admin-layout {
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.9fr);
    align-items: start;
}

.play-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
    align-items: start;
}

.play-layout-single {
    grid-template-columns: minmax(0, 1fr);
}

.publication-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    align-items: start;
    margin-bottom: 22px;
}

.publication-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    margin-bottom: 22px;
}

.panel {
    padding: 24px;
    border: 1px solid rgba(90, 57, 33, 0.34);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(83, 48, 28, 0.07), transparent 40%),
        linear-gradient(180deg, rgba(250, 240, 216, 0.97), rgba(234, 214, 172, 0.95));
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.notice {
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(90, 57, 33, 0.28);
    background:
        linear-gradient(180deg, rgba(57, 36, 22, 0.12), transparent 35%),
        linear-gradient(135deg, rgba(248, 230, 188, 0.95), rgba(226, 203, 151, 0.92));
    box-shadow: var(--shadow-soft);
}

.notice strong {
    display: inline-block;
    margin-bottom: 8px;
    font-family: var(--font-display);
    color: #31180d;
}

.play-panel,
.play-sidebar {
    display: grid;
    gap: 22px;
}

.publication-summary,
.publication-sidebar {
    display: grid;
    gap: 18px;
}

.admin-form {
    display: grid;
    gap: 24px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

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

.field {
    display: grid;
    gap: 8px;
}

.field-wide {
    grid-column: 1 / -1;
}

.field span {
    font-size: 0.9rem;
    font-weight: 700;
    color: #3d2618;
}

.helper-text {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.play-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.play-shell .play-meta {
    padding: 16px 18px;
    border-radius: calc(var(--radius-lg) - 2px);
    background:
        linear-gradient(180deg, rgba(98, 61, 35, 0.08), transparent 45%),
        linear-gradient(135deg, rgba(255, 247, 222, 0.7), rgba(244, 228, 188, 0.86));
    border: 1px solid rgba(106, 68, 39, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 250, 235, 0.72);
}

.play-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(55, 34, 22, 0.12);
    border: 1px solid rgba(86, 52, 29, 0.16);
    color: #3a2417;
    font-size: 0.84rem;
    font-weight: 700;
}

.play-shell .play-chip {
    padding: 10px 16px;
    background:
        linear-gradient(180deg, rgba(255, 236, 187, 0.32), transparent 38%),
        linear-gradient(135deg, #6b4125 0%, #4a2817 100%);
    border: 1px solid rgba(215, 182, 103, 0.26);
    color: #f5e7c6;
    box-shadow: 0 10px 22px rgba(18, 11, 7, 0.14);
}

input,
textarea,
select {
    width: 100%;
    padding: 13px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(84, 53, 31, 0.24);
    background:
        linear-gradient(180deg, rgba(255, 251, 239, 0.84), rgba(243, 229, 194, 0.98));
    color: var(--ink);
    font: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid rgba(205, 162, 75, 0.32);
    border-color: rgba(160, 109, 45, 0.48);
}

.stages-stack {
    display: grid;
    gap: 18px;
}

.stage-card {
    display: grid;
    gap: 18px;
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(90, 57, 33, 0.3);
    background:
        radial-gradient(circle at top right, rgba(205, 162, 75, 0.18), transparent 24%),
        linear-gradient(135deg, rgba(90, 57, 33, 0.07), transparent 35%),
        linear-gradient(180deg, rgba(251, 240, 214, 0.97), rgba(233, 213, 169, 0.96));
    box-shadow: var(--shadow-soft);
    animation: rise-in 380ms ease both;
    position: relative;
    overflow: hidden;
}

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

.stage-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 237, 194, 0.48), transparent 45%),
        linear-gradient(135deg, #a56b38 0%, #734322 100%);
    color: #f8ebcb;
    font-size: 0.84rem;
    font-weight: 700;
    border: 1px solid rgba(70, 37, 20, 0.18);
}

.stage-meta {
    color: var(--muted);
    font-size: 0.93rem;
}

.stage-token {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.85rem;
}

.stage-token code {
    display: inline-block;
    margin-top: 4px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(44, 27, 17, 0.08);
    color: #412619;
    word-break: break-all;
}

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

.stage-settings .field-wide {
    grid-column: 1 / -1;
}

.conditional-fields[hidden] {
    display: none;
}

.stage-block {
    display: grid;
    gap: 18px;
}

.stage-riddle,
.clue-panel,
.reward-panel {
    padding: 18px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(86, 52, 29, 0.18);
    line-height: 1.8;
}

.stage-riddle {
    background: rgba(255, 248, 229, 0.72);
}

.clue-panel {
    background: rgba(252, 237, 202, 0.8);
}

.reward-panel {
    background:
        linear-gradient(180deg, rgba(255, 234, 184, 0.34), transparent 35%),
        rgba(87, 54, 31, 0.12);
}

.answer-form {
    display: grid;
    gap: 16px;
}

.play-alert-stack {
    display: grid;
    gap: 16px;
    margin: -6px 0 22px;
}

.play-stage-panel {
    padding: 30px;
    background:
        radial-gradient(circle at top right, rgba(205, 162, 75, 0.18), transparent 24%),
        radial-gradient(circle at bottom left, rgba(39, 88, 112, 0.09), transparent 24%),
        linear-gradient(180deg, rgba(251, 241, 214, 0.98), rgba(232, 211, 165, 0.97));
    box-shadow:
        0 28px 60px rgba(3, 10, 16, 0.28),
        inset 0 1px 0 rgba(255, 250, 233, 0.7);
}

.play-stage-panel::after {
    content: "";
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 18px;
    height: 7px;
    border-radius: 999px;
    background:
        repeating-linear-gradient(
            90deg,
            rgba(116, 74, 42, 0.34) 0 18px,
            rgba(255, 240, 204, 0.18) 18px 30px
        );
    opacity: 0.5;
}

.play-stage-panel .stage-block {
    gap: 22px;
}

.play-stage-panel .stage-block h2 {
    font-size: clamp(1.8rem, 4vw, 2.65rem);
    line-height: 0.98;
    max-width: 18ch;
}

.play-stage-panel .section-kicker {
    color: #7a4524;
}

.play-stage-panel .stage-riddle,
.play-stage-panel .clue-panel,
.play-stage-panel .reward-panel {
    position: relative;
    padding: 24px;
    border-radius: 20px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.58),
        0 14px 30px rgba(22, 15, 10, 0.08);
}

.play-stage-panel .stage-riddle {
    background:
        linear-gradient(180deg, rgba(255, 248, 229, 0.96), rgba(244, 226, 187, 0.9));
}

.play-stage-panel .stage-riddle::before,
.play-stage-panel .clue-panel::before,
.play-stage-panel .reward-panel::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px dashed rgba(121, 80, 42, 0.24);
    border-radius: 14px;
    pointer-events: none;
}

.play-stage-panel .field span {
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.play-stage-panel input[type="text"] {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(105, 67, 38, 0.26);
    background:
        linear-gradient(180deg, rgba(255, 251, 240, 0.94), rgba(246, 232, 196, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 10px 20px rgba(19, 12, 8, 0.08);
}

.play-stage-panel .button-primary {
    min-width: 220px;
    justify-content: center;
}

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

.status-banner {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(86, 52, 29, 0.18);
}

.status-banner strong {
    font-family: var(--font-display);
}

.status-success {
    background: rgba(215, 241, 222, 0.74);
    border-color: rgba(36, 88, 70, 0.26);
}

.status-error {
    background: rgba(255, 229, 220, 0.8);
    border-color: rgba(138, 45, 26, 0.24);
}

.status-warning {
    background: rgba(255, 240, 201, 0.82);
    border-color: rgba(157, 111, 40, 0.24);
}

.play-banner {
    position: relative;
    overflow: hidden;
    padding: 22px 24px 22px 92px;
    border-width: 2px;
    border-radius: 22px;
    box-shadow: 0 18px 34px rgba(10, 16, 22, 0.16);
    animation: rise-in 260ms ease-out both;
}

.play-banner::before {
    content: "";
    position: absolute;
    left: 26px;
    top: 50%;
    width: 46px;
    height: 46px;
    transform: translateY(-50%);
    border-radius: 50%;
    border: 2px solid rgba(60, 32, 19, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 252, 241, 0.68);
}

.play-banner::after {
    position: absolute;
    left: 49px;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.04em;
}

.play-banner strong {
    font-size: 1.18rem;
    letter-spacing: 0.02em;
}

.play-banner p {
    color: #3b281b;
    font-size: 1rem;
    line-height: 1.72;
}

.play-banner.status-success {
    background:
        linear-gradient(135deg, rgba(38, 95, 75, 0.15), transparent 36%),
        linear-gradient(180deg, rgba(232, 248, 237, 0.96), rgba(206, 234, 215, 0.92));
    border-color: rgba(36, 88, 70, 0.34);
}

.play-banner.status-success::before {
    background:
        linear-gradient(180deg, rgba(240, 255, 246, 0.9), transparent 42%),
        linear-gradient(135deg, #69a27d 0%, #2d684f 100%);
}

.play-banner.status-success::after {
    content: "OK";
    color: #edf9f2;
}

.play-banner.status-success strong {
    color: #214d3d;
}

.play-banner.status-error {
    background:
        linear-gradient(135deg, rgba(138, 45, 26, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(255, 238, 228, 0.98), rgba(246, 208, 190, 0.92));
    border-color: rgba(138, 45, 26, 0.34);
}

.play-banner.status-error::before {
    background:
        linear-gradient(180deg, rgba(255, 246, 241, 0.88), transparent 42%),
        linear-gradient(135deg, #be6a4b 0%, #8a2d1a 100%);
}

.play-banner.status-error::after {
    content: "X";
    color: #fff0ea;
}

.play-banner.status-error strong {
    color: #702414;
}

.play-banner.status-warning {
    background:
        linear-gradient(135deg, rgba(157, 111, 40, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(255, 247, 222, 0.98), rgba(242, 224, 169, 0.94));
    border-color: rgba(157, 111, 40, 0.34);
}

.play-banner.status-warning::before {
    background:
        linear-gradient(180deg, rgba(255, 252, 239, 0.9), transparent 42%),
        linear-gradient(135deg, #d1aa58 0%, #9a6d2b 100%);
}

.play-banner.status-warning::after {
    content: "!";
    color: #fff4dd;
}

.play-banner.status-warning strong {
    color: #6f4d1c;
}

.publication-warning {
    margin-bottom: 22px;
}

.sidebar {
    display: grid;
    gap: 22px;
    position: sticky;
    top: 18px;
}

.check-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 10px;
    color: var(--muted);
}

.check-list li::marker {
    color: var(--copper);
}

.preview {
    margin-top: 16px;
    max-height: 520px;
    overflow: auto;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(235, 209, 150, 0.16);
    background:
        radial-gradient(circle at top right, rgba(227, 193, 115, 0.08), transparent 24%),
        linear-gradient(180deg, #12222d, #0a151e);
    color: #e8dcc0;
    font-size: 0.84rem;
    line-height: 1.55;
    box-shadow: inset 0 1px 0 rgba(255, 245, 216, 0.04);
}

.sidebar-copy,
.form-message,
.token-box {
    color: var(--muted);
    line-height: 1.6;
}

.form-message[data-state="success"] {
    color: var(--success);
}

.form-message[data-state="error"] {
    color: var(--danger);
}

.token-box {
    display: inline-flex;
    gap: 8px;
    padding: 14px 18px;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 247, 221, 0.38), transparent 42%),
        linear-gradient(135deg, #7a4a29 0%, #4b2a18 100%);
    border: 1px solid rgba(226, 192, 108, 0.24);
    color: #f8ebcb;
    width: fit-content;
    box-shadow: 0 12px 24px rgba(7, 14, 20, 0.24);
}

.token-box strong {
    color: var(--gold-bright);
}

.token-box span {
    color: #fff2cb;
}

.saved-game-list,
.token-grid {
    display: grid;
    gap: 12px;
}

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

.publication-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
}

.publication-qr-wrap {
    display: grid;
    place-items: center;
}

.qr-frame {
    width: 100%;
    max-width: 320px;
    display: grid;
    gap: 12px;
    justify-items: center;
}

.qr-canvas {
    width: min(100%, 260px);
    aspect-ratio: 1;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(86, 52, 29, 0.18);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

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

.qr-caption {
    color: var(--muted);
    text-align: center;
    font-size: 0.86rem;
}

.publication-fields {
    display: grid;
    gap: 12px;
}

.publication-field {
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(90, 57, 33, 0.2);
    background: rgba(255, 247, 223, 0.55);
}

.publication-field span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.82rem;
}

.publication-field code,
.publication-table code {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(20, 33, 42, 0.9);
    color: #efdcb0;
    word-break: break-all;
    font-size: 0.84rem;
    line-height: 1.5;
}

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

.publication-table-wrap {
    display: grid;
    gap: 18px;
}

.publication-table-scroll {
    overflow: auto;
}

.publication-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

.publication-table th,
.publication-table td {
    padding: 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(90, 57, 33, 0.12);
}

.publication-table th {
    color: #3e2114;
    font-family: var(--font-display);
    font-size: 1rem;
}

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

.summary-item {
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(90, 57, 33, 0.2);
    background: rgba(255, 247, 223, 0.55);
}

.summary-item span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.82rem;
}

.summary-item strong {
    color: #3e2114;
}

.saved-game-item,
.token-card {
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(90, 57, 33, 0.2);
    background: rgba(255, 247, 223, 0.55);
}

.saved-game-item {
    display: grid;
    gap: 12px;
}

.saved-game-item.is-active {
    border-color: rgba(205, 162, 75, 0.48);
    box-shadow: inset 0 0 0 1px rgba(205, 162, 75, 0.22);
}

.saved-game-meta {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

.token-card strong {
    display: block;
    margin-bottom: 8px;
    color: #3e2114;
}

.token-card code {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(20, 33, 42, 0.9);
    color: #efdcb0;
    word-break: break-all;
}

a {
    color: #7b3f1f;
}

::selection {
    background: rgba(205, 162, 75, 0.26);
    color: #20140d;
}

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

::-webkit-scrollbar-track {
    background: rgba(12, 26, 36, 0.82);
}

::-webkit-scrollbar-thumb {
    border-radius: 999px;
    border: 2px solid rgba(12, 26, 36, 0.82);
    background: linear-gradient(180deg, #d4ad5f, #8c5a28);
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

@keyframes lantern-glow {
    0%,
    100% {
        box-shadow: var(--shadow);
    }

    50% {
        box-shadow: 0 26px 76px rgba(3, 10, 16, 0.5), 0 0 0 1px rgba(227, 193, 115, 0.04);
    }
}

.hero,
.stage-card:first-child {
    animation: rise-in 460ms ease-out both, lantern-glow 7.2s ease-in-out infinite;
}

@media (max-width: 980px) {
    .hero-admin,
    .admin-layout,
    .play-layout,
    .publication-layout,
    .field-grid,
    .stage-settings {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .shell,
    .shell-admin {
        width: min(100% - 20px, 100%);
    }

    .hero,
    .panel,
    .stage-card {
        padding: 20px;
    }

    h1 {
        max-width: none;
    }

    .section-heading,
    .stage-card-header,
    .publication-card-header {
        flex-direction: column;
        align-items: start;
    }

    .admin-topbar {
        flex-direction: column;
        align-items: start;
    }

    .button {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .play-stage-panel {
        padding: 24px 20px 30px;
    }

    .play-stage-panel::after {
        left: 20px;
        right: 20px;
    }

    .play-banner {
        padding: 18px 18px 18px 78px;
    }

    .play-banner::before {
        left: 18px;
        width: 42px;
        height: 42px;
    }

    .play-banner::after {
        left: 39px;
    }
}

@media print {
    body {
        background: #fff;
        color: #111;
    }

    body::before,
    body::after {
        display: none;
    }

    .shell,
    .shell-admin,
    .play-shell,
    .publication-shell {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .hero,
    .panel,
    .publication-card {
        box-shadow: none;
        break-inside: avoid;
        background: #fff;
    }

    .button,
    .publication-sidebar,
    .admin-topbar,
    .toolbar,
    [data-copy-feedback] {
        display: none !important;
    }

    .publication-layout,
    .publication-grid {
        grid-template-columns: 1fr;
    }

    .publication-table {
        min-width: 0;
    }
}
