:root { color-scheme: dark; --ink: #e4e6d9; --muted: #b6bfaa; --gold: #c4ab70; --border: #556148; --panel: #272d25; --inset: #1f261d; --game-action: #ff995c; --game-movement: #69dbef; }
* { box-sizing: border-box; }
body { margin: 0; background: #172015; color: var(--ink); font: 13px/1.5 system-ui, sans-serif; }
button { font: inherit; cursor: pointer; }
button:focus-visible { outline: 3px solid #ecd79d; outline-offset: 3px; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
.demo { height: 100dvh; min-height: 440px; display: flex; flex-direction: column; }
.demo-header { display: flex; align-items: center; gap: 16px; padding: 14px 16px; background: #111610; border-bottom: 1px solid var(--border); }
.demo-brand { display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .1em; font-weight: 700; margin-right: auto; }
.demo-brand small { display: block; color: var(--muted); font-size: 9px; font-weight: 400; margin-top: 2px; letter-spacing: 0; }
.demo-points { display: flex; gap: 14px; font-size: 10px; white-space: nowrap; color: var(--muted); }
.demo-points strong { display: block; font-size: 14px; color: var(--gold); font-variant-numeric: tabular-nums; }
.demo-points [data-demo-pa] { color: var(--game-action); }
.demo-points [data-demo-pm] { color: var(--game-movement); }
.demo-reset { padding: 9px 10px; min-height: 36px; border: 1px solid var(--border); background: #1f261d; color: var(--muted); font-size: 10px; }
.demo-reset:hover { background: var(--panel); color: var(--ink); }
.demo-objective { display: flex; align-items: center; gap: 8px; padding: 9px 16px; color: var(--gold); background: #1d281a; border-bottom: 1px solid #3d4934; font-size: 11px; }
.demo-objective__light { flex: 0 0 5px; width: 5px; height: 5px; background: var(--gold); border-radius: 50%; box-shadow: 0 0 9px #c4ab7066; }
.demo-step { margin-left: auto; font-size: 9px; color: var(--muted); }
.demo-layout { display: grid; grid-template-columns: minmax(0, 1fr) 190px; min-height: 0; flex: 1; }
.demo-map { position: relative; overflow: hidden; min-height: 0; background: radial-gradient(ellipse at 50% 50%, #6a733b38, #162013 78%); isolation: isolate; }
.demo-map::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 40px 12px #1116106b; pointer-events: none; z-index: 100; }
.demo-world { position: absolute; left: 50%; top: 50%; width: 1000px; height: 850px; transform: translate(-50%, -50%) scale(var(--demo-scale, .4)); }
.demo-tile { pointer-events: none; position: absolute; width: 200px; height: 300px; }
.demo-tile__terrain, .demo-tile__prop { position: absolute; left: 0; top: 0; width: 200px; height: 300px; pointer-events: none; }
.demo-tile__terrain { z-index: 0; filter: brightness(.8) saturate(.8); }
.demo-tile.is-fogged .demo-tile__terrain { z-index: 0; filter: brightness(.18) saturate(.35); }
.demo-tile.is-current .demo-tile__terrain { z-index: 0; filter: drop-shadow(0 0 7px #e5ca6a) brightness(1); }
.demo-tile.is-adjacent .demo-tile__terrain { z-index: 0; filter: brightness(1) saturate(.9); }
.demo-tile__hit { z-index: 2; pointer-events: auto; position: absolute; top: 100px; left: 0; width: 200px; height: 200px; border: 0; background: transparent; clip-path: polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%); color: #191f17; }
.demo-tile__hit span { display: none; position: absolute; top: 92px; left: 56px; padding: 5px 8px; background: var(--game-movement); color: #191f17; font-size: 24px; font-weight: 700; white-space: nowrap; }
.demo-tile__hit:hover:not(:disabled), .demo-tile__hit:focus-visible { background: #69dbef30; outline: none; }
.demo-tile__hit:hover:not(:disabled) span, .demo-tile__hit:focus-visible span { display: block; }
.demo-tile__prop { z-index: 1; }
.demo-cache { filter: drop-shadow(0 0 5px #f7d16a); }
.demo-map-label { position: absolute; z-index: 80; display: block; transform: translateX(-50%); padding: 7px 13px; background: #111b0eec; border: 1px solid var(--border); color: var(--gold); font-size: 21px; pointer-events: none; white-space: nowrap; }
.demo-map-label--camp { font-size: 18px; }
.demo-map-label--objective { background: #c4ab70; color: #191f17; font-weight: 700; }
.demo-player { position: absolute; z-index: 81; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; transform: translate(-50%,-50%); border: 3px solid #ead699; background: #263023; box-shadow: 0 0 22px #d6bd6c; pointer-events: none; }
.demo-map-caption { position: absolute; z-index: 101; bottom: 12px; left: 14px; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: #a5b292; pointer-events: none; }
.demo-panel { padding: 18px 14px; border-left: 1px solid var(--border); background: #172015; overflow-y: auto; scrollbar-width: thin; }
.demo-kicker { display: block; color: var(--muted); text-transform: uppercase; font-size: 9px; letter-spacing: .1em; margin-bottom: 8px; }
.demo-location h1 { color: var(--ink); font-size: 15px; line-height: 1.4; margin: 0 0 6px; }
.demo-location > span:last-child { font: 10px monospace; color: var(--muted); }
.demo-description { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 14px 0; }
.demo-actions { display: grid; gap: 8px; }
.demo-actions button { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; padding: 10px; border: 1px solid var(--gold); background: var(--gold); color: #191f17; text-align: left; font-size: 11px; line-height: 1.5; font-weight: 700; }
.demo-actions button b { flex: 0 0 auto; font-size: 9px; white-space: nowrap; }
.demo-actions button:hover:not(:disabled) { background: #dcc58b; }
.demo-actions button:disabled { opacity: .45; }
.demo-inventory { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 18px; }
.demo-slots { display: flex; gap: 6px; flex-wrap: wrap; }
.demo-slots > span { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--border); background: #111610; }
.demo-slots b { position: absolute; right: -3px; bottom: -4px; border-radius: 50%; background: var(--gold); padding: 1px 4px; color: #191f17; font-size: 9px; }
.demo-xp { color: var(--gold); display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 700; }
.demo-feedback { color: var(--muted); font-size: 11px; line-height: 1.7; border-left: 2px solid var(--border); padding-left: 10px; margin: 20px 0 0; }
.demo-feedback[data-tone='error'] { color: #f0a18e; border-color: #f0a18e; }
.demo-noscript { padding: 14px; font-size: 12px; }
@media (max-width: 579px) {
    .demo-header { gap: 10px; padding: 12px; }
    .demo-brand { font-size: 10px; gap: 7px; }
    .demo-brand > img { width: 20px; height: 20px; }
    .demo-points { gap: 9px; }
    .demo-reset { padding-inline: 7px; }
    .demo-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(260px, 1fr) auto; }
    .demo-panel { padding: 12px; border-left: 0; border-top: 1px solid var(--border); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; max-height: 230px; }
    .demo-location { grid-column: 1; }
    .demo-location h1 { font-size: 13px; }
    .demo-location > .demo-kicker { display: none; }
    .demo-description { display: none; }
    .demo-actions { grid-column: 1; }
    .demo-inventory { grid-column: 2; grid-row: 1 / 3; border: 0; padding: 0; margin: 0; max-width: 90px; }
    .demo-inventory .demo-kicker { font-size: 8px; }
    .demo-slots { gap: 5px; }
    .demo-slots > span { width: 32px; height: 32px; }
    .demo-slots img { width: 24px; height: 24px; }
    .demo-feedback { grid-column: 1 / -1; margin: 2px 0 0; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
