/* app.css: design tokens (light + dark) and shared pieces, each page's styles, and at the end the role layer that
   gives Anvil components (Button, Label, TextBox, notifications, dialogs, RepeatingPanel grids) the same look.
   Restyle the app by changing the tokens at the top (both the light and the dark blocks). */

/* Tai Chi Please tokens: rice paper, bamboo green, morning gold, seal red; dark mode is a moonlit grove.
   Fonts: Shippori Mincho B1 (headings), Nunito Sans (body), Noto Serif SC (Chinese names). Light and dark. */
:root {
  --c-bg: #f2f0e4; --c-surface: #fffdf5; --c-surface-2: #e9e6d6; --c-ink: #1b2a21; --c-muted: #55645a; --c-faint: #5c695d;
  --c-line: #dcd8c4; --c-brand: #2e6a44; --c-brand-ink: #fffdf5; --c-brand-soft: #dde9d8; --c-accent: #c98d2c; --c-seal: #b4432f;
  --c-good: #2c774b; --c-good-soft: #e0f0e3; --c-warn: #925d00; --c-warn-soft: #f7ecd4; --c-bad: #b8392c; --c-bad-soft: #f8e3df; --c-on-status: #fff;
  --fig-robe: #2e6a44; --fig-robe-2: #24553a; --fig-pants: #2a332d; --fig-pants-2: #1f2621; --fig-skin: #f0d6b4; --fig-skin-2: #dcbc96;
  --fig-line: #142019; --fig-sash: #c98d2c; --fig-trail: #c98d2c; --fig-mat: rgba(46, 106, 68, .10); --fig-shadow: rgba(20, 32, 25, .16);
  --radius: 20px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(27, 42, 33, .05), 0 10px 28px rgba(46, 70, 50, .08);
  --shadow-lg: 0 20px 54px rgba(27, 42, 33, .18);
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Shippori Mincho B1", "Noto Serif SC", Georgia, serif;
  --font-zh: "Noto Serif SC", "Shippori Mincho B1", serif;
  --maxw: 1120px;
  --header-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-bg: #0d1511; --c-surface: #142019; --c-surface-2: #1b2a21; --c-ink: #e6eee3; --c-muted: #a5b5a8; --c-faint: #829386;
    --c-line: #26372c; --c-brand: #84c895; --c-brand-ink: #0b140f; --c-brand-soft: #1a3324; --c-accent: #e7b75c; --c-seal: #b4432f;
    --c-good: #6fd39a; --c-good-soft: #15291d; --c-warn: #f0b34f; --c-warn-soft: #2d2311; --c-bad: #ff8a7a; --c-bad-soft: #331a17; --c-on-status: #0b140f;
    --fig-robe: #4f9a68; --fig-robe-2: #3c7b52; --fig-pants: #c9d6c9; --fig-pants-2: #a9b8aa; --fig-skin: #e9cfae; --fig-skin-2: #c9ab88;
    --fig-line: #050a07; --fig-sash: #e7b75c; --fig-trail: #e7b75c; --fig-mat: rgba(132, 200, 149, .10); --fig-shadow: rgba(0, 0, 0, .4);
    --shadow: 0 1px 0 rgba(255,255,255,.02), 0 10px 30px rgba(0,0,0,.35); --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --c-bg: #0d1511; --c-surface: #142019; --c-surface-2: #1b2a21; --c-ink: #e6eee3; --c-muted: #a5b5a8; --c-faint: #829386;
    --c-line: #26372c; --c-brand: #84c895; --c-brand-ink: #0b140f; --c-brand-soft: #1a3324; --c-accent: #e7b75c; --c-seal: #b4432f;
    --c-good: #6fd39a; --c-good-soft: #15291d; --c-warn: #f0b34f; --c-warn-soft: #2d2311; --c-bad: #ff8a7a; --c-bad-soft: #331a17; --c-on-status: #0b140f;
    --fig-robe: #4f9a68; --fig-robe-2: #3c7b52; --fig-pants: #c9d6c9; --fig-pants-2: #a9b8aa; --fig-skin: #e9cfae; --fig-skin-2: #c9ab88;
    --fig-line: #050a07; --fig-sash: #e7b75c; --fig-trail: #e7b75c; --fig-mat: rgba(132, 200, 149, .10); --fig-shadow: rgba(0, 0, 0, .4);
    --shadow: 0 1px 0 rgba(255,255,255,.02), 0 10px 30px rgba(0,0,0,.35); --shadow-lg: 0 18px 50px rgba(0, 0, 0, .55); color-scheme: dark;
}

/* Design kit: motion tokens, browser surfaces, wrapping, press feedback, reduced motion (APP_MAKER/design/kit.css). */
/* design-kit:start */
:root {
  /* easing: never ease-in on UI */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);      /* entering, exiting, most UI */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);  /* moving across the screen */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);   /* sheets, drawers */
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);      /* one authored entrance */
  /* durations: UI stays under 300ms, exits faster than entrances */
  --dur-press: 140ms; --dur-fast: 180ms; --dur-base: 220ms; --dur-slow: 320ms; --dur-hero: 640ms;
  /* 4px spacing scale */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;
  --measure: 65ch;
}

/* browser surfaces: the parts nobody draws */
::selection { background: color-mix(in srgb, var(--c-brand) 26%, transparent); color: inherit; }
html {
  accent-color: var(--c-brand); caret-color: var(--c-brand);
  scrollbar-color: color-mix(in srgb, var(--c-ink) 26%, transparent) transparent;
  -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { text-underline-offset: .2em; text-decoration-thickness: from-font; }
h1, h2, h3, h4, [role="heading"], .anvil-role-page-title { text-wrap: balance; }
p, li, dd, blockquote, figcaption { text-wrap: pretty; }
td, th, time, output, progress, .num, .tabular, [data-num] { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--c-brand) 60%, transparent); outline-offset: 2px; }

/* press feedback: pressable things answer the moment they're pressed */
:is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn, .kit-press) {
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-fast) ease,
              border-color var(--dur-fast) ease, color var(--dur-fast) ease, opacity var(--dur-fast) ease,
              box-shadow var(--dur-fast) ease;
}
:is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn, .kit-press):active:not(:disabled) { transform: scale(.97); }

/* entrances: content is visible by default; these only add the arrival */
@keyframes kit-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes kit-pop { from { opacity: 0; transform: scale(.96); } }
@keyframes kit-fade { from { opacity: 0; } }
.kit-in { animation: kit-in var(--dur-slow) var(--ease-out) both; }
.kit-stagger > * { animation: kit-in var(--dur-slow) var(--ease-out) both; }
.kit-stagger > :nth-child(2) { animation-delay: 40ms; } .kit-stagger > :nth-child(3) { animation-delay: 80ms; }
.kit-stagger > :nth-child(4) { animation-delay: 120ms; } .kit-stagger > :nth-child(5) { animation-delay: 160ms; }
.kit-stagger > :nth-child(n+6) { animation-delay: 200ms; }

/* reduced motion = fewer and gentler, not none: movement goes, short fades that confirm a state stay */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .kit-in, .kit-stagger > * { animation-name: kit-fade; animation-delay: 0ms !important; }
  :is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn, .kit-press):active:not(:disabled) { transform: none; }
}
/* design-kit:end */

/* The app owns the page (not Anvil's theme). */
html, body { background: var(--c-bg) !important; color: var(--c-ink); }
body { margin: 0; font: 16px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html.ui-modal-open { overflow: hidden; }

.ui, .ui *, .ui *::before, .ui *::after { box-sizing: border-box; }
.ui { font: 16px/1.55 var(--font-body); color: var(--c-ink); }
.ui h1, .ui h2, .ui h3, .ui h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.015em; font-weight: 700; color: var(--c-ink); }
.ui h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
.ui h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
.ui h3 { font-size: 1.2rem; }
.ui h4 { font-size: 1rem; }
.ui p { margin: 0 0 .8em; }
.ui :is(p, ul, ol, blockquote, figure) + :is(h2, h3) { margin-top: 1.4em; }  /* more space above a heading than below it */
.ui a { color: var(--c-brand); text-underline-offset: 3px; }
.ui [hidden] { display: none !important; }
.ui img { max-width: 100%; }
.ui .muted { color: var(--c-muted); }
.ui .faint { color: var(--c-faint); }
.ui .small { font-size: .875rem; }
.ui-ic, .ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }

/* layout */
.ui-wrap { max-width: var(--maxw); margin: 0 auto; padding: 32px 24px 72px; }
.ui-narrow { max-width: 720px; margin-left: auto; margin-right: auto; }
.ui-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ui-row.end { justify-content: flex-end; }
.ui-row.between { justify-content: space-between; }
.ui-row.top { align-items: flex-start; }
.ui-spacer { flex: 1; }
.ui-stack > * + * { margin-top: 14px; }
.ui-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ui-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ui-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.ui-page-head h1 { margin: 0; font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.ui-page-head p { margin: 6px 0 0; }

/* cards */
.ui-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.ui-card.flat { box-shadow: none; }
.ui-card.tight { padding: 14px 16px; }
.ui-card > :last-child { margin-bottom: 0; }

/* buttons */
:is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn) { font: 600 .95rem/1.2 var(--font-body); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; min-height: 44px; border-radius: 999px; border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-ink);
  cursor: pointer; text-decoration: none; white-space: nowrap; }  /* transitions + press scale: design kit */
:is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn):hover { border-color: var(--c-ink); }
:is(.ui-btn.primary, .anvil-role-btn.anvil-role-btn-primary > button, a.anvil-role-btn.anvil-role-btn-primary) { background: var(--c-brand); border-color: var(--c-brand); color: var(--c-brand-ink); }
:is(.ui-btn.primary, .anvil-role-btn.anvil-role-btn-primary > button, a.anvil-role-btn.anvil-role-btn-primary):hover { opacity: .92; }
:is(.ui-btn.ghost, .anvil-role-btn.anvil-role-btn-ghost > button, a.anvil-role-btn.anvil-role-btn-ghost) { background: transparent; border-color: transparent; color: var(--c-muted); }
:is(.ui-btn.ghost, .anvil-role-btn.anvil-role-btn-ghost > button, a.anvil-role-btn.anvil-role-btn-ghost):hover { background: var(--c-surface-2); color: var(--c-ink); }
:is(.ui-btn.danger, .anvil-role-btn.anvil-role-btn-danger > button, a.anvil-role-btn.anvil-role-btn-danger) { color: var(--c-bad); }
:is(.ui-btn.danger, .anvil-role-btn.anvil-role-btn-danger > button, a.anvil-role-btn.anvil-role-btn-danger):hover { border-color: var(--c-bad); }
:is(.ui-btn.danger.solid, .anvil-role-btn.anvil-role-btn-danger.anvil-role-btn-solid > button, a.anvil-role-btn.anvil-role-btn-danger.anvil-role-btn-solid) { background: var(--c-bad); border-color: var(--c-bad); color: var(--c-on-status); }
:is(.ui-btn.sm, .anvil-role-btn.anvil-role-btn-sm > button, a.anvil-role-btn.anvil-role-btn-sm) { min-height: 34px; padding: 6px 12px; font-size: .85rem; }
:is(.ui-btn.lg, .anvil-role-btn.anvil-role-btn-lg > button, a.anvil-role-btn.anvil-role-btn-lg) { min-height: 54px; padding: 14px 26px; font-size: 1.05rem; }
:is(.ui-btn.icon, .anvil-role-btn.anvil-role-btn-icon > button, a.anvil-role-btn.anvil-role-btn-icon) { width: 40px; min-height: 40px; padding: 0; }
:is(.ui-btn.block, .anvil-role-btn.anvil-role-btn-block > button, a.anvil-role-btn.anvil-role-btn-block) { width: 100%; }
:is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn):disabled { opacity: .5; cursor: not-allowed; transform: none; }
:is(.ui-btn.is-busy, .anvil-role-btn.anvil-role-btn-is-busy > button, a.anvil-role-btn.anvil-role-btn-is-busy) { position: relative; color: transparent !important; }
:is(.ui-btn.is-busy, .anvil-role-btn.anvil-role-btn-is-busy > button, a.anvil-role-btn.anvil-role-btn-is-busy)::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor;
  border-color: var(--c-muted) transparent var(--c-muted) transparent; animation: ui-spin .8s linear infinite; }
