/* sunny-staff design system — gpt-6 Astra pass 3: spacing scale, one control system, phone-first */
/* self-hosted Inter (variable, latin) — keeps every screen off browser-default fonts */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
}
:root {
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --bg: #fdf9f0; --bg2: #faf4e7; --panel: #fff; --panel3: #f3ecdc;
  --ink: #33302a; --sub: #6f6656; --line: #e7dfcc; --control-line: #9c917e;
  --sun: #f5c518; --yellow: #f5c518; --danger: #b3432e;
  --blue: #dceaf7; --blue-line: #7fb2e0;
  --shadow: none;
  --radius-card: 12px; --radius-control: 8px;
  --touch: 48px; --tab-height: 72px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
html { font-family: 'Inter', -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 'Inter', -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
}
button { font: inherit; border: 0; background: none; color: inherit; cursor: pointer; padding: 0; }
h1, h2, h3, p { margin: 0; }
h2, h3 { font-size: 16px; line-height: 24px; font-weight: 700; }
.sub { color: var(--sub); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.hidden { display: none !important; }

/* shell */
#app { max-width: 560px; margin-inline: auto; min-height: 100dvh; display: flex; flex-direction: column; }
#app.wide { max-width: none; }
.topbar {
  display: grid; grid-template-columns: 80px minmax(0, 1fr) 80px; align-items: center; gap: var(--s2);
  width: 100%; margin-inline: auto;
  padding: calc(var(--s2) + env(safe-area-inset-top)) var(--s4) var(--s2);
}
#app.wide .topbar { max-width: 1100px; }
.topbar h1 { font-size: 18px; line-height: 24px; font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.sunmark { display: block; width: 36px; height: 20px; object-fit: contain; }
#logout { min-width: var(--touch); min-height: var(--touch); padding: var(--s2); color: var(--sub); font-size: 13px; line-height: 20px; font-weight: 600; }
.content {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: var(--s3);
  padding: var(--s2) var(--s4) calc(var(--tab-height) + env(safe-area-inset-bottom) + var(--s5));
}
#app.wide .content { max-width: 1100px; width: 100%; margin-inline: auto; }
.content > h2 { margin: var(--s3) 0 calc(-1 * var(--s1)); }
.content > h2:first-child { margin-top: 0; }

/* cards */
.card {
  display: grid; gap: var(--s2); min-width: 0; margin: 0; padding: var(--s4);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card);
  box-shadow: none; overflow-wrap: anywhere;
}
.card.open-claim { background: var(--yellow); border-color: #e8c96a; }
.card .when { font-size: 20px; line-height: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.card .when.record-title { font-size: 15px; line-height: 22px; font-weight: 600; }
.card-heading { display: grid; gap: var(--s1); }
.shiftcard { gap: var(--s1); }
.chip { display: inline-block; width: 8px; height: 8px; margin-right: var(--s2); border-radius: 50%; vertical-align: 1px; }

/* buttons: default yellow, ghost secondary; small narrows and shrinks type, never height */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  width: 100%; min-width: var(--touch); min-height: var(--touch); margin: 0;
  padding: var(--s3) var(--s4); border: 1px solid transparent; border-radius: var(--radius-control);
  background: var(--sun); color: var(--ink); font: inherit; font-size: 15px; line-height: 22px; font-weight: 600;
  text-align: center; white-space: normal; cursor: pointer;
}
.btn.sun { background: var(--sun); color: var(--ink); }
.btn.ghost { background: var(--panel); color: var(--ink); border-color: var(--control-line); }
.btn.small { width: auto; min-height: 40px; padding: var(--s2) var(--s3); font-size: 14px; line-height: 20px; white-space: nowrap; }
.btn.danger { background: var(--panel); color: var(--danger); border-color: var(--danger); }
.btn:active { transform: none; filter: brightness(.96); }
.btn:disabled { opacity: .55; cursor: default; filter: none; }
.card > .btn { margin-top: var(--s2); }
.actions, .row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.actions > .btn { flex: 1 1 140px; }
.row > div { min-width: 0; }
.row .btn, .actions .btn { margin: 0; }

/* controls */
input, select, textarea {
  display: block; width: 100%; min-width: 0; min-height: var(--touch); margin: 0;
  padding: var(--s3); border: 1px solid var(--control-line); border-radius: var(--radius-control);
  background: var(--panel); color: var(--ink); font: inherit; font-size: 16px; line-height: 22px;
}
select { appearance: auto; -webkit-appearance: auto; }
textarea { min-height: 96px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--sub); opacity: 1; }
input[type="checkbox"] {
  appearance: auto; -webkit-appearance: auto; width: 24px; height: 24px; min-height: 0;
  padding: 0; flex: 0 0 24px; accent-color: var(--sun);
}
input[type="date"], input[type="time"] { text-align: left; text-align-last: left; }
.datechips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s1); }
.datechip {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: var(--touch); padding: var(--s2) 0;
  border: 1px solid var(--control-line); border-radius: var(--radius-control);
  background: var(--panel); color: var(--ink); font: inherit; cursor: pointer;
}
.datechip span { font-size: 11px; line-height: 1; color: var(--sub); }
.datechip b { font-size: 15px; line-height: 1.2; }
.datechip.on { background: var(--sun); border-color: var(--sun); }
.datechip.on span { color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: #805b16; outline: none; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #805b16; outline-offset: 2px;
}

