  :root {
    --wood: #1a120c;
    --gold: #e4c36a;
    --gold-dim: #9a7b32;
    --soul: #4aa3ff;
    --hp: #e24b4b;
    --atk: #f3d17a;
    --board: #24301f;
    --ink: #f4ead2;
    --font-en: "DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  }
  * { box-sizing: border-box; }
  html, body {
    margin: 0; height: 100%;
    background: #000;
    color: var(--ink);
    font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
    user-select: none;
    overflow: hidden;
  }
  button { font-family: inherit; cursor: pointer; }
  /* English UI — Google Sans–like (DM Sans). Prefer this for all Latin labels. */
  .en, .hero-card h3.en, .build-ver {
    font-family: var(--font-en);
    font-weight: 600;
    letter-spacing: 0.02em;
  }

  #app {
    position: absolute;
    left: 50%; top: 50%;
    /* Fixed logical stage (JS sets exact px). Outer window only letterboxes / scales. */
    width: var(--stage-w, 1280px);
    height: var(--stage-h, 960px);
    transform: translate(-50%, -50%);
    transform-origin: center center;
    display: flex; flex-direction: column;
    background: #0b0705;
    overflow: hidden;
    container-type: size;
    container-name: stage;
    box-shadow: 0 0 0 2px #2a1c10, 0 12px 40px rgba(0,0,0,.65);
  }

  .screen {
    display: none; height: 100%;
    background:
      radial-gradient(ellipse at 50% 20%, #3a2414 0%, #120c08 55%, #070504 100%);
  }
  .screen.active { display: flex; flex-direction: column; align-items: center; justify-content: center; }

  h1.title {
    font-size: clamp(48px, 7.6vw, 96px);
    letter-spacing: .12em;
    margin: 8px 0 10px;
    color: var(--gold);
    text-shadow: 0 4px 0 #4a3208, 0 0 40px rgba(228,195,106,.35);
  }
  .subtitle { color: #cbb58a; opacity: .85; margin-bottom: 36px; }

  .menu-btn {
    min-width: 280px;
    margin: 8px;
    padding: 14px 22px;
    border: 2px solid var(--gold-dim);
    background: linear-gradient(#3a2814, #21160c);
    color: var(--gold);
    font-size: 18px;
    border-radius: 10px;
    letter-spacing: .04em;
  }
  .menu-btn:hover { border-color: var(--gold); background: linear-gradient(#4a3418, #2a1c10); }
  .menu-btn.ghost { opacity: .8; font-size: 15px; min-width: 220px; }

  .hero-picks {
    display: grid;
    grid-template-columns: repeat(3, 240px);
    gap: 18px 20px;
    justify-content: center;
    margin-bottom: 22px;
  }
  .hero-card {
    width: auto; padding: 10px 10px 14px;
    border: 2px solid #5a4320;
    background: linear-gradient(#22180f, #140e09);
    border-radius: 14px;
    text-align: center;
    cursor: pointer;
  }
  .hero-card.sel { border-color: var(--gold); box-shadow: 0 0 22px rgba(228,195,106,.4); }
  .hero-card .art {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    min-height: 140px;
    border-radius: 10px; overflow: hidden;
    background: #100c08; margin-bottom: 10px;
    border: 1px solid #6a5228;
    display: flex; align-items: center; justify-content: center;
  }
  .hero-card .art img {
    width: 100%; height: 100%;
    object-fit: contain !important;
    object-position: center center;
    display: block;
  }
  .hero-card h3 {
    margin: 0; color: var(--gold); font-size: 20px;
    font-family: var(--font-en); font-weight: 600; letter-spacing: 0.02em;
  }
  .hero-card h3 small { display: none !important; }
  .hero-card p { display: none; }
  @media (max-width: 720px) {
    .hero-picks { grid-template-columns: repeat(3, minmax(96px, 1fr)); gap: 10px; padding: 0 10px; }
    .hero-card h3 { font-size: 15px; }
  }

  #game {
    display: none;
    height: 100%;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    position: relative;
    background: #0c0a07;
    --hand-h: 28%;
    --card-w: calc(22cqh * 0.67);
    --lane-h: 100%;
  }
  #game.active {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    min-height: 0;
  }
  .playfield {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(76px, 10cqi);
    width: 100%;
    height: 100%;
    min-height: 0;
    position: relative;
    z-index: 1;
  }
  .col-main {
    display: grid;
    grid-template-columns: minmax(64px, 8.5cqi) minmax(0, 1fr);
    grid-template-rows: 9% minmax(0, 1fr) minmax(0, 1fr) 26% 3%;
    grid-template-areas:
      "opphand opphand"
      "oppdeck oppboard"
      "mydeck myboard"
      "myhand myhand"
      "hint hint";
    min-width: 0;
    min-height: 0;
    height: 100%;
    position: relative;
  }
  .col-main > .opp-hand { grid-area: opphand; }
  .col-main > #oppDeck { grid-area: oppdeck; }
  .col-main > .board.opp { grid-area: oppboard; }
  .col-main > #myDeck { grid-area: mydeck; }
  .col-main > #myBoard { grid-area: myboard; }
  .col-main > .my-hand { grid-area: myhand; }
  .col-main > .hint { grid-area: hint; }
  .board-deck {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    z-index: 5;
    pointer-events: none;
  }
  .board-deck .deck-pile { pointer-events: auto; }
  .board-deck.opp { align-items: flex-start; padding-top: 10px; }
  .board-deck.me { align-items: flex-end; padding-bottom: 14px; }
  .col-main > .hero-row,
  .col-main > .log,
  .col-main > .corner-soul {
    grid-area: unset;
  }
  .col-hud {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    padding: 6px 6px 8px;
    min-width: 0;
    min-height: 0;
    z-index: 2;
  }
  #game.active::before {
    content: "";
    position: absolute; inset: 0;
    background:
      linear-gradient(180deg, rgba(8,6,4,.18), rgba(8,6,4,.08) 40%, rgba(8,6,4,.22)),
      var(--board-img) center 42% / 138% auto no-repeat;
    z-index: 0; pointer-events: none;
  }
  #game.active.drop-ready .board {
    box-shadow: inset 0 0 0 3px #ffe08a, 0 0 28px rgba(255, 214, 110, .65);
    border-color: #ffe7a8;
  }
  #game.active > *:not(#boardBgLayer) { position: relative; z-index: 2; }
  #game.active > #boardBgLayer {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 0 !important;
    object-fit: contain !important;
    pointer-events: none !important;
  }
  #game.active > .playfield {
    height: 100%;
    width: 100%;
    z-index: 2;
    min-height: 0;
  }

  .row { display: flex; align-items: center; }
  .opp-hand, .my-hand {
    min-height: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 0;
    padding: 8px 24px 2px;
    overflow: visible;
  }
  .my-hand { height: 100%; min-height: 0; align-items: flex-end; }
  .opp-hand { align-items: flex-start; height: auto; }
  .opp-hand .card, .opp-hand .back {
    /* transform owned by layoutOppFan — do not force none */
    height: min(6.5cqh, 52px) !important;
    width: auto !important;
    aspect-ratio: 2 / 3 !important;
    padding: 0 !important;
    flex: 0 0 auto;
  }

  .board-wrap {
    display: contents;
  }

  .hero-row {
    display: flex; justify-content: center; align-items: center;
    min-height: 0; z-index: 4;
  }
  .hero-bust {
    display: flex; align-items: center; gap: 8px;
    pointer-events: auto;
  }
  .hero-bust .frame {
    width: min(86px, 12cqh);
    height: min(108px, 15cqh);
    border-radius: 50% / 42%;
    overflow: hidden;
    border: 3px solid #e2c36a;
    box-shadow: 0 0 0 2px #3a280c, 0 8px 16px #0008;
    background: #1a1008;
    flex: 0 0 auto;
  }
  .hero-bust .frame img { width:100%; height:100%; object-fit:cover; object-position:top; display:block; }
  .hero-bust .gem {
    min-width: 34px; height: 34px; border-radius: 50%;
    display:flex; align-items:center; justify-content:center;
    font-weight: 900; font-size: 15px; color: #fff8e8;
    background: radial-gradient(circle at 35% 30%, #ff6a55, #7a1010);
    box-shadow: 0 0 0 2px #f0d48a, 0 4px 8px #0008;
  }
  .hero-bust .soul-gem {
    min-width: 34px; height: 34px; border-radius: 50%;
    display:flex; align-items:center; justify-content:center;
    font-weight: 900; font-size: 13px; color: #e8f4ff;
    background: radial-gradient(circle at 35% 30%, #7ec8ff, #163a88);
    box-shadow: 0 0 0 2px #9cf, 0 4px 8px #0008;
  }
  .hero-strip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding: 0;
    min-height: 0;
    width: 100%;
  }
  .hero-portrait {
    display: flex; align-items: center; gap: 10px;
    background: linear-gradient(180deg, rgba(20,14,8,.72), rgba(8,6,4,.55));
    border: 1px solid #8a6a30;
    border-radius: 18px;
    padding: 6px 10px 6px 6px;
    box-shadow: 0 8px 18px rgba(0,0,0,.45);
  }
  .hero-portrait.can-target { outline: 2px solid #ff6b4a; cursor: pointer; }
  .hero-frame {
    width: clamp(58px, 8.5vh, 92px);
    height: clamp(58px, 8.5vh, 92px);
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 auto;
    border: 3px solid #d4b15a;
    box-shadow: 0 0 0 2px #3a280c, 0 6px 14px #000;
    background: #1a1008;
  }
  .hero-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .hero-meta { min-width: 0; }
  .hero-meta b { display: block; color: var(--gold); font-size: clamp(12px, 1.6vh, 16px); }
  .hero-orbs { display: flex; gap: 6px; margin-top: 4px; }
  .orb {
    width: clamp(42px, 6vh, 56px);
    height: clamp(42px, 6vh, 56px);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: grid; place-items: center;
    font-weight: 900;
    color: #fff;
    font-size: clamp(12px, 1.55vh, 17px);
    text-shadow: 0 1px 2px #000, 0 0 6px #000;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,.6));
  }
  .face { display: none; }
  .stat-pills, .pill { display: none; }

  .board {
    --slot-h: min(86%, 20cqh);
    --slot-w: calc(var(--slot-h) * 2 / 3);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(4px, 0.7cqi, 10px);
    height: 100%;
    min-height: 0;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(10, 16, 10, .10);
    border: 2px solid rgba(228,195,106,.32);
    margin: 0 7% 0 2%;
    padding: 4px 8px;
    box-sizing: border-box;
  }
  .empty-slot {
    width: var(--slot-w);
    height: var(--slot-h);
    flex: 0 0 var(--slot-w);
    border-radius: 14px;
    border: 1px solid rgba(196,160,80,.16);
    background: rgba(40,28,12,.06);
    box-sizing: border-box;
  }
  .board.opp { border-color: rgba(226,75,75,.18); }
  .board.empty::after {
    content: "전장";
    color: rgba(255,255,255,.18);
    font-size: 13px;
    letter-spacing: .3em;
  }

  .side {
    display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  }
  .end-btn {
    padding: 10px 14px;
    border-radius: 12px;
    border: 2px solid #c9a24a;
    background: linear-gradient(#7a5418, #3a280c);
    color: #ffe7a8;
    font-weight: 800;
    min-width: 96px;
    letter-spacing: .04em;
    box-shadow: 0 6px 14px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,230,160,.25);
  }
  .end-btn:disabled { opacity: .4; cursor: default; }
  .end-btn.go { border-color: #ffe08a; box-shadow: 0 0 16px rgba(228,195,106,.55); }

  .deck-pile {
    font-size: 12px; color: #ffe7a8;
    background: transparent; border: 0;
    padding: 0; text-align: center;
    text-shadow: 0 2px 4px #000;
    font-weight: 800;
  }
  .pile-art {
    width: min(78px, 11cqi);
    height: min(110px, 16cqh);
    transform: perspective(240px) rotateX(18deg) rotateZ(-8deg);
    box-shadow: 0 10px 16px #0008, 6px 8px 0 #2a1c0c;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 0 auto 2px;
    filter: drop-shadow(0 6px 8px rgba(0,0,0,.6));
  }

  .log {
    height: 22px; overflow: hidden;
    font-size: 12px; color: #d8c8a4;
    text-align: center; opacity: .9;
    padding: 4px 16px;
  }


  .card, .minion {
    overflow: hidden;
    padding: 0 !important;
    background: #1a1008;
  }
  .card-face {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain; object-position: center center; background:#1a1008; overflow:hidden;
    pointer-events: none;
    border-radius: 14px 14px 22px 22px;
  }

  .minion, .card {
    position: relative;
    border-radius: 10px;
    background: transparent;
    border: none;
    box-shadow: 0 10px 18px rgba(0,0,0,.42);
    overflow: visible;
  }
  .minion {
    height: var(--slot-h, calc(var(--lane-h) - 20px));
    width: var(--slot-w, calc((var(--lane-h) - 20px) * 0.66));
    flex: 0 0 var(--slot-w, calc((var(--lane-h) - 20px) * 0.66));
    flex-shrink: 0;
    cursor: pointer;
    display: flex; flex-direction: column; align-items: center;
    padding: 0;
    flex: 0 0 auto;
  }
  .minion.taunt { box-shadow: 0 0 0 3px #c9a15b, 0 8px 18px rgba(0,0,0,.5); }
  .minion { position: relative; }
  .hp-tick {
    position: absolute; left: 50%; top: 42%; transform: translate(-50%,-50%);
    z-index: 7; pointer-events: none;
    font-weight: 900; font-size: 28px; color: #ffefc0;
    /* v0.253: strong black rim like gem/HUD digits */
    -webkit-text-stroke: 1.5px #000;
    paint-order: stroke fill;
    text-shadow:
      0 0 2px #000,
      1px 0 0 #000,
      -1px 0 0 #000,
      0 1px 0 #000,
      0 -1px 0 #000,
      1px 1px 0 #000,
      -1px -1px 0 #000,
      1px -1px 0 #000,
      -1px 1px 0 #000,
      0 2px 4px #000,
      0 0 8px #c00;
    animation: hpPop 1.8s ease-out forwards;
  }
  /* Minion hurt tick: sit ABOVE the heart gem digit (not covering it) */
  .minion .hp-tick {
    left: auto; right: 6%; top: auto; bottom: 20%;
    transform: translate(0, 0);
    font-size: calc(var(--slot-h, 320px) * 0.0703); /* 92% of baked 88/1152 stat font */
    animation: hpPopGem 1.8s ease-out forwards;
  }
  @keyframes hpPopGem {
    0% { opacity: 0; transform: translate(0, 6px) scale(.6); }
    12%, 78% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(0, -14px) scale(.9); }
  }
  .minion.rip {
    animation: cardRip .6s ease-in forwards;
    pointer-events: none;
  }
  .minion.combat-death-hidden {
    visibility: hidden !important;
    pointer-events: none;
  }
  /* Combat temp Δ overlays — ABOVE base gem digits (not covering them). v0.253 */
  .stat-delta {
    position: absolute;
    bottom: 20%; /* was 6%: sat on top of baked atk/def/hp digits */
    z-index: 8;
    pointer-events: none;
    font-weight: 900;
    font-size: calc(var(--slot-h, 320px) * 0.0703); /* just below face digits */
    line-height: 1;
    /* black rim matching .gem span / HUD numbers */
    -webkit-text-stroke: 1.6px #000;
    paint-order: stroke fill;
    text-shadow:
      0 0 2px #000,
      1px 0 0 #1a0a00,
      -1px 0 0 #1a0a00,
      0 1px 0 #1a0a00,
      0 -1px 0 #1a0a00,
      1px 1px 0 #000,
      -1px -1px 0 #000,
      1px -1px 0 #000,
      -1px 1px 0 #000,
      2px 2px 0 #000,
      0 2px 4px #000;
    animation: statDeltaIn .28s ease-out both;
  }
  .stat-delta.up { color: #8bd4ff; }
  .stat-delta.down { color: #ff8585; }
  .stat-delta.d-atk { left: 8%; }
  .stat-delta.d-def { left: 50%; transform: translateX(-50%); }
  .stat-delta.d-hp { right: 8%; left: auto; }
  @keyframes statDeltaOut {
    0%, 78% { opacity: 1; }
    100% { opacity: 0; }
  }
  .hp-tick ~ .stat-delta.d-hp { bottom: 44%; } /* clear name + stored-coin badge */
  @keyframes statDeltaIn {
    0% { opacity: 0; transform: translateY(6px) scale(.85); }
    100% { opacity: 1; }
  }
  .stat-delta.d-def { animation-name: statDeltaInMid; }
  @keyframes statDeltaInMid {
    0% { opacity: 0; transform: translateX(-50%) translateY(6px) scale(.85); }
    100% { opacity: 1; transform: translateX(-50%); }
  }
  @keyframes cardRip {
    0% { opacity: 1; filter: none; transform: none; }
    25% { filter: contrast(1.5) brightness(1.25); }
    55% { clip-path: polygon(0 0, 58% 0, 42% 100%, 0 100%); opacity: 1; }
    100% { opacity: 0; transform: rotate(10deg) translateY(12px) scale(.86); filter: brightness(.35); }
  }
  @keyframes hpPop {
    0% { opacity: 0; transform: translate(-50%,-30%) scale(.6); }
    30% { opacity: 1; transform: translate(-50%,-50%) scale(1.15); }
    100% { opacity: 0; transform: translate(-50%,-80%) scale(.9); }
  }
  .minion.selected { transform: translateY(-4px); }
  .minion.can-target { outline: 2px solid #ff6b4a; outline-offset: 3px; }
  .minion .m-art, .card .c-art {
    width: 100%;
    background-size: cover; background-position: center 20%;
    flex-shrink: 0;
    border-radius: 8px 8px 0 0;
    box-shadow: inset 0 0 0 2px rgba(80,200,255,.35);
  }
  .minion .m-art { height: 46%; min-height: 70px; }
  .minion .m-name, .card .c-name {
    width: calc(100% + 8px);
    margin: -2px 0 0;
    padding: 5px 8px;
    text-align: center;
    font-weight: 800;
    font-size: 15px;
    line-height: 1.15;
    color: #3a2a10;
    background: linear-gradient(#f0d27a, #c49a3a);
    border: 2px solid #8a6a22;
    border-radius: 4px;
    box-shadow: 0 2px 0 #5a4010;
    z-index: 2;
  }
  .minion .m-kw, .card .c-text, .card .c-type {
    flex: 1;
    width: 100%;
    margin: 0;
    padding: 6px 6px 8px;
    font-size: 11px;
    color: #f0dcc0;
    text-align: center;
    line-height: 1.25;
    background: linear-gradient(#5a1820, #2a0c12);
    border-radius: 0 0 12px 12px;
  }
  .card .c-type { color: #e8c97a; font-weight: 700; }
  .atk { color: #fff; }
  .hpv { color: #fff; }
  .hpv.dmg { color: #ffd36a; }

  .card {
    width: var(--card-w, 150px);
    height: var(--hand-h, 225px);
    max-width: 18vw;
    cursor: pointer;
    padding: 0;
    display: flex; flex-direction: column;
    transition: transform .12s ease;
    flex: 0 0 auto;
    aspect-ratio: 2 / 3;
  }
  #game .my-hand .card {
    width: min(var(--card-w), 150px);
    height: auto;
    max-height: calc(var(--hand-h) - 8px);
    margin-left: -38px;
    position: relative;
    transform-origin: bottom center;
    --fan-y: 0px;
    --fan-r: 0deg;
    transform: translateY(var(--fan-y)) rotate(var(--fan-r));
    transition: transform .14s ease, filter .14s ease;
  }
  #game .my-hand .card:first-child { margin-left: 0; }
  #game .my-hand .card:hover:not(.dragging),
  #game.active .my-hand .card:hover:not(.dragging) {
    transform: translateY(calc(var(--fan-y, 0px) - var(--hand-hover-lift, 36px))) rotate(var(--fan-r, 0deg)) scale(1.06) !important;
    z-index: 80 !important;
    filter: drop-shadow(0 14px 18px rgba(0,0,0,.45));
  }
  .card { position: relative; }
  .card.playable { overflow: visible !important; z-index: 3; }
  .card.playable::after { content: none !important; display: none !important; }
  .card.playable .card-face {
    box-shadow: 0 0 0 2px #ffe7a8, 0 0 12px 3px rgba(255, 210, 100, .55);
    border-radius: 12px 12px 20px 20px;
  }
  @keyframes playGlow {
    0%,100% { opacity: .55; box-shadow: 0 0 0 2px #e8c878, 0 0 10px 2px rgba(255,210,100,.4); }
    50% { opacity: 1; box-shadow: 0 0 0 3px #ffe9b0, 0 0 22px 6px rgba(255,220,130,.85); }
  }
  .card.dragging { opacity: .35; }
  .drag-ghost.targeting-preview { opacity: 1; outline: 2px solid #b18a54; outline-offset: 1px; filter: drop-shadow(0 0 7px #b28c5380); }
  #targetingArrow { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 201; overflow: visible; }
  #targetingArrow path { fill: #985b4d; stroke: #d0ac70; stroke-width: 1.5; stroke-linejoin: round; filter: drop-shadow(0 2px 3px #281811); }
  #targetingArrow path:last-child { fill: #a56350; }
  #summonTargetHint { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 202; display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 24px); padding: 10px 16px; border: 1px solid #d6b671; border-radius: 8px; background: #211d17f2; color: #fff1c6; font-size: 14px; }
  #summonTargetHint button { flex: none; padding: 7px 12px; border: 1px solid #d6b671; border-radius: 5px; color: inherit; background: #493c26; cursor: pointer; }
  #summonTargetHint button:focus-visible { outline: 3px solid #fff1c6; outline-offset: 2px; }
  .drag-ghost {
    position: fixed; z-index: 80; pointer-events: none;
    transform: translate(-50%, -60%) rotate(-6deg);
    filter: drop-shadow(0 18px 16px rgba(0,0,0,.55));
  }
  .drag-ghost img { width: 100%; height: 100%; object-fit: contain; display:block; border-radius: 14px; }
  .card .c-art { height: 112px; }

  .gem {
    position: absolute;
    z-index: 4;
    display: grid;
    place-items: center;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 1px 2px #000;
    pointer-events: none;
  }
  .gem span { position: relative; z-index: 1; }
  .gem {
    position: absolute;
    display: grid;
    place-items: center;
    z-index: 4;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 0;
    box-shadow: none;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,.7));
  }
  .gem span {
    position: relative;
    z-index: 2;
    font-weight: 900;
    font-size: 20px;
    line-height: 1;
    color: #fff;
    text-shadow:
      0 0 2px #000,
      1px 0 0 #1a0a00,
      -1px 0 0 #1a0a00,
      0 1px 0 #1a0a00,
      0 -1px 0 #1a0a00,
      2px 2px 0 #000,
      0 2px 4px #000;
    letter-spacing: -0.5px;
  }
  .gem-cost {
    top: -14px; left: -16px;
    width: 58px; height: 72px;
    background-image: url("data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBAUEBAYFBQUGBgYHCQ4JCQgICRINDQoOFRIWFhUSFBQXGiEcFxgfGRQUHScdHyIjJSUlFhwpLCgkKyEkJST/2wBDAQYGBgkICREJCREkGBQYJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCT/wAARCACgAKADASIAAhEBAxEB/8QAHAAAAQUBAQEAAAAAAAAAAAAABgABAgUHBAMI/8QAQRAAAQIEAwUFBgMGBgIDAAAAAQIDAAQFESExQQYSEyJRIzJCYXEHFDNSgZEVYqEkU2OxweEWQ3LR8PE0kkRzgv/EABsBAAIDAQEBAAAAAAAAAAAAAAAFAwQGAQIH/8QALxEAAQMCAwYFBAMBAAAAAAAAAQACAwQREiExIkFRYYHwBRORwdFxobHxFCMyBv/aAAwDAQACEQMRAD8A+aiLd/nGgGkOcACrnTokaRHfCSS3cK1vElAtJCxgVZwISPKAVHeTonpDIO+ohXc0Bh1IQEhawcekORZI38W9LZwIUSqyilQJQMhErcu9mj5NYRHKCr4egGcNuqR2ibbpy6wIT2wv4Pk1iQTy73g+TWEiylXHxTrpHqlPP/F66RwldASaaLlt0cp/y9TBHJ7KlLDUxNb6W1nBoC28LXzitpRZROI49wo4FQF924ztGxUmUlNraY1Tp5aGZtoKEvNNneQtBx3FgYgjQwj8Vr309rf53lOfDqNkoJdmVlLrtNkzZLK3273U2FFAV5dfrFdNTnHCuC0iXYJ+Ai/9c/WNGrnsdrkoPemWmp0JHI5Lm+8BqU5nzgGnKC829uC639E23TfpbWPdHWU020x9+q8VNPMzItsFREXF08qdU9YiBcXTyp1SdY6X21BfaJs5pbIdI8FpsocT4nhIyh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KuBDrw/+Sm43StI8XNmMTHslqWmpwIcXwWwsLmAnm3T4lptmm2Jt6jWAOXqkzLOrBcLhdUFOFZJSsjInzFzjBhRZhE64zMyilKdbUAtF+YHp5+R/vCSro3Qi505bu9yb0tW152dUUbY1SkAMS9NlwiWlwEs74s48oj4i+ht3R4QbnG0B/CmpKSan5dSPeJx/gsOW5WRc3KQdcMzlhHNNTKGyqcnVKIKilpu/Mo3xPl5mKGbqkzMONpU4pPDUVNBBIS0TbEeeAufKOUHhzg0NboOO/s6oq6wA7WZV+vaYUFlcnTV8R8rK3ZhzFS19Rf8A55xRzlcqFRBE1NObpOKCqwP0jhUSVdpzuHx9IiQE8q+cnxDIQ8ho4o87XPFKJKl78r5cE6xc3QqwGdsoYLJHcuPm6QgnhDcz3tRkIYoW3YBYI1tFpQKQw/jfm+WFl/H/ADfLDJ5gS2Q2kZpOsJPNfh9kBmDrAhLu/wAfz+WF3f4/9ISeb4fZAZg6wkne+F2XW+sCF//Z");
  }
  .gem-cost span { font-size: 22px; transform: translateY(4px); } /* v0.221: soul digit up ~2px */
  .gem-atk {
    bottom: -16px; left: -16px;
    width: 64px; height: 64px;
    background-image: url("data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBAUEBAYFBQUGBgYHCQ4JCQgICRINDQoOFRIWFhUSFBQXGiEcFxgfGRQUHScdHyIjJSUlFhwpLCgkKyEkJST/2wBDAQYGBgkICREJCREkGBQYJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCT/wAARCACgAKADASIAAhEBAxEB/8QAHAAAAQUBAQEAAAAAAAAAAAAABQIDBAYHAQAI/8QAQxAAAQMCBAMFBQYEAwcFAAAAAQIDBAURAAYhMRJBURMiYXGBBxQykaEVI0JSYrEzcsHwJFPRFjRDgpKi4SZFY3Px/8QAGAEAAwEBAAAAAAAAAAAAAAAAAQIDAAT/xAAnEQACAgIBAwMEAwAAAAAA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MlCw1V4KHyB3TJQUOejid/riK5CpqmkB2ROiIdJ4Uq4JCRwnXUEEDzxFpucKmoe7SpLCo4F1GQm4t5D4j6Ynt1agqacQu7gPe4FK7NHF1CQNP8AqGFXJOqr4C6J0TKynVIl/aENUVohYUVC5I1Askk4dioYpWsUlxfaAKeULF1e4AHJCfiPpiEKmZpQ3FjR4UBv43W2wnhH6eZJ+ZxHROcFXhPMpKY4PA2j4tFKsb9Sb3PW/lgtSbuTsFrwOPBiUC3JCuAOKSl0C6m19bc0qte3W+HHsul512UJ8ZLDh41rUrUKO+5GIbzqjV5QcB7BBU0tKhbRKrDyOht5XwsznaaVNyI8eZCdFgt5oLJHQ+IwafeLoFrszgj09LKkNTZkpDNrpQEMJNza4USSRfph2H7yXexo0BDTlu8phJddHms7elsMLqtGKEJ4exQk34Eq40E8iUnU+qsRalm6oJSGIkhhDFtCwm305fLCvlf3GVBlykMwE+8VmchknVSG1hbiz4q1A9L4EVLNjSGjEpMdLDXNdtV+J5n1xXHn3pCyt5xbijzUb4SEYZY2/c/6F5pe0844t5ZW4oqUdycOReLtkpS6Gio2KirhAHicJCMcItitaEsudCzY/lOcJlFqXu8tKeAPNmwAtqB1vc76YbqMxmr06a72iPeSe2UnivxG91EHnz031xUAbYWDiXoq+V7KepqhRwgjCscxcmcAwsJx4DC04wDhThCm8O49bGARyi2OsOiO6HFMtvAfhcvb6EYeKcNqRfAaDZNlZglSkcBS2gcgkaJ8hsD44seV4jiHIT8kpSAtC0t3Cio37qrch1+XPFMKMEsvzlRagwhSrJKxwnob/wBcRyxfBqJXHJcthqvsuypExcQpVxOOLU1cJNwdVeItgHGzBKjs9kUtuJtayhofMY7XJpdmPtI0HGSs9Tfb0wNCb42KL40zTavQqQ8H3CtLLbQP4UXt9ThARfCwjCwnFkidiUowsJx0C2O4IBNsIUMOYScYw0Rjox0jHhgBP//Z");
  }
  .gem-atk span { font-size: 20px; transform: translateY(-1px); }
  .gem-def {
    bottom: -18px; left: 50%; transform: translateX(-50%);
    width: 52px; height: 64px;
    background-image: url("data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBAUEBAYFBQUGBgYHCQ4JCQgICRINDQoOFRIWFhUSFBQXGiEcFxgfGRQUHScdHyIjJSUlFhwpLCgkKyEkJST/2wBDAQYGBgkICREJCREkGBQYJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCT/wAARCACgAKADASIAAhEBAxEB/8QAHAAAAgMBAQEBAAAAAAAAAAAABQYDBAcCAQgA/8QARxAAAQMDAgIHAwkFBQcFAAAAAQIDBAAFEQYhEjETIkFRYXGBBzKRFCNCUmJygrHRFUNTocEWJGOSoggzNDVEc/BFVbLh8f/EABkBAAMBAQEAAAAAAAAAAAAAAAACAwEEBf/EADARAAICAQIFAgUEAQUAAAAAAAECAAMREiEEEzEyQSJRM2FxgZFCobHRBRQjQ2Lh/9oADAMBAAIRAxEAPwD5cAroJroJrsIohOQmugipEortKKISMIroN1KlHhUgbohIAiug1VpuOpxQSlJUonAAG5rR9J+wrUl9ji5XUM6etCRxLmXE9GeHvSg4J9cUj2KgyxjKpbpM0ZireWlCEKUpR4UpAySe4Ctq0D7BGY0ZnUXtGfNqtWQW4BViRKPYkgbpB+qOsfCnzQulbJYHEN6Ds6rvcT1VX+6JIZQe0tJxk/hAHeTWt6c0LHtspN8vspd1uyRn5XKxwseDaPdbHlv41z67LewYHvKaVTu3M+ONS6Mg3O4TX9NpSwlLywITgKCkcRwnCt0q8Dt40iSIb0V5bD7S2nUHCkLThST4itk1LBQ9qS4OpWppZlOlp9pWD757e7wND5zTE5oRdSwOmQnZu4RU4cbHiO7yyPCmzZT19S/v/wCzcJZ02P7TJS3iuVIp5uns5mIYM2yyGrvCPayR0ifAp7fT4Uoux1srU24hSFp2KVDBHpVq7UsGVMk6MmzCUSiuCirhaqNSKpFlUorkpqypFRlFEJXKa5IqcprkpohJ0oqRLdbJB/2W9butJem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FMGjNO3zXtxRboFrbuzLZHSqlAhqOnvU7zR5A5PYKorvcyI0thSVgqHXaXtxp7fA+Y+NPeivbPK05Fh21dltz1kQQUx4aPk/H3lWMhavvDB/ItvsRfB+cxalY7fiIl9bmaVmSIcWDGgspdU38rigrLuCR/vVdYZ7tvWhVstN01HIUxaYb013mtwe4jxWs7D1NM9118FzZjMC2suMPrcLonALTwkk+4MD+fZQFjVFxRDFuhrLcQnLcdtOQT3hP5ZzjHZRVda64wAfebZUinOYdjaT05plpD+o5yLvJAymFFWUxgftODrOeSdu8iq921nc7+puBb2QxHaHzUeOgNoaT3gDZA+0TnvVQJbGSqRcpCifpISsFR+8s5Cf5nwFUZuoEpaMaGhDbOc8KQQknvOd1HxVQoycr6j7noJh2G+w9vMJrXCtSOkkuNyn+Y2yyg+A/eH/T50Cud7kXBxZUtWFnrFRypfmf6cqHPSXHllbiytR7TUKl10pTg6n3Mk1m2F2E7U5Ual1wVVwVVaTnRVXBNeFVck0QngNdg1EDXQVWQkoNdBVRA16DRCTBddhdVwqugqthJw5U8eY9GXxtOKQrvHbVMKr9x1hwdjAHEZImpMthmWgFvwTlPnw9nmkiiUNbAJUw6HI7hzw8WejV3g8x69vrSUF10h9bS+NClIUO0HBrmfhge3aXW8jrvGmSylSlpU70TCVkrWogcZzyz+nlVV+9x4yS3Db4s81EEA+far1NAnZTr6uJxxSyOWTyqMrrU4cDuOZjXH9MtyZz0pXE64VY5DkB5DsquXKi4q84q6AANhIk56zsrrkqrgqrwqrYT0qrgmvCa8zRCek1yTXhNfs0Qn/9k=");
  }
  .gem-def span { font-size: 18px; transform: translateY(-2px); color: #fff; }
  .gem-hp {
    bottom: -16px; right: -16px;
    width: 60px; height: 58px;
    background-image: url("data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBAUEBAYFBQUGBgYHCQ4JCQgICRINDQoOFRIWFhUSFBQXGiEcFxgfGRQUHScdHyIjJSUlFhwpLCgkKyEkJST/2wBDAQYG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ffd36a; }

  .back {
    width: calc(min(7.2vh, 64px) * 0.70);
    height: min(7.2vh, 64px);
    border-radius: 8px;
    background:
      repeating-linear-gradient(45deg, #3a2414 0 6px, #2a1810 6px 12px);
    border: 2px solid #7a6230;
    flex: 0 0 auto;
  }


  #dropGlow {
    display: none;
    position: absolute;
    z-index: 2;
    pointer-events: none;
    border-radius: 22px;
    border: 3px solid rgba(255, 224, 140, .95);
    box-shadow:
      0 0 0 2px rgba(80, 50, 10, .35),
      0 0 28px 10px rgba(255, 210, 100, .45),
      inset 0 0 36px rgba(255, 230, 150, .18);
    animation: dropPulse 1s ease-in-out infinite;
  }
  #dropGlow.on { display: block; }
  @keyframes dropPulse {
    0%,100% { opacity: .85; box-shadow: 0 0 18px 6px rgba(255,210,100,.35), inset 0 0 24px rgba(255,230,150,.12); }
    50% { opacity: 1; box-shadow: 0 0 36px 14px rgba(255,220,120,.55), inset 0 0 40px rgba(255,230,150,.22); }
  }
  #cardPeek {
    position: fixed; z-index: 90; pointer-events: none;
    width: min(260px, 34vh);
    filter: drop-shadow(0 16px 20px rgba(0,0,0,.55));
    transform: translate(-50%, -100%);
  }
  #cardPeek img { width: 100%; height: auto; display: block; border-radius: 16px; }
  .give-btn {
    padding: 8px 12px; min-width: 96px;
    border-radius: 10px;
    border: 2px solid #6a3a28;
    background: linear-gradient(#4a2418, #2a140c);
    color: #f0c8a8; font-weight: 800;
  }

  .overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.72);
    display: none; align-items: center; justify-content: center;
    z-index: 20;
  }
  .overlay.show { display: flex; }
  .modal {
    width: min(420px, 92vw);
    background: #1a140c;
    border: 2px solid var(--gold);
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
  }
  .modal h2 { color: var(--gold); margin: 0 0 10px; }
  .hint { position: relative; left: auto; transform: none;
    bottom: auto; text-align:center; height:16px; font-size: 12px; color: #cbb58a; opacity: .8; pointer-events: none; }

  .bgm-btn {
    position: fixed; top: 14px; right: 14px; z-index: 30;
    width: 48px; height: 48px; border-radius: 50%;
    border: 2px solid var(--gold-dim);
    background: linear-gradient(#3a2814, #21160c);
    color: var(--gold); font-size: 20px;
  }
  .bgm-btn.on { border-color: var(--gold); box-shadow: 0 0 12px rgba(228,195,106,.35); }
  .bgm-btn:hover { border-color: var(--gold); }


  .hero-picks { max-width: 980px; }
  .hero-card small { display:block; font-size:11px; color:#c9b48a; font-weight:600; letter-spacing:.08em; }
  .hero-card.lock { opacity:.42; filter:grayscale(.35); cursor:not-allowed; position:relative; }
  .hero-card.lock::after {
    content:"오픈 예정";
    position:absolute; left:8px; right:8px; bottom:10px;
    font-size:11px; color:#ffe7a8;
  }
  /* hero-card .art is defined once at the top — do not crop to 72px */
  .c-tribe {
    font-size: 10px; text-align:center; color:#e8c97a; letter-spacing:.12em; margin-top:-3px; /* v0.221: race label up ~5px */
  }


  #deckBuilder.screen.active {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 16px;
    overflow: auto;
  }
  .builder {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    min-height: 0;
  }
  .builder-col {
    background: rgba(0,0,0,.35);
    border: 1px solid #6a5428;
    border-radius: 14px;
    padding: 12px;
    overflow: auto;
  }
  .builder-col.deck-side {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: calc(100vh - 32px);
  }
  .builder-col.deck-side .deck-list {
    flex: 1 1 auto;
    overflow: auto;
    min-height: 80px;
  }
  .deck-stats {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
  }
  .deck-stat-panel {
    background: #140e0a;
    border: 1px solid #c9a227;
    border-radius: 10px;
    padding: 10px 10px 8px;
  }
  .deck-stat-panel h4 {
    margin: 0 0 8px;
    color: var(--gold);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
  }
  .deck-stat-rows { display: flex; flex-direction: column; gap: 5px; }
  .deck-stat-row {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #f0e6d2;
  }
  .deck-stat-row .lbl { color: #e8d9b0; font-weight: 700; }
  .deck-stat-bar {
    height: 12px;
    background: #2a2218;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid #3d3224;
  }
  .deck-stat-bar > i {
    display: block;
    height: 100%;
    width: 0%;
    background: #3b9eff;
    border-radius: 2px;
  }
  .deck-stat-bar.comp > i { background: #9b59b6; }
  .deck-stat-row .val {
    min-width: 78px;
    text-align: right;
    color: #d8c9a8;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .deck-stat-avg {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 800;
    color: #4aa3ff;
  }
  .builder h2 { color: var(--gold); margin: 0 0 10px; font-size: 20px; }
  .builder-top {
    display: flex; justify-content: space-between; align-items: center;
    gap: 8px; margin-bottom: 12px; flex-wrap: wrap;
  }
  .pool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
  }
  .pool-item { cursor: pointer; position: relative; }
  .pool-item .card { width: 100%; height: auto !important; aspect-ratio: 2 / 3; transform: none !important; }
  .pool-item.full { opacity: .45; }
  .pool-count {
    position: absolute; right: 6px; top: 6px; z-index: 6;
    background: #1b5fb8; border: 2px solid #9fd0ff; color: #fff;
    border-radius: 999px; font-size: 12px; font-weight: 800;
    padding: 2px 7px;
  }
  .deck-list { display: flex; flex-direction: column; gap: 4px; }
  .deck-row {
    display: flex; align-items: center; justify-content: space-between;
    background: #1c140e; border: 1px solid #6a5428; border-radius: 8px;
    padding: 6px 8px; cursor: pointer; font-size: 13px;
  }
  .deck-row:hover { border-color: var(--gold); }
  .deck-row b { color: var(--gold); }
  .deck-meta { color: #cbb58a; font-size: 12px; margin-bottom: 8px; }
  .deck-meta.ok { color: #7dff8a; }
  .deck-meta.bad { color: #ff8a8a; }


  .cmod { display:block; font-size:10px; font-weight:800; line-height:1; margin-top:1px; color:#9fd0ff; }
  .cmod.neg { color:#ffb0b0; }
  .gem span { display:flex; flex-direction:column; align-items:center; }
  .coin-layer {
    position: fixed; inset: 0; z-index: 40;
    display: none; align-items: center; justify-content: center;
    background: rgba(0,0,0,.55);
  }
  .coin-layer.show { display: flex; }
  .coin-box {
    background: #1a140c; border: 2px solid var(--gold); border-radius: 14px;
    padding: 18px 22px; text-align: center; min-width: 280px;
  }
  .coin-box h3 { margin: 0 0 8px; color: var(--gold); }
  .coins { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; margin: 8px 0; }
  .coin {
    width: 36px; height: 36px; border-radius: 50%;
    display:grid; place-items:center; font-weight:800; font-size:13px;
    border: 2px solid #c9a24a;
  }
  .coin.heads { background: radial-gradient(circle at 30% 30%, #ffe7a8, #c49a3a); color:#3a2a10; }
  .coin.tails { background: radial-gradient(circle at 30% 30%, #6a6a70, #2a2a30); color:#ddd; }
  .coins { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin:8px 0; perspective: 420px; }
  .flip-coin { width: 56px; height: 56px; flex: 0 0 56px; perspective: 600px; }
  .flip-inner {
    width: 56px; height: 56px; position: relative;
    animation: coinFlip2d 0.9s ease-in-out forwards;
  }
  .coin-flat {
    width: 56px; height: 56px; display: block;
    object-fit: contain; border-radius: 50%;
  }
  @keyframes coinFlip2d {
    0% { transform: scaleX(1); }
    48% { transform: scaleX(0.06); }
    52% { transform: scaleX(0.06); }
    100% { transform: scaleX(1); }
  }
  @keyframes coinSpin {
    0% { transform: rotateY(0) translateY(0); }
    35% { transform: rotateY(calc(var(--end) * .45)) translateY(-18px); }
    100% { transform: rotateY(var(--end)) translateY(0); }
  }
  .hero-slot {
    margin-left: 4px;
    height: var(--slot-h, calc(var(--lane-h) - 20px));
    width: var(--slot-w, calc((var(--lane-h) - 20px) * 0.66));
    position: relative;
    flex-shrink: 0;
    flex: 0 0 var(--slot-w, calc((var(--lane-h) - 20px) * 0.66));
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 0 0 2px rgba(228,195,106,.55), 0 8px 16px rgba(0,0,0,.4);
    background: #1a1208;
  }
  .hero-slot img { width:100%; height:100%; object-fit:contain; display:block; background:#120c08; }
  .hero-slot .hero-hp {
    position:absolute; left:8px; bottom:6px;
    min-width: 32px; padding: 2px 7px; border-radius: 999px;
    background: rgba(80,16,16,.88); color:#ffe0e0; font-weight:800; text-align:center;
    border: 1px solid #e8c36a; font-size: 12px;
  }
  .hero-slot .hero-soul {
    position:absolute; right:8px; bottom:6px;
    min-width: 36px; padding: 2px 7px; border-radius: 999px;
    background: rgba(16,32,80,.88); color:#d8e8ff; font-weight:800; text-align:center;
    border: 1px solid #8ab4e8; font-size: 12px;
  }
  .rarity-bar { display:flex; gap:6px; flex-wrap:wrap; margin:0 8px 0 0; }
  .rarity-bar button {
    padding: 7px 10px; border-radius: 8px; border: 1px solid #6a5428;
    background: #24180c; color:#e8d7a8; font-weight:700; cursor:pointer;
  }
  .rarity-bar button.on { background:#5a4018; color:#fff3c8; border-color:#e8c36a; }
  .pool-search {
    min-width: 180px;
    flex: 1 1 180px;
    max-width: 280px;
    margin: 0 8px 0 0;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #c9a227;
    background: #1c140e;
    color: #fff3c8;
    font-size: 13px;
    font-weight: 700;
    outline: none;
  }
  .pool-search::placeholder { color: #9a8760; font-weight: 600; }
  .pool-search:focus { border-color: #e8c36a; box-shadow: 0 0 0 2px rgba(232,195,106,.25); }

  /* Viewport media must not reflow the fixed #app stage (HS-style). */
  @media (max-width: 720px) {
    /* title hero picks still tighten via earlier rule; in-game layout stays cq-based */
  }

  .card-pop {
    position: fixed; inset: 0; z-index: 55;
    display: none; align-items: center; justify-content: center;
    background: rgba(0,0,0,.78);
  }
  .card-pop.show { display: flex; }
  .card-menu {
    background: #1a140c; border: 2px solid var(--gold); border-radius: 16px;
    padding: 22px 24px; min-width: 260px; text-align: center;
  }
  .card-menu h3 { color: var(--gold); margin: 0 0 14px; font-size: 18px; }
  .card-menu button { width: 100%; margin: 6px 0; }
  /* v0.221: wrap content — no empty right/bottom; card keeps 2:3 */
  .lore-box {
    display: flex; gap: 16px; align-items: flex-start;
    background: #1a140c; border: 2px solid var(--gold); border-radius: 16px;
    padding: 14px 14px 14px 14px;
    width: fit-content;
    max-width: min(920px, 94vw); max-height: 90vh; overflow: auto;
    box-sizing: border-box;
  }
  .lore-box .lore-card { width: min(280px, 40vw); flex: 0 0 auto; }
  .lore-box .lore-card img, .lore-box .lore-card .card {
    width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: contain; display: block;
  }
  .lore-side {
    color: #e8dcc0;
    flex: 0 1 auto;
    width: min(340px, 46vw);
    max-width: 340px;
    display: flex; flex-direction: column;
    /* no min-height:100% — that stretched side to card height and left bottom gap */
  }
  .lore-side h3 { color: var(--gold); margin: 0 0 6px; font-size: 28px; }
  .lore-side .lore-meta { color: #cbb58a; font-size: 15px; margin-bottom: 10px; line-height: 1.45; }
  .lore-side .lore-skills { margin: 0 0 10px; }
  .lore-side .lore-skill { margin: 0 0 8px; padding: 8px 10px; background: rgba(60,42,20,.45); border: 1px solid #5a4424; border-radius: 8px; }
  .lore-side .lore-skill b { display: block; color: #f3e2b0; font-size: 16px; margin-bottom: 4px; }
  .lore-side .lore-skill span { display: block; color: #d8c9a4; font-size: 14px; line-height: 1.45; }
  .lore-side p { line-height: 1.55; font-size: 16px; margin: 0 0 12px; color: #cbb58a; font-style: italic; }
  #loreText { white-space: pre-line; } /* v0.325: 카드 설명 줄바꿈(\n) 표시 */
  .lore-side .lore-actions {
    margin-top: 10px; /* sit under content, not pushed to card bottom */
    display: flex; flex-direction: column; gap: 8px; padding-top: 0;
  }
  .lore-side .lore-actions .menu-btn { width: 100%; min-width: 0; margin: 0; font-size: 16px; padding: 11px 14px; box-sizing: border-box; }
  .lore-side .lore-actions .menu-btn.ghost { opacity: 1; }


  .help-pop {
    position: fixed; inset: 0; z-index: 60;
    display: none; align-items: center; justify-content: center;
    background: rgba(0,0,0,.78);
  }
  .help-pop.show { display: flex; }
  .help-box {
    background: #1a140c; border: 2px solid var(--gold); border-radius: 16px;
    padding: 20px 22px; width: min(760px, 94vw); max-height: 88vh; overflow: auto;
    color: #e8dcc0;
  }
  .help-box h2 { color: var(--gold); margin: 0 0 10px; font-size: 24px; }
  .help-box h3 { color: #f3e2b0; margin: 16px 0 8px; font-size: 18px; }
  .help-box p { line-height: 1.65; font-size: 15px; margin: 0 0 10px; }
  .help-list { margin: 0 0 10px; padding-left: 1.2em; line-height: 1.65; font-size: 15px; }
  .help-list li { margin: 0 0 6px; }
  .help-list b { color: #f3e2b0; }
  .help-note { color: #cbb58a; font-size: 14px; }
  .race-item { padding: 8px 0; border-bottom: 1px solid #3a2a18; }
  .race-item b { color: var(--gold); font-size: 16px; }
  .race-item span { color: #cbb58a; font-size: 13px; margin-left: 8px; }


  #spellFx {
    position: fixed; inset: 0; z-index: 80; display: none;
    pointer-events: none; overflow: hidden;
  }
  #spellFx.on { display: block; }
  /* v0.364 매치 연출 v2: 공용 dim(전장 위) + 알파 비디오 오버레이(dim 위). 클릭 통과 */
  #matchFx {
    position: fixed; inset: 0; z-index: 79; display: none;
    pointer-events: none; overflow: hidden;
  }
  #matchFx.on { display: block; }
  #matchFx.held { z-index: 19; } /* 승리·패배: 결과 모달(.overlay z20) 아래에서 dim 유지 */
  #matchFx .mfx-dim {
    position: absolute; inset: 0; background: #000; opacity: 0;
    pointer-events: none; will-change: opacity;
  }
  #matchFx .mfx-stage { position: absolute; inset: 0; pointer-events: none; }
  /* v0.369 코인 듀얼 v3 B2: 전장 위 오버레이 (dim < 카드 < 코인), 클릭 통과 (베타 OK 버튼만 클릭) */
  #coinDuel { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
  #coinDuel:empty { display: none; }
  #coinDuel .cd-dim { position: absolute; inset: 0; opacity: 0; pointer-events: none; z-index: 0; }
  #coinDuel .cd-card { position: absolute; z-index: 1; opacity: 0; pointer-events: none; }
  #coinDuel .cd-card img { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 6%; filter: drop-shadow(0 6px 14px rgba(0,0,0,.55)); }
  #coinDuel .cd-card-stub { width: 100%; height: 100%; border-radius: 6%; background: #2a2016; color: #f0d9a8; display: flex; align-items: center; justify-content: center; font-weight: 800; }
  #coinDuel .cd-detail { position:absolute; left:calc(100% + 12px); top:5%; box-sizing:border-box; color:#fff2d5; text-shadow:0 2px 4px #000; background:rgba(20,15,10,.84); border-radius:6px; padding:5px 8px; line-height:1.5; font-weight:600; }
  #handDiscountNote { position:fixed; transform:translate(-50%,-50%); max-width:90vw; box-sizing:border-box; padding:4px 9px; border:1px solid #a98a48; border-radius:6px; color:#fff0b9; background:rgba(24,18,10,.94); font-size:12px; line-height:1.4; text-align:center; pointer-events:none; z-index:35; }
  body:not(:has(#game.active)) #handDiscountNote { display:none; }
  #coinDuel .cd-coin { position: absolute; pointer-events: none; object-fit: fill; background-color: transparent; }
  #matchFx .mfx-overlay {
    position: absolute; left: 50%; top: 50%;
    width: max(100vw, calc(100vh * 16 / 9)); height: auto; aspect-ratio: 16 / 9;
    /* v0.368: 오버레이 0.72배 (0.85×0.85, v0.367은 0.85)(화면 중앙 기준). dim(.mfx-dim)은 전체 화면 그대로. 비디오·Safari WebP 공통 */
    transform: translate(-50%, -50%) scale(var(--mfx-scale, 0.72));
    transform-origin: 50% 50%;
    pointer-events: none; user-select: none;
  }
  #spellFx .fx-veil {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 55%, rgba(40,24,8,.15), rgba(8,6,4,.55));
  }
  #spellFx .fx-name {
    position: absolute; left: 50%; top: 12%; transform: translateX(-50%);
    font-family: "Cinzel","Noto Serif KR",serif;
    font-size: 28px; letter-spacing: .18em; color: #f3e0b0;
    text-shadow: 0 2px 16px #000, 0 0 24px #c9a24a;
    animation: fxTitle 1.5s ease both;
  }
  @keyframes fxTitle {
    0% { opacity: 0; transform: translateX(-50%) translateY(-12px) scale(.92); }
    18% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
    75% { opacity: 1; }
    100% { opacity: 0; }
  }
  #spellFx .rock {
    position: absolute; width: 54px; height: 42px; border-radius: 40% 30% 45% 35%;
    background: linear-gradient(135deg,#6b5340,#2c2118 70%);
    box-shadow: inset 4px 4px 0 #8a6b4c, 0 8px 16px #0008;
    animation: rockFall 1.15s cubic-bezier(.2,.7,.2,1) both;
  }
  @keyframes rockFall {
    0% { transform: translateY(-30vh) rotate(-20deg) scale(.6); opacity: 0; }
    15% { opacity: 1; }
    70% { transform: translateY(var(--land, 42vh)) rotate(18deg) scale(1); }
    100% { transform: translateY(calc(var(--land, 42vh) + 8px)) rotate(22deg); opacity: .15; }
  }
  #spellFx .dust {
    position: absolute; width: 90px; height: 28px; border-radius: 50%;
    background: radial-gradient(ellipse, rgba(196,160,96,.55), transparent 70%);
    animation: dustPuff 1.1s ease both;
  }
  @keyframes dustPuff {
    0% { transform: scale(.2); opacity: 0; }
    40% { opacity: .8; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.8); }
  }
  #spellFx .chain {
    position: absolute; height: 14px; border-radius: 8px;
    background: repeating-linear-gradient(90deg,#c9a24a 0 10px,#5a4630 10px 14px);
    box-shadow: 0 0 12px #c9a24a88;
    animation: chainSnap 1.4s ease both;
  }
  @keyframes chainSnap {
    0% { transform: scaleX(0); opacity: 0; }
    35% { transform: scaleX(1); opacity: 1; }
    70% { filter: brightness(1.4); }
    100% { opacity: .2; }
  }
  #spellFx .isle {
    position: absolute; width: 160px; height: 70px; border-radius: 50%;
    background: radial-gradient(ellipse at 50% 40%, #7a9a4a, #5a4028 70%);
    box-shadow: 0 20px 40px #0008, 0 -8px 20px #c9e6ff44;
    animation: isleRise 1.5s ease both;
  }
  @keyframes isleRise {
    0% { transform: translateY(40vh) scale(.5); opacity: 0; }
    50% { opacity: 1; transform: translateY(0) scale(1); }
    100% { transform: translateY(-8px); opacity: .15; }
  }
  #spellFx .vortex {
    position: absolute; left: 50%; top: 48%; width: 280px; height: 280px;
    margin: -140px 0 0 -140px; border-radius: 50%;
    background: conic-gradient(from 0deg, #1a3a5a, #4ec4ff, #0a1020, #4ec4ff, #1a3a5a);
    mask: radial-gradient(circle, transparent 28%, #000 32%, #000 58%, transparent 62%);
    animation: spinVortex 1.5s linear both;
    filter: blur(0.4px) saturate(1.3);
    box-shadow: 0 0 60px #4ec4ff66;
  }
  @keyframes spinVortex { to { transform: rotate(540deg) scale(1.15); opacity: 0; } }
  #spellFx .crack {
    position: absolute; left: 50%; top: 55%; width: 8px; height: 0;
    background: linear-gradient(#ffb060, #ff5a1a);
    box-shadow: 0 0 24px #ff7a30;
    animation: crackGrow 1.2s ease both;
    transform: translateX(-50%);
  }
  @keyframes crackGrow {
    0% { height: 0; opacity: 0; }
    40% { height: 42vh; opacity: 1; }
    100% { height: 48vh; opacity: .2; }
  }
  #spellFx .hand {
    position: absolute; width: 90px; height: 110px;
    background: radial-gradient(circle at 40% 30%, #c4a06a, #6a4a28);
    clip-path: polygon(20% 100%, 10% 40%, 25% 10%, 40% 35%, 50% 0, 60% 35%, 75% 8%, 90% 42%, 80% 100%);
    animation: handUp 1.3s ease both;
    filter: drop-shadow(0 8px 12px #0008);
  }
  @keyframes handUp {
    0% { transform: translateY(30vh) scale(.6); opacity: 0; }
    40% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: .15; transform: translateY(-10px); }
  }
  #spellFx .maze {
    position: absolute; left: 50%; top: 48%; width: 240px; height: 240px;
    margin: -120px 0 0 -120px;
    background:
      linear-gradient(#c9a24a, #c9a24a) 0 40%/100% 8px no-repeat,
      linear-gradient(#c9a24a, #c9a24a) 0 70%/70% 8px no-repeat,
      linear-gradient(#c9a24a, #c9a24a) 30% 0/8px 100% no-repeat,
      linear-gradient(#c9a24a, #c9a24a) 70% 20%/8px 80% no-repeat,
      linear-gradient(#c9a24a, #c9a24a) 0 10%/50% 8px no-repeat;
    box-shadow: 0 0 40px #c9a24a88, inset 0 0 40px #0006;
    animation: mazeIn 1.5s ease both;
  }
  @keyframes mazeIn {
    0% { transform: rotate(-8deg) scale(.3); opacity: 0; }
    40% { opacity: 1; transform: rotate(0) scale(1); }
    100% { opacity: 0; transform: scale(1.2) rotate(6deg); }
  }
  #spellFx .hole {
    position: absolute; left: 50%; top: 55%; width: 220px; height: 90px;
    margin: -45px 0 0 -110px; border-radius: 50%;
    background: radial-gradient(ellipse at 50% 40%, #1a1008, #000);
    box-shadow: inset 0 16px 30px #000, 0 0 30px #5a3a18;
    animation: holeOpen 1.4s ease both;
  }
  @keyframes holeOpen {
    0% { transform: scale(.1); opacity: 0; }
    40% { opacity: 1; transform: scale(1); }
    100% { opacity: .2; transform: scale(1.15); }
  }
  #spellFx .twister {
    position: absolute; left: 50%; top: 42%; width: 90px; height: 280px;
    margin: -140px 0 0 -45px;
    background: repeating-conic-gradient(from 0deg, #c9a24a 0 8deg, transparent 8deg 16deg);
    clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%);
    filter: blur(.4px);
    animation: twist 1.5s linear both;
    opacity: .85;
  }
  @keyframes twist { to { transform: rotate(720deg) scaleY(1.1); opacity: 0; } }
  #spellFx .shock {
    position: absolute; left: 50%; top: 52%; width: 40px; height: 40px;
    margin: -20px; border-radius: 50%;
    border: 6px solid #f0d48a;
    animation: shockwave 1.2s ease-out both;
  }
  @keyframes shockwave {
    0% { transform: scale(.2); opacity: 1; }
    100% { transform: scale(12); opacity: 0; }
  }
  #spellFx .aura {
    position: absolute; left: 50%; top: 50%; width: 260px; height: 260px;
    margin: -130px; border-radius: 50%;
    background: radial-gradient(circle, #ffb24a88, transparent 68%);
    animation: auraPulse 1.5s ease both;
  }
  @keyframes auraPulse {
    0% { transform: scale(.4); opacity: 0; }
    40% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.4); }
  }
  #spellFx .sand {
    position: absolute; width: 140px; height: 140px; border-radius: 50%;
    background: radial-gradient(circle, #c48a3a, transparent 70%);
    animation: sandSuck 1.4s ease both;
  }
  @keyframes sandSuck {
    0% { transform: scale(1.4); opacity: .2; }
    50% { opacity: .8; transform: scale(1); }
    100% { transform: scale(.2); opacity: 0; }
  }
  #spellFx .stoneveil {
    position: absolute; inset: 18% 22%;
    background: linear-gradient(180deg, rgba(160,140,110,.15), rgba(90,70,50,.55));
    mix-blend-mode: overlay;
    animation: stoneIn 1.5s ease both;
  }
  @keyframes stoneIn {
    0% { opacity: 0; filter: contrast(1); }
    40% { opacity: 1; filter: contrast(1.3) grayscale(.4); }
    100% { opacity: 0; }
  }
  /* v0.362: 스펠 팩 meta.screenShake → --quake-dur / --quake-k (없으면 기존 1.4s · 1배) */
  #game.quake { animation: boardQuake var(--quake-dur, 1.4s) ease-in-out; }
  @keyframes boardQuake {
    0%,100% { transform: translate(0,0); }
    10% { transform: translate(calc(-7px * var(--quake-k, 1)), calc(4px * var(--quake-k, 1))); }
    20% { transform: translate(calc(8px * var(--quake-k, 1)), calc(-3px * var(--quake-k, 1))); }
    30% { transform: translate(calc(-6px * var(--quake-k, 1)), calc(-5px * var(--quake-k, 1))); }
    40% { transform: translate(calc(7px * var(--quake-k, 1)), calc(3px * var(--quake-k, 1))); }
    50% { transform: translate(calc(-4px * var(--quake-k, 1)), calc(5px * var(--quake-k, 1))); }
    60% { transform: translate(calc(5px * var(--quake-k, 1)), calc(-2px * var(--quake-k, 1))); }
    80% { transform: translate(calc(-2px * var(--quake-k, 1)), calc(2px * var(--quake-k, 1))); }
  }


  #game.active::before {
    bottom: 20%;
    background-position: center 40%;
    background-size: 138% auto;
  }
  .slot {
    position: relative;
    width: var(--slot-w);
    height: var(--slot-h);
    flex: 0 0 var(--slot-w);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
  }
  .slot::before {
    content: attr(data-n);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Cinzel", "Times New Roman", serif;
    font-weight: 800;
    font-size: calc(var(--slot-h) * 0.42);
    color: rgba(72, 46, 18, .32);
    text-shadow: 0 1px 0 rgba(255,230,180,.18);
    pointer-events: none;
    z-index: 0;
    letter-spacing: .02em;
  }
  .slot.filled::before { opacity: 0; }
  .slot .minion {
    position: relative;
    z-index: 2;
    width: 100% !important;
    height: 100% !important;
    flex: 0 0 auto !important;
    margin: 0;
    filter: drop-shadow(0 8px 10px rgba(0,0,0,.45));
  }
  .board.empty::after { content: none !important; }
  #game.active .my-hand {
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    z-index: 6;
  }
  #game.active .my-hand .card {
    height: min(98%, 34cqh) !important;
    width: calc(min(98%, 34cqh) * 0.66) !important;
    max-height: none !important;
    max-width: none !important;
    margin-left: 0 !important;
    background: transparent !important;
    box-shadow: 0 12px 20px rgba(0,0,0,.4);
  }
  #game.active .my-hand .card:first-child { margin-left: 0 !important; }
  .draw-ghost {
    position: fixed;
    z-index: 90;
    pointer-events: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 16px 28px rgba(0,0,0,.5);
    background: transparent;
  }
  .draw-ghost img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 10px;
    filter: drop-shadow(0 12px 16px rgba(0,0,0,.5));
  }


  .board {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: visible !important;
  }
  .board.opp { border: none !important; }
  #game.active.drop-ready .board { box-shadow: none !important; border: none !important; }
  #game.active.drop-ready #myBoard {
    box-shadow: inset 0 0 0 1px rgba(255, 224, 140, .55), 0 0 10px rgba(255,210,100,.22);
    border-radius: 18px;
  }
  .board-divider {
    height: 10px;
    margin: 0 8%;
    background:
      linear-gradient(90deg, transparent, #c4a056 12%, #efe0b0 50%, #c4a056 88%, transparent);
    border-radius: 6px;
    box-shadow: 0 1px 0 #5a4018, 0 0 8px rgba(200,160,70,.25);
    align-self: center;
  }
  .slot { border: none !important; background: transparent !important; }
  .slot::before { content: none !important; }
  .empty-slot { border: none !important; background: transparent !important; }
  .card-face {
    background: transparent !important;
    object-fit: contain !important;
  }
  .minion, .card { background: transparent !important; }
  .corner-soul {
    position: absolute;
    z-index: 5;
    min-width: 46px;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 13px;
    color: #eaf6ff;
    background: radial-gradient(circle at 30% 30%, #6ec4ff, #163a86);
    box-shadow: 0 0 0 2px #9cf8ff, 0 4px 10px #0008;
    text-align: center;
    pointer-events: none;
  }
  .corner-soul.opp { top: 7%; right: 15.5%; }
  .corner-soul.me { bottom: 28%; right: 15.5%; }
  .hero-bust { flex-direction: column; gap: 4px; }
  .hero-bust .frame {
    width: min(96px, 14cqh);
    height: min(118px, 17cqh);
  }
  .hero-bust .soul-gem { display: none !important; }
  .opp-hand {
    justify-content: center;
    align-items: flex-end;
    height: 100%;
    gap: 0;
  }
  #game.active .opp-hand .back {
    height: min(9cqh, 52px) !important;
    width: auto !important;
    aspect-ratio: 2 / 3 !important;
    margin-left: -10px;
    transform-origin: bottom center;
    background:
      radial-gradient(circle at 50% 42%, #2a5a9a 0 18%, #122448 42%, #0c1830 100%);
    border: 2px solid #c9a24a;
    box-shadow: 0 4px 8px #0008, inset 0 0 0 2px #1a1008;
    border-radius: 6px;
  }
  #game.active .opp-hand .back:first-child { margin-left: 0; }
  #dropGlow { display: none !important; }


  .hero-row { pointer-events: none; }
  .hero-row .hero-bust { pointer-events: auto; }
  .hero-row.opp { align-items: flex-end; padding-bottom: 0; }
  .hero-row.me { align-items: flex-start; padding-top: 0; }
  .hero-bust {
    flex-direction: column !important;
    gap: 2px !important;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,.45));
  }
  .hero-bust .frame {
    width: min(78px, 11cqh) !important;
    height: min(96px, 13.5cqh) !important;
    border-radius: 46% 46% 38% 38% / 40% 40% 46% 46% !important;
    border: 4px solid #e4c36a !important;
    box-shadow: 0 0 0 3px #2a1c0a, inset 0 0 0 2px #6a4a18 !important;
    background:
      radial-gradient(ellipse at 50% 20%, #3a2a14, #120c08) !important;
  }
  .hero-bust .gem {
    margin-top: -10px;
    z-index: 2;
  }
  #game.active .my-hand .card {
    margin-left: 0 !important;
  }
  #game.active .opp-hand .back {
    margin-left: -18px !important;
  }


  .board-divider { display: none !important; height: 0 !important; margin: 0 !important; background: none !important; }
  .log {
    position: absolute !important;
    left: 50%;
    top: 8px;
    transform: translateX(-50%);
    height: auto !important;
    z-index: 6;
    pointer-events: none;
    text-shadow: 0 2px 6px #000;
    background: none !important;
  }
  #game.active::before {
    inset: 0 !important;
    bottom: 0 !important;
    background-size: cover !important;
    background-position: center center !important;
  }
  .board {
    --slot-h: min(96%, 38cqh);
    --slot-w: calc(var(--slot-h) * 2 / 3);
    padding: 6px 8% !important;
    margin: 0 4% !important;
  }
  .slot, .slot .minion {
    width: var(--slot-w) !important;
    height: var(--slot-h) !important;
  }
  .corner-soul.opp { top: 18px !important; right: 18px !important; bottom: auto !important; }
  .corner-soul.me { top: auto !important; bottom: 22%; right: 18px !important; }
  .card.playable::after { content: none !important; display: none !important; }
  #game.active.drop-ready #myBoard {
    box-shadow: none !important;
  }
  #game.active .my-hand .card {
    outline: none !important;
  }
  .minion, .card { overflow: visible; }
  .card-face { border-radius: 12px 12px 20px 20px; }


  .hero-row { display: none !important; }
  #game.active::before {
    inset: 0 !important;
    background-size: 100% 100% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
  }
  .board {
    --slot-h: clamp(152px, 24cqh, 208px);
    --slot-w: calc(var(--slot-h) * 0.66);
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 5% !important;
    margin: 0 !important;
    overflow: visible !important;
  }
  .slot {
    flex: 0 0 var(--slot-w) !important;
    width: var(--slot-w) !important;
    min-width: var(--slot-w) !important;
    height: var(--slot-h) !important;
    max-width: var(--slot-w) !important;
  }
  .slot .minion,
  .slot .hero-slot,
  .minion, .hero-slot {
    width: var(--slot-w) !important;
    min-width: var(--slot-w) !important;
    height: var(--slot-h) !important;
    flex: 0 0 var(--slot-w) !important;
    max-width: var(--slot-w) !important;
  }
  .slot.empty { visibility: hidden; }
  .card.playable::after { display: none !important; }
  #game.active .my-hand .card {
    outline: none !important;
    box-shadow: none !important;
  }
  #game.active .my-hand .card.playable .card-face {
    box-shadow: 0 0 0 2px #ffe7a8, 0 0 10px 2px rgba(255,210,100,.5);
  }


  .col-main > .hero-row { display: none !important; }
  .col-main > .log {
    position: absolute; left: 50%; top: 6px; transform: translateX(-50%);
    z-index: 5; pointer-events: none; width: 46%; text-align: center;
  }
  .col-main > .corner-soul { position: absolute; z-index: 6; }
  .col-main > .corner-soul.opp { top: 10px; right: 118px; }
  .col-main > .corner-soul.me { bottom: 29%; right: 118px; }
  .col-hud {
    justify-content: flex-start !important;
    padding-top: 4px !important;
    gap: 10px;
  }
  #oppStrip { margin-top: 0 !important; }
  #myStrip { margin-top: auto; padding-bottom: 96px; }
  .pile-art { margin-top: 0 !important; }
  .hero-soul { display: none !important; }
  #spellFx { position: fixed; inset: 0; z-index: 80; display: none; pointer-events: none; overflow: hidden; }
  #spellFx.on { display: block; }
  #spellFx .fx-veil {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 48%, rgba(30,18,6,.2), rgba(6,4,2,.62));
  }
  #spellFx .fx-card {
    position: absolute; left: 50%; top: 46%;
    width: min(220px, 28vh); transform: translate(-50%,-50%) scale(.72);
    opacity: 0; z-index: 2; filter: drop-shadow(0 18px 28px #000a);
    transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .35s;
  }
  #spellFx .fx-card.in { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  #spellFx .fx-card.out { opacity: 0; transform: translate(-50%,-58%) scale(.9); }
  #spellFx .fx-card img { width: 100%; height: auto; display: block; }
  #spellFx .fx-stage { position: absolute; inset: 0; z-index: 1; }
  #spellFx .fx-name {
    position: absolute; left: 50%; top: 10%; transform: translateX(-50%);
    color: #ffe7a8; font-weight: 900; font-size: 22px; letter-spacing: .08em;
    text-shadow: 0 2px 10px #000; z-index: 3;
  }


  .card.playable::after,
  #game.active .my-hand .card.playable::after {
    content: none !important;
    display: none !important;
    box-shadow: none !important;
  }
  #game.active .my-hand .card {
    outline: none !important;
    box-shadow: none !important;
    overflow: visible;
  }
  #game.active .my-hand .card.playable .card-face {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 232, 160, .75), 0 0 10px 1px rgba(255, 210, 100, .35);
    animation: playGlowSoft 1.8s ease-in-out infinite;
  }
  @keyframes playGlowSoft {
    0%,100% { box-shadow: 0 0 0 2px rgba(255,228,150,.55), 0 0 8px 1px rgba(255,210,100,.25); }
    50% { box-shadow: 0 0 0 2px rgba(255,240,190,.95), 0 0 14px 2px rgba(255,220,120,.5); }
  }
  .slot.empty { visibility: visible !important; opacity: .0; pointer-events: none; }


  #game { position: relative; overflow: hidden; }
  #boardBgLayer {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 0;
    pointer-events: none;
  }
  #game.active #boardBgLayer { display: block; }
  #game.active::before {
    background-image: linear-gradient(180deg, rgba(8,6,4,.12), rgba(8,6,4,.06) 50%, rgba(8,6,4,.16)) !important;
  }


  #game.active > #boardBgLayer {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    z-index: 0 !important;
  }
  #game.active > .playfield { z-index: 3 !important; height: 100% !important; }


  #cardPeek {
    position: fixed !important;
    left: 50% !important;
    top: 46% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 200 !important;
    margin: 0 !important;
  }
  .drag-ghost {
    position: fixed !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border: none !important;
    overflow: visible !important;
  }
  .drag-ghost::after { display: none !important; }
  .col-main {
    grid-template-rows: 16% 30% 28% 23% 3% !important;
  }
  .board.opp { padding-top: 18px !important; align-items: flex-end !important; }
  #myBoard { padding-top: 22px !important; }
  .board {
    padding-left: 15% !important;
    padding-right: 11% !important;
    box-sizing: border-box !important;
  }
  #game.active .my-hand {
    justify-content: center !important;
    padding-left: 7% !important;
    padding-right: 2% !important;
  }
  .card.playable::after,
  .my-hand .card::after,
  #game.active .my-hand .card.playable::after {
    display: none !important;
    content: none !important;
  }
  #game.active .my-hand .card,
  #game.active .my-hand .card.playable {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
  }
  #game.active .my-hand .card.playable .card-face {
    box-shadow: 0 0 0 2px rgba(255,230,160,.8), 0 0 8px rgba(255,210,100,.35) !important;
    animation: playGlowSoft 1.8s ease-in-out infinite;
  }


  #battleFx {
    position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden;
  }
  #game.fx-shake { animation: fxShake .28s ease-in-out; }
  #game.fx-stop .minion, #game.fx-stop .hero-slot, #game.fx-stop .card {
    animation-play-state: paused !important;
  }
  @keyframes fxShake {
    0%,100% { transform: translate(0,0); }
    20% { transform: translate(-2px, 1px); }
    40% { transform: translate(2px, -1px); }
    60% { transform: translate(-1px, -2px); }
    80% { transform: translate(1px, 1px); }
  }
  .minion.fx-lunge { animation: fxLunge .5s cubic-bezier(.2,.8,.2,1); z-index: 8; }
  @keyframes fxLunge {
    0% { transform: translate(0,0) scale(1); }
    35% { transform: translateY(-18px) scale(1.08); filter: brightness(1.25); }
    100% { transform: translate(0,0) scale(1); }
  }
  .minion.fx-recoil, .hero-slot.fx-recoil { animation: fxRecoil .45s ease-out; }
  @keyframes fxRecoil {
    0% { transform: translate(0,0); filter: brightness(2); }
    30% { transform: translate(10px, 4px) rotate(3deg); filter: brightness(1.4); }
    100% { transform: translate(0,0); }
  }
  .minion.fx-dissolve { animation: fxDissolve .55s ease-in forwards; }
  @keyframes fxDissolve {
    0% { filter: brightness(2) saturate(0.2); opacity: 1; }
    100% { filter: brightness(3) saturate(0); opacity: 0; transform: scale(.86) rotate(-8deg); }
  }
  .vfx { position: fixed; pointer-events: none; }
  .vfx.slash-arc {
    width: 220px; height: 18px; margin: 0;
    background: linear-gradient(90deg, transparent, #fff6c8 20%, #ffe08a 50%, #fff 60%, transparent);
    filter: drop-shadow(0 0 8px #ffd36a) blur(.3px);
    animation: slashSweep .28s ease-out forwards;
    transform-origin: center;
  }
  .vfx.slash-arc2 {
    width: 180px; height: 8px;
    background: linear-gradient(90deg, transparent, #fff8, #fff0);
    animation: slashSweep .32s ease-out forwards;
  }
  @keyframes slashSweep {
    0% { opacity: 0; transform: translate(-50%,-50%) scaleX(.2); }
    35% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%,-50%) scaleX(1.15); }
  }
  .vfx.spark {
    width: 8px; height: 8px; border-radius: 50%;
    background: #ffe9a8; box-shadow: 0 0 10px 3px #ffb347;
    animation: sparkOut .4s ease-out forwards;
  }
  @keyframes sparkOut {
    0% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%,-50%) translateY(-28px) scale(.2); }
  }
  .vfx.impact-flash {
    width: 90px; height: 90px; border-radius: 50%;
    background: radial-gradient(circle, #fff 0 18%, #ffe08a 30%, transparent 70%);
    transform: translate(-50%,-50%);
    animation: flashPop .32s ease-out forwards;
  }
  @keyframes flashPop {
    0% { opacity: 1; transform: translate(-50%,-50%) scale(.3); }
    100% { opacity: 0; transform: translate(-50%,-50%) scale(1.4); }
  }
  .vfx.shield-burst {
    width: 120px; height: 120px; border-radius: 50%;
    border: 3px solid #c9e7ff;
    box-shadow: 0 0 24px #7ec8ff, inset 0 0 18px #fff8;
    transform: translate(-50%,-50%);
    animation: shieldPop .4s ease-out forwards;
  }
  @keyframes shieldPop {
    0% { opacity: 1; transform: translate(-50%,-50%) scale(.4); }
    100% { opacity: 0; transform: translate(-50%,-50%) scale(1.3); }
  }
  .vfx.shard {
    width: 10px; height: 14px;
    background: linear-gradient(#efe0b0, #8a6a30);
    transform: translate(-50%,-50%);
    animation: shardFly .55s ease-in forwards;
  }
  @keyframes shardFly {
    0% { opacity: 1; transform: translate(-50%,-50%) rotate(0); }
    100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(80deg); }
  }
  .vfx.dmg-pop {
    font-weight: 900; font-size: 34px; color: #ffe9b0;
    /* v0.253: black rim like gem/HUD digits */
    -webkit-text-stroke: 1.5px #000;
    paint-order: stroke fill;
    text-shadow:
      0 0 2px #000,
      1px 0 0 #000,
      -1px 0 0 #000,
      0 1px 0 #000,
      0 -1px 0 #000,
      1px 1px 0 #000,
      -1px -1px 0 #000,
      1px -1px 0 #000,
      -1px 1px 0 #000,
      0 2px 4px #000,
      0 0 10px #c00;
    transform: translate(-50%,-50%);
    animation: dmgBounce .7s cubic-bezier(.2,1.4,.3,1) forwards;
  }
  @keyframes dmgBounce {
    0% { opacity: 0; transform: translate(-50%,-50%) scale(.4); }
    35% { opacity: 1; transform: translate(-50%,-70%) scale(1.25); }
    100% { opacity: 0; transform: translate(-50%,-110%) scale(.9); }
  }
  #fxStage .bolt, #fxStage .ember, #fxStage .frost, #fxStage .shade, #fxStage .holy, #fxStage .vine {
    position: absolute; pointer-events: none;
  }
  #fxStage .ember {
    width: 16px; height: 16px; border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, #ff9a2a 40%, transparent 70%);
    animation: emberUp 1.4s ease-out both;
  }
  @keyframes emberUp {
    0% { opacity: 0; transform: translateY(20px) scale(.4); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-140px) scale(1.2); }
  }


  .slot.hero { display: none !important; }
  #oppStrip, #myStrip { align-items: center; }
  #oppStrip .hud-hero { margin-top: 8px; }
  #myStrip .hud-hero { margin: 6px 0 8px; }
  .hud-hero .hero-slot {
    width: 74px !important;
    height: 110px !important;
    min-width: 74px !important;
    max-width: 74px !important;
    background: rgba(12,8,4,.55) !important;
    border: 2px solid #c4a056 !important;
    border-radius: 10px !important;
    overflow: hidden;
    position: relative;
  }
  .hud-hero .hero-slot img {
    width: 100%; height: 100%; object-fit: contain;
  }
  .hud-hero .hero-hp {
    position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
    min-width: 28px; padding: 1px 6px; border-radius: 999px;
    background: #8b1c1c; color: #fff; font-weight: 900; font-size: 12px;
  }
  .hud-hero .hero-soul { display: none !important; }
  .board {
    padding-left: 3% !important;
    padding-right: 8% !important;
  }
  #spellFx .fx-card {
    top: 16% !important;
    left: 50% !important;
    width: min(210px, 28vh) !important;
    transform: translate(-50%, 0) scale(.84);
    opacity: 0;
  }
  #spellFx .fx-card.in {
    opacity: 1 !important;
    transform: translate(-50%, 0) scale(1) !important;
  }
  #spellFx .fx-card.out {
    opacity: 0 !important;
    transform: translate(-50%, -12px) scale(.92) !important;
  }
  #spellFx .fx-name { display: none !important; }
  #game.active .my-hand .card,
  #game.active .my-hand .card.playable,
  .minion, .minion.playable {
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  #game.active .my-hand .card {
    overflow: hidden !important;
    border-radius: 10px !important;
  }
  #game.active .my-hand .card .card-face,
  .minion .card-face {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 10px;
  }
  #game.active .my-hand .card.playable .card-face {
    box-shadow: inset 0 0 0 2px rgba(255,228,150,.92), 0 0 10px rgba(255,210,100,.28) !important;
  }
  .card.playable::after, .minion.playable::after { display: none !important; }


  .board {
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    padding-left: 10% !important;
    padding-right: 8% !important;
  }
  .board.opp {
    align-items: flex-end !important;
    padding-top: 6% !important;
    padding-bottom: 8px !important;
  }
  #myBoard {
    align-items: flex-start !important;
    padding-top: 8px !important;
    padding-bottom: 2% !important;
  }
  .slot.empty {
    flex: 0 0 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  .card::after,
  .card.playable::after,
  #game.active .my-hand .card::after,
  #game.active .my-hand .card.playable::after {
    content: none !important;
    display: none !important;
    box-shadow: none !important;
    border: none !important;
    inset: auto !important;
    width: 0 !important;
    height: 0 !important;
  }
  #game.active .my-hand .card,
  #game.active .my-hand .card.playable {
    overflow: hidden !important;
    background: none !important;
    outline: none !important;
    box-shadow: none !important;
    filter: none !important;
  }
  #game.active .my-hand .card.playable .card-face {
    box-shadow: none !important;
    outline: 2px solid rgba(255, 226, 150, .9) !important;
    outline-offset: -2px !important;
    animation: none !important;
  }


  .board {
    justify-content: flex-start !important;
    align-items: center !important;
    padding-left: 3% !important;
    padding-right: 6% !important;
  }
  .slot.empty {
    visibility: hidden !important;
    flex: 0 0 var(--slot-w) !important;
    width: var(--slot-w) !important;
    min-width: var(--slot-w) !important;
    max-width: var(--slot-w) !important;
    margin: 0 !important;
  }
  .card.playable .card-face,
  #game.active .my-hand .card.playable .card-face,
  .minion.playable .card-face {
    outline: none !important;
    box-shadow: none !important;
    animation: none !important;
    filter: none !important;
  }
  .play-glow {
    display: none;
    position: absolute;
    left: 0; top: 0; right: 0; bottom: 0;
    box-sizing: border-box;
    border: 2px solid rgba(255, 226, 148, .95);
    border-radius: 10px;
    pointer-events: none;
    z-index: 4;
    box-shadow: none;
    margin: 0;
    padding: 0;
  }
  .card.playable > .play-glow,
  .minion.playable > .play-glow {
    display: block;
  }
  .card, .minion { position: relative; }
  #game.active .my-hand .card { overflow: hidden !important; }


  .board {
    padding-left: 18% !important;
    padding-right: 5% !important;
    justify-content: flex-start !important;
  }
  .play-glow { display: none !important; }
  .card.playable::after,
  #game.active .my-hand .card.playable::after {
    content: none !important;
    display: none !important;
  }
  #game.active .my-hand .card.playable,
  #game.active .my-hand .card.playable .card-face {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    outline: none !important;
    box-shadow: none !important;
    filter: none !important;
    animation: none !important;
  }
  .corner-soul { display: none !important; }
  .hud-hero .hero-hp {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    min-width: 26px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #8b1c1c;
    color: #fff;
    font-weight: 900;
    font-size: 12px;
    z-index: 3;
  }
  .hud-hero .hero-soul {
    display: block !important;
    position: absolute;
    left: 50%;
    bottom: 2px;
    transform: translateX(-50%);
    min-width: 28px;
    padding: 1px 6px;
    border-radius: 999px;
    background: #1a4e8a;
    color: #dcefff;
    font-weight: 800;
    font-size: 11px;
    z-index: 3;
    white-space: nowrap;
  }


  .col-main {
    grid-template-rows: 11% 35% 34% 18% 2% !important;
  }
  .board {
    justify-content: flex-start !important;
    padding-left: 9% !important;
    padding-right: 8% !important;
    box-sizing: border-box !important;
  }
  .board.opp {
    align-items: flex-end !important;
    padding-top: 0 !important;
    padding-bottom: 6px !important;
  }
  #myBoard {
    align-items: flex-start !important;
    padding-top: 6px !important;
    padding-bottom: 0 !important;
  }
  .board {
    --slot-h: clamp(140px, 22cqh, 188px) !important;
    --slot-w: calc(var(--slot-h) * 0.66) !important;
  }



