@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&family=Inter:wght@400;500;600&display=swap');
:root{color-scheme:dark;--ink:#e7e1d1;--muted:#a6afa0;--gold:#d2b77c;--line:#ffffff20}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% 0%,#25352d 0%,#111b19 46%,#0a1010 100%);color:var(--ink);font-family:Inter,sans-serif;min-height:100vh}main{max-width:1050px;margin:auto;padding:32px 28px 60px}.top{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding-bottom:22px;gap:15px}.brand{font-family:'Cormorant Garamond',serif;font-size:24px;letter-spacing:.1em}.eyebrow{font-size:10px;letter-spacing:.2em;text-transform:uppercase;color:var(--gold)}.shadow{width:240px}.bar{height:4px;background:#ffffff18;margin-top:8px;overflow:hidden}.bar i{display:block;height:100%;background:var(--gold)}.shadow .bar i{background:#9c7696}.layout{display:grid;grid-template-columns:190px 1fr;gap:60px;margin-top:54px}.stats{border-right:1px solid var(--line);padding-right:30px}.stat{margin-bottom:25px}.stat-head{display:flex;justify-content:space-between;font-size:12px}.stat-head span:last-child{color:var(--gold)}.debt{border-top:1px solid var(--line);padding-top:20px;color:var(--muted);font-size:12px;line-height:1.7}.card{max-width:640px}.chapter{color:var(--gold);font-size:11px;letter-spacing:.17em;text-transform:uppercase}.ornament{font-size:24px;color:var(--gold);margin:30px 0 10px}h1{font-family:'Cormorant Garamond',serif;font-weight:600;font-size:clamp(42px,6vw,68px);line-height:1;margin:15px 0 24px}h2{font-family:'Cormorant Garamond',serif;font-size:30px;margin:0 0 12px}p{font-family:'Cormorant Garamond',serif;font-size:23px;line-height:1.45;color:#d8dbcd;margin:0 0 20px}.choices{display:grid;gap:10px;margin-top:35px}button{font:inherit;color:var(--ink);text-align:left;background:#ffffff08;border:1px solid #ffffff29;padding:18px 20px;cursor:pointer;transition:.2s}button:hover,button:focus-visible,button.selected{border-color:var(--gold);background:#d2b77c12;outline:none}.choice-title{display:block;font-size:14px;line-height:1.5}.preview{display:block;color:#bdb9a6;font-size:11px;margin-top:10px;line-height:1.6}.warning{color:#edaa96}.action{background:var(--gold);color:#172019;font-weight:600;text-align:center;border:0;margin-top:8px}.action:hover{background:#e3ca94}.intro{max-width:680px;margin:100px auto}.intro p{max-width:600px}.toggle{display:flex;gap:12px;align-items:center;padding:20px;border:1px solid var(--line);margin:30px 0;font-size:14px;cursor:pointer}.toggle input{accent-color:var(--gold);width:18px;height:18px}.small{font:12px/1.7 Inter,sans-serif;color:var(--muted)}.history{margin-top:26px;border-top:1px solid var(--line);padding-top:16px;font:12px/1.6 Inter,sans-serif;color:var(--muted)}.history summary{cursor:pointer;color:var(--gold)}.history li{margin:8px 0}.result-stats{display:flex;flex-wrap:wrap;gap:12px;margin:24px 0}.pill{border:1px solid var(--line);padding:10px;font-size:12px;color:var(--gold)}@media(max-width:650px){main{padding:20px}.top{align-items:flex-start}.shadow{width:120px}.layout{display:flex;flex-direction:column;gap:32px;margin-top:30px}.stats{border:0;padding:0;display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.stat{margin:0}.debt{grid-column:span 2;padding-top:10px}.intro{margin:65px auto}h1{font-size:48px}}
/* Card table */
body{background:#171c1a;color:#eee8dc;background-image:radial-gradient(ellipse at 50% 35%,#394238 0,#252d27 40%,#171c1a 100%);min-height:100dvh}
main{max-width:none;padding:0;min-height:100dvh}.game{width:min(100%,1100px);margin:auto;padding:20px 22px 28px}.game-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #d3c7a52a;padding-bottom:15px}.wordmark{font-family:'Cormorant Garamond',serif;font-size:25px;letter-spacing:.15em;font-weight:700;color:#eee6d6}.wordmark span{font:9px Inter,sans-serif;letter-spacing:.17em;display:block;color:#b4ae98}.wordmark .game-version{display:block;margin-top:4px;font:8px/1 Inter,sans-serif;letter-spacing:.1em;color:#8f927f}.chapter{display:flex;align-items:center;gap:10px;font-size:10px;letter-spacing:.12em;color:#b8b4a0}
.chronology-lore{color:#9cb5a8;letter-spacing:.14em;font-weight:500;text-transform:uppercase}
.chronology-step{color:#d8b97a;font-weight:600;letter-spacing:.1em;padding:3px 7px;border:1px solid #d8b97a38;border-radius:4px;background:#1d353380}
@media(max-width:700px){.chapter{flex-direction:column;align-items:flex-end;gap:3px;text-align:right}.chronology-lore{font-size:8.5px;letter-spacing:.09em}.chronology-step{font-size:9.5px;padding:2px 5px}}.meters{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;max-width:590px;margin:20px auto 0}.meters .stat{margin:0}.meters .stat-head{font-size:10px;gap:5px}.meters .stat-head span:last-child{color:#e2d3ac}.meters .bar{height:3px;margin-top:7px}.meters .stat:last-child .bar i{background:#ae788b}.debt-line{min-height:24px;text-align:center;color:#aeb5a6;font-size:10px;margin:12px auto 0}.stage{display:grid;grid-template-columns:minmax(120px,1fr) minmax(250px,350px) minmax(120px,1fr);align-items:center;gap:25px;margin:8px auto 0;max-width:920px}.deck{position:relative;isolation:isolate}.deck-back{position:absolute;inset:6px 0 -6px;background:#8c826c;border:1px solid #d4c8a1;border-radius:8px;z-index:-1;transform:rotate(3deg)}.back-two{transform:rotate(-3deg);background:#6b6c5b}.story-card{position:relative;background:#e7ddc8;color:#272d25;border:5px solid #e7ddc8;border-radius:8px;box-shadow:0 22px 55px #0008;overflow:hidden;transition:transform .22s ease;touch-action:pan-y;cursor:grab;user-select:none}.story-card.dragging{transition:none;cursor:grabbing}.card-art{height:clamp(190px,30vh,310px);position:relative;background-color:#596858;background-size:cover;background-position:center}.card-art:after{content:'';position:absolute;inset:50% 0 0;background:linear-gradient(transparent,#202b27aa);pointer-events:none}.card-number{position:absolute;top:12px;left:12px;background:#18211dcc;color:#e5dbc7;font:10px Inter,sans-serif;letter-spacing:.12em;padding:7px 9px;z-index:1}.card-number span{opacity:.5}.card-stamp{position:absolute;inset:0;display:grid;place-items:center;font-size:70px;color:white;text-shadow:0 2px 14px #000;z-index:2;pointer-events:none}.card-body{padding:20px 22px 24px;min-height:190px}.card-kicker{font:9px Inter,sans-serif;letter-spacing:.17em;color:#818678;display:flex;justify-content:space-between}.card-kicker span{color:#a3884f}.story-card h1{font-size:36px;line-height:1.02;margin:12px 0;color:#263027}.story-card p{font:16px/1.4 'Cormorant Garamond',serif;color:#394139;margin:0;font-weight:600}.side-choice{display:flex;align-items:center;gap:13px;border:0;background:transparent;color:#d7d2c3;font-size:12px;line-height:1.5;padding:15px 0}.side-choice:hover,.side-choice:focus-visible{background:transparent;color:#f2d79a}.left-choice{text-align:right;justify-content:flex-end}.right-choice{text-align:left}.arrow{font-size:24px;color:#d1b57a;font-weight:400}.choice-feedback{min-height:55px;max-width:500px;margin:22px auto 0;text-align:center;font:11px/1.6 Inter,sans-serif;color:#b3b9a8}.choice-feedback strong,.choice-feedback span{display:block}.choice-feedback strong{color:#eee5d2;font-weight:500}.choice-feedback .warning{color:#e8ac9c}.mobile-choices{display:none}.history{max-width:350px;margin:15px auto 0}.history summary{color:#b9b39f}.history summary span{float:right}.intro{padding:0 24px}.intro h1{color:#eee8dc}.intro .action{display:inline-block}.result-stats .pill{color:#dfce9d}
@media(max-width:700px){.game{padding:14px 16px 24px}.game-header{padding-bottom:12px}.wordmark{font-size:21px}.wordmark span{font-size:8px}.meters{gap:8px;margin-top:15px}.meters .stat-head{font-size:9px;display:block;text-align:center}.meters .stat-head span{display:block}.meters .stat-head span:last-child{margin-top:4px}.debt-line{font-size:10px;margin:10px auto 0;min-height:29px;line-height:1.4}.stage{display:block;width:min(86vw,350px);margin:7px auto 0}.side-choice{display:none}.card-art{height:clamp(170px,27vh,250px)}.card-body{padding:16px 18px 19px;min-height:160px}.story-card h1{font-size:32px;margin:10px 0}.story-card p{font-size:16px}.choice-feedback{margin:17px auto 0;min-height:45px}.mobile-choices{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:3px auto 0;max-width:420px}.mobile-choices button{font-size:11px;line-height:1.4;text-align:center;padding:12px 9px;border:1px solid #d9d4bd35;background:#ffffff08}.mobile-choices span{color:#e0c487;font-size:17px}.history{margin-top:18px}.intro{margin:55px auto}.intro h1{font-size:46px}}
@media(max-height:700px) and (max-width:700px){.card-art{height:150px}.card-body{min-height:130px;padding:12px 16px}.story-card h1{font-size:28px;margin:7px 0}.story-card p{font-size:15px}.game{padding-top:10px}.meters{margin-top:10px}.debt-line{margin-top:6px}.choice-feedback{margin-top:10px}}
.card-art{background-size:contain;background-repeat:no-repeat;background-color:#29352e}

/* Elven advisor cards */
.story-card{padding:10px;background:linear-gradient(135deg,#d0bb82 0%,#746849 17%,#34483c 48%,#8e8059 81%,#d6c18c 100%);border:2px solid #bca777;border-radius:15px;box-shadow:0 22px 55px #0009,inset 0 0 0 2px #283c31,inset 0 0 0 4px #a08f63}
.story-card:before,.story-card:after{content:'❧';position:absolute;z-index:3;color:#d9c389;font-size:22px;line-height:1;text-shadow:0 1px #26372b;pointer-events:none}
.story-card:before{top:1px;left:5px}.story-card:after{bottom:1px;right:5px;transform:rotate(180deg)}
.card-heading,.card-subheading{display:flex;align-items:center;justify-content:space-between;background:linear-gradient(90deg,#d7c899,#eee2bf 48%,#c7b985);border:1px solid #675d43;color:#27362b;box-shadow:inset 0 0 0 1px #ffffff65}
.card-heading{height:40px;padding:0 12px;border-radius:7px 7px 2px 2px}
.card-title{font:700 24px/1 'Cormorant Garamond',serif;letter-spacing:.015em}
.card-emblem{display:grid;place-items:center;width:25px;height:25px;border:1px solid #7a6944;border-radius:50%;font-size:20px;color:#53654c}
.card-art{height:clamp(180px,29vh,285px);margin:3px 3px 0;border:2px solid #554f39;background-size:contain;background-position:center;background-repeat:no-repeat;background-color:#26382e}
.card-art:after{display:none}
.card-subheading{height:26px;margin-top:3px;padding:0 10px;font:600 11px Inter,sans-serif;letter-spacing:.04em}
.card-subheading span:last-child{color:#786c47;font-size:15px}
.card-body{position:relative;margin:3px 3px 1px;padding:12px 13px 25px;min-height:154px;border:1px solid #70654c;background:linear-gradient(135deg,#ded2b4,#f0e7ce 55%,#d8cba8);box-shadow:inset 0 0 14px #907e4b30}
.card-kicker{display:block;font:600 11px Inter,sans-serif;letter-spacing:.04em;color:#6b6b56;margin-bottom:8px}
.story-card p{font:600 17px/1.25 'Cormorant Garamond',serif;color:#2e382e;margin:0}
.card-footer{position:absolute;bottom:5px;left:10px;right:10px;display:flex;justify-content:space-between;font:8px Inter,sans-serif;letter-spacing:.08em;color:#77725e}
@media(max-width:700px){.story-card{padding:8px}.card-heading{height:34px}.card-title{font-size:22px}.card-art{height:clamp(165px,25vh,225px)}.card-subheading{height:24px}.card-body{min-height:135px;padding:10px 11px 23px}.story-card p{font-size:16px}.card-kicker{margin-bottom:6px}}
@media(max-height:700px) and (max-width:700px){.card-art{height:145px}.card-body{min-height:115px}.story-card p{font-size:15px}}

/* The top card turns over above the rest of the deck. */
.deck{perspective:1100px}
.deck-back,.card-reverse{background:#172a21 url('assets/card-back.png') center / 100% 100% no-repeat;border:2px solid #aa9465;border-radius:15px;box-shadow:0 12px 30px #0006,inset 0 0 0 3px #273a2c}
.deck-back{inset:4px 0 -4px}
.back-one{transform:rotate(3deg)}
.back-two{transform:rotate(-3deg)}
.card-flip{position:relative;transform-style:preserve-3d}
.card-flip.revealing{animation:card-reveal 560ms cubic-bezier(.55,0,.35,1) both;pointer-events:none}
.card-reverse{position:absolute;inset:0;transform:rotateY(180deg);backface-visibility:hidden}
.story-card{backface-visibility:hidden}
@keyframes card-reveal{0%{transform:rotateY(180deg) scale(.98)}100%{transform:rotateY(0) scale(1)}}
.intro{animation:screen-enter 400ms ease-out both}
@keyframes screen-enter{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
.side-choice,.mobile-choices button{transition:color .22s ease,background-color .22s ease,border-color .22s ease,opacity .22s ease}
.side-choice:disabled,.mobile-choices button:disabled{opacity:.45;cursor:default}
@media(prefers-reduced-motion:reduce){.card-flip.revealing,.intro{animation:none}.story-card,.side-choice,.mobile-choices button{transition:none}}

/* The paper edge is visible as the card turns. */
.story-card{box-shadow:1px 1px 0 #e4d5ad,2px 2px 0 #897950,3px 3px 0 #4a4636,0 22px 55px #0009,inset 0 0 0 2px #283c31,inset 0 0 0 4px #a08f63}
.card-reverse{transform:rotateY(180deg) translateZ(3px);box-shadow:0 0 0 1px #e0d0a5,0 12px 30px #0006,inset 0 0 0 3px #273a2c}
.card-flip.revealing::before,.card-flip.revealing::after{content:'';position:absolute;top:6px;bottom:6px;width:3px;background:linear-gradient(90deg,#625942,#e2d3ab 48%,#81734e);backface-visibility:visible;pointer-events:none;transform:translateZ(-1.5px) rotateY(90deg)}
.card-flip.revealing::before{left:-1.5px}
.card-flip.revealing::after{right:-1.5px}
.deck-back{box-shadow:1px 1px 0 #d2c194,2px 2px 0 #72674a,0 12px 30px #0006,inset 0 0 0 3px #273a2c}

/* Sea-green enamel and aged gold */
:root{--gold:#b69d65;--ink:#e6e3d3;--muted:#a9bdb4}
body{background-image:radial-gradient(ellipse at 50% 28%,#27494b 0,#172d30 45%,#101d20 100%)}
.story-card{background:linear-gradient(135deg,#977f4c,#1d5151 23%,#103b3d 57%,#947c4e);border-color:#ad965e;box-shadow:1px 1px 0 #c1ad7c,2px 2px 0 #77663f,3px 3px 0 #233634,0 22px 55px #0009,inset 0 0 0 2px #103b3d,inset 0 0 0 4px #a38a56}
.card-heading,.card-subheading{background:linear-gradient(90deg,#274c48,#34625a 50%,#20403d);border-color:#a58b55;color:#eee4c9;box-shadow:inset 0 0 0 1px #d4be7b33}
.card-emblem{border-color:#ad965e;color:#d2bc82}.card-subheading span:last-child{color:#c2aa72}
.card-art{border-color:#ab925c;background-color:#173b39}
.card-body{background:linear-gradient(135deg,#163b3c,#204b48 55%,#143332);border-color:#a18b5a;box-shadow:inset 0 0 15px #081b1c70}
.story-card p{color:#ede8d7}.card-kicker{color:#c5af79}.card-footer{color:#b2b9a4}
.meters{max-width:490px;gap:14px;margin-top:16px;align-items:start}
.meters .stat{display:flex;flex-direction:column;align-items:center;gap:5px;position:relative}
.orb{--orb-color:#c9a762;position:relative;display:grid;place-items:center;width:52px;height:52px;border-radius:50%;border:1px solid #d2bb7b99;background:radial-gradient(circle at 35% 25%,#ffffff75 0%,transparent 19%),radial-gradient(circle at 50% 60%,var(--orb-color),#182e2d 70%);box-shadow:inset 0 0 0 3px #0d2628,inset 0 0 12px #0009,0 3px 12px #0006;transition:box-shadow .2s,transform .2s;overflow:visible}
.orb:before{content:'';position:absolute;inset:5px;border:1px solid #f2e3b84a;border-radius:50%;animation:orb-breathe 3.5s ease-in-out infinite alternate}
.stat[data-stat="hope"] .orb{--orb-color:#bd9456}.stat[data-stat="order"] .orb{--orb-color:#688f9d}.stat[data-stat="craft"] .orb{--orb-color:#a87553}.stat[data-stat="nature"] .orb{--orb-color:#629471}.stat[data-stat="shadow"] .orb{--orb-color:#875671}
.orb-icon{position:absolute;top:5px;color:#fff2c9c9;font-size:13px;line-height:1}.orb-value{position:relative;top:5px;color:#fff9e7;font:600 14px Inter,sans-serif;text-shadow:0 1px 3px #000}.orb-label{font:10px Inter,sans-serif;color:#d0d8c8}
.orb-change{position:absolute;top:-5px;right:-8px;min-width:20px;border-radius:20px;font:700 10px Inter,sans-serif;color:white;padding:3px;text-align:center;opacity:0;transform:translateY(4px);transition:opacity .2s,transform .2s}
.stat.improves .orb{box-shadow:0 0 0 2px #8fddb3,0 0 19px #75d6a888,inset 0 0 9px #0008}.stat.worsens .orb{box-shadow:0 0 0 2px #e6a29a,0 0 19px #e18c7e88,inset 0 0 9px #0008}
.stat.improves .orb-change,.stat.worsens .orb-change{opacity:1;transform:translateY(0)}.stat.improves .orb-change{background:#397c58}.stat.worsens .orb-change{background:#a34f48}
.history li strong,.history li span{display:block}.history li strong{color:#e6deca}.history li span{color:#aebeb3;margin-top:3px}
@keyframes orb-breathe{from{opacity:.35;transform:scale(.94)}to{opacity:.85;transform:scale(1)}}
@media(max-width:700px){.meters{gap:6px;margin-top:12px}.orb{width:44px;height:44px}.orb-value{font-size:12px}.orb-label{font-size:9px}.orb-icon{font-size:11px}.intro{margin:35px auto}.intro p{font-size:19px}}
@media(prefers-reduced-motion:reduce){.orb:before{animation:none}.orb,.orb-change{transition:none}}

/* Each glass sphere holds a separate, clipped liquid layer. */
.orb{background:radial-gradient(circle at 35% 23%,#d7fff42e 0%,transparent 28%),radial-gradient(circle at 50% 62%,#203b3c,#0d2022 75%)}
.orb-glass{position:absolute;inset:5px;border-radius:50%;overflow:hidden;pointer-events:none}
.orb-liquid{position:absolute;bottom:0;left:0;width:100%;overflow:hidden;background:linear-gradient(180deg,color-mix(in srgb,var(--orb-color) 80%,white),var(--orb-color) 25%,color-mix(in srgb,var(--orb-color) 55%,#102425) 100%);box-shadow:inset 0 2px 4px #ffffff66}
.orb-liquid::before{content:'';position:absolute;top:0;left:-25%;width:150%;height:5px;border-radius:50%;background:#ffffff77;animation:liquid-wave 2.8s ease-in-out infinite alternate}
.orb-icon,.orb-value,.orb-change{z-index:2}
.orb:before{z-index:1;pointer-events:none}
@keyframes liquid-wave{from{transform:translateX(-8%) rotate(-2deg)}to{transform:translateX(8%) rotate(2deg)}}
@media(prefers-reduced-motion:reduce){.orb-liquid::before{animation:none}}

/* A slow glimmer moves within the liquid while the surface gently rocks. */
.orb-liquid::after{content:'';position:absolute;inset:-20%;background:radial-gradient(ellipse at 30% 42%,#fff7c866 0%,transparent 27%),radial-gradient(ellipse at 70% 72%,#ffffff38 0%,transparent 24%);opacity:.55;animation:liquid-glimmer 5s ease-in-out infinite alternate;pointer-events:none}
.stat:nth-child(2) .orb-liquid::after{animation-delay:-1.1s}
.stat:nth-child(3) .orb-liquid::after{animation-delay:-2.3s}
.stat:nth-child(4) .orb-liquid::after{animation-delay:-3.4s}
.stat:nth-child(5) .orb-liquid::after{animation-delay:-4.2s}
@keyframes liquid-glimmer{from{transform:translate(-7%,4%) scale(.95);opacity:.35}to{transform:translate(7%,-4%) scale(1.05);opacity:.65}}
@media(prefers-reduced-motion:reduce){.orb-liquid::after{animation:none}}

/* The Blue Wizard advises without interrupting the current turn. */
.advisor-action{max-width:350px;margin:13px auto 0}
.advisor-button{display:flex;align-items:center;gap:11px;width:100%;padding:10px 13px;background:#294c55a8;border:1px solid #90a9a57a;color:#e7e8d9;transition:background-color .2s,border-color .2s,opacity .2s}
.advisor-button:hover,.advisor-button:focus-visible{background:#3b6970a8;border-color:#b5cbbb}
.advisor-button:disabled{opacity:.5;cursor:not-allowed}
.advisor-symbol{display:grid;place-items:center;width:32px;height:32px;flex:none;border:1px solid #abc4bd;border-radius:50%;color:#c9d9cb;font-size:21px}
.advisor-button strong,.advisor-button small{display:block}
.advisor-button strong{font:600 12px Inter,sans-serif}.advisor-button small{margin-top:3px;font:10px Inter,sans-serif;color:#b7cbc3}
.advisor-dialog{width:min(92vw,560px);max-height:min(90dvh,760px);padding:0;border:1px solid #9b9c78;border-radius:12px;background:#173239;color:#ece9db;box-shadow:0 25px 80px #000b;overflow:auto}
.advisor-dialog::backdrop{background:#071415d9;backdrop-filter:blur(3px)}
.advisor-panel{position:relative}.advisor-portrait{height:145px;background:#254c58 url('assets/advisors/blue-wizard.png') center 40% / cover no-repeat;border-bottom:1px solid #9b9c78}
.advisor-close{position:absolute;z-index:1;right:10px;top:10px;border:1px solid #dbd6b76b;border-radius:50%;width:34px;height:34px;padding:0;text-align:center;background:#10282dcc;color:#efe7d4;font-size:24px;line-height:1}
.advisor-content{padding:20px 23px 24px}.advisor-caption{color:#b9c8b3;font:10px Inter,sans-serif;letter-spacing:.16em}
.advisor-content h2{font-size:32px;margin:7px 0 10px;color:#ede4cf}
.advisor-content>p{font:17px/1.35 'Cormorant Garamond',serif;color:#d6e2d9;margin:0 0 17px}
.advisor-options{display:grid;gap:10px}.advisor-options section{padding:12px;border:1px solid #96aaa052;background:#0f292dcc}
.advisor-option-title{font:600 12px/1.4 Inter,sans-serif;color:#f2ead7}.advisor-option-title span{color:#d0b879;font-size:16px}
.advisor-effects{margin-top:6px;color:#aecfca;font:11px/1.5 Inter,sans-serif}.advisor-note{font:12px/1.5 Inter,sans-serif;color:#d6cfb9;margin:7px 0 0}
.advisor-dismiss{width:100%;text-align:center;margin-top:14px;padding:12px;background:#b39b69;color:#14282a;font-size:12px;font-weight:600;border:0}
.advisor-dismiss:hover{background:#c5b080;color:#14282a}
@media(max-width:700px){.advisor-action{margin-top:10px}.advisor-portrait{height:115px}.advisor-content{padding:15px 17px 20px}.advisor-content h2{font-size:27px}.advisor-content>p{font-size:16px}}
.advisor-portrait{background-size:contain;background-position:center;background-repeat:no-repeat}

/* Hold-to-choose controls */
.hold-choice{position:relative;isolation:isolate;overflow:hidden;touch-action:pan-y;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.hold-choice::before{content:'';position:absolute;z-index:-1;inset:0;background:linear-gradient(90deg,#8caa9070,#a6b98f88);transform:scaleX(0);transform-origin:left;transition:transform .2s ease-out;pointer-events:none}
.hold-choice[data-choice="1"]::before{transform-origin:right}
.hold-choice.holding::before{transform:scaleX(1);transition:transform 1.5s linear}
.hold-choice .hold-copy{display:flex;flex-direction:column;gap:8px}
.hold-choice .hold-copy strong{font:600 15px/1.35 Inter,sans-serif;color:#eee9d9}
.hold-choice .hold-copy small{font:10px/1.3 Inter,sans-serif;color:#aabeb2}
.hold-choice .hold-label{font:10px Inter,sans-serif;letter-spacing:.16em;color:#cbb980}
.hold-choice .choice-arrow{display:grid;place-items:center;flex:none;width:43px;height:43px;border:1px solid #b7a4717a;border-radius:50%;font:23px Inter,sans-serif;color:#dec893}
.side-choice.hold-choice{min-height:132px;width:100%;padding:18px;gap:14px;border:1px solid #95b0a069;border-radius:9px;background:#193d3abf;box-shadow:inset 0 0 0 3px #d9bd6b0d,0 8px 20px #0003}
.side-choice.hold-choice:hover,.side-choice.hold-choice:focus-visible,.side-choice.hold-choice.holding{background:#28514dcf;border-color:#c8b47a;outline:2px solid #d2bc7755;outline-offset:2px}
.left-choice .hold-copy{align-items:flex-end}.right-choice .hold-copy{align-items:flex-start}
.mobile-choices .hold-choice{display:flex;align-items:center;justify-content:center;gap:6px;min-height:78px;padding:9px;border:1px solid #95b0a069;border-radius:7px;background:#193d3abf;text-align:center}
.mobile-choices .hold-choice .hold-copy{gap:5px}
.mobile-choices .hold-choice .hold-copy strong{font-size:11px}
.mobile-choices .hold-choice .hold-copy small{font-size:9px}
.mobile-choices .hold-choice .choice-arrow{width:25px;height:25px;font-size:15px}
.hold-choice:disabled{opacity:.5;cursor:default}
@media(prefers-reduced-motion:reduce){.hold-choice.holding::before{transition:transform 1.5s linear}}

/* Tilt around the lower part of the card. */
.story-card{transform-origin:50% 85%}

/* Dynamic Deck Injection: Toast, Flying Cards, Deck Pulse */
#toast-layer{position:fixed;top:18px;left:50%;transform:translateX(-50%);z-index:1000;pointer-events:none;width:min(92vw,480px);display:flex;flex-direction:column;align-items:center;gap:8px}
.deck-toast{display:flex;align-items:center;gap:9px;padding:9px 18px;background:linear-gradient(135deg,rgba(23,49,52,.96) 0%,rgba(13,30,32,.98) 100%);border:1px solid #c9b076;border-radius:8px;box-shadow:0 10px 30px rgba(0,0,0,.65),0 0 15px rgba(201,176,118,.3),inset 0 0 0 1px rgba(255,255,255,.08);font:12px/1.4 Inter,sans-serif;color:#e5e2d4;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.deck-toast.toast-enter{animation:toast-in 380ms cubic-bezier(.16,1,.3,1) forwards}
.deck-toast.toast-exit{animation:toast-out 350ms cubic-bezier(.4,0,1,1) forwards}
.toast-sparkle{color:#d8be7f;font-size:15px;text-shadow:0 0 8px rgba(216,190,127,.7);flex-shrink:0}
.toast-text{font-size:12px}
.toast-text strong{color:#fff1cc;font-family:'Cormorant Garamond',serif;font-size:15px;font-weight:700;letter-spacing:.02em}
.toast-count{display:inline-block;margin-left:3px;padding:1px 6px;border-radius:10px;background:#2a524c;color:#8ce1cc;font-weight:600;font-size:11px}

@keyframes toast-in{0%{opacity:0;transform:translateY(-16px) scale(.95)}100%{opacity:1;transform:translateY(0) scale(1)}}
@keyframes toast-out{0%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(-12px) scale(.96)}}

#effects-layer{position:fixed;inset:0;pointer-events:none;z-index:900;overflow:hidden}
.flying-card{position:fixed;top:0;left:0;width:44px;height:62px;margin-left:-22px;margin-top:-31px;pointer-events:none;background:#172a21 url('assets/card-back.png') center / cover no-repeat;border:1.5px solid #d2b77c;border-radius:6px;box-shadow:0 10px 25px rgba(0,0,0,.7),0 0 14px rgba(210,183,124,.6);will-change:transform,opacity}

.deck.pulse-inject{animation:deck-pulse 650ms cubic-bezier(.16,1,.3,1)}
@keyframes deck-pulse{0%{transform:scale(1);filter:drop-shadow(0 0 0 transparent)}35%{transform:scale(1.055);filter:drop-shadow(0 0 22px rgba(210,183,124,.85)) brightness(1.08)}100%{transform:scale(1);filter:drop-shadow(0 0 0 transparent)}}

/* Idle nudge: the deck gently rocks to hint that the card can be swiped. */
.deck.hint-swipe{animation:deck-hint 1200ms cubic-bezier(.36,.07,.19,.97) both;transform-origin:50% 88%}
@keyframes deck-hint{
  0%,100%{transform:translateX(0) rotate(0)}
  10%{transform:translateX(-7px) rotate(-1.8deg)}
  24%{transform:translateX(7px) rotate(1.8deg)}
  38%{transform:translateX(-5px) rotate(-1.2deg)}
  52%{transform:translateX(5px) rotate(1.2deg)}
  66%{transform:translateX(-3px) rotate(-.6deg)}
  80%{transform:translateX(3px) rotate(.6deg)}
}

@media(prefers-reduced-motion:reduce){
  .deck-toast.toast-enter{animation:none;opacity:1;transform:none}
  .deck-toast.toast-exit{animation:none;opacity:0}
  .deck.pulse-inject{animation:none}
  .deck.hint-swipe{animation:none}
}

/* Desktop choices blend into the table around the deck. */
@media(min-width:701px){
  .deck{z-index:1}
  .side-choice.hold-choice{align-self:stretch;height:100%;min-height:0;padding:24px 18px;border:0;border-radius:0;background:transparent;box-shadow:none;overflow:visible}
  .side-choice.hold-choice::after{content:'';position:absolute;z-index:-2;inset:-80px -140px;opacity:0;pointer-events:none;transition:opacity .35s ease}
  .left-choice.hold-choice::after{background:radial-gradient(ellipse 75% 50% at 75% 50%,#6f9e8e52 0%,#5e8f8024 50%,transparent 100%)}
  .right-choice.hold-choice::after{background:radial-gradient(ellipse 75% 50% at 25% 50%,#6f9e8e52 0%,#5e8f8024 50%,transparent 100%)}
  .side-choice.hold-choice:hover,.side-choice.hold-choice:focus-visible,.side-choice.hold-choice.holding{background:transparent;border:0;box-shadow:none;outline:0}
  .side-choice.hold-choice:hover::after,.side-choice.hold-choice:focus-visible::after,.side-choice.hold-choice.holding::after{opacity:1}
  .side-choice.hold-choice:focus-visible{outline:2px solid #c6b780;outline-offset:-3px}
  .side-choice.hold-choice .choice-arrow{border:0}
}
@media(prefers-reduced-motion:reduce){.side-choice.hold-choice::after{transition:none}}

/* Hold progress blooms outward from the deck. */
.hold-choice::before,.hold-choice[data-choice="1"]::before{inset:-35px;transform-origin:center;background:radial-gradient(ellipse at center,rgba(218,183,105,.48) 0%,rgba(192,151,72,.26) 38%,rgba(179,141,68,0) 72%);transform:scale(0);opacity:0;transition:transform .25s ease,opacity .25s ease;pointer-events:none}
.hold-choice.holding::before{transform:scale(1);opacity:1;transition:transform 1.5s linear,opacity .25s ease}
@media(min-width:701px){
  .side-choice.hold-choice::before{inset:-80px -140px}
  .left-choice.hold-choice::before{transform-origin:75% 50%;background:radial-gradient(ellipse 75% 50% at 75% 50%,rgba(218,183,105,.48) 0%,rgba(192,151,72,.26) 38%,rgba(179,141,68,0) 100%)}
  .right-choice.hold-choice::before{transform-origin:25% 50%;background:radial-gradient(ellipse 75% 50% at 25% 50%,rgba(218,183,105,.48) 0%,rgba(192,151,72,.26) 38%,rgba(179,141,68,0) 100%)}
}
@media(prefers-reduced-motion:reduce){.hold-choice.holding::before{transition:transform 1.5s linear,opacity .25s ease}}

/* A subtle elven compass mark appears over the darkened illustration. */
.card-art::after{display:block;position:absolute;inset:0;background:rgba(5,20,20,.38);opacity:0;transition:opacity .22s ease;z-index:1;pointer-events:none}
.card-art.previewing::after{opacity:1}
.card-stamp{font:600 54px/1 'Cormorant Garamond',serif;color:#ead6a2;text-shadow:0 2px 8px #061715,0 0 14px #e8d29775}
.card-stamp:not(:empty)::before{content:'';position:absolute;width:110px;height:68px;border:1px solid #e5cf96a8;border-radius:50%;box-shadow:inset 0 0 0 3px #e5cf9622,0 0 15px #0b1b18aa}
.card-stamp:not(:empty)::after{content:'✧';position:absolute;transform:translateY(-34px);font:20px/1 'Cormorant Garamond',serif;color:#f3dca4;text-shadow:0 1px 5px #061715}
@media(prefers-reduced-motion:reduce){.card-art::after{transition:none}}

/* The elven arrow fades with the choice preview. */
.card-stamp{opacity:0;transition:opacity .24s ease}
.card-art.previewing .card-stamp{opacity:1}
.card-stamp::before{content:'';display:block;width:min(42%,140px);height:100px;background:url('assets/elven-fleur-spear.png') center / contain no-repeat;filter:drop-shadow(0 2px 5px #071614bb)}
.card-stamp.direction-left::before{transform:scaleX(-1)}
@media(prefers-reduced-motion:reduce){.card-stamp{transition:none}}

/* Clan leader selection */
.leader-select {
  max-width:1000px;
}

.leader-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin:24px 0;
}

.leader-card {
  display:flex;
  align-items:center;
  gap:12px;
  text-align:left;
  padding:10px;
  border:1px solid #b8aa803f;
  background:#17231ddb;
  color:#e9e0cd;
  cursor:pointer;
}

.leader-card img {
  width:72px;
  height:92px;
  object-fit:cover;
  object-position:top;
  border:1px solid #c1ad7955;
}

.leader-card span {
  display:grid;
  gap:4px;
}

.leader-card strong {
  font-size:22px;
}

.leader-card small,.leader-card em {
  font:12px/1.4 Inter,sans-serif;
  color:#c6b992;
}

.leader-card em {
  font-style:normal;
  color:#b7bcac;
}

.leader-card.selected {
  border-color:#e3c47a;
  box-shadow:0 0 0 1px #e3c47a;
}

.leader-card:disabled {
  opacity:.55;
  cursor:not-allowed;
}

.leader-detail,.leader-unlock {
  color:#e0c990;
}

.leader-card:focus-visible {
  outline:2px solid #e3c47a;
  outline-offset:2px;
}

@media(max-width:700px) {
  .leader-grid {
    grid-template-columns:1fr 1fr;
  }
  .leader-card {
    align-items:flex-start;
  }
  .leader-card img {
    width:48px;
    height:66px;
  }
  .leader-card strong {
    font-size:18px;
  }
  .leader-card small,.leader-card em {
    font-size:10px;
  }
}

@media(max-width:420px) {
  .leader-grid {
    grid-template-columns:1fr;
  }
}

/* Parameter spheres */
.meters{max-width:560px}
.orb{width:68px;height:68px;border:1px solid var(--orb-rim,#bdab7d);box-shadow:inset 0 0 0 3px #0b2325,inset 0 0 14px #000b,0 3px 12px #0007,0 0 12px var(--orb-glow,transparent)}
.orb-glass{inset:6px}
.orb-icon{top:8px;font-size:17px;color:var(--orb-light,#fff0c8);text-shadow:0 0 8px var(--orb-glow,transparent)}
.orb-value{top:7px;font-size:16px;text-shadow:0 1px 4px #000,0 0 6px #000}
.orb-label{font-size:11px}
.stat[data-stat="hope"] .orb{--orb-color:#ca9a49;--orb-rim:#cfb878;--orb-light:#ffe7a8;--orb-glow:#d2a64e55}
.stat[data-stat="order"] .orb{--orb-color:#5d96b5;--orb-rim:#9eb8be;--orb-light:#d8f4ff;--orb-glow:#73b1d355}
.stat[data-stat="craft"] .orb{--orb-color:#bd7446;--orb-rim:#c39c72;--orb-light:#ffe0bb;--orb-glow:#c77d4a55}
.stat[data-stat="nature"] .orb{--orb-color:#5a9b68;--orb-rim:#a0b98b;--orb-light:#ddf7c6;--orb-glow:#75c18155}
.stat[data-stat="shadow"] .orb{--orb-color:#755279;--orb-rim:#ae8ba5;--orb-light:#f0d0ed;--orb-glow:#a579ac55}
.orb-liquid{background:linear-gradient(180deg,color-mix(in srgb,var(--orb-color) 74%,white),var(--orb-color) 23%,color-mix(in srgb,var(--orb-color) 48%,#0a1d22) 100%);box-shadow:inset 0 2px 5px #fff8;border-radius:42% 54% 0 0 / 5px 5px 0 0}
.orb-liquid::before{top:-1px;left:0;width:200%;height:9px;border-radius:0;background:radial-gradient(ellipse 9px 5px at 9px 4px,#fffbdca6 35%,#ffffff38 58%,transparent 70%) 0 0 / 18px 9px repeat-x;animation:liquid-ripples 2.4s linear infinite;opacity:.85}
.orb-liquid::after{background:radial-gradient(ellipse at 28% 34%,#fff7c88a 0%,transparent 27%),radial-gradient(ellipse at 72% 70%,#ffffff4d 0%,transparent 24%)}
@keyframes liquid-ripples{from{transform:translateX(0)}to{transform:translateX(-18px)}}
@media(max-width:700px){
  .meters{gap:3px;max-width:420px}
  .orb{width:clamp(48px,14vw,58px);height:clamp(48px,14vw,58px)}
  .orb-icon{top:6px;font-size:14px}
  .orb-value{top:6px;font-size:14px}
  .orb-label{font-size:clamp(8px,2.4vw,10px)}
}
@media(prefers-reduced-motion:reduce){.orb-liquid::before{animation:none}}
.toggle[hidden]{display:none}

/* Chronicle screens: the same dark wood, parchment and gold as the card table. */
.chronicle-screen{width:min(100% - 48px,920px);max-width:920px;margin:36px auto 64px;padding:0;border:1px solid #c9b98b4a;background:#17211d;box-shadow:0 24px 70px #0008}
.screen-hero{position:relative;isolation:isolate;overflow:hidden;min-height:235px;display:flex;flex-direction:column;justify-content:flex-end;padding:42px 52px;background:linear-gradient(90deg,#0e1a19f7 0%,#13231edb 50%,#14231e62 100%),url('assets/scenes/river.png') center 50% / cover}
.screen-hero::after{content:'';position:absolute;inset:10px;border:1px solid #e1ca8852;pointer-events:none}
.screen-hero .eyebrow{color:#e1c993;line-height:1.7;letter-spacing:.16em}
.screen-hero .ornament{font-size:17px;margin:22px 0 0;color:#e2c98a}
.screen-hero h1{font-size:clamp(42px,6vw,68px);line-height:1.02;max-width:650px;margin:14px 0 0;text-shadow:0 2px 12px #000a}
.screen-hero p.hero-subtitle{margin:12px 0 0;font:11px/1.5 Inter,sans-serif;text-transform:uppercase;letter-spacing:.16em;color:#e1c993}
.screen-hero>p:not(.hero-subtitle){margin:12px 0 0;color:#e3e1d2;font:20px/1.4 'Cormorant Garamond',serif}
.screen-content{padding:36px 52px 46px;background:linear-gradient(145deg,#1d2922,#141e1b)}
.screen-content>p{max-width:740px;font-size:21px;line-height:1.5;color:#e1dfd1}
.screen-content>p.small,.screen-content .small{font:13px/1.65 Inter,sans-serif;color:#bdc4b6}
.expansion-panel{margin:30px 0 22px;padding:23px 25px;border:1px solid #b9aa7d52;background:#0d1714a8}
.expansion-panel h2{font-size:27px;color:#e9ddbf;margin:0 0 5px}
.expansion-panel>p{margin:0 0 14px}
.chronicle-screen .toggle{margin:8px 0;padding:14px 16px;align-items:flex-start;line-height:1.5;background:#ffffff08;border-color:#c3b58c39}
.chronicle-screen .toggle:hover{border-color:#d5bd80}
.chronicle-screen .toggle input{flex:none;margin:3px 0 0}
.chronicle-screen .toggle[hidden]{display:none}
.chronicle-screen #amulet-option{margin-left:24px;border-left:2px solid #c5a764}
.screen-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:25px}
.chronicle-screen .action{margin:0;min-height:48px;padding:13px 21px;font-size:13px;letter-spacing:.02em}
.chronicle-screen .action:focus-visible{outline:2px solid #f2d58b;outline-offset:3px}
.chronicle-screen .secondary-action,.chronicle-screen .danger-action{background:transparent;color:#ded5bd;border:1px solid #cabd9773}
.chronicle-screen .secondary-action:hover,.chronicle-screen .danger-action:hover{background:#ffffff10;color:#fff0ca}
.chronicle-screen .danger-action{margin-left:auto;color:#c8b7a4;border-color:#a78b7b70}
.leader-select .screen-hero{min-height:210px;background-image:linear-gradient(90deg,#111d19f7,#15241fd9 55%,#15241e69),url('assets/scenes/trail.png')}
.leader-select .leader-grid{margin:0 0 22px;gap:10px}
.leader-select .leader-card{min-width:0;background:#101b17;border-color:#b5a77755;padding:12px;align-items:flex-start}
.leader-select .leader-card img{width:70px;height:100px;flex:none;object-fit:cover}
.leader-select .leader-card strong{font:600 23px/1 'Cormorant Garamond',serif;color:#f2e8d2}
.leader-select .leader-card small,.leader-select .leader-card em{font-size:12px;line-height:1.45}
.leader-select .leader-card:disabled{opacity:.7}
.leader-select .leader-card.selected{background:#29342a;border-color:#e3c47a}
.screen-content .leader-detail{max-width:none;margin:0;padding:17px 20px;border-left:2px solid #c4a86d;background:#101b17;font:14px/1.6 Inter,sans-serif;color:#e1d3af}
.result-screen .screen-hero{background-image:linear-gradient(90deg,#101b19f5,#14221dd1 55%,#14231e66),url('assets/scenes/siege.png')}
.defeat-screen .screen-hero{background-image:linear-gradient(90deg,#191819f5,#251d1dd4 55%,#241d1d70),url('assets/scenes/siege.png')}
.transition-screen .screen-hero{background-image:linear-gradient(90deg,#111d1af5,#14251dd1 55%,#14231e66),url('assets/scenes/trail.png')}
.chronicle-screen .result-stats{gap:8px;margin:24px 0}
.chronicle-screen .pill{padding:11px 14px;background:#101a16;border-color:#c8b47d55;color:#e4d4a6;font:12px/1.4 Inter,sans-serif}
.chronicle-screen .history{max-width:none;margin:26px 0 0;padding:17px 0 0;font-size:13px;line-height:1.6}
.chronicle-screen .history summary{color:#e0c98e;padding:4px 0}
.chronicle-screen .history ol{padding-left:24px}
@media(max-width:700px){
  .chronicle-screen{width:calc(100% - 24px);margin:12px auto 28px}
  .screen-hero{min-height:190px;padding:32px 26px;background-position:60% center}
  .screen-hero h1{font-size:clamp(38px,10vw,48px)}
  .screen-hero .eyebrow{font-size:9px}
  .screen-content{padding:26px 24px 32px}
  .screen-content>p{font-size:19px;line-height:1.48}
  .expansion-panel{padding:18px 16px;margin-top:24px}
  .expansion-panel h2{font-size:24px}
  .screen-actions{flex-direction:column;align-items:stretch}
  .chronicle-screen .action{width:100%;margin:0}
  .leader-select .leader-grid{grid-template-columns:1fr 1fr}
  .leader-select .leader-card{padding:9px;gap:8px}
  .leader-select .leader-card img{width:48px;height:70px}
  .leader-select .leader-card strong{font-size:20px}
  .leader-select .leader-card small,.leader-select .leader-card em{font-size:11px}
}
@media(max-width:480px){.leader-select .leader-grid{grid-template-columns:1fr}.leader-select .leader-card img{width:58px;height:78px}}
