/* Hour Meter — Local 825 work log
   Concrete page, track-black ink, machine-yellow action, meter-red double time.
   Type: Big Shoulders (headings, meter digits, big numbers) + Atkinson Hyperlegible Next (everything you read). */

@font-face {
  font-family: 'Atkinson Next';
  src: url('../fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Big Shoulders';
  src: url('../fonts/big-shoulders-display-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Big Shoulders Stencil';
  src: url('../fonts/big-shoulders-stencil-display-latin-800-normal.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --page: #e8e9e4;
  --panel: #f9f9f6;
  --panel-2: #f0f1ec;
  --ink: #1d2125;
  --ink-2: #51575e;
  --ink-3: #7a8087;
  --line: #d3d6cf;
  --line-strong: #a9ada6;
  --yellow: #f2b417;
  --yellow-edge: #a8780a;
  --red: #be2e1e;
  --blue: #2b5c86;
  --green: #2f7a4b;
  --drum: #1a1c1f;
  --drum-red: #b3261e;
  --bezel: #2b2f34;
  --bar: #1d2125;
  --bar-ink: #c4c9ce;
  --ot-bg: #fbe6a6;
  --ot-ink: #74500a;
  --dt-bg: #f6d3cc;
  --dt-ink: #962315;
  --tr-bg: #d6e3ef;
  --tr-ink: #20507a;
  --off-bg: #dfe0db;
  --off-ink: #51575e;
  --shadow: 0 1px 2px rgba(29, 33, 37, 0.08);
  --fs-xs: 0.8rem;
  --fs-sm: 0.9rem;
  --fs-md: 1rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.6rem;
  --fs-2xl: 2.1rem;
  --fs-3xl: 2.7rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --page: #16181a;
    --panel: #202326;
    --panel-2: #1a1d1f;
    --ink: #ecede7;
    --ink-2: #a5abb1;
    --ink-3: #7d838a;
    --line: #33383d;
    --line-strong: #4b5157;
    --yellow: #f5be2e;
    --yellow-edge: #8c6306;
    --red: #e35a44;
    --blue: #7aa9d6;
    --green: #5fb57f;
    --drum: #0e0f11;
    --bezel: #2d3237;
    --bar: #0e0f11;
    --ot-bg: #463710;
    --ot-ink: #f3cf6e;
    --dt-bg: #4a1d17;
    --dt-ink: #f3a093;
    --tr-bg: #1c2f41;
    --tr-ink: #a2c6e8;
    --off-bg: #2b2f33;
    --off-ink: #a5abb1;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --page: #16181a;
  --panel: #202326;
  --panel-2: #1a1d1f;
  --ink: #ecede7;
  --ink-2: #a5abb1;
  --ink-3: #7d838a;
  --line: #33383d;
  --line-strong: #4b5157;
  --yellow: #f5be2e;
  --yellow-edge: #8c6306;
  --red: #e35a44;
  --blue: #7aa9d6;
  --green: #5fb57f;
  --drum: #0e0f11;
  --bezel: #2d3237;
  --bar: #0e0f11;
  --ot-bg: #463710;
  --ot-ink: #f3cf6e;
  --dt-bg: #4a1d17;
  --dt-ink: #f3a093;
  --tr-bg: #1c2f41;
  --tr-ink: #a2c6e8;
  --off-bg: #2b2f33;
  --off-ink: #a5abb1;
  --shadow: none;
  color-scheme: dark;
}

/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 var(--fs-md) / 1.45 'Atkinson Next', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.sheet-open {
  overflow: hidden;
}
#app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
}
.screen {
  padding: 4px 16px calc(112px + env(safe-area-inset-bottom));
}
body.focus-mode .screen {
  padding-bottom: calc(132px + env(safe-area-inset-bottom));
}
p {
  margin: 0 0 12px;
}
a {
  color: var(--blue);
}
.lede {
  color: var(--ink-2);
  max-width: 34em;
}
.muted {
  color: var(--ink-2);
}
.small {
  font-size: var(--fs-sm);
}
.tnum {
  font-variant-numeric: tabular-nums;
}
.nowrap {
  white-space: nowrap;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}
.btn-primary:focus-visible,
.tab-log:focus-visible .knob {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- headings ---------- */
.title {
  font-family: 'Big Shoulders', 'Atkinson Next', sans-serif;
  font-weight: 800;
  font-size: var(--fs-3xl);
  line-height: 0.95;
  letter-spacing: 0.005em;
  margin: 10px 0 14px;
}
.sec {
  font-family: 'Big Shoulders', 'Atkinson Next', sans-serif;
  font-weight: 760;
  font-size: var(--fs-xl);
  line-height: 1;
  margin: 30px 0 10px;
}
.sec-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 30px 0 10px;
}
.sec-row .sec {
  margin: 0;
}
h3 {
  font-size: var(--fs-md);
  font-weight: 700;
  margin: 0;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(10px, env(safe-area-inset-top)) 16px 0;
  min-height: 58px;
}
.wordmark {
  font-family: 'Big Shoulders Stencil', 'Big Shoulders', sans-serif;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: var(--panel);
  font: 800 0.95rem / 1 'Atkinson Next', sans-serif;
  display: grid;
  place-items: center;
  text-decoration: none;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  min-height: 44px;
  background: none;
  border: 0;
  font-size: var(--fs-md);
  padding: 0 8px 0 0;
  cursor: pointer;
}

/* ---------- the hour meter ---------- */
.meter {
  display: inline-flex;
  align-items: flex-end;
  gap: 12px;
}
.meter-window {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  background: var(--bezel);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), inset 0 2px 0 rgba(255, 255, 255, 0.06), 0 2px 0 rgba(0, 0, 0, 0.18);
}
.drum {
  --h: 66px;
  position: relative;
  display: block;
  width: 46px;
  height: var(--h);
  overflow: hidden;
  background: var(--drum);
  border-radius: 4px;
  color: #f2f2ec;
  font-family: 'Big Shoulders', sans-serif;
  font-weight: 700;
  font-size: 56px;
  line-height: var(--h);
  text-align: center;
}
.drum::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0) 30%, rgba(255, 255, 255, 0.05) 50%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.6));
}
.drum-tenth {
  background: var(--drum-red);
}
.strip {
  display: block;
  transform: translateY(calc(var(--d) * -1 * var(--h)));
  transition: transform 1.2s cubic-bezier(0.18, 0.75, 0.2, 1);
}
.meter.no-anim .strip {
  transition: none;
}
.strip span {
  display: block;
  height: var(--h);
}
.drum:nth-child(2) .strip {
  transition-delay: 70ms;
}
.drum:nth-child(3) .strip {
  transition-delay: 140ms;
}
.drum-tenth .strip {
  transition-delay: 260ms;
  transition-duration: 1.5s;
}
.meter-point {
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: #d9d9d2;
  align-self: flex-end;
  margin: 0 1px 8px;
}
.meter-cap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink-2);
  font-size: var(--fs-sm);
  font-weight: 700;
  padding-bottom: 6px;
}
.meter-cap svg {
  width: 22px;
  height: 22px;
}
.meter-sm .meter-window {
  padding: 5px;
  gap: 3px;
  border-radius: 8px;
}
.meter-sm .drum {
  --h: 36px;
  width: 26px;
  font-size: 30px;
  border-radius: 3px;
}
.meter-sm .meter-point {
  margin-bottom: 5px;
  width: 4px;
  height: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .strip {
    transition: none !important;
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1.5px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink);
  font: 700 var(--fs-md) / 1.1 'Atkinson Next', sans-serif;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}