/* ===== P0 overrides (last wins) ===== */
.board {
  justify-content: flex-start !important;
  padding-left: 10% !important;
  padding-right: 6% !important;
}
.slot.empty {
  visibility: hidden !important;
  flex: 0 0 var(--slot-w) !important;
  width: var(--slot-w) !important;
  min-width: var(--slot-w) !important;
  max-width: var(--slot-w) !important;
  margin: 0 !important;
  padding: 0 !important;
}
#dropGlow { display: none; }
#dropGlow.on { display: block !important; }

.play-glow {
  display: none;
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  border: 2px solid rgba(255, 226, 148, .95);
  border-radius: 10px;
  pointer-events: none;
  z-index: 5;
  margin: 0;
  padding: 0;
  box-shadow: none;
}
.card.playable > .play-glow { display: block !important; }
.card.playable { position: relative; overflow: hidden; }
.card.playable .card-face {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.minion.can-target,
.hero-slot.can-target,
.hero-portrait.can-target {
  outline: 2px solid #ff6b4a !important;
  outline-offset: 2px !important;
  cursor: pointer !important;
}

@media (max-width: 720px) {
  .side { display: flex !important; flex-direction: column; }
}


/* ===== SIZE restore (hand + board minions) ===== */
#game.active {
  --hand-h: 32%;
  --card-w: calc(36cqh * 0.66);
  overflow: visible;
}
#game.active .playfield,
#game.active .col-main {
  overflow: visible;
}
.col-main {
  grid-template-rows: 9% 31% 31% 27% 2% !important;
}
.board {
  --slot-h: clamp(168px, 26cqh, 228px) !important;
  --slot-w: calc(var(--slot-h) * 2 / 3) !important;
  justify-content: flex-start !important;
  overflow: visible !important;
}
.slot, .slot .minion, .minion {
  width: var(--slot-w) !important;
  height: var(--slot-h) !important;
  flex: 0 0 var(--slot-w) !important;
  max-width: var(--slot-w) !important;
}
.slot.empty {
  visibility: hidden !important;
  width: var(--slot-w) !important;
  min-width: var(--slot-w) !important;
  flex: 0 0 var(--slot-w) !important;
}
#game.active .my-hand {
  overflow: visible !important;
  height: 100% !important;
  align-items: flex-end !important;
}
#game.active .my-hand .card {
  height: min(94%, 38cqh) !important;
  width: calc(min(94%, 38cqh) * 0.66) !important;
  max-height: none !important;
  overflow: visible !important;
}
#game.active .my-hand .card:hover {
  transform: translateY(calc(var(--fan-y, 0px) - var(--hand-drag-hover-lift, 28px))) rotate(var(--fan-r, 0deg)) scale(1.10) !important;
  z-index: 40 !important;
}
.hud-hero .hero-slot {
  width: clamp(62px, 13cqh, 86px) !important;
  height: clamp(93px, 19.5cqh, 129px) !important;
  min-width: 0 !important;
  max-width: none !important;
}


