/* =====================================================================
   Study with Funi — styles (v3)
   Soft dashboard look (cream + lavender + pastel tiles) with cartoons.
   Every colour is a token; each theme sets ALL tokens so text stays readable.
   ===================================================================== */

/* ---------- Theme: Lavender (default, light) ---------- */
:root, [data-theme="lavender"] {
  --bg: #FAF5F4; --bg-2: #F5EEFA;
  --card: #FFFFFF; --card-2: #F4EFFC; --card-3: #EBE3FA;
  --ink: #2B2540; --muted: #615A7C; --line: #EDE6F3;
  --accent: #7556DC; --accent-2: #5C40C0; --on-accent: #FFFFFF;
  --accent-soft: #ECE5FD; --accent-soft-ink: #4C34A6;
  --peach: #FDE7DC; --peach-ink: #8F3A17; --peach-mid: #F4B79A;
  --mint: #E2F4EA; --mint-ink: #1C6447; --mint-mid: #8FD3B0;
  --butter: #FDF1D2; --butter-ink: #6F4F0B; --butter-mid: #F6CD5C;
  --pink: #FCE6EC; --pink-ink: #93284D; --pink-mid: #F4A5B8;
  --sky: #E1EBFF; --sky-ink: #2B4C9A; --sky-mid: #9DB9F5;
  --lav-mid: #B9A3F7;
  --danger: #B42318; --ok: #1E7A4E; --alert: #C23B5C; --on-alert: #FFFFFF;
  --shadow: 0 14px 34px -20px rgba(75, 52, 150, 0.4);
  --hero-1: #8565E6; --hero-2: #6243CC; --on-hero: #FFFFFF; --on-hero-soft: #EDE6FF;
  --bubble-me: #7556DC; --on-bubble-me: #FFFFFF;
  --rem-bg: linear-gradient(170deg, #FBEAF1, #F3E6F8);
  color-scheme: light;
}
/* ---------- Theme: Blush (pink, light) ---------- */
[data-theme="blush"] {
  --bg: #FBF1F4; --bg-2: #F6E3EA;
  --card: #FFFFFF; --card-2: #FBEDF2; --card-3: #F6DFE8;
  --ink: #3A2430; --muted: #72505E; --line: #F0DCE4;
  --accent: #B04A72; --accent-2: #8E345A; --on-accent: #FFFFFF;
  --accent-soft: #F9E0EA; --accent-soft-ink: #842C51;
  --peach: #FDE6DA; --peach-ink: #8F3A17; --peach-mid: #F4B79A;
  --mint: #DFF2EA; --mint-ink: #1C6447; --mint-mid: #8FD3B0;
  --butter: #FCF0D3; --butter-ink: #6F4F0B; --butter-mid: #F6CD5C;
  --pink: #F9DCE8; --pink-ink: #842C51; --pink-mid: #E9A6BF;
  --sky: #E4ECFF; --sky-ink: #2B4C9A; --sky-mid: #9DB9F5;
  --lav-mid: #D79AB3;
  --danger: #B42318; --ok: #1E7A4E; --alert: #C23B5C; --on-alert: #FFFFFF;
  --shadow: 0 14px 34px -20px rgba(150, 52, 95, 0.4);
  --hero-1: #D0739A; --hero-2: #A84470; --on-hero: #FFFFFF; --on-hero-soft: #FFE6F0;
  --bubble-me: #B04A72; --on-bubble-me: #FFFFFF;
  --rem-bg: linear-gradient(170deg, #FBEAF1, #F7E3EC);
  color-scheme: light;
}
/* ---------- Theme: Midnight (dark purple) ---------- */
[data-theme="midnight"] {
  --bg: #14101E; --bg-2: #1B1528;
  --card: #211A31; --card-2: #2A2140; --card-3: #33294C;
  --ink: #F2EDFC; --muted: #B7ADCF; --line: #382D50;
  --accent: #A890FB; --accent-2: #C6B5FF; --on-accent: #1A1330;
  --accent-soft: #342860; --accent-soft-ink: #DCD0FF;
  --peach: #4A2D25; --peach-ink: #FFC7AE; --peach-mid: #8A4A36;
  --mint: #1D3B31; --mint-ink: #A6EBCB; --mint-mid: #2F6B55;
  --butter: #3E3320; --butter-ink: #F6DA92; --butter-mid: #7A6330;
  --pink: #47243A; --pink-ink: #FBBAD6; --pink-mid: #84405F;
  --sky: #22304F; --sky-ink: #B9CCFF; --sky-mid: #3D5590;
  --lav-mid: #5E4AA8;
  --danger: #FF9B91; --ok: #8BE0B5; --alert: #F58AA8; --on-alert: #2A0F1E;
  --shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.7);
  --hero-1: #3E2F70; --hero-2: #2A1F52; --on-hero: #F4EFFF; --on-hero-soft: #CFC3F5;
  --bubble-me: #A890FB; --on-bubble-me: #1A1330;
  --rem-bg: linear-gradient(170deg, #1E1530, #14101E);
  color-scheme: dark;
}
/* ---------- Theme: Night (dark charcoal, rose accent) ---------- */
[data-theme="night"] {
  --bg: #0F0F13; --bg-2: #15151B;
  --card: #1A1A21; --card-2: #22222B; --card-3: #2B2B36;
  --ink: #F3F2F7; --muted: #B2B0C0; --line: #30303C;
  --accent: #F0A5C7; --accent-2: #F8C6DC; --on-accent: #2A0F1E;
  --accent-soft: #3A2431; --accent-soft-ink: #F9C9DE;
  --peach: #43291F; --peach-ink: #FFC7AE; --peach-mid: #84483A;
  --mint: #18352B; --mint-ink: #A6EBCB; --mint-mid: #2D6551;
  --butter: #3A311E; --butter-ink: #F6DA92; --butter-mid: #77622F;
  --pink: #40202F; --pink-ink: #FBBAD6; --pink-mid: #7E3D59;
  --sky: #1E2A45; --sky-ink: #B9CCFF; --sky-mid: #3A4F84;
  --lav-mid: #5B4A86;
  --danger: #FF9B91; --ok: #8BE0B5; --alert: #F58AA8; --on-alert: #2A0F1E;
  --shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.8);
  --hero-1: #3A2533; --hero-2: #261822; --on-hero: #FCEFF5; --on-hero-soft: #E9C3D5;
  --bubble-me: #F0A5C7; --on-bubble-me: #2A0F1E;
  --rem-bg: linear-gradient(170deg, #1C1419, #0F0F13);
  color-scheme: dark;
}

/* ---------- Theme: Ocean (blue, light) ---------- */
[data-theme="ocean"] {
  --bg: #EEF3FF; --bg-2: #E4ECFC;
  --card: #FFFFFF; --card-2: #EEF2FD; --card-3: #E0E8FB;
  --ink: #18213D; --muted: #56607E; --line: #D9E2F7;
  --accent: #3550D4; --accent-2: #2A40B0; --on-accent: #FFFFFF;
  --accent-soft: #E0E8FF; --accent-soft-ink: #26389C;
  --peach: #FDE7DC; --peach-ink: #8F3A17; --peach-mid: #F4B79A;
  --mint: #DDF3EA; --mint-ink: #1C6447; --mint-mid: #8FD3B0;
  --butter: #FFF1D2; --butter-ink: #6F4F0B; --butter-mid: #F6CD5C;
  --pink: #DDF1FA; --pink-ink: #155E7A; --pink-mid: #8CCBE4;
  --sky: #E0E8FF; --sky-ink: #26389C; --sky-mid: #9DB2F5;
  --lav-mid: #A7B8F5;
  --danger: #B42318; --ok: #1E7A4E; --alert: #C2410C; --on-alert: #FFFFFF;
  --shadow: 0 14px 34px -20px rgba(40, 70, 170, 0.42);
  --hero-1: #4F6BE8; --hero-2: #2B3FB0; --on-hero: #FFFFFF; --on-hero-soft: #DCE4FF;
  --bubble-me: #3550D4; --on-bubble-me: #FFFFFF;
  --rem-bg: linear-gradient(170deg, #E6EEFF, #E3F2FA);
  color-scheme: light;
}
/* ---------- Theme: Deep navy (dark blue) ---------- */
[data-theme="navy"] {
  --bg: #0E1528; --bg-2: #121B32;
  --card: #17213A; --card-2: #1E2A47; --card-3: #263455;
  --ink: #EAF0FF; --muted: #A9B5D6; --line: #2A3758;
  --accent: #7D95FF; --accent-2: #A9B9FF; --on-accent: #0E1528;
  --accent-soft: #24346A; --accent-soft-ink: #D3DCFF;
  --peach: #43291F; --peach-ink: #FFC7AE; --peach-mid: #84483A;
  --mint: #173A31; --mint-ink: #A6EBCB; --mint-mid: #2D6551;
  --butter: #3A311E; --butter-ink: #F6DA92; --butter-mid: #77622F;
  --pink: #14384A; --pink-ink: #A8E0F5; --pink-mid: #2F6A85;
  --sky: #1E2C52; --sky-ink: #B9CCFF; --sky-mid: #3A4F8A;
  --lav-mid: #3E52A0;
  --danger: #FF9B91; --ok: #8BE0B5; --alert: #FFB37A; --on-alert: #2A1405;
  --shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.75);
  --hero-1: #3A55D0; --hero-2: #22357F; --on-hero: #FFFFFF; --on-hero-soft: #CBD6FF;
  --bubble-me: #7D95FF; --on-bubble-me: #0E1528;
  --rem-bg: linear-gradient(170deg, #16203A, #0E1528);
  color-scheme: dark;
}

:root {
  --display: "Fredoka", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-lg: 26px; --r-md: 20px; --r-sm: 14px;
  --nav-h: 72px;
}

/* ---------- base ---------- */
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.45;
  -webkit-tap-highlight-color: transparent; overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 10; }
button, input, select, textarea { font-family: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; color: var(--ink); }
h1 { font-size: 25px; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 17px; font-weight: 600; }
p { margin: 0; color: var(--muted); }
small { color: var(--muted); font-weight: 700; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; }

.app {
  max-width: 600px; margin: 0 auto;
  padding-top: calc(env(safe-area-inset-top, 0px) + 16px);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--nav-h) + 32px);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.view { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }

/* ---------- surfaces ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.link { border: 0; background: none; color: var(--accent); font-weight: 800; font-size: 14px; cursor: pointer; padding: 6px 2px; }
:root:not([data-theme="midnight"]):not([data-theme="night"]):not([data-theme="navy"]) .link { color: var(--accent-2); }
.empty { border: 2px dashed var(--line); border-radius: var(--r-md); padding: 20px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--card); }
.empty b { font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--ink); }
.empty span { color: var(--muted); font-size: 14px; }
.hint { font-size: 13px; color: var(--muted); }
.hint.strong { font-weight: 700; color: var(--accent-soft-ink); }
.status-line { text-align: center; font-size: 14px; color: var(--muted); }
.page-head { display: flex; align-items: center; gap: 12px; }
.page-head h1 { font-size: 23px; }

/* ---------- buttons & inputs ---------- */
.btn { min-height: 48px; padding: 0 18px; border-radius: 16px; border: 0; cursor: pointer; font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:active { background: var(--accent-2); }
.btn.soft-btn { background: var(--accent-soft); color: var(--accent-soft-ink); }
.btn.ghost { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); }
.btn.danger { background: transparent; color: var(--danger); border: 1.5px solid var(--line); }
.btn.small { min-height: 38px; padding: 0 14px; border-radius: 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn svg, .icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.big-cta { min-height: 54px; font-size: 16px; }
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 16px; flex-shrink: 0; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.badge { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg); }
.badge.pinkb { background: var(--alert); color: var(--on-alert); }
label, .label { font-size: 14px; font-weight: 800; color: var(--ink); display: block; margin: 12px 0 6px; }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], input[type=search], input[type=url], input[type=email], input:not([type]), select, textarea {
  width: 100%; min-height: 48px; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 0 14px; font-size: 16px; font-weight: 700; background: var(--card); color: var(--ink);
}
textarea { padding: 12px 14px; min-height: 90px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.85; }
input[type=range] { width: 100%; accent-color: var(--accent); height: 30px; margin: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-error { color: var(--danger); font-weight: 700; font-size: 14px; margin-top: 10px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-soft-ink); font-weight: 800; margin: 0; cursor: pointer; }
.switch input { width: 24px; height: 24px; accent-color: var(--accent); flex-shrink: 0; }
.search { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--card); padding: 0 14px; color: var(--muted); }
.search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; flex-shrink: 0; }
.search input { border: 0; padding: 0; min-height: 48px; background: transparent; }
.search input:focus { outline: none; }
.search:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }

