/* ============ Cosmoplans ============ */
:root {
  --accent: #8b5cf6; --accent2: #ec4899;
  --bg: #f6f4fb; --bg2: #eeeaf7; --card: #ffffff; --card2: #f7f5fc;
  --text: #1d1730; --muted: #6f6886; --line: #e5e0f0; --line2: #d8d1ea;
  --shadow: 0 1px 2px rgba(30, 20, 60, .05), 0 8px 24px rgba(30, 20, 60, .06);
  --danger: #e11d48; --ok: #16a34a; --gold: #f59e0b;
  --r: 18px; --r-sm: 12px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0d1a; --bg2: #161327; --card: #1a1730; --card2: #221e3b;
    --text: #f1eefc; --muted: #9d96b8; --line: #2a2546; --line2: #383058;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0d1a; --bg2: #161327; --card: #1a1730; --card2: #221e3b;
  --text: #f1eefc; --muted: #9d96b8; --line: #2a2546; --line2: #383058;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
body.noscroll { overflow: hidden; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 24px; } h2 { font-size: 17px; } h3 { font-size: 18px; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
.boot { display: grid; place-items: center; height: 100dvh; font-size: 56px; animation: spin 2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* helpers */
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap { gap: 8px; } .wrap { flex-wrap: wrap; }
.center { text-align: center; justify-content: center; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 12px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.link { color: var(--accent); font-weight: 600; }
.strike { text-decoration: line-through; opacity: .6; }
.kbd { display: inline-block; padding: 0 6px; border: 1px solid var(--line2); border-radius: 6px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 999px; font-weight: 600;
  background: var(--card2); border: 1px solid var(--line); transition: transform .12s, background .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .5; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border: 0; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: transparent; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.big { padding: 14px 20px; font-size: 16px; }
.btn.block { width: 100%; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 22px; background: var(--card2); border: 1px solid var(--line); }
.icon-btn.sm { width: 26px; height: 26px; font-size: 16px; background: none; border: 0; }

/* inputs */
.input {
  width: 100%; padding: 11px 13px; border-radius: var(--r-sm);
  background: var(--card2); border: 1px solid var(--line); outline: none; transition: border .15s, box-shadow .15s;
  min-height: 44px; font-size: 16px;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.input.slim { width: auto; min-height: 36px; padding: 6px 10px; font-size: 15px; }
.input.num { width: 72px; }
.center-text { text-align: center; }
textarea.input { resize: vertical; }
.f { display: block; }
.f > span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.field-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 14px 0 6px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.grid2 .input { min-width: 0; }
input[type="date"].input, input[type="time"].input { -webkit-appearance: none; appearance: none; }

/* switch */
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line2); border-radius: 99px; transition: .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: .2s; }
.switch input:checked + span { background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.switch input:checked + span::after { transform: translateX(20px); }

/* chips & segmented */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin: 0 -2px; }
.chips.scroll::-webkit-scrollbar { display: none; }
/* computers (mouse): wrap instead of sideways scrolling, so every chip is reachable */
@media (hover: hover) and (pointer: fine) {
  .chips.scroll { flex-wrap: wrap; overflow: visible; }
}
.chip {
  --c: var(--accent);
  padding: 7px 12px; border-radius: 999px; background: var(--card2); border: 1.5px solid var(--line);
  font-size: 14px; font-weight: 600; white-space: nowrap; flex: none; transition: .15s; line-height: 1.2;
}
.chip small { font-weight: 500; color: var(--muted); }
.chip.sm { padding: 5px 10px; font-size: 13px; }
.chip.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, var(--card)); color: var(--text); }
.chip button { margin-left: 4px; opacity: .6; }
.seg { display: inline-flex; background: var(--card2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.seg.sm button { padding: 4px 10px; font-size: 13px; }

/* bars */
.bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar.big { height: 12px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .6s cubic-bezier(.2,.8,.2,1); }

/* ============ app shell ============ */
.app { min-height: 100dvh; }
.side { display: none; }
.main { padding: calc(var(--safe-t) + 0px) 16px calc(96px + var(--safe-b)); max-width: 1200px; margin: 0 auto; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-t) + 10px) 16px 10px; margin: calc(-1 * var(--safe-t)) -16px 8px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.topbar-title { font-weight: 800; font-size: 20px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 24px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); flex: none; }
.avatar.sm { width: 34px; height: 34px; font-size: 15px; }
.streak-mini { font-weight: 700; font-size: 14px; padding: 5px 10px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line); filter: grayscale(1); opacity: .7; }
.streak-mini.lit { filter: none; opacity: 1; }
.mode-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; background: var(--card2); border: 1px solid var(--line); transition: transform .2s; }
.mode-btn:active { transform: rotate(40deg) scale(.9); }
.offline-pill { font-size: 12px; padding: 3px 8px; border-radius: 99px; background: var(--gold); color: #000; font-weight: 700; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  padding: 6px 8px calc(6px + var(--safe-b));
  background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.tabbar a span { font-size: 22px; filter: grayscale(.8); opacity: .75; transition: .2s; }
.tabbar a.on { color: var(--text); }
.tabbar a.on span { filter: none; opacity: 1; transform: translateY(-2px) scale(1.1); }
.fab { justify-self: center; width: 58px; height: 58px; margin-top: -26px; border-radius: 50%; font-size: 30px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 45%, transparent); transition: transform .15s; }
.fab:active { transform: scale(.9) rotate(90deg); }

