:root {
  --wood-1: #3a2416;
  --wood-2: #24160d;
  --parch: #f3e6c8;
  --parch-2: #e6d2a6;
  --ink: #2b1d12;
  --ink-soft: #5b4630;
  --navy: #1d2f5e;
  --navy-2: #12204a;
  --crimson: #a3211e;
  --crimson-2: #7c1513;
  --gold: #e2b85a;
  --gold-2: #b8862e;
  --sea: #1d7d7a;
  --ok: #2f7d32;
  --card-w: 104px;
  --radius: 12px;
  --display: 'Cinzel', Georgia, serif;
  --deco: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
  --body: 'Alegreya', Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--body);
  color: var(--parch);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 200, 120, .12), transparent 60%),
    repeating-linear-gradient(92deg, rgba(0,0,0,.08) 0 3px, transparent 3px 11px),
    linear-gradient(180deg, var(--wood-1), var(--wood-2));
  background-color: var(--wood-2);
  min-height: 100vh;
  overflow-x: hidden;
}
button { font: inherit; }
[hidden] { display: none !important; }

/* ---------- telas ---------- */
.screen { display: none; min-height: 100vh; padding: 24px 16px; }
.screen.active { display: flex; align-items: center; justify-content: center; }
#scr-game.screen { padding: 0; }
#scr-game.screen.active { display: block; }

.parchment {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.35), transparent 60%),
    linear-gradient(180deg, var(--parch), var(--parch-2));
  color: var(--ink);
  border-radius: 16px;
  padding: 28px clamp(18px, 4vw, 40px);
  box-shadow: 0 20px 60px rgba(0,0,0,.55), inset 0 0 0 2px rgba(184,134,46,.55), inset 0 0 40px rgba(120,80,30,.25);
  width: 100%;
  max-width: 640px;
  position: relative;
}
.parchment.narrow { max-width: 520px; }
.parchment.wide { max-width: 1100px; }
.parchment.rules { max-width: 860px; }
.parchment h2 { font-family: var(--display); font-weight: 800; color: var(--navy); margin: 0 0 12px; font-size: 1.7rem; }
.parchment h3 { font-family: var(--display); color: var(--crimson-2); margin: 22px 0 8px; }
.parchment p { line-height: 1.5; }

.logo {
  font-family: var(--deco);
  font-weight: 900;
  font-size: clamp(2.8rem, 9vw, 4.6rem);
  margin: 0;
  text-align: center;
  color: var(--navy);
  letter-spacing: .02em;
  text-shadow: 0 2px 0 var(--gold), 0 4px 0 rgba(0,0,0,.15);
}
.tagline { text-align: center; font-size: 1.15rem; color: var(--ink-soft); font-style: italic; margin-top: 4px; }
.menu-buttons { display: grid; gap: 12px; max-width: 360px; margin: 24px auto 8px; }
.menu-cards { display: flex; justify-content: center; margin-top: 20px; height: 150px; }
.menu-cards img { width: 96px; border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,.4); }
.menu-cards img:nth-child(1) { transform: rotate(-12deg) translate(18px, 10px); }
.menu-cards img:nth-child(2) { z-index: 1; transform: translateY(-6px); }
.menu-cards img:nth-child(3) { transform: rotate(12deg) translate(-18px, 10px); }

