:root{color-scheme:dark}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:#07140d url('dragon-scales-green.png') repeat;color:#f7ecd0;font:16px Georgia,serif}main{width:min(94vw,900px);margin:3rem auto;text-align:center}.panel{position:relative;padding:1.5rem;background:#583319 url('wood-panel.svg') center/cover;border:8px solid #241105;border-radius:18px;box-shadow:0 12px 36px #0009}input,select,button{margin:.35rem;padding:.65rem;border-radius:6px;border:1px solid #241105}button{background:#e3bd7c;color:#251304;font-weight:bold;cursor:pointer}button:hover{background:#f7daa4}button:disabled,button[disabled],.used-item{background:#4b4032!important;color:#978b78!important;cursor:not-allowed;filter:brightness(.65);opacity:.6;pointer-events:none}#error,#game-error,#town-notice{color:#ffd0d0;min-height:1.2em}#rooms,#lobby-players,#movement-players{line-height:1.65;margin:1rem 0}.room{padding:.75rem;border-bottom:1px solid #b98857}.room button{float:right;margin:0}.player{font-weight:bold}.movement-layout{display:grid;grid-template-columns:minmax(280px,1fr) minmax(300px,430px);gap:1.25rem;align-items:start;text-align:left}.movement-info{min-width:0}.move-button{font-size:1.05rem;padding:.7rem 1.1rem}.move-button img{width:28px;height:28px;vertical-align:middle;margin-right:.45rem}.move-button.walking{-webkit-animation:walk .25s ease-in-out 8!important;animation:walk .25s ease-in-out 8!important;will-change:transform}@-webkit-keyframes walk{0%,100%{-webkit-transform:translateY(0)}50%{-webkit-transform:translateY(-10px)}}@keyframes walk{0%,100%{transform:translateY(0)}50%{transform:translateY(-10px)}}#movement-result{font-size:1.35rem;font-weight:bold;min-height:1.6em}#movement-result img{height:1em;width:1em;vertical-align:-.12em;margin-left:.15em}#usable-gear{margin:.5rem 0}.story{margin-top:1.25rem;padding:1rem;background:#24110599;border-radius:8px;text-align:left}#inventory-card{position:relative;width:100%;aspect-ratio:1.25;overflow:hidden;border-radius:10px;box-shadow:0 3px 12px #0008}#inventory-card>img{display:block;width:100%;height:100%;object-fit:cover}.slot{position:absolute;display:flex;align-items:center;justify-content:center;gap:.1em}.slot-head{left:13%;top:13%;width:23%;height:19%}.slot-inventory{left:65%;top:13%;width:24%;height:21%}.slot-left{left:9%;top:43%;width:21%;height:18%}.slot-right{left:70%;top:43%;width:21%;height:18%}.slot-torso{left:9%;top:72%;width:25%;height:18%}.slot-feet{left:70%;top:74%;width:21%;height:16%}.inventory-icon{font-size:clamp(1.4rem,5vw,3rem);line-height:1;filter:drop-shadow(0 1px 1px #0009)}.inventory-icon.used{filter:grayscale(1) brightness(.55);opacity:.65}.inventory-count{font-size:clamp(.7rem,2vw,1.1rem);color:#fff5a8;text-shadow:1px 1px 2px #000}.shop-row{display:grid;grid-template-columns:1fr 64px;gap:12px;align-items:center;margin:.7rem 0;text-align:left}.shop-row>button{min-height:48px;margin:0}.shop-row .detail-toggle{color:#168c3b;font-size:1.25rem;background:#dcefd7}.shop-row p{grid-column:1/-1;margin:0;padding:.65rem;background:#24110599;border-radius:6px;line-height:1.35}.modal{position:fixed;inset:0;background:#000a;display:grid;place-items:center;padding:1rem;z-index:5}.modal[hidden]{display:none}.modal-card{width:min(94vw,430px);max-height:90vh;overflow:auto;padding:1.25rem;background:#5b351b;border:5px solid #241105;border-radius:14px;text-align:center}@media(max-width:650px){main{margin:1rem auto}.panel{padding:1rem}.movement-layout{grid-template-columns:1fr}.movement-info{order:1}.movement-layout #inventory-card{order:2;width:min(100%,430px);margin:0 auto}.story{order:3}.inventory-icon{font-size:clamp(1.35rem,10vw,2.4rem)}}
.inventory-image{width:clamp(1.55rem,5.5vw,3.3rem);height:clamp(1.55rem,5.5vw,3.3rem);object-fit:contain}.passive-icon{width:1.15em;height:1.15em;object-fit:contain;vertical-align:-.18em;margin-left:.12em}@media(max-width:650px){.movement-info,.story{text-align:center}.shop-row{text-align:left}}
.inventory-image,.passive-icon{mix-blend-mode:screen}.inventory-image{object-fit:contain}.helm-art{filter:drop-shadow(0 1px 1px #0009)}.mail-art{filter:grayscale(1) contrast(1.15) brightness(1.35) drop-shadow(0 1px 1px #0009)}.sword-art{filter:sepia(.65) saturate(1.8) hue-rotate(335deg) brightness(1.2) drop-shadow(0 1px 1px #0009)}.cloak-art{filter:sepia(.9) saturate(2.4) hue-rotate(195deg) brightness(1.05) drop-shadow(0 1px 1px #0009)}.boots-art{filter:sepia(.9) saturate(2.2) hue-rotate(135deg) brightness(1.1) drop-shadow(0 1px 1px #0009)}.gold-art{filter:sepia(1) saturate(3.2) hue-rotate(4deg) brightness(1.15) drop-shadow(0 1px 1px #0009)}
.inventory-icon.consumable-art[aria-disabled="false"]{cursor:pointer;filter:drop-shadow(0 0 4px #fff1a6) drop-shadow(0 1px 1px #0009);transition:transform .15s ease,filter .15s ease}.inventory-icon.consumable-art[aria-disabled="false"]:hover,.inventory-icon.consumable-art[aria-disabled="false"]:focus{transform:scale(1.12);outline:none}.inventory-icon.consumable-art[aria-disabled="true"]{cursor:not-allowed}.inventory-image.helm-art{filter:grayscale(.55) contrast(1.35) brightness(1.32) drop-shadow(0 1px 1px #0009)}.inventory-image.mail-art{filter:grayscale(1) contrast(1.35) brightness(1.16) drop-shadow(0 1px 1px #0009)}.inventory-image.sword-art{filter:grayscale(.85) contrast(1.45) brightness(1.4) drop-shadow(0 1px 1px #0009)}.inventory-image.cloak-art{filter:sepia(.95) saturate(3.6) hue-rotate(190deg) brightness(.72) contrast(1.35) drop-shadow(0 1px 1px #0009)}.inventory-image.boots-art{filter:sepia(.9) saturate(3.8) hue-rotate(305deg) brightness(1.22) drop-shadow(0 1px 1px #0009)}.inventory-image.gold-art{filter:sepia(1) saturate(4) hue-rotate(3deg) brightness(1.2) contrast(1.16) drop-shadow(0 1px 1px #0009)}
.inventory-image.cloak-art.consumable-art[aria-disabled="false"]{filter:sepia(.95) saturate(3.6) hue-rotate(190deg) brightness(.72) contrast(1.35) drop-shadow(0 0 4px #8cb8ff) drop-shadow(0 1px 1px #0009)}.inventory-image.boots-art.consumable-art[aria-disabled="false"]{filter:sepia(.9) saturate(3.8) hue-rotate(305deg) brightness(1.22) drop-shadow(0 0 4px #ffb0cb) drop-shadow(0 1px 1px #0009)}
h1{font-family:MedievalSharp,Georgia,serif;font-size:3em;letter-spacing:.035em}.active-effect-icon{filter:drop-shadow(0 0 3px #fff1a6)}.inventory-image.card-art{mix-blend-mode:screen}.inventory-image.material-art{mix-blend-mode:normal;filter:drop-shadow(0 1px 1px #0009)}.inventory-image.material-art.consumable-art[aria-disabled="false"]{filter:drop-shadow(0 0 4px #fff1a6) drop-shadow(0 1px 1px #0009)}.inventory-image.material-art.used{filter:grayscale(1) brightness(.55);opacity:.65}
h1{font-family:MedievalSharp,Georgia,serif;font-size:3em;letter-spacing:.035em}.move-button img,#town img{width:34px;height:34px;display:block;margin:0}.move-button,#town{min-width:54px;min-height:54px;padding:.45rem;vertical-align:middle}.active-effect-icon{filter:drop-shadow(0 0 3px #fff1a6)}
h1{font-size:3.45em;color:transparent;background:url('dragon-scales-green.png') center/180px repeat;background-clip:text;-webkit-background-clip:text;text-shadow:0 2px 0 #1b0e05,0 4px 6px #000}.move-button,#town,.icon-action{min-width:68px;min-height:68px;margin:.5rem .6rem;padding:.55rem}.move-button img,#town img,.icon-action img{width:44px;height:44px;display:block;margin:0}.move-button img{margin:0}#town img{filter:drop-shadow(1px 0 0 #3b210f) drop-shadow(-1px 0 0 #3b210f) drop-shadow(0 1px 0 #3b210f) drop-shadow(0 -1px 0 #3b210f)}.current-player{display:inline-block;padding:.12rem .42rem;border-radius:6px;box-shadow:0 0 8px #ffe69a,0 0 15px #e3bd7c;background:#24110599}.movement-info #move,.movement-info #town,.movement-info .icon-action{vertical-align:middle}#action-log{margin-top:1rem}#action-log-entries{height:7.5em;overflow-y:auto;text-align:left;padding:.3rem .5rem;background:#140a05aa;border-radius:5px;line-height:1.4}
h1{height:clamp(82px,16vw,170px);margin:.3rem auto 1rem}h1 img{display:block;height:100%;max-width:100%;object-fit:contain;margin:auto;filter:drop-shadow(0 0 7px #30dca5) drop-shadow(0 0 16px #1475cb) drop-shadow(0 4px 5px #000)}.icon-action{background:#e3bd7c!important;color:#251304!important;border:1px solid #241105!important;font-weight:bold;filter:none!important;opacity:1!important}.icon-action:not(:disabled):hover{background:#f7daa4!important}.icon-action:disabled{background:#4b4032!important;color:#978b78!important;opacity:.6!important}.log-entry{display:grid;grid-template-columns:3.8em 1fr;gap:.5rem}.log-entry time{color:#e3bd7c;font-variant-numeric:tabular-nums;text-align:right}
.shop-row .detail-toggle{transition:transform .2s ease}.shop-row .detail-toggle.expanded{transform:rotate(180deg)}.shop-row p{margin-top:-12px!important;padding-top:1rem!important;border-radius:0 0 6px 6px!important}.shop-row:has(p:not([hidden]))>button:first-child{border-radius:6px 6px 0 0}
.icon-action{width:68px;height:68px;min-width:68px;min-height:68px;padding:.55rem;border:0!important;border-radius:6px;background:#f7daa4!important}.icon-action img{width:44px;height:44px;object-fit:contain;filter:brightness(0) saturate(100%) invert(12%) sepia(18%) saturate(2069%) hue-rotate(340deg) brightness(89%) contrast(91%)}.icon-action:not(:disabled):hover{background:#fff0c8!important}.icon-action:disabled{border:0!important}
.move-button,#town,.icon-action{padding:3px}.move-button img,#town img,.icon-action img{width:61px;height:61px}.move-button img{margin:0}#town img{filter:none}
.move-button.walking{-webkit-animation:walk .125s ease-in-out 8!important;animation:walk .125s ease-in-out 8!important}.move-button,#town,.icon-action{padding:2px}.move-button img,#town img,.icon-action img{width:64px;height:64px}
.move-button.walking,button.activating{-webkit-animation:walk .1875s ease-in-out 8!important;animation:walk .1875s ease-in-out 8!important;will-change:transform}button.activating{filter:none!important}
.move-button,#town,.icon-action{background:#f7daa4!important}.move-button:not(:disabled):hover,#town:not(:disabled):hover,.icon-action:not(:disabled):hover{background:#fff0c8!important}
h1{height:clamp(123px,24vw,255px)}h1 img{filter:drop-shadow(1px 0 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 1px 0 #fff) drop-shadow(0 -1px 0 #fff)}
.move-button:disabled,#town:disabled,.icon-action:disabled{background:#4b4032!important;color:#978b78!important;opacity:.6!important;filter:brightness(.65)!important}.move-button:disabled img,#town:disabled img,.icon-action:disabled img{filter:grayscale(1) brightness(.55)!important;opacity:.65}.log-player{font-weight:bold}
h1{height:clamp(55px,10.8vw,115px);margin:.03rem auto .1rem}.log-move-icon{height:1em;width:1em;vertical-align:-.12em;object-fit:contain}
@keyframes consumable-fade{0%,15%{opacity:1}100%{opacity:0}}#use-boots.activating,#use-cloak.activating{background:#4b4032!important;color:#978b78!important;filter:brightness(.65)!important;-webkit-animation:walk .1875s ease-in-out 8,consumable-fade 1.5s ease-out forwards!important;animation:walk .1875s ease-in-out 8,consumable-fade 1.5s ease-out forwards!important;will-change:transform,opacity}#use-boots.activating img,#use-cloak.activating img{filter:grayscale(1) brightness(.55)!important;opacity:.65}
.secret-panel{cursor:grab;user-select:none;-webkit-user-select:none;filter:blur(9px);transition:filter .16s ease}.secret-panel:active,.secret-panel.revealed{cursor:grabbing;filter:none}.secret-panel:focus-visible{outline:2px solid #ffe69a;outline-offset:3px}
@media(max-width:650px){.movement-layout{gap:.45rem}.movement-info{margin-bottom:0}}
.player-line{display:inline-block;padding:.25rem .55rem;margin:.12rem 0;border-radius:7px;line-height:1.45}.current-player{padding:.25rem .55rem;box-shadow:0 0 10px #ffe69a,0 0 19px #e3bd7c;background:#24110599}
.inventory-image[role="button"]{cursor:pointer}.inventory-image[role="button"]:focus-visible{outline:2px solid #ffe69a;outline-offset:2px}
#game-actions{display:flex;justify-content:space-between;align-items:center;margin-top:1rem}#results-screen{margin-top:1.25rem;padding:1.25rem;background:#24110599;border-radius:10px;text-align:center}.podium{display:grid;grid-template-columns:repeat(3,1fr);gap:.6rem;align-items:end;margin:2.5rem auto 1rem;max-width:660px}.podium-player{position:relative;min-height:125px;padding:.8rem .45rem;background:linear-gradient(#382014,#1e100a);border:3px solid var(--player-color);border-radius:8px 8px 2px 2px;display:flex;flex-direction:column;justify-content:center;gap:.3rem;box-shadow:0 0 11px color-mix(in srgb,var(--player-color) 65%,transparent)}.podium-player b{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);font-size:2.2rem;color:#ffe69a}.podium-player small{color:#e3bd7c}.golden-eggs{order:-1;color:#ffe16b;font-weight:bold;font-size:.9rem}.place-1{min-height:175px;order:2}.place-2{min-height:145px;order:1}.place-3{min-height:115px;order:3}.firework{position:absolute;left:50%;bottom:calc(100% + 1.5rem);width:2px;height:2px;background:transparent;box-shadow:0 -24px 0 1px #ffe16b,17px -17px 0 1px #ff6a52,24px 0 0 1px #78d9ff,17px 17px 0 1px #a8ff78,0 24px 0 1px #ffe16b,-17px 17px 0 1px #ff8fe1,-24px 0 0 1px #78d9ff,-17px -17px 0 1px #a8ff78;animation:firework .9s ease-in-out infinite alternate}@keyframes firework{from{transform:translateX(-50%) scale(.65);opacity:.55}to{transform:translateX(-50%) scale(1.2);opacity:1}}.fourth-place{display:flex;flex-direction:column;gap:.25rem;padding:.8rem;margin:1rem auto;max-width:430px;background:#160b06;border-radius:7px}.results-actions{display:flex;justify-content:center;gap:1rem;margin-top:1.25rem}@media(max-width:650px){#game-actions{margin-top:.75rem}.podium{gap:.3rem}.podium-player{font-size:.85rem;padding:.6rem .2rem}.podium-player small{font-size:.72rem}.results-actions{gap:.6rem;flex-wrap:wrap}}
#action-log-entries{padding:.3rem .1rem}.log-entry{grid-template-columns:3em 1fr;gap:.2rem}
.inventory-icon.consumable-art[aria-disabled="true"],.inventory-image[role="button"]{cursor:default}
#game-actions[hidden]{display:none!important}
#results-screen:not([hidden])~#game-actions{display:none!important}
#town.activating{background:#4b4032!important;color:#978b78!important;filter:brightness(.65)!important}#town.activating img{filter:grayscale(1) brightness(.55)!important;opacity:.65}

#challenge-open{min-height:48px;margin:.5rem .6rem;vertical-align:middle}
#challenge-panel{margin-top:.8rem;font-size:.95rem;line-height:1.45}
#challenge-hint,.lobby-note{color:#ead5ac;font-size:.9rem}
.challenge-rules{padding:.65rem .8rem;background:#24110599;border-radius:8px;margin-top:.65rem}
.challenge-rules summary{cursor:pointer;min-height:32px;font-weight:bold}
.challenge-rules p{margin:.6rem 0;overflow-wrap:anywhere}
#challenge-result{display:flex;align-items:flex-start;gap:.8rem;background:#241105cc;border:1px solid #bf945b;border-radius:8px;padding:.8rem;margin:.7rem 0;overflow-wrap:anywhere}
#challenge-result[hidden]{display:none}
#challenge-result p{margin:0;min-width:0}
.challenge-die{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border-radius:8px;background:#f7daa4;color:#251304;font:bold 30px Georgia,serif;box-shadow:0 2px 5px #0008}
#challenge-result.rolling .challenge-die{animation:challenge-roll .3s ease-in-out infinite}
@keyframes challenge-roll{0%,100%{transform:rotate(-12deg)}50%{transform:rotate(12deg) translateY(-4px)}}
.challenge-card{width:min(94vw,520px);text-align:left}
.challenge-card h2{text-align:center}
.challenge-card>label:not(.challenge-confirm){display:block;margin-top:.8rem;font-weight:bold}
.challenge-card select{width:100%;min-height:48px;margin:.35rem 0;max-width:100%}
.challenge-confirm{display:flex;gap:.65rem;align-items:flex-start;padding:.65rem 0;cursor:pointer;font-size:.95rem;line-height:1.4}
.challenge-confirm input{flex:0 0 22px;width:22px;height:22px;margin:.1rem 0;accent-color:#d1a564}
.challenge-note{font-size:.85rem;color:#ead5ac;line-height:1.4}
#challenge-preview{background:#24110599;padding:.75rem;border-radius:6px;line-height:1.4}
.challenge-actions{display:flex;justify-content:space-between;gap:.5rem}
.challenge-actions button{min-height:48px;margin:.35rem 0}
#challenge-error{color:#ffd0d0}
.challenge-card :focus-visible,.challenge-rules summary:focus-visible{outline:2px solid #ffe69a;outline-offset:2px}
@media(prefers-reduced-motion:reduce){#challenge-result.rolling .challenge-die{animation:none}}
@media(max-width:650px){#challenge-panel{text-align:center}.challenge-rules{text-align:left}#challenge-result{text-align:left}.challenge-card{padding:1rem}.challenge-card select{font-size:16px}}
.companion-panel{padding:.85rem;margin:.8rem 0;background:#241105aa;border:1px solid #a77c49;border-radius:8px;font-size:.95rem;line-height:1.4}
.companion-panel p{margin:.6rem 0}.companion-panel button,.companion-panel select{min-height:44px}
#treasure-panel select{max-width:100%;font-size:16px}#treasure-panel .ledger-actions{display:flex;flex-wrap:wrap;gap:.3rem}#treasure-panel .ledger-actions button{flex:1 1 145px}#class-panel [hidden],#treasure-panel [hidden],#thief-option[hidden]{display:none!important}#lobby-ability{line-height:1.5}#foresight-values{font-size:1.5rem;font-weight:bold}#foresight-dialog{z-index:7}.challenge-die{max-width:100%;overflow-wrap:anywhere}
#ai-controls[hidden]{display:none}#ai-setup>label{font-weight:bold}#ai-controls h3{margin:.2rem 0 .6rem}
.slot-inventory{flex-wrap:wrap}.slot-inventory .utility-item{width:28%!important;height:38%!important;object-fit:contain}.slot-inventory:has(.utility-item) .material-art{max-width:45%;max-height:60%}
#modal{z-index:10}
#ai-controls .challenge-actions{flex-wrap:wrap}#ai-controls .challenge-confirm{text-align:left}
/* Reviewed physical-board overlay. Zoom scrolls within the panel, never the page. */
#board-panel{max-width:900px;margin:20px auto;text-align:left;overflow:hidden}
.board-toolbar,#board-tracking{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
#board-panel label{display:inline-flex;flex-wrap:wrap;gap:8px;align-items:center;margin:6px 0}
#board-panel [hidden]{display:none!important}
#board-panel select,#board-panel input:not([type=checkbox]){max-width:100%;min-height:44px}
#board-panel button{min-height:44px;white-space:normal}
#board-editor{border:1px solid #bd944e;border-radius:10px;padding:12px;margin:12px 0}
#board-editor label{display:flex}#board-editor p,#board-route{overflow-wrap:anywhere}
.board-viewport{width:100%;overflow:auto;max-height:75vh;border:2px solid #bd944e;border-radius:8px;margin:12px 0;overscroll-behavior:contain}
#board-canvas{position:relative;width:100%;line-height:0;min-width:280px}
#board-canvas>img{display:block;width:100%;height:auto}
#board-overlay{position:absolute;inset:0;width:100%;height:100%;touch-action:pan-x pan-y}
.board-edge{stroke:#fff9;stroke-width:4;pointer-events:none}
.board-route-line{stroke:#caff72;stroke-width:9;stroke-linecap:round;filter:drop-shadow(0 0 4px #000);pointer-events:none}
.board-passage-line{stroke-dasharray:12 13}.board-space{fill:#1a1711;stroke:#fff;stroke-width:2}
.board-space.selected{fill:#257548;stroke:#eaff92;stroke-width:4}
.board-space-number{fill:#fff;text-anchor:middle;font:bold 14px sans-serif;pointer-events:none}
.board-node{cursor:pointer}.board-node:focus .board-space{stroke:#ceff68;stroke-width:6}
.board-pawn,.board-destination,.board-egg{pointer-events:none}
.board-pawn text{fill:#111;text-anchor:middle;font:bold 15px sans-serif}
.board-destination{fill:none;stroke:#daff79;stroke-width:7;stroke-dasharray:10 5}
.board-egg{fill:#ffe14c;stroke:#543e00;stroke-width:2;font-size:36px}
#board-tracking>p,#board-tracking>details{flex-basis:100%}
#board-pawns{font-size:.9em;line-height:1.7;overflow-wrap:anywhere}
@media(max-width:600px){#board-panel{text-align:center;padding:10px}.board-toolbar,#board-tracking{justify-content:center}#board-editor{text-align:left}.board-viewport{max-height:65vh}}
:root .test-board-entry{margin-top:20px;padding-top:16px;border-top:1px solid #96784955}.test-board-button{display:inline-block;padding:12px 22px;border:1px solid #967849;border-radius:8px;background:#ead8af;color:#352515;text-decoration:none;font-weight:bold;min-height:44px}.test-board-button:hover{background:#fff0c9}.test-board-button:focus-visible{outline:3px solid #a6cb55;outline-offset:3px}.test-board-entry p{font-size:.85em;opacity:.8}
