/* 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). */

:root {
  --c-bg: #f3fae9;          /* leaf cream */
  --c-surface: #ffffff;
  --c-surface-2: #e8f3db;
  --c-ink: #1e2a5a;         /* Parapeet navy */
  --c-muted: #56607f;
  --c-faint: #939db3;
  --c-line: #d6e6c4;
  --c-line-2: #bed6a6;
  --c-brand: #2e9e4f;       /* jungle green */
  --c-brand-deep: #1e7a3a;
  --c-brand-ink: #ffffff;
  --c-brand-soft: #dbf2d4;
  --c-accent: #36bfda;      /* budgie blue */
  --c-accent-deep: #1d93b0;
  --c-sun: #ffc83d;         /* beak yellow */
  --c-sun-deep: #dea212;
  --c-good: #2e9e4f; --c-good-soft: #dcf3d8;
  --c-warn: #a86400; --c-warn-soft: #fbf0dc;
  --c-bad: #e5484d;  --c-bad-soft: #fde5e5; --c-bad-deep: #b3323a;
  --radius: 20px; --radius-sm: 14px;
  --shadow: 0 2px 0 rgba(30, 42, 90, .05), 0 10px 26px rgba(30, 42, 90, .07);
  --shadow-lg: 0 20px 50px rgba(30, 42, 90, .18);
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --maxw: 1160px;
  --header-h: 66px;
  --tabbar-h: 66px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-bg: #0d1912; --c-surface: #14241a; --c-surface-2: #1b3023; --c-ink: #ecf5e6; --c-muted: #a8bca8; --c-faint: #6d836f;
    --c-line: #26402f; --c-line-2: #31523d; --c-brand: #4cc46e; --c-brand-deep: #2c8747; --c-brand-ink: #06200f; --c-brand-soft: #173a22;
    --c-accent: #5fd3ea; --c-accent-deep: #2a9db7; --c-sun: #ffd45e; --c-sun-deep: #c4951a;
    --c-good: #5fd38a; --c-good-soft: #15321f; --c-warn: #f0b34f; --c-warn-soft: #2d2311; --c-bad: #ff7a80; --c-bad-soft: #3a191c; --c-bad-deep: #bf434a;
    --shadow: none; --shadow-lg: 0 20px 50px rgba(0, 0, 0, .5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --c-bg: #0d1912; --c-surface: #14241a; --c-surface-2: #1b3023; --c-ink: #ecf5e6; --c-muted: #a8bca8; --c-faint: #6d836f;
  --c-line: #26402f; --c-line-2: #31523d; --c-brand: #4cc46e; --c-brand-deep: #2c8747; --c-brand-ink: #06200f; --c-brand-soft: #173a22;
  --c-accent: #5fd3ea; --c-accent-deep: #2a9db7; --c-sun: #ffd45e; --c-sun-deep: #c4951a;
  --c-good: #5fd38a; --c-good-soft: #15321f; --c-warn: #f0b34f; --c-warn-soft: #2d2311; --c-bad: #ff7a80; --c-bad-soft: #3a191c; --c-bad-deep: #bf434a;
  --shadow: none; --shadow-lg: 0 20px 50px rgba(0, 0, 0, .5); color-scheme: dark;
}

/* 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 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 .eyebrow { font: 700 .75rem/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--c-brand); margin-bottom: 12px; }
.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; transition: transform .12s, background .15s, border-color .15s, opacity .15s; }
:is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn):hover { border-color: var(--c-ink); }
:is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn):active { transform: translateY(1px); }
: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: #fff; }
: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 .15s, box-shadow .15s; }
.ui textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.ui input: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 h3 { color: var(--c-ink); }
.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.2s ease-in-out 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; animation: ui-pop .14s 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); } }

/* 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: 0; cursor: pointer; text-decoration: none; }
.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 when signed in) */
.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 .2s ease-out; transition: opacity .3s, transform .3s; }
.ui-toast.error { background: var(--c-bad); color: #fff; }
.ui-toast.ok { background: var(--c-good); color: #fff; }
.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 .15s; }
.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: ui-pop .18s 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.signed-in .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 .7rem/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.signed-in:has(.ui-tabbar:not(:empty)) .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) {
  .ui *, .ui-toast, .ui-modal, .ui-menu { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* ===== landing ===== */
.page-landing .ui-main { overflow-x: clip; }
.lp-hero { position: relative; padding: 64px 0 40px; }
.lp-hero::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px; z-index: 0;
  background: radial-gradient(closest-side, var(--c-brand-soft), transparent 70%); pointer-events: none; }
.lp-hero .ui-wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding-top: 0; padding-bottom: 0; }
.lp-hero h1 { font-size: clamp(2.3rem, 5.4vw, 3.8rem); line-height: 1.04; margin-bottom: 18px; }
.lp-hero h1 em { font-style: normal; color: var(--c-brand); }
.lp-lead { font-size: 1.2rem; color: var(--c-muted); max-width: 34em; margin-bottom: 28px; }
.lp-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.lp-proof { margin-top: 22px; 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 .ui-ic { color: var(--c-good); }
.lp-art { position: relative; aspect-ratio: 1 / .92; }
.lp-art .card { position: absolute; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 18px; }
.lp-art .a { inset: 4% 14% 30% 0; }
.lp-art .b { top: 50%; right: 0; left: 30%; }
.lp-art .line { height: 12px; border-radius: 6px; background: var(--c-surface-2); margin: 10px 0; }
.lp-art .line.s { width: 55%; } .lp-art .line.m { width: 78%; }
.lp-art .pill { display: inline-block; height: 26px; width: 84px; border-radius: 999px; background: var(--c-brand-soft); margin-right: 8px; }
.lp-art .dot { width: 44px; height: 44px; border-radius: 14px; background: var(--c-brand); display: inline-grid; place-items: center; color: var(--c-brand-ink); }
.lp-art .dot .ui-ic { width: 22px; height: 22px; }
.lp-art .bar { height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--c-brand), var(--c-accent)); width: 68%; margin-top: 14px; }
.lp-section { padding: 56px 0; }
.lp-section .ui-wrap { padding-top: 0; padding-bottom: 0; }
.lp-head { text-align: center; max-width: 640px; margin: 0 auto 34px; }
.lp-head p { color: var(--c-muted); font-size: 1.08rem; }
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.lp-step { position: relative; padding-top: 58px; }
.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: 800 .95rem/1 var(--font-display); }
.lp-feature .ui-ic { width: 26px; height: 26px; color: var(--c-brand); margin-bottom: 12px; }
.lp-feature h3 { margin-bottom: 6px; }
.lp-feature p { color: var(--c-muted); margin: 0; }
.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 { background: var(--c-ink); color: var(--c-bg); border-radius: calc(var(--radius) + 8px); padding: 44px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.lp-band h2 { color: var(--c-bg); margin: 0 0 6px; }
.lp-band p { margin: 0; opacity: .8; }
@media (max-width: 860px) {
  .lp-hero { padding-top: 36px; }
  .lp-hero .ui-wrap { grid-template-columns: 1fr; gap: 28px; }
  .lp-art { max-width: 460px; width: 100%; margin: 0 auto; }
  .lp-steps { grid-template-columns: 1fr; }
  .lp-band { padding: 30px 22px; }
  .lp-section { padding: 40px 0; }
}

/* ===== 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; } }

/* ===== home ===== */
.hm-add { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 10px; align-items: start; margin-bottom: 22px; }
.hm-add textarea { min-height: 46px; height: 46px; }
@media (max-width: 720px) { .hm-add { grid-template-columns: 1fr; } .hm-add textarea { height: 90px; } }

/* ===== 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: #fff; }
.anvil-notification.anvil-role-error { background: var(--c-bad); color: #fff; }
.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-role-eyebrow-label { font: 800 .75rem/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--c-brand); margin-bottom: 12px; }
.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: #fff; }
.anvil-notification.alert-danger, .anvil-notification.anvil-notification-danger { background: var(--c-bad); color: #fff; }

/* 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: #fff; }
[data-notify="container"].anvil-alert-danger { background: var(--c-bad); color: #fff; }
[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: #fff; }
:is(.anvil-notification, [data-notify="container"]):is(.anvil-role-error, .anvil-alert-danger) { background: var(--c-bad); color: #fff; }
/* 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; }

/* =====================================================================================================
   Parapeet: Jungle Arcade. Chunky press-down buttons, a colour per mood (--tone), leafy background.
   ===================================================================================================== */
body { background-image:
    radial-gradient(1200px 500px at 110% -10%, color-mix(in srgb, var(--c-brand) 10%, transparent), transparent 70%),
    radial-gradient(900px 500px at -10% 110%, color-mix(in srgb, var(--c-accent) 9%, transparent), transparent 70%) !important;
  background-attachment: fixed !important; }
.ui h1, .ui h2, .ui h3, .ui h4 { font-weight: 600; letter-spacing: -.01em; }
.ui .eyebrow { font-weight: 800; color: var(--c-brand); }
.ui a { color: var(--c-brand); }
.ui a.ui-btn { color: var(--c-ink); }
.ui a.ui-btn.primary { color: var(--c-brand-ink); }

/* chunky buttons: a 4px bottom edge that presses down */
:is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn) { border-radius: 16px; border: 2px solid var(--c-line); box-shadow: 0 4px 0 var(--c-line-2);
  font: 800 .95rem/1.2 var(--font-body); letter-spacing: .01em; transition: transform .08s, box-shadow .08s, background .15s, filter .15s; }