.btn svg {
  width: 20px;
  height: 20px;
}
.btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.btn-primary {
  background: var(--yellow);
  border-color: transparent;
  color: #1d2125;
  min-height: 58px;
  border-radius: 14px;
  font-size: var(--fs-lg);
  box-shadow: 0 3px 0 var(--yellow-edge);
}
.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--yellow-edge);
}
.btn-ink {
  background: var(--ink);
  color: var(--panel);
  border-color: transparent;
}
.btn-quiet {
  background: transparent;
}
.btn-danger {
  background: var(--red);
  color: #fff;
  border-color: transparent;
}
.btn-block {
  display: flex;
  width: 100%;
}
.btn-sm {
  min-height: 38px;
  padding: 0 12px;
  font-size: var(--fs-sm);
  border-radius: 10px;
}
.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.btn-row > .btn {
  flex: 1;
}
.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
}
.link {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

/* ---------- form controls ---------- */
.field {
  display: block;
  margin: 16px 0;
}
.lbl {
  display: block;
  font-weight: 700;
  font-size: var(--fs-sm);
  margin-bottom: 6px;
}
.hint {
  display: block;
  font-size: var(--fs-xs);
  color: var(--ink-2);
  margin-top: 6px;
}
input,
select,
textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  font: 400 var(--fs-md) / 1.3 'Atkinson Next', sans-serif;
  -webkit-appearance: none;
  appearance: none;
}
input::placeholder,
textarea::placeholder {
  color: var(--ink-3);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--ot-bg);
}
select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%237a8087' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.5;
}
input[type='time'],
input[type='date'],
input[type='number'] {
  font-variant-numeric: tabular-nums;
}
input::-webkit-date-and-time-value {
  text-align: left;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.grid3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.grid2 .field,
.grid3 .field {
  margin: 0;
}
.grid2 > *,
.grid3 > * {
  min-width: 0;
}
input,
select,
textarea {
  max-width: 100%;
  min-width: 0;
}
.field-group {
  margin: 16px 0;
}

/* segmented control */
.seg {
  display: flex;
  background: var(--panel-2);
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
}
.seg button {
  flex: 1;
  min-height: 46px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font: 700 var(--fs-sm) / 1.1 'Atkinson Next', sans-serif;
  cursor: pointer;
  padding: 0 4px;
}
.seg button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--panel);
}

/* chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink);
  font: 700 var(--fs-sm) / 1 'Atkinson Next', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.chip[aria-pressed='true'],
.chip.on {
  background: var(--ink);
  color: var(--panel);
  border-color: var(--ink);
}
.chips.scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 2px 16px 6px;
}
.chips.scroll::-webkit-scrollbar {
  display: none;
}

/* toggle switch rows */
.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.switch .txt {
  flex: 1;
}
.switch .txt b {
  display: block;
}
.switch .txt span {
  display: block;
  font-size: var(--fs-xs);
  color: var(--ink-2);
}
input.tog {
  flex: none;
  width: 54px;
  min-height: 0;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: var(--line-strong);
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}
input.tog::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}
input.tog:checked {
  background: var(--green);
}
input.tog:checked::before {
  transform: translateX(22px);
}
input.tog:focus {
  box-shadow: none;
}
input.tog:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* stepper (− value +) */
.stepper {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
}
.stepper button {
  width: 52px;
  border: 0;
  background: var(--panel-2);
  color: var(--ink);
  font: 700 1.4rem/1 'Atkinson Next', sans-serif;
  cursor: pointer;
}
.stepper input {
  border: 0;
  border-radius: 0;
  text-align: center;
  min-height: 50px;
}
.stepper input:focus {
  box-shadow: none;
}

