:root {
  color-scheme: light;
  --font-display: "Baloo 2", ui-rounded, system-ui, sans-serif;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hand: "Caveat", cursive;
  --page: #f4faff; --card: #ffffff;
  --ink: #0b1222; --ink-2: #3a4560; --muted: #5a7393; --faint: #8fa3bd;
  --line: rgba(15, 77, 148, 0.12); --track: #dbe9f8;
  --blue: #126fe0; --blue-2: #1a83f3; --blue-3: #49abf9; --sky-3: #2b9af6; --sky-4: #0e6fe0;
  --sun: #ff9a1f; --sun-soft: #fff8e6; --sun-line: #ffe3a3;
  --good: #0ca30c; --good-bg: #e8f8e8; --good-ink: #0a6a0a;
  --warn: #fab219; --warn-bg: #fff6dd; --warn-ink: #7a5200;
  --bad: #f23d00; --bad-bg: #ffe9e2; --bad-ink: #9a2a00;
  --done: #126fe0; --done-bg: #e3efff; --done-ink: #0b4fb8;
  --accent: #126fe0;
  --shadow: 0 14px 40px rgba(6, 42, 92, 0.10), 0 2px 6px rgba(6, 42, 92, 0.06);
  --radius: 22px;
  --on-accent: #fff;
  --glass: rgba(255,255,255,.72); --glass-strong: rgba(255,255,255,.9); --glass-border: rgba(255,255,255,.95);
  --sky: radial-gradient(900px 420px at 85% -10%, rgba(255,255,255,.75) 0%, rgba(255,255,255,0) 55%), linear-gradient(180deg, #7ec8ff 0%, #a8dff6 70%, var(--page) 100%);
  --cloud: rgba(255,255,255,.55);
  --input-bg: #fff; --input-border: #c9d9ec;
  --toast-bg: #0b1222; --toast-ink: #fff;
  --soft: #f0f7ff; --cell-empty: #c9d5e5;
  --stamp-ink: #b86a00; --stamp-line: #e4a53a;
}
/* ---------------- Dark theme (night flight) ---------------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0b1222; --card: #141d31;
  --ink: #eef4ff; --ink-2: #b9c6dc; --muted: #8696b1; --faint: #627294;
  --line: rgba(150, 180, 240, 0.14); --track: #1f2c47;
  --blue: #4f9cff; --blue-2: #3b8cf5; --blue-3: #6fb3ff; --sky-3: #3b8cf5; --sky-4: #2a74dc;
  --sun: #ffb347; --sun-soft: #2a2213; --sun-line: #5a4616;
  --good: #3ddc5a; --good-bg: #10281a; --good-ink: #7fe59a;
  --warn: #ffc83d; --warn-bg: #2c2410; --warn-ink: #ffd36b;
  --bad: #ff6a3d; --bad-bg: #361a13; --bad-ink: #ff9e80;
  --done: #4f9cff; --done-bg: #12264a; --done-ink: #9cc8ff;
  --shadow: 0 16px 44px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.35);
  --glass: rgba(255,255,255,.08); --glass-strong: rgba(255,255,255,.14); --glass-border: rgba(255,255,255,.14);
  --sky: radial-gradient(700px 360px at 80% -20%, rgba(96,150,255,.35) 0%, rgba(96,150,255,0) 60%),
         radial-gradient(1.2px 1.2px at 12% 30%, rgba(255,255,255,.7) 50%, transparent 51%),
         radial-gradient(1.2px 1.2px at 32% 70%, rgba(255,255,255,.5) 50%, transparent 51%),
         radial-gradient(1.5px 1.5px at 56% 25%, rgba(255,255,255,.6) 50%, transparent 51%),
         radial-gradient(1px 1px at 72% 60%, rgba(255,255,255,.5) 50%, transparent 51%),
         radial-gradient(1.4px 1.4px at 90% 40%, rgba(255,255,255,.6) 50%, transparent 51%),
         radial-gradient(1px 1px at 44% 48%, rgba(255,255,255,.45) 50%, transparent 51%),
         linear-gradient(180deg, #0d1e3f 0%, #0c1831 60%, var(--page) 100%);
  --cloud: rgba(255,255,255,.05);
  --input-bg: #0f172a; --input-border: #2a3a5c;
  --toast-bg: #eef4ff; --toast-ink: #0b1222;
  --soft: #16223a; --cell-empty: #2a3a5c;
  --stamp-ink: #ffc46b; --stamp-line: #a07a2c;
}
:root[data-theme="dark"] .hero .mascot { filter: drop-shadow(0 18px 24px rgba(0,0,0,.5)); }
:root[data-theme="dark"] .tier.on { box-shadow: 0 8px 24px rgba(0,0,0,.5); }
:root[data-theme="dark"] .crewnav a.on { background: #eef4ff; color: #0b1222; border-color: #eef4ff; }
:root[data-theme="dark"] .crewnav a.on .av { background: #0b1222; color: #fff; }
:root[data-theme="dark"] .btn.primary { background: #eef4ff; color: #0b1222; border-color: #eef4ff; }
:root[data-theme="dark"] .mic { background: #eef4ff; color: #0b1222; }
:root[data-theme="dark"] .mic.rec { background: #e0457b; color: #fff; }
:root[data-theme="dark"] .scrim { background: rgba(0, 0, 0, .6); }
:root[data-theme="dark"] .drawer { box-shadow: -20px 0 60px rgba(0,0,0,.6); }
:root[data-theme="dark"] .bar .pace { background: var(--ink); }
:root[data-theme="dark"] .auth { background: radial-gradient(900px 500px at 80% -10%, rgba(96,150,255,.35) 0%, transparent 60%), linear-gradient(180deg, #0d1e3f 0%, #0c1831 50%, var(--page) 100%); }

/* theme toggle */
.theme-toggle { position: relative; width: 64px; height: 34px; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass); backdrop-filter: blur(6px); cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: space-between; flex: none; }
.theme-toggle svg { width: 16px; height: 16px; position: relative; z-index: 1; margin: 0 8px; transition: opacity .2s, transform .3s; }
.theme-toggle .sun { color: #b86a00; } .theme-toggle .moon { color: var(--ink-2); }
.theme-toggle .knob { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--card); box-shadow: 0 2px 8px rgba(6,42,92,.25); transition: transform .3s cubic-bezier(.2,.8,.2,1), background .25s; }
:root[data-theme="dark"] .theme-toggle .knob { transform: translateX(30px); box-shadow: 0 2px 8px rgba(0,0,0,.5); }
:root[data-theme="dark"] .theme-toggle .sun { opacity: .45; } :root[data-theme="dark"] .theme-toggle .moon { color: #ffd36b; }
.theme-toggle:hover { border-color: var(--ink-2); }
.theme-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.auth .theme-toggle { position: absolute; top: 18px; right: 18px; }

* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: hidden; background: var(--page); color: var(--ink); font: 15px/1.5 var(--font-sans); -webkit-font-smoothing: antialiased; transition: background-color .25s, color .25s; }
.card, .tiers, .drawer, .cal .cd, .input, .stepper { transition: background-color .25s, border-color .25s; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
.hand { font-family: var(--font-hand); }
.boot { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.boot img { width: 90px; }

/* ---------------- Sky header ---------------- */
.sky { position: relative; overflow: hidden; color: var(--ink); background: var(--sky); }
.sky::before, .sky::after { content: ""; position: absolute; border-radius: 999px; background: var(--cloud); filter: blur(2px); pointer-events: none; }
.sky::before { width: 420px; height: 110px; left: -60px; top: 36px; box-shadow: 160px 36px 0 -20px var(--cloud), 520px -10px 0 -10px var(--cloud), 900px 50px 0 -30px var(--cloud); }
.sky::after { width: 260px; height: 80px; right: -40px; top: 120px; box-shadow: -300px 60px 0 -20px var(--cloud); }
.sky .wrap { position: relative; z-index: 1; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 46px; width: auto; display: block; }
.brand .t { font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.1; }
.brand .t small { display: block; font-family: var(--font-sans); font-weight: 600; font-size: 12px; color: var(--ink-2); letter-spacing: .04em; text-transform: uppercase; }
.topright { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.daypill { display: inline-flex; align-items: center; gap: 10px; background: var(--glass); backdrop-filter: blur(6px);
  border: 1px solid var(--glass-border); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.daypill b { color: var(--ink); font-family: var(--font-display); font-size: 16px; }
.daypill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sun); }
.mepill { display: inline-flex; align-items: center; gap: 8px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 999px; padding: 5px 12px 5px 5px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.mepill img { width: 26px; height: 26px; object-fit: contain; }
.crewnav { display: flex; gap: 8px; flex-wrap: wrap; padding: 18px 0 0; }
.crewnav a { display: inline-flex; align-items: center; gap: 8px; background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 999px; padding: 6px 12px 6px 6px; font-weight: 600; font-size: 13px; color: var(--ink-2); transition: transform .15s, background .15s; }
.crewnav a:hover { transform: translateY(-1px); background: var(--glass-strong); }
.crewnav a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.crewnav a.on .av { background: #fff; color: var(--ink); }
.av { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 12px; flex: none; }
.av.lg { width: 56px; height: 56px; font-size: 24px; box-shadow: 0 6px 16px rgba(6,42,92,.22); }
.av.xl { width: 88px; height: 88px; font-size: 34px; box-shadow: 0 8px 20px rgba(6,42,92,.22); }
img.av { object-fit: cover; background: var(--track); border: 2px solid var(--card); }
.crewnav a.on img.av { border-color: var(--ink); }
.pwho { display: flex; align-items: center; gap: 16px; }
.mepill img { border-radius: 50%; object-fit: cover; }
.photo-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.photo-row p { color: var(--muted); font-size: 14px; margin: 0 0 10px; max-width: 420px; }
.cropper { margin-top: 18px; display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.cropper canvas { width: min(300px, 80vw); height: auto; border-radius: 18px; display: block; background: #060b16; touch-action: none; cursor: grab; }
.cropper canvas:active { cursor: grabbing; }
.cropper input[type=range] { width: 100%; margin: 8px 0 14px; accent-color: var(--accent); }
.cropper .hint { margin: 0 0 8px; }
@media (max-width: 720px) { .cropper { grid-template-columns: 1fr; } }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 26px 0 0; min-height: 150px; }
.hero > div { min-width: 0; flex: 1 1 auto; }
.hero h1 { font-family: var(--font-display); font-size: clamp(30px, 4.6vw, 46px); line-height: 1.05; margin: 0 0 6px; font-weight: 800; letter-spacing: -.01em; }
.hero .motto { font-family: var(--font-hand); font-size: 26px; color: var(--ink-2); margin: 0; transform: rotate(-1.5deg); display: inline-block; }
.hero .mascot { width: clamp(130px, 18vw, 190px); height: auto; display: block; filter: drop-shadow(0 18px 24px rgba(6,42,92,.22)); margin-bottom: -14px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }
main.wrap { padding-bottom: 80px; }

/* ---------------- Tier selector ---------------- */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 6px; box-shadow: var(--shadow); margin: 22px 0 10px; }
.tier { min-width: 0; border: 0; background: transparent; border-radius: 13px; padding: 12px 10px; cursor: pointer; text-align: center; color: var(--ink-2); transition: background .15s, color .15s; }
.tier:hover { background: var(--page); }
.tier b { display: block; font-family: var(--font-display); font-size: 18px; line-height: 1.1; color: var(--ink); }
.tier small { display: block; font-size: 12px; margin-top: 2px; color: var(--muted); }
.tier.on { color: #fff; box-shadow: 0 8px 20px rgba(11,18,34,.25); }
.tier.on b, .tier.on small { color: #fff; } .tier.on small { opacity: .85; }
.tier[data-tier="ambitious"].on { background: linear-gradient(135deg, #ff7a12, #ff9a1f); }
.tier[data-tier="medium"].on { background: linear-gradient(135deg, var(--sky-4), var(--blue-2)); }
.tier[data-tier="bare"].on { background: linear-gradient(135deg, #087a56, #18b67e); }
.tierline { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.tierline b { color: var(--ink-2); }

/* ---------------- Cards & bits ---------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stamp { display: inline-block; font-family: var(--font-hand); font-size: 15px; color: var(--stamp-ink); border: 1.5px dashed var(--stamp-line); background: var(--sun-soft); border-radius: 6px; padding: 0 7px; transform: rotate(-3deg); margin-left: 8px; line-height: 1.4; vertical-align: middle; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.chip.done, .chip.upcoming { background: var(--done-bg); color: var(--done-ink); } .chip.done i, .chip.upcoming i { background: var(--done); }
.chip.good { background: var(--good-bg); color: var(--good-ink); } .chip.good i { background: var(--good); }
.chip.warn, .chip.fresh { background: var(--warn-bg); color: var(--warn-ink); } .chip.warn i, .chip.fresh i { background: var(--warn); }
.chip.bad  { background: var(--bad-bg);  color: var(--bad-ink); }  .chip.bad i  { background: var(--bad); }
.bar { position: relative; height: 12px; border-radius: 999px; background: var(--track); }
.bar .fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), color-mix(in oklab, var(--accent) 60%, var(--card))); transition: width .4s cubic-bezier(.2,.8,.2,1); }
.bar.done .fill { background: linear-gradient(90deg, #18b67e, #5eebc4); }
.bar .pace { position: absolute; top: -4px; width: 2px; height: 20px; background: var(--ink); border-radius: 2px; transform: translateX(-1px); opacity: .55; }
.bar .pace::after { content: "pace"; position: absolute; top: 21px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 700; color: var(--faint); letter-spacing: .04em; text-transform: uppercase; }
.bar.sm { height: 8px; } .bar.sm .pace { top: -3px; height: 14px; } .bar.sm .pace::after { display: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 9px 16px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--ink); transition: transform .12s, box-shadow .12s, background .12s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(6,42,92,.12); }
.btn:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.accent { background: var(--accent); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.danger { color: var(--bad-ink); border-color: var(--bad); background: var(--bad-bg); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 5px; }
.input, textarea.input, select.input { width: 100%; border: 1.5px solid var(--input-border); border-radius: 12px; padding: 10px 12px; background: var(--input-bg); outline: none; transition: border-color .12s, box-shadow .12s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 20%, transparent); }
textarea.input { min-height: 90px; resize: vertical; line-height: 1.45; }
.err { color: var(--bad-ink); background: var(--bad-bg); border-radius: 10px; padding: 8px 12px; font-size: 13px; margin-bottom: 12px; }
.ok { color: var(--good-ink); background: var(--good-bg); border-radius: 10px; padding: 8px 12px; font-size: 13px; margin-bottom: 12px; }

/* ---------------- Auth ---------------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; background: radial-gradient(900px 500px at 80% -10%, #fff 0%, transparent 60%), linear-gradient(180deg, #7ec8ff 0%, #c8e9fb 50%, var(--page) 100%); }
.auth .card { width: 100%; max-width: 420px; padding: 28px 28px 24px; text-align: center; }
.auth img.m { width: 120px; margin: -70px auto 6px; display: block; filter: drop-shadow(0 14px 18px rgba(6,42,92,.22)); }
.auth h1 { font-family: var(--font-display); font-size: 28px; margin: 6px 0 2px; }
.auth p { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.auth form { text-align: left; }
.auth .btn { width: 100%; margin-top: 4px; }
.auth .foot { margin-top: 16px; font-size: 12px; color: var(--faint); }

/* ---------------- Team ---------------- */
.crewline { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.crewline h2, h3.sec { font-family: var(--font-display); font-size: 22px; margin: 0; }
.crewline .sub { color: var(--muted); font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.pass { display: grid; grid-template-columns: 1fr 108px; overflow: hidden; transition: transform .15s, box-shadow .15s; cursor: pointer; }
.pass:hover { transform: translateY(-2px); box-shadow: 0 20px 48px rgba(6,42,92,.14), 0 2px 6px rgba(6,42,92,.06); }
.pass .main { padding: 18px 18px 16px; min-width: 0; }
.pass .who { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pass .who .nm { font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.1; }
.pass .who .rl { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.pass .g { margin-top: 10px; }
.pass .g .r { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.pass .g .r b { font-family: var(--font-display); font-size: 16px; color: var(--ink); }
.pass .g .r b span { color: var(--muted); font-family: var(--font-sans); font-size: 12px; font-weight: 600; }
.pass .stub { position: relative; border-left: 2px dashed var(--line); background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 8%, var(--card)), color-mix(in oklab, var(--accent) 16%, var(--card))); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px 8px; }
.pass .stub::before, .pass .stub::after { content: ""; position: absolute; left: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--page); border: 1px solid var(--line); }
.pass .stub::before { top: -11px; } .pass .stub::after { bottom: -11px; }
.pass .stub img { width: 74px; height: 74px; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(6,42,92,.18)); }
.pass .stub .chip { font-size: 11px; padding: 4px 9px; white-space: normal; text-align: center; line-height: 1.2; }
.pass .last { font-size: 12px; color: var(--faint); margin-top: 10px; }
.wktable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.wktable th, .wktable td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: center; }
.wktable th { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.wktable td:first-child, .wktable th:first-child { text-align: left; }
.wktable .nm { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.wktable .pc { display: inline-block; min-width: 54px; padding: 4px 8px; border-radius: 999px; font-weight: 700; font-family: var(--font-display); }
.pc.good { background: var(--good-bg); color: var(--good-ink); } .pc.warn { background: var(--warn-bg); color: var(--warn-ink); } .pc.bad { background: var(--bad-bg); color: var(--bad-ink); } .pc.done { background: var(--done-bg); color: var(--done-ink); } .pc.upcoming { color: var(--faint); }
.wktable .exp { display: block; font-size: 10px; color: var(--faint); font-weight: 600; margin-top: 2px; }
.tblcard { padding: 6px 10px; overflow-x: auto; }

/* ---------------- Member ---------------- */
.ticket { display: grid; grid-template-columns: 1fr 260px; overflow: hidden; margin-top: 22px; }
.ticket .main { padding: 26px 28px; }
.lbl { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.ticket .nm { font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; line-height: 1.05; margin: 2px 0 14px; }
.ticket .meta { display: flex; gap: 28px; flex-wrap: wrap; }
.ticket .meta div b { display: block; font-family: var(--font-display); font-size: 18px; margin-top: 1px; }
.ticket .stub { position: relative; border-left: 2px dashed var(--line); background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 8%, var(--card)), color-mix(in oklab, var(--accent) 18%, var(--card))); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 18px; text-align: center; }
.ticket .stub::before, .ticket .stub::after { content: ""; position: absolute; left: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--page); border: 1px solid var(--line); }
.ticket .stub::before { top: -13px; } .ticket .stub::after { bottom: -13px; }
.ticket .stub img { width: 128px; height: 128px; object-fit: contain; filter: drop-shadow(0 12px 14px rgba(6,42,92,.2)); }
.ticket .stub .mood { font-family: var(--font-display); font-size: 22px; font-weight: 800; line-height: 1.1; }
.ticket .stub .say { font-family: var(--font-hand); font-size: 18px; color: var(--muted); }
.ticket .stub .stubtxt { min-width: 0; }
.sechead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 30px 0 12px; }
.sechead .sub { color: var(--muted); font-size: 13px; }
.sechead .actions { display: flex; gap: 8px; }

/* plan */
.plan { padding: 20px 24px; }
.plan .cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan .col { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--page); min-height: 96px; }
.plan .col h4 { margin: 0 0 6px; font-family: var(--font-display); font-size: 15px; display: flex; align-items: center; gap: 6px; }
.plan .col h4 i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.plan .col[data-tier="ambitious"] h4 i { background: #ff7a12; } .plan .col[data-tier="medium"] h4 i { background: var(--blue-2); } .plan .col[data-tier="bare"] h4 i { background: #18b67e; }
.plan .txt { white-space: pre-wrap; font-size: 14px; color: var(--ink-2); }
.plan .txt.empty { color: var(--faint); font-style: italic; }
.plan .other { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 12px; }
.plan textarea.input { min-height: 110px; font-size: 14px; }
.goaled table { width: 100%; border-collapse: collapse; font-size: 13px; }
.goaled th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; text-align: left; padding: 6px; }
.goaled td { padding: 4px; }
.goaled .input { padding: 7px 9px; border-radius: 9px; }
.goaled td.n { width: 84px; } .goaled td.x { width: 36px; text-align: center; }

/* goals */
.goal { padding: 22px 24px; margin-bottom: 16px; }
.goal .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.goal .ttl { font-weight: 600; color: var(--ink-2); font-size: 14px; }
.goal .big { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 14px; }
.goal .big .n { font-family: var(--font-display); font-size: 54px; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.goal .big .of { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--muted); }
.goal .big .of b { color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 30px; }
.stat { background: var(--page); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; transition: background-color .25s; }
.stat .k { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.stat .v { font-family: var(--font-display); font-size: 24px; font-weight: 800; line-height: 1.15; }
.stat .v small { font-family: var(--font-sans); font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.stat.hot { background: var(--sun-soft); border-color: var(--sun-line); }
.strip { margin-top: 18px; }
.strip .k { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; display: flex; justify-content: space-between; }
.strip .k span { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--faint); }
.days { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; }
.day { aspect-ratio: 1; border-radius: 4px; background: var(--track); }
.day.v1 { background: color-mix(in oklab, var(--accent) 45%, var(--card)); } .day.v2 { background: color-mix(in oklab, var(--accent) 75%, var(--card)); } .day.v3 { background: var(--accent); }
.day.future { background: transparent; border: 1px dashed var(--track); }
.day.today { outline: 2px solid var(--ink); outline-offset: 1px; }
.wklabels { display: grid; grid-template-columns: 8fr 7fr 7fr 8fr; margin-top: 5px; font-size: 11px; font-weight: 700; color: var(--faint); }
.wklabels span.cur { color: var(--ink-2); }
.review { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 14px; }
.review .k { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.rw { display: grid; grid-template-columns: 92px 70px 1fr; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.rw:last-child { border-bottom: 0; }
.rw .w { font-weight: 700; } .rw .w small { display: block; font-weight: 600; color: var(--faint); font-size: 11px; }
.rw .c { font-family: var(--font-display); font-weight: 800; font-size: 16px; } .rw .c small { font-family: var(--font-sans); font-size: 11px; color: var(--muted); font-weight: 600; }
.rw .t { color: var(--ink-2); }
.rw.current { background: color-mix(in oklab, var(--accent) 6%, var(--card)); margin: 0 -10px; padding: 7px 10px; border-radius: 10px; }
.rw .t i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: middle; }
.rw .t.good i { background: var(--good); } .rw .t.warn i { background: var(--warn); } .rw .t.bad i { background: var(--bad); } .rw .t.done i { background: var(--done); } .rw .t.upcoming i { background: var(--faint); }

/* calendar */
.calcard { padding: 18px 20px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; padding-bottom: 4px; }
.cal .cd { min-height: 74px; border: 1px solid var(--line); border-radius: 12px; padding: 6px 7px; background: var(--card); cursor: pointer; transition: transform .12s, box-shadow .12s, border-color .12s; position: relative; }
.cal .cd:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(6,42,92,.12); border-color: var(--accent); }
.cal .cd.blank { border: 0; background: transparent; cursor: default; box-shadow: none; transform: none; }
.cal .cd.future { background: var(--page); color: var(--faint); cursor: default; } .cal .cd.future:hover { transform: none; box-shadow: none; border-color: var(--line); }
.cal .cd.today { border-color: var(--ink); border-width: 2px; }
.cal .cd.has { background: color-mix(in oklab, var(--accent) 7%, var(--card)); }
.cal .dn { font-weight: 700; font-size: 13px; }
.cal .today .dn::after { content: "today"; font-size: 9px; font-weight: 700; color: var(--accent); margin-left: 4px; text-transform: uppercase; letter-spacing: .04em; }
.cal .pills { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.cal .pill { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: #fff; line-height: 1.5; }
.cal .pill.alt { background: color-mix(in oklab, var(--accent) 55%, var(--card)); }
.cal .tk { position: absolute; right: 6px; bottom: 5px; font-size: 11px; color: var(--muted); }
.cal .cd.empty-past .dn { color: var(--faint); }
.cal .cd.empty-past::after { content: "—"; position: absolute; left: 7px; bottom: 5px; font-size: 11px; color: var(--cell-empty); }
.callegend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.callegend .pill { font-size: 10px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; }
.entries { margin-top: 14px; }
.entry { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.entry .d { font-weight: 700; } .entry .d small { display: block; font-weight: 600; color: var(--faint); font-size: 11px; }
.entry .vals { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.entry .vals span { background: var(--page); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 700; }
.entry .tx { color: var(--ink-2); white-space: pre-wrap; }
.entry .nt { color: var(--faint); font-size: 13px; }

/* verdict */
.verdict { padding: 20px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.verdict .big { font-family: var(--font-display); font-size: 30px; font-weight: 800; line-height: 1.1; }
.verdict .big small { display: block; font-family: var(--font-sans); font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.verdict .goalsum { margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.verdict .goalsum div { padding: 3px 0; }
.verdict .self { border-left: 1px dashed var(--line); padding-left: 20px; }
.verdict .self .q { white-space: pre-wrap; color: var(--ink-2); font-size: 14px; }

/* drawer */
.scrim { position: fixed; inset: 0; background: rgba(6, 20, 44, .35); z-index: 40; animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: var(--card); z-index: 41; box-shadow: -20px 0 60px rgba(6,42,92,.25); display: flex; flex-direction: column; animation: slide .2s cubic-bezier(.2,.8,.2,1); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer .dh { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 10%, var(--card)), var(--card)); }
.drawer .dh img { width: 44px; height: 44px; object-fit: contain; }
.drawer .dh .t { flex: 1; min-width: 0; }
.drawer .dh .t b { font-family: var(--font-display); font-size: 18px; display: block; line-height: 1.1; }
.drawer .dh .t span { font-size: 12px; color: var(--muted); font-weight: 600; }
.drawer .dh .nav { display: flex; gap: 4px; }
.drawer .dh .nav button, .drawer .x { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; width: 34px; height: 34px; cursor: pointer; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; }
.drawer .db { padding: 16px 18px; overflow-y: auto; flex: 1; }
.drawer .df { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: space-between; align-items: center; background: var(--card); }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1.5px solid var(--input-border); border-radius: 14px; padding: 8px 10px 8px 14px; margin-bottom: 10px; background: var(--card); }
.stepper .l { font-weight: 600; font-size: 14px; min-width: 0; }
.stepper .l small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.stepper .c { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--page); color: var(--ink); cursor: pointer; font-size: 18px; font-weight: 700; }
.stepper input { width: 58px; text-align: center; border: 0; font-family: var(--font-display); font-size: 22px; font-weight: 800; outline: none; background: transparent; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper.flash { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 25%, transparent); }
.voice { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.mic { border: 0; background: var(--ink); color: #fff; border-radius: 999px; padding: 9px 16px; font-weight: 700; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.mic.rec { background: #e0457b; animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(224,69,123,.5); } 50% { box-shadow: 0 0 0 10px rgba(224,69,123,0); } }
.voice .live { font-size: 13px; color: var(--muted); font-style: italic; min-height: 18px; flex: 1; }
.hint { font-size: 12px; color: var(--faint); margin-top: -6px; margin-bottom: 12px; }
.ro .vals { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.ro .vals span { background: var(--page); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-weight: 700; }
.ro .tx { white-space: pre-wrap; color: var(--ink-2); }
.ro .empty { color: var(--faint); font-style: italic; }

/* account */
.acct { padding: 22px 24px; margin-bottom: 16px; }
.acct h3 { margin: 0 0 12px; font-family: var(--font-display); font-size: 20px; }
.users { width: 100%; border-collapse: collapse; font-size: 14px; }
.users td, .users th { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.users th { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.users .link { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; background: var(--page); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin-top: 6px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--toast-bg); color: var(--toast-ink); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%); }
#tip { position: fixed; pointer-events: none; background: var(--toast-bg); color: var(--toast-ink); font-size: 12px; padding: 6px 9px; border-radius: 8px; display: none; z-index: 50; max-width: 260px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: var(--ink-2); margin-top: 22px; }
footer { margin-top: 40px; color: var(--faint); font-size: 12px; text-align: center; }
.empty { padding: 18px; color: var(--muted); font-size: 14px; text-align: center; }
.empty img { width: 90px; display: block; margin: 0 auto 6px; }

@media (max-width: 720px) {
  .wrap { padding: 0 14px; }
  .hero { min-height: 0; } .hero .mascot { width: 110px; margin-bottom: -10px; }
  .tier small { display: none; } .tier b { font-size: 15px; }
  .ticket { grid-template-columns: 1fr; }
  .ticket .stub { border-left: 0; border-top: 2px dashed var(--line); flex-direction: row; justify-content: flex-start; gap: 16px; text-align: left; padding: 14px 18px; }
  .ticket .stub::before, .ticket .stub::after { top: -13px; bottom: auto; left: auto; }
  .ticket .stub::before { left: -13px; } .ticket .stub::after { right: -13px; }
  .ticket .stub img { width: 96px; height: 96px; }
  .ticket .meta { gap: 18px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .goal .big .n { font-size: 44px; }
  .pass { grid-template-columns: 1fr 96px; }
  .plan .cols { grid-template-columns: 1fr; }
  .verdict { grid-template-columns: 1fr; } .verdict .self { border-left: 0; padding-left: 0; border-top: 1px dashed var(--line); padding-top: 16px; }
  .cal { gap: 4px; } .cal .cd { min-height: 58px; padding: 4px 5px; border-radius: 9px; } .cal .dn { font-size: 12px; } .cal .today .dn::after { display: none; } .cal .pill { font-size: 10px; padding: 0 5px; }
  .rw { grid-template-columns: 70px 56px 1fr; gap: 6px; font-size: 12px; }
  .entry { grid-template-columns: 70px 1fr; }
  .drawer { top: auto; height: 92vh; width: 100%; border-radius: 22px 22px 0 0; animation: up .22s cubic-bezier(.2,.8,.2,1); }
  @keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .crewnav a { font-size: 12px; padding: 5px 10px 5px 5px; }
  .days { gap: 2px; } .day { border-radius: 2px; }
}
