/* Goal Bingo Maker — Editorial Warm Minimalist UI + Print-Safe Multi-Page PDF Engine */
:root {
  --bg: #faf8f3;
  --surface: #ffffff;
  --surface-alt: #f3efe6;
  --ink: #1e241e;
  --muted: #5a6359;
  --sage: #2d4c3b;
  --sage-light: #e7efe9;
  --terracotta: #b8563a;
  --terracotta-hover: #9c432a;
  --gold: #c69848;
  --border: #e3ddd0;
  --radius: 16px;
  --shadow: 0 12px 32px rgba(30, 36, 30, 0.06);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--sage); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Announcement Bar */
.top-banner {
  background: var(--sage);
  color: #f6f4ee;
  text-align: center;
  font-size: 13px;
  padding: 9px 16px;
  letter-spacing: 0.01em;
}
.top-banner strong { color: #f6dfa8; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 248, 243, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Instrument Serif", "Playfair Display", Georgia, serif;
  font-size: 23px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--sage);
  color: #f6dfa8;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 6px;
  align-items: center;
  justify-items: center;
}
.brand-mark span {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
}
.brand-mark span.lit { background: #f6dfa8; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a { color: var(--muted); }
.nav-links a:hover, .nav-links a.active { color: var(--sage); text-decoration: none; }
.nav-cta {
  background: var(--terracotta);
  color: #fff !important;
  padding: 8px 15px;
  border-radius: 999px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--terracotta-hover); }

/* Hero */
.hero {
  padding: 36px 0 22px;
  text-align: center;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--sage-light);
  color: var(--sage);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 12px;
}
.hero h1 {
  font-family: "Instrument Serif", "Playfair Display", Georgia, serif;
  font-size: clamp(32px, 4.4vw, 50px);
  line-height: 1.1;
  font-weight: 400;
  margin: 0 auto 12px;
  max-width: 860px;
  color: var(--ink);
}
.hero .lead {
  max-width: 720px;
  margin: 0 auto 18px;
  color: var(--muted);
  font-size: 16px;
}
.trust-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 13px;
  color: var(--muted);
}
.trust-strip span::before {
  content: "✓ ";
  color: var(--sage);
  font-weight: 700;
}

/* Word of the Year Widget (shown on /word-of-the-year-2027/ and compactly linkable) */
.woty-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 8px auto 26px;
  max-width: 900px;
  box-shadow: var(--shadow);
  text-align: center;
}
.woty-vibes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 18px;
}
.vibe-btn {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.vibe-btn.active {
  background: var(--sage);
  color: #fff;
  border-color: var(--sage);
}
.woty-display {
  background: linear-gradient(135deg, #f6f2e8, #eef3ef);
  border: 1px dashed var(--gold);
  border-radius: 14px;
  padding: 22px 18px;
  margin: 0 auto 16px;
  max-width: 560px;
}
.woty-word {
  font-family: "Instrument Serif", "Playfair Display", Georgia, serif;
  font-size: 46px;
  color: var(--sage);
  line-height: 1.05;
  margin: 0 0 6px;
}
.woty-mantra {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* Studio Layout */
.studio-section { padding: 14px 0 46px; }
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 980px) {
  .studio-grid { grid-template-columns: 1fr; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.panel-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.text-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.text-btn:hover { background: var(--surface-alt); color: var(--ink); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 520px) {
  .form-row { grid-template-columns: 1fr; }
}
.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 5px;
}
.field input[type="text"],
.field select,
.field textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13.5px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(45, 76, 59, 0.12);
}

/* Segmented controls */
.seg-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.seg-btn {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  padding: 8px 6px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.seg-btn.active {
  background: var(--sage);
  color: #fff;
  border-color: var(--sage);
}

/* Aesthetic Theme Grid */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.theme-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}
.theme-btn.active {
  border-color: var(--sage);
  background: var(--sage-light);
}
.swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Selected Cell Editor Box */
.cell-editor {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px;
  margin-bottom: 12px;
}
.cell-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--sage);
}
.cell-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.mini-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mini-btn:hover { border-color: var(--sage); color: var(--sage); }
.mini-btn.danger { color: #9c3024; }

.emoji-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.emoji-chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 14px;
  cursor: pointer;
}
.emoji-chip:hover { background: var(--sage-light); }

