:root{color-scheme:light;--page:#f5f4e9;--ink:#173629;--leaf:#1f4d39;--pine:#173d2f;--lime:#dcf397;--muted:#4e6357;--line:#ccd2be;--white:#fffef7}
*{box-sizing:border-box}
body{margin:0;background:var(--page);color:var(--ink);font:1rem/1.5 system-ui,-apple-system,sans-serif}
button,input,textarea,select{font:inherit}
button{min-height:44px;padding:.65rem 1.05rem;border:1px solid transparent;border-radius:12px;background:var(--lime);color:var(--ink);font-weight:750;cursor:pointer}
button:hover{filter:brightness(.94)}
button:disabled{opacity:.5;cursor:default}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #a35500;outline-offset:3px}
.secondary{background:var(--white);border-color:var(--line)}
.text-button{background:transparent;text-decoration:underline;text-underline-offset:.18em;padding-inline:.45rem}
.masthead,main{width:min(100% - 2rem, 880px);margin-inline:auto}
.masthead{display:flex;align-items:center;min-height:75px}
.brand{display:flex;align-items:center;gap:.65rem;padding:.15rem;background:none;font-size:1.22rem;letter-spacing:-.045em}
.brand img{border-radius:11px}
main{padding-bottom:4rem}
h1,h2,p{margin-top:0}
h1,h2{line-height:1.02;letter-spacing:-.052em}
h1{font-size:clamp(2.25rem,6vw,4rem);margin-bottom:1.1rem}
h2{font-size:1.6rem}
.hero{display:grid;grid-template-columns:1.15fr .85fr;min-height:370px;background:var(--pine);color:var(--white);border-radius:26px;overflow:hidden}
.hero-copy{z-index:1;padding:clamp(1.5rem,5vw,3.5rem)}
.hero h1{font-size:clamp(3.5rem,9vw,6rem);letter-spacing:-.08em}
.hero p{color:#e1eadd;max-width:23rem;font-size:1.08rem}
.actions{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center}
.hero .secondary{color:var(--white);background:transparent;border-color:#a2beaa}
.hero-art{position:relative;isolation:isolate;min-height:205px;overflow:hidden;background:#24543d}
.contours{position:absolute;inset:-25%;transform:rotate(-24deg);background:repeating-radial-gradient(ellipse at 32% 33%,transparent 0 16px,#bedc9e34 17px 18px,transparent 19px 27px)}
.compass{position:absolute;inset:16% auto auto 18%;width:130px;aspect-ratio:1;border:1px solid #d9ebc8;background:#183d30;border-radius:50%;text-align:center;box-shadow:0 0 0 7px #e3ffce26;display:grid;place-items:center;color:#e6f2cf}
.compass span{position:absolute;top:7%;font:750 .8rem/1 system-ui}
.compass b{width:37%;height:68%;background:linear-gradient(#ddf59f 50%,#e7a875 50%);clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%);transform:rotate(27deg)}
.trail{position:absolute;width:55%;height:57%;left:26%;top:26%;border-right:3px dashed #ebf4cf99;border-bottom:3px dashed #ebf4cf99;border-radius:48%;transform:rotate(24deg)}
.treasure-x{position:absolute;right:18%;bottom:13%;width:64px;height:64px;display:grid;place-items:center;border-radius:50%;transform:rotate(-13deg);background:#f0ad77;color:#28372a;font-size:3.7rem;font-weight:800;line-height:1}
.panel,.station,#draft{background:var(--white);border:1px solid var(--line);border-radius:20px;padding:clamp(1rem,4vw,2rem)}
.panel{max-width:650px}
.heading{display:flex;align-items:center;flex-wrap:wrap;gap:1rem;justify-content:space-between;margin:.65rem 0 1rem}
.heading h1{margin:0}
label{display:block;font-weight:700;margin-bottom:.8rem}
input,textarea,select{display:block;width:100%;margin-top:.3rem;padding:.62rem .7rem;color:var(--ink);background:#fff;border:1px solid #aab8a8;border-radius:9px}
textarea{resize:vertical}
.select-label{margin:0}
.select-label span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.select-label select{margin:0;min-height:44px}
.station{margin:1rem 0;min-width:0;background:#f5f6eb;padding-top:.8rem}
.station legend{font-weight:800;padding:0 .4rem}
.station-actions,.suggest{display:flex;gap:.55rem;flex-wrap:wrap;align-items:center}
.suggest{margin-bottom:.8rem}
.editor-actions{margin-top:1.15rem}
#resume{margin-top:1.2rem}
.setup ol{padding-left:1.3rem}
.setup details{margin-top:1rem}
summary{font-weight:700;cursor:pointer;width:fit-content}
details p{margin:.4rem 0}
.sheet{margin-top:1.5rem}
#cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:.75rem}
.card{background:#fffef8;border:1px solid var(--line);border-radius:14px;padding:.8rem;text-align:center;break-inside:avoid}
.card h3,.card p{margin:0}
.card canvas{display:block;margin:.25rem auto;width:min(100%,136px);height:auto;image-rendering:pixelated}
.card strong{font-size:1.5rem;letter-spacing:.18em;font-variant-numeric:tabular-nums}
.place{font-size:.85rem;overflow-wrap:anywhere}
.play{background:#edf3dc}
.hunt-title{font-weight:750;color:var(--muted);margin-bottom:.6rem;overflow-wrap:anywhere}
progress{accent-color:var(--leaf);display:block;width:100%;height:12px}
.clue{font-size:clamp(1.6rem,4.5vw,2.05rem);font-weight:700;line-height:1.22;letter-spacing:-.035em;white-space:pre-wrap;overflow-wrap:anywhere;margin:1.45rem 0}
#unlock{display:flex;align-items:end;gap:.6rem;flex-wrap:wrap;margin-top:1.2rem}
#unlock label{margin:0}
#unlock input{max-width:15rem;letter-spacing:.28em}
.small{font-size:.9rem;color:var(--muted);margin:1rem 0 0}
#play-feedback{color:#9e361c;font-weight:700;margin-top:.6rem}
#notice{position:fixed;z-index:5;bottom:1rem;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 2rem);padding:.75rem 1rem;background:var(--pine);border-radius:12px;color:white;box-shadow:0 4px 20px #152f2450}
#notice:empty,[hidden]{display:none!important}
@media(max-width:610px){
  .hero{grid-template-columns:1fr}
  .hero-art{min-height:180px}
  .compass{width:105px;top:12%}
  .treasure-x{bottom:14%}
}
@media print{
  @page{margin:13mm}
  body{background:white;color:black}
  .masthead,.setup,#notice,.place{display:none!important}
  main{margin:0;width:100%;padding:0}
  .sheet{margin:0}
  #cards{grid-template-columns:repeat(3,1fr)}
  .card{border:1px dashed #777;border-radius:0;background:white}
  .card canvas{width:35mm}
}
