/* Trailmates — "Log a walk" sheet, manual-walk rows, Journal daily-log additions, Settings → Walking.
   Uses the app.css tokens (--p-* page theme follows light/dark). iPhone-first: 44px targets, 16px+ inputs
   (no iOS focus zoom), safe areas, reduced motion. */

:root {
  --lw-seg-bg: rgba(118, 118, 128, 0.12);
  --lw-seg-on: #ffffff;
  --lw-chip-on-text: #ffffff;
  --lw-gold-text: #7a5410;
  --lw-ok: #2fb36d;
}
@media (prefers-color-scheme: dark) {
  :root {
    --lw-seg-bg: rgba(118, 118, 128, 0.24);
    --lw-seg-on: #636366;
    --lw-chip-on-text: #06281c;
    --lw-gold-text: var(--gold);
    --lw-ok: #34c77b;
  }
}

/* ---------------------------------------------------------------- sheet frame */
/* Follows the iOS keyboard (walks.js sets --vv-top / --kb from visualViewport). */
.msheet--walk { top: var(--vv-top, 0px); bottom: var(--kb, 0px); }
.msheet--walk .msheet__panel { padding-bottom: 0; }
.msheet--walk .msheet__head { background: var(--p-bg); padding-bottom: 8px; }
.msheet--walk .msheet__subtitle { color: var(--p-muted); }

.lw { display: flex; flex-direction: column; gap: 16px; padding-top: 0; }
.lw-section { display: flex; flex-direction: column; gap: 8px; min-width: 0; scroll-margin: 70px 0 110px; }
.lw-section--amount { gap: 10px; }
.lw-label { padding: 0 4px; font: 700 12px/1.2 var(--font); letter-spacing: 0.07em; text-transform: uppercase; color: var(--p-muted); }

/* ---------------------------------------------------------------- who */
.lw-who { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 10px; }
.lw-who__opt {
  --bg: var(--p-card);
  position: relative;
  min-width: 0;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 6px 9px;
  border: 2px solid transparent;
  border-radius: 22px;
  background: var(--bg);
  color: var(--p-text);
  box-shadow: 0 0 0 0.5px var(--p-sep), 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.14s var(--ease-out), background-color 0.2s, border-color 0.2s, box-shadow 0.25s;
}
.lw-who__opt:active { transform: scale(0.96); }
.lw-who__opt.is-on {
  --bg: color-mix(in srgb, var(--c) 11%, var(--p-card));
  border-color: var(--c);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--c) 24%, transparent);
}
.lw-who__opt.is-both.is-on {
  --bg: color-mix(in srgb, var(--c2) 11%, var(--p-card));
  border-color: transparent;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--c) 11%, var(--p-card)), color-mix(in srgb, var(--c2) 11%, var(--p-card))) padding-box,
    linear-gradient(120deg, var(--c), var(--c2)) border-box;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--c2) 22%, transparent);
}
.lw-who__avatars { display: flex; align-items: center; }
.lw-who__avatars .avatar { transition: transform 0.25s var(--ease-out); }
.lw-who__avatars .avatar + .avatar { margin-left: -12px; box-shadow: 0 0 0 2.5px var(--bg), 0 2px 6px rgba(0, 0, 0, 0.18); }
.lw-who__opt.is-on .lw-who__avatars .avatar { transform: scale(1.06); }
.lw-who__opt.is-both.is-on .lw-who__avatars .avatar:first-child { transform: translateX(-2px) scale(1.04); }
.lw-who__opt.is-both.is-on .lw-who__avatars .avatar + .avatar { transform: translateX(2px) scale(1.04); }
.lw-who__label { max-width: 100%; padding: 0 4px; font: 650 15px/1.2 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lw-who__check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--c);
  color: #fff;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.18s, transform 0.3s var(--ease-out);
}
.lw-who__opt.is-both .lw-who__check { background: linear-gradient(135deg, var(--c), var(--c2)); box-shadow: 0 0 0 2px var(--bg); }
.lw-who__check .icon svg { width: 11px; height: 11px; }
.lw-who__opt.is-on .lw-who__check { opacity: 1; transform: none; }
.lw-who__opt:focus-visible { outline-offset: 3px; border-radius: 22px; }

