/* =====================================================================
   MIND LINKER — Responsive web app shell
   Reuses tokens.css + components.css.
   Breakpoints:  ≤767 mobile (bottom tab bar)
                 768–1023 tablet (icon rail sidebar)
                 1024–1279 tablet-landscape / small desktop (full sidebar)
                 ≥1280 desktop (full sidebar, wide dashboard)
   ===================================================================== */

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); }

.app {
  position: relative;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-body);
}
/* ambient tint behind everything */
.app::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 6% 2%, oklch(84.8% 0.109 156.5 / 0.16), transparent 60%),
    radial-gradient(55% 55% at 98% 100%, oklch(61.8% 0.122 232.1 / 0.14), transparent 60%);
}
[data-theme="dark"] .app::before {
  background:
    radial-gradient(60% 50% at 6% 2%, oklch(72% 0.128 172.5 / 0.12), transparent 60%),
    radial-gradient(55% 55% at 98% 100%, oklch(71.7% 0.13 224.5 / 0.12), transparent 60%);
}

/* shell becomes a row once the sidebar appears */
.shell { position: relative; z-index: 1; display: block; }
@media (min-width: 768px) {
  .shell { display: flex; align-items: stretch; }
}

/* =====================================================================
   SIDEBAR  (hidden on mobile, rail on tablet, full on desktop)
   ===================================================================== */
.sidebar { display: none; }
@media (min-width: 768px) {
  .sidebar {
    display: flex; flex-direction: column;
    position: sticky; top: 0; align-self: flex-start;
    height: 100dvh; flex: 0 0 auto;
    width: 84px; padding: 22px 14px;
    background: color-mix(in srgb, var(--surface) 78%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
    border-right: 1px solid var(--line-soft);
    z-index: 20;
  }
}
@media (min-width: 1024px) {
  .sidebar { width: 248px; padding: 26px 18px; align-items: stretch; }
}

.sb-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 6px 0; margin-bottom: 26px;
  justify-content: center;
}
@media (min-width: 1024px) { .sb-brand { justify-content: flex-start; padding-left: 8px; } }
.sb-brand__orb { width: 38px; height: 38px; flex: 0 0 auto; }
.sb-brand__wm { display: none; }
@media (min-width: 1024px) {
  .sb-brand__wm { display: block; font: var(--fw-display) 19px var(--font-display); letter-spacing: -.02em; color: var(--ink); }
  .sb-brand__wm small { display: block; font: var(--fw-mono) 9px var(--font-mono); letter-spacing: .2em; color: var(--teal-500); text-transform: uppercase; margin-top: 1px; }
}

.sb-nav { display: flex; flex-direction: column; gap: 6px; }
.sb-item {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  border: none; background: none; cursor: pointer;
  width: 100%; padding: 12px; border-radius: 16px;
  color: var(--ink-3); font: var(--fw-strong) 15px var(--font-body);
  justify-content: center;
  transition: background var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}
.sb-item:focus-visible, .sb-cta:focus-visible, .sb-foot__row:focus-visible,
.icon-btn:focus-visible, .tabm:focus-visible, .prow:focus-visible,
.appseg button:focus-visible, .switch:focus-visible, .welcome__alt:focus-visible,
.breathe__x:focus-visible { outline: 2px solid var(--teal-400); outline-offset: 2px; }
@media (min-width: 1024px) { .sb-item { justify-content: flex-start; padding: 13px 14px; } }
.sb-item svg { width: 23px; height: 23px; flex: 0 0 auto; }
.sb-item__lbl { display: none; white-space: nowrap; }
@media (min-width: 1024px) { .sb-item__lbl { display: inline; } }
.sb-item:hover { background: var(--surface-2); color: var(--ink); }
.sb-item--active { color: var(--green-600); background: color-mix(in srgb, var(--green-100) 70%, transparent); }
[data-theme="dark"] .sb-item--active { color: var(--green-300); background: color-mix(in srgb, var(--green-800) 45%, transparent); }
.sb-item--active::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3.5px; height: 22px; border-radius: 0 4px 4px 0; background: var(--grad-vert);
}
@media (max-width: 1023px) { .sb-item--active::before { left: -14px; } }

