@font-face {
  font-family: "ChinoPet Quicksand";
  src: url("/assets/chinopet-quicksand-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "ChinoPet Quicksand";
  src: url("/assets/chinopet-quicksand-semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "ChinoPet Quicksand";
  src: url("/assets/chinopet-quicksand-bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --page: #050505;
  --panel: #0d0d0d;
  --panel-raised: #141414;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f5f3ed;
  --muted: #aaa8a1;
  --quiet: #87857f;
  --gold: #ffc43d;
  --gold-soft: #ffd978;
  --gold-ink: #1d1500;
  --good: #64d894;
  --error: #ff776d;
  font-family: "ChinoPet Quicksand", "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  font-size: 16px;
  line-height: 1.5;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--page); }
body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% -8%, rgba(255, 196, 61, 0.11), transparent 31rem),
    linear-gradient(180deg, #070707 0%, var(--page) 42%, #030303 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: max(8px, env(safe-area-inset-top));
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 10px;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(90px);
  opacity: .16;
}
.ambient-one { top: 12%; right: -14rem; width: 28rem; height: 28rem; background: var(--gold); }
.ambient-two { bottom: -16rem; left: -14rem; width: 26rem; height: 26rem; background: #80601b; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: min(100% - 24px, 480px);
  min-height: calc(54px + env(safe-area-inset-top));
  margin: 0 auto;
  padding: calc(6px + env(safe-area-inset-top)) 0 6px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { display: block; height: 32px; width: auto; }
.brand-copy small { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .26em; }
.connection {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  gap: 8px;
  min-width: 0;
  max-width: 58%;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .025);
  color: #ceccc5;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
#connection-label { overflow: hidden; text-overflow: ellipsis; }
.connection-dot { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--quiet); box-shadow: 0 0 0 4px rgba(255, 255, 255, .04); }
.connection[data-state="online"] .connection-dot { background: var(--good); box-shadow: 0 0 0 4px rgba(100, 216, 148, .11); }
.connection[data-state="offline"] .connection-dot { background: var(--error); box-shadow: 0 0 0 4px rgba(255, 119, 109, .12); }

.shell { width: min(100% - 20px, 480px); margin: 0 auto; padding: 12px 0 calc(28px + env(safe-area-inset-bottom)); }
.eyebrow, .section-kicker { margin: 0 0 4px; color: var(--gold); font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; }
.eyebrow span { width: 14px; height: 1px; background: currentColor; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { max-width: 15ch; margin: 0; font-size: clamp(1.5rem, 6vw, 2.3rem); line-height: 1.12; letter-spacing: -.045em; }
h2 { margin: 0; font-size: 1.12rem; line-height: 1.2; letter-spacing: -.025em; }
h3 { margin: 0; font-size: .98rem; line-height: 1.3; }
.lead { max-width: 44rem; margin: 8px 0 0; color: var(--muted); }
.lead.compact { margin-top: 4px; font-size: .85rem; }
.login-screen { padding-top: 18px; text-align: center; }
.login-screen h1 { max-width: none; margin: 12px auto 10px; font-size: clamp(32px, 9.5vw, 44px); font-weight: 700; letter-spacing: -.02em; line-height: 1.12; }
.login-screen h1 em { color: var(--gold); font-style: normal; }
.login-screen .lead { max-width: 34rem; margin: 0 auto; font-size: 14px; line-height: 1.6; }
.login-screen .form-panel { margin-top: 18px; padding: 0; border: 0; background: transparent; box-shadow: none; text-align: left; }
.login-screen .field label { color: var(--muted); font-size: 12px; font-weight: 700; }
.login-address { margin: 12px 0 0; color: var(--quiet); font-size: 11px; line-height: 1.5; text-align: center; }
.login-address strong { color: var(--gold-soft); font-weight: 700; }
.login-attendance { margin-top: 16px; text-align: left; }
.login-attendance .form-note { margin-top: 12px; }
#manager-panel .form-note { margin: 7px 0 0; }
.manage-card { align-items: flex-start; }
.manage-punches { display: grid; margin-top: 4px; }
.manage-punch { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-top: 1px solid var(--line); }
.manage-punch:first-child { border-top: 0; padding-top: 0; }
.manage-punch-time { flex: 1; font-variant-numeric: tabular-nums; font-size: .84rem; }
.manage-punch .picker { flex: 1.6; min-width: 0; }
.manage-punch .picker-field { min-height: 32px; padding: 3px 9px; font-size: .78rem; border-radius: 9px; }
.manage-mini { flex: 0 0 auto; min-height: 28px; padding: 3px 9px; font-size: .73rem; }
.state-card { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 120px; color: var(--muted); }
.state-card p { margin: 0; }
.spinner { width: 18px; height: 18px; border: 2px solid #756442; border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.workspace-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.workspace-heading h1 { max-width: 23ch; font-size: clamp(1.4rem, 5.4vw, 2rem); }
.logout-button { flex: 0 0 auto; margin-top: 0; }
.panel { margin-bottom: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .018)); }
.panel-muted { background: #101211; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-heading > div { min-width: 0; }
.section-intro { margin: 6px 0 9px; color: var(--muted); font-size: .83rem; }
.active-count { color: var(--gold); font-variant-numeric: tabular-nums; }
#active-title { font-size: clamp(.96rem, 3vw, 1.12rem); }
.list-state { margin: 7px 0 0; color: var(--muted); font-size: .8rem; }
.list-state:empty { display: none; }
.card-list, .stage-list { display: grid; gap: 7px; margin-top: 9px; }
.card-list:empty { display: none; }
.card { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 62px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 255, 255, .035); color: var(--text); text-align: left; }
button.card { transition: border-color .18s, background-color .18s; }
button.card:hover, button.card:active { border-color: #a38132; background: #252720; }
button.card:disabled { cursor: not-allowed; opacity: .55; }
.card-main { display: grid; gap: 2px; flex: 1; min-width: 0; }
.card-title { font-size: .93rem; font-weight: 760; line-height: 1.25; }
.card-subtitle { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.card-meta { color: var(--gold-soft); font-size: .72rem; font-weight: 700; }
.card-title, .card-subtitle, .card-meta { overflow-wrap: anywhere; }
.card-arrow { align-self: center; color: var(--gold); font-size: 1.05rem; font-weight: 500; }
.card-photo { flex: 0 0 50px; width: 50px; height: 50px; border-radius: 10px; object-fit: cover; background: #30372f; }
.card-photo-placeholder { display: grid; place-items: center; flex: 0 0 50px; width: 50px; height: 50px; padding: 5px; border: 1px dashed #5b645a; border-radius: 10px; color: var(--muted); font-size: .58rem; text-align: center; }
#active-list .card { min-width: 0; min-height: 72px; }
#active-list .card-photo, #active-list .card-photo-placeholder { flex-basis: 46px; width: 46px; height: 46px; }
#active-list .card-meta { font-variant-numeric: tabular-nums; }
#active-list .card-arrow { flex: 0 0 auto; }
.pending-group { margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); }
.pending-group h3 { margin: 0; color: var(--muted); font-size: .88rem; font-weight: 750; }
.compact-list .card { min-height: 52px; }
.global-message { margin: 0 0 10px; padding: 8px 12px; border: 1px solid rgba(255, 196, 61, .28); border-radius: 12px; background: rgba(255, 196, 61, .08); color: var(--gold-soft); font-size: .82rem; }
.global-message[data-tone="error"] { border-color: #8f4844; background: #311c1b; color: var(--error); }
.global-message[data-tone="success"] { border-color: #416d51; background: #183123; color: var(--good); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; min-width: 44px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(255, 255, 255, .055); color: var(--text); font-size: .85rem; font-weight: 740; text-align: center; transition: background-color .18s, border-color .18s, opacity .18s, transform .16s; }
.button:hover, .button:active { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .28); }
.button-primary { border-color: transparent; background: var(--gold); color: var(--gold-ink); font-weight: 800; box-shadow: 0 10px 24px rgba(255, 196, 61, .15); }
.button-primary:hover, .button-primary:active { border-color: transparent; background: var(--gold-soft); }
.attendance-scanner { position: relative; margin-top: 9px; padding: 11px; overflow: hidden; border: 1px solid rgba(255, 196, 61, .4); border-radius: 15px; background: rgba(255, 196, 61, .045); }
.attendance-scanner p { margin: 0 0 9px; color: var(--muted); font-size: .8rem; line-height: 1.5; text-align: center; }
.attendance-scanner .attendance-countdown { margin-bottom: 6px; color: var(--gold-soft); font-weight: 750; font-variant-numeric: tabular-nums; }
.attendance-scanner .button + .button { margin-top: 6px; }
.attendance-scanner #attendance-cancel { margin-top: 6px; }
.button-attendance { border-color: rgba(255, 196, 61, .55); background: transparent; color: var(--gold-soft); box-shadow: none; }
.button-attendance + .button-attendance { margin-top: 6px; }
.button-attendance:hover, .button-attendance:active { border-color: var(--gold); background: rgba(255, 196, 61, .12); color: var(--gold-soft); }
.button-quiet { border-color: transparent; background: transparent; color: var(--muted); box-shadow: none; }
.button-quiet:hover, .button-quiet:active { background: #252a26; color: var(--text); }
.button-small { min-height: 32px; padding: 4px 10px; font-size: .75rem; }
.button-full { width: 100%; min-height: 42px; }
.button-back { margin: 0 0 14px; padding-left: 10px; border-color: transparent; background: transparent; color: var(--gold-soft); }
.button-back:hover, .button-back:active { background: #252a26; }
.button:disabled { cursor: not-allowed; opacity: .48; }
.shell:focus,
.shell:focus-visible { outline: none; }
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible { outline: 3px solid rgba(255, 196, 61, .42); outline-offset: 3px; }

.flow-screen { max-width: 640px; }
.flow-screen > h2 { margin-bottom: 12px; font-size: clamp(1.35rem, 5vw, 1.7rem); }
.selected-draft { border-color: rgba(255, 196, 61, .28); background: rgba(255, 196, 61, .06); }
.selected-draft .card-title { display: block; font-size: 1rem; }
.form-panel { display: grid; gap: 12px; }
.field { display: grid; gap: 4px; }
.field label { font-size: .82rem; font-weight: 730; }
.required, .optional { margin-left: 4px; font-size: .68rem; font-weight: 650; }
.required { color: var(--gold-soft); }
.optional { color: var(--quiet); }
input:not([type="file"]):not([type="hidden"]), textarea { width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 12px; outline: none; background: rgba(255, 255, 255, .06); color: var(--text); font-size: 16px; }
#staff-phone, #staff-password, #staff-password-confirm { letter-spacing: .03em; }
textarea { display: block; min-height: 84px; resize: vertical; }
input:not([type="file"]):not([type="hidden"]):focus, textarea:focus { border-color: rgba(255, 196, 61, .7); box-shadow: none; }
input:not([type="file"]):not([type="hidden"]):disabled, textarea:disabled { opacity: .55; }
.field { position: relative; }
.weight-input { position: relative; }
.weight-input input { padding-right: 44px; }
.weight-input > span { position: absolute; top: 50%; right: 12px; color: var(--muted); transform: translateY(-50%); }
.field-help { margin: 0; color: var(--quiet); font-size: .74rem; }
.form-error { margin: 0; color: var(--error); font-size: .8rem; }
.form-note { margin: 0; color: var(--good); font-size: .83rem; font-weight: 740; }

.visit-summary { display: grid; gap: 8px; }
.visit-title { font-size: 1.04rem; font-weight: 800; }
.visit-meta { color: var(--muted); font-size: .82rem; }
.visit-notes { margin: 2px 0 0; padding-top: 8px; border-top: 1px solid var(--line); color: var(--text); white-space: pre-wrap; }
.visit-notes strong { display: block; margin-bottom: 4px; color: var(--muted); font-size: .73rem; letter-spacing: .08em; text-transform: uppercase; }
.stage-heading { margin: 16px 0 0; }
.stage-list { margin: 9px 0 12px; }
.stage-card { padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.stage-card[data-state="ready"] { border-color: #a17e31; }
.stage-card[data-state="complete"] { border-color: #476f55; }
.stage-card[data-state="locked"] { opacity: .72; }
.stage-top { display: flex; align-items: flex-start; gap: 9px; }
.stage-number { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px; background: #44351c; color: var(--gold); font-size: .72rem; font-weight: 800; }
.stage-card[data-state="complete"] .stage-number { background: #203e2a; color: var(--good); }
.stage-copy { min-width: 0; }
.stage-copy p { margin: 2px 0 0; color: var(--muted); font-size: .77rem; }
.stage-image { display: block; width: 100%; max-height: 300px; aspect-ratio: 4 / 3; margin-top: 9px; border-radius: 10px; background: #212924; object-fit: contain; }
.stage-actions { display: flex; gap: 7px; margin-top: 9px; }
.stage-actions .button { flex: 1; padding-inline: 7px; font-size: .78rem; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip-path: inset(50%); }
.upload-status { margin: 7px 0 0; color: var(--gold-soft); font-size: .75rem; }
.upload-status[data-tone="error"] { color: var(--error); }
.upload-status[data-tone="success"] { color: var(--good); }
.finish-button { margin-top: 4px; }

@media (min-width: 700px) {
  .shell { width: min(100% - 32px, 480px); }
  .panel { padding: 15px; }
}

@media (max-width: 390px) {
  .connection { font-size: .68rem; }
  .brand-wordmark { font-size: 1rem; }
  .workspace-heading { flex-wrap: wrap; }
  .logout-button { min-height: 34px; }
  .panel { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Bottom tab bar — mirrors the ChinoFit staff app navigation. */
.tabbar {
  position: fixed;
  z-index: 15;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 2px;
  padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(10, 10, 10, .96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.tabbar-item {
  display: grid;
  justify-items: center;
  gap: 2px;
  flex: 0 1 96px;
  min-height: 40px;
  padding: 5px 4px 4px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--quiet);
  font-size: .64rem;
  font-weight: 750;
}
.tabbar-item svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tabbar-item:hover, .tabbar-item:active { color: var(--muted); background: rgba(255, 255, 255, .05); }
.tabbar-item[aria-current="page"] { color: var(--gold); }
.tabbar-item[aria-current="page"] svg { stroke-width: 2; }
body:has(.tabbar:not([hidden])) .shell { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

.badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .66rem;
  font-weight: 760;
  white-space: nowrap;
}
.badge-open { border-color: rgba(255, 196, 61, .45); color: var(--gold-soft); }
.badge-commission { border-color: #416d51; background: #183123; color: var(--good); }
.badge-unassigned { border-color: rgba(255, 196, 61, .4); color: var(--gold-soft); }
.badge-muted { color: var(--quiet); }

.pay-total {
  display: grid;
  gap: 1px;
  margin: 9px 0 4px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 196, 61, .3);
  border-radius: 14px;
  background: rgba(255, 196, 61, .06);
}
.pay-total-label { color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pay-total-value { color: var(--gold); font-size: 1.42rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pay-total-note { color: var(--quiet); font-size: .72rem; }
.pay-lines { display: grid; margin-top: 7px; }
.pay-line { display: flex; align-items: center; gap: 8px; padding: 6px 2px; border-top: 1px solid var(--line); }
.pay-line:first-child { border-top: 0; }
.pay-line-label { flex: 1; min-width: 0; color: var(--text); font-size: .84rem; overflow-wrap: anywhere; }
.pay-line-amount { flex: 0 0 auto; color: var(--gold-soft); font-size: .85rem; font-weight: 760; font-variant-numeric: tabular-nums; }
.pay-line-warn { color: var(--error); }
.pay-actions { display: flex; gap: 7px; margin-top: 9px; }
.pay-actions .button { flex: 1; }
.price-list { display: grid; margin: 8px 0 12px; }
.price-list:empty { display: none; }

/* ---------- Custom pickers (replaces every native select/date input) ---------- */
.picker { position: relative; width: 100%; }
.picker-field {
  display: flex; align-items: center; gap: 8px;
  width: 100%; min-height: 42px; padding: 7px 12px;
  border: 1px solid var(--line-strong); border-radius: 12px;
  outline: none; background: rgba(255, 255, 255, .06);
  color: var(--text); font-size: 15px; font-weight: 640; text-align: left;
  transition: border-color .18s, background-color .18s;
}
.picker-field:hover { border-color: rgba(255, 196, 61, .55); }
.picker-open .picker-field, .picker-field[aria-expanded="true"] {
  border-color: rgba(255, 196, 61, .7);
  background: rgba(255, 196, 61, .07);
}
.picker-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-value-empty { color: var(--quiet); font-weight: 550; }
.picker-chevron { flex: 0 0 14px; width: 14px; height: 14px; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.picker-backdrop {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  animation: fade-in .18s ease;
}
.picker-open { z-index: 40; }
.picker-panel {
  position: absolute; z-index: 40;
  top: calc(100% + 6px); left: 0; right: 0;
  max-height: min(56vh, 380px);
  overflow-y: auto; overscroll-behavior: contain;
  padding: 7px;
  border: 1px solid rgba(255, 196, 61, .42); border-radius: 14px;
  background: linear-gradient(180deg, #17150f, #0d0c09);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .62), 0 0 0 1px rgba(0, 0, 0, .4);
  opacity: 0; transform: scale(.96) translateY(-6px);
  transform-origin: top center;
  transition: opacity .17s ease, transform .17s ease;
  -webkit-overflow-scrolling: touch;
}
.picker-panel-up { top: auto; bottom: calc(100% + 6px); transform-origin: bottom center; transform: scale(.96) translateY(6px); }
.picker-panel-live { opacity: 1; transform: scale(1) translateY(0); }
.picker-panel svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.picker-options { display: grid; gap: 2px; }
.picker-option {
  display: flex; align-items: center; gap: 8px;
  width: 100%; min-height: 36px; padding: 6px 10px;
  border: 0; border-radius: 9px; background: transparent;
  color: var(--text); font-size: .88rem; font-weight: 600; text-align: left;
}
.picker-option:hover, .picker-option:active { background: rgba(255, 196, 61, .09); }
.picker-option[data-selected="true"] { color: var(--gold-soft); font-weight: 740; background: rgba(255, 196, 61, .12); }
.picker-check { flex: 0 0 14px; width: 14px; height: 14px; margin-left: auto; stroke: var(--gold); stroke-width: 2.4; }
.picker-empty { margin: 8px 5px; color: var(--quiet); font-size: .8rem; }

.picker-yearbar { display: flex; align-items: center; gap: 5px; padding: 1px 1px 6px; }
.picker-yeartitle { flex: 1; color: var(--gold-soft); font-size: .85rem; font-weight: 780; text-align: center; }
.picker-nav {
  display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px;
  border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, .05); color: var(--gold-soft);
}
.picker-nav svg { width: 14px; height: 14px; }
.picker-nav:hover:not(:disabled) { border-color: rgba(255, 196, 61, .6); background: rgba(255, 196, 61, .1); }
.picker-nav:disabled { opacity: .32; cursor: default; }

.picker-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.picker-cell {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 34px; padding: 5px 4px;
  border: 1px solid var(--line); border-radius: 9px;
  background: rgba(255, 255, 255, .04); color: var(--text);
  font-size: .78rem; font-weight: 650;
}
.picker-cell:hover:not(:disabled) { border-color: rgba(255, 196, 61, .55); }
.picker-cell[data-selected="true"] { border-color: var(--gold); background: rgba(255, 196, 61, .14); color: var(--gold-soft); font-weight: 780; }
.picker-cell[data-outside="true"], .picker-cell:disabled { opacity: .3; }
.picker-cell .picker-check { flex: 0 0 11px; width: 11px; height: 11px; margin-left: 0; }

.picker-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 0 2px 3px; }
.picker-weekdays span { color: var(--quiet); font-size: .62rem; font-weight: 760; letter-spacing: .04em; text-align: center; }
.picker-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.picker-day {
  position: relative; display: grid; place-items: center;
  height: 32px; min-height: 30px;
  border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--text); font-size: .8rem; font-weight: 620;
  font-variant-numeric: tabular-nums;
}
.picker-day:hover:not(:disabled) { background: rgba(255, 196, 61, .09); }
.picker-day[data-outside="true"] { color: var(--quiet); opacity: .5; }
.picker-day[data-selected="true"] { border-color: var(--gold); background: var(--gold); color: var(--gold-ink); font-weight: 800; }
.picker-day[data-today="true"]:not([data-selected="true"]) { border-color: rgba(255, 196, 61, .6); color: var(--gold-soft); }
.picker-day:disabled { opacity: .22; cursor: default; }

.picker-time { display: flex; align-items: flex-end; justify-content: center; gap: 8px; padding: 8px 4px 2px; }
.picker-timebox { display: grid; gap: 3px; justify-items: center; }
.picker-timelabel { color: var(--quiet); font-size: .62rem; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.picker-timerow { display: flex; align-items: center; gap: 5px; }
.picker-timenum { min-width: 2.1ch; color: var(--gold-soft); font-size: 1.28rem; font-weight: 800; font-variant-numeric: tabular-nums; text-align: center; }
.picker-colon { padding-bottom: 4px; color: var(--muted); font-size: 1.15rem; font-weight: 800; }
.picker-step {
  display: grid; place-items: center; width: 30px; height: 30px;
  border: 1px solid rgba(255, 196, 61, .4); border-radius: 999px;
  background: rgba(255, 196, 61, .07); color: var(--gold-soft);
}
.picker-step svg { width: 13px; height: 13px; }
.picker-step:hover, .picker-step:active { border-color: var(--gold); background: rgba(255, 196, 61, .16); }
.picker-footer { display: flex; gap: 6px; margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line); }
.picker-now {
  flex: 0 0 auto; min-height: 34px; padding: 5px 12px;
  border: 0; border-radius: 9px; background: transparent;
  color: var(--gold-soft); font-size: .78rem; font-weight: 740;
}
.picker-now:hover { background: rgba(255, 196, 61, .09); }
.picker-done {
  flex: 1; min-height: 38px; padding: 7px 12px;
  border: 0; border-radius: 999px; background: var(--gold);
  color: var(--gold-ink); font-size: .85rem; font-weight: 800;
}
.picker-done:hover { background: var(--gold-soft); }

/* ---------- Toasts ---------- */
.toast-stack {
  position: fixed; z-index: 60;
  left: 10px; right: 10px; bottom: calc(62px + env(safe-area-inset-bottom));
  display: grid; gap: 6px; justify-items: center;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  max-width: 430px; width: fit-content;
  padding: 8px 13px;
  border: 1px solid rgba(255, 196, 61, .45); border-radius: 999px;
  background: rgba(18, 16, 10, .96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
  color: var(--text); font-size: .8rem; font-weight: 680;
  animation: toast-in .28s cubic-bezier(.2, .8, .3, 1.15) both;
}
.toast[data-tone="success"] { border-color: rgba(100, 216, 148, .5); }
.toast[data-tone="error"] { border-color: rgba(255, 119, 109, .55); }
.toast-dot { flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.toast[data-tone="success"] .toast-dot { background: var(--good); }
.toast[data-tone="error"] .toast-dot { background: var(--error); }
.toast.toast-out { animation: toast-out .22s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px) scale(.95); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Bottom sheet (visit detail, confirms) ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  animation: fade-in .2s ease;
}
.sheet {
  position: fixed; z-index: 56;
  left: 50%; bottom: 0;
  width: min(100%, 480px);
  max-height: 78vh; overflow-y: auto;
  padding: 8px 15px calc(13px + env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 196, 61, .4); border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, #16140f, #0c0b08);
  box-shadow: 0 -18px 60px rgba(0, 0, 0, .6);
  transform: translate(-50%, 100%);
  transition: transform .26s cubic-bezier(.25, .9, .3, 1);
}
.sheet.sheet-live { transform: translate(-50%, 0); }
.sheet-grab { width: 38px; height: 4px; margin: 2px auto 9px; border-radius: 99px; background: rgba(255, 196, 61, .35); }
.sheet-title { margin: 0 0 3px; font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; }
.sheet-sub { margin: 0 0 9px; color: var(--muted); font-size: .8rem; }
.sheet-rows { display: grid; margin: 0 0 10px; }
.sheet-row { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.sheet-row:first-child { border-top: 0; }
.sheet-row-label { flex: 0 0 92px; color: var(--quiet); font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.sheet-row-value { flex: 1; min-width: 0; font-size: .86rem; overflow-wrap: anywhere; }
.sheet-row-value.gold { color: var(--gold-soft); font-weight: 740; }
.sheet-actions { display: flex; gap: 8px; }
.sheet-actions .button { flex: 1; }

/* ---------- Skeleton loading ---------- */
@keyframes shimmer { from { background-position: -320px 0; } to { background-position: 320px 0; } }
.skeleton-card, .skeleton-line, .skeleton-block {
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(255,255,255,.045) 24%, rgba(255,196,61,.1) 48%, rgba(255,255,255,.045) 72%);
  background-size: 640px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
.skeleton-card { min-height: 62px; border: 1px solid var(--line); }
.skeleton-line { height: 13px; margin: 9px 0; }
.skeleton-block { height: 90px; margin: 9px 0; }
.skeleton-row { display: flex; gap: 12px; align-items: center; }
.skeleton-chip { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 10px; }

/* ---------- Charts ---------- */
.chart-mount { margin: 9px 0 3px; min-height: 32px; }
.chart { display: block; width: 100%; height: auto; }
.chart-empty { display: grid; justify-items: center; gap: 6px; padding: 14px 10px 10px; }
.chart-empty-line { width: 44px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .6; }
.chart-empty p { margin: 0; color: var(--quiet); font-size: .78rem; }
.chart-mount-donut { display: flex; justify-content: center; }
.chart-mount-donut .chart-donut { max-width: 118px; }
.chart-hot { filter: drop-shadow(0 0 5px rgba(255, 217, 120, .55)); }

/* ---------- Home hero ---------- */
.home-hero { border-color: rgba(255, 196, 61, .26); background: linear-gradient(165deg, rgba(255, 196, 61, .09), rgba(255, 255, 255, .02) 55%); }
#home-title .badge { margin-left: 8px; vertical-align: 3px; }
.home-elapsed { color: var(--gold-soft); font-size: .9rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.home-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.home-stat {
  position: relative; display: grid; gap: 1px;
  padding: 7px 9px 6px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(0, 0, 0, .26);
}
.home-stat-value { color: var(--gold-soft); font-size: 1.02rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.home-stat-label { color: var(--quiet); font-size: .6rem; font-weight: 720; letter-spacing: .04em; text-transform: uppercase; }
.home-spark { position: absolute; right: 6px; bottom: 6px; width: 38px; opacity: .8; }
.home-spark .chart-spark { width: 38px; }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-top: 9px; }
.week-cell {
  display: grid; justify-items: center; gap: 1px;
  padding: 5px 1px 4px;
  border: 1px solid transparent; border-radius: 9px;
  background: transparent; color: var(--muted); font-size: .6rem; font-weight: 720;
}
.week-cell-day { font-size: .85rem; font-weight: 760; color: var(--text); font-variant-numeric: tabular-nums; }
.week-cell-dot { width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.week-cell[data-worked="true"] .week-cell-dot { background: var(--gold); }
.week-cell[data-today="true"] { border-color: rgba(255, 196, 61, .55); color: var(--gold-soft); }
.week-cell[data-today="true"] .week-cell-day { color: var(--gold-soft); }
.week-cell[aria-selected="true"] { border-color: var(--gold); background: rgba(255, 196, 61, .12); }
.week-cell:hover { background: rgba(255, 196, 61, .08); }
.home-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 9px; }
.home-warning {
  display: flex; align-items: center; gap: 8px;
  margin-top: 9px; padding: 7px 11px;
  border: 1px solid rgba(255, 196, 61, .4); border-radius: 11px;
  background: rgba(255, 196, 61, .07);
}
.home-warning p { margin: 0; color: var(--gold-soft); font-size: .78rem; font-weight: 650; }
.home-warning-dot { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: pulse-dot 1.8s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 196, 61, .4); } 50% { opacity: .6; box-shadow: 0 0 0 5px rgba(255, 196, 61, 0); } }
.home-timeline { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.home-timeline-title { margin: 0 0 5px; color: var(--quiet); font-size: .64rem; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.home-timeline-list { display: grid; gap: 1px; }
.home-tick { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.home-tick-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--gold); }
.home-tick-dot[data-kind="out"] { background: var(--gold); }
.home-tick-time { flex: 0 0 40px; color: var(--gold-soft); font-size: .8rem; font-weight: 760; font-variant-numeric: tabular-nums; }
.home-tick-label { flex: 1; color: var(--muted); font-size: .78rem; }
.home-tick-rel { color: var(--quiet); font-size: .66rem; }

/* ---------- Heatmap & deltas ---------- */
.heatmap { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin: 9px 0 3px; }
.heat-cell {
  display: grid; place-items: center;
  height: 26px; min-height: 24px;
  border: 1px solid var(--line); border-radius: 7px;
  background: rgba(255, 255, 255, .03); color: var(--quiet);
  font-size: .6rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.heat-cell[data-level="1"] { background: rgba(255, 196, 61, .14); border-color: rgba(255, 196, 61, .3); color: var(--gold-soft); }
.heat-cell[data-level="2"] { background: rgba(255, 196, 61, .3); border-color: rgba(255, 196, 61, .5); color: var(--gold-soft); }
.heat-cell[data-level="3"] { background: rgba(255, 196, 61, .55); border-color: var(--gold); color: var(--gold-ink); }
.heat-cell[data-level="4"] { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); font-weight: 800; }
.heat-cell[data-today="true"] { outline: 1.5px solid rgba(255, 217, 120, .8); outline-offset: 1px; }
.heat-cell[data-warn="true"] { border-color: rgba(255, 119, 109, .6); }
button.heat-cell:hover { border-color: var(--gold); }
.week-delta, .month-delta { margin: 6px 0 0; color: var(--gold-soft); font-size: .78rem; font-weight: 700; }
.month-delta[data-down="true"] { color: var(--muted); }
.month-days-left { margin: 6px 0 0; color: var(--quiet); font-size: .74rem; font-weight: 650; }

/* ---------- Chips & segmented ---------- */
.chip-row { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.chip {
  min-height: 29px; padding: 4px 12px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(255, 255, 255, .04); color: var(--muted);
  font-size: .75rem; font-weight: 720;
  transition: border-color .16s, background-color .16s, color .16s;
}
.chip[aria-pressed="true"] { border-color: var(--gold); background: rgba(255, 196, 61, .14); color: var(--gold-soft); }
.chip:hover { border-color: rgba(255, 196, 61, .5); }
.segmented {
  display: inline-flex; gap: 2px; margin-top: 3px;
  padding: 2px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(255, 255, 255, .045);
}
.segmented-item {
  min-height: 27px; padding: 3px 14px;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--muted); font-size: .75rem; font-weight: 740;
}
.segmented-item[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); }
.field-search input { min-height: 38px; font-size: 16px; }
.field-search { margin-top: 8px; }

/* ---------- Top services, pay breakdown ---------- */
.top-services { display: grid; gap: 3px; margin-top: 9px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .025); }
.top-services-title { margin: 0 0 2px; color: var(--quiet); font-size: .62rem; font-weight: 760; letter-spacing: .07em; text-transform: uppercase; }
.top-service { display: flex; align-items: center; gap: 7px; font-size: .78rem; }
.top-service-rank { flex: 0 0 15px; color: var(--gold); font-weight: 800; font-variant-numeric: tabular-nums; }
.top-service-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-service-count { color: var(--gold-soft); font-weight: 740; font-variant-numeric: tabular-nums; }
.pay-breakdown { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; margin-top: 9px; }
.pay-breakdown-legend { display: grid; gap: 4px; }
.legend-row { display: flex; align-items: center; gap: 7px; font-size: .75rem; }
.legend-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 3px; }
.legend-label { flex: 1; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-value { color: var(--gold-soft); font-weight: 740; font-variant-numeric: tabular-nums; }
.legend-missing { color: var(--quiet); font-size: .7rem; }

/* ---------- Expandable rows ---------- */
.expand-card { cursor: pointer; }
.expand-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .26s ease; }
.expand-wrap[data-open="true"] { grid-template-rows: 1fr; }
.expand-inner { overflow: hidden; min-height: 0; }
.expand-detail { display: grid; gap: 4px; padding: 6px 2px 3px; border-top: 1px dashed var(--line); margin-top: 6px; }
.expand-detail .sheet-row { flex-direction: column; align-items: flex-start; gap: 1px; padding: 2px 0; border-top: 0; }
.expand-detail .sheet-row-label { flex: none; }
.expand-chevron { color: var(--gold); font-size: 1rem; transition: transform .24s ease; }
.expand-card[aria-expanded="true"] .expand-chevron { transform: rotate(90deg); }

/* ---------- States, retry, misc polish ---------- */
.empty-state { display: grid; justify-items: center; gap: 6px; padding: 16px 12px 12px; text-align: center; }
.empty-state-line { width: 44px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .55; }
.empty-state p { margin: 0; color: var(--quiet); font-size: .8rem; max-width: 30ch; }
.retry-block { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding: 8px 11px; border: 1px solid rgba(255, 119, 109, .35); border-radius: 11px; background: rgba(255, 119, 109, .05); }
.retry-block p { margin: 0; color: var(--error); font-size: .78rem; flex: 1; }
.tab-panel { animation: tab-in .22s ease; }
@keyframes tab-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
.card-list .card { animation: card-in .38s cubic-bezier(.2, .7, .3, 1) backwards; }
.card-list .card:nth-child(2) { animation-delay: .04s; }
.card-list .card:nth-child(3) { animation-delay: .08s; }
.card-list .card:nth-child(4) { animation-delay: .12s; }
.card-list .card:nth-child(5) { animation-delay: .16s; }
.card-list .card:nth-child(6) { animation-delay: .2s; }
.card-list .card:nth-child(7) { animation-delay: .24s; }
.card-list .card:nth-child(8) { animation-delay: .28s; }
.card-list .card:nth-child(n+9) { animation-delay: .32s; }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.pay-total-value { font-variant-numeric: tabular-nums; }

/* ---------- Sync age, pull-to-refresh, sticky strips, copy card ---------- */
.connection-sync { flex: 0 0 auto; color: var(--quiet); font-size: .9em; }
.ptr {
  position: fixed; z-index: 25;
  top: calc(60px + env(safe-area-inset-top)); left: 50%;
  display: flex; align-items: center; gap: 7px;
  padding: 6px 13px;
  border: 1px solid rgba(255, 196, 61, .5); border-radius: 999px;
  background: rgba(16, 14, 9, .95);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
  color: var(--gold-soft); font-size: .74rem; font-weight: 740;
  transform: translateX(-50%);
}
.ptr[data-state="ready"] { border-color: var(--gold); background: rgba(38, 30, 10, .97); }
.ptr-spinner { display: none; width: 13px; height: 13px; border: 2px solid #756442; border-top-color: var(--gold); border-radius: 50%; }
.ptr[data-state="loading"] .ptr-spinner { display: block; animation: spin .8s linear infinite; }
.shift-hint {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px; padding: 7px 11px;
  border: 1px solid var(--line); border-radius: 11px;
  background: rgba(255, 255, 255, .03);
}
.shift-hint-dot { flex: 0 0 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.shift-hint p { margin: 0; color: var(--muted); font-size: .78rem; }
.heat-hint { margin: 7px 0 0; color: var(--quiet); font-size: .68rem; }
.sticky-strip {
  position: sticky; z-index: 6; top: 6px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 8px; padding: 5px 5px 5px 12px;
  border: 1px solid rgba(255, 196, 61, .32); border-radius: 999px;
  background: rgba(13, 12, 9, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.sticky-strip-total { color: var(--gold-soft); font-size: .74rem; font-weight: 760; font-variant-numeric: tabular-nums; white-space: nowrap; }
.segmented-mini { flex: 0 0 auto; margin-top: 0; }
.segmented-mini .segmented-item { min-height: 24px; padding: 2px 10px; font-size: .68rem; }
.heading-actions { display: flex; gap: 4px; flex: 0 0 auto; }
.copy-card {
  margin: 0; padding: 9px 11px;
  border: 1px dashed rgba(255, 196, 61, .5); border-radius: 11px;
  background: rgba(255, 196, 61, .06);
  color: var(--text); font-size: .85rem;
  user-select: text; -webkit-user-select: text;
}

/* Delight: tab icon pop on switch + one-shot grab-bar pulse.
   CSS-only (CSP-safe); the prefers-reduced-motion block flattens both. */
.tabbar-item[aria-current="page"] svg { animation: tab-pop .34s cubic-bezier(.2, .8, .35, 1.25); }
@keyframes tab-pop {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-4px) scale(1.14); }
  100% { transform: translateY(0) scale(1); }
}
.sheet.sheet-live .sheet-grab { animation: grab-pulse 1s ease .2s 1; }
@keyframes grab-pulse {
  0% { transform: scaleX(1); opacity: .7; }
  40% { transform: scaleX(1.45); opacity: 1; }
  100% { transform: scaleX(1); opacity: .85; }
}
.row-flash { animation: row-flash 1.4s ease both; }
@keyframes row-flash { 0% { background: rgba(255, 196, 61, .22); } 100% { background: transparent; } }
.row-highlight { outline: 2px solid rgba(255, 196, 61, .6); outline-offset: -2px; border-radius: 12px; }

.button { position: relative; }
.button.is-loading { pointer-events: none; }
.button.is-loading > * { opacity: 0; }
.button.is-loading { color: transparent !important; }
.button.is-loading::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 19px; height: 19px; margin: -9.5px 0 0 -9.5px;
  border: 2px solid rgba(0, 0, 0, .25); border-top-color: var(--gold-ink);
  border-radius: 50%; animation: spin .7s linear infinite;
}
.button-attendance.is-loading::after, .button-quiet.is-loading::after { border-color: rgba(255, 255, 255, .18); border-top-color: var(--gold); }

.section-heading { position: sticky; top: 0; z-index: 5; padding: 3px 0; margin: -3px 0 0; border-radius: 10px; }

.logout-button { flex: 0 0 auto; min-height: 32px; padding: 5px 11px; font-size: .72rem; border-radius: 999px; }
.site-header .logout-button[hidden] { display: none; }

.picker-field:focus-visible, .picker-option:focus-visible, .picker-cell:focus-visible,
.picker-day:focus-visible, .picker-nav:focus-visible, .picker-step:focus-visible,
.picker-now:focus-visible, .picker-done:focus-visible, .chip:focus-visible,
.segmented-item:focus-visible, .week-cell:focus-visible, .heat-cell:focus-visible {
  outline: 3px solid rgba(255, 196, 61, .5); outline-offset: 2px;
}

@media (max-width: 390px) {
  .home-stat-value { font-size: .95rem; }
  .picker-timenum { font-size: 1.2rem; }
  .pay-breakdown { grid-template-columns: 1fr; justify-items: center; }
}

/* Legend palette mirrors charts.js donut order (no inline styles — CSP). */
.legend-dot-0 { background: #ffc43d; }
.legend-dot-1 { background: #ffd978; }
.legend-dot-2 { background: #c99731; }
.legend-dot-3 { background: #7a5f22; }
.legend-dot-4 { background: #64d894; }
.legend-dot-5 { background: #87857f; }

.manage-punch-editing { flex-wrap: wrap; }
.manage-edit-buttons { display: flex; gap: 6px; margin-left: auto; }
.manage-punch-editing .picker { flex: 1 1 46%; }
