:root {
  --bg: #04060b; --bg2: #0a1020; --ink: #e8f1ff; --dim: #8a9bb4; --line: rgba(140, 190, 255, .16);
  --glass: rgba(14, 20, 34, .82); --accent: #5ac8ff; --violet: #a98bff; --pink: #ff7ad9;
  --good: #3ddc84; --fair: #ffbf47; --bad: #ff5a5f;
  --st: env(safe-area-inset-top); --sb: env(safe-area-inset-bottom);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; color: var(--ink);
  background: radial-gradient(120% 70% at 80% -10%, #1a1440 0%, transparent 60%),
              radial-gradient(90% 60% at -10% 110%, #08283a 0%, transparent 60%), var(--bg);
  background-attachment: fixed;
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--accent); }
h1 { font-size: 24px; margin: 0 0 6px; }
h2 { font: 600 11px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim); margin: 22px 4px 10px; display: flex; align-items: center; gap: 8px; }
h2 .grow { flex: 1; }
h3 { margin: 0 0 6px; font-size: 17px; }
.dim { color: var(--dim); }
.small { font-size: 12.5px; }
.err { color: #ffb3b5; min-height: 1.4em; }
.good { color: var(--good); } .fair { color: var(--fair); } .bad { color: var(--bad); }

#top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  padding: calc(var(--st) + 10px) 14px 10px; background: linear-gradient(var(--bg) 55%, rgba(4, 6, 11, 0));
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.atom { width: 32px; height: 32px; flex: none; overflow: visible; }
.atom .nucleus { fill: var(--accent); filter: drop-shadow(0 0 4px var(--accent)); }
.atom ellipse { fill: none; stroke: rgba(150, 200, 255, .55); stroke-width: 2; }
.ttl { flex: 1; min-width: 0; }
#hello { font-weight: 700; font-size: 18px; }
.icon { background: none; border: 1px solid var(--line); border-radius: 12px; width: 40px; height: 40px; cursor: pointer; font-size: 19px; }

main { max-width: 860px; margin: 0 auto; padding: 4px 14px calc(var(--sb) + 96px); }
.card { background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; margin: 0 0 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat { background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 10px; text-align: center; cursor: pointer; }
.stat b { display: block; font-size: 24px; }
.stat span { font-size: 11.5px; color: var(--dim); }
@media (max-width: 420px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.bar { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--violet), var(--pink)); }

.list { list-style: none; margin: 0; padding: 0; }
.it { display: flex; align-items: flex-start; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.it:last-child { border-bottom: 0; }
.it .main { flex: 1; min-width: 0; cursor: pointer; }
.it .t { font-weight: 600; overflow-wrap: anywhere; }
.it.done .t { text-decoration: line-through; color: var(--dim); }
.chk { width: 26px; height: 26px; border-radius: 8px; border: 2px solid rgba(150, 200, 255, .45); background: none; flex: none; cursor: pointer; margin-top: 1px; }
.chk.on { background: var(--good); border-color: var(--good); }
.chk.on::after { content: "\2713"; color: #04110a; font-weight: 800; display: block; line-height: 22px; text-align: center; }
.chip { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); margin-right: 4px; white-space: nowrap; }
.chip.new { background: var(--pink); color: #1a0016; border-color: var(--pink); font-weight: 700; }
.chip.over { background: var(--bad); color: #1a0000; border-color: var(--bad); font-weight: 700; }
.chip.soon { border-color: var(--fair); color: var(--fair); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.pts { font: 12px ui-monospace, Menlo, Consolas, monospace; color: var(--dim); white-space: nowrap; }

.btn { background: rgba(90, 200, 255, .14); border: 1px solid rgba(90, 200, 255, .45); color: var(--ink); border-radius: 12px;
  padding: 9px 14px; cursor: pointer; font-weight: 600; }
.btn.primary { background: linear-gradient(135deg, #2b8cff, #8a5cff); border: 0; }
.btn.ghost { background: none; border-color: var(--line); }
.btn.danger { background: rgba(255, 90, 95, .14); border-color: rgba(255, 90, 95, .5); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .5; }
.seg { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.seg button { flex: none; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 14px; }
.seg button.on { background: var(--accent); color: #031018; border-color: var(--accent); font-weight: 700; }

input, select, textarea { width: 100%; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-size: 12.5px; color: var(--dim); margin: 10px 2px 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 10px; }

nav#tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; justify-content: space-around;
  padding: 6px 4px calc(var(--sb) + 6px); background: rgba(6, 9, 16, .92); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
nav#tabs button { background: none; border: 0; color: var(--dim); font-size: 10.5px; display: flex; flex-direction: column;
  align-items: center; gap: 2px; padding: 4px 2px; cursor: pointer; min-width: 44px; }
nav#tabs .ic { font-size: 20px; line-height: 1.1; }
nav#tabs button.on { color: var(--accent); }
@media (min-width: 900px) {
  nav#tabs { top: 0; bottom: 0; right: auto; width: 92px; flex-direction: column; justify-content: flex-start; padding-top: 80px; border-top: 0; border-right: 1px solid var(--line); }
  main { padding-left: 110px; max-width: 1000px; }
  #top { padding-left: 110px; }
}

/* calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .hd { text-align: center; font-size: 11px; color: var(--dim); padding: 2px 0; }
.cal .d { min-height: 64px; border: 1px solid var(--line); border-radius: 10px; padding: 3px; font-size: 11px; cursor: pointer; overflow: hidden; background: rgba(0, 0, 0, .2); }
.cal .d.out { opacity: .35; }
.cal .d.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.cal .d.sel { background: rgba(90, 200, 255, .15); }
.cal .n { font-weight: 700; }
.cal .e { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 4px; padding: 0 3px; margin-top: 2px; color: #061019; font-weight: 600; font-size: 10px; }
.cal .e.done { opacity: .35; text-decoration: line-through; }
.cal .more { color: var(--dim); font-size: 10px; }
@media (max-width: 520px) { .cal .e { font-size: 0; height: 5px; padding: 0; } .cal .d { min-height: 48px; } }

/* grades */
.gcard .big { font-size: 34px; font-weight: 800; line-height: 1; }
.need { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.need td, .need th { padding: 5px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.need th { color: var(--dim); font-weight: 500; font-size: 12px; }
.wi { width: 84px; padding: 6px 8px; }

/* planner */
.day { margin-bottom: 10px; }
.day h3 { font-size: 15px; display: flex; gap: 8px; align-items: baseline; }
.blk { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.blk:last-child { border-bottom: 0; }
.blk .tm { width: 128px; flex: none; font: 12.5px ui-monospace, Menlo, Consolas, monospace; color: var(--dim); padding-top: 2px; }
.blk.busy { opacity: .55; }

/* chat */
.chat { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.msg { padding: 10px 13px; border-radius: 16px; max-width: 92%; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: linear-gradient(135deg, #1e5fd8, #6a45d6); }
.msg.ai { align-self: flex-start; background: var(--glass); border: 1px solid var(--line); }
.md h4 { margin: 10px 0 4px; font-size: 15px; color: var(--accent); }
.md ul, .md ol { margin: 4px 0; padding-left: 20px; }
.md p { margin: 6px 0; }
.md code { font: 13px ui-monospace, Menlo, Consolas, monospace; background: rgba(255, 255, 255, .08); padding: 0 4px; border-radius: 4px; }
.composer { position: sticky; bottom: calc(var(--sb) + 70px); display: flex; gap: 8px; background: var(--bg); padding: 8px 0; }
.composer textarea { min-height: 46px; height: 46px; }
.note { border-left: 3px solid var(--violet); padding: 6px 10px; font-size: 13px; color: var(--dim); margin-bottom: 10px; background: rgba(169, 139, 255, .07); border-radius: 0 10px 10px 0; }

/* sheet + toast */
#sheet { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .6); display: flex; align-items: flex-end; justify-content: center; }
.sheet-card { background: #0b1222; border: 1px solid var(--line); border-radius: 22px 22px 0 0; width: 100%; max-width: 640px;
  max-height: 92vh; overflow-y: auto; padding: 18px 16px calc(var(--sb) + 18px); }
@media (min-width: 700px) { #sheet { align-items: center; } .sheet-card { border-radius: 22px; } }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--sb) + 84px); z-index: 30; background: #13203a;
  border: 1px solid var(--line); padding: 10px 16px; border-radius: 14px; max-width: 90vw; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.login { max-width: 420px; margin: 8vh auto; text-align: center; }
.login input { text-align: center; font-size: 26px; letter-spacing: .2em; }
.secret { font: 15px ui-monospace, Menlo, Consolas, monospace; word-break: break-all; background: rgba(0, 0, 0, .4); padding: 10px; border-radius: 10px; user-select: all; }
.stars select { width: auto; padding: 4px 8px; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: sp 1s linear infinite; vertical-align: -2px; }
@keyframes sp { to { transform: rotate(360deg); } }

/* live demo bar */
#demo-bar{position:sticky;top:0;z-index:50;text-align:center;font-size:12px;padding:6px 12px;background:#12305a;color:#dfe9ff}
#demo-bar a{color:#9fd0ff}

/* setup interview */
.iv-chip{margin:3px}.iv-gap{margin-top:8px}.card h2.iv-q{margin:0 0 12px;font:650 22px/1.3 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;letter-spacing:0;text-transform:none;color:inherit}.iv-nav{margin-top:14px;gap:8px}
.iv-bar{display:block;width:100%;height:4px;margin:8px 0 14px;border:0;border-radius:4px;background:#1c2a44;appearance:none;-webkit-appearance:none}
.iv-bar::-webkit-progress-bar{background:#1c2a44;border-radius:4px}.iv-bar::-webkit-progress-value{background:linear-gradient(90deg,#5ac8ff,#a98bff);border-radius:4px}
.iv-bar::-moz-progress-bar{background:linear-gradient(90deg,#5ac8ff,#a98bff);border-radius:4px}

/* landing + tour */
.lp-kicker{color:#5ac8ff;font-weight:600;margin:0 0 6px}.card h1.lp-h{font:700 28px/1.2 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;margin:0 0 10px;letter-spacing:0;text-transform:none}
.lp-list{margin:12px 0;padding-left:20px;line-height:1.7}.lp-go{font-size:17px;padding:12px 22px}.lp-modes{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.iv-mic{display:block}
.iv-tour{position:fixed;left:12px;right:12px;bottom:84px;z-index:50;max-width:520px;margin:0 auto;background:#0c1220;border:1px solid #5ac8ff;border-radius:16px;padding:14px 16px;box-shadow:0 10px 40px rgba(0,0,0,.6)}
.iv-tour h3{margin:4px 0 6px}.iv-tour p{margin:0}

.lp-auth{margin-top:14px}.lp-google{width:100%}.lp-or{text-align:center;margin:12px 0 8px}