.sb-cta {
  margin-top: 20px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  border: none; cursor: pointer; white-space: nowrap;
  border-radius: 18px; padding: 14px;
  font: var(--fw-display) 15px var(--font-display); letter-spacing: -.01em; color: oklch(29.8% 0.055 171.9);
  background: var(--grad-signature); background-size: 160% 160%;
  box-shadow: var(--sh-glow), inset 0 1px 1px oklch(100% 0 89.9 / 0.5);
  transition: background-position var(--dur-slow) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.sb-cta:hover { background-position: 100% 50%; box-shadow: var(--sh-glow), 0 0 0 4px oklch(64.7% 0.134 162.2 / 0.16); }
.sb-cta:active { transform: translateY(1px); }
.sb-cta svg { width: 20px; height: 20px; flex: 0 0 auto; }
.sb-cta__lbl { display: none; }
@media (min-width: 1024px) { .sb-cta__lbl { display: inline; } }

.sb-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 18px; }
.sb-foot__row {
  display: flex; align-items: center; gap: 12px;
  border: none; background: none; cursor: pointer;
  padding: 10px 12px; border-radius: 14px; width: 100%;
  color: var(--ink-2); font: var(--fw-strong) 14px var(--font-body);
  justify-content: center;
}
@media (min-width: 1024px) { .sb-foot__row { justify-content: flex-start; } }
.sb-foot__row:hover { background: var(--surface-2); }
.sb-foot__row svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--ink-3); }
.sb-foot__lbl { display: none; }
@media (min-width: 1024px) { .sb-foot__lbl { display: inline; } }
.sb-foot .switch { flex: 0 0 auto; }
@media (max-width: 1023px) { .sb-foot .switch { display: none; } }
.sb-avatar { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  background:
    radial-gradient(34% 30% at 32% 26%, oklch(100% 0 89.9 / 0.85) 0, oklch(100% 0 89.9 / 0) 45%),
    radial-gradient(120% 120% at 30% 20%, oklch(90.7% 0.074 159.5), oklch(64.7% 0.134 162.2) 62%, oklch(46.8% 0.089 169.4));
  box-shadow: inset -3px -4px 8px oklch(29.2% 0.052 174.7 / 0.4), 0 4px 10px oklch(41.9% 0.076 171.9 / 0.3);
  border: 2px solid oklch(100% 0 89.9 / 0.7); }

/* =====================================================================
   MAIN COLUMN + CONTENT
   ===================================================================== */
.main { position: relative; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; min-height: 100dvh; }
.content {
  flex: 1 1 auto; width: 100%; max-width: 1200px; margin: 0 auto;
  padding: 22px 20px 120px;
}
@media (min-width: 768px) {
  .content { padding: 30px 34px 48px; max-width: 760px; }
}
@media (min-width: 1024px) {
  .content { padding: 38px 46px 56px; max-width: 1120px; }
}
@media (min-width: 1280px) {
  .content { padding: 44px 56px 64px; }
}

/* page header (greeting / title row) */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head__eyebrow { font: var(--fw-mono) 12px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--teal-500); white-space: nowrap; }
.page-head__title { font: var(--fw-display) 28px var(--font-display); letter-spacing: -.03em; color: var(--ink); margin: 5px 0 0; line-height: 1.12; white-space: nowrap; }
@media (min-width: 1024px) { .page-head__title { font-size: 34px; } }
.page-head__actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.icon-btn { width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); display: grid; place-items: center; cursor: pointer; transition: border var(--dur-base) var(--ease), color var(--dur-base) var(--ease); }
.icon-btn:hover { border-color: var(--green-300); color: var(--green-600); }
.icon-btn svg { width: 20px; height: 20px; }
.head-avatar { width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto; cursor: pointer;
  background:
    radial-gradient(34% 30% at 32% 26%, oklch(100% 0 89.9 / 0.85) 0, oklch(100% 0 89.9 / 0) 45%),
    radial-gradient(120% 120% at 30% 20%, oklch(90.7% 0.074 159.5), oklch(64.7% 0.134 162.2) 62%, oklch(46.8% 0.089 169.4));
  box-shadow: inset -5px -7px 13px oklch(29.2% 0.052 174.7 / 0.4), 0 8px 18px oklch(41.9% 0.076 171.9 / 0.32);
  border: 2px solid oklch(100% 0 89.9 / 0.7); }