:is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn):hover { border-color: var(--c-line-2); filter: brightness(1.03); }
:is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn):active { transform: translateY(3px); box-shadow: 0 1px 0 var(--c-line-2); }
: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); box-shadow: 0 4px 0 var(--c-brand-deep); }
:is(.ui-btn.primary, .anvil-role-btn.anvil-role-btn-primary > button, a.anvil-role-btn.anvil-role-btn-primary):active { box-shadow: 0 1px 0 var(--c-brand-deep); }
:is(.ui-btn.ghost, .anvil-role-btn.anvil-role-btn-ghost > button, a.anvil-role-btn.anvil-role-btn-ghost) { box-shadow: none; border-color: transparent; }
:is(.ui-btn.danger, .anvil-role-btn.anvil-role-btn-danger > button) { box-shadow: 0 4px 0 color-mix(in srgb, var(--c-bad) 35%, var(--c-line)); }
:is(.ui-btn, .anvil-role-btn > button, a.anvil-role-btn):disabled { box-shadow: none; transform: none; filter: grayscale(.4); }
:is(.ui-btn.sm, .anvil-role-btn.anvil-role-btn-sm > button) { box-shadow: 0 3px 0 var(--c-line-2); }
.ui-card { border-width: 2px; }
.ui-card, .ui-item { border-color: var(--c-line); }
.ui input:focus, .ui select:focus, .ui textarea:focus { border-color: var(--c-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 25%, transparent); }
.ui input[type=text], .ui input[type=email], .ui input[type=password], .ui select, .ui textarea { border-width: 2px; border-radius: 14px; }
.ui input:not([type]) { font: inherit; font-size: 1rem; color: var(--c-ink); background: var(--c-surface); border: 2px solid var(--c-line); border-radius: 14px; padding: 11px 13px; width: 100%; min-height: 46px; }
.ui-seg { border-width: 2px; }
.ui-seg button.on, .anvil-role-seg.anvil-role-on > button { background: var(--c-brand); color: var(--c-brand-ink); box-shadow: 0 2px 0 var(--c-brand-deep); }
.anvil-role-seg > button { font-weight: 800; }
.anvil-role-strong { font-weight: 800; }
.anvil-role-dlg-title, .anvil-modal-content .ui h2.dlg-h { font-weight: 600; }

/* header: brand, streak + seeds */
.ui-brand { font: 600 1.3rem/1 var(--font-display); letter-spacing: 0; color: var(--c-ink) !important; }
.ui-brand img { width: 34px; height: 34px; border-radius: 10px; }
.ui-nav a { font-weight: 800; }
.ui-nav a.on { color: var(--c-brand); background: var(--c-brand-soft); }
.pp-stats { display: inline-flex; align-items: center; gap: 12px; padding: 7px 13px; border-radius: 999px; background: var(--c-surface);
  border: 2px solid var(--c-line); text-decoration: none; color: var(--c-ink) !important; font: 600 1rem/1 var(--font-display); box-shadow: 0 3px 0 var(--c-line-2); }
.pp-stats > span { display: inline-flex; gap: 5px; align-items: center; }
.pp-stats .ic { width: 20px; height: 20px; }
.pp-stat-streak .ic { color: var(--c-faint); }
.pp-stat-streak.lit .ic { color: #ff7a1a; }
.pp-stat-seeds .ic { color: var(--c-brand); }
.pp-stats .anvil-label { color: inherit; display: inline; white-space: nowrap; }
.pp-stats, .pp-stats > span { white-space: nowrap; flex-wrap: nowrap; }

/* the language being learned: a little CSS flag + FR / ES / IT (header button, picker, landing) */
.pp-flag { display: inline-block; flex: none; width: 22px; height: 15px; border-radius: 4px; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .14); }
.pp-lang { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px; background: var(--c-surface);
  border: 2px solid var(--c-line); color: var(--c-ink); font: 600 .95rem/1 var(--font-display); cursor: pointer; box-shadow: 0 3px 0 var(--c-line-2); }
.pp-lang:hover { border-color: var(--c-brand); }
.pp-lang:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--c-line-2); }
.pp-lang .anvil-label { color: inherit; display: inline; }
.pp-lang .ic { width: 14px; height: 14px; color: var(--c-muted); }
.anvil-role-lpk-list > div { display: grid; gap: 10px; margin: 14px 0 18px; }
.lc { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--c-surface);
  border: 2px solid var(--c-line); box-shadow: 0 4px 0 var(--c-line-2); cursor: pointer; text-align: left; color: var(--c-ink); font: inherit; }
.lc:hover { border-color: var(--c-brand); }
.lc:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--c-line-2); }
.lc.on { border-color: var(--c-brand); background: var(--c-brand-soft); box-shadow: 0 4px 0 var(--c-brand-deep); }
.lc-flag { width: 42px; height: 28px; border-radius: 7px; }
.lc-names { display: grid; gap: 3px; flex: 1; min-width: 0; }
.anvil-role-lc-native { font: 600 1.25rem/1.1 var(--font-display); }
.anvil-role-lc-english { color: var(--c-muted); font-size: .9rem; }
.lc-on { color: var(--c-brand); }
.lc-on .ic { width: 24px; height: 24px; }
/* landing: three language tabs above the demo card */
.anvil-role-lp-langs > div { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.anvil-role-lp-langs .ix { flex: 1 1 0; min-width: 0; }
.anvil-role-lp-langs .lc { padding: 9px 10px; gap: 8px; border-radius: 14px; justify-content: center; }
.anvil-role-lp-langs .lc-flag { width: 26px; height: 18px; border-radius: 5px; }
.anvil-role-lp-langs .anvil-role-lc-native { font-size: 1rem; }
.anvil-role-lp-langs .anvil-role-lc-english, .anvil-role-lp-langs .lc-on { display: none; }
.anvil-role-lp-langs .lc-names { flex: none; }

/* the phone tab bar is for everyone (Parapeet works without an account), not on the lesson or sign-in screens */
@media (max-width: 760px) {
  .ui-shell:not(.no-tabbar):not(.no-chrome) .ui-tabbar { display: flex; position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; background: var(--c-surface);
    border-top: 2px solid var(--c-line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-sizing: border-box;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); align-items: stretch; }
  .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: 800 .7rem/1 var(--font-body); }
  .ui-tabbar a :is(.ui-ic, .ic) { width: 24px; height: 24px; }
  .ui-tabbar a.on { color: var(--c-brand); background: var(--c-brand-soft); }
  .ui-shell:not(.no-tabbar):not(.no-chrome) .ui-footer { padding-bottom: calc(var(--tabbar-h) + 10px); }
  .ui-header-right .ui-btn.ghost { display: none; }
  .pp-stats { gap: 9px; padding: 6px 10px; font-size: .95rem; }
}
@media (max-width: 400px) { .ui-shell.signed-out .ui-brand span { display: none; } }
.ui-shell.no-chrome .ui-main { min-height: 100vh; }

