/* ==========================================================================
   Quilnix — Dark Premium Luxury
   Charcoal + gold + royal purple. Playfair (display) + Inter (body).
   Sharp corners, gold hairlines, full-bleed dark.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,700;0,800;1,500&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg:        #0A0A0F;
  --bg-2:      #14141C;
  --bg-3:      #1E1E29;
  --bg-card:   #161620;
  --gold:      #D4A857;
  --gold-2:    #B58A3E;
  --gold-soft: #E8C97F;
  --purple:    #7C3AED;
  --purple-2:  #9F67FF;
  --ivory:     #F5F1E8;
  --gray:      #A1A1AA;
  --gray-2:    #6B6B75;
  --line:      rgba(212,168,87,.25);
  --line-2:    rgba(212,168,87,.45);
  --display: 'Playfair Display', Georgia, serif;
  --body:    'Inter', system-ui, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, monospace;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;
  --r-sm: 2px; --r-md: 4px; --r-lg: 6px; --r-xl: 8px; --r-pill: 999px;
  --container: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--body); color: var(--ivory); background: var(--bg); line-height: 1.65; min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
main { flex: 1; }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }
a { color: var(--gold); text-decoration: none; font-weight: 500; transition: color .2s; }
a:hover { color: var(--gold-soft); }
ul, ol { padding-left: 1.25em; }
li { margin: 6px 0; color: var(--gray); }

h1, h2, h3, h4 { font-family: var(--display); color: var(--ivory); line-height: 1.12; letter-spacing: -0.01em; font-weight: 700; }
h1 { font-size: clamp(2.6rem, 5.5vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: 1.3rem; }
h4 { font-family: var(--body); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .15em; color: var(--gold); }
p { color: var(--gray); }
strong { color: var(--ivory); font-weight: 600; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-6); }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--gold); color: var(--bg); padding: 10px 14px; z-index: 999; }
.skip-link:focus { left: 8px; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(10,10,15,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-5) 0; gap: var(--sp-6); }
.brand { display: inline-flex; align-items: center; gap: var(--sp-3); font-family: var(--display); font-weight: 700; font-size: 1.4rem; color: var(--ivory); text-decoration: none; letter-spacing: .01em; }
.brand:hover { color: var(--gold); }
.brand__mark { width: 36px; height: 36px; border: 1px solid var(--gold); display: grid; place-items: center; color: var(--gold); font-weight: 700; font-size: 1rem; font-family: var(--display); }
.nav { display: flex; align-items: center; gap: var(--sp-4); }
.nav a { font-weight: 500; color: var(--gray); padding: 6px 0; font-size: 0.86rem; text-transform: uppercase; letter-spacing: .12em; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--ivory); border-bottom-color: var(--line-2); }
.nav a.is-active { color: var(--gold); border-bottom-color: var(--gold); }
.nav-toggle { display: none; background: transparent; border: 1px solid var(--gold); padding: 6px 14px; color: var(--gold); }
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 6px; }
  .nav { position: fixed; inset: 68px 0 0 0; background: var(--bg); flex-direction: column; align-items: stretch; gap: 0; padding: var(--sp-6); transform: translateY(-110%); transition: transform .25s ease; border-top: 1px solid var(--line); }
  .nav.is-open { transform: translateY(0); }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
}

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: .15em; border: 1px solid var(--gold); background: transparent; color: var(--gold); text-decoration: none; transition: all .25s ease; cursor: pointer; }
.btn:hover { background: var(--gold); color: var(--bg); text-decoration: none; }
.btn--primary { background: var(--gold); color: var(--bg); }
.btn--primary:hover { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--bg); }
.btn--accent { background: var(--purple); color: var(--ivory); border-color: var(--purple); }
.btn--accent:hover { background: var(--purple-2); border-color: var(--purple-2); color: var(--ivory); }
.btn--ink { background: var(--ivory); color: var(--bg); border-color: var(--ivory); }
.btn--ink:hover { background: transparent; color: var(--ivory); }
.btn--ghost { border-color: var(--line-2); color: var(--gray); }
.btn--ghost:hover { background: var(--bg-3); color: var(--ivory); border-color: var(--gold); }
.btn--sm { padding: 9px 18px; font-size: 0.72rem; }
.btn--lg { padding: 18px 36px; font-size: 0.85rem; }

.hero { position: relative; padding: var(--sp-24) 0; overflow: hidden; background: radial-gradient(ellipse at top right, rgba(212,168,87,.08), transparent 60%), radial-gradient(ellipse at bottom left, rgba(124,58,237,.08), transparent 60%); }
.hero::before { content: ''; position: absolute; top: 50%; left: 50%; width: 800px; height: 800px; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(212,168,87,.06), transparent 70%); pointer-events: none; }
.hero__grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--sp-16); align-items: center; }
@media (max-width: 880px) { .hero__grid { grid-template-columns: 1fr; gap: var(--sp-10); } }
.hero__pill { display: inline-flex; align-items: center; gap: 10px; color: var(--gold); padding: 6px 0; font-weight: 500; font-size: 0.78rem; letter-spacing: .25em; text-transform: uppercase; }
.hero__pill::before { content: ''; width: 32px; height: 1px; background: var(--gold); }
.hero__title { margin: var(--sp-6) 0 var(--sp-5); }
.hero__title em { font-style: italic; color: var(--gold); font-family: var(--display); }
.hero__lead { font-size: 1.2rem; color: var(--gray); max-width: 540px; line-height: 1.75; }
.hero__cta { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-10); }
.hero__visual { aspect-ratio: 1; border: 1px solid var(--line-2); padding: var(--sp-8); display: grid; place-items: center; position: relative; background: linear-gradient(135deg, var(--bg-2), var(--bg)); }
.hero__visual::before, .hero__visual::after { content: ''; position: absolute; width: 24px; height: 24px; border: 1px solid var(--gold); }
.hero__visual::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hero__visual::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.hero__visual .cell { display: none; }
.hero__visual::before, .hero__visual::after { /* keep corner ornaments */ }
.hero__visual .cell:first-child { display: grid; place-items: center; font-family: var(--display); font-size: 5rem; font-weight: 800; color: var(--gold); font-style: italic; grid-column: 1 / -1; grid-row: 1 / -1; }

