/* ====== CORPORATE JARGON BINGO — playful, bold, accessible ====== */

:root {
  --bg: #FFF8E7;
  --bg-pattern: #FFE066;
  --ink: #111111;
  --ink-soft: #4a4a4a;
  --ink-mute: #888;
  --paper: #FFFFFF;
  --accent: #FF3366;
  --accent-deep: #d92655;
  --hit: #00C896;
  --hit-deep: #009f7a;
  --line: #111111;
  --shadow: 4px 4px 0 var(--line);
  --shadow-lg: 6px 6px 0 var(--line);
  --shadow-sm: 2px 2px 0 var(--line);
  --radius: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Subtle dot grid background */
body {
  background-image: radial-gradient(circle, rgba(0,0,0,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

a { color: var(--accent); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }

/* ====== TOPBAR ====== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-pattern);
  border-bottom: 3px solid var(--line);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 18px;
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--ink);
  color: var(--bg-pattern);
  border-radius: 6px;
  font-weight: 700;
  font-size: 18px;
  font-family: 'Space Mono', monospace;
}

.brand__dot { color: var(--accent); }

.topbar__actions { display: flex; gap: 8px; }

.iconbtn {
  width: 40px;
  height: 40px;
  border: 2px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  font-family: 'Space Mono', monospace;
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s, box-shadow 0.1s;
}

.iconbtn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--line); }
.iconbtn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--line); }

/* ====== MAIN ====== */
.main {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

/* ====== INTRO ====== */
.intro { text-align: center; margin-bottom: 32px; }

.intro__title {
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.intro__lede {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 auto;
}

/* ====== THEME PICKER ====== */
.theme-picker { margin-bottom: 24px; }

.theme-picker__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.theme-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s, box-shadow 0.1s, background 0.1s;
}

.theme-chip:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--line); }
.theme-chip:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--line); }

.theme-chip--active {
  background: var(--accent);
  color: var(--paper);
}

/* ====== BOARD META ====== */
.board-wrap { margin-bottom: 48px; }

.board-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  justify-content: center;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.board-meta__theme, .board-meta__count {
  display: flex;
  flex-direction: column;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 16px;
}

.meta-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  text-transform: uppercase;
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--line); text-decoration: none; }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--line); }

.btn--primary { background: var(--accent); color: var(--paper); }
.btn--ghost { background: var(--paper); }
.btn--large { padding: 14px 28px; font-size: 16px; }

/* ====== BOARD ====== */
.board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1;
  max-width: 720px;
  margin: 0 auto;
}

.cell {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px 6px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(10px, 1.4vw, 13px);
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, transform 0.1s, color 0.15s;
  line-height: 1.15;
  word-break: break-word;
  hyphens: auto;
}

.cell:hover { background: #FFFAEC; }
.cell:active { transform: scale(0.96); }

.cell--free {
  background: var(--bg-pattern);
  font-style: italic;
  font-size: clamp(9px, 1.2vw, 11px);
}

.cell--marked {
  background: var(--hit);
  color: var(--paper);
  font-weight: 700;
  border-color: var(--hit-deep);
}

.cell--marked:hover { background: var(--hit-deep); }

.cell--win {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent-deep);
  animation: pulse 0.6s ease-in-out 3;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ====== ADS ====== */
.ads {
  margin: 64px 0 48px;
  padding: 32px 24px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ads__head { text-align: center; margin-bottom: 24px; }

.ads__eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 8px;
}

.ads__title {
  font-size: clamp(20px, 3vw, 26px);
  margin: 0;
  letter-spacing: -0.01em;
}

.ads__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.ad-card {
  display: block;
  padding: 14px 16px;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.1s, box-shadow 0.1s;
  box-shadow: var(--shadow-sm);
}

.ad-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--line);
  text-decoration: none;
  background: var(--bg-pattern);
}

.ad-card__name {
  display: block;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
  word-break: break-word;
}

.ad-card__tagline {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 8px;
  line-height: 1.3;
}

.ad-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed rgba(0,0,0,0.15);
}

.ad-card__price { color: var(--accent); }
.ad-card__cta { color: var(--ink-mute); }

.ads__footer { text-align: center; margin: 0; font-family: 'Space Mono', monospace; font-size: 14px; }

/* ====== FOR SALE ====== */
.for-sale {
  margin: 48px 0;
  padding: 40px 24px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  text-align: center;
}

.for-sale__eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg-pattern);
  margin: 0 0 8px;
}

.for-sale__title {
  font-family: 'Space Mono', monospace;
  font-size: clamp(24px, 4vw, 36px);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
  word-break: break-word;
}

.for-sale__lede {
  font-size: 16px;
  max-width: 540px;
  margin: 0 auto 24px;
  color: #ddd;
}

.for-sale__small {
  font-size: 13px;
  color: #999;
  max-width: 540px;
  margin: 20px auto 0;
}

.for-sale .btn--primary { background: var(--bg-pattern); color: var(--ink); border-color: var(--bg-pattern); }

/* ====== FOOTER ====== */
.footer {
  text-align: center;
  padding: 32px 20px;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--ink-mute);
  border-top: 2px solid var(--line);
}

.footer p { margin: 0; max-width: 600px; margin: 0 auto; }

/* ====== MODALS ====== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal[hidden] { display: none; }

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  cursor: pointer;
}

.modal__panel {
  position: relative;
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modal-in 0.25s ease-out;
}

@keyframes modal-in {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 2px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.modal__eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  letter-spacing: 0.1em;
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 700;
}

.modal__title {
  font-size: clamp(22px, 3.5vw, 28px);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.modal__body {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 20px;
}

.modal__ad {
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 0 0 20px;
}

.modal__ad-label {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--ink-mute);
  margin: 0 0 10px;
  letter-spacing: 0.05em;
}

.modal__ad-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.1s;
}

.modal__ad-card:hover { transform: translate(-1px, -1px); text-decoration: none; }

.modal__ad-name {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 16px;
  word-break: break-word;
}

.modal__ad-tag {
  font-size: 13px;
  color: var(--ink-soft);
}

.modal__ad-cta {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
  margin-top: 4px;
}

.modal__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modal__actions .btn { flex: 1; min-width: 120px; }

/* HOW-TO list */
.howto-list {
  margin: 0 0 16px;
  padding-left: 20px;
  font-size: 15px;
  color: var(--ink-soft);
}

.howto-list li { margin-bottom: 10px; }
.howto-list strong { color: var(--ink); }

.howto-note {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  color: var(--ink-mute);
  margin: 16px 0 0;
}

/* ====== TOAST ====== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  z-index: 200;
  box-shadow: var(--shadow);
  animation: toast-in 0.3s ease-out;
}

.toast[hidden] { display: none; }

@keyframes toast-in {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* ====== RESPONSIVE ====== */
@media (max-width: 600px) {
  .topbar { padding: 12px 16px; }
  .topbar__brand { font-size: 15px; }
  .brand__mark { width: 28px; height: 28px; font-size: 16px; }
  .main { padding: 20px 12px 48px; }
  .board { padding: 8px; gap: 5px; }
  .cell { font-size: 9px; padding: 4px 3px; }
  .cell--free { font-size: 8px; }
  .board-meta { gap: 12px; padding: 12px; }
  .ads { padding: 20px 16px; margin: 32px 0; }
  .modal__panel { padding: 24px 20px; }
}