/* ===== spell showcase + canvas ===== */
#spellFx { z-index: 85; }
#spellFx .fx-card {
  position: absolute; left: 50%; top: 14%;
  width: min(240px, 32vh);
  transform: translate(-50%, 0) scale(.82);
  opacity: 0;
  transition: transform .32s cubic-bezier(.2,1.2,.3,1), opacity .28s ease;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,.55));
  z-index: 3;
}
#spellFx .fx-card.in { opacity: 1; transform: translate(-50%, 0) scale(1); }
#spellFx .fx-card.out { opacity: 0; transform: translate(-50%, -16px) scale(.9); }
#spellFx .fx-card img { width: 100%; height: auto; display: block; }
#spellFx .fx-name { display: block !important; top: 8% !important; font-size: 22px !important; }
#fxCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 2; pointer-events: none;
}
.cast-ring {
  position: absolute; left: 50%; top: 48%; width: 220px; height: 220px;
  margin: -110px 0 0 -110px; border-radius: 50%;
  border: 3px solid #ffe08a;
  box-shadow: 0 0 40px #ffe08a88, inset 0 0 30px #fff4;
  animation: flashPop 1.1s ease-out forwards;
}
.fx-spark {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  animation: sparkOut .5s ease-out forwards;
}
.fx-spark.fx-fire { background: #ff9a2a; }
.fx-spark.fx-water { background: #5ec8ff; }
.fx-spark.fx-wind { background: #9ee8d0; }
.fx-spark.fx-earth { background: #b8864a; }
.fx-spark.fx-light { background: #ffe08a; }
.fx-spark.fx-dark { background: #7a3ab8; }
#spellFx[data-elem="fire"] .fx-veil { background: radial-gradient(ellipse at 50% 50%, rgba(90,20,0,.2), rgba(8,4,2,.55)); }
#spellFx[data-elem="water"] .fx-veil { background: radial-gradient(ellipse at 50% 50%, rgba(10,40,80,.2), rgba(4,8,20,.55)); }
#spellFx[data-elem="dark"] .fx-veil { background: radial-gradient(ellipse at 50% 50%, rgba(40,10,60,.25), rgba(6,2,16,.6)); }
#spellFx[data-elem="light"] .fx-veil { background: radial-gradient(ellipse at 50% 50%, rgba(80,60,10,.18), rgba(12,8,4,.5)); }


/* ===== frame: no double border ===== */
.card, .minion, .card.playable {
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  border: none !important;
}
.card-face, .minion .card-face, #game.active .my-hand .card .card-face {
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  border: none !important;
  object-fit: contain !important;
  border-radius: 0 !important;
}


/* ===== left board decks (v0.195) ===== */
.board-deck .deck-pile {
  width: min(78px, 100%);
}
.board-deck .pile-stack {
  width: min(72px, 96%);
  height: min(104px, 18cqh);
  margin: 0 auto;
}
#oppDeck .pile-count,
#myDeck .pile-count {
  margin-top: 2px;
}

/* ===== hero + deck stack + draw ===== */
.side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.deck-pile {
  position: relative;
  width: 78px;
  text-align: center;
}
.pile-stack {
  position: relative;
  width: 72px;
  height: 104px;
}
.pile-layer {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 2px 0 #1a1208, 0 4px 8px rgba(0,0,0,.4);
  transform: translate(calc(var(--i) * 1.6px), calc(var(--i) * -2.2px)) rotate(calc(var(--i) * -1.4deg));
  border: 1px solid rgba(196,160,80,.45);
}
.pile-count {
  margin-top: 4px;
  font-weight: 800;
  color: #ffe7a8;
  font-size: 13px;
  text-shadow: 0 1px 3px #000;
}
.hud-hero .hero-slot,
.hud-hero .hero-portrait {
  width: clamp(64px, 13cqh, 88px) !important;
  height: clamp(96px, 19.5cqh, 132px) !important;
  min-width: 0 !important;
  max-width: none !important;
  border-radius: 14px 14px 18px 18px !important;
  border: 3px solid #d4b15a !important;
  box-shadow:
    0 0 0 2px #3a280c,
    0 0 0 4px rgba(196,160,80,.55),
    0 8px 16px rgba(0,0,0,.45) !important;
  background: radial-gradient(circle at 50% 30%, #3a2a14, #120c06) !important;
  overflow: hidden;
}
.hud-hero .hero-hp {
  bottom: 22px !important;
  background: #8b1c1c !important;
}
.hud-hero .hero-soul {
  display: block !important;
  bottom: 4px !important;
  background: #1a4e8a !important;
}
.draw-ghost img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  filter: drop-shadow(0 12px 16px rgba(0,0,0,.5));
}


/* ===== settings: resolution + fullscreen ===== */
.settings-box { width: min(480px, 94vw); }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0;
  color: #f3e2b0;
  font-size: 16px;
  font-weight: 700;
}
.settings-select {
  flex: 1;
  max-width: 260px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 2px solid #6a5228;
  background: #120c08;
  color: #ffe7a8;
  font: inherit;
  font-size: 15px;
}
.settings-check {
  justify-content: flex-start;
  font-weight: 700;
  cursor: pointer;
}
.settings-check input {
  width: 18px;
  height: 18px;
  accent-color: #e4c36a;
}


/* ===== Electron desktop: window size == stage ===== */
html.is-desktop, html.is-desktop body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}
/* v0.327: desktop stage is aspect-fit (16:9) and centered by settings.js — fullscreen on another ratio letterboxes */
#app.desktop-fill {
  position: absolute !important;
  transform: none !important;
  box-shadow: none !important;
}


/* art: never stretch — aspect ratio preserved (contain/cover only) */
.card-face, .minion .card-face, #game.active .my-hand .card .card-face,
.drag-ghost img, .lore-box .lore-card img, .pool-item img {
  object-fit: contain !important;
  object-position: center center !important;
}


/* FACE PENDING — no bare art flash */
.card-face.face-pending {
  opacity: 0;
  background: #1a1008 !important;
}
.card-face.face-ready {
  opacity: 1;
  transition: opacity .14s ease;
}
.pool-item .card,
.minion {
  background: #1a1008;
}


/* ===== P0 FIX 2026-09-21: board size + playable border 1:1 ===== */
/* Board slots: px from JS --slot-h/--slot-w; CSS fallbacks if JS late */
#game.active .board {
  --slot-h: 168px;
  --slot-w: 112px;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 4px 8% !important;
  margin: 0 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
  min-height: 0 !important;
  height: 100% !important;
}
#game.active .board > .slot,
#game.active .board > .slot.filled,
#game.active .board > .slot.empty {
  flex: 0 0 var(--slot-w) !important;
  width: var(--slot-w) !important;
  min-width: var(--slot-w) !important;
  max-width: var(--slot-w) !important;
  height: var(--slot-h) !important;
  min-height: var(--slot-h) !important;
  max-height: var(--slot-h) !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  position: relative !important;
  overflow: visible !important;
  transform: none !important;
}
#game.active .board > .slot.empty {
  visibility: hidden !important;
  pointer-events: none !important;
}
#game.active .board .minion,
#game.active .board .slot .minion {
  flex: none !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  overflow: hidden !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  border: none !important;
}
#game.active .board .minion .card-face {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
  border-radius: 10px !important;
}

