/* Kwaikwayo Trainers. Brand colours: docs/PROJECT.md (deep black, sage-green accent, light
   sage for selected items). No external assets (CSP: self only): the fonts are in fonts/, the
   icons are data: SVG masks (img-src allows data:). */

/* ------------------------------------------------------------------ fonts (SIL OFL, fonts/) */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-wght-normal.260c81a4759b.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-ext-wght-normal.1ad231aac0a8.woff2") format("woff2");   /* Hausa: ɓ ɗ ƙ ƴ */
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("fonts/space-grotesk-latin-wght-normal.87c506d88b9f.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("fonts/space-grotesk-latin-ext-wght-normal.0bb2ef2eda4e.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: dark;
  /* surfaces: near-black with a faint green cast, so the sage sits in them */
  --bg: #0B0D0C; --panel: #121513; --panel-2: #161A17; --soft: #1C211D; --line: #252C26; --line-strong: #364038;
  --ink: #F2F4EF; --muted: #A3AC9E;
  --brand: #9CAF88; --brand-ink: #0B0D0C; --brand-soft: #CCD8BF; --focus: #CCD8BF;
  --glow: rgba(156, 175, 136, .28); --glow-soft: rgba(156, 175, 136, .12);
  --ok: #7FD9A0; --ok-bg: #102419; --info: #B4C5A2; --info-bg: #182017;
  --warn: #F2C46B; --warn-bg: #2A2212; --bad: #F58C82; --bad-bg: #2C1513; --grey-bg: #1C211D;
  --radius: 16px; --radius-sm: 11px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px -18px rgba(0, 0, 0, .9);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 15px/1.55 var(--sans);
  background-color: var(--bg);
  background-image: radial-gradient(1100px 520px at 50% -260px, rgba(156, 175, 136, .10), transparent 70%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
::selection { background: var(--brand); color: var(--brand-ink); }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-soft); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* ------------------------------------------------------------------ top bar (frosted glass) */
.topbar { display: flex; align-items: center; gap: 18px; padding: 10px 22px; border-bottom: 1px solid var(--line);
  position: -webkit-sticky; position: sticky; top: 0; z-index: 20; background: rgba(11, 13, 12, .96); }
/* the blur sits on a layer behind the bar: a filter on the bar itself would trap the phone tab bar (fixed) inside it */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .topbar { background: transparent; }
  .topbar::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(11, 13, 12, .72);
    -webkit-backdrop-filter: saturate(140%) blur(18px); backdrop-filter: saturate(140%) blur(18px); }
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex-shrink: 0; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { display: block; border-radius: 8px; box-shadow: 0 0 0 1px var(--line-strong), 0 6px 18px -6px var(--glow); }
.brand-name { font: 700 18px/1 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.brand-tag { color: var(--brand); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; white-space: nowrap;
  padding: 3px 8px; border: 1px solid rgba(156, 175, 136, .35); border-radius: 999px; background: var(--glow-soft); }
.nav { display: flex; flex-wrap: wrap; gap: 2px 4px; flex: 1; min-width: 0; }
.nav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 10px; text-decoration: none;
  color: var(--muted); white-space: nowrap; font-weight: 500; transition: color .15s, background-color .15s; }
.nav a::before, .tabbar a::before, .tabbar .more::before, .menu-list a::before { content: ""; width: 17px; height: 17px; flex: none; background: currentColor; opacity: .9;
  -webkit-mask: var(--i-dot) center / contain no-repeat; mask: var(--i-dot) center / contain no-repeat; }
.nav a:hover { background: var(--soft); color: var(--ink); }
.nav a.active { background: var(--glow-soft); color: var(--brand-soft); box-shadow: inset 0 0 0 1px rgba(156, 175, 136, .28); }
.nav:empty { display: none; }
.who { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; margin-left: auto; }

