/* Layout: one portrait column. Display on top, every frequent control in the bottom thumb zone; Menü sits in the view corner.
   Camp (Kamp Ateşi) styles live in hub.css, scoped under #campScreen. */
:root {
  --ink: #0c0a12;        /* page and void */
  --stone: #1d1926;      /* panel face */
  --stone-hi: #4a4258;   /* bevel light edge */
  --stone-lo: #08070c;   /* bevel dark edge */
  --bone: #efe6d2;       /* main text */
  --dim: #9a90a8;        /* secondary text */
  --gold: #f2c14e;       /* accent: chain, gold, primary action */
  --blood: #d2453a;
  --frost: #5aa8e0;
  --venom: #7ac04a;
  --ember: #e0603a;
  --life: #e04a5a;
  --uncommon: #7ac04a;
  --rare: #5aa8e0;
  --epic: #c05ad8;
  --font-display: "VT323", "Courier New", monospace;
  --font-body: "VT323", "Courier New", monospace;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
  /* Same insets the artifact skeleton puts on :root, so the local page clears the notch too (no double padding). */
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

[hidden] { display: none !important; }
html { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 18px;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#game {
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  padding-block: 8px;
  box-sizing: border-box;
  touch-action: none;
}
.screen { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; }

/* ---------- Bevel helpers (90s stone UI) ---------- */
.bevel, .btn, .sheet, .card {
  border: 2px solid;
  border-color: var(--stone-hi) var(--stone-lo) var(--stone-lo) var(--stone-hi);
}

/* ---------- HUD (icons only, no text labels; fits 343 px with "+9999" and Kat 999) ---------- */
#hud {
  display: grid;
  grid-template-columns: minmax(96px, 1fr) auto auto auto auto;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1;
}
.hud-ico { width: 20px; height: 20px; flex: none; image-rendering: pixelated; }
.hud-hp { display: flex; align-items: center; gap: 3px; min-width: 0; }
.hud-chip {
  display: flex; align-items: center; gap: 2px;
  height: 24px;
  padding: 0 3px;
  box-sizing: border-box;
  background: var(--stone);
  border: 1px solid var(--stone-hi);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hud-chip.gold span:last-child { color: var(--gold); }
#remainText:empty { display: none; }
.bar { position: relative; height: 18px; background: var(--stone-lo); border: 1px solid var(--stone-hi); flex: 1; min-width: 0; }
.bar-fill { height: 100%; width: 100%; background: var(--blood); transition: width 0.25s steps(6); }
.bar-text { position: absolute; inset: 0; display: grid; place-items: center; font-size: 17px; text-shadow: 1px 1px 0 var(--stone-lo); }
.bar-xp { grid-column: 1 / -1; height: 4px; flex: none; border: 0; }
.bar-xp .bar-fill { background: var(--gold); }

/* ---------- View ---------- */
/* The dungeon view is the one full-bleed element: it spans the side gutters; text and controls keep them. */
#viewWrap {
  position: relative;
  flex: none;
  margin-left: calc(-1 * var(--gutter-l));
  margin-right: calc(-1 * var(--gutter-r));
  background: var(--stone-lo);
  border-block: 2px solid var(--stone-lo);
  line-height: 0;
}
#view {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  max-width: 100%;
}
/* Minimap sits over the view's top-right corner; display only, so swipes pass through. */
#minimap {
  position: absolute;
  top: 6px;
  right: calc(6px + env(safe-area-inset-right, 0px));
  width: 26%;
  max-width: 110px;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: rgba(8, 7, 12, 0.6);
  border: 1px solid var(--stone-hi);
  opacity: 0.9;
  pointer-events: none;
}
#toast {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top, 0px));
  left: 0; right: 0;
  margin: 0 auto;
  width: min(448px, calc(100% - 32px));
  box-sizing: border-box;
  z-index: 45;
  padding: 6px 8px;
  background: rgba(12, 10, 18, 0.9);
  border: 1px solid var(--stone-hi);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.1;
  text-align: center;
  color: var(--bone);
  pointer-events: none;
}

