@font-face{font-family:CovenantSerif;src:url('/assets/fonts/covenant-serif.ttf') format('truetype');font-display:swap}
:root{
 --ink:#26364b;--deep:#f7f3eb;--panel:#fffdf8;--paper:#26364b;--muted:#6b7481;
 --gold:#a8874b;--bright:#355d8c;--blue:#3f638c;--blue-dark:#294866;--violet:#6f617f;
 --line:#d9cdb4;--green:#3f7967;--rose:#a9555c;--serif:CovenantSerif,'STKaiti','KaiTi',serif;
 --sans:'Microsoft YaHei','PingFang SC',system-ui,sans-serif;
 --scene:none;--shadow:0 5px 18px #28384a14;
 color-scheme:light;font-synthesis:none
}
*{box-sizing:border-box}
html{margin:0;min-width:320px;scrollbar-color:#94aed1 #eef4fb;scrollbar-width:thin}
body{margin:0;min-height:100svh;background:var(--deep);color:var(--ink);font:15px/1.65 var(--sans);isolation:isolate}
/* Quiet paper field: the shared background is CSS-only so every screen stays readable and local. */
body:before{content:'';position:fixed;inset:0;z-index:-2;pointer-events:none;background:
 radial-gradient(circle at 14% 18%,#b9985418 0 1px,transparent 1.5px),
 radial-gradient(circle at 82% 76%,#b9985414 0 1px,transparent 1.5px),
 linear-gradient(112deg,transparent 0 18%,#c7a65b0d 18.1% 18.2%,transparent 18.3% 81%,#c7a65b0b 81.1% 81.2%,transparent 81.3%),
 repeating-linear-gradient(0deg,transparent 0 47px,#c7a65b0b 48px,#c7a65b0b 49px,transparent 50px),
 var(--deep)}
body:after{content:'';position:fixed;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 50% 42%,transparent 0 58%,#b89c6410 100%)}
body[data-screen=battle]:after{background:linear-gradient(180deg,transparent 0 76%,#b99a6411 100%)}
body.chapter-two{--violet:#6f617f;--blue:#53627d;--deep:#f7f3eb}
button,input,select{font:inherit}button{color:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
button:disabled{cursor:not-allowed;opacity:.58}button:focus-visible,input:focus-visible,select:focus-visible,[role=button]:focus-visible{outline:3px solid #2774c9;outline-offset:4px}
button,select,input{accent-color:var(--blue)}input{caret-color:var(--blue)}
::selection{background:#c5dcff;color:#173b72}a{color:var(--blue);text-underline-offset:4px}
img{display:block;max-width:100%;user-select:none}
h1,h2,h3,p{margin:0}h1,h2,h3{font-family:var(--serif);font-weight:600;text-wrap:balance}
h1{font-size:clamp(30px,3.4vw,46px);line-height:1.4}h2{font-size:30px}h3{font-size:21px}
p{color:var(--muted)}strong,b{font-weight:600}.icon{width:23px;height:23px;flex-shrink:0;display:inline-block;vertical-align:-5px}
button .icon{vertical-align:middle}.artwork{display:block;user-select:none;flex-shrink:0}
.sprite{background-image:var(--art-url);background-size:var(--art-size);background-position:var(--art-x) var(--art-y);background-repeat:no-repeat}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:11px 23px;border:1px solid #b9c8dc;border-radius:6px;background:#fbfdff;color:var(--ink);line-height:1.5;transition:transform .2s ease-out,background .2s}
.btn:hover:not(:disabled){background:#eaf2ff;transform:translateY(-2px)}
.btn.primary{position:relative;border:2px solid #d8b778;background:linear-gradient(160deg,#3479c7,#204f9c);color:#fffdf6;box-shadow:inset 0 0 0 2px #ffffff28,0 5px 12px #1f468224;font-weight:600}
.btn.primary:before,.btn.primary:after{content:'';position:absolute;top:50%;width:7px;height:7px;border:1px solid #e6c78d;background:#ecd49d;transform:translateY(-50%) rotate(45deg)}
.btn.primary:before{left:5px}.btn.primary:after{right:5px}
.btn.primary:hover:not(:disabled){background:linear-gradient(160deg,#4988d4,#2c5daf)}
.btn.quiet{background:transparent;border-color:transparent;color:var(--muted);box-shadow:none}
.btn.quiet:hover:not(:disabled){color:var(--blue);background:#fff9}
.text-button{min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:8px;border:0;background:transparent;color:var(--muted)}
.text-button:hover{color:var(--blue)}.icon-button{height:44px;width:44px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #c6d3e2;background:#f8fbffe8;border-radius:6px}
.icon-button:hover{background:#e7effb}.chosen{border-color:var(--blue)!important;background:#e8f0fd!important}
.page-heading{margin-bottom:28px}.page-heading p{margin-top:12px;max-width:64ch;line-height:1.9}
.fine-print{font-size:13px;color:var(--muted);margin-top:22px}.boot{min-height:100svh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px}
/* Opening: the same garden and heroine establish the adventure before play. */
.menu-screen{position:relative;min-height:100svh;padding:70px max(7vw,32px) 90px;display:flex;align-items:center;overflow:hidden}
.menu-content{position:relative;z-index:2;max-width:550px;width:44%}
.wordmark h1{font-size:clamp(64px,7.5vw,100px);line-height:1.12;letter-spacing:.05em;color:#193b6d;text-shadow:0 2px 0 #fff}
.wordmark h1 span{display:block;margin-left:.8em}.wordmark-line{display:flex;align-items:center;gap:16px;max-width:310px;margin:20px 0}
.wordmark-line span{height:1px;background:#a78249;flex:1}.wordmark-line p{font-family:var(--serif);font-size:21px;letter-spacing:.12em;color:#795b2e}
.menu-story{font-family:var(--serif);font-size:19px;line-height:1.9;color:#344f75;margin:26px 0}
.menu-nav{display:flex;flex-direction:column;align-items:stretch;max-width:300px;gap:8px}.menu-nav .btn:not(.primary){background:#fffc;border-color:#d9d1bf}
.menu-nav .primary{min-height:56px}.menu-note{font-size:13px;margin-top:26px}.menu-note span{font-size:12px}
.menu-art{position:absolute;right:4%;bottom:6%;width:51%;height:86%;pointer-events:none}
.menu-actor{position:relative;z-index:1;height:100%;width:100%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 15px 18px #21487730);animation:arrival .8s ease-out}
.menu-seal{position:absolute;width:52%;right:18%;bottom:8%;opacity:.12}.menu-bottom{position:absolute;bottom:20px;left:7vw;right:5vw;display:flex;align-items:center;justify-content:space-between;color:#385574;font-size:12px}
.save-error{background:#fff4ed;color:#943e38;padding:14px;margin-top:20px}.save-error .btn{margin-top:10px}
/* Shared HUD */
.topbar{min-height:56px;padding:7px clamp(15px,3vw,45px);background:#fffaf2f5;border-bottom:1px solid #d2bd91;display:flex;align-items:center;gap:24px;position:relative;z-index:3}
.brand{display:flex;align-items:center;gap:10px;background:none;border:0;white-space:nowrap;font:24px var(--serif);font-weight:700}
.brand img{width:32px;height:32px}.player-summary{display:flex;align-items:center;gap:12px}.player-summary>strong{font-family:var(--serif);font-size:18px}.chapter-chip{font-size:12px;color:#5a6e86}
.top-actions{margin-left:auto;display:flex;align-items:center;gap:12px}.gold{display:flex;align-items:center;gap:6px;font-variant-numeric:tabular-nums;color:#785b26}
.relic-strip{min-height:37px;display:flex;align-items:center;gap:12px;padding:2px clamp(15px,3vw,45px);background:#fcf9f0dc;overflow-x:auto;border-bottom:1px solid #d8ccb2;font-size:11px}
.relic{display:inline-flex;align-items:center;gap:7px;background:transparent;border:0;white-space:nowrap;min-height:32px;color:#475c79}
.relic img,.relic .artwork{width:27px;height:27px;border-radius:50%;border:1px solid var(--gold);object-fit:cover}
.save-status{margin-left:auto;white-space:nowrap;color:#55705e}.game-footer{display:flex;justify-content:space-between;gap:15px;padding:12px 3vw;font-size:11px;color:#3b5370;background:#fff8}
.health{width:155px;height:19px;position:relative;border:1px solid #b5a788;border-radius:12px;overflow:hidden;background:#e6d9cc}
.health-fill{height:100%;transform-origin:left;background:linear-gradient(0deg,#c34b56,#ed7f80)}
.health span{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px;line-height:1;font-weight:600;text-shadow:0 1px 2px #703035;font-variant-numeric:tabular-nums}
.health .icon{height:13px;width:13px;margin-right:3px}
.block-stat{display:inline-flex;align-items:center;gap:4px;font-size:13px;font-weight:600;color:#215a83;min-width:34px}
.block-stat .icon{width:20px;height:20px}
/* Adventure screens */
.character-screen{max-width:1360px;margin:auto;padding:30px 5vw 55px}.character-header{display:flex;gap:40px;align-items:flex-start}.character-header .page-heading{flex:1}
.character-layout{display:grid;grid-template-columns:220px minmax(220px,1fr) minmax(290px,390px);gap:30px;align-items:center}
.character-choices{display:grid;gap:18px}.character-choice{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:10px;min-height:140px;padding:15px;border:1px solid #c3cfe0;background:#fffaf3e8;border-radius:10px;text-align:left}
.character-choice img{height:90px;width:55px;object-fit:contain}.character-choice strong{font-family:var(--serif);font-size:24px}.character-choice small{display:block;font-size:11px}.character-choice>b{font-size:12px;margin-left:auto}
.character-choice.chosen{box-shadow:0 6px 17px #3159911f}.character-portrait{position:relative;min-height:580px;display:flex;align-items:center;justify-content:center}
.character-portrait>img{height:580px;object-fit:contain;position:relative;z-index:1;filter:drop-shadow(0 12px 12px #3658822e)}.portrait-ring{position:absolute;width:80%;aspect-ratio:1;border:1px solid #bba15f;border-radius:50%;opacity:.4}
.character-copy h2{font-size:56px;color:#224b80}.character-copy h3{font-size:23px;color:#796439}.character-copy p{margin-top:14px;font-size:14px;line-height:1.9}
.character-copy .character-tagline{font-size:18px;font-family:var(--serif);color:#314d73}.character-mechanics{padding:16px 0;margin:18px 0;border-top:1px solid #bdbda8;border-bottom:1px solid #bdbda8}
.character-mechanics strong{color:#325f98}.character-mechanics p{font-size:12px;margin-top:6px}
.seed-label{display:block;font-size:13px;margin:18px 0}.seed-label span{font-size:11px;margin-left:8px;color:var(--muted)}
.seed-label input{display:block;min-height:44px;width:100%;margin-top:8px;padding:8px 12px;background:#fffdf6;border:1px solid #aebed3;border-radius:5px;color:var(--ink)}
.seed-label input::placeholder{color:#65738a}
.chapter-intro{min-height:calc(100svh - 140px);max-width:790px;margin:auto;padding:80px 30px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:23px}
.chapter-emblem{width:80px}.chapter-intro h1{font-size:46px}.chapter-intro>p{max-width:58ch;line-height:2}.chapter-intro .intro-sub{font-family:var(--serif);font-size:25px;color:#446393}.intro-carry{font-size:12px}
.map-screen{max-width:1300px;margin:auto;display:grid;grid-template-columns:360px minmax(0,1fr);gap:65px;padding:30px 4vw}
.map-copy{padding-top:55px}.map-legend{display:flex;gap:12px 20px;flex-wrap:wrap;margin:25px 0}.map-legend>span{font-size:12px}.map-legend .icon{width:20px;height:20px}
.map-hint{font-size:14px;line-height:1.9}.route-journal{margin-top:35px;padding-top:23px;border-top:1px solid #b9bac3}.route-journal p{font-size:12px;margin-top:14px}
.map-scroll{overflow:hidden}.route-map{position:relative;height:800px;width:100%;max-width:680px;background:#f7fbfff2;border-radius:50% 50% 8px 8px}
.map-lines{position:absolute;inset:0;width:100%;height:800px}.map-lines path{fill:none;stroke:#a1b5d0;stroke-width:2;stroke-dasharray:5 5}.map-lines path.traveled{stroke:#937137;stroke-dasharray:none;stroke-width:3}
.map-node{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);width:125px;display:flex;flex-direction:column;align-items:center;gap:3px;background:none;border:0;padding:0}
.map-node:disabled{opacity:1;cursor:default}.node-medallion{height:47px;width:47px;border:1px solid #97b0d3;border-radius:10px;display:flex;align-items:center;justify-content:center;background:#e7eef8;transform:rotate(45deg);margin-bottom:8px}
.node-medallion .icon{transform:rotate(-45deg)}.map-node strong{font:17px var(--serif);color:#385477}.map-node small{font-size:11px;color:#546984}
.map-node.reachable .node-medallion{border:2px solid #bb9245;background:#fff2cc;box-shadow:0 5px 13px #76613225}
.map-node.reachable strong{color:#76571d}.map-node.boss .node-medallion{background:#e8e1f6;border-color:#9b81bb}.map-node.current .node-medallion{background:#c8e4ff}.map-node.done{opacity:.65}
.map-end-note{position:absolute;bottom:10px;left:0;right:0;text-align:center;font-size:12px;color:#5f6584}
/* A: top action ribbon, full character stage, ivory control seam, foreground hand. */
.battle-screen{--stage-height:clamp(265px,100svh - 620px,425px);max-width:1760px;margin:auto;position:relative;padding:0 3vw 12px;isolation:isolate}
.battle-screen:before{content:'';position:absolute;z-index:-1;top:-93px;left:calc(50% - 50vw);width:100vw;height:calc(139px + var(--stage-height));background:var(--scene) center/100% 100% no-repeat;pointer-events:none}
.battle-meta{min-height:46px;display:flex;align-items:center;gap:15px;justify-content:space-between}
.battle-meta>.text-button{background:#fffaf2d9;border-radius:6px;font-size:12px;padding:5px 10px}
.action-queue{list-style:none;display:flex;gap:10px;align-items:center;padding:0;margin:0;min-width:0}
.action-queue li{display:flex;align-items:center;gap:8px;padding:4px 7px;color:#203f70;font-size:12px;background:#fffaf2e8;border:1px solid #d6c6a2;border-radius:30px}
.action-queue .current{background:#e2edff;border-color:#bd8f3d;box-shadow:0 4px 10px #234a731c}
.queue-avatar{display:block!important;flex-shrink:0;width:30px;height:30px;overflow:hidden;border:1px solid #baa068;border-radius:50%;background-color:#e9eef6}
.queue-portrait{width:100%;height:100%;object-fit:cover;transform:scale(2.8);transform-origin:50% var(--portrait-focus,17%)}
img.queue-portrait{object-position:center top}
.action-queue .icon{width:17px;height:17px;color:#8d743d;margin-right:-22px;position:relative;right:-2px;z-index:1}
.action-queue li:not(:last-child){margin-right:15px}.action-queue li span:not(.artwork){white-space:nowrap}
.battle-stage{position:relative;height:var(--stage-height);display:flex;align-items:flex-end;justify-content:space-between;padding:0 7%}
.combatant{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:0;max-width:300px}
.combatant.player{width:30%;margin-right:auto}.player-name{position:absolute;left:50%;transform:translateX(-50%);bottom:58px;z-index:1;white-space:nowrap;text-align:center;text-shadow:0 2px 5px #fff}
.player-name>span{display:none}.player-name h2{font-size:23px;color:#213f6a}
.actor{height:clamp(200px,24svh,300px);width:250px;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 10px 9px #17365b40)}
.player-actor{height:clamp(220px,26svh,330px);width:285px}
.enemy-actor{height:min(clamp(200px,24svh,300px),var(--stage-height) - 166px)}
.enemy-actor.sprite{width:min(clamp(200px,24svh,300px),var(--stage-height) - 166px);transform:translateY(var(--actor-drop)) scale(var(--actor-scale));transform-origin:center bottom}
.combatant.acting .actor{filter:drop-shadow(0 12px 11px #2a52834a)}.enemy-party{display:flex;justify-content:center;align-items:flex-end;gap:45px;width:49%;height:100%}
.enemy-party .combatant{width:230px;height:100%}.enemy-party.many{width:58%;gap:16px}.enemy-party.many .actor{width:190px}
.enemy-party.many .enemy-actor.sprite{width:min(190px,var(--stage-height) - 166px);height:min(190px,var(--stage-height) - 166px)}
.enemy-target{position:relative;background:transparent;border:0;padding:0;min-width:0;display:flex;justify-content:center;width:100%}
.enemy-target:disabled{opacity:1}.enemy-target:not(:disabled):hover .actor{filter:drop-shadow(0 10px 10px #3468af70)}
.enemy h3{font-size:18px;position:relative;margin-top:4px;white-space:nowrap;z-index:1;background:#fff9;padding:0 8px;border-radius:4px}
.combatant-health{display:flex;align-items:center;gap:6px;max-width:100%;margin-top:3px;z-index:1}
.target-label{position:absolute;bottom:23px;left:0;right:0;font-size:12px;color:#fff;text-shadow:0 1px 4px #16446d}
.targeted .actor{filter:drop-shadow(0 0 6px #e2b953) drop-shadow(0 8px 8px #23476250)}
.intent{position:absolute;top:-54px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:2px;white-space:nowrap;z-index:2;cursor:pointer;color:#203b62}
.intent>span{display:flex;align-items:center;gap:6px;background:#fffaf2f2;box-shadow:0 3px 8px #24446f2b;border:1px solid #c7b179;border-radius:5px;padding:3px 12px;font-size:18px;line-height:1.5}
.intent.hit>span{background:#fff2edf2;color:#9a3445}.intent.block>span{background:#edf5fff2;color:#28548b}.intent small{font-size:11px;background:#fffaf2dd;padding:0 7px;border-radius:3px;color:#48627f}
.intent em{font-size:10px;color:#6d478e;background:#f5ecff;font-style:normal;padding:2px 5px}.intent.defeated{font-size:12px;background:#fff8;padding:4px 10px}
.enemy .intent{top:4px}
.statuses{display:flex;gap:5px;flex-wrap:wrap;align-items:center;justify-content:center;min-height:29px;margin-top:4px;max-width:100%}
.status-summary{display:none}
.status{display:inline-flex;align-items:center;gap:4px;background:#fffaf2e8;border:1px solid #c9c4bd;border-radius:4px;font-size:11px;padding:2px 6px;min-height:26px;white-space:nowrap}
.status .icon{width:16px;height:16px}.combatant.fallen .actor{opacity:.2;filter:grayscale(1)}.combatant.fallen .health,.combatant.fallen h3{opacity:.5}
.battle-controls{display:flex;align-items:center;gap:16px;min-height:75px;margin:10px -3vw 0;padding:6px 3vw;background:linear-gradient(90deg,#fffaf4f5,#fffaf2e3,#fffaf4f5);border-top:1px solid #c5a369;border-bottom:1px solid #c5a369;box-shadow:0 6px 15px #1e35541a}
.energy-orb{display:grid;grid-template-columns:56px auto;column-gap:2px;align-items:center;position:relative;color:#204f91;width:124px;min-width:124px;padding:0}
.energy-crystal{height:70px;width:56px;grid-row:1/3;object-fit:contain;filter:drop-shadow(0 2px 4px #2f89ce40)}.energy-orb strong{font:30px var(--serif);line-height:1.15;font-variant-numeric:tabular-nums}.energy-orb strong small{font-size:20px;margin-left:4px;color:#4b6c96}.energy-orb>span{font-size:10px;color:#4b6c96}
.momentum-meter{display:grid;gap:5px;text-align:left;background:none;border:0;min-height:54px;padding:4px 6px;font-size:12px;white-space:nowrap}.momentum-meter b{color:#785a27}
.momentum-pips{display:flex;gap:9px;padding-left:2px}.momentum-pips i{height:12px;width:12px;border:1px solid #acacb3;transform:rotate(45deg);background:#e3e0db}
.momentum-pips .filled{background:linear-gradient(135deg,#91d6ff,#3268c2);border-color:#457db8}
.pile-buttons{display:flex;align-items:center;gap:7px}.pile-button{display:flex;align-items:center;gap:7px;min-height:46px;padding:6px 10px;background:#e5e7e850;border:0;border-radius:5px;font-size:11px;white-space:nowrap}
.pile-button b{font-size:14px;margin-left:4px}.pile-button .icon{width:21px;height:25px}.pile-button:hover{background:#e3edfa}
.turn-indicator{display:flex;flex-direction:column;align-items:center;gap:2px;flex:1;min-width:180px;text-align:center}
.turn-indicator strong{font:22px var(--serif);font-weight:700;color:#203f6b;white-space:nowrap}.turn-indicator>span{font-size:12px;color:#48617f}
.turn-indicator.enemy-turn strong{color:#985067}.end-control{margin-left:auto}.end-control .btn{min-width:155px}
.hand-region{padding:5px 0 0}.hand-caption{display:flex;justify-content:space-between;font-size:11px;color:#27476b;padding:0 8px}
.hand-scroll{display:flex;align-items:flex-start;justify-content:center;gap:12px;overflow-x:auto;overflow-y:hidden;min-height:326px;padding:17px 18px 24px;scroll-snap-type:x proximity;scrollbar-width:thin}
.card{position:relative;display:flex;flex-direction:column;align-items:stretch;width:190px;min-width:0;min-height:286px;flex-shrink:0;padding:5px;background:#fff8e9;color:#263c61;text-align:center;border:2px solid #bda16d;border-radius:12px;box-shadow:inset 0 0 0 2px #e5d2aa,0 9px 15px #233e6533;overflow:hidden;transition:transform .2s ease-out,box-shadow .2s ease-out;scroll-snap-align:center}
.card:before{content:'';position:absolute;inset:3px;background:url('/assets/ui/card-frame.svg') center/100% 100%;border-radius:8px;pointer-events:none;z-index:1}
.card-cost{position:absolute;z-index:2;top:6px;left:6px;width:35px;height:37px;display:flex;align-items:center;justify-content:center;background:linear-gradient(140deg,#4799dc,#284f9e);border:2px solid #dfc38b;clip-path:polygon(50% 0,100% 23%,100% 77%,50% 100%,0 77%,0 23%);color:#fff;font:26px var(--serif);text-shadow:0 1px 1px #1c4279}
.card-name{display:block;height:35px;line-height:32px;margin-left:33px;padding-right:4px;font:19px/32px var(--serif);font-weight:700;white-space:nowrap;letter-spacing:0}
.card-name b{color:#6b58b5}.card-art{width:100%;height:139px;border-radius:4px 4px 0 0;object-fit:cover;background-color:#e0eaf6}
.card-type{align-self:center;position:relative;z-index:2;margin-top:-9px;padding:0 13px;border:1px solid #d6bd90;background:#fff9ef;border-radius:8px;font:13px/22px var(--serif);color:#795b36;white-space:nowrap}
.card-text{display:block;flex:1;text-align:left;font-size:12px;line-height:1.7;padding:10px 10px 5px;min-height:72px}
.card-footer{font-size:10px;color:#5a6d8a;min-height:23px;display:flex;align-items:center;justify-content:center;gap:10px}
.card-footer kbd{font:10px var(--sans);border:1px solid #b9bfd0;border-radius:3px;padding:0 4px;color:#4b6081}
.card.rare{border-color:#9a7bbb}.card.rare .card-type{color:#725391;background:#f5eafa}
.card.upgraded{background:#fff9db;border-color:#c6a044}.card.upgraded .card-name{color:#66511e}
.hand-scroll .card{transform:rotate(var(--tilt,0deg));transform-origin:center bottom}
.card:hover:not(:disabled),.hand-scroll .card.selected{transform:translateY(-9px);box-shadow:inset 0 0 0 2px #efd59d,0 13px 22px #21487944}
.card.selected{border-color:#3277c5}.card.unaffordable{filter:saturate(.55)}.card:disabled{opacity:.88}
.empty-hand{padding:55px 25px;background:#fffd;border-radius:8px}.tutorial{position:absolute;top:70px;left:50%;transform:translateX(-50%);width:min(470px,calc(100% - 24px));z-index:10;padding:23px;background:#fffaf2;box-shadow:0 18px 40px #17355d45;border:1px solid #c7ab72;border-radius:12px}
.tutorial h3{margin-bottom:10px}.tutorial p{font-size:13px;line-height:1.9}.tutorial .btn{margin-top:15px}
/* Rewards, shops and travel pages share the garden's material and scale. */
.reward-screen,.rest-screen,.summary-screen{max-width:1050px;margin:auto;padding:35px 30px;text-align:center}
.reward-emblem,.summary-emblem{width:64px;margin:0 auto 22px}.reward-screen .page-heading p,.rest-screen .page-heading p,.summary-screen .page-heading p{margin-left:auto;margin-right:auto}
.reward-gains{display:flex;gap:25px;align-items:center;justify-content:center;margin-bottom:25px}.reward-gains>button{background:#fffc;border:1px solid #c9bd9e;border-radius:6px;padding:10px}
.reward-cards{display:flex;justify-content:center;gap:34px;margin-bottom:25px}.reward-cards>div{display:flex;flex-direction:column;align-items:center;gap:20px}.reward-cards .card{width:220px;min-height:320px}.reward-cards .card-art{height:165px}
.shop-screen{max-width:1280px;margin:auto;padding:35px 4vw;text-align:center}.shop-screen .page-heading p{margin-left:auto;margin-right:auto}
.shop-shelf{display:flex;flex-wrap:wrap;gap:30px;justify-content:center;margin:30px 0}
.shop-item{width:190px;display:flex;flex-direction:column;align-items:stretch;gap:17px}.shop-item.sold{opacity:.55}.shop-item>.btn{font-size:12px;padding:10px}
.shop-object{min-height:286px;padding:14px;background:#fffaf2d9;border-radius:10px}.shop-object>img,.shop-object>.artwork{width:150px;height:150px;object-fit:cover;margin:0 auto 14px;border-radius:50%}
.shop-object h3{font-size:21px}.shop-object p{font-size:12px;line-height:1.8;margin-top:8px}
.rest-illustration{display:flex;justify-content:center;gap:28px;margin-bottom:25px}.rest-illustration>img,.rest-illustration>.artwork{width:165px;height:165px;border-radius:50%;object-fit:cover;box-shadow:var(--shadow)}
.rest-options{display:flex;justify-content:center;gap:28px;margin:35px 0}.rest-option{display:flex;flex-direction:column;gap:13px;min-width:260px;padding:25px;background:#fffaf2f2;border-color:#c4b17e}
.rest-option>.icon{height:42px;width:42px}.rest-option>strong{font:27px var(--serif)}.rest-option>span{font-size:12px}
.event-screen{max-width:1100px;min-height:650px;display:grid;grid-template-columns:380px 1fr;align-items:center;gap:65px;margin:auto;padding:45px}
.event-illustration>img,.event-illustration>.artwork{width:100%;aspect-ratio:1;height:auto;border-radius:45% 45% 12px 12px;box-shadow:0 12px 30px #24477429}
.event-copy .page-heading p{font:20px/2 var(--serif);color:#3d577a}.event-options{display:grid;gap:15px}
.event-option{flex-direction:column;align-items:flex-start;padding:17px 22px;text-align:left;background:#fffaf3e8}
.event-option>strong{font:24px var(--serif)}.event-option>span{font-size:12px}.event-option>small{color:#974253}.event-result{padding:25px 0}.event-result p{margin-top:12px}
.ending-prose{font:22px/2 var(--serif);max-width:55ch;margin:30px auto;color:#3b5579}
.summary-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:25px;padding:30px;background:#fffaf0e8;border-radius:12px}
.summary-stats>div{display:flex;flex-direction:column;gap:8px}.summary-stats span{font-size:12px;color:var(--muted)}.summary-stats strong{font:23px var(--serif);font-variant-numeric:tabular-nums}
.summary-route{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;font-size:12px;margin:30px 0}.summary-route i{font-style:normal;color:#8a794f}.summary-actions{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}
/* A protected dialog differs from the non-blocking card inspection sheet. */
.modal-backdrop{position:fixed;inset:0;z-index:40;background:#17345466;display:flex;align-items:center;justify-content:center;padding:25px}
.modal{width:min(650px,100%);max-height:90svh;overflow-y:auto;padding:35px;background:#fffaf2;border:1px solid #ccb079;border-radius:12px;box-shadow:0 20px 65px #193d6940}
.modal.wide{width:min(1120px,100%)}.modal>h2{margin-bottom:12px}.modal>p{line-height:1.9;margin-bottom:14px}.modal-close{float:right;position:relative;margin:-18px -18px 5px 15px}
.modal .selection-actions{margin-top:25px}.pause-options{display:grid;gap:10px;margin-top:28px}
.rule-list{display:grid;gap:25px;margin-top:28px}.rule-list h3{margin-bottom:9px;color:#29558c}.rule-list p{font-size:14px;line-height:1.9}
.settings-form{display:grid;gap:20px;margin-top:25px}.settings-form label{display:flex;align-items:center;gap:16px;min-height:44px;font-size:14px}
.settings-form input[type=range]{height:36px;min-width:50px;flex:1}.settings-form output{min-width:38px;font-size:12px;color:#315e98}
.settings-form select{margin-left:auto;background:#fff;border:1px solid #b2bfd1;border-radius:5px;min-height:44px;padding:5px 10px;color:var(--ink);max-width:65%}
.settings-form input[type=checkbox]{margin-left:auto;height:24px;width:24px}.detail-art{max-width:230px;margin:0 auto 24px}.detail-art>img,.detail-art>.artwork{width:230px;height:230px;border-radius:50%;object-fit:cover}
.source-note{padding-top:20px;border-top:1px solid #c6c7ca;font-size:13px}.battle-log{padding-left:22px;display:grid;gap:9px;font-size:13px;color:var(--muted);line-height:1.8}
.library-filters{display:flex;gap:10px;margin:23px 0}.library-filters .btn{min-height:44px;padding:8px 16px}
.card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:25px 20px;margin-top:26px;align-items:start}
.grid-card{display:flex;justify-content:center}.grid-card.picked .card{border-color:#2d70bd;box-shadow:0 0 0 3px #bbd7fc}
.card-detail-layout{display:flex;gap:30px;align-items:center}.card-detail-layout>.card{cursor:default}.card-detail-layout>div{flex:1}.card-detail-layout h3{margin:20px 0 8px;color:#775b2d}.card-detail-layout p{font-size:14px;line-height:1.9}
.picker-footer{position:sticky;bottom:-35px;background:#fffaf2;border-top:1px solid #c8b582;padding:20px 10px;margin:20px -10px -25px;display:flex;justify-content:space-between;align-items:center;gap:22px;z-index:3}
.picker-footer>div:last-child{display:flex;gap:9px;flex-shrink:0}.picker-footer p{font-size:12px}.picker-footer strong{font:22px var(--serif)}.picker-footer .btn{padding:9px 15px}
.selection-drawer{position:fixed;z-index:25;bottom:25px;left:50%;transform:translateX(-50%);width:min(780px,calc(100% - 40px));max-height:75svh;overflow-y:auto;display:grid;grid-template-columns:170px 1fr;gap:26px;padding:24px;background:#fffaf2;border:1px solid #c4a875;border-radius:12px;box-shadow:0 15px 50px #1c3c6955}
.selection-art{height:185px;width:170px;border-radius:9px;object-fit:cover;margin-top:8px}
.selection-close{position:absolute;right:9px;top:9px;width:36px;height:36px;min-height:36px;z-index:2}
.selection-copy h2{font-size:29px;display:flex;align-items:center;justify-content:space-between;padding-right:31px;margin-bottom:9px}
.selection-copy h2>span{font:18px var(--serif);color:#3e68a0;display:flex;align-items:center;gap:5px}
.selection-copy>p{font-size:14px;line-height:1.8}.selection-copy>small{display:block;font-size:12px;color:#667288;margin-top:9px;line-height:1.8}
.selection-copy>small.preparation-rule{color:#5d5199;background:#f0eaf9;padding:5px 9px;border-radius:4px}
.target-options{display:flex;gap:8px;flex-wrap:wrap;margin:15px 0}.target-options .btn{padding:8px 12px;min-height:44px;font-size:12px}.target-options small{font-size:10px}
.target-note{margin-top:12px}.selection-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:17px}
.cannot-play{color:#963d4c!important;font-size:12px!important;text-align:right;margin-top:10px}
.card-preview{display:flex;flex-wrap:wrap;gap:7px 18px;padding:11px 13px;background:#eaf2fc;border-radius:6px;margin-top:12px;font-size:12px;color:#3c5f87}
.card-preview b{color:#214779}.card-preview>strong{width:100%;font-size:12px;color:#3c5380}
/* One spell-trail choreography; numerical feedback stays tied to its actor. */
#fx{position:fixed;inset:0;pointer-events:none;z-index:30;overflow:hidden}
.floating-number{position:fixed;font:700 30px var(--serif);color:#ab364b;transform:translate(-50%,-50%);text-shadow:0 2px 1px #fff,0 0 6px #fff;animation:float-number .8s ease-out forwards}
.fx-block{color:#2362a0}.fx-heal{color:#27775f}.fx-mark{color:#7c4e9d}.fx-status,.fx-play,.fx-draw,.fx-relic,.fx-energy,.fx-turn,.fx-phase,.fx-death,.fx-exhaust{font-size:20px;color:#765aa7}.fx-turn{font-size:28px;color:#a4556b}
.projectile{position:fixed;width:12px;height:12px;border-radius:50%;background:#fff3c1;box-shadow:0 0 16px 7px #6fbdfa9c;animation:projectile .4s ease-out forwards}
.impact{animation:impact .28s ease-out}
#toast{position:fixed;z-index:60;left:50%;bottom:24px;transform:translate(-50%,15px);opacity:0;pointer-events:none;padding:13px 21px;max-width:calc(100% - 25px);background:#254f85;color:#fff;border-radius:7px;box-shadow:0 8px 20px #18325140;font-size:13px;transition:transform .2s,opacity .2s}
#toast.visible{opacity:1;transform:translate(-50%,0)}
@keyframes arrival{from{transform:translateY(20px);filter:blur(2px)}to{transform:translateY(0);filter:blur(0)}}
@keyframes float-number{from{opacity:1;transform:translate(-50%,0)}to{opacity:0;transform:translate(-50%,-75px)}}
@keyframes projectile{from{left:var(--from-x);top:var(--from-y);transform:scale(.7)}to{left:var(--to-x);top:var(--to-y);transform:scale(1.3)}}
@keyframes impact{25%{transform:translateX(-5px)}70%{transform:translateX(4px)}}
.paused *{animation-play-state:paused!important}.reduced-motion .menu-actor,.reduced-motion .impact{animation:none}
.reduced-motion .card{transition:none}.quality-low .actor{filter:none}.quality-low .projectile{display:none}
@media(min-width:1450px){.hand-scroll .card{width:205px;min-height:310px}.hand-scroll .card-art{height:160px}.hand-scroll .card-text{font-size:13px}.hand-scroll{min-height:345px}}
@media(max-width:1150px){
 .topbar{gap:15px}.chapter-chip{display:none}.battle-stage{padding:0 3%}.enemy-party{gap:20px;width:55%}
 .battle-controls{gap:10px}.pile-button{padding:5px 7px}.pile-button span{font-size:10px}.pile-button .icon{width:18px}
 .turn-indicator{min-width:150px}.turn-indicator strong{font-size:20px}.end-control .btn{min-width:125px;padding:10px 15px}
 .character-layout{grid-template-columns:180px 1fr 300px;gap:20px}.character-portrait{min-height:490px}.character-portrait>img{height:490px}
 .map-screen{grid-template-columns:290px 1fr;gap:25px}.map-copy{padding-top:35px}
}
@media(max-width:900px){
 .battle-controls{flex-wrap:wrap;gap:8px}.energy-orb{min-width:104px;width:104px;grid-template-columns:42px auto;padding:0}.energy-crystal{width:42px;height:58px}.energy-orb strong{font-size:26px}.momentum-meter{padding:4px}
 .pile-buttons{gap:2px}.pile-button{padding:4px 6px}.pile-button span{font-size:10px}.turn-indicator{flex:1;min-width:170px}
 .end-control .btn{min-width:112px;font-size:13px}.character-layout{grid-template-columns:180px 1fr}.character-copy{grid-column:1/-1;max-width:600px;margin:auto}
 .character-portrait{min-height:420px}.character-portrait>img{height:420px}.menu-content{width:50%}.menu-art{right:-7%;width:62%}
}
@media(max-width:760px){
 body:before{background-position:52% center}body:after{background:#f7fbffb8}body[data-screen=battle]:after{background:linear-gradient(0deg,#e6f1fa80,transparent 70%)}
 body[data-screen=battle]:before{background-size:cover;background-position:52% bottom}
 .battle-screen{--stage-height:320px}.battle-screen:before{top:-98px;height:471px;background-size:auto 100%;background-position:52% center}
 .topbar{min-height:54px;padding:5px 10px;gap:8px}.brand{padding:0;min-width:35px}.brand img{width:29px;height:29px}.brand>span{display:none}
 .player-summary{gap:6px}.player-summary>strong{display:none}.player-summary .health{width:100px}.top-actions{gap:4px}.top-actions .text-button{padding:5px;gap:3px}.top-actions .text-button>span{display:none}.top-actions>.icon-button{width:44px}
 .gold{font-size:12px;gap:3px}.gold>.icon{width:19px;height:19px}.relic-strip{padding:0 12px;min-height:44px;gap:9px;font-size:10px}.relic{min-height:44px}.save-status{font-size:10px}
 .game-footer{padding:9px 15px;font-size:10px}
 .menu-screen{padding:45px 25px 85px;min-height:100svh;align-items:flex-start}.menu-content{width:70%;max-width:340px}.wordmark h1{font-size:68px}.wordmark-line{max-width:230px;gap:12px;margin:15px 0}.wordmark-line p{font-size:18px}
 .menu-story{font-size:16px;margin:20px 0;max-width:250px}.menu-nav{max-width:225px}.menu-nav .btn{min-height:46px;font-size:13px;padding:10px}
 .menu-note{font-size:11px;max-width:210px}.menu-note span{font-size:10px}.menu-art{right:-33%;width:100%;height:77%;bottom:3%;opacity:.9}.menu-bottom{left:25px;right:15px;bottom:15px;font-size:10px}.menu-bottom>.text-button{font-size:10px}
 .character-screen{padding:20px 20px 35px}.character-header{display:block}.character-header>.btn{margin-bottom:20px;padding:8px 0}.character-header h1{font-size:29px}.character-header .page-heading p{font-size:12px}
 .character-layout{grid-template-columns:145px 1fr;gap:12px}.character-choice{min-height:125px;padding:10px;gap:5px}.character-choice img{width:40px;height:70px}.character-choice strong{font-size:22px}.character-choice small{font-size:10px}.character-choice>b{font-size:10px}
 .character-portrait{min-height:310px}.character-portrait>img{height:310px}.character-copy{padding-top:10px}.character-copy h2{font-size:44px}.character-copy p{font-size:13px}.character-copy h3{font-size:22px}
 .chapter-intro{padding:45px 25px;gap:22px}.chapter-intro h1{font-size:32px}.chapter-intro .intro-sub{font-size:20px}.chapter-intro>p{font-size:13px}.chapter-emblem{width:60px}
 .map-screen{display:flex;flex-direction:column;gap:22px;padding:22px 16px}.map-copy{padding:0}.map-copy h1{font-size:29px}.map-copy .page-heading{margin-bottom:15px}.map-copy .page-heading p{font-size:12px}
 .map-legend{margin:15px 0;gap:10px 15px}.map-legend>span{font-size:11px}.map-hint{font-size:12px}.route-journal{display:none}.map-scroll{width:100%;overflow-x:auto}.route-map{min-width:340px;height:800px}.map-node{width:100px}.map-node strong{font-size:15px}.node-medallion{width:42px;height:42px}
 .battle-screen{padding:0 12px 8px}.battle-meta{min-height:53px;gap:5px}.battle-meta>.text-button{padding:5px;min-width:44px}.battle-meta>.text-button>span{display:none}
 .action-queue{gap:4px}.action-queue li{padding:3px 5px;gap:5px}.action-queue li>span:not(.artwork){display:none}.action-queue .current>span:not(.artwork){display:inline}
 .action-queue li:not(:last-child){margin-right:9px}.action-queue .icon{margin-right:-16px;width:13px;height:13px}.queue-avatar{width:27px;height:27px}.action-queue .current{font-size:11px}
 .battle-stage{height:var(--stage-height);padding:0 0 0 1%;align-items:flex-end}.combatant.player{width:35%}.player-actor{height:245px;width:165px}.enemy .actor{height:154px;width:150px}
 .player-name{bottom:61px}.player-name h2{font-size:18px}.enemy-party{width:60%;gap:6px}.enemy-party .combatant{width:50%}.enemy-party .actor{width:130px}
 .enemy-party.many{width:63%;gap:1px}.enemy-party.many .actor{width:90px;height:154px}.enemy h3{font-size:13px;padding:0 3px}
 .enemy-party .enemy-actor.sprite{width:130px;height:130px}.enemy-party.many .enemy-actor.sprite{width:90px;height:90px}
 .combatant-health{gap:3px;width:100%;justify-content:center}.health{width:105px;height:18px}.health span{font-size:10px}.health .icon{width:11px;height:11px}.block-stat{gap:1px;font-size:11px;min-width:23px}.block-stat .icon{width:16px;height:16px}
 .intent{top:-45px}.intent>span{font-size:14px;padding:2px 5px;gap:4px}.intent .icon{width:17px;height:17px}.intent small{font-size:9px;max-width:110px;overflow:hidden;text-overflow:ellipsis}.intent em{font-size:9px}.target-label{font-size:10px;bottom:18px}
 .statuses{flex-wrap:nowrap;overflow:visible;justify-content:center;min-height:44px;width:100%;max-width:140px}.statuses>.status{display:none}.status-summary{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-height:44px;padding:3px;background:#fffaf2eb;border:1px solid #c9c4bd;border-radius:4px;font-size:10px;line-height:17px}.status-summary small{font-size:9px}.status-summary span{white-space:nowrap}
 .battle-controls{margin:8px -12px 0;padding:8px 12px;gap:7px;display:grid;grid-template-columns:86px 68px 1fr;min-height:118px}
 .energy-orb{min-width:0;width:86px;grid-template-columns:38px auto;padding:0}.energy-crystal{width:38px;height:51px}.energy-orb strong{font-size:24px}.energy-orb strong small{font-size:14px;margin-left:2px}.energy-orb>span{font-size:9px}
 .momentum-meter{font-size:11px;min-height:48px;padding:2px 3px}.momentum-pips{gap:8px}.momentum-pips i{width:10px;height:10px}
 .pile-buttons{justify-content:flex-end;gap:1px}.pile-button{flex-direction:column;gap:0;padding:0 4px;min-height:44px;font-size:9px}.pile-button .icon{width:17px;height:18px}.pile-button span{font-size:9px}.pile-button b{font-size:11px;margin-left:1px}
 .turn-indicator{grid-column:1/3;min-width:0;align-items:flex-start;padding-left:3px;text-align:left;gap:0}.turn-indicator strong{font-size:18px}.turn-indicator>span{font-size:10px;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .end-control{grid-column:3;grid-row:2;justify-self:end;margin:0}.end-control .btn{min-height:44px;min-width:105px;padding:7px 13px;font-size:12px}.end-control .icon{width:19px;height:19px}
 .hand-region{padding-top:8px}.hand-caption{font-size:10px;padding:0 2px;gap:10px}.hand-caption>span:last-child{font-size:9px}
 .hand-scroll{justify-content:flex-start;gap:12px;min-height:300px;padding:13px 6px 20px;scroll-padding-left:6px}.hand-scroll .card{width:162px;min-height:265px;transform:none}
 .card-name{font-size:17px;height:33px;line-height:30px;margin-left:31px}.card-cost{height:33px;width:30px;font-size:24px;top:6px;left:5px}.card-art{height:122px}.card-type{font-size:12px;line-height:20px}.card-text{font-size:11px;line-height:1.7;padding:9px 8px 4px;min-height:74px}.card-footer{font-size:10px}
 .tutorial{top:70px;padding:22px;width:calc(100% - 20px)}.tutorial h3{font-size:22px}.tutorial p{font-size:12px}
 .reward-screen,.rest-screen,.summary-screen{padding:28px 18px}.reward-screen h1,.rest-screen h1,.summary-screen h1{font-size:29px}.page-heading p{font-size:12px}.reward-gains{gap:10px;flex-wrap:wrap;font-size:11px;margin-bottom:22px}
 .reward-cards{gap:10px;justify-content:flex-start;overflow-x:auto;padding:5px 4px 15px}.reward-cards>div{gap:14px;flex-shrink:0}.reward-cards .card{width:162px;min-height:265px}.reward-cards .card-art{height:125px}.reward-cards .btn{font-size:12px;padding:9px 15px}
 .shop-screen{padding:25px 16px}.shop-screen h1{font-size:29px}.shop-shelf{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 14px;max-width:490px;margin:25px auto}
 .shop-item{width:100%;gap:12px}.shop-item .card{width:100%;max-width:200px;min-height:270px}.shop-item>.btn{font-size:11px;padding:8px 6px}
 .shop-object{min-height:270px;padding:10px}.shop-object>.artwork,.shop-object>img{width:130px;height:130px}.shop-object h3{font-size:18px}.shop-object p{font-size:11px}
 .rest-illustration{gap:20px}.rest-illustration>img,.rest-illustration>.artwork{width:130px;height:130px}.rest-options{gap:12px;margin:25px 0}.rest-option{min-width:0;flex:1;padding:20px 10px}.rest-option>strong{font-size:22px}.rest-option>span{font-size:11px}
 .event-screen{display:flex;flex-direction:column;gap:25px;padding:25px 24px;min-height:auto}.event-illustration{width:min(250px,70%);align-self:center}.event-copy{width:100%}.event-copy h1{font-size:30px}.event-copy .page-heading p{font-size:17px;line-height:1.9}.event-option>strong{font-size:21px}.event-option>span{font-size:12px}
 .ending-prose{font-size:18px;margin:24px auto}.summary-stats{grid-template-columns:repeat(2,1fr);gap:23px 15px;padding:23px 12px}.summary-stats strong{font-size:19px}.summary-route{gap:8px;font-size:10px}.summary-route .icon{width:18px;height:18px}.summary-actions{gap:10px}.summary-actions .btn{font-size:12px;padding:10px 14px}
 .modal-backdrop{padding:12px 10px}.modal{padding:25px 20px;max-height:92svh}.modal>h2{font-size:26px}.modal-close{margin:-14px -10px 5px 10px}
 .modal>p{font-size:13px}.rule-list p{font-size:13px}.rule-list h3{font-size:22px}.settings-form label{font-size:12px;gap:12px}.settings-form select{font-size:12px}
 .card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 12px}.card-grid .card{width:100%;max-width:190px;min-height:265px}.card-grid .card-art{height:125px}
 .library-filters{gap:6px;flex-wrap:wrap}.library-filters .btn{font-size:12px;padding:8px 12px}
 .card-detail-layout{flex-direction:column;gap:20px}.card-detail-layout>.card{width:185px;margin:auto}.card-detail-layout>.card .card-art{height:140px}.card-detail-layout>div{width:100%}
 .picker-footer{bottom:-25px;margin:15px -10px -18px;padding:15px 10px;flex-direction:column;align-items:stretch;gap:12px}.picker-footer>div:last-child{justify-content:flex-end}
 .selection-drawer{bottom:max(10px,env(safe-area-inset-bottom));width:calc(100% - 20px);max-height:78svh;padding:20px 16px;grid-template-columns:75px 1fr;gap:13px}
 .selection-art{width:75px;height:100px;margin-top:7px}.selection-copy h2{font-size:23px;padding-right:42px;flex-wrap:wrap;gap:4px 10px}.selection-copy h2>span{font-size:16px;gap:2px}.selection-copy h2 .icon{width:18px}
 .selection-copy>p{font-size:13px;line-height:1.8}.selection-copy>small{font-size:11px}.selection-close{width:44px;height:44px;top:3px;right:3px}
 .target-options{gap:7px;margin:12px 0}.target-options .btn{min-height:44px;font-size:11px;padding:7px 10px}.target-options small{font-size:10px}
 .card-preview{font-size:11px;gap:6px 12px;padding:9px}.card-preview>strong{font-size:11px;line-height:1.7}.selection-actions{gap:6px;margin-top:13px;flex-wrap:wrap}.selection-actions .btn{min-height:44px;font-size:12px;padding:8px 13px}
 .floating-number{font-size:26px}.fx-status,.fx-play,.fx-draw,.fx-relic,.fx-energy,.fx-turn{font-size:19px}#toast{bottom:14px;padding:12px 17px;font-size:12px}
}
@media(max-width:380px){
 .topbar{padding:5px 8px;gap:5px}.player-summary .health{width:85px}.top-actions{gap:2px}.top-actions>.icon-button[data-action=rules]{display:none}
 .battle-controls{padding:7px 10px;grid-template-columns:80px 62px 1fr;gap:5px}.energy-orb{width:80px}.pile-button{padding:0 3px}.pile-button span{font-size:8px}.end-control .btn{min-width:98px;font-size:11px}
 .character-layout{grid-template-columns:135px 1fr}.character-portrait>img{height:285px}.card-name{font-size:16px}.card-grid .card-text{font-size:10px}
}
@media(max-height:600px) and (min-width:600px){
 .topbar{min-height:50px}.relic-strip{min-height:33px}.battle-meta{min-height:46px}.battle-stage{height:235px}.actor{height:195px}.player-actor{height:225px}.intent{top:-43px}.intent>span{font-size:14px}
 .battle-controls{min-height:65px;margin-top:5px}.hand-scroll{min-height:270px;justify-content:flex-start}.hand-scroll .card{width:160px;min-height:250px}.hand-scroll .card-art{height:110px}
 .menu-screen{min-height:690px;padding-top:35px}.character-portrait>img{height:390px}.selection-drawer{max-height:86svh;bottom:8px}.game-footer{padding:7px 15px}
}
@media(prefers-reduced-motion:reduce){.menu-actor,.impact{animation:none}.card,.btn{transition:none}}

/* -------------------------------------------------------------------------
   Quiet desktop card table
   The active visual system is intentionally made from paper, ink and one
   accent line. It replaces the previous scenic/ornamental treatment without
   changing the battle rules or information architecture.
   ------------------------------------------------------------------------- */
:root{--ink:#26364b;--paper:#26364b;--muted:#6b7481;--deep:#f7f3eb;--panel:#fffdf8;--line:#d9cdb4;--gold:#a8874b;--bright:#355d8c;--blue:#3f638c;--blue-dark:#294866;--violet:#6f617f;--shadow:0 5px 18px #28384a14}
body,body.chapter-two{background:var(--deep);color:var(--ink)}
body:before{background:
 radial-gradient(circle at 14% 18%,#b9985418 0 1px,transparent 1.5px),
 radial-gradient(circle at 82% 76%,#b9985414 0 1px,transparent 1.5px),
 linear-gradient(112deg,transparent 0 18%,#c7a65b0d 18.1% 18.2%,transparent 18.3% 81%,#c7a65b0b 81.1% 81.2%,transparent 81.3%),
 repeating-linear-gradient(0deg,transparent 0 47px,#c7a65b0b 48px,#c7a65b0b 49px,transparent 50px),var(--deep)}
body:after,body[data-screen=battle]:after{background:radial-gradient(ellipse at 50% 42%,transparent 0 58%,#b89c6410 100%)}
body.chapter-two:before{background:
 radial-gradient(circle at 18% 24%,#8b7a9d16 0 1px,transparent 1.5px),
 linear-gradient(112deg,transparent 0 18%,#8b7a9d0b 18.1% 18.2%,transparent 18.3% 81%,#8b7a9d0b 81.1% 81.2%,transparent 81.3%),
 repeating-linear-gradient(0deg,transparent 0 47px,#a08b8f0b 48px,#a08b8f0b 49px,transparent 50px),var(--deep)}
#app{min-height:100svh}
.btn{min-height:44px;padding:9px 18px;border:1px solid #c8bda9;border-radius:4px;background:#fffdf8;color:var(--ink);box-shadow:none;transition:background .16s,border-color .16s,color .16s,transform .16s}
.btn:hover:not(:disabled){background:#f1ecdf;border-color:#a8874b;color:#1f3f60;transform:translateY(-1px)}
.btn.primary{border:1px solid #2f4e6e;background:#2f4e6e;color:#fffdf8;box-shadow:none;font-weight:600}
.btn.primary:before,.btn.primary:after{display:none}.btn.primary:hover:not(:disabled){background:#223e5b;border-color:#223e5b}
.btn.quiet{background:transparent;border-color:transparent;color:#657080}.btn.quiet:hover:not(:disabled){background:#eee8dc;color:#2f4e6e}
.text-button{color:#657080}.text-button:hover{color:#2f4e6e}.icon-button{border:1px solid #c8bda9;background:#fffdf8;border-radius:4px}.icon-button:hover{background:#f1ecdf}.chosen{border-color:#3f638c!important;background:#edf2f6!important}
.menu-screen{padding:clamp(36px,7vw,90px) max(6vw,26px) 70px;background:transparent}
.menu-content{width:min(510px,47%);padding:36px 42px;background:#fffdf8e8;border:1px solid var(--line);border-radius:7px;box-shadow:var(--shadow)}
.wordmark h1{color:#263f5c;text-shadow:none;letter-spacing:.02em}.wordmark-line{margin:15px 0;gap:12px}.wordmark-line span{background:#c8b381}.wordmark-line p{color:#806936}
.menu-story{color:#566477}.menu-nav{max-width:none;gap:6px}.menu-nav .btn:not(.primary){background:#fffdf8;border-color:#d6ccbb}.menu-nav .primary{min-height:52px}.menu-note{color:#727a84}.menu-art{right:5%;bottom:4%;width:49%;height:88%;opacity:.88}.menu-seal{display:none}.menu-actor{filter:drop-shadow(0 10px 8px #3347601d)}.menu-bottom{color:#707986}
.topbar{min-height:60px;padding:7px clamp(14px,3vw,42px);background:#fffdf8f2;border-bottom:1px solid #d8ccb6;gap:20px;box-shadow:0 1px 0 #fff}
.brand{font:700 22px var(--serif);color:#263f5c}.brand img{width:29px;height:29px}.player-summary>strong{font-size:17px;color:#384c63}.chapter-chip{color:#78808b}.top-actions{gap:8px}.gold{color:#806936}.relic-strip{min-height:39px;padding:2px clamp(14px,3vw,42px);background:#fffdf8d9;border-bottom:1px solid #e2d8c6}.relic{color:#5d6876}.relic img,.relic .artwork{border-color:#baa16a}.save-status{color:#65796c}.game-footer{padding:10px 3vw;background:#fffdf87d;color:#7c7e7e;border-top:1px solid #e2d8c6}
.health{border-radius:3px;border-color:#cfbfa4;background:#eee9df}.health-fill{background:#b65a5b}.health span{text-shadow:none;color:#fff}.block-stat{color:#3b6387}
.character-screen,.map-screen,.chapter-intro,.reward-screen,.rest-screen,.summary-screen,.shop-screen,.event-screen{position:relative}
.character-choice{border:1px solid #d5cbb8;background:#fffdf8;border-radius:5px}.character-choice.chosen{box-shadow:0 3px 12px #45576b12}.character-portrait>img{filter:drop-shadow(0 10px 8px #33476018)}.portrait-ring{display:none}.character-copy h2{color:#2c4c6a}.character-copy h3{color:#806936}.character-tagline{color:#566477!important}.character-mechanics{border-color:#d8ccb6}.character-mechanics strong{color:#3f638c}.seed-label input{background:#fffdf8;border-color:#cfc4b3}.chapter-intro{background:#fffdf86e;border-left:1px solid #e1d5c0;border-right:1px solid #e1d5c0}.chapter-intro .intro-sub{color:#536982}.map-copy{padding-top:32px}.route-map{background:#fffdf8;border:1px solid #d8ccb6;border-radius:6px}.map-lines path{stroke:#c5bda9}.map-lines path.traveled{stroke:#9a7b3d}.node-medallion{border-color:#c7bda9;border-radius:5px;background:#f3efe6;box-shadow:none}.map-node.reachable .node-medallion{border-color:#a8874b;background:#fff7df;box-shadow:none}.map-node.current .node-medallion{background:#e7eef2}.map-node strong{color:#455a70}.map-node.reachable strong{color:#806936}
.battle-screen{isolation:isolate}.battle-screen:before{display:none}.battle-meta{min-height:50px}.battle-meta>.text-button{background:#fffdf8;border:1px solid #ded4c2;border-radius:4px}.action-queue li{color:#45576c;background:#fffdf8;border:1px solid #d5cbb9;border-radius:4px}.action-queue .current{background:#e9f0f4;border-color:#a8874b;box-shadow:none}.queue-avatar{border-color:#c4ad76;background:#f1ede5}.battle-stage{border-bottom:1px solid #dfd4c0}.player-name{text-shadow:none}.player-name h2{color:#2c4c6a}.actor{filter:drop-shadow(0 8px 7px #32496724)}.combatant.acting .actor{filter:drop-shadow(0 8px 7px #3249672f)}.enemy-target:not(:disabled):hover .actor{filter:drop-shadow(0 8px 8px #486d8e2e)}.enemy h3{background:#fffdf8;padding:0 6px;border-radius:2px;color:#344c64}.target-label{color:#fff;text-shadow:0 1px 3px #243b51}.intent{color:#334b62}.intent>span{background:#fffdf8;box-shadow:0 2px 5px #32485c14;border:1px solid #cdbf9f;border-radius:4px}.intent.hit>span{background:#fff6f2;color:#9a3f4a}.intent.block>span{background:#f0f5f5;color:#38657d}.intent small{background:#f4f0e8;color:#657080}.intent em{background:#f0ebf7;color:#6f517e}.status{background:#fffdf8;border-color:#d6cdbd;border-radius:3px}
.battle-controls{margin-top:0;background:#fffdf8e8;border-top:1px solid #d2c3a6;border-bottom:1px solid #d2c3a6;box-shadow:none}.energy-orb{color:#3f638c}.energy-crystal{filter:drop-shadow(0 2px 3px #597b9630)}.energy-orb strong{font-family:var(--sans);font-weight:700}.momentum-meter b{color:#806936}.momentum-pips i{transform:none;border-radius:2px;background:#e3ded4}.momentum-pips .filled{background:#5f88a5;border-color:#5f88a5}.pile-button{background:#f0ece4;border:1px solid #ded5c7;border-radius:3px}.pile-button:hover{background:#e4edf0}.turn-indicator strong{font-family:var(--sans);font-size:18px;color:#344e68}.turn-indicator.enemy-turn strong{color:#96515e}.end-control .btn{min-width:145px}
.hand-region{border-top:1px solid #e4dac8}.hand-caption{color:#59697a}.hand-scroll{background:#f3eee5a6;padding-top:16px}.card{width:190px;min-height:286px;padding:5px;background:#fffdf8;color:#2f4054;border:1px solid #c8bda8;border-radius:5px;box-shadow:0 4px 10px #36425214;transform:none}.card:before{display:none}.card-cost{background:#2f4e6e;border:1px solid #b79d67;clip-path:none;border-radius:3px;text-shadow:none}.card-name{font-family:var(--sans);font-size:16px;color:#324b63}.card-name b{color:#6d5a87}.card-art{border-radius:2px;background-color:#ece7de;background-image:var(--art-url);background-size:var(--art-size);background-position:var(--art-x) var(--art-y);background-repeat:no-repeat}.card-type{border:1px solid #d4c3a1;background:#f8f2e7;border-radius:3px;color:#806936;font-family:var(--sans);font-size:11px}.card-text{font-size:12px;color:#4d5b6c}.card-footer{color:#78818b}.card.rare{border-color:#a38cbd}.card.rare .card-type{background:#f1edf7}.card.upgraded{background:#fff9e8;border-color:#b99a55}.card:hover:not(:disabled),.hand-scroll .card.selected{transform:translateY(-6px);box-shadow:0 8px 16px #36425221}.empty-hand{background:#fffdf8;border:1px solid #d8ccb6}.tutorial{background:#fffdf8;box-shadow:0 8px 25px #33485b1c;border:1px solid #cdbf9f;border-radius:5px}
.reward-gains>button,.shop-object,.rest-option,.event-option,.summary-stats{background:#fffdf8;border:1px solid #d8ccb6;border-radius:5px}.shop-object{border-radius:5px}.rest-options{gap:18px}.rest-option{border-color:#d1c2a5}.event-illustration>img,.event-illustration>.artwork{border-radius:5px;box-shadow:none}.event-copy .page-heading p,.ending-prose{color:#566477}.event-option{border-color:#d3c8b7}.summary-stats{box-shadow:none}.modal-backdrop{background:#27384b3d}.modal{background:#fffdf8;border:1px solid #cdbf9f;border-radius:5px;box-shadow:0 12px 38px #26384b2a}.settings-form select{border-color:#cfc4b3;background:#fffdf8}.selection-drawer{background:#fffdf8;border:1px solid #cdbf9f;border-radius:5px;box-shadow:0 12px 38px #26384b2a}.selection-copy>small.preparation-rule{background:#f0ece4;color:#6b5b7a}.card-preview{background:#edf2f4;color:#52697a}.picker-footer{background:#fffdf8;border-color:#d4c7ad}
#toast{background:#2f4e6e;border-radius:4px;box-shadow:0 5px 15px #26384b2a}.projectile{background:#e7c978;box-shadow:0 0 12px 4px #c49d4770}.floating-number{text-shadow:0 1px 2px #fff;color:#a13c4a}

@media(max-width:760px){
 body:before{background:radial-gradient(circle at 20% 18%,#b9985418 0 1px,transparent 1.5px),repeating-linear-gradient(0deg,transparent 0 47px,#c7a65b0b 48px,#c7a65b0b 49px,transparent 50px),var(--deep)}
 .menu-content{width:min(88%,390px);padding:27px 25px}.menu-art{right:-29%;width:92%;opacity:.72}.menu-bottom{color:#717b86}
 .topbar{background:#fffdf8}.battle-screen:before{display:none}.battle-controls{background:#fffdf8}.hand-scroll{background:#f3eee5}
 .route-map{background:#fffdf8}.modal{border-radius:5px}.card{border-radius:4px}
}