/* ---------------------------------------------------------------- the mascot */
.bird { display: inline-block; flex: none; }
.bird svg { width: 100%; height: 100%; overflow: visible; display: block; }
.bird .b-body { transform-origin: 82px 140px; animation: bird-bob 2.8s ease-in-out infinite; }
.bird :is(.b-eyes-wow, .b-eyes-happy, .b-eyes-closed, .b-brow, .b-drop, .b-zzz, .b-beak-low, .b-blush) { display: none; }
.bird.bird-happy .b-eyes-open, .bird.bird-wow .b-eyes-open, .bird.bird-sleepy .b-eyes-open { display: none; }
.bird.bird-happy :is(.b-eyes-happy, .b-blush) { display: inline; }
.bird.bird-wow :is(.b-eyes-wow, .b-beak-low) { display: inline; }
.bird.bird-wow .b-body { animation: bird-hop .9s ease-in-out infinite; }
.bird.bird-oops :is(.b-brow, .b-drop) { display: inline; }
.bird.bird-oops .b-body { animation: bird-shake 2.4s ease-in-out infinite; }
.bird.bird-sleepy :is(.b-eyes-closed, .b-zzz) { display: inline; }
.bird.bird-sleepy .b-body { animation-duration: 4.5s; }
.bird.bird-talk .b-beak-low { display: inline; transform-origin: 40px 66px; animation: bird-talk .45s ease-in-out infinite alternate; }
@keyframes bird-bob { 50% { transform: translateY(-3px) rotate(-1.5deg); } }
@keyframes bird-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-12px) rotate(-3deg); } }
@keyframes bird-shake { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-4deg); } 85% { transform: rotate(4deg); } }
@keyframes bird-talk { from { transform: rotate(0); } to { transform: rotate(14deg); } }

/* the daily-goal ring */
.pp-ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--c-sun) calc(var(--p) * 1%), var(--c-surface-2) 0); }
.pp-ring.full { background: conic-gradient(var(--c-brand) 100%, var(--c-brand) 0); }
.pp-ring-in { width: 48px; height: 48px; border-radius: 50%; background: var(--c-surface); display: grid; place-items: center; }
.anvil-role-ring-text { font: 600 .82rem/1 var(--font-display); color: var(--c-ink); }

/* ---------------------------------------------------------------- the swipe card (pp-card.js) */
.pc-host { display: block; width: 100%; min-width: 0; --tone: #3f9a3a; --tone-ink: #fff; }
.pc { display: grid; gap: 12px; min-width: 0; }
.pc-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 4px 8px; min-width: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); }
.pc-strip::-webkit-scrollbar { display: none; }
.pc-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 2px solid color-mix(in srgb, var(--tone) 40%, var(--c-line));
  background: var(--c-surface); color: var(--c-ink); border-radius: 999px; padding: 7px 12px 7px 9px; font: 800 .84rem/1 var(--font-body); cursor: pointer;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--tone) 30%, var(--c-line)); transition: transform .08s; }
.pc-chip svg { width: 16px; height: 16px; color: var(--tone); }
.pc-chip:active { transform: translateY(2px); }
.pc-chip.on { background: var(--tone); color: var(--tone-ink); border-color: var(--tone); box-shadow: 0 3px 0 color-mix(in srgb, var(--tone) 60%, #000); }
.pc-chip.on svg { color: currentColor; }
.pc-stage { position: relative; height: clamp(250px, 40vh, 360px); perspective: 1400px; margin: 4px 6px 10px; }
.pc-card { position: absolute; inset: 0; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; outline: none; z-index: 2;
  -webkit-tap-highlight-color: transparent; }
.pc-card:active { cursor: grabbing; }
.pc-card:focus-visible .pc-face { outline: 3px solid var(--c-accent); outline-offset: 3px; }
.pc-inner { position: relative; width: 100%; height: 100%; transition: transform .45s cubic-bezier(.3, .8, .3, 1.1); transform-style: preserve-3d; }
.pc-inner.flipped { transform: rotateY(180deg); }
.pc-face { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: 26px; background: var(--c-surface);
  border: 3px solid var(--tone); box-shadow: 0 8px 0 color-mix(in srgb, var(--tone) 55%, #0b1a10), var(--shadow-lg); display: flex; flex-direction: column;
  padding: 16px 20px 14px; overflow: hidden; }
.pc-face::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 80px; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 15%, transparent), transparent); }
.pc-back { transform: rotateY(180deg); background: color-mix(in srgb, var(--tone) 8%, var(--c-surface)); }
.pc-head { position: relative; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pc-mood { display: inline-flex; gap: 6px; align-items: center; background: var(--tone); color: var(--tone-ink); border-radius: 999px; padding: 5px 12px 5px 9px;
  font: 800 .78rem/1 var(--font-body); letter-spacing: .05em; text-transform: uppercase; }
.pc-mood svg { width: 16px; height: 16px; }
.pc-reg { font: 700 .76rem/1 var(--font-body); color: var(--c-muted); background: var(--c-surface-2); border-radius: 999px; padding: 5px 10px; }
.pc-lang { margin-left: auto; font: 800 .72rem/1 var(--font-body); color: color-mix(in srgb, var(--tone) 75%, var(--c-ink)); border: 2px solid currentColor; border-radius: 8px; padding: 3px 6px; }
.pc-text { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 0;
  font: 500 clamp(1.3rem, 1.4vw + .95rem, 2rem)/1.3 var(--font-display); color: var(--c-ink); padding: 8px 2px; overflow-wrap: anywhere; overflow: auto; }
.pc-words { display: block; max-height: 100%; }
.pc-text mark { background: color-mix(in srgb, var(--tone) 20%, transparent); color: inherit; border-radius: 6px; padding: 0 .1em;
  box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--tone) 65%, transparent); }
.pc-foot { position: relative; text-align: center; font: 700 .78rem/1 var(--font-body); color: var(--c-faint); }
.pc-under { position: absolute; inset: 12px 12px -8px; border-radius: 26px; background: color-mix(in srgb, var(--tone) 22%, var(--c-surface));
  border: 2px solid color-mix(in srgb, var(--tone) 35%, var(--c-line)); z-index: 0; transform: rotate(-2.2deg); transition: background .3s; }
.pc-under.two { inset: 22px 24px -16px; transform: rotate(2deg); opacity: .55; }
.pc-hint { position: absolute; z-index: 3; pointer-events: none; opacity: 0; font: 800 .88rem/1 var(--font-body); color: #fff; background: var(--hint, var(--c-brand));
  padding: 9px 13px; border-radius: 999px; box-shadow: 0 4px 0 rgba(0, 0, 0, .18); white-space: nowrap; }
.pc-hint.right { right: 6px; top: 50%; transform: translateY(-50%); }
.pc-hint.left { left: 6px; top: 50%; transform: translateY(-50%); }
.pc-hint.bottom { bottom: -18px; left: 50%; transform: translateX(-50%); }
.pc-hint.top { top: -18px; left: 50%; transform: translateX(-50%); }
.pc-dots { display: flex; justify-content: center; gap: 7px; flex-wrap: wrap; }
.pc-dot { width: 11px; height: 11px; border-radius: 50%; border: 0; padding: 0; background: color-mix(in srgb, var(--tone) 40%, var(--c-line)); cursor: pointer;
  transition: width .2s; }