/* =====================================================================
   LAYOUT UTILITIES (responsive grids)
   ===================================================================== */
.stack { display: flex; flex-direction: column; gap: 18px; }
.section { display: flex; flex-direction: column; gap: 12px; }

/* dashboard: 1 col → 2 col on desktop */
.dash { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1024px) { .dash { gap: 20px; grid-template-columns: 1fr 1fr; } }
.dash > .span-all { grid-column: 1 / -1; }

/* generic two-up that collapses on small screens */
.grid-2 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.grid-auto { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); } }
@media (min-width: 768px) and (max-width: 1023px) { .grid-auto { grid-template-columns: 1fr; } }
@media (min-width: 1024px) { .grid-auto { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); } }

/* settings list: single col mobile/tablet, 2 col wide desktop */
.settings { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .settings { grid-template-columns: 1fr 1fr; } }

/* let cards grow to fill grid cell height nicely; never collapse min-height */
.dash > *, .grid-auto > * { min-height: 0; }

/* =====================================================================
   MOBILE TAB BAR  (only ≤767)
   ===================================================================== */
.tabbar-m { position: fixed; left: 14px; right: 14px; bottom: 14px; height: 68px; z-index: 30;
  display: flex; align-items: center; justify-content: space-around;
  border-radius: 24px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-stroke);
  box-shadow: var(--sh-2), inset 0 1px 0 oklch(100% 0 89.9 / 0.5); }
@media (min-width: 768px) { .tabbar-m { display: none; } }
.tabm { display: flex; flex-direction: column; align-items: center; gap: 5px; border: none; background: none; cursor: pointer;
  color: var(--ink-3); font: var(--fw-strong) 10px var(--font-body); padding: 4px 8px; }
.tabm svg { width: 23px; height: 23px; }
.tabm span { white-space: nowrap; }
.tabm--active { color: var(--green-500); }
.tabm__fab { width: 52px; height: 52px; border-radius: 50%; margin-top: -26px; display: grid; place-items: center;
  background: var(--grad-signature); color: oklch(29.8% 0.055 171.9);
  box-shadow: 0 3px 8px oklch(56.3% 0.116 162.8 / .4), 0 10px 24px oklch(64.7% 0.134 162.2 / .5), 0 18px 38px oklch(61.8% 0.122 232.1 / .28), inset 0 2px 1px oklch(100% 0 0 / .5); }
.tabm__fab svg { width: 26px; height: 26px; }

/* =====================================================================
   CHECK-IN MODAL  (bottom sheet on mobile → centered dialog desktop)
   ===================================================================== */
.scrim { position: fixed; inset: 0; z-index: 50; background: oklch(20.7% 0.03 172.2 / 0.46);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: scrimIn .28s ease; }
@media (min-width: 768px) { .scrim { align-items: center; padding: 24px; } }
@keyframes scrimIn { from { opacity: 0; } to { opacity: 1; } }
.scrim.closing { animation: scrimOut .3s ease forwards; }
@keyframes scrimOut { to { opacity: 0; } }