@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: 264px 1fr; }
  .side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100dvh; overflow-y: auto; padding: 18px 16px; border-right: 1px solid var(--line); background: var(--bg2); }
  .tabbar { display: none; }
  .main { padding: 0 28px 40px; width: 100%; max-width: none; min-width: 0; }
  .topbar { margin: 0 -28px 12px; padding: 14px 28px; }
}
.brand { font-weight: 800; font-size: 22px; display: flex; align-items: center; gap: 8px; }
.brand span { font-size: 28px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; vertical-align: middle; flex: none; box-shadow: 0 3px 10px rgba(6, 182, 212, .3); }
.topbar-title .brand-mark { width: 26px; height: 26px; border-radius: 8px; margin-right: 6px; position: relative; top: -2px; }
.boot img { animation: float 2s ease-in-out infinite; }
.new-btn { justify-content: flex-start; padding: 12px 18px; font-size: 16px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 12px; font-weight: 600; color: var(--muted); }
.side-nav a.on { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.side-sec { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 4px 0 6px; }
.side-sub { display: flex; align-items: center; gap: 8px; padding: 4px 4px; font-size: 14px; cursor: pointer; }
.side-sub input { width: 16px; height: 16px; }
.mini { font-size: 12px; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-top: 6px; text-align: center; }
.mini-dow { color: var(--muted); font-weight: 700; padding: 2px 0; }
.mini-grid button { aspect-ratio: 1; border-radius: 50%; font-size: 12px; position: relative; }
.mini-grid button.other { color: var(--muted); opacity: .5; }
.mini-grid button:hover { background: var(--card2); }
.mini-grid button.busy::after { content: ""; position: absolute; bottom: 2px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.mini-grid button.sel { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--accent); }
.mini-grid button.today { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-weight: 700; }

/* ============ cards & lists ============ */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.view > * + *, .view .home > * + *, .tasks > * + *, .me > * + *, .focus > * + * { margin-top: 14px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 8px; }
.list { display: flex; flex-direction: column; gap: 6px; }
.item {
  --c: var(--accent); --cbg: transparent;
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px;
  background: var(--cbg); border-left: 4px solid var(--c); cursor: pointer; transition: transform .12s, opacity .3s;
}
.item:active { transform: scale(.985); }
.item.done { opacity: .55; }
.item.done .item-title { text-decoration: line-through; }
.item.overdue { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 40%, transparent); }
.item-main { flex: 1; min-width: 0; }
.item-title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.late { color: var(--danger); }
.rep { font-size: 11px; opacity: .6; }
.dot-emoji { width: 28px; text-align: center; font-size: 20px; flex: none; }
.cbox {
  width: 28px; height: 28px; flex: none; border-radius: 9px; border: 2.5px solid var(--c, var(--accent));
  display: grid; place-items: center; transition: .2s; background: var(--card);
}
.cbox.on { background: var(--c, var(--accent)); transform: scale(1.05); }
.cbox.on::after { content: "✓"; color: #fff; font-weight: 900; font-size: 16px; }
.cbox:not(.on):hover { background: color-mix(in srgb, var(--c, var(--accent)) 15%, var(--card)); }
.x { opacity: .5; padding: 4px 8px; }
.empty { text-align: center; padding: 18px 8px; }
.empty-emoji { font-size: 40px; }
.empty-title { font-weight: 700; margin-top: 4px; }

/* ============ home ============ */
.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--card)), color-mix(in srgb, var(--accent2) 16%, var(--card))); }
.hero-orb { position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent2) 60%, transparent), transparent 65%); opacity: .5; pointer-events: none; animation: float 8s ease-in-out infinite; }
@keyframes float { 50% { transform: translate(-14px, 12px) scale(1.05); } }
.hero-top { display: flex; justify-content: space-between; gap: 12px; position: relative; }
.hero h1 { font-size: 24px; margin: 2px 0 4px; }
.hero-sub { font-weight: 600; color: var(--muted); }
.streak { display: flex; flex-direction: column; align-items: center; padding: 8px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); min-width: 64px; filter: grayscale(1); opacity: .75; }
.streak.lit { filter: none; opacity: 1; }
.streak .flame { font-size: 24px; }
.streak.lit .flame { animation: flicker 1.6s ease-in-out infinite; }
@keyframes flicker { 50% { transform: scale(1.12) rotate(-4deg); } }
.streak b { font-size: 20px; line-height: 1; }
.streak small { font-size: 11px; color: var(--muted); }
.hero-stats { display: flex; gap: 14px; align-items: center; margin-top: 14px; position: relative; }
.lvl { flex: 1; }
.lvl .bar { margin-top: 6px; background: color-mix(in srgb, var(--card) 70%, transparent); }
.goal-ring { position: relative; width: 62px; height: 62px; flex: none; }
.goal-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.goal-ring circle { fill: none; stroke-width: 4; stroke-linecap: round; }
.goal-ring .trk { stroke: color-mix(in srgb, var(--card) 70%, transparent); }
.goal-ring .val { stroke: var(--accent); transition: stroke-dasharray .6s; }
.goal-ring span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.goal-ring b { font-size: 16px; } .goal-ring small { font-size: 10px; color: var(--muted); }