/* Quick Idea Bank Drawer inside panel */
.idea-cat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}
.cat-pill {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.cat-pill.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.idea-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 136px;
  overflow-y: auto;
  padding: 2px 0;
}
.idea-chip {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11.5px;
  cursor: pointer;
  text-align: left;
}
.idea-chip:hover {
  border-color: var(--sage);
  background: var(--sage-light);
}

.action-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

/* Right Preview Column */
.preview-sticky {
  position: sticky;
  top: 78px;
}
.format-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.format-tab {
  flex: 1 1 auto;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.format-tab.active {
  background: var(--sage);
  color: #fff;
  border-color: var(--sage);
}
.badge-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
}
.format-tab.active .badge-tag {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.stage-wrap {
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.55), rgba(226, 220, 207, 0.85)),
    radial-gradient(rgba(30, 36, 30, 0.08) 1px, transparent 1px);
  background-size: 100% 100%, 16px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 480px;
}
.stage-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
  text-align: center;
}

/* Printable Poster Card Preview */
.bingo-sheet {
  width: 100%;
  max-width: 560px;
  aspect-ratio: 8.5 / 11;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 24px 52px rgba(20, 26, 20, 0.2), 0 6px 16px rgba(20, 26, 20, 0.09);
  display: flex;
  flex-direction: column;
  padding: 20px;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.bingo-sheet-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  padding: 18px 16px 14px;
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.theme-midnight .bingo-sheet-inner {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(215, 181, 109, 0.22);
}
.sheet-top {
  text-align: center;
  margin-bottom: 12px;
}
.sheet-eyebrow {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.78;
}
.sheet-title {
  font-family: "Instrument Serif", "Playfair Display", Georgia, serif;
  font-size: 32px;
  line-height: 1.06;
  margin: 4px 0 3px;
  font-weight: 400;
}
.sheet-sub {
  font-size: 11.5px;
  opacity: 0.8;
  margin: 0;
}

.bingo-grid {
  flex: 1;
  display: grid;
  gap: 8px;
}
.bingo-grid.g3 { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); }
.bingo-grid.g4 { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); }
.bingo-grid.g5 { grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr); }

.bingo-cell {
  position: relative;
  border-radius: 9px;
  padding: 6px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: grab;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(24, 30, 24, 0.08), 0 1px 2px rgba(24, 30, 24, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.16s ease, outline 0.12s ease;
  user-select: none;
  touch-action: none;
  will-change: transform;
}
.theme-midnight .bingo-cell {
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.42), 0 1px 3px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.bingo-cell.free-cell {
  box-shadow: 0 6px 16px rgba(24, 30, 24, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.theme-midnight .bingo-cell.free-cell {
  box-shadow: 0 6px 20px rgba(215, 181, 109, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}
.bingo-cell:hover {
  transform: translateY(-2px) scale(1.025);
  box-shadow: 0 10px 20px rgba(20, 28, 20, 0.14), 0 2px 6px rgba(20, 28, 20, 0.08);
  z-index: 2;
}
.theme-midnight .bingo-cell:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.58), 0 0 0 1px rgba(242, 209, 136, 0.45);
}
.bingo-cell.selected-cell {
  outline: 2.5px solid var(--terracotta);
  outline-offset: -2px;
  z-index: 3;
}
.bingo-grid.is-dragging-grid .bingo-cell:hover {
  transform: none;
  box-shadow: none;
}
.bingo-cell.is-drag-placeholder {
  opacity: 0.24 !important;
  border-style: dashed !important;
  outline: none !important;
  transform: scale(0.95) !important;
}
.bingo-drag-ghost {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  margin: 0 !important;
  cursor: grabbing;
  box-shadow: 0 20px 38px rgba(18, 24, 18, 0.26), 0 4px 12px rgba(18, 24, 18, 0.14) !important;
  transform: scale(1.07) rotate(-1.5deg);
  transition: transform 0.14s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.14s ease;
  outline: 2px solid var(--terracotta);
  outline-offset: -1px;
}
.bingo-drag-ghost.dropping {
  transform: scale(1) rotate(0deg);
  box-shadow: 0 4px 12px rgba(18, 24, 18, 0.12) !important;
  transition: left 0.17s cubic-bezier(0.22, 1, 0.36, 1), top 0.17s cubic-bezier(0.22, 1, 0.36, 1), transform 0.17s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.17s ease;
}
.bingo-cell.has-photo {
  background-size: cover;
  background-position: center;
  justify-content: flex-end;
  padding: 6px 5px 7px;
}
.bingo-cell .cell-photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.bingo-cell .cell-photo-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.05) 45%, rgba(12, 14, 12, 0.72) 100%);
  z-index: 1;
}
.bingo-cell .cell-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
}
.bingo-cell.has-photo .cell-inner {
  color: #ffffff !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}
.bingo-cell.has-photo .cell-emoji {
  display: none;
}
.cell-photo-thumb {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  object-fit: cover;
  border: 1.5px solid var(--sage);
  display: none;
}
.cell-emoji { font-size: 16px; line-height: 1.1; }
.g3 .cell-emoji { font-size: 24px; }
.g4 .cell-emoji { font-size: 19px; }
.cell-text {
  font-size: 10px;
  line-height: 1.22;
  font-weight: 600;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.g3 .cell-text { font-size: 13.5px; }
.g4 .cell-text { font-size: 11.5px; }
.cell-free-tag {
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.85;
}
.cell-done-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
  z-index: 3;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.sheet-foot {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9.5px;
  opacity: 0.72;
}

/* Watermark Overlay (preview only when locked) */
.watermark-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.watermark-ribbon {
  transform: rotate(-28deg);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(30, 36, 30, 0.16);
  border: 2px solid rgba(30, 36, 30, 0.14);
  padding: 6px 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.25);
  white-space: nowrap;
}
.theme-midnight .watermark-ribbon {
  color: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.22);
}

