/* Fixed visual layers use the large viewport, so collapsing mobile browser chrome
   cannot resize the WebGL scene during a swipe. Orientation changes still resize. */
html { overscroll-behavior-y: none; }
[data-booting="true"] .app-shell { display: none; }
#api-login-form { margin-top: 28px; }
.ambient-background, .threads-effect, .registration-background {
  position: fixed; inset: 0 0 auto; height: var(--scene-height, 100lvh);
  transform: translateZ(0); backface-visibility: hidden; contain: strict;
}
.registration-background { z-index: -1; overflow: hidden; pointer-events: none; opacity: 0; }
.registration-background canvas { display: block; width: 100%; height: 100%; }
.registration-background::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 75% 35%, #387fd335, transparent 65%); }
.registration-background[data-ready="true"]::before { display: none; }
[data-onboarding="true"] .registration-background { opacity: .72; }
[data-onboarding="true"] :is(.ambient-background, .threads-effect) { opacity: 0; }
[data-booting="true"] :is(.ambient-background, .threads-effect, .registration-background) { visibility: hidden; transition: none; }
.nav-orb { background: none; }
.nav-orb > .nav-ai-glyph { position: absolute; left: 50%; top: 50%; width: 19px; height: 19px; transform: translate(-50%, -50%); color: var(--text); stroke-width: 1.6; filter: drop-shadow(0 1px 3px var(--bg)); }
.nav-orb canvas { opacity: .75; }
.tab-item-ai.is-active .nav-ai-glyph { stroke-width: 1.9; }
.home-mobile-content, .home-add-actions { display: none; }
.home-layout .home-focus { align-items: start; }
@media (min-width: 761px) { .home-notes .today-note:nth-child(n+3) { display: none; } }