.seg { display: flex; gap: 6px; background: var(--card-2); padding: 5px; border-radius: 18px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 1 0 auto; min-height: 40px; padding: 0 14px; border: 0; border-radius: 14px; background: transparent; color: var(--accent-soft-ink); font-weight: 800; font-size: 14px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }
.seg button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 2px 10px -6px rgba(0,0,0,0.35); }
.seg.two-seg button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.seg .count { display: inline-flex; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 5px; margin-left: 6px; background: var(--alert); color: var(--on-alert); font-size: 11px; align-items: center; justify-content: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); color: var(--accent-soft-ink); font-weight: 800; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip:disabled { opacity: 0.45; cursor: default; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; white-space: nowrap; border: 0; }
.pill.as-btn { cursor: pointer; min-height: 30px; }
.pill.lav { background: var(--accent-soft); color: var(--accent-soft-ink); }
.pill.peach { background: var(--peach); color: var(--peach-ink); }
.pill.mint { background: var(--mint); color: var(--mint-ink); }
.pill.butter { background: var(--butter); color: var(--butter-ink); }
.pill.pink { background: var(--pink); color: var(--pink-ink); }
.pill.sky { background: var(--sky); color: var(--sky-ink); }
.dot-live { width: 9px; height: 9px; border-radius: 5px; background: var(--ok); display: inline-block; }
.dot-off { width: 9px; height: 9px; border-radius: 5px; background: var(--muted); opacity: 0.5; display: inline-block; }

/* ---------- avatars & art ---------- */
.ava { width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; overflow: hidden; display: block; }
.ava.sm { width: 40px; height: 40px; }
.ava.lg { width: 84px; height: 84px; }
.ava.xl { width: 112px; height: 112px; }
.ava-svg, .ava-photo { width: 100%; height: 100%; display: block; object-fit: cover; }
.face { width: 30px; height: 30px; flex-shrink: 0; display: inline-block; }
.face.lg { width: 44px; height: 44px; }
.face-svg { width: 100%; height: 100%; display: block; }
.scene-svg { width: 100%; height: auto; display: block; }
.ava-wrap { position: relative; flex-shrink: 0; }
.ava-wrap .live { position: absolute; right: 1px; bottom: 1px; width: 14px; height: 14px; border-radius: 7px; background: var(--ok); border: 2px solid var(--card); }
.me-btn { border: 0; padding: 0; background: var(--accent-soft); border-radius: 18px; cursor: pointer; overflow: hidden; flex-shrink: 0; }
.me-btn .ava { border-radius: 18px; width: 50px; height: 50px; }