/* static "who" in the edit sheet */
.lw-whostatic {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 14px;
  border-radius: 18px;
  background: var(--p-card);
  box-shadow: 0 0 0 0.5px var(--p-sep);
}
.lw-whostatic__name { min-width: 0; font: 650 16px/1.2 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lw-avatars { display: inline-flex; align-items: center; flex: none; }
.lw-avatars .avatar + .avatar { margin-left: -8px; box-shadow: 0 0 0 2px var(--p-card); }
.lw-pill { margin-left: auto; flex: none; padding: 5px 9px; border-radius: 10px; background: var(--p-accent-soft); color: var(--p-accent); font: 700 12px/1 var(--font); }

/* ---------------------------------------------------------------- when */
.lw-when { display: flex; gap: 8px; }
.lw-chip {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  border: 0;
  border-radius: 22px;
  background: var(--p-card);
  color: var(--p-text);
  box-shadow: 0 0 0 0.5px var(--p-sep), 0 1px 3px rgba(0, 0, 0, 0.04);
  font: 600 15px/1 var(--font);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.12s;
}
.lw-chip:active { transform: scale(0.96); }
.lw-chip.is-on { background: var(--p-accent); color: var(--lw-chip-on-text); box-shadow: 0 6px 16px color-mix(in srgb, var(--p-accent) 28%, transparent); }
.lw-chip .icon svg { width: 18px; height: 18px; }
.lw-chip__text { overflow: hidden; text-overflow: ellipsis; }
.lw-chip--date { flex-grow: 1.2; }
.lw-chip--date:focus-within { outline: 3px solid var(--p-accent); outline-offset: 2px; }
/* The real <input type=date> covers the chip (iOS opens its picker on tap); 16px avoids focus zoom. */
.lw-date__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0.011;
  color: transparent;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.lw-date__input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; opacity: 0; cursor: pointer; }

/* ---------------------------------------------------------------- how much */
.lw-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 3px; border-radius: 13px; background: var(--lw-seg-bg); }
.lw-seg__btn {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--p-text);
  font: 600 14.5px/1 var(--font);
  transition: background-color 0.2s, box-shadow 0.2s;
}
.lw-seg__btn.is-on { background: var(--lw-seg-on); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04); }
.lw-seg__btn:focus-visible { outline-offset: -2px; border-radius: 10px; }

.lw-amount {
  --amt: 54px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  min-height: 100px;
  padding: 6px 4px;
  border-radius: 24px;
  background: var(--p-card);
  box-shadow: 0 0 0 0.5px var(--p-sep), 0 1px 3px rgba(0, 0, 0, 0.04);
  cursor: text;
  transition: box-shadow 0.2s;
}
.lw-amount:focus-within { box-shadow: 0 0 0 2px var(--p-accent), 0 0 0 6px var(--p-accent-soft); }
.lw-amount.is-invalid, .lw-amount.is-invalid:focus-within { box-shadow: 0 0 0 2px var(--p-danger), 0 0 0 6px color-mix(in srgb, var(--p-danger) 14%, transparent); }
.lw-amount[data-len="5"] { --amt: 48px; }
.lw-amount[data-len="6"], .lw-amount[data-len="7"] { --amt: 42px; }
.lw-amount__field { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; overflow: hidden; }
.lw-amount__row { display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; }
.lw-amount__input {
  flex: none;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--p-text);
  caret-color: var(--p-accent);
  text-align: center;
  font: 800 var(--amt) / 1.15 var(--font-round);
  letter-spacing: -0.03em;
  -webkit-appearance: none;
  appearance: none;
  transition: font-size 0.15s;
}
.lw-amount__input::placeholder { color: var(--p-muted); opacity: 0.5; }
.lw-amount__input:focus, .lw-amount__input:focus-visible { outline: none; }
.lw-amount__mirror {
  position: absolute;
  left: 0;
  top: 0;
  visibility: hidden;
  white-space: pre;
  pointer-events: none;
  font: 800 var(--amt) / 1.15 var(--font-round);
  letter-spacing: -0.03em;
}
.lw-amount__unit { flex: none; font: 700 20px/1 var(--font-round); color: var(--p-muted); }
.lw-step {
  position: relative;
  justify-self: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--p-accent-soft);
  color: var(--p-accent);
  transition: transform 0.12s, opacity 0.2s;
}
.lw-step__glyph { font: 600 28px/1 var(--font-round); margin-top: -2px; }
.lw-step:active:not(:disabled) { transform: scale(0.9); }
.lw-step:disabled { opacity: 0.3; cursor: default; }

