/* Estilos de las guías (edge21.app/guias/ y /en/guides/): la misma identidad que la portada.
   Las páginas las arma tools/guias/armar.mjs. */
@font-face { font-family: "DM Sans"; font-weight: 400 800; font-display: swap; src: url(/app/fonts/DMSans-latin-400-800.woff2) format("woff2"); }
@font-face { font-family: "Oswald"; font-weight: 600; font-display: swap; src: url(/app/fonts/Oswald-latin-600.woff2) format("woff2"); }
:root {
  color-scheme: dark;
  --bg: #06110c; --surface: #0f2219; --surface-2: #163024; --line: #1c3628;
  --text: #f3efe2; --text-2: #a3b5a9; --gold: #e9b949; --gold-ink: #1d1405;
  --suits: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23e9b949'%3E%3Cpath transform='translate%2814 14%29 scale%28.75%29' d='M12 2.2c-2.6 3.9-8.3 7-8.3 11.4 0 2.6 2 4.5 4.4 4.5 1.5 0 2.7-.7 3.4-1.7-.3 2-1.2 3.6-2.6 5.1h6.2c-1.4-1.5-2.3-3.1-2.6-5.1.7 1 1.9 1.7 3.4 1.7 2.4 0 4.4-1.9 4.4-4.5 0-4.4-5.7-7.5-8.3-11.4z'/%3E%3Cpath transform='translate%2874 14%29 scale%28.75%29 rotate%2812 12 12%29' d='M12 21.3S2.7 15.5 2.7 9.1C2.7 6 5 3.6 7.9 3.6c1.8 0 3.3.9 4.1 2.3.8-1.4 2.3-2.3 4.1-2.3 2.9 0 5.2 2.4 5.2 5.5 0 6.4-9.3 12.2-9.3 12.2z'/%3E%3Cpath transform='translate%2814 74%29 scale%28.75%29 rotate%28-10 12 12%29' d='M12 1.8c2.6 3.7 5.3 6.9 8.3 10.2-3 3.3-5.7 6.5-8.3 10.2-2.6-3.7-5.3-6.9-8.3-10.2 3-3.3 5.7-6.5 8.3-10.2z'/%3E%3Cpath transform='translate%2874 74%29 scale%28.75%29' d='M12 2.4a4.4 4.4 0 0 0-4.1 6A4.4 4.4 0 1 0 10.9 15c-.3 2.4-1.3 4.4-2.9 6.6h8c-1.6-2.2-2.6-4.2-2.9-6.6a4.4 4.4 0 1 0 3-6.6 4.4 4.4 0 0 0-4.1-6z'/%3E%3C/g%3E%3C/svg%3E"); --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28%23n%29'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 "DM Sans", system-ui, sans-serif; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none; background:
  radial-gradient(55% 45% at 100% 0%, rgba(233, 185, 73, 0.07), transparent 70%),
  radial-gradient(60% 50% at 0% 100%, rgba(23, 96, 63, 0.35), transparent 70%),
  radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.45) 100%); }