/* ---------- dashboard ---------- */
.dash-head { display: flex; align-items: center; gap: 10px; }
.dash-head h1 { font-size: 22px; }
.dash-head p { font-size: 13px; }
.dash-grid { display: flex; flex-direction: column; gap: 14px; }
.next-card { width: 100%; border: 0; cursor: pointer; text-align: left; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 22px; background: linear-gradient(135deg, var(--hero-1), var(--hero-2)); color: var(--on-hero); box-shadow: var(--shadow); }
.next-card .eyebrow { color: var(--on-hero-soft); display: block; }
.next-card b { display: block; font-size: 16px; }
.next-card .grow > span:last-child { font-size: 13px; font-weight: 700; color: var(--on-hero-soft); }
.next-num { width: 64px; height: 64px; border-radius: 18px; background: rgba(255,255,255,0.16); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.next-num b { font-family: var(--display); font-size: 30px !important; line-height: 1; }
.next-num span { font-size: 11px; font-weight: 800; }
.chev { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.d-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat-tile { border-radius: 20px; padding: 12px; display: flex; gap: 10px; align-items: center; min-width: 0; }
.st-ic { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.st-ic svg { width: 26px; height: 26px; }
.st-ic .f-w { fill: #FFFFFF; } .st-ic .s-w { stroke: #FFFFFF; stroke-width: 2.4; stroke-linecap: round; fill: none; }
.st-ic .f-a { fill: var(--accent); } .st-ic .s-a { stroke: var(--accent); stroke-width: 1.9; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.st-txt { min-width: 0; display: flex; flex-direction: column; }
.st-l { font-size: 12px; font-weight: 800; }
.st-txt b { font-family: var(--display); font-size: 24px; line-height: 1.1; font-weight: 600; font-variant-numeric: tabular-nums; }
.st-s { font-size: 11px; font-weight: 800; }
.tl-lav { background: var(--accent-soft); color: var(--accent-soft-ink); } .tl-lav .st-ic { background: var(--lav-mid); }
.tl-pink { background: var(--pink); color: var(--pink-ink); } .tl-pink .st-ic { background: var(--pink-mid); } .tl-pink .st-ic .s-a { stroke: var(--alert); }
.tl-mint { background: var(--mint); color: var(--mint-ink); } .tl-mint .st-ic { background: var(--mint-mid); }
.tl-butter { background: var(--butter); color: var(--butter-ink); } .tl-butter .st-ic { background: var(--butter-mid); }
.stat-tile b { color: var(--ink); }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.c-grid { stroke: var(--line); stroke-width: 1; }
.c-lbl { font: 700 12px var(--body); fill: var(--muted); }
.c-today { fill: var(--accent); font-weight: 800; }
.c-area { fill: var(--accent); fill-opacity: 0.14; }
.c-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.c-dot { fill: var(--accent); stroke: var(--card); stroke-width: 2.5; }
.c-dot-slow { fill: #E07A4F; stroke: var(--card); stroke-width: 2.5; }
.c-slow-bg { fill: var(--peach); } .c-slow { font: 800 11px var(--body); fill: var(--peach-ink); }
.c-best-bg { fill: var(--accent-soft); } .c-best { font: 800 11px var(--body); fill: var(--accent-soft-ink); }
.cal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-top b { font-family: var(--display); font-weight: 600; font-size: 16px; }
.cal-nav { width: 36px; height: 36px; border: 0; background: var(--card-2); border-radius: 12px; font-size: 18px; cursor: pointer; color: var(--ink); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; row-gap: 2px; }
.cal-h { font-size: 11px; font-weight: 800; color: var(--muted); padding: 4px 0; }
.cal-h.we, .cal-d.we { color: var(--alert); }
.cal-d { position: relative; font-size: 13px; font-weight: 700; padding: 3px 0; display: flex; flex-direction: column; align-items: center; }
.cal-d i { font-style: normal; width: 30px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; }
.cal-d.other { opacity: 0.4; }
.cal-d.today i { background: var(--accent); color: var(--on-accent); }
.cal-d.exam i { background: var(--peach); color: var(--peach-ink); font-weight: 800; }
.cal-pip { position: absolute; bottom: 1px; width: 5px; height: 5px; border-radius: 3px; background: var(--alert); }
.cal-key { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.cal-key i { display: inline-block; width: 10px; height: 10px; border-radius: 5px; margin-right: 5px; vertical-align: -1px; }
.k-today { background: var(--accent); } .k-exam { background: var(--peach-mid); } .k-rem { background: var(--alert); }
.rem-card { background: var(--pink); color: var(--pink-ink); border-radius: 24px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.rem-card h2 { color: var(--ink); }
.mini-add { width: 32px; height: 32px; border-radius: 10px; border: 0; background: var(--alert); color: var(--on-alert); font-size: 20px; font-weight: 800; cursor: pointer; }
.rem-row { display: flex; gap: 10px; align-items: center; }
.rem-row b { display: block; font-size: 14px; color: var(--ink); }
.rem-row span span { font-size: 12px; font-weight: 700; }
.rem-ic { width: 34px; height: 34px; border-radius: 17px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rem-ic svg { width: 18px; height: 18px; fill: none; stroke: #FFFFFF; stroke-width: 2.4; stroke-linecap: round; }
.r-pink { background: var(--pink-mid); } .r-sky { background: var(--sky-mid); } .r-butter { background: var(--butter-mid); }
.tt-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; font-weight: 700; }
.tt-row.done .grow { text-decoration: line-through; color: var(--muted); }
.ex-row { display: flex; gap: 10px; align-items: flex-start; }
.ex-row b { font-size: 14px; }
.ex-sq { width: 28px; height: 24px; border-radius: 8px; flex-shrink: 0; margin-top: 2px; }
.ex-d { font-size: 13px; font-weight: 800; color: var(--accent-soft-ink); white-space: nowrap; }
.ex-d.soon-t { color: var(--peach-ink); }
.bar { height: 8px; border-radius: 4px; background: var(--card-2); margin: 6px 0 2px; overflow: hidden; }
.bar i { display: block; height: 8px; border-radius: 4px; }
.b-lav { background: var(--lav-mid); } .b-pink { background: var(--pink-mid); } .b-mint { background: var(--mint-mid); } .b-butter { background: var(--butter-mid); }
.cheer { background: linear-gradient(135deg, var(--accent-soft), var(--pink)); border-radius: 24px; padding: 0 0 0 16px; display: flex; align-items: flex-end; gap: 4px; overflow: hidden; min-height: 140px; }
.cheer-txt { align-self: center; padding: 14px 0; display: flex; flex-direction: column; gap: 4px; }
.cheer-txt b { font-family: var(--display); font-size: 18px; font-weight: 600; color: var(--accent-soft-ink); }
.cheer-txt span { font-size: 13px; font-weight: 700; color: var(--accent-soft-ink); }
.cheer-art { width: 150px; flex-shrink: 0; margin-bottom: -8px; }

/* ---------- hub ---------- */
.circle-card { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; align-items: center; }
.circle-card .art { border-radius: 22px; overflow: hidden; background: var(--accent-soft); height: 150px; display: flex; align-items: flex-end; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { background: var(--card-2); border-radius: 14px; padding: 8px 10px; }
.stat b { font-family: var(--display); font-size: 22px; font-weight: 600; display: block; color: var(--ink); }
.stat span { font-size: 12px; font-weight: 700; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { border: 1px solid var(--line); background: var(--card); border-radius: 20px; padding: 12px 6px 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 800; font-size: 12px; color: var(--ink); text-align: center; box-shadow: var(--shadow); }
.tile i { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.tile i svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.t-lav { background: var(--accent-soft); color: var(--accent-soft-ink); }
.t-peach { background: var(--peach); color: var(--peach-ink); }
.t-mint { background: var(--mint); color: var(--mint-ink); }
.t-butter { background: var(--butter); color: var(--butter-ink); }
.t-pink { background: var(--pink); color: var(--pink-ink); }
.t-sky { background: var(--sky); color: var(--sky-ink); }
.banner { width: 100%; border: 0; cursor: pointer; text-align: left; background: var(--accent-soft); border-radius: 22px; display: flex; align-items: flex-end; gap: 6px; overflow: hidden; height: 112px; padding: 0 14px 0 0; color: var(--accent-soft-ink); }
.banner .art { width: 120px; flex-shrink: 0; margin-bottom: -10px; }
.banner > span:last-child { align-self: center; display: flex; flex-direction: column; gap: 4px; }
.banner b { font-family: var(--display); font-weight: 600; font-size: 16px; }
.banner span span { font-size: 12px; font-weight: 700; }

/* ---------- lists ---------- */
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item b { font-size: 15px; overflow-wrap: anywhere; color: var(--ink); }
.item span { font-size: 13px; color: var(--muted); }
.x-btn { border: 0; background: none; color: var(--muted); width: 36px; height: 36px; border-radius: 18px; font-size: 22px; cursor: pointer; flex-shrink: 0; }
.chip-d { font-family: var(--display); font-weight: 600; font-size: 14px; padding: 6px 10px; border-radius: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.soon { background: var(--peach); color: var(--peach-ink); } .mid { background: var(--accent-soft); color: var(--accent-soft-ink); } .far { background: var(--mint); color: var(--mint-ink); }

/* ---------- day strips & timelines ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day { min-height: 62px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; padding: 0; position: relative; }
.day small { font-size: 11px; font-weight: 800; color: var(--muted); }
.day b { font-family: var(--display); font-size: 18px; font-weight: 600; }
.day.sel { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.day.sel small { color: var(--on-accent); }
.day.rest { border-style: dashed; }
.day .pip { width: 5px; height: 5px; border-radius: 3px; background: var(--alert); position: absolute; bottom: 6px; }
.day.sel .pip { background: var(--on-accent); }
.timeline { display: flex; flex-direction: column; gap: 10px; }
.tl-row { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 8px; align-items: center; }
.tl-time { font-size: 13px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.cls { background: var(--card-2); border-radius: 14px; padding: 10px 12px; color: var(--muted); }
.cls b { display: block; font-size: 14px; color: var(--ink); opacity: 0.8; }
.cls span { font-size: 12px; font-weight: 700; }
.blk { border-radius: 16px; padding: 10px 12px; border-left: 5px solid; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.blk b { font-size: 14px; } .blk span { font-size: 12px; font-weight: 700; opacity: 0.9; }
.blk.done { opacity: 0.55; } .blk.done b { text-decoration: line-through; }
.blk-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.c-peach { background: var(--peach); color: var(--peach-ink); border-color: var(--peach-mid); }
.c-lav { background: var(--accent-soft); color: var(--accent-soft-ink); border-color: var(--lav-mid); }
.c-mint { background: var(--mint); color: var(--mint-ink); border-color: var(--mint-mid); }
.c-butter { background: var(--butter); color: var(--butter-ink); border-color: var(--butter-mid); }
.c-pink { background: var(--pink); color: var(--pink-ink); border-color: var(--pink-mid); }
.c-sky { background: var(--sky); color: var(--sky-ink); border-color: var(--sky-mid); }

/* reminders page: soft pink like the reminders inspo */
.rem-view { background: var(--rem-bg); margin: -16px calc(-1 * max(16px, env(safe-area-inset-left, 0px))) 0; padding: 16px max(16px, env(safe-area-inset-left, 0px)) 24px; min-height: 100dvh; }
.add-round { width: 46px; height: 46px; border-radius: 23px; border: 0; background: var(--alert); color: var(--on-alert); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.add-round svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.rem-strip { background: var(--card); border-radius: 22px; padding: 10px; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); }
.rem-strip .eyebrow { color: var(--muted); padding-left: 4px; }
.rem-day { letter-spacing: 0.06em; }
.task { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 16px; padding: 10px 8px 10px 12px; border-left: 7px solid var(--pink-mid); box-shadow: var(--shadow); min-height: 58px; }
.task.bar-high { border-left-color: var(--alert); } .task.bar-med { border-left-color: var(--pink-mid); } .task.bar-low { border-left-color: var(--sky-mid); }
.task .txt { flex: 1; min-width: 0; }
.task b { display: block; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.task .alert { font-size: 12px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.task .alert svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.task.done b { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.task.done { border-left-color: var(--line); opacity: 0.85; }
.check { width: 32px; height: 32px; border-radius: 11px; border: 2px solid var(--pink-mid); background: var(--card); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #FFFFFF; padding: 0; }
.check.sm { width: 26px; height: 26px; border-radius: 8px; border-color: var(--line); }
.check svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.check.on { background: var(--ok); border-color: var(--ok); }
[data-theme="midnight"] .check, [data-theme="night"] .check, [data-theme="navy"] .check { color: #10261C; }
.check.on svg { opacity: 1; }
.add-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 8px; }

/* ---------- modules / priorities ---------- */
.mod { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.mod.dragging { opacity: 0.92; transform: scale(1.02); box-shadow: 0 20px 40px -16px rgba(0,0,0,0.45); position: relative; z-index: 3; }
.mod-head { display: flex; align-items: center; gap: 10px; }
.mod-rank { font-family: var(--display); font-size: 17px; font-weight: 700; width: 30px; height: 30px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-soft-ink); flex-shrink: 0; }
.mod-head .txt { flex: 1; min-width: 0; }
.mod-head b { display: block; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.mod-head span { font-size: 12px; font-weight: 700; color: var(--muted); }
.handle { width: 40px; height: 44px; border: 0; background: var(--card-2); border-radius: 12px; cursor: grab; touch-action: none; color: var(--muted); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.handle svg { width: 20px; height: 20px; fill: currentColor; }
.dots { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dots .lbl { font-size: 12px; font-weight: 800; color: var(--muted); margin-right: 2px; }
.dotb { width: 28px; height: 28px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); cursor: pointer; padding: 0; }
.dotb.on { background: var(--accent); border-color: var(--accent); }
.dots em { font-style: normal; font-size: 12px; font-weight: 800; color: var(--muted); margin-left: 2px; }
.mod-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* ---------- what do I need ---------- */
.slider-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.slider-row .lbl { font-size: 14px; font-weight: 800; margin: 0; }
.slider-row output { font-family: var(--display); font-weight: 600; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.need-hero { background: linear-gradient(140deg, var(--hero-1), var(--hero-2)); color: var(--on-hero); border-radius: 22px; padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; }
.need-hero .eyebrow { color: var(--on-hero-soft); }
.need-hero b { font-family: var(--display); font-size: 40px; font-weight: 700; line-height: 1.1; }
.need-hero span:last-child { font-size: 13px; font-weight: 700; color: var(--on-hero-soft); }
.stat-big { font-family: var(--display); font-size: 24px; font-weight: 600; }

/* ---------- study session ---------- */
.feelings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.feel { border: 2px solid var(--line); background: var(--card); border-radius: 18px; padding: 10px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 800; font-size: 12px; color: var(--ink); }
.feel .face { width: 38px; height: 38px; }
.feel[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-soft-ink); }
.radio-list { display: flex; flex-direction: column; gap: 6px; }
.radio-list label { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-weight: 700; cursor: pointer; }
.radio-list input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.mood-row { display: flex; align-items: center; gap: 12px; }
.mood-row b { font-size: 16px; }
.big-name { display: block; font-family: var(--display); font-size: 20px; font-weight: 600; }
.session-card { background: var(--accent-soft); border-radius: var(--r-lg); padding: 14px 16px 18px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.session-card .scene { width: min(260px, 100%); }
.session-card h2 { font-size: 22px; color: var(--accent-soft-ink); }
.session-card p { color: var(--accent-soft-ink); font-weight: 700; font-size: 14px; }
.clock-row { display: flex; align-items: center; gap: 14px; }
.clock { font-family: var(--display); font-size: 56px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.round-btn { width: 50px; height: 50px; border-radius: 25px; border: 0; background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.round-btn svg { width: 18px; height: 18px; fill: currentColor; }
.session-btns { display: flex; gap: 10px; width: 100%; margin-top: 6px; }
.session-btns .btn { flex: 1; }
.share-note { display: flex; gap: 10px; align-items: center; background: var(--mint); color: var(--mint-ink); border-radius: 18px; padding: 12px 14px; font-weight: 700; font-size: 13px; }
.share-note svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bigclock-mode .app > *:not(#vStudy), .bigclock-mode .tabbar { display: none !important; }
.bigclock-mode #vStudy #sessionLive > *:not(.session-card) { display: none !important; }
.bigclock-mode .session-card { min-height: calc(100dvh - 60px); justify-content: center; }
.bigclock-mode .clock { font-size: min(26vw, 180px); }

/* ---------- partners ---------- */
.person { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 12px; box-shadow: var(--shadow); width: 100%; text-align: left; cursor: pointer; color: var(--ink); }
div.person { cursor: default; }
.person .ava { width: 58px; height: 58px; }
.person .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.person b { font-size: 16px; overflow-wrap: anywhere; }
.person .st { font-size: 13px; font-weight: 800; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.person .st.live { color: var(--ok); }
.person .mod-line { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.person .mood { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 800; color: var(--muted); max-width: 72px; text-align: center; }
.person-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.invite-hero { background: var(--accent-soft); border-radius: 26px; padding: 6px 14px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.invite-hero .art { width: min(300px, 100%); }
.invite-hero h2 { font-size: 19px; }
.feel-art { position: relative; background: var(--accent-soft); border-radius: 26px; display: flex; justify-content: center; overflow: hidden; height: 200px; }
.feel-art .art { width: 230px; }
.pencil { position: absolute; left: calc(50% + 46px); bottom: 26px; width: 42px; height: 42px; border-radius: 21px; background: var(--accent); color: var(--on-accent); border: 3px solid var(--card); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.pencil svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; }

/* ---------- messages & chat ---------- */
.convo { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: var(--card); width: 100%; text-align: left; cursor: pointer; color: var(--ink); }
.convo:last-child { border-bottom: 0; }
.convo .txt { flex: 1; min-width: 0; }
.convo b { display: block; font-size: 16px; }
.convo .prev { display: block; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo .meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 700; }
.unread { min-width: 22px; height: 22px; border-radius: 11px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
#vChat { gap: 0; }
.chat-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 4; display: flex; align-items: center; gap: 10px; padding: 10px 0 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
.chat-head .txt { flex: 1; min-width: 0; }
.chat-head b { display: block; font-size: 17px; }
.chat-head span { font-size: 13px; color: var(--muted); font-weight: 800; }
.chat-head span.live { color: var(--ok); }
.msgs { display: flex; flex-direction: column; gap: 8px; padding: 14px 0 170px; }
.day-sep { align-self: center; font-size: 12px; font-weight: 800; color: var(--muted); background: var(--card-2); padding: 4px 10px; border-radius: 999px; margin: 6px 0; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 20px 20px 20px 6px; background: var(--card); border: 1px solid var(--line); color: var(--ink); align-self: flex-start; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble.me { align-self: flex-end; border-radius: 20px 20px 6px 20px; background: var(--bubble-me); color: var(--on-bubble-me); border-color: transparent; }
.bubble time { display: block; font-size: 11px; font-weight: 700; opacity: 0.8; margin-top: 4px; text-align: right; }
.bubble.help { border: 2px solid var(--peach-mid); }
.help-tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--peach); color: var(--peach-ink); margin-bottom: 4px; }
.bubble img { display: block; max-width: 100%; max-height: 260px; border-radius: 14px; margin-bottom: 6px; cursor: zoom-in; background: var(--card-2); }
.file-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(127,127,127,0.16); color: inherit; text-decoration: none; font-weight: 700; margin-bottom: 4px; }
.file-chip svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; flex-shrink: 0; }
.composer { position: fixed; left: 0; right: 0; z-index: 6; bottom: calc(env(safe-area-inset-bottom, 0px) + var(--nav-h)); background: var(--card); border-top: 1px solid var(--line); padding: 10px max(12px, env(safe-area-inset-right, 0px)) 10px max(12px, env(safe-area-inset-left, 0px)); }
.composer-inner { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.composer form { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 46px; max-height: 120px; border-radius: 23px; padding: 11px 16px; resize: none; }
.composer .send { background: var(--accent); color: var(--on-accent); border-color: var(--accent); border-radius: 23px; width: 46px; height: 46px; }
.help-toggle { background: var(--peach); color: var(--peach-ink); border: 1.5px solid var(--peach-mid); }
.help-toggle[aria-pressed="true"] { background: var(--peach-ink); color: var(--peach); }
.attach-preview { display: flex; align-items: center; gap: 8px; background: var(--card-2); border-radius: 14px; padding: 6px 10px; font-size: 14px; font-weight: 700; }
.attach-preview span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- notifications ---------- */
.notif { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); width: 100%; text-align: left; cursor: pointer; color: var(--ink); }
.notif.unread-n { border: 1.5px solid var(--lav-mid); }
.notif .ic { width: 46px; height: 46px; border-radius: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif .ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.notif .t-pink svg { fill: currentColor; stroke: none; }
.notif b { display: block; font-size: 15px; }
.notif span { display: block; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.notif time { font-size: 12px; color: var(--muted); font-weight: 700; }

/* ---------- profile ---------- */
.profile-top { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.ava-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ava-pick { padding: 3px; border-radius: 50%; cursor: pointer; background: var(--card); border: 3px solid transparent; aspect-ratio: 1; }
.ava-pick[aria-pressed="true"] { border-color: var(--accent); }
.ava-pick .ava-svg { border-radius: 50%; }
.themes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.theme-btn { border: 2px solid var(--line); border-radius: 18px; padding: 8px 4px 10px; background: var(--card); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 800; font-size: 12px; color: var(--ink); }
.theme-btn[aria-pressed="true"] { border-color: var(--accent); }
.theme-sw { width: 44px; height: 44px; border-radius: 14px; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid rgba(127,127,127,0.3); }
.look-row { display: flex; gap: 8px; flex-wrap: wrap; }
.look-opt { width: 44px; height: 44px; border-radius: 22px; border: 3px solid transparent; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }
.look-opt[aria-pressed="true"] { border-color: var(--accent); }
.look-txt { min-height: 40px; padding: 0 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); font-weight: 800; font-size: 13px; cursor: pointer; color: var(--ink); }
.look-txt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-soft-ink); }

/* ---------- auth ---------- */
.auth { min-height: 100dvh; max-width: 480px; margin: 0 auto; padding-top: calc(env(safe-area-inset-top, 0px) + 18px); padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 28px); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 14px; }
.auth-art { background: var(--accent-soft); border-radius: 28px; overflow: hidden; height: 190px; display: flex; justify-content: center; }
.auth-art .scene-svg { width: 230px; }
.auth-hero { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.auth-hero h1 { font-size: 30px; }
.field { position: relative; display: flex; align-items: center; }
.field > svg { position: absolute; left: 13px; width: 20px; height: 20px; pointer-events: none; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.field input { padding-left: 42px; padding-right: 48px; }
.eye { position: absolute; right: 4px; width: 42px; height: 42px; border: 0; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--muted); }
.eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- bottom nav (phone) / side menu (laptop) ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; background: var(--card); border-top: 1px solid var(--line); padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 6px) max(6px, env(safe-area-inset-left, 0px)); }
.tabbar-inner { max-width: 600px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tab { border: 0; background: none; color: var(--muted); font-weight: 800; font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 56px; justify-content: center; cursor: pointer; position: relative; padding: 0; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-current="page"] { color: var(--accent); }
:root:not([data-theme="midnight"]):not([data-theme="night"]):not([data-theme="navy"]) .tab[aria-current="page"] { color: var(--accent-2); }
.tab .badge { top: 2px; right: calc(50% - 24px); }
.side-me, .side-links { display: none; }

/* ---------- sheets ---------- */
dialog { border: 0; padding: 0; background: var(--card); color: var(--ink); width: min(100vw, 560px); max-width: 100vw; max-height: 90dvh; margin: auto auto 0; border-radius: 28px 28px 0 0; box-shadow: 0 -20px 50px -20px rgba(0,0,0,0.5); }
@media (min-width: 640px) { dialog { margin: auto; border-radius: 28px; } }
dialog::backdrop { background: rgba(20, 14, 32, 0.55); }
.sheet { padding: 18px max(18px, env(safe-area-inset-left, 0px)) calc(env(safe-area-inset-bottom, 0px) + 18px); display: flex; flex-direction: column; gap: 4px; overflow-y: auto; max-height: 90dvh; }
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); align-self: center; margin-bottom: 8px; }
.sheet .btns { display: flex; gap: 10px; margin-top: 14px; }
.sheet .btns .btn { flex: 1; }
.img-view { padding: 0; background: #000; }
.img-view img { display: block; max-width: 100%; max-height: 80dvh; margin: 0 auto; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 16px; right: 16px; max-width: 520px; margin: 0 auto; z-index: 20; top: calc(env(safe-area-inset-top, 0px) + 12px); background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 18px; font-weight: 700; font-size: 14px; display: flex; gap: 10px; align-items: center; box-shadow: 0 14px 30px -12px rgba(0,0,0,0.5); cursor: pointer; }
.toast .ava { width: 34px; height: 34px; }

/* ---------- small phones ---------- */
@media (max-width: 360px) {
  .tiles, .themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-stats { grid-template-columns: 1fr; }
  .circle-card { grid-template-columns: 100px minmax(0, 1fr); }
}

/* ---------- laptop & tablet: side menu + dashboard grid like the inspo ---------- */
@media (min-width: 1000px) {
  :root { --nav-h: 0px; }
  .app { max-width: 1560px; margin-left: 272px; margin-right: 32px; padding-left: 0; padding-right: 0; padding-bottom: 40px; }
  .tabbar { top: 16px; bottom: 16px; left: 16px; right: auto; width: 236px; border: 0; border-radius: 28px; padding: 18px 14px; background: linear-gradient(180deg, var(--accent-soft), var(--card-2)); display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
  .side-me { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
  .side-me .me-btn { border-radius: 30px; }
  .side-me .ava.lg { width: 104px; height: 104px; border-radius: 30px; }
  .side-me b { font-family: var(--display); font-size: 20px; font-weight: 600; }
  .side-me span { font-size: 13px; font-weight: 700; color: var(--muted); }
  .tabbar-inner { display: flex; flex-direction: column; gap: 4px; margin: 0; max-width: none; }
  .tab { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 14px; font-size: 14px; color: var(--ink); }
  .tab svg { width: 20px; height: 20px; }
  .tab[aria-current="page"], :root:not([data-theme="midnight"]):not([data-theme="night"]):not([data-theme="navy"]) .tab[aria-current="page"] { background: var(--lav-mid); color: var(--ink); }
  .tab .badge { position: static; margin-left: auto; border: 0; }
  .side-links { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 10px; }
  .side-links button { border: 0; background: none; text-align: left; padding: 10px 12px; border-radius: 12px; font-weight: 800; font-size: 13px; color: var(--muted); cursor: pointer; }
  .side-links button:hover { background: var(--card); color: var(--ink); }
  .composer { left: 272px; bottom: 0; }
  .view:not(#vDash) { max-width: none; }
  .dash-head .me-btn { display: none; }
  .dash-head h1 { font-size: 30px; }
  .dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
  .d-next { grid-column: 1 / 2; }
  .d-stats { grid-column: 2 / 4; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .d-chart { grid-column: 1 / 3; }
  .d-chart { grid-row: 2; }
  .d-cal { grid-column: 3; grid-row: 2; }
  .d-exams { grid-column: 1; grid-row: 3; }
  .d-tasks { grid-column: 2; grid-row: 3; }
  .d-side { grid-column: 3; grid-row: 3; display: flex; flex-direction: column; gap: 14px; }
  .next-card { height: 100%; }
  .stat-tile { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: no-preference) {
  .view { animation: rise 0.22s ease-out; }
  @keyframes rise { from { opacity: 0.4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  .bubble.new { animation: pop 0.25s ease-out; }
  @keyframes pop { from { transform: scale(0.94); opacity: 0.4; } to { transform: none; opacity: 1; } }
}

/* ---------- My files (per module) ---------- */
.space-card { display: flex; flex-direction: column; gap: 8px; }
.space-used { font-size: 13px; font-weight: 800; color: var(--accent-soft-ink); }
.space-bar { height: 10px; border-radius: 5px; background: var(--accent-soft); overflow: hidden; }
.space-bar i { display: block; height: 100%; width: 0; border-radius: 5px; background: var(--accent); transition: width .4s; }
.space-bar.full i { background: var(--alert); }
.mod-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mod-tile { min-height: 138px; border: 1px solid transparent; border-radius: 20px; padding: 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; cursor: pointer; text-align: left; font: inherit; box-shadow: var(--shadow); }
.mod-tile .fi { width: 40px; height: 40px; border-radius: 13px; background: var(--card); color: inherit; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.mod-tile svg, .add-kind svg, .file-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mod-tile b { font-family: var(--display); font-weight: 600; font-size: 17px; }
.mod-tile .nm { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mod-tile .ct { font-size: 12px; font-weight: 800; margin-top: auto; }
.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-row { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px 8px 8px 10px; display: flex; align-items: center; gap: 10px; min-height: 56px; }
.card .file-row { border: 0; padding: 4px 0; background: transparent; }
.file-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left; min-height: 44px; }
.file-ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; flex-shrink: 0; border: 0; }
.file-txt { min-width: 0; display: flex; flex-direction: column; }
.file-txt b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-txt span { font-size: 12px; color: var(--muted); font-weight: 700; }
.file-row .icon-btn { width: 40px; height: 40px; border-radius: 12px; color: var(--accent-soft-ink); }
.file-row .icon-btn svg, .add-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.add-btn { background: var(--accent); color: var(--on-accent); border-color: var(--accent); border-radius: 22px; }
.add-btn svg { width: 22px; height: 22px; stroke-width: 2.4; }
.mf-hero { border-radius: 20px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid transparent; }
.mf-hero b { display: block; font-family: var(--display); font-size: 18px; font-weight: 600; }
.mf-hero span { font-size: 13px; font-weight: 700; }
.mf-study { background: var(--card); color: inherit; border: 0; flex-shrink: 0; }
.add-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.add-kind { min-height: 84px; border-radius: 16px; border: 2px solid transparent; font: 800 13px var(--body, inherit); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.add-kind[aria-pressed="true"] { border-color: currentColor; }
.picked { margin: 10px 0 0; padding: 10px 12px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-soft-ink); font-weight: 800; font-size: 14px; overflow-wrap: anywhere; }
.send-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; max-height: 50vh; overflow: auto; }
.send-row { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; text-align: left; }
.send-row .ava { width: 42px; height: 42px; flex-shrink: 0; }
@media (min-width: 1000px) { .mod-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- session finished: celebration ---------- */
.done-card { position: relative; overflow: hidden; background: var(--accent-soft); border-radius: var(--r-lg); padding: 18px 16px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.done-card .scene { width: min(240px, 100%); position: relative; z-index: 1; }
.done-card h1 { font-size: 28px; color: var(--accent-soft-ink); position: relative; z-index: 1; }
.done-card p { margin: 0; max-width: 32ch; font-weight: 700; color: var(--ink); position: relative; z-index: 1; }
.done-card .pill { position: relative; z-index: 1; background: var(--card); }
.done-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; margin-top: 6px; position: relative; z-index: 1; }
.done-stats > div { background: var(--card); border-radius: 18px; padding: 12px 8px; display: flex; flex-direction: column; }
.done-stats b { font-family: var(--display); font-size: 30px; font-weight: 600; color: var(--accent-soft-ink); line-height: 1.1; }
.done-stats span { font-size: 13px; font-weight: 800; color: var(--muted); }
.done-btns { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 6px; position: relative; z-index: 1; }
.done-btns .btn { width: 100%; }
.confetti { position: absolute; inset: 0; pointer-events: none; display: none; }
.celebrate .confetti { display: block; }
.celebrate .scene { animation: funi-pop .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 3px; opacity: 0; animation: funi-fall 2.6s ease-in forwards; }
.confetti i:nth-child(4n+1) { background: var(--accent); }
.confetti i:nth-child(4n+2) { background: var(--pink-ink); }
.confetti i:nth-child(4n+3) { background: var(--butter-ink); border-radius: 50%; width: 10px; height: 10px; }
.confetti i:nth-child(4n) { background: var(--mint-ink); }
.confetti i:nth-child(1) { left: 6%; animation-delay: .05s; } .confetti i:nth-child(2) { left: 14%; animation-delay: .4s; }
.confetti i:nth-child(3) { left: 23%; animation-delay: .15s; } .confetti i:nth-child(4) { left: 31%; animation-delay: .6s; }
.confetti i:nth-child(5) { left: 40%; animation-delay: .25s; } .confetti i:nth-child(6) { left: 48%; animation-delay: .05s; }
.confetti i:nth-child(7) { left: 57%; animation-delay: .5s; } .confetti i:nth-child(8) { left: 65%; animation-delay: .2s; }
.confetti i:nth-child(9) { left: 73%; animation-delay: .35s; } .confetti i:nth-child(10) { left: 81%; animation-delay: .1s; }
.confetti i:nth-child(11) { left: 88%; animation-delay: .55s; } .confetti i:nth-child(12) { left: 94%; animation-delay: .3s; }
@keyframes funi-fall { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(480px) rotate(540deg); } }
@keyframes funi-pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none !important; } .celebrate .scene { animation: none; } }

/* reorder modules: arrows + drag (works with a mouse too) */
.order-btns { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.ord { width: 36px; height: 30px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--accent-soft-ink); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.ord svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ord:disabled { opacity: 0.35; cursor: default; }
.ord:not(:disabled):hover { background: var(--accent-soft); }
@media (pointer: fine) { #modList.manual .mod { cursor: grab; } }
.is-dragging, .is-dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.mod-foot { justify-content: flex-start; gap: 18px; } .mod-foot .x-btn { margin-left: auto; }

/* ---------- email sign-up extras ---------- */
.block-link { display: block; margin: 10px auto 0; min-height: 40px; }
.check-email, #forgotForm, #newPassForm { text-align: left; }
.check-email { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.check-email p { margin: 0; }
.check-email .btn { margin-top: 8px; }
.mail-art svg { width: 84px; height: 84px; }
#forgotForm h2, #newPassForm h2 { margin-bottom: 4px; }
.email-nudge { display: flex; align-items: center; gap: 12px; }
.email-nudge svg { width: 30px; height: 30px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===================== Fun with friends ===================== */
.fun-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.room-card, .battle-row, .board-row, .card-row { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 10px 12px; min-height: 56px; }
.room-card .grow, .battle-row .grow, .board-row .grow, .card-row .grow { min-width: 0; display: flex; flex-direction: column; }
.room-card .grow span, .battle-row .grow span { font-size: 12px; font-weight: 700; color: var(--muted); }
.battle-row { width: 100%; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.battle-row .pill { white-space: nowrap; flex-shrink: 0; }
.live-pill { gap: 6px; }
/* room timer */
.room-timer { position: relative; overflow: hidden; background: linear-gradient(140deg, var(--hero-1), var(--hero-2)); color: var(--on-hero); border-radius: 24px; padding: 18px 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.room-timer.is-break { background: var(--butter); color: var(--butter-ink); }
.rt-label { font-size: 13px; font-weight: 800; letter-spacing: .05em; position: relative; z-index: 1; }
.rt-clock { font-family: var(--display); font-size: 58px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; position: relative; z-index: 1; }
.rt-note { font-size: 13px; font-weight: 700; position: relative; z-index: 1; }
.btns-row { display: flex; gap: 8px; }
.btns-row .btn { flex: 1; }
.seats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.seat { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 12px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.seat .ava { width: 60px; height: 60px; }
.seat b { font-size: 15px; }
.seat-task { font-size: 12px; font-weight: 700; color: var(--muted); overflow-wrap: anywhere; }
.seat-cheer { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: var(--pink); color: var(--pink-ink); box-shadow: var(--shadow); animation: funi-pop .4s both; }
/* leaderboard */
.podium { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; align-items: end; margin-top: 4px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.pod b { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-title { font-size: 11px; font-weight: 800; color: var(--accent-soft-ink); }
.pod-block { width: 100%; border-radius: 16px 16px 6px 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; background: var(--card-3); color: var(--ink); }
.pod-place { font-family: var(--display); font-size: 22px; font-weight: 600; }
.pod-1 .pod-block { height: 122px; background: var(--accent); color: var(--on-accent); }
.pod-2 .pod-block { height: 94px; }
.pod-3 .pod-block { height: 74px; background: var(--peach); color: var(--peach-ink); }
.pod-1 .ava { box-shadow: 0 0 0 3px var(--butter-mid); }
.board-row.me { border: 2px solid var(--accent); background: var(--accent-soft); }
.board-row .pod-title { margin-top: 1px; }
.board-place { width: 22px; font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--muted); text-align: center; }
.nudge { background: var(--butter); color: var(--butter-ink); border-radius: 16px; padding: 12px 14px; font-weight: 800; font-size: 14px; }
.streak-card { display: flex; align-items: center; gap: 12px; }
.streak-card svg { width: 46px; height: 46px; flex-shrink: 0; }
.streak-num { display: block; font-family: var(--display); font-size: 22px; font-weight: 600; }
/* garden */
.garden { position: relative; overflow: hidden; border-radius: 24px; background: #DDEEFB; min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end; }
:root[data-theme="midnight"] .garden, :root[data-theme="night"] .garden, :root[data-theme="navy"] .garden { background: #1D2A44; }
.gd-sun { position: absolute; top: 12px; right: 16px; width: 64px; height: 64px; }
.gd-cloud { position: absolute; top: 30px; left: 20px; width: 90px; height: 34px; opacity: .9; }
.gd-bed { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 2px 4px; padding: 90px 12px 0; }
.gd-plant { display: flex; align-items: flex-end; margin-bottom: -6px; }
.gd-plant svg { display: block; }
.gd-empty { align-self: center; margin: 0 auto 18px; background: rgba(255,255,255,.85); color: #2B2540; border-radius: 14px; padding: 10px 12px; font-weight: 800; font-size: 14px; text-align: center; max-width: 260px; }
.gd-soil { height: 44px; background: #8A5A3B; border-top: 8px solid #6E9F4E; }
.legend-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 12px; font-weight: 800; color: var(--ink); }
.legend-chip i { width: 12px; height: 12px; border-radius: 6px; display: inline-block; }
.gd-stat { display: flex; flex-direction: column; }
.gd-stat b { font-family: var(--display); font-size: 26px; font-weight: 600; }
.gd-stat span { font-size: 12px; font-weight: 800; color: var(--muted); }
.ok-num { color: var(--mint-ink); } .warn-num { color: var(--peach-ink); }
:root[data-theme="midnight"] .ok-num, :root[data-theme="night"] .ok-num, :root[data-theme="navy"] .ok-num { color: var(--ok); }
:root[data-theme="midnight"] .warn-num, :root[data-theme="night"] .warn-num, :root[data-theme="navy"] .warn-num { color: var(--alert); }
/* flashcards */
.note-card { background: var(--card); border: 1.5px dashed var(--line); border-radius: 16px; padding: 12px 14px; font-weight: 700; }
.deck-card { width: 100%; text-align: left; border: 1px solid transparent; border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; font: inherit; box-shadow: var(--shadow); }
.deck-card b { display: block; font-family: var(--display); font-size: 18px; font-weight: 600; }
.dk-mod { font-size: 12px; font-weight: 800; }
.dk-count { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--card); white-space: nowrap; align-self: flex-start; }
.dk-bar { display: block; height: 8px; border-radius: 4px; background: var(--card); overflow: hidden; }
.dk-bar i { display: block; height: 100%; background: currentColor; border-radius: 4px; }
.dk-meta { font-size: 12px; font-weight: 800; }
.deck-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.deck-actions .btn { padding: 0 8px; }
.deck-actions .btn:disabled { opacity: .45; }
.card-row b { font-size: 14px; overflow-wrap: anywhere; }
.card-row .grow span { font-size: 13px; color: var(--muted); font-weight: 700; overflow-wrap: anywhere; }
.cr-num { width: 26px; height: 26px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-soft-ink); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.danger-link { color: var(--danger) !important; }
.progress { height: 8px; border-radius: 4px; background: var(--card-2); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--accent); transition: width .25s; }
.progress i.low { background: var(--alert); }
.flashcard { width: 100%; min-height: 320px; border: 0; border-radius: 26px; padding: 24px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; font: inherit; background: var(--card); color: var(--ink); box-shadow: var(--shadow); transition: transform .25s; }
.flashcard:active { transform: scale(.98); }
.flashcard.back { background: linear-gradient(140deg, var(--hero-1), var(--hero-2)); color: var(--on-hero); animation: funi-flip .3s ease; }
@keyframes funi-flip { from { transform: rotateY(80deg); } to { transform: rotateY(0); } }
.fc-tag { font-size: 12px; font-weight: 800; letter-spacing: .08em; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-soft-ink); }
.flashcard.back .fc-tag { background: rgba(255,255,255,.22); color: var(--on-hero); }
.fc-text { font-family: var(--display); font-size: 24px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.fc-hint { font-size: 13px; font-weight: 800; opacity: .85; }
.btn.rate-no { background: var(--peach); color: var(--peach-ink); }
.btn.rate-yes { background: var(--mint); color: var(--mint-ink); }
/* quiz battles */
.vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.vs-side { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vs-side.right { justify-content: flex-end; text-align: right; }
.vs-side b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-score { font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--accent-soft-ink); }
.vs-score.them { color: var(--pink-ink); }
:root[data-theme="midnight"] .vs-score.them, :root[data-theme="night"] .vs-score.them, :root[data-theme="navy"] .vs-score.them { color: var(--alert); }
.vs-mid { font-family: var(--display); font-weight: 600; color: var(--muted); }
.bt-question { background: linear-gradient(140deg, var(--hero-1), var(--hero-2)); color: var(--on-hero); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 6px; min-height: 100px; justify-content: center; }
.bt-question span { font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.bt-question b { font-family: var(--display); font-size: 20px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.opt { width: 100%; min-height: 52px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); display: flex; align-items: center; gap: 12px; padding: 8px 14px; text-align: left; font: 800 15px var(--body); cursor: pointer; overflow-wrap: anywhere; }
.opt-l { width: 30px; height: 30px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-soft-ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.opt.right { background: var(--mint); color: var(--mint-ink); border: 2px solid var(--mint-ink); }
.opt.right .opt-l { background: var(--mint-ink); color: var(--mint); }
.opt.wrong { background: var(--peach); color: var(--peach-ink); border: 2px solid var(--peach-ink); }
.opt.wrong .opt-l { background: var(--peach-ink); color: var(--peach); }
.opt:disabled { cursor: default; }
.bt-result { font-weight: 800; font-size: 14px; }
.bt-result.good { color: var(--ok); } .bt-result.bad { color: var(--danger); }
:root:not([data-theme="midnight"]):not([data-theme="night"]):not([data-theme="navy"]) .bt-result.good { color: var(--mint-ink); }
/* pick partners */
.send-row .tickbox { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line); flex-shrink: 0; }
.send-row[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.send-row[aria-pressed="true"] .tickbox { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--card); }
/* voice notes */
.composer .mic { border-radius: 23px; width: 46px; height: 46px; color: var(--accent-soft-ink); background: var(--accent-soft); border-color: var(--accent-soft); }
.recorder { display: flex; align-items: center; gap: 8px; min-height: 46px; }
.rec-dot { width: 12px; height: 12px; border-radius: 6px; background: var(--muted); flex-shrink: 0; }
.recorder.on .rec-dot { background: var(--alert); animation: funi-blink 1s infinite; }
@keyframes funi-blink { 50% { opacity: .3; } }
.rec-time { font-family: var(--display); font-weight: 600; font-size: 18px; font-variant-numeric: tabular-nums; }
.rec-hint { font-size: 13px; font-weight: 700; color: var(--muted); }
.voice { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.voice svg { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.voice audio { height: 40px; max-width: 230px; }
@media (prefers-reduced-motion: reduce) { .flashcard.back, .seat-cheer { animation: none; } }
@media (min-width: 1000px) { .fun-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } .seats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.spam-note { margin: 10px 0 0; padding: 10px 12px; border-radius: 14px; background: var(--butter); color: var(--butter-ink); font-size: 13px; font-weight: 700; text-align: left; line-height: 1.45; }
.voice-left { display: block; font-size: 11px; font-weight: 700; opacity: .8; margin: -2px 0 4px 26px; }

/* cross night */
.cross-night { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; border: 0; border-radius: 22px; padding: 14px; font: inherit; color: #F3EEFF; background: radial-gradient(circle at 85% 20%, #3B2F7A 0, transparent 45%), linear-gradient(150deg, #1E1A45, #2C2266); box-shadow: var(--shadow); }
.cross-night .cn-moon { width: 46px; height: 46px; flex-shrink: 0; }
.cross-night .grow { display: flex; flex-direction: column; gap: 2px; }
.cross-night b { font-family: var(--display); font-size: 19px; font-weight: 600; color: #FFFFFF; }
.cross-night .grow span { font-size: 12.5px; font-weight: 700; color: #DCD3FF; }
.cn-go { background: #FDD167; color: #3A2A00; font-weight: 800; font-size: 13px; border-radius: 999px; padding: 8px 14px; flex-shrink: 0; }
.room-timer.night { background: radial-gradient(circle at 85% 15%, #3B2F7A 0, transparent 40%), linear-gradient(150deg, #1E1A45, #2C2266); color: #F3EEFF; }
.room-card.night { background: linear-gradient(150deg, #1E1A45, #2C2266); border-color: #2C2266; color: #F3EEFF; }
.room-card.night b { color: #FFFFFF; }
.room-card.night .grow span { color: #DCD3FF; }
.have-row { display: flex; flex-direction: column; gap: 2px; }
.have-row span { font-size: 13px; font-weight: 700; color: var(--muted); }
.have-row b { font-family: var(--display); font-size: 24px; font-weight: 600; color: var(--accent-soft-ink); }
.need-hero .need-pct { font-size: 16px !important; font-weight: 800 !important; color: var(--on-hero) !important; }
/* HTML files open as real pages inside Funi */
.html-view { padding: 0; width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; background: var(--bg); display: none; flex-direction: column; }
.html-view[open] { display: flex; }
.hv-bar { display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px; background: var(--card); border-bottom: 1px solid var(--line); }
.hv-bar b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--ink); }
#hvFrame { flex: 1; width: 100%; border: 0; background: #FFFFFF; }
.file-chip { font: inherit; border: 0; cursor: pointer; text-align: left; width: 100%; }
.num-box { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.num-box input[type=number] { width: 74px; min-height: 40px; padding: 6px 8px; border-radius: 12px; text-align: center; font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--ink); -moz-appearance: textfield; }
.num-box input[type=number]::-webkit-outer-spin-button, .num-box input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.lbl-sub { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.save-file { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 6px; padding: 6px 10px; border-radius: 999px; border: 0; cursor: pointer; font: 800 12px var(--body); background: rgba(127,127,127,0.16); color: inherit; }
.save-file svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* shared exam timetable */
.pick-row { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; min-height: 56px; cursor: pointer; margin: 0; font-weight: 400; }
.pick-row input { width: 22px; height: 22px; accent-color: var(--accent); flex-shrink: 0; }
.pick-row .grow { display: flex; flex-direction: column; min-width: 0; }
.pick-row b { font-size: 14px; color: var(--ink); }
.pick-row .grow span { font-size: 12px; font-weight: 700; color: var(--muted); }
.pick-row.dup { opacity: .6; cursor: default; }
/* deleting chat messages */
.bubble { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; transition: transform .15s; }
@media (pointer: fine) { .bubble { -webkit-user-select: text; user-select: text; } }
.bubble.pressed { transform: scale(.97); }
.bubble.deleted { background: transparent !important; border: 1.5px dashed var(--line) !important; color: var(--muted) !important; box-shadow: none !important; }
.del-txt { display: inline-flex; align-items: center; gap: 6px; font-style: italic; font-weight: 700; font-size: 14px; }
.del-txt svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.msg-quote { margin: 4px 0 12px; padding: 10px 12px; border-radius: 14px; background: var(--card-2); color: var(--ink); font-weight: 700; font-size: 14px; overflow-wrap: anywhere; }
.msg-actions { gap: 8px; }
/* replying */
.reply-bar { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 12px; border-radius: 14px; background: var(--accent-soft); border-left: 4px solid var(--accent); }
.reply-bar .grow { display: flex; flex-direction: column; min-width: 0; }
.reply-bar b { font-size: 12px; color: var(--accent-soft-ink); }
.reply-bar .grow span { font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quote { display: flex; flex-direction: column; width: 100%; text-align: left; margin: 0 0 6px; padding: 6px 10px; border: 0; border-left: 3px solid currentColor; border-radius: 10px; background: rgba(127,127,127,0.18); color: inherit; font: inherit; cursor: pointer; }
.quote b { font-size: 12px; }
.quote span { font-size: 13px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bubble.flash { animation: funi-flash 1.2s ease; }
@keyframes funi-flash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 4px var(--accent); } }

/* ---------- Sign-up: Female / Male ---------- */
.sex-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sex-pick button { min-height: 46px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--accent-soft-ink); font: 800 15px var(--body); cursor: pointer; }
.sex-pick button[aria-checked="true"] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.sex-pick button:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.sex-hint { margin: 6px 0 0; }

/* ---------- Partners tabs ---------- */
.ptabs { margin: 4px 0 14px; }
.ptab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: var(--alert); color: var(--on-alert); font-size: 12px; font-weight: 800; }
.tile.tile-night { background: linear-gradient(150deg, #1E1A45, #2C2266); color: #FFFFFF; border-color: transparent; }
.tile.tile-night i { background: rgba(255,255,255,0.14); color: #FDD167; }
.ptabs button { flex: 1 1 0; padding: 0 8px; font-size: 13px; }

/* ---------- Offline ---------- */
.offline-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 92px); z-index: 60; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 800 13px var(--body); box-shadow: var(--shadow); white-space: nowrap; pointer-events: none; }
.offline-bar svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
@media (min-width: 1000px) { .offline-bar { bottom: 18px; } }
.off-ok { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; color: var(--mint-ink); font-weight: 800; }
.off-ok svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.file-open.btnlike { font: inherit; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; color: inherit; }
/* PDF viewer */
.pdf-zoom { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 6px; background: var(--card); border-bottom: 1px solid var(--line); font-weight: 800; font-size: 13px; color: var(--muted); }
.pdf-pages { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 12px; background: var(--bg-2); -webkit-overflow-scrolling: touch; }
.pdf-pages canvas { display: block; background: #FFFFFF; border-radius: 6px; box-shadow: 0 6px 18px -10px rgba(0,0,0,0.4); max-width: none; }
.pdf-pages .pdf-msg { margin: 40px 16px; text-align: center; font-weight: 700; color: var(--muted); }
.hv-note { margin: 0; padding: 8px 14px; background: var(--butter); color: var(--butter-ink); font-size: 13px; font-weight: 700; border-bottom: 1px solid var(--line); }

/* ---------- Two columns on mobile collapse into one list ---------- */
.cols, .col { display: contents; }

/* ---------- laptops: use the whole screen ---------- */
@media (min-width: 1000px) {
  .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
  #sessionForm .col { gap: 10px; }
  /* lists flow into columns */
  #psCircle, #psInvites, #convoList .list, #mfList, #examList, #modList, #deckList, #notifList, #roomsList, #openRooms, #findResults, #suggestions, #recentList, #boardWeek, #boardStreaks {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; align-items: start; }
  #psInvites > h2, #psInvites > .empty, #psCircle > .empty, #convoList .empty, #mfList > .empty, #examList > .empty, #modList > .empty, #deckList > .empty, #notifList > .empty, #roomsList > .empty, #boardWeek > :not(.person):not(.lb-row), #boardStreaks > .empty { grid-column: 1 / -1; }
  #convoList .list .convo { border: 1px solid var(--line); border-radius: 18px; }
  .ava-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important; }
  .feelings { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mod-tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important; }
  .fun-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .session-card, #sessionLive { max-width: 900px; width: 100%; margin: 0 auto; }
  .timeline { max-width: 1100px; }
  .week { max-width: 900px; }
  .search { max-width: 520px; }
  .ptabs { max-width: 640px; }
  #vChat { max-width: 1100px !important; }
}
@media (min-width: 1000px) { .tiles:not(.fun-tiles) { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); } }

/* ---------- My House ---------- */
.house-card { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(135deg, var(--accent-soft), var(--card)); color: var(--ink); font: inherit; cursor: pointer; box-shadow: var(--shadow); }
.house-card .grow, .hs-invite .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.house-card b { font-family: var(--display); font-weight: 600; font-size: 18px; }
.house-card .grow > span, .hs-invite .grow > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.hc-ic { width: 46px; height: 46px; border-radius: 15px; background: var(--card); display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.hc-go { font-size: 26px; font-weight: 800; color: var(--accent-soft-ink); }
.hs-invite { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hs-intro p { margin: 0; }
.hs-list { margin: 0; padding-left: 4px; list-style: none; display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.emoji-row { display: flex; flex-wrap: wrap; gap: 8px; }
.emoji-btn { width: 46px; height: 46px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); font-size: 22px; cursor: pointer; }
.emoji-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.hs-people { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 800 14px var(--body); cursor: pointer; text-align: left; }
.hs-avas { display: flex; }
.hs-avas .ava { margin-left: -8px; border: 2px solid var(--card); }
.hs-avas .ava:first-child { margin-left: 0; }
#hsSeg button { flex: 1 1 0; padding: 0 6px; }
.note-title { font-family: var(--display); font-weight: 600; font-size: 19px; }
#hsNoteBody { min-height: 260px; resize: vertical; line-height: 1.55; font: 600 15px/1.55 var(--body); }
.act-row { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.act-row time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.pick-row.as-btn { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.pick-row.as-btn.on { border: 2px solid var(--accent); background: var(--accent-soft); }
#hsMineList { max-height: 260px; overflow-y: auto; }
.file-row > .pill { flex-shrink: 0; }
@media (min-width: 1000px) {
  #hsFileList, #hsExams, #hsMemberList { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; align-items: start; }
  #hsFileList > .empty, #hsExams > .empty, #hsExams > .hint { grid-column: 1 / -1; }
  #hsBody .ptabs { max-width: 640px; }
  .house-card { max-width: 760px; }
}
.hs-invite .grow { flex: 1 1 200px; }
.hs-invite .person-actions { margin-left: auto; }

/* ---------- Study FC ---------- */
.for-guys { display: none !important; }
body.guy .for-guys { display: flex !important; }
body.guy .side-links .for-guys { display: block !important; }
body.guy .for-girls { display: none !important; }
.fc-card { align-self: center; width: 240px; min-height: 330px; box-sizing: border-box; border-radius: 26px 26px 44px 44px; padding: 16px 16px 20px; position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 22px 44px -20px rgba(0,0,0,.6); }
.fc-card.tier-bronze { background: linear-gradient(160deg, #E2A979, #A8683C 60%, #7A4622); color: #2B1608; }
.fc-card.tier-silver { background: linear-gradient(160deg, #F1F4F8, #BFC7D2 60%, #8D96A3); color: #1E242D; }
.fc-card.tier-gold { background: linear-gradient(160deg, #F7DD8A, #C8962E 58%, #8E6514); color: #2A1E05; }
.fc-card.tier-legend { background: linear-gradient(160deg, #4B3C9A, #1F1747 62%, #0E0A22); color: #FFE7A3; }
.fc-rate { position: absolute; left: 16px; top: 14px; display: flex; flex-direction: column; align-items: center; line-height: 1; gap: 3px; }
.fc-rate b { font-family: var(--display); font-size: 42px; font-weight: 700; }
.fc-rate span { font-size: 13px; font-weight: 800; }
.fc-tier { position: absolute; right: 14px; top: 14px; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.14); }
.fc-ava { width: 132px; height: 132px; margin-top: 20px; display: block; }
.fc-ava svg, .fc-ava img { width: 100%; height: 100%; border-radius: 50%; }
.fc-name { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: .03em; }
.fc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 22px; font-size: 14px; font-weight: 700; }
.fc-stats b { font-weight: 800; }
.fc-bar { height: 10px; border-radius: 5px; background: var(--card-3); overflow: hidden; }
.fc-bar i { display: block; height: 100%; background: linear-gradient(90deg, #F6CD5C, #FFB37A); border-radius: 5px; }
.fc-explain p { margin: 0; }
.fc-pitch { border-radius: 24px; padding: 16px; background: linear-gradient(160deg, #1E7A4E, #0F4D31); color: #FFFFFF; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.fc-pitch p { margin: 0; font-weight: 700; color: #E2F6EA; }
.fc-live { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: #CDEFD9; }
.fc-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; width: 100%; }
.fc-score > div { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.fc-badge { font-size: 32px; line-height: 1; }
.fc-big { font-family: var(--display); font-size: 44px; font-weight: 700; color: #FFFFFF; }
.fc-res { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; }
.fc-wdl { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.fc-wdl.W { background: var(--mint); color: var(--mint-ink); }
.fc-wdl.D { background: var(--butter); color: var(--butter-ink); }
.fc-wdl.L { background: var(--pink); color: var(--pink-ink); }
.fc-table { padding: 0; overflow: hidden; }
.fc-tr { display: grid; grid-template-columns: 26px minmax(0, 1fr) 26px 26px 26px 26px 34px 36px; gap: 2px; padding: 10px 12px; font-size: 14px; font-weight: 700; border-bottom: 1px solid var(--line); align-items: center; }
.fc-tr:last-child { border-bottom: 0; }
.fc-tr span:not(.fc-tn), .fc-tr b { text-align: center; }
.fc-th { font-size: 12px; font-weight: 800; color: var(--muted); }
.fc-tr.me { background: var(--accent-soft); color: var(--accent-soft-ink); }
.fc-tn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#fcSeg button { flex: 1 1 0; }
@media (min-width: 1000px) {
  #fcCard { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
  #fcMatch, #fcLeague { max-width: 900px; }
}

/* ---------- Call rooms ---------- */
.room-kinds { display: flex; flex-direction: column; gap: 8px; }
.room-kinds button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.room-kinds button[aria-checked="true"] { border: 2px solid var(--accent); background: var(--accent-soft); }
.room-kinds .grow { display: flex; flex-direction: column; gap: 1px; }
.room-kinds .grow span { font-size: 12px; font-weight: 700; color: var(--muted); }
.rk-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--card-2); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.room-card.call { border-color: var(--sky-mid); }
.call-head { display: flex; align-items: center; gap: 10px; }
.call-head h1 { font-size: 22px; margin: 0; }
.call-head .hint { margin: 0; }
.pre-video { position: relative; aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; background: #17132A; }
.pre-video video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.pre-off { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #FFFFFF; font-weight: 800; background: #17132A; }
.pre-off[hidden] { display: none; }
.call-main { display: flex; flex-direction: column; gap: 10px; }
.call-stage { position: relative; border-radius: 20px; overflow: hidden; background: #211A31; height: 56vh; min-height: 260px; display: flex; flex-direction: column; }
.call-main.mode-faces .call-stage { display: none; }
.stage-who { position: absolute; right: 10px; top: 10px; z-index: 3; font-size: 12px; font-weight: 800; color: #FFFFFF; background: rgba(0,0,0,.45); padding: 4px 10px; border-radius: 999px; pointer-events: none; }
.stage-who:empty { display: none; }
.stage-sheet { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.stage-sheet[hidden] { display: none; }
.doc-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 12px; background: #2A2140; color: #F4EFFF; font-size: 13px; font-weight: 800; }
.doc-bar[hidden] { display: none; }
.doc-bar .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 0; }
.icon-btn.sm { width: 34px; height: 34px; min-height: 34px; }
.sheet-area { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 4px; }
.sheet-paper { position: relative; background: #FFFFFF; border-radius: 6px; box-shadow: 0 12px 30px -14px #000; touch-action: none; }
.sheet-paper canvas { position: absolute; left: 0; top: 0; display: block; border-radius: 6px; }
#clInk { touch-action: none; }
.ink-text { position: absolute; z-index: 4; min-width: 140px; max-width: 60%; padding: 4px 8px; border: 2px dashed currentColor; border-radius: 8px; background: rgba(255,255,255,.95); font: 800 15px var(--body); }
#clScreen { width: 100%; height: 100%; object-fit: contain; background: #000; }
.call-tools { display: flex; flex-direction: column; gap: 6px; }
.call-tools[hidden] { display: none; }
.tool-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tool { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: 800 13px var(--body); cursor: pointer; }
.tool.on { border: 2px solid var(--accent); background: var(--accent-soft); color: var(--accent-soft-ink); }
.swatch { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 3px var(--accent); }
.call-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.call-main.mode-faces .call-tiles[data-count="1"] { grid-template-columns: 1fr; }
.tile { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: linear-gradient(160deg, #3E2F70, #17132A); }
.call-main.mode-faces .tile { aspect-ratio: 3 / 4; }
.call-main.mode-faces .call-tiles[data-count="1"] .tile, .call-main.mode-faces .call-tiles[data-count="2"] .tile { aspect-ratio: 4 / 3; }
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile[data-tile] video[muted] { transform: scaleX(-1); }
.tile-ava { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }
.tile-ava .ava-photo, .tile-ava svg { width: 46%; height: auto; border-radius: 50%; }
.tile.cam-off video { visibility: hidden; }
.tile.cam-off .tile-ava { display: flex; }
.tile.presenting { outline: 3px solid #8BE0B5; outline-offset: -3px; }
.tile-name { position: absolute; left: 8px; bottom: 8px; font-size: 12px; font-weight: 800; color: #FFFFFF; background: rgba(0,0,0,.5); padding: 3px 9px; border-radius: 999px; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-msg { position: absolute; left: 8px; right: 8px; top: 8px; font-size: 12px; font-weight: 800; color: #FFFFFF; background: rgba(0,0,0,.55); padding: 4px 8px; border-radius: 10px; }
.call-controls { position: sticky; bottom: calc(env(safe-area-inset-bottom, 0px) + var(--nav-h) + 6px); z-index: 5; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 8px; border-radius: 22px; background: #17132A; box-shadow: 0 14px 30px -14px rgba(0,0,0,.6); }
.call-controls[hidden] { display: none; }
.cc { flex: 1 0 64px; min-height: 58px; border: 0; border-radius: 16px; background: #2A2140; color: #F4EFFF; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: 800 11px var(--body); cursor: pointer; }
.cc span { font-size: 19px; }
.cc[aria-pressed="true"] { background: #A890FB; color: #1A1330; }
.cc.danger { background: #C22F50; color: #FFFFFF; }
.cc:disabled { opacity: .45; cursor: default; }
.cc[hidden] { display: none; }
@media (min-width: 1000px) {
  .call-main { display: grid; grid-template-columns: minmax(0, 1fr) 250px; grid-template-areas: "tools tiles" "stage tiles"; grid-template-rows: auto 1fr; gap: 12px; }
  .call-main.mode-faces { grid-template-columns: 1fr; grid-template-areas: "tiles"; }
  .call-stage { grid-area: stage; height: calc(100vh - 300px); min-height: 420px; }
  .call-tools { grid-area: tools; flex-direction: row; flex-wrap: wrap; }
  .call-tiles { grid-area: tiles; grid-template-columns: 1fr; align-content: start; }
  .call-main.mode-faces .call-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1100px; margin: 0 auto; width: 100%; }
  .call-main.mode-faces .tile { aspect-ratio: 16 / 10; }
  .call-controls { bottom: 12px; max-width: 900px; margin: 0 auto; width: 100%; }
  .call-pre { max-width: 620px; }
}
