/* ==========================================================================
   App screens + iPhone frame.
   Screens are drawn at 430×932 points (iPhone Pro Max) and scaled with
   `zoom`, so the same markup renders the site mockups and the 1290×2796
   App Store screenshots (zoom: 3). Colours are the app's dark tokens
   (cutcrew-app/src/ui/tokens.ts) and stay dark in both site themes.
   ========================================================================== */

/* ---- iPhone frame ------------------------------------------------------- */
.device {
  --z: .7;
  zoom: var(--z);
  position: relative;
  flex: none;
  width: 458px;
  height: 960px;
  padding: 14px;
  border-radius: 72px;
  background: #0b0d0f;
  box-shadow:
    inset 0 0 0 1.5px #4a5058,
    inset 0 0 0 6px #16191c,
    0 1px 0 0 rgba(255,255,255,.04),
    0 60px 120px -40px rgba(16,19,22,.55),
    0 30px 60px -30px rgba(16,19,22,.45);
}
/* side buttons */
.device::before, .device::after {
  content: "";
  position: absolute;
  width: 4px;
  border-radius: 2px;
  background: #2b3036;
}
.device::before { left: -3px; top: 200px; height: 64px; box-shadow: 0 90px 0 #2b3036; }
.device::after { right: -3px; top: 250px; height: 104px; }
.device-screen {
  position: relative;
  width: 430px;
  height: 932px;
  overflow: hidden;
  border-radius: 58px;
  background: #101316;
  isolation: isolate;
}
.device-island {
  position: absolute;
  z-index: 20;
  top: 11px;
  left: 50%;
  width: 126px;
  height: 37px;
  margin-left: -63px;
  border-radius: 20px;
  background: #000;
}
/* A stack of screens that cross-fade (sticky story phone). */
.device-screen.stack > .screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
}
.device-screen.stack > .screen.is-active { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: no-preference) {
  .device-screen.stack > .screen {
    transition: opacity .55s cubic-bezier(.2,.7,.2,1), visibility 0s linear .55s, transform .55s cubic-bezier(.2,.7,.2,1);
    transform: scale(.985);
  }
  .device-screen.stack > .screen.is-active {
    transition: opacity .55s cubic-bezier(.2,.7,.2,1), visibility 0s, transform .55s cubic-bezier(.2,.7,.2,1);
    transform: none;
  }
}