.trust { padding: var(--sp-12) 0; background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }
@media (max-width: 720px) { .trust__row { grid-template-columns: repeat(2, 1fr); } }
.trust__item { display: flex; gap: var(--sp-4); align-items: center; }
.trust__icon { width: 40px; height: 40px; border: 1px solid var(--gold); display: grid; place-items: center; color: var(--gold); flex-shrink: 0; }
.trust__text strong { display: block; color: var(--ivory); font-size: 0.95rem; font-family: var(--display); font-weight: 700; }
.trust__text span { color: var(--gray-2); font-size: 0.82rem; }

.section { padding: var(--sp-20) 0; }
.section--tight { padding: var(--sp-12) 0; }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: var(--sp-6); margin-bottom: var(--sp-12); flex-wrap: wrap; }
.section__head h2 { max-width: 600px; }
.eyebrow { display: inline-block; font-family: var(--body); font-size: 0.78rem; text-transform: uppercase; letter-spacing: .25em; color: var(--gold); margin-bottom: var(--sp-3); font-weight: 500; }

.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-5); }
.game-card { background: var(--bg-card); border: 1px solid var(--line); padding: var(--sp-8); transition: border-color .25s, background .25s; display: flex; flex-direction: column; gap: var(--sp-4); text-decoration: none; color: var(--ivory); position: relative; }
.game-card::before { content: ''; position: absolute; top: 0; left: 0; width: 24px; height: 1px; background: var(--gold); transition: width .25s; }
.game-card:hover { border-color: var(--gold); text-decoration: none; }
.game-card:hover::before { width: 100%; }
.game-card__icon { width: 64px; height: 64px; border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 1.6rem; color: var(--gold); font-style: italic; }
.game-card--pink .game-card__icon, .game-card--tang .game-card__icon { color: var(--gold-soft); border-color: var(--gold-soft); }
.game-card--mint .game-card__icon, .game-card--sky .game-card__icon { color: var(--purple-2); border-color: var(--purple); }
.game-card__title { font-family: var(--display); font-size: 1.5rem; color: var(--ivory); margin: var(--sp-3) 0 0; font-weight: 700; }
.game-card__desc { color: var(--gray); font-size: 0.92rem; }
.game-card__meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: var(--sp-4); border-top: 1px solid var(--line); font-size: 0.78rem; color: var(--gray-2); text-transform: uppercase; letter-spacing: .1em; }
.game-card__cta { color: var(--gold); font-weight: 600; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-8); }
@media (max-width: 880px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.step { padding: var(--sp-6) 0; border-top: 1px solid var(--line); }
.step__num { font-family: var(--display); font-style: italic; font-size: 2.4rem; color: var(--gold); margin-bottom: var(--sp-3); }
.step h3 { margin: 0 0 var(--sp-2); font-size: 1.15rem; font-family: var(--display); }
.step p { font-size: 0.92rem; color: var(--gray); }

.cta-banner { background: linear-gradient(135deg, var(--bg-2), var(--bg-3)); border: 1px solid var(--gold); padding: var(--sp-16) var(--sp-12); text-align: center; position: relative; }
.cta-banner::before { content: '❦'; position: absolute; top: 24px; left: 50%; transform: translateX(-50%); color: var(--gold); font-size: 1.2rem; }
.cta-banner h2 { color: var(--ivory); margin-bottom: var(--sp-4); font-style: italic; }
.cta-banner p { color: var(--gray); max-width: 500px; margin: 0 auto var(--sp-8); }

.site-footer { background: var(--bg); color: var(--ivory); padding: var(--sp-16) 0 var(--sp-6); margin-top: var(--sp-20); border-top: 1px solid var(--gold); }
.site-footer h4 { color: var(--gold); margin-bottom: var(--sp-4); font-size: 0.78rem; text-transform: uppercase; letter-spacing: .2em; font-weight: 600; font-family: var(--body); }
.site-footer a { color: var(--gray); font-weight: 400; display: block; padding: 5px 0; font-size: 0.92rem; }
.site-footer a:hover { color: var(--gold); }
.footer__grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: var(--sp-10); }
@media (max-width: 880px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-6); } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__brand p { color: var(--gray-2); max-width: 320px; font-size: 0.9rem; font-style: italic; font-family: var(--display); }
.footer__company { margin-top: var(--sp-12); padding: var(--sp-5); border: 1px solid var(--line); font-size: 0.85rem; color: var(--gray); display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-6); align-items: center; }
.footer__company strong { color: var(--gold); font-family: var(--display); font-size: 1rem; margin-right: var(--sp-2); }
.footer__company a { color: var(--gold-soft); padding: 0; display: inline; }
.footer__compliance { margin-top: var(--sp-5); padding: var(--sp-5); border: 1px solid var(--line); font-size: 0.9rem; color: var(--gray); }
.footer__compliance strong { color: var(--gold); }
.footer__bottom { margin-top: var(--sp-8); padding-top: var(--sp-6); border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-3); font-size: 0.82rem; color: var(--gray-2); }