/* ------------------------------------------------------------------ page */
.main { max-width: 1100px; margin: 0 auto; padding: 32px 22px 64px; }
.main:focus { outline: none; }
/* backwards, not both: an animation that stays applied after it ends traps fixed bars inside (the Check bar) */
.main > * { animation: rise .28s var(--ease) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.015em; }
h1 { font-size: 30px; line-height: 1.15; font-weight: 600; margin: 4px 0 18px; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 15px; font-weight: 600; margin: 18px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; }
.accent { color: var(--brand); }
/* "Loading…": a soft shimmer, so a wait looks alive */
.loading { display: inline-block; color: transparent; border-radius: 8px; min-width: 160px; user-select: none;
  background: linear-gradient(90deg, var(--soft) 0%, var(--line-strong) 50%, var(--soft) 100%) 0 0 / 200% 100%;
  animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.panel { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.cards { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
@supports selector(:has(a)) {            /* older browsers keep the cards' own bottom margins */
  .grid > .panel, .grid > .card { margin-bottom: 0; }
  .grid:has(> .panel), .grid:has(> .card) { margin-bottom: 18px; }
}
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }

/* ------------------------------------------------------------------ controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 17px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--soft); cursor: pointer; text-decoration: none; color: var(--ink); font-weight: 500;
  transition: background-color .15s, border-color .15s, box-shadow .2s, transform .1s; -webkit-tap-highlight-color: transparent; }
.btn:hover { border-color: #4A5649; background: #222823; color: var(--ink); }
.btn:active:not([disabled]) { transform: scale(.98); }
.btn.primary { background: linear-gradient(180deg, #A9BB96, var(--brand)); border-color: transparent; color: var(--brand-ink); font-weight: 650;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 8px 22px -10px var(--glow); }
.btn.primary:hover { background: var(--brand-soft); color: var(--brand-ink); box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 10px 28px -8px var(--glow); }
.btn.ok { background: var(--ok-bg); border-color: rgba(127, 217, 160, .55); color: var(--ok); font-weight: 600; }
.btn.ok:hover { background: #15301F; border-color: var(--ok); }
.btn.danger { background: var(--bad-bg); border-color: rgba(245, 140, 130, .5); color: var(--bad); }
.btn.danger:hover { background: #3A1A17; border-color: var(--bad); }
.btn.small { min-height: 34px; padding: 4px 12px; font-size: 13px; border-radius: 9px; }
.btn.big { min-height: 58px; padding: 10px 28px; font-size: 18px; border-radius: 14px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn.selected { background: var(--brand-soft); border-color: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
label { display: block; font-weight: 600; font-size: 13px; margin: 14px 0 6px; color: #D9DED4; }
input[type=text], input[type=password], input[type=number], input[type=file], input[type=date], input[type=search],
input[type=email], input[type=tel], input:not([type]), select, textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #0E110F; min-height: 46px;
  font-size: 16px;                 /* 16px or more: iPhones do not zoom in while typing */
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #6F786B; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 4px var(--glow-soft); }
textarea { min-height: 140px; resize: vertical; line-height: 1.6; font-size: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; margin: 8px 0; color: var(--ink); }
.check input { width: 19px; height: 19px; margin-top: 2px; flex: none; accent-color: var(--brand); }

/* ------------------------------------------------------------------ badges and notices */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--grey-bg); color: var(--muted); white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.sel { background: var(--brand-soft); color: var(--brand-ink); }
.badge.sel::before { display: none; }
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(127, 217, 160, .22); }
.badge.info { background: var(--info-bg); color: var(--info); border-color: rgba(156, 175, 136, .22); }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: rgba(242, 196, 107, .22); }
.badge.bad { background: var(--bad-bg); color: var(--bad); border-color: rgba(245, 140, 130, .22); }
.notice { --tone: var(--info); position: relative; padding: 12px 14px 12px 42px; border-radius: 12px; background: var(--info-bg); color: var(--tone); margin: 10px 0;
  border: 1px solid rgba(156, 175, 136, .2); line-height: 1.5; }
.notice::before { content: "i"; position: absolute; left: 13px; top: 12px; width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center;
  font: 700 12px/1 var(--sans); background: var(--tone); color: var(--bg); }   /* the notice's colour, the glyph cut out */
/* a word written like another but said differently, marked in the sentence to read */
.prompt mark { background: var(--warn-bg); color: var(--warn); border-radius: 5px; padding: 0 4px; box-shadow: inset 0 -2px 0 rgba(242, 196, 107, .5); }
.notice.ok { --tone: var(--ok); background: var(--ok-bg); border-color: rgba(127, 217, 160, .22); }
.notice.ok::before { content: "✓"; }
.notice.warn { --tone: var(--warn); background: var(--warn-bg); border-color: rgba(242, 196, 107, .22); }
.notice.warn::before { content: "!"; }
.notice.bad { --tone: var(--bad); background: var(--bad-bg); border-color: rgba(245, 140, 130, .25); }
.notice.bad::before { content: "!"; }

/* ------------------------------------------------------------------ lists and tables */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 16px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; background: var(--panel); transition: border-color .15s; }
.list > li:hover { border-color: var(--line-strong); }
.card { position: relative; display: block; text-decoration: none; color: inherit; background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 22px; overflow: hidden; box-shadow: var(--shadow);
  transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.card::after { content: "→"; position: absolute; right: 20px; top: 20px; color: var(--muted); font-size: 18px; transition: transform .2s var(--ease), color .2s; }
.card:hover { border-color: rgba(156, 175, 136, .55); color: inherit; transform: translateY(-2px);
  box-shadow: 0 18px 40px -22px var(--glow), 0 0 0 1px rgba(156, 175, 136, .12); }
.card:hover::after { transform: translateX(3px); color: var(--brand); }
.card h2 { color: var(--brand-soft); font-size: 20px; padding-right: 28px; }
.card p { color: var(--muted); margin-bottom: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, .015); }
th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--panel-2); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.stat { font: 600 34px/1.1 var(--display); letter-spacing: -.02em; color: var(--brand-soft); font-variant-numeric: tabular-nums; }
.bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--grey-bg); }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-soft)); }

/* ------------------------------------------------------------------ sign-in */
.login { max-width: 440px; margin: 56px auto; }
.login.panel { padding: 30px; box-shadow: 0 30px 80px -40px var(--glow), var(--shadow); }
.secret { font-family: var(--mono); font-size: 18px; letter-spacing: .08em; padding: 14px; background: #0E110F; border: 1px dashed var(--brand); border-radius: 12px; text-align: center; word-break: break-all; }
.code-input { font-family: var(--mono); font-size: 24px; letter-spacing: .3em; text-align: center; }
.temp-password { font-family: var(--mono); font-size: 20px; padding: 14px; background: #0E110F; border: 1px solid var(--brand); border-radius: 12px; text-align: center; }

/* ------------------------------------------------------------------ dialog and toast */
.overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(4, 6, 5, .72); display: flex; align-items: center; justify-content: center;
  padding: 16px; z-index: 50; animation: fade .2s ease both; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .overlay { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); background: rgba(4, 6, 5, .6); }
}
.dialog { background: linear-gradient(180deg, #181D19, var(--panel)); border: 1px solid var(--line-strong); border-radius: 20px; max-width: 600px; width: 100%;
  max-height: 90vh; overflow: auto; padding: 26px; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(156, 175, 136, .06);
  animation: pop .26s var(--ease) both; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 8px); background: rgba(242, 244, 239, .96); color: var(--bg); padding: 11px 18px;
  border-radius: 14px; font-weight: 500; opacity: 0; transition: opacity .2s, transform .25s var(--ease); pointer-events: none; z-index: 60; max-width: 90vw;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .8); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); color: #0B0D0C; }