:is(.ui-btn.primary.is-busy, .anvil-role-btn.anvil-role-btn-primary.anvil-role-btn-is-busy > button, a.anvil-role-btn.anvil-role-btn-primary.anvil-role-btn-is-busy)::after { border-color: var(--c-brand-ink) transparent var(--c-brand-ink) transparent; }
@keyframes ui-spin { to { transform: rotate(360deg); } }
.ui :focus-visible { outline: 3px solid color-mix(in srgb, var(--c-brand) 55%, transparent); outline-offset: 2px; }

/* forms */
.ui-field { display: block; }
.ui-field > span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.ui-field > span em { font-style: normal; font-weight: 400; color: var(--c-muted); }
.ui input[type=text], .ui input[type=email], .ui input[type=password], .ui input[type=search], .ui input[type=number], .ui input[type=url],
.ui input[type=tel], .ui input[type=date], .ui input[type=time], .ui input[type=datetime-local], .ui select, .ui textarea {
  font: inherit; font-size: 1rem; color: var(--c-ink); background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  padding: 11px 13px; width: 100%; min-height: 46px; margin: 0; box-shadow: none; transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease; }
.ui textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
/* tick boxes and radios keep the focus ring above; typed-in fields swap it for the border + glow */
.ui input:not([type=checkbox]):not([type=radio]):focus, .ui select:focus, .ui textarea:focus { outline: none; border-color: var(--c-brand); box-shadow: 0 0 0 3px var(--c-brand-soft); }
.ui ::placeholder { color: var(--c-faint); }
.ui-hint { font-size: .85rem; color: var(--c-muted); margin: 6px 0 0; }
.ui-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .95rem; }
.ui-check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--c-brand); flex: none; }
.ui-error { background: var(--c-bad-soft); color: var(--c-bad); border-radius: var(--radius-sm); padding: 10px 14px; font-size: .92rem; }
.ui-note { background: var(--c-brand-soft); color: var(--c-ink); border-radius: var(--radius-sm); padding: 10px 14px; font-size: .92rem; }
.ui-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.ui-choice input { position: absolute; opacity: 0; pointer-events: none; }
.ui-choice span { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border: 1px solid var(--c-line); border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; background: var(--c-surface); }
.ui-choice input:checked + span { border-color: var(--c-brand); background: var(--c-brand-soft); }
.ui-choice input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--c-brand) 55%, transparent); }

/* small pieces */
.ui-badge { display: inline-flex; align-items: center; gap: 5px; font: 600 .75rem/1.3 var(--font-body); padding: 4px 10px; border-radius: 999px;
  background: var(--c-surface-2); color: var(--c-muted); white-space: nowrap; }
.ui-badge.brand { background: var(--c-brand-soft); color: var(--c-brand); }
.ui-badge.good { background: var(--c-good-soft); color: var(--c-good); }
.ui-badge.warn { background: var(--c-warn-soft); color: var(--c-warn); }
.ui-badge.bad { background: var(--c-bad-soft); color: var(--c-bad); }
.ui-seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--c-surface-2); border-radius: 999px; border: 1px solid var(--c-line); }
.ui-seg button { font: 500 .85rem/1 var(--font-body); border: 0; background: none; color: var(--c-muted); padding: 8px 13px; border-radius: 999px; cursor: pointer; }
.ui-seg button.on { background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow); }
.ui-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--c-line); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.ui-tabs a, .ui-tabs button { font: 600 .92rem/1 var(--font-body); border: 0; background: none; color: var(--c-muted); padding: 12px 14px; border-bottom: 2px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; margin-bottom: -1px; }
.ui-tabs .on { color: var(--c-ink); border-bottom-color: var(--c-brand); }
.ui-tabs .count { font-size: .75rem; background: var(--c-surface-2); border-radius: 999px; padding: 2px 7px; }
.ui-empty { text-align: center; padding: 48px 20px; border: 1px dashed var(--c-line); border-radius: var(--radius); color: var(--c-muted); }
.ui-empty :is(.ui-ic, .ic) { width: 34px; height: 34px; color: var(--c-faint); margin-bottom: 8px; }
.ui-empty :is(h2, h3) { color: var(--c-ink); font-size: 1.15rem; margin-top: 0; }
.ui-avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--c-brand-soft); color: var(--c-brand); font: 700 .85rem/1 var(--font-body); }
.ui-list { display: grid; gap: 10px; }
.ui-item { display: flex; gap: 14px; align-items: flex-start; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 16px 18px; }
.ui-item .grow { flex: 1; min-width: 0; }
.ui-item h3 { margin: 0 0 4px; font-size: 1.05rem; }
.ui-item p { margin: 0; overflow-wrap: anywhere; }
.ui-skel { border-radius: var(--radius); background: linear-gradient(90deg, var(--c-surface-2), var(--c-surface), var(--c-surface-2)); background-size: 200% 100%;
  animation: ui-skel 1.4s linear infinite; min-height: 80px; }
@keyframes ui-skel { to { background-position: -200% 0; } }
.ui-stat { display: block; }
.ui-stat b { display: block; font: 800 2rem/1.1 var(--font-display); }
.ui-stat span { color: var(--c-muted); font-size: .9rem; }

/* header */
.ui-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--c-bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--c-line); }
.ui-header-in { max-width: var(--maxw); margin: 0 auto; height: var(--header-h); padding: 0 24px; display: flex; align-items: center; gap: 22px; }
.ui-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--c-ink) !important; font: 800 1.15rem/1 var(--font-display); letter-spacing: -.01em; }
.ui-brand img { width: 32px; height: 32px; border-radius: 9px; }
.ui-nav { display: flex; gap: 2px; }
.ui-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 999px; color: var(--c-muted); text-decoration: none; font-weight: 600; font-size: .93rem; }
.ui-nav a:hover { color: var(--c-ink); background: var(--c-surface-2); }
.ui-nav a.on { color: var(--c-ink); background: var(--c-surface-2); }
.ui-header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; position: relative; }
.ui-avatar-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; background: var(--c-brand); color: var(--c-brand-ink); font: 700 .85rem/1 var(--font-body); }
.ui-menu { position: absolute; right: 0; top: calc(100% + 10px); width: 280px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; z-index: 60; transform-origin: top right; animation: ui-pop var(--dur-fast) var(--ease-out); }
.ui-menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--c-line); margin-bottom: 6px; display: grid; gap: 2px; overflow-wrap: anywhere; }
.ui-menu > a, .ui-menu > button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); border: 0; background: none;
  font: 500 .95rem/1.2 var(--font-body); color: var(--c-ink); text-decoration: none; cursor: pointer; text-align: left; }
.ui-menu > a:hover, .ui-menu > button:hover { background: var(--c-surface-2); }
.ui-menu-block { padding: 8px 12px 10px; display: grid; gap: 8px; }
@keyframes ui-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* main + footer */
.ui-shell { min-height: 100vh; display: flex; flex-direction: column; }
.ui-main { flex: 1; }
.ui-shell.no-chrome .ui-header, .ui-shell.no-chrome .ui-footer, .ui-shell.no-chrome .ui-tabbar { display: none; }
.ui-footer { border-top: 1px solid var(--c-line); background: var(--c-surface); }
.ui-footer-in { max-width: var(--maxw); margin: 0 auto; padding: 32px 24px 40px; display: grid; grid-template-columns: 1fr auto; gap: 18px 24px; align-items: start; }
.ui-footer-brand p { margin: 8px 0 0; }
.ui-footer-links { display: flex; gap: 6px 18px; flex-wrap: wrap; justify-content: flex-end; }
.ui-footer-links a, .ui-footer-links button { font: 500 .92rem/1.4 var(--font-body); color: var(--c-muted); background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: none; }  /* 24px+ touch height */
.ui-footer-links a:hover, .ui-footer-links button:hover { color: var(--c-ink); }
.ui-footer-legal { grid-column: 1 / -1; margin: 0; }

/* phone tab bar (shown on small screens, except on the landing and sign-in pages for visitors) */
.ui-tabbar { display: none; }
.ui-tabbar:empty { display: none !important; }