/* ---- Screen base -------------------------------------------------------- */
.screen {
  --ground: #101316; --surface: #171B1F; --surface2: #1E2328; --ink: #EFEDE8;
  --muted: #A3AAB2; --faint: #737A82; --line: #262C32; --accent: #E9634A;
  --protein: #E9634A; --carbs: #DDA03A; --fat: #5F8A99; --water: #4A8AC0;
  --good: #71B583; --on-accent: #101316;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 430px;
  height: 932px;
  overflow: hidden;
  background: var(--ground);
  color: var(--ink);
  font: 400 15px/22px "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  letter-spacing: 0;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
.screen * { box-sizing: border-box; }
.screen .ic {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.screen .ic-s { width: 16px; height: 16px; }
.screen .ic-l { width: 24px; height: 24px; }

/* status bar */
.sb {
  flex: none; height: 54px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 34px 0 50px;
  font: 600 17px/1 "IBM Plex Sans", system-ui, sans-serif;
  letter-spacing: -.01em;
}
.sb-icons { display: flex; align-items: center; gap: 7px; }
.sb-icons svg { display: block; fill: currentColor; }

/* nav header */
.hdr {
  flex: none;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: 6px 20px 14px;
}
.hdr-sub { font-size: 13px; line-height: 18px; color: var(--muted); }
.hdr-title { font: 800 32px/36px Archivo, system-ui, sans-serif; letter-spacing: -.8px; }
.hdr-actions { display: flex; align-items: center; gap: 16px; padding-bottom: 6px; color: var(--muted); }
.hdr-actions .off { color: var(--line); }

.scroll {
  flex: 1; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; gap: 12px;
  padding: 0 16px 16px;
}

/* tab bar */
.tabbar {
  flex: none; position: relative;
  height: 86px;
  display: grid; grid-template-columns: repeat(6, 1fr);
  padding: 8px 4px 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--faint);
  font: 500 10px/12px "IBM Plex Sans", system-ui, sans-serif;
}
.tab .ic { width: 25px; height: 25px; stroke-width: 1.7; }
.screen[data-tab="today"] .tab[data-t="today"],
.screen[data-tab="meals"] .tab[data-t="meals"],
.screen[data-tab="train"] .tab[data-t="train"],
.screen[data-tab="trends"] .tab[data-t="trends"],
.screen[data-tab="cookbook"] .tab[data-t="cookbook"],
.screen[data-tab="crew"] .tab[data-t="crew"] { color: var(--accent); }
.home-ind {
  position: absolute; z-index: 5; left: 50%; bottom: 8px;
  width: 144px; height: 5px; margin-left: -72px;
  border-radius: 3px; background: var(--ink);
}

/* primitives */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.lbl {
  font: 600 10.5px/14px "IBM Plex Sans", system-ui, sans-serif;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint);
}
.num { font-family: Archivo, system-ui, sans-serif; font-weight: 800; letter-spacing: -.025em; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.mu { color: var(--muted); }
.fa { color: var(--faint); }
.gd { color: var(--good); }
.ac { color: var(--accent); }
.sm { font-size: 13px; line-height: 18px; }
.xs { font-size: 11.5px; line-height: 15px; }
.b { font-weight: 600; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row-l { display: flex; align-items: center; gap: 8px; }
.stack-4 { display: flex; flex-direction: column; gap: 4px; }
.cp { color: var(--protein); } .cc { color: var(--carbs); } .cf { color: var(--fat); }

.bar { height: 6px; border-radius: 3px; background: var(--surface2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: var(--c, var(--accent)); }
.bar.thin { height: 4px; }

.chip {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 9px;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 11.5px/1 "IBM Plex Sans", system-ui, sans-serif;
  white-space: nowrap;
}
.chip .ic { width: 12px; height: 12px; stroke-width: 2.4; }
.chip-good { background: rgba(113,181,131,.15); color: var(--good); }
.chip-due { background: var(--accent); color: var(--on-accent); }
.chip-late { border-color: var(--carbs); color: var(--carbs); }
.chip-up { border-color: var(--line); color: var(--muted); }
.chip-maybe { border: 1px dashed var(--faint); color: var(--muted); }
.chip-soft { background: var(--surface2); color: var(--muted); }
.chip-warn { background: rgba(221,160,58,.13); color: var(--carbs); }

.btn-s {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; border-radius: 13px;
  font: 600 15px/1 "IBM Plex Sans", system-ui, sans-serif;
}
.btn-acc { background: var(--accent); color: var(--on-accent); }
.btn-sec { background: var(--surface2); color: var(--ink); border: 1px solid var(--line); }
.btn-mini { height: 32px; padding: 0 14px; border-radius: 10px; font-size: 13px; }

.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--c); color: #fff;
  font: 700 13px/1 Archivo, system-ui, sans-serif;
}

/* ---- Today ------------------------------------------------------------ */
.board-top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.big { display: flex; align-items: baseline; gap: 6px; margin: 2px 0 6px; }
.big .num { font-size: 40px; line-height: 44px; }
.big .of { font-size: 14px; color: var(--muted); }
.macros { display: grid; gap: 9px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.macro { display: grid; grid-template-columns: 58px 1fr 76px; align-items: center; gap: 10px; font-size: 13px; }
.macro .mono { text-align: right; font-size: 12.5px; color: var(--muted); }
.quick { display: flex; gap: 8px; margin-top: 12px; }
.quick .chip { height: 30px; padding: 0 12px; font-size: 12.5px; background: var(--surface2); color: var(--ink); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { padding: 12px 14px; }
.tile .num { display: block; font-size: 26px; line-height: 30px; margin: 4px 0 2px; }
.tile .num small { font: 500 13px/1 "IBM Plex Sans", system-ui, sans-serif; color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.week-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-top: 12px; align-items: end; }
.wk { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: var(--faint); }
.wk i { display: block; width: 100%; max-width: 26px; border-radius: 5px; background: var(--protein); opacity: .85; }
.wk.low i { background: var(--surface2); box-shadow: inset 0 0 0 1px var(--line); opacity: 1; }
.wk.today { color: var(--ink); font-weight: 600; }

/* ---- Sheet (Log food) ------------------------------------------------- */
.screen.sheet-bg { background: #070809; }
.sheet {
  flex: 1; min-height: 0; position: relative;
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 6px; padding: 8px 16px 0;
  border-radius: 14px 14px 0 0;
  background: var(--ground);
}
.grabber { width: 38px; height: 5px; margin: 0 auto 2px; border-radius: 3px; background: var(--line); }
.sheet-hd { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 2px 4px 4px; }
.sheet-hd .t { font: 700 17px/22px Archivo, system-ui, sans-serif; letter-spacing: -.35px; }
.typed { font-size: 16px; line-height: 24px; }
.caret { display: inline-block; width: 2px; height: 20px; margin-left: 1px; vertical-align: -4px; background: var(--accent); }
.hint { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.items { padding: 0; }
.item { display: grid; grid-template-columns: 1fr auto 18px; gap: 4px 12px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item .x { color: var(--faint); grid-row: span 2; }
.macro-line { display: flex; gap: 10px; font-size: 12px; }
.split { display: flex; height: 8px; gap: 2px; border-radius: 4px; overflow: hidden; margin: 10px 0 8px; }
.split i { display: block; height: 100%; }
.sheet-cta { margin-top: auto; padding-bottom: 34px; display: grid; gap: 10px; }

/* ---- Meals ------------------------------------------------------------ */
.slot { display: grid; gap: 6px; }
.slot .name { font: 600 16px/21px "IBM Plex Sans", system-ui, sans-serif; }
.slot.due { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(233,99,74,.12); }
.slot.done .name { color: var(--muted); }
.proj { background: var(--surface2); }
.proj .num { font-size: 22px; line-height: 28px; }

/* ---- Train ------------------------------------------------------------ */
.ex { display: grid; grid-template-columns: 16px 1fr; gap: 0 10px; padding: 14px 16px 14px 10px; }
.ex .grip { color: var(--faint); margin-top: 2px; }
.ex .name { font: 600 16px/21px "IBM Plex Sans", system-ui, sans-serif; }
.sets { display: grid; gap: 6px; margin-top: 10px; }
.set { display: grid; grid-template-columns: 52px 1fr 1fr 32px; align-items: center; height: 34px; padding: 0 10px; border-radius: 9px; background: var(--surface2); font-size: 14px; }
.set.hd { height: 16px; background: none; }
.set .ok { color: var(--good); justify-self: end; }
.set.active { background: transparent; box-shadow: inset 0 0 0 1.5px var(--accent); }
.set .field { color: var(--faint); }
.note { margin-top: 8px; padding: 8px 10px; border-left: 2px solid var(--carbs); background: rgba(221,160,58,.07); border-radius: 0 8px 8px 0; font-size: 12.5px; line-height: 17px; color: var(--muted); }
.dots { display: flex; gap: 5px; margin-top: 8px; }
.dots i { width: 26px; height: 6px; border-radius: 3px; background: var(--surface2); }

/* ---- Trends ----------------------------------------------------------- */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border-radius: 10px; background: var(--surface2); font: 600 13px/30px "IBM Plex Sans", system-ui, sans-serif; text-align: center; color: var(--muted); }
.seg .on { background: var(--surface); color: var(--ink); border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.chart { display: block; width: 100%; height: auto; margin-top: 10px; overflow: visible; }
.chart text { font: 500 10px "IBM Plex Mono", ui-monospace, monospace; fill: var(--faint); }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.tbl { display: grid; grid-template-columns: 1.1fr 1fr .8fr 1fr .9fr; row-gap: 0; font-size: 13px; }
.tbl > span { padding: 7px 0; border-top: 1px solid var(--line); }
.tbl > span:nth-child(5n+2), .tbl > span:nth-child(5n+3), .tbl > span:nth-child(5n+4), .tbl > span:nth-child(5n+5) { text-align: right; }
.tbl > .th { border-top: 0; padding-top: 8px; }

/* ---- Recipe ----------------------------------------------------------- */
.navback { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 4px 14px 2px 10px; color: var(--accent); font-size: 16px; }
.navback span { display: inline-flex; align-items: center; gap: 2px; }
.rtitle { font: 800 28px/32px Archivo, system-ui, sans-serif; letter-spacing: -.7px; padding: 4px 20px 10px; flex: none; }
.mcols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.mcol .num { font-size: 20px; line-height: 24px; display: block; margin-bottom: 6px; }
.stepper { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stepper span { display: grid; place-items: center; width: 38px; height: 34px; background: var(--surface2); }
.stepper b { display: grid; place-items: center; width: 42px; font: 700 17px/1 Archivo, system-ui, sans-serif; }
.ing { padding: 4px 16px; }
.ing .row { padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.ing .row:first-child { border-top: 0; }

/* ---- Crew ------------------------------------------------------------- */
.lb { display: grid; grid-template-columns: 18px 1fr 52px 50px 52px 54px; align-items: center; column-gap: 6px; font-size: 13px; }
.lb > span { padding: 8px 0; border-top: 1px solid var(--line); }
.lb > .th { border-top: 0; padding: 4px 0 6px; font-size: 10px; }
.lb .r { text-align: right; }
.who { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.who .avatar { width: 24px; height: 24px; font-size: 11px; }
.feed { display: grid; gap: 8px; }
.feed .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.props { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: 13px; }

/* ---- Coach ------------------------------------------------------------ */
.coach-hd { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 4px 18px 10px; }
.coach-hd .t { text-align: center; }
.coach-hd .t b { display: block; font: 700 17px/22px Archivo, system-ui, sans-serif; letter-spacing: -.35px; }
.mem { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msgs { display: flex; flex-direction: column; gap: 10px; }
.day { align-self: center; font-size: 11.5px; color: var(--faint); margin: 2px 0; }
.bub { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: 14.5px; line-height: 21px; }
.bub.me { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.bub.ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -2px; }
.composer { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px 40px; border-top: 1px solid var(--line); background: var(--surface); }
.composer .field { flex: 1; height: 40px; display: flex; align-items: center; padding: 0 14px; border-radius: 20px; background: var(--surface2); color: var(--faint); font-size: 15px; }
.send { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }

/* ==========================================================================
   v2 (Oct 2026 UI): compact tab header, date row, rings, tiles, grouped log,
   Log food search + portion sheet, set ticks, crew activity, crew chat.
   ========================================================================== */

/* tab header: Messages left, title centred, coach + settings right */
.thdr { flex: none; height: 44px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 12px; }
.thdr .t { font: 700 20px/24px Archivo, system-ui, sans-serif; letter-spacing: -.4px; }
.thdr .l, .thdr .r { display: flex; align-items: center; gap: 2px; }
.thdr .r { justify-content: flex-end; }
.hb { position: relative; display: grid; place-items: center; width: 40px; height: 40px; color: var(--muted); }
.hb.acc { color: var(--accent); }
.hb .dot { position: absolute; top: 7px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1.5px var(--ground); }
/* pushed / modal screen header: one back arrow */
.phdr { flex: none; height: 44px; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: 0 8px; }
.phdr .t { text-align: center; font: 700 18px/22px Archivo, system-ui, sans-serif; letter-spacing: -.35px; white-space: nowrap; }
.phdr .back { color: var(--accent); display: grid; place-items: center; width: 44px; height: 44px; }
.phdr .act { color: var(--accent); justify-self: end; font-size: 16px; padding-right: 6px; }

/* date row: ← TODAY / Thursday, Oct 1 → */
.dnav { flex: none; display: flex; align-items: center; justify-content: space-between; }
.dnav .arrow { display: grid; place-items: center; width: 44px; height: 44px; color: var(--ink); }
.dnav .arrow.off { opacity: .35; }
.dnav .c { text-align: center; display: grid; gap: 2px; }
.dnav .c .lbl { color: var(--accent); }
.dnav .c b { display: block; font: 700 17px/22px Archivo, system-ui, sans-serif; letter-spacing: -.35px; }

.sect { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 -2px; }
/* Content runs off the bottom like a real scroll view instead of squashing cards. */
.scroll > * { flex-shrink: 0; }

/* rings card */
.rings { display: flex; justify-content: space-around; }
.ringcol { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ring { position: relative; width: 132px; height: 132px; }
.ring svg { position: absolute; inset: 0; }
.ring .in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .in .num { font-size: 32px; line-height: 36px; }
.ringcol .lbl { margin-top: 8px; }
.mrow { display: flex; gap: 16px; margin-top: 16px; }
.mrow > div { flex: 1; display: grid; gap: 4px; }
.mrow .top { display: flex; justify-content: space-between; align-items: baseline; }
.mrow .mono { font-size: 14px; }

/* log food button + scan */
.lfrow { display: flex; gap: 8px; }
.lfrow .btn-s { flex: 1; }
.sqbtn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); flex: none; }

/* grouped food log */
.ghead { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px; margin: 2px 0 -4px; }
.ghead .lbl { color: var(--muted); }
.ghead .lbl i { font-style: normal; color: var(--faint); margin-left: 6px; }
.flist { padding: 0; overflow: hidden; }
.frow { display: flex; align-items: center; gap: 8px; padding: 11px 6px 11px 16px; border-top: 1px solid var(--line); }
.frow:first-child { border-top: 0; }
.frow .g { flex: 1; min-width: 0; }
.frow .star { color: var(--faint); display: grid; place-items: center; width: 34px; height: 34px; }
.frow .star.on { color: var(--carbs); }

/* daily check tiles */
.ctiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ctile { display: grid; gap: 4px; padding: 12px 14px; }
.ctile .h { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.ctile .h .lbl { flex: 1; }
.ctile .h .ok { color: var(--good); }
.ctile .v { font: 700 17px/22px Archivo, system-ui, sans-serif; letter-spacing: -.35px; }

/* segmented control, fields, pills */
.segc { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--surface2); }
.segc span { flex: 1; text-align: center; height: 34px; line-height: 34px; border-radius: 7px; color: var(--muted); font-size: 15px; }
.segc .on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.fld { display: grid; gap: 6px; }
.fld .box { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 46px; padding: 0 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 16px; }
.fld .box.focus { border-color: var(--accent); }
.chips-row { display: flex; gap: 8px; }
.pill { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--ink); }
.pill.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.rlist { padding: 0; overflow: hidden; }
.rrow { display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 56px; border-top: 1px solid var(--line); }
.rrow:first-child { border-top: 0; }
.rrow .g { flex: 1; min-width: 0; display: grid; gap: 2px; }
.rrow .tr { display: flex; align-items: center; gap: 8px; }
.rrow .chev { color: var(--faint); }
.plusb { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface2); color: var(--accent); flex: none; }
.linkrow { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--accent); font-size: 15px; }

/* portion sheet over a dimmed screen */
.dim { position: absolute; inset: 0; background: rgba(0,0,0,.5); z-index: 4; }
.psheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; gap: 16px; padding: 10px 20px 42px; border-radius: 18px 18px 0 0; background: var(--surface); box-shadow: 0 -10px 30px rgba(0,0,0,.35); }
.psheet .t { font: 700 20px/24px Archivo, system-ui, sans-serif; letter-spacing: -.4px; }
.amount { display: flex; align-items: flex-end; gap: 8px; }
.amount .step { display: grid; place-items: center; width: 44px; height: 46px; border-radius: 10px; background: var(--surface2); font: 600 20px/1 "IBM Plex Sans", system-ui, sans-serif; flex: none; }
.amount .fld { flex: 1; }
.amount .fld .box { font-family: "IBM Plex Mono", ui-monospace, monospace; background: var(--ground); }
.toggle { display: flex; align-items: center; justify-content: space-between; font-size: 15px; }
.sw { width: 51px; height: 31px; border-radius: 16px; background: var(--surface2); position: relative; flex: none; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; }
.sw.on { background: var(--good); }
.sw.on::after { left: 22px; }

/* train: lift card, set rows with ticks, W badge */
.lift { display: grid; gap: 8px; }
.lift .top { display: flex; align-items: flex-start; gap: 8px; }
.lift .grip { color: var(--faint); margin-top: 3px; }
.lift .h { flex: 1; min-width: 0; display: grid; gap: 2px; }
.lift .h b { font: 700 17px/22px Archivo, system-ui, sans-serif; letter-spacing: -.35px; }
.lift .h b .mono { font: 400 15px/22px "IBM Plex Mono", monospace; color: var(--faint); letter-spacing: 0; margin-right: 6px; }
.lift .more { color: var(--muted); }
.lbl.rtag { color: var(--accent); }
.pnote { border-left: 3px solid var(--accent); padding-left: 8px; font-size: 13px; line-height: 18px; color: var(--muted); }
.shead, .srow { display: grid; grid-template-columns: 30px 1fr 10px 1fr 40px; align-items: center; gap: 8px; }
.shead .lbl { text-align: center; }
.srow { height: 46px; }
.srow .idx { font: 400 15px/1 "IBM Plex Mono", monospace; color: var(--faint); }
.srow .idx.ok { color: var(--good); }
.srow .wb { display: inline-grid; place-items: center; height: 22px; width: 26px; border-radius: 6px; background: var(--surface2); font: 600 10.5px/1 "IBM Plex Sans", sans-serif; letter-spacing: .5px; color: var(--carbs); }
.srow .wb.ok { color: var(--good); }
.srow .in { height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font: 400 16px/1 "IBM Plex Mono", monospace; }
.srow .in.ph { color: var(--faint); }
.srow .in.focus { border-color: var(--accent); }
.srow .x { text-align: center; color: var(--faint); }
.srow .tick { display: grid; place-items: center; color: var(--line); }
.srow .tick.on { color: var(--good); }
.srow .tick.ready { color: var(--muted); }
.addset { height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--surface2); border: 1px solid var(--line); font: 600 15px/1 "IBM Plex Sans", sans-serif; }

/* crew board */
.crewtop { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.crewtop .t { font: 700 22px/26px Archivo, system-ui, sans-serif; letter-spacing: -.55px; }
.crewtop .acts { display: flex; gap: 4px; }
.lbr { display: grid; gap: 12px; padding: 14px 8px; border-top: 1px solid var(--line); border-radius: 6px; }
.lbr:first-child { border-top: 0; }
.lbr.me { background: var(--surface2); }
.lbn { display: flex; align-items: center; gap: 8px; }
.lbn i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.lbn b { flex: 1; font-weight: 600; }
.lbs { display: flex; flex-wrap: wrap; column-gap: 20px; row-gap: 12px; }
.lbs > span { display: grid; gap: 2px; }
.lbs b.mono { font: 500 15px/22px "IBM Plex Mono", monospace; }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 12px; border-radius: 10px; font: 600 13px/1 "IBM Plex Sans", sans-serif; color: var(--accent); }
.chatcard { display: flex; align-items: center; gap: 12px; }
.chatcard .ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface2); color: var(--accent); flex: none; }
.chatcard .g { flex: 1; min-width: 0; }
.chatcard .g .sm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge-new { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 13px; line-height: 18px; }
.act { padding: 0; }
.arow { display: flex; align-items: center; gap: 12px; padding: 11px 16px; min-height: 56px; border-top: 1px solid var(--line); }
.arow:first-child { border-top: 0; }
.arow .sw2 { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.arow .g { flex: 1; min-width: 0; display: grid; gap: 2px; }
.arow .nm { display: flex; align-items: center; gap: 8px; }
.arow .st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.arow .st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.am { color: var(--carbs); } .rd { color: var(--accent); }

/* crew chat */
.chat { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 8px 16px 10px; overflow: hidden; }
.mg { max-width: 82%; display: grid; gap: 2px; align-self: flex-start; }
.mg.me { align-self: flex-end; }
.mg .who { font-size: 13px; line-height: 18px; margin: 8px 0 0 4px; }
.cb { border-radius: 16px; padding: 8px 12px 4px; font-size: 15px; line-height: 21px; background: var(--surface); border: 1px solid var(--line); }
.mg.me .cb { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cb.ment { background: var(--surface2); border-color: var(--accent); }
.cb .at { color: var(--accent); font-weight: 600; }
.mg.me .cb .at { color: var(--on-accent); }
.cb .tm { display: block; font-size: 11px; line-height: 14px; margin-top: 2px; opacity: .7; }
.mg.me .cb .tm { text-align: right; }
.daysep { align-self: center; font-size: 11.5px; color: var(--faint); margin: 4px 0; }
.suggest { flex: none; display: flex; gap: 8px; padding: 8px 16px; background: var(--surface); border-top: 1px solid var(--line); }
.ccomp { flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px 38px; background: var(--surface); border-top: 1px solid var(--line); }
.ccomp .inp { flex: 1; min-height: 40px; display: flex; align-items: center; padding: 0 12px; border-radius: 10px; background: var(--ground); border: 1px solid var(--line); font-size: 16px; }
.ccomp .sendb { height: 40px; padding: 0 14px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: var(--on-accent); font: 600 13px/1 "IBM Plex Sans", sans-serif; }