.page-head { padding: var(--sp-16) 0 var(--sp-10); background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-bottom: 1px solid var(--gold); }
.crumbs { font-size: 0.78rem; color: var(--gray-2); margin-bottom: var(--sp-3); text-transform: uppercase; letter-spacing: .15em; }
.crumbs a { color: var(--gray-2); font-weight: 400; }

.prose { max-width: 720px; margin: 0 auto; padding: var(--sp-12) 0; }
.prose h2 { margin-top: var(--sp-12); margin-bottom: var(--sp-4); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--gold); font-style: italic; font-weight: 700; }
.prose h3 { margin-top: var(--sp-6); margin-bottom: var(--sp-3); color: var(--gold); font-size: 1.15rem; font-style: italic; }
.prose p, .prose li { color: var(--gray); font-size: 1.02rem; line-height: 1.85; }
.prose p { margin-bottom: var(--sp-4); }
.prose ul, .prose ol { margin: var(--sp-3) 0 var(--sp-5) var(--sp-5); }
.prose .meta { background: var(--bg-2); border: 1px solid var(--line); padding: var(--sp-5); margin-bottom: var(--sp-8); font-size: 0.92rem; color: var(--gray); }
.prose .meta strong { color: var(--ivory); }
.prose a { color: var(--gold); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.prose a:hover { text-decoration-color: var(--gold); }

.form-grid { display: grid; gap: var(--sp-4); }
.field label { display: block; font-weight: 500; margin-bottom: 6px; color: var(--ivory); font-size: 0.82rem; text-transform: uppercase; letter-spacing: .1em; }
.field input, .field textarea, .field select { width: 100%; padding: 12px 14px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ivory); font: inherit; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field textarea { min-height: 130px; resize: vertical; }

.table-wrap { overflow-x: auto; }
.score-table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); }
.score-table th, .score-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); color: var(--ivory); }
.score-table tr:last-child td { border-bottom: 0; }
.score-table th { background: var(--bg-2); color: var(--gold); font-size: 0.78rem; text-transform: uppercase; letter-spacing: .15em; font-weight: 600; font-family: var(--body); }
.score-table tbody tr { background: var(--bg-card); }
.rank-pill { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; font-weight: 700; font-family: var(--display); border: 1px solid var(--line-2); color: var(--ivory); font-size: 0.9rem; }
.rank-pill--1 { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.rank-pill--2 { background: transparent; color: var(--gold-soft); border-color: var(--gold-soft); }
.rank-pill--3 { background: transparent; color: var(--purple-2); border-color: var(--purple-2); }

.tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: var(--sp-8); }
.tab { padding: 12px 22px; border: 0; background: transparent; font-weight: 500; color: var(--gray); font-size: 0.82rem; text-transform: uppercase; letter-spacing: .12em; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tab.is-active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

.rate-card { background: var(--bg-card); border: 1px solid var(--line); padding: var(--sp-6); }
.rate-stars { display: flex; gap: 4px; margin: var(--sp-3) 0; }
.rate-stars button { width: 34px; height: 34px; background: transparent; border: 0; padding: 0; color: var(--gray-2); transition: color .15s; }
.rate-stars button:hover, .rate-stars button.is-on { color: var(--gold); }
.rate-stars svg { width: 100%; height: 100%; }
.rate-avg { display: flex; align-items: center; gap: var(--sp-4); margin-top: var(--sp-3); }
.rate-avg__big { font-family: var(--display); font-size: 2.6rem; font-weight: 700; color: var(--gold); font-style: italic; }

.contact-box { margin-top: 28px; padding: 20px; background: var(--bg-2); border: 1px solid var(--line); }
.contact-box h3 { margin-bottom: 6px; font-size: 1rem; color: var(--ivory); font-family: var(--display); font-style: italic; }
.contact-box ul { margin-left: 18px; color: var(--gray); font-size: 0.92rem; }

.game-shell { padding: var(--sp-10) 0; }
.game-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-6); padding: var(--sp-5) var(--sp-6); border: 1px solid var(--line); background: var(--bg-2); }
.stat { text-align: center; }
.stat__k { font-family: var(--mono); font-size: 0.7rem; color: var(--gray-2); text-transform: uppercase; letter-spacing: .15em; }
.stat__v { font-family: var(--display); font-weight: 700; font-size: 1.6rem; color: var(--gold); font-style: italic; }
.stat-row { display: flex; gap: var(--sp-8); flex-wrap: wrap; }
.game-actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