/* toasts + modals */
.ui-toasts { position: fixed; z-index: 1000; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
.ui-toast { display: flex; gap: 10px; align-items: center; background: var(--c-ink); color: var(--c-bg); padding: 13px 16px; border-radius: 14px; box-shadow: var(--shadow-lg);
  font-weight: 500; animation: ui-pop var(--dur-base) var(--ease-out); transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.ui-toast.error { background: var(--c-bad); color: var(--c-on-status); }
.ui-toast.ok { background: var(--c-good); color: var(--c-on-status); }
.ui-toast.out { opacity: 0; transform: translateY(8px); }
.ui-modal-wrap { position: fixed; inset: 0; z-index: 900; background: rgba(10, 12, 20, .5); display: grid; place-items: center; padding: 16px; overflow-y: auto; animation: ui-fade var(--dur-fast) ease; }
.ui-modal { position: relative; width: min(100%, 520px); background: var(--c-surface); border-radius: calc(var(--radius) + 4px); padding: 28px; box-shadow: var(--shadow-lg); animation: kit-pop var(--dur-base) var(--ease-out); outline: none; }
.ui-modal.wide { width: min(100%, 760px); }
.ui-modal h2 { padding-right: 40px; }
.ui-modal-x { position: absolute; top: 14px; right: 14px; }
@keyframes ui-fade { from { opacity: 0; } }

@media (max-width: 720px) {
  .ui-wrap { padding: 22px 16px 56px; }
  .ui-header-in { padding: 0 16px; gap: 12px; }
  .ui-nav { display: none; }
  .ui-brand span { font-size: 1.05rem; }
  .ui-header-right :is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn) { padding: 9px 13px; min-height: 40px; font-size: .9rem; }
  .ui-shell.tabs-on .ui-tabbar { display: flex; position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; background: var(--c-surface); border-top: 1px solid var(--c-line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .ui-tabbar a { flex: 1; display: grid; justify-items: center; gap: 3px; padding: 6px 2px; border-radius: 12px; color: var(--c-muted); text-decoration: none; font: 600 .75rem/1 var(--font-body); }
  .ui-tabbar a :is(.ui-ic, .ic) { width: 22px; height: 22px; }
  .ui-tabbar a.on { color: var(--c-brand); }
  .ui-shell.tabs-on .ui-footer { padding-bottom: 72px; }
  .ui-footer-in { grid-template-columns: 1fr; }
  .ui-footer-links { justify-content: flex-start; }
  .ui-grid.two { grid-template-columns: 1fr; }
  .ui-menu { position: fixed; left: 12px; right: 12px; top: calc(var(--header-h) + 6px); width: auto; }
  .ui-modal { padding: 24px 18px; }
}
@media (max-width: 380px) {
  .ui-header-right :is(.ui-btn.ghost, .anvil-role-btn.anvil-role-btn-ghost > button, a.anvil-role-btn.anvil-role-btn-ghost) { display: none; }
}
@media (prefers-reduced-motion: reduce) {  /* drop movement, keep the fades (design/README.md 6) */
  .ui-menu, .ui-toast, .ui-modal { animation-name: kit-fade; }
  .ui-toast.out { transform: none; }
  .ui-skel { animation: none; }
}



/* ===== the bamboo stage + the teacher (tc-figure.js) ===== */
.tc-stage { position: relative; overflow: hidden; border-radius: var(--radius); isolation: isolate;
  background: linear-gradient(180deg, #eef0dd 0%, #e5ead3 45%, #dfe6cc 100%); }
.ui-dark .tc-stage { background: linear-gradient(180deg, #0b1712 0%, #0f1e17 55%, #12241a 100%); }
.tc-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.tc-bg .stalk { transform-box: fill-box; transform-origin: 50% 100%; animation: tc-sway var(--sw, 9s) ease-in-out infinite alternate; }
.tc-bg .far { fill: #bccfae; } .tc-bg .mid { fill: #8fb388; } .tc-bg .near { fill: #4f8a5c; }
.tc-bg .node { stroke: rgba(255, 255, 240, .55); }
.tc-bg .leaf.far { fill: #c7d7b5; } .tc-bg .leaf.mid { fill: #9fc092; } .tc-bg .leaf.near { fill: #5d9767; }
.tc-bg .sun { fill: #f3cf7d; opacity: .85; } .tc-bg .sunglow { fill: #f6dc9a; opacity: .45; }
.tc-bg .mist { fill: url(#tcMist); }
.ui-dark .tc-bg .far { fill: #183126; } .ui-dark .tc-bg .mid { fill: #1f3f2e; } .ui-dark .tc-bg .near { fill: #2b5a3c; }
.ui-dark .tc-bg .leaf.far { fill: #1a3528; } .ui-dark .tc-bg .leaf.mid { fill: #22462f; } .ui-dark .tc-bg .leaf.near { fill: #2f6542; }
.ui-dark .tc-bg .node { stroke: rgba(0, 0, 0, .35); }
.ui-dark .tc-bg .sun { fill: #e9ecd8; opacity: .8; } .ui-dark .tc-bg .sunglow { fill: #cfe5cf; opacity: .12; }
@keyframes tc-sway { from { transform: rotate(calc(var(--sa, 1deg) * -1)); } to { transform: rotate(var(--sa, 1deg)); } }
.tc-fig { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; touch-action: pan-y; cursor: grab; }
.tc-fig:active { cursor: grabbing; }
.tc-fig .ln { stroke: var(--fig-line); stroke-linecap: round; stroke-linejoin: round; fill: none; }
.tc-fig .robe { stroke: var(--fig-robe); } .tc-fig .robe2 { stroke: var(--fig-robe-2); }
.tc-fig .pants { stroke: var(--fig-pants); } .tc-fig .pants2 { stroke: var(--fig-pants-2); }
.tc-fig .skin { stroke: var(--fig-skin); } .tc-fig .skin2 { stroke: var(--fig-skin-2); }
.tc-fig .f-skin { fill: var(--fig-skin); stroke: var(--fig-line); }
.tc-fig .f-robe { fill: var(--fig-robe); stroke: var(--fig-line); stroke-linejoin: round; }
.tc-fig .f-hair { fill: var(--fig-line); }
.tc-fig .sash { stroke: var(--fig-sash); stroke-linecap: round; }
.tc-fig .mat { fill: var(--fig-mat); stroke: none; }
.tc-fig .shadow { fill: var(--fig-shadow); }
.tc-fig .trail { stroke: var(--fig-trail); fill: none; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .tc-bg .stalk { animation: none; } }
.zh { font-family: var(--font-zh); font-weight: 500; letter-spacing: .04em; }

/* ===== grove, thumbnails, feelings, toggles, seals (tc-state.js) ===== */
.tc-grove { width: 100%; height: auto; display: block; }
.tc-grove .g-ground { fill: var(--c-surface-2); }
.tc-grove .g-stalk { fill: var(--c-brand); }
.tc-grove .g-stalk.old { fill: color-mix(in srgb, var(--c-brand) 62%, var(--c-surface)); }
.tc-grove .g-node { stroke: var(--c-surface); stroke-width: 1.4; }
.tc-grove .g-leaf { fill: color-mix(in srgb, var(--c-brand) 75%, var(--c-accent)); }
.tc-grove .g-tuft { stroke: var(--c-faint); stroke-width: 1.4; fill: none; stroke-linecap: round; opacity: .55; }
.tc-grove .g-today { fill: var(--c-accent); opacity: .22; }
.tc-grove .g-sway { transform-box: fill-box; transform-origin: 50% 100%; animation: tc-sway 8s ease-in-out infinite alternate; }
.tc-grove .g-grow { transform-box: fill-box; transform-origin: 50% 100%; animation: tc-grow 2.4s var(--ease-out) both; }
@keyframes tc-grow { from { transform: scaleY(0); } }
.tc-thumb { position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4 / 3; }
.tc-thumb .tc-fig { cursor: default; pointer-events: none; }
.tc-feel { display: flex; gap: 6px; flex-wrap: wrap; }
.tc-feel button { font: 600 .88rem/1 var(--font-body); padding: 10px 13px; border-radius: 999px; border: 1px solid var(--c-line); background: var(--c-surface);
  color: var(--c-ink); cursor: pointer; display: inline-flex; gap: 7px; align-items: center; min-height: 40px; }
.tc-feel button i { width: 10px; height: 10px; border-radius: 50%; background: var(--c-brand); display: inline-block; }
.tc-feel button.on { background: var(--c-brand); border-color: var(--c-brand); color: var(--c-brand-ink); }
.tc-feel button.on i { background: var(--c-brand-ink); }
.tc-toggle { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--c-line); cursor: pointer; }
.tc-toggle:last-child { border-bottom: 0; }
.tc-toggle > span { display: flex; gap: 10px; align-items: center; }
.tc-toggle input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--c-surface-2); border: 1px solid var(--c-line);
  position: relative; cursor: pointer; flex: none; transition: background var(--dur-fast) var(--ease-out); margin: 0; }
.tc-toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--c-surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform var(--dur-fast) var(--ease-out); }
.tc-toggle input:checked { background: var(--c-brand); border-color: var(--c-brand); }
.tc-toggle input:checked::after { transform: translateX(18px); }
.tc-seal { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--c-seal); color: #fff8ee;
  font: 700 1.05rem/1 var(--font-zh); transform: rotate(-4deg); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); flex: none; }
.tc-cat { display: inline-flex; gap: 6px; align-items: center; font: 700 .75rem/1.2 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--c-brand); }
.tc-cat :is(.ui-ic, .ic) { width: 15px; height: 15px; }

/* ===== landing ===== */
.ui-shell.page-landing .ui-main { overflow-x: clip; }
.lp-hero { position: relative; padding: 48px 0 34px; }
.lp-hero .ui-wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: center; padding-top: 0; padding-bottom: 0; }
.lp-hero h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); line-height: 1.08; margin-bottom: 18px; }
.lp-hero h1 em { font-style: normal; color: var(--c-brand); position: relative; }
.lp-hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .14em; background: var(--c-accent); opacity: .45; border-radius: 4px; z-index: -1; }
.lp-lead { font-size: 1.15rem; color: var(--c-muted); max-width: 34em; margin-bottom: 26px; }
.lp-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.lp-proof { margin-top: 20px; display: flex; gap: 18px; flex-wrap: wrap; color: var(--c-muted); font-size: .92rem; }
.lp-proof span { display: inline-flex; gap: 6px; align-items: center; }
.lp-proof :is(.ui-ic, .ic) { color: var(--c-good); }
.lp-art { position: relative; aspect-ratio: 1 / 1.02; border-radius: 28px; box-shadow: var(--shadow-lg); }
.lp-art .cap { position: absolute; left: 14px; bottom: 14px; z-index: 3; display: flex; gap: 10px; align-items: center; padding: 8px 14px 8px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--c-surface) 88%, transparent); box-shadow: var(--shadow); }
.lp-art .cap .tc-seal { width: 30px; height: 30px; font-size: .9rem; border-radius: 8px; }
.lp-art .cap b { display: block; font-size: .92rem; line-height: 1.2; }
.lp-art .cap small { color: var(--c-muted); }
.lp-art .circle { position: absolute; right: 14px; top: 14px; z-index: 3; }
.lp-section { padding: 52px 0; }
.lp-section .ui-wrap { padding-top: 0; padding-bottom: 0; }
.lp-head { text-align: center; max-width: 660px; margin: 0 auto 32px; }
.lp-head p { color: var(--c-muted); font-size: 1.06rem; }
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.lp-step { position: relative; padding-top: 60px; }
.lp-step::before { counter-increment: s; content: counter(s); position: absolute; top: 18px; left: 22px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--c-brand); color: var(--c-brand-ink); font: 700 .95rem/1 var(--font-display); }
.lp-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; position: relative; }
.lp-flow::before { content: ""; position: absolute; left: 10%; right: 10%; top: 31px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--c-accent), var(--c-brand)); opacity: .5; }
.lp-flow div { text-align: center; padding: 0 8px; position: relative; }
.lp-flow .icw { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--c-surface); border: 2px solid var(--c-line); color: var(--c-brand); }
.lp-flow .icw :is(:is(.ui-ic, .ic), .ic) { width: 28px; height: 28px; }
.lp-flow b { display: block; font-family: var(--font-display); font-size: 1.05rem; }
.lp-flow small { color: var(--c-muted); display: block; margin-top: 4px; }
.lp-feature :is(.ui-ic, .ic) { width: 28px; height: 28px; color: var(--c-brand); margin-bottom: 12px; }
.lp-feature h3 { margin-bottom: 6px; }
.lp-feature p { color: var(--c-muted); margin: 0; }
.lp-lymph { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px; align-items: center; }
.lp-lymph .tc-stage { aspect-ratio: 1 / 1; max-height: 460px; width: 100%; }
.lp-lymph ol { padding-left: 20px; color: var(--c-muted); }
.lp-lymph ol li { margin-bottom: 4px; }
.lp-faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.lp-faq details { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 4px 20px; }
.lp-faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; color: var(--c-brand); font-size: 1.3rem; line-height: 1; }
.lp-faq details[open] summary::after { content: "–"; }
.lp-faq details p { color: var(--c-muted); margin: 0 0 16px; }
.lp-band { position: relative; overflow: hidden; border-radius: calc(var(--radius) + 8px); padding: 44px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--c-brand); color: var(--c-brand-ink); }
.lp-band h2 { color: var(--c-brand-ink); margin: 0 0 6px; }
.lp-band p { margin: 0; opacity: .85; }
.lp-band :is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn) { background: var(--c-brand-ink); color: var(--c-brand); border-color: transparent; }
.lp-band svg.deco { position: absolute; right: -10px; bottom: -10px; width: 260px; height: 200px; opacity: .18; pointer-events: none; }
@media (max-width: 860px) {
  .lp-hero { padding-top: 22px; }
  .lp-hero .ui-wrap { grid-template-columns: 1fr; gap: 26px; }
  .lp-art { max-width: 480px; width: 100%; margin: 0 auto; aspect-ratio: 1 / .95; }
  .lp-steps { grid-template-columns: 1fr; }
  .lp-flow { grid-template-columns: 1fr; gap: 14px; }
  .lp-flow::before { left: 31px; right: auto; top: 10px; bottom: 10px; width: 4px; height: auto; background: linear-gradient(180deg, var(--c-accent), var(--c-brand)); }
  .lp-flow div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; text-align: left; align-items: center; padding: 0; }
  .lp-flow .icw { margin: 0; }
  .lp-lymph { grid-template-columns: 1fr; }
  .lp-band { padding: 30px 22px; }
  .lp-section { padding: 38px 0; }
}
/* Watch section: the app's YouTube video. Click to play; nothing loads from YouTube before the click. */
.ytf .ytf-in { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px; align-items: center; max-width: 1040px; margin: 0 auto; }
.ytf .ytf-copy h2 { margin: 6px 0 10px; }
.ytf .ytf-copy p { color: var(--c-muted); margin: 0 0 16px; }
.ytf .ytf-link { font-weight: 700; }
.ytf .ytf-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius, 16px); overflow: hidden; background: #000; border: 1px solid var(--c-line); box-shadow: var(--shadow-lg); }
.ytf .ytf-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ytf .ytf-cover { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: inherit; font: inherit; cursor: pointer; display: block; }
.ytf .ytf-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--dur-base) var(--ease-out), filter var(--dur-base) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .ytf .ytf-cover:hover img { transform: scale(1.02); filter: brightness(.92); } }
.ytf .ytf-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); line-height: 0; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .35)); transition: transform var(--dur-fast) var(--ease-out); }
.ytf .ytf-cover:focus-visible .ytf-play { transform: translate(-50%, -50%) scale(1.08); }
@media (hover: hover) and (pointer: fine) { .ytf .ytf-cover:hover .ytf-play { transform: translate(-50%, -50%) scale(1.08); } }
.ytf .ytf-cover:focus-visible { outline: 3px solid var(--c-brand); outline-offset: -3px; }
.ytf .ytf-len { position: absolute; right: 10px; bottom: 10px; background: rgba(0, 0, 0, .78); color: #fff; font-size: .8rem; font-weight: 700; line-height: 1.3; padding: 3px 7px; border-radius: 5px; }
.ytf .ytf-note { font-size: .8rem; color: var(--c-muted); margin: 10px 2px 0; }
@media (max-width: 800px) { .ytf .ytf-in { grid-template-columns: minmax(0, 1fr); gap: 22px; } }
@media (max-width: 480px) { .ytf .ytf-play svg { width: 56px; height: 40px; } }

/* ===== practice ===== */
.pr-hero { position: relative; min-height: 300px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: stretch; overflow: hidden; padding: 0; }
.pr-hero .txt { position: relative; z-index: 2; padding: 30px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.pr-hero .txt h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.pr-hero .fig { position: relative; min-height: 280px; }
.pr-hero .fig .tc-stage { position: absolute; inset: 0; border-radius: 0; }
.pr-len { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 22px; }
.pr-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .pr-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); } }
.pr-card .top { display: flex; align-items: center; gap: 12px; }
.pr-card .icw { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--c-brand-soft); color: var(--c-brand); flex: none; }
.pr-card .icw :is(:is(.ui-ic, .ic), .ic) { width: 24px; height: 24px; }
.pr-card h3 { margin: 0; }
.pr-card p { margin: 0; color: var(--c-muted); }
.pr-card .go { margin-top: auto; display: flex; justify-content: space-between; align-items: center; color: var(--c-brand); font-weight: 700; }
.pr-thought { margin-top: 26px; text-align: center; padding: 26px; }
.pr-thought q { font: 600 1.25rem/1.45 var(--font-display); display: block; max-width: 34em; margin: 0 auto 6px; quotes: "\201C" "\201D"; }
.pr-pick { display: grid; gap: 14px; max-height: 56vh; overflow: auto; padding-right: 4px; }
.pr-pick fieldset { border: 0; padding: 0; margin: 0; }
.pr-pick legend { padding: 0; margin-bottom: 6px; }
.pr-pick .opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.pr-pick label { display: flex; gap: 8px; align-items: center; font-size: .92rem; padding: 7px 9px; border: 1px solid var(--c-line); border-radius: 10px; cursor: pointer; }
.pr-pick input { accent-color: var(--c-brand); width: 17px; height: 17px; flex: none; }
@media (max-width: 760px) {
  .pr-hero { grid-template-columns: 1fr; }
  .pr-hero .fig { min-height: 240px; order: -1; }
  .pr-hero .txt { padding: 20px; }
}

