/* ---------- Tokens ---------- */
:root {
  /* Light, warm, chess-y palette */
  --bg: #f6efdb;            /* parchment */
  --bg-2: #fbf6e7;          /* paler parchment */
  --bg-3: #f0e6c8;          /* deeper parchment */
  --surface: #fffdf6;       /* ivory card */
  --paper: #fdf8ea;

  --ink: #2a1d10;           /* near-black walnut */
  --ink-2: #3a2a18;
  --ink-muted: #6d5638;
  --ink-dim: #8a7556;
  --line: rgba(60, 38, 18, 0.12);
  --line-strong: rgba(60, 38, 18, 0.22);

  /* Classic board */
  --light-square: #f0d9b5;
  --dark-square:  #b58863;
  --board-frame:  #5c3a1e;
  --board-frame-2:#7a4f2d;

  /* Accents */
  --gold: #b8862a;          /* trophy gold, calmer than yellow */
  --gold-soft: #d4a857;
  --gold-deep: #8a6118;
  --green: #4f6b3b;         /* baize green */
  --burgundy: #7a2a2a;

  --radius-sm: 6px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-1: 0 1px 2px rgba(60,38,18,0.10), 0 8px 24px rgba(60,38,18,0.10);
  --shadow-2: 0 24px 60px rgba(60,38,18,0.18);

  --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;

  /* Subtle parchment + tiny board pattern across the whole page */
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 700px at 85% -100px, rgba(184,134,42,0.18), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(79,107,59,0.10), transparent 60%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'><rect width='20' height='20' fill='%235c3a1e' fill-opacity='0.035'/><rect x='20' y='20' width='20' height='20' fill='%235c3a1e' fill-opacity='0.035'/></svg>");
}
img { max-width: 100%; display: block; }

/* ---------- Layout ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; position: relative; }
.section-alt {
  background:
    linear-gradient(180deg, rgba(255,253,246,0.92), rgba(255,253,246,0.92)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'><rect width='20' height='20' fill='%23b58863' fill-opacity='0.10'/><rect x='20' y='20' width='20' height='20' fill='%23b58863' fill-opacity='0.10'/></svg>");
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; }

/* Section divider — a thin chess strip */
.chess-strip {
  height: 14px;
  background: repeating-linear-gradient(
    90deg,
    var(--dark-square) 0 14px,
    var(--light-square) 14px 28px
  );
  border-top: 1px solid var(--board-frame);
  border-bottom: 1px solid var(--board-frame);
}

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; margin: 0 0 0.5em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--ink-muted); }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 560px; }
.lead-sm { font-size: 1.05rem; color: var(--ink-2); max-width: 520px; margin-bottom: 1.5em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: '♚'; font-family: var(--serif); font-size: 1rem; color: var(--gold);
  transform: translateY(-1px);
}
.accent { color: var(--burgundy); font-style: italic; }