/* ---------- panels, rows, tags ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.panel + .panel {
  margin-top: 12px;
}
.rows {
  border-top: 2px solid var(--ink);
}
.rows.plain {
  border-top: 0;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 2px;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  background: none;
  width: 100%;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  font: inherit;
  text-align: left;
}
button.row,
a.row {
  cursor: pointer;
}
button.row:active,
a.row:active {
  background: var(--panel-2);
}
.row .main {
  flex: 1;
  min-width: 0;
}
.row .t {
  font-weight: 700;
  display: block;
}
.row .s {
  display: block;
  color: var(--ink-2);
  font-size: var(--fs-sm);
  overflow-wrap: anywhere;
}
.row .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}
.row .end {
  text-align: right;
  font-variant-numeric: tabular-nums;
  flex: none;
}
.row .end .t {
  font-weight: 800;
}
.row > svg {
  flex: none;
  color: var(--ink-2);
}
.row-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--panel-2);
  display: grid;
  place-items: center;
  flex: none;
  color: var(--ink);
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  border: 1px solid transparent;
}
.tag.job {
  background: var(--panel-2);
  border-color: var(--line-strong);
  color: var(--ink);
}
.tag.practice,
.tag.class {
  background: var(--tr-bg);
  color: var(--tr-ink);
}
.tag.off {
  background: var(--off-bg);
  color: var(--off-ink);
}
.tag.ot {
  background: var(--ot-bg);
  color: var(--ot-ink);
}
.tag.dt,
.tag.warn {
  background: var(--dt-bg);
  color: var(--dt-ink);
}
.tag.ok {
  background: var(--tr-bg);
  color: var(--tr-ink);
}
.cls {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--panel);
  font-family: 'Big Shoulders', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1;
  flex: none;
}
.cls.lg {
  min-width: 44px;
  height: 44px;
  font-size: 1.5rem;
  border-radius: 8px;
}
.badge {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
}
.note {
  background: var(--ot-bg);
  color: var(--ot-ink);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: var(--fs-sm);
  margin: 12px 0;
}
.note.info {
  background: var(--tr-bg);
  color: var(--tr-ink);
}
.note.err {
  background: var(--dt-bg);
  color: var(--dt-ink);
}
.empty {
  padding: 22px 0 8px;
  color: var(--ink-2);
}
.empty p {
  margin-bottom: 14px;
}
details.more {
  margin: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
details.more > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  font-weight: 700;
}
details.more > summary::-webkit-details-marker {
  display: none;
}
details.more > summary::after {
  content: '+';
  font: 700 1.5rem/1 'Atkinson Next', sans-serif;
  color: var(--ink-2);
}
details.more[open] > summary::after {
  content: '–';
}
details.more .inner {
  padding-bottom: 12px;
}
.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-variant-numeric: tabular-nums;
}
.kv:last-child {
  border-bottom: 0;
}
.kv .k {
  color: var(--ink-2);
}
.kv.total {
  border-top: 2px solid var(--ink);
  border-bottom: 0;
  font-weight: 800;
  font-size: var(--fs-lg);
  padding-top: 12px;
  margin-top: 4px;
}
.kv.total .k {
  color: var(--ink);
}
.big-num {
  font-family: 'Big Shoulders', sans-serif;
  font-weight: 800;
  font-size: var(--fs-3xl);
  line-height: 1;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.mid-num {
  font-family: 'Big Shoulders', sans-serif;
  font-weight: 800;
  font-size: var(--fs-xl);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ot-ink {
  color: var(--ot-ink);
}
.dt-ink {
  color: var(--dt-ink);
}
.zero {
  color: var(--ink-3);
}

/* ---------- home ---------- */
.week-hero {
  margin-top: 6px;
}
.week-hero .when {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 14px 0 0;
  color: var(--ink-2);
  font-weight: 700;
  font-size: var(--fs-sm);
}
.lamps {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 10px;
}
.lamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--ink-2);
  text-decoration: none;
}
.lamp i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  display: block;
}
.lamp.today {
  color: var(--ink);
}
.lamp.today i {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.lamp i.st {
  background: var(--ink);
  border-color: var(--ink);
}
.lamp i.ot {
  background: var(--yellow);
  border-color: var(--yellow-edge);
}
.lamp i.dt {
  background: var(--red);
  border-color: var(--red);
}
.lamp i.tr {
  background: var(--blue);
  border-color: var(--blue);
}
.lamp i.off {
  background: var(--off-bg);
  border-color: var(--line-strong);
}
.pay-strip {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 18px;
  padding-top: 16px;
  border-top: 2px solid var(--ink);
}
.pay-strip .lbl {
  margin-bottom: 4px;
  color: var(--ink-2);
}
.hours-split {
  display: flex;
  gap: 14px;
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-sm);
  color: var(--ink-2);
  text-align: right;
}
.hours-split b {
  display: block;
  color: var(--ink);
  font-family: 'Big Shoulders', sans-serif;
  font-size: 1.5rem;
  line-height: 1;
}
.site-note {
  margin-top: 8px;
}

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: var(--bar);
  color: var(--bar-ink);
  padding-bottom: env(safe-area-inset-bottom);
}
body.focus-mode .tabbar,
body.auth-mode .tabbar {
  display: none;
}
.tabbar-inner {
  max-width: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 66px;
}
.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: inherit;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}
.tab[aria-current='page'] {
  color: var(--yellow);
}
.tab .badge {
  position: absolute;
  top: 6px;
  left: calc(50% + 6px);
  min-width: 18px;
  height: 18px;
  font-size: 11px;
}
.tab-log .knob {
  width: 62px;
  height: 62px;
  margin-top: -22px;
  border-radius: 18px;
  background: var(--yellow);
  color: #1d2125;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 0 var(--yellow-edge), 0 8px 18px rgba(0, 0, 0, 0.28);
}
.tab-log .knob svg {
  width: 30px;
  height: 30px;
}
.tab-log[aria-current='page'] {
  color: var(--bar-ink);
}