/* ===== learn ===== */
.ln-stages { display: grid; gap: 16px; }
.ln-stage { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 16px; }
.ln-stage .rail { position: relative; display: flex; flex-direction: column; align-items: center; }
.ln-stage .rail::after { content: ""; position: absolute; top: 62px; bottom: -18px; width: 10px; border-radius: 5px; background: var(--c-surface-2); }
.ln-stage:last-child .rail::after { display: none; }
.ln-stage.done .rail::after { background: var(--c-brand); opacity: .55; }
.ln-stage .tc-seal { width: 56px; height: 56px; font-size: 1.6rem; border-radius: 12px; position: relative; z-index: 1; }
.ln-stage.todo .tc-seal { background: var(--c-surface-2); color: var(--c-faint); box-shadow: none; }
.ln-moves { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 12px; }
.ln-move { display: grid; gap: 8px; text-decoration: none; color: inherit; padding: 10px; border-radius: var(--radius); border: 1px solid var(--c-line); background: var(--c-surface); transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .ln-move:hover { transform: translateY(-2px); box-shadow: var(--shadow); } }
.ln-move.next { border-color: var(--c-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 25%, transparent); }
.ln-move.locked { opacity: .62; }
.ln-move b { font-family: var(--font-display); font-size: 1rem; line-height: 1.25; }
.ln-move .zh { font-size: .9rem; color: var(--c-muted); }
.ln-dots { display: flex; gap: 4px; align-items: center; }
.ln-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--c-surface-2); border: 1px solid var(--c-line); }
.ln-dots i.on { background: var(--c-brand); border-color: var(--c-brand); }
.ln-cat { margin-top: 28px; }
.ln-cat:first-child { margin-top: 0; }
.ln-form { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ln-form a { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--c-surface); border: 1px solid var(--c-line); text-decoration: none; color: inherit; }
.ln-form a:hover { border-color: var(--c-brand); }
.ln-form .n { font: 700 1.1rem/1 var(--font-display); color: var(--c-brand); text-align: center; }
.ln-form .zh { color: var(--c-muted); font-size: .95rem; }
.ly-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.ly-map { position: relative; aspect-ratio: 3 / 4; max-height: 620px; width: 100%; }
.ly-map .dots { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.ly-map .dots circle { fill: var(--c-accent); stroke: var(--c-surface); stroke-width: 2; }
/* design-ok: tight-leading (one-line numbers inside the map's dots) */
.ly-map .dots text { font: 700 12px/1 var(--font-body); fill: #1b2a21; text-anchor: middle; dominant-baseline: central; }
.ly-map .dots .ring { fill: none; stroke: var(--c-accent); stroke-width: 1.5; opacity: .6; animation: ly-pulse 2.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ly-pulse { from { transform: scale(.6); opacity: .8; } to { transform: scale(1.8); opacity: 0; } }
.ly-order { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: ly; }
.ly-order li { counter-increment: ly; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
.ly-order li::before { content: counter(ly); width: 26px; height: 26px; border-radius: 50%; background: var(--c-accent); color: #1b2a21; display: grid; place-items: center; font: 800 .8rem/1 var(--font-body); }
.ly-order a { font-weight: 700; }
.ly-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.ly-rules .ui-card h4 { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.ly-rules .ui-card p { margin: 0; color: var(--c-muted); font-size: .94rem; }
.ly-warn { background: var(--c-warn-soft); border-color: transparent; }
.ly-warn ul { margin: 8px 0 0; padding-left: 20px; }
@media (max-width: 760px) {
  .ln-stage { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; }
  .ln-stage .tc-seal { width: 42px; height: 42px; font-size: 1.2rem; }
  .ln-stage .rail::after { top: 48px; width: 6px; }
  .ln-moves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ly-grid { grid-template-columns: 1fr; }
  .ly-map { max-height: 460px; }
}

/* ===== move ===== */
.mv-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.mv-stage { height: min(68vh, 600px); min-height: 380px; position: sticky; top: calc(var(--header-h) + 14px); }
.mv-bar { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 3; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c-surface) 82%, transparent); border-radius: 999px; padding: 6px; box-shadow: var(--shadow); }
.mv-bar :is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn) { min-height: 36px; }
.mv-bar .ui-seg button { padding: 7px 10px; }
.mv-breath { position: absolute; top: 12px; left: 12px; z-index: 3; }
.mv-hint { position: absolute; top: 14px; right: 14px; z-index: 3; font-size: .8rem; color: var(--c-muted); }
.mv-head h1 { margin: 6px 0 4px; font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.mv-zh { font-size: 1.05rem; color: var(--c-muted); }
.mv-zh .zh { font-size: 1.5rem; color: var(--c-ink); margin-right: 8px; }
.mv-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: st; }
.mv-steps li { counter-increment: st; position: relative; padding: 10px 12px 10px 44px; border-radius: var(--radius-sm); color: var(--c-muted); transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out); }
.mv-steps li::before { content: counter(st); position: absolute; left: 11px; top: 9px; width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center;
  font: 700 .75rem/1 var(--font-body); background: var(--c-surface-2); transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out); }
.mv-steps li.on { background: var(--c-brand-soft); color: var(--c-ink); }
.mv-steps li.on::before { background: var(--c-brand); color: var(--c-brand-ink); }
.mv-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mv-nav a { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--c-line); border-radius: var(--radius-sm); text-decoration: none; color: inherit; background: var(--c-surface); }
.mv-nav a:hover { border-color: var(--c-brand); }
.mv-nav a.nx { text-align: right; }
.mv-nav small { color: var(--c-muted); }
@media (max-width: 860px) {
  .mv-grid { grid-template-columns: 1fr; }
  .mv-stage { position: relative; top: 0; height: min(56vh, 460px); min-height: 330px; }
  .mv-hint { display: none; }
  .mv-bar { left: 6px; right: 6px; bottom: 6px; gap: 3px; flex-wrap: nowrap; padding: 4px; }
  .mv-bar :is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn) { min-height: 32px; }
  .mv-bar :is(.ui-btn.icon, .anvil-role-btn.anvil-role-btn-icon > button, a.anvil-role-btn.anvil-role-btn-icon) { width: 32px; }
  .mv-bar :is(.ui-btn.sm, .anvil-role-btn.anvil-role-btn-sm > button, a.anvil-role-btn.anvil-role-btn-sm) { padding: 4px 8px; }
  .mv-bar .ui-seg { padding: 2px; }
  .mv-bar .ui-seg button { padding: 6px 7px; font-size: .78rem; }
}