/* forms */
.form-stack { display: grid; gap: var(--s4); min-width: 0; }
.field { display: grid; align-content: start; gap: var(--s2); min-width: 0; }
.field-pair { gap: var(--s4); }
.mbody .field-pair { gap: var(--s4); }
label, .field-label { display: block; margin: 0; color: var(--ink); font-size: 14px; line-height: 20px; font-weight: 600; }
label.chk {
  display: flex; align-items: center; gap: var(--s2); min-height: var(--touch); margin: 0;
  font-size: 14px; line-height: 20px; font-weight: 600;
}
.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); min-width: 0; }
.card.form-stack > .btn { margin-top: 0; }
.err { color: var(--danger); font-size: 14px; line-height: 20px; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 359px) { .field-pair { grid-template-columns: minmax(0, 1fr); } }

/* invite */
.invite-card h3 { margin-bottom: var(--s1); }
.invrow { display: grid; grid-template-columns: minmax(0, 1fr) 88px; align-items: start; gap: var(--s2); }
.invrow input, .invrow .btn { width: 100%; min-width: 0; min-height: var(--touch); margin: 0; }
.invrow .btn { padding-inline: var(--s3); }
#invlink:empty { display: none; }
.invlink {
  display: inline-flex; align-items: center; min-height: var(--touch); color: #2c5a86;
  font-size: 14px; line-height: 20px; font-weight: 600; text-decoration: underline; overflow-wrap: anywhere;
}

/* auth */
.auth {
  width: 100%; max-width: 400px; margin-inline: auto;
  padding: calc(var(--s6) + env(safe-area-inset-top)) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom));
  display: grid; align-content: start; gap: var(--s5);
}
.auth-brand { display: grid; justify-items: center; gap: var(--s2); text-align: center; }
.auth-brand .sunmark { width: 64px; height: 36px; margin-bottom: var(--s2); }
.auth-brand h1 { font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -.02em; }
.auth-help { text-align: center; }
.pin-input { text-align: center; letter-spacing: .2em; font-variant-numeric: tabular-nums; }
.segbar { display: flex; gap: var(--s2); flex-wrap: wrap; }
.segbtn {
  flex: 1 1 auto; min-height: var(--touch); padding: var(--s3) var(--s4);
  border: 1px solid var(--control-line); border-radius: 999px; background: var(--panel);
  color: var(--sub); font-size: 14px; line-height: 20px; font-weight: 600;
}
.segbtn.on { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.pickgrid { display: flex; flex-wrap: wrap; gap: var(--s2); }
.pick {
  display: inline-flex; align-items: center; gap: var(--s2); min-height: var(--touch);
  padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); font-size: 14px; line-height: 20px; font-weight: 600;
}
.grouprun {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  padding: var(--s2) 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 20px;
}
.grouprun:last-child { border-bottom: 0; }
.pickbtn {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: var(--touch); height: var(--touch); border: 1.5px solid var(--control-line);
  border-radius: 999px; background: var(--panel); color: var(--sub);
}
.pickbtn svg { width: 20px; height: 20px; }
.pickbtn.on { border-color: #805b16; background: var(--sun); color: var(--ink); }
.pickbtn.cancel { border: 0; background: none; color: #fff; }
.msgbar {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 30;
  bottom: calc(var(--tab-height) + env(safe-area-inset-bottom) + var(--s2));
  width: calc(100vw - 32px); max-width: 528px;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  padding: var(--s2) var(--s3); border-radius: 14px; background: var(--ink); color: #fff;
  box-shadow: 0 6px 20px rgba(51, 48, 42, .35);
}
.msgbar.hidden { display: none; }
.msgbar-actions { display: flex; align-items: center; gap: var(--s2); }
.msgbar .btn.small.ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .35); }
.msgbar .btn.small:not(.ghost) { background: var(--sun); color: var(--ink); }
.msgbar .btn.small { min-height: var(--touch); }

