:root {
  --ink: #1a1523;
  --ink-soft: #4a4258;
  --paper: #faf7f2;
  --paper-2: #f0ebe3;
  --card: #ffffff;
  --accent: #e85d4c;
  --accent-2: #2f6fed;
  --accent-3: #1f9d6a;
  --gold: #e8b84a;
  --line: #e2dcd2;
  --shadow: 0 12px 40px rgba(26, 21, 35, 0.08);
  --radius: 18px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(232, 93, 76, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(47, 111, 237, 0.1), transparent 45%),
    var(--paper);
  min-height: 100vh;
  line-height: 1.5;
}

a {
  color: var(--accent-2);
}

/* ——— Shell ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(250, 247, 242, 0.85);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #f0a04b);
  color: white;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(232, 93, 76, 0.35);
}

.nav-links {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--paper-2);
  color: var(--ink);
}

.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

/* ——— Hero ——— */
.hero {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero p.lead {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 52ch;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.badge.ok {
  border-color: rgba(31, 157, 106, 0.35);
  color: var(--accent-3);
  background: rgba(31, 157, 106, 0.08);
}

.badge.warn {
  border-color: rgba(232, 184, 74, 0.5);
  color: #9a6b00;
  background: rgba(232, 184, 74, 0.15);
}

/* ——— Layout panels ——— */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 960px) {
  .workspace {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: linear-gradient(180deg, #fff, var(--paper));
}

.panel-head h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.panel-body {
  padding: 1.15rem;
}

.tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tab {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  font: inherit;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
}

.tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ——— Forms ——— */
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

.field {
  margin-bottom: 0.95rem;
}

input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.15);
  background: #fff;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

textarea.tall {
  min-height: 160px;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 520px) {
  .row-2 {
    grid-template-columns: 1fr;
  }
}

.hint {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 0.35rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0.5rem 0 1rem;
}

.checkbox-row input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
}

/* ——— Buttons ——— */
.btn {
  appearance: none;
  border: none;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.7rem 1.1rem;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.1s, box-shadow 0.15s, background 0.15s;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #d94a3a);
  color: white;
  box-shadow: 0 6px 18px rgba(232, 93, 76, 0.3);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 8px 22px rgba(232, 93, 76, 0.4);
}

.btn-secondary {
  background: var(--ink);
  color: white;
}

.btn-ghost {
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* ——— Dropzone ——— */
.dropzone {
  border: 2px dashed #cfc6b8;
  border-radius: 14px;
  padding: 1.25rem;
  text-align: center;
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent-2);
  background: rgba(47, 111, 237, 0.05);
}

.dropzone strong {
  display: block;
  margin-bottom: 0.25rem;
}

.dropzone span {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.file-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  background: var(--paper);
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  border: 1px solid var(--line);
}

.file-list .meta {
  color: var(--ink-soft);
  font-size: 0.75rem;
}

/* ——— Chat ——— */
.chat-log {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
  padding: 0.25rem;
}

.bubble {
  max-width: 92%;
  padding: 0.65rem 0.85rem;
  border-radius: 14px;
  font-size: 0.9rem;
}

.bubble.user {
  align-self: flex-end;
  background: var(--ink);
  color: white;
  border-bottom-right-radius: 4px;
}

.bubble.assistant {
  align-self: flex-start;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}

.chat-compose {
  display: flex;
  gap: 0.5rem;
}

.chat-compose input {
  flex: 1;
}

/* ——— Bingo board ——— */
.board-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.board-toolbar .spacer {
  flex: 1;
}

.board-wrap {
  background:
    linear-gradient(145deg, #fffdf9, #f7f1e8);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
}

.bingo-title {
  text-align: center;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.85rem;
  color: var(--ink);
}

.bingo-title[contenteditable="true"] {
  outline: none;
  border-radius: 8px;
  padding: 0.2rem 0.4rem;
}

.bingo-title[contenteditable="true"]:focus {
  background: rgba(47, 111, 237, 0.08);
}

.bingo-grid {
  display: grid;
  gap: 6px;
  width: 100%;
  aspect-ratio: 1;
  max-width: 560px;
  margin: 0 auto;
}

.bingo-cell {
  background: white;
  border: 2px solid var(--ink);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.35rem;
  font-weight: 700;
  font-size: clamp(0.55rem, 1.7vw, 0.85rem);
  line-height: 1.2;
  word-break: break-word;
  cursor: text;
  transition: background 0.15s, transform 0.1s;
  min-height: 0;
  overflow: hidden;
}

.bingo-cell:hover {
  background: #fff9f0;
}

.bingo-cell:focus {
  outline: 3px solid rgba(47, 111, 237, 0.35);
  outline-offset: -3px;
  z-index: 1;
}

.bingo-cell.free {
  background: linear-gradient(145deg, var(--gold), #f0c96a);
  color: var(--ink);
  font-weight: 900;
  letter-spacing: 0.06em;
  cursor: default;
}

.bingo-cell.marked:not(.free) {
  background: rgba(232, 93, 76, 0.12);
  box-shadow: inset 0 0 0 3px rgba(232, 93, 76, 0.45);
}

.board-footer {
  margin-top: 0.85rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.tips-box {
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  background: rgba(47, 111, 237, 0.07);
  border: 1px solid rgba(47, 111, 237, 0.2);
  border-radius: 12px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* Size presets visual */
.size-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.size-pill {
  border: 1.5px solid var(--line);
  background: white;
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--ink-soft);
}

.size-pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(232, 93, 76, 0.08);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.gallery-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}

.gallery-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(26, 21, 35, 0.1);
}

.gallery-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.gallery-card .meta {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--ink-soft);
}

/* Toast / status */
.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  background: var(--ink);
  color: white;
  padding: 0.75rem 1.1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
  max-width: min(360px, calc(100vw - 2rem));
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: #b42318;
}