/* ---------- Bottom panel ---------- */
#panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.mode-panel { display: flex; flex-direction: column; gap: 6px; }
.hint {
  margin: 0;
  color: var(--dim);
  font-size: 17px;
  line-height: 1.1;
  text-align: center;
  text-wrap: balance;
}
.explore-hint {
  min-height: 2.2em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.btn {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--bone);
  background: var(--stone);
  padding: 8px 6px;
  min-height: 48px;
  cursor: pointer;
  touch-action: manipulation;
}
.btn:active, .btn.is-down {
  border-color: var(--stone-lo) var(--stone-hi) var(--stone-hi) var(--stone-lo);
  background: var(--stone-lo);
  transform: translateY(1px);
}
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn:disabled { color: var(--dim); opacity: 0.55; cursor: default; }
.btn-small { font-size: 19px; color: var(--dim); }
.btn-primary { color: var(--ink); background: var(--gold); font-size: 28px; }
.btn-primary:active { background: #b88d2c; }
.btn-primary:disabled { color: var(--ink); }

.dpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 60px;
  gap: 6px;
}
.btn-dir { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 20px; }
.arrow { width: 18px; height: 14px; background: var(--bone); }
.arrow.up { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.arrow.down { clip-path: polygon(0 0, 100% 0, 50% 100%); }
.arrow.turn-l { clip-path: polygon(0 50%, 45% 0, 45% 30%, 100% 30%, 100% 100%, 70% 100%, 70% 70%, 45% 70%, 45% 100%); }
.arrow.turn-r { clip-path: polygon(100% 50%, 55% 0, 55% 30%, 0 30%, 0 100%, 30% 100%, 30% 70%, 55% 70%, 55% 100%); }

/* ---------- Belt: Sol El | Çanta (5 slots, two taps to use) | Sağ El ---------- */
/* Kept apart from the pad and the hand so a slipped thumb does not land on it. */
.belt { display: grid; grid-template-columns: 1.3fr repeat(5, minmax(0, 1fr)) 1.3fr; gap: 5px; }
#beltExplore { margin-bottom: 10px; }
#beltCombat { margin: 6px 0 10px; }
.slot {
  position: relative;
  min-height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  background: var(--stone-lo);
  border: 2px solid;
  border-color: var(--stone-lo) var(--stone-hi) var(--stone-hi) var(--stone-lo);
  color: var(--bone);
  font-family: var(--font-display);
  cursor: pointer;
  touch-action: manipulation;
}
.slot img { width: 24px; height: 24px; image-rendering: pixelated; pointer-events: none; }
.slot-count {
  position: absolute; right: 3px; bottom: 0;
  font-size: 17px; line-height: 1;
  color: var(--bone);
  text-shadow: 1px 1px 0 var(--stone-lo);
  pointer-events: none;
}
.slot.empty { opacity: 0.45; cursor: default; }
.slot.off img { filter: grayscale(1) brightness(0.6); }
.slot.off .slot-count { color: var(--dim); }
.slot:disabled:not(.empty) { opacity: 0.5; cursor: default; }
.slot.armed { outline: 2px solid var(--gold); outline-offset: -2px; background: #2a2114; }
/* Hand slots: raised bronze frame so they read as "held", unlike the sunken bag pockets. */
.slot.hand-slot {
  background: #1c1610;
  border-color: #8a6a2a #3a2a10 #3a2a10 #8a6a2a;
}
.slot.hand-slot img { width: 32px; height: 32px; }
.slot.hand-slot.empty { opacity: 0.6; cursor: pointer; }
.slot.hand-slot.twohand img { opacity: 0.45; }
.belt .hand-lv {
  position: absolute; right: 2px; top: 1px;
  font-size: 14px; line-height: 1;
  color: var(--gold);
  pointer-events: none;
}
.slot.armed::after {
  content: "KULLAN";
  position: absolute; left: 50%; top: -11px;
  transform: translateX(-50%);
  padding: 0 3px;
  font-size: 14px; line-height: 1.1; letter-spacing: 0.05em;
  color: var(--ink); background: var(--gold);
  animation: pulse 1s steps(2) infinite;
  pointer-events: none;
}

/* ---------- Menü in the view's top-left corner (Deste is inside it), away from the pad ---------- */
.corner-btn {
  position: absolute;
  top: 6px; left: calc(6px + env(safe-area-inset-left, 0px));
  width: 44px; height: 44px;
  display: grid; place-items: center;
  padding: 0;
  background: rgba(8, 7, 12, 0.6);
  border: 1px solid var(--stone-hi);
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}
.corner-btn .bars {
  width: 20px; height: 14px;
  background: linear-gradient(var(--bone) 0 2px, transparent 2px 6px, var(--bone) 6px 8px, transparent 8px 12px, var(--bone) 12px 14px);
}

/* ---------- Combat ---------- */
.combat-info { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.mana { display: flex; gap: 4px; flex-wrap: wrap; }
.gem {
  width: 16px; height: 16px;
  background: var(--frost);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.gem.empty { background: var(--stone-hi); }
.gem.extra { background: var(--gold); }
.chain { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.chain-label { font-family: var(--font-display); font-size: 15px; letter-spacing: 0.2em; color: var(--dim); }
.chain-value { font-family: var(--font-display); font-size: 40px; color: var(--bone); text-shadow: 2px 2px 0 var(--stone-lo); }
.chain-value.pop { animation: pop 0.28s steps(4); }
.chain-value.perfect { color: var(--gold); }
@keyframes pop { 0% { transform: scale(1.7); } 100% { transform: scale(1); } }
.piles { justify-self: end; font-size: 16px; color: var(--dim); font-variant-numeric: tabular-nums; }
.btn-target { justify-self: end; min-height: 44px; padding: 4px 10px; color: var(--gold); }
.chain-hint { font-size: 15px; min-height: 2.2em; display: grid; place-items: center; }

.hand {
  display: flex;
  justify-content: center;
  height: 132px;
  padding-top: 10px;
  box-sizing: border-box;
}
.hand.two-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 50px;
  gap: 10px 6px;
  align-content: end;
  padding: 10px 6px 0;
}
.card {
  position: relative;
  flex: 0 0 auto;
  width: 72px;
  height: 118px;
  margin: 0 2px;
  padding: 13px 2px 3px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--stone);
  border-width: 3px;
  border-color: var(--rune) var(--rune-dark) var(--rune-dark) var(--rune);
  color: var(--bone);
  font-family: var(--font-body);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.12s steps(3);
}
.card:active { transform: translateY(-6px); }
.card[data-rarity="epic"] { background: linear-gradient(180deg, #3a1e4a, var(--stone) 45%); box-shadow: inset 0 0 0 1px #c05ad8; }
.card.unplayable { filter: grayscale(0.8) brightness(0.6); }
.card.link-1 { transform: translateY(-6px); box-shadow: 0 0 0 2px var(--venom); }
.card.link-2 { transform: translateY(-10px); box-shadow: 0 0 0 2px var(--gold), 0 0 12px var(--gold); }
.card.drawn { animation: draw-in 0.22s steps(4) backwards; }
@keyframes draw-in { from { transform: translateY(60px); opacity: 0; } }
.card-cost {
  position: absolute; top: -9px; left: -9px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 22px;
  color: var(--ink);
  background: var(--frost);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.card-badge {
  position: absolute; top: -10px; right: -6px;
  padding: 1px 4px;
  font-family: var(--font-display); font-size: 16px; line-height: 1;
  color: var(--ink);
  background: var(--bone);
}
.card.link-1 .card-badge { background: var(--venom); }
.card.link-2 .card-badge { background: var(--gold); }
.card-icon { width: 24px; height: 24px; image-rendering: pixelated; pointer-events: none; }
.card-name { font-family: var(--font-display); font-size: 16px; line-height: 1; text-align: center; min-height: 0; display: grid; place-items: center; }
.card-lv { color: var(--gold); font-family: var(--font-display); }
.card-name .card-lv { margin-left: 2px; }
.card-text { font-size: 15px; line-height: 0.9; text-align: center; color: var(--dim); }
.card-text b { color: var(--bone); font-weight: 400; }
.card-text b.boost { color: var(--gold); }
.card-num { font-family: var(--font-display); font-size: 24px; line-height: 1; color: var(--bone); }
.card-num.boost { color: var(--gold); }
.badge-new {
  position: absolute; right: -4px; bottom: -6px;
  padding: 0 3px;
  font-family: var(--font-display); font-size: 13px; line-height: 1.1;
  color: var(--ink); background: var(--gold);
}

/* 7–8 cards: two rows of compact cards (cost, 20-px icon, first number). */
.card.compact {
  width: auto;
  height: 50px;
  margin: 0;
  padding: 2px 4px 2px 10px;
  flex-direction: row;
  justify-content: center;
  gap: 4px;
}
.card.compact .card-icon { width: 20px; height: 20px; }
.card.compact .card-cost { width: 22px; height: 22px; font-size: 19px; top: -8px; left: -8px; }
.card.compact .card-badge { top: -9px; font-size: 14px; }
.card.compact .card-lv { position: absolute; right: 2px; bottom: 0; font-size: 14px; line-height: 1; }

/* Mini card (44×52): cost and icon only, used by the camp deck editor. */
.card.card-mini {
  width: 44px;
  height: 52px;
  margin: 0;
  padding: 14px 2px 2px;
  border-width: 2px;
  justify-content: center;
}
.card.card-mini .card-icon { width: 24px; height: 24px; }
.card.card-mini .card-cost { width: 20px; height: 20px; font-size: 17px; top: -6px; left: -6px; }
.card.card-mini .card-lv { position: absolute; right: 1px; bottom: 0; font-size: 14px; line-height: 1; }
.card.card-mini .badge-new { right: -6px; bottom: auto; top: -8px; }

.card-ghost { position: fixed; z-index: 30; pointer-events: none; animation: fly 0.32s steps(5) forwards; }
@keyframes fly { to { transform: translateY(-140px) scale(0.6); opacity: 0; } }

.combat-actions { display: grid; grid-template-columns: 1fr; gap: 6px; }
.combat-actions .btn { min-height: 52px; }

.pulse { animation: pulse 1s steps(2) infinite; }
@keyframes pulse { 0% { filter: none; } 50% { filter: brightness(1.45); } 100% { filter: none; } }

/* ---------- Overlay sheet (anchored low, for the thumb) ---------- */
#overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(8, 7, 12, 0.72);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  touch-action: none;
}
.sheet {
  width: 100%;
  max-width: 448px;
  max-height: 86%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 12px 12px;
  box-sizing: border-box;
  background: var(--stone);
  overflow: hidden;
}
.sheet.tall { max-height: 94%; }
.sheet-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  line-height: 1;
  color: var(--gold);
  text-align: center;
  text-wrap: balance;
  text-shadow: 2px 2px 0 var(--stone-lo);
}
.sheet-title.big { font-size: 56px; }
.sheet-body { flex: 0 1 auto; min-height: 0; font-size: 19px; line-height: 1.15; text-align: center; overflow-y: auto; touch-action: pan-y; }
.sheet-body p { margin: 0 0 6px; }
.sheet-body .hint { margin-top: 4px; }
.sheet-body .rule { display: flex; gap: 8px; align-items: center; text-align: left; margin-bottom: 6px; }
.sheet-body .rule-tag { flex: none; font-family: var(--font-display); font-size: 17px; padding: 2px 5px; color: var(--ink); background: var(--venom); }
.sheet-body .rule-tag.gold { background: var(--gold); }
.sheet-body .rule-tag.red { background: var(--blood); color: var(--bone); }
.sheet-choices { flex: 0 1 auto; min-height: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 14px 6px; padding-top: 12px; overflow-y: auto; touch-action: pan-y; }
.sheet-choices.deck { max-height: 52vh; }
.sheet-choices .choice-btn { flex: 1 1 100%; min-height: 54px; }
.sheet-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.sheet-actions.stack { grid-auto-flow: row; grid-auto-columns: auto; }
.sheet-actions .btn { min-height: 54px; }
.sheet-actions .btn-primary { font-size: 24px; }

/* ---------- Kahraman picker (screens.js showHeroPicker) ---------- */
.sheet-choices .hero-choice {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 8px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.1;
}
.hero-choice .hero-face { flex: none; width: 48px; height: 48px; image-rendering: pixelated; margin-top: -6px; }
.hero-choice .hero-shadow { filter: brightness(0); opacity: 0.85; }
.hero-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hero-name { font-family: var(--font-display); font-size: 24px; line-height: 1; }
.hero-name .badge-new { position: static; display: inline-block; vertical-align: middle; padding: 0 4px; font-size: 14px; }
.hero-line { color: var(--bone); }
.hero-line.dim { color: var(--dim); }
.hero-lock { color: var(--blood); }
.sheet-choices .hero-choice.on { border-color: var(--gold); }
.sheet-choices .hero-choice.on:disabled { opacity: 1; color: var(--bone); }

/* ---------- Card reveal (chests): rise out of the chest, spin, land face up ---------- */
#reveal {
  position: fixed;
  inset: 0;
  z-index: 41;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(8, 7, 12, 0.9);
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  touch-action: none;
}
.reveal-stage {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  position: relative;
  display: grid;
  place-items: center;
  perspective: 700px;
}
.reveal-glow {
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 62%);
  opacity: 0;
  pointer-events: none;
}
.reveal-card { transform: scale(1.8); animation: reveal-rise 0.7s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
.reveal-flip {
  position: relative;
  width: 72px; height: 118px;
  transform-style: preserve-3d;
  animation: reveal-spin 1.7s cubic-bezier(0.12, 0.7, 0.22, 1) both;
}
.reveal-face { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.reveal-front .card { margin: 0; pointer-events: none; }
.reveal-back {
  transform: rotateY(180deg);
  box-sizing: border-box;
  display: grid;
  place-items: center;
  border: 3px solid;
  border-color: var(--gold) #7a5a1a #7a5a1a var(--gold);
  background: repeating-linear-gradient(45deg, #2a2114 0 4px, var(--stone) 4px 8px);
}
.reveal-back img { width: 30px; height: 30px; image-rendering: pixelated; }
#reveal.skip .reveal-card, #reveal.skip .reveal-flip { animation: none; }
#reveal.done .reveal-glow { animation: reveal-glow 1.1s ease-out forwards; }
@keyframes reveal-rise {
  from { transform: translateY(40vh) scale(0.35); opacity: 0; }
  20% { opacity: 1; }
  to { transform: translateY(0) scale(1.8); opacity: 1; }
}
@keyframes reveal-spin { from { transform: rotateY(-1620deg); } to { transform: rotateY(0deg); } }
@keyframes reveal-glow { 0% { opacity: 0; transform: scale(0.4); } 40% { opacity: 0.95; } 100% { opacity: 0.55; transform: scale(1); } }
.reveal-info {
  width: 100%;
  max-width: 448px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s steps(3);
  pointer-events: none;
}
#reveal.done .reveal-info { opacity: 1; pointer-events: auto; }
.reveal-name { margin: 0; font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--bone); }
.reveal-name span { font-size: 18px; color: var(--glow); }
.reveal-lines { margin: 0; font-size: 18px; color: var(--gold); min-height: 1em; }
.reveal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.reveal-actions .btn { min-height: 56px; }

/* ---------- Rehber (tutor.js): a lit ring on the control and a speech bubble beside it ---------- */
/* Display only: taps pass through to the game, except on the bubble's own buttons. */
#coach { position: fixed; inset: 0; z-index: 35; pointer-events: none; }
#adOverlay {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 24px; background: var(--ink); color: var(--bone); text-align: center; font-family: var(--font-body);
}
#adOverlay .ad-title { font-size: 28px; color: var(--gold); }
#adOverlay .ad-note { font-size: 18px; color: var(--dim); max-width: 280px; }
#adOverlay .ad-count { font-size: 48px; }
/* Four plain panels dim everything around the target (a huge box-shadow spread is not drawn everywhere). */
.coach-dim { position: fixed; background: rgba(8, 7, 12, 0.5); }
.coach-ring {
  position: fixed;
  box-sizing: border-box;
  border: 2px solid var(--gold);
  box-shadow: 0 0 10px 2px rgba(242, 193, 78, 0.55);
  animation: coach-ring 1s steps(2) infinite;
}
@keyframes coach-ring { 50% { border-color: #fff3c4; } }
.coach-bubble {
  position: fixed;
  box-sizing: border-box;
  padding: 8px 10px;
  background: var(--stone);
  border: 2px solid var(--gold);
  box-shadow: 3px 3px 0 var(--stone-lo);
  pointer-events: auto;
  animation: coach-pop 0.18s steps(3) both;
}
.coach-bubble::after {
  content: '';
  position: absolute;
  left: var(--ax, 50%);
  width: 12px; height: 12px;
  margin-left: -7px;
  background: var(--stone);
  border: 2px solid var(--gold);
  transform: rotate(45deg);
}
.coach-bubble.below::after { top: -8px; border-right: 0; border-bottom: 0; }
.coach-bubble.above::after { bottom: -8px; border-left: 0; border-top: 0; }
.coach-text { margin: 0; font-size: 19px; line-height: 1.15; color: var(--bone); }
.coach-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.coach-row .btn { min-height: 40px; padding: 4px 12px; }
.coach-skip { border: 0; background: none; padding-left: 0; font-size: 17px; text-decoration: underline; }
.coach-ok { font-size: 21px; color: var(--ink); }
@keyframes coach-pop { from { transform: scale(0.9); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .reveal-card, .reveal-flip, .reveal-glow, .reveal-info { animation: none !important; transition: none !important; }
  .coach-ring, .coach-bubble { animation: none; }
  .card, .card.drawn, .chain-value.pop, .card-ghost, .bar-fill, .pulse, .slot.armed, .slot.armed::after { animation: none; transition: none; }
}