/* ===== session (the player is tc-ui.js) ===== */
.ss { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.ss-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px 8px; }
.ss-top .ttl { flex: 1; min-width: 0; }
.ss-top h1 { font-size: 1.05rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-top .left { font-size: .82rem; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.ss-bar { display: flex; gap: 3px; padding: 0 16px 12px; }
.ss-bar i { flex: var(--w) 1 0; min-width: 3px; height: 5px; border-radius: 3px; background: var(--c-surface-2); overflow: hidden; position: relative; }
.ss-bar i b { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--c-brand); border-radius: 3px; }
.ss-bar i.done b { width: 100%; opacity: .55; }
.ss-bar i.lymph b { background: color-mix(in srgb, var(--c-brand) 55%, #4a8fb8); }
.ss-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; padding: 0 16px 16px; max-width: 1280px; width: 100%; margin: 0 auto; }
.ss-stage { min-height: 440px; height: 100%; max-height: 720px; }
.ss-panel { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 4px 2px; }
.ss-panel h2 { margin: 0; font-size: clamp(1.45rem, 3vw, 2rem); }
.ss-zh { color: var(--c-muted); font-size: .95rem; }
.ss-zh .zh { color: var(--c-ink); font-size: 1.15rem; margin-right: 6px; }
.ss-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ss-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: st; }
.ss-steps li { counter-increment: st; position: relative; padding: 10px 12px 10px 42px; border-radius: var(--radius-sm); color: var(--c-muted); transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out); line-height: 1.45; }
.ss-steps li::before { content: counter(st); position: absolute; left: 10px; top: 9px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font: 700 .75rem/1 var(--font-body); background: var(--c-surface-2); color: var(--c-muted); transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out); }
.ss-steps li.on { background: var(--c-brand-soft); color: var(--c-ink); }
.ss-steps li.on::before { background: var(--c-brand); color: var(--c-brand-ink); }
.ss-tip { display: flex; gap: 10px; font-size: .92rem; color: var(--c-muted); background: color-mix(in srgb, var(--c-accent) 12%, var(--c-surface)); border-radius: var(--radius-sm); padding: 10px 12px; }
.ss-clock { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ss-clock b { font: 700 2.2rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.ss-clock span { color: var(--c-muted); font-size: .9rem; }
.ss-side-badge { position: absolute; top: 12px; right: 12px; z-index: 3; }
.ss-mclock { display: none; }
.ss-orb { position: absolute; left: 16px; bottom: 16px; z-index: 3; width: 92px; height: 92px; display: grid; place-items: center; pointer-events: none; }
/* design-ok: radial-glow, slow-ui-transition (the breathing orb is the guide itself; it swells with each breath) */
.ss-orb i { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--c-surface) 85%, transparent), color-mix(in srgb, var(--c-brand) 30%, transparent));
  border: 2px solid color-mix(in srgb, var(--c-brand) 55%, transparent); transform: scale(.55);
  transition: transform 4s ease-in-out;
  box-shadow: 0 0 30px color-mix(in srgb, var(--c-accent) 25%, transparent); }
.ss-orb.in i { transform: scale(1); }
.ss-orb span { position: relative; font: 700 .75rem/1.25 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink); text-align: center; }
.ss-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 40px 16px 14px 120px; text-align: right; pointer-events: none;
  background: linear-gradient(transparent, color-mix(in srgb, var(--c-bg) 70%, transparent)); font-size: .85rem; color: var(--c-muted); }
.ss-ctl { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--c-line); background: color-mix(in srgb, var(--c-surface) 92%, transparent); }
.ss-ctl .grp { display: flex; gap: 6px; align-items: center; }
.ss-ctl .grp.side { flex: 1; }
.ss-ctl .grp.side:last-child { justify-content: flex-end; }
.ss-play { width: 62px !important; min-height: 62px !important; border-radius: 50% !important; }
.ss-play :is(.ui-ic, .ic) { width: 26px; height: 26px; }
.ss-tog.on { background: var(--c-brand-soft); color: var(--c-brand); border-color: transparent; }
.ss-intro-list { display: grid; gap: 4px; margin: 6px 0 0; padding: 0; list-style: none; max-height: 260px; overflow: auto; }
.ss-intro-list li { display: flex; gap: 10px; align-items: center; font-size: .92rem; padding: 6px 2px; border-bottom: 1px dashed var(--c-line); }
.ss-intro-list li .t { margin-left: auto; color: var(--c-faint); font-variant-numeric: tabular-nums; }
.ss-intro details summary { cursor: pointer; font-weight: 700; }
.ss-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.ss-done { max-width: 760px; margin: 0 auto; padding: 24px 16px 60px; display: grid; gap: 16px; }
.ss-done-head { display: flex; gap: 16px; align-items: center; }
.ss-done-head .tc-seal { width: 64px; height: 64px; font-size: 2rem; border-radius: 14px; animation: ss-stamp .5s var(--ease-out) both .2s; }
@keyframes ss-stamp { from { transform: scale(2.2) rotate(-14deg); opacity: 0; } }
.ss-done-head h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.4rem); }
.ss-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ss-chips span { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 999px; padding: 8px 14px; font-weight: 600; display: inline-flex; gap: 7px; align-items: center; }
.ss-chips :is(.ui-ic, .ic) { color: var(--c-brand); }
@media (max-width: 860px) {
  .ss-body { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ss-stage { min-height: 0; height: min(48vh, 420px); height: min(48dvh, 420px); }
  .ss-orb { width: 72px; height: 72px; left: 10px; bottom: 10px; }
  .ss-cap { display: none; }
  .ss-mclock:not([hidden]) { display: block; position: absolute; top: 10px; left: 10px; z-index: 3; padding: 6px 12px; border-radius: 999px; font: 700 1rem/1 var(--font-display);
    font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--c-surface) 85%, transparent); box-shadow: var(--shadow); }
  .ss-clock b { font-size: 1.8rem; }
  .ss-toggles { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .ss-ctl { gap: 4px; padding-left: 8px; padding-right: 8px; }
  .ss-ctl :is(.ui-btn.icon, .anvil-role-btn.anvil-role-btn-icon > button, a.anvil-role-btn.anvil-role-btn-icon) { width: 38px; min-height: 38px; }
  .ss-ctl [data-speed] { padding: 6px 8px; }
}

/* ===== today (home) ===== */
.td-hero { position: relative; overflow: hidden; padding: 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); min-height: 300px; }
.td-hero .txt { position: relative; z-index: 2; padding: 30px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.td-hero h1 { margin: 0; font-size: clamp(1.9rem, 4.2vw, 2.8rem); }
.td-hero q { font: 600 1.05rem/1.5 var(--font-display); color: var(--c-muted); quotes: "\201C" "\201D"; }
.td-hero .fig { position: relative; min-height: 260px; }
.td-hero .fig .tc-stage { position: absolute; inset: 0; border-radius: 0; }
.td-done { display: inline-flex; gap: 8px; align-items: center; background: var(--c-good-soft); color: var(--c-good); font-weight: 700; padding: 8px 14px; border-radius: 999px; width: fit-content; }
.td-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.td-stat { display: flex; gap: 12px; align-items: center; }
.td-stat .icw { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--c-brand-soft); color: var(--c-brand); flex: none; }
.td-stat .icw.fire { background: color-mix(in srgb, var(--c-accent) 22%, var(--c-surface)); color: var(--c-warn); }
.td-stat b { display: block; font: 700 1.6rem/1 var(--font-display); }
.td-stat span { color: var(--c-muted); font-size: .85rem; }
.td-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.td-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
.td-week div { text-align: center; font-size: .78rem; color: var(--c-muted); display: grid; gap: 6px; justify-items: center; }
.td-week i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--c-surface-2); color: var(--c-faint); font-style: normal; font-weight: 700; }
.td-week .on i { background: var(--c-brand); color: var(--c-brand-ink); }
.td-week .today i { box-shadow: 0 0 0 2px var(--c-bg), 0 0 0 4px var(--c-accent); }
.td-next { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: center; }
.td-circle { display: flex; gap: 12px; align-items: center; }
.td-faces { display: flex; }
.td-faces span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 .78rem/1 var(--font-body); color: var(--c-brand-ink);
  background: var(--c-brand); border: 2px solid var(--c-surface); margin-left: -8px; }
.td-faces span:first-child { margin-left: 0; }
.td-faces span:nth-child(2n) { background: color-mix(in srgb, var(--c-brand) 70%, var(--c-accent)); }
.td-faces span:nth-child(3n) { background: var(--c-accent); color: #1b2a21; }
.td-recent { display: grid; gap: 8px; }
.td-recent a { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--c-surface-2); }
.td-recent .grow { flex: 1; min-width: 0; }
.td-recent small { color: var(--c-muted); }
@media (max-width: 860px) {
  .td-hero { grid-template-columns: 1fr; }
  .td-hero .fig { min-height: 220px; order: -1; }
  .td-hero .txt { padding: 20px; }
  .td-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .td-cols { grid-template-columns: 1fr; }
  .td-next { grid-template-columns: 110px minmax(0, 1fr); }
}

/* ===== journal ===== */
.jn-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.jn-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.jn-stats .ui-stat b { font-size: 1.8rem; font-family: var(--font-display); }
.jn-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.jn-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.jn-cal .dow { font-size: .75rem; color: var(--c-faint); font-weight: 700; padding-bottom: 2px; }
.jn-cal .d { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-size: .85rem; color: var(--c-muted); background: var(--c-surface-2); position: relative; }
.jn-cal .d.empty { background: none; }
.jn-cal .d.on { background: var(--c-brand); color: var(--c-brand-ink); font-weight: 700; }
.jn-cal .d.on.many::after { content: ""; position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--c-brand-ink); }
.jn-cal .d.today { box-shadow: inset 0 0 0 2px var(--c-accent); }
.jn-month { margin: 26px 0 10px; font-size: 1.1rem; }
.jn-list { display: grid; gap: 10px; }
.jn-item { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 14px; align-items: start; }
.jn-date { text-align: center; border-radius: 12px; background: var(--c-brand-soft); padding: 6px 4px; }
.jn-date b { display: block; font: 700 1.35rem/1 var(--font-display); color: var(--c-brand); }
.jn-date span { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); }
.jn-item h3 { margin: 0 0 4px; font-size: 1.05rem; }
.jn-feel { display: inline-flex; gap: 6px; align-items: center; font-size: .85rem; color: var(--c-muted); }
.jn-feel .ui-badge { font-size: .75rem; }
.jn-note { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-style: italic; color: var(--c-ink); }
@media (max-width: 760px) {
  .jn-top { grid-template-columns: 1fr; }
  .jn-item { grid-template-columns: 46px minmax(0, 1fr); }
  .jn-item .acts { grid-column: 2; }
}