body::after { content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; background-image: var(--noise); opacity: 0.7; }
a { color: var(--gold); }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Encabezado */
.bar { position: sticky; top: 0; z-index: 20; background: rgba(6, 17, 12, 0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar .wrap { max-width: 1080px; display: flex; align-items: center; gap: 16px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; text-decoration: none; color: var(--text); white-space: nowrap; }
.brand img { width: 32px; height: 32px; }
.bar nav { margin-left: auto; display: flex; gap: 18px; }
.bar nav a, .lang-link { color: var(--text-2); text-decoration: none; font-weight: 700; font-size: 15px; }
.bar nav a:hover, .lang-link:hover, .bar nav a[aria-current] { color: var(--text); }
.lang-link { border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; font-size: 13px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 22px; border-radius: 999px; font-weight: 800; text-decoration: none; font-size: 16px; border: 0; cursor: pointer; font-family: inherit; transition: transform 0.15s; }
.btn:active { transform: scale(0.97); }
.btn.gold { position: relative; overflow: hidden; background: linear-gradient(180deg, #f6d77a 0%, #e9b949 45%, #cf9a2e 100%); color: var(--gold-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -2px 0 rgba(120, 80, 10, 0.35), 0 6px 18px rgba(233, 185, 73, 0.22); }
.btn.gold::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent); transform: skewX(-20deg); transition: left 0.6s ease; pointer-events: none; }
@media (hover: hover) { .btn.gold:hover::after { left: 130%; } }
.btn.sm { padding: 8px 15px; font-size: 14px; }

/* Texto */
.g-crumbs { margin: 26px 0 8px; font-size: 14px; color: var(--text-2); }
.g-crumbs a { color: var(--text-2); }
h1 { font-size: clamp(34px, 6vw, 52px); line-height: 1.05; letter-spacing: -1.5px; margin: 6px 0 16px; }
h2 { font-size: clamp(25px, 4vw, 32px); line-height: 1.15; letter-spacing: -0.5px; margin: 0 0 12px; }
h3 { font-size: 20px; margin: 0 0 6px; }
.g-lead { font-size: 19px; color: var(--text-2); margin: 0 0 28px; }
.g-lead b, .g-sec b { color: var(--text); }
.g-sec { padding: 34px 0 6px; }
.g-sec p { color: var(--text-2); margin: 0 0 14px; }
.g-note { font-size: 14.5px; color: var(--text-2); }
.g-muted { color: var(--text-2); }
.g-list { margin: 0; padding: 0; list-style: none; }
.g-list li { position: relative; padding: 10px 0 10px 30px; color: var(--text-2); border-bottom: 1px solid var(--line); }
.g-list li::before { content: "♠"; position: absolute; left: 4px; top: 10px; color: var(--gold); }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; margin-bottom: 10px; }
details[open] { border-color: rgba(233, 185, 73, 0.35); }
summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); color: var(--gold); font-size: 19px; line-height: 1; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 10px 0 0; color: var(--text-2); }