.pc-dot.on { width: 28px; border-radius: 999px; background: var(--tone); }
.pc-card.pc-known .pc-face:not(.pc-back)::after { content: "Got it"; position: absolute; right: 14px; bottom: 12px; font: 800 .72rem/1 var(--font-body);
  color: #fff; background: var(--c-good); border-radius: 999px; padding: 4px 9px; }
.pc-card.pc-recording .pc-face { animation: pc-rec 1.1s ease-in-out infinite; }
.pc-card.pc-listening .pc-text { color: color-mix(in srgb, var(--tone) 70%, var(--c-ink)); }
.pc-card.pc-flash-good .pc-face { animation: pc-good .7s ease-out; }
.pc-card.pc-flash-bad .pc-inner { animation: pc-shake .45s ease-in-out; }
.pc-empty { margin: auto; color: var(--c-muted); }
@keyframes pc-rec { 50% { box-shadow: 0 8px 0 color-mix(in srgb, var(--tone) 55%, #0b1a10), 0 0 0 8px color-mix(in srgb, var(--c-bad) 35%, transparent); } }
@keyframes pc-good { 30% { box-shadow: 0 8px 0 var(--c-brand-deep), 0 0 0 10px color-mix(in srgb, var(--c-brand) 35%, transparent); } }
@keyframes pc-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pp-confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 2000; }

/* ---------------------------------------------------------------- practice (the swipe phrasebook) */
.pr-wrap { max-width: var(--maxw); margin: 0 auto; padding: 22px 24px 64px; }
.pr-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.pr-unit { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.anvil-role-pr-unit-drop, .pr-unit select { min-width: 200px; max-width: 100%; font-weight: 800 !important; }
.anvil-role-pr-counter { font: 700 .9rem/1 var(--font-body); color: var(--c-muted); }
.pr-top-tools { display: flex; gap: 8px; }
.pr-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
.pr-main { min-width: 0; }
.pr-cardrow { display: grid; grid-template-columns: 84px minmax(0, 1fr) 84px; align-items: center; gap: 6px; }
.pr-side-nav { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 30px; }
.anvil-role-moodnav > button { width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--tone, var(--c-brand)); color: #fff; margin: 0; padding: 0;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--tone, var(--c-brand)) 60%, #000); display: grid; place-items: center; cursor: pointer; transition: transform .08s; }
.anvil-role-moodnav > button:active { transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in srgb, var(--tone, var(--c-brand)) 60%, #000); }
.anvil-role-moodnav > button::before { width: 30px !important; height: 30px !important; }
:is(.anvil-role-moodnav, .anvil-role-dock-icon) > button > span, :is(.anvil-role-moodnav, .anvil-role-dock-icon) > button .anvil-button-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.anvil-role-moodnav-label { font: 800 .78rem/1.1 var(--font-body); color: var(--c-muted); text-align: center; }
.pr-phrase-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 90px 0; }
.pr-keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; align-items: center; color: var(--c-faint); font: 700 .78rem/1.3 var(--font-body); }
.pr-keys b { display: inline-block; min-width: 22px; padding: 2px 5px; border: 2px solid var(--c-line); border-bottom-width: 3px; border-radius: 6px; color: var(--c-muted);
  text-align: center; font-size: .72rem; background: var(--c-surface); }
.pr-tools { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; margin: 22px 90px 0; }
.anvil-role-tool { display: block; }
.anvil-role-tool > button { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 74px; padding: 10px 4px;
  border-radius: 16px; border: 2px solid var(--c-line); background: var(--c-surface); color: var(--c-ink); box-shadow: 0 4px 0 var(--c-line-2);
  font: 800 .76rem/1.1 var(--font-body); cursor: pointer; margin: 0; transition: transform .08s, box-shadow .08s; }
.anvil-role-tool > button::before { width: 26px !important; height: 26px !important; color: var(--c-brand); }
.anvil-role-tool > button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--c-line-2); }
.anvil-role-tool > button:disabled { opacity: .45; box-shadow: none; }
.anvil-role-tool-say > button::before { color: var(--c-accent-deep); }
.anvil-role-tool.anvil-role-on > button { background: var(--c-accent); border-color: var(--c-accent); color: #04323b; box-shadow: 0 4px 0 var(--c-accent-deep); }
.anvil-role-tool.anvil-role-on > button::before { color: currentColor; }
.anvil-role-tool.anvil-role-rec > button { background: var(--c-bad); border-color: var(--c-bad); color: #fff; box-shadow: 0 4px 0 var(--c-bad-deep); }
.pr-hf { display: flex; align-items: center; gap: 12px; margin: 18px 90px 0; padding: 12px 16px; border-radius: 16px; background: var(--c-brand-soft); border: 2px solid var(--c-brand); }
.pr-hf > .ic { color: var(--c-brand); width: 22px; height: 22px; }
.pr-hf-bar { flex: 1; height: 10px; border-radius: 999px; background: var(--c-surface); overflow: hidden; }
.pr-hf-fill { height: 100%; width: 0; background: var(--c-brand); border-radius: inherit; transition: width .6s; }
.pr-aside { display: grid; gap: 16px; }
.pr-mood { --tone: var(--c-brand); }
.pr-mood-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pr-mood-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--tone); flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 25%, transparent); }
.pr-mood-head > div { flex: 1; min-width: 0; }
.anvil-role-pr-mood-name { font: 600 1.35rem/1.1 var(--font-display); color: var(--c-ink); }
.anvil-role-pr-mood-blurb { display: block; margin: 0 0 10px; }
.pr-mood-listen { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--c-surface-2); }
.pr-mood-listen .ic { color: var(--c-accent-deep); margin-top: 2px; }
.pr-neutral { margin-top: 12px; padding-top: 12px; border-top: 2px dashed var(--c-line); display: grid; gap: 4px; }
.anvil-role-pr-neutral-text { font: 500 1rem/1.4 var(--font-display); color: var(--c-muted); }
.pr-card-state { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.pr-card-state:not(:has(.anvil-label:not([style*="display: none"]))) { margin: 0; }
.pr-today { display: flex; gap: 14px; align-items: center; }
.pr-today b { font: 600 1.05rem/1.2 var(--font-display); display: block; }
.pr-today a { display: inline-block; margin-top: 4px; font-weight: 800; }
.pr-more { display: flex; gap: 12px; align-items: flex-start; background: color-mix(in srgb, var(--c-sun) 16%, var(--c-surface)); border-color: color-mix(in srgb, var(--c-sun) 45%, var(--c-line)); }
.pr-more > .ic { width: 24px; height: 24px; color: var(--c-sun-deep); flex: none; }
.pr-more p { margin: 4px 0 10px; }
.pr-dock { display: none; }
.anvil-role-dock > button { width: 100%; min-height: 52px; border-radius: 15px; border: 2px solid var(--c-line); background: var(--c-surface); color: var(--c-ink); margin: 0; padding: 0 8px;
  box-shadow: 0 4px 0 var(--c-line-2); font: 800 .9rem/1 var(--font-body); display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  white-space: nowrap; overflow: hidden; transition: transform .08s; }
.anvil-role-dock > button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--c-line-2); }
.anvil-role-dock > button:disabled { opacity: .45; }
.anvil-role-dock > button::before { width: 22px !important; height: 22px !important; }
.anvil-role-dock-mood > button { border-color: color-mix(in srgb, var(--tone, var(--c-brand)) 70%, var(--c-line)); box-shadow: 0 4px 0 color-mix(in srgb, var(--tone, var(--c-brand)) 45%, var(--c-line-2)); }
.anvil-role-dock-mood > button::before { color: var(--tone, var(--c-brand)); }
.anvil-role-dock-after > button { flex-direction: row-reverse; }
.anvil-role-dock-next > button { background: var(--c-brand); border-color: var(--c-brand); color: #fff; box-shadow: 0 4px 0 var(--c-brand-deep); }
@media (max-width: 1060px) {
  .pr-grid { grid-template-columns: minmax(0, 1fr); }
  .pr-aside { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 760px) {
  .pr-wrap { padding: 12px 12px calc(var(--tabbar-h) + 96px); }
  .pr-top { margin-bottom: 4px; }
  .anvil-role-pr-unit-drop, .pr-unit select { min-width: 0; }
  .pr-top-tools .anvil-role-btn-sm:not(.anvil-role-btn-icon) > button { padding: 6px 10px; }
  .pr-cardrow { grid-template-columns: minmax(0, 1fr); }
  .pr-side-nav, .pr-phrase-nav { display: none !important; }
  .pc-stage { height: clamp(230px, 36vh, 330px); margin: 2px 4px 10px; }
  .pr-tools { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 16px 0 0; }
  .anvil-role-tool > button { min-height: 64px; font-size: .72rem; padding: 8px 2px; }
  .pr-hf { margin: 14px 0 0; }
  .pr-aside { margin-top: 16px; }
  .pr-dock { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px; position: fixed; left: 0; right: 0; z-index: 44;
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 10px 12px 10px; background: color-mix(in srgb, var(--c-bg) 94%, transparent);
    border-top: 2px solid var(--c-line); }
  .ui-shell.page-practice .ui-footer { display: none; }
}

/* help + compare dialogs */
.gs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 6px 0 18px; }
.gs-item { display: flex; gap: 12px; align-items: flex-start; }
.gs-item p { margin: 2px 0 0; color: var(--c-muted); font-size: .92rem; }
.gs-ic { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--c-brand-soft); color: var(--c-brand); }
.gs-ic.gs-x, .gs-ic.gs-y { display: flex; align-items: center; justify-content: center; gap: 0; }
.gs-ic.gs-y { flex-direction: column; }
.gs-ic .ic { width: 18px; height: 18px; }
.anvil-role-cm-list > div { display: grid; gap: 8px; margin: 12px 0 16px; }
.cm-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 16px; border: 2px solid var(--c-line); background: var(--c-surface); }
.cm-row.on { border-color: var(--tone); background: color-mix(in srgb, var(--tone) 8%, var(--c-surface)); }
.cm-ic { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--tone); color: #fff; }
.cm-body { flex: 1; min-width: 0; }
.cm-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cm-fr { font: 500 1.08rem/1.4 var(--font-display); color: var(--c-ink); margin: 4px 0 2px; overflow-wrap: anywhere; }
.cm-fr mark { background: color-mix(in srgb, var(--tone) 20%, transparent); color: inherit; border-radius: 5px; padding: 0 .1em; }
.cm-actions { display: flex; flex-direction: column; gap: 6px; }
.hf-moods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
@media (max-width: 560px) { .gs-grid { grid-template-columns: 1fr; } .cm-actions { flex-direction: row; } .cm-row { flex-wrap: wrap; } }
.st { text-align: left; }
.st-bird { display: flex; justify-content: center; margin: -6px 0 6px; }
.anvil-role-st-text { display: block; margin: 0 0 12px; font-size: 1.05rem; line-height: 1.55; }