.lw-hint { padding: 0 8px; text-align: center; font: 600 13.5px/1.35 var(--font); color: var(--p-danger); }
.lw-hint:empty { display: none; }

.lw-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.lw-qchip {
  min-height: 44px;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  padding: 13px 4px 0;
  border: 0;
  border-radius: 15px;
  background: var(--p-card);
  color: var(--p-text);
  box-shadow: 0 0 0 0.5px var(--p-sep), 0 1px 3px rgba(0, 0, 0, 0.04);
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.12s;
}
.lw-qchip b { font: 750 17px/1 var(--font-round); }
.lw-qchip span { font: 650 13px/1 var(--font); color: var(--p-muted); }
.lw-qchip:active { transform: scale(0.94); }
.lw-qchip.is-on { background: var(--p-accent-soft); color: var(--p-accent); box-shadow: inset 0 0 0 1.5px var(--p-accent); }
.lw-qchip.is-on span { color: inherit; }

.lw-convert {
  min-height: 18px;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 12px;
  padding: 0 2px;
  text-align: center;
  font: 500 13.5px/1.3 var(--font);
  color: var(--p-muted);
}
.lw-convert__empty { opacity: 0.8; }
.lw-convert b { color: var(--p-text); font-weight: 700; }
.lw-convert__item { white-space: nowrap; }
.lw-dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: var(--c); vertical-align: 1px; }

.lw-impact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(120, 120, 128, 0.1);
  color: var(--p-text);
  font: 600 13.5px/1.35 var(--font);
  text-align: left;
  animation: lw-rise 0.3s var(--ease-out);
}
.lw-impact:empty { display: none; }
.lw-impact__emoji { flex: none; font-size: 17px; font-family: "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.lw-impact.is-gold { background: linear-gradient(100deg, rgba(245, 196, 81, 0.28), rgba(245, 196, 81, 0.12)); color: var(--lw-gold-text); }
.lw-impact.is-muted { color: var(--p-muted); }

/* ---------------------------------------------------------------- note */
.lw-note {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 18px;
  background: var(--p-card);
  box-shadow: 0 0 0 0.5px var(--p-sep), 0 1px 3px rgba(0, 0, 0, 0.04);
  cursor: text;
  transition: box-shadow 0.2s;
}
.lw-note:focus-within { box-shadow: 0 0 0 2px var(--p-accent), 0 0 0 6px var(--p-accent-soft); }
.lw-note__icon { color: var(--p-muted); }
.lw-note__icon svg { width: 18px; height: 18px; }
.lw-note__input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--p-text);
  font: 500 16px/1.2 var(--font);
  -webkit-appearance: none;
  appearance: none;
}
.lw-note__input::placeholder { color: var(--p-muted); opacity: 0.85; }
.lw-note__input:focus, .lw-note__input:focus-visible { outline: none; }
.lw-note__count { flex: none; font: 600 12.5px/1 var(--font); color: var(--p-muted); }
.lw-note__count:empty { display: none; }