/* ---------- botões ---------- */
.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: .03em;
  padding: 10px 18px;
  border-radius: 10px;
  color: var(--parch);
  background: linear-gradient(180deg, #2b4382, var(--navy-2));
  box-shadow: inset 0 0 0 2px var(--gold-2), 0 3px 0 rgba(0,0,0,.35);
  transition: transform .08s, filter .15s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(2px); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.primary { background: linear-gradient(180deg, #c33a2f, var(--crimson-2)); }
.btn.sea { background: linear-gradient(180deg, #2a9a95, #135a58); }
.btn.ghost { background: rgba(0,0,0,.08); color: inherit; box-shadow: inset 0 0 0 2px rgba(184,134,46,.7); }
.btn.big { font-size: 1.1rem; padding: 14px 20px; }
.btn.small { font-size: .85rem; padding: 6px 12px; }
.row { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.row.center { justify-content: center; }
.row.between { justify-content: space-between; margin-top: 0; }

.field { display: grid; gap: 6px; margin: 16px 0; font-weight: 600; border: 0; padding: 0; }
.field legend { font-weight: 600; margin-bottom: 6px; }
.field input:not([type=radio]) {
  font: inherit; padding: 10px 12px; border-radius: 8px; border: 2px solid var(--gold-2);
  background: #fffaf0; color: var(--ink);
}
.radio { display: inline-flex; gap: 6px; align-items: center; margin-right: 16px; font-weight: 400; cursor: pointer; }
.badge {
  display: inline-block; font-family: var(--display); font-size: .8rem; padding: 3px 10px; border-radius: 999px;
  background: var(--navy); color: var(--parch); box-shadow: inset 0 0 0 1px var(--gold-2);
}
.lv-facil { background: #3d7a3a; } .lv-medio { background: #8a6a1c; } .lv-dificil { background: var(--crimson-2); } .lv-lendario { background: #4b2a7a; }

/* ---------- escolha de nível ---------- */
.level-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.level-card {
  text-align: left; padding: 14px; border-radius: 12px; cursor: pointer; border: 0;
  background: #fffaf0; color: var(--ink); box-shadow: inset 0 0 0 2px var(--gold-2), 0 3px 0 rgba(0,0,0,.2);
}
.level-card:hover { background: #fff; }
.level-card strong { display: block; font-family: var(--display); font-size: 1.1rem; margin: 6px 0 2px; }
.level-card span.d { font-size: .92rem; color: var(--ink-soft); }

/* ---------- chave do torneio ---------- */
.bracket-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bracket-head h2 { margin: 0; flex: 1; }
.bracket { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; align-items: stretch; }
.b-col { display: flex; flex-direction: column; justify-content: space-around; gap: 12px; }
.b-col h4 { font-family: var(--display); text-align: center; margin: 0 0 4px; color: var(--crimson-2); font-size: .95rem; }
.b-match {
  background: #fffaf0; border-radius: 10px; box-shadow: inset 0 0 0 2px rgba(184,134,46,.6);
  overflow: hidden; font-size: .95rem;
}
.b-match.current { box-shadow: inset 0 0 0 3px var(--crimson), 0 0 0 3px rgba(163,33,30,.2); }
.b-p { display: flex; align-items: center; gap: 8px; padding: 7px 10px; min-height: 38px; }
.b-p + .b-p { border-top: 1px dashed rgba(184,134,46,.6); }
.b-p .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-p .sc { font-family: var(--display); font-weight: 800; min-width: 1.2em; text-align: right; }
.b-p.win { font-weight: 800; }
.b-p.lose { opacity: .5; text-decoration: line-through; }
.b-p.you .nm::after { content: ' (você)'; color: var(--crimson); font-weight: 600; font-size: .85em; }
.b-p.tbd { color: #a08b6a; font-style: italic; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.champ-box { text-align: center; padding: 16px 8px; background: #fffaf0; border-radius: 12px; box-shadow: inset 0 0 0 2px var(--gold-2); }
.champ-box .trophy { font-size: 2.6rem; line-height: 1; }
.champ-box .nm { font-family: var(--display); font-weight: 800; margin-top: 6px; }
.bracket-msg { text-align: center; margin-top: 18px; font-size: 1.1rem; min-height: 1.4em; }
@media (max-width: 760px) {
  .bracket { grid-template-columns: 1fr; }
  .b-col h4 { text-align: left; }
}

/* ---------- regras ---------- */
.rules table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: .95rem; }
.rules th, .rules td { border: 1px solid rgba(184,134,46,.6); padding: 6px 8px; text-align: left; vertical-align: top; }
.rules th { background: rgba(184,134,46,.18); }
.rules li { margin: 4px 0; line-height: 1.45; }
.rules .note { background: rgba(29,47,94,.08); border-left: 4px solid var(--navy); padding: 8px 12px; border-radius: 6px; }
.rules-cards { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.rules-cards img { width: 64px; border-radius: 5px; }

/* ---------- jogo ---------- */
.game { display: flex; flex-direction: column; height: 100vh; height: 100dvh; max-width: 1500px; margin: 0 auto; }
.hud {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px;
  background: linear-gradient(180deg, rgba(18,32,74,.95), rgba(18,32,74,.8));
  border-bottom: 2px solid var(--gold-2);
}
.hud .btn.ghost { color: var(--parch); }
.hud-opp { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.crest {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-family: var(--display); font-weight: 800; color: #fff; box-shadow: inset 0 0 0 2px var(--gold);
}
.hud-name { font-family: var(--display); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-sub { font-size: .85rem; opacity: .85; }
.opp-hand { display: flex; margin-left: 8px; align-items: center; }
.opp-hand .mini-back { width: 20px; height: 30px; margin-left: -9px; border-radius: 3px; }
.opp-hand .n { white-space: nowrap; margin-left: 8px; font-family: var(--display); font-weight: 800; font-size: .9rem; }
.hud-series { font-family: var(--display); font-weight: 800; text-align: center; font-size: .95rem; }
.hud-tools { display: flex; gap: 6px; }

.table { flex: 1; display: flex; min-height: 0; gap: 10px; padding: 8px; }
.board-wrap { flex: 1; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; }
.board {
  position: relative;
  aspect-ratio: 1448 / 1086;
  width: min(100%, calc((100dvh - 290px) * 1448 / 1086));
  min-width: 300px;
  background: url('../assets/board.webp') center / 100% 100% no-repeat;
  border-radius: 14px;
  box-shadow: 0 16px 50px rgba(0,0,0,.6);
  container-type: inline-size;
  user-select: none;
}
.log {
  width: 260px; flex: none; background: rgba(243,230,200,.94); color: var(--ink); border-radius: 12px;
  padding: 10px 12px; overflow-y: auto; font-size: .88rem; box-shadow: inset 0 0 0 2px var(--gold-2);
}
.log h3 { font-family: var(--display); margin: 0 0 6px; color: var(--navy); font-size: 1rem; }
.log ol { list-style: none; margin: 0; padding: 0; }
.log li { padding: 3px 0; border-bottom: 1px dotted rgba(184,134,46,.5); line-height: 1.3; }
.log li.turn { font-family: var(--display); font-weight: 800; color: var(--navy); border: 0; padding-top: 8px; }
.log li.me { color: #6e1411; }
.log li.big { font-weight: 800; }
#btn-log { display: none; }
@media (max-width: 1100px) {
  .log { display: none; position: fixed; right: 8px; top: 60px; bottom: 8px; z-index: 30; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
  .log.open { display: block; }
  #btn-log { display: inline-block; }
}

/* sobreposições no tabuleiro (coordenadas em % da imagem 1448x1086) */
.slot { position: absolute; transform: translate(-50%, -50%); }
.ov { position: absolute; }
.base-hit {
  border-radius: 18px; cursor: default; transition: box-shadow .2s, background .2s;
}
.base-hit.target { cursor: pointer; animation: pulse 1.1s infinite; }
.base-hit.target.atk { --glow: 255, 80, 60; }
.base-hit.target.def { --glow: 90, 160, 255; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(var(--glow), .9), 0 0 18px 4px rgba(var(--glow), .55); background: rgba(var(--glow), .06); }
  50% { box-shadow: 0 0 0 3px rgba(var(--glow), .5), 0 0 6px 1px rgba(var(--glow), .3); background: rgba(var(--glow), .14); }
}
.base-hit.fallen {
  backdrop-filter: grayscale(1) brightness(.45) blur(1px);
  -webkit-backdrop-filter: grayscale(1) brightness(.45) blur(1px);
  background: rgba(20,10,5,.35);
  display: grid; place-items: center;
}
.stamp {
  font-family: var(--display); font-weight: 800; color: #ffd9d0; font-size: 2.1cqw;
  border: .3cqw solid #ffd9d0; padding: .2cqw 1cqw; border-radius: .6cqw; transform: rotate(-12deg);
  background: rgba(124,21,19,.75); letter-spacing: .08em;
}
.dmg-badge {
  position: absolute; left: 50%; top: 4%; transform: translateX(-50%);
  font-family: var(--display); font-weight: 800; font-size: 1.15cqw; color: #fff; white-space: nowrap;
  background: rgba(163,33,30,.92); padding: .25cqw .8cqw; border-radius: 99px; box-shadow: 0 0 0 .15cqw var(--gold);
}
.crack { position: absolute; inset: 15% 20% 30%; pointer-events: none; opacity: .85; }

.mcard {
  width: 5.9cqw; aspect-ratio: 2 / 3; border-radius: .55cqw; position: relative;
  box-shadow: 0 .4cqw 1cqw rgba(0,0,0,.55); background-size: cover; background-position: center;
  transition: transform .25s;
}
.mcard.back, .mini-back, .card-back {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 22%, rgba(226,184,90,.0) 22%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 150'%3E%3Crect x='6' y='6' width='88' height='138' rx='8' fill='none' stroke='%23e2b85a' stroke-width='3'/%3E%3Crect x='12' y='12' width='76' height='126' rx='5' fill='none' stroke='%23e2b85a' stroke-width='1' opacity='.6'/%3E%3Cg transform='translate(50 75)' fill='%23e2b85a'%3E%3Cpath d='M0-30 6-6 30 0 6 6 0 30-6 6-30 0-6-6Z'/%3E%3Cpath d='M0-16 3-3 16 0 3 3 0 16-3 3-16 0-3-3Z' fill='%23fff3c9'/%3E%3Ccircle r='20' fill='none' stroke='%23e2b85a' stroke-width='1.5'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat,
    linear-gradient(160deg, #2d4d9a, #142355);
}
.mcard .life {
  position: absolute; bottom: -1.1cqw; left: 50%; transform: translateX(-50%);
  display: flex; gap: .3cqw; background: rgba(0,0,0,.65); padding: .2cqw .45cqw; border-radius: 99px;
}
.mcard .life i { width: .8cqw; height: .8cqw; border-radius: 50%; background: var(--gold); display: block; }
.mcard .life i.off { background: rgba(255,255,255,.25); }
.mcard .eye {
  position: absolute; top: -0.8cqw; right: -0.8cqw; font-size: .95cqw; background: var(--navy); color: #fff;
  border-radius: 99px; padding: .1cqw .45cqw; box-shadow: 0 0 0 .12cqw var(--gold); white-space: nowrap; font-family: var(--display);
}
.mcard.defend-in { animation: dropIn .45s ease-out; }
@keyframes dropIn { from { transform: translateY(-30%) scale(1.25); opacity: 0; } to { transform: none; opacity: 1; } }

.stored {
  display: grid; place-items: center; border-radius: .6cqw; cursor: default;
}
.stored.has { box-shadow: 0 0 0 .25cqw var(--gold), 0 0 1.2cqw rgba(226,184,90,.8); background: rgba(226,184,90,.18); }
.stored.can { cursor: pointer; animation: pulse 1.1s infinite; --glow: 226, 184, 90; }
.stored .tip {
  position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%); width: 4.8cqw;
}
.deck-count {
  display: grid; place-items: center;
}
.deck-count span {
  font-family: var(--display); font-weight: 800; font-size: 1.6cqw; color: #fff;
  background: rgba(0,0,0,.6); padding: .2cqw .9cqw; border-radius: 99px; box-shadow: 0 0 0 .15cqw var(--gold);
}
.plate {
  position: absolute; transform: translate(-50%, -50%); font-family: var(--display); font-weight: 800;
  color: #fbecc6; font-size: 2.1cqw; white-space: nowrap; width: 19cqw; height: 3.4cqw; line-height: 3.4cqw;
  overflow: hidden; text-overflow: ellipsis; text-align: center; border-radius: .4cqw; padding: 0 .6cqw;
  text-shadow: 0 .15cqw 0 rgba(0,0,0,.45);
}
.plate.top { background: radial-gradient(ellipse at 50% 40%, #27508f, #1b3c74 70%); }
.plate.bot { background: radial-gradient(ellipse at 50% 40%, #b8352b, #92221b 70%); }
.plate.active::after { content: ' ⚔'; color: var(--gold); }
.zone-msg {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4;
  font-family: var(--display); font-weight: 800; color: var(--navy-2); font-size: 2.2cqw; text-align: center;
  background: rgba(243,230,200,.96); border-radius: 1cqw; padding: .6cqw 1.6cqw; box-shadow: 0 0 0 .2cqw var(--gold-2), 0 .5cqw 2cqw rgba(0,0,0,.4);
  opacity: 0; transition: opacity .25s; pointer-events: none; white-space: nowrap; max-width: 60cqw;
}
.zone-msg.show { opacity: 1; }
.atk-fly { position: absolute; transform: translate(-50%, -50%); z-index: 5; animation: atkIn .4s ease-out; }
@keyframes atkIn { from { transform: translate(-50%, 40%) scale(1.3); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }

/* status + mão */
.status {
  display: flex; align-items: center; gap: 12px; padding: 6px 14px; min-height: 52px; flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(122,28,23,.85), rgba(80,16,13,.9));
  border-top: 2px solid var(--gold-2);
}
.status-text { flex: 1; font-size: 1.05rem; min-width: 200px; }
.status-text b { color: var(--gold); }
.status-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hand {
  display: flex; justify-content: center; align-items: flex-end; padding: 10px 12px 14px; min-height: calc(var(--card-w) * 1.5 + 30px);
  overflow-x: auto; overflow-y: visible; background: rgba(0,0,0,.25);
}
.hcard {
  width: var(--card-w); aspect-ratio: 2 / 3; flex: none; border-radius: 9px; border: 0; padding: 0; cursor: pointer;
  background-size: cover; background-position: center; position: relative;
  box-shadow: 0 6px 16px rgba(0,0,0,.5); transition: transform .15s, box-shadow .15s, filter .15s;
  margin-left: var(--overlap, 6px);
}
.hcard:first-child { margin-left: 0; }
.hcard:hover { transform: translateY(-8px); z-index: 2; }
.hcard.sel { transform: translateY(-18px); box-shadow: 0 0 0 3px var(--gold), 0 0 20px rgba(226,184,90,.9); z-index: 3; }
.hcard.dim { filter: grayscale(.5) brightness(.75); cursor: default; }
.hcard.dim:hover { transform: none; }
.hcard.new::after {
  content: 'nova'; position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  font-family: var(--display); font-size: .7rem; background: var(--gold); color: var(--ink); padding: 1px 8px; border-radius: 99px;
}
.empty-hand { opacity: .7; font-style: italic; align-self: center; }

@media (max-width: 700px) {
  :root { --card-w: 74px; }
  .hud { flex-wrap: wrap; gap: 6px 8px; padding: 6px 8px; }
  .hud-opp { flex: 1 1 calc(100% - 60px); }
  .crest { width: 30px; height: 30px; }
  .hud-name { font-size: .9rem; }
  .hud-series { order: 3; flex: 1; text-align: left; font-size: .75rem; }
  .hud-tools { order: 4; }
  .hud-tools .btn { font-size: .72rem; padding: 4px 8px; }
  .table { padding: 6px 4px; }
  .status { padding: 6px 10px; min-height: 44px; }
  .board { width: 100%; min-width: 0; }
  .status-text { font-size: .95rem; }
  .opp-hand .mini-back { display: none; }
}

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: rgba(10,6,3,.62); backdrop-filter: blur(2px); animation: fade .2s;
}
@keyframes fade { from { opacity: 0; } }
.modal-box {
  background: linear-gradient(180deg, var(--parch), var(--parch-2)); color: var(--ink);
  border-radius: 16px; padding: 22px clamp(16px, 4vw, 30px); max-width: 720px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.6), inset 0 0 0 2px var(--gold-2); max-height: 92vh; overflow: auto;
  animation: pop .25s ease-out;
}
@keyframes pop { from { transform: scale(.92); opacity: 0; } }
.modal-box h2 { font-family: var(--display); color: var(--navy); margin: 0 0 8px; text-align: center; }
.modal-box p { text-align: center; line-height: 1.45; }
.pick-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 14px 0; }
.pick-grid .hcard { margin: 0; --card-w: 96px; }
.pick-grid .card-back { width: 70px; aspect-ratio: 2/3; border-radius: 8px; border: 0; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,.4); transition: transform .15s; }
.pick-grid .card-back:hover { transform: translateY(-8px) rotate(-3deg); }

.combat { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 4vw, 40px); margin: 14px 0; }
.combat .side { text-align: center; }
.combat .side .who { font-family: var(--display); font-weight: 800; margin-bottom: 6px; font-size: .95rem; }
.combat .vs { font-family: var(--deco); font-size: 2rem; color: var(--crimson); }
.ccard { width: clamp(110px, 22vw, 170px); aspect-ratio: 2/3; perspective: 900px; margin: 0 auto; }
.ccard .inner { position: relative; width: 100%; height: 100%; transition: transform .6s; transform-style: preserve-3d; }
.ccard.flipped .inner { transform: rotateY(180deg); }
.ccard .face, .ccard .card-back {
  position: absolute; inset: 0; border-radius: 10px; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background-size: cover; box-shadow: 0 8px 22px rgba(0,0,0,.45);
}
.ccard .card-back { transform: rotateY(0deg); }
.ccard .face { transform: rotateY(180deg); }
.ccard.nodef { display: grid; place-items: center; border: 3px dashed rgba(91,70,48,.6); border-radius: 10px; color: var(--ink-soft); font-style: italic; padding: 10px; text-align: center; }
.result { font-family: var(--display); font-weight: 800; text-align: center; font-size: 1.2rem; min-height: 1.6em; opacity: 0; transition: opacity .3s; }
.result.show { opacity: 1; }
.result.good { color: var(--ok); } .result.bad { color: var(--crimson); } .result.neutral { color: var(--navy); }
.result small { display: block; font-family: var(--body); font-weight: 600; font-size: .95rem; color: var(--ink-soft); margin-top: 4px; }
.modal-hint { text-align: center; font-size: .85rem; opacity: .65; margin-top: 8px; }
.big-title { font-family: var(--deco) !important; font-size: 2.2rem; }
.score-line { font-family: var(--display); font-size: 1.3rem; text-align: center; font-weight: 800; }

/* ---------- toasts e preview ---------- */
.toasts { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; pointer-events: none; width: min(92vw, 460px); }
.toast {
  background: rgba(18,32,74,.95); color: var(--parch); padding: 10px 16px; border-radius: 10px; text-align: center;
  box-shadow: 0 0 0 2px var(--gold-2), 0 8px 24px rgba(0,0,0,.5); animation: toastIn .25s ease-out; font-size: 1rem;
}
.toast.sea { background: rgba(19,90,88,.96); }
.toast.red { background: rgba(124,21,19,.96); }
@keyframes toastIn { from { transform: translateY(-10px); opacity: 0; } }
.preview { position: fixed; z-index: 40; pointer-events: none; }
.preview img { width: 220px; border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.6); }
@media (hover: none) { .preview { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- online ---------- */
.or { text-align: center; margin: 18px 0 0; font-style: italic; color: var(--ink-soft); }
.share-box { display: flex; gap: 8px; }
.share-box input { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border-radius: 8px; border: 2px solid var(--gold-2); background: #fffaf0; color: var(--ink); }
.room-code { text-align: center; font-size: 1.1rem; }
.room-code b { font-family: var(--display); letter-spacing: .2em; color: var(--navy); font-size: 1.4rem; }
.waiting { text-align: center; font-style: italic; animation: breathe 1.6s infinite; }
@keyframes breathe { 50% { opacity: .45; } }
.on-error { color: var(--crimson); text-align: center; font-weight: 600; min-height: 1.2em; margin: 8px 0 0; }
.net { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #5bd16a; margin-right: 4px; box-shadow: 0 0 6px #5bd16a; }
.net.off { background: #e0573f; box-shadow: 0 0 6px #e0573f; }
.badge.lv-online { background: var(--sea); }
.server-status { font-size: .9rem; margin: -4px 0 8px; color: var(--ink-soft); }
.server-status.ok { color: var(--ok); }
.server-status.bad { color: var(--crimson); }