/* ===== admin: practice tab ===== */
.ad-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.ad-days span { display: grid; gap: 2px; text-align: center; padding: 6px 2px; border-radius: 10px; background: var(--c-surface-2); }
.ad-days small { font-size: .75rem; color: var(--c-muted); }
.ad-days b { font-size: 1.05rem; }

/* ===== auth ===== */
.au-wrap { min-height: calc(100vh - var(--header-h) - 160px); display: grid; place-items: center; padding: 40px 16px 64px; }
.au-card { width: min(100%, 440px); padding: 30px; }
.au-card h1 { font-size: 1.8rem; margin-bottom: 4px; }
.au-card .ui-seg { width: 100%; margin: 18px 0 20px; }
.au-card .ui-seg button { flex: 1; padding: 10px; }
.au-pw { position: relative; }
.au-pw input { padding-right: 70px; }
.au-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; font-size: .9rem; flex-wrap: wrap; }
.au-links a { cursor: pointer; }
.au-card .lk-consent, .au-card [class*="consent"] { font-size: .9rem; }
.au-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--c-muted); font-size: .85rem; }
.au-or::before, .au-or::after { content: ""; flex: 1; height: 1px; background: var(--c-line); }
.au-google svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 480px) { .au-card { padding: 24px 18px; } }
/* ===== profile ===== */
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pf-head { display: flex; gap: 16px; align-items: center; margin-bottom: 22px; }
.pf-head .ui-avatar { width: 64px; height: 64px; font-size: 1.3rem; }
.pf-head h1 { margin: 0; font-size: 1.8rem; }
.pf-links { display: grid; gap: 4px; }
.pf-links button, .pf-links a { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border-radius: var(--radius-sm); border: 0; background: none;
  font: 500 .97rem/1.2 var(--font-body); color: var(--c-ink); cursor: pointer; text-decoration: none; text-align: left; width: 100%; }
.pf-links button:hover, .pf-links a:hover { background: var(--c-surface-2); }
@media (max-width: 720px) { .pf-grid { grid-template-columns: 1fr; } }

/* ===== admin ===== */
.ad-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.ad-fb { display: grid; gap: 10px; }
.ad-fb .ui-item { display: block; }
.ad-fb .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .85rem; color: var(--c-muted); margin-bottom: 8px; }
.ad-fb .msg { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 10px; }
.ad-fb .ctx { font-size: .8rem; color: var(--c-faint); overflow-wrap: anywhere; margin-bottom: 10px; }
.ad-fb textarea { min-height: 60px; font-size: .92rem; }
.ad-users { width: 100%; border-collapse: collapse; font-size: .93rem; }
.ad-users th, .ad-users td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--c-line); vertical-align: middle; }
.ad-users th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); }
.ad-users td.email { overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .ad-users thead { display: none; }
  .ad-users tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--c-line); }
  .ad-users td { border: 0; padding: 0; }
  .ad-users td.joined { display: none; }
}

/* =====================================================================================================
   Anvil components: the same look through roles (prop:role='["btn", "btn-primary", "ic-wand"]').
   Button = .anvil-button wrapper > button; Link = a; TextBox = input; TextArea = textarea; DropDown = wrapper > select;
   RepeatingPanel = root > items container > item forms (grid rules go on "> div").
   ===================================================================================================== */

/* Anvil buttons: the wrapper is inline, the button inside resets Anvil's own padding and margins */
.anvil-role-btn { display: inline-block; }
.anvil-role-btn > button { margin: 0; }
.anvil-role-btn-block, .anvil-role-btn-block > button { display: flex; width: 100%; }
.anvil-role-btn-icon > button > span, .anvil-role-btn-icon > button .anvil-button-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* the round account button in the header */
.anvil-role-avatar > button { width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; background: var(--c-brand);
  color: var(--c-brand-ink); font: 700 .85rem/1 var(--font-body); padding: 0; margin: 0; }

/* text from Label components */
.anvil-role-menu-name { font-weight: 800; }
.anvil-role-menu-email { color: var(--c-muted); font-size: .875rem; }
.anvil-role-fine-print { color: var(--c-muted); font-size: .875rem; }
.anvil-label { padding: 0; margin: 0; }

/* notifications (state.toast) look like the old toasts */
.anvil-notification { background: var(--c-ink); color: var(--c-bg); border: 0; border-radius: 14px; box-shadow: var(--shadow-lg);
  font: 600 1rem/1.4 var(--font-body); }
.anvil-notification.anvil-role-ok { background: var(--c-good); color: var(--c-on-status); }
.anvil-notification.anvil-role-error { background: var(--c-bad); color: var(--c-on-status); }
.anvil-notification .anvil-notification-title { font-weight: 800; }

/* dialogs (alert / confirm with a Form inside) look like the old modals */
.anvil-modal-content { background: var(--c-surface); color: var(--c-ink); border: 1px solid var(--c-line); border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-lg); font: 16px/1.55 var(--font-body); }
.anvil-modal-header { border-bottom: 0; padding: 22px 26px 0; }
.anvil-modal-title { font: 800 1.6rem/1.1 var(--font-display); color: var(--c-ink); }
.anvil-modal-body { padding: 18px 26px 24px; }
.anvil-modal-footer { border-top: 0; padding: 0 26px 22px; }
.anvil-modal-header .anvil-close { color: var(--c-muted); opacity: 1; text-shadow: none; }
@media (max-width: 720px) { .anvil-modal-body { padding: 16px 18px 20px; } .anvil-modal-header { padding: 18px 18px 0; } }

/* ---- shared helpers for the component version */
.anvil-role-contents, .anvil-role-contents > div { display: contents; }
.anvil-role-page-title { font: 800 clamp(1.7rem, 3.4vw, 2.3rem)/1.08 var(--font-display); color: var(--c-ink); margin: 0; letter-spacing: -.005em; }
.anvil-role-sec-title { font: 800 1.6rem/1.08 var(--font-display); color: var(--c-ink); margin: 0; }
.anvil-role-card-title { font: 800 1.3rem/1.08 var(--font-display); color: var(--c-ink); margin: 4px 0 0; }
.anvil-role-faint { color: var(--c-faint); }
.anvil-role-sh-stars { color: #f0a500; letter-spacing: 1px; font-size: .95rem; }
.anvil-role-sh-stars.anvil-role-faint { color: var(--c-faint); letter-spacing: 0; }
.lp-signup { margin: 14px 0 0; }
@media (max-width: 720px) { .anvil-role-sh-shelf > div { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; } }
.ui-empty > .ic { width: 34px; height: 34px; color: var(--c-faint); margin-bottom: 8px; }

/* ---- reading pages, dialogs, profile, admin (component version) */
.anvil-role-bk-title { font: 800 clamp(1.6rem, 3.6vw, 2.3rem)/1.08 var(--font-display); color: var(--c-ink); margin: 2px 0 6px; }
.anvil-role-bk-intro { color: var(--c-muted); margin: 0; }
.anvil-modal-content .ui h2.dlg-h, .anvil-role-dlg-title { font: 800 1.6rem/1.1 var(--font-display); color: var(--c-ink); margin: 0 0 .5em; padding-right: 36px; }
.anvil-modal-content .ui { font: 16px/1.55 var(--font-body); }
.anvil-role-seg > button { font: 800 .85rem/1 var(--font-body); border: 0; background: none; color: var(--c-muted); padding: 8px 13px; border-radius: 999px; cursor: pointer; margin: 0; box-shadow: none; }
.anvil-role-seg.anvil-role-on > button { background: var(--c-accent); color: #2b2350; }
.anvil-role-pf-avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--c-brand-soft); color: var(--c-brand);
  font: 700 1.3rem/1 var(--font-body); }
.anvil-role-pf-title { font: 800 1.8rem/1.08 var(--font-display); color: var(--c-ink); }
.pf-pw { margin-top: 22px; }
.pf-more { margin-top: 16px; }
.anvil-role-strong { font-weight: 800; }
.anvil-role-stat-num { font: 800 2rem/1.1 var(--font-display); color: var(--c-ink); }
.ad-stat { text-decoration: none; color: inherit !important; }
.ad-stat span, .ad-stat .anvil-role-fine-print { color: var(--c-muted); font-size: .9rem; }
.anvil-role-ad-demo-line { margin-top: 18px; }
.ad-filter, .ad-search { margin-bottom: 16px; }
.ad-search .anvil-role-ad-search-box { max-width: 360px; }
.ad-table { display: grid; gap: 8px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--c-line); font-size: .93rem; }
.ad-users-head, .ad-user-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) 90px 90px 90px; }
.ad-lib-head, .ad-lib-row { grid-template-columns: minmax(0, 3fr) 70px 70px 70px; }
.ad-users-head b, .ad-lib-head b { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); }
.anvil-role-ad-email { overflow-wrap: anywhere; }
.ad-fb-actions { margin-top: 10px; }
@media (max-width: 720px) {
  .ad-users-head { display: none; }
  .ad-user-row { grid-template-columns: 1fr 1fr; }
  .ad-lib-head, .ad-lib-row { grid-template-columns: minmax(0, 1fr) 50px 50px 50px; }
}
.anvil-notification.alert-success, .anvil-notification.anvil-notification-success { background: var(--c-good); color: var(--c-on-status); }
.anvil-notification.alert-danger, .anvil-notification.anvil-notification-danger { background: var(--c-bad); color: var(--c-on-status); }

/* The open-source runtime (App Server 1.18) wraps named elements and components in <anvil-dropzone> tags; hosted Anvil
   has dropped them. Make them invisible to layout so child selectors and grids behave the same on both. */
anvil-dropzone { display: contents; }
/* Notifications on the open-source runtime (1.18): Bootstrap-style alerts. Same look as .anvil-notification above. */
[data-notify="container"].anvil-alert { background: var(--c-ink); color: var(--c-bg); border: 2.5px solid var(--c-line); border-radius: 14px;
  box-shadow: var(--shadow); font: 700 1rem/1.4 var(--font-body); padding: 12px 40px 12px 16px; }