/* Entry screens have their own frame; the in-app dock is not shown here. */
[data-onboarding="true"] :is(.sidebar, .topbar, .tabbar, .skip-link) { display: none; }
[data-onboarding="true"] .app-main { margin: 0; }
[data-onboarding="true"] .view { max-width: none; padding: 0; animation: none; }
.registration-layout { min-height: 100svh; display: flex; flex-direction: column; }
.registration-brand { display: inline-flex; align-items: center; gap: 16px; font-size: 30px; font-weight: 800; letter-spacing: -1.1px; }
.registration-brand img { width: 72px; height: 72px; }
.registration-stage { flex: 1; display: grid; place-items: center; padding: max(40px, env(safe-area-inset-top)) 28px 40px; }
.registration-stack { width: min(100%, 480px); display: flex; flex-direction: column; align-items: center; gap: 28px; }
.registration-card { width: 100%; padding: 35px; border: 1px solid var(--glass-rim); border-radius: 28px; background: color-mix(in srgb, var(--bg) 62%, transparent); box-shadow: inset 0 1px var(--glass-highlight), 0 26px 70px -40px #0008; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.registration-card > .eyebrow { font-size: 9px; color: var(--text-2); letter-spacing: 1.8px; margin-bottom: 14px; }
.registration-card h1 { font-size: clamp(29px, 4vw, 40px); letter-spacing: -1.65px; line-height: 1.18; font-weight: 650; }
.registration-lede { margin-top: 17px; font-size: 13px; color: var(--text-2); line-height: 1.9; text-wrap: pretty; }
.registration-back { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); min-height: 36px; font-size: 11px; margin: -12px 0 24px -4px; }
.registration-back .ic { width: 15px; height: 15px; }
.registration-choices { display: grid; gap: 11px; margin-top: 30px; }
.registration-choice { display: flex; align-items: center; gap: 13px; min-height: 78px; padding: 15px; border: 1px solid var(--hairline-strong); border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 1px var(--glass-highlight); transition: border-color .2s, background .2s; }
.registration-choice:hover { border-color: var(--text-2); background: var(--surface-3); }
.registration-choice.secondary { background: var(--surface); border-color: var(--hairline); }
.registration-choice > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.registration-choice b { font-size: 13px; font-weight: 700; }
.registration-choice small { font-size: 10px; color: var(--text-2); }
.registration-choice > .ic { width: 17px; color: var(--text-2); }
.registration-choice-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 11px; border: 1px solid var(--hairline); background: var(--surface-2); }
.registration-choice-icon .ic { width: 18px; height: 18px; }
.registration-identity { display: flex; justify-content: center; align-items: center; gap: 7px; margin-top: 25px; color: var(--text-3); font-size: 10px; }
.registration-identity .ic { width: 13px; height: 13px; }
.registration-footer { width: min(1200px, 100%); margin: 0 auto; padding: 20px 42px 26px; display: flex; justify-content: center; gap: 15px; color: var(--text-3); font-size: 10px; }
.registration-footer > span:last-child { display: inline-flex; gap: 6px; align-items: center; }
.registration-footer .ic { width: 11px; height: 11px; }
#registration-form { margin-top: 26px; }
.registration-field + .registration-field { margin-top: 18px; }
.registration-field label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.registration-input-wrap { position: relative; }
.registration-field input { width: 100%; height: 48px; border: 1px solid var(--hairline-strong); border-radius: 12px; padding: 10px 13px; background: var(--surface); color: var(--heading); outline: none; font-size: 16px; line-height: 1.4; transition: border-color .2s, box-shadow .2s; }
.registration-field input:focus { border-color: var(--text-2); box-shadow: 0 0 0 3px var(--surface-3); }
.registration-field input[aria-invalid="true"] { border-color: var(--red); }
.registration-input-wrap:has(button) input { padding-right: 48px; }
.registration-input-wrap > button { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 9px; background: transparent; color: var(--text-3); }
.registration-input-wrap > button:hover { background: var(--surface-3); }
.registration-input-wrap .ic { width: 18px; height: 18px; }
.registration-hint { font-size: 10px; line-height: 1.7; color: var(--text-3); margin: 6px 1px 0; }
.registration-error { font-size: 11px; color: var(--red); line-height: 1.7; margin-top: 5px; }
.registration-hint:empty, .registration-error:empty { display: none; }
.registration-submit { width: 100%; margin-top: 25px; min-height: 48px; background: #e4e7ee; border: 1px solid #fff9; color: #282b33; font-weight: 750; justify-content: space-between; box-shadow: inset 0 1px #fff; }
.registration-submit:hover { background: #f0f1f5; }
.registration-submit .ic { width: 18px; height: 18px; }
.registration-bottom-link { margin-top: 22px; color: var(--text-3); font-size: 11px; text-align: center; }
.registration-bottom-link a { color: var(--text); margin-left: 4px; text-decoration: underline; text-underline-offset: 4px; }
.registration-progress { display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; margin: 0 0 30px; padding: 0; gap: 8px; }
.registration-progress li { display: flex; flex-direction: column; gap: 6px; color: var(--text-3); font-size: 10px; }
.registration-progress li > span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; border: 1px solid var(--hairline); }
.registration-progress small { font-size: 9px; }
.registration-progress .is-complete { color: var(--text); }
.registration-progress .is-complete > span { border-color: var(--text-3); background: var(--surface-2); }
.registration-progress [aria-current="step"] > span { background: var(--text); color: var(--bg); }
.registration-progress .ic { width: 12px; height: 12px; }
.registration-years { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.registration-years .registration-field { margin-top: 0; }
.registration-permission { display: flex; align-items: flex-start; gap: 10px; padding: 15px; border: 1px solid var(--hairline); border-radius: 13px; color: var(--text-2); font-size: 11px; line-height: 1.8; margin-top: 20px; background: var(--surface); }
.registration-permission > .ic { width: 16px; height: 16px; margin-top: 2px; }
.registration-password-note { margin-top: 15px; color: var(--text-3); font-size: 10px; line-height: 1.8; }
.registration-group-summary { display: flex; gap: 14px; margin-top: 27px; padding: 18px; border: 1px solid var(--hairline); border-radius: 16px; background: var(--surface-2); }
.registration-group-summary > div { display: flex; flex-direction: column; min-width: 0; }
.registration-group-summary b { font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.registration-group-summary div > span { font-size: 11px; line-height: 1.8; color: var(--text-2); margin-top: 5px; overflow-wrap: anywhere; }
.registration-group-summary small { font-size: 10px; color: var(--text-3); margin-top: 11px; }
.registration-success-mark { display: grid; place-items: center; width: 47px; height: 47px; margin-bottom: 26px; border-radius: 50%; border: 1px solid var(--glass-rim); background: var(--surface-2); box-shadow: inset 0 1px var(--glass-highlight); }
.registration-success-mark .ic { width: 24px; height: 24px; }
.registration-ready-group { display: flex; flex-direction: column; gap: 4px; margin-top: 25px; padding-block: 15px; border-block: 1px solid var(--hairline); }
.registration-ready-group > b { font-size: 15px; overflow-wrap: anywhere; }
.registration-ready-group > span { font-size: 11px; color: var(--text-2); }
.registration-spinner { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; border-right-color: transparent; animation: registration-spin .8s linear infinite; }
[data-theme="light"] .registration-card { background: #ffffff9e; box-shadow: inset 0 1px #fff, 0 28px 70px -35px #39435433; }
[data-theme="light"] .registration-submit { background: #383c46; border-color: #30343e; color: #fff; box-shadow: inset 0 1px #ffffff26; }
[data-theme="light"] .registration-submit:hover { background: #282d37; }
@keyframes registration-spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .home-layout { display: grid; gap: 27px; }
  .home-layout .home-hero { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  body:has(.view[data-page="home"]) .topbar .add-btn { display: none; }
  .home-layout .home-focus { display: contents; }
  .home-layout .home-homework { order: 1; }
  .home-layout .home-add-actions { order: 2; }
  .home-layout .home-notes { order: 3; }
  .home-layout .ai-launcher { order: 4; margin: 0; }
  .home-layout .home-desktop-content { display: none; }
  .home-mobile-content { display: block; }
  .home-layout .section-head h2 { font-size: 20px; letter-spacing: -.65px; }
  .home-layout .section-head { margin-bottom: 15px; }
  .tomorrow-empty { padding: 22px; background: var(--surface); box-shadow: inset 0 1px var(--glass-highlight); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .tomorrow-empty > .ic { width: 26px; height: 26px; color: var(--green); margin-bottom: 17px; }
  .tomorrow-empty h3 { font-size: 16px; line-height: 1.6; }
  .tomorrow-empty p { color: var(--text-2); font-size: 12px; margin-top: 7px; line-height: 1.9; }
  .tomorrow-next { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--hairline); padding-top: 15px; margin-top: 20px; }
  .tomorrow-next > span { display: flex; flex-direction: column; gap: 5px; }
  .tomorrow-next small { color: var(--text-3); font-size: 10px; }
  .tomorrow-next b { font-size: 13px; font-weight: 650; }
  .tomorrow-next > .ic { width: 15px; height: 15px; color: var(--text-2); }
  .tomorrow-task { display: flex; align-items: flex-start; gap: 12px; padding: 19px; background: var(--surface); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .tomorrow-task + .tomorrow-task { margin-top: 10px; }
  .tomorrow-task > span:nth-child(2) { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 8px; }
  .tomorrow-task small { font-size: 10px; color: var(--text-2); }
  .tomorrow-task b { font-size: 16px; font-weight: 650; line-height: 1.6; }
  .tomorrow-task > span > span { font-size: 12px; color: var(--text-2); line-height: 1.8; }
  .tomorrow-task > .ic { width: 14px; height: 14px; }
  .home-add-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .home-homework > .home-add-actions { margin-top: 12px; }
  .home-add-actions > button { display: grid; grid-template-columns: 1fr auto; align-items: start; text-align: left; gap: 12px 4px; min-height: 93px; padding: 15px; border: 1px solid var(--glass-rim); border-radius: 17px; background: var(--surface); box-shadow: inset 0 1px var(--glass-highlight); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .home-add-actions > button > span { grid-column: 1 / -1; grid-row: 2; font-size: 11px; font-weight: 650; }
  .home-add-actions > button > .ic:first-child { width: 21px; height: 21px; color: var(--blue); }
  .home-add-actions > button > .ic:last-child { width: 15px; height: 15px; color: var(--text-3); }
  .home-add-actions > button:last-child > .ic:first-child { color: var(--green); }
  .home-add-actions > button:active { background: var(--surface-2); }
  .home-notes .today-note { min-height: 120px; }
  [data-theme="light"] .tomorrow-empty { background: var(--daylight-glass); box-shadow: var(--daylight-shadow); }
  [data-theme="light"] .home-add-actions > button { background: var(--daylight-glass); box-shadow: var(--daylight-shadow); }
  .registration-brand { font-size: 27px; gap: 14px; }
  .registration-brand img { width: 64px; height: 64px; }
  .registration-stage { padding: max(28px, env(safe-area-inset-top)) 20px 36px; place-items: center; }
  .registration-stack { gap: 24px; }
  .registration-card { padding: 26px 23px; border-radius: 24px; }
  .registration-card h1 { font-size: 34px; letter-spacing: -1.3px; }
  .registration-lede { font-size: 12px; }
  .registration-footer { padding: 18px 25px calc(25px + env(safe-area-inset-bottom)); flex-direction: column; gap: 5px; align-items: center; font-size: 9px; }
}
@media (max-width: 360px) {
  .registration-stage { padding-inline: 14px; }
  .registration-card { padding-inline: 19px; }
  .registration-card h1 { font-size: 30px; }
  .home-add-actions > button { padding: 13px; }
}
