/* ══════════════════════════════════════════════════════════════════════════
   Sidecue dashboard — v2 redesign layer (Oct 2026)
   Loaded after tokens/components/app. Clean & light: Inter, brand #3662E2,
   surface #F6F7F9, white cards with hairline borders.
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  --sc-drawer-width: 248px;
  --sc-content-max: 1240px;
  --r-card: 16px;
  --line: var(--md-sys-color-outline-variant);
  --line-soft: color-mix(in srgb, var(--md-sys-color-outline-variant) 60%, transparent);
  --ink: var(--md-sys-color-on-surface);
  --muted: var(--md-sys-color-on-surface-variant);
  --brand: #3662e2;
  --brand-ink: #2b50c0;
  --brand-soft: #e8eefc;
  --meet-ink: #8a4b00;
  --meet-soft: #fff4e5;
  --ok-ink: #157f3d;
  --ok-soft: #e3f6ea;
  --card-bg: #ffffff;
}
html.dark {
  --brand-ink: #a9c0ff;
  --brand-soft: #22305a;
  --meet-ink: #f5b35b;
  --meet-soft: #3a2a12;
  --ok-ink: #6ddba7;
  --ok-soft: #12321f;
  --card-bg: var(--md-sys-color-surface-container-low);
}

body { background: var(--md-sys-color-surface); color: var(--ink); font-family: var(--md-ref-typeface-plain); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-ink); }

/* ── Shell ─────────────────────────────────────────────────────────────── */
.drawer {
  width: var(--sc-drawer-width);
  background: var(--card-bg);
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  gap: 4px;
}
.drawer-head { height: 44px; padding: 0 4px 0 8px; margin-bottom: 14px; }
.drawer-logo { height: 26px; }
.drawer-section-label {
  padding: 18px 12px 6px; font: 600 11px/16px var(--md-ref-typeface-plain);
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.drawer-nav { gap: 2px; }
.nav-item {
  height: 40px; padding: 0 12px; gap: 12px; border-radius: 9px;
  font: 500 14px/20px var(--md-ref-typeface-plain); color: color-mix(in srgb, var(--ink) 80%, transparent);
}
.nav-item .material-symbols-rounded { font-size: 20px; }
.nav-item:hover { background: var(--md-sys-color-surface-variant); color: var(--ink); }
.nav-item.active, .nav-item.is-active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.nav-item::before { display: none; }
.drawer-foot { border-top: 1px solid var(--line); padding-top: 12px; }
.drawer-foot .nav-item img { width: 20px; height: 20px; }

.main-content { padding: 32px 40px 64px; }
.topbar { background: var(--card-bg); border-bottom: 1px solid var(--line); }

@media (max-width: 1023px) {
  .drawer { border-radius: 0; border-right: 1px solid var(--line); }
  .main-content { padding: calc(var(--sc-topbar-height) + 20px) 16px 48px; }
}

/* ── Page header ───────────────────────────────────────────────────────── */
.page-header { margin-bottom: 24px; }
.page-title { font: 700 28px/36px var(--md-ref-typeface-brand); letter-spacing: -0.02em; }
.page-description { font: 400 15px/22px var(--md-ref-typeface-plain); color: var(--muted); }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card { background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--r-card); }
html.dark .card { background: var(--card-bg); }
.card-section { padding: 20px 22px; }
.card-title { font: 600 16px/24px var(--md-ref-typeface-plain); }
.section-title { font: 600 16px/24px var(--md-ref-typeface-plain); }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn { border-radius: 10px; height: 40px; padding: 0 16px; font: 600 14px/20px var(--md-ref-typeface-plain); }
.btn .material-symbols-rounded { margin-left: -2px; font-size: 18px; }
.btn-filled, .btn-brand { background: var(--brand); color: #fff; }
.btn-filled:hover, .btn-brand:hover { background: #2b50c0; box-shadow: none; }
.btn-tonal { background: var(--brand-soft); color: var(--brand-ink); }
.btn-outlined { border: 1px solid var(--line); color: var(--ink); background: var(--card-bg); }
.btn-outlined:hover { background: var(--md-sys-color-surface-variant); }
.btn-sm { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; }
.btn-lg { height: 46px; padding: 0 22px; }
.btn::before { display: none; }

.tag { border-radius: 999px; font: 600 12px/16px var(--md-ref-typeface-plain); padding: 3px 9px; }
.tag-primary, .tag-brand { background: var(--brand-soft); color: var(--brand-ink); }
.tag-meet { background: var(--meet-soft); color: var(--meet-ink); }
.tag-ok { background: var(--ok-soft); color: var(--ok-ink); }

.chip-f { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card-bg); font: 500 14px/20px var(--md-ref-typeface-plain); color: var(--ink); cursor: pointer; }
.chip-f.on { background: var(--ink); border-color: var(--ink); color: var(--md-sys-color-surface); }

.progress { height: 6px; border-radius: 3px; background: var(--md-sys-color-surface-variant); }
.progress-bar { background: var(--brand); border-radius: 3px; }

.kicker { font: 700 11px/16px var(--md-ref-typeface-plain); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.ic { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-ink); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ic .material-symbols-rounded { font-size: 18px; }

/* ── Home ──────────────────────────────────────────────────────────────── */
.home { display: flex; flex-direction: column; gap: 24px; }
.hero {
  position: relative; overflow: hidden; border-radius: 20px; background: #1e3a8a; color: #fff; padding: 32px;
  display: flex; flex-wrap: wrap; gap: 28px; align-items: center;
}
.hero::after { content: ''; position: absolute; right: -120px; top: -160px; width: 520px; height: 520px; border-radius: 50%; background: #3662e2; opacity: .55; }
.hero > * { position: relative; z-index: 1; }
.hero-copy { flex: 1 1 360px; display: flex; flex-direction: column; gap: 14px; }
.hero-pill { display: inline-flex; align-items: center; gap: 8px; width: max-content; font: 600 13px/18px var(--md-ref-typeface-plain); background: rgba(255,255,255,.14); padding: 6px 12px; border-radius: 999px; }
.hero h1 { margin: 0; font: 800 32px/1.15 var(--md-ref-typeface-brand); letter-spacing: -0.025em; }
.hero p { margin: 0; font-size: 16px; line-height: 1.55; color: #d6e0ff; max-width: 480px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.btn-w { background: #fff; color: #1e3a8a; }
.btn-w:hover { background: #eef2ff; }
.btn-g { background: rgba(255,255,255,.14); color: #fff; }
.btn-g:hover { background: rgba(255,255,255,.22); }
.hero-cue { flex: 1 1 320px; max-width: 420px; background: #fff; color: #0f1729; border-radius: 16px; padding: 18px; box-shadow: 0 24px 48px rgba(9,20,60,.35); display: flex; flex-direction: column; gap: 10px; }
.hero-cue .kicker { color: #2b50c0; }
.hero-cue .g { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.45; }
.hero-cue .t { display: flex; gap: 8px; font-size: 13px; line-height: 1.45; } .hero-cue .t b { color: #2b50c0; font-weight: 600; } .hero-cue .t span { color: #3b4352; }
.hero-cue .r { font-size: 13px; background: #f3f5f9; border: 1px solid #e4e7ec; padding: 6px 10px; border-radius: 8px; color: #0f1729; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.kpi { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.kpi-head { display: flex; align-items: center; gap: 8px; font: 500 13px/18px var(--md-ref-typeface-plain); color: var(--muted); }
.kpi-val { font: 700 28px/1 var(--md-ref-typeface-brand); letter-spacing: -0.02em; }
.kpi-sub { font-size: 13px; color: var(--muted); }
.kpi-usage { flex-direction: row; align-items: center; gap: 16px; }
.ring { width: 64px; height: 64px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.ring > span { width: 48px; height: 48px; border-radius: 50%; background: var(--card-bg); display: flex; align-items: center; justify-content: center; font: 700 14px/1 var(--md-ref-typeface-plain); }

.home-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.home-main { flex: 2 1 540px; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.home-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.home-side > .card { flex: 1 1 auto; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; }
.card-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; font: 600 16px/24px var(--md-ref-typeface-plain); }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 14px; border-top: 1px solid var(--line-soft); font: 600 14px/20px var(--md-ref-typeface-plain); text-decoration: none; }

.srow { display: flex; gap: 14px; padding: 16px 22px; border-top: 1px solid var(--line-soft); color: var(--ink); text-decoration: none !important; }
.srow:hover { background: color-mix(in srgb, var(--md-sys-color-surface-variant) 55%, transparent); }
.srow-ic { width: 42px; height: 42px; flex: none; border-radius: 11px; border: 1px solid var(--line); background: var(--card-bg); display: flex; align-items: center; justify-content: center; }
.srow-ic img { width: 22px; height: 22px; }
.srow-ic .material-symbols-rounded { font-size: 20px; color: var(--muted); }
.srow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.srow-top { display: flex; justify-content: space-between; gap: 12px; }
.srow-title { font: 600 15px/20px var(--md-ref-typeface-plain); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srow-when { font-size: 13px; color: var(--muted); white-space: nowrap; }
.srow-gist { font-size: 14px; line-height: 1.45; color: color-mix(in srgb, var(--ink) 80%, transparent); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.srow-meta { font-size: 12px; color: var(--muted); }

.side-pad { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.practice-promo { position: relative; overflow: hidden; border-radius: 12px; aspect-ratio: 16/9; background: #111827 center/cover no-repeat; display: block; }
.practice-promo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.55)); }
.practice-promo .play { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(255,255,255,.95); color: #0f1729; display: flex; align-items: center; justify-content: center; z-index: 1; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.practice-promo .cap { position: absolute; left: 12px; bottom: 10px; z-index: 1; color: #fff; font: 600 13px/18px var(--md-ref-typeface-plain); }
.mode-sum { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.mode-sum b { font-size: 14px; display: block; } .mode-sum span { font-size: 13px; color: var(--muted); }

.empty-inline { padding: 28px 22px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; border-top: 1px solid var(--line-soft); }
.empty-inline .material-symbols-rounded { font-size: 32px; color: var(--brand); }

/* ── Settings ──────────────────────────────────────────────────────────── */
.set-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.set-group { padding: 22px; display: flex; flex-direction: column; gap: 20px; }
.set-group + .set-group { margin-top: 20px; }
.set-group h2 { margin: 0; font: 600 16px/24px var(--md-ref-typeface-plain); display: flex; align-items: center; gap: 10px; }
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 12px 24px; align-items: center; }
.set-row > div:first-child { display: flex; flex-direction: column; gap: 3px; }
.set-label { font: 600 14px/20px var(--md-ref-typeface-plain); }
.set-help { font-size: 13px; line-height: 1.45; color: var(--muted); margin: 0; }
.seg2 { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; padding: 3px; background: var(--md-sys-color-surface-variant); border-radius: 10px; }
.seg2 button { height: 32px; border: 0; border-radius: 8px; background: transparent; font: 600 13px/18px var(--md-ref-typeface-plain); color: var(--muted); cursor: pointer; padding: 0 6px; }
.seg2 button.on { background: var(--card-bg); color: var(--ink); box-shadow: 0 1px 2px rgba(15,23,41,.12); }
.inp { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card-bg); color: var(--ink); font: 500 14px/20px var(--md-ref-typeface-plain); box-sizing: border-box; }
.inp:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
.sw2 { position: relative; width: 42px; height: 24px; border-radius: 999px; border: 0; background: #cbd2dc; cursor: pointer; justify-self: end; }
.sw2::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.sw2.on { background: var(--brand); } .sw2.on::after { left: 21px; }
.mode-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mode-card2 { text-align: left; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card-bg); color: var(--ink); cursor: pointer; display: flex; flex-direction: column; gap: 8px; font: inherit; }
.mode-card2.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.mode-card2 b { font-size: 15px; } .mode-card2 span.d { font-size: 13px; color: var(--muted); line-height: 1.45; }
.mode-card2 .ic { width: 34px; height: 34px; }
.mode-card2[data-mode="meeting"] .ic { background: var(--meet-soft); color: var(--meet-ink); }
.preview-cue { padding: 18px; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 24px; }
.kbd { font: 600 12px/18px var(--md-ref-typeface-plain); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; background: var(--md-sys-color-surface); }
.range { width: 100%; accent-color: var(--brand); }
body:not(.meet-mode) [data-only="meeting"], body.meet-mode [data-only="language"] { display: none !important; }
body:not(.meet-mode) [data-lbl="meeting"], body.meet-mode [data-lbl="language"] { display: none; }

/* ── Practice ──────────────────────────────────────────────────────────── */
.howto { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 14px 18px; }
.howto ol { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: color-mix(in srgb, var(--ink) 80%, transparent); }
.howto b { color: var(--ink); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px 24px; }
.pcard { display: flex; flex-direction: column; gap: 12px; color: var(--ink); text-decoration: none !important; }
.pscr { position: relative; aspect-ratio: 16/10; border-radius: 16px; overflow: hidden; background: #111827 center/cover no-repeat; box-shadow: 0 4px 12px rgba(15,23,41,.10); transition: transform .15s, box-shadow .15s; }
.pscr::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,0) 30%, rgba(0,0,0,0) 65%, rgba(0,0,0,.35)); }
.pcard:hover .pscr { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(15,23,41,.18); }
.pscr .bar { position: absolute; left: 12px; right: 12px; top: 10px; z-index: 1; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #e2e8f0; }
.pscr .rec { display: inline-flex; align-items: center; gap: 6px; } .pscr .rec i { width: 7px; height: 7px; border-radius: 50%; background: #f04438; }
.pscr .len { background: rgba(0,0,0,.45); padding: 2px 8px; border-radius: 999px; font-weight: 600; color: #fff; }
.pscr .play { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; z-index: 1; border-radius: 50%; background: rgba(255,255,255,.95); color: #0f1729; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0,0,0,.35); transition: transform .15s; }
.pcard:hover .play { transform: scale(1.06); }
.pmeta { display: flex; flex-direction: column; gap: 6px; }
.pmeta .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pmeta .t { font: 700 16px/22px var(--md-ref-typeface-plain); }
.pmeta .d { font-size: 13px; color: var(--muted); line-height: 1.45; }
.pmeta .v { font-size: 12px; color: color-mix(in srgb, var(--ink) 75%, transparent); }

/* ── Onboarding tour ───────────────────────────────────────────────────── */
.tour-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(15,23,41,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.tour { width: min(600px, 100%); background: var(--card-bg); color: var(--ink); border-radius: 20px; overflow: hidden; box-shadow: 0 24px 64px rgba(15,23,41,.28); }
.tour-hero { height: 190px; display: flex; align-items: center; justify-content: center; padding: 22px; box-sizing: border-box; }
.tour-body { padding: 22px 26px 20px; display: flex; flex-direction: column; gap: 12px; }
.tour-body h2 { margin: 0; font: 800 23px/1.2 var(--md-ref-typeface-brand); letter-spacing: -0.02em; }
.tour-body p { margin: 0; font-size: 15px; line-height: 1.55; color: color-mix(in srgb, var(--ink) 82%, transparent); }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.dots { display: flex; gap: 6px; } .dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--line); transition: width .2s; } .dots i.on { width: 22px; background: var(--brand); }
.tmini { flex: 1; background: #fff; color: #0f1729; border-radius: 14px; padding: 14px; box-shadow: 0 6px 18px rgba(15,23,41,.12); font-size: 13px; line-height: 1.45; }
.nav-item.tour-spot { background: #fff; color: #2b50c0; box-shadow: 0 0 0 2px var(--brand), 0 0 0 8px rgba(54,98,226,.18); position: relative; z-index: 61; }
body.touring .drawer { z-index: 61; }

/* ── Sessions / session detail tweaks ─────────────────────────────────── */
.stats-grid .stat-card { padding: 18px 20px; }
.stat-icon { border-radius: 11px; width: 42px; height: 42px; }
.stat-icon-brand { background: var(--brand-soft); color: var(--brand-ink); }
.stat-value { font: 700 24px/30px var(--md-ref-typeface-brand); letter-spacing: -0.02em; }
.session-item { border-radius: 12px; }
.cue-item { border-radius: 14px; }
.cue-gist { font-weight: 600; }
.cue-terms li strong { color: var(--brand-ink); margin-right: 8px; }
.cue-reply { background: var(--md-sys-color-surface); border: 1px solid var(--line); border-radius: 8px; }
.cue-answer ul { margin: 6px 0 0; padding-left: 18px; }

@media (max-width: 1100px) {
  .set-layout { grid-template-columns: minmax(0, 1fr); }
  .preview-cue { position: static; }
}
@media (max-width: 700px) {
  .set-row { grid-template-columns: minmax(0, 1fr); }
  .sw2 { justify-self: start; }
  .hero { padding: 22px; } .hero h1 { font-size: 26px; }
  .mode-cards { grid-template-columns: minmax(0, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Plan & billing ───────────────────────────────────────────────────── */
.plan-now { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 24px; align-items: center; padding: 20px 22px; margin-bottom: 24px; }
.plan-now-main { display: flex; flex-direction: column; gap: 4px; }
.plan-now-row { display: flex; align-items: center; gap: 10px; } .plan-now-row b { font: 700 22px/28px var(--md-ref-typeface-brand); }
.plan-now-usage { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.plan-now-usage-head { display: flex; justify-content: space-between; font-weight: 600; }
.plan-card { border-radius: var(--r-card); }
.plan-card.featured { border: 2px solid var(--brand); }
.plan-tier { font: 700 18px/24px var(--md-ref-typeface-brand); }
.plan-note { font-size: 13px; color: var(--muted); min-height: 18px; }
.plan-feats .material-symbols-rounded { color: var(--brand); }
@media (max-width: 900px) { .plan-now { grid-template-columns: minmax(0, 1fr); } }

/* Settings preview cue (inside a card) */
.set-group .preview-cue { position: static; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--md-sys-color-surface); }
.preview-cue .g { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.45; color: var(--ink); }
.preview-cue .t { display: flex; gap: 8px; font-size: 13px; line-height: 1.45; } .preview-cue .t b { color: var(--brand-ink); font-weight: 600; } .preview-cue .t span { color: var(--muted); }
.preview-cue .r { font-size: 12.5px; background: var(--card-bg); border: 1px solid var(--line); padding: 5px 9px; border-radius: 8px; color: var(--ink); }
.set-layout select.inp { appearance: auto; }
.cue-list { margin: 4px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.hero .hero-cue p, .hero .hero-cue .g { color: #0f1729; }
.kpi-usage .kpi-head { white-space: nowrap; }
.howto { flex-wrap: nowrap; }
.howto ol { flex: 1; min-width: 0; }
.billing-toggle .seg2 { width: auto !important; min-width: 300px; }
.billing-toggle .seg2 button { white-space: nowrap; padding: 0 14px; }
@media (max-width: 700px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px; }
  .kpis .kpi-usage { grid-column: 1 / -1; }
  .kpis .kpi { padding: 16px; }
  .howto { flex-wrap: wrap; }
}

/* ── Notes & files ─────────────────────────────────────────── */
.notes-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 960px) { .notes-layout { grid-template-columns: minmax(0, 1fr); } }
.notes-editor { display: flex; flex-direction: column; }
.notes-head-right { display: flex; align-items: center; gap: 8px; }
.notes-save { font: 500 13px/20px var(--md-ref-typeface-plain); color: var(--muted); }
.notes-textarea {
  display: block; width: 100%; min-height: 440px; box-sizing: border-box; resize: vertical;
  padding: 4px 22px 18px; border: 0; outline: none; background: transparent; color: var(--ink);
  font: 400 15px/1.7 var(--md-ref-typeface-plain);
}
.notes-textarea::placeholder { color: var(--muted); opacity: .75; }
.notes-foot { display: flex; justify-content: space-between; padding: 12px 22px; border-top: 1px solid var(--line-soft); font: 500 12.5px/18px var(--md-ref-typeface-plain); color: var(--muted); }
.notes-side { display: flex; flex-direction: column; gap: 20px; }
.notes-files { display: flex; flex-direction: column; padding-bottom: 18px; }
.notes-file-list { display: flex; flex-direction: column; }
.notes-file { display: flex; align-items: center; gap: 12px; padding: 10px 22px; border-top: 1px solid var(--line-soft); }
.notes-file-ic { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); display: inline-flex; align-items: center; justify-content: center; }
.notes-file-ic .material-symbols-rounded { font-size: 19px; }
.notes-file-main { flex: 1; min-width: 0; }
.notes-file-name { margin: 0; font: 600 14px/20px var(--md-ref-typeface-plain); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notes-file-meta { margin: 0; font: 400 12.5px/18px var(--md-ref-typeface-plain); color: var(--muted); }
.notes-drop {
  margin: 12px 22px 0; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  padding: 14px 16px; border-radius: 14px; border: 1.5px dashed var(--line); background: transparent; color: var(--ink);
  font: 400 13px/18px var(--md-ref-typeface-plain);
}
.notes-drop:hover, .notes-drop.drag-over { border-color: var(--brand, #3662E2); background: var(--brand-soft); }
.notes-drop > .material-symbols-rounded { font-size: 24px; color: var(--brand-ink); }
.notes-drop b { font-weight: 600; font-size: 14px; }
.notes-usage { display: flex; align-items: center; gap: 12px; margin: 16px 22px 0; font: 500 12.5px/18px var(--md-ref-typeface-plain); }
.notes-usage .progress { flex: 1; }
.notes-tips { padding: 20px 22px; }
.notes-tips .kicker { margin: 0 0 12px; }
.notes-tips ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.notes-tips li { display: flex; gap: 10px; font: 400 14px/20px var(--md-ref-typeface-plain); color: var(--ink); }
.notes-tips li .material-symbols-rounded { font-size: 19px; color: var(--brand-ink); flex: none; margin-top: 1px; }
.notes-tips li b { font-weight: 600; }
.notes-privacy { display: flex; align-items: center; gap: 6px; margin: 16px 0 0; font-size: 12.5px; }
.notes-privacy .material-symbols-rounded { font-size: 16px; }

/* Sidebar always spans the full viewport height and scrolls on its own. The
   body background paints the same column so long pages (and full-page
   captures) never show the sidebar ending early. */
.drawer { top: 0; bottom: 0; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
@media (min-width: 1024px) {
  body:not(.auth-mode) {
    background: linear-gradient(to right, var(--card-bg) 0 calc(var(--sc-drawer-width) - 1px), var(--line) calc(var(--sc-drawer-width) - 1px) var(--sc-drawer-width), var(--md-sys-color-surface) var(--sc-drawer-width)) !important;
  }
}