/* ---------------------------------------------------------------- play (the trail) */
.pl-wrap { padding-top: 24px; }
.pl-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px 26px; align-items: center; padding: 22px 26px; border-radius: 28px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c-brand) 16%, var(--c-surface)), color-mix(in srgb, var(--c-accent) 14%, var(--c-surface)));
  border: 2px solid var(--c-line); box-shadow: var(--shadow); margin-bottom: 18px; }
.anvil-role-pl-hello { font: 600 clamp(1.6rem, 3vw, 2.2rem)/1.1 var(--font-display); color: var(--c-ink); }
.anvil-role-pl-stage-line { display: block; color: var(--c-muted); margin: 4px 0 12px; }
.pl-chase-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; margin-bottom: 6px; }
.pl-chase-bar { position: relative; height: 16px; border-radius: 999px; background: var(--c-surface); border: 2px solid var(--c-line); }
.pl-chase-bar.big { height: 20px; margin: 10px 0 6px; }
.pl-chase-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--c-brand), #82d85a);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .1), inset 0 3px 0 rgba(255, 255, 255, .35); transition: width .6s; }
.pl-chase-bird { position: absolute; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%;
  background: var(--c-surface) url("icon.svg") center / 24px no-repeat; border: 2px solid var(--c-brand); left: 0; transition: left .6s; }
.pl-hero-stats { display: flex; gap: 10px; }
.pl-stat { display: grid; justify-items: center; gap: 2px; min-width: 88px; padding: 12px 10px; border-radius: 18px; background: var(--c-surface);
  border: 2px solid var(--c-line); box-shadow: 0 4px 0 var(--c-line-2); text-decoration: none; color: var(--c-ink) !important; }