/* Tabla de estrategia */
.g-chart { position: relative; isolation: isolate; overflow: hidden; background: radial-gradient(90% 100% at 50% 0%, #17603f 0%, #0b2f1e 55%, var(--surface) 100%); border: 1px solid var(--line); border-radius: 26px; padding: 22px; }
.g-chart::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--suits); background-size: 110px; opacity: 0.05; -webkit-mask-image: linear-gradient(160deg, #000, transparent 70%); mask-image: linear-gradient(160deg, #000, transparent 70%); }
.g-rules, .g-tabs { display: flex; gap: 6px; background: rgba(6, 17, 12, 0.5); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.g-rules button, .g-tabs button { flex: 1; border: 0; background: none; color: var(--text-2); font: 700 14px "DM Sans", sans-serif; padding: 9px 10px; border-radius: 999px; cursor: pointer; }
.g-rules button[aria-checked="true"], .g-tabs button[aria-selected="true"] { background: var(--gold); color: var(--gold-ink); }
.g-tabs { margin-top: 14px; }
.g-chart .g-note { margin: 10px 4px 0; }
.g-grid-wrap { margin-top: 16px; }
.g-axis { text-align: right; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(243, 239, 226, 0.65); margin-bottom: 6px; }
.g-grid { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.g-grid th { font: 800 14px "DM Sans", sans-serif; color: var(--text-2); padding: 0; }
.g-grid thead th:first-child, .g-grid tbody th { width: 52px; }
.g-grid tbody th { text-align: left; font-size: 14px; white-space: nowrap; }
.g-grid td { padding: 0; }
.g-cell { position: relative; width: 100%; height: 34px; border: 0; border-radius: 7px; font: 800 15px "DM Sans", sans-serif; cursor: pointer; transition: transform 0.12s, box-shadow 0.12s; }
.g-cell sub { position: absolute; right: 3px; bottom: 1px; font-size: 10px; font-weight: 700; opacity: 0.8; }
.g-cell:hover { transform: scale(1.08); }
.g-cell[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--text); transform: scale(1.08); z-index: 1; }
.c-H { background: #316048; color: #f5f2e9; }
.c-S { background: #34c27f; color: #062615; }
.c-D { background: #e9b949; color: #1d1405; }
.c-P { background: #7fb6ff; color: #08213f; }
.c-R { background: #f39a63; color: #3a1504; }
.g-detail { margin-top: 14px; min-height: 92px; background: rgba(6, 17, 12, 0.55); border: 1px solid rgba(233, 185, 73, 0.3); border-radius: 18px; padding: 16px 18px; }
.g-detail p { margin: 0; }
.g-detail .g-play { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; margin-bottom: 6px; }
.g-detail .g-play i { font-style: normal; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; font-size: 15px; }
.g-detail .g-why { color: var(--text-2); font-size: 15.5px; }
.g-detail .g-small { color: var(--text-2); font-size: 13.5px; margin-top: 6px; }
@media (max-width: 520px) {
  .g-chart { padding: 14px 10px; border-radius: 20px; }
  .g-grid { border-spacing: 2px; }
  .g-grid thead th:first-child, .g-grid tbody th { width: 40px; }
  .g-grid th, .g-grid tbody th { font-size: 12px; }
  .g-cell { height: 30px; font-size: 13px; border-radius: 6px; }
  .g-cell sub { font-size: 8px; right: 2px; }
  .g-rules button, .g-tabs button { font-size: 12.5px; padding: 8px 6px; }
}

/* Cartas */
.g-card { --w: 50px; position: relative; display: inline-block; width: var(--w); height: calc(var(--w) * 1.4); border-radius: calc(var(--w) * 0.14); background: #fafaf6; color: #121214; box-shadow: 0 2px 8px rgba(6, 17, 12, 0.45); flex: none; }
.g-card.red { color: #d41f2a; }
.g-rank { position: absolute; top: calc(var(--w) * 0.08); left: calc(var(--w) * 0.12); font: 600 calc(var(--w) * 0.44)/1 Oswald, "Arial Narrow", sans-serif; letter-spacing: -0.04em; }
.g-rank.r10 { left: calc(var(--w) * 0.07); font-size: calc(var(--w) * 0.4); letter-spacing: -0.09em; }
.g-suit { position: absolute; left: calc(var(--w) * 0.1); bottom: calc(var(--w) * 0.1); width: calc(var(--w) * 0.44); height: calc(var(--w) * 0.44); fill: currentColor; }
.g-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 6px; }
.g-val { display: grid; justify-items: center; gap: 8px; padding: 18px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; text-align: center; }
.g-cards { display: flex; gap: 6px; }
.g-val b { font: 600 34px/1 Oswald, sans-serif; }
.g-val .plus { color: #6fdc96; } .g-val .zero { color: var(--text-2); } .g-val .minus { color: #ff8a73; }
.g-val > span { font-size: 13.5px; color: var(--text-2); font-weight: 700; }
@media (max-width: 620px) { .g-values { grid-template-columns: 1fr; } .g-val { grid-template-columns: auto auto; justify-content: center; } .g-val > span { grid-column: 1 / -1; } }
.g-table-wrap { overflow-x: auto; margin: 14px 0 6px; }
.g-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 16px; overflow: hidden; }
.g-table th, .g-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.g-table th { color: var(--gold); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.g-table td { color: var(--text-2); }
.g-table tr:last-child td { border-bottom: 0; }

/* Ejercicio de conteo */
.g-drill { margin-top: 18px; background: radial-gradient(90% 120% at 50% 0%, #17603f 0%, #0b2f1e 60%, var(--surface) 100%); border: 1px solid rgba(233, 185, 73, 0.35); border-radius: 24px; padding: 22px; text-align: center; }
.g-drill .g-muted { margin: 0 0 14px; font-size: 15px; }
.g-drill-table { display: none; place-items: center; gap: 8px; min-height: 120px; margin-bottom: 14px; }
.g-drill.jugando .g-drill-table { display: grid; }
.g-drill-card .g-card { --w: 70px; animation: g-in 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.g-drill-n { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; color: var(--text-2); }
.g-drill-ask label { display: block; font-weight: 800; margin-bottom: 8px; }
.g-drill-row { display: flex; gap: 8px; justify-content: center; }
.g-drill-row input { width: 110px; font: 800 20px "DM Sans", sans-serif; text-align: center; color: var(--text); background: rgba(6, 17, 12, 0.6); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.g-drill-res { margin: 12px 0; min-height: 4px; }
.g-drill-res b.ok { color: #6fdc96; } .g-drill-res b.bad { color: #ff8a73; }
.g-drill-res .g-seq { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; font-size: 13px; color: var(--text-2); }
.g-drill-res .g-seq span { background: rgba(6, 17, 12, 0.5); border-radius: 8px; padding: 3px 7px; }
@keyframes g-in { from { transform: translateY(-14px) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* Índice */
.g-hero { padding: 40px 0 10px; }
.g-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.g-tile { display: flex; flex-direction: column; gap: 6px; padding: 24px; text-decoration: none; color: var(--text); background: linear-gradient(160deg, #123826, var(--surface) 70%); border: 1px solid var(--line); border-radius: 24px; transition: transform 0.2s, border-color 0.2s; }
.g-tile:hover { transform: translateY(-3px); border-color: rgba(233, 185, 73, 0.5); }
.g-tile h2 { font-size: 23px; margin: 8px 0 0; }
.g-tile p { margin: 0; color: var(--text-2); }
.g-tile-meta { margin-top: auto; padding-top: 10px; font-size: 14px; color: var(--text-2); }
.g-tile-meta b { color: var(--gold); }
.g-tile-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: rgba(233, 185, 73, 0.12); border: 1px solid rgba(233, 185, 73, 0.35); }
.g-tile-ic svg { width: 24px; height: 24px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 620px) { .g-tiles { grid-template-columns: 1fr; } }

/* Cierre y pie */
/* Lo que sigue (gratis y Premium en la app) */
.g-sigue-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 16px; }
.g-sigue-item { position: relative; padding: 18px 18px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.g-sigue-item h3 { margin: 8px 0 6px; font-size: 17px; }
.g-sigue-item p { margin: 0; color: var(--text-2); font-size: 15px; }
.g-sigue-item.premium { border-color: rgba(233, 185, 73, 0.45); background: linear-gradient(160deg, rgba(233, 185, 73, 0.10), var(--surface) 60%); }
.g-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; background: var(--surface-2); color: var(--text-2); }
.g-sigue-item.premium .g-tag { background: var(--gold); color: var(--gold-ink); }
.g-cta { position: relative; isolation: isolate; overflow: hidden; margin: 50px 0 40px; text-align: center; padding: 46px 22px; border-radius: 28px; background: radial-gradient(80% 120% at 50% 0%, #17603f 0%, #0a2c1c 60%, var(--bg) 100%); border: 1px solid var(--line); }
.g-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--suits); background-size: 110px; opacity: 0.05; }
.g-cta img { width: 62px; height: 62px; }
.g-cta p { color: var(--text-2); max-width: 32em; margin: 0 auto 22px; }
footer { border-top: 1px solid var(--line); padding: 26px 16px calc(36px + env(safe-area-inset-bottom)); color: var(--text-2); font-size: 14px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 14px; }
@media (max-width: 620px) { .bar nav { display: none; } .lang-link { margin-left: auto; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
