* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

button, input, .room-badge { touch-action: manipulation; }

:root {
  --bg: #0d0f13;
  --panel: #14171d;
  --panel-2: #1b1f27;
  --border: #262b35;
  --border-soft: #1f242e;
  --text: #e9ecf2;
  --muted: #8b93a3;
  --accent: #f0b429;
  --accent-dark: #1a1503;
  --danger: #e5484d;
  --ok: #4cc38a;
  --c-R: #e5484d;
  --c-Y: #f0b429;
  --c-G: #4cc38a;
  --c-B: #5b9bf0;
  --radius: 14px;
  --font-body: "Inter", system-ui, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
}

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(240, 180, 41, .05), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(91, 155, 240, .05), transparent 60%),
    var(--bg);
  color: var(--text);
  overflow: hidden;
  overscroll-behavior: none;
}

.hidden { display: none !important; }
.muted { color: var(--muted); font-size: .85rem; }

.screen { display: none; height: 100vh; height: 100dvh; }
.screen.active { display: flex; flex-direction: column; }

h1, h2, h3, .brand-name, .pane-kicker { font-family: var(--font-display); }

/* ================= inicio ================= */
#screen-home.active { align-items: center; justify-content: center; position: relative; }

/* cartas flotantes de fondo */
.bg-cards { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.bg-cards span {
  position: absolute;
  bottom: -20vh;
  width: 46px; height: 68px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .06);
  opacity: 0;
  animation: floatUp linear infinite;
  will-change: transform, opacity;
}
@keyframes floatUp {
  0%   { transform: translateY(0) rotate(var(--rot0, -8deg)); opacity: 0; }
  12%  { opacity: var(--op, .10); }
  85%  { opacity: var(--op, .10); }
  100% { transform: translateY(-130vh) rotate(var(--rot1, 14deg)); opacity: 0; }
}

.home-card {
  position: relative;
  z-index: 1;
  background: var(--panel);
  padding: 42px 38px 30px;
  border-radius: 20px;
  width: min(420px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  animation: rise .5s cubic-bezier(.2, .9, .3, 1) both;
}

.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.brand-mark {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--accent), #d18f11);
  color: var(--accent-dark);
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(240, 180, 41, .25);
  animation: markTilt 5s ease-in-out infinite;
}
@keyframes markTilt {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(4deg) translateY(-3px); }
}
.brand-name {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(100deg, var(--text) 40%, var(--accent) 50%, var(--text) 60%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4.5s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 30% { background-position: 120% 0; }
  70%, 100% { background-position: -60% 0; }
}
.brand-sub { color: var(--muted); font-size: .85rem; }

.field-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); }

input[type="text"] {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 14px;
  color: var(--text);
  font-size: 16px;
  font-family: var(--font-body);
  outline: none;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input[type="text"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240, 180, 41, .12); }
#inp-code { text-transform: uppercase; letter-spacing: 8px; text-align: center; font-weight: 700; }

.btn {
  border: none;
  border-radius: 10px;
  padding: 13px 20px;
  font-size: .95rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform .08s, filter .15s, box-shadow .15s;
}
.btn:active { transform: scale(.97); }
.btn.primary {
  background: linear-gradient(145deg, var(--accent), #dd9c15);
  color: var(--accent-dark);
  box-shadow: 0 6px 20px rgba(240, 180, 41, .22);
  position: relative;
  overflow: hidden;
}
.btn.primary::after {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 45%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg);
  animation: sweep 3.2s ease-in-out infinite;
}
@keyframes sweep {
  0%, 55% { left: -80%; }
  85%, 100% { left: 130%; }
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { border-color: var(--muted); }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn.ghost:hover { color: var(--text); border-color: var(--muted); }
.btn.small { padding: 8px 14px; font-size: .8rem; }
.btn.big { padding: 15px 34px; font-size: 1.05rem; }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }

.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: 1px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.join-row { display: flex; gap: 10px; }
.join-row input { flex: 1; }

.error { color: var(--danger); text-align: center; font-size: .9rem; }

.byline {
  text-align: center;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 10px;
  opacity: .7;
}

/* ================= barra superior ================= */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--border-soft);
  gap: 10px;
  z-index: 5;
}
.top-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.top-right { display: flex; align-items: center; gap: 14px; justify-content: flex-end; }

.logo-mini { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: 2px; white-space: nowrap; }

.room-badge {
  white-space: nowrap;
  background: var(--panel-2);
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 2px;
  cursor: pointer;
  border: 1px solid var(--border);
  font-size: .8rem;
  color: var(--text);
  font-family: var(--font-body);
  transition: border-color .15s;
}
.room-badge:hover { border-color: var(--accent); }