/* Hand: box is exact 2:3; face fills box (cover) so glow == card */
#game.active .my-hand .card {
  height: min(92%, 36cqh) !important;
  width: auto !important;
  aspect-ratio: 2 / 3 !important;
  max-width: none !important;
  max-height: none !important;
  padding: 0 !important;
  margin-left: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  border: none !important;
  position: relative !important;
}
#game.active .my-hand .card:first-child { margin-left: 0 !important; }
#game.active .my-hand .card .card-face {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
  box-shadow: none !important;
  outline: none !important;
  border-radius: 10px !important;
}

/* Playable border: ONLY play-glow, tight to card box (= face) */
.card.playable::after,
.minion.playable::after,
#game.active .my-hand .card.playable::after {
  content: none !important;
  display: none !important;
}
#game.active .my-hand .card.playable .card-face {
  box-shadow: none !important;
  outline: none !important;
}
.play-glow {
  display: none !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  right: auto !important;
  bottom: auto !important;
  inset: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  border: 2px solid rgba(255, 230, 150, 0.95) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  pointer-events: none !important;
  z-index: 6 !important;
}
.card.playable > .play-glow {
  display: block !important;
}
.card.playable {
  overflow: hidden !important;
}

/* Keep non-board/hand art rule from stretching elsewhere, but hand+board use cover above */


