:root {
  --dw-bg: #f2ead8; --dw-fg: #1a1714; --dw-accent: #c8321e; --dw-panel: rgba(26, 23, 20, .95);
  --dw-font-body: 'Lora', Georgia, serif; --brush: 'Permanent Marker', 'Comic Sans MS', cursive; --mono: 'Courier Prime', ui-monospace, monospace;
  --ink: #1a1714; --paper: #f2ead8; --paper2: #e8dcc2; --red: #c8321e; --teal: #23807f; --gold: #b8871d; --line: rgba(26, 23, 20, .18);
}
body { overflow-x: hidden; background: var(--paper); }
.dw-toast { color: #f2ead8; }
h1, h2 { font-family: var(--brush); font-weight: 400; line-height: 1.02; margin: 0 0 .5em; }
h2 { font-size: clamp(1.9rem, 4.6vw, 3rem); }
section { padding: clamp(56px, 9vw, 110px) clamp(16px, 5vw, 64px); }
a { color: var(--red); }

.topbar { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 10px clamp(16px, 4vw, 40px); background: #f2ead8e6; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 2px solid var(--ink); }
.brand { font-family: var(--brush); font-size: 1.5rem; color: var(--ink); text-decoration: none; }
.brand span { color: var(--red); margin-left: .15em; }
.topbar nav { display: flex; align-items: center; gap: 18px; font-family: var(--mono); font-size: .9rem; }
.topbar nav a { color: var(--ink); text-decoration: none; }
.topbar nav a:hover { color: var(--red); }
@media (max-width: 640px) { .topbar nav a { display: none; } }

.hero { position: relative; padding: 64px 0 0; min-height: 100svh; display: grid; align-items: end; overflow: hidden; }
.hero-fig { position: absolute; top: 56px; right: 0; width: min(100%, calc((100svh - 56px) * 16 / 9)); margin: 0; }
.hero-fig img { width: 100%; height: auto; }
.hero-copy { position: relative; z-index: 2; max-width: 620px; padding: 0 clamp(16px, 5vw, 64px) clamp(48px, 10vh, 110px); }
.kicker { font-family: var(--mono); font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; color: var(--red); margin: 0 0 1rem; }
.hero h1 { font-size: clamp(2.8rem, 7.4vw, 5.6rem); }
.go { color: #f2ead8; background: var(--red); padding: 0 .18em; display: inline-block; transform: rotate(-3deg); }
.lede { font-size: clamp(1.05rem, 2vw, 1.2rem); max-width: 50ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }
.btn { font-family: var(--mono); font-weight: 700; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: var(--ink);
  border: 2px solid var(--ink); padding: .9em 1.3em; border-radius: 2px; transition: background .2s, color .2s; box-shadow: 4px 4px 0 var(--ink); }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-hot { background: var(--red); color: #fff7ea; border-color: var(--ink); }
@media (max-width: 760px) {
  .hero { display: block; min-height: 0; padding-top: 56px; }
  .hero-fig { position: relative; top: 0; width: 140%; margin-left: -40%; }
  .hero-copy { padding-top: 8px; padding-bottom: 40px; }
}

.hs { position: absolute; width: 8%; aspect-ratio: 1; border-radius: 50%; border: 2px dashed transparent; background: transparent; transition: border-color .3s, background .3s; }
.hs:hover, .hs:focus-visible { border-color: var(--red); background: #c8321e1a; }
.hs.is-found { border-color: #1a171455; }
.hs-hang { left: 75%; top: 69%; width: 8%; } .hs-window { left: 85%; top: 43%; width: 5%; }
.hs-cat { left: 61%; top: 23%; width: 8%; } .hs-koi { left: 33%; top: 46%; width: 10%; } .hs-guard { left: 57%; top: 78%; width: 10%; } .hs-ladder { left: 9%; top: 48%; width: 9%; }

.scroll-brief { display: grid; place-items: center; }
.paper { position: relative; max-width: 680px; background: #fbf6ea; border: 2px solid var(--ink); padding: clamp(24px, 4vw, 44px); box-shadow: 8px 8px 0 var(--ink); }
.paper h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
.seal { position: absolute; top: -18px; right: -14px; margin: 0; width: 62px; height: 62px; display: grid; place-items: center; background: var(--red); color: #fff3e2;
  font-size: 1.9rem; border-radius: 6px; transform: rotate(8deg); box-shadow: 2px 2px 0 var(--ink); }
.sign { text-align: right; font-style: italic; opacity: .8; }

.game { background: var(--paper2); border-block: 2px solid var(--ink); }
.game-head { max-width: 860px; margin: 0 auto 1.4rem; text-align: center; }
kbd { font-family: var(--mono); font-size: .85em; border: 1px solid var(--ink); border-bottom-width: 2px; border-radius: 3px; padding: 0 .35em; background: #fbf6ea; }
.dojo-board { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .dojo-board { grid-template-columns: 1fr; } }
.board-frame { border: 2px solid var(--ink); background: #fbf6ea; box-shadow: 6px 6px 0 var(--ink); }
#courtyard { width: 100%; height: auto; aspect-ratio: 596 / 356; display: block; }
.board-msg { margin: 0; min-height: 3.2em; padding: 10px 14px; border-top: 2px solid var(--ink); font-family: var(--mono); font-size: .95rem; background: var(--ink); color: #f2ead8; }
.planner { background: #fbf6ea; border: 2px solid var(--ink); padding: 14px; box-shadow: 6px 6px 0 var(--ink); display: grid; gap: 12px; }
.timeline, .plan { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 8px; }
.lbl { font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.cells { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.cells span, .cells button { aspect-ratio: 1; display: grid; place-items: center; font-family: var(--mono); font-size: .95rem; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 0; min-width: 0; }
.cells span.g { background: #f7e5d9; color: var(--red); font-weight: 700; }
.cells span.g.now, .cells button.now { outline: 2px solid var(--red); outline-offset: -2px; }
.cells button { cursor: pointer; }
.cells button.cur { box-shadow: inset 3px 0 0 var(--red); }
.cells button.empty { color: #0002; }
.plan-name { font: inherit; font-family: var(--mono); font-size: .78rem; white-space: nowrap; text-transform: uppercase; letter-spacing: .06em; text-align: left; padding: .45em .5em; border: 2px solid transparent; background: none; cursor: pointer; color: var(--ink); }
.plan-name::before { content: ''; display: inline-block; width: .7em; height: .7em; border-radius: 50%; margin-right: .4em; background: var(--c, var(--red)); }
.plan.sel .plan-name { border-color: var(--ink); background: #fff; }
.plan.kage { --c: var(--red); } .plan.hoshi { --c: var(--teal); } .plan.bo { --c: var(--gold); }
.pad { display: flex; flex-wrap: wrap; gap: 6px; }
.pad button { font-family: var(--mono); font-size: 1.05rem; min-width: 48px; min-height: 44px; padding: .3em .7em; border: 2px solid var(--ink); background: #fff; cursor: pointer; color: var(--ink); }
.pad button:hover { background: var(--ink); color: var(--paper); }
.go-row { display: flex; gap: 10px; align-items: center; }
.go-btn { font-family: var(--brush); font-size: 1.8rem; padding: .15em 1.2em; background: var(--red); color: #fff7ea; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); cursor: pointer; }
.go-btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.go-btn[disabled] { opacity: .5; cursor: progress; }
.ghost { font-family: var(--mono); background: none; border: 0; text-decoration: underline; cursor: pointer; color: var(--ink); }

.map { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.map .reward, .map .journal { grid-column: 1 / -1; }
@media (max-width: 860px) { .map { grid-template-columns: 1fr; } }
.art { position: relative; margin: 0; border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.art img { width: 100%; height: auto; }
.features { padding-left: 1.1em; }
.features li { margin: .4em 0; }
.found { font-family: var(--mono); }
.reward { max-width: 720px; margin: 0 auto; padding: 1rem 1.2rem; border: 2px solid var(--red); background: #c8321e10; }
.journal { max-width: 760px; margin: 0 auto; }
.journal li { margin: .5em 0; }

.vote { text-align: center; max-width: 1000px; margin: 0 auto; }
.offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 1.4rem auto 0; }
.offers.small .offer { font-size: .95rem; padding: .8em; }
.offer { font: inherit; font-size: 1.05rem; font-weight: 700; color: var(--ink); background: #fbf6ea; border: 2px solid var(--ink); padding: 1.1em; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); transition: transform .15s, box-shadow .15s; }
.offer small { font-weight: 400; font-size: .85rem; }
.offer:hover, .offer:focus-visible { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--red); }

.join { display: grid; justify-items: center; text-align: center; background: var(--ink); color: var(--paper); }
.join .dw-optin { text-align: left; width: 100%; --dw-fg: #f2ead8; --dw-bg: #1a1714; }
.join .dw-optin button[type=submit] { background: var(--red); color: #fff7ea; }
.offer-note { margin: 0; color: #ffb39f; font-family: var(--mono); }

.foot { padding: 30px 16px 10px; text-align: center; border-top: 2px solid var(--ink); }
.more { font-family: var(--mono); font-size: .88rem; }
.glyph { font: inherit; background: none; border: 0; color: inherit; padding: 0 .3em; cursor: pointer; }
.glyph:hover, .glyph:focus-visible { color: var(--red); }