/* Algebraic move tag (e.g. "1. e4") used decoratively */
.move-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--bg-2);
}
.rating-pill {
  display: inline-block;
  padding: 1px 7px;
  background: rgba(184,134,42,0.18);
  color: var(--gold-deep);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 239, 219, 0.85);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark {
  width: 40px; height: 40px;
  background:
    linear-gradient(135deg, var(--light-square) 50%, var(--dark-square) 50%);
  border-radius: 8px;
  border: 1px solid var(--board-frame);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 2px 6px rgba(60,38,18,0.18);
  position: relative;
}
.brand-mark::after {
  content: '♞';
  position: absolute;
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--ink);
  line-height: 1;
  transform: translateY(-1px);
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.01em; }
.brand-text small { font-size: 0.74rem; color: var(--ink-dim); letter-spacing: 0.04em; font-family: var(--mono); }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: 0.92rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--burgundy); }
.nav-links .btn { margin-left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease, border-color .2s ease;
  white-space: nowrap; font-family: var(--sans);
}
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }
.btn-primary {
  background: linear-gradient(180deg, #2f2113, #1e1409);
  color: var(--bg-2);
  border-color: #1a1209;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 8px 20px rgba(42,29,16,0.30);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(42,29,16,0.40); }
.btn-ghost {
  background: var(--surface); color: var(--ink); border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--paper); border-color: var(--ink); color: var(--ink); }
.btn-block { display: flex; width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 110px 0 96px;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-piece {
  position: absolute; font-size: 18rem; color: rgba(92,58,30,0.06);
  font-family: var(--serif); line-height: 1; user-select: none;
}
.hero-piece-1 { top: -40px; right: -30px; transform: rotate(-12deg); }
.hero-piece-2 { bottom: -80px; left: -10px; font-size: 22rem; color: rgba(92,58,30,0.05); transform: rotate(8deg); }
.hero-piece-3 { top: 38%; left: 44%; font-size: 9rem; color: rgba(122,42,42,0.05); }

.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center;
}
.hero-cta { display: flex; gap: 12px; margin: 28px 0 28px; flex-wrap: wrap; }
.hero-bullets {
  list-style: none; padding: 0; margin: 24px 0 0;
  display: flex; flex-direction: column; gap: 10px;
}
.hero-bullets li {
  color: var(--ink-2); font-size: 0.97rem;
  padding-left: 26px; position: relative;
}
.hero-bullets li::before {
  content: '♟'; position: absolute; left: 0; top: -1px; color: var(--burgundy); font-size: 1.05rem;
  font-family: var(--serif);
}

/* ---------- Chess Board ---------- */
.hero-board { position: relative; }
.board-frame {
  max-width: 480px;
  margin-left: auto;
  padding: 22px 22px 14px 22px;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.05) 35%, rgba(0,0,0,0.30)),
    var(--board-texture, none),
    linear-gradient(180deg, #7a4f2d, #5c3a1e);
  background-size: auto, 320px auto, auto;
  background-blend-mode: multiply, normal, normal;
  border-radius: var(--radius);
  box-shadow:
    var(--shadow-2),
    0 0 0 1px rgba(0,0,0,0.30),
    0 1px 0 rgba(255,255,255,0.10) inset;
  position: relative;
  transform: rotateX(8deg) rotateZ(-2deg);
  transform-origin: center bottom;
}
.board-frame::before {
  content: '';
  position: absolute; inset: 8px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  pointer-events: none;
}
.board-coords-files,
.board-coords-ranks {
  position: absolute;
  display: flex;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #efe0c2;
  letter-spacing: 0.06em;
  user-select: none;
}
.board-coords-files {
  left: 22px; right: 22px;
  bottom: 2px;
  justify-content: space-around;
}
.board-coords-ranks {
  flex-direction: column;
  top: 22px; bottom: 28px;
  right: 4px;
  justify-content: space-around;
  align-items: flex-end;
}
.board {
  width: 100%;
  aspect-ratio: 1;
  display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr);
  border-radius: 4px;
  overflow: hidden;
  background: var(--light-square);
  box-shadow: 0 2px 0 rgba(0,0,0,0.35), 0 8px 22px rgba(0,0,0,0.30) inset;
}
.sq {
  position: relative; display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  transition: background 0.2s ease;
}
.sq.dark { background: var(--dark-square); }
.sq.light { background: var(--light-square); }
.piece {
  width: 88%; height: 88%;
  display: flex; align-items: center; justify-content: center;
  user-select: none; pointer-events: none;
  transition: transform 0.38s cubic-bezier(0.22, 0.7, 0.28, 1),
              opacity 0.32s ease,
              filter 0.2s ease;
  will-change: transform, opacity;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.28));
}
.piece svg,
.piece img { width: 100%; height: 100%; display: block; -webkit-user-drag: none; user-select: none; }
.piece.animating {
  z-index: 10;
  animation: none !important;   /* override piecePulse so the slide isn't fought */
  pointer-events: none;
}
.piece.dragging {
  z-index: 50;
  /* No transition while dragging — track the cursor 1:1 in real time. */
  transition: none !important;
  animation: none !important;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,0.48));
  cursor: grabbing;
  will-change: transform;
}
.board[data-interactive='true'] { touch-action: none; }
.board[data-interactive='true'] .sq:has(.piece) { cursor: grab; }
.board[data-interactive='true'].is-dragging .sq:has(.piece) { cursor: grabbing; }
.sq.drop-target {
  box-shadow: inset 0 0 0 3px rgba(184,134,42,0.75);
  background-blend-mode: overlay;
}
.sq.drop-target.light { background-color: #f7e6c0; }
.sq.drop-target.dark  { background-color: #c89870; }
/* Don't apply hover/select transforms during a slide */
.board[data-interactive='true'] .sq.animating-source .piece,
.board[data-interactive='true'] .sq.animating-source:hover .piece,
.board[data-interactive='true'] .sq.animating-source.selected .piece {
  animation: none !important;
}
.piece.captured {
  transform: scale(0.25) rotate(8deg);
  opacity: 0;
}
.board[data-interactive='true'] .sq:hover .piece {
  transform: translateY(-1px);
  filter: drop-shadow(0 3px 3px rgba(0,0,0,0.32));
}
.board[data-interactive='true'] .sq.selected .piece {
  animation: piecePulse 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(184,134,42,0.95)) drop-shadow(0 1px 1px rgba(0,0,0,0.3));
}
@keyframes piecePulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}
.sq.hl::after {
  content: ''; position: absolute; inset: 10%;
  border: 2px solid rgba(184,134,42,0.95);
  border-radius: 50%;
  animation: ringPulse 1.6s ease-in-out infinite;
}
@keyframes ringPulse {
  0%, 100% { opacity: 0.55; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}
.board-caption {
  margin-top: 16px; text-align: right; color: var(--ink-dim);
  font-size: 0.85rem; letter-spacing: 0.04em;
  font-family: var(--mono);
}
.board-caption .dot {
  display: inline-block; width: 8px; height: 8px; background: var(--burgundy); border-radius: 50%;
  margin-right: 6px; vertical-align: middle;
  box-shadow: 0 0 0 4px rgba(122,42,42,0.18);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(122,42,42,0.18); }
  50% { box-shadow: 0 0 0 8px rgba(122,42,42,0); }
}