[data-notify="container"].anvil-alert-success { background: var(--c-good); color: var(--c-on-status); }
[data-notify="container"].anvil-alert-danger { background: var(--c-bad); color: var(--c-on-status); }
[data-notify="container"].anvil-alert .anvil-close, [data-notify="container"].anvil-alert [data-notify="dismiss"] { color: inherit; opacity: .8; text-shadow: none; }
/* header: the guest buttons stay on one line, the logo never shrinks */
.ui-brand img { flex: none; }
.ui-header-right .ui-row { flex-wrap: nowrap; gap: 8px; }
@media (max-width: 480px) {
  .ui-brand span { font-size: .98rem; line-height: 1.05; }
  .ui-header-right .ui-btn { padding: 8px 11px; min-height: 38px; font-size: .86rem; }
}
.pf-pw { margin-top: 22px !important; }
/* Toast colours win over the plain rule above on both runtimes (hosted: anvil-role-ok/error; App Server 1.18: alert-success/danger). */
:is(.anvil-notification, [data-notify="container"]):is(.anvil-role-ok, .anvil-alert-success) { background: var(--c-good); color: var(--c-on-status); }
:is(.anvil-notification, [data-notify="container"]):is(.anvil-role-error, .anvil-alert-danger) { background: var(--c-bad); color: var(--c-on-status); }
/* Our dialogs: Anvil's normal alert is a 300 px "small" modal; give them the old modal's width. */

/* ---- template pages (component version) */
.lp-art-card { position: relative; display: grid; gap: 12px; padding: 22px; max-width: 460px; margin: 0 auto; }
.lp-art-bar { display: flex; gap: 6px; margin-bottom: 6px; }
.lp-art-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--c-line); display: block; }
.lp-art-row { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius-sm); background: var(--c-surface-2); }
.lp-art-row b { display: block; } .lp-art-row small { color: var(--c-muted); }
.anvil-role-item-list > div { display: grid; gap: 10px; }
.item-title { gap: 8px; }
.anvil-role-item-body { overflow-wrap: anywhere; margin-top: 2px; }
.anvil-role-initials { font: 700 .85rem/1 var(--font-body); color: inherit; }
.nav-link { display: inline-flex; align-items: center; gap: 7px; }
.ui-tabbar .nav-link { display: grid; }
.ui-nav .nav-link.on, .ui-tabbar a.on { }
.anvil-role-dlg-title, .anvil-modal-content .ui h2.dlg-h { font: 700 1.5rem/1.15 var(--font-display); color: var(--c-ink); margin: 0 0 .5em; padding-right: 36px; }

.anvil-modal-content .ui-row.end { margin-top: 18px; }
.anvil-modal-content textarea { width: 100%; }
/* Our dialogs: Anvil's normal alert is a 300 px "small" modal; give them a comfortable width. */
.anvil-modal-dialog.anvil-role-app-dialog.anvil-modal-sm, .anvil-modal-dialog.anvil-role-app-dialog:not(.anvil-modal-lg) { width: min(calc(100vw - 24px), 540px); max-width: none; }
.anvil-modal-dialog.anvil-role-app-dialog.anvil-modal-lg { width: min(calc(100vw - 24px), 780px); max-width: none; }/* badges from Label components: prop:role='["badge"]' (+ "badge-brand", "badge-good", "badge-warn", "badge-bad") */
.anvil-role-badge { display: inline-flex; align-items: center; gap: 5px; font: 600 .75rem/1.3 var(--font-body); padding: 4px 10px; border-radius: 999px;
  background: var(--c-surface-2); color: var(--c-muted); white-space: nowrap; }
.anvil-role-badge.anvil-role-badge-brand { background: var(--c-brand-soft); color: var(--c-brand); }
.anvil-role-badge.anvil-role-badge-good { background: var(--c-good-soft); color: var(--c-good); }
.anvil-role-badge.anvil-role-badge-warn { background: var(--c-warn-soft); color: var(--c-warn); }
.anvil-role-badge.anvil-role-badge-bad { background: var(--c-bad-soft); color: var(--c-bad); }
/* auth page parts made of components */
.anvil-role-au-title { font: 700 1.8rem/1.1 var(--font-display); margin-bottom: 4px; color: var(--c-ink); }
.anvil-role-au-sub { color: var(--c-muted); margin-bottom: 4px; }
.au-pw { position: relative; display: block; }
.au-pw input { padding-right: 70px; }
.anvil-role-au-show { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.anvil-role-au-show > button { border: 0; background: none; color: var(--c-muted); font: 600 .8rem/1 var(--font-body); padding: 8px; cursor: pointer; margin: 0; box-shadow: none; }
.anvil-role-au-google img, .anvil-role-au-google .anvil-component-icon { width: 18px; height: 18px; flex: none; }
.anvil-role-msg-error { background: var(--c-bad-soft); color: var(--c-bad); border-radius: var(--radius-sm); padding: 10px 14px; font-size: .92rem; }
.anvil-role-msg-note { background: var(--c-brand-soft); color: var(--c-ink); border-radius: var(--radius-sm); padding: 10px 14px; font-size: .92rem; }

/* Screen-reader-only text (Label role "sr", or class ui-sr): read out, not shown */
.anvil-role-sr, .ui-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Anvil's own notifications animate everything (transition: all): only fade and move (design kit) */
.anvil-notification, [data-notify="container"] { transition-property: opacity, transform !important; }
.au-card a { display: inline-block; padding: 3px 0; }  /* 24px+ touch height */
.anvil-notification .anvil-close, [data-notify="dismiss"] { min-width: 24px; min-height: 24px; }


/* =====================================================================================================
   Tai Chi Please, Forms layer: the pieces made of Anvil components (roles), dialogs and engine hosts.
   ===================================================================================================== */
/* hosts that vanish from layout: item templates and components whose inner element is the real grid/flex child */
.tcs, .tcs-box, .tc-feel-host, .ps-host, .mc-host, .mcard-host, .fs-host, .lys-host, .ir-host, .wd-host, .rr-host,
.face-host, .cd-host, .jm-host, .je-host, .sc-host, .cr-host, .dc-host, .badge-item, .feel-chip, .sl, .ly-map-host,
.tc-grove-box, .ss-steppanel, .ss-ctl-in { display: contents; }
.anvil-component-icon:empty { display: none; }

/* Labels take the look of where they sit; roles win (written with :where so any role rule beats them) */
:where(.anvil-label) { font: inherit; color: inherit; }
:where(.anvil-label) > :where(.anvil-label-text) { font: inherit; color: inherit; }
.anvil-label[style*="text-align: left"] { text-align: inherit !important; }
/* Anvil's spacing classes give every Label a few px above and below: our layouts set their own gaps */
.ui .anvil-label { margin-top: 0; margin-bottom: 0; }
.anvil-label > i:empty { display: none; }
.anvil-role-inherit, .anvil-role-inline { display: inline; }
.anvil-role-inline > span, .anvil-role-inherit > span { display: inline; }
.anvil-role-body { margin: 0; }
.anvil-role-muted { color: var(--c-muted); }
.anvil-role-measure { max-width: 44em; }
.measure { max-width: 44em; }
.anvil-role-zh, .anvil-role-zh-line, .anvil-role-cap-zh, .anvil-role-mcard-zh { font-family: var(--font-zh); }
.card-h { margin: 0; font-size: 1.15rem; }
.ui-card > .card-h + * { margin-top: 10px; }

/* segmented choices made of Buttons (lengths, views): the old .ui-seg buttons */
.ui-seg .anvil-role-seg { display: inline-flex; }
.ui-seg .anvil-role-seg > button { font: 600 .85rem/1 var(--font-body); border: 0; background: none; color: var(--c-muted); padding: 8px 13px;
  border-radius: 999px; cursor: pointer; margin: 0; box-shadow: none; min-height: 32px; }
.ui-seg .anvil-role-seg.anvil-role-on > button { background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow); }
.pf-seg { margin-top: 8px; }

/* the seal stamp from Labels */
.anvil-role-seal-sm, .anvil-role-seal-lg { display: inline-grid; place-items: center; border-radius: 8px; background: var(--c-seal); color: #fff8ee;
  font: 700 .9rem/1 var(--font-zh); transform: rotate(-4deg); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); flex: none; width: 30px; height: 30px; }
.anvil-role-seal-lg { width: 56px; height: 56px; font-size: 1.6rem; border-radius: 12px; position: relative; z-index: 1; }
.ln-stage.todo .anvil-role-seal-lg { background: var(--c-surface-2); color: var(--c-muted); box-shadow: none; }

/* feelings (Components/FeelPicker) */
.anvil-role-feel > button { font: 600 .88rem/1 var(--font-body); padding: 10px 13px; border-radius: 999px; border: 1px solid var(--c-line); background: var(--c-surface);
  color: var(--c-ink); cursor: pointer; display: inline-flex; gap: 7px; align-items: center; min-height: 40px; margin: 0; }
.anvil-role-feel > button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c-brand); display: inline-block; opacity: var(--o, .55); }
.anvil-role-feel-1 { --o: .4; } .anvil-role-feel-2 { --o: .55; } .anvil-role-feel-3 { --o: .7; } .anvil-role-feel-4 { --o: .85; } .anvil-role-feel-5 { --o: 1; }
.anvil-role-feel.anvil-role-on > button { background: var(--c-brand); border-color: var(--c-brand); color: var(--c-brand-ink); }
.anvil-role-feel.anvil-role-on > button::before { background: var(--c-brand-ink); }

/* switches (CheckBox role "switch"): the old .tc-toggle rows */
.anvil-role-switch { margin: 0; }
.anvil-role-switch label { display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--c-line); cursor: pointer; margin: 0; font-weight: 500; min-height: 46px; }
.anvil-role-switch input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--c-surface-2);
  border: 1px solid var(--c-line); position: relative; cursor: pointer; flex: none; margin: 0; transition: background var(--dur-fast) var(--ease-out); }
.anvil-role-switch input[type=checkbox]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--c-surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform var(--dur-fast) var(--ease-out); }
.anvil-role-switch input[type=checkbox]:checked { background: var(--c-brand); border-color: var(--c-brand); }
.anvil-role-switch input[type=checkbox]:checked::after { transform: translateX(18px); }
.anvil-role-switch input[type=checkbox]:focus-visible { outline: 3px solid color-mix(in srgb, var(--c-brand) 55%, transparent); outline-offset: 2px; }
.pf-hint-line { display: block; font-size: .85rem; color: var(--c-muted); margin: -6px 0 6px; }