.hidden { display: none !important; }

/* ------------------------------------------------------------------ recording */
.prompt { position: relative; font-size: 30px; line-height: 1.5; font-weight: 600; letter-spacing: -.01em; padding: 30px 28px; margin: 12px 0;
  background: radial-gradient(600px 200px at 50% 0%, rgba(156, 175, 136, .07), transparent 70%), #0D100E;
  border: 1px solid var(--line-strong); border-radius: 18px; transition: border-color .25s, box-shadow .25s; }
.prompt.small-prompt { font-size: 18px; padding: 12px 14px; border-radius: 12px; background: #0D100E; }
.prompt.live { border-color: rgba(245, 140, 130, .55); box-shadow: 0 0 0 4px rgba(245, 140, 130, .08), 0 20px 50px -30px rgba(245, 140, 130, .5); }
/* the input level, drawn as a row of segments like a studio meter */
.meter { position: relative; height: 12px; background: #0E110F; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin: 12px 0; }
.meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #6F8360, var(--brand) 55%, var(--brand-soft)); transition: width .05s linear;
  box-shadow: 0 0 14px var(--glow); }
.meter::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 7px, #0E110F 7px 9px); }
.meter.hot span { background: linear-gradient(90deg, var(--warn), var(--bad)); box-shadow: 0 0 14px rgba(245, 140, 130, .5); }
/* the Record button: a pulsing ring while recording */
.btn.rec { min-width: 170px; }
.btn.rec.is-recording { background: linear-gradient(180deg, #F7A097, var(--bad)); color: #1A0B09; animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(245, 140, 130, .55); } 70% { box-shadow: 0 0 0 16px rgba(245, 140, 130, 0); } 100% { box-shadow: 0 0 0 0 rgba(245, 140, 130, 0); } }
audio { width: 100%; margin: 10px 0; color-scheme: dark; border-radius: 999px; }
.score { display: flex; gap: 8px; flex-wrap: wrap; }
.score .btn { flex-direction: column; gap: 0; min-width: 88px; min-height: 64px; }
.score .btn strong { font: 600 24px/1.1 var(--display); }

/* ------------------------------------------------------------------ learning pages */
.lesson { max-width: 760px; }
.lesson p, .lesson li { line-height: 1.75; }
.lesson ul, .lesson ol { padding-left: 22px; }
.lesson .tip { border: 1px solid rgba(156, 175, 136, .22); padding: 10px 14px; background: var(--glow-soft); border-radius: 12px; }
.lesson .example { font-size: 19px; font-weight: 600; }

@media (max-width: 820px) {
  body { font-size: 15.5px; }
  h1 { font-size: 26px; }
  .prompt { font-size: 24px; padding: 22px 18px; }
  .grid.two, .grid.three { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; padding: 10px 14px; gap: 8px; }
  .brand-name { font-size: 17px; }
  /* every page in view on a phone (a menu that scrolls sideways hides pages people never find) */
  .nav { order: 3; flex-basis: 100%; flex-wrap: wrap; }
  .nav a { padding: 6px 10px; font-size: 14px; }
  .nav a::before { width: 15px; height: 15px; }
  /* a long menu (the console) stays at the top of the page instead of covering the screen while scrolling */
  .topbar { position: relative; }
  body.has-tabs .topbar { position: -webkit-sticky; position: sticky; }
  .login .btn.primary { width: 100%; }
  .main { padding: 18px 14px 48px; }
  .btn { min-height: 46px; }
  .btn.small { min-height: 38px; }
  .who .who-name { display: none; }
  .panel { padding: 18px; }
  .card::after { top: 18px; right: 16px; }

  /* five pages or fewer (a voice talent's site): a tab bar along the bottom, in thumb reach */
  .nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; order: 0; flex-wrap: nowrap; gap: 0; justify-content: space-around;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(14, 17, 15, .97); }
  @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .nav.tabs { background: rgba(14, 17, 15, .8); -webkit-backdrop-filter: saturate(140%) blur(18px); backdrop-filter: saturate(140%) blur(18px); }
  }
  .nav.tabs a { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 3px; padding: 7px 2px 5px; min-height: 54px; justify-content: center;
    font-size: 11px; font-weight: 600; letter-spacing: .01em; border-radius: 12px; }
  .nav.tabs a::before { width: 23px; height: 23px; }
  .nav.tabs a.active { background: transparent; box-shadow: none; color: var(--brand-soft); }
  .nav.tabs a.active::before { opacity: 1; filter: drop-shadow(0 0 8px var(--glow)); }
  .nav.tabs ~ .who { margin-left: auto; }
  body.has-tabs .main { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  body.has-tabs .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}

/* a bar that floats at the bottom while two or more items are ticked (owner's request, 2026-11-24) */
.float-bar { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 45; display: flex; align-items: center;
  gap: 12px; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 24px); padding: 10px 16px; background: rgba(22, 26, 23, .96);
  border: 1px solid rgba(156, 175, 136, .55); border-radius: 16px; box-shadow: 0 20px 50px -16px rgba(0, 0, 0, .85), 0 0 30px -12px var(--glow);
  animation: pop .22s var(--ease) both; }
.float-bar .float-count { color: var(--brand-soft); white-space: nowrap; font-weight: 600; }
.float-open .main { padding-bottom: 120px; }          /* the last items stay reachable above the bar */
@media (max-width: 820px) { .float-bar { left: 12px; right: 12px; bottom: 12px; transform: none; } }
.list input[type=checkbox] { width: 19px; height: 19px; margin-top: 4px; flex: none; accent-color: var(--brand); cursor: pointer; }

/* sign-up and phones */
.signup { max-width: 560px; }
.signup .part { margin: 30px 0 6px; padding-top: 18px; border-top: 1px solid var(--line); }
.choice { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.choice .check { margin: 6px 0; font-size: 16px; }
.join { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
details.tips { margin: 0 0 18px; }
details.tips summary { cursor: pointer; font-weight: 600; color: var(--brand-soft); }
details.tips ul { margin: 10px 0 0; padding-left: 20px; }
details.tips li { margin: 6px 0; }

/* Safari before iOS 14.5 (older iPhones) ignores gap in flex rows (app.js adds .no-gap): margins instead */
.no-gap .row > *, .no-gap .who > *, .no-gap .nav > *, .no-gap .brand > *, .no-gap .score > *,
.no-gap .choice > *, .no-gap .float-bar > * { margin: 0 8px 8px 0; }
.no-gap .topbar > * { margin-right: 12px; }
.no-gap .check > input { margin-right: 8px; }
.no-gap .nav a::before { margin-right: 6px; }
.no-gap .nav.tabs > * { margin: 0; }
.no-gap .nav.tabs a::before { margin: 0 0 3px; }
/* the Record page's progress stays one short row on a phone, so the sentence is on the first screen */
@media (max-width: 820px) {
  .grid.three.stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stats .panel { padding: 11px 12px; margin-bottom: 8px; }
  .stats .stat { font-size: 22px; }
  .stats .muted { font-size: 12px; line-height: 1.3; }
}
.no-gap .grid.three.stats > * { margin-right: 0; }

/* messages: the bell, the pop-up, the list */
.bell { position: relative; padding-left: 9px; padding-right: 9px; }
.bell-icon { display: inline-block; width: 17px; height: 17px; background: currentColor; -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.bell .count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 2px; border-radius: 999px; background: var(--brand);
  color: var(--brand-ink); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 12px var(--glow); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.popup-item { padding: 14px 0; border-top: 1px solid var(--line); }
.popup-item:first-child { border-top: 0; padding-top: 0; }
.popup-item h3 { margin: 0 0 6px; font-size: 17px; }
.popup-item.payment h3 { color: var(--ok); }
.messages li.unread { border-color: rgba(156, 175, 136, .45); box-shadow: inset 3px 0 0 var(--brand); }
.amount { font: 600 20px/1.2 var(--display); color: var(--ok); }

.role-place { margin: 6px 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.role-place .check { margin: 4px 0; }

/* contracts: the text to read and print, the box to sign in */
.contract-doc { max-width: 780px; line-height: 1.65; }
.contract-doc h1 { font-size: 1.6rem; margin: 0 0 8px; }
.contract-doc h2 { font-size: 1.12rem; margin: 22px 0 6px; }
.contract-doc ul { margin: 6px 0 10px; padding-left: 22px; }
.fingerprint { word-break: break-all; }
.contract-doc table.record { table-layout: fixed; width: 100%; }
.contract-doc table.record th { width: 34%; }
.contract-doc table.record td { overflow-wrap: anywhere; }
.sigpad { display: block; width: 100%; max-width: 600px; height: auto; aspect-ratio: 3 / 1; background: #fff; border: 1px solid var(--line-strong);
  border-radius: 12px; touch-action: none; }
.sig-img { width: 180px; max-width: 100%; height: auto; background: #fff; border-radius: 6px; }

/* people who ask their phone for less motion get none */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  :root { --bg: #fff; --panel: #fff; --panel-2: #fff; --soft: #fff; --ink: #000; --muted: #333; --line: #999; }
  body { background: #fff; color: #000; }
  .topbar, .toast, .no-print, .overlay, .nav.tabs, .tabbar, .check-actions { display: none !important; }
  .main { padding: 0; max-width: none; }
  .main > * { animation: none; }
  .panel, .card { box-shadow: none; background: #fff; }
  .contract-doc { max-width: none; color: #000; }
  .contract-doc h2 { break-after: avoid; }
  table, tr, img { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}

/* ------------------------------------------------------------------ icons (generated: line icons as CSS masks) */
:root {
  --i-home: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-7 9 7v8.5a1.5 1.5 0 0 1-1.5 1.5H15v-6H9v6H4.5A1.5 1.5 0 0 1 3 19.5z'/%3E%3C/svg%3E");
  --i-learn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5V5a2 2 0 0 1 2-2h14v15H6.5A2.5 2.5 0 0 0 4 20.5 2.5 2.5 0 0 0 6.5 23H20v-5M8 7h8'/%3E%3C/svg%3E");
  --i-record: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5a3.5 3.5 0 0 1 3.5 3.5v6a3.5 3.5 0 0 1-7 0V6A3.5 3.5 0 0 1 12 2.5zM5 11a7 7 0 0 0 14 0M12 18v3.5'/%3E%3C/svg%3E");
  --i-file: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2.5H6.5A1.5 1.5 0 0 0 5 4v16a1.5 1.5 0 0 0 1.5 1.5h11A1.5 1.5 0 0 0 19 20V7.5zM14 2.5v5h5M8.5 13h7M8.5 17h4'/%3E%3C/svg%3E");
  --i-pay: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7.5h16.5A1.5 1.5 0 0 1 21 9v10a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 3 19zM3 7.5 15.5 3v4.5M16.5 14h1.5'/%3E%3C/svg%3E");
  --i-bell: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9a6 6 0 0 1 12 0c0 6.5 3 8 3 8H3s3-1.5 3-8M10 20.5a2 2 0 0 0 4 0'/%3E%3C/svg%3E");
  --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM8 12.3l2.8 2.8L16.2 9.5'/%3E%3C/svg%3E");
  --i-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l2.7 5.6 6.1.9-4.4 4.3 1 6.1L12 17l-5.4 2.9 1-6.1-4.4-4.3 6.1-.9z'/%3E%3C/svg%3E");
  --i-eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12zM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z'/%3E%3C/svg%3E");
  --i-list: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11M4.5 6h.01M4.5 12h.01M4.5 18h.01'/%3E%3C/svg%3E");
  --i-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10v4M8 7v10M12 4v16M16 7v10M20 10v4'/%3E%3C/svg%3E");
  --i-users: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM2 21a7 7 0 0 1 14 0M16 3.5a4 4 0 0 1 0 7.6M22 21a7 7 0 0 0-4.5-6.5'/%3E%3C/svg%3E");
  --i-text: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h10'/%3E%3C/svg%3E");
  --i-flask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3h6M10 3v6l-5.4 9.2A2 2 0 0 0 6.3 21h11.4a2 2 0 0 0 1.7-2.8L14 9V3M7.5 15h9'/%3E%3C/svg%3E");
  --i-dot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4z'/%3E%3C/svg%3E");
  --i-more: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 4h3A1.5 1.5 0 0 1 10 5.5v3A1.5 1.5 0 0 1 8.5 10h-3A1.5 1.5 0 0 1 4 8.5v-3A1.5 1.5 0 0 1 5.5 4zM15.5 4h3A1.5 1.5 0 0 1 20 5.5v3a1.5 1.5 0 0 1-1.5 1.5h-3A1.5 1.5 0 0 1 14 8.5v-3A1.5 1.5 0 0 1 15.5 4zM5.5 14h3a1.5 1.5 0 0 1 1.5 1.5v3A1.5 1.5 0 0 1 8.5 20h-3A1.5 1.5 0 0 1 4 18.5v-3A1.5 1.5 0 0 1 5.5 14zM15.5 14h3a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-3a1.5 1.5 0 0 1-1.5-1.5v-3a1.5 1.5 0 0 1 1.5-1.5z'/%3E%3C/svg%3E");
  --i-menu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h16'/%3E%3C/svg%3E");
  --i-translate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l6 6M4 14l6-6 2-3M2 5h12M7 2h1M22 22l-5-10-5 10M14 18h6'/%3E%3C/svg%3E");
  --i-smile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM8.5 14.5s1.3 2 3.5 2 3.5-2 3.5-2M9 9.5h.01M15 9.5h.01'/%3E%3C/svg%3E");
  --i-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 12a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9zM4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E");
}
.nav a[href="#/"]::before, .tabbar a[href="#/"]::before, .menu-list a[href="#/"]::before { -webkit-mask-image: var(--i-home); mask-image: var(--i-home); }
.nav a[href="#/learn"]::before, .tabbar a[href="#/learn"]::before, .menu-list a[href="#/learn"]::before { -webkit-mask-image: var(--i-learn); mask-image: var(--i-learn); }
.nav a[href="#/record"]::before, .tabbar a[href="#/record"]::before, .menu-list a[href="#/record"]::before { -webkit-mask-image: var(--i-record); mask-image: var(--i-record); }
.nav a[href="#/contract"]::before, .tabbar a[href="#/contract"]::before, .menu-list a[href="#/contract"]::before { -webkit-mask-image: var(--i-file); mask-image: var(--i-file); }
.nav a[href="#/payments"]::before, .tabbar a[href="#/payments"]::before, .menu-list a[href="#/payments"]::before { -webkit-mask-image: var(--i-pay); mask-image: var(--i-pay); }
.nav a[href="#/messages"]::before, .tabbar a[href="#/messages"]::before, .menu-list a[href="#/messages"]::before { -webkit-mask-image: var(--i-bell); mask-image: var(--i-bell); }
.nav a[href="#/check"]::before, .tabbar a[href="#/check"]::before, .menu-list a[href="#/check"]::before { -webkit-mask-image: var(--i-check); mask-image: var(--i-check); }
.nav a[href="#/rate"]::before, .tabbar a[href="#/rate"]::before, .menu-list a[href="#/rate"]::before { -webkit-mask-image: var(--i-star); mask-image: var(--i-star); }
.nav a[href="#/review"]::before, .tabbar a[href="#/review"]::before, .menu-list a[href="#/review"]::before { -webkit-mask-image: var(--i-eye); mask-image: var(--i-eye); }
.nav a[href="#/translate"]::before, .tabbar a[href="#/translate"]::before, .menu-list a[href="#/translate"]::before { -webkit-mask-image: var(--i-translate); mask-image: var(--i-translate); }
.nav a[href="#/work"]::before, .tabbar a[href="#/work"]::before, .menu-list a[href="#/work"]::before { -webkit-mask-image: var(--i-list); mask-image: var(--i-list); }
.nav a[href="#/recordings"]::before, .tabbar a[href="#/recordings"]::before, .menu-list a[href="#/recordings"]::before { -webkit-mask-image: var(--i-wave); mask-image: var(--i-wave); }
.nav a[href="#/voices"]::before, .tabbar a[href="#/voices"]::before, .menu-list a[href="#/voices"]::before { -webkit-mask-image: var(--i-users); mask-image: var(--i-users); }
.nav a[href="#/contracts"]::before, .tabbar a[href="#/contracts"]::before, .menu-list a[href="#/contracts"]::before { -webkit-mask-image: var(--i-file); mask-image: var(--i-file); }
.nav a[href="#/script"]::before, .tabbar a[href="#/script"]::before, .menu-list a[href="#/script"]::before { -webkit-mask-image: var(--i-text); mask-image: var(--i-text); }
.nav a[href="#/tests"]::before, .tabbar a[href="#/tests"]::before, .menu-list a[href="#/tests"]::before { -webkit-mask-image: var(--i-flask); mask-image: var(--i-flask); }
.nav a[href="#/people"]::before, .tabbar a[href="#/people"]::before, .menu-list a[href="#/people"]::before { -webkit-mask-image: var(--i-users); mask-image: var(--i-users); }
.bell-icon { -webkit-mask-image: var(--i-bell); mask-image: var(--i-bell); }
.tabbar .more::before { -webkit-mask-image: var(--i-more); mask-image: var(--i-more); }

/* ------------------------------------------------------------------ a long menu on a phone (owner, 2026-11-29)
   The console's 14 pages filled half a phone's screen: on a phone the top bar is one row (Menu),
   and a tab bar along the bottom holds the four pages used most and More, which opens them all. */
.tabbar, .menu-btn { display: none; }
.nav-count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 2px; border-radius: 999px; background: var(--bad);
  color: #1A0B09; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; letter-spacing: 0; }
.menu-icon { display: inline-block; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: var(--i-menu) center / contain no-repeat; mask: var(--i-menu) center / contain no-repeat; }
.menu-sheet .menu-group { margin: 0 0 16px; }
.menu-sheet h3 { margin: 0 0 8px; font: 600 11.5px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.menu-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu-list a { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 12px; border-radius: 12px; min-width: 0;
  background: var(--soft); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; }
.menu-list a > span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-list a::before { width: 20px; height: 20px; color: var(--brand); }
.menu-list a.active { border-color: rgba(156, 175, 136, .45); background: var(--glow-soft); color: var(--brand-soft); }
.menu-list a .nav-count { margin-left: auto; }
.menu-foot .btn { flex: 1 1 auto; }

/* checking: Play, Reject and Approve together */
.check-actions, .check-main, .check-minor { display: flex; flex-wrap: wrap; gap: 10px; }
.check-actions { margin-top: 14px; }
.check-auto { margin-top: 12px; }

@media (max-width: 820px) {
  body.menu-mode .topbar { position: -webkit-sticky; position: sticky; flex-wrap: nowrap; }
  body.menu-mode .topbar .nav { display: none; }
  body.menu-mode .who > * { display: none; }
  body.menu-mode .who > .menu-btn, body.menu-mode .who > .bell { display: inline-flex; }
  .menu-btn { gap: 7px; }
  body.menu-mode .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; justify-content: space-around;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(14, 17, 15, .97); }
  @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    body.menu-mode .tabbar { background: rgba(14, 17, 15, .8); -webkit-backdrop-filter: saturate(140%) blur(18px); backdrop-filter: saturate(140%) blur(18px); }
  }
  .tabbar a, .tabbar .more { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; min-height: 54px; padding: 7px 2px 5px; border: 0; border-radius: 12px; background: none; color: var(--muted);
    font: 600 11px/1.2 var(--sans); letter-spacing: .01em; text-decoration: none; cursor: pointer; -webkit-appearance: none; appearance: none; }
  .tabbar a::before, .tabbar .more::before { width: 23px; height: 23px; }
  .tabbar .active { color: var(--brand-soft); }
  .tabbar .active::before { opacity: 1; filter: drop-shadow(0 0 8px var(--glow)); }
  .tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar .nav-count { position: absolute; top: 2px; left: 50%; margin-left: 5px; }
  .tabbar .more.waiting::after { content: ""; position: absolute; top: 6px; left: 50%; margin-left: 8px; width: 9px; height: 9px;
    border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--bg); }
  body.menu-mode .main { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  body.menu-mode .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  body.menu-mode .float-bar, body.has-tabs .float-bar { bottom: calc(76px + env(safe-area-inset-bottom)); }

  /* dialogs rise from the bottom, in thumb reach, with full-width buttons */
  .overlay { align-items: flex-end; padding: 0; }
  .dialog { max-width: none; max-height: 92vh; border-radius: 22px 22px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
    animation: sheet .3s var(--ease) both; }
  .dialog > .row:last-child { justify-content: stretch !important; }
  .dialog > .row:last-child > .btn { flex: 1 1 0; }

  /* checking: Play, Reject and Approve in a bar along the bottom, above the tabs */
  .check-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; margin: 0; flex-direction: column-reverse; gap: 4px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #0E110F; border-top: 1px solid var(--line);
    box-shadow: 0 -18px 40px -24px rgba(0, 0, 0, .9); }
  body.menu-mode .check-actions, body.has-tabs .check-actions { bottom: calc(66px + env(safe-area-inset-bottom)); padding-bottom: 10px; }
  .check-main { flex-wrap: nowrap; gap: 8px; }
  .check-main .btn { flex: 1 1 0; min-height: 56px; padding: 0 8px; }
  .check-main .btn.ok { flex: 1.5 1 0; }
  /* Fix the text and Skip: a quieter row above, still in reach */
  .check-minor { justify-content: center; gap: 6px; }
  .check-minor .btn { min-height: 34px; padding: 0 16px; font-size: 13.5px; background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
  body.checking .main { padding-bottom: calc(210px + env(safe-area-inset-bottom)); }
  body.checking .toast { bottom: calc(190px + env(safe-area-inset-bottom)); }
}
@keyframes sheet { from { opacity: 0; transform: translateY(40px); } }
@media (max-width: 370px) { body.menu-mode .brand-tag { display: none; } }
.no-gap .tabbar > * { margin: 0; }
.no-gap .tabbar a::before, .no-gap .tabbar .more::before { margin: 0 0 3px; }
.no-gap .menu-list a::before, .no-gap .menu-btn > * { margin-right: 8px; }
.no-gap .check-main > *, .no-gap .check-minor > * { margin: 0 8px 0 0; }

/* ------------------------------------------------------------------ the Record page on a phone (owner, 2026-11-29)
   The counters are one line, and the actions a bar at the bottom above the tabs: the last message
   (why a recording was not saved stays there until Record is tapped), the level, the main buttons,
   then Skip and Ask for a review. */
.rec-progress { display: none; }
.rec-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.rec-actions > div:empty { display: none; }
.rec-actions .notice { margin: 0; }
.rec-main, .rec-minor { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rec-meter { align-items: center; flex-wrap: nowrap; }
.rec-meter .meter { margin: 0; }
.rec-refused { font-size: 15.5px; }

@media (max-width: 820px) {
  .rec-stats { display: none; }
  .rec-progress { display: block; margin: -10px 0 14px; font-size: 14px; }
  .rec-progress strong { color: var(--brand-soft); font-weight: 600; }
  .rec-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; margin: 0; gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #0E110F; border-top: 1px solid var(--line);
    box-shadow: 0 -18px 40px -24px rgba(0, 0, 0, .9); }
  body.has-tabs .rec-actions, body.menu-mode .rec-actions { bottom: calc(66px + env(safe-area-inset-bottom)); padding-bottom: 10px; }
  .rec-actions .notice { padding-top: 10px; padding-bottom: 10px; line-height: 1.4; }
  .rec-main { flex-wrap: nowrap; gap: 8px; }
  .rec-main .btn { flex: 1 1 0; min-width: 0; min-height: 58px; padding: 0 10px; }
  .rec-main .btn.ok { flex: 1.5 1 0; }
  .rec-minor { justify-content: center; flex-wrap: nowrap; gap: 6px; }
  .rec-minor .btn { min-height: 34px; padding: 0 14px; font-size: 13.5px; background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
  .rec-minor select { max-width: 42%; min-height: 34px; padding-top: 4px; padding-bottom: 4px; font-size: 13px; }
  .rec-meter { gap: 8px; }
  body.recording-page .main { padding-bottom: calc(270px + env(safe-area-inset-bottom)); }
  body.recording-page .toast { bottom: calc(250px + env(safe-area-inset-bottom)); }
}
.no-gap .rec-actions > * { margin-bottom: 8px; }
.no-gap .rec-main > *, .no-gap .rec-minor > *, .no-gap .rec-meter > * { margin: 0 8px 0 0; }

/* ------------------------------------------------------------------ the other pages on a phone (owner, 2026-11-29)
   A table of three columns or more (app.js marks it .as-cards and labels each cell with its
   column) becomes one card per row: the first cell is the card's title, the others a label on the
   left and the value on the right. Forms: the main button is full width. */
@media (max-width: 640px) {
  .cards-wrap { border: 0; border-radius: 0; overflow: visible; }
  .panel.cards-wrap { background: none; padding: 0; box-shadow: none; }
  table.as-cards, table.as-cards tbody, table.as-cards tr, table.as-cards td { display: block; width: auto; }
  table.as-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.as-cards tr { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 14px;
    padding: 12px 14px; margin: 0 0 10px; box-shadow: var(--shadow); }
  table.as-cards td { position: relative; min-height: 30px; padding: 6px 0 6px 38%; border: 0; overflow-wrap: anywhere; }
  table.as-cards td::before { content: attr(data-label); position: absolute; left: 0; top: 9px; width: 34%; color: var(--muted);
    font-size: 11px; font-weight: 600; line-height: 1.3; text-transform: uppercase; letter-spacing: .06em; }
  table.as-cards td:first-child { padding: 0 0 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 600; }
  table.as-cards td:first-child::before, table.as-cards td[data-label=""]::before, table.as-cards td[colspan]::before { display: none; }
  table.as-cards td[data-label=""], table.as-cards td[colspan] { padding-left: 0; }
  table.as-cards td:empty { display: none; }
  table.as-cards td input, table.as-cards td select { width: 100%; max-width: none !important; }
  table.as-cards .badge { white-space: normal; max-width: 100%; }        /* a long status wraps inside the card */

  form.stack > .row:last-child > .btn.primary { flex: 1 1 100%; }
  .sig-help .btn { flex: 1 1 100%; }
}

/* answers to messages that had to be confirmed (owner, 2026-11-29) */
.answers { margin-top: 10px; }
.answer { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.answer.new { border-color: rgba(156, 175, 136, .55); box-shadow: 0 0 0 3px var(--glow-soft); }

/* the full screen (viewport-fit=cover, for the installed app): keep clear of a notch on a phone held sideways */
@supports (padding: max(0px)) {
  .topbar { padding-left: max(22px, env(safe-area-inset-left)); padding-right: max(22px, env(safe-area-inset-right)); }
  .main { padding-left: max(22px, env(safe-area-inset-left)); padding-right: max(22px, env(safe-area-inset-right)); }
  @media (max-width: 820px) {
    .topbar { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
    .main { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  }
}
/* the install guide on Home */
.install-card ol { margin: 8px 0 12px; padding-left: 20px; }
.install-card li { margin: 4px 0; }

/* the clean-hour bonus on the Record page */
.rec-bonus { margin: -6px 0 14px; color: var(--brand-soft); }
.rec-bonus strong { color: var(--ok); }
@media (max-width: 820px) { .rec-bonus { margin: -8px 0 12px; font-size: 13px; } }

/* ------------------------------------------------------------------ earnings in view, floating notes (owner, 2026-11-30) */
.earn-chip { background: var(--ok-bg); border-color: rgba(127, 217, 160, .55); color: var(--ok); font-weight: 700;
  font-variant-numeric: tabular-nums; box-shadow: 0 0 16px -6px rgba(127, 217, 160, .6); }
.earn-chip:hover { background: #15301F; color: var(--ok); }
/* a note that floats above the page: recordings to correct, or a full hour to ask to be paid for */
.float-note { position: fixed; right: 24px; bottom: 24px; z-index: 26; max-width: 380px; display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line-strong); background: rgba(22, 26, 23, .97);
  box-shadow: 0 20px 50px -16px rgba(0, 0, 0, .85); animation: pop .26s var(--ease) both; line-height: 1.45; }
.float-note.bad { border-color: rgba(245, 140, 130, .6); color: #F8C3BD; }
.float-note.ok { border-color: rgba(127, 217, 160, .6); color: #BFEFD0; }
.float-note .row { justify-content: flex-end; }
.ask-panel .meter { margin-top: 4px; }
@media (max-width: 820px) {
  .float-note { left: 12px; right: 12px; bottom: 16px; max-width: none; }
  body.has-tabs .float-note, body.menu-mode .float-note { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
/* the earnings chip needs the top bar's room on a small phone: the logo stays, its words go */
@media (max-width: 480px) {
  body.has-earn .brand-name, body.has-earn .brand-tag { display: none; }
}

/* Contracts: those signed and waiting for the countersignature come first (owner, 2026-11-30) */
.waiting-panel { border-color: rgba(127, 217, 160, .5); box-shadow: 0 0 0 3px var(--glow-soft), var(--shadow); margin-bottom: 18px; }

/* Recordings: one person's work at a time (owner, 2026-11-30) */
.person-chips { margin: 0 0 12px; }
.person-chips .btn { gap: 6px; }

/* ------------------------------------------------------------------ emotions (owner, 2026-12-01: "our best weapon") */
.nav a[href="#/emotions"]::before, .tabbar a[href="#/emotions"]::before, .menu-list a[href="#/emotions"]::before {
  -webkit-mask-image: var(--i-smile); mask-image: var(--i-smile); }
/* each emotion's colour: the banner on the sentence, the cards */
.emo-neutral { --emo: var(--muted); --emo-bg: var(--grey-bg); }
.emo-happy { --emo: var(--ok); --emo-bg: var(--ok-bg); }
.emo-laughing { --emo: #9EE6B0; --emo-bg: #10261A; }
.emo-sad { --emo: #9DB8E8; --emo-bg: #141B2A; }
.emo-crying { --emo: #C3A8F0; --emo-bg: #1D1529; }
.emo-fear { --emo: var(--warn); --emo-bg: var(--warn-bg); }
.emo-angry { --emo: var(--bad); --emo-bg: var(--bad-bg); }
.emo-whisper { --emo: #E6D9A8; --emo-bg: #23200F; }
.emo-banner { margin: 10px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--emo-bg); color: var(--emo);
  border: 1px solid color-mix(in srgb, var(--emo) 45%, transparent); }
.emo-banner .emo-name { display: flex; align-items: baseline; gap: 8px; }
.emo-banner .emo-name strong { font: 700 22px/1.2 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.emo-banner .small { color: inherit; opacity: .9; }
.emo-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 0 14px; padding: 10px 14px;
  border-radius: 14px; border: 1px solid rgba(156, 175, 136, .35); background: var(--glow-soft); }
.emo-now { display: flex; flex-direction: column; line-height: 1.3; }
.emo-now strong { font: 700 18px/1.25 var(--display); color: var(--brand-soft); }
.emo-choice { display: block; padding: 12px 14px; margin: 8px 0; border-radius: 12px; border: 1px solid var(--line); background: var(--soft);
  color: var(--ink); text-decoration: none; }
.emo-choice.selected { border-color: rgba(156, 175, 136, .6); background: var(--glow-soft); }
.emo-card { border-top: 3px solid var(--emo); }
@supports not (color: color-mix(in srgb, red 50%, transparent)) { .emo-banner { border-color: var(--line-strong); } }

/* an emotion named on a recording, in its colour; cards and cells that open those recordings */
.emo-tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--emo); background: var(--emo-bg); border: 1px solid var(--line-strong); }
a.emo-card { display: block; color: var(--ink); text-decoration: none; }
a.emo-card:hover { border-color: var(--emo); }
a.emo-cell { display: block; color: var(--ink); text-decoration: none; border-radius: 8px; }
a.emo-cell:hover { background: var(--soft); }

/* Check: each emotion's chip in its colour (owner, 2026-12-01) */
.emotion-chips .emo-chip { color: var(--emo); border-color: var(--line-strong); }
.emotion-chips .emo-chip.selected { background: var(--emo-bg); border-color: var(--emo); color: var(--emo); }

/* choosing what a voice talent records (owner, 2026-12-01) */
.work-dialog h3 { margin: 14px 0 6px; font-size: 14px; }
.work-pick { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; margin: 6px 0; border-radius: 12px;
  border: 1px solid var(--line); background: var(--soft); cursor: pointer; }
.work-pick input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.work-pick[class*="emo-"] strong { color: var(--emo); }
.work-pick:has(input:checked) { border-color: var(--brand-soft); background: var(--glow-soft); }
.work-dialog textarea { min-height: 64px; }

/* Check: a choice with nothing waiting stays visible, quieter (owner, 2026-12-01: see every kind) */
.person-chips .btn.empty:not(.selected) { opacity: .55; }