/* indicador del color vigente */
.color-indicator { display: flex; gap: 8px; align-items: center; }
.ci-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  opacity: .25;
  transform: scale(.8);
  transition: all .3s cubic-bezier(.2, 1.2, .4, 1);
}
.ci-dot[data-c="R"] { background: var(--c-R); }
.ci-dot[data-c="Y"] { background: var(--c-Y); }
.ci-dot[data-c="G"] { background: var(--c-G); }
.ci-dot[data-c="B"] { background: var(--c-B); }
.ci-dot.active { opacity: 1; transform: scale(1.45); box-shadow: 0 0 14px currentColor; }
.ci-dot[data-c="R"].active { color: var(--c-R); }
.ci-dot[data-c="Y"].active { color: var(--c-Y); }
.ci-dot[data-c="G"].active { color: var(--c-G); }
.ci-dot[data-c="B"].active { color: var(--c-B); }

/* flecha de dirección */
.dir-arrow {
  width: 26px; height: 26px;
  color: var(--muted);
  animation: spinSlow 6s linear infinite;
  transition: transform .4s;
}
.dir-arrow.reversed { transform: scaleX(-1); }
@keyframes spinSlow { to { rotate: 360deg; } }

/* timer anillo */
.timer { position: relative; width: 48px; height: 48px; }
.timer svg { width: 48px; height: 48px; transform: rotate(-90deg); }
.timer .ring-bg { fill: none; stroke: var(--border); stroke-width: 4; }
.timer .ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 125.7;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset .25s linear, stroke .3s;
}
.timer.low .ring { stroke: var(--danger); }
.timer.low #timer-num { color: var(--danger); animation: pulse 1s infinite; }
#timer-num {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .95rem;
  font-variant-numeric: tabular-nums;
}

/* ================= mesa ================= */
.table {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px;
  min-height: 0;
  gap: 8px;
}

/* rivales */
.opponents {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.opp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 10px 18px;
  min-width: 130px;
  transition: border-color .3s, box-shadow .3s, transform .3s;
  animation: rise .35s both;
}
.opp.active {
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(240, 180, 41, .18);
  transform: translateY(-3px);
}
.opp.disconnected { opacity: .4; }
.opp-top { display: flex; align-items: center; gap: 8px; }
.opp .name { font-weight: 600; font-size: .9rem; }
.opp .score { color: var(--muted); font-size: .72rem; }
.opp-cards { display: flex; height: 34px; }
.opp-cards .mini {
  width: 22px; height: 32px;
  border-radius: 4px;
  background: linear-gradient(145deg, #232a3a, #171c28);
  border: 1px solid #303950;
  margin-left: -12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .4);
}
.opp-cards .mini:first-child { margin-left: 0; }
.opp .count-num { font-weight: 800; font-size: .8rem; color: var(--accent); font-variant-numeric: tabular-nums; }

.avatar {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  color: #0d0f13;
  flex-shrink: 0;
}
.host-tag {
  font-size: .58rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--accent);
  border: 1px solid rgba(240, 180, 41, .4);
  border-radius: 5px;
  padding: 2px 5px;
}
.uno-tag {
  font-size: .6rem; font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent-dark);
  background: var(--accent);
  border-radius: 5px;
  padding: 2px 7px;
  animation: pulse 1s infinite;
}

/* centro */
.center-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  min-height: 0;
}
.pile { position: relative; width: 92px; height: 136px; }

