:root {
    --ink: #1c2416;
    --muted: #5c5648;
    --paper: #f4efe4;
    --rail: #214833;
    --rail-ink: #f6f1e6;
    --line: #d7cdb8;
    --rule: #1c2416;
    --clay: #c4553a;
    --gold: #8a5a12;
    --ok: #1f6b3b;
    --bad: #9d342c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.ed-body {
    margin: 0;
    color: var(--ink);
    background: #e7e0d2;
    font-family: "Public Sans", "Segoe UI", sans-serif;
    font-size: 16.5px;
    line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--clay); }
h1, h2, h3 { font-family: "Newsreader", Georgia, serif; font-weight: 650; line-height: 1.12; margin: 0 0 12px; }
p { margin: 0 0 12px; }

.ed-shell {
    width: 1200px;
    max-width: calc(100% - 20px);
    margin: 16px auto 0;
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    background: var(--paper);
    border: 1px solid var(--rule);
    min-height: calc(100vh - 140px);
}
.ed-side {
    background: var(--rail);
    color: var(--rail-ink);
    padding: 22px 16px 28px;
}
.ed-brand {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 10px;
    align-items: center;
    text-decoration: none;
    color: var(--rail-ink);
}
.ed-mark {
    width: 56px;
    height: 56px;
    object-fit: cover;
    object-position: center 18%;
    background: var(--paper);
}
.ed-brand-name {
    font-family: "Newsreader", Georgia, serif;
    font-size: 1.15rem;
    line-height: 1.15;
}
.ed-nav {
    display: flex;
    flex-direction: column;
    margin-top: 28px;
}
.ed-nav a {
    color: var(--rail-ink);
    text-decoration: none;
    padding: 12px 0;
    border-top: 1px solid rgba(246, 241, 230, 0.28);
    font-weight: 650;
    border-radius: 0;
}
.ed-nav a.is-on { color: #f2d48a; }
.ed-nav a.ed-shop {
    margin-top: 22px;
    display: block;
    text-align: center;
    background: var(--clay);
    color: #fff !important;
    padding: 14px 8px;
    border: 0;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.ed-nav a.ed-shop.is-on {
    background: var(--paper);
    color: var(--rail) !important;
    box-shadow: inset 5px 0 0 var(--clay);
}
.ed-main { min-width: 0; padding: 28px 32px 36px; }

.ed-kicker {
    margin: 0 0 8px;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--clay);
    font-weight: 750;
}
.ed-title { font-size: 3rem; color: var(--ink); }
.ed-lead { font-size: 1.12rem; color: var(--muted); max-width: 40rem; }
.ed-plays { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 8px; }
.ed-play img { width: 190px; height: auto; }

.ed-spread {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding-bottom: 22px;
    border-bottom: 2px solid var(--rule);
}
.ed-cover, .ed-sideposter { width: 100%; height: auto; }
.ed-ribbon { margin: 22px 0 0; }
.ed-ribbon figcaption { margin-top: 6px; color: var(--muted); font-size: 0.9rem; }
.ed-banner { width: 100%; height: auto; aspect-ratio: 1024 / 500; object-fit: cover; }
.ed-mosaic {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
    align-items: start;
}
.ed-mosaic img { width: 100%; height: auto; }
.ed-index {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 26px;
    border-top: 2px solid var(--rule);
}
.ed-index a {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 14px 18px 14px 0;
    border-bottom: 1px solid var(--line);
    color: inherit;
    text-decoration: none;
}
.ed-index a:nth-child(even) { padding-left: 18px; padding-right: 0; }
.ed-index a > span:first-child {
    font-family: "Newsreader", Georgia, serif;
    color: var(--clay);
    font-size: 1.25rem;
    line-height: 1.15;
}
.ed-index-copy { min-width: 0; color: var(--muted); }
.ed-index strong { display: block; color: var(--ink); margin-bottom: 2px; }

.ed-essay .ed-title { border-bottom: 3px solid var(--rule); padding-bottom: 10px; }
.ed-caption-row { display: flex; gap: 14px; align-items: flex-end; margin: 16px 0 18px; }
.ed-fig-wide { width: 340px; max-width: 70%; height: auto; }
.ed-fig-sq { width: 92px; height: auto; }
.ed-columns { column-count: 2; column-gap: 28px; }
.ed-columns p { break-inside: avoid; }
.ed-principles {
    list-style: none;
    padding: 0;
    margin: 22px 0 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border-top: 2px solid var(--rule);
}
.ed-principles li { padding: 14px 12px 0 0; border-right: 1px solid var(--line); }
.ed-principles li:last-child { border-right: 0; }
.ed-ico { width: 22px; height: 22px; color: var(--rail); }

.ed-gameboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px;
    gap: 24px;
    align-items: start;
}
.ed-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-top: 22px;
    border-top: 2px solid var(--rule);
}
.ed-tiles article { padding: 16px 16px 8px 0; border-bottom: 1px solid var(--line); }
.ed-tiles article:nth-child(odd) { padding-right: 18px; border-right: 1px solid var(--line); }
.ed-tiles article:nth-child(even) { padding-left: 18px; }
.ed-tiles h2 { font-size: 1.45rem; }
.ed-more { margin-top: 16px; }

