/*!
 * TapSolitaire — style.css
 * Themes (classic green felt / night), site chrome, game wrapper, pure-CSS cards,
 * modals, settings, victory, toasts, editorial content and the contact form.
 */

/* ===== Theme variables ================================================== */
:root,
[data-theme="classic"] {
  --bg: #f5f3ec;
  --surface: #ffffff;
  --surface-2: #eef1ec;
  --text: #1b2420;
  --muted: #55615b;
  --line: #d9ddd6;
  --link: #0a6a39;
  --accent: #0b6b3a;
  --accent-ink: #ffffff;
  --gold: #e9b949;
  --danger: #b4232f;
  --header-bg: #0a3a23;
  --header-ink: #f4f7f2;
  --felt-1: #13834b;
  --felt-2: #0a5c33;
  --felt-edge: #07442a;
  --felt-ink: #f2f7f2;
  --chip: rgba(255, 255, 255, 0.13);
  --chip-line: rgba(255, 255, 255, 0.22);
  --slot-line: rgba(255, 255, 255, 0.32);
  --card-face: #ffffff;
  --card-edge: rgba(0, 0, 0, 0.28);
  --suit-black: #16181b;
  --suit-red: #c8102e;
  --suit-d: var(--suit-red);
  --suit-c: var(--suit-black);
  --back-1: #9b1c31;
  --back-2: #651022;
  --back-line: rgba(255, 255, 255, 0.16);
  --focus: #ffd34d;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  color-scheme: light;
}