.draw-pile { cursor: pointer; transition: transform .15s; }
.draw-pile:hover { transform: translateY(-4px); }
.draw-pile .card { position: absolute; inset: 0; }
.draw-pile .card:nth-child(1) { transform: translate(4px, 4px); }
.draw-pile .card:nth-child(2) { transform: translate(2px, 2px); }
.draw-pile.drawable .top { animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(0, -7px); }
}
.pile-count {
  position: absolute;
  bottom: -22px; left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.discard-pile .card { position: absolute; inset: 0; }
.discard-pile .card.r1 { transform: rotate(-7deg); opacity: .85; }
.discard-pile .card.r2 { transform: rotate(5deg); opacity: .92; }
.discard-pile .card.r3 { transform: rotate(-1deg); }
.discard-pile .card.landed { animation: land .35s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes land {
  from { transform: scale(1.35) rotate(-10deg); }
  to { transform: scale(1) rotate(-1deg); }
}

/* ================= cartas ================= */
.card {
  width: 92px; height: 136px;
  border-radius: 12px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  user-select: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .45);
  border: 3px solid rgba(255, 255, 255, .85);
  background: #999;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 30% 20%, rgba(255, 255, 255, .22), transparent 55%);
}
.card.cR { background: linear-gradient(150deg, #ef5b60, #c9353a); }
.card.cY { background: linear-gradient(150deg, #f5c04a, #d99a12); }
.card.cG { background: linear-gradient(150deg, #5bd39a, #2f9e69); }
.card.cB { background: linear-gradient(150deg, #6fa9f5, #3c78d8); }
.card.cW { background: linear-gradient(150deg, #23262e, #101218); }

.card .big {
  font-size: 3.1rem;
  color: #fff;
  text-shadow: 0 3px 8px rgba(0, 0, 0, .35);
  z-index: 1;
  line-height: 1;
}
.card .corner {
  position: absolute;
  font-size: .95rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .4);
  z-index: 1;
}
.card .corner.tl { top: 6px; left: 9px; }
.card .corner.br { bottom: 6px; right: 9px; transform: rotate(180deg); }

.card svg.icon { width: 46px; height: 46px; z-index: 1; filter: drop-shadow(0 3px 6px rgba(0,0,0,.35)); }
.card .corner svg { width: 15px; height: 15px; display: block; }

/* rueda de color del comodín */
.wild-wheel {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: conic-gradient(var(--c-R) 0 25%, var(--c-Y) 25% 50%, var(--c-G) 50% 75%, var(--c-B) 75% 100%);
  border: 4px solid #fff;
  z-index: 1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .4);
}
.wild-wheel.small { width: 15px; height: 15px; border-width: 2px; }

/* dorso */
.card.back {
  background: linear-gradient(150deg, #222938, #131722);
  border-color: #39415a;
}
.card.back::after {
  content: "U";
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent);
  opacity: .9;
  text-shadow: 0 0 24px rgba(240, 180, 41, .45);
}

/* ================= mi zona ================= */
.actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  align-items: center;
}
.uno-btn {
  background: linear-gradient(145deg, var(--accent), #dd9c15);
  color: var(--accent-dark);
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 3px;
  padding: 13px 34px;
  animation: readyPulse 1.1s ease-in-out infinite;
}
.catch-btn {
  background: linear-gradient(145deg, var(--danger), #c22d33);
  color: #fff;
  animation: readyPulse 1s ease-in-out infinite;
}
@keyframes readyPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); box-shadow: 0 10px 30px rgba(240, 180, 41, .35); }
}

.me-area { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.me-info { display: flex; align-items: center; gap: 10px; font-size: .9rem; font-weight: 600; }
.me-info .score { color: var(--muted); font-size: .78rem; }
.me-info.active .name { color: var(--accent); }
.turn-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  animation: pulse 1.4s infinite;
}

.hand {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 150px;
  max-width: 100%;
  padding: 6px 20px 10px;
}
.hand .card {
  margin-left: -34px;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.2, .9, .3, 1), box-shadow .18s, filter .18s;
  animation: dealIn .4s cubic-bezier(.2, .9, .3, 1) both;
}
.hand .card:first-child { margin-left: 0; }
@keyframes dealIn {
  from { opacity: 0; transform: translateY(60px) rotate(8deg); }
  to { opacity: 1; }
}
.hand .card.playable {
  box-shadow: 0 0 0 2px rgba(240, 180, 41, .8), 0 10px 26px rgba(0, 0, 0, .5);
}
.hand .card.playable:hover { transform: translateY(-26px) scale(1.06); z-index: 5; }
.hand .card.dim { filter: brightness(.5) saturate(.6); }
.hand .card.dim:hover { transform: none; cursor: default; }
.hand .card.just-drawn { animation: drawnGlow 1.2s ease-out; }
@keyframes drawnGlow {
  0% { box-shadow: 0 0 0 4px rgba(240, 180, 41, .9), 0 0 40px rgba(240, 180, 41, .6); }
  100% { box-shadow: 0 6px 16px rgba(0, 0, 0, .45); }
}

/* ================= overlays ================= */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 15, 19, .92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 10;
  padding: 24px;
  text-align: center;
  overflow-y: auto;
  animation: fadeIn .25s both;
}
.pane-kicker {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
}
.overlay h2 { font-size: 1.6rem; letter-spacing: -.3px; }

.code-box {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 40px;
}
.code-label { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: 1.5px; }
#lobby-code { color: var(--accent); letter-spacing: 12px; font-size: 2.2rem; font-family: var(--font-display); text-indent: 12px; }

.lobby-players { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lobby-players li {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: .9rem;
  font-weight: 600;
  animation: rise .3s both;
}
.lobby-players li .pts { color: var(--accent); font-variant-numeric: tabular-nums; }

.rules { display: flex; flex-direction: column; gap: 8px; width: min(480px, 100%); text-align: left; }
.rule {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel-2);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 11px 16px;
  font-size: .86rem;
}
.rule-n { font-family: var(--font-display); font-weight: 700; color: var(--accent); font-size: .95rem; }

/* selector de color */
.color-picker { display: flex; gap: 16px; }
.color-swatch {
  width: 74px; height: 74px;
  border-radius: 18px;
  border: 3px solid rgba(255, 255, 255, .25);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  animation: swatchIn .35s cubic-bezier(.2, 1.3, .4, 1) both;
}
.color-swatch:nth-child(1) { background: var(--c-R); animation-delay: 0ms; }
.color-swatch:nth-child(2) { background: var(--c-Y); animation-delay: 60ms; }
.color-swatch:nth-child(3) { background: var(--c-G); animation-delay: 120ms; }
.color-swatch:nth-child(4) { background: var(--c-B); animation-delay: 180ms; }
.color-swatch:hover { transform: scale(1.14); border-color: #fff; box-shadow: 0 10px 34px rgba(0, 0, 0, .5); }
@keyframes swatchIn {
  from { opacity: 0; transform: scale(.4); }
  to { opacity: 1; transform: scale(1); }
}

/* fin de ronda */
.winner-points { color: var(--accent); font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.final-hands { display: flex; flex-direction: column; gap: 8px; max-width: min(560px, 100%); }
.final-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.final-row .fname { color: var(--muted); font-size: .8rem; font-weight: 600; min-width: 70px; text-align: right; }
.final-row .card { width: 34px; height: 50px; border-radius: 6px; border-width: 2px; }
.final-row .card .big { font-size: 1.1rem; }
.final-row .card svg.icon { width: 18px; height: 18px; }
.final-row .card .corner { display: none; }
.final-row .wild-wheel { width: 18px; height: 18px; border-width: 2px; }

/* banner de eventos */
.event-banner {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel-2);
  border: 1px solid var(--accent);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 1px;
  padding: 14px 34px;
  border-radius: 14px;
  z-index: 20;
  box-shadow: 0 16px 50px rgba(0, 0, 0, .6), 0 0 30px rgba(240, 180, 41, .12);
  animation: bannerIn 2.2s cubic-bezier(.2, .9, .3, 1) both;
  white-space: nowrap;
  pointer-events: none;
}
.event-banner.danger { border-color: var(--danger); box-shadow: 0 16px 50px rgba(0, 0, 0, .6), 0 0 30px rgba(229, 72, 77, .18); }
@keyframes bannerIn {
  0% { opacity: 0; transform: translate(-50%, -14px) scale(.85); }
  10%, 80% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -10px) scale(.95); }
}

/* capa de animaciones de vuelo */
#fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 30; }
#fx-layer .card { position: fixed; margin: 0; transition: all .45s cubic-bezier(.3, .8, .3, 1); }

/* urgencia */
body.urgent::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  box-shadow: inset 0 0 120px rgba(229, 72, 77, .18);
  animation: urgentGlow 1s ease-in-out infinite;
}
@keyframes urgentGlow { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* confeti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 45; width: 100vw; height: 100vh; }

/* ================= marca de agua ================= */
.watermark {
  position: absolute;
  right: 20px;
  bottom: 12px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(240, 180, 41, .45);
  pointer-events: none;
  user-select: none;
  z-index: 3;
}

/* ================= toast ================= */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: .88rem;
  padding: 11px 22px;
  border-radius: 10px;
  z-index: 50;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
  max-width: 92vw;
  text-align: center;
  animation: slideUp .25s both;
}

/* ================= animaciones base ================= */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes pulse { 50% { transform: scale(1.12); } }

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

/* ================= responsive ================= */
@media (max-width: 900px) {
  body { overflow-y: auto; overflow-x: hidden; }
  .screen.active { height: 100vh; height: 100dvh; }
  .logo-mini { display: none; }
  .topbar { grid-template-columns: auto auto 1fr; }
  .table { padding: 8px; gap: 4px; }
  .opp { min-width: 104px; padding: 8px 12px; }
  .center-area { gap: 18px; }
  .pile { width: 72px; height: 106px; }
  .card { width: 72px; height: 106px; border-radius: 10px; border-width: 2px; }
  .card .big { font-size: 2.3rem; }
  .card svg.icon { width: 34px; height: 34px; }
  .wild-wheel { width: 40px; height: 40px; }
  .hand {
    justify-content: flex-start;
    overflow-x: auto;
    min-height: 122px;
    padding: 6px 12px 10px;
    -webkit-overflow-scrolling: touch;
  }
  .hand .card { margin-left: -26px; flex-shrink: 0; }
  .hand .card.playable:hover { transform: translateY(-14px); }
  .color-picker { flex-wrap: wrap; justify-content: center; }
  .color-swatch { width: 64px; height: 64px; }
  .event-banner { white-space: normal; text-align: center; font-size: 1rem; width: max-content; max-width: 88vw; }
  .watermark { font-size: .6rem; }
}