/* ---------- bottom sheet ---------- */
.sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 50;
}
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 16, 18, 0.55);
  opacity: 0;
  transition: opacity 0.18s;
}
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 560px;
  margin: 0 auto;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-radius: 18px 18px 0 0;
  transform: translateY(100%);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet-wrap.open .sheet {
  transform: translateY(0);
}
.sheet-wrap.open .sheet-backdrop {
  opacity: 1;
}
.sheet-wrap.closing .sheet {
  transform: translateY(100%);
}
.sheet-wrap.closing .sheet-backdrop {
  opacity: 0;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 6px 8px 18px;
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 {
  font-family: 'Big Shoulders', sans-serif;
  font-weight: 800;
  font-size: var(--fs-xl);
  line-height: 1;
  margin: 0;
}
.sheet-body {
  overflow: auto;
  padding: 6px 18px 22px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.sheet .search {
  position: sticky;
  top: 0;
  background: var(--panel);
  padding: 10px 0 8px;
  z-index: 1;
}
.pick-group {
  margin: 14px 0 4px;
  font-weight: 800;
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
@media (prefers-reduced-motion: reduce) {
  .sheet,
  .sheet-backdrop {
    transition: none;
  }
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: fit-content;
  bottom: calc(88px + env(safe-area-inset-bottom));
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--panel);
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  z-index: 70;
  max-width: calc(100% - 32px);
  transition: opacity 0.18s, transform 0.18s;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast.error {
  background: var(--red);
  color: #fff;
}
body.focus-mode .toast {
  bottom: calc(104px + env(safe-area-inset-bottom));
}

/* ---------- log form ---------- */
.log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: max(8px, env(safe-area-inset-top)) 16px 0;
  min-height: 56px;
}
.machine-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.machine-pick .main {
  flex: 1;
  min-width: 0;
}
.machine-pick .t {
  font-weight: 700;
  display: block;
}
.machine-pick .s {
  display: block;
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.machine-pick.empty-pick .t {
  color: var(--ink-3);
}
.duration {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--panel-2);
}
.duration .mid-num {
  font-size: 2rem;
}
.savebar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.06);
}
.savebar-inner {
  max-width: 528px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.savebar .pv {
  flex: 1;
  min-width: 0;
}
.savebar .pv .amt {
  font-family: 'Big Shoulders', sans-serif;
  font-weight: 800;
  font-size: 1.9rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.savebar .pv .sub {
  font-size: var(--fs-xs);
  color: var(--ink-2);
  line-height: 1.3;
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.savebar .pv .sub.warn {
  color: var(--dt-ink);
  font-weight: 700;
}
.savebar .btn-primary {
  min-width: 128px;
}
.rate-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: var(--fs-sm);
  color: var(--ink-2);
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.rate-line b {
  color: var(--ink);
}

/* ---------- calendar ---------- */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0 8px;
}
.cal-head .title {
  margin: 0;
  font-size: var(--fs-2xl);
}
.cal-nav {
  display: flex;
  gap: 4px;
}
.cal-nav .icon-btn {
  background: var(--panel);
  border: 1.5px solid var(--line-strong);
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.cal-dow {
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--ink-2);
  font-weight: 700;
  padding: 4px 0;
}
.cal-day {
  position: relative;
  aspect-ratio: 1 / 1.18;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 5px 5px;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
  min-width: 0;
}
.cal-day.out {
  background: transparent;
  border-color: transparent;
  color: var(--ink-3);
}
.cal-day .dn {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  line-height: 1.1;
}
.cal-day.out .dn {
  color: var(--ink-3);
}
.cal-day .hrs {
  font-family: 'Big Shoulders', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
}
.cal-day .bars {
  display: flex;
  gap: 2px;
  height: 4px;
}
.cal-day .bars i {
  flex: 1;
  border-radius: 2px;
  background: var(--ink);
}
.cal-day .bars i.tr {
  background: var(--blue);
}
.cal-day .bars i.off {
  background: var(--line-strong);
}
.cal-day .bars i.ot {
  background: var(--yellow);
}
.cal-day .bars i.dt {
  background: var(--red);
}
.cal-day.today {
  box-shadow: inset 0 0 0 2px var(--ink);
}
.cal-day.sel {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--panel);
}
.cal-day.sel .dn {
  color: var(--panel);
}
.cal-day.sel .bars i:not(.tr):not(.ot):not(.dt):not(.off) {
  background: var(--panel);
}
.cal-day.hol::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--red);
}
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
  font-size: var(--fs-xs);
  color: var(--ink-2);
}
.cal-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cal-legend i {
  width: 14px;
  height: 4px;
  border-radius: 2px;
  background: var(--ink);
  display: inline-block;
}
.cal-legend i.tr {
  background: var(--blue);
}
.cal-legend i.ot {
  background: var(--yellow);
}
.cal-legend i.dt {
  background: var(--red);
}
.cal-legend i.hol {
  width: 8px;
  height: 8px;
  background: var(--red);
}
.month-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 2px 0 12px;
  color: var(--ink-2);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.month-total b {
  color: var(--ink);
}

