@media (max-width: 860px) { .map .road-motif { width: 46px; height: 35px; } }
/* v12 */
.doll .try-cap { top: 6px; bottom: auto !important; right: 6px; text-align: center; transition: opacity .12s; }
.stage .combatant .role { display: none !important; }
.pack .mini .sprite, .pack .mini .sprite canvas { pointer-events: none; }
.arena.stage.packed { grid-template-columns: .64fr 1.36fr; }
.arena.stage.packed #enemyPanel .portrait-wrap { visibility: hidden; }
.arena.stage:not(.gang) .pack .mini-top { display: none; }
.arena.stage:not(.gang) .pack .mini-ring { display: none; }
.arena.stage:not(.gang) .pack .mini.target .sprite canvas { filter: none; }
.arena.stage.packed #enemyPanel .plate, .arena.stage.packed #enemyIntent { position: relative; z-index: 6; }
.arena.stage.tall { min-height: 560px; }
#playerFx { transition: transform .35s ease; }
.map .road { transition: opacity .2s, stroke .15s; }
.map.picked .road:not(.reach):not(.lit):not(.traveled) { opacity: 0; }
.map.picked .map-node:not(.visited):not(.current):not(.available) { opacity: .55; transition: opacity .2s; }
.map.picked.scouting .map-node { opacity: 1; }
.map-scroll { box-shadow: inset 0 0 40px rgba(120,96,60,.25); scrollbar-width: thin; scrollbar-color: var(--line) transparent; max-height: none !important; }
.road-tag { cursor: help; }
.option-grid.rest-grid { display: grid !important; gap: 10px; }
.option-grid.rest-grid .option-card { width: auto !important; max-width: none !important; }
.vfx.arrow.bolt svg { filter: brightness(.8); }
@media (max-width: 860px) { .arena.stage.packed { grid-template-columns: .7fr 1.3fr; } }
/* v15 */
[data-tip=""]:hover::after, [data-tip=""]::after { display: none !important; content: none !important; }
/* upgrade picker */
.pile-grid.upgradable .up-pair { position: relative; cursor: pointer; }
.up-pair .up-nxt { position: absolute; inset: 0; opacity: 0; transition: opacity .15s; pointer-events: none; }
.up-pair .up-hint { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); white-space: nowrap; font: 700 11px/1 var(--font-body); color: #17110c; background: #f3d58c; border: 1.5px solid #17110c; border-radius: 999px; padding: 4px 8px; opacity: 0; pointer-events: none; z-index: 3; }
@media (hover: hover) { .up-pair:hover .up-nxt { opacity: 1; } .up-pair:hover .up-cur { opacity: 0; } .up-pair:hover { transform: translateY(-4px); } }
.up-pair.armed .up-nxt { opacity: 1; } .up-pair.armed .up-cur { opacity: 0; } .up-pair.armed .up-hint { opacity: 1; }
.up-pair.armed .up-nxt .card { box-shadow: 0 0 0 3px #f3d58c, 0 0 18px rgba(243,213,140,.6); }
/* woodcut nameplates and health bars */
.stage .plate, .pack .mini-plate { background: #e3d5b3 !important; border: 2px solid #17110c !important; border-radius: 6px !important; box-shadow: 3px 3px 0 rgba(23,17,12,.55) !important; backdrop-filter: none !important;
  background-image: repeating-linear-gradient(-8deg, rgba(23,17,12,.06) 0 1px, transparent 1px 4px) !important; }
.stage .combatant .name, .pack .mini-plate b { color: #17110c !important; text-shadow: none !important; letter-spacing: .02em; }
.stage .hpbar, .pack .mini-hp { background: #2a1d17 !important; border: 2px solid #17110c !important; border-radius: 3px !important; box-shadow: inset 0 2px 0 rgba(0,0,0,.4); overflow: hidden; }
.stage .hpfill, .pack .mini-hp i { border-radius: 0 !important; background: #8a2a1f !important;
  background-image: repeating-linear-gradient(-55deg, rgba(23,17,12,.35) 0 2px, transparent 2px 6px), linear-gradient(180deg, #b23a28, #7a1f18) !important; border-right: 2px solid #17110c; }
.stage .hpbar.has-block { box-shadow: 0 0 0 2px #34505c; }
.stage .hpbar.has-block .hpfill { background-image: repeating-linear-gradient(-55deg, rgba(23,17,12,.35) 0 2px, transparent 2px 6px), linear-gradient(180deg, #5b86a8, #34505c) !important; }
.stage .hptext, .pack .mini-hp span { color: #f3e6c4 !important; text-shadow: 1px 1px 0 #17110c, -1px 1px 0 #17110c, 1px -1px 0 #17110c, -1px -1px 0 #17110c; font-family: var(--font-display) !important; }
.stage .block-badge { border: 2px solid #17110c !important; }

/* fit the battle to the window */
body.fit #app { box-sizing: border-box; height: calc(100 * var(--hvh)); height: calc(100 * var(--hdvh)); min-height: 0; overflow: hidden; padding-top: 8px; padding-bottom: 8px; gap: 8px; }
body.fit #app > * { flex-shrink: 0; }
body.fit main.arena.stage { flex: 1 1 0; min-height: 0 !important; padding-top: 38px; }
body.fit .stage .portrait-wrap { height: clamp(130px, calc(calc(100 * var(--hdvh)) - 470px), 300px) !important; width: clamp(130px, calc(calc(100 * var(--hdvh)) - 470px), 300px) !important; }
@media (max-width: 860px) {
  body.fit .stage .portrait-wrap { height: clamp(100px, calc(calc(100 * var(--hdvh)) - 560px), 190px) !important; width: clamp(110px, calc(calc(100 * var(--hdvh)) - 560px), 170px) !important; }
}
@media (max-width: 860px) { .table-left, .table-right { min-width: 0; gap: 6px !important; } .table-left > *, .table-right > * { min-width: 0; flex: 1 1 0; } }
@media (max-height: 760px) { body.fit .table .card, body.fit .hand .card { --card-scale: .86; } body.fit .hand { min-height: 0; padding-top: 12px; } }
/* v16 */
.stage .hpbar { overflow: visible !important; }
.stage .hpfill { border-radius: 1px !important; }
.stage .block-badge { left: -12px !important; z-index: 3; background: #34505c !important; color: #f3e6c4 !important; }
.stage .plate { overflow: visible !important; padding-left: 16px !important; }
.class-card .class-portrait { height: 190px !important; position: relative; overflow: visible; }
.class-card .hero-live { position: absolute; left: 50%; bottom: 0; width: 150px; height: 180px; transform: translateX(-50%); }
.class-card .hero-live .sprite { position: absolute; inset: 0; }
.class-card.locked .hero-live { filter: grayscale(1) brightness(.45); }
.class-card h4.spec-h { margin: 10px 0 4px; font: 700 11px/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.build-teaser { position: fixed; z-index: 500; padding: 10px 12px 12px; border-radius: 12px; background: #e3d5b3; border: 2px solid #17110c; box-shadow: 4px 4px 0 rgba(23,17,12,.45);
  max-width: min(560px, calc(calc(100 * var(--hvw)) - 16px)); pointer-events: none; opacity: 0; transition: opacity .12s; color: #17110c; }
.build-teaser.show { opacity: 1; }
.build-teaser > b { display: block; font: 700 16px/1.2 var(--font-display); }
.build-teaser > span { display: block; font-size: 12px; color: #4a3c2c; margin: 2px 0 8px; }
.build-teaser .tz-row { display: flex; gap: 8px; justify-content: center; }
.build-teaser .card { transform: scale(.82); transform-origin: top center; margin: 0 -12px -30px; }
@media (max-width: 600px) { .build-teaser .card { transform: scale(.62); margin: 0 -28px -70px; } .class-card .class-portrait { height: 150px !important; } .class-card .hero-live { width: 120px; height: 140px; } }
.pick-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
/* v18 */
.class-card .class-head { min-height: 92px; align-items: flex-start; }
.class-card .class-builds { flex-wrap: nowrap !important; gap: 6px 12px !important; white-space: nowrap; justify-content: flex-start; }
.class-card .class-builds span { flex: 0 0 auto; cursor: help; }
@media (max-width: 1000px) { .class-card .class-builds { gap: 4px 8px !important; font-size: 11px; } }
/* v20 */
.quest-choice .q-region { display: block; margin-top: 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #b07a24; }
.legend span[data-tip] { cursor: help; }
.legend span[data-tip]:hover::after { bottom: calc(100% + 6px); top: auto; }
/* v21 */
.gear-compare { position: fixed; z-index: 450; width: 180px; padding: 8px; border-radius: 12px; background: #2a2018; border: 2px solid #b07a24; box-shadow: 0 10px 24px rgba(0,0,0,.5);
  pointer-events: none; opacity: 0; transition: opacity .12s; }
.gear-compare.show { opacity: 1; }
.gear-compare > small { display: block; text-align: center; font: 700 10px/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: #f3d58c; margin-bottom: 6px; }
.gear-compare .relic-tile { width: 100% !important; margin: 0; }
.sprite canvas { transition: transform .45s ease, filter .3s; transform-origin: 50% 100%; }
.sprite.sx-weak canvas { transform: scale(.86); }
.sprite.sx-chill canvas { filter: saturate(.55) brightness(1.06) drop-shadow(0 0 6px rgba(150,210,255,.9)); }
.sprite.sx-exposed canvas { filter: drop-shadow(0 0 5px rgba(255,80,60,.9)); }
.sprite.sx-armorBreak canvas { filter: drop-shadow(0 0 5px rgba(190,120,255,.85)); }
.sx-layer { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.sx-layer i { position: absolute; display: none; }
.sprite.sx-burn .sx-burn { display: block; transform-origin: 50% 100%; opacity: .92;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20200%20100%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M6%2C100%20Q4.399999999999999%2C72.5%2022%2C45%20Q25.2%2C69.75%2038%2C100%20Z%22%20fill%3D%22%23e8641c%22%20stroke%3D%22%232a1508%22%20stroke-width%3D%222.2%22/%3E%3Cpath%20d%3D%22M40%2C100%20Q38.0%2C57.5%2060%2C15%20Q64.0%2C53.24999999999999%2080%2C100%20Z%22%20fill%3D%22%23e8641c%22%20stroke%3D%22%232a1508%22%20stroke-width%3D%222.2%22/%3E%3Cpath%20d%3D%22M82%2C100%20Q80.2%2C65.0%20100%2C30%20Q103.6%2C61.5%20118%2C100%20Z%22%20fill%3D%22%23e8641c%22%20stroke%3D%22%232a1508%22%20stroke-width%3D%222.2%22/%3E%3Cpath%20d%3D%22M120%2C100%20Q118.0%2C54.0%20140%2C8%20Q144.0%2C49.4%20160%2C100%20Z%22%20fill%3D%22%23e8641c%22%20stroke%3D%22%232a1508%22%20stroke-width%3D%222.2%22/%3E%3Cpath%20d%3D%22M162%2C100%20Q160.4%2C71.0%20178%2C42%20Q181.2%2C68.1%20194%2C100%20Z%22%20fill%3D%22%23e8641c%22%20stroke%3D%22%232a1508%22%20stroke-width%3D%222.2%22/%3E%3Cpath%20d%3D%22M30%2C100%20Q29.0%2C80.0%2040%2C60%20Q42.0%2C78.0%2050%2C100%20Z%22%20fill%3D%22%23ffc53a%22%20stroke%3D%22%232a1508%22%20stroke-width%3D%222.2%22/%3E%3Cpath%20d%3D%22M69%2C100%20Q67.9%2C71.0%2080%2C42%20Q82.2%2C68.1%2091%2C100%20Z%22%20fill%3D%22%23ffc53a%22%20stroke%3D%22%232a1508%22%20stroke-width%3D%222.2%22/%3E%3Cpath%20d%3D%22M110%2C100%20Q109.0%2C75.0%20120%2C50%20Q122.0%2C72.5%20130%2C100%20Z%22%20fill%3D%22%23ffc53a%22%20stroke%3D%22%232a1508%22%20stroke-width%3D%222.2%22/%3E%3Cpath%20d%3D%22M149%2C100%20Q147.9%2C70.0%20160%2C40%20Q162.2%2C67.0%20171%2C100%20Z%22%20fill%3D%22%23ffc53a%22%20stroke%3D%22%232a1508%22%20stroke-width%3D%222.2%22/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat; animation: sxBlaze .3s ease-in-out infinite alternate; }
@keyframes sxBlaze { from { transform: scaleY(.8) skewX(-4deg); opacity: .8; } to { transform: scaleY(1.1) skewX(4deg); opacity: .95; } }
.sprite.sx-bleed .sx-bleed { display: block;
  background-image: radial-gradient(ellipse 3px 5px at 50% 50%, #a01212 0 99%, transparent 100%), radial-gradient(ellipse 2.5px 4px at 50% 50%, #7a0e0e 0 99%, transparent 100%);
  background-size: 14px 38px, 10px 30px; background-position: 0 0, 7px 12px; animation: sxDrip 1s linear infinite;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 75%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 75%, transparent); }
@keyframes sxDrip { to { background-position: 0 38px, 7px 42px; } }
.sprite.sx-poison .sx-poison { display: block;
  background-image: radial-gradient(circle, rgba(150,210,60,.9) 0 3px, rgba(60,90,20,.9) 3.5px, transparent 4px), radial-gradient(circle, rgba(130,190,50,.75) 0 2px, transparent 2.6px);
  background-size: 24px 44px, 16px 30px; background-position: 0 0, 9px 12px; animation: sxBubble 1.7s linear infinite;
  -webkit-mask-image: linear-gradient(to top, transparent, #000 25%, #000 70%, transparent); mask-image: linear-gradient(to top, transparent, #000 25%, #000 70%, transparent); }
@keyframes sxBubble { to { background-position: 0 -44px, 9px -18px; } }
.sprite.sx-pin .sx-pin { display: block; left: 50%; bottom: 6%; width: 34px; height: 34px; margin-left: -17px; background: var(--pin-img) center / contain no-repeat; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
.sprite.sx-mark .sx-mark { display: block; left: 50%; top: 30%; width: 34px; height: 34px; margin-left: -17px; border-radius: 50%; border: 3px solid rgba(190,40,30,.9);
  background: radial-gradient(circle, rgba(190,40,30,.95) 0 3px, transparent 3.5px), linear-gradient(rgba(190,40,30,.9), rgba(190,40,30,.9)) center / 2px 100% no-repeat, linear-gradient(rgba(190,40,30,.9), rgba(190,40,30,.9)) center / 100% 2px no-repeat;
  animation: sxPulse 1.4s ease-in-out infinite; opacity: .85; }
@keyframes sxPulse { 50% { transform: scale(1.15); opacity: .55; } }
.sprite.sx-tether .sx-tether { display: block; left: 0; right: 0; bottom: 6%; height: 10px; border-bottom: 3px dashed #c8a878; border-radius: 0 0 50% 50%; opacity: .9; }
/* v22 card reveal */
#cardReveal { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; background: rgba(12,8,4,.88); cursor: pointer; }
#cardReveal .reveal-box { display: grid; justify-items: center; gap: 14px; pointer-events: none; }
#cardReveal small { font: 700 12px/1 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: #f3d58c; }
#cardReveal .reveal-card .card { transform: scale(1.45); transform-origin: 50% 50%; margin: 60px 40px; }
#cardReveal .reveal-hint { color: #e8dcc4; font: 500 14px/1.2 var(--font-body); opacity: .85; margin: 0; }
#cardReveal.in .reveal-card { animation: revealPop .55s cubic-bezier(.2,1.4,.4,1) both; }
#cardReveal.in .reveal-hint { animation: revealFade .4s .5s both; }
@keyframes revealPop { from { transform: translateY(40px) scale(.4) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