.game-stage { background: var(--bg-2); border: 1px solid var(--line); padding: var(--sp-8); display: grid; place-items: center; min-height: 360px; }
.game-status { text-align: center; padding: var(--sp-4); background: var(--bg-3); border-left: 2px solid var(--gold); margin: var(--sp-5) 0; font-weight: 600; color: var(--ivory); }
.game-status--win { border-left-color: var(--gold); color: var(--gold); }
.game-status--lose { border-left-color: var(--purple); color: var(--purple-2); }
.game-status--highlight { background: var(--bg-3); border-left-color: var(--gold-soft); }
.game-help { background: var(--bg-2); border: 1px solid var(--line); padding: var(--sp-6); margin-top: var(--sp-6); }
.game-help h3 { margin-bottom: var(--sp-2); color: var(--gold); font-style: italic; }

/* Games */
.ttt-board { display: grid; grid-template-columns: repeat(3, 100px); grid-template-rows: repeat(3, 100px); gap: 1px; background: var(--gold); padding: 1px; }
.ttt-cell { background: var(--bg); border: 0; display: grid; place-items: center; font-family: var(--display); font-size: 3rem; font-weight: 800; cursor: pointer; font-style: italic; }
.ttt-cell.x { color: var(--gold); }
.ttt-cell.o { color: var(--purple-2); }
.ttt-cell.empty:hover { background: var(--bg-2); }
.ttt-cell.win { background: var(--bg-3); }