/* ---------------------------------------------------------------- footer (sticky Save) */
.lw-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: -6px calc(-1 * (var(--sar) + 18px)) 0 calc(-1 * (var(--sal) + 18px));
  padding: 10px calc(var(--sar) + 18px) calc(var(--sab) + 16px) calc(var(--sal) + 18px);
  background: var(--p-bg);
}
.lw-footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -20px;
  height: 20px;
  background: linear-gradient(to top, var(--p-bg), color-mix(in srgb, var(--p-bg) 0%, transparent));
  pointer-events: none;
}
.msheet--walk.has-keyboard .lw-footer { padding-bottom: 10px; }
.lw-error { padding: 0 6px 2px; text-align: center; font: 600 14px/1.4 var(--font); color: var(--p-danger); animation: lw-rise 0.25s var(--ease-out); }
.lw-error:empty { display: none; }
.lw-save { min-height: 54px; border-radius: 27px; font-size: 17px; transition: transform 0.12s, opacity 0.2s, background-color 0.3s, color 0.3s, box-shadow 0.3s; }
.lw-save:not(:disabled) { box-shadow: 0 10px 24px color-mix(in srgb, var(--p-accent) 30%, transparent); }
.lw-save__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lw-save__check { display: none; }
.lw-save__check .icon svg { width: 22px; height: 22px; }
.lw-save.is-done, .lw-save.is-done:disabled { opacity: 1; background: var(--lw-ok); color: #fff; box-shadow: 0 10px 24px color-mix(in srgb, var(--lw-ok) 35%, transparent); }
.lw-save.is-done .lw-save__check { display: inline-flex; animation: lw-pop 0.45s var(--ease-out); }
.lw-delete {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 23px;
  background: transparent;
  color: var(--p-danger);
  font: 600 16px/1 var(--font);
}
.lw-delete .icon svg { width: 19px; height: 19px; }
.lw-delete:active { background: color-mix(in srgb, var(--p-danger) 10%, transparent); }

@keyframes lw-pop { 0% { transform: scale(0.3); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: none; } }
@keyframes lw-rise { from { transform: translateY(4px); opacity: 0; } }

/* Short phones (iPhone SE): tighter so Save stays in view without scrolling. */
@media (max-height: 740px) {
  .msheet--walk .msheet__subtitle { display: none; }
  .lw { gap: 12px; }
  .lw-who__opt { min-height: 80px; gap: 6px; padding: 8px 6px 7px; }
  .lw-amount { min-height: 84px; --amt: 48px; }
  .lw-amount[data-len="5"] { --amt: 44px; }
  .lw-amount[data-len="6"], .lw-amount[data-len="7"] { --amt: 38px; }
}

/* ---------------------------------------------------------------- Trail: "+ Log a walk" floating button
   For the integrator: <button class="fab fab--log glass" aria-label="Log a walk">{icon('plus')}<span class="fab__label">Log a walk</span></button>
   in .sheet__fabs after Replay / Look around. Gold and round on phones (labelled when the row is ≥ 480 px wide). */
.fab.fab--log {
  width: 46px;
  flex: none;
  justify-content: center;
  padding: 0;
  background: linear-gradient(180deg, #ffd977, #f0b53a);
  color: #2a1f05;
  box-shadow: 0 8px 22px rgba(245, 196, 81, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.fab.fab--log .icon svg { width: 24px; height: 24px; }
.fab.fab--log .fab__label { display: none; }
/* Three buttons in the row: keep Replay / Look around on one line (they would wrap on a 375-390 px phone). */
.sheet__fabs:has(.fab--log) .fab { white-space: nowrap; }
@media (max-width: 400px) {
  .sheet__fabs:has(.fab--log) .fab:not(.fab--log) { gap: 6px; padding: 0 14px 0 11px; font-size: 14.5px; }
}
@media (max-width: 380px) {
  .sheet__fabs:has(.fab--log) .fab:not(.fab--log) { font-size: 14px; padding: 0 12px 0 10px; }
  .sheet__fabs:has(.fab--log) .fab:not(.fab--log) .icon svg { width: 18px; height: 18px; }
}
/* The label only when the row really has room for three labelled buttons (≈ 470 px): never on a phone in
   portrait (a 430 px Pro Max row is 406 px) nor on the 400 px landscape side panel; iPads get it. */
.sheet__fabs:has(.fab--log) { container: tm-fabs / inline-size; }
@container tm-fabs (min-width: 480px) {
  .fab.fab--log { width: auto; padding: 0 18px 0 14px; }
  .fab.fab--log .icon svg { width: 20px; height: 20px; }
  .fab.fab--log .fab__label { display: inline; }
}

/* ---------------------------------------------------------------- manual-walk rows (Journal) */
.wlist { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.wrow { position: relative; border-radius: 16px; overflow: hidden; }
.wrow__del {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 0 0 10px;
  border: 0;
  background: var(--p-danger);
  color: #fff;
  font: 650 12.5px/1 var(--font);
  opacity: 0;
  transition: opacity 0.2s;
}
.wrow__del .icon svg { width: 20px; height: 20px; }
.wrow.is-swiping .wrow__del, .wrow.is-open .wrow__del { opacity: 1; }
.wrow__track {
  position: relative;
  z-index: 1;
  border-radius: 16px;
  background: var(--wrow-bg, var(--p-bg));
  touch-action: pan-y;
  transition: transform 0.34s var(--ease-sheet);
}
.wrow.is-swiping .wrow__track { transition: none; }
.wrow__main {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 9px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: inherit;
  text-align: left;
  -webkit-user-select: none;
  user-select: none;
}
.wrow__main:active { background: rgba(120, 120, 128, 0.1); }
.wrow__main:focus-visible { outline-offset: -3px; }
.wrow__icon {
  align-self: start;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--p-card);
  box-shadow: 0 0 0 0.5px var(--p-sep);
  font-size: 16px;
  font-family: "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Emoji", sans-serif;
}
.wrow__text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wrow__line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.wrow__avatars { display: inline-flex; flex: none; }
.wrow__avatars .avatar { font-size: 9.5px; }
.wrow__avatars .avatar + .avatar { margin-left: -6px; box-shadow: 0 0 0 1.5px var(--wrow-bg, var(--p-bg)); }
.wrow__who { min-width: 0; font: 650 14.5px/1.25 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wrow__amt { flex: none; margin-left: auto; padding-left: 6px; font: 750 14.5px/1.25 var(--font-round); white-space: nowrap; }
.wrow__note { font: italic 400 13.5px/1.35 var(--font); color: var(--p-text); opacity: 0.86; overflow-wrap: anywhere; }
.wrow__meta { font: 500 12px/1.3 var(--font); color: var(--p-muted); }
.wrow__chev { color: var(--p-muted); opacity: 0.7; }
.wrow__chev svg { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- Journal */
.jr-log {
  position: relative;
  width: 100%;
  margin-top: 18px;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 12px;
  border: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.13);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.24), 0 10px 26px rgba(0, 0, 0, 0.16);
  color: #fff;
  text-align: left;
  transition: transform 0.14s var(--ease-out), background-color 0.2s;
}
.jr-log:active { transform: scale(0.98); background: rgba(255, 255, 255, 0.2); }
.jr-log:focus-visible { --focus: #fff; border-radius: 22px; }
.jr-log__emoji {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.15);
  font-size: 23px;
  font-family: "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Emoji", sans-serif;
}
.jr-log__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.jr-log__title { font: 700 17px/1.2 var(--font); }
.jr-log__sub { font: 500 13.5px/1.3 var(--font); color: rgba(255, 255, 255, 0.74); }
.jr-log__plus {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffd977, #f0b53a);
  color: #2a1f05;
  box-shadow: 0 6px 14px rgba(245, 196, 81, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.jr-log__plus .icon svg { width: 20px; height: 20px; }

/* day log: synced vs by-hand */
.day__bar span.is-manual {
  background: repeating-linear-gradient(-45deg, var(--c) 0 2.5px, color-mix(in srgb, var(--c) 45%, transparent) 2.5px 5px);
}
.day__person { grid-template-columns: 26px auto 1fr auto; }
.day__srcs { justify-self: end; display: inline-flex; gap: 4px; }
.day__src--hand { background: rgba(245, 196, 81, 0.22); color: var(--p-text); font-size: 13px; font-family: "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Emoji", sans-serif; }
.day__split { grid-column: 2 / -1; margin-top: -6px; font: 500 12.5px/1.3 var(--font); color: var(--p-muted); }
.day__split b { color: var(--p-text); font-weight: 650; }
.day__add {
  position: relative;
  grid-column: 3 / -1;
  justify-self: end;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 4px 0 10px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--p-accent);
  font: 600 13.5px/1 var(--font);
}
.day__add::before { content: ""; position: absolute; inset: -6px -4px; }
.day__add .icon svg { width: 16px; height: 16px; }
.day__person.is-empty:has(.day__add) { opacity: 1; }
.day__person.is-empty:has(.day__add) .avatar, .day__person.is-empty:has(.day__add) .day__name { opacity: 0.6; }
.day .wlist { margin-top: 8px; }
.daylog__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 16px 0; font: 500 12.5px/1.3 var(--font); color: var(--p-muted); }
.daylog__legend span { display: inline-flex; align-items: center; gap: 6px; }
.daylog__swatch { width: 18px; height: 6px; border-radius: 3px; background: var(--p-muted); opacity: 0.8; }
.daylog__swatch.is-manual { background: repeating-linear-gradient(-45deg, var(--p-muted) 0 2.5px, transparent 2.5px 5px); }

/* ---------------------------------------------------------------- Settings → Walking */
.wp { display: flex; flex-direction: column; gap: 4px; }
.wp + .wp { margin-top: 18px; padding-top: 16px; border-top: 0.5px solid var(--p-sep); }
.wp__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.wp__title { font: 600 16px/1.3 var(--font); }
.wp__value { flex: none; font: 780 22px/1 var(--font-round); letter-spacing: -0.01em; color: var(--p-accent); white-space: nowrap; }
.wp__value small { margin-left: 3px; font: 650 13px/1 var(--font); color: var(--p-muted); }
.wp__hint { font: 400 13px/1.45 var(--font); color: var(--p-muted); }
.wp__hint b { color: var(--p-text); font-weight: 650; }
.wp__range {
  --pct: 50%;
  width: 100%;
  height: 44px;
  margin: 2px 0 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  touch-action: pan-y;
}
.wp__range:focus { outline: none; }
.wp__range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--p-accent) 0 var(--pct), rgba(120, 120, 128, 0.22) var(--pct) 100%);
}
.wp__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -11px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18), 0 0 0 0.5px rgba(0, 0, 0, 0.1);
}
.wp__range::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(120, 120, 128, 0.22); }
.wp__range::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--p-accent); }
.wp__range::-moz-range-thumb { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18), 0 0 0 0.5px rgba(0, 0, 0, 0.1); }
.wp__range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--p-accent-soft), 0 3px 8px rgba(0, 0, 0, 0.18); }
.wp__ends { display: flex; justify-content: space-between; margin-top: -6px; font: 600 11.5px/1 var(--font); color: var(--p-muted); }
.wp__presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 8px 0 8px; }
.wp__preset {
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 4px;
  border: 0;
  border-radius: 14px;
  background: rgba(120, 120, 128, 0.12);
  color: var(--p-text);
  font: 650 13.5px/1 var(--font);
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, transform 0.12s;
}
.wp__preset:active { transform: scale(0.95); }
.wp__preset small { font: 600 12px/1 var(--font); color: var(--p-muted); }
.wp__preset.is-on { background: var(--p-accent); color: var(--lw-chip-on-text); }
.wp__preset.is-on small { color: inherit; opacity: 0.8; }
.wp__stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 4px; }
.wp__stepbtn {
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--p-accent-soft);
  color: var(--p-accent);
  font: 600 26px/1 var(--font-round);
  transition: transform 0.12s, opacity 0.2s;
}
.wp__stepbtn:active:not(:disabled) { transform: scale(0.9); }
.wp__stepbtn:disabled { opacity: 0.3; }
.wp__stepval { flex: 1; text-align: center; font: 780 30px/1 var(--font-round); letter-spacing: -0.02em; }
.wp__stepval small { margin-left: 4px; font: 650 15px/1 var(--font); color: var(--p-muted); }
.wp__stepval span { display: block; margin-top: 4px; font: 600 12.5px/1 var(--font); color: var(--p-muted); letter-spacing: 0; }
.wp__suggest {
  align-self: flex-start;
  min-height: 40px;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border: 0;
  border-radius: 20px;
  background: var(--p-accent-soft);
  color: var(--p-accent);
  font: 600 14px/1.2 var(--font);
  text-align: left;
}
.wp__suggest .icon svg { width: 17px; height: 17px; }
.wp__status { min-height: 18px; display: inline-flex; align-items: center; gap: 4px; font: 600 12.5px/1 var(--font); color: var(--p-muted); transition: opacity 0.3s; }
.wp__status.is-saved { color: var(--lw-ok); }
.wp__status.is-error { color: var(--p-danger); }
.wp__status .icon svg { width: 14px; height: 14px; }
.wp__status:empty { opacity: 0; }
.wp-partners { display: flex; flex-direction: column; }
.wp-partner { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 16px; border-bottom: 0.5px solid var(--p-sep); }
.wp-partner:last-child { border-bottom: 0; }
.wp-partner__text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.wp-partner__name { font: 600 15.5px/1.25 var(--font); }
.wp-partner__vals { font: 500 13px/1.3 var(--font); color: var(--p-muted); }
.wp-partner__lock { flex: none; font: 600 12px/1 var(--font); color: var(--p-muted); }

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
  .lw-who__opt, .lw-who__check, .lw-who__avatars .avatar, .lw-chip, .lw-qchip, .wrow__track, .lw-save { transition: none !important; }
  .lw-who__opt.is-on .lw-who__avatars .avatar { transform: none !important; }
  .lw-impact, .lw-error, .lw-save.is-done .lw-save__check { animation: none !important; }
}