[data-theme="night"] {
  --bg: #0e1318;
  --surface: #182029;
  --surface-2: #1f2933;
  --text: #e5e9ed;
  --muted: #9aa6b2;
  --line: #2c3742;
  --link: #8fd4ad;
  --accent: #2f9e62;
  --accent-ink: #ffffff;
  --gold: #e9b949;
  --danger: #f07178;
  --header-bg: #091017;
  --header-ink: #e8edf1;
  --felt-1: #1d3346;
  --felt-2: #101e2b;
  --felt-edge: #0a141d;
  --felt-ink: #e6edf3;
  --chip: rgba(255, 255, 255, 0.09);
  --chip-line: rgba(255, 255, 255, 0.16);
  --slot-line: rgba(255, 255, 255, 0.22);
  --card-face: #f4f1ea;
  --card-edge: rgba(0, 0, 0, 0.5);
  --suit-black: #15171a;
  --suit-red: #c0102b;
  --back-1: #22456b;
  --back-2: #142b45;
  --back-line: rgba(233, 185, 73, 0.22);
  --focus: #ffd34d;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

.four-color {
  --suit-d: #0b57d0;
  --suit-c: #0a7d32;
}

/* ===== Base ============================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.modal-lock { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; width: 100%; }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.25; }

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

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: 8px;
}
.skip-link:focus { top: 8px; }

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

/* Sticky anchor ads must never cover controls on phones */
@media (max-width: 768px) {
  body { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
}

/* ===== Header & nav ====================================================== */
.site-header {
  background: var(--header-bg);
  color: var(--header-ink);
  position: relative;
  z-index: 50;
}
.header-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 12px;
  height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  color: inherit; text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em;
  min-height: 44px;
}
.logo svg { width: 28px; height: 28px; flex: none; }
.logo span b { color: var(--gold); font-weight: 800; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav > a, .nav-games > summary {
  color: inherit; text-decoration: none; font-weight: 600; font-size: 0.95rem;
  min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px;
  border-radius: 10px; cursor: pointer;
}
.site-nav > a:hover, .nav-games > summary:hover { background: rgba(255, 255, 255, 0.1); }
.nav-games { position: relative; }
.nav-games > summary { list-style: none; }
.nav-games > summary::-webkit-details-marker { display: none; }
.nav-games > summary svg { width: 14px; height: 14px; transition: transform 0.15s; }
.nav-games[open] > summary svg { transform: rotate(180deg); }
.nav-games ul {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px;
  list-style: none; margin: 0; padding: 6px;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
}
.nav-games li a {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-weight: 600;
}
.nav-games li a:hover, .nav-games li a[aria-current="page"] { background: var(--surface-2); }

@media (max-width: 359px) {
  .logo { font-size: 1rem; }
  .site-nav > a { padding: 0 8px; }
}

/* ===== Footer ============================================================ */
.site-footer {
  background: var(--header-bg); color: var(--header-ink);
  margin-top: 48px; padding: 32px 16px 24px;
}
.footer-inner { max-width: 1120px; margin: 0 auto; display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h2 { font-size: 0.95rem; margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.8; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer a { color: inherit; display: inline-flex; min-height: 36px; align-items: center; text-decoration: none; opacity: 0.9; }
.site-footer a:hover { opacity: 1; text-decoration: underline; }
.footer-copy { max-width: 1120px; margin: 24px auto 0; font-size: 0.875rem; opacity: 0.75; }

/* ===== Buttons =========================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 10px;
  font: inherit; font-weight: 700; font-size: 0.95rem; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.icon-btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 0; background: transparent; color: inherit; cursor: pointer;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: var(--surface-2); }

/* ===== Game wrapper ====================================================== */
.game-wrapper {
  max-width: 1120px; margin: 12px auto 0; padding: 8px;
  background: radial-gradient(ellipse at 50% 0%, var(--felt-1), var(--felt-2) 70%);
  border-radius: 16px; color: var(--felt-ink);
  overflow: hidden; contain: layout paint;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15), 0 6px 22px rgba(0, 0, 0, 0.12);
}
.game-top {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 2px 12px; padding: 2px 6px 6px; min-height: 34px;
}
.game-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.game-title h1 { font-size: 1.05rem; margin: 0; white-space: nowrap; }
.game-info { font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats {
  display: flex; gap: 10px; font-size: 0.9rem; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.stats span { font-weight: 400; }
.stats b { font-weight: 700; }

.toolbar {
  display: flex; justify-content: center; gap: 6px; flex-wrap: nowrap;
  padding: 0 0 8px; min-height: 52px;
}
.tb-btn {
  position: relative; min-width: 44px; min-height: 44px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 10px; border: 1px solid var(--chip-line); background: var(--chip); color: var(--felt-ink);
  font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer;
  transition: background-color 0.15s, transform 0.15s;
}
.tb-btn svg { width: 20px; height: 20px; flex: none; }
.tb-btn:hover { background: rgba(255, 255, 255, 0.22); }
.tb-btn:active { transform: scale(0.96); }
.tb-btn[hidden] { display: none; }
.tb-btn.tb-auto { background: var(--gold); color: #2a1d00; border-color: transparent; }
@media (max-width: 439px) {
  .tb-btn { padding: 0 10px; flex: 1 1 0; max-width: 64px; }
  .tb-btn .lbl {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
}

/* ===== Board ============================================================= */
.board {
  position: relative; width: 100%;
  height: clamp(480px, calc(100svh - 190px), 780px);
  border-radius: 12px; overflow: hidden;
  touch-action: none; overscroll-behavior: contain;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  --cw: 60px; --ch: 84px;
}
.board:focus { outline: none; }
.board:focus-visible { box-shadow: inset 0 0 0 3px var(--focus); }
@media (max-width: 768px) {
  .game-wrapper { margin-top: 6px; padding: 4px; border-radius: 12px; }
  .board { height: clamp(380px, calc(100svh - 240px), 640px); }
}
.board noscript p { padding: 24px; text-align: center; }

/* Pile slots */
.slot {
  position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch);
  border-radius: calc(var(--cw) * 0.09);
  border: 2px dashed var(--slot-line); background: rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.15s;
}
.slot::after {
  content: attr(data-label); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--slot-line); font-weight: 800; font-size: calc(var(--cw) * 0.36);
}
.slot-stock { cursor: pointer; border-style: solid; }
.slot-stock.recyclable::after {
  content: ""; inset: 25%;
  border: calc(var(--cw) * 0.06) solid rgba(255, 255, 255, 0.55); border-right-color: transparent; border-radius: 50%;
}
.slot-done, .slot-discard { border-style: solid; opacity: 0.7; }

/* ===== Cards ============================================================== */
.card {
  position: absolute; left: 0; top: 0;
  width: var(--cw); height: var(--ch);
  border-radius: calc(var(--cw) * 0.09);
  transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.15s;
  will-change: transform;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  background:
    repeating-linear-gradient(45deg, var(--back-line) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(-45deg, var(--back-line) 0 2px, transparent 2px 7px),
    linear-gradient(145deg, var(--back-1), var(--back-2));
  border: 1px solid var(--card-edge);
}
.card:not(.up)::before {
  content: ""; position: absolute; inset: calc(var(--cw) * 0.06);
  border: 1px solid rgba(255, 255, 255, 0.45); border-radius: calc(var(--cw) * 0.06);
}
.card.up { background: var(--card-face); }
.cf { position: absolute; inset: 0; display: none; color: var(--suit-black); overflow: hidden; border-radius: inherit; }
.card.up .cf { display: block; }
.s-H .cf { color: var(--suit-red); }
.s-D .cf { color: var(--suit-d); }
.s-C .cf { color: var(--suit-c); }

.ci {
  position: absolute; top: calc(var(--cw) * 0.03); left: calc(var(--cw) * 0.06);
  display: flex; align-items: center; gap: 1px; line-height: 1;
}
.ci b {
  font-weight: 800; letter-spacing: -0.04em;
  font-size: max(11px, calc(var(--cw) * 0.34));
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.ten .ci b { letter-spacing: -0.09em; }
.cis { width: max(9px, calc(var(--cw) * 0.25)); height: max(9px, calc(var(--cw) * 0.25)); flex: none; }
.ci2 { top: auto; left: auto; bottom: calc(var(--cw) * 0.03); right: calc(var(--cw) * 0.06); transform: rotate(180deg); }
.cs {
  position: absolute; left: 50%; top: 58%;
  width: calc(var(--cw) * 0.52); height: calc(var(--cw) * 0.52);
  transform: translate(-50%, -50%);
}
.face .cs { width: calc(var(--cw) * 0.72); height: calc(var(--cw) * 0.72); opacity: 0.16; }
.cfl {
  position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%);
  font-family: Georgia, "Times New Roman", serif; font-weight: 700;
  font-size: calc(var(--cw) * 0.56); line-height: 1;
}
.face .cf::after {
  content: ""; position: absolute; left: 18%; right: 18%; top: 28%; bottom: 12%;
  border: 1px solid currentColor; opacity: 0.35; border-radius: calc(var(--cw) * 0.05);
}
.sm .ci2 { display: none; }
.sm .cs { top: 62%; }
.sm .face .cf::after { display: none; }

/* Card states */
.card.dragging { transition: none; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45); cursor: grabbing; }
.card.selected { box-shadow: 0 0 0 3px var(--gold), 0 8px 18px rgba(0, 0, 0, 0.4); }
.card.drop-ok, .slot.drop-ok { box-shadow: 0 0 0 3px rgba(255, 221, 87, 0.95), 0 0 14px rgba(255, 221, 87, 0.6); }
.card.hint-src, .card.hint-dst, .slot.hint-src, .slot.hint-dst { animation: hintPulse 0.75s ease-in-out 2; }
.card.hint-src, .slot.hint-src { box-shadow: 0 0 0 3px #4fd1ff, 0 0 16px rgba(79, 209, 255, 0.8); }
.card.hint-dst, .slot.hint-dst { box-shadow: 0 0 0 3px var(--gold), 0 0 16px rgba(233, 185, 73, 0.85); }
.card.kb-focus, .slot.kb-focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.card.shake { animation: shake 0.3s ease; }
.no-anim .card, .no-anim .slot { transition: none !important; }

@keyframes shake {
  0%, 100% { translate: 0 0; }
  25% { translate: -5px 0; }
  50% { translate: 5px 0; }
  75% { translate: -3px 0; }
}
@keyframes hintPulse { 50% { filter: brightness(1.15); } }

/* Dealing spinner */
.board-spinner {
  position: absolute; inset: 0; z-index: 20000;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: rgba(0, 0, 0, 0.35); color: #fff; font-weight: 700; font-size: 1.05rem;
}
.spin {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.35); border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Modals ============================================================= */
.modal-overlay {
  position: fixed; inset: 0; z-index: 30000;
  display: flex; align-items: center; justify-content: center; padding: 12px;
  background: rgba(5, 12, 9, 0.58);
  animation: fadeIn 0.18s ease;
}
.modal-overlay.out { opacity: 0; transition: opacity 0.15s; }
.modal {
  position: relative; z-index: 1;
  width: 100%; max-width: 460px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto;
  background: var(--surface); color: var(--text);
  border-radius: 16px; box-shadow: var(--shadow); padding: 4px 18px 18px;
  animation: popIn 0.2s cubic-bezier(0.2, 0.8, 0.3, 1.1);
  overscroll-behavior: contain;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: 0; background: var(--surface); padding-top: 10px; z-index: 1; }
.modal-head h2 { margin: 0; font-size: 1.2rem; }
.modal-body p { margin: 8px 0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.modal-settings { max-width: 520px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* Settings */
.set-sec { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.set-sec:first-child { border-top: 0; }
.set-sec h3 { margin: 0 0 8px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.set-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.field { margin: 10px 0; }
.field-label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; background: var(--surface-2); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 8px;
  cursor: pointer; font-weight: 600; font-size: 0.9rem;
}
.seg input:checked + label { background: var(--accent); color: var(--accent-ink); }
.seg input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 1px; }
.field-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.field-toggle label { cursor: pointer; flex: 1; }
.field-toggle label .field-label { margin: 0; }
.field-toggle small { display: block; color: var(--muted); }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch-ui { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background-color 0.15s; }
.switch-ui::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.15s;
}
.switch input:checked + .switch-ui { background: var(--accent); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--focus); outline-offset: 2px; }
.stats-table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-variant-numeric: tabular-nums; }
.stats-table th, .stats-table td { padding: 7px 4px; border-bottom: 1px solid var(--line); text-align: left; font-size: 0.95rem; }
.stats-table td { text-align: right; font-weight: 700; }
.deal-form input {
  width: 100%; min-height: 44px; font: inherit; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.field-error { color: var(--danger); font-size: 0.9rem; min-height: 1.2em; margin: 4px 0; }

/* Victory */
.modal-victory { text-align: center; }
.modal-victory .modal-head { justify-content: center; position: relative; }
.modal-victory .modal-head h2 { font-size: 1.6rem; }
.modal-victory .modal-x { position: absolute; right: -6px; top: 6px; }
.modal-victory .modal-actions { justify-content: center; }
.badge {
  display: inline-block; background: var(--gold); color: #2a1d00; font-weight: 800;
  padding: 4px 12px; border-radius: 999px; margin: 6px 0 2px;
}
.victory-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.victory-stats div { background: var(--surface-2); border-radius: 12px; padding: 10px 4px; }
.victory-stats dt { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.victory-stats dd { margin: 0; font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.victory-others h3 { font-size: 0.95rem; margin: 14px 0 6px; }
.victory-others ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.victory-others a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--line); text-decoration: none; font-weight: 600;
}
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

/* Toasts */
.toasts {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 40000; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
  width: max-content; max-width: calc(100vw - 24px);
}
.toast {
  background: rgba(16, 22, 20, 0.92); color: #fff; padding: 10px 16px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  animation: popIn 0.18s ease; transition: opacity 0.25s, transform 0.25s; text-align: center;
}
.toast.out { opacity: 0; transform: translateY(6px); }
@media (max-width: 768px) {
  .toasts { bottom: calc(100px + env(safe-area-inset-bottom)); }
}

/* ===== Content pages ====================================================== */
.page { max-width: 820px; margin: 0 auto; padding: 24px 16px 0; }
.editorial-content {
  max-width: 760px; margin: 24px auto 0; padding: 0 16px;
  font-size: 1.0625rem; line-height: 1.7;
}
.editorial-content h2 { font-size: 1.5rem; margin: 36px 0 10px; }
.editorial-content h3 { font-size: 1.15rem; margin: 24px 0 6px; }
.editorial-content p { margin: 0 0 14px; }
.editorial-content ul, .editorial-content ol { padding-left: 1.3em; margin: 0 0 14px; }
.editorial-content li { margin: 6px 0; }
.lead { font-size: 1.15rem; color: var(--muted); }

.faq details {
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  margin: 10px 0; padding: 0 16px;
}
.faq summary {
  cursor: pointer; font-weight: 700; min-height: 48px; display: flex; align-items: center;
  padding: 10px 0; list-style: none; gap: 10px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; font-size: 1.4rem; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 14px; }

.more-games { max-width: 1120px; margin: 40px auto 0; padding: 0 16px; }
.more-games h2 { font-size: 1.4rem; }
.more-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.more-card a {
  display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.more-card a:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.more-card strong { font-size: 1.05rem; }
.more-card span { color: var(--muted); font-size: 0.95rem; }

/* Homepage */
.hero { max-width: 1120px; margin: 0 auto; padding: 28px 16px 8px; text-align: center; }
.hero h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0 0 8px; letter-spacing: -0.02em; }
.hero p { margin: 0 auto; max-width: 640px; color: var(--muted); font-size: 1.1rem; }
.game-grid {
  max-width: 1120px; margin: 20px auto 0; padding: 0 16px; list-style: none;
  display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.game-card a {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}
.game-card a:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.game-card .preview { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--felt-2); }
.game-card .gc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.game-card h2, .game-card h3 { margin: 0; font-size: 1.2rem; }
.game-card p { margin: 0; color: var(--muted); flex: 1; }
.game-card .btn { align-self: flex-start; margin-top: 8px; }

.daily-block {
  max-width: 1120px; margin: 32px auto 0; padding: 20px 16px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line);
}
.daily-block h2 { margin: 0 0 4px; font-size: 1.4rem; }
.daily-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.daily-link {
  display: flex; flex-direction: column; min-height: 56px; justify-content: center; padding: 10px 14px; border-radius: 12px;
  background: var(--surface-2); color: var(--text); text-decoration: none;
}
.daily-link span { font-size: 0.875rem; color: var(--link); font-weight: 600; }
.daily-link:hover { outline: 2px solid var(--accent); }
@media (min-width: 769px) { .daily-block { padding: 24px; } }

/* ===== Contact form ======================================================= */
.contact-form { display: grid; gap: 14px; margin: 20px 0 8px; }
.form-field label { display: block; font-weight: 700; margin-bottom: 6px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; min-height: 44px; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.form-field textarea { min-height: 160px; resize: vertical; }
.form-field.has-error input, .form-field.has-error select, .form-field.has-error textarea { border-color: var(--danger); border-width: 2px; }
.form-field .field-error { margin: 6px 0 0; }
.hp { display: none !important; }
.form-status { min-height: 1.6em; font-weight: 600; margin: 4px 0; }
.form-status.is-success { color: var(--accent); }
.form-status.is-error { color: var(--danger); }
[data-theme="night"] .form-status.is-success { color: var(--link); }
.contact-form .btn { justify-self: start; min-width: 180px; }

/* ===== Reduced motion ===================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .card, .slot, .toast, .modal, .modal-overlay, .tb-btn, .more-card a, .game-card a { transition: none !important; animation: none !important; }
  .card.shake { animation: none; }
  .spin { animation-duration: 2.4s; }
}