.mem-board { display: grid; grid-template-columns: repeat(4, 80px); gap: 10px; }
.mem-card { width: 100%; aspect-ratio: 3/4; background: var(--bg-2); position: relative; cursor: pointer; perspective: 600px; border: 1px solid var(--line-2); padding: 0; }
.mem-card__face { position: absolute; inset: 0; display: grid; place-items: center; backface-visibility: hidden; transition: transform .35s ease; font-size: 1.6rem; }
.mem-card__back { background: linear-gradient(135deg, var(--bg-2), var(--bg-3)); color: var(--gold); transform: rotateY(0); }
.mem-card__back::before { content: '◆'; }
.mem-card__front { background: var(--bg); color: var(--gold); transform: rotateY(180deg); }
.mem-card.is-flipped .mem-card__back { transform: rotateY(180deg); }
.mem-card.is-flipped .mem-card__front { transform: rotateY(0); }
.mem-card.is-matched { border-color: var(--gold); }
.mem-card.is-matched .mem-card__front { background: var(--bg-3); }

.g2048 { background: var(--gold); padding: 6px; display: grid; grid-template-columns: repeat(4, 76px); grid-template-rows: repeat(4, 76px); gap: 4px; }
.g2048 .tile { background: var(--bg); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 1.5rem; color: var(--ivory); font-style: italic; }
.g2048 .v0 { background: var(--bg-2); color: transparent; }
.g2048 .v2, .g2048 .v4 { background: var(--bg-2); color: var(--gold-soft); }
.g2048 .v8, .g2048 .v16 { background: var(--gold-2); color: var(--bg); }
.g2048 .v32, .g2048 .v64 { background: var(--gold); color: var(--bg); }
.g2048 .v128, .g2048 .v256, .g2048 .v512 { background: var(--purple); color: var(--ivory); font-size: 1.3rem; }
.g2048 .v1024, .g2048 .v2048 { background: var(--ivory); color: var(--bg); font-size: 1.1rem; }