/* ---------- Stats ---------- */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 40px 0;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  text-align: center;
}
.stat { position: relative; }
.stat + .stat::before {
  content: '';
  position: absolute; left: -12px; top: 12%; bottom: 12%;
  width: 1px; background: var(--line);
}
.stat-num { font-family: var(--serif); font-size: 2.8rem; font-weight: 700; color: var(--burgundy); line-height: 1; }
.stat-label { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-dim); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 8px; }

/* ---------- Cards ---------- */
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.card {
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
}
.card::before {
  /* corner chess motif */
  content: '';
  position: absolute; top: 0; right: 0; width: 80px; height: 80px;
  background:
    linear-gradient(135deg, transparent 50%, var(--light-square) 50%);
  opacity: 0.55;
}
.card:hover { transform: translateY(-3px); border-color: var(--ink); }
.card-icon { font-size: 2.4rem; color: var(--ink); margin-bottom: 14px; line-height: 1; font-family: var(--serif); }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: 0.96rem; }
.card-highlight {
  background:
    linear-gradient(160deg, rgba(184,134,42,0.18), rgba(122,42,42,0.10)),
    var(--surface);
  border-color: rgba(184,134,42,0.45);
}

/* ---------- Two-col ---------- */
.two-col {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: start;
}

/* ---------- Schedule ---------- */
.schedule {
  list-style: none; padding: 0; margin: 22px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.schedule li {
  display: grid; grid-template-columns: 130px 140px 1fr;
  align-items: center; padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  gap: 14px;
  position: relative;
}
.schedule li:last-child { border-bottom: 0; }
.schedule li.featured {
  background:
    linear-gradient(90deg, rgba(184,134,42,0.10), transparent 60%);
}
.schedule li.featured::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--gold);
}
.schedule .day { font-family: var(--serif); font-size: 1.25rem; color: var(--ink); font-weight: 600; }
.schedule .time { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--burgundy); }
.schedule .what { color: var(--ink-2); }
.schedule .what small { display: block; color: var(--ink-dim); font-size: 0.85rem; margin-top: 2px; }
.meta { font-size: 0.92rem; color: var(--ink-muted); margin-top: 12px; }
.meta strong { color: var(--ink); }