.quick { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 999px; }
.quick input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16px; padding: 8px 0; }
.quick-ico { font-size: 18px; }
.quick-preview:empty { display: none; }
.quick-preview { margin-top: 8px !important; }
.qp { font-size: 13.5px; padding: 8px 14px; border-radius: 12px; background: var(--card2); border: 1px dashed var(--line2); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.nudges { display: grid; gap: 10px; }
.nudge { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 12px 14px; border-left: 4px solid var(--accent2); }
.nudge > div { font-weight: 600; font-size: 14px; }
.home-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .home-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1250px) { .home-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (min-width: 2000px) { .home-grid { grid-template-columns: repeat(4, 1fr); } }
.upnext { --c: var(--accent); display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; cursor: pointer; border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.upnext-emoji { font-size: 34px; }
.upnext-title { font-weight: 800; font-size: 17px; }
.upnext-cd { font-weight: 800; color: var(--c); text-align: right; font-size: 14px; white-space: nowrap; }
.countdowns { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.cd { --c: var(--accent); flex: none; width: 112px; padding: 12px 10px; border-radius: 16px; text-align: center; cursor: pointer; background: color-mix(in srgb, var(--c) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.cd-num { font-size: 34px; font-weight: 900; line-height: 1; color: var(--c); }
.cd-unit { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.cd-title { font-size: 12.5px; font-weight: 600; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chart { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 140px; align-items: end; padding-top: 10px; }
.chart .col { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.chart .stack { width: 100%; max-width: 30px; height: calc(100% - 18px); display: flex; flex-direction: column-reverse; border-radius: 8px; overflow: hidden; background: var(--card2); }
.chart .stack i { display: block; width: 100%; }
.chart .col span { font-size: 11px; color: var(--muted); font-weight: 700; }
.chart .col.today span { color: var(--accent); }
.goal-line { position: absolute; left: 0; right: 0; border-top: 1.5px dashed color-mix(in srgb, var(--accent) 60%, transparent); margin-bottom: 18px; pointer-events: none; z-index: 1; }
.goal-line span { position: absolute; right: 0; top: -16px; font-size: 10px; color: var(--accent); font-weight: 700; }
.quote { margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--card2); font-style: italic; font-size: 14px; }
.quote cite { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; font-style: normal; }

/* ============ sheets ============ */
.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(10, 6, 25, .45); opacity: 0; transition: opacity .25s; backdrop-filter: blur(2px); }
.sheet {
  position: relative; width: 100%; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); border-radius: 24px 24px 0 0; padding-bottom: calc(16px + var(--safe-b));
  transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.9,.3,1); box-shadow: 0 -10px 40px rgba(0,0,0,.2);
}
.sheet { scrollbar-width: none; -ms-overflow-style: none; }
.sheet::-webkit-scrollbar { display: none; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-grab { width: 40px; height: 5px; border-radius: 9px; background: var(--line2); margin: 8px auto 2px; }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 6px 12px 8px; background: var(--card); border-bottom: 1px solid var(--line); }
.sheet-body { padding: 12px 18px 8px; }
.sheet-body h3 { margin-bottom: 8px; }
.sheet-body.center { text-align: center; }
.choice-list { display: grid; gap: 8px; margin-top: 14px; }
@media (min-width: 700px) {
  .sheet-wrap { align-items: center; }
  .sheet { max-width: 520px; max-height: 94dvh; border-radius: 24px; transform: translateY(30px) scale(.97); opacity: 0; transition: transform .22s, opacity .22s; }
  .sheet.wide { max-width: 620px; }
  .sheet.small { max-width: 420px; }
  .sheet-wrap.open .sheet { opacity: 1; }
  .sheet-grab { display: none; }
}
.title-row { display: flex; gap: 10px; align-items: center; }
.emoji-btn.pop { animation: pop .35s; }
.emoji-btn { width: 52px; height: 52px; flex: none; border-radius: 16px; font-size: 28px; background: var(--card2); border: 1px solid var(--line); }
.title-input { flex: 1; min-width: 0; font-size: 21px; font-weight: 700; border: 0; outline: none; background: none; padding: 8px 0; border-bottom: 2px solid var(--line); }
.title-input:focus { border-color: var(--accent); }
.sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sugg:empty { display: none; }
.sugg-chip { padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--card)), color-mix(in srgb, var(--accent2) 14%, var(--card))); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); animation: pop .3s; }
.sugg-info { font-size: 13px; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--gold) 14%, var(--card)); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.card-sec { margin-top: 14px; padding: 14px; border-radius: 16px; background: var(--card2); border: 1px solid var(--line); }
.card-sec .input { background: var(--card); }
.lbl { font-weight: 700; }
.editor .ed-alldayonly { display: none; }
.editor.is-allday .ed-timed, .is-allday .ed-timed { display: none !important; }
.is-allday .ed-alldayonly { display: block; }
.dow-pick { display: flex; gap: 6px; }
.dow-pick button { width: 38px; height: 38px; border-radius: 50%; font-weight: 700; background: var(--card); border: 1.5px solid var(--line); }
.dow-pick button.on { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border-color: transparent; }
.ends { display: flex; flex-direction: column; gap: 6px; }
.check-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.check-item .cbox { width: 22px; height: 22px; border-radius: 7px; }
.check-item .cbox.on::after { font-size: 13px; }
.check-item span { flex: 1; }
.check-item.done span { text-decoration: line-through; color: var(--muted); }
.colors { display: flex; flex-wrap: wrap; gap: 8px; }
.color { --c: var(--accent); width: 32px; height: 32px; border-radius: 50%; background: var(--c); border: 3px solid transparent; box-shadow: 0 0 0 1px var(--line); }
.color.on { border-color: var(--card); box-shadow: 0 0 0 2.5px var(--c); }
.color.auto { color: #fff; font-weight: 800; font-size: 12px; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; }
.emoji-picker #emo-search { margin: 8px 0 4px; }
.emoji-picker .emo-tabs { margin: 12px 0 8px; }
.emoji-picker #emo-grid { min-height: 180px; max-height: 42dvh; overflow-y: auto; scrollbar-width: none; align-content: start; }
.emoji-picker #emo-grid::-webkit-scrollbar { display: none; }
.emoji-picker .field-label { margin: 10px 0 4px; }
.emo-sugg { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.emo-sugg:empty { display: none; }
.emo-sugg span { margin-right: 4px; }
.emo-sugg button { width: 38px; height: 38px; border-radius: 12px; font-size: 21px; display: grid; place-items: center; background: var(--card2); border: 1.5px solid transparent; transition: transform .12s; animation: pop .25s; }
.emo-sugg button:active { transform: scale(.88); }
.emo-sugg button.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, var(--card)); }
.emo-sugg .more { font-size: 18px; color: var(--muted); }
.emoji-grid button { font-size: 26px; padding: 6px; border-radius: 12px; }
.emoji-grid button:hover, .emoji-grid button.sel { background: var(--card2); }
.detail-hero { display: flex; gap: 14px; padding: 18px; align-items: flex-start; }
.big-emoji { font-size: 46px; line-height: 1; }
.detail-hero h2 { font-size: 22px; margin: 6px 0 4px; }
.pill { --c: var(--accent); display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: color-mix(in srgb, var(--c) 22%, var(--card)); }
.info-row { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.info-row.notes a { color: var(--accent); word-break: break-all; }
.sheet-body > .btn.big:first-child { margin-bottom: 6px; }

/* ============ calendar ============ */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-title { font-size: 20px; margin-left: 4px; }
.tg { --n: 7; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.tg-days, .tg-allday { display: grid; grid-template-columns: 52px repeat(var(--n), 1fr); border-bottom: 1px solid var(--line); }
.tg-gutter { display: grid; place-items: center; font-size: 10px; text-align: center; padding: 2px; }
.tg-dayhead { padding: 8px 0; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--muted); font-weight: 600; }
.tg-dayhead b { font-size: 18px; color: var(--text); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.tg-dayhead.today b { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }
.tg-adcell { padding: 3px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pill-ev { --c: var(--accent); font-size: 12px; font-weight: 600; padding: 3px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 25%, var(--card)); border-left: 3px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.pill-ev.done { opacity: .5; text-decoration: line-through; }
.tg-scroll { overflow-y: auto; scrollbar-width: none; height: calc(100dvh - 260px - var(--safe-b)); min-height: 360px; }
@media (min-width: 900px) { .tg-scroll { height: calc(100dvh - 190px); } }
.tg-scroll::-webkit-scrollbar { display: none; }
.tg-body { position: relative; display: grid; grid-template-columns: 52px repeat(var(--n), 1fr); }
.tg-hours { position: relative; }
.tg-hour { position: absolute; right: 6px; transform: translateY(-50%); font-size: 10.5px; color: var(--muted); font-weight: 600; }
.tg-col { position: relative; border-left: 1px solid var(--line); cursor: copy; }
.tg-col.today { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.tg-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); opacity: .6; }
.ev {
  --c: var(--accent); --cbg: transparent;
  position: absolute; z-index: 2; padding: 3px 6px; border-radius: 8px; overflow: hidden; cursor: pointer;
  background: var(--cbg); border-left: 3px solid var(--c); font-size: 12px; line-height: 1.25;
  backdrop-filter: blur(2px); transition: transform .12s;
}
.ev:hover { transform: scale(1.02); z-index: 3; }
.ev.done { opacity: .5; }
.ev.done .ev-title { text-decoration: line-through; }
.ev-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ev-time { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.short .ev-title { -webkit-line-clamp: 1; }
.ev.short .ev-time { display: none; }
.now-line { position: absolute; left: -4px; right: 0; height: 2px; background: var(--danger); z-index: 4; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -2px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.month { display: flex; flex-direction: column; gap: 14px; }
.mhead { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.mgrid { display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(var(--rows), minmax(56px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.mcell { background: var(--card); padding: 4px; cursor: pointer; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; transition: background .15s; }
.mcell.other { background: var(--card2); }
.mcell.other .mnum { opacity: .45; }
.mcell.sel { background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
.mnum { font-size: 13px; font-weight: 700; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.mcell.today .mnum { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }
.mpills { display: none; width: 100%; flex-direction: column; gap: 2px; }
.mpill { --c: var(--accent); font-size: 11.5px; font-weight: 600; padding: 2px 5px; border-radius: 5px; background: color-mix(in srgb, var(--c) 20%, var(--card)); border-left: 3px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mpill i { font-style: normal; color: var(--muted); font-weight: 500; }
.mpill.done { opacity: .5; text-decoration: line-through; }
.more { font-size: 11px; color: var(--muted); padding-left: 4px; }
.mdots { display: flex; gap: 3px; }
.mdots i { width: 6px; height: 6px; border-radius: 50%; }
@media (min-width: 760px) {
  .mgrid { grid-template-rows: repeat(var(--rows), minmax(104px, 1fr)); }
  .mcell { align-items: stretch; }
  .mnum { align-self: flex-start; }
  .mpills { display: flex; }
  .mdots { display: none; }
}
.agenda { display: flex; flex-direction: column; gap: 14px; }
.ag-day { display: flex; gap: 12px; }
.ag-date { width: 46px; flex: none; text-align: center; padding-top: 18px; }
.ag-date b { display: block; font-size: 22px; line-height: 1; }
.ag-date span { font-size: 12px; color: var(--muted); font-weight: 700; }
.ag-day.today .ag-date b { color: var(--accent); }
.ag-label { font-weight: 700; margin-bottom: 2px; }

/* ---- US holidays ---- */
:root { --hol: #ef4444; --obs: #a855f7; }
.mcell.hol { background: color-mix(in srgb, var(--hol) 13%, var(--card)); }
.mcell.hol .mnum { color: var(--hol); }
.mcell.today.hol .mnum { color: #fff; }
.mcell.obs-day { background: color-mix(in srgb, var(--obs) 6%, var(--card)); }
.mhol { font-size: 11px; font-weight: 800; padding: 2px 5px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.mhol.fed { color: #fff; background: var(--hol); }
.mhol.obs { color: var(--obs); background: color-mix(in srgb, var(--obs) 14%, var(--card)); }
.mdots .hd { width: auto; height: auto; background: none !important; font-size: 10px; font-style: normal; line-height: 1; }
.tg-dayhead.hol span, .tg-dayhead.hol b { color: var(--hol); }
.tg-dayhead.today.hol b { color: #fff; }
.tg-col.hol { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--hol) 7%, transparent) 0 10px, transparent 10px 20px); }
.pill-hol { font-size: 12px; font-weight: 800; padding: 3px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.pill-hol.fed { color: #fff; background: var(--hol); }
.pill-hol.obs { color: var(--obs); background: color-mix(in srgb, var(--obs) 14%, var(--card)); }
.hol-banner { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; cursor: pointer; }
.hol-banner.fed { background: linear-gradient(135deg, color-mix(in srgb, var(--hol) 26%, var(--card)), color-mix(in srgb, var(--hol) 8%, var(--card))); border: 1px solid color-mix(in srgb, var(--hol) 40%, transparent); }
.hol-banner.obs { background: color-mix(in srgb, var(--obs) 10%, var(--card)); border: 1px dashed color-mix(in srgb, var(--obs) 40%, transparent); }
.hol-banner b { display: block; }
.hol-banner small { color: var(--muted); font-size: 12px; }
.hb-emoji { font-size: 26px; }
.mini-grid button.hol { color: var(--hol); font-weight: 800; }
.mini-grid button.today.hol { color: #fff; }
.next-off { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 10px; border-radius: 12px; cursor: pointer; background: color-mix(in srgb, var(--hol) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--hol) 25%, transparent); }
.next-off span { font-size: 22px; }
.next-off b { display: block; font-size: 14px; }
.next-off small { color: var(--muted); font-size: 12px; }
.hero-hol { display: inline-block; margin: 2px 0 4px; padding: 4px 10px; border-radius: 99px; font-weight: 800; font-size: 13.5px; color: #fff; background: var(--hol); cursor: pointer; }
.hol-hero { display: flex; gap: 14px; align-items: flex-start; margin-top: 6px; }
.hol-big { font-size: 54px; line-height: 1; }
.hol-hero h2 { font-size: 22px; margin: 6px 0 2px; }
.hol-note { line-height: 1.5; margin: 12px 0 14px; }

/* ---- mouse editing ---- */
@media (hover: hover) and (pointer: fine) {
  .tg-col { cursor: crosshair; }
  .ev { cursor: grab; }
  .mpill { cursor: grab; }
}
body.cal-dragging, body.cal-dragging * { cursor: grabbing !important; user-select: none; }
.sel-box { position: absolute; left: 2px; right: 2px; z-index: 5; border-radius: 8px; background: color-mix(in srgb, var(--accent) 28%, transparent); border: 2px solid var(--accent); font-size: 11.5px; font-weight: 800; padding: 3px 6px; color: var(--text); pointer-events: none; }
.ev.ghost { z-index: 6; opacity: .92; box-shadow: 0 10px 28px rgba(0,0,0,.35); outline: 2px solid var(--c); pointer-events: none; }
.ev.drag-src, .mpill.drag-src { opacity: .35; }
.ev-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.ev-resize::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 18px; height: 3px; margin-left: -9px; border-radius: 3px; background: var(--c); opacity: 0; transition: opacity .15s; }
.ev:hover .ev-resize::after { opacity: .8; }
@media (pointer: coarse) { .ev-resize { display: none; } }
.mcell.in-range { background: color-mix(in srgb, var(--accent) 20%, var(--card)); }
.mcell.drop-target { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--card)); }

/* ---- right-click menu ---- */
.ctx-menu { position: fixed; z-index: 400; min-width: 230px; max-width: 290px; padding: 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line2); box-shadow: 0 18px 50px rgba(0,0,0,.35); opacity: 0; transform: scale(.96); transform-origin: top left; transition: opacity .12s, transform .12s; }
.ctx-menu.show { opacity: 1; transform: none; }
.ctx-head { padding: 6px 10px 8px; font-size: 12.5px; font-weight: 800; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ctx-menu button[role=menuitem] { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 9px; font-size: 14px; font-weight: 600; text-align: left; }
.ctx-menu button[role=menuitem]:hover { background: color-mix(in srgb, var(--accent) 14%, var(--card)); }
.ctx-menu button.danger { color: var(--danger); }
.ctx-menu kbd { margin-left: auto; font-size: 11px; color: var(--muted); }
.ctx-ico { width: 20px; text-align: center; }
.ctx-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.ctx-colors { display: flex; flex-wrap: wrap; gap: 5px; padding: 6px 8px; }
.ctx-colors button { width: 20px; height: 20px; border-radius: 50%; background: var(--c); border: 2px solid transparent; }
.ctx-colors button.on, .ctx-colors button:hover { border-color: var(--text); }

/* ============ tasks ============ */
.week-progress h2 { font-size: 20px; }
.big-pct { font-size: 34px; font-weight: 900; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.week-progress .bar { margin-top: 10px; }

/* ============ focus ============ */
.focus-card { text-align: center; padding: 22px 18px; position: relative; overflow: hidden; }
.focus-card.running.focus { background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--accent) 22%, var(--card)), var(--card) 70%); }
.focus-card.running.break { background: radial-gradient(circle at 50% 30%, color-mix(in srgb, #22c55e 22%, var(--card)), var(--card) 70%); }
.focus-stage { position: relative; width: min(280px, 78vw); aspect-ratio: 1; margin: 0 auto 10px; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; stroke-linecap: round; }
.ring .trk { stroke: var(--line); }
.ring .val { stroke: url(#rg); transition: stroke-dashoffset 1s linear; }
.orbit-wrap { position: absolute; inset: 0; pointer-events: none; }
.orbiter { position: absolute; left: 50%; top: -2px; margin-left: -16px; font-size: 26px; transform-origin: 16px calc(min(140px, 39vw) + 2px); }
.running.focus .orbiter, .running.break .orbiter { animation: orbit 20s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }
.focus-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.focus-phase { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.focus-time { font-size: clamp(48px, 15vw, 64px); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.focus-sub { font-size: 14px; color: var(--muted); max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .focus-grid { grid-template-columns: 1fr 1fr; } }
.custom-time { align-items: center; }
.custom-time .input.num { width: 90px; font-size: 22px; font-weight: 800; }
.big-stat { font-size: 36px; font-weight: 900; margin-bottom: 8px; }
.small-item { border-left-width: 0; background: var(--card2); }

/* ============ time's up overlay ============ */
.timesup { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity .3s; }
.timesup.show { opacity: 1; }
.tu-bg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--accent2) 55%, transparent), transparent 60%), linear-gradient(160deg, color-mix(in srgb, var(--accent) 92%, #000), color-mix(in srgb, var(--accent2) 80%, #000)); backdrop-filter: blur(6px); }
.timesup.break .tu-bg { background: radial-gradient(circle at 50% 35%, rgba(52, 211, 153, .55), transparent 60%), linear-gradient(160deg, #0f766e, #0e7490); }
.tu-rings { position: absolute; left: 50%; top: 38%; width: 0; height: 0; pointer-events: none; }
.tu-rings i { position: absolute; left: -90px; top: -90px; width: 180px; height: 180px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .55); animation: tu-pulse 2.4s ease-out infinite; }
.tu-rings i:nth-child(2) { animation-delay: .8s; }
.tu-rings i:nth-child(3) { animation-delay: 1.6s; }
@keyframes tu-pulse { from { transform: scale(.5); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
.tu-card { position: relative; width: 100%; max-width: 380px; text-align: center; color: #fff; transform: translateY(24px) scale(.94); transition: transform .45s cubic-bezier(.2, 1.4, .4, 1); }
.timesup.show .tu-card { transform: none; }
.tu-emoji { font-size: 92px; line-height: 1; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .3)); animation: tu-bounce 1.2s cubic-bezier(.3, 1.6, .5, 1) both, tu-float 3s ease-in-out 1.2s infinite; }
@keyframes tu-bounce { 0% { transform: scale(0) rotate(-30deg); } 60% { transform: scale(1.15) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes tu-float { 50% { transform: translateY(-10px) rotate(-4deg); } }
.tu-card h2 { font-size: 34px; font-weight: 900; margin: 18px 0 6px; text-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.tu-card p { margin: 0; font-size: 17px; font-weight: 600; opacity: .92; }
.tu-card .tu-task { font-style: italic; font-weight: 500; margin-top: 6px; opacity: .8; }
.tu-actions { display: grid; gap: 10px; margin-top: 28px; }
.tu-actions .btn { color: #fff; background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); backdrop-filter: blur(6px); }
.tu-actions .btn.primary { background: #fff; color: #1d1730; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.tu-actions .btn.ghost { background: transparent; border-color: transparent; opacity: .85; }

/* ============ me ============ */
.profile { display: flex; gap: 16px; align-items: center; }
.profile .bar { margin: 8px 0 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 760px) { .stat-grid { grid-template-columns: repeat(6, 1fr); } }
.stat { padding: 12px; text-align: center; }
.stat b { display: block; font-size: 18px; }
.stat span { font-size: 12px; color: var(--muted); }
.hbar { display: grid; grid-template-columns: 130px 1fr 52px; gap: 10px; align-items: center; font-size: 13.5px; margin: 8px 0; }
.hbar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar b { text-align: right; font-size: 13px; }
.notif-status { padding: 10px 14px; border-radius: 12px; background: var(--card2); font-weight: 600; font-size: 14px; }
.notif-status.on { background: color-mix(in srgb, var(--ok) 14%, var(--card)); }
.ios-help { padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, var(--card)); font-size: 14px; }
.ios-help ol { margin: 6px 0 0; padding-left: 20px; }
.settings { display: flex; flex-direction: column; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.set-row:last-child { border-bottom: 0; }
.set-row > span:first-child:has(b) { flex: 1; min-width: 0; }
.set-row > .switch { margin-left: auto; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.theme-sw { padding: 12px 8px; border-radius: 16px; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 3px solid transparent; }
.theme-sw span { font-size: 24px; }
.theme-sw b { font-size: 13px; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
.theme-sw.on { border-color: var(--text); }
.sub-item { border-left-width: 4px; background: var(--card2); }
.sub-item.archived { opacity: .5; }

/* ============ admin ============ */
.admin > * + * { margin-top: 14px; }
.admin-user { cursor: default; background: var(--card2); flex-wrap: wrap; }
.admin-user.locked { opacity: .6; }
.admin-user .item-title, .admin-user .item-sub { white-space: normal; }
.admin-actions { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) { .admin-actions { width: 100%; justify-content: flex-start; padding-left: 46px; } }
/* ---- messages (student ↔ admin) ---- */
.messages-page > * + * { margin-top: 14px; }
.compose textarea { resize: vertical; }
.thread { width: 100%; text-align: left; background: var(--card2); border-left-color: var(--accent); }
.thread.unread { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent2) 55%, transparent); }
.tag.new { background: var(--accent2); color: #fff; }
.tag.ok { background: color-mix(in srgb, var(--ok) 28%, var(--card)); }
.convo { display: flex; flex-direction: column; gap: 8px; max-height: 46dvh; overflow-y: auto; margin-top: 12px; padding: 4px 2px; }
.bubble { max-width: 86%; padding: 9px 12px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; }
.bubble.from-user { align-self: flex-end; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 85%, #000), color-mix(in srgb, var(--accent2) 70%, #000)); color: #fff; border-bottom-right-radius: 5px; }
.bubble.from-admin { align-self: flex-start; background: var(--card2); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.bubble.big { max-width: 100%; align-self: stretch; margin-top: 12px; font-size: 15.5px; text-align: left; }
.b-meta { font-size: 11px; font-weight: 700; opacity: .75; margin-bottom: 3px; }
.b-meta .ip { font-family: ui-monospace, Menlo, monospace; font-weight: 500; }
.reply-popup { text-align: center; }
.rp-icon { font-size: 46px; animation: pop .4s; }
#tb-avatar.has-badge, .side-nav a.has-badge { position: relative; }
#tb-avatar.has-badge::after, .side-nav a.has-badge::after { content: ""; position: absolute; top: -1px; right: -1px; width: 11px; height: 11px; border-radius: 50%; background: #ef4444; border: 2px solid var(--bg); }
.side-nav a.has-badge::after { top: 10px; right: 12px; }
.side-nav a.has-count::after { content: attr(data-count); position: absolute; right: 12px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.side-nav a { position: relative; }
.fb-board { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.fb-list { display: grid; gap: 8px; }
.fb-thread { border-radius: 14px; background: var(--card2); border: 1px solid var(--line); padding: 4px 12px 12px; }
.fb-thread.unread { border-color: var(--accent2); box-shadow: 0 0 0 1px var(--accent2); }
.fb-thread summary { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 8px 0 0; list-style: none; }
.fb-thread summary::-webkit-details-marker { display: none; }
.fb-cat { font-size: 22px; }
.fb-meta { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.fb-thread .convo { max-height: 340px; }
.pending-card { border-color: color-mix(in srgb, var(--gold) 55%, transparent); background: color-mix(in srgb, var(--gold) 7%, var(--card)); }
.sec-stats { grid-template-columns: repeat(3, 1fr); margin-bottom: 4px; }
.sec-stats .stat { background: var(--card2); border-radius: 14px; border: 1px solid var(--line); }
.sec-log { gap: 2px; max-height: 320px; overflow-y: auto; }
.sec-row { display: flex; gap: 10px; align-items: baseline; font-size: 13px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.sec-row:last-child { border-bottom: 0; }
.set-row.dim { opacity: .45; }
.pilot-badge { margin: 12px auto 0; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; display: inline-block; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--card)), color-mix(in srgb, var(--accent2) 18%, var(--card))); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); animation: pop .4s; }
.pilot-badge b { color: var(--accent2); }
.pilot-badge.full { background: var(--card2); }
.why-approval { text-align: left; margin: 16px 0 8px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.why-approval p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.approve-ring { position: relative; width: 110px; height: 110px; margin: 0 auto 6px; }
.approve-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.approve-ring circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.approve-ring .trk { stroke: var(--line); }
.approve-ring .val { stroke: var(--accent); stroke-dasharray: 327; stroke-dashoffset: 327; animation: approve-fill var(--secs, 5s) linear forwards; }
@keyframes approve-fill { to { stroke-dashoffset: 0; } }
.approve-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 38px; font-weight: 900; }
/* honeypot field: invisible to people (and screen readers), bots fill it in */
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
#powmsg { margin-top: -4px; }
.tag { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--line); color: var(--text); vertical-align: middle; }
.tag.gold { background: color-mix(in srgb, var(--gold) 30%, var(--card)); }
.tag.red { background: color-mix(in srgb, var(--danger) 25%, var(--card)); }

/* ============ login ============ */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden; background: radial-gradient(ellipse at top, color-mix(in srgb, var(--accent) 35%, var(--bg)), var(--bg) 60%), var(--bg); }
.stars { position: absolute; inset: 0; background-image: radial-gradient(2px 2px at 20% 30%, #fff8, transparent), radial-gradient(1.5px 1.5px at 70% 20%, #fff8, transparent), radial-gradient(2px 2px at 40% 70%, #fff6, transparent), radial-gradient(1px 1px at 85% 60%, #fff8, transparent), radial-gradient(1.5px 1.5px at 10% 85%, #fff6, transparent), radial-gradient(1px 1px at 55% 45%, #fff8, transparent); animation: twinkle 6s ease-in-out infinite; pointer-events: none; }
@keyframes twinkle { 50% { opacity: .4; } }
.login-card { position: relative; width: 100%; max-width: 380px; text-align: center; background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(14px); padding: 30px 22px; border-radius: 28px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.logo-big { font-size: 64px; animation: float 5s ease-in-out infinite; }
.login-card h1 { font-size: 34px; font-weight: 900; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-card form { display: flex; flex-direction: column; gap: 12px; text-align: left; margin-top: 18px; }
.login-tabs { margin-top: 16px; }
.login-err { color: var(--danger); font-size: 14px; min-height: 18px; font-weight: 600; }

/* ============ Cosmoplans login: sticker collage on a starry desk ============ */
.login-collage {
  --ink: #1e1b4b;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(99, 102, 241, .45), transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(6, 182, 212, .35), transparent 55%),
    radial-gradient(ellipse at 70% 20%, rgba(244, 114, 182, .18), transparent 50%),
    #0b0b1f;
  color: #f1f5ff;
}
.login-collage::before { /* faint grid paper */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px);
  background-size: 32px 32px;
}
.login-collage .login-card { z-index: 2; max-width: 400px; background: rgba(17, 16, 42, .82); border: 1px solid rgba(255, 255, 255, .12); color: #f1f5ff; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.login-collage .login-card .muted, .login-collage .login-card .f > span { color: #a5b4cf; }
.login-collage .input { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: #fff; }
.login-collage .seg { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
.login-collage .seg button.on { background: #fff; color: var(--ink); }
.login-collage .btn.primary { background: linear-gradient(135deg, #6366f1, #06b6d4); box-shadow: 0 10px 28px rgba(99, 102, 241, .45); }
.brand-icon { width: 76px; height: 76px; border-radius: 22px; box-shadow: 0 12px 30px rgba(6, 182, 212, .35), 0 0 0 4px rgba(255, 255, 255, .08); animation: float 5s ease-in-out infinite; }
.login-collage .login-card h1 { background: linear-gradient(120deg, #a5b4fc, #67e8f9 55%, #f9a8d4); -webkit-background-clip: text; background-clip: text; color: transparent; margin-top: 8px; }
.tagline { margin: 4px 0 0; font-weight: 600; color: #c7d2fe; }
.promise-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.promise-row span { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); }
.login-foot { margin: 6px 0 0; font-size: 12px; color: #8b94b8; }
.login-collage .pilot-badge { background: linear-gradient(135deg, rgba(99, 102, 241, .35), rgba(6, 182, 212, .25)); border-color: rgba(103, 232, 249, .35); color: #fff; }
.login-collage .pilot-badge b { color: #67e8f9; }

.stickers { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.stk {
  position: absolute; left: var(--x); top: var(--y); width: max-content; max-width: 230px;
  padding: 12px 14px; border-radius: 16px; color: var(--ink); background: #fffdf6;
  border: 3px solid #fff; box-shadow: 0 14px 30px rgba(0, 0, 0, .35), 0 2px 0 rgba(0, 0, 0, .05);
  transform: rotate(var(--r)); animation: stk-float 7s ease-in-out infinite; font-size: 13px;
}
.stk:nth-child(2n) { animation-duration: 8.5s; animation-delay: -2s; }
.stk:nth-child(3n) { animation-duration: 9.5s; animation-delay: -4s; }
@keyframes stk-float { 50% { transform: rotate(calc(var(--r) * -0.4)) translateY(-10px); } }
.stk .tape { position: absolute; top: -12px; left: 50%; width: 64px; height: 20px; margin-left: -32px; background: rgba(255, 237, 180, .75); transform: rotate(-4deg); border-radius: 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.stk-k { font-weight: 800; font-size: 13.5px; }
.stk-s { font-size: 12px; opacity: .75; }
.s-test { background: #fef3c7; text-align: center; }
.big-num { font-size: 46px; font-weight: 900; line-height: 1; color: #d97706; margin-top: 4px; }
.s-focus { background: #ede9fe; display: flex; gap: 10px; align-items: center; }
.ring-mini { position: relative; width: 48px; height: 48px; }
.ring-mini svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-mini circle { fill: none; stroke-width: 5; stroke-linecap: round; }
.ring-mini .t { stroke: #c4b5fd; opacity: .5; }
.ring-mini .v { stroke: #6366f1; stroke-dasharray: 113; stroke-dashoffset: 30; animation: ring-spin 8s linear infinite; }
@keyframes ring-spin { 0% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 113; } }
.ring-mini span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 18px; }
.clock { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; color: #4f46e5; }
.s-check { background: #fff; background-image: repeating-linear-gradient(#fff 0 25px, #dbeafe 25px 26px); min-width: 190px; }
.ck { display: flex; align-items: center; gap: 8px; font-weight: 600; padding: 3px 0; transition: .3s; }
.ck b { width: 16px; height: 16px; border-radius: 5px; border: 2px solid #6366f1; display: grid; place-items: center; flex: none; transition: .3s; }
.ck.done { opacity: .55; text-decoration: line-through; }
.ck.done b { background: #6366f1; }
.ck.done b::after { content: "✓"; color: #fff; font-size: 11px; font-weight: 900; }
.xp-pop { position: absolute; right: 10px; bottom: 8px; font-weight: 800; font-size: 12px; color: #059669; opacity: 0; transform: translateY(6px); transition: .4s; }
.xp-pop.show { opacity: 1; transform: none; }
.s-streak { background: #ffedd5; display: flex; gap: 10px; align-items: center; }
.flame { font-size: 30px; animation: flicker 1.6s ease-in-out infinite; }
.s-quick { background: #fff; min-width: 220px; }
.qa { margin-top: 6px; padding: 7px 10px; border-radius: 10px; border: 2px solid #a5b4fc; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; min-height: 34px; display: flex; align-items: center; }
.caret { width: 2px; height: 14px; background: #6366f1; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.qa-out { margin-top: 6px; font-size: 12px; font-weight: 800; color: #4f46e5; opacity: 0; transform: translateY(-4px); transition: .35s; }
.qa-out.show { opacity: 1; transform: none; }
.s-hol { background: #ffe4e6; display: flex; gap: 10px; align-items: center; }
.hol-e { font-size: 30px; }
.s-level { background: #d1fae5; text-align: center; padding: 10px 16px; border-radius: 999px; }
.s-notif { background: rgba(255, 255, 255, .95); display: flex; gap: 10px; align-items: center; border-radius: 18px; }
.nt-ic { width: 34px; height: 34px; border-radius: 9px; background: url(/icons/icon-192.png) center / cover; flex: none; }
.stk { z-index: 2; }
.drift { z-index: 1; position: absolute; left: var(--x); bottom: -40px; font-size: var(--s); opacity: .55; animation: drift var(--d) linear infinite; animation-delay: var(--delay); filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .3)); }
@keyframes drift { to { transform: translateY(-110vh) rotate(25deg); } }

/* medium screens: keep stickers at the edges, drop the busiest ones */
@media (max-width: 1150px) { .s-notif, .s-level { display: none; } .stk { max-width: 190px; font-size: 12px; } }
/* phones: three small stickers in a row above the card, emojis drifting behind */
@media (max-width: 760px) {
  .login-collage { align-content: start; padding-top: calc(20px + env(safe-area-inset-top, 0px)); }
  .stickers { position: relative; inset: auto; display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: nowrap; padding: 14px 0 8px; margin-bottom: 4px; }
  .stk { position: relative; left: auto; top: auto; display: none; padding: 7px 9px; font-size: 11px; max-width: 124px; white-space: nowrap; border-width: 2px; border-radius: 12px; }
  .stk.m { display: block; }
  .s-focus.m, .s-streak.m { display: flex; gap: 6px; }
  .stk-k { font-size: 11px; }
  .stk .stk-s, .s-test .stk-s { display: none; }
  .stk .tape { width: 34px; height: 12px; margin-left: -17px; top: -8px; }
  .big-num { font-size: 24px; margin-top: 0; }
  .ring-mini { width: 28px; height: 28px; } .ring-mini span { font-size: 11px; }
  .clock { font-size: 13px; } .flame { font-size: 18px; }
  .drift { position: absolute; z-index: 0; }
  .login-collage .login-card { padding: 22px 18px; }
}

/* ============ Cosmoplans landing (scrolls below the login hero) ============ */
.landing { background: #0b0b1f; color: #eef2ff; overflow-x: hidden; }
.landing .hero { min-height: 100dvh; }
.scroll-cue { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 3; color: #c7d2fe; font-size: 13px; font-weight: 700; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.scroll-cue span { display: inline-block; animation: cue 1.4s ease-in-out infinite; }
@keyframes cue { 50% { transform: translateY(4px); } }
@media (max-width: 760px) { .scroll-cue { position: relative; left: auto; bottom: auto; transform: none; margin: 18px auto 8px; display: block; } }

.ld { min-height: 92vh; padding: 90px 24px; max-width: 1150px; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; position: relative; }
.ld h2 { font-size: clamp(32px, 5.4vw, 58px); font-weight: 900; line-height: 1.05; letter-spacing: -.02em; margin: 6px 0 18px; }
.grad { background: linear-gradient(120deg, #a5b4fc, #67e8f9 50%, #f9a8d4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ld-kicker { display: inline-block; align-self: flex-start; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #67e8f9; padding: 5px 12px; border-radius: 999px; background: rgba(103, 232, 249, .1); border: 1px solid rgba(103, 232, 249, .25); }
.ld-sub, .ld p { color: #a5b4cf; font-size: 17px; line-height: 1.6; max-width: 620px; }
.ld-note { margin-top: 26px; font-weight: 700; color: #c7d2fe !important; }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.ld + .ld::before { content: ""; position: absolute; top: 0; left: 24px; right: 24px; height: 1px; background: linear-gradient(90deg, transparent, rgba(165, 180, 252, .25), transparent); }

/* promises */
.ld-promises { text-align: center; align-items: center; }
.ld-promises .ld-kicker { align-self: center; }
.promise-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; width: 100%; margin-top: 10px; }
.pc { padding: 26px 18px; border-radius: 24px; background: #fffdf6; color: #1e1b4b; border: 3px solid #fff; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); transform: rotate(var(--r, 0deg)); transition: transform .3s; }
.pc:nth-child(1) { --r: -2deg; background: #fef3c7; } .pc:nth-child(2) { --r: 1.5deg; background: #d1fae5; }
.pc:nth-child(3) { --r: -1deg; background: #ede9fe; } .pc:nth-child(4) { --r: 2deg; background: #ffe4e6; }
.pc:hover { transform: rotate(0) translateY(-6px); }
.pc-e { font-size: 44px; } .pc b { display: block; font-size: 19px; margin: 8px 0 4px; } .pc span { font-size: 14px; opacity: .75; line-height: 1.45; display: block; }
@media (max-width: 900px) { .promise-cards { grid-template-columns: 1fr 1fr; } }

/* a day with */
.day-track { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; position: relative; margin-top: 10px; }
.day-track::before { content: ""; position: absolute; top: 30px; left: 8%; right: 8%; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #fbbf24, #6366f1, #06b6d4, #a78bfa, #f472b6); opacity: .6; }
.day-stop { position: relative; text-align: center; padding: 0 6px; opacity: 0; transform: translateY(20px); transition: .6s calc(var(--i) * .12s); }
.reveal.in .day-stop { opacity: 1; transform: none; }
.ds-dot { width: 62px; height: 62px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; background: #1a1838; border: 3px solid rgba(165, 180, 252, .5); box-shadow: 0 0 0 6px #0b0b1f; position: relative; }
.ds-time { font-size: 12px; font-weight: 800; color: #67e8f9; text-transform: uppercase; letter-spacing: .05em; }
.day-stop b { display: block; font-size: 17px; margin: 4px 0; } .day-stop span { font-size: 14px; color: #a5b4cf; line-height: 1.45; }
@media (max-width: 860px) {
  .day-track { grid-template-columns: 1fr; gap: 18px; }
  .day-track::before { top: 8px; bottom: 8px; left: 30px; right: auto; width: 3px; height: auto; background: linear-gradient(#fbbf24, #6366f1, #06b6d4, #a78bfa, #f472b6); }
  .day-stop { display: grid; grid-template-columns: 62px 1fr; column-gap: 14px; text-align: left; align-items: center; }
  .ds-dot { grid-row: span 3; margin: 0; }
}

/* feature rows */
.ld-feature { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.ld-feature.flip .lf-text { order: 2; }
.lf-text ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.lf-text li { display: flex; gap: 10px; align-items: center; font-weight: 700; color: #e0e7ff; }
.lf-text li::before { content: "✓"; width: 24px; height: 24px; flex: none; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, #6366f1, #06b6d4); color: #fff; font-size: 13px; font-weight: 900; }
.lf-shot { position: relative; display: grid; place-items: center; }
.lf-shot::before { content: ""; position: absolute; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(99, 102, 241, .45), transparent 65%); filter: blur(10px); }
.phone-frame { position: relative; width: min(300px, 70vw); aspect-ratio: 390 / 844; border-radius: 42px; padding: 10px; background: linear-gradient(160deg, #2a2850, #15142c); box-shadow: 0 40px 80px rgba(0, 0, 0, .55), inset 0 0 0 2px rgba(255, 255, 255, .08); transform: rotate(var(--tilt, 3deg)); transition: transform .5s; }
.flip .phone-frame { --tilt: -3deg; }
.ld-feature:hover .phone-frame { transform: rotate(0) scale(1.02); }
.phone-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 32px; display: block; background: #11102a; }
.lf-shot.noimg .phone-frame::after { content: "🪐"; position: absolute; inset: 10px; border-radius: 32px; display: grid; place-items: center; font-size: 80px; background: linear-gradient(160deg, #312e81, #0e7490); }
.shot-sticker { position: absolute; top: 6%; right: 14%; font-size: 34px; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: #fffdf6; border: 3px solid #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); transform: rotate(12deg); animation: stk-float 6s ease-in-out infinite; --r: 12deg; }
.shot-sticker.s1 { left: 12%; right: auto; top: auto; bottom: 10%; background: #fef3c7; }
.shot-sticker.s2 { background: #ffe4e6; }
@media (max-width: 860px) {
  .ld { padding: 70px 20px; min-height: auto; }
  .ld-feature, .ld-feature.flip { grid-template-columns: 1fr; gap: 30px; }
  .ld-feature.flip .lf-text { order: 0; }
}

/* notifications */
.ld-notif { align-items: center; text-align: center; }
.ld-notif .ld-kicker { align-self: center; }
.lock-screen { width: min(380px, 92vw); padding: 26px 16px 20px; border-radius: 36px; background: linear-gradient(170deg, #312e81, #0e7490 70%, #0b0b1f); box-shadow: 0 40px 80px rgba(0, 0, 0, .5); margin: 8px 0 22px; }
.ls-time { font-size: 64px; font-weight: 300; color: #fff; letter-spacing: -.02em; margin-bottom: 14px; }
.ls-note { display: flex; gap: 10px; text-align: left; padding: 11px 12px; margin-top: 8px; border-radius: 18px; background: rgba(255, 255, 255, .22); backdrop-filter: blur(10px); color: #fff; opacity: 0; transform: translateY(16px) scale(.97); transition: .5s; }
.reveal.in .ls-note { opacity: 1; transform: none; }
.reveal.in .ls-note:nth-child(3) { transition-delay: .35s; } .reveal.in .ls-note:nth-child(4) { transition-delay: .7s; }
.ls-note i { width: 36px; height: 36px; flex: none; border-radius: 9px; background: url(/icons/icon-192.png) center / cover; }
.ls-note b { display: block; font-size: 14px; } .ls-note span { font-size: 13px; opacity: .9; }

/* install */
.install-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ic { padding: 22px; border-radius: 24px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); }
.ic-h { font-size: 19px; font-weight: 900; margin-bottom: 10px; }
.ic ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: #c7d2fe; line-height: 1.4; }
.ic small { display: block; margin-top: 12px; color: #8b94b8; }
@media (max-width: 860px) { .install-cards { grid-template-columns: 1fr; } }

/* faq */
.faq { display: grid; gap: 10px; max-width: 760px; }
.faq details { border-radius: 18px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); padding: 4px 18px; }
.faq summary { cursor: pointer; font-weight: 800; font-size: 17px; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: #67e8f9; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 16px; font-size: 15px; }

/* final call to action */
.ld-cta { align-items: center; text-align: center; min-height: 70vh; }
.cta-rocket { font-size: 72px; animation: float 4s ease-in-out infinite; }
.ld-cta .pilot-badge { margin: 6px 0 22px; background: linear-gradient(135deg, rgba(99, 102, 241, .35), rgba(6, 182, 212, .25)); border-color: rgba(103, 232, 249, .35); color: #fff; }
.ld-cta .pilot-badge b { color: #67e8f9; }
.ld-cta .btn.primary { background: linear-gradient(135deg, #6366f1, #06b6d4); font-size: 18px; padding: 16px 34px; box-shadow: 0 14px 36px rgba(99, 102, 241, .5); }
.ld-foot { text-align: center; padding: 30px 20px calc(40px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(255, 255, 255, .08); font-size: 14px; display: grid; gap: 8px; }
.ld-foot img { vertical-align: middle; border-radius: 8px; }
.ld-foot .muted { color: #8b94b8; font-size: 12.5px; }

/* ============ toast / confetti ============ */
#toasts { position: fixed; left: 0; right: 0; bottom: calc(92px + var(--safe-b)); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
@media (min-width: 900px) { #toasts { bottom: 24px; } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 460px; padding: 12px 16px; border-radius: 16px; background: #1d1730; color: #fff; font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.3); transform: translateY(20px) scale(.95); opacity: 0; transition: .25s cubic-bezier(.2,.9,.3,1.3); }
.toast.show { transform: none; opacity: 1; }
.toast.err { background: var(--danger); }
.toast.gold { background: linear-gradient(135deg, #f59e0b, #ec4899); }
.toast button { color: #c4b5fd; font-weight: 800; }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 300; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
