:root{--bg:#1a140c;--bg2:#241b10;--ink:#2b2013;--paper:#ecdcb2;--paper2:#e3d0a0;--line:#b99d62;--gold:#d5a940;--gold-d:#7a4d14;--red:#a63d2f;--text:#efe3c7;--muted:#5a4a2e}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;min-height:100vh;display:flex;flex-direction:column;background:var(--bg);color:var(--text);font-family:Georgia,'Times New Roman',serif;line-height:1.5}
button{font:inherit;cursor:pointer}
button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid #f0c060;outline-offset:2px}
.skip-link{position:absolute;left:1rem;top:-5rem;z-index:30;background:#fff;color:#000;padding:.7rem 1rem}.skip-link:focus{top:1rem}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.8rem max(3vw,1rem);background:#100c07;border-bottom:1px solid #4a3a1e}
.brand{display:flex;gap:.8rem;align-items:center;text-decoration:none;color:var(--text);font-size:.78rem;letter-spacing:.14em;line-height:1.2}
.brand small{display:block;margin-top:.25rem;font-size:.6rem;letter-spacing:.2em;text-transform:uppercase;color:#bda77c}
.brand-mark{display:grid;place-items:center;width:2.3rem;height:2.3rem;border:1px solid var(--gold);color:var(--gold);font-size:1.4rem}
.top-actions{display:flex;align-items:center;gap:.7rem}
.home-link{color:#d9c79b;font-size:.78rem;letter-spacing:.1em;text-decoration:none;padding:.4rem .5rem}.home-link:hover{color:var(--gold)}
main{flex:1;width:100%;max-width:1280px;margin:0 auto;padding:1.2rem max(3vw,1rem) 2rem}
h1,h2,h3{font-weight:400;line-height:1.15;margin:0 0 .6rem}h1{font-size:clamp(2.2rem,5vw,4.2rem)}h2{font-size:clamp(1.4rem,2.5vw,2rem)}h3{font-size:1rem;letter-spacing:.12em;text-transform:uppercase;color:var(--gold-d);margin-top:1.1rem}
p{margin:0 0 .8rem}
.eyebrow{margin:0 0 .8rem;color:var(--gold);font-size:.72rem;font-weight:700;letter-spacing:.23em;text-transform:uppercase;font-family:Arial,Helvetica,sans-serif}
.muted{color:var(--muted)}.fine{font-size:.8rem;color:#b8a57d;margin-top:1.4rem}
.btn{border:1px solid var(--gold);background:transparent;color:var(--ink);padding:.6rem 1rem;font-size:.82rem;letter-spacing:.04em;border-radius:3px;font-family:Arial,Helvetica,sans-serif;font-weight:700;transition:background .15s}
.btn:hover:not(:disabled){background:#f6e7bd}.btn:disabled{opacity:.45;cursor:not-allowed}
.btn.primary{background:var(--gold-d);border-color:var(--gold-d);color:#fff6dd}.btn.primary:hover:not(:disabled){background:#6a410e}
.title-screen .btn,.topbar .btn{color:var(--text)}.title-screen .btn.primary{color:#fff6dd}.title-screen .btn:hover:not(:disabled),.topbar .btn:hover:not(:disabled){background:#3a2c16}.title-screen .btn.primary:hover:not(:disabled){background:#6a410e}
.btn.small{padding:.35rem .7rem;font-size:.72rem}.btn.ghost{border-color:#6c5a36}
.actions{display:flex;flex-wrap:wrap;gap:.7rem;margin-top:1rem}
.title-screen{max-width:760px;margin:6vh auto 0;text-align:center}.title-screen .compass{width:96px;color:var(--gold);margin-bottom:1rem}
.title-screen .lead{font-size:1.1rem;color:#d6c8a3;line-height:1.75}.title-screen .actions{justify-content:center;margin-top:1.6rem}
.title-screen.end .kv,.title-screen .note{text-align:left}
.note{background:var(--paper);color:var(--ink);padding:1rem 1.2rem;border-radius:4px;margin-top:1.4rem}.note h3{margin-top:0}
.panel{background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:4px;padding:1rem 1.2rem}
.port{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:1rem;align-items:start}
.capbar{height:10px;background:#cdb985;border-radius:5px;overflow:hidden}.capbar span{display:block;height:100%;background:var(--gold-d)}
.capnote{font-size:.85rem;margin:.35rem 0 .8rem}
.shop{width:100%;border-collapse:collapse;font-size:.9rem}.shop th,.shop td{padding:.4rem .4rem;border-bottom:1px solid #c9b57d;text-align:left}.shop thead th{font-size:.7rem;letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.shop th small{display:block;font-weight:400;font-size:.72rem;color:var(--muted)}.shop .num{font-weight:700;text-align:center}.steps{white-space:nowrap}
.mini{min-width:2.4rem;padding:.35rem .4rem;border:1px solid var(--gold-d);background:#f3e6c0;color:var(--ink);border-radius:3px;font-family:Arial,sans-serif;font-weight:700;font-size:.78rem}.mini:hover{background:#fff3cf}
.problems{margin:.8rem 0 0;padding-left:1.1rem;color:var(--red);font-size:.85rem}
.kv{display:grid;grid-template-columns:1fr auto;gap:.25rem .8rem;margin:0}.kv dt{color:var(--muted);font-size:.85rem}.kv dd{margin:0;font-weight:700;text-align:right}.kv.big{max-width:520px;margin:1.2rem auto;color:var(--ink);background:var(--paper);padding:1rem 1.2rem;border-radius:4px}
.warn{color:var(--red)}
.rep{display:grid;grid-template-columns:90px 1fr;gap:.6rem;align-items:center;font-size:.85rem;margin-bottom:.3rem}.bar{height:8px;background:#cdb985;border-radius:4px;overflow:hidden}.bar i{display:block;height:100%;background:var(--gold-d)}
.log{list-style:none;margin:0;font-size:.85rem}.log li{padding:.3rem 0;border-bottom:1px dotted #c9b57d}.log li:first-child{font-weight:700}
.land{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:1rem;align-items:start}
.map-wrap canvas{display:block;width:100%;height:auto;aspect-ratio:25/17;border:3px solid #4a3a1e;border-radius:3px;background:#17110a;image-rendering:auto}
.hint{font-size:.78rem;color:#b8a57d;margin:.5rem 0 0}
.pad{display:none;grid-template-columns:repeat(4,1fr);gap:.5rem;margin-top:.7rem}.pad button{padding:.9rem;font-size:1.2rem;border:1px solid var(--gold-d);background:var(--paper);color:var(--ink);border-radius:4px}
.side{display:grid;gap:.8rem}.side .panel{padding:.8rem 1rem}.side h3{margin-top:0}#actions{display:grid;gap:.5rem}
dialog{width:min(640px,calc(100vw - 2rem));max-height:calc(100vh - 2rem);overflow:auto;background:var(--paper);color:var(--ink);border:2px solid var(--gold-d);border-radius:6px;padding:1.3rem 1.5rem}
dialog::backdrop{background:rgba(10,7,3,.72)}
dialog h3{margin-top:1rem}
dialog .grid{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}
dialog .grid .btn{text-align:left}
dialog canvas{width:100%;height:auto;display:block;border:2px solid #4a3a1e}
.face{font-size:.95rem}.reaction{background:#f4e9c8;border-left:4px solid var(--gold-d);padding:.6rem .8rem;border-radius:0 3px 3px 0}
.seolog{padding-left:1.1rem}.seolog li{margin-bottom:.4rem}
.site-footer{padding:1rem max(3vw,1rem);border-top:1px solid #3a2e19;font-size:.7rem;letter-spacing:.1em;color:#8f7f5c;text-transform:uppercase}
.noscript{text-align:center;padding:2rem}
@media(max-width:900px){.port,.land{grid-template-columns:1fr}.pad{display:grid}.shop th small{display:none}}
@media(max-width:560px){.brand small{display:none}dialog .grid{grid-template-columns:1fr}.shop{font-size:.8rem}.mini{min-width:2rem}.topbar{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
.tribe-note{font-size:.78rem;color:var(--muted);margin:-.2rem 0 .5rem}
.order{border:1px solid var(--line);background:#f4e9c8;border-radius:4px;padding:.7rem .9rem;margin-bottom:.6rem}.order p{margin:0 0 .4rem}.order .eyebrow{margin-bottom:.3rem;color:var(--gold-d)}
.favor{display:flex;gap:1.4rem;flex-wrap:wrap;margin-bottom:.4rem}

.coach{background:#fff4cf;color:var(--ink);border:2px solid var(--gold);border-radius:6px;padding:.8rem 1rem;margin:0 0 1rem}
.coach h3{margin:0 0 .3rem;color:var(--ink);letter-spacing:.02em;text-transform:none;font-size:1.05rem}.coach p{margin:0 0 .5rem}.coach .eyebrow{color:var(--gold-d);margin-bottom:.2rem}.coach .actions{margin-top:.4rem}
.coach .btn{color:var(--ink)}.coach .btn.primary{color:#fff6dd}
dialog .coach{margin-top:.6rem}
.tut-glow{outline:3px solid #f0c060;outline-offset:3px;animation:tutpulse 1.6s ease-in-out infinite}
@keyframes tutpulse{50%{outline-color:#fff3cf}}
@media(prefers-reduced-motion:reduce){.tut-glow{animation:none}}

/* ---------- Optik 2: Pergament, Rahmen, Bewegung ---------- */
:root{--noise:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .1 0 0 0 .1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>")}
body{font-family:'Palatino Linotype','Book Antiqua',Palatino,Georgia,serif;background:radial-gradient(1200px 700px at 50% -10%,#3a2a16 0,#1a140c 60%,#120d07 100%) fixed}
.panel,dialog{background:var(--noise),linear-gradient(180deg,#f2e4bb,#e5d3a2);box-shadow:inset 0 0 0 3px rgba(255,248,220,.5),inset 0 0 0 4px rgba(138,90,30,.35),0 6px 18px rgba(0,0,0,.4)}
.btn{background:linear-gradient(#f8edcb,#e9d6a0);box-shadow:inset 0 1px 0 rgba(255,255,255,.6),0 2px 4px rgba(0,0,0,.25);transition:background .15s,transform .1s,box-shadow .15s}
.btn:active:not(:disabled){transform:translateY(1px);box-shadow:inset 0 1px 3px rgba(0,0,0,.3)}
.btn.primary{background:linear-gradient(#9a6420,#7a4d14);border-color:#5e3a0a}.btn.primary:hover:not(:disabled){background:linear-gradient(#8a5818,#6a410e)}
.title-screen .btn,.topbar .btn{background:rgba(255,240,200,.06);box-shadow:none}.title-screen .btn.primary{background:linear-gradient(#9a6420,#7a4d14)}
.topbar .btn[aria-pressed=true]{border-color:#d5a940;background:rgba(213,169,64,.16)}.top-actions{flex-wrap:wrap;justify-content:flex-end}
.mini{background:linear-gradient(#f8edcb,#ead8a4)}
.bar i{background:linear-gradient(90deg,#8a5a1e,#d5a940)}.capbar span{background:linear-gradient(90deg,#8a5a1e,#d5a940)}
.shop tbody tr{transition:background .15s}.shop tbody tr:hover{background:rgba(213,169,64,.14)}
h1,h2,h3{font-family:'Palatino Linotype','Book Antiqua',Palatino,Georgia,serif}
.title-screen h1{background:linear-gradient(#fff0b8,#d5a940 70%,#a87a22);-webkit-background-clip:text;background-clip:text;color:transparent;letter-spacing:.02em;filter:drop-shadow(0 2px 6px rgba(0,0,0,.5))}
.title-art{display:block;width:100%;height:clamp(150px,28vw,270px);border:2px solid #4a3a1e;border-radius:6px;margin-bottom:1.4rem;box-shadow:0 10px 30px rgba(0,0,0,.5)}
.title-screen{margin-top:3vh}
.banner{display:block;width:calc(100% + 2.4rem);height:150px;margin:-1rem -1.2rem 1rem;border-radius:3px 3px 0 0;border-bottom:2px solid rgba(138,90,30,.5)}
dialog .village-art,dialog .sea-scene{display:block;width:calc(100% + 3rem);margin:-1.3rem -1.5rem .9rem;height:120px;border-bottom:2px solid rgba(138,90,30,.5)}dialog .sea-scene{height:150px}
dialog[open]{animation:dlgIn .22s ease-out}@keyframes dlgIn{from{opacity:0;transform:translateY(10px) scale(.985)}}
dialog::backdrop{background:rgba(10,7,3,.72);backdrop-filter:blur(2px)}
.w1{animation:driftA 7s ease-in-out infinite alternate}.w2{animation:driftB 6s ease-in-out infinite alternate}.w3{animation:driftA 5s ease-in-out infinite alternate}
@keyframes driftA{from{transform:translateX(-26px)}to{transform:translateX(26px)}}@keyframes driftB{from{transform:translateX(24px)}to{transform:translateX(-24px)}}
.bob{animation:bob 3.4s ease-in-out infinite;transform-box:fill-box;transform-origin:center}@keyframes bob{0%,100%{transform:translateY(0) rotate(-1.5deg)}50%{transform:translateY(-5px) rotate(1.5deg)}}
.map-frame{position:relative;padding:7px;border:3px solid #4a3a1e;border-radius:5px;background:linear-gradient(#7a5a2c,#4a3318);box-shadow:0 10px 28px rgba(0,0,0,.55),inset 0 0 0 1px #d2ab55}
.map-frame::before,.map-frame::after{content:'';position:absolute;width:26px;height:26px;border:3px solid #e0b95c;pointer-events:none}
.map-frame::before{left:-6px;top:-6px;border-right:0;border-bottom:0;border-radius:6px 0 0 0}.map-frame::after{right:-6px;bottom:-6px;border-left:0;border-top:0;border-radius:0 0 6px 0}
.map-wrap .map-frame canvas{border:2px solid #2b1d0e;border-radius:2px;aspect-ratio:25/17}
@media(prefers-reduced-motion:reduce){.w1,.w2,.w3,.bob,dialog[open]{animation:none}}
@media(max-width:560px){.banner{height:110px}.title-art{height:150px}}

/* ---------- Barrierefreiheit ---------- */
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
.map-frame:focus-visible{outline:4px solid #f0c060;outline-offset:4px}
.caption{margin:.55rem 0 0;font-size:.9rem;color:#d6c8a3}
html.size-1{font-size:112.5%}html.size-2{font-size:125%}
.table-scroll{overflow-x:auto;margin:.6rem 0}
table.places{width:100%;border-collapse:collapse;font-size:.85rem}
table.places caption{text-align:left;font-weight:700;padding:.3rem 0;color:var(--gold-d)}
table.places th,table.places td{padding:.35rem .5rem;border-bottom:1px solid #c9b57d;text-align:left;vertical-align:top}
table.places thead th{font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
table.places tbody tr[data-place]{cursor:pointer}table.places tbody tr[data-place]:hover,table.places tbody tr.sel{background:rgba(213,169,64,.22)}
table.places tbody tr.sel th{text-decoration:underline}
.ov-tip{position:fixed;z-index:10;pointer-events:none;background:#17110a;color:#f3e3b0;padding:.25rem .5rem;border-radius:4px;font-size:.85rem;border:1px solid #d5a940}
.ov-tip[hidden]{display:none}
.ov-sel{margin:.4rem 0;min-height:1.2rem}.ov-sel .btn{margin-left:.5rem}
@media(pointer:coarse){.btn,.mini{min-height:44px}.mini{min-width:44px}.pad button{min-height:56px}}
@media(forced-colors:active){.btn,.mini,.pad button{border:2px solid ButtonText}.tut-glow,.map-frame:focus-visible{outline:3px solid Highlight}.bar i,.capbar span{background:Highlight}}

/* Hoher Kontrast: schwarz auf hell, kräftige Rahmen, keine Texturen */
body.hc{--ink:#000;--paper:#fffdf0;--paper2:#fffdf0;--muted:#2b2210;--gold-d:#4a2c05;--text:#fff;--bg:#000;background:#000}
body.hc .panel,body.hc dialog{background:#fffdf0;box-shadow:none;border:3px solid #000}
body.hc .btn,body.hc .mini,body.hc .pad button{background:#fff;color:#000;border:2px solid #000;box-shadow:none}
body.hc .btn.primary{background:#000;color:#fff;border-color:#000}
body.hc .title-screen .btn,body.hc .topbar .btn{background:#000;color:#fff;border:2px solid #fff}
body.hc .title-screen .btn.primary{background:#fff;color:#000}
body.hc .coach{background:#fff;border:3px solid #000;color:#000}body.hc .coach .btn.primary{background:#000;color:#fff}
body.hc .reaction,body.hc .order{background:#fff;border-color:#000}
body.hc .bar,body.hc .capbar{background:#ddd;border:1px solid #000}body.hc .bar i,body.hc .capbar span{background:#000}
body.hc .caption,body.hc .hint,body.hc .fine{color:#fff}
body.hc :focus-visible{outline:4px solid #ffe100;outline-offset:3px;box-shadow:0 0 0 2px #000}
body.hc .map-frame{background:#000;border-color:#fff}
body.hc .title-screen h1{background:none;-webkit-background-clip:border-box;color:#fff;filter:none}
body.hc table.places th,body.hc table.places td{border-bottom:1px solid #000}

/* ---------- Chronik ---------- */
ul.chron{margin:.3rem 0 .8rem;padding-left:1.1rem}ul.chron li{margin-bottom:.45rem}dialog h3 small{font-size:.75rem;letter-spacing:.04em;text-transform:none;color:var(--muted);font-weight:400}

/* ---------- Handy ---------- */
.menu-toggle{display:none}
@media(max-width:900px){.port,.land{grid-template-columns:minmax(0,1fr)}}
@media(max-width:640px){
  main{padding:.8rem .75rem 1.5rem}
  .topbar{flex-wrap:wrap;padding:.6rem .75rem;gap:.5rem}
  .menu-toggle{display:inline-flex;min-height:44px;margin-left:auto}
  .top-actions{display:none;width:100%;flex-basis:100%;gap:.5rem}
  .top-actions.open{display:flex}
  .top-actions .btn,.top-actions .home-link{flex:1 1 calc(50% - .5rem);min-height:44px;display:inline-flex;align-items:center;justify-content:center}
  .brand strong{font-size:.68rem;letter-spacing:.1em}
  h1{font-size:2rem}.title-screen .lead{font-size:1rem;line-height:1.6}
  .panel{padding:.8rem .85rem}.banner{width:calc(100% + 1.7rem);margin:-.8rem -.85rem .8rem;height:100px}
  .actions .btn{flex:1 1 100%;min-height:44px}
  /* Einkaufstabelle: pro Posten eine Karte */
  .shop,.shop tbody,.shop tr,.shop th,.shop td{display:block}
  .shop thead{position:absolute;left:-9999px}
  .shop tr{display:grid;grid-template-columns:1fr auto;grid-template-areas:'name have' 'price have' 'steps steps';gap:.05rem .6rem;padding:.55rem 0;border-bottom:1px solid #c9b57d}
  .shop th{grid-area:name;border:0;padding:0}.shop th small{display:inline;margin-left:.4rem}
  .shop td.price{grid-area:price;border:0;padding:0;font-size:.8rem;color:var(--muted)}
  .shop td.num{grid-area:have;border:0;padding:0;font-size:1.4rem;align-self:center}
  .shop td.steps{grid-area:steps;display:flex;gap:.4rem;border:0;padding:.35rem 0 0}.shop td.steps .mini{flex:1;min-height:44px}
  .map-frame{padding:4px}.map-frame::before,.map-frame::after{display:none}
  .hint{font-size:.75rem}.caption{font-size:.82rem}
  .pad button{min-height:60px;font-size:1.4rem}
  .kv{font-size:.9rem}
  dialog{width:calc(100vw - 1rem);max-height:calc(100dvh - 1rem);padding:1rem 1rem}
  dialog .village-art,dialog .sea-scene{width:calc(100% + 2rem);margin:-1rem -1rem .8rem}
  dialog .grid{grid-template-columns:1fr}dialog .grid .btn{min-height:46px}
  .order .btn{width:100%}
  table.places{font-size:.78rem}
  .title-art{height:130px}
}

@media(max-width:640px){
  .menu-toggle{align-items:center;justify-content:center;line-height:1}
  /* Aktionen direkt unter die Steuerung, Zustand danach */
  .side{display:flex;flex-direction:column}.side #actions{order:-1}
  #actions{grid-template-columns:1fr 1fr;gap:.5rem}#actions .btn{min-height:46px;padding:.5rem .4rem;font-size:.78rem}
  #actions [data-act=autoHome],#actions [data-act=homeward],#actions [data-act=enterVillage]{grid-column:1/-1}
  .coach{padding:.7rem .8rem}.coach p{font-size:.92rem}.coach .actions{flex-wrap:nowrap}.coach .actions .btn{flex:1 1 0;min-height:44px;font-size:.78rem}
}
@media(pointer:coarse){.hint{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}}

@media(max-width:640px){
  #actions [data-act=hunt]{grid-column:1/-1}
  dialog .village-art{height:84px}dialog .sea-scene{height:110px}
  dialog h2{font-size:1.35rem}dialog .grid{gap:.4rem}dialog .grid .btn{font-size:.82rem;min-height:44px;padding:.45rem .6rem}
  dialog .reaction{font-size:.92rem}
}

/* Querformat auf dem Handy: wenig Höhe, daher Menü eingeklappt, Karte und Seitenleiste nebeneinander */
@media(max-height:520px) and (min-width:641px){
  .menu-toggle{display:inline-flex;align-items:center;justify-content:center;min-height:44px;margin-left:auto}
  .topbar{flex-wrap:wrap;padding:.4rem .9rem}.brand small{display:none}
  .top-actions{display:none;width:100%;flex-basis:100%}.top-actions.open{display:flex}
  .top-actions .btn,.top-actions .home-link{min-height:44px;display:inline-flex;align-items:center}
  main{padding:.6rem .9rem 1rem}
  .land{grid-template-columns:minmax(0,1fr) 250px}
  .pad{margin-top:.3rem;gap:.4rem}.pad button{min-height:44px;padding:.3rem}
  .caption{margin:.3rem 0 0;font-size:.8rem}
  .map-frame{padding:4px}
  dialog{max-height:calc(100dvh - .8rem)}
  dialog .village-art,dialog .sea-scene{height:70px}
}

/* ---------- Antippen und Wischen ---------- */
#map{cursor:pointer;touch-action:none;-webkit-tap-highlight-color:transparent;user-select:none}
.hint-touch{display:none;margin:.4rem 0 0;font-size:.82rem;color:#d6c8a3}
@media(pointer:coarse){.hint-touch{display:block}}

ul.chron li.chap{list-style:none;margin:.6rem 0 .2rem -1.1rem;font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;color:var(--gold-d);font-weight:700}