/* ---------- Info / „Was du brauchst" box ---------- */
.info-box {
  background:
    linear-gradient(180deg, var(--surface), var(--paper));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: sticky; top: 96px;
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
}
.info-box::before {
  /* tiny board pattern in the background */
  content: '';
  position: absolute; right: -30px; bottom: -30px;
  width: 180px; height: 180px;
  background:
    repeating-conic-gradient(var(--dark-square) 0% 25%, var(--light-square) 0% 50%) 50% / 40px 40px;
  border-radius: 12px;
  opacity: 0.08;
  transform: rotate(-6deg);
}
.info-box h3 { font-size: 1.4rem; margin-bottom: 6px; }
.info-box .sub { color: var(--ink-muted); font-size: 0.95rem; margin-bottom: 18px; }
.bring-list { list-style: none; padding: 0; margin: 0 0 18px; position: relative; z-index: 1; }
.bring-list li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.bring-list li:last-child { border-bottom: 0; }
.bring-list .glyph {
  width: 32px; height: 32px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-3); color: var(--burgundy);
  border-radius: 8px; font-family: var(--serif); font-size: 1.2rem;
}
.bring-list strong { display: block; color: var(--ink); }
.bring-list span { color: var(--ink-muted); font-size: 0.9rem; }

/* ---------- Events ---------- */
.events { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.event {
  position: relative;
  padding: 26px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  box-shadow: var(--shadow-1);
}
.event:hover { transform: translateY(-3px); border-color: var(--ink); }
.event-date {
  display: flex; flex-direction: column; align-items: flex-start;
  font-family: var(--serif); color: var(--burgundy);
  margin-bottom: 14px;
}
.event-date span { font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--ink); }
.event-date small { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); margin-top: 2px; }
.event h3 { font-size: 1.1rem; margin-bottom: 6px; }
.event p { font-size: 0.92rem; margin: 0 0 14px; color: var(--ink-muted); }
.event-tag {
  display: inline-block; font-family: var(--mono); font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--ink-2);
  background: var(--bg-2);
}

/* ---------- Quotes ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.quote {
  margin: 0;
  padding: 36px 28px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  box-shadow: var(--shadow-1);
}
.quote::before {
  content: '“'; position: absolute; top: -10px; left: 18px;
  font-family: var(--serif); font-size: 5.5rem; line-height: 1; color: var(--gold);
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}
.quote blockquote {
  margin: 0 0 14px; font-family: var(--serif); font-size: 1.2rem; font-weight: 500;
  color: var(--ink); line-height: 1.45;
}
.quote figcaption { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-dim); letter-spacing: 0.04em; }

/* ---------- CTA / Form ---------- */
.section-cta {
  position: relative;
  background:
    linear-gradient(180deg, var(--surface), var(--bg-2));
  border-top: 1px solid var(--line);
}
.checks { list-style: none; padding: 0; margin: 18px 0 0; }
.checks li {
  position: relative; padding-left: 32px; margin-bottom: 12px; color: var(--ink);
}
.checks li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--ink); color: var(--bg-2);
  font-size: 0.85rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.join-form {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-1);
  position: relative;
}
.join-form::after {
  /* decorative corner */
  content: '♞';
  position: absolute;
  top: 14px; right: 18px;
  font-family: var(--serif); font-size: 1.6rem;
  color: var(--gold);
  opacity: 0.8;
}
.field { margin-bottom: 16px; }
.field label {
  display: block; font-family: var(--mono); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-dim); margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.97rem;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ink);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(184,134,42,0.25);
}
.form-feedback {
  margin: 12px 0 0; padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: 0.92rem;
}
.form-feedback.ok { background: rgba(79, 107, 59, 0.14); color: #314a23; border: 1px solid rgba(79,107,59,0.32); }
.form-feedback.err { background: rgba(122, 42, 42, 0.12); color: #5a1f1f; border: 1px solid rgba(122,42,42,0.30); }
.form-fineprint { font-size: 0.78rem; color: var(--ink-dim); margin: 14px 0 0; text-align: center; }

/* ---------- Footer ---------- */
.site-footer {
  background:
    linear-gradient(180deg, var(--bg-2), var(--bg-3));
  border-top: 1px solid var(--line);
  padding: 48px 0 32px;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 32px; flex-wrap: wrap;
}
.brand-footer .brand-mark { width: 32px; height: 32px; }
.brand-footer .brand-mark::after { font-size: 1.25rem; }
.brand-footer .brand-text strong { font-size: 1rem; }
.copy { color: var(--ink-dim); font-size: 0.85rem; margin: 12px 0 0; font-family: var(--mono); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: var(--burgundy); }

/* ---------- Taktik-Training ---------- */
.section-puzzle {
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(184,134,42,0.10), transparent 65%),
    var(--bg);
}
.puzzle-stage {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative; /* anchor for rush overlays */
}

/* ---------- Puzzle Rush HUD ---------- */
.rush-hud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
}
.hud-cell {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  position: relative;
}
.hud-label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.hud-value {
  font-family: var(--serif);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hud-cell.timer-cell .hud-value { color: var(--burgundy); }
.hud-cell.timer-cell .hud-value.urgent {
  color: #c44; animation: timerPulse 0.9s ease-in-out infinite;
}
@keyframes timerPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.65; transform: scale(1.05); }
}

