:root {
  --ink: #0f1c2e;
  --muted: #5a6d82;
  --paper: #e7eef5;
  --paper-2: #d5e4f0;
  --card: #f8fbfe;
  --line: #b9c9d8;
  --accent: #0d8f7a;
  --accent-dark: #0a6b5c;
  --accent-soft: #c8efe6;
  --navy: #16324f;
  --shadow: 0 12px 28px rgba(15, 28, 46, 0.08);
  --display: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Trebuchet MS", "Segoe UI", sans-serif;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(13, 143, 122, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(22, 50, 79, 0.1), transparent 50%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  background-attachment: fixed;
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-dark); }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--navy);
}
h1 { font-size: clamp(2.1rem, 4.8vw, 3.3rem); margin: 0 0 0.75rem; }
h2 { font-size: clamp(1.4rem, 2.8vw, 1.9rem); margin: 0 0 0.75rem; }
h3 { font-size: 1.15rem; margin: 0; }
p { margin: 0 0 1rem; }

.wrap { width: min(1100px, calc(100% - 2rem)); margin: 0 auto; }
.skip-link {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--navy); color: #fff; padding: 0.5rem 0.8rem;
}
.skip-link:focus { left: 0.5rem; z-index: 20; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(15, 28, 46, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--accent);
}
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.logo { display: flex; align-items: center; gap: 0.65rem; color: #f2f7fb; text-decoration: none; font-weight: 700; letter-spacing: 0.02em; }
.logo-mark {
  width: 2.15rem; height: 2.15rem; display: grid; place-items: center;
  background: var(--accent); color: #062820; border-radius: 6px;
  font-family: var(--display); font-size: 0.8rem; font-weight: 700;
}
.logo-text { font-size: 1.05rem; }
.site-nav { display: flex; gap: 1.15rem; }
.site-nav a { color: #d4e0eb; text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.site-nav a[aria-current="page"], .site-nav a:hover { color: #7fe0ce; }

.intro { padding: 3rem 0 1.2rem; }
.intro-grid, .layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 1.75rem; align-items: start; }
.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.lede { font-size: 1.12rem; color: #24384d; }
.intro-note, .rail-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow);
}
.intro-note ol, .rail-card ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.intro-note li, .rail-card li { margin: 0.4rem 0; }