/* Phone Mockup & Desktop Preview */
.phone-frame {
  width: 280px;
  border-radius: 38px;
  padding: 10px;
  background: #17191c;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.26);
  position: relative;
}
.phone-screen {
  border-radius: 29px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 9 / 19.5;
  background: #111;
}
.phone-screen canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.phone-clock-overlay {
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.phone-clock-overlay.dark-ink {
  color: #1f241f;
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.55);
}
.phone-date { font-size: 10px; font-weight: 600; opacity: 0.9; }
.phone-time { font-size: 38px; font-weight: 700; line-height: 1.02; letter-spacing: -0.02em; }

.desktop-frame {
  width: 100%;
  max-width: 620px;
  border-radius: 12px;
  padding: 10px;
  background: #1c1e22;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.2);
}
.desktop-screen {
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111;
}
.desktop-screen canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Party Preview Box */
.party-preview-card {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 18px;
}
.party-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.party-thumb {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: var(--bg);
  font-size: 11px;
}

/* Checkout Card */
.checkout-card {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.unlocked-banner {
  display: none;
  background: #e7f4ec;
  border: 1px solid #9bd1ae;
  color: #164b2c;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}
.unlocked-banner.show { display: block; }
.verify-banner {
  display: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 10px;
}
.verify-banner.show { display: block; }
.verify-banner code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
}
.verify-banner.verify-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}
.verify-banner.verify-success {
  background: #e7f4ec;
  border: 1px solid #9bd1ae;
  color: #164b2c;
}
.verify-banner.verify-warn {
  background: #fff8e6;
  border: 1px solid #e6c978;
  color: #6b4e0f;
}
.inline-link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--terracotta);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.btn-primary:disabled {
  opacity: 0.72;
  cursor: wait;
}
.restore-order {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--border);
  font-size: 12.5px;
  color: var(--muted);
}
.restore-order summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--sage);
}
.restore-order-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.restore-order-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  background: var(--bg);
  color: var(--ink);
}
.btn-restore {
  border: 1px solid var(--sage);
  background: var(--sage);
  color: #fff;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn-restore:hover { opacity: 0.92; }
.tier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
@media (max-width: 560px) {
  .tier-grid { grid-template-columns: 1fr; }
}
.tier-option {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--bg);
  text-align: left;
  cursor: pointer;
}
.tier-option.selected {
  border-color: var(--sage);
  background: var(--sage-light);
}
.tier-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 4px;
}
.tier-price { color: var(--terracotta); font-size: 16px; }
.tier-desc { font-size: 12px; color: var(--muted); line-height: 1.4; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.btn-primary {
  flex: 1 1 220px;
  background: var(--terracotta);
  color: #fff;
  border: none;
  border-radius: 11px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary:hover { background: var(--terracotta-hover); }
.btn-secondary {
  flex: 1 1 170px;
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--border);
  border-radius: 11px;
  padding: 11px 14px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.btn-secondary:hover { background: var(--surface-alt); }
.download-bar {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.download-bar.show { display: flex; }

.hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

/* Ideas Directory Section (for /2027-bingo-card-ideas/) */
.ideas-hub {
  padding: 10px 0 36px;
}
.ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.idea-cat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}
.idea-cat-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--sage);
}
.idea-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f1ede4;
  font-size: 13px;
}
.idea-list-item:last-child { border-bottom: none; }
.add-idea-btn {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--sage);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
.add-idea-btn:hover { background: var(--sage); color: #fff; border-color: var(--sage); }

/* Info / GEO / FAQ Sections */
.info-section {
  padding: 34px 0;
  border-top: 1px solid var(--border);
}
.info-section h2 {
  font-family: "Instrument Serif", "Playfair Display", Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  margin: 0 0 14px;
  color: var(--ink);
}
.table-scroll { overflow-x: auto; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 13.5px;
}
.compare-table th, .compare-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.compare-table th { background: var(--surface-alt); font-weight: 700; }

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 780px) {
  .cards-3 { grid-template-columns: 1fr; }
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}
.card h3 { margin: 0 0 8px; font-size: 16px; color: var(--sage); }
.card p { margin: 0; font-size: 13.5px; color: var(--muted); }