/* ---------- Overlays (start / end) ---------- */
.rush-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: linear-gradient(180deg, rgba(255,253,246,0.95), rgba(246,239,219,0.96));
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  animation: overlayIn 0.32s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.rush-overlay-end {
  background: linear-gradient(180deg, rgba(255,253,246,0.97), rgba(240,217,181,0.92));
}
.rush-overlay-intro {
  background:
    radial-gradient(600px 320px at 50% 35%, rgba(184,134,42,0.18), transparent 70%),
    linear-gradient(180deg, rgba(255,253,246,0.97), rgba(246,239,219,0.97));
  overflow: hidden;
}
.intro-decoration {
  position: absolute;
  font-family: var(--serif);
  font-size: clamp(14rem, 32vw, 22rem);
  color: rgba(92, 58, 30, 0.07);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -52%) rotate(-6deg);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}
.intro-content {
  position: relative;
  z-index: 2;
  gap: 18px;
  padding: 12px 4px;
}
.intro-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 5.5vw, 2.6rem);
  color: var(--ink);
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.intro-subtitle {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 340px;
  margin: 0 auto;
  line-height: 1.5;
}
.intro-start-btn {
  margin-top: 4px;
  padding: 16px 30px;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 22px rgba(122, 42, 42, 0.20);
  transition: transform .18s ease, box-shadow .18s ease;
}
.intro-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(122, 42, 42, 0.28);
}
.intro-foot {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
@keyframes overlayIn {
  0%   { opacity: 0; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}
.overlay-content {
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
  max-width: 380px;
  width: 100%;
}
.overlay-eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.overlay-time, .overlay-big {
  font-family: var(--serif);
  font-size: clamp(3.5rem, 12vw, 5.5rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.overlay-sub {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink-2);
  margin-top: -8px;
}
.overlay-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin: 6px 0 4px;
  width: 100%;
}
.overlay-stats > div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.overlay-stats strong {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.overlay-stats span {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.overlay-message {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink-2);
  margin: 0;
}
.big-start-btn {
  font-size: 1.05rem;
  padding: 14px 30px;
  min-width: 180px;
}
.lifetime-row {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 18px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  margin: 2px auto;
}
.lifetime-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.lifetime-value {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.lifetime-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}
.lifetime-delta {
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.lifetime-delta.pos { color: var(--green); background: rgba(79,107,59,0.14); }
.lifetime-delta.neg { color: var(--burgundy); background: rgba(122,42,42,0.10); }

/* Override the rating-delta positioning for the HUD-cell context */
.hud-cell.rating-cell .rating-delta {
  top: -22px;
  left: 50%;
}

/* Points cell: a touch of gold so it stands out from the others */
.hud-cell.points-cell .hud-value { color: var(--gold-deep); }

/* Floating +10s / -10s / +85 pop above the relevant HUD cell */
.float-pop {
  position: absolute;
  top: -10px;
  left: 50%;
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 700;
  pointer-events: none;
  white-space: nowrap;
  animation: floatPop 1.1s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  z-index: 4;
}
.float-pop.pos { color: var(--green); text-shadow: 0 0 8px rgba(79,107,59,0.35); }
.float-pop.neg { color: var(--burgundy); }
@keyframes floatPop {
  0%   { opacity: 0; transform: translate(-50%, 6px) scale(0.85); }
  20%  { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -30px) scale(1.05); }
}

/* Checkpoint chip row on the start overlay */
.checkpoint-section {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin: 4px 0;
  width: 100%;
}
.overlay-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.cp-row {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 6px;
  max-width: 360px;
}
.cp-chip {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink-2);
  padding: 5px 11px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition: background .14s, color .14s, border-color .14s, transform .12s;
}
.cp-chip:hover:not(.locked) { border-color: var(--ink); transform: translateY(-1px); }
.cp-chip.active {
  background: var(--ink);
  color: var(--bg-2);
  border-color: var(--ink);
}
.cp-chip.locked {
  opacity: 0.32;
  cursor: not-allowed;
  text-decoration: line-through;
}
.puzzle-status {
  display: flex; align-items: stretch; justify-content: space-between;
  gap: 18px;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
}
.user-rating-block {
  display: flex; flex-direction: column; align-items: flex-start;
  position: relative; min-width: 120px;
}
.rating-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 2px;
}
.user-rating-block strong {
  font-family: var(--serif);
  font-size: 1.95rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.status-divider {
  width: 1px; align-self: stretch;
  background: var(--line);
}
.puzzle-meta {
  display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
  gap: 6px;
  text-align: right;
}
.puzzle-meta #pz-side {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
}
.puzzle-meta .rating-pill { font-size: 0.78rem; }
.puzzle-meta .step-tag {
  font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-dim);
}
.rating-delta {
  position: absolute;
  top: 6px;
  left: calc(100% + 8px);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  pointer-events: none;
  animation: ratingDeltaPop 1.8s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  white-space: nowrap;
}
.rating-delta.pos { color: var(--green); text-shadow: 0 0 8px rgba(79,107,59,0.4); }
.rating-delta.neg { color: var(--burgundy); }
@keyframes ratingDeltaPop {
  0%   { opacity: 0; transform: translateY(6px) scale(0.85); }
  20%  { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-26px) scale(1.05); }
}
.puzzle-actions-row { justify-content: center; }
.puzzle-actions-row .btn { min-width: auto; }
.puzzle-frame {
  max-width: 100%;
  margin: 0 auto;
  transform: none;          /* keep the puzzle board flat so slide deltas are screen-aligned */
}
/* legacy two-column layout left in place but disabled — kept so older snapshots don't break */
.puzzle-layout {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 48px;
  align-items: start;
}
.puzzle-info {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
}
.puzzle-info::after {
  content: '♚';
  position: absolute; right: -8px; bottom: -30px;
  font-family: var(--serif); font-size: 9rem; color: var(--bg-3);
  line-height: 1; pointer-events: none;
}
.puzzle-info > * { position: relative; z-index: 1; }
.puzzle-meta-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.puzzle-diff {
  font-family: var(--mono); font-size: 0.85rem; color: var(--gold-deep);
  letter-spacing: 0.06em;
}
.puzzle-side {
  font-family: var(--mono); font-size: 0.85rem; color: var(--burgundy);
  letter-spacing: 0.06em; margin: 0 0 10px;
}
.puzzle-side strong { color: var(--ink); }
.puzzle-instruction {
  font-size: 0.92rem; color: var(--ink-muted); margin: 0 0 20px;
}
.puzzle-progress {
  margin: 14px 0 18px;
  padding: 14px 16px;
  background: linear-gradient(180deg, var(--paper), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.lvl-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.lvl-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  background: var(--ink); color: var(--bg-2);
  border-radius: 999px; font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.08em;
}
.lvl-badge strong { color: var(--gold-soft); font-weight: 700; }
.lvl-title {
  font-family: var(--serif); font-size: 1.05rem; color: var(--ink); font-weight: 600;
  line-height: 1.1;
}
.lvl-streak {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 0.85rem; color: var(--burgundy);
  padding: 4px 10px; background: rgba(122,42,42,0.08);
  border: 1px solid rgba(122,42,42,0.2); border-radius: 999px;
}
.lvl-streak strong { color: var(--burgundy); font-weight: 700; }
.lvl-bar {
  height: 8px; background: var(--bg-3);
  border-radius: 999px; overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
}
.lvl-bar-fill {
  height: 100%;
  background:
    linear-gradient(90deg, var(--gold-soft), var(--gold));
  border-radius: 999px;
  width: 0%;
  transition: width 0.7s cubic-bezier(0.25, 0.7, 0.3, 1);
  box-shadow: 0 0 8px rgba(184,134,42,0.45);
  position: relative;
}
.lvl-bar-fill::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: barShine 2.8s linear infinite;
}
@keyframes barShine {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.lvl-meta {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-family: var(--mono); font-size: 0.72rem;
  color: var(--ink-dim); letter-spacing: 0.04em;
}

.xp-pop {
  position: absolute;
  transform: translate(-50%, 0);
  font-family: var(--mono); font-weight: 700;
  font-size: 1rem; color: var(--gold-deep);
  text-shadow: 0 1px 0 var(--surface), 0 0 8px rgba(255,255,255,0.6);
  pointer-events: none; z-index: 20;
  animation: xpPop 1.4s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes xpPop {
  0%   { opacity: 0; transform: translate(-50%, 8px) scale(0.85); }
  20%  { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -56px) scale(1.05); }
}

.level-toast {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(160deg, var(--gold-soft), var(--gold-deep));
  color: #1a1209;
  padding: 14px 20px;
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0,0,0,0.28), 0 0 0 1px rgba(255,255,255,0.18) inset;
  z-index: 200;
  max-width: 320px;
  opacity: 0;
  transform: translateY(120%);
}
.level-toast.toast-anim {
  animation: toastSlide 4.4s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes toastSlide {
  0%   { opacity: 0; transform: translateY(120%); }
  10%  { opacity: 1; transform: translateY(0); }
  88%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(20px); }
}
.lvl-toast-icon {
  font-family: var(--serif); font-size: 2rem;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  flex-shrink: 0;
}
.lvl-toast-body { display: flex; flex-direction: column; gap: 2px; line-height: 1.2; }
.lvl-toast-body strong { font-family: var(--serif); font-size: 1.1rem; }
.lvl-toast-body span { font-family: var(--sans); font-size: 0.92rem; }