.catalog, .guide { padding: 0.4rem 0 3rem; }
.section-head { margin-bottom: 1.1rem; }
.section-head p { color: var(--muted); }
.cat-title {
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--accent-soft);
}
.game-list { display: grid; gap: 0.7rem; }
.game-row {
  display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 0.85rem;
  padding: 0.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.game-row:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.game-row img {
  width: 100%; height: 96px; object-fit: cover;
  border-radius: 6px; background: #c5d0db;
}
.game-row strong { display: block; font-size: 1.02rem; color: var(--navy); }
.game-row em { display: block; margin: 0.12rem 0 0.28rem; color: var(--accent-dark); font-style: normal; font-size: 0.82rem; font-weight: 700; }
.game-row span span { color: var(--muted); font-size: 0.95rem; }

.rail { display: grid; gap: 0.9rem; position: sticky; top: 5rem; }
.prose { max-width: 46rem; }
.prose ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.prose li { margin: 0.35rem 0; }

.game-page { padding: 1.8rem 0 3.2rem; }
.breadcrumb { color: var(--muted); font-size: 0.9rem; }
.game-head { max-width: 42rem; margin-bottom: 1rem; }
.player {
  background: #0a1420;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--navy);
}
.player iframe { width: 100%; height: min(68vh, 620px); border: 0; display: block; background: #0a1420; }
.player-actions { margin: 0.85rem 0 1.3rem; }

.btn {
  appearance: none; border: 0; cursor: pointer;
  background: var(--accent); color: #042820; text-decoration: none;
  font: inherit; font-weight: 700; border-radius: 6px;
  padding: 0.68rem 1.1rem;
  letter-spacing: 0.01em;
}
.btn:hover { background: #10a88f; }
.btn--ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line);
}
.btn--ghost:hover { background: #fff; border-color: var(--accent); }

.ad-slot {
  margin: 1.4rem 0;
  padding: 0.65rem 0.75rem 0.8rem;
  border: 1px dashed #9eb0c2;
  border-radius: var(--radius);
  background: rgba(248, 251, 254, 0.7);
}
.ad-slot__label {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}
.ad-slot__unit { min-height: 90px; }
.ad-slot--rail { margin: 0; }
.ad-slot--rail .ad-slot__unit { min-height: 250px; }
.player-actions + .prose .ad-slot,
.game-row + .ad-slot { margin-top: 1.8rem; }

.contact-form { display: grid; gap: 0.8rem; margin-top: 1rem; }
.contact-form label { display: grid; gap: 0.3rem; font-weight: 700; }
.contact-form input, .contact-form textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 6px; padding: 0.65rem 0.75rem;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.site-footer {
  border-top: 3px solid var(--navy);
  padding: 2rem 0 2.3rem;
  color: #b7c5d4;
  background: var(--ink);
}
.site-footer a { color: #9fe0d2; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.4rem; }
.footer-brand { display: block; color: #f2f7fb; margin-bottom: 0.4rem; font-size: 1.05rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.65rem 1rem; align-content: start; }
.footer-links a { color: #d4e0eb; text-decoration: none; }
.footer-links a:hover { color: #7fe0ce; }
.footer-copy {
  width: min(1100px, calc(100% - 2rem));
  margin: 1.1rem auto 0;
  font-size: 0.88rem;
  color: #7f91a5;
}

.cookie-banner {
  position: relative; z-index: 30;
  display: flex; gap: 1rem; align-items: center; justify-content: space-between;
  width: min(1100px, calc(100% - 2rem)); margin: 0.7rem auto 0;
  background: var(--navy); color: #e8f0f6; border-radius: var(--radius); padding: 0.85rem 1rem;
  border: 1px solid #2a4a6d;
}
.cookie-banner a { color: #7fe0ce; }
.cookie-banner p { margin: 0; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.cookie-banner .btn { background: var(--accent); color: #042820; }
.cookie-banner .btn--ghost { color: #e8f0f6; border-color: rgba(255,255,255,0.28); background: transparent; }

.cookie-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 1rem; }
.cookie-modal[hidden] { display: none; }
.cookie-modal__backdrop { position: absolute; inset: 0; background: rgba(10, 20, 32, 0.62); }
.cookie-modal__card {
  position: relative; width: min(520px, 100%); max-height: min(86vh, 720px); overflow: auto;
  background: var(--card); border-radius: var(--radius); padding: 1.05rem 1.1rem 1.15rem;
  border: 1px solid var(--line);
}
.cookie-modal__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.cookie-cat { border-top: 1px solid var(--line); padding: 0.7rem 0; }
.cookie-cat p { margin: 0.28rem 0 0; color: var(--muted); font-size: 0.94rem; }
.cookie-cat__head { display: flex; justify-content: space-between; align-items: center; }
.switch { position: relative; width: 2.55rem; height: 1.45rem; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #b8c5d3; border-radius: 999px; }
.switch span::after {
  content: ""; position: absolute; top: 0.16rem; left: 0.16rem;
  width: 1.12rem; height: 1.12rem; background: #fff; border-radius: 50%;
}
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(1.05rem); }
.switch input:disabled + span { opacity: 0.7; }

.game-modal { position: fixed; inset: 0; z-index: 60; background: rgba(8, 16, 28, 0.92); padding: 0.75rem; }
.game-modal[hidden] { display: none; }
.game-modal__panel { height: 100%; display: flex; flex-direction: column; gap: 0.45rem; }
.game-modal__bar { display: flex; justify-content: space-between; align-items: center; color: #fff; }
.game-modal__frame { flex: 1; width: 100%; border: 0; background: #000; border-radius: 6px; }
.game-modal__close {
  width: 2.35rem; height: 2.35rem; border-radius: 6px; border: 0; cursor: pointer;
  background: var(--accent); color: #042820; font-size: 1.35rem; line-height: 1; font-weight: 700;
}

@media (max-width: 860px) {
  .intro-grid, .layout, .footer-grid, .game-row { grid-template-columns: 1fr; }
  .rail { position: static; }
  .game-row img { height: 170px; }
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .header-bar { min-height: 3.5rem; }
  .logo-text { font-size: 0.95rem; }
}