/* ===== P0 HARD: minion fills slot; never re-resolve --slot-w % ===== */
#game.active .board {
  /* --slot-w must be length only (px or calc from --slot-h). Never use 100% here. */
  --slot-w: calc(var(--slot-h) * 2 / 3);
}
#game.active .board > .slot {
  width: var(--slot-w) !important;
  min-width: var(--slot-w) !important;
  max-width: var(--slot-w) !important;
  flex: 0 0 var(--slot-w) !important;
  height: var(--slot-h) !important;
}
#game.active .board > .slot > .minion,
#game.active .board .slot .minion {
  /* Fill the slot box — do NOT set width to var(--slot-w) (100% inside would shrink) */
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  flex: none !important;
}


/* ===== P0 2026-09-21c: FULL board art (never shrink for HUD) ===== */
/*
  Board image fills the whole #game stage (contain).
  HUD overlays on the right — it must NOT take a grid column that shrinks the board.
*/
#app, #game, #game.active {
  overflow: hidden !important;
}
#game.active {
  position: relative !important;
}
#game.active > #boardBgLayer {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  z-index: 0 !important;
  pointer-events: none !important;
  /* v0.328: 보드 배경 1.15배 확대 (사용자 변경안) · 가로 중앙 유지 · 틀 위쪽이 화면 위 가까이.
     layoutHudGems/layoutEndBtn/layoutBoardDecks는 getBoundingClientRect(변환 포함)로 따라감 */
  transform: translateY(calc(var(--board-zoom-dy, 0.0075) * 100cqh)) scale(var(--board-zoom, 1.15)) !important;
  transform-origin: 50% 50% !important;
}
#game.active .col-main > #boardBgLayer {
  display: none !important;
}

/* v0.327 16:9 stage: playfield = centered 4:3 core (board art's original 4:3 region, x 480~3360 of 3840).
   All board/HUD layout stays relative to this core; the widened side wood is background only.
   Own size container so cqh/cqi inside keep the old 4:3 proportions. */
#game.active > .playfield {
  position: relative !important;
  z-index: 2 !important;
  display: block !important;
  width: min(100%, calc(100cqh * 4 / 3)) !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 auto !important;
  grid-template-columns: none !important;
  container-type: size;
  container-name: core;
}
#game.active .col-main {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: grid !important;
  /* Align to parchment: center line ~ mid stage */
  /* rows: layoutBoardAlign */
  grid-template-columns: 1fr !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  z-index: 1 !important;
}
#game.active .col-hud {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: min(110px, 12cqi) !important;
  z-index: 5 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: stretch !important;
  padding: 10px 10px 14px 6px !important;
  box-sizing: border-box !important;
  pointer-events: auto !important;
  background: transparent !important;
}

/* Units start inside parchment (left-fill); width/centering locked at v0.199 end block */
#game.active .board,
#game.active .board.opp,
#game.active #myBoard {
  justify-content: flex-start !important;
  box-sizing: border-box !important;
}
#game.active .board.opp {
  align-items: flex-end !important;
}
#game.active #myBoard {
  align-items: flex-start !important;
}

/* Hand lower in its row */
#game.active .my-hand {
  overflow: hidden !important;
  height: 100% !important;
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 16px 10% 4px !important;
  box-sizing: border-box !important;
}
#game.active .my-hand .card,
#game.active .my-hand .card.playable {
  height: calc(100% - 12px) !important;
  max-height: calc(100% - 12px) !important;
  width: auto !important;
  aspect-ratio: 2 / 3 !important;
  margin-left: 0 !important;
  overflow: hidden !important;
  flex: 0 0 auto !important;
}
#game.active .my-hand .card:first-child { margin-left: 0 !important; }

#game.active .opp-hand {
  overflow: hidden !important;
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 4px 14% 0 !important;
}
#game.active .opp-hand .back {
  height: min(68%, 6.5cqh) !important;
  width: auto !important;
  aspect-ratio: 2 / 3 !important;
  margin-left: -10px !important;
  flex: 0 0 auto !important;
}
#game.active .opp-hand .back:first-child { margin-left: 0 !important; }

#game.active .board > .slot {
  width: var(--slot-w) !important;
  height: var(--slot-h) !important;
  flex: 0 0 var(--slot-w) !important;
  max-width: var(--slot-w) !important;
}
#game.active .board > .slot > .minion,
#game.active .board .slot .minion {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  flex: none !important;
}
#game.active .board {
  --slot-w: calc(var(--slot-h) * 2 / 3);
}
.bgm-btn {
  top: 12px !important;
  right: 12px !important;
  z-index: 6 !important;
}

/* ===== P0 hand may overhang board bottom (HS) ===== */
#game.active .col-main {
  /* grid-template-rows set by layoutBoardAlign (parchment center line) */
}
#game.active .my-hand {
  /* Hearthstone-like: hand can hang slightly past board bottom edge */
  overflow: visible !important;
  z-index: 8 !important; /* hand layer; card z owned by fan */
}
#game.active .col-main {
  overflow: hidden !important; /* stage still clips; hand can sit on board edge */
}

/* ===== P0 gap from parchment center line ===== */
/* Center line stays; nudge rows away from it slightly */
#game.active .board.opp,
#game.active #oppBoard {
  align-items: flex-end !important;
  /* v0.234: equal field frames — matched vertical inset */
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  box-sizing: border-box !important;
}
#game.active #myBoard {
  align-items: flex-start !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  box-sizing: border-box !important;
}

/* ===== P0 hand lower (may clip HS-style) ===== */
#game.active .my-hand {
  align-items: flex-end !important;
  justify-content: center !important;
  /* v0.202: no negative pull onto board */
  padding: 4px 8% 10px !important;
  margin-bottom: 0 !important;
  overflow: hidden !important;
  z-index: 6 !important;
  box-sizing: border-box !important;
}
#game.active .my-hand .card,
#game.active .my-hand .card.playable {
  height: min(100%, 26cqh) !important;
  max-height: 26cqh !important;
  transform-origin: bottom center !important;
}
#game.active .col-main {
  /* allow hand to paint past bottom of main into stage edge */
  overflow: visible !important;
}
#game.active {
  overflow: hidden !important; /* stage still clips overall */
}

/* ===== P0 hand even lower ===== */
/* LOCK: do not touch .board / layoutBoardAlign board rows — board frozen */
/* Desktop numbers restored in v0.143 end block; mid kept as historical P0 */
#game.active .my-hand {
  padding: 6px 8% 12px !important;
  margin-bottom: 0 !important;
  overflow: hidden !important;
  z-index: 8 !important;
}
#game.active .my-hand .card,
#game.active .my-hand .card.playable {
  height: min(100%, 20cqh) !important;
  max-height: 20cqh !important;
  width: auto !important;
}

/* ===== P0 hand fan pack inside frame ===== */
/* Fan X/Y/rotate owned by layoutHandFan (width-proportional). Do not use fixed -72px — stacks on mobile. */
#game.active .my-hand {
  justify-content: center !important;
  gap: 0 !important;
}
#game.active .my-hand .card,
#game.active .my-hand .card.playable {
  margin-left: 0 !important;
  flex: 0 0 auto !important;
}
#game.active .my-hand .card:first-child,
#game.active .my-hand .card.playable:first-child {
  margin-left: 0 !important;
}
#game.active .my-hand .card:hover {
  transform: translateY(calc(var(--fan-y, 0px) - var(--hand-drag-hover-lift, 28px))) rotate(var(--fan-r, 0deg)) scale(1.10) !important;
  z-index: 40 !important;
}


/* v0.377: 아이템 장착 호버 연출(equip-glow 반짝임 루프) 삭제 — 아이템 드래그 대상은 스펠 타겟 글로우(spell-glow)로 표시 */

/* ===== P0 title menu layout ===== */
#title.screen.active {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  padding: 18px 28px 16px !important;
  box-sizing: border-box !important;
  overflow: auto !important;
  height: 100% !important;
}
#title .title {
  font-size: clamp(28px, 4.2cqw, 52px) !important;
  letter-spacing: .08em !important;
  margin: 4px 0 6px !important;
  text-align: center;
  flex-shrink: 0;
  line-height: 1.15 !important;
}
#title .subtitle {
  display: none !important;
}
#title .title-body {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 300px);
  gap: 18px 22px;
  align-items: start;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}
#title .hero-picks {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-bottom: 0 !important;
  width: 100%;
}
#title .hero-card .art {
  min-height: 96px !important;
}
#title .title-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  padding-top: 4px;
}
#title .title-menu .menu-btn {
  min-width: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  font-size: 15px !important;
}
#title .title-note {
  display: none !important;
}
@media (max-width: 820px) {
  #title .title-body { grid-template-columns: 1fr; }
}


/* ===== P0 build version badge (below quit, menu bottom-right) ===== */
#title .title-menu .build-ver,
#buildVer.build-ver,
.build-ver {
  position: static !important;
  top: auto !important;
  right: auto !important;
  z-index: auto !important;
  align-self: flex-end;
  margin-top: 4px;
  width: fit-content;
  box-sizing: border-box;
  color: #ffe7a8 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: .08em !important;
  opacity: 1 !important;
  pointer-events: none !important;
  text-shadow: 0 2px 6px #000 !important;
  background: rgba(0,0,0,.45);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(228,195,106,.45);
}

/* ===== spell asset VFX ===== */
#spellFx .fx-stage .fx-asset {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: min(52vmin, 420px);
  height: auto;
  pointer-events: none;
}
#spellFx .fx-stage .fx-strip {
  position: absolute !important;
  left: 50% !important;
  top: 48% !important;
  width: min(72vmin, 560px) !important;
  height: min(72vmin, 560px) !important;
  transform: translate(-50%, -50%) !important;
  overflow: hidden !important;
  z-index: 12 !important;
  background: transparent !important;
  filter: drop-shadow(0 0 18px rgba(255,100,20,.55)) !important;
}
#spellFx .fx-stage .fx-strip img {
  height: 100%;
  width: auto;
  max-width: none;
  display: block;
  /* JS playStrip drives transform — CSS steps() double-anim caused flicker */
  animation: none !important;
}


/* ===== P0 spellFx always on top ===== */
#spellFx {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  pointer-events: none !important;
  overflow: visible !important;
}
#spellFx.on { display: block !important; visibility: visible !important; opacity: 1 !important; }
#spellFx .fx-veil {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  background: transparent !important;
}
#spellFx.pack-play .fx-veil {
  background: transparent !important;
}
#spellFx .fx-stage {
  position: absolute !important;
  inset: 0 !important;
  z-index: 10 !important;
}
#spellFx .fx-name {
  display: block !important;
  position: absolute !important;
  left: 50% !important;
  top: 10% !important;
  transform: translateX(-50%) !important;
  z-index: 20 !important;
  color: #ffe7a8 !important;
  font-size: 28px !important;
  font-weight: 900 !important;
  text-shadow: 0 2px 12px #000 !important;
}
#spellFx .fx-stage .fx-asset {
  position: absolute !important;
  left: 50% !important;
  top: 48% !important;
  transform: translate(-50%, -50%) !important;
  width: min(72vmin, 560px) !important;
  height: auto !important;
  z-index: 12 !important;
  filter: drop-shadow(0 0 24px rgba(255,120,40,.7)) !important;
}
#spellFx .fx-stage .fx-strip {
  position: absolute !important;
  left: 50% !important;
  top: 48% !important;
  width: min(72vmin, 560px) !important;
  height: min(72vmin, 560px) !important;
  transform: translate(-50%, -50%) !important;
  overflow: hidden !important;
  z-index: 12 !important;
  filter: drop-shadow(0 0 24px rgba(255,120,40,.7)) !important;
}
#spellFx .fx-stage .fx-strip img {
  height: 100% !important;
  width: auto !important;
  max-width: none !important;
  display: block !important;
  animation: none !important;
}

/* ===== P0 spell target glow ===== */
#game.active .minion.spell-glow,
#game.active .hero-slot.spell-glow,
#game.active .hero-portrait.spell-glow {
  outline: 3px solid #ffe08a !important;
  /* hug metal silhouette (compose crops ~8% transparent pad into face JPEG) */
  outline-offset: 0px !important;
  box-shadow: 0 0 18px rgba(255, 200, 80, .85), 0 0 36px rgba(255, 140, 40, .45) !important;
  filter: brightness(1.12) saturate(1.15);
}


/* ===== v0.021: spellFx veil never tints; strip viewport clean ===== */
#spellFx .fx-veil,
#spellFx.pack-play .fx-veil,
#spellFx[data-elem] .fx-veil,
#spellFx[data-elem="fire"] .fx-veil,
#spellFx[data-elem="water"] .fx-veil,
#spellFx[data-elem="wind"] .fx-veil,
#spellFx[data-elem="earth"] .fx-veil,
#spellFx[data-elem="light"] .fx-veil,
#spellFx[data-elem="dark"] .fx-veil {
  background: transparent !important;
  opacity: 0 !important;
}
#spellFx .fx-stage .fx-strip {
  background: transparent !important;
  overflow: hidden !important;
  /* one-frame square viewport */
  aspect-ratio: 1 / 1 !important;
}


/* P0 visible cssFallback */
#spellFx .fx-stage .fx-spark,
#spellFx .fx-stage .shockwave,
#spellFx .fx-stage .shock,
#spellFx .fx-stage .aura {
  display: block !important;
  opacity: 1 !important;
  z-index: 15 !important;
}
#spellFx .fx-stage .fx-spark.fx-fire {
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, #fff6c8 0%, #ff8a20 45%, #ff3a00 75%, transparent 100%) !important;
  box-shadow: 0 0 16px #ff6a18 !important;
}
#spellFx .fx-name {
  opacity: 1 !important;
}