.snake-stage { background: var(--bg); border: 1px solid var(--gold); padding: 4px; }
.snake-stage canvas { background: #0F0F18; max-width: 100%; }

.whack-grid { display: grid; grid-template-columns: repeat(3, 110px); grid-template-rows: repeat(3, 110px); gap: 12px; }
.whack-hole { background: var(--bg); border: 1px solid var(--line-2); border-radius: 50%; position: relative; overflow: hidden; cursor: pointer; padding: 0; }
.whack-mole { position: absolute; inset: 8px; border-radius: 50%; background: var(--gold); transform: translateY(110%); transition: transform .18s ease; }
.whack-mole.is-up { transform: translateY(0); }
.whack-mole.is-hit { background: var(--purple); }

.c4-board { background: var(--gold); padding: 8px; display: grid; grid-template-columns: repeat(7, 56px); gap: 4px; }
.c4-cell { aspect-ratio: 1; background: var(--bg); border-radius: 50%; }
.c4-cell.r { background: var(--gold); }
.c4-cell.y { background: var(--purple); }
.c4-col-btn { display: grid; grid-template-columns: repeat(7, 56px); gap: 4px; margin: 0 auto 6px; padding: 0 8px; max-width: max-content; }
.c4-col-btn button { aspect-ratio: 1; border: 1px solid var(--gold); background: var(--bg-2); font-family: var(--display); font-weight: 700; color: var(--gold); cursor: pointer; }
.c4-col-btn button:hover { background: var(--bg-3); }

.mine-grid { display: grid; gap: 1px; background: var(--gold); padding: 1px; }
.mine-cell { width: 30px; height: 30px; background: var(--bg-2); border: 0; font-weight: 600; font-size: 0.85rem; color: var(--ivory); cursor: pointer; }
.mine-cell:hover { background: var(--bg-3); }
.mine-cell.is-open { background: var(--bg); }
.mine-cell.is-flag { color: var(--gold); }
.mine-cell.is-mine { background: var(--purple); color: var(--ivory); }
.mine-cell.n1 { color: #6EC5FF; }
.mine-cell.n2 { color: var(--gold); }
.mine-cell.n3 { color: var(--purple-2); }
.mine-cell.n4 { color: #C5A0FF; }

.forca-shell { display: flex; align-items: center; gap: var(--sp-6); flex-direction: column; padding: var(--sp-4); }
.forca-draw { font-family: var(--mono); font-size: 1.6rem; line-height: 1.2; min-height: 120px; color: var(--gold); white-space: pre; margin: 0; }
.forca-word { font-family: var(--display); font-style: italic; font-size: 2.4rem; letter-spacing: .2em; color: var(--ivory); }
.kb { display: grid; grid-template-columns: repeat(13, 1fr); gap: 4px; margin-top: var(--sp-6); }
.kb-key { padding: 10px 0; background: var(--bg-2); border: 1px solid var(--line-2); font-weight: 500; cursor: pointer; color: var(--ivory); }
.kb-key:hover:not(:disabled) { background: var(--bg-3); border-color: var(--gold); }
.kb-key:disabled { opacity: 0.4; cursor: not-allowed; }
.kb-key.is-right { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.kb-key.is-wrong { background: var(--purple); color: var(--ivory); border-color: var(--purple); }

.simon-pads { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 340px; padding: 16px; border: 1px solid var(--gold); }
.simon-pad { aspect-ratio: 1; border: 0; cursor: pointer; opacity: 0.55; transition: opacity .1s; }
.simon-pad.is-active { opacity: 1; }
.simon-pad--1 { background: var(--gold); }
.simon-pad--2 { background: var(--purple); }
.simon-pad--3 { background: var(--gold-soft); }
.simon-pad--4 { background: var(--purple-2); }

.p15-grid { display: grid; grid-template-columns: repeat(4, 68px); grid-template-rows: repeat(4, 68px); gap: 4px; background: var(--gold); padding: 4px; }
.p15-cell { background: var(--bg-2); border: 0; font-family: var(--display); font-weight: 700; font-size: 1.4rem; color: var(--gold); cursor: pointer; font-style: italic; }
.p15-cell:hover { background: var(--bg-3); }
.p15-cell.is-blank { background: var(--bg); cursor: default; }

.rev-grid { display: grid; grid-template-columns: repeat(8, 44px); grid-template-rows: repeat(8, 44px); gap: 1px; background: var(--gold); padding: 1px; }
.rev-cell { background: var(--bg-2); border: 0; padding: 0; position: relative; cursor: pointer; }
.rev-cell::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; }
.rev-cell.rev-black::after { background: var(--bg); border: 1px solid var(--gold); }
.rev-cell.rev-white::after { background: var(--ivory); }
.rev-cell.rev-valid::after { background: rgba(212,168,87,.2); border: 1px dashed var(--gold); }

.cp-wrap { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-6); align-items: start; }
@media (max-width: 720px) { .cp-wrap { grid-template-columns: 1fr; } }
.cp-grid { display: grid; gap: 1px; background: var(--gold); padding: 1px; user-select: none; }
.cp-cell { background: var(--bg); display: grid; place-items: center; font-family: var(--display); font-style: italic; font-weight: 700; font-size: 0.9rem; color: var(--ivory); aspect-ratio: 1; }
.cp-cell.is-found { background: var(--gold); color: var(--bg); }
.cp-list { display: flex; flex-direction: column; gap: 6px; min-width: 140px; padding: var(--sp-4); border: 1px solid var(--line); background: var(--bg-2); }
.cp-word { padding: 4px 0; font-weight: 500; font-size: 0.9rem; color: var(--gray); }
.cp-word.is-found { color: var(--gold); text-decoration: line-through; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.text-center { text-align: center; }
.mt-4 { margin-top: var(--sp-4); } .mt-6 { margin-top: var(--sp-6); } .mt-8 { margin-top: var(--sp-8); }
.mb-4 { margin-bottom: var(--sp-4); } .mb-6 { margin-bottom: var(--sp-6); }
.muted { color: var(--gray); }
.flex { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; }
.hidden { display: none !important; }

@media (max-width: 720px) {
  .game-top { flex-direction: column; align-items: stretch; }
  .stat-row { justify-content: space-around; }
  .ttt-board { grid-template-columns: repeat(3, 84px); grid-template-rows: repeat(3, 84px); }
  .g2048 { grid-template-columns: repeat(4, 64px); grid-template-rows: repeat(4, 64px); }
  .whack-grid { grid-template-columns: repeat(3, 88px); grid-template-rows: repeat(3, 88px); }
  .c4-board, .c4-col-btn { grid-template-columns: repeat(7, 40px); }
  .contact-section { grid-template-columns: 1fr !important; }
  .rev-grid { grid-template-columns: repeat(8, 36px); grid-template-rows: repeat(8, 36px); }
  .kb { grid-template-columns: repeat(7, 1fr); }
}

/* ==========================================================================
   Quilnix — Dark Luxury Magazine Home Layout
   Editorial centered hero with gold rules · asymmetric gallery ·
   Capítulos steps
   ========================================================================== */

/* Editorial hero: centered, type-only, gold rule framing */
.hero--editorial { padding: var(--sp-24) 0; }
.ed-hero {
  max-width: 800px; margin: 0 auto;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.ed-hero__kicker {
  display: block; font-family: var(--body); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: .28em; color: var(--gold);
  margin-bottom: var(--sp-6);
}
.ed-hero__rule {
  width: 100px; height: 1px; background: var(--gold);
  opacity: 0.55; margin: var(--sp-6) auto;
}
.hero--editorial .hero__title {
  font-size: clamp(2.8rem, 6vw, 5rem);
  text-align: center; font-style: italic;
  margin: 0; line-height: 1.1;
}
.hero--editorial .hero__lead {
  text-align: center; max-width: 540px; margin: 0 auto; font-style: italic;
}
.hero--editorial .hero__cta { justify-content: center; }

/* Pull-quote trust bar */
.trust--pull { padding: var(--sp-10) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pull-quote {
  text-align: center; border: 0; margin: 0; padding: 0;
}
.pull-quote p {
  font-family: var(--display); font-style: italic; font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--gold); letter-spacing: .04em; line-height: 1.5;
  position: relative; display: inline-block;
}
.pull-quote p::before {
  content: ''; display: block; width: 40px; height: 1px;
  background: var(--line-2); margin: 0 auto var(--sp-4);
}
.pull-quote p::after {
  content: ''; display: block; width: 40px; height: 1px;
  background: var(--line-2); margin: var(--sp-4) auto 0;
}

/* Magazine gallery: 1 large featured + 5-card stack */
.mag-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
  align-items: start;
}
.mag-featured {
  /* Reuses .game-card but needs to feel prominent */
  grid-row: span 2;
  padding: var(--sp-10) var(--sp-8);
}
.mag-featured .game-card__icon {
  width: 80px; height: 80px;
  font-size: 2.2rem; margin-bottom: var(--sp-4);
}
.mag-featured .game-card__title { font-size: 2rem; }
.mag-featured .game-card__desc { font-size: 1rem; line-height: 1.7; }
.mag-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}
.mag-span2 { grid-column: 1 / -1; }
@media (max-width: 880px) {
  .mag-gallery { grid-template-columns: 1fr; }
  .mag-featured { grid-row: span 1; }
}
@media (max-width: 560px) {
  .mag-stack { grid-template-columns: 1fr; }
  .mag-span2 { grid-column: auto; }
}

/* Capítulos steps */
.capitulos {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--sp-10) var(--sp-16);
}
.capitulo {
  display: flex; gap: var(--sp-5); padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}
.capitulo__num {
  font-family: var(--display); font-style: italic;
  font-size: 1.8rem; color: var(--gold);
  flex-shrink: 0; line-height: 1;
}
.capitulo__title {
  font-family: var(--display); font-size: 1.2rem;
  font-style: italic; color: var(--ivory);
  margin-bottom: var(--sp-2); font-weight: 500;
}
.capitulo p { font-size: 0.92rem; color: var(--gray); }
@media (max-width: 720px) {
  .capitulos { grid-template-columns: 1fr; }
}