.puzzle-counters {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.puzzle-counters > div { text-align: center; }
.puzzle-counters strong {
  display: block; font-family: var(--serif); font-size: 1.5rem;
  color: var(--ink); font-weight: 700; line-height: 1;
}
.puzzle-counters span {
  display: block; font-family: var(--mono); font-size: 0.7rem;
  color: var(--ink-dim); letter-spacing: 0.1em; text-transform: uppercase;
  margin-top: 4px;
}
.puzzle-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.puzzle-actions .btn { flex: 1; min-width: 120px; }

.theme-picker {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.theme-row { display: flex; align-items: center; gap: 12px; }
.theme-label {
  font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-dim); min-width: 56px;
}
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink-2);
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .12s ease;
}
.chip:hover { border-color: var(--ink); transform: translateY(-1px); }
.chip.active {
  background: var(--ink);
  color: var(--bg-2);
  border-color: var(--ink);
}

.attribution {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-dim);
  margin: 6px 0 0;
  letter-spacing: 0.02em;
}
.attribution a { color: var(--ink-muted); }
.attribution a:hover { color: var(--burgundy); }
.attribution em { font-style: normal; color: var(--ink-2); }

.puzzle-feedback {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  font-weight: 500;
}
.puzzle-feedback.ok {
  background: rgba(79, 107, 59, 0.16);
  color: #2d4218; border: 1px solid rgba(79,107,59,0.32);
}
.puzzle-feedback.err {
  background: rgba(122, 42, 42, 0.10);
  color: #5a1f1f; border: 1px solid rgba(122,42,42,0.28);
}
.puzzle-hint {
  margin: 12px 0 0;
  padding: 12px 14px;
  background: rgba(184,134,42,0.12);
  border-left: 3px solid var(--gold);
  color: var(--ink-2); font-size: 0.92rem;
  border-radius: 4px;
}