/* P0 soft-edge VFX window — no hard rectangle cut */
#spellFx .fx-stage .fx-strip {
  position: absolute !important;
  left: 50% !important;
  top: 48% !important;
  width: min(78vmin, 600px) !important;
  height: min(78vmin, 600px) !important;
  transform: translate(-50%, -50%) !important;
  overflow: hidden !important;
  z-index: 12 !important;
  background: transparent !important;
  filter: drop-shadow(0 0 18px rgba(255,100,20,.45)) !important;
  opacity: 0;
  transition: opacity .28s ease;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 16%, #000 84%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 16%, #000 84%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-composite: intersect;
}
#spellFx .fx-stage .fx-strip.show { opacity: 1 !important; }
#spellFx .fx-stage .fx-strip.hide { opacity: 0 !important; }
#spellFx .fx-stage .fx-asset {
  position: absolute !important;
  left: 50% !important;
  top: 48% !important;
  transform: translate(-50%, -50%) !important;
  width: min(78vmin, 600px) !important;
  height: auto !important;
  z-index: 12 !important;
  filter: drop-shadow(0 0 18px rgba(255,120,40,.5)) !important;
  opacity: 0;
  transition: opacity .28s ease;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 16%, #000 84%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 16%, #000 84%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-composite: intersect;
}
#spellFx .fx-stage .fx-asset.show { opacity: 1 !important; }
#spellFx .fx-stage .fx-asset.hide { opacity: 0 !important; }


/* ===== P0 playable yellow burn glow (Hearthstone-like) ===== */
@keyframes playGlowBurn {
  0%, 100% {
    opacity: .72;
    filter: brightness(.92) saturate(1.05);
    box-shadow:
      0 0 0 2px rgba(255, 232, 150, .95),
      0 0 8px 2px rgba(255, 200, 70, .75),
      0 0 18px 6px rgba(255, 170, 40, .45),
      0 0 32px 10px rgba(255, 140, 20, .22),
      inset 0 0 10px rgba(255, 245, 200, .28);
  }
  35% {
    opacity: 1;
    filter: brightness(1.18) saturate(1.2);
    box-shadow:
      0 0 0 2px rgba(255, 245, 190, 1),
      0 0 12px 3px rgba(255, 210, 80, .95),
      0 0 26px 9px rgba(255, 180, 40, .6),
      0 0 40px 14px rgba(255, 150, 20, .3),
      inset 0 0 14px rgba(255, 250, 210, .4);
  }
  65% {
    opacity: .88;
    filter: brightness(1.05) saturate(1.1);
    box-shadow:
      0 0 0 2px rgba(255, 236, 160, .98),
      0 0 10px 2px rgba(255, 195, 60, .85),
      0 0 22px 7px rgba(255, 165, 30, .5),
      0 0 34px 11px rgba(255, 140, 15, .25),
      inset 0 0 12px rgba(255, 245, 200, .32);
  }
}

#game.active .my-hand .card.playable {
  overflow: visible !important;
  /* z-index owned by layoutHandFan (center-peak); do not flatten all playables */
  z-index: auto;
}
#game.active .my-hand .card.playable .card-face {
  position: relative !important;
  z-index: 2 !important;
  outline: none !important;
  /* soft face rim only — main burn is .play-glow */
  box-shadow: none !important;
  filter: none !important;
  animation: none !important;
}
#game.active .my-hand .card.playable > .play-glow {
  display: block !important;
  position: absolute !important;
  /* hug card-face bounds (same box as face), tiny bleed for flame bloom */
  inset: -2px !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 12px 12px 20px 20px !important;
  box-sizing: border-box !important;
  pointer-events: none !important;
  z-index: 3 !important;
  background: transparent !important;
  animation: playGlowBurn 1.05s ease-in-out infinite !important;
}
/* kill old flat outline / disabled glow overrides */
.play-glow { display: none; }
.card.playable > .play-glow { display: block !important; }
.card.playable::after,
#game.active .my-hand .card.playable::after {
  content: none !important;
  display: none !important;
}


/* ===== v0.026 Hearthstone-style board insert / reorder preview ===== */
/* Locked layout (padding-left 17%/right 12%, hand -72px, layoutBoardAlign) untouched */
#game.active .board.is-inserting > .slot.filled {
  transition: transform 0.12s ease !important;
  will-change: transform;
}
#game.active .board.is-inserting > .slot.shift-right {
  /* transform set inline with !important from JS */
}
#game.active .board.is-inserting > .slot.board-drag-source,
#game.active .board > .slot.board-drag-source {
  opacity: 0.3 !important;
}
#game.active .board.is-inserting > .slot.board-drag-source .minion,
#game.active .board > .slot.board-drag-source .minion {
  opacity: 0.35 !important;
}
#game.active .board .minion.dragging {
  opacity: 0.25 !important;
  cursor: grabbing !important;
}
#game.active #myBoard .minion {
  cursor: grab;
}
#game.active #oppBoard .minion {
  cursor: default;
}


/* ===== v0.027 P0 FINAL — Chrome/Pages battle acceptance ===== */

/* Bug5: force yellow burn glow visible (kill every prior display:none !important) */
@keyframes playGlowBurn {
  0%, 100% {
    opacity: .72;
    filter: brightness(.92) saturate(1.05);
    box-shadow:
      0 0 0 2px rgba(255, 232, 150, .95),
      0 0 8px 2px rgba(255, 200, 70, .75),
      0 0 18px 6px rgba(255, 170, 40, .45),
      0 0 32px 10px rgba(255, 140, 20, .22),
      inset 0 0 10px rgba(255, 245, 200, .28);
  }
  40% {
    opacity: 1;
    filter: brightness(1.2) saturate(1.25);
    box-shadow:
      0 0 0 2px rgba(255, 245, 190, 1),
      0 0 14px 4px rgba(255, 210, 80, .95),
      0 0 28px 10px rgba(255, 180, 40, .65),
      0 0 44px 16px rgba(255, 150, 20, .32),
      inset 0 0 14px rgba(255, 250, 210, .42);
  }
}
#game.active .my-hand .card.playable {
  overflow: visible !important;
  z-index: auto !important; /* fan owns stacking */
}
#game.active .my-hand .card.playable > .play-glow {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: absolute !important;
  inset: -3px !important;
  width: auto !important;
  height: auto !important;
  border: none !important;
  border-radius: 12px 12px 20px 20px !important;
  pointer-events: none !important;
  z-index: 3 !important;
  background: transparent !important;
  animation: playGlowBurn 1.05s ease-in-out infinite !important;
}
#game.active .my-hand { overflow: visible !important; }

/* Bug3: never stretch board chrome with dropGlow / drop-ready */
#dropGlow,
#dropGlow.on,
#game.active #dropGlow {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  border: none !important;
  box-shadow: none !important;
}
#game.active.drop-ready .board,
#game.active.drop-ready .board.opp,
#game.active.drop-ready #oppBoard {
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
  transform: none !important;
  margin-top: 0 !important;
  padding-top: 0 !important; /* locked layout — no opp vertical jump */
}
#game.active.drop-ready #myBoard,
#game.active #myBoard.drop-glow {
  /* thinner field frame stroke (v0.222) — never full-stage stretch */
  box-shadow: inset 0 0 0 1px rgba(255, 224, 140, .48) !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
}
#game.active .board.is-inserting {
  /* transforms on slots only — board box itself stays put */
  box-shadow: none !important;
  border: none !important;
}
#game.active #oppBoard,
#game.active .board.opp {
  transition: none !important;
}

/* Bug4: Chrome soft-edge — dual mask-composite can blank strips in Chrome.
   Use a single radial mask (no composite). Force .show opacity. */
#spellFx {
  display: none;
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  pointer-events: none !important;
}
#spellFx.on { display: block !important; }
#spellFx .fx-card {
  position: absolute !important;
  left: 50% !important;
  top: 18% !important;
  width: min(260px, 34vh) !important;
  transform: translate(-50%, 0) scale(.86) !important;
  opacity: 0 !important;
  z-index: 20 !important;
  transition: transform .28s cubic-bezier(.2,1.2,.3,1), opacity .24s ease !important;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,.55)) !important;
}
#spellFx .fx-card.in {
  opacity: 1 !important;
  transform: translate(-50%, 0) scale(1) !important;
}
#spellFx .fx-card.out {
  opacity: 0 !important;
  transform: translate(-50%, -12px) scale(.9) !important;
}
#spellFx .fx-card img { width: 100% !important; height: auto !important; display: block !important; }
#spellFx .fx-stage { position: absolute !important; inset: 0 !important; z-index: 10 !important; }
#spellFx .fx-stage .fx-strip,
#spellFx .fx-stage .fx-asset {
  position: absolute !important;
  left: 50% !important;
  top: 48% !important;
  width: min(78vmin, 600px) !important;
  height: min(78vmin, 600px) !important;
  transform: translate(-50%, -50%) !important;
  overflow: hidden !important;
  z-index: 12 !important;
  background: transparent !important;
  filter: drop-shadow(0 0 18px rgba(255,100,20,.55)) !important;
  opacity: 0;
  transition: opacity .28s ease;
  /* Chrome-safe single mask — NO mask-composite */
  -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 42%, rgba(0,0,0,.85) 62%, transparent 82%);
  mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 42%, rgba(0,0,0,.85) 62%, transparent 82%);
  -webkit-mask-composite: unset;
  mask-composite: unset;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
#spellFx .fx-stage .fx-strip.show,
#spellFx .fx-stage .fx-asset.show {
  opacity: 1 !important;
}
#spellFx .fx-stage .fx-strip.hide,
#spellFx .fx-stage .fx-asset.hide {
  opacity: 0 !important;
}
#spellFx .fx-stage .fx-strip img {
  height: 100% !important;
  width: auto !important;
  max-width: none !important;
  display: block !important;
  animation: none !important;
}

/* ===== v0.094: unit token banner 토큰; was v0.093 rarity keys ===== */
#spellFx.pack-play .fx-stage .fx-strip {
  width: min(36vmin, 280px) !important;
  height: min(36vmin, 280px) !important;
  max-width: min(36vmin, 280px) !important;
  max-height: min(36vmin, 280px) !important;
}

/* Bug2: peek must never outlive turn */
#cardPeek { pointer-events: none !important; }


/* ===== v0.027 P0+ LOUD playable burn (must win in Chrome) ===== */
#game.active .my-hand .card.playable {
  overflow: visible !important;
}
#game.active .my-hand .card.playable > .play-glow {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: absolute !important;
  inset: -4px !important;
  border-radius: 14px 14px 22px 22px !important;
  border: 3px solid rgba(255, 220, 90, 0.95) !important;
  background: transparent !important;
  pointer-events: none !important;
  z-index: 8 !important;
  box-shadow:
    0 0 0 2px rgba(255, 180, 40, 0.9),
    0 0 14px 4px rgba(255, 200, 60, 0.95),
    0 0 28px 10px rgba(255, 150, 20, 0.7),
    0 0 48px 16px rgba(255, 120, 0, 0.45),
    inset 0 0 16px rgba(255, 245, 180, 0.45) !important;
  animation: playGlowBurn 0.9s ease-in-out infinite !important;
  filter: brightness(1.15) saturate(1.3) !important;
}
#game.active .my-hand .card.playable .card-face {
  box-shadow: none !important;
  filter: none !important;
}


/* ===== FantasySoul (판타지소울) title brand (v0.155, renamed v0.329) ===== */
/* Emblem height = full wordmark+stand; bottom aligns with pedestal tip */
#title .title-brand {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  flex-shrink: 0;
  width: min(94%, 800px);
  margin: -6px auto 10px; /* nudge logo slightly up */
  min-height: 0;
  gap: 18px;
  z-index: 2;
}
#title .title-emblem {
  position: relative;
  z-index: 3;
  /* match wordmark block height so bottom reaches stand tip */
  height: min(22vh, 148px);
  width: auto;
  max-height: min(22vh, 148px);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  flex: 0 0 auto;
  margin: 0;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .5));
  pointer-events: none;
}
#title .title-wordmark {
  position: relative;
  z-index: 1;
  width: min(64vw, 480px);
  height: auto;
  max-height: min(22vh, 148px);
  object-fit: contain;
  object-position: left top;
  flex: 0 1 auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .4));
  pointer-events: none;
}
#title .subtitle,
#title .title-note {
  display: none !important;
}
@media (max-width: 640px) {
  #title .title-brand {
    width: min(96%, 560px);
    gap: 12px;
  }
  #title .title-emblem {
    height: min(18vh, 112px);
    max-height: min(18vh, 112px);
  }
  #title .title-wordmark {
    width: min(70vw, 340px);
    max-height: min(18vh, 112px);
  }
}

/* v0.331: new FantasySoul wordmark (same 2400×777 canvas, shorter word → wider transparent sides:
   left 256px / right 256px of 2400 vs old 62px). Size box to the image and pull the transparent
   sides in so the emblem–text gap stays ≈ old (~30px @148px) and the group stays centered. */
#title .title-wordmark {
  --wm-h: min(22vh, 148px);
  width: auto !important;
  height: var(--wm-h) !important;
  max-height: var(--wm-h) !important;
  margin-left: calc(var(--wm-h) * -0.25) !important;
  margin-right: calc(var(--wm-h) * -0.327) !important;
}
@media (max-width: 640px) {
  #title .title-wordmark { --wm-h: min(18vh, 112px); }
}

/* ===== P0 spell VFX size ~30% smaller (sharper look) ===== */
#spellFx .fx-stage .fx-strip,
#spellFx .fx-stage .fx-asset {
  width: min(55vmin, 420px) !important;
  height: min(55vmin, 420px) !important;
  max-width: min(55vmin, 420px) !important;
  max-height: min(55vmin, 420px) !important;
}
#spellFx .fx-stage .fx-asset {
  height: auto !important;
  max-height: min(55vmin, 420px) !important;
}


/* ===== Spell flight / target-anchored VFX (v0.081) ===== */
#spellFx .fx-stage .fx-flight {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: min(40vmin, 320px) !important;
  height: min(40vmin, 320px) !important;
  transform-origin: center center !important;
  pointer-events: none !important;
  z-index: 13 !important;
  will-change: transform;
  overflow: visible !important;
}
#spellFx .fx-stage .fx-flight .fx-strip {
  left: 50% !important;
  top: 50% !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  transform: translate(-50%, -50%) !important;
  filter: drop-shadow(0 0 14px rgba(255,100,20,.65)) !important;
}
#spellFx .fx-stage .fx-strip.fx-anchored {
  left: var(--fx-x, 50%) !important;
  top: var(--fx-y, 48%) !important;
  /* default target size; JS boxSize (e.g. combat 220) overrides via inline !important */
  width: min(42vmin, 320px) !important;
  height: min(42vmin, 320px) !important;
  max-width: min(42vmin, 320px) !important;
  max-height: min(42vmin, 320px) !important;
  transform: translate(-50%, -50%) !important;
}
/* pack-play half-size must not re-center anchored combat FX */
#spellFx.pack-play .fx-stage .fx-strip.fx-anchored {
  left: var(--fx-x, 50%) !important;
  top: var(--fx-y, 48%) !important;
  transform: translate(-50%, -50%) !important;
}
#spellFx .fx-stage .fx-strip img {
  animation: none !important;
}

/* ===== Battle history: top-left translucent layer (v0.138) ===== */
#game.active #log,
#game.active .log,
#game.active .col-main > .log {
  position: absolute !important;
  /* v0.328: 보드 배경 1.15배 — 금테 모서리 바깥(왼쪽 위 나무)으로, 잘리지 않게 top 6px */
  left: -8.7cqh !important;
  top: 6px !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: min(37.8%, 288px) !important;
  max-width: 42% !important;
  height: auto !important;
  max-height: 28% !important;
  overflow: hidden !important;
  z-index: 12 !important;
  pointer-events: none !important;
  text-align: left !important;
  padding: 8px 10px !important;
  margin: 0 !important;
  border-radius: 10px !important;
  background: rgba(12, 8, 4, 0.42) !important;
  box-shadow: none !important;
  border: 1px solid rgba(228, 195, 106, 0.22) !important;
  color: #f0e2c0 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  text-shadow: 0 1px 3px rgba(0,0,0,.85) !important;
  opacity: 1 !important;
}
#game.active #log > div,
#game.active .log > div {
  margin: 0 0 3px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  opacity: 0.95;
}
#game.active #log > div:nth-child(2) { opacity: 0.72; }
#game.active #log > div:nth-child(3) { opacity: 0.5; }
#game.active #log > div:nth-child(n+4) { opacity: 0.35; }

#game.active #hint,
#game.active .hint,
#game.active .col-main > .hint {
  position: absolute !important;
  left: -8.7cqh !important; /* v0.328: 로그 패널과 같이 금테 바깥 왼쪽 위 */
  top: auto !important;
  white-space: pre-line !important;
  /* sit just under log panel — JS sets --hint-top; fallback below */
  top: var(--hint-top, 118px) !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: min(37.8%, 288px) !important;
  height: auto !important;
  z-index: 12 !important;
  pointer-events: none !important;
  text-align: left !important;
  padding: 6px 10px !important;
  margin: 0 !important;
  border-radius: 8px !important;
  background: rgba(12, 8, 4, 0.56) !important; /* v0.243: +20% opacity */
  border: 1px solid rgba(228, 195, 106, 0.18) !important;
  color: #d8c8a4 !important;
  font-size: 11px !important;
  line-height: 1.3 !important;
  text-shadow: 0 1px 3px rgba(0,0,0,.85) !important;
  opacity: 1 !important;
  grid-area: unset !important;
}

/* ===== v0.143 hand: tablet safe base; desktop = exact pre-0.141 P0 ===== */
#game.active .my-hand {
  padding: 4px 5% 12px !important;
  margin-bottom: 0 !important;
  align-items: flex-end !important;
  justify-content: center !important;
  overflow: visible !important;
  gap: 0 !important;
}
#game.active .my-hand .card,
#game.active .my-hand .card.playable {
  margin-left: 0 !important; /* overlap set inline by layoutHandFan */
  height: min(90%, 22cqh) !important;
  max-height: min(220px, 22cqh) !important;
  width: auto !important;
  aspect-ratio: 2 / 3 !important;
  flex: 0 0 auto !important;
  transform-origin: bottom center !important;
}
#game.active .col-main {
  overflow: visible !important;
}

/* Desktop: exact P0 padding 60 / margin -96 / 20cqh (is-desktop OR wide viewport) */
html.is-desktop #game.active .my-hand,
#app.desktop-fill #game.active .my-hand {
  padding: 6px 8% 12px !important;
  margin-bottom: 0 !important;
  z-index: 8 !important;
}
html.is-desktop #game.active .my-hand .card,
html.is-desktop #game.active .my-hand .card.playable,
#app.desktop-fill #game.active .my-hand .card,
#app.desktop-fill #game.active .my-hand .card.playable {
  height: min(100%, 20cqh) !important;
  max-height: 20cqh !important;
}
@media (min-width: 1100px) {
  #game.active .my-hand {
    padding: 6px 8% 12px !important;
    margin-bottom: 0 !important;
    z-index: 8 !important;
  }
  #game.active .my-hand .card,
  #game.active .my-hand .card.playable {
    height: min(94%, 22cqh) !important;
    max-height: min(210px, 22cqh) !important;
    min-height: 150px !important;
  }
}
/* Tablet/narrow: force safe hand (wins over mid P0) */
@media (max-width: 1099px) {
  html:not(.is-desktop) #game.active .my-hand {
    padding: 4px 5% 12px !important;
    margin-bottom: 0 !important;
  }
  html:not(.is-desktop) #game.active .my-hand .card,
  html:not(.is-desktop) #game.active .my-hand .card.playable {
    height: min(90%, 22cqh) !important;
    max-height: min(220px, 22cqh) !important;
  }
}


/* ===== v0.158: board can-attack / selected glow (metal silhouette ≈ card box after pad crop) ===== */
#game.active .minion.can-attack {
  outline: 2px solid rgba(255, 226, 150, .95) !important;
  outline-offset: 0px !important;
  box-shadow:
    0 0 10px 2px rgba(255, 200, 70, .65),
    0 0 22px 6px rgba(255, 160, 40, .35) !important;
  filter: brightness(1.08) saturate(1.1);
}
#game.active .minion.selected {
  transform: translateY(-4px);
  outline: 3px solid rgba(255, 240, 180, 1) !important;
  outline-offset: 1px !important;
  box-shadow:
    0 0 14px 3px rgba(255, 220, 100, .85),
    0 0 28px 8px rgba(255, 180, 50, .45) !important;
  filter: brightness(1.14) saturate(1.15);
  z-index: 7;
}
#game.active .minion.can-target {
  outline: 2px solid #ff6b4a !important;
  outline-offset: 1px !important;
}

/* ===== v0.372: 스펠 대상 글로우 — 아군·적 모두, 훨씬 선명하게 (핸드 playable 글로우와 같은 금빛 맥동) =====
   원인: 전장 유닛은 `#game.active .board .slot .minion { outline/box-shadow:none!important; overflow:hidden!important }`
   때문에 기존 outline/box-shadow 글로우가 전부 지워지고 filter 만 남았는데, 공격 가능한 아군 유닛은
   뒤쪽 `.minion.can-attack` filter 가 spell-glow filter 를 덮어써 아군만 변화가 없었다.
   → 바깥 번짐은 filter 애니메이션(애니메이션은 일반 선언보다 우선), 테두리는 안쪽 ::after 링으로.
   .spell-valid / .can-target = 유효 대상 전체(은은), .spell-glow = 지금 가리키는 대상(강하게). */