.pl-stat > span { font: 700 .74rem/1.1 var(--font-body); color: var(--c-muted); }
.pl-stat > .ic { width: 26px; height: 26px; }
.pl-stat.streak > .ic { color: var(--c-faint); }
.pl-stat.streak.lit > .ic { color: #ff7a1a; }
.pl-stat.seeds > .ic { color: var(--c-brand); }
.anvil-role-pl-stat-num { font: 600 1.5rem/1.1 var(--font-display); color: var(--c-ink); }
.pl-stat.goal .pp-ring { width: 52px; height: 52px; }
.pl-stat.goal .pp-ring-in { width: 38px; height: 38px; }
.pl-stat.goal .anvil-role-ring-text { font-size: .66rem; }
.pl-guest { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 16px; margin: 0 0 18px;
  background: color-mix(in srgb, var(--c-sun) 18%, var(--c-surface)); border: 2px solid color-mix(in srgb, var(--c-sun) 50%, var(--c-line)); }
.pl-guest > .ic { width: 22px; height: 22px; color: var(--c-sun-deep); flex: none; }
.anvil-role-pl-guest-text, .pl-guest-text { flex: 1; font-size: .93rem; }
.pl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.pl-side { display: grid; gap: 14px; position: sticky; top: calc(var(--header-h) + 16px); }
.pl-card h3 { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.pl-card h3 .ic { color: var(--c-brand); width: 20px; height: 20px; }
.pl-card .anvil-role-fine-print { display: block; margin-bottom: 12px; }
.anvil-role-pl-unit-list > div { display: grid; gap: 30px; }
.un { --unit: #2e9e4f; --unit-deep: #1e7a3a; }
.un.unit-2 { --unit: #2f7fe0; --unit-deep: #1d5fb3; }
.un.unit-3 { --unit: #7c4fd1; --unit-deep: #5a35a3; }
.un-banner { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 22px; background: var(--unit); color: #fff;
  box-shadow: 0 6px 0 var(--unit-deep); }
.un-ic { flex: none; width: 50px; height: 50px; border-radius: 16px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; }
.un-ic .ic { width: 28px; height: 28px; }
.un-text { flex: 1; min-width: 0; }
.anvil-role-un-kicker { display: block; font: 800 .72rem/1.2 var(--font-body); letter-spacing: .1em; text-transform: uppercase; opacity: .85; color: #fff; }
.anvil-role-un-title { display: block; font: 600 1.45rem/1.1 var(--font-display); color: #fff; }
.anvil-role-un-blurb { display: block; font-size: .9rem; opacity: .9; color: #fff; }
.anvil-role-un-progress { font: 600 1.05rem/1 var(--font-display); background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 8px 12px; color: #fff; }
.anvil-role-un-path > div { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 34px 0 6px; }
.anvil-role-un-path > div > :nth-child(8n+2) { transform: translateX(-64px); }
.anvil-role-un-path > div > :nth-child(8n+3) { transform: translateX(-96px); }
.anvil-role-un-path > div > :nth-child(8n+4) { transform: translateX(-64px); }
.anvil-role-un-path > div > :nth-child(8n+6) { transform: translateX(64px); }
.anvil-role-un-path > div > :nth-child(8n+7) { transform: translateX(96px); }
.anvil-role-un-path > div > :nth-child(8n+8) { transform: translateX(64px); }
.ln { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ln-btn { width: 78px; height: 72px; border-radius: 50%; border: 0; background: var(--unit); color: #fff; box-shadow: 0 7px 0 var(--unit-deep); cursor: pointer;
  display: grid; place-items: center; transition: transform .08s, box-shadow .08s; }
.ln-btn:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--unit-deep); }
.ln-btn .ic { width: 32px; height: 32px; }
.ln.done .ln-btn { background: var(--c-sun); box-shadow: 0 7px 0 var(--c-sun-deep); color: #5a3d00; }
.ln.challenge .ln-btn { width: 90px; height: 84px; border-radius: 30px; }
.ln.challenge:not(.done) .ln-btn { background: linear-gradient(135deg, var(--unit), #ff8a3d); }
.ln.locked .ln-btn { background: var(--c-surface-2); color: var(--c-faint); box-shadow: 0 7px 0 var(--c-line-2); }
.ln.current .ln-btn { outline: 7px solid color-mix(in srgb, var(--unit) 25%, transparent); outline-offset: 3px; }
.ln-start { position: absolute; top: -40px; background: var(--c-surface); color: var(--unit); border: 2px solid var(--c-line); border-radius: 12px; padding: 6px 12px;
  font: 800 .85rem/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 3px 0 var(--c-line-2); animation: ln-bounce 1.4s ease-in-out infinite; z-index: 1; }
.ln-start::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px; margin-left: -6px; background: var(--c-surface);
  border-right: 2px solid var(--c-line); border-bottom: 2px solid var(--c-line); transform: rotate(45deg); }
.anvil-role-ln-stars { color: var(--c-sun-deep); letter-spacing: 2px; font-size: .95rem; line-height: 1; }
.anvil-role-ln-caption { font: 800 .78rem/1 var(--font-body); color: var(--c-muted); }
@keyframes ln-bounce { 50% { transform: translateY(-5px); } }
@media (max-width: 960px) {
  .pl-grid { grid-template-columns: minmax(0, 1fr); }
  .pl-side { position: static; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 720px) {
  .pl-hero { grid-template-columns: auto minmax(0, 1fr); padding: 16px; gap: 12px 14px; }
  .pl-hero-bird .bird { width: 84px !important; height: 84px !important; }
  .pl-hero-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pl-stat { min-width: 0; }
  .anvil-role-un-path > div > :nth-child(8n+2), .anvil-role-un-path > div > :nth-child(8n+4) { transform: translateX(-42px); }
  .anvil-role-un-path > div > :nth-child(8n+3) { transform: translateX(-66px); }
  .anvil-role-un-path > div > :nth-child(8n+6), .anvil-role-un-path > div > :nth-child(8n+8) { transform: translateX(42px); }
  .anvil-role-un-path > div > :nth-child(8n+7) { transform: translateX(66px); }
  .anvil-role-un-blurb { display: none; }
}

/* ---------------------------------------------------------------- lesson */
.ls-wrap { max-width: 780px; margin: 0 auto; padding: 18px 18px 170px; }
.ls-top { display: flex; align-items: center; gap: 14px; }
.ls-bar { flex: 1; height: 18px; border-radius: 999px; background: var(--c-surface-2); overflow: hidden; }
.ls-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--c-brand), #82d85a);
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .1), inset 0 4px 0 rgba(255, 255, 255, .35); transition: width .4s; }
.ls-seeds { display: inline-flex; gap: 6px; align-items: center; font: 600 1.1rem/1 var(--font-display); color: var(--c-brand); min-width: 48px; }
.ls-seeds .ic { width: 22px; height: 22px; }
.ls-seeds .anvil-label { color: inherit; }
.anvil-role-ls-title { display: block; font: 600 clamp(1.45rem, 3vw, 2rem)/1.15 var(--font-display); color: var(--c-ink); margin: 30px 0 18px; }
.ls-prompt { display: flex; gap: 12px; align-items: flex-end; margin-bottom: 24px; }
.ls-bubble { position: relative; flex: 1; min-width: 0; background: var(--c-surface); border: 2px solid var(--c-line); border-radius: 20px; padding: 14px 18px 16px;
  box-shadow: 0 4px 0 var(--c-line-2); }
.ls-bubble::before { content: ""; position: absolute; left: -10px; bottom: 26px; width: 16px; height: 16px; background: var(--c-surface);
  border-left: 2px solid var(--c-line); border-bottom: 2px solid var(--c-line); transform: rotate(45deg); }
.ls-bubble-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 8px; }
.anvil-role-mood-chip { display: inline-flex; background: var(--tone, var(--c-brand)); color: #fff; border-radius: 999px; padding: 5px 11px; font: 800 .74rem/1 var(--font-body);
  letter-spacing: .06em; text-transform: uppercase; }
.anvil-role-ls-prompt-text { display: block; font: 500 clamp(1.25rem, 2.4vw, 1.6rem)/1.35 var(--font-display); color: var(--c-ink); margin-top: 8px; overflow-wrap: anywhere; }
.ls-big-listen { display: flex; justify-content: center; padding: 10px 0 2px; }
.ls-prompt.is-listen .ls-bubble-head { display: none; }
.anvil-role-ls-choices > div { display: grid; gap: 12px; }
.anvil-role-ls-choices.anvil-role-moods > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ch { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--c-surface); border: 2px solid var(--c-line); border-radius: 18px;
  padding: 14px 16px; box-shadow: 0 4px 0 var(--c-line-2); font: 700 1.05rem/1.35 var(--font-body); color: var(--c-ink); cursor: pointer;
  transition: transform .08s, box-shadow .08s, background .15s; margin: 0; }
.ch:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--c-line-2); }
.ch-n { flex: none; width: 30px; height: 30px; border: 2px solid var(--c-line); border-radius: 9px; display: grid; place-items: center; }
.anvil-role-ch-num { font: 800 .82rem/1 var(--font-body); color: var(--c-muted); }
.anvil-role-ch-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ch-ic { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--tone); color: #fff; }
.ch.is-mood { border-color: color-mix(in srgb, var(--tone) 40%, var(--c-line)); }
.ch.picked { border-color: var(--c-accent); background: color-mix(in srgb, var(--c-accent) 12%, var(--c-surface)); box-shadow: 0 4px 0 var(--c-accent-deep); }
.ch.right { border-color: var(--c-good); background: var(--c-good-soft); box-shadow: 0 4px 0 var(--c-brand-deep); }
.ch.wrong { border-color: var(--c-bad); background: var(--c-bad-soft); box-shadow: 0 4px 0 var(--c-bad-deep); }
.ch.dim { opacity: .5; }
.ls-answer { min-height: 66px; padding: 6px 0 12px; margin-bottom: 18px; border-bottom: 2px solid var(--c-line);
  background: repeating-linear-gradient(180deg, transparent 0 54px, var(--c-line) 54px 56px); }
.anvil-role-ls-tiles > div { display: flex; flex-wrap: wrap; gap: 8px; }
.anvil-role-ls-bank > div { justify-content: center; }
.tl { background: var(--c-surface); border: 2px solid var(--c-line); border-radius: 14px; padding: 9px 13px; box-shadow: 0 3px 0 var(--c-line-2); cursor: pointer;
  margin: 0; transition: transform .08s; }
.tl:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--c-line-2); }
.anvil-role-tl-word { font: 700 1.05rem/1.2 var(--font-body); color: var(--c-ink); }
.tl.used { background: var(--c-surface-2); border-color: var(--c-surface-2); box-shadow: none; cursor: default; }
.tl.used .anvil-role-tl-word { visibility: hidden; }
.ls-say { display: grid; justify-items: center; gap: 12px; padding: 10px 0; }
.anvil-role-mic > button { width: 132px; height: 132px; border-radius: 50%; border: 0; margin: 0; background: var(--c-accent); color: #04323b; cursor: pointer;
  box-shadow: 0 7px 0 var(--c-accent-deep); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font: 800 .85rem/1.1 var(--font-body); transition: transform .08s; }
.anvil-role-mic > button::before { width: 46px !important; height: 46px !important; }
.anvil-role-mic.anvil-role-on > button { background: var(--c-bad); color: #fff; box-shadow: 0 7px 0 var(--c-bad-deep); animation: mic-pulse 1s ease-in-out infinite; }
@keyframes mic-pulse { 50% { box-shadow: 0 7px 0 var(--c-bad-deep), 0 0 0 14px color-mix(in srgb, var(--c-bad) 25%, transparent); } }
.ls-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--c-surface); border-top: 2px solid var(--c-line);
  padding: 16px 18px calc(16px + env(safe-area-inset-bottom)); transition: background .2s; }
.ls-foot.good { background: var(--c-good-soft); border-top-color: transparent; }
.ls-foot.bad { background: var(--c-bad-soft); border-top-color: transparent; }
.ls-foot-in { max-width: 780px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ls-verdict { display: none; align-items: center; gap: 14px; min-width: 0; }
.ls-foot.good .ls-verdict, .ls-foot.bad .ls-verdict { display: flex; }
.ls-verdict-ic { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--c-surface); display: grid; place-items: center; }
.ls-verdict-ic .ic { width: 30px; height: 30px; }
.ls-foot.good .ls-verdict-ic { color: var(--c-good); }
.ls-foot.bad .ls-verdict-ic { color: var(--c-bad); }
.anvil-role-ls-foot-title { display: block; font: 600 1.3rem/1.15 var(--font-display); }
.ls-foot.good .anvil-role-ls-foot-title { color: var(--c-good); }
.ls-foot.bad .anvil-role-ls-foot-title { color: var(--c-bad); }
.anvil-role-ls-foot-text { display: block; color: var(--c-ink); overflow-wrap: anywhere; }
.anvil-role-ls-go > button { min-width: 170px; }
.ls-foot.bad .anvil-role-ls-go > button { background: var(--c-bad); border-color: var(--c-bad); box-shadow: 0 4px 0 var(--c-bad-deep); color: #fff; }
.ls-foot:not(.good):not(.bad) .ls-foot-in { justify-content: flex-end; }
.ls-end, .ls-missing { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 26px 0; }
.anvil-role-ls-end-title { font: 600 clamp(2rem, 5vw, 2.6rem)/1.05 var(--font-display); color: var(--c-brand); }
.anvil-role-ls-end-line { max-width: 34em; color: var(--c-muted); }
.ls-tiles-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: min(100%, 520px); margin-top: 8px; }
.ls-stat { border: 2px solid var(--c-line); border-radius: 18px; overflow: hidden; background: var(--c-surface); box-shadow: 0 4px 0 var(--c-line-2); }
.ls-stat > span { display: block; padding: 6px 4px; font: 800 .72rem/1.1 var(--font-body); color: #fff; text-transform: uppercase; letter-spacing: .05em; }
.ls-stat.seeds > span { background: var(--c-brand); }
.ls-stat.acc > span { background: var(--c-accent-deep); }
.ls-stat.streak > span { background: #ff7a1a; }
.anvil-role-ls-stat-num { display: block; padding: 10px 4px 12px; font: 600 1.6rem/1 var(--font-display); color: var(--c-ink); }
.anvil-role-ls-stars { font-size: 2.2rem; letter-spacing: 6px; color: var(--c-sun-deep); line-height: 1; }
.anvil-role-ls-badges > div { display: grid; gap: 8px; width: min(100%, 460px); }
.ls-guest { display: flex; gap: 10px; align-items: center; text-align: left; max-width: 520px; padding: 10px 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--c-sun) 16%, var(--c-surface)); font-size: .92rem; }
.ls-guest .ic { color: var(--c-sun-deep); flex: none; }
.ls-end-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
@media (max-width: 600px) {
  .ls-wrap { padding: 12px 14px 190px; }
  .anvil-role-ls-title { margin: 20px 0 14px; }
  .ls-prompt .bird { width: 64px !important; height: 64px !important; }
  .ls-foot-in { flex-direction: column; align-items: stretch; gap: 12px; }
  .anvil-role-ls-go, .anvil-role-ls-go > button { width: 100%; }
  .anvil-role-ls-choices.anvil-role-moods > div { grid-template-columns: minmax(0, 1fr); }
  .ch { padding: 12px 14px; font-size: 1rem; }
}

/* badges */
.bd { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; border: 2px solid var(--c-line); background: var(--c-surface); text-align: left; }
.bd-ic { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--c-surface-2); color: var(--c-faint); }
.bd-ic .ic { width: 26px; height: 26px; }
.bd.earned .bd-ic { background: var(--c-sun); color: #5a3d00; box-shadow: 0 4px 0 var(--c-sun-deep); }
.bd:not(.earned) { opacity: .7; }
.bd.new { border-color: var(--c-sun); animation: ui-pop .4s ease-out; }
.bd-text { min-width: 0; display: grid; }

/* ---------------------------------------------------------------- progress */
.pg-chase { display: flex; gap: 20px; align-items: center; margin-bottom: 16px; }
.pg-chase-text { flex: 1; min-width: 0; }
.anvil-role-pg-stage { display: block; font: 600 1.5rem/1.1 var(--font-display); color: var(--c-ink); }
.pg-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.pg-stat { display: grid; gap: 2px; }
.pg-stat > .ic { width: 26px; height: 26px; color: var(--c-brand); margin-bottom: 4px; }
.pg-stat.flame > .ic { color: #ff7a1a; }
.pg-stat > span { color: var(--c-muted); font-size: .9rem; }
.pg-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 26px; }
.pg-goal-row { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.pg-goals { display: flex; flex-wrap: wrap; border-radius: 18px; }
.pg-goals .anvil-role-seg > button { padding: 9px 12px; }
.pg-days-h { margin: 20px 0 10px; font-size: 1rem; }
.anvil-role-pg-days > div { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 5px; align-items: end; height: 120px; }
.anvil-role-pg-days > div > *, .dy-host { height: 100%; min-height: 0; }
.dy { display: grid; grid-template-rows: 1fr auto; gap: 4px; height: 100%; }
.dy-col { position: relative; border-radius: 8px; background: var(--c-surface-2); overflow: hidden; display: flex; align-items: flex-end; }
.dy-fill { width: 100%; height: 0; background: var(--c-brand); border-radius: 8px 8px 0 0; }
.dy.goal .dy-fill { background: var(--c-sun); }
.anvil-role-dy-day { font: 800 .62rem/1 var(--font-body); color: var(--c-faint); text-align: center; white-space: nowrap; overflow: hidden; }
.dy.today .anvil-role-dy-day { color: var(--c-brand); }
.anvil-role-pg-mood-list > div { display: grid; gap: 10px; }
.mb { display: grid; grid-template-columns: 32px 92px minmax(0, 1fr) 44px; gap: 10px; align-items: center; }
.mb-ic { width: 32px; height: 32px; border-radius: 10px; background: var(--tone); color: #fff; display: grid; place-items: center; }
.mb-ic .ic { width: 18px; height: 18px; }
.anvil-role-mb-label { font-weight: 800; font-size: .9rem; }
.mb-bar { height: 12px; border-radius: 999px; background: var(--c-surface-2); overflow: hidden; }
.mb-fill { height: 100%; width: 2%; border-radius: inherit; background: var(--tone); }
.anvil-role-mb-pct { font: 600 .9rem/1 var(--font-display); color: var(--c-muted); text-align: right; }
.pg-badges h2 { margin-bottom: 14px; }
.anvil-role-pg-badge-grid > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
@media (max-width: 860px) {
  .pg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) { .pg-chase { flex-direction: column; text-align: center; } .mb { grid-template-columns: 32px 78px minmax(0, 1fr) 40px; gap: 8px; } }

/* ---------------------------------------------------------------- saved (my phrasebook) */
.anvil-role-sv-list > div { display: grid; gap: 10px; }
.sv-row { align-items: center; }
.anvil-role-sv-fr { display: block; font: 500 1.15rem/1.35 var(--font-display); color: var(--c-ink); overflow-wrap: anywhere; }
.anvil-role-sv-en { display: block; color: var(--c-muted); overflow-wrap: anywhere; }
.sv-level { display: flex; gap: 4px; margin-top: 8px; }
.sv-level i { width: 18px; height: 6px; border-radius: 999px; background: var(--c-surface-2); }
.sv-level i.on { background: var(--c-brand); }
.sv-actions { display: flex; gap: 2px; }
.sv-quiz { margin-bottom: 18px; border-color: var(--c-accent); }
.sv-quiz-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.sv-quiz-head .eyebrow { margin: 0; }
.sv-quiz-head .anvil-role-btn { margin-left: auto; }
.anvil-role-sv-quiz-prompt { display: block; font: 600 1.4rem/1.3 var(--font-display); margin: 6px 0 12px; }
.anvil-role-sv-quiz-result { display: block; margin: 10px 0 4px; font-weight: 800; }
.anvil-role-sv-quiz-result.anvil-role-good { color: var(--c-good); }
.anvil-role-sv-quiz-result.anvil-role-bad { color: var(--c-bad); }

/* ---------------------------------------------------------------- profile + admin */
.pf-learn, .pf-danger { margin-top: 16px; }
.pf-danger { border-color: color-mix(in srgb, var(--c-bad) 35%, var(--c-line)); }
.anvil-role-ad-interest { display: block; white-space: pre-line; font-size: .88rem; color: var(--c-muted); max-height: 360px; overflow: auto; }
.anvil-role-pf-avatar, .anvil-role-avatar > button { background: var(--c-brand); color: #fff; }

/* ---------------------------------------------------------------- landing */
.page-landing { overflow-x: clip; }
.page-landing .lp-hero { padding: 54px 0 30px; }
.page-landing .lp-hero::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--c-accent) 22%, transparent), transparent 70%); }
.lp-hero .ui-wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
.lp-hero h1 { font-weight: 600; font-size: clamp(2.5rem, 6vw, 4.2rem); }
.lp-hero h1 em { color: var(--c-brand); font-style: normal; position: relative; white-space: nowrap; }
.lp-hero h1 em::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: .04em; height: .22em; border-radius: 999px; background: var(--c-sun); z-index: -1; opacity: .8; }
.lp-signup { margin-top: 14px !important; }
.lp-demo { position: relative; display: grid; justify-items: center; }
.lp-phone { width: min(100%, 430px); background: var(--c-surface); border: 2px solid var(--c-line); border-radius: 34px; padding: 18px 14px 16px; box-shadow: var(--shadow-lg); }
.lp-phone-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 6px 6px; }
.lp-phone-q { font: 600 1rem/1.2 var(--font-display); color: var(--c-ink); }
.lp-phone .pc-stage { height: 260px; }
.lp-demo-hint { display: flex; justify-content: center; align-items: center; gap: 6px; color: var(--c-faint); font: 800 .8rem/1 var(--font-body); margin-top: 6px; }
.lp-demo-bird { position: absolute; left: -26px; bottom: -22px; }
.lp-moods { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.lp-mood { background: var(--c-surface); border: 2px solid color-mix(in srgb, var(--tone) 35%, var(--c-line)); border-radius: 20px; padding: 14px 16px 16px;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--tone) 35%, var(--c-line-2)); }
.lp-mood header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.lp-mood header .ic { width: 30px; height: 30px; padding: 6px; border-radius: 10px; background: var(--tone); color: #fff; box-sizing: border-box; }
.lp-mood header b { font: 600 1.1rem/1 var(--font-display); }
.lp-mood header span { color: var(--c-muted); font-size: .82rem; font-weight: 700; }
.lp-mood p { font: 500 1.08rem/1.38 var(--font-display); color: var(--c-ink); margin: 0 0 6px; }
.lp-mood small { color: var(--c-muted); }
.lp-step { padding-top: 22px; }
.lp-step::before { display: none; }
.lp-step-ic { width: 44px !important; height: 44px !important; color: var(--c-brand); margin-bottom: 10px; }
.lp-feature .ic { color: var(--c-brand); }
.lp-story { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 30px; align-items: center; padding: 30px; border-radius: 28px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c-accent) 14%, var(--c-surface)), color-mix(in srgb, var(--c-sun) 16%, var(--c-surface)));
  border: 2px solid var(--c-line); }
