/* Tabletop edition: a moving illustrated backdrop, physical cards and a readable dice tray. */
body{isolation:isolate;background:#0e1515}
body:before{content:'';position:fixed;inset:-5%;z-index:-1;background:linear-gradient(110deg,#081617dd,#231609aa),url('assets/chronicle.webp') center/cover;animation:backdropDrift 36s ease-in-out infinite alternate;pointer-events:none}
@keyframes backdropDrift{from{transform:scale(1) translateX(-1%)}to{transform:scale(1.06) translateX(1%)}}
#boardWrap{background:#18241f;box-shadow:inset 0 0 70px #0008;border:1px solid #aa885943}
.boardAtmosphere{position:absolute;inset:-6%;pointer-events:none;background:linear-gradient(180deg,#152621a8,#1b211cdd 80%),url('assets/chronicle.webp') center/cover;animation:backdropDrift 32s ease-in-out infinite alternate}
.boardAtmosphere:after{content:'';position:absolute;inset:0;background:radial-gradient(ellipse at 25% 30%,#dbc18825,transparent 55%),linear-gradient(115deg,transparent 25%,#e5d3a710 42%,transparent 55%);animation:ambientLight 18s ease-in-out infinite alternate}
@keyframes ambientLight{from{opacity:.35;transform:translateX(-4%)}to{opacity:.9;transform:translateX(4%)}}
#top{background:linear-gradient(110deg,#111d1aed,#23251eea);box-shadow:0 5px 20px #0004}
.chronicleBar{background:linear-gradient(90deg,#26332bee,#151f1ded);border-color:#8b714c66}
.headerResource b{font-variant-numeric:tabular-nums;color:#f1d6a5}.headerResource small{color:#c5b791;font-size:12px}
#right{background:linear-gradient(145deg,#23322c,#101d19);border-left:2px solid #997c50;box-shadow:-8px 0 30px #0003}
.tabs{background:#111e1b}.tabs button{font-size:14px}.tabs button.active{background:linear-gradient(#3c4834,#253126);box-shadow:inset 0 2px #c6a468;color:#ffe0a6}
.mapLabel{background:linear-gradient(#304439ed,#16291ff5);border-radius:4px;border-color:#aca17b;box-shadow:0 4px 10px #0008,inset 0 1px #e8dab132;padding:7px 10px;font-size:15px}
.mapLabel.current{background:linear-gradient(#795738,#46391f);color:#fff0c8;border-color:#ffd486;box-shadow:0 0 0 2px #c39a5340,0 5px 16px #0008}
.unitLabel{box-shadow:0 3px 7px #0007}.objectiveBanner{background:linear-gradient(105deg,#152a23f5,#263222ed);border-color:#b59a63;box-shadow:0 8px 30px #0007,inset 0 1px #dac08635;border-radius:5px}
.worldTicker{border-radius:0 4px 4px 0;background:#17291fed;backdrop-filter:blur(8px)}
.locationArt{height:175px;border-bottom:1px solid #c09c6066;box-shadow:inset 0 -30px 35px #0e1c1990}
.itemArt{box-shadow:inset 0 0 0 1px #ccb27b33,0 4px 9px #0005}.itemArt.resourceArt{background-image:url('assets/resources.webp');background-size:400% 300%}
.itemGrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.itemCard{position:relative;border-radius:7px;background:linear-gradient(135deg,#3a3628,#1c261f);border:1px solid #9f8555;box-shadow:0 6px 12px #0005,inset 0 0 0 3px #b3985520;transition:transform .2s,box-shadow .2s}
.itemCard:hover:not(:disabled){transform:translateY(-3px);box-shadow:0 10px 18px #0007,0 0 0 1px #dfbe81;background:#3e4632}
.itemCard .itemArt{border-bottom:1px solid #b79a6066;box-shadow:none}.itemCard b{font-size:18px;margin:9px 6px 3px}.itemCard small{font-size:14px;color:#cbbc99}.itemCard.worn{border:2px solid #e0bf72;box-shadow:0 5px 15px #0006,inset 0 -3px #b1904d}
.itemCard.worn small{color:#ffe2a5}.equippedSlots div{background:linear-gradient(120deg,#314131,#202f25);border-color:#98855c;border-radius:4px}.equippedSlots small{font-size:12px}.equippedSlots b{font-size:15px}.equippedSlots .itemArt{float:right;width:34px;height:34px;margin-left:5px}
.itemArt.large{width:184px;height:184px;border-radius:8px;border:2px solid #c5a66f;box-shadow:0 12px 28px #0008}
#market{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#market>.tradeIntro,#market>.subhead,#market>p{grid-column:1/-1}
.marketRow{display:grid;grid-template-columns:1fr 1fr;gap:6px;border:1px solid #8d7852;border-radius:6px;padding:10px;background:linear-gradient(145deg,#332f24,#1b2720);box-shadow:0 5px 13px #0004}
.marketRow .itemInfo{grid-column:1/-1;display:flex;flex-direction:column;text-align:center;gap:8px;cursor:pointer;border-radius:4px;font-size:17px}
.marketRow .itemInfo:focus-visible{outline:2px solid #e6c77f;outline-offset:3px}.marketRow .itemArt{width:100%;height:auto;aspect-ratio:1;border:0;border-radius:3px}
.marketRow small{font-size:13px;margin-top:5px}.marketRow .prices{font-size:12px;justify-content:center;display:block;color:#e0c892}.marketRow button{font-size:13px;min-height:40px;padding:6px 1px;background:#354936;border-color:#889361}.marketRow [data-sell]{background:#343425;border-color:#8b7a51}
.marketRow.equipmentMarket{grid-column:1/-1;grid-template-columns:54px 1fr 32px 48px!important;gap:8px}.equipmentMarket .itemArt{width:54px;height:54px}.equipmentMarket b{font-size:16px}.equipmentMarket small{font-size:12px}
.heroPortrait{border:2px solid #c1a16a;box-shadow:0 10px 25px #0007,inset 0 0 0 3px #1a2018}.storyCard,.skillProgress{border-radius:4px;box-shadow:0 3px 9px #0003}.dialogChoices button{background:linear-gradient(100deg,#344433,#222e23);border-color:#8b8e66}
.diceTray{position:absolute;left:20px;bottom:187px;z-index:4;display:flex;align-items:center;gap:12px;padding:13px 16px 13px 10px;max-width:290px;pointer-events:none;background:linear-gradient(125deg,#342c20ee,#142820eb);border:1px solid #b4965e;border-radius:9px;box-shadow:0 8px 25px #0007,inset 0 1px #e7cf9433;backdrop-filter:blur(5px)}
.diceStage{width:70px;height:66px;display:grid;place-items:center;perspective:450px;flex:none}.travelDie{width:44px;height:44px;position:relative;transform-style:preserve-3d;transform:rotateX(var(--rx)) rotateY(var(--ry));filter:drop-shadow(0 9px 5px #0008)}
.travelDie.tossed{animation:diceToss .8s cubic-bezier(.23,.8,.35,1) both}
@keyframes diceToss{0%{transform:translateY(-32px) rotateX(calc(var(--rx) + 540deg)) rotateY(calc(var(--ry) + 360deg));opacity:.3}65%{transform:translateY(5px) rotateX(calc(var(--rx) - 20deg)) rotateY(calc(var(--ry) + 15deg));opacity:1}82%{transform:translateY(-5px) rotateX(calc(var(--rx) + 8deg)) rotateY(var(--ry))}100%{transform:translateY(0) rotateX(var(--rx)) rotateY(var(--ry))}}
.dieFace{position:absolute;inset:0;padding:7px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:3px;background:linear-gradient(135deg,#fff2cf,#d4b98a);border:1px solid #9a7f51;border-radius:6px;backface-visibility:hidden;box-shadow:inset 0 0 5px #80663d55}
.dieFace .pip{background:#4c2922;border-radius:50%;box-shadow:inset 0 1px 2px #170d0a}.face1{transform:translateZ(22px)}.face2{transform:rotateY(90deg) translateZ(22px)}.face3{transform:rotateX(90deg) translateZ(22px)}.face4{transform:rotateX(-90deg) translateZ(22px)}.face5{transform:rotateY(-90deg) translateZ(22px)}.face6{transform:rotateY(180deg) translateZ(22px)}
.diceCaption small{display:block;color:#c8b17f;font-size:11px;letter-spacing:1px}.diceCaption b{display:block;color:#ffe3a7;font:20px Georgia,serif;margin:4px 0}.diceCaption span{display:block;font-size:12px;color:#c7c9b2;line-height:1.35}.actions button.travel{border-color:#a09160;background:linear-gradient(95deg,#334a37,#233328)}
.no-motion:before,.no-motion .boardAtmosphere,.no-motion .boardAtmosphere:after,.no-motion .travelDie{animation:none!important}.no-motion .itemCard{transition:none}
@media(max-width:950px){.diceTray{left:14px;padding:9px;gap:6px;max-width:260px}.diceCaption b{font-size:18px}.diceStage{width:58px}.itemArt.large{width:140px;height:140px}}
@media(max-width:680px){.diceTray{bottom:187px;left:12px;max-width:255px}.diceStage{height:54px}.diceCaption small{font-size:10px}.itemGrid{grid-template-columns:repeat(3,minmax(0,1fr))}.itemCard b{font-size:16px}.itemCard small{font-size:12px}.itemArt.large{width:110px;height:110px}.marketRow .itemArt{max-width:140px}.mapLabel{font-size:13px;padding:5px 7px}.tabs button{font-size:13px}}
@media(prefers-reduced-motion:reduce){body:before,.boardAtmosphere,.boardAtmosphere:after,.travelDie{animation:none!important}}