.modal {
  position: relative; width: 100%; max-width: 560px;
  background: var(--bg); color: var(--ink-2);
  display: flex; flex-direction: column;
  max-height: 92dvh;
  border-radius: 30px 30px 0 0;
  box-shadow: 0 -10px 50px oklch(25% 0.043 169.2 / 0.34);
  animation: sheetUp .42s cubic-bezier(.22,.85,.26,1);
}
@media (min-width: 768px) {
  .modal { border-radius: 30px; max-height: 88dvh; box-shadow: var(--sh-3), 0 30px 80px oklch(25% 0.043 169.2 / 0.4);
    animation: dialogIn .38s cubic-bezier(.22,.85,.26,1); }
}
.scrim.closing .modal { animation: sheetDown .3s cubic-bezier(.5,0,.7,.3) forwards; }
@media (min-width: 768px) { .scrim.closing .modal { animation: dialogOut .26s ease forwards; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetDown { to { transform: translateY(100%); } }
@keyframes dialogIn { from { transform: translateY(18px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes dialogOut { to { transform: translateY(10px) scale(.98); opacity: 0; } }

.modal__grip { width: 42px; height: 5px; border-radius: 999px; background: var(--line); margin: 12px auto 0; flex: 0 0 auto; }
@media (min-width: 768px) { .modal__grip { display: none; } }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 26px 8px; flex: 0 0 auto; }
.modal__body { padding: 0 26px 26px; overflow-y: auto; display: flex; flex-direction: column; }
@media (min-width: 768px) { .modal__head { padding-top: 22px; } .modal__body { padding: 0 30px 30px; } }

/* =====================================================================
   BREATHE OVERLAY (full screen) + TOAST
   ===================================================================== */
.breathe { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--grad-mesh); }
.breathe__noise { position: absolute; inset: 0; opacity: .4; mix-blend-mode: soft-light; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.breathe__orb { width: 180px; height: 180px; border-radius: 50%; position: relative;
  background:
    radial-gradient(36% 32% at 32% 26%, oklch(100% 0 89.9) 0%, oklch(100% 0 89.9 / 0) 44%),
    radial-gradient(120% 120% at 30% 22%, oklch(94.8% 0.041 163.2), oklch(72% 0.128 172.5) 60%, oklch(46.8% 0.089 169.4));
  box-shadow: inset -12px -18px 36px oklch(29.2% 0.052 174.7 / 0.4), 0 30px 60px oklch(29.2% 0.051 174.1 / 0.35);
  animation: breath 8s ease-in-out infinite; }
@media (min-width: 768px) { .breathe__orb { width: 240px; height: 240px; } }
@keyframes breath { 0%,100% { transform: scale(.7); } 50% { transform: scale(1.18); } }
.breathe__label { margin-top: 48px; font: var(--fw-display) 24px var(--font-display); color: oklch(23.2% 0.038 171.6); letter-spacing: -.02em; white-space: nowrap; animation: breathTxt 8s ease-in-out infinite; }
@keyframes breathTxt { 0%,100% { opacity: .85; } 25% { opacity: 1; } 50% { opacity: .85; } 75% { opacity: 1; } }
.breathe__x { position: absolute; top: 24px; right: 24px; width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: oklch(100% 0 89.9 / 0.45); color: oklch(29.6% 0.052 172.7); display: grid; place-items: center; }
.breathe__x svg { width: 22px; height: 22px; }

.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); z-index: 200;
  display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px;
  background: oklch(22.7% 0.025 173.2 / 0.92); color: oklch(97.1% 0.021 161.5); font: var(--fw-strong) 14px var(--font-body); white-space: nowrap;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 3px 10px oklch(29% 0.05 173 / .3), 0 14px 36px oklch(29% 0.05 173 / .42), 0 26px 56px oklch(61.8% 0.122 232.1 / .14); animation: toastIn .3s cubic-bezier(.2,.8,.3,1); }
.toast svg { width: 18px; height: 18px; color: var(--green-300); }
@media (min-width: 768px) { .toast { bottom: 28px; left: auto; right: 28px; transform: none; animation: toastInR .3s cubic-bezier(.2,.8,.3,1); } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastInR { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* =====================================================================
   WELCOME (responsive hero)
   ===================================================================== */
.welcome { position: relative; min-height: 100dvh; overflow: hidden;
  background: var(--grad-mesh); display: flex; flex-direction: column; }
.welcome__noise { position: absolute; inset: 0; opacity: .4; mix-blend-mode: soft-light; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.welcome__inner {
  position: relative; flex: 1 1 auto; width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 40px 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
}
@media (min-width: 900px) {
  .welcome__inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 48px; padding: 56px 64px; }
}
.welcome__copy { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 460px; }
@media (min-width: 900px) { .welcome__copy { align-items: flex-start; text-align: left; flex: 1 1 0; } }
.welcome__eyebrow { font: var(--fw-mono) 13px var(--font-mono); letter-spacing: .22em; text-transform: uppercase; color: oklch(42.2% 0.078 171.3); }
.welcome__h1 { font: var(--fw-display) 40px var(--font-display); letter-spacing: -.04em; line-height: 1.08; color: oklch(23.2% 0.038 171.6); margin: 14px 0 0; }
@media (min-width: 900px) { .welcome__h1 { font-size: 56px; } }
@media (min-width: 1200px) { .welcome__h1 { font-size: 64px; } }
.welcome__h1 .grad { background: linear-gradient(120deg,oklch(46.8% 0.089 169.4),oklch(61.8% 0.122 232.1)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.welcome__lede { color: oklch(33.5% 0.057 173.6); font-size: 16px; font-weight: var(--fw-label); margin-top: 22px; max-width: 360px; line-height: 1.6; }
@media (min-width: 900px) { .welcome__lede { font-size: 18px; max-width: 420px; } }
.welcome__visual { position: relative; flex: 0 0 auto; display: grid; place-items: center; }
.welcome__orb { width: 150px; height: 150px; }
@media (min-width: 600px) { .welcome__orb { width: 200px; height: 200px; } }
@media (min-width: 900px) { .welcome__orb { width: 300px; height: 300px; } }
@media (min-width: 1200px) { .welcome__orb { width: 360px; height: 360px; } }
.welcome__panel { position: relative; padding: 20px; border-radius: 28px; width: 100%; max-width: 460px; }
.welcome__cta { width: 100%; justify-content: center; display: flex; }
.welcome__alt { width: 100%; margin-top: 12px; padding: 15px; border-radius: 16px; border: none;
  background: oklch(100% 0 89.9 / 0.4); color: oklch(33.5% 0.057 173.6); font: var(--fw-strong) 15px var(--font-body); cursor: pointer; }
.welcome__foot { position: relative; padding: 0 26px 40px; display: flex; justify-content: center; }
@media (min-width: 900px) { .welcome__foot { display: none; } }
.welcome__cta-desk { display: none; }
@media (min-width: 900px) { .welcome__cta-desk { display: flex; flex-direction: column; gap: 12px; margin-top: 34px; width: 100%; max-width: 360px; } }

/* =====================================================================
   LOGIN (role select + Google) — shares welcome's mesh + frost language
   ===================================================================== */
.login { position: relative; min-height: 100dvh; overflow: hidden;
  background: var(--grad-mesh); display: flex; align-items: center; justify-content: center;
  padding: 28px 22px; }
.login__noise { position: absolute; inset: 0; opacity: .4; mix-blend-mode: soft-light; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.login__back { position: absolute; top: 22px; left: 22px; z-index: 2; width: 44px; height: 44px; border-radius: 14px;
  border: none; cursor: pointer; display: grid; place-items: center;
  background: oklch(100% 0 89.9 / 0.45); color: oklch(29.6% 0.052 172.7);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.login__back:hover { background: oklch(100% 0 89.9 / 0.65); }
.login__back svg { width: 20px; height: 20px; }

.login__card { position: relative; z-index: 1; width: 100%; max-width: 432px;
  padding: 38px 30px 26px; border-radius: 32px; word-break: keep-all; line-break: strict;
  animation: riseInLogin .5s var(--ease-spring); }
@keyframes riseInLogin { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .login__card { animation: none; } }

.login__brand { display: flex; flex-direction: column; align-items: center; text-align: center; }
.login__orb { width: 60px; height: 60px; }
.login__eyebrow { font: var(--fw-mono) 12px var(--font-mono); letter-spacing: .22em; text-transform: uppercase;
  color: oklch(42.2% 0.078 171.3); margin-top: 16px; }
.login__back { display: none; }
.login__title { font: var(--fw-display) 30px var(--font-display); letter-spacing: -.03em; line-height: 1.14;
  color: oklch(23.2% 0.038 171.6); margin: 10px 0 0; word-break: keep-all; }
.login__sub { font: var(--fw-label) 15px var(--font-body); line-height: 1.55; color: oklch(33.5% 0.057 173.6); margin: 12px 0 0; word-break: keep-all; }
.login__rolelabel { font: var(--fw-mono) 11px var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
  color: oklch(42.2% 0.078 171.3); margin: 28px 0 0; text-align: center; }

.login__roles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.role { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 16px 15px 15px; border-radius: 20px; cursor: pointer; text-align: left;
  border: 1.5px solid oklch(100% 0 89.9 / 0.55); background: oklch(100% 0 89.9 / 0.42);
  transition: transform var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease),
              background var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease); }
.role:hover { transform: translateY(-2px); border-color: oklch(64.7% 0.134 162.2 / 0.7); }
.role[data-on] { border-color: var(--green-500); background: oklch(100% 0 89.9 / 0.78);
  box-shadow: 0 0 0 3px oklch(64.7% 0.134 162.2 / 0.18), 0 10px 26px oklch(46.8% 0.089 169.4 / 0.18); }
.role:focus-visible { outline: 2px solid var(--teal-400); outline-offset: 2px; }
.role__ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: oklch(100% 0 89.9 / 0.6); color: oklch(33.5% 0.057 173.6);
  transition: background var(--dur-base) var(--ease), color var(--dur-base) var(--ease); }
.role__ic svg { width: 22px; height: 22px; }
.role[data-on] .role__ic { background: var(--grad-signature); color: oklch(23.2% 0.038 171.6); }
.role__t { font: var(--fw-display) 17px var(--font-display); letter-spacing: -.01em; color: oklch(23.2% 0.038 171.6); }
.role__s { font: var(--fw-label) 12px var(--font-body); line-height: 1.45; color: oklch(42.2% 0.078 171.3); }
.role__check { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; background: var(--green-500); color: oklch(100% 0 89.9);
  opacity: 0; transform: scale(.6); transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease); }
.role__check svg { width: 13px; height: 13px; }
.role[data-on] .role__check { opacity: 1; transform: none; }

.login__google { margin-top: 22px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 15px; border-radius: 16px; border: 1px solid oklch(100% 0 89.9 / 0.8);
  background: oklch(100% 0 89.9); color: oklch(23.2% 0.038 171.6);
  font: var(--fw-strong) 15px var(--font-body); cursor: pointer;
  box-shadow: 0 4px 14px oklch(41.9% 0.076 171.9 / 0.18);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-base) var(--ease); }
.login__google:hover { transform: translateY(-1px); box-shadow: 0 8px 22px oklch(41.9% 0.076 171.9 / 0.26); }
.login__google:active { transform: translateY(1px); }
.login__google:focus-visible { outline: 2px solid var(--teal-400); outline-offset: 2px; }
.login__g { width: 20px; height: 20px; display: grid; flex: 0 0 auto; }
.login__g svg { width: 20px; height: 20px; }

.login__hint { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 8px;
  font: var(--fw-mono) 11px var(--font-mono); letter-spacing: .04em; color: oklch(42.2% 0.078 171.3); }
.login__hint-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-500); flex: 0 0 auto;
  box-shadow: 0 0 0 4px oklch(64.7% 0.134 162.2 / 0.2); }

.login__terms { margin: 18px 0 0; text-align: center; font: var(--fw-label) 11.5px var(--font-body); line-height: 1.6;
  color: oklch(42.2% 0.078 171.3 / 0.85); }
.login__terms b { font-weight: var(--fw-strong); color: oklch(33.5% 0.057 173.6); }

/* mood row should wrap gracefully if narrow */
.mood-flex { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.mood-flex .mood { flex: 1 1 0; min-width: 58px; }

@keyframes screenFade { from { transform: translateY(10px); } to { transform: none; } }
.screen-fade { animation: screenFade var(--dur-slow) var(--ease-spring); }

/* tap feedback (shared) */
.tap { transition: transform var(--dur-fast) var(--ease); }
.tap:active { transform: scale(.97); }

/* intensity knob */
.intensity__knob { position: absolute; top: 50%; transform: translate(-50%,-50%); width: 26px; height: 26px; border-radius: 50%;
  background: oklch(100% 0 89.9); box-shadow: 0 3px 8px oklch(38% 0.06 166 / .25), inset 0 0 0 4px var(--green-400); cursor: grab; }
.intensity__knob:active { cursor: grabbing; }

/* profile rows */
.prow { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-soft); cursor: pointer; transition: border var(--dur-base) var(--ease), transform var(--dur-base) var(--ease); }
.prow:hover { border-color: var(--green-200); transform: translateY(-1px); }
.prow__ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--green-600); flex: 0 0 auto; }
.prow__ic svg { width: 19px; height: 19px; }
.switch { width: 50px; height: 30px; border-radius: 999px; background: var(--line); position: relative; transition: background .25s; flex: 0 0 auto; cursor: pointer; }
.switch[data-on] { background: var(--green-500); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: oklch(100% 0 89.9); box-shadow: 0 2px 5px oklch(38% 0.06 166 / .25); transition: transform .25s; }
.switch[data-on]::after { transform: translateX(20px); }