.lp-for { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lp-band { background: var(--c-brand); color: #fff; box-shadow: 0 8px 0 var(--c-brand-deep); }
.lp-band h2, .lp-band p { color: #fff; }
.lp-band .ui-btn { color: var(--c-ink); }
.lp-faq details { border-width: 2px; }
@media (max-width: 860px) {
  .lp-hero .ui-wrap { grid-template-columns: minmax(0, 1fr); }
  .lp-demo-bird { left: auto; right: -6px; bottom: -30px; }
  .lp-demo-bird .bird { width: 78px !important; height: 78px !important; }
  .lp-for { grid-template-columns: minmax(0, 1fr); }
  .lp-story { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .bird .b-body, .bird .b-beak-low, .ln-start, .pc-card .pc-face { animation: none !important; }
  .pc-inner { transition: none; }
}
.ui-field .anvil-role-field-label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
/* landing: the ten moods follow the language picked (Items.MoodSample in a RepeatingPanel) */
.anvil-role-lp-moods > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.lp-mood-host, .lp-mood-host > .lp-mood { height: 100%; box-sizing: border-box; }
@media (max-width: 400px) { .pp-lang { padding: 6px 8px; gap: 5px; } .pp-lang .ic { display: none; } }

/* Watch section: the app's YouTube video (APP_MAKER/standard/watch_forms.py) */
.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: 0 0 10px; }
.ytf .ytf-copy p { color: var(--c-muted); font-size: 1.1rem; max-width: 36ch; margin: 0 0 16px; }
.ytf .ytf-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--c-brand); }
.ytf .ytf-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius, 12px); overflow: hidden; background: #000; border: 1px solid var(--c-line, rgba(0, 0, 0, .12)); }
.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-slow, 280ms) var(--ease-out, cubic-bezier(.23, 1, .32, 1)), filter 160ms var(--ease-out, cubic-bezier(.23, 1, .32, 1)); }
.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 120ms var(--ease-out, cubic-bezier(.23, 1, .32, 1)); }
@media (hover: hover) and (pointer: fine) {
  .ytf .ytf-cover:hover img { transform: scale(1.02); filter: brightness(.92); }
  .ytf .ytf-cover:hover .ytf-play { transform: translate(-50%, -50%) scale(1.08); }
}
.ytf .ytf-cover:focus-visible .ytf-play { transform: translate(-50%, -50%) scale(1.08); }
.ytf .ytf-cover:active .ytf-play { transform: translate(-50%, -50%) scale(.97); }
.ytf .ytf-cover:focus-visible { outline: 3px solid var(--c-brand); outline-offset: -5px; }
.ytf .ytf-len { position: absolute; right: 10px; bottom: 10px; background: rgba(0, 0, 0, .78); color: #fff; font-size: .78rem; font-weight: 700; line-height: 1.3; padding: 3px 7px; border-radius: 6px; }
.ytf .ytf-note { font-size: .8rem; color: var(--c-muted); margin: 14px 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; } }
@media (prefers-reduced-motion: reduce) { .ytf .ytf-cover img, .ytf .ytf-play { transition: none; } .ytf .ytf-cover:hover img { transform: none; } }
