/* Monumenta: estilos. Base de botones, hojas y pantallas de FizzPlays (la de Duelo de Éter, con paleta propia de noche en el
   desierto: arcilla, lapislázuli y oro); mesa propia: cartas de azulejo vidriado, frontera, franjas, reparto y monumentos. */
:root {
  --bg: #1c120c; --panel: #2a1a12; --panel2: #3b2518; --line: rgba(240,195,106,.24); --text: #fbf1de; --muted: #d8c3a2;
  --gold: #f2c45f; --accent: #f2c45f; --accent-text: #3a2600; --mint: #47d96b; --mint2: #22a84a; --sky: #5b8ff0; --sky2: #2f5fc4; --danger: #ff5a5a;
  --font: 'Nunito', ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: Georgia, 'Palatino Linotype', 'Book Antiqua', serif;
  --display: 'Marcellus', Georgia, 'Times New Roman', serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  --glass: rgba(34,20,12,.88); --hud-glass: rgba(30,18,10,.74); --hud-line: rgba(240,195,106,.22);
  --zw: 300px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); overscroll-behavior: none; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; overflow: hidden; }
#app { position: fixed; inset: 0; overflow: hidden; touch-action: manipulation;
  background: radial-gradient(ellipse at 50% 115%, rgba(214,120,52,.45), transparent 55%), radial-gradient(ellipse at 50% -10%, rgba(60,90,190,.5), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,220,170,.025) 0 2px, transparent 2px 22px), repeating-linear-gradient(90deg, rgba(255,220,170,.02) 0 2px, transparent 2px 44px), var(--bg); }
