/* Shared styles for the sign-in page, client dashboard and owner panel.
   Same palette and type as the landing page, set in a calmer, work-focused layout. */
:root {
  /* Harbor: the default look. Soft dusty blue, light cards, navy ink and a warm coral accent. */
  --bg: #D8E0E8;
  --surface: #F1F4F7;
  --surface-2: #E4EAF0;
  --ink: #1A2433;
  --muted: #526073;
  --line: #BCC9D6;
  --line-strong: #76859A; /* borders of inputs and controls: 3.4:1, easy to see */
  --accent: #A3442C; /* deeper coral: readable as small text (4.6:1 on the background) */
  --accent-ink: #FFFFFF;
  --accent-soft: #F3DDD5;
  --btn: #1F3048;
  --btn-ink: #F1F4F7;
  --sale: #A9741C;
  --sale-ink: #FFFFFF;
  --good: #2F7A4F;
  --good-soft: #DCEBE1;
  --warn: #9A6514;
  --warn-soft: #F2E4C8;
  --bad: #B3362C;
  --bad-soft: #F6DEDA;
  --bubble-them: #E4EAF0;
  --logo-ink: #1A2433;
  --shadow: rgba(26, 36, 51, .18);
  /* Section colors: one muted color per area of the app. */
  --c-coach: #5B53B8;
  --c-practice: #B03E70;
  --c-progress: #1E7F78;
  --c-level: #9A6514;
  --c-money: #2F7A4F;
  --c-learn: #2D5BB8;
  --c-app: #A3442C;
  --c-account: #5E6B7D;
  --stars: none;

  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-hand: "Caveat", "Comic Sans MS", cursive;
  /* Small labels and big numbers: calm sans labels and serif numbers here; the dark themes use code-style mono. */
  --f-label: var(--f-body);
  --f-num: var(--f-display);
  --display-weight: 600;
  --radius: 14px;
  color-scheme: light;
}
/* Midnight: the original dark, space-themed look. Still available in Account → Appearance. */
html[data-palette="midnight"], html[data-palette="nebula"], html[data-palette="ocean"], html[data-palette="ember"] {
  --bg: #0B0D12;
  --surface: #12151C;
  --surface-2: #191D26;
  --ink: #E8ECF4;
  --muted: #97A1B5;
  --line: #262B36;
  --accent: #E0B15C;
  --accent-ink: #0B0D12;
  --accent-soft: #2A2419;
  --btn: var(--accent);
  --btn-ink: var(--accent-ink);
  --sale: #D98A64;
  --sale-ink: #1B1007;
  --good: #7FB58A;
  --good-soft: #18261C;
  --warn: #E0B15C;
  --warn-soft: #2E2614;
  --bad: #E08A80;
  --bad-soft: #33191A;
  --bubble-them: #1D212B;
  --logo-ink: #E8ECF4;
  --shadow: rgba(0, 0, 0, .6);
  --c-coach: #9A8FE0;
  --c-practice: #D27A9B;
  --c-progress: #4FB3A9;
  --c-level: #D4A24C;
  --c-money: #7FB58A;
  --c-learn: #6E9BE0;
  --c-app: #D98A64;
  --c-account: #8A94A6;
  --stars: radial-gradient(1px 1px at 20px 30px, #ffffff99, transparent), radial-gradient(1px 1px at 120px 80px, #ffffff77, transparent), radial-gradient(1.5px 1.5px at 260px 40px, #ffffffaa, transparent), radial-gradient(1px 1px at 330px 160px, #ffffff66, transparent), radial-gradient(1px 1px at 80px 200px, #ffffff55, transparent), radial-gradient(1.5px 1.5px at 200px 260px, #ffffff88, transparent), radial-gradient(1px 1px at 360px 300px, #ffffff55, transparent), radial-gradient(1px 1px at 150px 340px, #ffffff66, transparent);
  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-label: var(--f-mono);
  --f-num: var(--f-mono);
  --display-weight: 750;
  --radius: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
/* Decorations (like the shooting star) must never make the page scroll sideways. */
html, body { overflow-x: clip; }
body { background: var(--bg); color: var(--ink); font: 400 1rem/1.55 var(--f-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--f-display); font-stretch: 100%; letter-spacing: -.01em; line-height: 1.08; margin: 0; font-weight: var(--display-weight); }
h1 { font-size: clamp(1.7rem, 3.2vw, 2.25rem); letter-spacing: -.02em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
a { color: var(--accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { font: 700 .72rem var(--f-label); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

.wrap { max-width: 76rem; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--ink); font: var(--display-weight) 1.3rem/1 var(--f-display); letter-spacing: -.02em; }
.brand svg { width: 2.1rem; height: 2.1rem; }
.brand em { font-style: normal; color: var(--accent); }
.brand .tag { font: 700 .66rem var(--f-label); letter-spacing: .08em; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); padding: .2rem .45rem; border-radius: .3rem; margin-left: .25rem; }
.topnav { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }

/* Buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font: 600 .95rem/1 var(--f-body); padding: .75rem 1.1rem; border-radius: 12px; border: 0; cursor: pointer; text-decoration: none; background: var(--btn); color: var(--btn-ink); }
.btn:hover { filter: brightness(1.05); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.quiet { background: transparent; color: var(--muted); padding-inline: .6rem; }
.btn.good { background: var(--good); color: var(--btn-ink); }
.btn.small { padding: .5rem .8rem; font-size: .85rem; }
label { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; }
input, select, textarea { font: 400 1rem var(--f-body); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-strong, var(--line)); border-radius: 10px; padding: .7rem .85rem; width: 100%; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.hint { font-weight: 400; font-size: .82rem; color: var(--muted); }
.notice { padding: .75rem 1rem; border-radius: 10px; font-size: .92rem; }
.notice.error { background: var(--bad-soft); color: var(--bad); }
.notice.ok { background: var(--good-soft); color: var(--good); }
.notice.info { background: var(--accent-soft); color: var(--ink); }

/* Cards and layout */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: grid; gap: 1rem; align-content: start; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.stack { display: grid; gap: 1rem; align-content: start; min-width: 0; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
main.page { padding-block: 1.5rem 3rem; }

/* Status badges */
.badge { display: inline-flex; align-items: center; gap: .3rem; font: 700 .72rem var(--f-label); letter-spacing: .04em; text-transform: uppercase; padding: .25rem .5rem; border-radius: .35rem; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.active, .badge.done { background: var(--good-soft); color: var(--good); }
.badge.pending, .badge.stuck { background: var(--warn-soft); color: var(--warn); }
.badge.paused, .badge.skipped { background: var(--surface-2); color: var(--muted); }
.badge.completed { background: var(--accent-soft); color: var(--accent); }

/* 30-day card */
.bar { height: .55rem; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.stamps { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: .3rem; }
.stamp { aspect-ratio: 1; max-width: 100%; border-radius: .35rem; display: grid; place-items: center; font: 700 .7rem var(--f-label); border: 1.5px dashed var(--line); color: var(--muted); }
.stamp.done { background: var(--accent); border: 1.5px solid var(--accent); color: var(--accent-ink); }
.stamp.stuck { background: var(--warn-soft); border: 1.5px solid var(--warn); color: var(--warn); }
.stamp.skipped { background: var(--surface-2); border-style: solid; }
/* Missed days stay neutral: no red marks, so a break doesn't feel like failing. */
.stamp.missed { border-color: color-mix(in srgb, var(--muted) 75%, transparent); color: var(--muted); }
.stamp.today { border: 2px solid var(--accent); color: var(--accent); }
.stamp.sale:not(.done) { background: color-mix(in srgb, var(--sale) 35%, transparent); }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .8rem; color: var(--muted); }
.legend span { display: inline-flex; gap: .35rem; align-items: center; }
.legend i { width: .8rem; height: .8rem; border-radius: .2rem; display: inline-block; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.stat b { display: block; font: 700 1.5rem/1.1 var(--f-num); font-variant-numeric: tabular-nums; }
.stat span { font-size: .8rem; color: var(--muted); }

/* Chat */
/* One column that always matches the card, so the long quick-reply row scrolls instead of stretching the chat. */
.chat { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; height: min(78vh, 46rem); padding: 0; gap: 0; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: .65rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.avatar { width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 700 .8rem var(--f-label); flex: none; }
.chat-log { overflow-y: auto; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .6rem; }
.msg { max-width: 82%; padding: .6rem .85rem; border-radius: 1rem; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .95rem; }
.msg.assistant { background: var(--bubble-them); align-self: flex-start; border-bottom-left-radius: .3rem; }
.msg.assistant a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.msg.user { background: var(--btn); color: var(--btn-ink); align-self: flex-end; border-bottom-right-radius: .3rem; }
.msg.error { background: var(--bad-soft); color: var(--bad); align-self: center; font-size: .85rem; }
.day-sep { align-self: center; font: 600 .7rem var(--f-label); color: var(--muted); letter-spacing: .05em; text-transform: uppercase; padding: .3rem 0; }
.typing { display: inline-flex; gap: .25rem; }
.typing i { width: .4rem; height: .4rem; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.composer { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--line); align-items: flex-end; }
.composer textarea { min-width: 0; min-height: 2.9rem; max-height: 9rem; border-radius: 1.2rem; resize: none; }

/* Tables and tabs (owner panel) */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { background: none; border: 0; border-bottom: 2.5px solid transparent; padding: .8rem 1rem; font: 600 .95rem var(--f-body); color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .7rem .85rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font: 700 .72rem var(--f-label); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
td .sub { display: block; color: var(--muted); font-size: .82rem; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.kpi b { display: block; font: 700 1.8rem/1.1 var(--f-num); font-variant-numeric: tabular-nums; }
.kpi span { font-size: .82rem; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: max(1.25rem, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--surface-2); color: var(--ink); border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: 0 12px 30px -12px var(--shadow); padding: .7rem 1.1rem; border-radius: 999px; font-size: .9rem; z-index: 50; }

@media (max-width: 900px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }

/* ---------- Glass top bar, lift, motion. Stars and a faint grid only in the dark themes. ---------- */
body { background: var(--bg); }
html[data-palette="midnight"] body, html[data-palette="nebula"] body, html[data-palette="ocean"] body, html[data-palette="ember"] body {
  background:
    var(--stars),
    linear-gradient(#ffffff05 1px, transparent 1px),
    linear-gradient(90deg, #ffffff05 1px, transparent 1px),
    var(--bg);
  /* Eight star layers tile every 400px; the faint grid every 32px. */
  background-size: 400px 400px, 400px 400px, 400px 400px, 400px 400px, 400px 400px, 400px 400px, 400px 400px, 400px 400px, 32px 32px, 32px 32px;
  background-attachment: fixed;
}
.topbar { background: color-mix(in srgb, var(--surface) 78%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.btn { transition: transform .12s ease, filter .15s ease, box-shadow .15s ease; }
.btn:hover:not([disabled]) { box-shadow: 0 8px 22px -12px var(--shadow); }
.btn:active:not([disabled]) { transform: scale(.97); }
.card.lift { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card.lift:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -28px var(--shadow); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.bar i { transition: width .8s cubic-bezier(.2, .8, .2, 1); background: var(--accent); }

/* Progress ring in the dashboard header */
.ring { position: relative; width: 5.2rem; height: 5.2rem; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring .ring-bg { stroke: var(--line); }
.ring .ring-fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2, .8, .2, 1); }
.ring-txt { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.05; }
.ring-txt b { font: 700 1.05rem var(--f-num); }
.ring-txt span { font-size: .66rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* Quick replies above the chat box */
.chat-foot { border-top: 1px solid var(--line); min-width: 0; }
.chat-foot .composer { border-top: 0; }
.qr-row { display: flex; gap: .4rem; overflow-x: auto; padding: .65rem .75rem 0; scrollbar-width: none; }
.qr-row::-webkit-scrollbar { display: none; }
.qr { flex: none; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 999px; padding: .42rem .8rem; font: 500 .84rem var(--f-body); cursor: pointer; transition: border-color .15s ease, color .15s ease, transform .12s ease; }
.qr:hover:not([disabled]) { border-color: var(--accent); color: var(--accent); }
.qr:active:not([disabled]) { transform: scale(.96); }
.qr[disabled] { opacity: .5; cursor: default; }

/* Clickable day squares and the day preview */
button.stamp { font: 700 .7rem var(--f-label); background: transparent; cursor: pointer; padding: 0; transition: transform .12s ease; }
button.stamp:hover { transform: scale(1.08); }
.stamp.selected { outline: 2.5px solid var(--sale); outline-offset: 2px; }
.day-preview { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: .9rem 1rem; display: grid; gap: .55rem; animation: slideIn .25s ease both; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } }
.day-preview h3 { font-size: 1.15rem; }

/* Owner panel filter pills and clickable summary cards */
.pills { display: flex; gap: .4rem; flex-wrap: wrap; }
.pill { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: .5rem .9rem; font: 600 .88rem var(--f-body); cursor: pointer; display: inline-flex; gap: .4rem; align-items: center; transition: border-color .15s ease, background .15s ease; }
.pill span { font: 700 .72rem var(--f-label); color: var(--muted); }
.pill:hover { border-color: var(--accent); }
.pill[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pill[aria-pressed="true"] span { color: inherit; opacity: .8; }
.kpi[data-filter] { cursor: pointer; transition: transform .15s ease, border-color .15s ease; }
.kpi[data-filter]:hover { transform: translateY(-2px); border-color: var(--accent); }

/* Celebration burst when a task is marked done */
.burst { position: fixed; width: 9px; height: 9px; border-radius: 2px; pointer-events: none; z-index: 60; }

@media (prefers-reduced-motion: reduce) { .card.lift:hover, button.stamp:hover { transform: none; } }

/* Member feedback button and form */
.fb-fab { position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 40; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: .6rem 1rem; font: 600 .88rem var(--f-body); cursor: pointer; box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .45); }
.fb-fab::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 2px; background: var(--sale); margin-right: .5rem; vertical-align: .05rem; }
.fb-fab:hover { border-color: var(--accent); color: var(--accent); }
.fb-dialog { width: min(32rem, calc(100vw - 2rem)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 1.25rem; }
.fb-dialog::backdrop { background: rgba(5, 12, 18, .55); }
.fb-dialog .err { color: var(--bad); font-size: .9rem; min-height: 0; }
.fb-dialog .err:empty { display: none; }

/* "Get the app" card on the dashboard */
.app-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .35rem; }
.app-steps svg { width: 1.05em; height: 1.05em; vertical-align: -.15em; color: var(--accent); }
html.standalone .hide-in-app { display: none !important; }

/* Phone-sized top bar: one tidy row, logo never splits */
.brand { white-space: nowrap; }
@media (max-width: 560px) {
  .topbar .wrap { gap: .5rem; min-height: 58px; }
  /* No sideways scrolling in the pinned top bar: iPhone Safari stops registering taps on it after you scroll. */
  .topnav { flex-wrap: nowrap; gap: .1rem; min-width: 0; }
  .topnav #who { display: none; }
  .topnav .navlink { padding: .45rem .5rem; font-size: .85rem; white-space: nowrap; }
  .topnav .btn.small { padding: .45rem .65rem; font-size: .82rem; white-space: nowrap; }
  .brand { font-size: 1.25rem; }
  .brand svg { width: 1.8rem; height: 1.8rem; }
  main.page { padding-bottom: 5rem; }
}
@media (max-width: 440px) {
  .topbar .brand span:not(.tag) { display: none; }
}
@media (max-width: 380px) {
  .topnav .navlink { padding: .45rem .38rem; font-size: .8rem; }
  .topnav .btn.small { padding: .45rem .55rem; font-size: .78rem; }
}
/* Keep the Feedback button out of the way while typing */
body:has(textarea:focus, input:focus, select:focus) .fb-fab { display: none; }
.err { color: var(--bad); font-size: .9rem; margin: 0; }
.err:empty { display: none; }
/* On phones, Sign out lives on the Account page to keep the top bar to one row */
@media (max-width: 560px) { .topnav .hide-phone { display: none; } }

/* Dashboard tour */
.tour-shade { position: fixed; inset: 0; z-index: 60; background: transparent; }
.tour-focus { position: relative; z-index: 61; box-shadow: 0 0 0 3px var(--accent), 0 0 0 100vmax rgba(5, 12, 18, .58); border-radius: var(--radius); }
#chatCard.tour-focus { position: sticky; }
.tour-sheet { position: fixed; z-index: 62; left: 50%; transform: translateX(-50%); bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); width: min(28rem, calc(100vw - 2rem)); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: grid; gap: .5rem; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6); animation: slideIn .25s ease both; }
.tour-sheet h3 { font-size: 1.2rem; }
.tour-sheet p { margin: 0; color: var(--muted); }
.tour-sheet .row { justify-content: space-between; align-items: center; }
.tour-dots { font: 700 .72rem var(--f-label); color: var(--muted); letter-spacing: .06em; }
@media (max-width: 360px) { .topnav .hide-xs { display: none; } }
/* A soft fade on the right shows there are more quick replies to swipe. */
@media (max-width: 900px) { .qr-row { -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); padding-right: 1.5rem; } }
/* Back button: same place on every page */
.back-btn { text-decoration: none; justify-self: start; align-self: flex-start; }
.backbar { display: flex; align-items: center; gap: .75rem; margin-bottom: .9rem; }
.backbar[hidden] { display: none; }

/* Line icons (assets/common.js icon()) */
.ico { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.brand .orbit { color: var(--accent); }

/* Trademark mark after the wordmark */
.brand .tm, .tm { font: 600 .42em var(--f-body); vertical-align: super; margin-left: .12em; color: var(--muted); letter-spacing: 0; }

/* ---------- Color themes (chosen on the Account page) ---------- */
html[data-palette="nebula"] { --bg: #0C0A18; --surface: #15122A; --surface-2: #1C1835; --line: #2C2750; --accent: #B4A6FF; --accent-ink: #0C0A18; --accent-soft: #251F45; }
html[data-palette="ocean"] { --bg: #071218; --surface: #0E1C24; --surface-2: #132631; --line: #1F3644; --accent: #4FC3C7; --accent-ink: #071218; --accent-soft: #12303A; }
html[data-palette="ember"] { --bg: #120C0B; --surface: #1C1412; --surface-2: #251B18; --line: #3A2A25; --accent: #F08A5D; --accent-ink: #120C0B; --accent-soft: #33201A; }
html[data-palette="light"] {
  --bg: #F4F5F8; --surface: #FFFFFF; --surface-2: #F0F2F6; --ink: #12151C; --muted: #5B6474; --line: #DDE1E8;
  --accent: #9A6B12; --accent-ink: #FFFFFF; --accent-soft: #F6EBD3;
  --good: #2F7A45; --good-soft: #E3F2E7; --warn: #9A6B12; --warn-soft: #F6EBD3; --bad: #B3362C; --bad-soft: #FBE5E3; --bubble-them: #EEF0F4;
  --c-coach: #6D5BD0; --c-practice: #C2417A; --c-progress: #0F8C85; --c-level: #B7791F; --c-money: #2F855A; --c-learn: #2B57C9; --c-app: #C2552D; --c-account: #667085;
  color-scheme: light;
}
/* The logo's ring and moon follow the theme: navy on light backgrounds, light on dark ones. */
.orbit [stroke="#E8ECF4"] { stroke: var(--logo-ink); }
.orbit [fill="#E8ECF4"] { fill: var(--logo-ink); }
.orbit [stroke="#0B0D12"] { stroke: var(--surface); }
.orbit [fill="#E0B15C"] { fill: var(--accent); }
html[data-palette="light"] { --logo-ink: #12151C; --btn: #12151C; --btn-ink: #FFFFFF; --stars: none; }

/* Appearance pickers (Account page and owner Settings) */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .5rem; }
.swatch { display: grid; gap: .45rem; justify-items: start; padding: .7rem .8rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: 600 .9rem var(--f-body); cursor: pointer; }
.swatch .dots { display: flex; gap: .25rem; }
.swatch .dots i { width: 1.1rem; height: 1.1rem; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .35); }
.swatch[aria-checked="true"], .layout-opt[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.layouts { display: grid; gap: .5rem; }
.layout-opt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .9rem; align-items: center; text-align: left; padding: .7rem .8rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; cursor: pointer; }
.layout-txt { display: grid; gap: .1rem; } .layout-txt span { font-size: .85rem; color: var(--muted); }
.layout-pic { width: 3.6rem; height: 2.6rem; display: grid; gap: 3px; padding: 3px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); }
.layout-pic i { border-radius: 2px; background: var(--line); }
.layout-pic i:first-child { background: var(--accent); }
.layout-pic.grid { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr; } .layout-pic.grid i:first-child { grid-column: 1 / -1; } .layout-pic.grid i:nth-child(5) { display: none; }
.layout-pic.list { grid-template-rows: repeat(5, 1fr); }
.layout-pic.focus { grid-template-columns: repeat(3, 1fr); grid-template-rows: 2fr 2fr 1fr; } .layout-pic.focus i:nth-child(1), .layout-pic.focus i:nth-child(2) { grid-column: 1 / -1; } .layout-pic.focus i:nth-child(5) { display: none; }
.layout-pic.comfortable { grid-template-rows: repeat(3, 1fr); gap: 4px; } .layout-pic.comfortable i:nth-child(n+4) { display: none; }
.layout-pic.compact { grid-template-rows: repeat(5, 1fr); gap: 2px; }

/* Handwritten touches, used sparingly. */
.hand { font: 600 1.35rem/1.15 var(--f-hand); color: var(--accent); }

/* A confirmation with an action (like Undo) */
.toast.has-action { display: flex; align-items: center; gap: .6rem; background: var(--ink); color: var(--surface); border-color: transparent; padding: .35rem .5rem .35rem 1rem; border-radius: 14px; max-width: calc(100vw - 2rem); }
.toast-check { font-weight: 700; color: color-mix(in srgb, var(--good) 60%, white); }
.toast-btn { margin-left: .4rem; min-height: 44px; padding: 0 .8rem; border: 0; border-radius: 10px; background: transparent; color: color-mix(in srgb, var(--accent) 45%, white); font: 700 .92rem var(--f-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* Comfortable tap targets everywhere (44px is the common guideline). */
.btn { min-height: 44px; }
.btn.small { min-height: 40px; }
.qr, .pill, .tab { min-height: 40px; }
.toast.has-action { width: min(26rem, calc(100vw - 2rem)); bottom: calc(4.6rem + env(safe-area-inset-bottom, 0px)); }
.toast.has-action > span:nth-child(2) { flex: 1; }