.ed-letter {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: start;
}
.ed-contact-side { display: grid; gap: 16px; align-content: start; }
.ed-contact-fig { width: 100%; height: auto; }
.ed-address {
    font-style: normal;
    display: grid;
    gap: 8px;
    padding: 18px 0 18px 18px;
    border-left: 4px solid var(--clay);
    font-size: 1.15rem;
}
.ed-address strong { font-family: "Newsreader", Georgia, serif; font-size: 1.6rem; }

.ed-panel, .ed-sheet, .ed-ticket, .ed-result, .ed-fault, .ed-promise {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 18px 0;
    margin: 0;
    border-top: 1px solid var(--line);
}
.ed-screen-store .ed-panel:first-child,
.ed-screen-store .ed-main > .ed-panel:first-of-type { border-top: 0; padding-top: 0; }
.ed-screen-store .ed-title { font-size: 2.4rem; }
.ed-hint { color: var(--muted); font-size: 0.92rem; }
.ed-railbox {
    max-height: 320px;
    overflow: auto;
    border-top: 2px solid var(--rule);
    border-bottom: 2px solid var(--rule);
}
.ed-coin {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 8px 6px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    cursor: pointer;
}
.ed-coin input { position: absolute; opacity: 0; pointer-events: none; }
.ed-coin img { width: 48px; height: 48px; margin: 0; }
.ed-coin b { font-size: 0.98rem; }
.ed-price { color: var(--gold); font-weight: 750; font-size: 1.15rem; }
.ed-coin.is-picked { background: #efe4c4; }
.ed-desk {
    display: grid;
    grid-template-columns: 0.72fr 1.28fr;
    gap: 28px;
    align-items: start;
}
.ed-desk > .ed-alert,
.ed-desk > script { grid-column: 1 / -1; }
.ed-form { display: grid; gap: 12px; }
.ed-form label, .ed-summary label { display: grid; gap: 6px; font-weight: 650; }
.ed-form input[type="text"],
.ed-form input[type="email"],
.ed-ticket input[type="text"] {
    font: inherit;
    width: 100%;
    padding: 10px 12px;
    border-radius: 0;
    border: 0;
    border-bottom: 2px solid var(--rule);
    background: transparent;
}
.ed-pays { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.ed-pays label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 650;
    padding: 0;
    background: transparent;
    border-radius: 0;
}
.ed-paynote { color: var(--muted); font-weight: 650; }
.ed-check { font-weight: 650; grid-template-columns: 18px 1fr; align-items: start; }
.ed-go {
    justify-self: start;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 750;
    color: var(--paper);
    background: var(--rail);
    border-radius: 0;
    padding: 12px 22px;
}
.ed-money { display: flex; flex-wrap: wrap; gap: 8px; }
.ed-money button {
    font: inherit;
    font-weight: 650;
    border-radius: 0;
    border: 1px solid var(--rule);
    background: transparent;
    padding: 6px 10px;
    cursor: pointer;
}
.ed-money button.is-on { background: var(--ink); color: var(--paper); }
.ed-alert {
    display: none;
    margin-top: 8px;
    background: #f8e4df;
    color: var(--bad);
    padding: 10px 12px;
}
.ed-alert.is-on { display: block; }
.ed-promise h3 { margin-top: 14px; font-size: 1.25rem; }
.ed-row, .ed-ticket-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}
.ed-ok { color: var(--ok); }
.ed-bad { color: var(--bad); }
.ed-fault { border-left: 4px solid var(--bad); padding-left: 16px; }
.ed-result.is-good { border-left: 4px solid var(--ok); padding-left: 16px; }
.ed-result.is-bad { border-left: 4px solid var(--bad); padding-left: 16px; }

.ed-foot {
    width: 1200px;
    max-width: calc(100% - 20px);
    margin: 0 auto 24px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-top: 0;
    padding: 16px 20px 12px;
}
.ed-foot-name { margin: 0 0 10px; }
.ed-foot-links { display: flex; flex-wrap: wrap; gap: 8px 0; }
.ed-foot-links a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 650;
    padding: 0 12px;
    border-left: 1px solid var(--line);
}
.ed-foot-links a:first-child { border-left: 0; padding-left: 0; }
.ed-copy { margin: 10px 0 0; color: var(--muted); font-size: 0.88rem; }

@media (max-width: 900px) {
    .ed-shell, .ed-spread, .ed-gameboard, .ed-letter, .ed-desk, .ed-columns, .ed-principles, .ed-tiles, .ed-index, .ed-mosaic {
        grid-template-columns: 1fr;
        column-count: 1;
    }
    .ed-columns { column-count: 1; }
    .ed-side { position: static; }
    .ed-nav { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
    .ed-nav a { border-top: 0; padding: 6px 0; }
    .ed-nav a.ed-shop { width: 100%; }
    .ed-title { font-size: 2.2rem; }
    .ed-plays { flex-direction: row; flex-wrap: wrap; }
}