/* badges with a small icon (role bic-<name>) */
.anvil-role-badge[class*="anvil-role-bic-"]::before { content: ""; width: 13px; height: 13px; background: currentColor; flex: none;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.anvil-role-bic-check { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E"); }
.anvil-role-bic-clock { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.anvil-role-bic-lock { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E"); }
.anvil-role-bic-sparkle { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 3v4M12 17v4M3 12h4M17 12h4M6 6l2.5 2.5M15.5 15.5 18 18M6 18l2.5-2.5M15.5 8.5 18 6'/%3E%3C/svg%3E"); }
.anvil-role-badge { line-height: 1.3; }

/* ===== landing (Forms) */
.lp-art .cap > span { display: grid; }
.anvil-role-cap-name { font-weight: 700; font-size: .92rem; line-height: 1.2; }
.anvil-role-cap-zh { color: var(--c-muted); font-size: .85rem; }
.lp-feature > .ic { width: 28px; height: 28px; color: var(--c-brand); margin-bottom: 12px; display: block; }
.lp-flow .icw .ic { width: 28px; height: 28px; }
.lp-proof .ic { color: var(--c-good); }
.lp-band .ui-btn { background: var(--c-brand-ink); color: var(--c-brand); border-color: transparent; }
.ytf .ytf-link { display: inline-flex; align-items: center; gap: 6px; }

/* ===== practice (Forms) */
.anvil-role-pr-title { font: 700 clamp(1.8rem, 4vw, 2.6rem)/1.15 var(--font-display); color: var(--c-ink); }
.anvil-role-pr-lead { color: var(--c-muted); }
.pr-build { text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; }
.pr-build .top > span:last-child { display: grid; }
.pr-build .pr-h { font: 700 1.2rem/1.2 var(--font-display); }
.pr-build .pr-p { color: var(--c-muted); }
.pr-card .top > div { display: grid; }
.pr-thought { margin: 26px 0 0; }
.anvil-role-thought { font: 600 1.25rem/1.45 var(--font-display); display: block; max-width: 34em; margin: 0 auto 6px; }
.anvil-role-thought::before { content: "\201C"; } .anvil-role-thought::after { content: "\201D"; }
.build-session .pr-pick { margin-top: 6px; }
.pick-cat { border: 0; padding: 0; margin: 0; }
.pick-cat legend { padding: 0; margin-bottom: 6px; }
.pick-cat .opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.pick-move .anvil-checkbox, .pick-move > div { margin: 0; }
.pick-move label { display: flex; gap: 8px; align-items: center; font-size: .92rem; padding: 7px 9px; border: 1px solid var(--c-line); border-radius: 10px; cursor: pointer; margin: 0; min-height: 40px; }
.pick-move input { accent-color: var(--c-brand); width: 17px; height: 17px; flex: none; margin: 0; }
.pr-pick-foot { margin-top: 16px; }

/* ===== learn (Forms) */
.ln-path-head { margin: 12px 0 24px; }
.ln-stage-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.anvil-role-stage-name { font: 700 1.2rem/1.2 var(--font-display); color: var(--c-ink); }
.ln-cat-h { display: flex; gap: 10px; align-items: center; }
.ln-cat-h .ic { width: 24px; height: 24px; }
.anvil-role-mcard-name { font: 700 1rem/1.25 var(--font-display); }
.anvil-role-mcard-zh { font-size: .9rem; color: var(--c-muted); }
.ln-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--c-surface-2); border: 1px solid var(--c-line); display: inline-block; }
.ln-dots i.on { background: var(--c-brand); border-color: var(--c-brand); }
.ln-move .ui-row.between { gap: 6px; }
.ln-form a { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--c-surface); border: 1px solid var(--c-line); text-decoration: none; color: inherit; }
.ln-form a > span { display: grid; }
.anvil-role-fs-n { font: 700 1.1rem/1 var(--font-display); color: var(--c-brand); text-align: center; }
.anvil-role-zh-line { color: var(--c-muted); font-size: .95rem; }
.ln-form { display: grid; gap: 6px; }
.ly-step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
.anvil-role-ly-n { width: 26px; height: 26px; border-radius: 50%; background: var(--c-accent); color: #1b2a21; display: grid; place-items: center; font: 800 .8rem/1 var(--font-body); }
.ly-step a { font-weight: 700; }
.ly-order { display: grid; gap: 8px; }
.ly-h { margin: 0; }
.ly-rules-h { margin-top: 34px; }
.ly-rules .ui-card h3 { display: flex; gap: 8px; align-items: center; margin: 0 0 6px; font-size: 1rem; }
.ly-warn { margin-top: 18px; }
.ly-warn h3 { margin: 0; display: flex; gap: 8px; align-items: center; }
.ly-warn > p { margin: 10px 0 0; }
.ly-map-host + * { min-width: 0; }

/* ===== move (Forms) */
.mv-grid { margin-top: 12px; }
.anvil-role-mv-title { font: 700 clamp(1.7rem, 3.6vw, 2.5rem)/1.15 var(--font-display); margin: 6px 0 4px; color: var(--c-ink); }
.mv-zh { display: flex; gap: 8px; align-items: baseline; }
.anvil-role-zh-big { font: 500 1.5rem/1.2 var(--font-zh); color: var(--c-ink); }
.mv-steps { display: grid; gap: 6px; counter-reset: st; }
.mv-steps .step-line, .ss-steps li { counter-increment: st; position: relative; padding: 10px 12px 10px 44px; border-radius: var(--radius-sm); color: var(--c-muted);
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out); }
.mv-steps .step-line::before { content: counter(st); position: absolute; left: 11px; top: 9px; width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center;
  font: 700 .75rem/1 var(--font-body); background: var(--c-surface-2); }
.mv-steps .step-line.on { background: var(--c-brand-soft); color: var(--c-ink); }
.mv-steps .step-line.on::before { background: var(--c-brand); color: var(--c-brand-ink); }
.mv-bar .anvil-role-btn > button { min-height: 36px; }
.mv-bar .anvil-role-btn-icon > button { width: 36px; }
.anvil-role-tog.anvil-role-on > button { background: var(--c-brand-soft); color: var(--c-brand); border-color: transparent; }
.mv-nav > a { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--c-line); border-radius: var(--radius-sm); text-decoration: none; color: inherit; background: var(--c-surface); }
.mv-nav small { color: var(--c-muted); }
@media (max-width: 860px) {
  .mv-bar .anvil-role-btn > button { min-height: 32px; }
  .mv-bar .anvil-role-btn-icon > button { width: 32px; }
  .mv-bar .anvil-role-btn-sm > button { padding: 4px 8px; }
  .mv-bar .ui-seg .anvil-role-seg > button { padding: 6px 7px; font-size: .78rem; }
}

/* ===== session (Forms around the tc-ui.js player) */
.ss-page { min-height: 100vh; }
.anvil-role-ss-title { font: 700 1.05rem/1.2 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--c-ink); }
.anvil-role-ss-h2 { font: 700 clamp(1.45rem, 3vw, 2rem)/1.2 var(--font-display); color: var(--c-ink); margin-bottom: 4px; }
.ss-feel-hint { margin: 2px 0 8px; }
.ss-intro details summary { cursor: pointer; font-weight: 700; }
.ss-intro-list { display: grid; gap: 4px; margin: 6px 0 0; max-height: 260px; overflow: auto; position: relative; }
.ir-head { padding-top: 10px; }
.ir-row { display: flex; gap: 10px; align-items: center; font-size: .92rem; padding: 6px 2px; border-bottom: 1px dashed var(--c-line); }
.anvil-role-ir-t { margin-left: auto; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.ss-begin { display: flex; justify-content: center; width: 100%; }
.anvil-role-ss-begin-btn > button { min-width: 220px; }
.ss-ctl .ui-btn.icon { width: 40px; }
.anvil-role-ss-done-title { font: 700 clamp(1.7rem, 4vw, 2.4rem)/1.15 var(--font-display); color: var(--c-ink); }
.ss-chips > span { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 999px; padding: 8px 14px; font-weight: 600; display: inline-flex; gap: 7px; align-items: center; }
.ss-chips .ic { color: var(--c-brand); }
.ss-join { background: var(--c-brand-soft); border-color: transparent; }

/* ===== today (Forms) */
.anvil-role-td-title { font: 700 clamp(1.9rem, 4.2vw, 2.8rem)/1.15 var(--font-display); color: var(--c-ink); }
.anvil-role-td-thought { font: 600 1.05rem/1.5 var(--font-display); color: var(--c-muted); }
.anvil-role-td-thought::before { content: "\201C"; } .anvil-role-td-thought::after { content: "\201D"; }
.anvil-role-td-num { display: block; font: 700 1.6rem/1 var(--font-display); color: var(--c-ink); }
.td-stat > div { display: grid; gap: 2px; }
.td-empty { margin: 8px 0 0; }
.td-week .wd { text-align: center; font-size: .78rem; color: var(--c-muted); display: grid; gap: 6px; justify-items: center; }
.td-week .wd i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--c-surface-2); color: var(--c-muted); font-style: normal; font-weight: 700; }
.td-week .wd.on i { background: var(--c-brand); color: var(--c-brand-ink); }
.td-week .wd.today i { box-shadow: 0 0 0 2px var(--c-bg), 0 0 0 4px var(--c-accent); }
.td-recent { margin-top: 12px; }
.td-recent .rr { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--c-surface-2); }
.td-recent .rr .grow { flex: 1; min-width: 0; display: grid; }
.anvil-role-td-next-name { font: 700 1.2rem/1.2 var(--font-display); margin-bottom: 4px; }
.td-watch { margin-top: 10px; }
.td-faces .face { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 .78rem/1 var(--font-body); color: var(--c-brand-ink);
  background: var(--c-brand); border: 2px solid var(--c-surface); margin-left: -8px; }
.td-faces .face.alt0 { margin-left: 0; }
.td-faces .face.alt1 { background: color-mix(in srgb, var(--c-brand) 70%, var(--c-ink)); }
.td-faces .face.alt2 { background: var(--c-accent); color: #1b2a21; }
.td-circle-note { margin: 10px 0 0; }
.td-rem { margin-top: 10px; }
.td-done { display: inline-flex; gap: 8px; align-items: center; }

/* ===== journal (Forms) */
.anvil-role-jn-num { display: block; font: 800 1.8rem/1.1 var(--font-display); color: var(--c-ink); }
.jn-month-name { text-align: center; display: grid; }
.jn-cal .d { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-size: .85rem; color: var(--c-muted); background: var(--c-surface-2); position: relative; }
.anvil-role-jn-month { font: 700 1.1rem/1.2 var(--font-display); margin: 26px 0 10px; color: var(--c-ink); }
.anvil-role-jn-title { font: 700 1.05rem/1.25 var(--font-display); margin: 0 0 4px; color: var(--c-ink); }
.anvil-role-jn-date-num { display: block; font: 700 1.35rem/1 var(--font-display); color: var(--c-brand); }
.anvil-role-jn-date-day { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); }
.anvil-role-jn-note { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-style: italic; color: var(--c-ink); }
.jn-feel { margin-top: 6px; }
.jn-empty { margin-top: 24px; }
.es-feel { margin-top: 8px; }

/* ===== profile + admin (Forms) */
.pf-practice { margin-top: 16px; }
.pf-practice > h3 { margin-bottom: 12px; }
.anvil-role-pf-time input, input.anvil-role-pf-time { max-width: 160px; }
.anvil-role-pf-hint { margin-top: 6px; }
.ad-practice { margin-top: 16px; }
.count-list { display: grid; }
.count-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 8px; border-bottom: 1px solid var(--c-line); font-size: .93rem; }
.ad-days-h { margin-top: 18px; }
.ad-days .day-count { display: grid; gap: 2px; text-align: center; padding: 6px 2px; border-radius: 10px; background: var(--c-surface-2); }
.anvil-role-dc-day { font-size: .75rem; color: var(--c-muted); }
.anvil-role-ad-imports { margin-top: 12px; }

/* the footer's care note */
.ui-footer-care { max-width: 34em; }
