/* ============================================================
   LIFE WRAPPED — Cards Against Humanity system
   bold Helvetica · pure black & white · sharp corners · blunt
   ============================================================ */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #000000;
  --ink-soft: #555555;
  --ink-faint: #9b9b9b;
  --line: #000000;
  --paper: #000000;      /* inverted "black card" */
  --paper-ink: #ffffff;
  --accent: #000000;
  --lived: #22c55e;      /* weeks lived — green, alive */
  --future: #e3e3e3;     /* remaining squares */
  --now: #f5c518;        /* the current/ongoing week — yellow, pulses */
  --moment: #f78fb3;     /* a week with a pinned moment — soft baby pink */
  --decade: #ff0000;     /* the first week of each decade — pure red */
  --milestone: #000000;
  --radius: 4px;
  --sans: 'Helvetica Neue', Helvetica, Arial, 'Liberation Sans', sans-serif;
  --shadow: 0 12px 34px rgba(0,0,0,.12);
}

/* themes (the two B/W cores are free; rest add one pop of colour) */
[data-theme="paper"] {}
[data-theme="ink"] {
  --bg:#000; --surface:#000; --ink:#fff; --ink-soft:#aaa; --ink-faint:#666;
  --line:#fff; --paper:#fff; --paper-ink:#000; --accent:#fff; --lived:#2ee06a; --future:#2c2c2c; --now:#ffd633; --milestone:#fff;
  --shadow: 0 12px 34px rgba(0,0,0,.55);
}
[data-theme="blood"] {
  --bg:#fff; --surface:#fff; --ink:#000; --line:#000; --paper:#000; --paper-ink:#fff;
  --accent:#000; --future:#d8d8d8; --now:#e0241b; --milestone:#e0241b;
}
[data-theme="newsprint"] {
  --bg:#f3efe4; --surface:#f3efe4; --ink:#161412; --ink-soft:#5a554c; --ink-faint:#9a9384;
  --line:#161412; --paper:#161412; --paper-ink:#f3efe4; --accent:#161412; --future:#d9d2c2; --now:#161412; --milestone:#161412;
  --shadow: 0 12px 34px rgba(22,20,18,.16);
}
[data-theme="highlighter"] {
  --bg:#fff; --surface:#fff; --ink:#000; --line:#000; --paper:#000; --paper-ink:#fff;
  --accent:#000; --future:#dcdcdc; --now:#ffe600; --milestone:#000;
}
[data-theme="cyan"] {
  --bg:#000; --surface:#000; --ink:#fff; --ink-soft:#aaa; --ink-faint:#666;
  --line:#fff; --paper:#fff; --paper-ink:#000; --accent:#00e5ff; --future:#2a2a2a; --now:#00e5ff; --milestone:#00e5ff;
  --shadow: 0 12px 34px rgba(0,0,0,.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 700;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
  overscroll-behavior: none;   /* no rubber-band flash of white behind black screens */
}

.hidden { display: none !important; }
em { font-style: normal; }
/* lock page scroll on the full-screen splash / onboarding / wrapped */
body.no-scroll { overflow: hidden; height: 100dvh; }

/* ============ BUTTONS ============ */
.btn {
  font-family: var(--sans);
  font-weight: 700; font-size: 14px;
  text-transform: none; letter-spacing: .02em;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 14px 22px; cursor: pointer; background: var(--ink); color: var(--bg);
  transition: transform .08s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { opacity: .85; }
.btn-big { padding: 18px 26px; font-size: 16px; width: 100%; }
.btn-ghost { background: var(--surface); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-sm { padding: 9px 14px; font-size: 12px; }
.btn-danger-ghost { background: var(--surface); color: var(--ink); }
.link-btn { background: none; border: none; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-family: var(--sans); font-weight: 700; font-size: 13px; text-transform: none; }
.link-btn:hover { color: var(--ink-soft); }
.link-btn-center { display: block; margin: 12px auto 0; }

/* ============ WORDMARK ============ */
.logo-mark {
  display: inline-block; background: var(--ink); color: var(--bg);
  font-weight: 700; font-size: 22px; line-height: .98; letter-spacing: -.02em;
  text-transform: none; text-align: left;
  padding: 14px 16px; margin: 0 auto 26px;
}

/* ============ ONBOARDING ============ */
.onboarding {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--ink);
}
.onboarding-inner {
  width: 100%; max-width: 480px; text-align: left;
  background: var(--surface); border: 3px solid var(--ink); border-radius: var(--radius);
  padding: 40px 36px; box-shadow: 0 20px 50px rgba(0,0,0,.5);
  animation: rise .4s cubic-bezier(.16,1,.3,1);
}
.kicker { font-size: 12px; text-transform: none; color: var(--ink-soft); margin-bottom: 18px; letter-spacing: .02em; }
.hero-title {
  font-family: var(--sans); font-weight: 700; text-transform: none;
  font-size: clamp(40px, 11vw, 64px); line-height: .92; letter-spacing: -.02em;
  margin-bottom: 18px;
}
.hero-sub { color: var(--ink-soft); font-size: 15px; font-weight: 500; line-height: 1.5; margin-bottom: 34px; }

.onboarding-form { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 12px; font-weight: 700; text-transform: none; color: var(--ink); letter-spacing: .02em; }
.field-hint { font-size: 11px; font-weight: 500; color: var(--ink-soft); line-height: 1.4; margin-top: 2px; }
.field input[type="date"], .field input[type="text"] {
  font-family: var(--sans); font-weight: 700; font-size: 16px; color: var(--ink);
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: var(--radius);
  padding: 14px 16px; width: 100%;
}
.field input:focus { outline: none; border-color: var(--ink); }
.field textarea {
  font-family: var(--sans); font-weight: 600; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: var(--radius);
  padding: 12px 14px; width: 100%; resize: vertical; line-height: 1.4;
}
.field textarea:focus { outline: none; border-color: var(--ink); }
.field-opt { font-weight: 600; color: var(--ink-faint); }

/* birthday: three bold dropdowns (Month / Day / Year) */
.dob-row { display: grid; grid-template-columns: 1.5fr 1fr 1.1fr; gap: 10px; }
.dob-select {
  font-family: var(--sans); font-weight: 700; font-size: 16px; color: var(--ink);
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: var(--radius);
  padding: 14px 32px 14px 14px; width: 100%; cursor: pointer; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M2 4l5 5 5-5' stroke='black' stroke-width='2.2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.dob-select:focus { outline: none; border-color: var(--ink); }
.dob-select:invalid, .dob-select option[disabled] { color: var(--ink-faint); }

.lifespan-row { display: flex; align-items: center; gap: 14px; }
.lifespan-row output {
  font-family: var(--sans); font-size: 34px; font-weight: 700; letter-spacing: -.02em;
  color: var(--ink); min-width: 52px; text-align: center;
}
.years-label { color: var(--ink-soft); font-size: 13px; text-transform: none; }
input[type="range"] {
  flex: 1; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px;
  background: var(--ink); cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 3px;
  background: var(--ink); border: 3px solid var(--surface); box-shadow: 0 0 0 2.5px var(--ink); cursor: pointer;
}
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 3px; background: var(--ink); border: 3px solid var(--surface); box-shadow: 0 0 0 2.5px var(--ink); cursor: pointer; }
.privacy-note { margin-top: 26px; font-size: 11px; font-weight: 500; text-transform: none; color: var(--ink-faint); }

/* ============ TOPBAR ============ */
.app { max-width: 900px; margin: 0 auto; padding: 0 20px 80px; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; margin-bottom: 8px;
  background: var(--bg); border-bottom: 3px solid var(--ink);
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-name { font-weight: 700; font-size: 16px; letter-spacing: .02em; text-transform: none; background: var(--ink); color: var(--bg); padding: 6px 10px; border-radius: 3px; }
.topbar-right { display: flex; gap: 8px; }
.chip {
  font-family: var(--sans); font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: .02em;
  background: var(--surface); color: var(--ink);
  border: 2.5px solid var(--ink); border-radius: var(--radius);
  padding: 9px 13px; cursor: pointer; transition: background .15s, color .15s;
}
.chip:hover { background: var(--ink); color: var(--bg); }
.chip-pro { background: var(--ink); color: var(--bg); }
.chip-pro.is-pro { background: var(--surface); color: var(--ink); }

/* ============ STATS HERO ============ */
.stats-hero {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 3px solid var(--ink); border-radius: var(--radius);
  background: var(--ink); gap: 3px; overflow: hidden; margin: 30px 0 16px;
}
.stat-big { text-align: left; padding: 24px 22px; background: var(--surface); }
.stat-number {
  font-family: var(--sans); font-weight: 700;
  font-size: clamp(34px, 7vw, 52px); line-height: .9; letter-spacing: -.02em;
}
.stat-caption { font-size: 11px; font-weight: 700; text-transform: none; color: var(--ink-soft); margin-top: 12px; letter-spacing: .02em; }
.stat-caption::first-letter, .emo-label::first-letter { text-transform: uppercase; }
.stat-divider { display: none; }

.progress-line {
  height: 14px; background: var(--surface);
  border: 3px solid var(--ink); border-radius: 3px; overflow: hidden; margin: 0 0 40px;
}
.progress-fill { height: 100%; background: var(--ink); width: 0; transition: width 1s cubic-bezier(.16,1,.3,1); }

/* ============ GRID (sharp squares) ============ */
.grid-wrap { position: relative; }
.grid-axis-label { font-size: 10px; font-weight: 700; text-transform: none; color: var(--ink-faint); }
.grid-axis-weeks { margin-bottom: 10px; }
.grid-axis-age { position: absolute; left: -4px; top: 30px; }
.grid {
  display: grid; grid-template-columns: repeat(52, 1fr); gap: 3px;
  max-width: 760px; margin: 0 auto;
}
.wk {
  position: relative;
  aspect-ratio: 1; border-radius: 1.5px;
  background: var(--future); cursor: pointer;
  transition: transform .08s ease;
}
.wk:hover { transform: scale(1.9); z-index: 2; outline: 1.5px solid var(--ink); }
.wk-lived { background: var(--lived); }
.wk-now { background: var(--now); animation: pulse 1.4s steps(2, jump-none) infinite; }
/* a pinned moment: the whole square turns the moment colour (pink) */
.wk-milestone { background: var(--moment); }
.wk-decade { background: var(--decade); box-shadow: none; }
/* "this week" always stays yellow so it's findable, even with a moment/decade on it */
.wk-now.wk-milestone, .wk-now.wk-decade { background: var(--now); }

@keyframes pulse { 0%,100%{ opacity:1; } 50%{ opacity:.25; } }

.grid-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  justify-content: center; margin: 26px auto 8px; font-size: 11px; font-weight: 700; text-transform: none; color: var(--ink); }
.legend-item { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw-lived { background: var(--lived); }
.sw-now { background: var(--now); }
.sw-future { background: var(--future); }
.sw-milestone { background: var(--moment); }
.legend-hint { width: 100%; text-align: center; color: var(--ink-faint); font-size: 11px; font-weight: 500; }

/* ============ SECTIONS ============ */
.cards-section { margin-top: 60px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; }
.section-title { font-family: var(--sans); font-weight: 700; font-size: 28px; letter-spacing: -.02em; text-transform: none; }
/* standalone section titles (not in a .section-head) need their own bottom space */
.cards-section > .section-title { margin-bottom: 18px; }

.emo-card:nth-child(6) { display: none; }   /* 6th stat is mobile-only */
.emo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 3px;
  border: 3px solid var(--ink); border-radius: var(--radius); overflow: hidden; background: var(--ink); }
.emo-card { padding: 24px 20px; background: var(--surface); }
.emo-num { font-family: var(--sans); font-weight: 700; font-size: 44px; line-height: .9; color: var(--ink); letter-spacing: -.02em; }
.emo-label { font-size: 11px; font-weight: 700; color: var(--ink-soft); margin-top: 12px; text-transform: none; letter-spacing: .02em; }

/* ============ MILESTONES ============ */
.milestone-count { font-size: 11px; font-weight: 700; text-transform: none; color: var(--ink-faint); margin-bottom: 14px; }
.milestone-list { display: flex; flex-direction: column; gap: 10px; }
.milestone-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 2.5px solid var(--ink); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; transition: box-shadow .12s, transform .08s;
}
.milestone-item:hover { background: color-mix(in srgb, var(--ink) 5%, var(--surface)); }
.milestone-item:active { transform: translateY(1px); }
.ms-emoji { font-size: 22px; flex-shrink: 0; width: 42px; height: 42px; display: grid; place-items: center; background: transparent; border-radius: 3px; overflow: hidden; }
.ms-emoji img { width: 100%; height: 100%; object-fit: cover; }
.ms-body { flex: 1; min-width: 0; }
.ms-label { font-family: var(--sans); font-weight: 700; font-size: 16px; letter-spacing: -.02em; }
.ms-meta { font-size: 11px; font-weight: 700; text-transform: none; color: var(--ink-soft); margin-top: 4px; }
.ms-future-tag { color: var(--ink); background: var(--future); padding: 1px 5px; margin-left: 7px; border-radius: 3px; }
.timeline-toggle { margin-top: 14px; font-size: 13px; }
.milestone-empty { color: var(--ink-faint); font-size: 13px; font-weight: 500; text-align: center; padding: 30px; border: 2.5px dashed var(--ink); border-radius: var(--radius); line-height: 1.6; }

.app-footer { margin-top: 72px; padding: 30px 0 8px; border-top: 3px solid var(--ink); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.footer-mark { font-family: var(--sans); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.footer-tagline { color: var(--ink-soft); font-size: 13px; font-weight: 500; line-height: 1.5; max-width: 420px; }
.footer-links { display: flex; gap: 14px; align-items: center; margin-top: 4px; }
.footer-copy { color: var(--ink-faint); font-size: 11px; font-weight: 600; margin-top: 6px; }

/* ============ MODALS ============ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.7); display: grid; place-items: center; padding: 20px; animation: fade .15s ease;
}
.modal {
  background: var(--surface); border: 3px solid var(--ink); border-radius: var(--radius); padding: 30px;
  width: 100%; max-width: 440px; position: relative; box-shadow: 0 24px 60px rgba(0,0,0,.28);
  animation: rise .25s cubic-bezier(.16,1,.3,1); max-height: 90vh; overflow-y: auto;
}
.modal-wide { max-width: 540px; }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px;
  border: 2.5px solid var(--ink); background: var(--surface); border-radius: 3px; font-size: 18px; font-weight: 700; color: var(--ink);
  cursor: pointer; line-height: 1; transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--ink); color: var(--bg); }
.modal-title { font-family: var(--sans); font-weight: 700; font-size: 26px; letter-spacing: -.02em; text-transform: none; }
.modal-sub { color: var(--ink-soft); font-size: 13px; font-weight: 500; margin-top: 6px; margin-bottom: 18px; line-height: 1.5; }
.modal-form { display: flex; flex-direction: column; gap: 18px; margin-top: 18px; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }
.field-emoji { width: 96px; }
.field-emoji input { text-align: center; font-size: 22px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; align-items: center; }
.modal-actions-center { justify-content: center; }
.modal-actions .btn-danger-ghost { margin-right: auto; }

.emoji-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -8px; }
.emoji-quick button { font-size: 18px; background: var(--surface); border: 2px solid var(--ink-faint); border-radius: 3px; width: 38px; height: 38px; cursor: pointer; transition: border-color .12s; }
.emoji-quick button:hover { border-color: var(--ink-soft); }
.emoji-quick button.is-selected { border-color: var(--ink); }

.pro-photo-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pro-tag { font-size: 10px; font-weight: 700; background: var(--ink); color: var(--bg); padding: 3px 6px; border-radius: 3px; }
.photo-preview { width: 46px; height: 46px; border: 2.5px solid var(--ink); border-radius: 3px; object-fit: cover; }

/* milestone read-only view (shown before editing) */
.ms-view { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.ms-view-meta { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.ms-view-list { display: flex; flex-direction: column; gap: 8px; }
.ms-view-empty { color: var(--ink-faint); font-size: 14px; font-weight: 600; padding: 18px; text-align: center; border: 2.5px dashed var(--ink); }
.ms-row { display: flex; align-items: center; gap: 12px; border: 2.5px solid var(--ink); padding: 10px 12px; cursor: pointer; transition: background .12s; }
.ms-row:hover { background: color-mix(in srgb, var(--ink) 5%, var(--surface)); }
.ms-row-media { flex: 0 0 36px; width: 36px; height: 36px; display: grid; place-items: center; font-size: 20px; background: var(--bg); overflow: hidden; }
.ms-row-media img { width: 100%; height: 100%; object-fit: cover; }
.ms-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ms-row-label { font-family: var(--sans); font-weight: 700; font-size: 15px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-row-note { font-size: 12px; font-weight: 500; color: var(--ink-soft); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ms-row-del { flex: 0 0 auto; background: transparent; border: none; color: var(--ink-faint); font-size: 16px; font-weight: 700; cursor: pointer; padding: 4px 6px; line-height: 1; }
.ms-row-del:hover { color: var(--now); }
.ms-view .modal-actions { margin-top: 4px; }

/* single-moment detail view */
.ms-detail { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.ms-detail #md-back { align-self: flex-start; margin: 0 0 2px; }
.md-meta { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.md-media { width: 100%; border: 2.5px solid var(--ink); border-radius: 4px; overflow: hidden; display: grid; place-items: center; background: var(--bg); }
.md-media img { width: 100%; max-height: 360px; object-fit: cover; display: block; }
.md-media.emoji-only { padding: 30px; }
.md-emoji { font-size: 76px; line-height: 1; }
.md-note { font-size: 15px; font-weight: 500; color: var(--ink); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow-y: auto; }
.ms-detail .modal-actions { margin-top: 4px; }

/* subtle icon-only light/dark toggle */
#theme-toggle { border-color: transparent; background: transparent; color: var(--ink); font-size: 17px; line-height: 1; padding: 8px 10px; }
#theme-toggle:hover { background: transparent; color: var(--ink-soft); }

/* ============ THEME PICKER ============ */
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.theme-card { border: 2.5px solid var(--ink); border-radius: 3px; padding: 12px; cursor: pointer; background: var(--surface); font-family: var(--sans); transition: box-shadow .12s, transform .08s; position: relative; }
.theme-card:hover { background: color-mix(in srgb, var(--ink) 5%, var(--surface)); }
.theme-card.active { background: var(--ink); }
.theme-card.active .theme-name { color: var(--bg); }
.theme-swatches { display: flex; gap: 0; margin-bottom: 10px; border: 1.5px solid var(--ink); }
.theme-swatch { width: 100%; height: 22px; border-radius: 3px; }
.theme-name { font-size: 11px; font-weight: 700; text-transform: none; color: var(--ink); letter-spacing: .02em; }
.theme-lock { position: absolute; top: 8px; right: 8px; font-size: 12px; }

/* ============ SHARE ============ */
.share-preview-wrap { display: grid; place-items: center; margin: 18px 0; }
#share-canvas { width: 280px; height: 280px; border-radius: 3px; border: 3px solid var(--ink); }
.share-style-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.share-style { font-family: var(--sans); font-size: 12px; font-weight: 700; text-transform: none; padding: 9px 14px; border-radius: 3px; border: 2.5px solid var(--ink); background: var(--surface); color: var(--ink); cursor: pointer; }
.share-style.active { background: var(--ink); color: var(--bg); }

/* ============ PAYWALL ============ */
.pro-hero { text-align: center; margin-bottom: 22px; }
.pro-badge { display: inline-block; font-size: 12px; font-weight: 700; text-transform: none; background: var(--ink); color: var(--bg); padding: 6px 14px; border-radius: 3px; margin-bottom: 14px; }
.pro-price { margin-top: 12px; }
.price-old { color: var(--ink-faint); text-decoration: line-through; font-size: 16px; font-weight: 700; }
.price-new { font-family: var(--sans); font-weight: 700; font-size: 48px; letter-spacing: -.02em; }
.price-once { color: var(--ink-soft); font-size: 13px; font-weight: 700; text-transform: none; }
.pro-features { list-style: none; margin: 0 0 22px; display: flex; flex-direction: column; gap: 0; border: 2.5px solid var(--ink); border-radius: 3px; overflow: hidden; }
.pro-features li { font-size: 14px; font-weight: 700; font-family: var(--sans); padding: 14px 16px; border-bottom: 2.5px solid var(--ink); }
.pro-features li:last-child { border-bottom: none; }
.pro-fine { text-align: center; color: var(--ink-faint); font-size: 11px; font-weight: 500; text-transform: none; margin-top: 14px; }

/* ============ TOOLTIP & TOAST ============ */
.tooltip {
  position: fixed; z-index: 200; pointer-events: none;
  background: var(--ink); color: var(--bg); font-family: var(--sans); font-size: 12px; font-weight: 700;
  padding: 10px 12px; border-radius: 3px; border: 2px solid var(--ink);
  max-width: 240px; line-height: 1.35; transform: translate(-50%, -120%);
}
.tooltip-week { opacity: .6; font-size: 10px; text-transform: none; }
.tooltip-ms { margin-top: 3px; }

.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); padding: 14px 22px; border-radius: 3px; border: 2.5px solid var(--ink);
  font-family: var(--sans); font-size: 13px; font-weight: 700; text-transform: none;
  z-index: 300; opacity: 0; transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ LANDING / SPLASH ============ */
.landing {
  min-height: 100dvh; display: grid; place-items: center; padding: 40px 24px;
  background: #000; color: #fff;
}
.landing-inner { max-width: 640px; text-align: center; animation: rise .5s cubic-bezier(.16,1,.3,1); }
.landing-mark { display: inline-block; background: #fff; color: #000; font-weight: 700; font-size: 14px; text-transform: none; letter-spacing: .02em; padding: 7px 12px; margin-bottom: 30px; border-radius: 3px; }
.landing-title { font-family: var(--sans); font-weight: 700; text-transform: none; font-size: clamp(46px, 13vw, 92px); line-height: .9; letter-spacing: -.02em; margin-bottom: 22px; }
.landing-sub { color: #b3b3b3; font-size: clamp(15px, 3.6vw, 19px); font-weight: 500; line-height: 1.5; max-width: 480px; margin: 0 auto 34px; }
.landing #landing-cta { background: #fff; color: #000; border-color: #fff; }
.landing #landing-cta:hover { opacity: .85; }
.landing-strip { display: grid; grid-template-columns: repeat(24, 1fr); gap: 6px; max-width: 440px; margin: 40px auto 24px; }
.landing-strip i { aspect-ratio: 1; display: block; background: #333; border-radius: 2px; }
.landing-strip i.on { background: #2ee06a; }
.landing-foot { color: #777; font-size: 11px; font-weight: 700; text-transform: none; }

/* ============ WRAPPED ============ */
.wrapped {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg); color: var(--ink); padding: 40px 24px 32px;
  transition: background .35s ease, color .35s ease;
}
.wrapped.w-dark { background: #000; color: #fff; }
.wrapped.w-dark .w-kicker, .wrapped.w-dark .w-sub { color: #9b9b9b; }
.wrapped.w-dark .wrapped-skip { color: #fff; }
.wrapped.w-dark .wrapped-prev { color: #fff; border-color: #fff; }
.wrapped.w-dark .btn-primary { background: #fff; color: #000; border-color: #fff; }
.wrapped.w-dark .wrapped-bar { border-color: #fff; }
.wrapped.w-dark .wrapped-bar-fill { background: #fff; }

.wrapped-bar { position: absolute; top: 20px; left: 24px; right: 24px; height: 8px; border: 2.5px solid var(--ink); }
.wrapped-bar-fill { height: 100%; background: var(--ink); width: 0; transition: width .4s cubic-bezier(.16,1,.3,1); }
.wrapped-skip { position: absolute; top: 38px; right: 24px; background: none; border: none; font-family: var(--sans); font-weight: 700; text-transform: none; font-size: 13px; color: var(--ink); cursor: pointer; }

.wrapped-stage { flex: 1; display: grid; place-items: center; width: 100%; cursor: pointer; }
.w-slide { text-align: center; max-width: 760px; animation: wslide .45s cubic-bezier(.16,1,.3,1); }
@keyframes wslide { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
.w-emoji { font-size: clamp(46px, 12vw, 76px); line-height: 1; margin-bottom: 18px; animation: wpop .5s cubic-bezier(.16,1.6,.4,1) both; }
@keyframes wpop { from { opacity: 0; transform: scale(.4) rotate(-8deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
.w-kicker { font-size: clamp(13px, 3.4vw, 18px); font-weight: 700; text-transform: none; color: var(--ink-soft); letter-spacing: .01em; margin-bottom: 8px; }
.w-big { font-family: var(--sans); font-weight: 700; font-size: clamp(74px, 21vw, 200px); line-height: .82; letter-spacing: -.02em; text-transform: none; }
.w-label { font-family: var(--sans); font-weight: 700; font-size: clamp(28px, 7.5vw, 56px); line-height: 1; letter-spacing: -.02em; text-transform: none; margin-top: 6px; }
.w-sub { font-size: clamp(14px, 3.6vw, 19px); font-weight: 500; color: var(--ink-soft); line-height: 1.5; max-width: 540px; margin: 22px auto 0; }

.wrapped-nav { display: flex; justify-content: center; align-items: center; }
.wrapped-prev {
  width: 52px; height: 52px; margin-right: 12px; border: 2.5px solid var(--ink); border-radius: 4px;
  background: transparent; color: var(--ink); font-size: 22px; font-weight: 700; cursor: pointer; overflow: hidden;
  transition: width .35s cubic-bezier(.16,1,.3,1), margin .35s cubic-bezier(.16,1,.3,1), opacity .25s ease, border-width .35s ease;
}
.wrapped-prev:hover { background: var(--ink); color: var(--bg); }
/* slide 1: collapse Back so Next sits dead-centre; it expands in (pushing Next right) on later slides */
.wrapped-nav.no-prev .wrapped-prev { width: 0; margin-right: 0; opacity: 0; border-width: 0; padding: 0; pointer-events: none; }
.wrapped-next { min-width: 180px; }

/* ============ GRID LOCK (paid calendar) ============ */
/* locked grid is only a teaser — clip it to ~one screen so the paywall is reachable */
.grid-wrap.is-locked { min-height: 360px; max-height: 78vh; overflow: hidden; }
.grid-wrap.is-locked .grid { filter: blur(6px); opacity: .45; pointer-events: none; user-select: none; }
.grid-wrap.is-locked .grid-axis-label { opacity: 0; }
.grid-lock { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; }
.grid-lock-card {
  background: var(--surface); border: 3px solid var(--ink); border-radius: 3px;
  padding: 30px 28px; max-width: 460px; text-align: center; box-shadow: var(--shadow);
}
.grid-lock-title { font-family: var(--sans); font-weight: 700; font-size: clamp(26px, 6vw, 38px); line-height: .95; letter-spacing: -.02em; text-transform: none; margin: 8px 0 12px; }
.grid-lock-sub { font-size: 14px; font-weight: 500; color: var(--ink-soft); line-height: 1.55; margin-bottom: 22px; }
.grid-lock-card .btn-big { margin-bottom: 12px; }

/* ============ ANIMATIONS ============ */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 600px) {
  /* fewer columns → bigger, tappable squares; the grid just runs taller */
  .grid { grid-template-columns: repeat(18, 1fr); gap: 4px; }
  .emo-grid { grid-template-columns: 1fr 1fr; }   /* 2 cols × 3 rows, even with 6 stats */
  .emo-card:nth-child(6) { display: block; }       /* show the mobile-only 6th stat */
  .stats-hero { grid-template-columns: 1fr; }
  .section-title { font-size: 24px; }
  .chip { padding: 8px 10px; font-size: 11px; }
  .topbar-name { font-size: 13px; }
}
@media (max-width: 380px) {
  .grid { grid-template-columns: repeat(15, 1fr); }
}
