/* ---------- paper surfaces: ink text, aged paper tiles ---------- */
.toast, #bountyPop .bp-box, .build-teaser, .kw-pop, .tip-bubble {
  --bg-2: var(--paper); --panel: var(--paper); --panel-2: var(--paper-2);
  --line: var(--paper-edge); --text: var(--ink); --muted: var(--ink-muted);
  --gold: var(--gilt-dark); --gold-2: var(--royal);
  --hp-2: var(--moss-dark); --block-2: #2f4c8f; --skill-2: var(--royal); --attack-2: var(--claw);
  color: var(--ink);
}
.modal:not(.title-modal):not(.split-modal) {
  --bg-2: var(--paper); --panel: var(--paper); --panel-2: var(--paper-2); --line: var(--paper-edge); --text: var(--ink); --muted: var(--ink-muted);
  --gold: var(--gilt-dark); --gold-2: var(--royal); --hp-2: var(--moss-dark); --block-2: #2f4c8f; --skill-2: var(--royal); --attack-2: var(--claw);
  background-color: var(--ivory) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .35  0 0 0 0 .28  0 0 0 0 .18  0 0 0 .14 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse 80% 70% at 50% 45%, rgba(255, 252, 240, .5), rgba(205, 187, 146, .25) 100%) !important;
  border: 0 !important; border-radius: 0 !important;
  box-shadow: inset 0 0 0 9px var(--ivory), inset 0 0 0 11px var(--royal), inset 0 0 0 15px var(--ivory), inset 0 0 0 16px var(--royal), 0 22px 50px rgba(5, 9, 24, .6) !important;
  color: var(--ink); position: relative;
}
.bounty-board {
  --bg-2: var(--paper); --panel: var(--paper); --panel-2: var(--paper-2); --line: var(--paper-edge); --text: var(--ink); --muted: var(--ink-muted);
  --gold: var(--gilt-dark); --gold-2: var(--royal); --hp-2: var(--moss-dark); --block-2: #2f4c8f; --skill-2: var(--royal); --attack-2: var(--claw);
  background: var(--paper) !important; border: 0 !important; border-radius: 0 !important; padding: 26px 24px 16px !important;
  color: var(--ink) !important; box-shadow: 0 10px 24px rgba(5, 9, 24, .4) !important; position: relative;
}

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-display); font-weight: 400; font-size: 16px; letter-spacing: .02em;
  background: var(--ivory); color: var(--ink); border: 1px solid var(--ink-35); border-radius: 0;
  box-shadow: 0 3px 0 rgba(30, 27, 22, .28), 0 6px 14px rgba(5, 9, 24, .28);
}
.btn:hover:not(:disabled) { background: #f6efdf; border-color: var(--royal); }
.btn:focus-visible { outline: 3px solid var(--gilt); outline-offset: 2px; }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 rgba(30, 27, 22, .28); }
.btn .count { background: var(--royal); color: var(--ivory); border-radius: 0; font-family: var(--font-body); }
.btn.primary {
  font-family: var(--font-scrawl) !important; font-weight: 400 !important; font-size: 20px; letter-spacing: .01em;
  color: var(--ivory) !important; background: var(--claw) !important; border: 0 !important; border-radius: 0 !important;
  padding: 12px 26px; text-shadow: 0 1px 0 var(--shade-30);
  box-shadow: 0 5px 0 var(--claw-dark), 0 10px 18px var(--night-35) !important;
  clip-path: polygon(0 8%, 8% 0, 22% 5%, 40% 0, 60% 6%, 78% 1%, 100% 5%, 98% 94%, 82% 100%, 60% 95%, 40% 100%, 20% 95%, 2% 100%);
}
.btn.primary:active:not(:disabled) { box-shadow: 0 2px 0 var(--claw-dark) !important; }
.btn.primary:disabled { background: #7d6b66 !important; box-shadow: 0 5px 0 #4a3f3b !important; filter: none; opacity: .8; }
.btn.primary:focus-visible { outline: none; filter: drop-shadow(0 0 0 var(--gilt)) drop-shadow(0 0 3px var(--gilt)); }
.btn.ghost { background: transparent; color: var(--ivory); border: 1px solid rgba(239, 230, 210, .75); box-shadow: none; }
.btn.ghost:hover:not(:disabled) { background: rgba(239, 230, 210, .12); border-color: var(--ivory); }
.btn.danger { background: var(--ivory); color: var(--claw-dark); border-color: var(--claw); }
.btn.small { font-size: 13px; }
.link-btn { font-family: var(--font-body); font-style: italic; }

/* ---------- top bar: royal blue, gilt bottom rule ---------- */
.topbar { background: var(--royal) !important; border: 0 !important; border-bottom: 4px solid var(--gilt) !important; border-radius: 0 !important;
  box-shadow: 0 6px 16px rgba(5, 9, 24, .45) !important; color: var(--ivory); }
.brand { font-family: var(--font-scrawl); font-weight: 400; font-size: 22px; color: var(--ivory); letter-spacing: 0; }
.brand .tag { font-family: var(--font-display); font-size: 11px; letter-spacing: .08em; text-transform: none; color: var(--mist); border-color: rgba(201, 161, 59, .7); border-radius: 0; }
.run-info { color: var(--ivory); font-weight: 400; }
.chip { background: transparent !important; border: 1px solid var(--gilt) !important; border-radius: 0 !important; color: var(--ivory); font-size: 15px; }
.chip b { color: var(--ivory) !important; font-weight: 400; }
.chip.hp b { color: #dbe8c6 !important; }
.top-actions .btn.ghost { font-size: 15px; }
.relic-strip .label { font-family: var(--font-display); color: var(--mist); letter-spacing: .08em; font-weight: 400; font-size: 12px; }
/* ---------- overlays and proclamation panels ---------- */

.overlay.solid { background: rgba(13, 20, 48, .94); }
.overlay.world, .overlay.solid.world { background: rgba(13, 20, 48, .9); }
.modal:not(.title-modal):not(.split-modal)::before { content: ""; position: absolute; left: 50%; top: -7px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; z-index: 3;
  background: radial-gradient(circle at 38% 34%, #8b8270, #5b5446 60%, #2a2620); box-shadow: 0 2px 3px var(--shade-45); pointer-events: none; }
.modal h1 { font-family: var(--font-display); font-weight: 400; color: var(--royal) !important; letter-spacing: .04em; }
.modal h3 { font-family: var(--font-display); font-weight: 400; color: var(--royal) !important; }

/* inner tiles on paper: aged paper with an ink rule */
.modal .choice, .modal .option-card, .modal .stat, .modal .setting-row, .modal .gear-row, .modal .ach-row, .modal .result-box, .modal .settings-bug {
  background: var(--paper) !important; border: 1px solid var(--paper-edge) !important; border-radius: 0 !important; color: var(--ink); box-shadow: 0 2px 0 rgba(30, 27, 22, .14);
}
.modal .choice:hover:not(:disabled), .modal .option-card:hover:not(:disabled) { border-color: var(--royal) !important; background: #efe5cc !important; }
.modal .choice b, .modal .option-card b, .modal .stat b, .modal .gear-row b, .modal .ach-row b { font-family: var(--font-display); font-weight: 400; color: var(--royal) !important; }
.modal .gear-row .gear-ico { background: var(--royal-mid) !important; border-color: var(--gilt) !important; border-radius: 0 !important; color: var(--ivory); }
.modal .stat span { color: var(--ink-muted); font-family: var(--font-display); font-weight: 400; letter-spacing: .06em; }
.modal .legend { color: var(--ink-muted); }

/* tabs (Den Lore, The Trader, Settings) as file tabs on the notice */
.settings-tabs .tab, .bestiary-tabs .tab { font-family: var(--font-display) !important; font-weight: 400 !important; border-radius: 0 !important;
  background: var(--paper) !important; color: var(--ink) !important; border: 1px solid var(--paper-edge) !important; box-shadow: none !important; }
.settings-tabs .tab.on, .bestiary-tabs .tab.on { background: var(--royal) !important; color: var(--ivory) !important; border-color: var(--royal) !important; }
.seg { border-radius: 0; border-color: var(--paper-edge); }
.seg-btn { font-family: var(--font-display); font-weight: 400; background: var(--paper); color: var(--ink); }
.seg-btn.on { background: var(--royal); color: var(--ivory); }
.setting-row input[type=range] { accent-color: var(--claw); }
.toast { background: var(--ivory) !important; color: var(--ink) !important; border: 0 !important; border-left: 6px solid var(--royal) !important; border-radius: 0 !important;
  box-shadow: 0 10px 26px rgba(5, 9, 24, .5) !important; font-weight: 400; }
.gear-tip .gt-head b, .track-full > b { color: #f3e3b0 !important; font-family: var(--font-display); font-weight: 400; }
/* ---------- the title: the proclamation drops and unrolls on the wall, is torn, and becomes the logo over the night camp ---------- */

.modal.title-modal { background: var(--royal-mid) !important; }
.modal.title-modal::before { display: none !important; }
.hs-title { position: absolute; inset: 0; overflow: hidden; color: var(--ivory); background: #04071a; --ps: .8; --px: 50vw; --py: 50vh; --fs: .6; --fx: 30vw; --fy: 20vh;
  --ss: .6; --sx: 0px; --sy: 0px; --ea: 0s; --eb: 0s; }
/* the night camp (home-scene.js) and the menu, on a 1920 x 1080 stage scaled to the screen */
.ht-stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; transform: translate(var(--sx), var(--sy)) scale(var(--ss)); }
.ht-night { position: absolute; inset: 0; pointer-events: none; }
.ht-intro .ht-night { visibility: hidden; }
.ht-torn .ht-night { animation: htIn 1.1s ease-out calc(2.5s - var(--eb)) both; }
.hn-layer { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; }
.hn-cast { position: absolute; inset: 0; }
.hn-mon { position: absolute; animation: hnBreathe 4.2s ease-in-out infinite; }
.hn-mon canvas { display: block; width: 100%; height: 100%; transition: filter .35s ease; }
.hn-mon.hn-banshee { animation: hnFloat 5s ease-in-out infinite; }
.hn-mon.hn-goblin { animation-duration: 3.1s; }
.hn-mon.hn-werewolf { animation-delay: -1.3s; }
.hn-shadow { position: absolute; height: 20px; border-radius: 50%; background: radial-gradient(closest-side, rgba(3, 4, 10, .6), transparent); }
/* firelight: a glow over the camp that flickers, the flames licking, embers rising, a few stars twinkling */
.hn-glow { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle 760px at 905px 928px, rgba(255, 174, 85, .55), rgba(224, 112, 58, .22) 32%, rgba(224, 112, 58, 0) 100%); animation: hnFlicker 2.7s steps(9, end) infinite; }
.hn-flame { transform-box: fill-box; transform-origin: 50% 100%; animation: hnLick 1.3s ease-in-out infinite alternate; }
.hn-f1 { animation-duration: .9s; animation-delay: -.4s; }
.hn-f2 { animation-duration: .7s; animation-delay: -.2s; }
.hn-embers i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #ffcf6a; box-shadow: 0 0 6px #ff9a3c; opacity: 0; animation: hnEmber linear infinite; }
.hn-tw { animation: hnTwinkle 3s ease-in-out infinite; }
.ht-calm .hn-embers, .ht-calm .ht-scraps, .ht-calm .ht-roll, .ht-calm .ht-curl { display: none; }
.ht-calm .hn-mon.hn-lit canvas { filter: brightness(1.18) drop-shadow(0 0 12px rgba(255, 196, 110, .6)); }
/* the wall the proclamation hangs on during the intro; it gives way to the camp */
.ht-wall { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 70% at 50% 45%, rgba(42, 61, 122, .95), rgba(13, 20, 48, .98) 100%), var(--royal-mid); }
.ht-wall::before { content: ""; position: absolute; inset: 0; background: var(--damask) 0 0 / 90px 90px; opacity: .55; }
.ht-wall::after { content: ""; position: absolute; inset: 6px; border: 6px solid var(--gilt); box-shadow: inset 0 0 0 6px transparent, inset 0 0 0 7.5px var(--gilt-dark); pointer-events: none; }
.ht-torn .ht-wall { animation: htOut 1s ease-in-out calc(2.5s - var(--eb)) both; }
.ht-done .ht-wall { display: none; }
.ht-motes i { position: absolute; border-radius: 50%; background: #e9c66a; opacity: 0; animation-name: hsMote; animation-timing-function: linear; animation-iteration-count: infinite; }
/* the sheet (1100 x 440 with its rods): mid-screen while it hangs, the logo's place at the top of the stage once it is torn */
.ht-shake { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.ht-torn .ht-shake { animation: hsShake .45s linear calc(0s - var(--eb)), hsShake .45s linear calc(.55s - var(--eb)), hsShake .5s linear calc(1.22s - var(--eb)); }
.ht-slide { position: absolute; left: 0; top: 0; width: 1100px; height: 440px; transform-origin: 50% 50%;
  transform: translate(calc(var(--px) - 550px), calc(var(--py) - 220px)) scale(var(--ps)); }
.ht-done .ht-slide { transform: translate(calc(var(--fx) - 550px), calc(var(--fy) - 220px)) scale(var(--fs)); }
.ht-torn .ht-slide { animation: htSlide 1s cubic-bezier(.6, 0, .3, 1) calc(2.6s - var(--eb)) both; }
.ht-bob { position: absolute; left: 0; top: 0; width: 1100px; height: 440px; transform-origin: 50% -400px; }
.ht-intro .ht-bob { animation: hsBob 6s ease-in-out calc(3.1s - var(--ea)) infinite; }
.ht-drop { position: absolute; left: 0; top: 0; width: 1100px; height: 440px; transform-origin: 50% -400px; }
.ht-intro .ht-drop, .ht-torn .ht-drop { animation: hsDrop 1.2s linear calc(.3s - var(--ea)) both; }
.ht-cord { position: absolute; top: -1570px; width: 3px; height: 1600px; background: linear-gradient(90deg, #8a6d27, #f0dc9a 45%, #6d531a); }
.ht-cord.l { left: 70px; } .ht-cord.r { left: 1027px; }
.ht-torn .ht-cord { animation: htCordUp .5s ease-in calc(2.45s - var(--eb)) both; }
.ht-done .ht-cord, .ht-done .ht-rod { display: none; }
.ht-paper { position: absolute; left: 30px; top: 40px; width: 1040px; height: 360px; overflow: hidden; box-shadow: 0 24px 50px var(--shade-55); }
.ht-intro .ht-paper { animation: hsUnrollPaper 1.45s linear calc(1.5s - var(--ea)) both; }
.ht-torn .ht-paper { animation: htRag .01s steps(1, end) calc(2.45s - var(--eb)) both; }
.ht-done .ht-paper { clip-path: var(--rag); box-shadow: none; }
.ht-procl { position: absolute; left: 0; top: 0; display: block; }
/* once it is the logo, the small print fades and the decree's line tucks up under the title, so the scrawl sits on clear paper */
.ht-torn .ht-fine { animation: htOut .6s ease-in-out calc(2.6s - var(--eb)) both; }
.ht-done .ht-fine { opacity: 0; }
.ht-nobeast { transform-box: fill-box; transform-origin: 50% 50%; }
.ht-torn .ht-nobeast { animation: htTuck .6s ease-in-out calc(2.6s - var(--eb)) both; }
.ht-done .ht-nobeast { transform: translateY(-43px) scale(.57); }
.ht-gleam { position: absolute; left: 0; top: -40px; width: 140px; height: 440px; pointer-events: none; transform: translateX(1300px) skewX(-20deg);
  background: linear-gradient(90deg, rgba(255, 246, 214, 0), rgba(255, 246, 214, .6), rgba(255, 246, 214, 0)); }
.ht-intro .ht-gleam { animation: hsGleam 1.4s ease-in-out calc(3s - var(--ea)) both; }
/* the rods: the bottom one starts up against the top one with the paper rolled round it, and rolls down */
.ht-rod { position: absolute; left: 0; width: 1100px; height: 36px; }
.ht-rod.top { top: 22px; } .ht-rod.bottom { top: 382px; }
.ht-rod svg { position: relative; display: block; }
.ht-roll { position: absolute; left: 30px; top: -5px; width: 1040px; height: 46px; border-radius: 23px; transform: scaleY(.5);
  background: linear-gradient(180deg, #a8946a, #efe5cc 30%, #fbf6e8 48%, #d9caa4 70%, #8d7a52); box-shadow: 0 6px 10px var(--shade-55); }
.ht-curl { position: absolute; left: 30px; bottom: 100%; width: 1040px; height: 46px; margin-bottom: -10px; opacity: 0;
  background: linear-gradient(180deg, rgba(60, 40, 10, 0), rgba(60, 40, 10, .1) 55%, rgba(60, 40, 10, .38)); }
.ht-intro .ht-rod.bottom { animation: hsUnrollRod 1.45s linear calc(1.5s - var(--ea)) both; }
.ht-intro .ht-roll { animation: htRoll 1.45s linear calc(1.5s - var(--ea)) both; }
.ht-intro .ht-curl { animation: htCurl 1.45s linear calc(1.5s - var(--ea)) both; }
.ht-torn .ht-rod.top { animation: htRodFall .8s cubic-bezier(.5, 0, .9, .6) calc(2.45s - var(--eb)) both; --rr: -16deg; }
.ht-torn .ht-rod.bottom { animation: htRodFall .7s cubic-bezier(.5, 0, .9, .6) calc(2.5s - var(--eb)) both; --rr: 13deg; }
.ht-torn .ht-roll, .ht-done .ht-roll { display: none; }
/* the claws: each rip opens down its length, then its flaps curl out */
.ht-gouge { position: absolute; display: none; transform-origin: 50% 0; transform: translateX(-50%) rotate(var(--gr)); }
.ht-gouge svg { display: block; overflow: visible; }
.ht-done .ht-gouge { display: block; }
.ht-torn .ht-gouge { display: block; animation: hsTear .2s ease-in calc(var(--gd) - var(--eb)) both; }
.ht-flap { transform-box: fill-box; }
.ht-torn .ht-flap { animation: htFlap .4s cubic-bezier(.3, 1.5, .5, 1) calc(var(--gd) + var(--ft) + .06s - var(--eb)) both; }
.ht-scraps i { position: absolute; display: none; background: #efe6cf; box-shadow: 1px 1px 0 rgba(30, 27, 22, .35); clip-path: polygon(0 10%, 100% 0, 80% 100%, 10% 80%); }
.ht-scraps i.sc1 { background: #d4c6a4; clip-path: polygon(20% 0, 100% 30%, 70% 100%, 0 70%); }
.ht-scraps i.sc2 { background: #fbf5e6; clip-path: polygon(0 0, 100% 20%, 90% 100%, 15% 85%); }
.ht-torn .ht-scraps i { display: block; animation-name: hsScrap; animation-timing-function: cubic-bezier(.2, .6, .5, 1); animation-fill-mode: both; animation-delay: calc(var(--dl) - var(--eb)); }
/* the scrawl lands with a thud and throws ink; the cry slams in under it; the nails go in once it is up top */
.hs-title .ht-name { position: absolute; left: 0; top: 244px; width: 1100px; margin: 0 !important; text-align: center; font-family: var(--font-scrawl) !important; font-weight: 400;
  font-size: 124px !important; line-height: 1; letter-spacing: 2px !important; color: var(--claw) !important; transform: rotate(-3deg); opacity: 0; pointer-events: none;
  text-shadow: 4px 0 0 #060a1c, -4px 0 0 #060a1c, 0 4px 0 #060a1c, 0 -4px 0 #060a1c, 3px 3px 0 #060a1c, -3px 3px 0 #060a1c, 3px -3px 0 #060a1c, -3px -3px 0 #060a1c, 6px 8px 0 rgba(6, 10, 28, .45) !important; }
.ht-torn .ht-name { animation: htStamp .45s cubic-bezier(.5, 0, .7, 1.4) calc(1s - var(--eb)) both; }
.ht-done .ht-name { opacity: 1; }
.ht-spat { position: absolute; left: 0; top: 0; opacity: 0; pointer-events: none; overflow: visible; }
.ht-torn .ht-spat { animation: htSpat .2s ease-out calc(1.22s - var(--eb)) both; }
.ht-done .ht-spat { opacity: 1; }
.ht-cry { position: absolute; left: 20px; top: 334px; width: 1100px; text-align: center; font-family: var(--font-scrawl); font-size: 28px; color: var(--ivory); opacity: 0; transform: rotate(-2deg);
  text-shadow: 3px 0 0 #060a1c, -3px 0 0 #060a1c, 0 3px 0 #060a1c, 0 -3px 0 #060a1c, 2px 2px 0 #060a1c, -2px -2px 0 #060a1c, 2px -2px 0 #060a1c, -2px 2px 0 #060a1c; }
.ht-torn .ht-cry { animation: hsSlam .5s cubic-bezier(.3, 1.4, .5, 1) calc(1.75s - var(--eb)) both; }
.ht-done .ht-cry { opacity: 1; }
.ht-nail { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; display: none;
  background: radial-gradient(circle at 35% 35%, #c9c2b0, #6e675a 55%, #2b271f); box-shadow: 0 2px 2px rgba(0, 0, 0, .6); }
.ht-done .ht-nail { display: block; }
.ht-torn .ht-nail { display: block; animation: htNail .3s cubic-bezier(.3, 1.6, .5, 1) calc(3.55s + var(--nd) - var(--eb)) both; }
.ht-prompt { position: absolute; left: 0; right: 0; bottom: max(36px, env(safe-area-inset-bottom, 0px)); text-align: center; color: var(--ivory); font-family: var(--font-display);
  font-size: 22px; letter-spacing: 3px; text-shadow: 0 2px 6px var(--royal-night); opacity: 0; pointer-events: none; }
.ht-intro .ht-prompt { animation: hsFade .8s ease-out calc(3.3s - var(--ea)) both, hsPulse 2.2s ease-in-out calc(4.1s - var(--ea)) infinite; }
.ht-torn .ht-prompt { opacity: 0; transition: opacity .2s; }
.ht-done .ht-prompt { display: none; }
.hs-title.ht-intro { cursor: default; }
/* the menu: torn scraps nailed to the stake beside the fire, the Grudges on the broken trunk */
.hs-title .ht-menu { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.ht-intro .ht-menu { visibility: hidden; }
.ht-torn .ht-menu .ht-in { animation: htPin .45s cubic-bezier(.3, 1.4, .5, 1) calc(3.6s + var(--i) * .07s - var(--eb)) both; }
.ht-done .ht-menu > *, .ht-done .ht-post > * { pointer-events: auto; }
.hs-title .ht-post { position: absolute; left: 1398px; top: 326px; width: 404px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hs-title .ht-row { display: flex; justify-content: space-between; width: 100%; }
.hs-title .ht-scrap { position: relative; display: block; width: 392px; min-height: 84px; padding: 16px 22px 12px; border: 0; background: var(--ivory); color: var(--royal); cursor: pointer;
  font-family: var(--font-display); font-size: 36px; line-height: 1.05; text-align: center; box-shadow: 0 6px 12px rgba(0, 0, 0, .6); transform: rotate(var(--rot, 1deg));
  clip-path: polygon(0 4%, 9% 0, 22% 5%, 38% 0, 53% 4%, 67% 0, 82% 5%, 100% 0, 98% 35%, 100% 70%, 98% 100%, 80% 95%, 64% 100%, 48% 95%, 33% 100%, 16% 95%, 0 100%, 2% 62%, 0 30%);
  transition: translate .15s ease-out, filter .15s; }
.hs-title .ht-scrap::before { content: ""; position: absolute; left: var(--nx, 50%); top: 7px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #c9c2b0, #6e675a 55%, #2b271f); box-shadow: 0 2px 2px rgba(0, 0, 0, .6); }
.hs-title .ht-scrap::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 160, 80, .2), transparent 45%, rgba(10, 14, 40, .26)), radial-gradient(ellipse at 80% 90%, rgba(120, 90, 40, .16), transparent 55%); }
.hs-title .ht-scrap:hover { translate: 0 -3px; filter: brightness(1.06); }
.hs-title .ht-scrap:focus-visible { outline: none; filter: brightness(1.08) drop-shadow(0 0 0 var(--gilt)); background: #fff6dc; }
.hs-title .ht-scrap:active { translate: 0 1px; }
.hs-title .ht-lbl { display: block; }
.hs-title .ht-scrap.primary { background: var(--claw); color: var(--ivory); font-family: var(--font-scrawl); font-size: 30px; --rot: -1.6deg; padding-top: 22px;
  clip-path: polygon(0 6%, 7% 0, 18% 4%, 31% 0, 46% 3%, 60% 0, 74% 4%, 88% 0, 100% 5%, 98% 30%, 100% 58%, 97% 82%, 100% 100%, 84% 96%, 70% 100%, 55% 95%, 41% 100%, 25% 96%, 12% 100%, 0 96%, 3% 70%, 0 44%, 2% 22%); }
.hs-title .ht-scrap.primary:focus-visible { background: #b8322a; }
.hs-title .ht-scrap.ht-tag { width: auto; min-height: 0; padding: 7px 18px 6px 30px; font-family: var(--font-body); font-style: italic; font-size: 18px; color: var(--claw-dark); background: var(--paper-2); --rot: 2deg; --nx: 15px;
  clip-path: polygon(0 10%, 30% 0, 62% 8%, 100% 0, 96% 55%, 100% 100%, 64% 92%, 30% 100%, 0 94%, 4% 50%); }
.hs-title .ht-scrap.ht-tag::before { top: 50%; margin-top: -7px; }
.hs-title .ht-scrap.sm { width: 196px; font-size: 26px; padding: 22px 8px 10px; white-space: nowrap; }
.hs-title .ht-scrap.sm.left { --rot: -2.2deg; --nx: 90%; clip-path: polygon(0 8%, 14% 0, 33% 6%, 52% 0, 73% 5%, 100% 0, 97% 50%, 100% 100%, 76% 94%, 50% 100%, 27% 94%, 0 100%, 3% 52%); }
.hs-title .ht-scrap.sm.right { --rot: 1.9deg; --nx: 10%; clip-path: polygon(0 0, 22% 6%, 45% 0, 70% 5%, 100% 2%, 98% 46%, 100% 94%, 74% 100%, 48% 94%, 22% 100%, 2% 95%, 0 50%); }
.hs-title .ht-scrap.sm .ht-lbl + * { display: table; margin: 4px auto 0; }
.hs-title .ht-scrap .count { font-family: var(--font-body); font-size: 15px; padding: 1px 8px 2px; background: var(--royal); color: var(--ivory); }
.hs-title .coin-chip { font-family: var(--font-body); font-size: 15px; background: var(--royal) !important; color: var(--ivory) !important; padding: 1px 8px 2px; border: 0 !important; border-radius: 0 !important; }
.hs-title .save-info { display: block; color: #f6e2d6; font-family: var(--font-body); font-size: 18px; margin: 6px 0 0; text-align: center; line-height: 1.2; }
.hs-title .ht-warn { display: block; margin: 4px 0 0; font-family: var(--font-body); font-size: 15px; line-height: 1.15; color: var(--ink-muted); font-style: italic; text-align: center; }
/* the plaque at the foot of the stake: regions, the final boss, the build line */
.hs-title .ht-plaque { width: 372px; padding: 9px 16px 10px; margin-top: 4px; box-sizing: border-box; text-align: center; transform: rotate(.8deg);
  background: var(--royal-deep); border: 2px solid var(--gilt); box-shadow: inset 0 0 0 3px var(--royal-deep), inset 0 0 0 4px var(--gilt-dark), 0 6px 12px rgba(0, 0, 0, .6); }
.hs-title .boss-status { margin: 0; color: var(--ivory); font-size: 18px; line-height: 1.25; text-align: center; text-shadow: none; }
.hs-title .regions-found { margin: 0; font-family: var(--font-display); font-size: 21px; line-height: 1.25; color: var(--gilt-light); text-align: center; text-shadow: none; }
.hs-title .boss-status b { color: var(--ivory); }
.hs-title .fine { margin: 5px 0 0; color: #c8cde0; font-size: 18px; line-height: 1.2; opacity: 1; text-align: center; }
.hs-title .ht-grudge { position: absolute; left: 46px; top: 548px; width: 372px; transform: rotate(-1.6deg); }
.hs-title .ht-grudge:hover { translate: 0 -2px; }
.hs-title .ht-grudge .bounty-board { padding-top: 30px !important; clip-path: polygon(0 2%, 12% 0, 30% 3%, 50% 0, 70% 3%, 88% 0, 100% 2%, 99% 40%, 100% 78%, 98% 100%, 80% 98%, 60% 100%, 40% 97%, 20% 100%, 0 98%, 1% 60%); }
.hs-title .ht-grudge .bb-row { font-size: 18px; line-height: 1.15; }
.hs-title .ht-grudge .bb-foot { font-size: 15px !important; }
.hs-title .discord-btn { position: absolute; }
/* Reduce motion (ht-calm): the same story with fades only. The sheet fades in unrolled; the click fades in the claws and the scrawl;
   the sheet fades out, is put in the logo's place unseen, and fades back in as the wall crossfades to a still camp */
.ht-calm .ht-paper, .ht-calm .ht-rod.bottom, .ht-calm .ht-gleam, .ht-calm .ht-bob, .ht-calm .ht-flap, .ht-calm .ht-shake, .ht-calm .ht-motes i,
.ht-calm .hn-mon, .ht-calm .hn-glow, .ht-calm .hn-flame, .ht-calm .hn-tw { animation: none; }
.ht-calm .ht-scrap:hover, .ht-calm .ht-grudge:hover { translate: none; }
.ht-calm.ht-intro .ht-drop { animation: hsFade .8s ease-out calc(.2s - var(--ea)) both; }
.ht-calm.ht-torn .ht-drop { animation: none; }
.ht-calm.ht-intro .ht-prompt { animation: hsFade .6s ease-out calc(1s - var(--ea)) both; }
.ht-calm.ht-torn .ht-gouge { animation: hsFade .5s ease-out calc(var(--gd) * .3 - var(--eb)) both; }
.ht-calm.ht-torn .ht-name, .ht-calm.ht-torn .ht-spat { animation: hsFade .6s ease-out calc(.4s - var(--eb)) both; }
.ht-calm.ht-torn .ht-cry { animation: hsFade .6s ease-out calc(.8s - var(--eb)) both; }
.ht-calm.ht-torn .ht-bob { animation: htOut .5s ease-in calc(1.2s - var(--eb)) forwards, hsFade .5s ease-out calc(1.75s - var(--eb)) forwards; }
.ht-calm.ht-torn .ht-slide { animation: htSlide .01s steps(1, end) calc(1.7s - var(--eb)) both; }
.ht-calm.ht-torn .ht-paper { animation: htRag .01s steps(1, end) calc(1.7s - var(--eb)) both; }
.ht-calm.ht-torn .ht-rod, .ht-calm.ht-torn .ht-cord, .ht-calm.ht-torn .ht-fine { animation: htOut .01s steps(1, end) calc(1.7s - var(--eb)) both; }
.ht-calm.ht-torn .ht-nobeast { animation: htTuck .01s steps(1, end) calc(1.7s - var(--eb)) both; }
.ht-calm.ht-torn .ht-wall { animation: htOut 1s ease-in-out calc(1.2s - var(--eb)) both; }
.ht-calm.ht-torn .ht-night { animation: hsFade 1s ease-in-out calc(1.2s - var(--eb)) both; }
.ht-calm.ht-torn .ht-nail { animation: hsFade .3s ease-out calc(1.75s - var(--eb)) both; }
.ht-calm.ht-torn .ht-menu .ht-in { animation: hsFade .5s ease-out calc(2.2s + var(--i) * .05s - var(--eb)) both; }
@keyframes hsFade { from { opacity: 0; } to { opacity: 1; } }
/* the drop: a weighted fall on its cords, a catch that bounces, a sway that dies away */
@keyframes hsDrop {
  0% { transform: translateY(calc(-125vh / var(--ps))) rotate(0deg); animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
  55% { transform: translateY(0) rotate(1.6deg); animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  66% { transform: translateY(-22px) rotate(-1.2deg); animation-timing-function: cubic-bezier(.6, 0, .8, .4); }
  77% { transform: translateY(0) rotate(.8deg); animation-timing-function: ease-out; }
  86% { transform: translateY(-5px) rotate(-.4deg); animation-timing-function: ease-in; }
  94% { transform: translateY(0) rotate(.15deg); animation-timing-function: ease-in-out; }
  100% { transform: translateY(0) rotate(0deg); } }
/* the unroll: paper revealed as the bottom rod rolls down (it overshoots a touch and settles), the roll thinning, the curl's shadow riding the edge */
@keyframes hsUnrollPaper { 0% { clip-path: inset(0 0 94% 0); animation-timing-function: cubic-bezier(.45, .05, .55, 1); } 85%, 100% { clip-path: inset(0 0 0 0); } }
@keyframes hsUnrollRod { 0% { transform: translateY(-340px); animation-timing-function: cubic-bezier(.45, .05, .55, 1); } 85% { transform: translateY(0); animation-timing-function: ease-out; }
  92% { transform: translateY(5px); animation-timing-function: ease-in-out; } 100% { transform: translateY(0); } }
@keyframes htRoll { 0% { transform: scaleY(1); animation-timing-function: cubic-bezier(.45, .05, .55, 1); } 85%, 100% { transform: scaleY(.5); } }
@keyframes htCurl { 0% { opacity: 1; animation-timing-function: cubic-bezier(.45, .05, .55, 1); } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes hsBob { 0%, 100% { transform: rotate(-.35deg); } 50% { transform: translateY(-6px) rotate(.35deg); } }
@keyframes hsGleam { from { transform: translateX(-240px) skewX(-20deg); } to { transform: translateX(1300px) skewX(-20deg); } }
@keyframes hsTear { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(-20px -20px -20px -20px); } }
@keyframes htFlap { from { transform: scale(0, 1); } to { transform: scale(1, 1); } }
@keyframes hsShake { 0%, 100% { transform: translate(0, 0); } 15% { transform: translate(-9px, 5px); } 35% { transform: translate(8px, -6px); } 55% { transform: translate(-6px, 3px); } 75% { transform: translate(4px, -2px); } }
@keyframes hsScrap { 0% { transform: translate(0, 0) rotate(0deg); opacity: 0; } 3% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }
@keyframes htStamp { 0% { opacity: 0; transform: rotate(-3deg) scale(1.7); } 60% { opacity: 1; transform: rotate(-3deg) scale(.95); } 80% { transform: rotate(-3deg) scale(1.02); } 100% { opacity: 1; transform: rotate(-3deg) scale(1); } }
@keyframes htSpat { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
@keyframes hsSlam { 0% { opacity: 0; transform: rotate(-2deg) scale(1.9); } 70% { opacity: 1; transform: rotate(-2deg) scale(.94); } 100% { opacity: 1; transform: rotate(-2deg) scale(1); } }
@keyframes htRag { from { clip-path: inset(0 0 0 0); } to { clip-path: var(--rag); } }
@keyframes htRodFall { from { transform: translateY(0) rotate(0deg); opacity: 1; } to { transform: translateY(900px) rotate(var(--rr)); opacity: 0; } }
@keyframes htCordUp { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-140px); opacity: 0; } }
@keyframes htOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes htTuck { from { transform: none; } to { transform: translateY(-43px) scale(.57); } }
@keyframes htIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: scale(1); } }
@keyframes htSlide { from { transform: translate(calc(var(--px) - 550px), calc(var(--py) - 220px)) scale(var(--ps)); } to { transform: translate(calc(var(--fx) - 550px), calc(var(--fy) - 220px)) scale(var(--fs)); } }
@keyframes htNail { from { opacity: 0; transform: scale(2.4); } to { opacity: 1; transform: scale(1); } }
@keyframes htPin { from { opacity: 0; translate: 0 -28px; scale: 1.08; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes hsPulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes hsMote { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: .9; } 100% { transform: translateY(-300px); opacity: 0; } }
@keyframes hnBreathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.006, 1.014); } }
@keyframes hnFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes hnFlicker { 0% { opacity: .75; } 12% { opacity: .9; } 25% { opacity: .7; } 38% { opacity: 1; } 50% { opacity: .82; } 63% { opacity: .95; } 75% { opacity: .72; } 88% { opacity: .92; } 100% { opacity: .78; } }
@keyframes hnLick { from { transform: scale(1, 1) skewX(-2deg); } to { transform: scale(.97, 1.07) skewX(2.5deg); } }
@keyframes hnEmber { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: .95; } 100% { transform: translate(var(--ex), -360px); opacity: 0; } }
@keyframes hnTwinkle { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .ht-bob, .ht-motes i, .hn-mon, .hn-glow, .hn-flame, .hn-tw { animation: none !important; } .hn-embers { display: none; } }
/* ---------- the Grudges board: a notice pinned to the wall ---------- */

.bounty-board::before { content: ""; position: absolute; left: 50%; top: 6px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #8b8270, #5b5446 60%, #2a2620); box-shadow: 0 0 0 2px #2a2620; }
.bounty-board .bb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border: 0 !important; padding: 0 !important; margin: 0 0 6px; }
.bounty-board .bb-head b { font-family: var(--font-scrawl); font-weight: 400; color: var(--claw) !important; font-size: 22px; }
.bounty-board .bb-head small { color: var(--ink-muted) !important; font-size: 14px; }
.bounty-board .bb-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0 !important; border: 0 !important; border-bottom: 1px dashed #8a7f68 !important; font-size: 16px; color: var(--ink) !important; }
.bounty-board .bb-row:last-of-type { border-bottom: 0 !important; }
.bounty-board .bb-row em { font-style: normal; font-weight: 700; color: var(--royal) !important; white-space: nowrap; }
.bounty-board .bb-row.done span { text-decoration: line-through; text-decoration-color: var(--claw); text-decoration-thickness: 2px; opacity: .75; }
.bounty-board .bb-foot { margin: 6px 0 0 !important; font-size: 13.5px !important; font-style: italic; color: var(--ink-muted) !important; line-height: 1.35; opacity: 1 !important; }
#bountyPop .bp-box > b { font-family: var(--font-scrawl); font-weight: 400; color: var(--claw) !important; }
#bountyPop .bp-box small { color: var(--ink-muted) !important; }
/* ---------- the fight: a royal survey sheet of Brightmarch ---------- */

.arena.stage::after { content: "Royal Survey of Brightmarch"; position: absolute; right: 18px; top: 10px; z-index: 0; font-family: var(--font-display); font-size: 15px; color: #8c7f62; pointer-events: none; letter-spacing: .02em; }
.stage .turn-banner, .turn-banner { background: var(--royal) !important; color: var(--ivory) !important; border: 0 !important; border-bottom: 2px solid var(--gilt) !important; border-radius: 0 !important;
  font-family: var(--font-display); font-weight: 400; font-size: 16px; backdrop-filter: none !important; box-shadow: 0 4px 10px rgba(5, 9, 24, .3); }
.turn-banner.enemy { background: var(--claw) !important; border-bottom-color: var(--claw-dark) !important; }
.log-box .log { background: var(--royal-night) !important; border-radius: 0 !important; color: var(--mist); font-family: var(--font-body); font-size: 13px; }
.log .player { color: #c9d6f5; } .log .enemy { color: #f3b7ae; } .log .system { color: #f3e3b0; } .log .good { color: #cfe3b5; }
#enemyPanel .plate { border-color: var(--royal) !important; box-shadow: 3px 3px 0 rgba(36, 52, 107, .3) !important; }
.pack .mini-plate b { font-family: var(--font-display) !important; font-weight: 400 !important; color: var(--ink) !important; }
#enemyPanel .name, .pack .mini-plate b { color: var(--royal) !important; }
.pack .mini-hp i { background: var(--moss) !important; background-image: none !important; border-right: 0 !important; border-radius: 0 !important; }
#enemyPanel .hpfill, .pack .mini-hp i { background: var(--claw) !important; }
.pack .mini-hp span { color: var(--ivory) !important; font-family: var(--font-body) !important; font-weight: 700; text-shadow: 0 1px 0 var(--shade-60) !important; }
.stage .hptext {
  color: var(--ivory) !important; font-family: var(--font-body) !important; font-weight: 700; text-shadow: 0 1px 0 var(--shade-60) !important;
}
.stage .block-badge { background: var(--royal) !important; border: 2px solid var(--ivory) !important; color: var(--ivory) !important; font-family: var(--font-body); }
/* intents: claw red badges */
.intent, .intent.attack, .intent.defend, .intent.buff, .intent.breath { background: var(--claw) !important; color: var(--ivory) !important; border: 0 !important; border-radius: 0 !important;
  box-shadow: 0 3px 0 var(--claw-dark), 0 6px 12px var(--ink-25) !important; font-family: var(--font-body); font-weight: 700; }
.intent.defend { background: var(--royal) !important; box-shadow: 0 3px 0 var(--royal-night) !important; }
.intent.buff { background: var(--ink-muted) !important; box-shadow: 0 3px 0 var(--ink) !important; }
.intent img.wi { filter: drop-shadow(0 0 1px rgba(239, 230, 210, .6)); }
/* status chips: small stamped tags */
.status { border-radius: 0 !important; font-family: var(--font-body); font-weight: 700; background: var(--ivory) !important; color: var(--ink) !important; border: 1px solid var(--ink) !important; }
.status.passive { border-color: var(--gilt-dark) !important; color: var(--ink) !important; box-shadow: inset 0 0 0 1px var(--gilt) !important; cursor: help; }
.floater.energy, .floater.buff { color: #6d531a !important; }
.energy-orb span { font-family: var(--font-body) !important; font-weight: 700; }
.energy-orb small { font-family: var(--font-display); font-weight: 400; letter-spacing: .06em; text-transform: none; font-size: 12px; }
.pile .pile-count { color: var(--ink) !important; font-family: var(--font-body) !important; font-weight: 700; }
.pile .pile-label { color: var(--ink-muted) !important; font-family: var(--font-display); font-weight: 400; letter-spacing: .06em; text-transform: none; font-size: 13px; }
#endTurnBtn { font-size: 21px; }

/* ---------- cards: torn scraps of proclamation paper with a red wax seal ---------- */
.card { --tc: var(--claw); --paper-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 140' preserveAspectRatio='none'%3E%3Cpolygon points='0,3 7,1.2 14,2.8 22,0.6 30,2.2 38,0 46,2.6 54,0.9 62,2.4 70,0.2 78,2.5 86,0.7 93,2.2 100,0.9 100,140 0,140' fill='%23efe6d2'/%3E%3C/svg%3E");
  background: var(--paper-svg) 0 0 / 100% 100% no-repeat !important; border: 0 !important; border-radius: 0 !important; color: var(--ink) !important;
  box-shadow: 0 10px 14px -6px var(--night-55) !important; padding-top: 22px !important; }
.card:not(.pinned)::after { content: ""; position: absolute; inset: 3% 0 0; pointer-events: none; z-index: 0;
  background: linear-gradient(180deg, transparent 70%, rgba(150, 128, 86, .12)), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='8'/%3E%3CfeColorMatrix values='0 0 0 0 .35  0 0 0 0 .28  0 0 0 0 .18  0 0 0 .12 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23g)'/%3E%3C/svg%3E"); }
.card > * { position: relative; z-index: 1; }
.card > .cost, .card > .build-tag { position: absolute; z-index: 3; }
.card.attack { --tc: var(--claw); } .card.skill { --tc: var(--royal); }
.card.upgraded .card-name { color: var(--moss) !important; }
.card.r-common .rar { color: var(--ink-muted) !important; } .card.r-uncommon .rar { color: var(--royal) !important; } .card.r-rare .rar { color: #7a5a14 !important; } .card.r-legendary .rar { color: var(--claw) !important; }
.card .card-art.has-img { border: 1px solid var(--ink) !important; border-radius: 0 !important; }
.card .card-text { color: var(--ink) !important; font-family: var(--font-body); }
.card .card-text .kw { color: var(--claw) !important; }
.card.e-focus .cost, .card.e-mana .cost { background: var(--claw) !important; }
.card.unplayable .cost { background: #7d6b66 !important; }
/* a bond card whose match is in your partner's hand (shared fight): a gilt glow along the paper's torn edge */
.card.bonded, body.fit .hand .card.bonded { filter: drop-shadow(0 0 2px #fff3c4) drop-shadow(0 0 7px var(--gilt)) drop-shadow(0 0 16px rgba(201, 161, 59, .95)) drop-shadow(0 10px 12px rgba(0, 0, 0, .4)); }
.card.bonded.unplayable, body.fit .hand .card.bonded.unplayable { filter: saturate(.35) brightness(.78) drop-shadow(0 0 2px #fff3c4) drop-shadow(0 0 7px var(--gilt)) drop-shadow(0 0 16px rgba(201, 161, 59, .95)) !important; }
.card.r-uncommon, .card.r-rare, .card.r-legendary, .card.r-earned { box-shadow: 0 10px 14px -6px var(--night-55) !important; }
.card.r-legendary { animation: none; --paper-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 140' preserveAspectRatio='none'%3E%3Cpolygon points='0,3 7,1.2 14,2.8 22,0.6 30,2.2 38,0 46,2.6 54,0.9 62,2.4 70,0.2 78,2.5 86,0.7 93,2.2 100,0.9 100,140 0,140' fill='%23efe6d2'/%3E%3Crect x='0' y='136.5' width='100' height='3.5' fill='%23a3261f'/%3E%3C/svg%3E"); }
.hand .card:hover:not(.unplayable), .card.selectable:hover { box-shadow: 0 18px 22px -8px rgba(5, 9, 24, .65) !important; filter: drop-shadow(0 0 3px rgba(201, 161, 59, .95)); }
.up-pair.armed .up-nxt .card { filter: drop-shadow(0 0 4px var(--gilt)); box-shadow: none !important; }
#cardReveal .reveal-hint { color: var(--ivory) !important; font-family: var(--font-body) !important; font-style: italic; }

/* ---------- the map: a royal survey sheet, monster trails inked over it in claw red ---------- */
.map-scroll.survey { background-color: var(--ivory) !important; border: 2px solid var(--royal) !important; border-radius: 0 !important;
  box-shadow: inset 0 0 0 5px var(--ivory), inset 0 0 0 6px var(--royal), inset 0 0 40px rgba(150, 128, 86, .25) !important;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='560' viewBox='0 0 520 560'%3E%3Cg fill='none' stroke='%23d6caa9' stroke-width='1.3'%3E%3Cpath d='M0 90 C90 60 180 130 270 95 S440 55 520 92'/%3E%3Cpath d='M0 200 C100 170 190 240 280 205 S450 165 520 202'/%3E%3Cpath d='M0 310 C110 280 200 350 290 315 S460 275 520 312'/%3E%3Cpath d='M0 420 C120 390 210 460 300 425 S470 385 520 422'/%3E%3Cpath d='M0 520 C130 490 220 560 310 525 S480 485 520 522'/%3E%3C/g%3E%3Cg stroke='%23e0d6bc' stroke-width='1'%3E%3Cpath d='M0 0 H520 M0 140 H520 M0 280 H520 M0 420 H520 M130 0 V560 M260 0 V560 M390 0 V560'/%3E%3C/g%3E%3C/svg%3E") !important;
  background-size: 520px 560px !important; background-repeat: repeat !important; }
@keyframes hsNodePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(163, 38, 31, .55); } 50% { box-shadow: 0 0 0 9px rgba(163, 38, 31, 0); } }
.road-tag .bubble::after { border-top-color: var(--royal) !important; }
.road-tag .bubble.below::after { border-top-color: transparent !important; border-bottom-color: var(--royal) !important; }
.map-node .bubble b, .road-tag .bubble b { color: var(--ink) !important; font-family: var(--font-display); font-weight: 400; }
.road-tag > b { background: var(--royal) !important; color: var(--ivory) !important; font-family: var(--font-display) !important; font-weight: 400 !important; }
.map-head h1 { color: var(--royal) !important; }

/* ---------- tiles on the proclamations: aged paper, ink, royal headings ---------- */
.modal .shop-item, .modal .coin-report, .modal .beast, .modal .oath-banner, .modal .unlock-list li, .modal .kw-row, .modal .final-card, .modal .demo-card, .modal .unlock-banner, .modal .weekly-card {
  background: var(--paper) !important; color: var(--ink) !important; border: 1px solid var(--paper-edge) !important; border-radius: 0 !important; box-shadow: 0 2px 0 rgba(30, 27, 22, .14) !important; }
.modal .shop-item.owned { border-color: var(--moss) !important; }
.modal .shop-item.armed { border-color: var(--claw) !important; box-shadow: 0 0 0 2px var(--claw) !important; }
.modal .shop-item.teaser { border-style: dashed !important; }
.modal .shop-top b, .modal .beast b, .modal .cr-head b, .modal .oath-banner b, .modal .ul-txt b, .modal .kw-row b, .modal .final-card h3, .modal .demo-card h3, .modal .shop-item.teaser b, .modal .glossary h3, .modal .unlock-list h3 {
  color: var(--royal) !important; font-family: var(--font-display) !important; font-weight: 400 !important; font-style: normal !important; text-shadow: none !important; }
.modal .shop-item p, .modal .beast small, .modal .beast em, .modal .cr-head span, .modal .coin-report li span, .modal .oath-banner span, .modal .ul-txt small, .modal .kw-row small, .modal .final-card p, .modal .shop-top .tier { color: var(--ink-muted) !important; opacity: 1 !important; }
.modal .coin-report li { color: var(--ink-muted) !important; opacity: 1 !important; border-bottom-color: rgba(30, 27, 22, .2) !important; }
.modal .coin-report li em, .modal .oath-banner em, .modal .ul-gets, .modal:not(.title-modal) .boss-status.won { color: var(--moss-dark) !important; }
.modal .coin-report li.neg em { color: var(--claw) !important; }
.modal .beast .b-art { background: rgba(30, 27, 22, .06); }
.modal .beast.unseen { border-style: dashed !important; }
.modal .beast.unseen .b-art .emo { filter: grayscale(1) opacity(.45); }
.modal .ul-ico { background: var(--ivory) !important; box-shadow: inset 0 0 0 2px var(--royal) !important; }
.modal:not(.title-modal) .boss-status, .modal:not(.title-modal) .boss-status b { color: var(--ink-muted); }
/* chips and small toggles in the Stash and the tracker */
.modal .pb, .modal .track-btn, .modal .chart .chip {
  background: var(--paper) !important; color: var(--ink) !important; border: 1px solid var(--paper-edge) !important; border-radius: 0 !important; font-family: var(--font-body) !important; }
.modal .pb.base { border-color: var(--royal) !important; }
.modal .track-btn.on, .modal .chart .chip.on { background: var(--royal) !important; color: var(--ivory) !important; border-color: var(--royal) !important; }
.modal .cb-over { background: rgba(239, 230, 210, .96) !important; border-color: var(--royal) !important; border-radius: 0 !important; }
.modal .cb-over small { color: var(--ink) !important; }
.modal .mg-line.mg-found { color: #6d531a !important; }
.modal.stash-modal:has(.stash-left:empty), .modal:has(.stash-grid > .stash-left:empty) { width: min(600px, 94vw) !important; }
.stash-wearing { background: var(--royal) !important; border-color: var(--gilt) !important; border-radius: 0 !important; }
/* ---------- the Trader ---------- */

.shop-banner { border: 0 !important; border-radius: 0 !important; height: 150px; }
.shop-banner[style*="url()"] { height: auto !important; background: none !important; justify-content: center; padding-top: 14px; }
.shop-banner h1 { background: var(--royal) !important; color: var(--ivory) !important; border: 0 !important; border-bottom: 3px solid var(--gilt) !important; border-radius: 0 !important; text-shadow: none !important; font-family: var(--font-display); font-weight: 400; padding: 6px 26px !important; }
.shop-banner h1::after { display: none !important; }
.purse > img, .purse > .wi { width: 34px !important; height: 34px !important; }
.purse b { color: var(--royal) !important; font-family: var(--font-body) !important; }
.shop-note { color: var(--ink-muted); }
.shop-note.ok { color: var(--moss-dark); }
.btn.buy.poor { opacity: .6; }

/* ---------- choosing your monster: three portraits on the wall ---------- */
.modal.split-modal { background: var(--royal-night) !important; }

/* ---------- a few more of the kingdom's notices ---------- */
.reward-modal.modal > h1 { color: var(--ivory) !important; }
.modal .event-scene h1 { color: var(--ivory) !important; text-shadow: 0 2px 0 var(--royal-night), 0 0 16px rgba(13, 20, 48, .9) !important; }
.modal .event-scene:not([style*="background-image"]) { background: var(--royal-mid) var(--damask) 0 0 / 90px 90px !important; box-shadow: inset 0 0 0 2px var(--royal), inset 0 0 0 5px var(--gilt), inset 0 0 0 6px var(--royal) !important; }
.modal .event-art { filter: none !important; }
.ach-row.done { border-color: var(--moss) !important; }
.ach-row .ach-ico img.wi { opacity: .9; }
.kw-row > span img.wi { width: 22px; height: 22px; }
.rw-step { color: var(--ink-muted) !important; }
.modal .sub b, .modal p b { color: var(--royal); }
.modal .legend span { color: var(--ink-muted); }
.dev-tools, .dev-tools summary { color: var(--ink-muted) !important; }
.modal .btn.ghost { color: var(--ink); border-color: var(--ink-45); background: transparent; }
.modal .btn.ghost:hover:not(:disabled) { background: rgba(36, 52, 107, .08); border-color: var(--royal); }
/* minigames: a board pinned onto the notice */
.modal .mg-top b { color: var(--royal) !important; }
.modal .mg-tip, .modal .mg-startrow .mg-tut { color: var(--ink) !important; }
.modal .mg-score, .modal .mg-stakes { color: var(--ink-muted) !important; }
.modal .mg-score b { color: var(--royal) !important; }
.mg-board { border: 2px solid var(--royal) !important; border-radius: 0 !important; box-shadow: inset 0 0 0 2px var(--gilt), 0 6px 16px var(--night-35) !important; }
.mg-inst.mg-demo { border: 2px dashed var(--royal) !important; border-radius: 0 !important; background: rgba(36, 52, 107, .07) !important; box-shadow: none !important; }
.mg-banner { border-radius: 0 !important; background: var(--royal) !important; font-family: var(--font-display) !important; font-weight: 400 !important; }
.mg-banner.bad { background: var(--claw) !important; color: var(--ivory) !important; }
.modal .event-scene { border-radius: 0 !important; }
/* phones: a slimmer top bar so the fight keeps its room */
@media (max-width: 600px) {
  .topbar { padding: 6px 8px !important; gap: 6px !important; }
  .run-info { gap: 5px; }
  .chip { font-size: 13px; padding: 3px 7px !important; }
  .top-actions { gap: 5px; }
  .top-actions .btn.ghost { font-size: 13px; padding: 5px 8px; }
}
.bounty-board .bb-head small { opacity: 1 !important; }
.bounty-board .bb-row.done em { color: var(--moss-dark) !important; }
/* curse cards: a scrap blotted and scratched over in ink */
.card.curse { --tc: var(--ink); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 140' preserveAspectRatio='none'%3E%3Cpolygon points='0,3 7,1.2 14,2.8 22,0.6 30,2.2 38,0 46,2.6 54,0.9 62,2.4 70,0.2 78,2.5 86,0.7 93,2.2 100,0.9 100,140 0,140' fill='%23d3c9b2'/%3E%3Cg fill='%231e1b16' opacity='.16'%3E%3Cellipse cx='18' cy='112' rx='14' ry='9'/%3E%3Cellipse cx='84' cy='30' rx='10' ry='7'/%3E%3Ccircle cx='70' cy='124' r='5'/%3E%3C/g%3E%3Cpath d='M6 20 L94 132 M94 20 L6 132' stroke='%231e1b16' stroke-width='1.2' opacity='.18'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat !important; box-shadow: 0 10px 14px -6px var(--night-55) !important; }
.card.curse .card-name { color: var(--ink) !important; }
.card.curse .cost { background: var(--ink) !important; color: var(--ivory) !important; }
.card .kw.curse-kw { color: var(--claw-dark) !important; }
.card.r-curse .rar { color: var(--claw-dark) !important; }
.modal .event-scene:not([style*="background-image"])::after { display: none !important; }
.hs-title .boss-status.won { color: #cfe3b5; }
.hs-title .boss-bar { margin-top: 6px; }
.kw-pop b { color: var(--royal) !important; font-family: var(--font-display); font-weight: 400; font-size: 15px !important; }
/* the first-fight walk-through: a royal notice with a gilt edge */
.combat-tut .ct-box { border-radius: 0 !important; background: var(--royal-mid) !important; border: 1px solid var(--gilt) !important; color: var(--ivory) !important;
  box-shadow: inset 0 0 0 3px var(--royal-mid), inset 0 0 0 4px rgba(201, 161, 59, .5), 0 14px 30px rgba(5, 9, 24, .6) !important; }
.combat-tut .ct-box b { font-family: var(--font-display) !important; font-weight: 400 !important; color: #f3e3b0 !important; }
.combat-tut .ct-rings i {
  position: fixed; pointer-events: none; border-radius: 0 !important; box-shadow: 0 0 0 2px var(--gilt), 0 0 18px rgba(201, 161, 59, .45) !important;
}
/* choosing a specialization after a region: paper slips side by side */
.spec-box { margin: 10px auto 4px; max-width: 640px; }
.spec-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 8px; }
.spec-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 12px 10px; text-align: center; cursor: pointer;
  background: var(--paper); color: var(--ink); border: 1px solid var(--paper-edge); border-radius: 0; box-shadow: 0 2px 0 rgba(30, 27, 22, .14); font: inherit; transition: transform .12s, border-color .12s; }
.spec-opt:hover:not(:disabled) { border-color: var(--royal); transform: translateY(-2px); }
.spec-opt.chosen { border-color: var(--claw); box-shadow: 0 0 0 2px var(--claw); }
.spec-opt:disabled:not(.chosen) { opacity: .55; cursor: default; }
.spec-opt b { font-family: var(--font-display); font-weight: 400; font-size: 17px; color: var(--royal); }
.spec-opt small { font-size: 13px; line-height: 1.35; color: var(--ink-muted); }
.spec-opt .spec-ico { font-size: 22px; line-height: 1; }
.spec-opt .spec-ico img { width: 26px; height: 26px; }
.ach-row:not(.done) .ach-ico { opacity: .6; }
.ach-row:not(.done) em { color: var(--ink-muted) !important; }
@media (max-width: 600px) {
  .modal.rest-modal .option-grid.rest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 6px; }
  .modal.rest-modal .sc-opt { height: 46px; }
  .modal.rest-modal .option-card { padding: 0 6px 8px !important; }
  .modal.rest-modal .option-card b { font-size: 14px; }
  .modal.rest-modal .option-card span { font-size: 11.5px; }
}
@media (max-width: 860px) { .arena.stage::after { display: none; } }

/* ----- co-op: spectating the partner (read-only) and the region captions between apart and together ----- */
body.coop-watching #modal, body.coop-watching #hand, body.coop-watching #endTurnBtn { pointer-events: none; }
.cine.party-story { opacity: 1; cursor: pointer; background: var(--royal-night) var(--damask) 0 0 / 90px 90px; }
.party-story-title { position: absolute; left: 50%; top: 36vh; transform: translateX(-50%); margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 44px; color: var(--ivory); letter-spacing: .04em; border-bottom: 3px solid var(--gilt); padding: 0 26px 6px; white-space: nowrap; }

/* the reunion recap (crier.js): the captions above, each player's numbers side by side under them; fits one 1280x800 screen */
.cine.party-story.recap .party-story-title { top: 3.5vh; font-size: 36px; }
.cine.party-story.recap .cine-sub { top: 14vh; bottom: auto; min-height: 3.2em; font-size: clamp(16px, 2.7vh, 24px); }
.recap-box { position: absolute; left: 50%; top: 30vh; transform: translateX(-50%); width: min(720px, 92vw); z-index: 4; pointer-events: none; color: var(--ivory); font-family: var(--font-body); }
.recap-box table { width: 100%; border-collapse: collapse; background: rgba(4, 7, 17, .66); border: 1px solid rgba(201, 161, 59, .55); }
.recap-box caption { caption-side: top; padding: 0 0 6px; text-align: left; font-family: var(--font-display); letter-spacing: .06em; color: var(--gilt); font-size: 16px; }
.recap-box th { padding: 6px 14px; font-size: 17px; line-height: 1.25; border-bottom: 1px solid rgba(201, 161, 59, .22); }
.recap-box td {
  padding: 6px 14px; font-size: 17px; line-height: 1.25; border-bottom: 1px solid rgba(201, 161, 59, .22); text-align: center;
  font-variant-numeric: tabular-nums; font-weight: 600;
}
.recap-box thead th { font-family: var(--font-display); font-weight: 400; font-size: 19px; text-align: center; border-bottom: 2px solid var(--gilt); }
.recap-box thead th small { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.recap-box tbody th { text-align: left; font-weight: 400; color: #d9cfb6; }
.recap-box tbody tr:last-child th, .recap-box tbody tr:last-child td { border-bottom: 0; }
.crier-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.q.crier { cursor: help; }
.ripple-tag.trail-tag { background: rgba(201, 161, 59, .9); color: #1a1408; }

/* ----- co-op: falling and reviving at a Den (coop.js; the Den in rest.js, the fallen screen in coop-view.js) ----- */
.modal.rest-modal { width: min(760px, 100%); }   /* (96vw was wider than the overlay's padded box on a phone: the Den scrolled sideways) */
.option-grid.rest-grid { grid-template-columns: repeat(4, minmax(0, 172px)) !important; }   /* Lick Wounds, Shed, Sharpen Claws, Whittle a Charm */
.option-grid.rest-grid.with-revive { grid-template-columns: repeat(5, minmax(0, 146px)) !important; }   /* ... and Revive {partner} */
.sc-opt.opt-ico { display: flex; align-items: center; justify-content: center; }
.sc-opt.opt-ico .ico { width: 54px; height: 54px; filter: drop-shadow(0 2px 0 var(--ink-45)); }
.modal .option-card.revive-opt { box-shadow: inset 0 0 0 2px var(--claw); }
.modal .option-card.revive-opt b { color: var(--claw-dark) !important; }
.modal.fallen-modal .big-icon.fallen-wake .ico { width: 72px; height: 72px; }
.modal.fallen-modal .fallen-how { font-size: 14px; }
@media (max-width: 600px) {
  .modal.rest-modal .option-grid.rest-grid.with-revive { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .modal.rest-modal .sc-opt.opt-ico .ico { width: 36px; height: 36px; }
  /* four or five options take two rows: the scene and the option art get shorter, so the Den still fits without scrolling */
  .modal.rest-modal .sc-wrap { height: 96px; }
  .modal.rest-modal .sc-wrap .sc-svg { height: 100%; }
  .modal.rest-modal .sc-opt { height: 34px; }
  .modal.rest-modal .option-card > span:last-child { font-size: 11.5px; line-height: 1.25; }   /* (Revive {partner} carries the partner's name) */
  .party-story-title { font-size: 34px; }
}

/* ----- co-op: the shared battlefield (src/ui/battle-view.js) and the leader panel on the map (coop-view.js) ----- */
.stage #partnerPanel { position: absolute; inset: 0; padding: 0; display: block; pointer-events: none; }
.stage #partnerPanel[hidden] { display: none; }
.stage.duo #playerPanel { z-index: 2; }
.stage #partnerFx { position: absolute; z-index: 1; transform-origin: 50% 100%; margin: 0; }
.stage #partnerPanel.fallen #partnerFx { filter: grayscale(.85) brightness(.8); }
.stage .pt-plate { position: absolute; z-index: 5; pointer-events: auto; gap: 3px !important; padding: 4px 8px 5px !important; width: 188px; }
.stage .pt-plate .name { display: flex; align-items: baseline; justify-content: center; gap: 6px; font-size: 14px !important; line-height: 1.1; max-width: 100%; }
.stage .pt-plate .name b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage .pt-plate .name small { font-family: var(--font-body); font-size: 11px; color: var(--royal); white-space: nowrap; }
.stage .pt-plate .hpbar { width: 100%; height: 14px; }
.stage .pt-plate .hptext { font-size: 11px; }
.stage .pt-plate .block-badge { transform: translateY(-50%) scale(0); }
.stage .pt-plate .block-badge.show { transform: translateY(-50%) scale(.8); }
.pt-line > * { flex-shrink: 0; }
.pt-line { display: flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--font-body); font-weight: 700; font-size: 12px; color: var(--ink); white-space: nowrap; }
.pt-tag { display: none; font-family: var(--font-body); font-size: 11px; color: var(--royal); }
.pt-turn { padding: 0 5px; border: 1px solid var(--ink-muted); color: var(--ink-muted); font-size: 11px; line-height: 16px; }
.pt-turn.ended { background: var(--royal); border-color: var(--royal); color: var(--ivory); }
.pt-turn.fallen { background: var(--claw); border-color: var(--claw-dark); color: var(--ivory); }
.pt-status { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; font-family: var(--font-body); font-size: 11px; font-weight: 700; color: var(--ink); }
.pt-status:empty { display: none; }
#partnerPanel.ended .pt-plate { box-shadow: 0 0 0 2px var(--royal), 3px 3px 0 rgba(30, 27, 22, .3) !important; }
/* who a foe's intent goes for */
.it-at { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 0 5px; background: var(--ivory); color: var(--claw-dark); font-family: var(--font-body); font-weight: 700;
  font-size: 12px; line-height: 18px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.it-at i { font-style: normal; }
.it-at.it-mate { color: var(--royal); }
.it-at.it-both { background: var(--gilt); color: var(--ink); }
.mini-intent .it-at { margin-left: 3px; font-size: 11px; line-height: 16px; max-width: 92px; }
@media (max-width: 860px) {
  body.duo-fight #partnerChip { display: none !important; }   /* the partner's plate on the field says it all */
  .stage .pt-plate { width: 152px; padding: 3px 5px 3px !important; gap: 2px !important; }
  .stage .pt-plate .name { display: none !important; }
  .stage .pt-plate .pt-tag { display: inline; }
  .stage .pt-plate .hpbar { height: 11px; }
  .stage .pt-plate .hptext { font-size: 10px; line-height: 11px; }
  .pt-line { gap: 3px; font-size: 11px; }
  .pt-turn { font-size: 10px; line-height: 14px; padding: 0 3px; }
  .pt-status { display: none; }
  .it-at { max-width: 70px; font-size: 11px; }
  .mini-intent .it-at { max-width: 58px; }
}
/* choosing the leader, on the map */
#leadPanel { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 8000; width: min(440px, calc(100% - 24px)); }
#leadPanel .lead-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0 10px; }
#leadPanel .lead-opts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#leadPanel .lead-opt { padding: 8px 6px; font-size: 15px; line-height: 1.15; }
#leadPanel .lead-opt.sel { background: var(--royal); color: var(--ivory); border-color: var(--royal); }
#leadPanel .lead-opt small { display: block; font-family: var(--font-body); font-size: 11px; opacity: .85; }
#leadPanel .lead-note { margin: 0 0 8px; font-size: 14px; }
#leadPanel .ew-btns { justify-content: center; }
@media (max-width: 600px) { #leadPanel { bottom: 10px; padding: 14px 12px 12px; } #leadPanel .lead-opt { font-size: 13px; padding: 6px 4px; } }
/* ----- co-op: the shared map of an apart region (coop-view.js, map.js; step 11e) ----- */

.pdot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1.5px solid var(--ink); flex: none; }
.pdot.p0 { background: var(--pc0); } .pdot.p1 { background: var(--pc1); }
.map.shared .road.traveled.p0 { stroke: var(--pc0); } .map.shared .road.traveled.p1 { stroke: var(--pc1); }
.map .road.mate-road { stroke-dasharray: none !important; stroke-width: 5; opacity: .55; }
.map .road.mate-road.p0 { stroke: var(--pc0); } .map .road.mate-road.p1 { stroke: var(--pc1); }
.map-here.p1 i { background: rgba(23, 120, 143, .25) !important; border-color: var(--pc1) !important; }
.map-here.p1 i::after { background: var(--pc1); }
.map-here.mate { opacity: .55; margin-left: 9px; } .map-here.mate i { animation: none; }
.map.shared .map-here i { top: -46px; height: 22px; }   /* (six roads sit closer: the flag stays by its own stop) */
/* claims: yours in your colour; the partner's live pick faded in theirs (a solid ring once confirmed) */
.map-node.my-pick { box-shadow: 0 0 0 4px var(--ivory), 0 0 0 7px var(--pc0) !important; }
.map-node.my-pick.p1 { box-shadow: 0 0 0 4px var(--ivory), 0 0 0 7px var(--pc1) !important; }
.map-node.mate-pick { outline: 3px dashed var(--pc1); outline-offset: 5px; }
.map-node.mate-pick.p0 { outline-color: var(--pc0); }
.map-node.mate-pick.go { outline-style: solid; }
.map-node.mate-pick:not(.my-pick) { opacity: .85; }
.pick-chip { position: absolute; left: 50%; bottom: calc(100% + 3px); transform: translateX(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 2px; padding: 0 5px;
  font: 700 11px/16px var(--font-body); color: var(--ivory); background: var(--pc0); white-space: nowrap; pointer-events: none; }
.pick-chip.p1 { background: var(--pc1); }
.pick-chip.mate { opacity: .8; bottom: auto; top: calc(100% + 3px); }
.pick-chip .ico { width: 12px; height: 12px; filter: brightness(3); }
.map-node.lost { opacity: .35 !important; filter: grayscale(1) !important; }
/* Meeting stones: a green-ringed stone where two roads touch */
.map-node.meet { box-shadow: 0 0 0 3px rgba(79, 107, 58, .35); }
.map.pinging .map-node.ping-target { cursor: crosshair; box-shadow: 0 0 0 3px var(--gilt) !important; opacity: 1 !important; filter: none !important; }
.map.pinging .map-node.ping-target:hover { transform: translate(-50%, -50%) scale(1.12); }
/* a raven's ping on a stop, in its sender's colour */
.ping-mark { position: absolute; z-index: 8; width: 24px; height: 24px; margin: -36px 0 0 12px; display: grid; place-items: center; background: var(--ivory);
  border: 2px solid var(--pc0); border-radius: 50%; box-shadow: 0 2px 4px rgba(30, 27, 22, .4); cursor: help; }
.ping-mark.p1 { border-color: var(--pc1); }
.ping-mark .ico { width: 17px; height: 17px; }
/* a raven the Steward caught: his gold seal rings it (it reaches the partner a step late) */
.ping-mark.caught { box-shadow: 0 0 0 2px #b8902f, 0 2px 4px rgba(30, 27, 22, .4); }
.ping-mark.held { opacity: .6; }
/* a Ripple's tag under the stops it will touch */
.ripple-tag { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 2px); z-index: 2; padding: 0 5px; white-space: nowrap; pointer-events: none;
  font: 700 10.5px/15px var(--font-body); background: #e4ecd6; color: #2f4421; border: 1px solid var(--moss); }
.map-node .crow-tag + .ripple-tag { transform: translate(-50%, 20px); }
.ripple-line { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 6px; }
.ripple-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; font-size: 13px; background: #e4ecd6; color: #2f4421; border: 1px solid var(--moss); cursor: help; }
.ripple-chip .ico { width: 16px; height: 16px; }
/* a solid screen (the map, a stop) covers the game behind it: the game's own column never makes the page scroll then
   (it can run a little taller than the window outside a fight: body.fit only holds it during one). The page is clipped,
   not the column, so zoom.js still measures the column as before. */
html:has(#overlay.show.solid) body { max-height: calc(100 * var(--hvh)); overflow: clip; }
/* the bar under the map */
.shared-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 0; padding: 6px 10px; background: var(--paper); border: 1px solid var(--royal); color: var(--ink); }
.sb-picks { display: grid; grid-template-columns: minmax(0, auto) auto; align-items: center; justify-content: start; column-gap: 10px; row-gap: 2px; min-width: 0; font-size: 14px; }
.sb-picks > .sb-line { grid-column: 1; }
.sb-picks > .btn { grid-column: 2; padding: 3px 12px; min-height: 0; font-size: 14px; margin: 0; }
.sb-line { display: block; line-height: 1.45; }
.sb-line.mate { opacity: .85; }
.sb-line.clash { color: var(--claw-dark); font-weight: 700; }
.sb-line .ico { width: 18px; height: 18px; vertical-align: -3px; }
.sb-tools { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.sb-tools .btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; min-height: 0; font-size: 14px; }
.sb-tools .btn .ico { width: 18px; height: 18px; }
.sb-tools .ping-btn.on { background: var(--gilt); color: var(--ink); }
/* the trade panel and an offer to answer (the raven panel's controls) */
#sharedPanel { position: fixed; inset: 0; z-index: 8600; display: grid; place-items: center; background: rgba(4, 7, 17, .45); }
#sharedPanel .raven-box { width: min(640px, calc(100% - 24px)); padding: 16px 16px 14px; }
#sharedPanel .raven-box > b { margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
#sharedPanel .raven-box > b .ico { width: 22px; height: 22px; filter: brightness(0) invert(.9); }
#sharedPanel .raven-box p { margin: 0 0 10px; font-size: 14px; }
.trade-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trade-col { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.trade-col > small { color: var(--gold-2); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.trade-col .raven-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; }
.trade-col .raven-tab { font-size: 12.5px; }
.trade-col .raven-chips { justify-content: flex-start; max-height: 132px; overflow: hidden; margin: 0; }
.trade-deal { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 12px; }
.trade-deal span { display: flex; flex-direction: column; gap: 2px; padding: 8px; background: var(--paper); color: var(--ink); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.trade-deal b { font: 400 18px var(--font-display); text-transform: none; letter-spacing: 0; color: var(--ink) !important; margin: 0 !important; }
.raven-tabs {
  display: grid; gap: 4px; margin: 0 0 10px; grid-template-columns: repeat(7, minmax(0, 1fr));
}
.raven-tab { padding: 6px 2px; border: 1px solid rgba(239, 230, 210, .5); background: var(--paper); color: var(--ink); font: 400 14px var(--font-display); cursor: pointer; line-height: 1.1; }
.raven-tab.on { background: var(--royal); color: var(--ivory); border-color: var(--gilt); }
#sharedPanel .raven-hint { margin: 6px 0 8px; color: var(--muted); }
#sharedPanel .raven-empty { margin: 0; font-style: italic; color: var(--muted); font-size: 14px; }
.raven-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin: 0 0 8px; }
.raven-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border: 1px solid var(--ink-35); background: var(--ivory); color: var(--ink);
  font: 600 13px var(--font-body); cursor: pointer; line-height: 1.15; }
.raven-chip .ico { width: 18px; height: 18px; }
.raven-chip.sel { background: var(--royal); color: var(--ivory); border-color: var(--gilt); }
.raven-coins { display: flex; align-items: center; justify-content: flex-start; gap: 6px; margin: 0; }
.raven-coins .btn { padding: 4px 10px; min-height: 0; font-size: 15px; }
.raven-coins small { color: var(--muted); }
.raven-n { display: inline-flex !important; align-items: center; justify-content: center; gap: 4px; min-width: 64px; margin: 0 !important; font-size: 22px !important; color: var(--gold-2); }
.raven-n .ico { width: 22px; height: 22px; }
/* the coin toss and the reveal of both moves: short boxes over the screen */
#sharedFlash { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 8650; pointer-events: none; }
#sharedFlash .ew-box { min-width: 300px; max-width: min(460px, calc(100vw - 24px)); text-align: center; padding: 14px 18px; animation: hsFlashIn .25s ease-out; }
#sharedFlash p { margin: 4px 0 0; font-size: 15px; }
#sharedFlash p b, .sb-line b, .trade-box p b { display: inline !important; margin: 0 !important; font-size: inherit !important; }
#sharedFlash ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; text-align: left; }
#sharedFlash li { display: flex; align-items: center; gap: 6px; font-size: 15px; }
#sharedFlash li > span { min-width: 70px; color: var(--muted); }
#sharedFlash li img.gi { width: 26px; height: 26px; }
#sharedFlash .reveal-meet { color: var(--gold-2); }
.coin-flip { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 6px; border-radius: 50%; font: 700 22px var(--font-display); color: var(--ivory); text-shadow: 0 1px 0 var(--ink);
  --cut: repeating-linear-gradient(135deg, rgba(30, 27, 22, .22) 0 1.5px, transparent 1.5px 6px);   /* a woodcut coin: the winner's colour, cut lines, a milled gilt rim inked round */
  background: var(--cut), var(--pc0); border: 4px dotted var(--gilt); box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--ink), inset 0 0 0 5px var(--gilt-dark, var(--gilt)); animation: hsCoin 1s ease-out; }
.coin-flip.p1 { background: var(--cut), var(--pc1); }
@keyframes hsCoin { 0% { transform: rotateY(0) scale(.6); } 70% { transform: rotateY(1080deg) scale(1.1); } 100% { transform: rotateY(1080deg) scale(1); } }
@keyframes hsFlashIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
body.no-fx .coin-flip, body.no-fx #sharedFlash .ew-box { animation: none; }
/* the Old Cairn */
.cairn-scene { background: linear-gradient(180deg, #8e9c7a, var(--moss)) !important; aspect-ratio: 1600 / 420 !important; }
.cairn-cards { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 6px 0 4px; }
.cairn-pick { padding: 0; border: 0; background: none; cursor: pointer; transition: transform .12s; }
.cairn-pick:hover { transform: translateY(-4px); }
.cairn-modal .modal-actions { display: flex; gap: 12px; justify-content: center; align-items: center; }
.cairn-modal .modal-actions .btn { display: inline-flex; align-items: center; gap: 4px; } .cairn-modal .modal-actions .ico { width: 20px; height: 20px; }
@media (max-width: 700px) { .modal.map-modal .legend { display: none; } .road-tag { width: 70px !important; left: 4px !important; } .road-tag > b { font-size: 10px !important; padding: 3px 6px 3px 5px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }   /* (a phone's map: map.js mapGeom) */
@media (max-width: 600px) {
  .shared-bar { flex-direction: column; align-items: stretch; padding: 6px; }
  .sb-tools { justify-content: center; }
  .sb-picks { font-size: 13px; }
  .trade-cols { grid-template-columns: 1fr; gap: 6px; }
  .trade-col .raven-chips { max-height: 84px; }
  .raven-tab { font-size: 12px; padding: 5px 2px; }
  #sharedPanel .raven-box { padding: 12px 10px 10px; }
}

/* ----- Spoils and Charms (src/ui/belt-view.js, src/core/spoils.js; step 11c) ----- */
/* the top bar's slots: royal blue for Spoils, bone ivory for Charms; an empty slot is an outline */
.belt-bar { display: inline-flex; align-items: center; gap: 10px; margin-right: 6px; }
.belt-row { display: inline-flex; gap: 4px; }
.belt-slot { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; cursor: pointer; border-radius: 0; font: inherit; line-height: 1;
  box-shadow: 0 2px 0 var(--night-35); transition: transform .12s, box-shadow .12s; }
.belt-slot .ico { width: 28px; height: 28px; display: block; }
.belt-slot.spoil { background: #c3cdec; border: 2px solid #8ea3e0; }
.belt-slot.charm { background: var(--ivory); border: 2px solid #b9a77f; }
.belt-slot.empty { background: transparent; box-shadow: none; border-style: dashed; }
.belt-slot.spoil.empty { border-color: rgba(127, 149, 214, .8); }
.belt-slot.charm.empty { border-color: rgba(239, 230, 210, .65); }
.belt-slot:hover:not(.empty), .belt-slot.open { transform: translateY(-1px); box-shadow: 0 0 0 2px var(--gilt), 0 3px 0 var(--night-35); }
.belt-slot:focus-visible { outline: 3px solid var(--gilt); outline-offset: 1px; }
/* the popover under a slot */
#beltPop { position: fixed; z-index: 8700; width: min(290px, calc(100% - 16px)); }
#beltPop .belt-box { padding: 12px 14px 12px; margin: 0; }
#beltPop .belt-box::after { display: none; }
.belt-head { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.belt-head b { margin: 0 !important; font-size: 18px; }
.belt-head small { margin-left: auto; font-family: var(--font-body); font-size: 12px; opacity: .8; }
#beltPop .belt-text { margin: 0 0 6px; font-size: 14px; line-height: 1.35; }
#beltPop .belt-flavour { margin: 0 0 6px; font-size: 13px; line-height: 1.35; opacity: .8; }
#beltPop .belt-why { margin: 0 0 8px; font-size: 13px; font-style: italic; opacity: .85; }
#beltPop .ew-btns { justify-content: flex-end; gap: 8px; }
#beltPop .ew-btns .btn { padding: 6px 14px; font-size: 15px; min-height: 0; }
#beltPop .ew-btns .btn.primary { padding: 7px 20px; font-size: 18px; }
/* an item's icon on paper: a small swatch of its row's colour */
.belt-ico { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border: 2px solid; vertical-align: middle; }
.belt-ico .ico { width: 22px; height: 22px; display: block; }
.belt-ico.spoil { background: #c3cdec; border-color: var(--royal); }
.belt-ico.charm { background: var(--ivory); border-color: #b9a77f; }
.big-icon.belt-ico { width: 64px; height: 64px; margin: 0 auto 6px; }
.big-icon.belt-ico .ico { width: 48px; height: 48px; }
/* a full row: drop one for the new item, or pass (rewards.js pickHTML) */
.choices.item-drops { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); justify-content: center; gap: 10px; }
.choice.item-drop { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; text-align: left; }
.choice.item-drop .belt-ico { grid-row: span 2; }
.choice.item-drop span:not(.belt-ico) { font-size: 13px; }
/* the reward screen's loot line */
.rw-loot { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 4px 0 6px !important; }
.rw-loot .belt-ico { width: 26px; height: 26px; }
.rw-loot .belt-ico .ico { width: 18px; height: 18px; }
/* the peddler at a Notice Board */
.peddler { margin: 10px auto 0; max-width: 620px; }
.peddler .ped-note { margin: 0 0 6px; font-size: 14px; text-align: center; }
.ped-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ped-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; text-align: left; cursor: pointer; background: var(--paper); color: var(--ink); border: 1px solid var(--paper-edge); font: inherit; }
.ped-item:hover:not(:disabled) { border-color: var(--royal); }
.ped-item:disabled { opacity: .6; cursor: default; }
.ped-item .ped-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ped-item b { font-family: var(--font-display); font-weight: 400; color: var(--royal); font-size: 15px; }
.ped-item small { font-size: 12px; line-height: 1.25; color: var(--ink-muted); }
.ped-item em { display: inline-flex; align-items: center; gap: 2px; font-style: normal; font-weight: 700; font-size: 14px; white-space: nowrap; }
.ped-item em .ico { width: 18px; height: 18px; }
/* the Den's Whittle a Charm */
.sc-opt.whittle-art .ico { width: 50px; height: 50px; filter: drop-shadow(0 2px 0 var(--ink-45)); }
/* a Crow Feather's reveal on the map: the stop's danger tier under its marker */
.crow-tag { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 2px); z-index: 2; padding: 0 5px; white-space: nowrap; pointer-events: none;
  font: 700 11px/16px var(--font-body); background: var(--ivory); color: var(--ink); border: 1px solid var(--ink-muted); }
.crow-tag.d2 { background: #f2d9b8; border-color: var(--claw); }
.crow-tag.d3 { background: var(--claw); color: var(--ivory); border-color: var(--claw-dark); }
/* a trade's Spoil and Charm chips */
.raven-chip.item .ico { width: 20px; height: 20px; }
.raven-tab { font-size: 13px; }
@media (max-width: 600px) {
  .belt-bar { gap: 4px; margin-right: 0; }
  .belt-row { gap: 2px; }
  .belt-slot { width: 27px; height: 27px; border-width: 1.5px; }
  .belt-slot .ico { width: 22px; height: 22px; }
  .top-actions:has(.belt-bar) { gap: 4px; flex-wrap: wrap; }   /* the slots and the four buttons share one row (a long deck count wraps rather than clips) */
  .top-actions:has(.belt-bar) [data-act="openSettings"] { padding-left: 7px; padding-right: 7px; }
  .top-actions > .btn { white-space: nowrap; flex-shrink: 0; }
  .raven-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .choices.item-drops { grid-template-columns: minmax(0, 1fr); }
  .ped-row { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .modal.rest-modal .sc-opt.whittle-art .ico { width: 34px; height: 34px; }
}
@media (max-width: 600px) {
  /* watching the partner after your region's Boss: the longer raven button goes under the text */
  #coopWatch:has(.raven-next) { flex-wrap: wrap; justify-content: center; width: calc(100% - 24px); row-gap: 8px !important; }
  #coopWatch:has(.raven-next) > div { flex: 1 1 100%; text-align: center; }
}

/* ----- end screens (run-end.js statsHTML): on a desktop window the run's stats share one row, so a long payout and
   the unlock list still fit at 1280x800 without scrolling (labels wrap inside their tile) ----- */
@media (min-width: 700px) {
  .modal .stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 6px; }
  .modal .stat-row .stat { min-width: 0; padding: 8px 6px; }
  .modal .stat-row .stat span { display: block; line-height: 1.2; }
  /* the end screens get a wider panel: the payout lines and the unlock list run in two columns */
  .modal.end-modal { width: min(820px, 100%); }
  .modal.end-modal .coin-report { max-width: 720px; }
  .modal.end-modal .coin-report ul { column-count: 2; column-gap: 22px; }
  .modal.end-modal .coin-report li { break-inside: avoid; }
  .modal.end-modal .unlock-list { max-width: 720px; }
  .modal.end-modal .unlock-list ul { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}

/* ----- a phone (412x860): nothing scrolls. A map you only look at (watching, the Map button: it has a Close button)
   shrinks its roads to fit (fit-screen.js) under a shorter heading and key; the region's end screen packs tighter
   (fit-screen.js shrinks the rest); the turn banner sits at the foot of the field, clear of the HP plates; the watch
   bar sits at the foot of the screen, clear of the screen it watches ----- */
@media (max-width: 600px) {
  .modal.map-modal:has(> .modal-actions) { padding: 10px 8px !important; }
  .map-modal:has(> .modal-actions) .map-head h1 { font-size: 20px !important; margin-bottom: 2px; }
  .map-modal:has(> .modal-actions) .map-head .sub { font-size: 13px; line-height: 1.3; margin-bottom: 4px !important; }
  .map-modal:has(> .modal-actions) .quest-line { margin-bottom: 4px; }
  .map-modal:has(> .modal-actions) .legend { gap: 2px 8px; margin-top: 6px; font-size: 10.5px; }
  .map-modal:has(> .modal-actions) .legend img.gi { width: 1.3em !important; height: 1.3em !important; }
  .map-modal > .modal-actions { margin-top: 8px; }
  .modal.act-modal { padding: 14px 12px; }
  .modal.act-modal .big-icon { font-size: 34px; margin-bottom: 0; }
  .modal.act-modal h1 { font-size: 22px; }
  .modal.act-modal .sub { font-size: 13.5px; margin-bottom: 8px; }
  .modal.act-modal .spec-box h3 { margin-top: 6px; font-size: 16px; }
  .modal.act-modal .spec-box .sub { font-size: 12.5px; line-height: 1.35; }
  .modal.act-modal .stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
  .modal.act-modal .stat-row .stat { min-width: 0; padding: 4px 2px; }
  .modal.act-modal .stat-row .stat b { font-size: 16px; }
  .modal.act-modal .stat-row .stat span { display: block; font-size: 10px; line-height: 1.15; }
  .modal.act-modal .modal-actions { margin-top: 12px; gap: 6px; }
  .stage .turn-banner { top: auto; bottom: 34px; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; padding: 4px 12px; font-size: 14px; }
  #coopWatch { top: auto !important; bottom: 8px; width: calc(100% - 16px); gap: 8px !important; padding: 6px 8px !important; }
  #coopWatch > div { flex: 1 1 auto; min-width: 0; text-align: left; font-size: 13px; line-height: 1.2; }
  #coopWatch > div p { font-size: 11.5px; }
  #coopWatch [data-act="watchStop"] { padding: 6px 10px; font-size: 13px; }
  body.coop-watching .overlay { padding-bottom: 96px; }
}

/* ----- the evolution choice (Region 3's end, src/ui/screens/evolve.js): two paper panels side by side; stacked on a phone ----- */
.modal.evo-modal { width: min(1080px, 100%); padding: 16px 20px 18px; }
.evo-wrap h1 { font-size: 28px; margin: 0; }
.evo-wrap > .sub { margin: 2px 0 10px; font-size: 14px; }
.evo-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; text-align: left; }
.evo-panel { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 12px; background: var(--paper); color: var(--ink); border: 1px solid var(--paper-edge); border-radius: 0; box-shadow: 0 2px 0 rgba(30, 27, 22, .14); }
.evo-panel header { display: flex; align-items: center; gap: 10px; }
.evo-panel h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.1; color: var(--royal); }
.evo-panel q { display: block; font-size: 13px; font-style: italic; color: var(--ink-muted); quotes: none; }
.evo-tag { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 52px; height: 40px; padding: 0 6px; font-size: 20px; line-height: 1; font-family: var(--font-display);
  color: var(--ink); background: rgba(30, 27, 22, .07); border: 1px solid var(--paper-edge); }
.evo-panel .evo-look { margin: 0; font-size: 12.5px; line-height: 1.35; color: var(--ink-muted); }
.evo-hp { margin: 0; font-size: 14px; color: var(--ink); }
.evo-hp span { color: #2f6b34; font-weight: 700; }
.evo-pass { display: flex; flex-direction: column; gap: 1px; padding: 5px 8px; background: rgba(36, 52, 107, .07); border-left: 3px solid var(--royal); }
.evo-pass b { font-family: var(--font-display); font-weight: 400; font-size: 14.5px; color: var(--royal); }
.evo-pass small { font-size: 12.5px; line-height: 1.32; color: var(--ink); }
.evo-cards small { font-size: 12px; color: var(--ink-muted); }
.evo-cards > div { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.evo-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px 2px 3px; font-size: 12px; line-height: 1.25; background: #fff8e6; border: 1px solid #b5a98c; color: var(--ink); cursor: help; }
.evo-chip i { font-style: normal; font-weight: 700; font-size: 10px; width: 15px; text-align: center; color: var(--white); background: #6b6455; }
.evo-chip.r-uncommon i { background: #2f6b9a; }
.evo-chip.r-rare i { background: #8a5a14; }
.evo-pick { margin-top: auto; align-self: stretch; }
.evo-done { display: flex; align-items: center; justify-content: center; gap: 8px; }
.evo-done .evo-tag { height: 28px; min-width: 40px; font-size: 16px; color: var(--ink); background: var(--paper); }
@media (max-width: 760px) {
  .modal.evo-modal { padding: 12px 10px 14px; }
  .evo-row { grid-template-columns: 1fr; gap: 10px; }
  .evo-wrap h1 { font-size: 22px; }
}