/* ---------- pay / time card ---------- */
.week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 0 14px;
}
.week-nav .range {
  font-family: 'Big Shoulders', sans-serif;
  font-weight: 800;
  font-size: var(--fs-xl);
  text-align: center;
  flex: 1;
  line-height: 1;
}
.week-nav .range small {
  display: block;
  font-family: 'Atkinson Next', sans-serif;
  font-weight: 400;
  font-size: var(--fs-xs);
  color: var(--ink-2);
  margin-top: 4px;
}
.tc {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.tc th {
  font-size: var(--fs-xs);
  color: var(--ink-2);
  font-weight: 700;
  text-align: right;
  padding: 6px 3px;
  border-bottom: 2px solid var(--ink);
}
.tc th:first-child,
.tc td:first-child {
  text-align: left;
}
.tc td {
  padding: 11px 3px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-size: var(--fs-sm);
}
.tc td:first-child {
  font-weight: 700;
}
.tc tr.hol td:first-child::after {
  content: ' DT';
  color: var(--dt-ink);
  font-size: var(--fs-xs);
}
.tc tfoot td {
  border-top: 2px solid var(--ink);
  border-bottom: 0;
  font-weight: 800;
}
.tc a {
  color: inherit;
  text-decoration: none;
}
.check-diff {
  margin-top: 10px;
  font-weight: 700;
}

/* ---------- stats ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 12px;
  margin: 8px 0 4px;
}
.stat .lbl {
  color: var(--ink-2);
  margin-bottom: 2px;
}
.hbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.hbar .name {
  font-weight: 700;
  min-width: 0;
  display: flex;
  gap: 8px;
  align-items: center;
}
.hbar .name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hbar .val {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}
.hbar .track {
  grid-column: 1 / -1;
  height: 10px;
  background: var(--panel-2);
  border-radius: 5px;
  overflow: hidden;
  display: flex;
}
.hbar .fill-job {
  background: var(--ink);
}
.hbar .fill-tr {
  background: var(--blue);
}
.cols {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 150px;
  border-bottom: 2px solid var(--ink);
  margin-top: 8px;
}
.col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
}
.col .v {
  font-size: 10px;
  text-align: center;
  color: var(--ink-2);
  font-weight: 700;
  margin-bottom: 3px;
  font-variant-numeric: tabular-nums;
}
.col .stack {
  display: flex;
  flex-direction: column;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
}
.col .stack .j {
  background: var(--ink);
}
.col .stack .t {
  background: var(--blue);
}
.col-labels {
  display: flex;
  gap: 5px;
  margin-top: 4px;
}
.col-labels span {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--ink-2);
  font-weight: 700;
}

/* ---------- tools ---------- */
.calc-out {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.calc-out > div {
  background: var(--panel-2);
  border-radius: 10px;
  padding: 12px 14px;
}
.calc-out .lbl {
  color: var(--ink-2);
  margin-bottom: 2px;
}
.add-row {
  display: grid;
  grid-template-columns: 56px 1fr 44px;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}
.add-row .sign {
  min-height: 52px;
  border-radius: 10px;
  border: 1.5px solid var(--line-strong);
  background: var(--panel);
  font: 800 1.3rem/1 'Atkinson Next', sans-serif;
  color: var(--ink);
  cursor: pointer;
}
.tenths {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-sm);
}
.tenths div {
  background: var(--panel-2);
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
}
.tenths b {
  display: block;
}

/* ---------- auth ---------- */
body.auth-mode {
  background: var(--page);
}
.auth {
  padding: max(28px, env(safe-area-inset-top)) 20px 40px;
  max-width: 460px;
  margin: 0 auto;
}
.auth .wordmark {
  font-size: 2.9rem;
  display: block;
  margin: 22px 0 6px;
}
.auth .tagline {
  color: var(--ink-2);
  margin-bottom: 24px;
}
.auth-meter {
  margin: 18px 0 8px;
}

/* ---------- admin ---------- */
.rate-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.rate-table th {
  text-align: left;
  font-size: var(--fs-xs);
  color: var(--ink-2);
  padding: 6px 4px;
  border-bottom: 2px solid var(--ink);
}
.rate-table td {
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.rate-table td.num,
.rate-table th.num {
  text-align: right;
}
.edit-rows .er {
  display: grid;
  grid-template-columns: 74px 1fr 92px 40px;
  gap: 6px;
  align-items: center;
  margin: 6px 0;
}
.edit-rows .er.fr {
  grid-template-columns: 1fr 96px 40px;
}
.edit-rows input {
  min-height: 46px;
  padding: 10px;
}
.temp-pass {
  font-family: 'Big Shoulders', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: 0.02em;
  background: var(--panel-2);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  margin: 12px 0;
  user-select: all;
}

/* ---------- loading ---------- */
.loading {
  padding: 40px 0;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.loading::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid var(--line-strong);
  border-top-color: var(--ink);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- wider screens ---------- */
@media (min-width: 620px) {
  .screen {
    padding-left: 20px;
    padding-right: 20px;
  }
}
@media (max-width: 360px) {
  html {
    font-size: 16px;
  }
  .drum {
    --h: 58px;
    width: 40px;
    font-size: 48px;
  }
  .tc td,
  .tc th {
    padding-left: 2px;
    padding-right: 2px;
  }
}