/* schedule */
.wknav { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: var(--s2); margin: 0; }
.wktitle { font-size: 16px; line-height: 24px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: center; }
.wkbtn {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  border: 1px solid var(--control-line); border-radius: var(--radius-control); background: var(--panel);
}
.wkbtn svg { width: 20px; height: 20px; }
.wkbtn:active { transform: none; background: var(--bg2); }
.viewtoggle { display: flex; justify-content: center; gap: var(--s2); margin: 0; }
.viewtoggle button {
  min-height: var(--touch); padding: var(--s3) var(--s4); border: 1px solid var(--control-line);
  border-radius: 999px; background: var(--panel); color: var(--sub); font-size: 14px; line-height: 20px;
  font-weight: 600;
}
.viewtoggle button.on { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.boardwrap {
  min-width: 0; margin: 0; padding: 0; overflow-x: auto; scroll-padding-left: 104px;
  border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--panel);
}
.board { display: grid; grid-template-columns: 104px repeat(7, minmax(144px, 1fr)); min-width: 1112px; border-left: 0; }
.bh {
  display: flex; flex-direction: column; justify-content: center; gap: var(--s1); min-height: 64px;
  padding: var(--s2); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg2); color: var(--sub); font-size: 12px; line-height: 16px; font-weight: 600; text-align: center;
}
.bh .dnum { display: block; color: var(--ink); font-size: 14px; line-height: 20px; font-weight: 700; }
.bh:first-child, .name { position: sticky; left: 0; z-index: 2; border-right: 1px solid var(--control-line); background: var(--bg); }
.bh:first-child { z-index: 3; }
.name {
  padding: var(--s3) var(--s2); border-bottom: 1px solid var(--line);
  font-size: 14px; line-height: 20px; font-weight: 600; white-space: normal; overflow-wrap: anywhere;
}
.pos, .hrs { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--sub); }
.hrs.over { display: inline-block; padding: var(--s1); border-radius: 4px; background: var(--yellow); color: #974319; font-weight: 600; }
.cell {
  display: flex; flex-direction: column; gap: var(--s1); min-width: 0; min-height: 80px; padding: var(--s1);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.cell.today { background: var(--bg2); }
.sh {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: 100%; min-height: 56px; padding: var(--s1) var(--s2); border: 1px solid var(--blue-line); border-radius: 8px;
  background: var(--blue); color: #2c5a86; font: inherit; font-size: 12.5px; line-height: 16px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sh span:first-child { white-space: nowrap; }
.sh .tstat, .sh .tcost { font-size: 11px; line-height: 14px; font-weight: 500; opacity: .9; }
.sh.openst { background: var(--yellow); border-color: #e8c96a; color: #7a5c10; }
.sh.draft { border-style: dashed; }
.laborbar {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s2); margin: 0; padding: var(--s2) var(--s3);
  border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--panel);
}
.laborbar .wklab { color: var(--sub); font-size: 13px; line-height: 20px; font-weight: 500; }
.laborbar .wkamt { font-size: 18px; line-height: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.laborbar .wkhrs { color: var(--sub); font-size: 13px; line-height: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
.lpills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s1); flex-basis: 100%; }
.lpills span {
  padding: 3px var(--s1); border-radius: 8px; background: var(--bg2); color: var(--sub);
  font-size: 11px; line-height: 16px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: center; overflow-wrap: anywhere;
}
.lpills span.today { background: var(--sun); color: var(--ink); }
@media (min-width: 700px) { .lpills { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.board-actions { display: flex; gap: var(--s2); flex-wrap: wrap; }
.board-actions .btn { flex: 1 1 0; min-width: 0; padding-left: var(--s2); padding-right: var(--s2); white-space: nowrap; }
.selhelp { font-size: 13px; }
.board-help { text-align: center; }
/* day view (Homebase-style) */
.daysec { display: flex; flex-direction: column; gap: var(--s1); }
.dayhead { display: flex; align-items: center; gap: var(--s2); font-size: 14px; line-height: 20px; margin: var(--s3) 0 0; color: var(--sub); font-weight: 600; }
.todaypill { background: var(--sun); color: var(--ink); border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 700; }
.offrow { display: flex; gap: var(--s2); align-items: center; padding: var(--s2) var(--s3); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card); font-size: 13px; line-height: 18px; }
.offrow .officon { width: 20px; height: 20px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.offrow .officon svg { width: 12px; height: 12px; }
.offrow.approved .officon { background: var(--ink); color: var(--panel); }
.offrow.pending .officon { background: var(--sun); color: var(--ink); }
.dayrow { display: flex; align-items: center; gap: var(--s2); width: 100%; text-align: left; padding: 10px var(--s3); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card); font: inherit; color: inherit; }
.dayrow .dtime { font-size: 13px; font-weight: 600; line-height: 18px; flex: none; min-width: 96px; font-variant-numeric: tabular-nums; }
.dayrow .avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.dayrow .dinfo { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.dayrow .dinfo b { font-size: 14px; line-height: 18px; }
.dayrow .djob { font-size: 12px; line-height: 16px; color: var(--sub); display: flex; align-items: center; gap: 5px; }
.dayrow .jdot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dayrow .dhrs { font-size: 12px; color: var(--sub); flex: none; font-variant-numeric: tabular-nums; }
.dayrow .celladd { display: flex; opacity: 1; margin: 0 0 0 auto; }
.dayadd {
  align-self: flex-start; margin: 0;
  display: flex; align-items: center; justify-content: center;
  width: auto; height: 32px; padding: 0 var(--s3); opacity: .6;
  border: 1.5px dashed var(--control-line); border-radius: 999px;
  background: none; color: var(--sub); font-size: 13px; font-weight: 600; line-height: 1;
}
.daysec:hover .dayadd, .dayadd:focus-visible { opacity: 1; }
.toast.in-error { background: var(--danger); }
/* staff rows */
.staffrow { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); }
.staffinfo { flex: 1; min-width: 0; }
.staffcard .when.staffname { font-size: 16px; line-height: 24px; font-weight: 700; }
.staffcard .staffsum { margin-top: var(--s1); font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
.staffcard [data-edit] { flex: 0 0 64px; width: 64px; min-height: var(--touch); margin: 0; padding-inline: var(--s2); }
.staffavailability { font-size: 13px; line-height: 20px; }
.staffedit { display: grid; gap: var(--s4); margin-top: var(--s2); padding-top: var(--s4); border-top: 1px solid var(--line); }
.jobs { display: grid; gap: var(--s4); }
.jobrow { display: grid; grid-template-columns: minmax(0, 1fr) 48px 48px; align-items: end; gap: var(--s2); }
.jobrow + .jobrow { padding-top: var(--s4); border-top: 1px solid var(--line); }
.jobrow .job-name-field { grid-column: 1 / -1; }
.jobrow label { display: grid; gap: var(--s2); min-width: 0; }
.jdef, .jrm, .avrm {  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0;
  border: 1px solid var(--control-line); border-radius: var(--radius-control); background: var(--panel); color: var(--sub);
}
.jdef.on { border-color: #805b16; background: var(--yellow); color: #805b16; }
/* roles manager rows — one 44px control height, fixed rate column so every row aligns */
.rolerow, .raddrow { display: flex; align-items: flex-start; gap: var(--s2); }
.raddrow { align-items: center; }
.rolerow { padding: var(--s2) 0; }
.rolerow + .rolerow { border-top: 1px solid var(--line); }
.rolerow .rnamewrap { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.raddrow > input:first-child { flex: 1 1 auto; min-width: 0; }
.rolerow .rinuse { font-size: 11px; line-height: 14px; }
.rolerow .rname, .rolerow .rratewrap input, .raddrow input { min-height: 44px; height: 44px; }
.rratewrap { display: flex; align-items: center; gap: 4px; font-weight: 600; min-width: 0; }
.rratewrap input { flex: 1 1 0; width: 0; min-width: 0; }
.rolerow .rratewrap, .raddrow .rratewrap { flex: 0 0 84px; }
.rolerow .btn.small, .raddrow .btn.small { min-height: 44px; }
.rolerow .jrm { width: 44px; height: 44px; flex: 0 0 auto; }
.rxslot { flex: 0 0 44px; display: flex; justify-content: flex-end; }
.jdef svg, .jrm svg, .avrm svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.staff-account-actions { padding-top: var(--s4); border-top: 1px solid var(--line); }

/* availability windows */
#avrows { display: grid; gap: var(--s4); }
#avrows:empty { display: none; }
.avrow {
  display: grid; grid-template-columns: minmax(0, 1fr) 48px; align-items: center; gap: var(--s2);
  padding: 0 0 var(--s4); border-bottom: 1px solid var(--line);
}
.avrow:last-of-type { padding-bottom: 0; border-bottom: 0; }
.avday-field { grid-column: 1 / -1; }
.avrow select { max-width: none; }
.avtimes { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.avtimes[hidden] { display: none; }
@media (max-width: 359px) { .avtimes { grid-template-columns: minmax(0, 1fr); } }

/* shift modal: scrollable body, persistent save footer */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(51, 48, 42, .4); }
.mbox {
  display: flex; flex-direction: column; width: 100%; max-width: 460px;
  max-height: calc(100dvh - env(safe-area-inset-top) - var(--s2));
  padding: 0; overflow: hidden; border-radius: 16px 16px 0 0; background: var(--bg);
}
.mhead { flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin: 0; padding: var(--s2) var(--s4); border-bottom: 1px solid var(--line); }
.mbox h3 { font-size: 18px; line-height: 24px; font-weight: 700; }
.mhead .btn { width: auto; min-height: 40px; margin: 0; padding: var(--s2) var(--s4); }
.mbody { display: grid; flex: 1 1 auto; min-height: 0; gap: var(--s4); padding: var(--s4); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal-section, .duplicate-group { display: grid; gap: var(--s4); margin: 0; padding-top: var(--s4); border-top: 1px solid var(--line); }
.mfooter { flex: none; padding: var(--s4) var(--s4) calc(var(--s4) + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--panel); }
#ssave { min-height: var(--touch); margin: 0; }
#sdel { margin: 0; }
@media (min-width: 700px) {
  .modal { align-items: center; padding: var(--s5); }
  .mbox { max-height: calc(100dvh - 48px); border-radius: 16px; }
}

/* tab bar */
.tabbar {
  position: fixed; bottom: 0; left: 50%; z-index: 20; transform: translateX(-50%);
  display: flex; width: 100%; max-width: 560px; padding: 0 var(--s2) env(safe-area-inset-bottom);
  border-top: 1px solid var(--line); background: var(--panel);
}
#app.wide .tabbar { max-width: 1100px; }
.tabbar button {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s1); min-width: var(--touch); min-height: var(--tab-height); padding: var(--s2) var(--s1);
  border: 0; background: transparent; color: var(--sub); font-size: 12px; line-height: 16px; font-weight: 600;
}
.tabbar button::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 32px; height: 4px; transform: translateX(-50%);
  border-radius: 0 0 4px 4px; background: transparent;
}
.tabbar button.on { background: var(--bg2); color: var(--ink); }
.tabbar button.on::before { background: var(--sun); }
.tabbar svg { flex: none; width: 24px; height: 24px; }

/* empty states, misc */
.empty {
  margin: 0; padding: var(--s6) var(--s4); border: 1px dashed var(--line); border-radius: var(--radius-card);
  color: var(--sub); font-size: 14px; line-height: 20px; text-align: center; overflow-wrap: anywhere;
}
.board-empty { grid-column: 1 / -1; border: 0; border-radius: 0; }
.pill { display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s1) var(--s3); border: 1px solid #e8c96a; border-radius: 999px; background: var(--yellow); font-size: 13px; line-height: 20px; font-weight: 600; }
.label { font-size: 14px; line-height: 20px; }
.toast {
  position: fixed; bottom: calc(var(--tab-height) + env(safe-area-inset-bottom) + var(--s3)); left: 50%; z-index: 99;
  transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px);
  padding: var(--s3) var(--s4); border-radius: var(--radius-control); background: var(--ink); color: #fff;
  font-size: 14px; line-height: 20px; font-weight: 500; text-align: center; overflow-wrap: anywhere;
}