/* week bars / chart heights stay reasonable on wide cards */
.weekbars { display: flex; align-items: flex-end; gap: 9px; height: 120px; }
.weekbars i { flex: 1; border-radius: 8px 8px 4px 4px; background: var(--grad-vert); opacity: .9; }
.weekbars i[data-low] { background: var(--surface-2); border: 1px solid var(--line); }
.weekday { display: flex; gap: 9px; margin-top: 8px; }
.weekday span { flex: 1; text-align: center; font: var(--fw-mono) 10px var(--font-mono); color: var(--ink-3); }
.appseg { display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.appseg button { flex: 1; border: none; background: none; cursor: pointer; padding: 11px 0; border-radius: 999px;
  font: var(--fw-strong) 14px var(--font-body); color: var(--ink-3); }
.appseg button[data-on] { background: var(--grad-signature); color: oklch(29.8% 0.055 171.9); box-shadow: 0 2px 5px oklch(56.3% 0.116 162.8 / .26), 0 4px 12px oklch(64.7% 0.134 162.2 / .3); }
.trend {
  position: relative; height: 170px; border-radius: 22px; overflow: hidden;
  /* Light (default): 밝은 면 + 진한 라인 — 면과 충분한 명도차 */
  --plot-bg: linear-gradient(165deg, oklch(96.5% 0.022 164), oklch(95.2% 0.030 206));
  --plot-grid: oklch(25.8% 0.035 173.6 / .10);
  --plot-ln-a: var(--green-600);
  --plot-ln-b: var(--cyan-600);
  --plot-fill: oklch(61.8% 0.122 232.1 / .18);
  background: var(--plot-bg);
  border: 1px solid var(--line-soft);
}
[data-theme="dark"] .trend {
  /* Dark: 깊은 면 + 밝은 시그니처 라인 */
  --plot-bg: linear-gradient(165deg, oklch(27.5% 0.040 171.0), oklch(21.5% 0.035 196.0));
  --plot-grid: oklch(100% 0 0 / .10);
  --plot-ln-a: #7ef0b4;
  --plot-ln-b: #46d6f5;
  --plot-fill: oklch(71.7% 0.130 224.5 / .30);
  border-color: transparent;
}
@media (min-width: 1024px) { .trend { height: 230px; } }
