/* ===== game.css — Blacksmith Scavenger prototype ===== */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=Cinzel:wght@400;600&display=swap');

:root {
  --ink: #3a2418;
  --parchment: #f4e8c8;
  --parchment-br: #faf0d8;
  --parchment-dk: #d4b88a;
  --wax: #8b1a1a;
  --gold: #b88b3a;
  --gold-br: #f4d68a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  background: #0a0705;
  font-family: 'Lora', Georgia, serif;
}

#game {
  display: block;
  width: 100vw; height: 100vh;
  cursor: crosshair;
}

/* ===== overlays ===== */
.overlay {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8, 5, 3, 0.72);
  z-index: 10;
}
.overlay.hidden { display: none; }

.panel {
  background:
    radial-gradient(ellipse at 20% 12%, #faf0d8 0%, transparent 55%),
    linear-gradient(135deg, #f4e8c8 0%, #e2cda0 100%);
  color: var(--ink);
  border: 2px solid #5a4030;
  border-radius: 3px;
  box-shadow: inset 0 0 60px rgba(139, 80, 30, 0.25), 0 18px 50px rgba(0, 0, 0, 0.8);
  padding: 34px 44px;
  max-width: 640px;
  width: min(92vw, 640px);
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  text-align: center;
}

.panel h1 {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  font-size: 2.1em;
  margin: 0 0 4px;
  letter-spacing: 0.04em;
}
.panel h2 {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  font-size: 1.1em;
  color: var(--wax);
  margin: 18px 0 8px;
}
.tagline { font-style: italic; color: #5a4030; margin: 0 0 20px; }

.seal {
  width: 72px; height: 72px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #d24848 0%, #8b1a1a 50%, #5a0e0e 100%);
  display: flex; align-items: center; justify-content: center;
  color: var(--parchment);
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 1.9em;
  box-shadow: inset -3px -4px 8px rgba(0,0,0,0.55), inset 3px 3px 6px rgba(255,180,180,0.3), 3px 5px 12px rgba(0,0,0,0.5);
  transform: rotate(-6deg);
}

.best-line { font-style: italic; color: #7a5a38; font-size: 0.92em; margin: 14px 0 0; }

.controls { text-align: left; margin-top: 10px; }
.ctl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 18px;
  font-size: 0.92em;
  color: #4a3222;
}
.ctl-grid b {
  font-family: 'Cinzel', serif;
  color: var(--wax);
  font-weight: 600;
}
.lore {
  font-size: 0.9em;
  font-style: italic;
  color: #5a4030;
  border-top: 1px dashed var(--parchment-dk);
  margin-top: 14px;
  padding-top: 12px;
  line-height: 1.55;
}


/* ===== buttons ===== */
.btn {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  background: var(--wax);
  color: var(--parchment-br);
  border: 2px solid #5a0e0e;
  box-shadow: 2px 3px 0 #5a0e0e;
  padding: 9px 20px;
  font-size: 0.95em;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}
.btn:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 3px 4px 0 #5a0e0e; }
.btn:active:not(:disabled) { transform: translate(1px, 2px); box-shadow: 1px 1px 0 #5a0e0e; }
.btn:disabled { opacity: 0.45; cursor: default; filter: grayscale(0.4); }
.btn.big { font-size: 1.15em; padding: 13px 34px; margin: 8px 0; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 2px 3px 0 #8a6a4a;
  margin-left: 10px;
}

.close-x {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none;
  font-size: 1.2em; color: var(--wax);
  cursor: pointer;
  font-family: Georgia, serif;
}
.close-x:hover { color: #b83838; }

/* ===== shop ===== */
.shop-panel { max-width: 720px; width: min(94vw, 720px); text-align: left; }
.shop-panel h1 { text-align: center; }

.shop-tabs {
  display: flex; justify-content: center;
  gap: 0; margin: 6px 0 16px;
  border-bottom: 2px solid var(--ink);
}
.tab-btn {
  font-family: 'Cinzel', serif; font-weight: 600;
  letter-spacing: 0.08em;
  background: rgba(212, 184, 138, 0.4);
  border: 2px solid var(--ink);
  border-bottom: none;
  color: #5a4030;
  padding: 8px 22px;
  margin-right: -2px;
  cursor: pointer;
}
.tab-btn.active { background: var(--parchment-br); color: var(--wax); }

.shop-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .shop-list { grid-template-columns: 1fr; } }

.shop-item {
  background: rgba(255, 248, 220, 0.55);
  border: 1.5px solid #8a6a4a;
  padding: 10px 14px;
  display: flex; flex-direction: column; gap: 5px;
}
.shop-item.locked {
  opacity: 0.55;
  border-style: dashed;
  filter: grayscale(0.5);
}
.si-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.si-head strong { font-family: 'Cinzel', serif; font-weight: 600; color: var(--wax); font-size: 0.95em; }
.cost { color: var(--gold); font-style: italic; white-space: nowrap; }
.si-flavor { font-size: 0.85em; font-style: italic; color: #5a4030; }
.si-mats { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.8em; }
.si-block { font-size: 0.8em; color: var(--wax); font-style: italic; }
.shop-item .btn { align-self: flex-start; font-size: 0.8em; padding: 6px 14px; margin-top: 2px; }

.mat { color: #4a3222; white-space: nowrap; }
.mat i {
  display: inline-block; width: 9px; height: 9px;
  border-radius: 2px; margin-right: 4px;
  border: 1px solid rgba(58, 36, 24, 0.5);
  vertical-align: baseline;
}
.mat em { color: #8a6a4a; font-style: normal; font-size: 0.9em; }
.mat.lack { color: var(--wax); }
.mat.lack em { color: var(--wax); }

.durbar {
  display: inline-block; width: 90px; height: 8px;
  background: rgba(58, 36, 24, 0.25);
  border: 1px solid #5a4030;
  vertical-align: middle;
  margin-left: 6px;
}
.durbar span { display: block; height: 100%; }

.pip {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 50%;
  border: 1px solid #5a4030;
  background: rgba(58, 36, 24, 0.15);
  margin-right: 3px;
  vertical-align: middle;
}
.pip.on { background: var(--wax); }

.shop-empty, .shop-note { font-style: italic; color: #5a4030; text-align: center; }
.shop-h3 {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  color: var(--wax);
  text-align: center;
  margin: 18px 0 10px;
  border-top: 1px dashed var(--parchment-dk);
  padding-top: 12px;
}
.purse-line {
  text-align: center;
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px dashed var(--parchment-dk);
  color: #4a3222;
}
.purse-line strong { color: var(--gold); font-family: 'Cinzel', serif; }

.ledger table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}
.ledger td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--parchment-dk);
}
.ledger td:last-child { text-align: right; font-family: 'Cinzel', serif; color: var(--wax); }
.ledger h3 { font-family: 'Cinzel', serif; color: var(--wax); margin: 10px 0 6px; font-weight: 600; }

.gate-panel { text-align: center; }
.gate-quota {
  font-family: 'Cinzel', serif; font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink);
  margin-top: 6px;
}
.gate-quota.big {
  font-size: 2.2em;
  color: var(--wax);
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.8);
  margin: 4px 0 10px;
}

.small-panel { max-width: 480px; }

/* ===== the title screen (canvas paints the scene; this is the lettering) ===== */
.title-overlay {
  background: transparent;
  flex-direction: column;
  justify-content: flex-start;
}
.title-top {
  margin-top: 9vh;
  text-align: center;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.9);
}
.title-orn {
  color: #b88b3a;
  opacity: 0.85;
  letter-spacing: 0.2em;
  font-size: 0.95em;
  text-shadow: 0 0 12px rgba(216, 160, 70, 0.35);
}
.title-main {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: clamp(2.2em, 6.4vw, 4.4em);
  letter-spacing: 0.05em;
  color: #d8a94e;
  margin: 10px 0 2px;
  text-shadow:
    0 0 26px rgba(216, 150, 60, 0.35),
    0 1px 0 #7a5518,
    0 3px 4px rgba(0, 0, 0, 0.9);
}
.title-sub {
  font-style: italic;
  color: #c8a06a;
  font-size: clamp(1em, 2.1vw, 1.4em);
  margin: 4px 0 0;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}
.press-plate {
  position: absolute;
  bottom: 12vh;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: clamp(0.95em, 1.7vw, 1.3em);
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: #ecc87e;
  background: rgba(22, 13, 6, 0.62);
  border: 2px solid #c89a4a;
  outline: 1px solid rgba(200, 154, 74, 0.45);
  outline-offset: 4px;
  padding: 16px 44px;
  cursor: pointer;
  box-shadow: 0 0 26px rgba(216, 160, 70, 0.25), inset 0 0 20px rgba(216, 160, 70, 0.12);
  animation: platePulse 2.8s ease-in-out infinite;
}
.press-plate::before, .press-plate::after {
  content: '◆';
  position: absolute;
  top: 50%;
  transform: translateY(-52%);
  font-size: 0.7em;
  color: #c89a4a;
  text-shadow: 0 0 8px rgba(216, 160, 70, 0.6);
}
.press-plate::before { left: -34px; }
.press-plate::after { right: -34px; }
.press-plate:hover {
  color: #fff0c8;
  border-color: #eec06a;
  box-shadow: 0 0 42px rgba(232, 180, 90, 0.5), inset 0 0 24px rgba(216, 160, 70, 0.22);
}
@keyframes platePulse {
  0%, 100% { box-shadow: 0 0 22px rgba(216, 160, 70, 0.2), inset 0 0 18px rgba(216, 160, 70, 0.1); }
  50%      { box-shadow: 0 0 40px rgba(232, 180, 90, 0.45), inset 0 0 24px rgba(216, 160, 70, 0.2); }
}
.title-best {
  position: absolute;
  left: 34px;
  bottom: 30px;
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #caa562;
  font-size: 1.05em;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.9);
}
.title-links {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 26px;
}
.title-links a.tome-link,
.title-controls summary {
  font-style: italic;
  color: rgba(202, 165, 98, 0.75);
  font-size: 0.92em;
  text-decoration: none;
  cursor: pointer;
  list-style: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}
.title-links a.tome-link:hover,
.title-controls summary:hover { color: #ecc87e; }
.title-controls { position: relative; }
.title-controls summary::-webkit-details-marker { display: none; }
.tc-pop {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  width: min(88vw, 560px);
  background: rgba(16, 10, 5, 0.94);
  border: 1.5px solid #8a6a3a;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
  padding: 16px 20px;
}
.tc-pop .ctl-grid { color: #c8b088; }
.tc-pop .ctl-grid b { color: #e8b45a; }

/* ===== the death screen ===== */
.death-overlay {
  flex-direction: column;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(90, 16, 12, 0.55) 0%, rgba(40, 8, 6, 0.35) 40%, rgba(0, 0, 0, 0) 75%),
    radial-gradient(ellipse at 50% 50%, #1c0606 0%, #120404 55%, #080202 100%);
}
.death-emblem {
  filter: drop-shadow(0 0 14px rgba(140, 30, 20, 0.5));
  margin-bottom: 4px;
  animation: emberBreathe 3.2s ease-in-out infinite;
}
@keyframes emberBreathe {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(140, 30, 20, 0.35)); }
  50%      { filter: drop-shadow(0 0 20px rgba(170, 40, 26, 0.6)); }
}
.death-title {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: clamp(2.2em, 5.8vw, 4em);
  letter-spacing: 0.09em;
  color: #a32220;
  margin: 8px 0 2px;
  text-shadow:
    0 0 30px rgba(150, 30, 20, 0.55),
    0 1px 0 #4a0c0a,
    0 3px 5px rgba(0, 0, 0, 0.95);
}
.death-sub {
  font-style: italic;
  color: #8d7b68;
  font-size: clamp(1em, 1.9vw, 1.25em);
  margin: 2px 0 30px;
}
.death-plaque {
  background:
    radial-gradient(ellipse at 24% 14%, #faf0d8 0%, transparent 55%),
    linear-gradient(150deg, #efe0ba 0%, #d9bf90 100%);
  border: 2px solid #4a3424;
  border-radius: 8px;
  outline: 1px solid rgba(74, 52, 36, 0.5);
  outline-offset: 4px;
  box-shadow: inset 0 0 40px rgba(120, 70, 30, 0.3), 0 16px 50px rgba(0, 0, 0, 0.85);
  padding: 22px 46px;
}
.death-plaque table { border-collapse: collapse; }
.death-plaque td {
  padding: 5px 4px;
  font-size: 1.15em;
  color: #3a2418;
}
.death-plaque td:first-child { text-align: left; padding-right: 34px; }
.death-plaque td:last-child {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  color: #4a2c1a;
}
.death-btns {
  display: flex;
  gap: 26px;
  margin-top: 32px;
}
.plaque-btn {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 1.1em;
  color: #3a2418;
  background:
    radial-gradient(ellipse at 30% 20%, #f6ecd0 0%, transparent 60%),
    linear-gradient(150deg, #e9d8ae 0%, #cfb384 100%);
  border: 2px solid #4a3424;
  border-radius: 4px;
  outline: 1px solid rgba(74, 52, 36, 0.45);
  outline-offset: 3px;
  box-shadow: inset 0 0 18px rgba(120, 70, 30, 0.25), 0 8px 24px rgba(0, 0, 0, 0.7);
  padding: 13px 30px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}
.plaque-btn:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 0 18px rgba(120, 70, 30, 0.25), 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 18px rgba(200, 150, 70, 0.25);
}
.plaque-btn:active { transform: translateY(1px); }
.death-best {
  margin-top: 22px;
  font-style: italic;
  color: #6e5c4a;
  font-size: 0.95em;
}

/* ===== shop item icon chips ===== */
.si-name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.si-ic {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  background: radial-gradient(circle at 34% 28%, #3a2c1c 0%, #1e150c 75%);
  border: 1.5px solid #8a6a4a;
  border-radius: 5px;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.si-ic img { width: 26px; height: 26px; image-rendering: auto; }
.shop-item.locked .si-ic { filter: grayscale(0.8) brightness(0.7); }


/* ===== character selection ===== */
#charselect { overflow-y: auto; }
.cs-top { margin-top: 6vh; text-align: center; text-shadow: 0 2px 3px rgba(0,0,0,0.9); }
.cs-head {
  font-family: 'Cinzel', Georgia, serif;
  color: #f4d68a;
  letter-spacing: 0.14em;
  font-size: clamp(1.2em, 2.6vw, 2em);
  margin: 6px 0 0;
}
.cs-grid {
  display: flex;
  gap: 22px;
  margin: 4vh auto 0;
  padding: 0 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.cs-card {
  display: flex; flex-direction: column; align-items: center;
  width: 200px;
  padding: 18px 14px 16px;
  background: linear-gradient(180deg, rgba(26,18,12,0.92), rgba(14,10,7,0.94));
  border: 1px solid rgba(196,150,70,0.4);
  border-radius: 4px;
  color: #d8c8a8;
  cursor: pointer;
  font: inherit;
  box-shadow: 0 10px 30px rgba(0,0,0,0.7);
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.cs-card:hover {
  transform: translateY(-4px);
  border-color: #f4d68a;
  box-shadow: 0 14px 34px rgba(0,0,0,0.8), 0 0 22px rgba(244,214,138,0.18);
}
.cs-face {
  width: 96px; height: 96px;
  object-fit: contain;
  image-rendering: pixelated;
  margin-bottom: 6px;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.6));
}
.cs-name {
  font-family: 'Cinzel', Georgia, serif;
  color: #f4d68a;
  letter-spacing: 0.08em;
  font-size: 1.05em;
  margin-bottom: 8px;
}
.cs-stats { display: flex; flex-direction: column; gap: 2px; font-size: 0.82em; margin-bottom: 8px; }
.cs-hp { color: #d86a5a; }
.cs-st { color: #d8b45a; }
.cs-ae { color: #7ab0e0; }
.cs-da { color: #9adcf8; }
.cs-weapon { font-size: 0.85em; color: #c8b070; margin-bottom: 8px; }
.cs-blurb { font-style: italic; font-size: 0.74em; color: #9a8a72; line-height: 1.35; }
.cs-back { margin: 3.5vh auto 4vh; }

/* ===== sound settings ===== */
.gear-btn {
  position: absolute;
  top: 18px; right: 22px;
  z-index: 12;
  background: rgba(20,14,9,0.8);
  border: 1px solid rgba(196,150,70,0.5);
  border-radius: 4px;
  color: #f4d68a;
  font-size: 1.35em;
  width: 44px; height: 44px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.gear-btn:hover { transform: rotate(30deg); box-shadow: 0 0 14px rgba(244,214,138,0.3); }
.sound-panel {
  position: absolute;
  top: 70px; right: 22px;
  z-index: 12;
  width: 230px;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(26,18,12,0.96), rgba(14,10,7,0.97));
  border: 1px solid rgba(196,150,70,0.5);
  border-radius: 4px;
  color: #d8c8a8;
  box-shadow: 0 12px 30px rgba(0,0,0,0.8);
}
.sound-panel.hidden { display: none; }
.sound-panel h3 {
  margin: 0 0 10px;
  font-family: 'Cinzel', Georgia, serif;
  color: #f4d68a;
  letter-spacing: 0.1em;
  font-size: 1em;
}
.sp-row { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 0.85em; }
.sp-row input[type="range"] { width: 100%; accent-color: #c89a4a; }
.sp-mute { flex-direction: row; align-items: center; gap: 8px; }
.sp-mute input { accent-color: #c89a4a; }
#sp-close { width: 100%; margin-top: 2px; }

/* card item lines */
.cs-item { font-size: 0.82em; color: #a8c8a0; margin-bottom: 2px; }
.cs-itemdesc { font-size: 0.7em; color: #8a9a80; font-style: italic; margin-bottom: 8px; line-height: 1.3; }

/* ===== the portal's two roads ===== */
.dest-row { display: flex; gap: 18px; justify-content: center; align-items: stretch; margin: 12px 0 4px; }
.dest-card {
  flex: 1; max-width: 268px;
  padding: 14px 12px 16px;
  background: linear-gradient(180deg, rgba(30,22,14,0.92), rgba(15,10,6,0.96));
  border: 1px solid rgba(196,150,70,0.4);
  border-radius: 6px;
  text-align: center;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.dest-card.open-road:hover {
  transform: translateY(-4px);
  border-color: rgba(244,214,138,0.85);
  box-shadow: 0 10px 26px rgba(0,0,0,0.6), 0 0 20px rgba(244,214,138,0.22);
}
.dest-art {
  display: block; width: 176px; margin: 0 auto 8px;
  image-rendering: pixelated;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.65));
}
.locked-road .dest-art { filter: grayscale(0.65) brightness(0.6) drop-shadow(0 6px 10px rgba(0,0,0,0.65)); }
.dest-plate {
  display: flex; align-items: center; justify-content: center;
  width: 100%; max-width: 236px; height: 46px; margin: 0 auto 4px;
  background: url('../assets/ui/dest-plate.png') center / 100% 100% no-repeat;
  image-rendering: pixelated;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.88em; color: #f4d68a; letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.95);
}
.locked-road .dest-plate { color: #a09078; filter: grayscale(0.5) brightness(0.75); }
.dest-sub {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 0.7em; letter-spacing: 0.1em;
  color: #c8b070; margin-bottom: 6px;
}
.locked-road .dest-sub { color: #8a7a62; }
.dest-quota {
  font-size: 0.8em; font-style: italic; line-height: 1.45;
  color: #b8a888; margin-bottom: 10px; min-height: 2.9em;
}
.dest-card .btn.big { width: 92%; }
.dest-card .btn[disabled] { opacity: 0.4; cursor: default; }

/* ===== the night's favor: reward cards ===== */
#cards { background: rgba(8,5,3,0.55); }
.rw-head { margin-top: 10vh; text-align: center; text-shadow: 0 2px 3px rgba(0,0,0,0.9); }
.rw-sub { color: #a8946a; font-style: italic; margin-top: 6px; }
.rw-row { display: flex; gap: 34px; margin-top: 6vh; perspective: 1100px; }
.rw-card {
  width: 158px; height: 232px;
  background: none; border: none; padding: 0;
  cursor: pointer;
  opacity: 0;
  transform: translateY(60px) scale(0.65);
  transition: transform 0.35s cubic-bezier(.2,1.4,.4,1), opacity 0.3s;
}
.rw-card.dealt { opacity: 1; transform: none; }
.rw-card.dealt:hover:not(.flipped) { transform: translateY(-10px) scale(1.04); }
.rw-card.dimmed { opacity: 0.4; }
.rw-inner {
  position: relative; display: block; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(.3,1.2,.4,1);
}
.rw-card.flipped .rw-inner { transform: rotateY(180deg); }
.rw-back, .rw-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: 8px;
  border: 1px solid rgba(196,150,70,0.55);
  box-shadow: 0 14px 34px rgba(0,0,0,0.75);
}
.rw-back {
  background:
    url('../assets/ui/card-back.png') center / cover no-repeat,
    radial-gradient(ellipse at 50% 40%, #2a2036 0%, #17111f 70%);
  image-rendering: pixelated;
}
.rw-face {
  transform: rotateY(180deg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 12px;
  background:
    radial-gradient(ellipse at 30% 15%, #faf0d8 0%, transparent 55%),
    linear-gradient(135deg, #f4e8c8 0%, #dcc79a 100%);
}
.rw-art {
  width: 64px; height: 64px;
  image-rendering: pixelated;
  margin-bottom: 12px;
  filter: drop-shadow(0 3px 5px rgba(58,40,20,0.35));
}
.rw-title { font-family: 'Cinzel', Georgia, serif; font-size: 1.12em; line-height: 1.35; color: #4a3423; }
.rw-title.rw-hp { color: #a03426; }
.rw-title.rw-st { color: #8a6a1e; }
.rw-title.rw-ae { color: #2c5d8f; }
.rw-title.rw-gold { color: #8a6a1e; }
.rw-title.rw-mat { color: #4c5a35; }
.rw-card.chosen .rw-face { box-shadow: 0 0 26px rgba(244,214,138,0.55), 0 14px 34px rgba(0,0,0,0.75); }