.faq-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 780px) {
  .faq-list { grid-template-columns: 1fr; }
}
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.faq-item h3 { margin: 0 0 6px; font-size: 15px; color: var(--ink); }
.faq-item p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* Footer */
.site-footer {
  background: #1b241d;
  color: rgba(255, 255, 255, 0.78);
  padding: 36px 0 42px;
  font-size: 13.5px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  max-width: 460px;
}
.footer-links a { color: rgba(255, 255, 255, 0.84); }
.footer-links a:hover { color: #f6dfa8; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 22, 18, 0.56);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}
.modal h3 { margin: 0 0 10px; font-size: 19px; color: var(--ink); }
.modal-note {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
  color: var(--ink);
  margin: 12px 0 16px;
}

/* ============================================================
   PRINT-SAFE MULTI-PAGE PDF ENGINE
   Exact US Letter (8.5in x 10.96in) & A4 (210mm x 296mm)
   ============================================================ */
#print-root { display: none; }

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  body > *:not(#print-root) { display: none !important; }
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }
  #print-root {
    display: block !important;
    margin: 0;
    padding: 0;
  }
  .print-page {
    width: 8.5in;
    height: 10.96in;
    overflow: hidden;
    page-break-after: always;
    break-after: page;
    position: relative;
    display: flex;
    flex-direction: column;
  }
  #print-root[data-paper="a4"] .print-page {
    width: 210mm;
    height: 296mm;
  }
  .print-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }
  .print-page .bingo-sheet {
    max-width: none !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: auto !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0.42in !important;
  }
  .print-page .bingo-sheet-inner {
    padding: 0.28in 0.26in 0.22in !important;
  }
  .print-page .sheet-title { font-size: 38pt !important; }
  .print-page .sheet-eyebrow { font-size: 10pt !important; }
  .print-page .sheet-sub { font-size: 11.5pt !important; }
  .print-page .bingo-grid { gap: 9pt !important; }
  .print-page .cell-emoji { font-size: 20pt !important; }
  .print-page .g3 .cell-emoji { font-size: 30pt !important; }
  .print-page .cell-text { font-size: 11.5pt !important; line-height: 1.24 !important; }
  .print-page .g3 .cell-text { font-size: 15.5pt !important; }
  .print-page .g4 .cell-text { font-size: 13pt !important; }
  .print-page .sheet-foot { font-size: 9.5pt !important; }
  .print-page .selected-cell { outline: none !important; }
}