#game.active .board .slot .minion.spell-valid,
#game.active .board .slot .minion.can-target,
#game.active .board .slot .minion.spell-glow {
  position: relative;
  z-index: 6;
}
#game.active .board .slot .minion.spell-valid::after,
#game.active .board .slot .minion.can-target::after,
#game.active .board .slot .minion.spell-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  pointer-events: none;
  z-index: 30;
}
#game.active .board .slot .minion.spell-valid,
#game.active .board .slot .minion.can-target {
  animation: spellValidBreath 1.6s ease-in-out infinite;
}
#game.active .board .slot .minion.spell-valid::after,
#game.active .board .slot .minion.can-target::after {
  box-shadow:
    inset 0 0 0 3px rgba(255, 232, 150, 0.95),
    inset 0 0 0 4px rgba(230, 140, 30, 0.7),
    inset 0 0 14px 3px rgba(255, 200, 90, 0.5);
}
#game.active .board .slot .minion.spell-glow {
  animation: spellHoverBreath 0.9s ease-in-out infinite;
  z-index: 7;
}
#game.active .board .slot .minion.spell-glow::after {
  box-shadow:
    inset 0 0 0 4px rgba(255, 248, 210, 1),
    inset 0 0 0 7px rgba(245, 150, 30, 0.95),
    inset 0 0 30px 10px rgba(255, 190, 70, 0.75);
  background: radial-gradient(circle at 50% 40%, rgba(255, 246, 210, 0.22), transparent 70%);
}
#game.active .hero-slot.spell-glow,
#game.active .hero-portrait.spell-glow {
  animation: spellHoverBreath 0.9s ease-in-out infinite;
}
.drag-ghost.over-target {
  opacity: 0.45 !important;
  transition: opacity .12s ease;
}
@keyframes spellValidBreath {
  0%, 100% { filter: brightness(1.05) drop-shadow(0 0 4px rgba(255, 220, 120, 0.9)) drop-shadow(0 0 12px rgba(240, 150, 30, 0.55)); }
  50%      { filter: brightness(1.14) drop-shadow(0 0 8px rgba(255, 236, 160, 1)) drop-shadow(0 0 22px rgba(245, 150, 30, 0.85)); }
}
@keyframes spellHoverBreath {
  0%, 100% { filter: brightness(1.18) saturate(1.15) drop-shadow(0 0 6px rgba(255, 246, 200, 1)) drop-shadow(0 0 18px rgba(255, 170, 40, 1)) drop-shadow(0 0 38px rgba(235, 110, 20, 0.8)); }
  50%      { filter: brightness(1.3) saturate(1.2) drop-shadow(0 0 10px rgba(255, 252, 225, 1)) drop-shadow(0 0 28px rgba(255, 180, 50, 1)) drop-shadow(0 0 60px rgba(240, 120, 20, 1)); }
}
@media (prefers-reduced-motion: reduce) {
  #game.active .board .slot .minion.spell-valid,
  #game.active .board .slot .minion.can-target { animation: none; filter: brightness(1.1) drop-shadow(0 0 8px rgba(255, 236, 170, 0.95)); }
  #game.active .board .slot .minion.spell-glow,
  #game.active .hero-slot.spell-glow,
  #game.active .hero-portrait.spell-glow { animation: none; filter: brightness(1.22) drop-shadow(0 0 14px rgba(255, 245, 200, 1)) drop-shadow(0 0 30px rgba(255, 200, 70, 0.9)); }
}


/* hand hover lift — keep after fan layout vars */
#game.active .my-hand .card {
  --fan-y: 0px;
  --fan-r: 0deg;
  transform: translateY(var(--fan-y)) rotate(var(--fan-r));
  transform-origin: bottom center;
  transition: transform .14s ease, filter .14s ease;
}
#game.active .my-hand .card:hover:not(.dragging) {
  transform: translateY(calc(var(--fan-y, 0px) - var(--hand-hover-lift, 36px))) rotate(var(--fan-r, 0deg)) scale(1.06) !important;
  z-index: 80 !important;
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.45));
}


/* Board/hand peek: Hearthstone-style ability tips to the right */
/* Base #cardPeek width (~260px) is for face-only; with tips, expand so Korean does not wrap per glyph */
#cardPeek:has(.peek-tips) {
  width: auto !important;
  max-width: min(96vw, 920px);
}
#cardPeek .peek-face { box-shadow: 0 12px 40px rgba(0,0,0,.55); }
#cardPeek .peek-tips {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 auto;
  flex-shrink: 0;
  min-width: 14ch;
  width: min(240px, 28vw);
  max-width: min(280px, 36vw);
}
#cardPeek .peek-tip,
#soulDrawTip .peek-tip {
  background: rgba(18, 14, 10, 0.94);
  border: 1px solid #a88848;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  box-sizing: border-box;
  min-width: 12ch;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
}
#cardPeek .peek-tip b,
#soulDrawTip .peek-tip b {
  display: block;
  color: #f3e2b0;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
  white-space: normal;
  word-break: keep-all;
}
#cardPeek .peek-tip span,
#soulDrawTip .peek-tip span {
  display: block;
  color: #d8c9a4;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-line; /* stats / blank / ability */
  white-space: normal;
  word-break: keep-all;
}

/* Tablet: stop browser scroll/gesture from stealing hand→board card drags */
#game.active .my-hand .card,
#game.active .board .minion {
  touch-action: none;
}
body.dragging-card {
  overflow: hidden !important;
  touch-action: none;
  overscroll-behavior: none;
}

/* ===== v0.197: decks LEFT; opp deck+hero lower; board left-fill lock ===== */
#game.active #oppDeck,
#game.active #myDeck {
  position: absolute !important;
  left: max(6px, 2.2%) !important;
  width: min(84px, 9.5%) !important;
  z-index: 6 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  pointer-events: none !important;
  grid-area: unset !important;
}
/* Fallback before JS layoutBoardDecks; JS overrides top/height in px */
#game.active #oppDeck {
  top: 32% !important;
  height: 22% !important;
  justify-content: flex-start !important;
  padding-top: 0 !important;
  bottom: auto !important;
}
#game.active #myDeck {
  top: auto !important;
  bottom: 27% !important;
  height: 30% !important;
  justify-content: flex-end !important;
  padding-bottom: 8px !important;
}
#game.active #oppDeck .deck-pile,
#game.active #myDeck .deck-pile {
  pointer-events: auto !important;
}
#game.active #oppDeck .pile-stack,
#game.active #myDeck .pile-stack {
  /* v0.328: --deck-u = 보드 배경 확대 배율 (layoutBoardDecks) */
  width: min(calc(72px * var(--deck-u, 1)), 100%);
  height: min(calc(104px * var(--deck-u, 1)), calc(17cqh * var(--deck-u, 1)));
}

/* Opp hero: drop well below top frame (match lowered opp deck band) */
#game.active #oppStrip {
  margin-top: clamp(88px, 16vh, 160px) !important;
  padding-top: 0 !important;
}
#game.active .col-hud {
  justify-content: space-between !important;
  padding-top: 0 !important;
}
#game.active #oppStrip .hud-hero {
  margin-top: 0 !important;
}

/* Single-column grid — decks are absolute, must not use oppdeck/mydeck areas */
#game.active .col-main {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas: "opphand" "oppboard" "myboard" "myhand" "hint" !important;
}
#game.active .col-main > .opp-hand { grid-area: opphand !important; }
#game.active .col-main > .board.opp,
#game.active .col-main > #oppBoard { grid-area: oppboard !important; }
#game.active .col-main > #myBoard { grid-area: myboard !important; }
#game.active .col-main > .my-hand { grid-area: myhand !important; }
#game.active .col-main > .hint { grid-area: hint !important; }
#game.active .col-main > #oppDeck,
#game.active .col-main > #myDeck,
#game.active .col-main > .hero-row,
#game.active .col-main > .log,
#game.active .col-main > .corner-soul {
  grid-area: unset !important;
}

/* Field lane: narrower + taller (v0.225) — not full parchment; HAND LOCK untouched */
#game.active .board,
#game.active .board.opp,
#game.active #oppBoard,
#game.active #myBoard {
  justify-content: flex-start !important;
  width: min(82%, calc(5 * var(--slot-w, 112px) + 4 * 10px + 28px)) !important; /* v0.328: 70→82% (전장 카드 1.44배) */
  max-width: calc(5 * var(--slot-w, 112px) + 4 * 10px + 36px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  /* v0.227: nudge field UP ~20px and RIGHT ~20px (was sitting low-left) */
  transform: translate(calc(-1.5% + 20px), 45px) !important;
  padding-left: 2px !important;
  padding-right: 2px !important;
  /* taller lane: less vertical inset so frame grows toward mid divider / hand */
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  box-sizing: border-box !important;
  border-radius: 16px !important;
  /* always-visible thin field border (play lane, not outer board art) */
  box-shadow: inset 0 0 0 1px rgba(255, 224, 140, .42) !important;
}

/* Drop-glow follows narrowed+taller myBoard */
#game.active.drop-ready #myBoard,
#game.active #myBoard.drop-glow {
  width: min(82%, calc(5 * var(--slot-w, 112px) + 4 * 10px + 28px)) !important; /* v0.328: 70→82% (전장 카드 1.44배) */
  max-width: calc(5 * var(--slot-w, 112px) + 4 * 10px + 36px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  transform: translate(calc(-1.5% + 20px), 45px) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 224, 140, .55) !important;
}

/* ===== v0.202: hand size OK but NO overlap onto board ===== */
#game.active .my-hand {
  overflow: hidden !important;
  z-index: 8 !important;
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 4px 6% 10px !important;
  margin-bottom: 0 !important;
  margin-top: 0 !important;
  box-sizing: border-box !important;
}
#game.active .my-hand .card,
#game.active .my-hand .card.playable {
  height: min(92%, 22cqh) !important;
  max-height: min(200px, 22cqh) !important;
  min-height: 140px !important;
  width: auto !important;
  aspect-ratio: 2 / 3 !important;
  flex: 0 0 auto !important;
  transform-origin: bottom center !important;
}
html.is-desktop #game.active .my-hand,
#app.desktop-fill #game.active .my-hand {
  padding: 6px 8% 12px !important;
  margin-bottom: 0 !important;
}
html.is-desktop #game.active .my-hand .card,
html.is-desktop #game.active .my-hand .card.playable,
#app.desktop-fill #game.active .my-hand .card,
#app.desktop-fill #game.active .my-hand .card.playable {
  height: min(94%, 22cqh) !important;
  max-height: min(210px, 22cqh) !important;
  min-height: 150px !important;
}
@media (min-width: 1100px) {
  #game.active .my-hand {
    padding: 6px 8% 12px !important;
    margin-bottom: 0 !important;
  }
  #game.active .my-hand .card,
  #game.active .my-hand .card.playable {
    height: min(94%, 22cqh) !important;
    max-height: min(210px, 22cqh) !important;
    min-height: 150px !important;
  }
}
/* myBoard: z only — v0.234 equal field lanes (no asymmetric padding) */
#game.active #myBoard {
  z-index: 4 !important;
}

/* v0.318: 이번 턴 코인 결과 배지 (전장 유닛 · 숫자/클릭 가리지 않음 · 핸드 무관) */
.minion .turn-coin {
  position: absolute;
  top: 65%;        /* 카드 효과 칸 오른쪽 위 모서리 (공/방/체 숫자·코인 점과 겹치지 않음) */
  right: 11%;
  z-index: 7;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 5px 1px 2px;
  border-radius: 9px;
  background: rgba(18, 8, 0, .78);
  border: 1px solid rgba(201, 161, 91, .8);
  color: #f3e3b3;
  font: 900 12px/1 "Noto Sans KR", Arial, sans-serif;
  white-space: nowrap;
}
.minion .turn-coin span { opacity: .7; font-weight: 700; }
.minion .turn-coin .tc-g {
  width: 12px; height: 12px;
  background: url("../../../assets/img/coins/gold.png") center / contain no-repeat;
  filter: grayscale(1) brightness(.75);
}
.minion .turn-coin.has-heads .tc-g { filter: none; }

/* v0.319: 소울 드로우 버튼 — 소울 표시 바로 왼쪽 (위치는 layoutHudChrome이 JS로 지정 · 핸드와 무관) */
#game .col-main > .soul-draw-btn {
  position: absolute;
  z-index: 9; /* 핸드 레이어(8) 위: 클릭 보장 · 위치는 핸드 오른쪽 끝 바깥 */
  width: 44px; height: 44px;
  padding: 0; margin: 0;
  border: 0; border-radius: 50%;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: filter .15s ease;
  touch-action: none;
}
#game .col-main > .soul-draw-btn .sd-icon {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;   /* 투명 PNG/WebP — 원형 클립 없음 (보석이 원 밖으로 나옴) */
  pointer-events: none;
  user-select: none;
}
/* 아이콘 왼쪽 위 소울 보석 위에 코드로 그린 숫자 3 */
#game .col-main > .soul-draw-btn .sd-cost {
  position: absolute;
  inset: 0;              /* v0.320: 아이콘 전체 덮음 — 숫자 위치는 SOUL_DRAW_GEM(1024 좌표)로 계산 */
  width: 100%; height: 100%;
  pointer-events: none;
}
/* v0.324: 상태는 아트 교체(idle/hold/used)로 표시 — 필터·축소 없음 (endBtn과 같은 방식) */
#game .col-main > .soul-draw-btn.ready:hover {
  filter: brightness(1.08);
}
#game .col-main > .soul-draw-btn:disabled,
#game .col-main > .soul-draw-btn.used {
  cursor: default;
}
#game .col-main > .soul-draw-btn .sd-cost.dim { opacity: .7; filter: grayscale(1); }
/* v0.326: 상대 표시 버튼 숫자는 읽히게 (거의 원래 밝기) */
#game .col-main > .soul-draw-btn.opp .sd-cost.dim { opacity: .92; filter: none; }
#game .col-main > .soul-draw-btn.opp { cursor: default; pointer-events: auto; }
/* v0.353: 내 소울 드로우 호버 강조 (JS가 좌표로 .sd-hover 토글 — disabled 버튼도 동작) */
#game .col-main > .soul-draw-btn.me {
  transform-origin: 50% 50%;
  /* 위치 코드가 인라인 transform:none !important를 쓰므로 확대는 독립 속성 scale로 */
  transition: filter .15s ease, scale .15s ease;
}
#game .col-main > .soul-draw-btn.me.sd-hover.ready {
  filter: brightness(1.3) drop-shadow(0 0 3px rgba(255, 226, 140, 1)) drop-shadow(0 0 10px rgba(255, 186, 48, .85));
  scale: 1.08;
}
#game .col-main > .soul-draw-btn.me.sd-hover:not(.ready) {
  filter: brightness(1.08) drop-shadow(0 0 4px rgba(255, 210, 110, .35));
  scale: 1.02;
}
/* v0.353: 소울 드로우 툴팁 — 키워드 툴팁(.peek-tip)과 같은 모양, 버튼 왼쪽 위 */
#soulDrawTip {
  position: fixed;
  z-index: 140;
  display: none;
  pointer-events: none;
  width: max-content;
  max-width: min(280px, 36vw);
}
#soulDrawTip.show { display: block; }
#soulDrawTip .peek-tip .sd-tip-why {
  margin-top: 6px;
  color: #ff9f7c;
  font-weight: 700;
}

/* =====================================================================
   HAND LAYOUT LOCK v0.234 — DO NOT OVERRIDE BELOW THIS LINE
   See LAYOUT_HAND_LOCK.md. Negative margin-bottom on .my-hand is FORBIDDEN.
   2026-10-28 user correction: original card size; lower the fan and allow bottom clipping.
   ===================================================================== */
#game.active .col-main > .my-hand#myHand,
#game.active .col-main > .my-hand {
  margin-bottom: 0 !important;
  margin-top: 0 !important;
  padding-top: 6px !important;
  padding-bottom: 0 !important;
  transform: translateY(var(--hand-offset, -5cqh));
  overflow: visible !important;
  z-index: 8 !important;
  align-items: flex-end !important;
}
#game.active .col-main > .my-hand#myHand .card,
#game.active .col-main > .my-hand .card,
#game.active .col-main > .my-hand .card.playable {
  height: 26cqh !important;
  max-height: none !important;
  min-height: 0 !important;
  width: auto !important;
  aspect-ratio: 2 / 3 !important;
  flex: 0 0 auto !important;
  transform-origin: bottom center !important;
}
#game.active .col-main > #myBoard {
  z-index: 4 !important;
}


/* v0.209 end-turn board button — geometry owned by layoutEndBtn() */
#game.active .col-main > #endBtn.end-btn {
  position: absolute;
  grid-area: unset !important;
  z-index: 7;
  /* fallback only; JS sets left/top/width/height from board content box */
  top: 50%;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
  width: 8%;
  height: auto;
  aspect-ratio: 1 / 1;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background-color: transparent;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(12px, 1.55cqi, 36px);
  letter-spacing: 0.06em;
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#game.active .col-main > #endBtn.end-btn .end-btn-label {
  pointer-events: none;
  position: relative;
  z-index: 1;
  line-height: 1.1;
}
#game.active .col-main > #endBtn.end-btn.has-turn-timer .end-btn-label {
  display: none !important;
}
#game.active .col-main > #endBtn.end-btn .end-btn-timer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 1;
  pointer-events: none;
  font-size: clamp(18px, 2.5cqi, 30px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0;
}
#game.active .col-main > #endBtn.end-btn .end-btn-timer[hidden] { display: none; }
#game.active .col-main > #endBtn.end-btn .end-btn-timer.urgent {
  color: #f33;
  -webkit-text-stroke: 2px #000;
  paint-order: stroke fill;
  text-shadow: -1px -1px #000, 1px -1px #000, -1px 1px #000, 1px 1px #000;
}
/* v0.240: label colors tuned per plate (off / pressed / glow) */
/* opp + off plate (dark charcoal center) — muted brass, readable not loud */
#game.active .col-main > #endBtn.end-btn.opp-turn {
  cursor: default;
  color: #c4b08a;
  text-shadow: 0 1px 1px rgba(0,0,0,.85), 0 0 4px rgba(0,0,0,.55);
  pointer-events: none;
}
#game.active .col-main > #endBtn.end-btn:disabled {
  opacity: 1;
  cursor: default;
}
/* my-turn + pressed plate (dark) — warm antique gold */
#game.active .col-main > #endBtn.end-btn.my-turn {
  color: #e0c88a;
  text-shadow: 0 1px 1px rgba(20,10,0,.8), 0 0 5px rgba(40,20,0,.45);
  cursor: pointer;
}
/* my-turn + glow plate (bright lime) — deep forest, soft edge */
#game.active .col-main > #endBtn.end-btn.my-turn.glow {
  color: #1c3524;
  text-shadow: 0 1px 0 rgba(220,255,200,.35), 0 0 3px rgba(255,255,200,.2);
}
/* v0.351: 마우스오버·누름 때 글자색도 확실히 바뀜 */
#game.active .col-main > #endBtn.end-btn .end-btn-label { transition: color .12s ease, text-shadow .12s ease; }
#game.active .col-main > #endBtn.end-btn.my-turn:hover {
  color: #fff7d6;
  text-shadow: 0 1px 1px rgba(0,0,0,.9), 0 0 8px rgba(255,214,120,.95), 0 0 16px rgba(255,190,60,.6);
}
#game.active .col-main > #endBtn.end-btn.my-turn.glow:hover {
  color: #ffffff;
  text-shadow: 0 1px 2px #0b2412, 0 0 3px #0b2412, 0 0 8px rgba(10,50,20,.9);
}
#game.active .col-main > #endBtn.end-btn.my-turn.holding,
#game.active .col-main > #endBtn.end-btn.my-turn.glow.holding {
  color: #ffc629;
  text-shadow: 0 1px 1px #000, 0 0 6px rgba(255,160,0,.95), 0 0 14px rgba(255,120,0,.6);
}


/* v0.216 board HUD gems — soul/HP seated on baked board art; no rectangular hero chrome */
#game.active .col-main > .corner-soul {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: absolute !important;
  z-index: 7 !important;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #fff8e8 !important;
  font-weight: 900 !important;
  font-size: clamp(16px, 1.85cqh, 23px) !important;
  line-height: 1 !important;
  text-align: center !important;
  white-space: nowrap !important;
  pointer-events: none !important;
  text-shadow:
    0 0 2px #000,
    0 1px 2px #000,
    0 0 6px rgba(0, 0, 0, 0.95),
    1px 1px 0 #1a0a18,
    -1px -1px 0 #1a0a18,
    1px -1px 0 #1a0a18,
    -1px 1px 0 #1a0a18 !important;
}

/* Full-bleed HUD overlay so heroes can sit on board arches */
#game.active .col-hud {
  position: absolute !important;
  inset: 0 !important;
  width: auto !important;
  max-width: none !important;
  z-index: 6 !important;
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  pointer-events: none !important;
  background: transparent !important;
  justify-content: unset !important;
  align-items: unset !important;
  flex-direction: unset !important;
}
#game.active .col-hud .hero-strip,
#game.active .col-hud .side {
  display: contents !important;
  margin: 0 !important;
  padding: 0 !important;
}
#game.active .col-hud .hud-hero {
  position: absolute !important;
  z-index: 6 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: auto !important;
  display: block !important;
}
#game.active .col-hud .give-btn {
  position: absolute !important;
  z-index: 7 !important;
  pointer-events: auto !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  font-size: clamp(10px, 1.1cqh, 13px) !important;
  padding: 4px 6px !important;
  min-width: 0 !important;
}

/* Strip rectangular gold/dark box — portrait sits in board arch well only */
#game.active .hud-hero .hero-slot,
#game.active .hud-hero .hero-portrait {
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  background-image: none !important;
  overflow: visible !important;
  position: relative !important;
  cursor: pointer !important;
}
#game.active .hud-hero .hero-slot img,
#game.active .hud-hero .hero-portrait img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  display: block !important;
  background: transparent !important;
  border: none !important;
  border-radius: 42% 42% 38% 38% / 36% 36% 48% 48% !important;
  pointer-events: none !important;
}