.puzzle-board-wrap { position: relative; }
.puzzle-frame {
  max-width: 100%;
  margin: 0;
  transform: none;
}
/* Interactive board cues */
.board[data-interactive='true'] .sq { cursor: pointer; }
.board[data-interactive='true'] .sq.movable .piece {
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.25));
}
.sq.selected { box-shadow: inset 0 0 0 3px rgba(184,134,42,0.95); }
.sq.last-move::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(184,134,42,0.35);
  pointer-events: none;
}
.sq.move-target::after {
  content: ''; position: absolute;
  width: 28%; height: 28%;
  background: rgba(184,134,42,0.55);
  border-radius: 50%;
  pointer-events: none;
}
.sq.bad-move { animation: badMove .55s ease; }
.sq.bad-move .piece { animation: pieceShake .55s ease; }
@keyframes badMove {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(196,90,90,0); }
  50%      { box-shadow: inset 0 0 0 200px rgba(196,90,90,0.55); }
}
@keyframes pieceShake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-3px); }
  40%     { transform: translateX(3px); }
  60%     { transform: translateX(-2px); }
  80%     { transform: translateX(2px); }
}
.board.board-fade-in .sq .piece {
  animation: pieceFadeIn 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
}
.board.board-fade-in .sq:nth-child(8n+1) .piece { animation-delay: 0ms; }
.board.board-fade-in .sq:nth-child(8n+2) .piece { animation-delay: 40ms; }
.board.board-fade-in .sq:nth-child(8n+3) .piece { animation-delay: 80ms; }
.board.board-fade-in .sq:nth-child(8n+4) .piece { animation-delay: 120ms; }
.board.board-fade-in .sq:nth-child(8n+5) .piece { animation-delay: 160ms; }
.board.board-fade-in .sq:nth-child(8n+6) .piece { animation-delay: 200ms; }
.board.board-fade-in .sq:nth-child(8n+7) .piece { animation-delay: 240ms; }
.board.board-fade-in .sq:nth-child(8n+8) .piece { animation-delay: 280ms; }
@keyframes pieceFadeIn {
  0%   { opacity: 0; transform: translateY(-6px) scale(0.85); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.sq.solved-flash::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(79,107,59,0.40);
  animation: solvedFade 1.2s ease forwards;
  pointer-events: none;
}
@keyframes solvedFade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.puzzle-success {
  margin-top: 16px;
  padding: 16px 20px;
  background: linear-gradient(160deg, rgba(79,107,59,0.18), rgba(184,134,42,0.16));
  border: 1px solid rgba(79,107,59,0.40);
  border-radius: var(--radius);
  display: flex; align-items: center; gap: 16px;
  justify-content: space-between; flex-wrap: wrap;
}
.puzzle-success-text { display: flex; flex-direction: column; gap: 2px; }
.puzzle-success strong {
  font-family: var(--serif); font-size: 1.4rem; color: var(--green);
}
.puzzle-success span { color: var(--ink-2); font-size: 0.95rem; }
.puzzle-success .btn { flex-shrink: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-board { order: -1; max-width: 380px; margin: 0 auto; }
  .board-frame { transform: none; }
  .puzzle-layout { grid-template-columns: 1fr; gap: 32px; }
  .puzzle-board-wrap { max-width: 480px; margin: 0 auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .stat + .stat::before { display: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; gap: 40px; }
  .events { grid-template-columns: repeat(2, 1fr); }
  .quotes { grid-template-columns: 1fr; }
  .info-box { position: static; }
  .nav-links a:not(.btn) { display: none; }
  .section { padding: 72px 0; }
}
@media (max-width: 540px) {
  .cards, .events { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-num { font-size: 2.2rem; }
  .schedule li { grid-template-columns: 100px 1fr; padding: 16px 18px; }
  .schedule .what { grid-column: 1 / -1; padding-top: 4px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