.loading-bar {
  height: 3px;
  background: transparent;
  overflow: hidden;
  border-radius: 2px;
}

.loading-bar.active::after {
  content: "";
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: slide 0.9s ease-in-out infinite;
}

@keyframes slide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(350%);
  }
}

/* ——— Party printout ——— */
#partyReview,
#partySheets {
  margin-top: 2rem;
  scroll-margin-top: 5.5rem;
}

.party-lead {
  margin-top: 0;
  font-size: 1.05rem;
}

.party-tools {
  margin-bottom: 1rem;
}

.party-tools h2 {
  margin: 0 0 0.35rem;
}

.party-page {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.party-card .bingo-grid {
  aspect-ratio: auto;
  max-width: none;
}

.party-card .bingo-title {
  font-size: 0.95rem;
  margin: 0.2rem 0 0.55rem;
}

.party-card .bingo-cell {
  min-height: 4.4rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.party-card .cell-text {
  padding: 0.35rem 0.2rem;
}

.party-card .print-signoff {
  display: block;
  margin-top: 0.6rem;
}

.square-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(26, 21, 35, 0.46);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.square-modal[hidden] {
  display: none;
}

.square-modal-card {
  width: min(520px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  background: white;
  border-radius: 16px;
  padding: 1rem 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.square-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.square-modal-head h3 {
  margin: 0;
}

.square-modal .field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 700;
  margin-top: 0.75rem;
}

.square-modal input,
.square-modal textarea {
  font: inherit;
  font-weight: 600;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.square-actions {
  margin-top: 0.35rem;
}

.tune-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.tune-option {
  min-height: 4.4rem;
  white-space: normal;
  text-align: left;
  line-height: 1.25;
}

@media (min-width: 860px) {
  .party-page.per-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ——— Print ——— */
@media print {
  body {
    background: white;
  }

  .site-header,
  .hero,
  .workspace > .panel:first-child,
  .board-toolbar,
  .tips-box,
  .toast,
  .nav-links,
  .no-print {
    display: none !important;
  }

  .workspace {
    display: block;
  }

  .panel {
    box-shadow: none;
    border: none;
  }

  .panel-head {
    display: none;
  }

  .board-wrap {
    border: none;
    padding: 0;
    background: white;
  }

  .bingo-grid {
    max-width: 100%;
    gap: 4px;
  }

  .bingo-cell {
    border-width: 2px;
    break-inside: avoid;
  }

  .bingo-cell.marked:not(.free) {
    background: white;
    box-shadow: none;
  }

  .board-wrap.is-gift {
    border: 3px double #1a1523;
    padding: 14mm 12mm;
    box-shadow: none;
    background: white;
  }

  .gift-masthead {
    margin-bottom: 4mm;
  }

  .gift-for {
    font-size: 28pt;
  }

  .gift-occasion {
    font-size: 12pt;
    letter-spacing: 0.22em;
  }

  .board-wrap.is-gift .print-signoff {
    display: block !important;
    margin-top: 8mm;
  }

  #partyReview {
    display: none !important;
  }

  body.printing-party #maker,
  body.printing-party #partyPay,
  body.printing-party .party-tools,
  body.printing-party .square-modal {
    display: none !important;
  }

  body.printing-party #partyReview,
  body.printing-party #partySheets {
    display: block !important;
  }

  body.printing-party .party-page {
    display: block;
    break-after: page;
    page-break-after: always;
    margin: 0;
  }

  body.printing-party .party-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  body.printing-party .party-card {
    break-inside: avoid;
    page-break-inside: avoid;
    margin: 0 0 6mm;
  }

  body.printing-party .party-page.per-2 .party-card:last-child {
    margin-bottom: 0;
  }

  body.printing-party .party-card.board-wrap.is-gift {
    box-shadow: none;
    border: 2px solid #1a1523;
    padding: 4mm;
    background: white;
  }

  body.printing-party .party-card .bingo-grid {
    aspect-ratio: auto;
    max-width: none;
    gap: 2mm;
  }

  body.printing-party .party-card .bingo-cell {
    min-height: 18mm;
    font-size: 9pt;
    cursor: default;
  }

  body.printing-party .party-page.per-1 .party-card .bingo-cell {
    min-height: 22mm;
    font-size: 11pt;
  }

  body.printing-party .party-card .gift-for {
    font-size: 16pt;
  }

  body.printing-party .party-card .print-signoff {
    display: block !important;
  }

  @page {
    margin: 12mm;
  }
}

/* Themes for board frame */
.board-wrap.theme-neon {
  background: linear-gradient(145deg, #1a1030, #2a1850);
  color: #f8f4ff;
}

.board-wrap.theme-neon .bingo-title {
  color: #f8f4ff;
  text-shadow: 0 0 18px rgba(232, 93, 76, 0.6);
}

.board-wrap.theme-neon .bingo-cell {
  background: #120a22;
  color: #f0eaff;
  border-color: #c77dff;
}

.board-wrap.theme-neon .bingo-cell.free {
  background: linear-gradient(145deg, #e85d4c, #f0a04b);
  color: white;
  border-color: #ffd36a;
}

.board-wrap.theme-forest {
  background: linear-gradient(145deg, #e8f5ee, #d4ebe0);
}

.board-wrap.theme-forest .bingo-cell {
  border-color: #1f6b4a;
}

.board-wrap.theme-forest .bingo-cell.free {
  background: linear-gradient(145deg, #1f9d6a, #3ecf8e);
  color: white;
}

.board-wrap.theme-party {
  background:
    radial-gradient(circle at 10% 20%, rgba(232, 93, 76, 0.15), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(47, 111, 237, 0.15), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(232, 184, 74, 0.2), transparent 45%),
    #fff;
}

.board-wrap.theme-party .bingo-title {
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.gift-intro {
  margin-top: 0;
}

.wizard-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
}

.wizard-progress {
  height: 8px;
  background: #e7e0d6;
  border-radius: 999px;
  overflow: hidden;
}

.wizard-progress span {
  display: block;
  height: 100%;
  width: 14%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: inherit;
}

.wizard-step {
  margin: 0.55rem 0 0.2rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.wizard-question {
  margin: 0 0 0.75rem;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.chip {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink-soft);
}

.chip:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.chip[aria-pressed='true'] {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.rant-card {
  margin-top: 0.9rem;
}

.checkout-options {
  display: grid;
  gap: 0.55rem;
}

.checkout-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  background: white;
  cursor: pointer;
}

.checkout-option.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.checkout-option.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.checkout-option strong {
  display: block;
}

.checkout-option .hint {
  margin: 0.15rem 0 0;
}

.checkout-price {
  font-weight: 800;
  white-space: nowrap;
}

.point-row {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.point-row input {
  flex: 1;
}

.checkout-result {
  margin-top: 0.9rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.panel[data-mode="gift"] .classic-only,
.panel[data-mode="gift"] .classic-actions,
.panel[data-mode="classic"] .gift-only {
  display: none;
}

.gift-masthead {
  text-align: center;
  margin-bottom: 0.35rem;
}

.gift-kicker,
.gift-occasion {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gift-kicker {
  font-size: 0.68rem;
  color: var(--accent);
}

.gift-occasion {
  margin-top: 0.35rem;
  font-size: 0.92rem;
  color: var(--ink);
}

.gift-for {
  margin: 0.15rem 0 0.35rem;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.board-wrap.is-gift {
  background: #fffdf8;
  border: 2px solid var(--ink);
  box-shadow: 0 0 0 7px #fff, 0 0 0 9px var(--ink);
  padding: 1.2rem 1rem 1rem;
}

.board-wrap.is-gift .bingo-title {
  font-size: 1rem;
  letter-spacing: 0.14em;
  margin-bottom: 0.75rem;
}

.print-signoff {
  display: none;
  text-align: center;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--ink-soft);
}

.bingo-cell {
  position: relative;
}

.cell-text {
  width: 100%;
  outline: none;
  padding: 0.85rem 0.25rem 0.2rem;
  min-height: 1.2em;
}

.lock-btn {
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 2;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-soft);
  border-radius: 999px;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 0.08rem 0.35rem;
  cursor: pointer;
}

.bingo-cell.locked {
  background: #f6f1e7;
}

.bingo-cell.locked .lock-btn {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.bingo-cell.too-long {
  box-shadow: inset 0 0 0 2px var(--gold);
}

.board-wrap.theme-neon .lock-btn {
  background: #241536;
  color: #f8f4ff;
  border-color: #c77dff;
}

.board-wrap.theme-neon.is-gift .gift-kicker,
.board-wrap.theme-neon.is-gift .gift-occasion,
.board-wrap.theme-neon.is-gift .gift-for,
.board-wrap.theme-neon.is-gift .print-signoff {
  color: #f8f4ff;
}

.board-wrap.theme-neon.is-gift {
  box-shadow: 0 0 0 7px #120a22, 0 0 0 9px #c77dff;
}

.test-mode-badge {
  display: inline-block;
  margin: 0.5rem 0;
  padding: 0.35rem 0.7rem;
  border: 2px dashed #b45309;
  border-radius: 6px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.test-mode-badge[hidden] { display: none; }