body.at-title #app { background: linear-gradient(180deg, #2b3f86 0%, #6a4a8a 34%, #d87a4a 62%, #3a2214 63%, #24160d 100%); }
.hidden { display: none !important; }
button { font-family: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; padding: 0; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
a { color: var(--gold); }
input, select { font-family: inherit; }
.good { color: #8ff0a4; } .bad { color: #ff9a9a; }

/* ---------- botones ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 50px; padding: .45em 1.2em; border-radius: 17px; font-size: 1.08rem; font-weight: 700; letter-spacing: .01em; color: var(--accent-text); text-decoration: none;
  background: linear-gradient(180deg, #ffe7a8, var(--gold) 55%, #d39a32); box-shadow: 0 5px 0 #8a5a14, 0 10px 22px rgba(0,0,0,.3), inset 0 2px 0 rgba(255,255,255,.6); transition: transform .08s, box-shadow .08s, filter .15s; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #8a5a14, inset 0 2px 0 rgba(255,255,255,.6); }
.btn svg { width: 1.25em; height: 1.25em; flex: none; }
.btn span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; min-width: 0; }
.btn small { font-size: .62em; font-weight: 600; opacity: .85; letter-spacing: 0; margin-top: .15em; }
.btn.mint { color: #06301a; background: linear-gradient(180deg, #b9ffc9, var(--mint) 55%, var(--mint2)); box-shadow: 0 5px 0 #157233, 0 10px 22px rgba(0,0,0,.3), inset 0 2px 0 rgba(255,255,255,.6); }
.btn.mint:active { box-shadow: 0 1px 0 #157233, inset 0 2px 0 rgba(255,255,255,.6); }
.btn.sky { color: #04263d; background: linear-gradient(180deg, #c8f0ff, var(--sky) 55%, var(--sky2)); box-shadow: 0 5px 0 #1d5a93, 0 10px 22px rgba(0,0,0,.3), inset 0 2px 0 rgba(255,255,255,.6); }
.btn.sky:active { box-shadow: 0 1px 0 #1d5a93, inset 0 2px 0 rgba(255,255,255,.6); }
.btn.red { color: #fff; background: linear-gradient(180deg, #ff9a7a, #f0503c 55%, #c22a1e); box-shadow: 0 5px 0 #7a160e, 0 10px 22px rgba(0,0,0,.3), inset 0 2px 0 rgba(255,255,255,.45); text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.btn.red:active { box-shadow: 0 1px 0 #7a160e, inset 0 2px 0 rgba(255,255,255,.45); }
.btn.ghost { color: var(--text); background: rgba(255,255,255,.09); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:active { transform: translateY(2px); }
.btn.big { min-height: 58px; font-size: 1.25rem; padding: .4em 1.3em; border-radius: 20px; }
.btn.small { min-height: 44px; font-size: .92rem; padding: .3em .85em; border-radius: 13px; box-shadow: 0 3px 0 rgba(0,0,0,.3), inset 0 2px 0 rgba(255,255,255,.5); }
.btn.small.ghost { box-shadow: inset 0 0 0 2px var(--line); }
.btn[disabled], .btn.dim { filter: grayscale(.75) brightness(.75); }
.btn[disabled] { pointer-events: none; }
.icon-btn { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; color: var(--text); background: var(--glass); box-shadow: inset 0 0 0 2px var(--hud-line), 0 4px 12px rgba(0,0,0,.25); flex: none; }
.icon-btn svg { width: 25px; height: 25px; }
.icon-btn:active { transform: scale(.94); }
.row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.row.two > .btn { flex: 1 1 0; min-width: 0; padding: .4em .7em; }
/* el final: «Menú» y «Compartir» a media anchura; en 360 px «Compartilhar» (pt) no cabía con el relleno normal */
.end-p .row.two > .btn { padding-left: .4em; padding-right: .4em; gap: .35em; font-size: clamp(.92rem, 4.4vw, 1.08rem); }
.col { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.x { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); background: rgba(255,255,255,.08); flex: none; }
.x svg { width: 18px; height: 18px; }
.spin { display: inline-block; width: 1em; height: 1em; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: var(--gold); animation: spin .8s linear infinite; vertical-align: -2px; margin-right: .4em; }
@keyframes spin { to { transform: rotate(360deg); } }
.pn { color: var(--pc); filter: brightness(1.2); }
.pn.me { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; }
.cn { color: #fff2c4; }
.tag, .need { font-style: normal; font-size: .82em; font-weight: 600; padding: .05em .5em; border-radius: 99px; background: rgba(255,215,106,.18); color: var(--gold); white-space: nowrap; }

/* ---------- efectos ---------- */
#fx { position: absolute; inset: 0; z-index: 35; pointer-events: none; overflow: hidden; }
.flyer { position: fixed; z-index: 36; pointer-events: none; }
.flyer > .cd { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.spark { position: absolute; width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 8px currentColor; animation: spark .8s ease-out both; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
.banner { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 37; pointer-events: none; white-space: nowrap; animation: banner 1.5s cubic-bezier(.2,.9,.3,1) both; }
.banner span { display: block; padding: .25em .9em; border-radius: 18px; font-family: var(--display); font-weight: 400; font-size: clamp(1.4rem, 6.4vw, 2.6rem); color: #fff; background: rgba(34,20,12,.9); box-shadow: 0 10px 30px rgba(0,0,0,.5), inset 0 0 0 2px rgba(255,255,255,.3); text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.banner.gold span { color: #3a2600; background: linear-gradient(180deg, #ffe7a8, var(--gold) 60%, #d39a32); }
.banner.sky span { color: #fff; background: linear-gradient(180deg, #7aa6ff, #2f5fc4); }
.banner.red span { background: linear-gradient(180deg, #ff8a6a, #d93a28); }
@keyframes banner { 0% { transform: translate(-50%, -50%) scale(.4); opacity: 0; } 15% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; } 25% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { transform: translate(-50%, -60%) scale(1); opacity: 0; } }
.conf { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: conf 3s linear both; }
@keyframes conf { to { transform: translate(var(--dx), 110vh) rotate(var(--r)); } }

/* ---------- avisos, red y registro ---------- */
#toasts { position: absolute; z-index: 60; left: 50%; top: calc(64px + var(--safe-t)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; width: min(92vw, 440px); pointer-events: none; }
.toast { padding: 9px 16px; border-radius: 14px; background: rgba(34,20,12,.96); box-shadow: 0 8px 24px rgba(0,0,0,.45), inset 0 0 0 1.5px var(--hud-line); font-size: .95rem; text-align: center; animation: in .25s ease-out both; }
.toast svg { width: 1.15em; height: 1.15em; vertical-align: -.2em; }   /* el castillo de «le queda 1 torre» no trae tamaño: sin esto medía 168 px */
.toast.red { box-shadow: 0 8px 24px rgba(0,0,0,.45), inset 0 0 0 2px #ff5a5a; }
.toast.gold { box-shadow: 0 8px 24px rgba(0,0,0,.45), inset 0 0 0 2px var(--gold); }
.toast.dim { opacity: .9; }
.toast.out { animation: out .3s ease-in both; }
/* ---------- pantallas ---------- */
#screens { position: absolute; inset: 0; pointer-events: none; z-index: 55; }
.screen { position: absolute; inset: 0; pointer-events: auto; display: flex; flex-direction: column; align-items: center; animation: in .25s ease-out both; padding: calc(14px + var(--safe-t)) calc(14px + var(--safe-r)) calc(14px + var(--safe-b)) calc(14px + var(--safe-l)); }
.screen.out { animation: out .2s ease-in both; pointer-events: none; }
@keyframes in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes out { to { opacity: 0; transform: scale(.98); } }
@keyframes fade { from { opacity: 0; } } @keyframes fadeout { to { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.overlay { justify-content: center; background: rgba(18,10,6,.62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.card { width: min(440px, 100%); max-height: 100%; overflow: auto; padding: 20px 18px; border-radius: 26px; background: linear-gradient(180deg, var(--panel2), var(--panel)); box-shadow: inset 0 0 0 2px var(--line), 0 20px 50px rgba(0,0,0,.5); text-align: center; display: flex; flex-direction: column; gap: 12px; }
.card h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.8rem; line-height: 1.1; color: var(--gold); text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.sub { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.3; }
.sub.small { font-size: .85rem; }
.sub.big { font-size: 1.12rem; color: var(--text); }
.card.scroll { max-height: min(90vh, 760px); }

/* portada */
.title-screen { justify-content: space-between; gap: 8px; }
.logo { text-align: center; margin-top: calc(2vh + 44px); flex: none; }
.logo .lg { display: inline-block; text-wrap: balance; font-family: var(--display); font-weight: 400; font-size: clamp(2.7rem, 13vw, 5.6rem); line-height: .95; color: #ffe2a0; -webkit-text-stroke: 2px #4a2408; letter-spacing: .04em; paint-order: stroke fill; text-shadow: 0 4px 0 #5a2f00, 0 0 30px rgba(255,190,80,.55), 0 12px 24px rgba(0,0,0,.5); letter-spacing: .01em; }
.logo p { margin: .55em auto 0; display: inline-block; padding: .3em .95em; border-radius: 99px; background: rgba(34,20,12,.82); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 600; font-size: 1rem; }
.title-fan { position: relative; flex: 1 1 auto; min-height: 0; width: min(560px, 100%); display: flex; justify-content: center; align-items: center; pointer-events: none; }
.title-fan .cd { --w: clamp(70px, min(22vw, 16vh), 150px); position: absolute; transform-origin: 50% 130%; animation: tfan 1s cubic-bezier(.2,.9,.3,1) both; }
.tf0 { transform: translateX(-62%) rotate(-24deg); animation-delay: .05s !important; } .tf1 { transform: translateX(-32%) rotate(-12deg); animation-delay: .12s !important; }
.tf2 { transform: translateY(-6%) rotate(0deg); z-index: 3; animation-delay: .19s !important; } .tf3 { transform: translateX(32%) rotate(12deg); animation-delay: .26s !important; } .tf4 { transform: translateX(62%) rotate(24deg); animation-delay: .33s !important; }
@keyframes tfan { from { opacity: 0; transform: translateY(40%) rotate(0deg) scale(.7); } }
.title-bottom { display: flex; flex-direction: column; gap: 12px; align-items: stretch; width: min(390px, 100%); flex: none; }
.title-bottom .btn.big { justify-content: flex-start; }
.portal-link { position: absolute; z-index: 2; left: calc(10px + var(--safe-l)); top: calc(8px + var(--safe-t)); display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px 6px 8px; border-radius: 99px; background: var(--glass); color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; }
.portal-link svg { width: 28px; height: 28px; }

/* hojas inferiores */
.sheet-wrap { position: fixed; inset: 0; z-index: 58; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.sheet-wrap.modal { pointer-events: auto; background: rgba(18,10,6,.5); animation: fade .2s both; }
.sheet-wrap.out, .sheet-wrap.out .sheet, .zoom-wrap.out, .zoom-wrap.out * { animation: fadeout .2s both; pointer-events: none; }
.sheet { pointer-events: auto; width: min(500px, 100%); max-height: min(90%, calc(100% - var(--safe-t) - 8px)); overflow: auto; border-radius: 24px 24px 0 0; padding: 14px 16px max(calc(16px + var(--safe-b)), calc(var(--cookie-b, 0px) + 8px)); background: linear-gradient(180deg, var(--panel2), var(--panel)); box-shadow: 0 -10px 40px rgba(0,0,0,.45), inset 0 0 0 2px var(--line); animation: up .25s cubic-bezier(.2,.9,.3,1.05) both; }
.sheet header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sheet header h3 { flex: 1; margin: 0; font-size: 1.3rem; min-width: 0; }
.sheet-body { display: flex; flex-direction: column; gap: 12px; }
.sheet-body > .btn { align-self: stretch; }
.confirm-sheet .sheet-body { text-align: center; padding-top: 6px; }
.opts { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 10px 12px; align-items: center; text-align: left; }
.opts label { font-weight: 600; color: var(--muted); font-size: .95rem; max-width: 34vw; line-height: 1.15; }
.opts.compact { gap: 8px 10px; }
.seg { display: flex; gap: 3px; padding: 3px; border-radius: 14px; background: rgba(0,0,0,.28); }
.seg button { flex: 1; min-width: 0; white-space: normal; line-height: 1.05; min-height: 44px; border-radius: 10px; font-weight: 700; font-size: clamp(.78rem, 3.6vw, .95rem); color: var(--muted); padding: 0 4px; }   /* «Apprendista» (it) cabe en 360 px */
.seg button.on { background: var(--gold); color: var(--accent-text); box-shadow: 0 2px 0 #8a5a14; }
.seg.ro button.on { background: rgba(255,255,255,.2); color: #fff; box-shadow: none; }
.nick-form { display: flex; gap: 8px; }
.nick-form .nick, .setting input, .opts .nick { flex: 1; min-width: 0; height: 48px; border-radius: 13px; border: 0; padding: 0 14px; font-size: 1.1rem; font-weight: 600; color: var(--text); background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 2px var(--line); }
.shake { animation: shake .35s; } @keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.settings { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.setting { display: flex; align-items: center; gap: 10px; justify-content: space-between; font-weight: 600; }
.setting > span { min-width: 0; }
.tog { display: inline-flex; align-items: center; gap: 8px; min-width: 92px; min-height: 44px; padding: 0 12px 0 6px; border-radius: 99px; background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 2px var(--line); font-weight: 700; color: var(--muted); }
.tog i { width: 30px; height: 30px; border-radius: 50%; background: #6a5040; transition: transform .2s, background .2s; }
.tog.on { color: #06301a; background: var(--mint); }
.tog.on i { background: #fff; transform: translateX(2px); }
.setting select { min-height: 44px; border-radius: 12px; border: 0; padding: 0 10px; font-size: 1rem; font-weight: 600; color: var(--text); background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 2px var(--line); max-width: 55%; }
.row.links .btn { flex: 1 1 auto; }
/* pausa, final */
.menu-p .col .btn { justify-content: flex-start; }
.end-p .why { color: #fff; font-weight: 600; }
.end-p.win h2 { animation: bump .6s cubic-bezier(.2,1.6,.4,1); }
/* cómo se juega */
.howto-body { text-align: left; font-size: .98rem; line-height: 1.45; }
.howto-body .t1 { font-family: var(--display); font-weight: 400; color: var(--gold); font-size: 1.45rem; line-height: 1.15; margin: 0 0 .5em; }
.howto-body h2 { font-size: 1.12rem; color: var(--gold); margin: 1em 0 .3em; }
.howto-body ul { padding-left: 1.2em; margin: .3em 0; }
.howto-body p { margin: .4em 0; }
/* anuncio simulado (dev) */
.dev-ad { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(0,0,0,.85); }
.dev-ad-box { width: min(320px, 86vw); padding: 18px; border-radius: 20px; background: #fff; color: #222; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.dev-ad-art { height: 140px; border-radius: 12px; display: grid; place-items: center; font-size: 3rem; font-weight: 900; color: #fff; background: linear-gradient(135deg, #6a5fd0, #ff7ab8); }
.dev-ad-close { color: #222 !important; }
/* cargador y texto rastreable */
#loader { position: absolute; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--bg); transition: opacity .4s; }
#loader.out { opacity: 0; pointer-events: none; }
.loader-gem { width: 46px; height: 46px; transform: rotate(45deg); border-radius: 10px; background: radial-gradient(circle at 35% 30%, #fff, #5c86f2 55%, #2347a8); animation: spin 1.4s ease-in-out infinite; }
.howto-src { display: none; }
.noscript { padding: 20px; text-align: center; }



/* ================= Monumenta ================= */
/* ---------- cartas: azulejo vidriado con marco de oro, efecto arriba y coste en la peana ---------- */
.cd { --w: 70px; position: relative; flex: none; width: var(--w); height: calc(var(--w) * 1.36); border-radius: calc(var(--w) * .09); overflow: visible;
  background: linear-gradient(165deg, color-mix(in srgb, var(--tc) 72%, #fff 28%), var(--tc) 42%, color-mix(in srgb, var(--tc) 62%, #000 38%));
  box-shadow: inset 0 0 0 calc(var(--w) * .035) #e9c36e, inset 0 0 0 calc(var(--w) * .055) rgba(60,30,8,.55), 0 3px 8px rgba(0,0,0,.5); color: #fff; }
.cd::before { content: ''; position: absolute; inset: calc(var(--w) * .055); border-radius: calc(var(--w) * .06); pointer-events: none; opacity: .22;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.35) 0 1px, transparent 1px calc(var(--w) * .16)), repeating-linear-gradient(90deg, rgba(255,255,255,.25) 0 1px, transparent 1px calc(var(--w) * .32)); }
.cd::after { content: ''; position: absolute; left: 8%; right: 8%; top: 5%; height: 26%; border-radius: 40% 40% 50% 50%; background: linear-gradient(180deg, rgba(255,255,255,.28), transparent); pointer-events: none; }
.cd svg { display: block; }
.cd-ti { position: absolute; z-index: 2; left: calc(var(--w) * .07); top: calc(var(--w) * .07); width: calc(var(--w) * .2); height: calc(var(--w) * .2); display: grid; place-items: center; border-radius: 50%; background: rgba(0,0,0,.35); color: #fff3d4; }
.cd-ti .ti { width: 72%; height: 72%; }
.cd-gives { position: absolute; z-index: 2; right: calc(var(--w) * .06); top: calc(var(--w) * .06); width: calc(var(--w) * .24); height: calc(var(--w) * .24); display: grid; place-items: center; border-radius: 50%; background: #2a1a10; box-shadow: 0 0 0 calc(var(--w) * .02) #e9c36e; }
.cd-gives .seal { width: 70%; height: 70%; }
.cd-fx { position: absolute; z-index: 1; left: 6%; right: 6%; top: 18%; bottom: 30%; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: calc(var(--w) * .03); font-weight: 800; font-size: max(11px, calc(var(--w) * .2)); line-height: 1; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.cd-fx .rs.big, .cd-fx .sy.big { width: calc(var(--w) * .36); height: calc(var(--w) * .36); filter: drop-shadow(0 2px 2px rgba(0,0,0,.45)); }
.cd-fx .sy.big { padding: calc(var(--w) * .03); border-radius: 50%; background: rgba(0,0,0,.35); box-shadow: 0 0 0 calc(var(--w) * .02) rgba(255,255,255,.35); }
.cd-fx .fx-n, .cd-fx .fx-per, .cd-fx .fx-fix, .cd-fx .fx-mil, .cd-fx .chs { display: inline-flex; align-items: center; gap: 1px; }
.cd-fx .fx-n svg, .cd-fx .fx-per svg { width: calc(var(--w) * .27); height: calc(var(--w) * .27); }
.cd-fx .fx-mil svg { width: calc(var(--w) * .2); height: calc(var(--w) * .3); margin: 0 -1px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.cd-fx .fx-per i { font-style: normal; opacity: .8; }
.cd-fx .fx-per .ti, .cd-fx .fx-per .sy, .cd-fx .fx-per .spear { width: calc(var(--w) * .22); height: calc(var(--w) * .22); }
.cd-fx .fx-fix .rs { width: calc(var(--w) * .2); height: calc(var(--w) * .2); } .cd-fx .fx-fix .coin { width: calc(var(--w) * .2); height: calc(var(--w) * .2); }
.cd-fx .fx-fix b { font-size: .8em; }
.cd-fx .chs { padding: 1px 3px; border-radius: 99px; background: rgba(0,0,0,.35); }
.cd-fx .chs .rs { width: calc(var(--w) * .2); height: calc(var(--w) * .2); } .cd-fx .chs i { font-style: normal; font-size: .7em; opacity: .7; }
.cd-fx .pts b { color: #fff4c8; }
.cd-cost { position: absolute; z-index: 2; left: calc(var(--w) * .055); right: calc(var(--w) * .055); bottom: calc(var(--w) * .055); height: 24%; border-radius: 0 0 calc(var(--w) * .06) calc(var(--w) * .06); display: flex; align-items: center; justify-content: center; gap: 1px; flex-wrap: wrap; align-content: center; padding: 0 2px; background: linear-gradient(180deg, rgba(30,16,8,.55), rgba(30,16,8,.85)); }
.cd-cost .rs { width: calc(var(--w) * .17); height: calc(var(--w) * .17); }
.cd-cost .cg { display: inline-flex; align-items: center; font-style: normal; font-weight: 800; font-size: max(11px, calc(var(--w) * .16)); color: #ffe7a8; } .cd-cost .cg .coin { width: calc(var(--w) * .17); height: calc(var(--w) * .17); }
.cd-cost .c0 { font-style: normal; font-weight: 800; font-size: max(11px, calc(var(--w) * .15)); color: rgba(255,240,210,.6); }
.cd-free { display: grid; place-items: center; width: calc(var(--w) * .2); height: calc(var(--w) * .2); margin-right: 2px; border-radius: 50%; background: rgba(0,0,0,.4); box-shadow: 0 0 0 1.5px rgba(255,255,255,.55); }
.cd-free .seal { width: 76%; height: 76%; }
.cd-free.have { background: #1f6e3a; box-shadow: 0 0 0 2px #8ff0a4, 0 0 8px #8ff0a4; }
.cd-nm { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; text-align: center; font-size: .78rem; font-weight: 700; line-height: 1.1; color: var(--text); }
.cd.big .cd-nm { display: none; }
/* precio para quien mira (solo en las cartas libres) */
.price { position: absolute; z-index: 3; left: 50%; bottom: 0; transform: translate(-50%, 55%); display: inline-flex; align-items: center; gap: 2px; padding: 1px 7px 1px 3px; border-radius: 99px; font-style: normal; font-weight: 800; font-size: max(11px, calc(var(--w) * .17)); color: #3a2600; background: linear-gradient(180deg, #ffe7a8, var(--gold)); box-shadow: 0 2px 4px rgba(0,0,0,.5); white-space: nowrap; }
.price .coin { width: 1.15em; height: 1.15em; }
.price.zero, .price.free { padding: 1px 7px; background: linear-gradient(180deg, #b9ffc9, var(--mint)); color: #06301a; }
.price.free .seal { width: 1.2em; height: 1.2em; color: #0b4a22 !important; }
.price.no { background: linear-gradient(180deg, #ffb3a6, #e0503e); color: #fff; }
/* reverso de época: arcilla (I), lapislázuli (II) y oro (III) */
.cd.back { background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--ba) 80%, #fff 20%), var(--ba) 45%, var(--bb)); }
.cd.back .bk { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: rgba(255,236,190,.92); }
.cd.back .bk .eg { width: 46%; height: 46%; filter: drop-shadow(0 2px 2px rgba(0,0,0,.45)); }
.cd.back .bk b { font-family: var(--display); font-size: calc(var(--w) * .2); letter-spacing: .08em; }

/* ---------- mesa ---------- */
#hud { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; gap: 6px; padding: calc(6px + var(--safe-t)) calc(6px + var(--safe-r)) calc(6px + max(var(--safe-b), var(--cookie-b, 0px))) calc(6px + var(--safe-l)); }
.b-pause { position: absolute; z-index: 20; top: calc(8px + var(--safe-t)); right: calc(8px + var(--safe-r)); width: 44px; height: 44px; }
.board-wrap { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.bw-top { flex: none; width: min(100%, 520px); display: flex; flex-direction: column; align-items: center; gap: 3px; padding-top: 8px; }
.era-tag { flex: none; font-family: var(--display); font-size: .84rem; letter-spacing: .05em; color: #f6e3bd; opacity: .9; text-shadow: 0 1px 3px #000; white-space: nowrap; }
.era-tag b { color: var(--gold); margin-right: 2px; }
.board { position: relative; flex: none; perspective: 900px; }
.board .cd { --w: var(--cw, 70px); position: absolute; left: calc(var(--x) * var(--hx)); top: calc(var(--r) * var(--ry)); cursor: pointer; transition: transform .15s, box-shadow .2s, filter .2s; }
.board .cd.covered { filter: brightness(.78) saturate(.85); }
.board .cd.free { box-shadow: inset 0 0 0 calc(var(--w) * .035) #ffe7a8, inset 0 0 0 calc(var(--w) * .055) rgba(60,30,8,.55), 0 0 0 2px #ffd76a, 0 0 14px rgba(255,200,90,.6), 0 4px 10px rgba(0,0,0,.6); }
.board .cd.free.mine { animation: glow 2.2s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: inset 0 0 0 calc(var(--w) * .035) #fff2c8, inset 0 0 0 calc(var(--w) * .055) rgba(60,30,8,.55), 0 0 0 2px #fff0a8, 0 0 24px rgba(255,210,110,.9), 0 4px 10px rgba(0,0,0,.6); } }
.board .cd.free:hover { transform: translateY(-3px); }
.board .cd.chosen { transform: translateY(-10%) scale(1.08); z-index: 99 !important; box-shadow: 0 0 0 3px #fff, 0 0 28px rgba(255,255,255,.9) !important; animation: none; }
.board .cd.back.free { cursor: default; }
.logline { flex: none; display: flex; align-items: center; justify-content: center; gap: 6px; max-width: 100%; min-height: 44px; padding: 4px 12px; border-radius: 99px; background: rgba(30,18,10,.76); box-shadow: inset 0 0 0 1.5px var(--hud-line); font-size: .84rem; font-weight: 700; color: #f6ead2; }
.logline svg { width: 16px; height: 16px; flex: none; opacity: .7; }
.logline span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logline.bad { box-shadow: inset 0 0 0 1.5px #ff6a5a; color: #ffd0c8; }

/* ---------- frontera: 15 casillas de mi capital (izquierda) a la del rival (derecha) ---------- */
.frontier { width: 100%; cursor: pointer; }
.fr-track { position: relative; display: grid; grid-template-columns: repeat(var(--n, 13), minmax(0, 1fr)); gap: 2px; height: 24px; padding: 2px; border-radius: 10px; background: rgba(20,12,6,.7); box-shadow: inset 0 0 0 1.5px var(--hud-line); }
.fc { position: relative; display: grid; place-items: center; border-radius: 4px; font-style: normal; background: rgba(255,255,255,.06); }
.fc.m { background: rgba(90,150,240,.14); } .fc.r { background: rgba(240,90,70,.14); }
.fc.m.z2 { background: rgba(90,150,240,.26); } .fc.r.z2 { background: rgba(240,90,70,.26); }
.fc.m.z3 { background: rgba(90,150,240,.4); } .fc.r.z3 { background: rgba(240,90,70,.4); }
.fc.c { background: rgba(255,220,150,.3); }
.fc .cap svg { width: 16px; height: 16px; color: #f6e3bd; } .fc.m .cap svg { color: #9cc2ff; } .fc.r .cap svg { color: #ff9a8a; }
.fc .cap, .fc .trib { display: grid; place-items: center; font-style: normal; }
.fc .trib { position: relative; display: flex; align-items: center; } .fc .trib .coin { width: 12px; height: 12px; opacity: .9; }
.fc .trib b { font-size: 11px; line-height: 1; color: #fff; text-shadow: 0 1px 2px #000; margin-left: -1px; }
.fr-std { position: absolute; z-index: 2; bottom: 1px; left: calc((var(--pos) + .5) / var(--n, 13) * 100%); width: 22px; height: 30px; transform: translateX(-30%); transition: left .4s cubic-bezier(.3,1.4,.5,1); pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.7)); }
.fr-std .stdd { width: 100%; height: 100%; }
.fr-std.bump { animation: stdbump .4s; } @keyframes stdbump { 40% { transform: translateX(-30%) translateY(-6px) scale(1.15); } }
.frontier.big .fr-track { height: 34px; } .frontier.big .fr-std { height: 40px; width: 28px; } .frontier.mid { width: 100%; }

/* ---------- franjas ---------- */
.strip { --cc: #c9a46a; position: relative; flex: none; display: flex; flex-direction: column; gap: 4px; padding: 5px 8px; border-radius: 16px; cursor: pointer;
  background: linear-gradient(180deg, rgba(58,36,22,.94), rgba(34,21,13,.94)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--cc) 45%, transparent), 0 6px 18px rgba(0,0,0,.35); transition: box-shadow .3s; }
.strip.active { box-shadow: inset 0 0 0 2px var(--cc), 0 0 20px color-mix(in srgb, var(--cc) 50%, transparent), 0 6px 18px rgba(0,0,0,.35); }
.strip.winner { animation: win-glow 1.2s ease-in-out infinite; }
@keyframes win-glow { 50% { box-shadow: inset 0 0 0 3px #ffd76a, 0 0 36px rgba(255,215,106,.8); } }
.s-top .st-head { padding-right: 46px; min-height: 46px; }
.st-head { display: flex; align-items: center; gap: 7px; min-height: 40px; }
.emb-w { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 1.5px var(--cc); }
.emb-w .emb, .emb-w > svg { width: 26px; height: 26px; display: block; }
.emb { width: 30px; height: 30px; display: block; }
.nmw { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
.nm { font-weight: 800; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nmw .cv { font-size: .72rem; color: color-mix(in srgb, var(--cc) 70%, #fff); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.turnpill { font-size: .74rem; font-weight: 800; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip.active .turnpill::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 4px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 6px var(--gold); animation: blink 1.2s infinite; vertical-align: 1px; }
@keyframes blink { 50% { opacity: .3; } }
.stat { flex: none; display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 1.05rem; padding: 3px 9px 3px 5px; border-radius: 99px; background: rgba(0,0,0,.32); }
.stat svg { width: 20px; height: 20px; }
.warn { flex: none; display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: .72rem; font-weight: 800; padding: 3px 7px; border-radius: 99px; background: #c4281e; color: #fff; animation: pulse 1s ease-in-out infinite; white-space: nowrap; }
.warn svg { width: 12px; height: 12px; color: #fff !important; }
@keyframes pulse { 50% { transform: scale(1.08); } }
.warns { position: absolute; z-index: 4; top: -9px; right: 12px; display: flex; gap: 4px; pointer-events: none; }
.s-top .warns { right: 56px; }
.s-top .warns { top: auto; bottom: -9px; }
.st-body { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.prod { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 3px; }
.pc { display: inline-flex; align-items: center; gap: 1px; padding: 1px 6px 1px 3px; border-radius: 99px; background: rgba(0,0,0,.32); font-style: normal; font-weight: 800; font-size: .88rem; }
.pc .rs { width: 17px; height: 17px; } .pc > svg:not(.rs) { width: 15px; height: 15px; color: var(--gold); }
.pc.zero { opacity: .36; } .pc.fix { box-shadow: inset 0 0 0 1.5px #ffd76a; }
.pc.chc { color: var(--gold); }
.arts { flex: none; display: grid; grid-template-columns: repeat(3, 15px); gap: 2px; padding: 2px; border-radius: 8px; background: rgba(0,0,0,.35); }
.art { display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; font-style: normal; background: rgba(255,255,255,.05); }
.art .sy { width: 80%; height: 80%; opacity: .25; filter: grayscale(1); }
.art.on { background: rgba(255,255,255,.14); box-shadow: 0 0 6px rgba(160,200,255,.6); } .art.on .sy { opacity: 1; filter: none; }
.art.two { box-shadow: 0 0 0 1.5px #ffd76a, 0 0 6px rgba(255,215,106,.7); }
.mons { flex: none; display: flex; gap: 3px; }
.mm { display: block; width: 28px; height: 19px; border-radius: 4px; overflow: hidden; font-style: normal; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.mm .mart { width: 100%; height: 100%; filter: grayscale(1) brightness(.5); opacity: .7; }
.mm.on { box-shadow: 0 0 0 1.5px var(--gold), 0 0 6px rgba(255,215,106,.6); } .mm.on .mart { filter: none; opacity: 1; }
.shield-on { position: relative; display: grid; place-items: center; width: 22px; height: 22px; font-style: normal; } .shield-on .shd { width: 22px; height: 22px; filter: drop-shadow(0 0 4px #7fd0ff); }
.shield-on b { position: absolute; right: -4px; bottom: -4px; font-size: 11px; text-shadow: 0 1px 2px #000; }
.dsc { position: relative; display: grid; place-items: center; width: 22px; height: 22px; font-style: normal; color: var(--gold); } .dsc svg { width: 20px; height: 20px; } .dsc b { position: absolute; right: -4px; bottom: -4px; font-size: 11px; color: #fff; text-shadow: 0 1px 2px #000; }
.pop { animation: pop .5s; } @keyframes pop { 40% { transform: scale(1.4); filter: brightness(1.7); } }
.strip.away { opacity: .72; filter: saturate(.6); }
body.lowp .st-head { min-height: 38px; } body.lowp .strip { gap: 3px; padding: 4px 8px; }
body.lowp .emb-w { width: 32px; height: 32px; } body.lowp .emb-w .emb { width: 22px; height: 22px; }
body.tight .strip { gap: 2px; padding: 3px 8px; } body.tight #hud { gap: 4px; } body.tight .era-tag { display: none; }

/* ---------- horizontal y escritorio: rival a la izquierda, formación en el centro, la tuya a la derecha ---------- */
body.land #hud { --sw: clamp(158px, 21vw, 300px); display: grid; grid-template-columns: var(--sw) minmax(0, 1fr) var(--sw); gap: 8px; }
body.land .s-top { grid-column: 1; grid-row: 1; padding-top: 56px; justify-content: flex-start; overflow: hidden; }
body.land .board-wrap { grid-column: 2; grid-row: 1; }
body.land .s-bot { grid-column: 3; grid-row: 1; padding-bottom: 58px; justify-content: flex-start; overflow: hidden; }
body.land .b-pause { top: calc(10px + var(--safe-t)); left: calc(12px + var(--safe-l)); right: auto; }
body.land .logline { position: fixed; z-index: 6; right: calc(10px + var(--safe-r)); bottom: calc(10px + max(var(--safe-b), var(--cookie-b, 0px))); width: calc(var(--sw) - 8px); justify-content: flex-start; font-size: .76rem; }
body.land .s-top .st-head { padding-right: 0; }
body.land .st-head { flex-wrap: wrap; min-height: 0; row-gap: 5px; }
body.land .nmw { flex: 1 1 calc(100% - 50px); }
body.land .st-head .stat { flex: 1 1 0; justify-content: center; }
body.land .st-body { flex-direction: column; align-items: stretch; gap: 6px; }
body.land .prod { display: grid; grid-template-columns: repeat(3, 1fr); }
body.land .pc { justify-content: center; }
body.land .arts { align-self: center; grid-template-columns: repeat(6, 18px); } body.land .art { width: 18px; height: 18px; }
body.land .mons { justify-content: center; } body.land .mm { width: 40px; height: 27px; }
body.land .shield-on, body.land .dsc { align-self: center; }
body.land .warns { top: -8px; left: 50%; transform: translateX(-50%); } body.land .s-top .warns { top: 50px; bottom: auto; } body.land .s-bot .warns { top: 3px; }
body.land .bw-top { flex-direction: row; gap: 8px; } body.land .era-tag { flex: none; }
body.land.short .strip { gap: 3px; padding: 5px 6px; }
body.land.short .strip.s-top { padding-top: 54px; } body.land.short .strip.s-bot { padding-bottom: 56px; }
body.land.short .turnpill { display: none; }
body.land.short .emb-w { width: 30px; height: 30px; } body.land.short .emb-w .emb { width: 22px; height: 22px; }
body.land.short .stat { font-size: .92rem; padding: 2px 7px 2px 4px; } body.land.short .stat svg { width: 16px; height: 16px; }
body.land.short .pc { padding: 1px 2px; font-size: .78rem; } body.land.short .pc .rs { width: 14px; height: 14px; }
body.land.short .arts { grid-template-columns: repeat(6, 15px); } body.land.short .art { width: 15px; height: 15px; }
body.land.short .mm { width: 34px; height: 22px; }
body.land.short .era-tag { font-size: .72rem; } body.land.short .fr-track { height: 20px; }
body.desk .strip { padding: 12px; gap: 10px; }
body.desk .s-top { padding-top: 64px; } body.desk .s-bot { padding-bottom: 64px; }
body.desk .nm { font-size: 1.2rem; } body.desk .stat { font-size: 1.25rem; } body.desk .stat svg { width: 24px; height: 24px; }
body.desk .pc { font-size: 1.02rem; padding: 3px 8px 3px 4px; } body.desk .pc .rs { width: 21px; height: 21px; }
body.desk .arts { grid-template-columns: repeat(6, 28px); gap: 4px; padding: 4px; } body.desk .art { width: 28px; height: 28px; }
body.desk .mm { width: 72px; height: 48px; border-radius: 7px; }
body.desk .era-tag { font-size: 1rem; } body.desk .logline { font-size: .9rem; } body.desk .fr-track { height: 30px; }
.strip > * { flex-shrink: 0; }

/* ---------- hojas de la partida ---------- */
.sheet header h3 { display: flex; align-items: center; gap: 8px; } .sheet header h3 .emb, .sheet header h3 > svg { width: 30px; height: 30px; flex: none; }
.sheet header h3 span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-sheet .sheet-body { gap: 10px; }
.cs-top { display: flex; gap: 14px; align-items: flex-start; text-align: left; }
.cs-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cs-type { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: color-mix(in srgb, var(--tc) 55%, #fff); }
.cs-type .ti { width: 18px; height: 18px; color: color-mix(in srgb, var(--tc) 70%, #fff); }
.cs-fx { margin: 0; padding-left: 1.1em; font-size: .96rem; line-height: 1.3; }
.cs-fx li { margin: 2px 0; }
.cs-fx li.now { list-style: none; margin-left: -1.1em; display: flex; align-items: center; gap: 4px; font-weight: 800; color: #bfe3ff; } .cs-fx li.now .star { width: 16px; height: 16px; flex: none; }
.cs-cost { text-align: left; padding: 8px 12px; border-radius: 14px; background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 1.5px var(--line); font-size: .9rem; line-height: 1.3; display: flex; flex-direction: column; gap: 4px; }
.cs-cost p { margin: 0; display: flex; align-items: flex-start; gap: 6px; } .cs-cost p > svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.cs-cost p.ok { color: #c4f5cf; }
.cs-cost .cs-h { justify-content: space-between; align-items: center; font-weight: 800; color: var(--gold); }
.cs-cost .q { width: 44px; height: 44px; margin: -9px -8px -9px 0; border-radius: 50%; font-weight: 800; font-size: 1.05rem; color: var(--accent-text); background: radial-gradient(circle, var(--gold) 0 14px, transparent 15px); flex: none; }
.cs-cost .tot { margin-top: 2px; font-weight: 800; color: var(--gold); align-items: center; } .cs-cost .tot .coin { width: 18px; height: 18px; }
.cs-cost.no { box-shadow: inset 0 0 0 1.5px #ff6a5a; } .cs-cost.no .tot { color: #ffb0a4; }
.cs-cost.small { font-size: .82rem; padding: 6px 10px; }
.cs-note { text-align: left; }
.row.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cs-acts .btn { min-height: 58px; padding: .35em .45em; font-size: clamp(.9rem, 4vw, 1.05rem); }
.cs-acts .btn span { align-items: center; text-align: center; } .cs-acts .btn small { font-size: max(11px, .72em); white-space: normal; }
.b-ad { align-self: center; }
.help p { margin: .3em 0; line-height: 1.35; text-align: left; } .help-sheet .sheet-body { gap: 10px; }
.pricebar { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; } .pricebar .pc { font-size: 1rem; padding: 3px 9px 3px 4px; } .pricebar .pc .rs { width: 20px; height: 20px; }
.realm-sheet .sheet-body { text-align: left; gap: 10px; }
.rl-civ .civ { width: 100%; }
.rl-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rl-arts { display: flex; align-items: center; gap: 10px; } .rl-arts .arts { grid-template-columns: repeat(6, 28px); gap: 4px; padding: 4px; } .rl-arts .art { width: 28px; height: 28px; }
.rl-arts small { color: var(--muted); font-size: .8rem; }
.rl-mons, .rl-discs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rl-discs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rl-seals { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; } .rl-seals .seal { width: 22px; height: 22px; } .rl-seals i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.35); }
.rl-pres ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; font-size: .9rem; }
.rl-pres li { display: flex; justify-content: space-between; gap: 6px; } .rl-pres li.tot { grid-column: 1 / -1; font-weight: 800; color: var(--gold); border-top: 1px solid var(--line); padding-top: 3px; }
.rl-pres li.tot span { display: inline-flex; align-items: center; gap: 4px; } .rl-pres .star { width: 16px; height: 16px; }
.realm-sheet h4 { margin: 6px 0 2px; display: flex; align-items: center; gap: 6px; color: color-mix(in srgb, var(--tc, #f2c45f) 55%, #fff); font-size: .98rem; }
.realm-sheet h4 svg { width: 18px; height: 18px; color: color-mix(in srgb, var(--tc, #f2c45f) 70%, #fff); } .realm-sheet h4 small { color: var(--muted); }
.rl-cards { display: flex; flex-wrap: wrap; gap: 6px; } .rl-cards .cd { cursor: pointer; }
.rl-cards.revive { gap: 10px; } .rv-b { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border-radius: 12px; background: rgba(0,0,0,.25); } .rv-b small { font-weight: 700; font-size: .8rem; max-width: 90px; }
@media (max-width: 440px) { .rl-pres ul { grid-template-columns: 1fr; } }
.log-list { list-style: none; margin: 0; padding: 0; text-align: left; font-size: .92rem; line-height: 1.3; }
.log-list li { padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.07); } .log-list li.bad { color: #ffc0b6; } .log-list li.sep { color: var(--gold); font-weight: 800; text-align: center; }
.zoom-wrap { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: calc(20px + var(--safe-t)) 20px calc(20px + var(--safe-b)); background: rgba(18,10,6,.8); animation: fade .15s both; }
.zoom-wrap .cs-fx { max-width: 340px; color: #fff; text-align: left; background: rgba(34,20,12,.92); border-radius: 14px; padding: 10px 14px 10px 30px; }

/* monumentos, descubrimientos y civilizaciones */
.mon { position: relative; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, #4a2f1e, #2c1a10); box-shadow: inset 0 0 0 1.5px #c9a46a, 0 4px 10px rgba(0,0,0,.4); text-align: center; }
.mon-art { display: block; aspect-ratio: 3 / 2; } .mon-art .mart { width: 100%; height: 100%; }
.mon-fx { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 3px; padding: 4px 4px 2px; font-weight: 800; font-size: .9rem; line-height: 1; min-height: 28px; }
.mon-fx svg { width: 20px; height: 20px; } .mon-fx .fx-mil svg { width: 14px; height: 20px; margin: 0 -1px; } .mon-fx .chs { display: inline-flex; align-items: center; padding: 1px 4px; border-radius: 99px; background: rgba(0,0,0,.35); } .mon-fx .chs svg { width: 16px; height: 16px; } .mon-fx .chs i { font-style: normal; font-size: .7em; opacity: .7; }
.mon-fx span { display: inline-flex; align-items: center; gap: 1px; } .mon-fx i { font-style: normal; opacity: .8; }
.mon-cost { display: flex; justify-content: center; flex-wrap: wrap; gap: 1px; padding: 2px 4px; background: rgba(0,0,0,.35); } .mon-cost svg { width: 15px; height: 15px; } .mon-cost .cg { display: inline-flex; align-items: center; font-style: normal; font-weight: 800; font-size: .8rem; }
.mon-nm { margin: 0; padding: 3px 4px 5px; font-family: var(--display); font-size: .82rem; line-height: 1.1; color: #ffe7b8; }
.mon.built { box-shadow: inset 0 0 0 2px var(--gold), 0 0 12px rgba(255,215,106,.5); }
.mon.small:not(.built) .mon-art { filter: grayscale(.6) brightness(.8); }
.mon .price { position: absolute; top: 6px; right: 6px; left: auto; bottom: auto; transform: none; font-size: .85rem; }
.mon .own { position: absolute; top: 4px; left: 4px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px 2px 3px; border-radius: 99px; background: rgba(0,0,0,.72); font-style: normal; font-size: .72rem; font-weight: 800; max-width: calc(100% - 8px); }
.mon .own .emb { width: 18px; height: 18px; } .mon .own b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.disc { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px; border-radius: 12px; text-align: left; background: linear-gradient(180deg, rgba(91,143,240,.22), rgba(47,95,196,.12)); box-shadow: inset 0 0 0 1.5px rgba(140,180,255,.5); }
.disc b { font-family: var(--display); font-weight: 400; font-size: 1rem; color: #dfe8ff; } .disc small { font-size: .82rem; line-height: 1.25; color: #e8ecf8; } .disc-ic svg { width: 18px; height: 18px; color: var(--gold); }
.disc { position: relative; } .disc .disc-ic { position: absolute; right: 8px; top: 8px; }
.disc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .disc-b { display: block; text-align: left; } .disc-b:active .disc { transform: scale(.97); }
.civ { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px; border-radius: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--cc) 30%, #2c1a10), #2a180e); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--cc) 70%, transparent); text-align: center; }
.civ .emb { width: 40px; height: 40px; } .civ b { font-family: var(--display); font-weight: 400; font-size: 1.12rem; color: #fff2d6; } .civ small { font-size: .82rem; line-height: 1.25; color: var(--muted); }
.civ em { font-style: normal; font-size: .75rem; font-weight: 800; color: var(--gold); }

/* ---------- reparto (civilización y monumentos) ---------- */
.draft-p { z-index: 3; }
.screen.ov { z-index: 6; }
.draft-p .card { width: min(760px, 100%); gap: 8px; padding: 14px 14px 16px; position: relative; overflow: hidden; }
.draft-p .civ-grid, .draft-p .mon-grid { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 3px; margin: -3px; }
.draft-p .b-pick, .draft-p .dr-sel { flex: none; }
.draft-p h2 { font-size: 1.55rem; padding: 0 48px; text-wrap: balance; } .dr-kick { margin: 0; font-family: var(--display); font-size: .9rem; letter-spacing: .08em; color: #f0d29a; }
.dr-who { font-weight: 800; color: var(--text); } .dr-who.mine { color: var(--gold); }
.dr-who .clk { margin-left: 4px; padding: 0 6px; border-radius: 99px; background: rgba(0,0,0,.35); font-variant-numeric: tabular-nums; } .dr-who .clk:empty { display: none; } .dr-who .clk.low { background: #c4281e; }
.dr-order { display: inline-flex; gap: 2px; vertical-align: middle; } .dr-order i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.35); } .dr-order i.me { box-shadow: inset 0 0 0 1.5px var(--gold); } .dr-order .emb { width: 16px; height: 16px; }
.dr-sel { min-height: 2.6em; font-size: .9rem; color: var(--text); }
.civ-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.civ-b { display: block; border-radius: 14px; } .civ-b[disabled] { cursor: default; } .civ-b.sel .civ { box-shadow: inset 0 0 0 3px var(--gold), 0 0 16px rgba(255,215,106,.6); }
.civ.taken { opacity: .45; filter: grayscale(.7); }
.mon-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mon-b { display: block; border-radius: 12px; text-align: center; } .mon-b.sel .mon { box-shadow: inset 0 0 0 3px var(--gold), 0 0 16px rgba(255,215,106,.7); transform: translateY(-2px); }
.mon-b.owned { cursor: default; } .mon-b.owned.rv .mon { opacity: .6; } .mon-b.owned.me .mon { box-shadow: inset 0 0 0 2px #8ff0a4; }
.mon-b .mon-nm { font-size: .78rem; }
.b-dpause { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; }
@media (max-width: 520px) { .mon-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .draft-p .card { padding: 12px 10px 14px; } }
@media (orientation: landscape) and (max-height: 500px) {
  .draft-p .card { width: min(900px, 100%); } .mon-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; } .civ-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .draft-p .civ small { font-size: .74rem; } .draft-p h2 { font-size: 1.25rem; } .draft-p .card > .sub.small { display: none; }
  .mon-b .mon-fx { min-height: 24px; } .mon-b .mon-fx svg { width: 16px; height: 16px; } .mon-b .mon-nm { font-size: .7rem; }
}
/* levantar un monumento */
.raise-sheet .sheet-body { gap: 10px; }
.mon-list { display: flex; flex-direction: column; gap: 10px; }
.mon-row { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); gap: 10px; align-items: start; text-align: left; }
.mon-row.no .mon { filter: grayscale(.5) brightness(.85); }
.mr-info { display: flex; flex-direction: column; gap: 6px; } .mr-info .btn { min-height: 48px; } .mr-info .cs-fx { font-size: .88rem; }

/* ---------- efectos ---------- */
.float { position: fixed; z-index: 40; transform: translate(-50%, -50%); pointer-events: none; font: 900 1.5rem/1 var(--font); color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.5), 0 0 10px rgba(0,0,0,.6); animation: floatup 1.2s cubic-bezier(.2,.8,.3,1) both; display: flex; align-items: center; gap: 4px; }
.float svg { width: 28px; height: 28px; }
.float.dmg { color: #ff6a5a; } .float.gold { color: #ffd76a; } .float.prod { color: #8ff0a4; } .float.shd { color: #9fd4ff; }
@keyframes floatup { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -190%) scale(1); } }
.coach { position: fixed; z-index: 57; left: 50%; top: calc(8px + var(--safe-t)); transform: translateX(-50%); width: min(92vw, 420px); padding: 12px 14px; border-radius: 16px; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; background: rgba(34,20,12,.97); box-shadow: inset 0 0 0 2px var(--gold), 0 10px 30px rgba(0,0,0,.6); animation: up .3s both; font-weight: 700; }
.coach p { margin: 0; line-height: 1.3; font-size: .95rem; }
.sheet .coach { position: static; transform: none; width: auto; margin-top: 4px; }
body.land .coach { top: auto; left: auto; transform: none; right: calc(10px + var(--safe-r)); bottom: calc(60px + var(--safe-b)); width: calc(var(--sw) - 8px); padding: 10px; } body.land .coach p { font-size: .82rem; }

/* ---------- transiciones de época y final ---------- */
.er-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.er-col { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 16px; background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--cc) 50%, transparent); }
.er-nm { margin: 0; display: flex; align-items: center; gap: 6px; font-weight: 800; } .er-nm .emb { width: 26px; height: 26px; }
.er-col .arts { grid-template-columns: repeat(6, 20px); } .er-col .art { width: 20px; height: 20px; }
.er-pr { margin: 0; display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.1rem; } .er-pr span { display: inline-flex; align-items: center; gap: 4px; } .er-pr svg { width: 20px; height: 20px; }
.era-p h2 { animation: bump .7s cubic-bezier(.2,1.6,.4,1) both; font-size: 2rem; }
.era-role { margin: 2px 0 6px; font-size: .95rem; line-height: 1.25; color: #f3e6cc; text-wrap: balance; }
.era-p.era1 .card { background: linear-gradient(180deg, #5a2c16, #2c160a); } .era-p.era2 .card { background: linear-gradient(180deg, #1c3270, #10183a); } .era-p.era3 .card { background: linear-gradient(180deg, #6a4a10, #2c1e06); }
body.short .era-p .card { padding-top: 12px; padding-bottom: 12px; gap: 6px; }
body.short .era-p .er-col { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 4px 12px; padding: 6px 10px; }
@keyframes bump { from { transform: scale(.5); opacity: 0; } }
.brk { width: 100%; border-collapse: collapse; font-size: .95rem; }
.brk th, .brk td { padding: 4px 6px; text-align: center; }
.brk th { font-weight: 800; } .brk th .emb { width: 26px; height: 26px; display: inline-block; vertical-align: middle; margin-right: 4px; }
.brk th span { vertical-align: middle; } .brk th.win span { color: var(--gold); }
.brk td:first-child { text-align: left; color: var(--muted); }
.brk tbody tr { border-top: 1px solid rgba(255,255,255,.07); }
.brk tr.tot td { font-weight: 800; color: var(--gold); font-size: 1.08rem; } .brk tr.tot td:first-child { color: var(--gold); display: flex; align-items: center; gap: 4px; } .brk .star { width: 18px; height: 18px; }
body.short .end-p .card { width: min(800px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) 280px; grid-template-rows: auto auto 1fr; column-gap: 18px; row-gap: 6px; align-items: start; padding-top: 12px; padding-bottom: 12px; }
body.short .end-p .card > h2, body.short .end-p .card > .why, body.short .end-p .card > .brk { grid-column: 1; }
body.short .end-p .card > .col { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
body.short .end-p .card > .col .row.two { flex-direction: column; } body.short .end-p .card > .col .row.two > .btn { flex: none; }
body.short .end-p .brk { font-size: .86rem; } body.short .end-p .brk th, body.short .end-p .brk td { padding: 1px 6px; }
body.short .end-p .card > h2 { font-size: 1.45rem; }

/* ---------- portada ---------- */
.title-screen { isolation: isolate; }
.title-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .32; -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); }
.title-sky .mart { width: 100%; height: 100%; }
.title-fan { position: relative; flex: 1 1 auto; min-height: 0; width: min(560px, 100%); display: flex; justify-content: center; align-items: center; pointer-events: none; }
.title-fan .cd { --w: clamp(62px, min(18vw, 14vh), 128px); position: absolute; transform-origin: 50% 130%; animation: tfan 1s cubic-bezier(.2,.9,.3,1) both; }
.tf0 { transform: translateX(-62%) rotate(-24deg); animation-delay: .05s !important; } .tf1 { transform: translateX(-32%) rotate(-12deg); animation-delay: .12s !important; }
.tf2 { transform: translateY(-6%) rotate(0deg); z-index: 3; animation-delay: .19s !important; } .tf3 { transform: translateX(32%) rotate(12deg); animation-delay: .26s !important; } .tf4 { transform: translateX(62%) rotate(24deg); animation-delay: .33s !important; }
@keyframes tfan { from { opacity: 0; transform: translateY(40%) rotate(0deg) scale(.7); } }
.tf-emb { position: absolute; z-index: 4; top: 50%; display: grid; place-items: center; width: clamp(54px, min(15vw, 11vh), 92px); aspect-ratio: 1; border-radius: 50%; background: rgba(30,18,10,.85); box-shadow: inset 0 0 0 2px currentColor, 0 6px 14px rgba(0,0,0,.6); animation: embin 1.1s .4s cubic-bezier(.2,1.4,.4,1) both; }
.tf-emb .emb { width: 66%; height: 66%; }
.tf-emb.a { left: 2%; } .tf-emb.o { right: 2%; color: #21a99c; }
@keyframes embin { from { opacity: 0; transform: scale(.3); } }
.title-bottom .btn.big { justify-content: flex-start; }
.title-bottom .btn.big svg { width: 1.5em; height: 1.5em; }
.opts .lvd { grid-column: 1 / -1; text-align: left; margin-top: -4px; min-height: 1.2em; }
.opts > .sub.small { grid-column: 1 / -1; text-align: left; }
@media (orientation: landscape) and (max-height: 500px) {
  .title-screen { display: grid; grid-template-columns: 1fr minmax(280px, 390px); grid-template-rows: auto 1fr; column-gap: 18px; align-items: center; }
  .title-screen .logo { grid-column: 1; grid-row: 1; margin-top: 46px; } .title-screen .logo .lg { font-size: clamp(2rem, 8vh, 3.6rem); }
  .title-screen .title-fan { grid-column: 1; grid-row: 2; height: 100%; } .title-fan .cd { --w: clamp(50px, 16vh, 92px); }
  .title-screen .title-bottom { grid-column: 2; grid-row: 1 / 3; gap: 8px; } .title-bottom .btn.big { min-height: 52px; font-size: 1.1rem; }
}
@media (orientation: landscape) and (max-height: 360px) { .title-screen .title-bottom { gap: 6px; } .title-bottom .btn.big { min-height: 46px; } }
.tg-play { align-self: center; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 6px 16px; min-height: 44px; border-radius: 99px; background: #229ed9; color: #fff; font-weight: 800; font-size: .92rem; text-decoration: none; box-shadow: 0 3px 0 #16729e, 0 6px 14px rgba(0,0,0,.25); }
body.tg .tg-play { display: none; }
body.tg-full { --safe-t: calc(max(env(safe-area-inset-top, 0px), var(--tg-sys-top, 0px)) + var(--tg-bar-top, 48px)); }
body.tg .portal-link { display: none; }
@media (max-height: 400px) and (orientation: landscape) { .title-screen .tg-play { position: absolute; z-index: 2; top: calc(8px + var(--safe-t)); left: var(--tg-left, calc(10px + var(--safe-l))); margin: 0; } }

/* ---------- online: hoja «Online», apodo, sala de espera, reloj y estado de la red ---------- */
.online-sheet .sheet-body { gap: 12px; }
.online { display: flex; flex-direction: column; gap: 12px; }
.online .btn.big { justify-content: flex-start; }
.online .btn.big svg { width: 1.45em; height: 1.45em; }
.sheet header h3 svg { color: var(--gold); }
.nick-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nick-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 70%; padding: 0 14px; border-radius: 99px; background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 2px var(--line); font-weight: 800; font-size: 1.02rem; }
.nick-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nick-chip svg { width: 16px; height: 16px; flex: none; color: var(--gold); }
.join-row { display: flex; gap: 8px; }
.join-row .code { flex: 1 1 auto; min-width: 0; height: 50px; border-radius: 14px; border: 0; padding: 0 14px; font-size: 1.3rem; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; text-align: center; color: var(--text); background: rgba(0,0,0,.32); box-shadow: inset 0 0 0 2px var(--line); }
.join-row .code::placeholder { letter-spacing: .12em; font-size: 1rem; color: rgba(240,220,190,.45); }
.join-row .btn { flex: none; }
.nick-sheet .sheet-body { gap: 10px; }
.lobby { justify-content: center; }
.lobby .card { gap: 12px; }
.code-big { display: flex; justify-content: center; gap: 6px; }
.code-big b { display: grid; place-items: center; width: clamp(44px, 13vw, 58px); height: clamp(54px, 16vw, 70px); border-radius: 14px; font-family: var(--display); font-weight: 400; font-size: clamp(1.8rem, 9vw, 2.6rem); color: #3a2600; background: linear-gradient(180deg, #ffe7a8, var(--gold) 60%, #d39a32); box-shadow: 0 4px 0 #8a5a14, 0 8px 18px rgba(0,0,0,.35); }
.lobby .row.two > .btn { min-height: 50px; }
.seats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.seat { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 2px 6px 2px 14px; border-radius: 14px; background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 1.5px var(--line); }
.seat.me { box-shadow: inset 0 0 0 2px var(--gold); }
.seat .nm { flex: 1 1 auto; min-width: 0; font-size: 1.02rem; }
.seat .nm small { color: var(--muted); font-weight: 700; }
.seat .sdot { width: 10px; height: 10px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); flex: none; }
.seat.empty { color: var(--muted); } .seat.empty .spin { margin: 0; flex: none; }
.lobby .opts.compact { grid-template-columns: minmax(0, auto) minmax(0, 1fr); }
.lobby .searching { display: flex; align-items: center; justify-content: center; gap: 4px; }
.connecting .card { gap: 14px; }
.turnpill .clk { display: inline-block; margin-right: 5px; padding: 0 6px; border-radius: 99px; background: rgba(0,0,0,.35); color: #fff; font-variant-numeric: tabular-nums; }
.turnpill .clk:empty { display: none; }
.turnpill .clk.low { background: #c4281e; animation: pulse 1s ease-in-out infinite; }
.board .cd.sending { transform: translateY(-6%) scale(1.04); box-shadow: 0 0 0 3px #fff, 0 0 20px rgba(255,255,255,.8) !important; animation: none; z-index: 98 !important; }
.logline.net { color: #fff; box-shadow: inset 0 0 0 1.5px var(--sky); }
.logline.net .spin { flex: none; width: 15px; height: 15px; margin: 0; border-width: 2.5px; }
.logline.k-ask { box-shadow: inset 0 0 0 2px var(--gold); color: #fff2c4; animation: pulse 1.4s ease-in-out infinite; }
.logline .aw { flex: none; font-variant-numeric: tabular-nums; color: var(--gold); }
.ask-sheet .sheet-body { text-align: center; }
.ask-sheet .btn.big { justify-content: flex-start; }
.end-p .b-again small { white-space: normal; }

/* ---------- revisión de interfaz (árbitro de móvil, vuelta 1) ---------- */
/* capitales de la frontera con el emblema y el color de su civilización; cada lado con el color de su civilización */
.fc.m { background: color-mix(in srgb, var(--mc) 16%, transparent); } .fc.r { background: color-mix(in srgb, var(--rc) 16%, transparent); }
.fc.m.z2 { background: color-mix(in srgb, var(--mc) 30%, transparent); } .fc.r.z2 { background: color-mix(in srgb, var(--rc) 30%, transparent); }
.fc.m.z3 { background: color-mix(in srgb, var(--mc) 46%, transparent); } .fc.r.z3 { background: color-mix(in srgb, var(--rc) 46%, transparent); }
.fc .cap { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 4px; background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 1.5px var(--cc); }
.fc .cap .emb, .fc .cap svg { width: 16px; height: 16px; color: var(--cc); }
.frontier.big .fc .cap .emb { width: 22px; height: 22px; }
/* registro en dos líneas en horizontal (la columna es estrecha) */
body.land .logline span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.15; }
/* monumento levantado: marca clara */
.mon .mon-ok { position: absolute; top: 4px; left: 4px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px 2px 3px; border-radius: 99px; background: #1f6e3a; color: #fff; font-style: normal; font-size: 11px; font-weight: 800; }
.mon .mon-ok svg { width: 14px; height: 14px; }
/* horizontal bajo: hoja de carta en dos columnas (carta y efecto | coste y botones) */
@media (orientation: landscape) and (max-height: 520px) {
  .sheet { width: min(880px, 100%); }
  .card-sheet .sheet-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 8px 14px; align-items: start; }
  .card-sheet .cs-top { grid-column: 1; grid-row: 1 / span 4; }
  .card-sheet .cs-cost, .card-sheet .cs-note, .card-sheet .cs-acts, .card-sheet .b-ad, .card-sheet .coach { grid-column: 2; }
  .card-sheet .cs-acts .btn { min-height: 52px; }
  .sheet { padding-top: 10px; } .sheet header { margin-bottom: 6px; }
  /* pausa en dos columnas */
  .menu-p .card { width: min(560px, 100%); padding-top: 12px; padding-bottom: 12px; }
  .menu-p .col { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .menu-p .col .b-res { grid-column: 1 / -1; }
  .menu-p .col .btn { min-height: 50px; }
  /* presentación de época: texto y botón a la izquierda; frontera y resumen a la derecha */
  .era-p .card { width: min(860px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); column-gap: 16px; row-gap: 6px; align-items: center; padding-top: 12px; padding-bottom: 12px; }
  .era-p .card > * { grid-column: 1; } .era-p .card > .frontier { grid-column: 2; grid-row: 1 / span 2; align-self: end; } .era-p .card > .er-cols { grid-column: 2; grid-row: 3 / span 3; }
  .era-p h2 { font-size: 1.6rem; } .era-p .b-close { min-height: 52px; }
  /* reparto: monumentos más bajos */
  .mon-b .mon-art { aspect-ratio: 2 / 1; }
  /* sala de espera en dos columnas */
  .lobby:not(.quick) .card { width: min(820px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; row-gap: 8px; align-items: center; padding-top: 12px; padding-bottom: 12px; }
  .lobby:not(.quick) .card > * { grid-column: 1; } .lobby:not(.quick) .card > .seats, .lobby:not(.quick) .card > .opts, .lobby:not(.quick) .card > .b-leave { grid-column: 2; }
  .lobby:not(.quick) .card > .seats { grid-row: 1 / span 2; }
  .lobby .code-big b { height: 52px; }
  /* hoja Online en dos columnas */
  .online { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; align-items: center; }
  .online .nick-row, .online > .sub { grid-column: 1 / -1; } .online .btn.big { min-height: 52px; }
}
@media (orientation: landscape) and (max-height: 360px) { .era-p .era-role { font-size: .85rem; } .era-p .er-col { padding: 4px 8px; } .draft-p .card { padding-top: 8px; gap: 4px; } .draft-p h2 { font-size: 1.15rem; } .draft-p .dr-kick { display: none; } }
/* franjas en móviles estrechos: chips de producción más compactos para no partir la fila */
@media (max-width: 400px) { .pc { padding: 1px 4px 1px 2px; font-size: .84rem; } .pc .rs { width: 15px; height: 15px; } .mm { width: 26px; height: 18px; } }
/* pie de la franja (solo en horizontal y escritorio, donde sobra alto): cartas por tipo y sellos */
.st-foot { display: none; }
body.land .st-foot { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.tcs { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px 8px; }
.tc { display: inline-flex; align-items: center; gap: 2px; font-style: normal; font-size: .82rem; font-weight: 800; color: color-mix(in srgb, var(--tc) 55%, #fff); }
.tc .ti { width: 15px; height: 15px; color: color-mix(in srgb, var(--tc) 75%, #fff); } .tc.zero { opacity: .3; }
.st-foot .seals { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; } .st-foot .seals .seal { width: 18px; height: 18px; }
body.land.short .st-foot { display: none; }
body.desk .tc { font-size: 1rem; } body.desk .tc .ti { width: 20px; height: 20px; } body.desk .st-foot .seals .seal { width: 24px; height: 24px; }
.copy-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .copy-list .btn { justify-content: flex-start; } .copy-list .sy { width: 28px; height: 28px; }
.rvc { display: inline-grid; place-items: center; border-radius: 50%; box-shadow: 0 0 0 1.5px #ff8a7a; } .rvc .ti { color: #ffb0a4; }
body.land .warns { right: auto; } body.land .s-top .warns { right: auto; }
/* la pausa cabe siempre en la cabecera de la franja de arriba (también en móviles bajos y en Telegram) */
body .s-top .st-head { min-height: 46px; }
/* en horizontal, las insignias de aviso dentro del ancho de la franja */
body.land .warns, body.land .s-top .warns { left: 6px; right: 6px; transform: none; justify-content: center; flex-wrap: wrap; }

/* fichas.py: ficha del juego bajo la pantalla de juego (visible al desplazarse; al jugar la página vuelve arriba y no se mueve) */
html, body { height: auto !important; min-height: 100%; }
html { overflow-x: hidden !important; overflow-y: auto !important; } body { overflow: visible !important; }   /* el body no debe ser una caja de desplazamiento: con su overscroll-behavior: none bloqueaba la rueda del ratón */
html:has(body.playing), body.playing { overflow: hidden !important; }
body:not(.playing) { touch-action: pan-y; }
body:not(.playing) #wrap, body:not(.playing) #app, body:not(.playing) #app canvas, body:not(.playing) #app .screen { touch-action: pan-y !important; }   /* fuera de la partida se puede bajar a la ficha deslizando sobre el juego */
#wrap, #app { position: relative !important; inset: auto !important; width: 100% !important; height: 100vh !important; height: 100dvh !important; }
.game-info { max-width: 860px; margin: 0 auto; padding: 26px 18px 40px; font-family: Fredoka, ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif; color: #f4f0ff; line-height: 1.55; user-select: text; -webkit-user-select: text; }
.game-info .crumbs { font-size: .92rem; color: #b9b0d8; margin-bottom: 10px; } .game-info .crumbs a { color: #b9b0d8; } .game-info .crumbs span { margin: 0 6px; opacity: .6; }
.game-info .howto-src { display: block; } .game-info .howto { background: none; color: inherit; padding: 0; border-radius: 0; box-shadow: none; border: 0; }
.game-info h1 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); line-height: 1.15; margin: 0 0 10px; color: #fff; }
.game-info h2 { font-size: 1.3rem; margin: 26px 0 8px; color: #ffd23f; }
.game-info p, .game-info li { color: #e8e2fa; } .game-info ul { padding-left: 1.2em; } .game-info a { color: #ffd23f; }
.game-info details { margin: 8px 0; padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1.5px rgba(190,160,255,.22); }
.game-info summary { cursor: pointer; font-weight: 600; } .game-info details p { margin: 6px 0 0; }
.game-info .more { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; padding: 0; list-style: none; }
.game-info .more a { display: block; border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1.5px rgba(190,160,255,.22); text-decoration: none; color: #fff; }
.game-info .more img { display: block; width: 100%; height: auto; aspect-ratio: 40 / 21; object-fit: cover; } .game-info .more b { display: block; padding: 8px 10px 0; } .game-info .more span { display: block; padding: 0 10px 10px; font-size: .88rem; color: #c9c0e6; }
.game-info .foot { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 34px; padding-top: 16px; border-top: 1px solid rgba(190,160,255,.22); font-size: .92rem; } .game-info .foot a { color: #b9b0d8; }
.howto .t1 { font-size: 1.25rem; font-weight: 700; margin: .67em 0; }
.game-info .tg-also { margin: 22px 0 0; } .game-info .tg-also a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: rgba(42,171,238,.14); box-shadow: inset 0 0 0 1.5px rgba(42,171,238,.5); color: #8fd6ff; font-weight: 600; text-decoration: none; } .game-info .tg-also svg { width: 18px; height: 18px; } body.tg .game-info .tg-also { display: none; }
