/* THE GLOW MAP · styles — cozy dark, AI-big-sis brand (pink/violet) */
:root {
  --bg: #12091f;
  --bg2: #1a1030;
  --panel: #241838;
  --ink: #f7f1ff;
  --muted: #b9aed6;
  --pink: #e84393;
  --pink-soft: #ffd6e8;
  --line: #3a2a55;
  --ok: #9be7a0;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, #2b1b3d 0%, var(--bg) 55%) fixed, var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- screens ---------- */
.screen { display: none; max-width: 860px; margin: 0 auto; padding: 24px 16px 64px; }
.screen.active { display: block; }

/* ---------- intro ---------- */
#screen-intro { min-height: 92vh; display: none; align-items: center; justify-content: center; text-align: center; }
#screen-intro.active { display: flex; }
.intro-inner { max-width: 560px; padding: 24px; }
.intro-kicker { letter-spacing: 3px; font-size: 13px; color: var(--pink-soft); margin: 0 0 12px; }
.intro-inner h1 { font-size: clamp(44px, 9vw, 76px); margin: 0 0 12px; line-height: 1.05; }
.intro-sub { font-size: 19px; color: var(--muted); margin: 0 0 22px; }
.intro-dates { font-size: 17px; line-height: 1.8; background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px; margin: 0 0 26px; }
.intro-dates strong { color: var(--pink-soft); }
.intro-q { display: inline-block; margin-top: 8px; color: var(--ink); font-style: italic; }
.intro-how { color: var(--muted); font-size: 14px; margin: 18px 0 26px; }
.ai-note { font-size: 12px; color: var(--muted); opacity: 0.85; line-height: 1.6; }

/* ---------- buttons ---------- */
.btn-primary, .btn-secondary, .btn-ghost {
  font: inherit; cursor: pointer; border-radius: 999px; padding: 14px 26px; font-weight: 700;
  border: none; transition: transform .12s ease, box-shadow .12s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--pink), #a55eea); color: #fff;
  box-shadow: 0 6px 24px rgba(232,67,147,.35); font-size: 18px; }
.btn-primary:active { transform: scale(.97); }
.btn-secondary { background: var(--panel); color: var(--ink); border: 1px solid var(--line); font-size: 16px; }
.btn-ghost { background: transparent; color: var(--muted); font-size: 15px; text-decoration: underline; }

/* ---------- board top ---------- */
.board-top { display: flex; gap: 16px; align-items: center; justify-content: space-between;
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 18px;
  position: sticky; top: 8px; z-index: 20; margin-bottom: 18px; }
.board-title h2 { margin: 0 0 4px; font-size: 26px; }
.board-dates { margin: 0; color: var(--muted); font-size: 14px; }
.board-dates #rank-label { color: var(--pink-soft); font-weight: 700; }
.progress-wrap { display: flex; align-items: center; gap: 12px; }
.progress-ring { width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; background: conic-gradient(var(--pink) 0%, #2b2140 0%);
  position: relative; flex: none; }
.progress-ring::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--panel); }
#progress-pct { position: relative; z-index: 1; font-weight: 800; font-size: 16px; }
.progress-count { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  max-width: min(92vw, 560px); background: #2e1f4d; border: 1px solid var(--pink);
  color: var(--ink); border-radius: 16px; padding: 14px 20px; font-size: 16px; line-height: 1.5;
  opacity: 0; transition: opacity .25s ease, transform .25s ease; z-index: 100; pointer-events: none;
  box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- lanes ---------- */
.lanes { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 22px; }
@media (min-width: 720px) { .lanes { grid-template-columns: 1fr 1fr; } .lane:last-child { grid-column: 1 / -1; } }
.lane { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px;
  min-height: 150px; }
.lane-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.lane-emoji { font-size: 24px; }
.lane-head h3 { margin: 0; font-size: 19px; }
.lane-tag { color: var(--muted); font-size: 13px; margin-left: auto; text-align: right; }
.lane-cards { display: flex; flex-wrap: wrap; gap: 8px; min-height: 44px; }
.lane-empty { color: var(--muted); font-size: 14px; margin: 4px 0; font-style: italic; }

/* ---------- cards ---------- */
.card, .tray-card {
  font: inherit; cursor: pointer; border: none; border-radius: 14px; padding: 10px 12px;
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  color: #2a1740; font-weight: 600; font-size: 15px; text-align: left;
  box-shadow: 0 3px 10px rgba(0,0,0,.25); touch-action: none; user-select: none;
}
.card-text { overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-check { display: none; font-weight: 800; margin-left: auto; }
.card.done { outline: 3px solid var(--ok); }
.card.done .card-check { display: inline; }
.card.done .card-text { text-decoration: line-through; opacity: .75; }
.card.dragging-src, .tray-card.dragging-src { opacity: .35; }
.drag-ghost { position: fixed; z-index: 200; pointer-events: none; transform: translate(-50%, -50%);
  background: var(--pink-soft); color: #2a1740; border-radius: 14px; padding: 10px 14px;
  font-weight: 700; display: flex; gap: 8px; align-items: center; box-shadow: 0 12px 30px rgba(0,0,0,.5);
  max-width: 70vw; opacity: .95; }

/* ---------- tray ---------- */
.tray { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 18px; margin-bottom: 22px; }
.tray h3 { margin: 0 0 4px; font-size: 21px; }
.tray-sub { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.tray-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tray-tab { font: inherit; cursor: pointer; background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; }
.tray-tab.active { background: var(--pink); color: #fff; border-color: var(--pink); }
.tray-cards { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tray-card { background: #3a2a55; color: var(--ink); }

/* ---------- custom card ---------- */
.custom-card { border-top: 1px dashed var(--line); padding-top: 16px; }
.custom-card h4 { margin: 0 0 10px; font-size: 17px; }
.custom-row { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
#cc-text { flex: 1 1 200px; font: inherit; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #17102a; color: var(--ink); }
#cc-emoji, #cc-lane { font: inherit; padding: 12px; border-radius: 12px; border: 1px solid var(--line);
  background: #17102a; color: var(--ink); }
.swatches { display: flex; gap: 8px; align-items: center; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch.active { border-color: #fff; box-shadow: 0 0 0 3px var(--pink); }
.form-error { color: #ff9db8; font-size: 14px; margin: 0; }

/* ---------- actions / email / footer ---------- */
.board-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 26px; }
.email-gate { background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  padding: 22px; margin-bottom: 22px; text-align: center; }
.email-gate h3 { margin: 0 0 8px; font-size: 20px; }
.email-gate p { color: var(--muted); font-size: 15px; margin: 0 0 14px; line-height: 1.6; }
.email-gate .mila-email__form { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.email-gate .mila-email__input { flex: 1 1 220px; max-width: 320px; font: inherit; padding: 13px 16px;
  border-radius: 999px; border: 1px solid var(--line); background: #17102a; color: var(--ink); }
.email-gate .mila-email__btn { font: inherit; font-weight: 700; cursor: pointer; border-radius: 999px;
  padding: 13px 24px; border: none; background: linear-gradient(135deg, var(--pink), #a55eea); color: #fff; }
.email-gate .mila-email__msg { flex-basis: 100%; margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.board-foot { text-align: center; }

/* ---------- share modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(8,4,16,.88); z-index: 300;
  display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 24px 12px; }
.modal[hidden] { display: none; }
.modal-inner { max-width: 560px; width: 100%; text-align: center; }
.modal-inner h3 { margin: 0 0 14px; font-size: 24px; }
#share-canvas { width: 100%; max-width: 400px; height: auto; border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 16px 0; }
.copy-confirm { color: var(--ok); font-weight: 600; }