/* HP number centered in ruby heart gem — 1-digit and 2-digit both center (v0.261) */
#game.active .hud-hero .hero-hp {
  position: absolute !important;
  z-index: 8 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important; /* the artwork seat owns the digit center */
  min-width: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #fff8e8 !important;
  font-weight: 900 !important;
  font-size: clamp(17px, 2.05cqh, 25px) !important;
  line-height: 1 !important;
  text-align: center !important;
  font-variant-numeric: tabular-nums !important;
  pointer-events: none !important;
  text-shadow:
    0 0 2px #000,
    0 1px 2px #000,
    0 0 8px rgba(0, 0, 0, 1),
    1px 1px 0 #2a0608,
    -1px -1px 0 #2a0608,
    1px -1px 0 #2a0608,
    -1px 1px 0 #2a0608,
    0 2px 3px #000 !important;
}

/* Hide duplicate soul on hero — resource lives on #oppSoulGem / #mySoulGem */
#game.active .hud-hero .hero-soul,
#game.active .hero-soul {
  display: none !important;
}

/* Opp strip no longer needs margin push — geometry owned by layoutHudGems() */
#game.active #oppStrip {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
#game.active #myStrip {
  margin-top: 0 !important;
  padding-bottom: 0 !important;
}


/* v0.220: hide HUD chrome until JS seats it (avoids first-frame giant heroes / wrong endBtn) */
#game.active:not(.hud-ready) .col-hud .hud-hero,
#game.active:not(.hud-ready) .col-hud .hero-hp,
#game.active:not(.hud-ready) #endBtn {
  opacity: 0;
  pointer-events: none;
}
#game.active.hud-ready .col-hud .hud-hero,
#game.active.hud-ready .col-hud .hero-hp,
#game.active.hud-ready #endBtn {
  opacity: 1;
}

/* v0.219 HUD gem seat — neutralize legacy corner-soul !important pins; geometry owned by layoutHudGems() */
#game.active .col-main > .corner-soul.opp,
#game.active .col-main > .corner-soul.me {
  top: unset !important;
  right: unset !important;
  bottom: unset !important;
  left: unset !important;
}


/* ===== v0.222 → v0.351: playable glow — 은은하게 맥동하는 노란 빛 (초기 playGlow 방식 복원) =====
   HAND LAYOUT LOCK(.my-hand 위치·크기·overflow)은 건드리지 않는다. 카드 자체만 overflow visible로
   바깥 번짐을 보이게 하고, 맥동은 ::before 가 opacity 로만 한다(앞선 !important 선언과 충돌 없음). */
#game.active .my-hand .card.playable {
  overflow: visible !important;
}
#game.active .my-hand .card.playable > .play-glow {
  inset: -1px !important;
  width: auto !important;
  height: auto !important;
  border: 2px solid rgba(255, 226, 140, 0.9) !important;
  border-radius: 10px 10px 16px 16px !important;
  box-shadow:
    0 0 6px 1px rgba(255, 214, 110, 0.45),
    inset 0 0 8px rgba(255, 220, 120, 0.25) !important;
  filter: none !important;
  animation: none !important;
  opacity: 1 !important;
}
#game.active .my-hand .card.playable > .play-glow::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    0 0 0 1px rgba(255, 240, 190, 0.9),
    0 0 14px 4px rgba(255, 216, 120, 0.75),
    0 0 26px 8px rgba(255, 190, 70, 0.35);
  opacity: 0.25;
  animation: playGlowBreath 2.2s ease-in-out infinite;
}
@keyframes playGlowBreath {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  #game.active .my-hand .card.playable > .play-glow::before { animation: none; opacity: 0.7; }
}


/* ===== v0.223: cardPeek size cap + no stuck fullscreen preview =====
   Composed faces are 768×1152; width:auto + img width:100% could use intrinsic
   size and fill the tablet viewport. Cap peek face; tip row may be wider.
   Touch devices: disable hand :hover lift (sticky hover after tap). */
#cardPeek {
  max-width: min(96vw, 920px) !important;
  max-height: 70vh !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}
#cardPeek .peek-face,
#cardPeek img.peek-face,
#cardPeek > img {
  width: min(300px, 42vh, 70vw) !important;
  max-width: min(300px, 70vw) !important;
  max-height: min(70vh, 480px) !important;
  height: auto !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
}
#cardPeek:has(.peek-tips) {
  width: auto !important;
  max-width: min(96vw, 920px) !important;
  max-height: 70vh !important;
}
/* Fine pointer only — avoid sticky :hover scale covering the board on tablet */
@media (hover: hover) and (pointer: fine) {
  #game.active .my-hand .card:hover:not(.dragging) {
    transform: translateY(calc(var(--fan-y, 0px) - var(--hand-hover-lift, 36px))) rotate(var(--fan-r, 0deg)) scale(1.06) !important;
    z-index: 80 !important;
    filter: drop-shadow(0 14px 18px rgba(0,0,0,.45));
  }
}
@media (hover: none), (pointer: coarse) {
  #game.active .my-hand .card:hover:not(.dragging),
  #game .my-hand .card:hover:not(.dragging),
  #game.active .my-hand .card:hover {
    transform: translateY(var(--fan-y, 0px)) rotate(var(--fan-r, 0deg)) !important;
    filter: none !important;
    /* keep fan z-index; do not promote to fullscreen overlay */
    z-index: auto !important;
  }
}


/* ===== v0.225 tablet HUD: opp-hand back = deck pile art; peek more down; no long-press menu ===== */
#game.active .opp-hand {
  overflow: hidden !important;
  align-items: flex-end !important;
  justify-content: center !important;
  /* push row content down so ~half of backs show */
  padding: 10px 14% 2px !important;
  margin-top: 6px !important;
}
#game.active .opp-hand .back {
  /* v0.243: 2× size vs prior 9.5cqh */
  height: min(96%, 19cqh) !important;
  width: auto !important;
  aspect-ratio: 2 / 3 !important;
  margin-left: -12px !important;
  flex: 0 0 auto !important;
  border: 1px solid #c9a24a !important;
  border-radius: 6px !important;
  box-shadow: 0 3px 6px #0008 !important;
  background-color: #0c1830 !important;
  background-image: url("../../../assets/img/hud/back.png") !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}
#game.active .opp-hand .back:first-child { margin-left: 0 !important; }

/* Kill browser long-press callout/context menu on play surface (iPad/Chrome) */
#game.active,
#game.active * {
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}
/* Keep selectable text in lore/modals/inputs */
#game.active .modal,
#game.active .modal *,
#game.active .lore-box,
#game.active .lore-box *,
#game.active .lore-side,
#game.active .lore-side *,
#cardLorePop,
#cardLorePop *,
#cardMenuPop .card-menu,
input, textarea, [contenteditable="true"] {
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
}


/* v0.248: no circle chrome — hover brightens the ⚙ itself */
#settingsGearBtn.settings-gear-btn {
  top: 2px !important;
  right: 14px !important;
  width: 48px !important;
  height: 48px !important;
  font-size: 40px !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  overflow: visible !important;
  color: #c9b48a;
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transform: none;
  transition: color 0.15s ease, filter 0.15s ease, text-shadow 0.15s ease;
}
#settingsGearBtn.settings-gear-btn:hover,
#settingsGearBtn.settings-gear-btn:focus-visible {
  color: #ffe7a8 !important;
  filter: brightness(1.35) !important;
  text-shadow: 0 0 8px rgba(255, 220, 140, 0.65), 0 0 14px rgba(228, 195, 106, 0.4);
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}
#settingsGearBtn.settings-gear-btn.on {
  border: none !important;
  box-shadow: none !important;
}

/* v0.237: combat give-up moved into settings */
#game.active .give-btn { display: none !important; }


/* v0.252: opp-hand fan (mirrored vs ally) — JS sets transform !important */
#game.active .opp-hand {
  align-items: flex-start !important;
  overflow: visible !important;
}
#game.active .opp-hand .back {
  transform-origin: top center !important;
}

/* ===== v0.253: combat float ABOVE gems + ally↔enemy field gap +20px ===== */
/* Float offset: .stat-delta bottom 6%→20% (~above sword/shield/heart digits). */
/* Field gap via P0 parchment-center padding nudge (symmetric; HAND LOCK untouched). */
#game.active .board.opp,
#game.active #oppBoard {
  /* enemy units nudge UP from center line */
  padding-bottom: 10px !important;
}
#game.active #myBoard {
  /* ally units nudge DOWN from center line → total gap +20px */
  padding-top: 10px !important;
}

/* ===== v0.262: yellow field borders — opp up 5, my down 5 more ===== */
#game.active .board.opp,
#game.active #oppBoard {
  transform: translate(calc(-1.5% - 1px), 4.167cqh) !important; /* v0.328: 큰 전장 카드 — 변경안 자리 (was +20px,20px) */
}
#game.active #myBoard {
  transform: translate(calc(-1.5% - 1px), 10.185cqh) !important; /* v0.328: 큰 전장 카드 — 변경안 자리 (was +20px,70px) */
}
#game.active.drop-ready #myBoard,
#game.active #myBoard.drop-glow {
  transform: translate(calc(-1.5% - 1px), 10.185cqh) !important;
}

/* 한글 줄 바꿈: 단어 중간이 아니라 띄어쓰기 자리에서만 (9/25) */
html, body, body * {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* ===== v0.333 타이틀: 왼쪽 속성 카드 제거 → 로고·메뉴 화면 중앙 (16:9 stage cq 단위) ===== */
#title.screen.active {
  justify-content: center !important;
  align-items: center !important;
  padding: 4cqh 4cqw 6cqh !important;
  overflow: hidden !important;
  background:
    radial-gradient(ellipse 46cqw 34cqh at 50% 30%, rgba(228,195,106,.13), transparent 70%),
    radial-gradient(ellipse 70cqw 60cqh at 50% 62%, rgba(90,60,24,.28), transparent 75%) !important;
}
#title .title-brand {
  width: auto !important;
  margin: 0 auto 4.2cqh !important;
  gap: 2cqh !important;
}
#title .title-emblem {
  height: 25cqh !important;
  max-height: 25cqh !important;
}
#title .title-wordmark {
  --wm-h: 25cqh;
}
#title .title-body {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 auto !important;
}
#title .title-menu {
  position: relative;
  width: 27cqw;
  min-width: 300px;
  gap: 1.5cqh !important;
  padding: 3cqh 2.4cqw 2.2cqh !important;
  border: 2px solid #5a4320;
  border-radius: 1.8cqh;
  background: linear-gradient(#22180fcc, #140e09e6);
  box-shadow: inset 0 0 0 1px #2a1c10, 0 1.4cqh 4cqh rgba(0,0,0,.55);
}
#title .title-menu::before,
#title .title-menu::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 40%;
  height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .7;
}
#title .title-menu::before { top: -2px; }
#title .title-menu::after { bottom: -2px; }
#title .title-menu .menu-btn {
  padding: 1.7cqh 1.4cqw !important;
  font-size: 2.3cqh !important;
  letter-spacing: .12em !important;
}
#title .title-menu .menu-btn.ghost { font-size: 2cqh !important; }
#title .title-menu .build-ver {
  position: absolute !important;
  right: 1.2cqw !important;
  bottom: -4.6cqh !important;
  font-size: 1.6cqh !important;
  margin: 0 !important;
}

/* ===== v0.333 속성 선택 화면 (덱 구성 · 플레이 · 로비 새 덱) ===== */
#tribeSelect.screen.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4cqh 4cqw;
  background: radial-gradient(ellipse 60cqw 50cqh at 50% 45%, rgba(228,195,106,.10), transparent 72%);
}
#tribeSelect .tsel {
  display: flex; flex-direction: column; align-items: center;
  width: 100%;
}
#tribeSelect .tsel-title {
  margin: 0 0 .8cqh; color: var(--gold); font-size: 4.6cqh; letter-spacing: .08em;
  text-shadow: 0 .35cqh 0 #4a3208, 0 0 2.4cqh rgba(228,195,106,.25);
}
#tribeSelect .tsel-sub { margin: 0 0 3.4cqh; color: #cbb58a; font-size: 2cqh; }
#tribeSelect .tsel-grid {
  display: grid;
  grid-template-columns: repeat(3, 21cqw);
  gap: 2.8cqh 2cqw;
  margin-bottom: 3.6cqh;
}
#tribeSelect .tsel-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 2.2cqh 1cqw 2cqh;
  border: 2px solid #5a4320;
  border-radius: 1.8cqh;
  background: linear-gradient(#22180f, #140e09);
  box-shadow: inset 0 0 0 1px #2a1c10, 0 1cqh 2.6cqh rgba(0,0,0,.5);
  color: var(--gold);
  cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
#tribeSelect .tsel-card:hover {
  transform: translateY(-.6cqh);
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px #2a1c10, 0 0 3cqh color-mix(in srgb, var(--tc) 55%, transparent), 0 1.4cqh 3cqh rgba(0,0,0,.55);
}
#tribeSelect .tsel-card.lock { opacity: .42; filter: grayscale(.4); cursor: not-allowed; }
#tribeSelect .tsel-icon {
  width: 19cqh; height: 19cqh;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.2cqh;
}
#tribeSelect .tsel-icon img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
#tribeSelect .tsel-en {
  font-family: var(--font-en); font-weight: 600; font-size: 3cqh; letter-spacing: .03em; line-height: 1.1;
}
#tribeSelect .tsel-ko { color: #cbb58a; font-size: 1.8cqh; margin-top: .3cqh; }
#tribeSelect .tsel-badge {
  position: absolute; top: 1.2cqh; right: 1.2cqh;
  font-size: 1.45cqh; padding: .3cqh .9cqh; border-radius: 1cqh;
  color: #cbb58a; background: rgba(0,0,0,.45); border: 1px solid #6a5228;
}
#tribeSelect .tsel-badge.ok { color: #ffe7a8; border-color: var(--gold-dim); }
#tribeSelect .tsel-back {
  min-width: 18cqw; margin: 0; padding: 1.4cqh 2cqw; font-size: 2cqh;
}

/* ===== v0.340: 드래그 중 적 전장 이동 버그 / 로그 왼쪽 끝 / 덱 2배 / 상대 핸드 2배 / 상대 소울 드로우 숨김 ===== */
/* Bug: #game.drop-ready(카드 집는 순간)에서 3259행 `transform:none` 이 적 전장 자리(4.167cqh)를 지워
   적 유닛이 위로 45px·오른쪽 18px 튐. 평소 자리 그대로 고정. */
#game.active.drop-ready .board.opp,
#game.active.drop-ready #oppBoard {
  transform: translate(calc(-1.5% - 1px), 4.167cqh) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 224, 140, .42) !important; /* 적 레인 테두리도 그대로 */
}
/* 1) 전투 기록·힌트: 화면 맨 왼쪽 끝 (JS가 --edge-left 계산) */
#game.active #log,
#game.active .log,
#game.active .col-main > .log,
#game.active #hint,
#game.active .hint,
#game.active .col-main > .hint {
  left: var(--edge-left, -8.7cqh) !important;
}
/* 2) 덱 더미 2배 (위치·폭은 layoutBoardDecks) */
#game.active #oppDeck .deck-pile,
#game.active #myDeck .deck-pile {
  width: 100% !important;
}
#game.active #oppDeck .pile-stack,
#game.active #myDeck .pile-stack {
  width: calc(144px * var(--deck-u, 1)) !important;
  height: calc(208px * var(--deck-u, 1)) !important;
  margin: 0 auto !important;
}
#game.active #oppDeck .pile-count,
#game.active #myDeck .pile-count {
  font-size: calc(26px * var(--deck-scale, 1)) !important; /* v0.351: 덱 더미 10% 축소 (DECK_SCALE) */
  margin-top: calc(6px * var(--deck-scale, 1)) !important;
}
/* 3) 상대 핸드 뒷면 2배 — 화면 위로 일부 잘리게 (하스스톤식) */
#game.active .opp-hand .back {
  height: 17.955cqh !important; /* v0.351: 5% 축소 (18.9 × 0.95) */
  max-height: none !important;
  position: relative !important;
  top: -5.89cqh !important;     /* 잘리는 비율 유지 (−6.2 × 0.95) */
}
/* 4) 상대 소울 드로우 아이콘·비용 숨김 */
#game.active #oppSoulDraw,
#oppSoulDraw {
  display: none !important;
}

/* ===== v0.342: 덱 편집 호버 툴팁 (모달 오른쪽 설명과 같은 내용 · 버튼 없음) + 짧은 안내 토스트 ===== */
:is(#poolTip.pool-tip,#deckCountTip.pool-tip) {
  position: fixed;
  left: 0; top: 0;
  z-index: 70;
  display: none;
  width: 340px;
  max-width: 340px;
  box-sizing: border-box;
  padding: 14px 16px 6px;
  background: rgba(26, 20, 12, .97);
  border: 2px solid var(--gold, #e4c36a);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .6);
  color: #e8dcc0;
  pointer-events: none !important;
  flex-direction: column;
}
:is(#poolTip.pool-tip,#deckCountTip.pool-tip).show { display: flex; }
:is(#poolTip.pool-tip,#deckCountTip.pool-tip) h3 { color: var(--gold, #e4c36a); margin: 0 0 6px; font-size: 24px; }
:is(#poolTip.pool-tip,#deckCountTip.pool-tip) .lore-meta { color: #cbb58a; font-size: 14px; margin-bottom: 10px; line-height: 1.45; }
:is(#poolTip.pool-tip,#deckCountTip.pool-tip) .lore-skills { margin: 0 0 10px; }
:is(#poolTip.pool-tip,#deckCountTip.pool-tip) .lore-skill { margin: 0 0 8px; padding: 8px 10px; background: rgba(60,42,20,.45); border: 1px solid #5a4424; border-radius: 8px; }
:is(#poolTip.pool-tip,#deckCountTip.pool-tip) .lore-skill b { display: block; color: #f3e2b0; font-size: 15px; margin-bottom: 4px; }
:is(#poolTip.pool-tip,#deckCountTip.pool-tip) .lore-skill span { display: block; color: #d8c9a4; font-size: 13px; line-height: 1.45; }
:is(#poolTip.pool-tip,#deckCountTip.pool-tip) p { line-height: 1.5; font-size: 14px; margin: 0 0 10px; color: #cbb58a; font-style: italic; white-space: pre-line; }
.builder-toast {
  position: fixed;
  left: 50%; bottom: 9%;
  transform: translateX(-50%);
  z-index: 80;
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(20, 14, 8, .92);
  border: 1px solid rgba(228, 195, 106, .6);
  color: #ffe7a8;
  font-size: 15px;
  font-weight: 700;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
}
.builder-toast.show { opacity: 1; }


/* ===== v0.345: 드래그 고스트 — 전장/핸드 카드 크기 고정 (원본 아트 해상도로 커지지 않게) ===== */
.drag-ghost {
  box-sizing: border-box !important;
  max-width: min(40vw, 280px) !important;
  max-height: min(70vh, 420px) !important;
  flex: none !important;
}
.drag-ghost img,
.drag-ghost .card-face {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  display: block !important;
}

/* Keep the hand slot while its one visible card follows the pointer.
   Opacity on the parent also hides playable glow descendants; no hand reflow. */
#game.active .my-hand .card.dragging {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: none !important;
}

/* Accepted turn-end intent remains visibly pressed until all action owners settle. */
#game.active .col-main > #endBtn.end-btn.end-pending {
  opacity: 1;
  filter: none;
  cursor: wait;
}
#game.active .col-main > #endBtn.end-btn.end-pending .end-btn-label {
  color: #fff3be;
  text-shadow: 0 1px 2px #000;
}

/* Long card explanations remain fully readable on short screens. */
:is(#poolTip.pool-tip,#deckCountTip.pool-tip) { max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); overflow-y:auto; overscroll-behavior:contain; pointer-events:auto !important; }

/* Preserve card and type sizes; give portrait explanations the available width. */
@media (max-width: 600px) and (orientation: portrait) {
  #cardPeek:has(.peek-tips) {
    flex-direction: column !important;
    top: 50% !important;
    max-height: calc(100dvh - 24px) !important;
    gap: 10px !important;
  }
  #cardPeek .peek-tips {
    min-width: 0;
    width: min(360px, 92vw);
    max-width: min(360px, 92vw);
  }
}
@media (max-height: 600px) and (orientation: landscape) {
  #cardPeek .peek-tips {
    width: min(420px, 48vw);
    max-width: min(420px, 48vw);
  }
}
/* Only content taller than the portrait viewport opts into persistent reading. */
#cardPeek.peek-reading {
  pointer-events: auto !important;
  height: calc(100dvh - 24px);
  gap: 0 !important;
  width: min(360px, 92vw) !important;
}
#cardPeek .peek-scroll {
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
#cardPeek .peek-scroll .peek-tips { width: 100%; max-width: 100%; }
#cardPeek .peek-controls {
  order: -1;
  flex-shrink: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(18,14,10,.96);
  color: #d8c9a4;
  font-size: 13px;
}
#cardPeek .peek-controls span { padding-left: 10px; }
#cardPeek .peek-close {
  min-width: 60px;
  min-height: 44px;
  color: #f3e2b0;
  background: transparent;
  border: 1px solid #a88848;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
}
#cardPeek .peek-scroll:focus-visible,
#cardPeek .peek-close:focus-visible { outline: 2px solid #f3e2b0; outline-offset: -2px; }
.peek-backdrop { position: fixed; inset: 0; z-index: 199; touch-action: none; }

/* Content-sized tips with a bounded readable line length. */
#cardPeek .peek-tips {width:max-content;min-width:0;max-width:min(360px,42vw);}
#cardPeek .peek-tip {min-width:0;}
#poolTip.pool-tip {width:max-content;max-width:min(420px,calc(100vw - 16px));}
@media(max-width:600px) and (orientation:portrait){#cardPeek .peek-tips{width:max-content;max-width:92vw;}}
@media(max-height:600px) and (orientation:landscape){#cardPeek .peek-tips{width:max-content;max-width:48vw;}}
#cardPeek .peek-scroll .peek-tips {width:fit-content;max-width:100%;}
