/* gotafe: a small Rams-style device. A light plate split into bevelled cells,
   a recessed display, and real push buttons. Light comes from the top left,
   so every shadow falls to the bottom right. */

/* ---------- tokens ---------- */
:root {
  --page: #f4f4f4;
  --plate: #eeeeee;
  --groove: #dcdcdc;
  --recess: #e8e8e8;
  --text: #222222;
  --muted: #8c8c8c;
  --faint: #bdbdbd;
  --line: rgba(0, 0, 0, 0.07);
  --accent: #ff611a;
  --dot-off: #cfcfcf;

  /* bevel on every cell: a fine groove along the bottom right */
  --bevel: inset -1px -1px 2px 0 rgba(0, 0, 0, 0.13), inset -2px -2px 2px 0 #ffffff;
  /* a surface pushed in, shadow from the top left */
  --sunken:
    inset 0.4px 0.32px 0.36px -0.94px rgba(0, 0, 0, 0.11),
    inset 1.2px 0.97px 1.08px -1.88px rgba(0, 0, 0, 0.1),
    inset 3.2px 2.55px 2.86px -2.81px rgba(0, 0, 0, 0.09),
    inset 10px 8px 9px -3.75px rgba(0, 0, 0, 0.04);

  /* small "op-1" keys */
  --tkey-bg: linear-gradient(135deg, #f2f2f2 0%, #e3e3e3 100%);
  --tkey-shadow: 2px 2px 5px 0 rgba(0, 0, 0, 0.28), -2px -2px 3px 1px #ffffff;
  --tkey-pressed: inset 1.5px 1.5px 3px rgba(0, 0, 0, 0.16), inset -1.5px -1.5px 2px #ffffff;

  /* push button parts */
  --socket: #eeeeee;
  --ring: #222222;
  --cast: 0, 0, 0;

  --sheet: #ffffff;
  --ui-border: rgba(0, 0, 0, 0.08);
  --ui-border-strong: rgba(0, 0, 0, 0.13);
  --ui-hover: rgba(0, 0, 0, 0.035);
  --ui-fill: #f4f4f4;
  --scrim: rgba(30, 30, 30, 0.18);
  --toast-bg: #222222;
  --toast-text: #f4f4f4;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.3, 1.5, 0.5, 1);
  /* key travel: eases in like a spring being compressed, then comes back
     out a little slower than it went in */
  --press-in: 0.22s cubic-bezier(0.45, 0, 0.55, 1);
  --press-out: 0.55s cubic-bezier(0.22, 0.8, 0.3, 1.04);
}

  html[data-theme="dark"] {
    --page: #141414;
    --plate: #222222;
    --groove: #121212;
    --recess: #1b1b1b;
    --text: #ececec;
    --muted: #8a8a8a;
    --faint: #4f4f4f;
    --line: rgba(255, 255, 255, 0.07);
    --dot-off: #3a3a3a;
    --bevel: inset -1px -1px 2px 0 rgba(0, 0, 0, 0.6), inset -2px -2px 2px 0 rgba(255, 255, 255, 0.035);
    --sunken:
      inset 0.4px 0.32px 0.36px -0.94px rgba(0, 0, 0, 0.5),
      inset 1.2px 0.97px 1.08px -1.88px rgba(0, 0, 0, 0.45),
      inset 3.2px 2.55px 2.86px -2.81px rgba(0, 0, 0, 0.4),
      inset 10px 8px 9px -3.75px rgba(0, 0, 0, 0.25);
    --tkey-bg: linear-gradient(135deg, #2e2e2e 0%, #252525 100%);
    --tkey-shadow: 2px 2px 5px 0 rgba(0, 0, 0, 0.6), -2px -2px 3px 0 rgba(255, 255, 255, 0.04);
    --tkey-pressed: inset 1.5px 1.5px 3px rgba(0, 0, 0, 0.55), inset -1px -1px 1px rgba(255, 255, 255, 0.04);
    --socket: #222222;
    --ring: #050505;
    --sheet: #171717;
    --ui-border: rgba(255, 255, 255, 0.08);
    --ui-border-strong: rgba(255, 255, 255, 0.14);
    --ui-hover: rgba(255, 255, 255, 0.05);
    --ui-fill: #222222;
    --scrim: rgba(0, 0, 0, 0.5);
    --toast-bg: #ececec;
    --toast-text: #161616;
  }

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background: var(--page);
  font-family: var(--font);
  /* Inter Display: Inter at the display end of its optical size axis */
  font-variation-settings: 'opsz' 32;
  font-feature-settings: 'cv11', 'ss01';
  text-transform: lowercase;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body { min-height: 100vh; min-height: 100dvh; }
button, input, output, select, textarea { font: inherit; font-variation-settings: inherit; color: inherit; text-transform: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 3px; }

.stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px 16px calc(28px + env(safe-area-inset-bottom));
}

/* ---------- the device: a plate of cells ---------- */
.device {
  width: min(372px, 100%);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  padding: 2px;
  border-radius: 6px;
  background: var(--groove);
  box-shadow:
    0.5px 0.5px 1px rgba(0, 0, 0, 0.12),
    6px 8px 14px -6px rgba(0, 0, 0, 0.16),
    22px 30px 50px -18px rgba(0, 0, 0, 0.22);
  animation: rise 0.7s var(--out) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.cell {
  position: relative;
  background: var(--plate);
  border-radius: 3px;
  box-shadow: var(--bevel);
  border: none;
}
.cell-head, .cell-display { grid-column: 1 / -1; }
.cell-key { grid-column: span 2; }
.cell-gauge { grid-column: span 3; }

.cell-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}
.brand { font-weight: 600; font-size: 13px; letter-spacing: -0.01em; }
.sync { margin-left: auto; font-size: 11px; color: var(--muted); }
.led {
  margin-left: auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot-off);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.sync:not([hidden]) + .led { margin-left: 0; }
.led.on { background: var(--accent); box-shadow: 0 0 6px 1px rgba(255, 97, 26, 0.55); }
.led.paused { background: var(--accent); animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* recessed display */
.cell-display {
  text-align: center;
  padding: 26px 16px 22px;
  background: var(--recess);
  box-shadow: var(--sunken), var(--bevel);
}
.display-label { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }
.display-time {
  margin: 8px 0 10px;
  font-size: clamp(50px, 16vw, 62px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}
/* rolling digits: a strip behind a window that fades at the top and
   bottom; each cell is 1.5em for a 1em line, the negative margin keeps the
   line height unchanged */
.display-time { display: flex; justify-content: center; }
.roll {
  display: inline-block;
  height: 1.5em;
  margin: -0.25em 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent);
}
.roll .strip {
  display: flex;
  flex-direction: column;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1); /* eases in, no overshoot */
}
.roll .strip > span { height: 1.5em; line-height: 1.5em; text-align: center; }
.roll .strip[data-flip="a"] { animation: rollBlurA 0.5s ease-out; }
.roll .strip[data-flip="b"] { animation: rollBlurB 0.5s ease-out; }
@keyframes rollBlurA { from { filter: blur(2.5px); } to { filter: blur(0); } }
@keyframes rollBlurB { from { filter: blur(2.5px); } to { filter: blur(0); } }
html.calm .roll { -webkit-mask-image: none; mask-image: none; }
html.calm .roll .strip { transition: none; animation: none; }
.display-time .colon { opacity: 0.55; padding: 0 0.02em; }
.display-meta {
  font-size: 11px;
  color: var(--muted);
  min-height: 14px;
  display: flex;
  justify-content: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}
.display-overlap {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.display-task-row {
  margin: 14px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}
/* a native select laid invisibly over a plain label: the menu is the
   system's own, the look is ours */
.pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 24px;
  padding: 0 10px;
  border-radius: 99px;
  font-size: 12px;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}
.pick:hover { box-shadow: inset 0 0 0 1px var(--faint); }
.pick select {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 13px;
}
.pick-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-pick { flex: 0 1 auto; max-width: 220px; }
.task-pick::before {
  content: '';
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.task-pick.empty { color: var(--muted); }
.task-pick.empty::before { background: var(--dot-off); }
.pick-caret { flex: none; width: 8px; height: 6px; fill: none; stroke: var(--muted); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.timebox-pick { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.timebox-pick.set { color: var(--text); }
.timebox-pick.over { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pick-clock { flex: none; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }

/* key cells */
.cell-key {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px 0 14px;
}
.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dot-off);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.dot.on { background: var(--accent); box-shadow: 0 0 5px 1px rgba(255, 97, 26, 0.5); }
.dot.blink { background: var(--accent); animation: blink 1.2s steps(1) infinite; }
.key-label { font-size: 11px; color: var(--muted); letter-spacing: 0.02em; }
/* the smaller keys sit centred in the same space as the big one */
.cell-key > .push:not(.push-lg) { margin: 4px 0; }
@media (max-width: 360px) { .cell-key > .push:not(.push-lg) { margin: 4px 0; } }

/* gauges */
.cell-gauge {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 13px 14px;
  font-size: 12px;
  color: var(--text);
  text-align: left;
  transition: box-shadow 0.12s ease;
}
.cell-gauge:active { box-shadow: var(--sunken), var(--bevel); }
.gauge-label { color: var(--muted); font-size: 11px; }
.gauge-value { font-variant-numeric: tabular-nums; }
.cell-gauge.off .gauge-value { color: var(--faint); }

/* ---------- push buttons ----------
   Built from layers, back to front:
   button        the socket (a hole in the plate)
   ::before      the dark ring you see in the gap around the cap
   .push-shadow  six stacked shadows falling to the bottom right
   .push-cap     the cap: a slightly dished face, lit from the top left
   .push-glow    soft reflection on the lower right of the dish
   .push-icon    the symbol
   Pressed: the shadow fades out (cap is flush with the plate) and the
   cap's inner highlight goes soft. */
.push {
  --size: 52px;
  --k: 1.3; /* size / 40, scales the shadow recipe */
  --cap-a: rgb(207, 207, 207);
  --cap-b: rgb(247, 246, 245);
  --cap-rim: rgb(252, 252, 250);
  --icon: #2a2a2a;
  position: relative;
  width: calc(var(--size) + 4px);
  height: calc(var(--size) + 4px);
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--socket);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.push::before {
  content: '';
  position: absolute;
  left: 1px;
  top: 1px;
  width: calc(var(--size) + 2px);
  height: calc(var(--size) + 2px);
  border-radius: 50%;
  background: var(--ring);
}
.push-shadow, .push-cap {
  position: absolute;
  left: 2px;
  top: 1px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
}
.push-shadow {
  background: #fff;
  box-shadow:
    calc(0.52px * var(--k)) calc(0.52px * var(--k)) calc(0.73px * var(--k)) calc(-0.63px * var(--k)) rgba(var(--cast), 0.44),
    calc(1.32px * var(--k)) calc(1.32px * var(--k)) calc(1.87px * var(--k)) calc(-1.25px * var(--k)) rgba(var(--cast), 0.43),
    calc(2.66px * var(--k)) calc(2.66px * var(--k)) calc(3.76px * var(--k)) calc(-1.88px * var(--k)) rgba(var(--cast), 0.42),
    calc(5.03px * var(--k)) calc(5.03px * var(--k)) calc(7.12px * var(--k)) calc(-2.5px * var(--k)) rgba(var(--cast), 0.38),
    calc(10px * var(--k)) calc(10px * var(--k)) calc(14.15px * var(--k)) calc(-3.13px * var(--k)) rgba(var(--cast), 0.31),
    calc(22px * var(--k)) calc(22px * var(--k)) calc(31px * var(--k)) calc(-3.75px * var(--k)) rgba(var(--cast), 0.15);
  transition: opacity var(--press-out);
}
.push-cap {
  background: radial-gradient(100% 100% at 35.8% 29.3%, var(--cap-a) 0%, var(--cap-b) 72%, var(--cap-rim) 100%, rgb(36, 23, 17) 130%);
  box-shadow:
    inset 1px 1px 2px 0 rgba(255, 255, 255, 0.6),
    inset -1px -1px 2px 0 rgba(0, 0, 0, 0.5),
    inset calc(4px * var(--k)) calc(4px * var(--k)) 1px 0 rgba(255, 255, 255, 0.05);
  transition: box-shadow var(--press-out), transform var(--press-out);
}
.push-glow {
  position: absolute;
  left: calc(2px + var(--size) * 0.325);
  top: calc(1px + var(--size) * 0.525);
  width: calc(var(--size) * 0.52);
  height: calc(var(--size) * 0.42);
  border-radius: 50%;
  background: #fff;
  filter: blur(calc(var(--size) * 0.125));
  opacity: 0.85;
  pointer-events: none;
  transition: opacity var(--press-out), transform var(--press-out);
}
.push-icon {
  position: absolute;
  left: 2px;
  top: 1px;
  width: var(--size);
  height: var(--size);
  display: grid;
  place-items: center;
  color: var(--icon);
  transition: transform var(--press-out), opacity 0.2s ease;
}
.push-icon svg {
  grid-area: 1 / 1;
  width: calc(var(--size) * 0.42);
  height: calc(var(--size) * 0.42);
  fill: currentColor;
  transition: transform 0.3s var(--spring), opacity 0.2s ease;
}

.push.pressed:not(:disabled) .push-shadow,
.push:active:not(:disabled) .push-shadow { opacity: 0.06; transition: opacity var(--press-in); }
.push.pressed:not(:disabled) .push-cap,
.push:active:not(:disabled) .push-cap {
  box-shadow:
    inset calc(3px * var(--k)) calc(3px * var(--k)) calc(5px * var(--k)) 0 rgba(255, 255, 255, 0.2),
    inset -1px -1px 2px 0 rgba(0, 0, 0, 0.5),
    inset 2px 2px 1px 0 rgba(255, 255, 255, 0.03);
  transform: translate(0.6px, 0.8px) scale(0.975);
  transition: box-shadow var(--press-in), transform var(--press-in);
}
.push.pressed:not(:disabled) .push-glow,
.push:active:not(:disabled) .push-glow { opacity: 0.55; transform: translate(0.6px, 0.8px) scale(0.92); transition: opacity var(--press-in), transform var(--press-in); }
.push.pressed:not(:disabled) .push-icon,
.push:active:not(:disabled) .push-icon { transform: translate(0.6px, 0.8px) scale(0.975); transition: transform var(--press-in); }
.push:disabled { cursor: default; }
.push:disabled .push-icon { opacity: 0.35; }

.push-lg { --size: 60px; --k: 1.5; }
.push-orange {
  --cap-a: rgb(238, 76, 8);
  --cap-b: rgb(255, 121, 59);
  --icon: #ffffff;
}
.push-orange .push-glow { opacity: 0.55; }
.push-dark {
  --cap-a: rgb(36, 36, 36);
  --cap-b: rgb(78, 78, 78);
  --icon: #f2f2f2;
}
.push-dark .push-glow { opacity: 0.25; }
  html[data-theme="dark"] .push-light {
    --cap-a: rgb(150, 150, 150);
    --cap-b: rgb(205, 205, 203);
    --cap-rim: rgb(230, 230, 228);
  }
  html[data-theme="dark"] .push-dark .push-glow { opacity: 0.15; }

.push-icon .icon-pause { opacity: 0; transform: scale(0.6); }
.push.is-running .icon-play { opacity: 0; transform: scale(0.6); }
.push.is-running .icon-pause { opacity: 1; transform: none; }
/* the triangle is drawn so it looks centred (its box sits a hair right of
   centre, its point of balance a hair left) */

/* ---------- drawer: plain, flat and quiet ----------
   The device is the only skeuomorphic thing; everything in here is flat
   white with hairline borders. */
.tkey {
  border: 1px solid var(--ui-border-strong);
  background: var(--sheet);
  color: var(--text);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.tkey:hover:not(:disabled) { background: var(--ui-hover); }
.tkey:active:not(:disabled) { transform: scale(0.98); }
.tkey:disabled { opacity: 0.45; cursor: default; }

.key-pill {
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
}
.key-accent { background: var(--text); border-color: var(--text); color: var(--sheet); }
.key-accent:hover:not(:disabled) { background: var(--text); opacity: 0.88; }
.key-tiny {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.key-tiny:hover:not(:disabled) { color: var(--text); }
.key-row { display: flex; gap: 8px; margin-top: 12px; }
.key-row .tkey { flex: 1; }
.key-row-stack { flex-direction: column; gap: 8px; }

.scrim {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--out);
  z-index: 10;
}
.sheet-open .scrim { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: min(480px, 100%);
  max-height: min(80vh, 720px);
  display: flex;
  flex-direction: column;
  padding: 4px 20px calc(18px + env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0;
  border: 1px solid var(--ui-border);
  border-bottom: none;
  background: var(--sheet);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.06);
  transform: translate(-50%, 105%);
  transition: transform 0.45s var(--out), visibility 0s linear 0.45s;
  z-index: 11;
  visibility: hidden;
}
.sheet-open .sheet { transform: translate(-50%, 0); visibility: visible; transition: transform 0.45s var(--out); }
.sheet.dragging { transition: none; }
@media (min-width: 600px) {
  .sheet { bottom: 24px; border-radius: 16px; border-bottom: 1px solid var(--ui-border); box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.18); }
}
.sheet-grip { display: flex; justify-content: center; padding: 8px 0 10px; cursor: grab; touch-action: none; }
.sheet-grip span { width: 36px; height: 4px; border-radius: 2px; background: var(--ui-border-strong); }

/* tabs: just words, the current one underlined */
.segmented {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--ui-border);
  flex-shrink: 0;
}
.segmented button {
  border: none;
  background: none;
  padding: 10px 0 11px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  box-shadow: inset 0 0 0 transparent;
  transition: color 0.2s ease, box-shadow 0.2s ease;
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-selected="true"] { color: var(--text); box-shadow: inset 0 -1.5px 0 var(--text); }
/* the smaller period switch on the leaderboard: a quiet pill group */
.segmented-small {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  margin-bottom: 6px;
  border: 1px solid var(--ui-border);
  border-radius: 9px;
}
.segmented-small button { padding: 5px 11px; font-size: 12px; border-radius: 7px; }
.segmented-small button[aria-selected="true"] { box-shadow: none; background: var(--ui-fill); }

.sheet-body { overflow-y: auto; padding: 18px 0 4px; overscroll-behavior: contain; }
.pane { display: none; }
.pane.active { display: block; animation: paneIn 0.25s var(--out); }
@keyframes paneIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.pane-note { font-size: 12px; color: var(--muted); line-height: 1.55; margin: 10px 0 0; }
.pane-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 600; }
.pane-sub { font-size: 12px; color: var(--muted); margin: 3px 0 8px; min-height: 15px; }

.field {
  width: 100%;
  border: 1px solid var(--ui-border-strong);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 13px;
  text-transform: none;
  background: var(--sheet);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field + .field { margin-top: 8px; }
.field::placeholder { color: var(--faint); text-transform: lowercase; }
.field:focus { border-color: var(--text); box-shadow: 0 0 0 3px var(--ui-hover); }
.field-row { display: flex; gap: 8px; align-items: center; }
.field-row .field { flex: 1; min-width: 0; }

.chip {
  border: 1px solid var(--ui-border-strong);
  border-radius: 99px;
  padding: 3px 9px;
  font-size: 11px;
  color: var(--muted);
  background: none;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.chip[aria-pressed="true"] { color: var(--text); border-color: var(--text); }

.text-btn { border: none; background: none; padding: 6px 0; font-size: 12px; color: var(--muted); }
.text-btn:hover { color: var(--text); }

.list { list-style: none; margin: 6px 0 0; padding: 0; }
.list > li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--ui-border);
}
.list > li:last-child { border-bottom: none; }
.list > li.empty { color: var(--muted); font-size: 12px; justify-content: center; padding: 22px 0; }

.check {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  position: relative;
  width: 18px;
  height: 18px;
  margin: 0;
  border-radius: 5px;
  border: 1.5px solid var(--ui-border-strong);
  background: var(--sheet);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.check::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1.5px;
  width: 4px;
  height: 8px;
  border: solid var(--sheet);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s var(--spring);
}
.check:checked { background: var(--text); border-color: var(--text); }
.check:checked::after { transform: rotate(45deg) scale(1); }

.todo-text {
  flex: 1;
  min-width: 0;
  text-align: left;
  border: none;
  background: none;
  padding: 0;
  font-size: 13px;
  text-transform: none;
  overflow-wrap: anywhere;
}
.todo-row.current .todo-text { font-weight: 600; }
.todo-row.current .todo-text::after { content: '  now'; color: var(--accent); font-weight: 500; font-size: 11px; }
.todo-row.done .todo-text { color: var(--faint); text-decoration: line-through; cursor: default; }
.todo-edit { flex: 1; padding: 6px 10px; font-size: 13px; }
.todo-tools { display: flex; gap: 2px; align-items: center; opacity: 0.55; transition: opacity 0.2s ease; }
.todo-row:hover .todo-tools, .todo-row:focus-within .todo-tools { opacity: 1; }
@media (hover: none) { .todo-tools { opacity: 1; } }
.icon-btn { border: none; background: none; padding: 4px 6px; color: var(--muted); font-size: 14px; line-height: 1; border-radius: 6px; }
.icon-btn:hover { color: var(--text); background: var(--ui-hover); }
.todo-row.done .todo-public { visibility: hidden; }
#todo-clear-done { margin-top: 6px; }

.lb-list > li { flex-wrap: wrap; row-gap: 2px; }
.lb-rank { width: 18px; color: var(--faint); font-variant-numeric: tabular-nums; font-size: 12px; }
.lb-name {
  border: none;
  background: none;
  padding: 0;
  font-size: 13px;
  text-transform: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.lb-list > li.me .lb-name { font-weight: 600; }
.lb-time { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
.lb-task { flex-basis: 100%; padding-left: 30px; font-size: 11px; color: var(--muted); text-transform: none; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

.h-date { width: 100px; flex-shrink: 0; color: var(--muted); font-size: 12px; }
.h-bar { flex: 1; height: 4px; border-radius: 2px; background: var(--ui-fill); overflow: hidden; min-width: 30px; }
.h-bar > span { display: block; height: 100%; border-radius: 2px; background: var(--faint); transform-origin: left; }
.history-list.animate .h-bar > span { animation: grow 0.6s var(--out) both; }
.history-list > li.live .h-bar > span { background: var(--accent); }
@keyframes grow { from { transform: scaleX(0); } }
.h-time { font-variant-numeric: tabular-nums; font-size: 12px; min-width: 56px; text-align: right; }
.h-edit { width: 26px; }
.h-form { display: flex; gap: 6px; align-items: center; flex: 1; justify-content: flex-end; }
.h-form .field { width: 80px; padding: 6px 10px; }
.h-form .tkey { padding: 6px 12px; }
.history-more { display: block; margin: 12px auto 0; }

.group { padding: 18px 0; border-bottom: 1px solid var(--ui-border); }
.group:first-child { padding-top: 0; }
.group:last-child { border-bottom: none; }
.group-title { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; font-size: 13px; }
.row strong { font-weight: 500; text-transform: none; font-variant-numeric: tabular-nums; }
#account-logged-in .tkey { margin-top: 10px; }
.reminder-row { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.reminder-row + .reminder-row { margin-top: 6px; }
.reminder-name { flex: 1; min-width: 0; padding: 8px 10px; }
.stepper { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.stepper output { min-width: 50px; text-align: center; font-variant-numeric: tabular-nums; font-size: 13px; }

.switch {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  position: relative;
  width: 38px;
  height: 22px;
  margin: 0;
  border-radius: 99px;
  background: var(--ui-border-strong);
  cursor: pointer;
  transition: background 0.2s ease;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s var(--out);
}
.switch:checked { background: var(--text); }
.switch:checked::after { transform: translateX(16px); }
 html[data-theme="dark"] .switch:checked::after { background: var(--sheet); } 
.switch-row { cursor: pointer; }

.log-group summary { cursor: pointer; list-style: none; margin-bottom: 0; }
.log-group summary::-webkit-details-marker { display: none; }
.log-group summary::after { content: ' +'; color: var(--muted); }
.log-group[open] summary::after { content: ' −'; }
.log {
  margin-top: 10px;
  max-height: 180px;
  overflow-y: auto;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  text-transform: none;
}
.log .tag { color: var(--faint); }

/* ---------- dialog & toast ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--scrim);
  animation: fade 0.25s ease both;
}
@keyframes fade { from { opacity: 0; } }
.dialog {
  width: min(340px, 100%);
  padding: 22px 20px 18px;
  border-radius: 16px;
  border: 1px solid var(--ui-border);
  background: var(--sheet);
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.2);
  animation: pop 0.35s var(--out) both;
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.dialog-title { font-size: 15px; font-weight: 600; }
.dialog-body { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 8px 0 6px; }
.dialog-check { margin-top: 4px; border-top: 1px solid var(--ui-border); padding-top: 10px; }

.toast {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  left: 50%;
  z-index: 30;
  max-width: calc(100vw - 32px);
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 12px;
  background: var(--toast-bg);
  color: var(--toast-text);
  box-shadow: 6px 8px 20px -6px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translate(-50%, -12px);
  transition: opacity 0.25s ease, transform 0.35s var(--out);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

@media (max-width: 360px) {
  .push { --size: 46px; --k: 1.15; }
  .push-lg { --size: 54px; --k: 1.35; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- device header: tasks switch ---------- */
.head-btn {
  margin-left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 8px;
  border: none;
  border-radius: 99px;
  font-size: 11px;
  color: var(--muted);
  background: var(--plate);
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.18), -1px -1px 2px var(--tkey-highlight, #ffffff);
  transition: box-shadow var(--press-out), color 0.2s ease;
}
 html[data-theme="dark"] .head-btn { --tkey-highlight: rgba(255, 255, 255, 0.04); } 
.head-btn[aria-pressed="true"],
.head-btn:active { color: var(--text); box-shadow: inset 1px 1px 2.5px rgba(0, 0, 0, 0.18), inset -1px -1px 1.5px var(--tkey-highlight, #ffffff); transition: box-shadow var(--press-in); }
.head-btn .dot { width: 4px; height: 4px; }

/* ---------- floating task card ----------
   Same plate as the device, dragged by its header. It sits above the page
   but below the drawer. */
.ft {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 5;
  width: 280px;
  padding: 2px;
  border-radius: 6px;
  background: var(--groove);
  box-shadow:
    0.5px 0.5px 1px rgba(0, 0, 0, 0.12),
    6px 8px 14px -6px rgba(0, 0, 0, 0.16),
    22px 30px 50px -18px rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s, box-shadow 0.25s ease;
}
.ft > * { border-radius: 3px; }
.ft.open { opacity: 1; visibility: visible; transition: opacity 0.3s ease, box-shadow 0.25s ease; }
.ft.dragging {
  box-shadow:
    0.5px 0.5px 1px rgba(0, 0, 0, 0.12),
    10px 14px 24px -8px rgba(0, 0, 0, 0.2),
    34px 46px 70px -20px rgba(0, 0, 0, 0.28);
}
.ft-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 2px;
  background: var(--plate);
  box-shadow: var(--bevel);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.ft.dragging .ft-head { cursor: grabbing; }
.ft-title { font-size: 12px; font-weight: 600; }
.ft-count { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ft-hide {
  margin-left: auto;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--plate);
  box-shadow: 1px 1px 2.5px rgba(0, 0, 0, 0.2), -1px -1px 1.5px var(--tkey-highlight, #ffffff);
  transition: box-shadow var(--press-out);
}
.ft-hide:active { box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.2); transition: box-shadow var(--press-in); }
.ft-hide span { width: 7px; height: 1.5px; border-radius: 1px; background: var(--muted); }
 html[data-theme="dark"] .ft-hide { --tkey-highlight: rgba(255, 255, 255, 0.04); } 

.ft-list {
  padding: 0 12px;
  background: var(--plate);
  box-shadow: var(--bevel);
  border-radius: 3px 3px 0 0;
  overflow: hidden;
  transition: height 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.ft-list.scrolls { overflow-y: auto; }
.ft-row {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 40px;
  cursor: pointer;
  outline: none;
  transition: opacity 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.ft-row.leaving { opacity: 0; }
.ft-row:focus-visible .ft-box { box-shadow: inset 0 0 0 1.5px var(--text), 0 0 0 3px var(--ui-hover); }

/* the box: a ring that never changes, with a fill that opens inside it */
.ft-box {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 1.5px rgba(var(--ink-rgb, 34, 34, 34), 0.3);
}
 html[data-theme="dark"] .ft-box { --ink-rgb: 236, 236, 236; } 
.ft-fill {
  position: absolute;
  inset: 0;
  border-radius: 5px;
  background: var(--text);
  transform: scale(0);
  transform-origin: center;
}
.ft-tick {
  position: relative;
  width: 72%;
  height: 72%;
  overflow: visible;
  fill: none;
  stroke: var(--plate);
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ft-say {
  position: relative;
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  font-size: 13px;
  line-height: 1.25;
  text-transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ft-word { display: inline; }
.ft-rule {
  position: absolute;
  left: 0;
  right: 0;
  top: 52%;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}
.ft-now {
  margin-left: auto;
  flex: none;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  background: none;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.ft-now::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--dot-off); }
.ft-row:hover .ft-now, .ft-row.current .ft-now { opacity: 1; }
.ft-row.current .ft-now::before { background: var(--accent); box-shadow: 0 0 5px 1px rgba(255, 97, 26, 0.5); }
.ft-row.done .ft-now { visibility: hidden; }
.ft-del {
  flex: none;
  width: 18px;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.ft-row:hover .ft-del { opacity: 0.7; }
.ft-del:hover { opacity: 1; color: var(--text); }
@media (hover: none) { .ft-now { opacity: 1; } .ft-del { opacity: 0.5; } }

.ft-add {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 40px;
  padding: 0 12px;
  background: var(--plate);
  box-shadow: var(--bevel);
  border-radius: 0 0 3px 3px;
  font-size: 13px;
}
.ft-ghost { flex: none; width: 16px; height: 16px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px rgba(var(--ink-rgb, 34, 34, 34), 0.14); }
 html[data-theme="dark"] .ft-ghost { --ink-rgb: 236, 236, 236; } 
.ft-new {
  padding: 0;
  border: none;
  background: none;
  font-size: 13px;
  color: var(--text);
  opacity: 0.38;
  text-align: left;
  transition: opacity 0.15s ease;
}
.ft-new:hover { opacity: 0.65; }
.ft-field {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--text);
  font-size: 13px;
  text-transform: none;
  outline: none;
}
.ft-field::placeholder { color: var(--faint); text-transform: lowercase; }

/* ---------- card switches on the device ---------- */
.cell-cards {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
}
.cell-cards .head-btn { margin: 0; }

/* ---------- shared card parts ---------- */
.ft-body {
  margin-bottom: 2px;
  padding: 12px;
  background: var(--plate);
  box-shadow: var(--bevel);
}
.ft-body:last-child { margin-bottom: 0; }
.ft-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: var(--plate);
  box-shadow: var(--bevel);
  font-size: 11px;
  color: var(--muted);
}
.mini-stepper { display: inline-flex; align-items: center; gap: 8px; }
.mini-big { font-size: 13px; font-weight: 600; }
.mini:disabled { opacity: 0.35; cursor: default; }
.mini-stepper output { min-width: 40px; text-align: center; font-size: 12px; color: var(--text); font-variant-numeric: tabular-nums; }
.mini {
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  line-height: 1;
  color: var(--muted);
  background: var(--plate);
  box-shadow: 1px 1px 2.5px rgba(0, 0, 0, 0.2), -1px -1px 1.5px var(--tkey-highlight, #ffffff);
  transition: box-shadow var(--press-out), color 0.15s ease;
}
.mini:hover { color: var(--text); }
.mini:active { box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.2); transition: box-shadow var(--press-in); }
 html[data-theme="dark"] .mini { --tkey-highlight: rgba(255, 255, 255, 0.04); } 

/* ---------- daily goal ---------- */
#float-goal { width: 220px; }
.goal-body { display: grid; place-items: center; padding: 18px 12px; }
.goal-dial { position: relative; width: 140px; height: 140px; }
.goal-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.goal-track { fill: none; stroke: var(--recess); stroke-width: 9; }
.goal-arc {
  fill: none;
  stroke: var(--accent);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
/* the track is cut into the plate */
.goal-dial::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  box-shadow: var(--sunken);
  pointer-events: none;
}
.goal-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.goal-pct { font-size: 26px; font-weight: 300; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.goal-of { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.goal-dot {
  position: absolute;
  left: 50%;
  top: -8px;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--dot-off);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
#float-goal.reached .goal-dot { background: var(--accent); box-shadow: 0 0 6px 1px rgba(255, 97, 26, 0.55); }
#float-goal.reached #goal-state { color: var(--accent); }

/* ---------- notes ---------- */
/* the whole card resizes from its corner, wider as well as taller */
.ft-notes {
  width: 280px;
  height: 280px;
  min-width: 220px;
  min-height: 170px;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  display: flex;
  flex-direction: column;
  resize: both;
  overflow: hidden;
}
.ft-notes .ft-head, .ft-notes .ft-foot { flex: none; }
.ft-notes .ft-body { flex: 1; min-height: 0; padding: 0; display: flex; }
.notes-area {
  display: block;
  flex: 1;
  width: 100%;
  height: auto;
  padding: 12px;
  border: none;
  border-radius: 3px;
  resize: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.55;
  text-transform: none;
  outline: none;
}
.notes-area::placeholder { color: var(--faint); text-transform: lowercase; }

/* ---------- live board ---------- */
#float-live { width: 300px; }
.live-body { padding: 4px 12px; }
.live-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; }
.live-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.live-list li:last-child { border-bottom: none; }
.live-list .live-empty { justify-content: center; color: var(--muted); font-size: 12px; padding: 16px 0; }
.live-list .live-dot { box-shadow: 0 0 5px 1px rgba(255, 97, 26, 0.5); animation: blink 2.4s ease-in-out infinite; }
.live-who { display: flex; flex-direction: column; min-width: 0; text-transform: none; }
.live-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-list li.me .live-name { font-weight: 600; }
.live-task { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-time { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- clearer UX ---------- */
.head-link {
  margin-left: auto;
  border: none;
  background: none;
  padding: 2px 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  text-transform: none;
}
.head-link.signed-in { color: var(--muted); font-weight: 400; }
.head-link:hover { text-decoration: underline; text-underline-offset: 3px; }
/* header order: brand ... [saving…] [log in] (light) */
.cell-head .sync:not([hidden]) + .head-link { margin-left: 10px; }
.cell-head .head-link + .led { margin-left: 10px; }

.cards-label { font-size: 11px; color: var(--muted); margin-right: 2px; align-self: center; }

.ft-hint {
  margin: 0 0 2px;
  padding: 8px 12px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
  background: var(--plate);
  box-shadow: var(--bevel);
}
.ft-hint:empty { display: none; }

/* a task row: the box finishes it, the words drag it */
.ft-row { cursor: default; position: relative; background: var(--plate); }
.ft-row:not(.done) .ft-say { cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; }
.ft-list.sorting .ft-row { transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1); }
.ft-list.sorting .ft-row.lifted { transition: none; z-index: 2; cursor: grabbing; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.35); }
.ft-rename { flex: 1; min-width: 0; height: 26px; }
button.ft-box { padding: 0; border: none; background: none; cursor: pointer; }
button.ft-box:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 2px; }
.ft-say { flex: 0 1 auto; padding: 2px 0; }
.ft-row.current .ft-word { font-weight: 600; }
.ft-now {
  margin-left: auto;
  flex: none;
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.ft-now::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 5px 1px rgba(255, 97, 26, 0.5); }
.ft-row.current .ft-now { display: inline-flex; }
.ft-row.current .ft-del { margin-left: 4px; }
.ft-row:not(.current) .ft-del { margin-left: auto; }

/* welcome */
.welcome { width: min(400px, 100%); }
.steps { list-style: none; margin: 14px 0 6px; padding: 0; display: grid; gap: 12px; }
.steps li { display: flex; gap: 12px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.steps strong { color: var(--text); font-weight: 600; }
.step-n {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
}

/* ======================================================================
   flat look: same layout, no depth. White surfaces, hairline borders,
   no shadows, plain round buttons.
   ====================================================================== */
html:is([data-style="flat"], [data-style="mono"]) {
  --page: #f7f7f7;
  --plate: #ffffff;
  --groove: rgba(0, 0, 0, 0.09);
  --recess: #ffffff;
  --bevel: 0 0 #0000;
  --sunken: 0 0 #0000;
  --line: rgba(0, 0, 0, 0.07);
}
  html[data-theme="dark"]:is([data-style="flat"], [data-style="mono"]) {
    --page: #0f0f0f;
    --plate: #171717;
    --groove: rgba(255, 255, 255, 0.09);
    --recess: #171717;
    --line: rgba(255, 255, 255, 0.07);
  }
html:is([data-style="flat"], [data-style="mono"]) .device,
html:is([data-style="flat"], [data-style="mono"]) .ft {
  gap: 1px;
  padding: 1px;
  border-radius: 12px;
  box-shadow: none;
  overflow: hidden;
}
html:is([data-style="flat"], [data-style="mono"]) .ft.dragging { box-shadow: 0 0 0 1px var(--groove); }
html:is([data-style="flat"], [data-style="mono"]) .cell,
html:is([data-style="flat"], [data-style="mono"]) .ft > * { border-radius: 0; }
html:is([data-style="flat"], [data-style="mono"]) .device > .cell:first-child,
html:is([data-style="flat"], [data-style="mono"]) .ft > :first-child { border-top-left-radius: 11px; border-top-right-radius: 11px; }
html:is([data-style="flat"], [data-style="mono"]) .device > .cell:last-child,
html:is([data-style="flat"], [data-style="mono"]) .ft > :last-child { border-bottom-left-radius: 11px; border-bottom-right-radius: 11px; }
html:is([data-style="flat"], [data-style="mono"]) .ft-head,
html:is([data-style="flat"], [data-style="mono"]) .ft-hint,
html:is([data-style="flat"], [data-style="mono"]) .ft-body,
html:is([data-style="flat"], [data-style="mono"]) .ft-list { margin-bottom: 1px; }
html:is([data-style="flat"], [data-style="mono"]) .cell-gauge:active { background: var(--ui-fill); }

/* buttons: flat discs */
html:is([data-style="flat"], [data-style="mono"]) .push { background: transparent; }
html:is([data-style="flat"], [data-style="mono"]) .push::before,
html:is([data-style="flat"], [data-style="mono"]) .push-shadow,
html:is([data-style="flat"], [data-style="mono"]) .push-glow { display: none; }
html:is([data-style="flat"], [data-style="mono"]) .push-cap {
  left: 2px;
  top: 2px;
  background: var(--flat-cap, var(--plate));
  box-shadow: inset 0 0 0 1px var(--flat-line, var(--ui-border-strong));
  transition: transform var(--press-out), background 0.2s ease;
}
html:is([data-style="flat"], [data-style="mono"]) .push-icon { top: 2px; }
html:is([data-style="flat"], [data-style="mono"]) .push-orange { --flat-cap: var(--accent); --flat-line: transparent; }
html:is([data-style="flat"], [data-style="mono"]) .push-dark { --flat-cap: var(--text); --flat-line: transparent; --icon: var(--plate); }
html:is([data-style="flat"], [data-style="mono"]) .push-light { --icon: var(--text); }
html:is([data-style="flat"], [data-style="mono"]) .push.pressed:not(:disabled) .push-cap,
html:is([data-style="flat"], [data-style="mono"]) .push:active:not(:disabled) .push-cap {
  box-shadow: inset 0 0 0 1px var(--flat-line, var(--ui-border-strong));
  transform: scale(0.94);
  transition: transform var(--press-in);
}
html:is([data-style="flat"], [data-style="mono"]) .push.pressed:not(:disabled) .push-icon,
html:is([data-style="flat"], [data-style="mono"]) .push:active:not(:disabled) .push-icon { transform: scale(0.94); }

/* small controls */
html:is([data-style="flat"], [data-style="mono"]) .head-btn,
html:is([data-style="flat"], [data-style="mono"]) .mini,
html:is([data-style="flat"], [data-style="mono"]) .ft-hide {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--ui-border-strong);
}
html:is([data-style="flat"], [data-style="mono"]) .head-btn[aria-pressed="true"] { color: var(--text); background: var(--ui-fill); box-shadow: inset 0 0 0 1px var(--ui-border-strong); }
html:is([data-style="flat"], [data-style="mono"]) .head-btn:active,
html:is([data-style="flat"], [data-style="mono"]) .mini:active,
html:is([data-style="flat"], [data-style="mono"]) .ft-hide:active { background: var(--ui-fill); box-shadow: inset 0 0 0 1px var(--ui-border-strong); }
html:is([data-style="flat"], [data-style="mono"]) .goal-dial::before { display: none; }
html:is([data-style="flat"], [data-style="mono"]) .goal-track { stroke: var(--ui-fill); }
html:is([data-style="flat"], [data-style="mono"]) .live-list .live-dot,
html:is([data-style="flat"], [data-style="mono"]) .dot.on,
html:is([data-style="flat"], [data-style="mono"]) .led.on,
html:is([data-style="flat"], [data-style="mono"]) .ft-now::before,
html:is([data-style="flat"], [data-style="mono"]) #float-goal.reached .goal-dot { box-shadow: none; }
html:is([data-style="flat"], [data-style="mono"]) .sheet,
html:is([data-style="flat"], [data-style="mono"]) .dialog { box-shadow: none; }


/* ======================================================================
   mono look: the flat look in black and white only. No orange anywhere;
   the main button is solid ink, everything else is outlined.
   ====================================================================== */
html[data-style="mono"] {
  --accent: var(--text);
  --accent-glow: transparent;
  --dot-off: rgba(0, 0, 0, 0.14);
}
html[data-theme="dark"][data-style="mono"] { --dot-off: rgba(255, 255, 255, 0.16); }
html[data-style="mono"] .push-orange { --flat-cap: var(--text); --icon: var(--plate); }
html[data-style="mono"] .push-dark { --flat-cap: transparent; --flat-line: var(--ui-border-strong); --icon: var(--text); }
html[data-style="mono"] .push-light { --flat-cap: transparent; }
html[data-style="mono"] .step-n { color: var(--plate); }
html[data-style="mono"] .head-link { color: var(--text); }
html[data-style="mono"] .display-time { font-weight: 200; }
html[data-style="mono"] .led.paused,
html[data-style="mono"] .dot.blink { background: var(--text); }

/* light / dark button on the device */
.theme-btn {
  width: 18px;
  height: 18px;
  padding: 0;
  margin-left: 10px;
  border: none;
  background: none;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.theme-btn:hover { color: var(--text); }
.theme-btn svg { width: 15px; height: 15px; }
.theme-btn circle { fill: none; stroke: currentColor; stroke-width: 1.6; }
.theme-btn path { fill: currentColor; }
.cell-head .theme-btn + .led { margin-left: 10px; }

/* ---------- card layout ---------- */
.ft.placed { transition: opacity 0.3s ease, visibility 0s linear 0.3s, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.ft.placed.open { transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
.ft.dragging { transition: none !important; }
/* no room next to the device: hidden until there is, or until asked for */
.ft.open.squeezed { opacity: 0; visibility: hidden; pointer-events: none; }
.head-btn.squeezed .dot { background: transparent; box-shadow: inset 0 0 0 1px var(--muted); }

/* ---------- calendar card ---------- */
.ft-calendar { width: 340px; }
.cal-body { --cell: 10px; --gap: 3px; }
.cal-months {
  display: grid;
  grid-template-columns: repeat(22, var(--cell));
  gap: var(--gap);
  margin: 0 0 5px 22px;
  height: 12px;
  font-size: 9px;
  color: var(--muted);
}
.cal-months span { white-space: nowrap; }
.cal-wrap { display: flex; gap: 6px; }
.cal-days { display: grid; grid-template-rows: repeat(7, var(--cell)); gap: var(--gap); width: 16px; font-size: 8px; line-height: var(--cell); color: var(--muted); }
.cal-grid {
  display: grid;
  grid-template-rows: repeat(7, var(--cell));
  grid-auto-flow: column;
  grid-auto-columns: var(--cell);
  gap: var(--gap);
}
.cal-grid i, .cal-legend i { display: block; width: var(--cell, 10px); height: var(--cell, 10px); border-radius: 2.5px; background: var(--accent); }
.cal-grid i.l0, .cal-legend i.l0 { background: var(--cal-empty); }
.cal-grid i.l1, .cal-legend i.l1 { opacity: 0.25; }
.cal-grid i.l2, .cal-legend i.l2 { opacity: 0.45; }
.cal-grid i.l3, .cal-legend i.l3 { opacity: 0.7; }
.cal-grid i.future { background: none; }
.cal-grid i.today { outline: 1px solid var(--text); outline-offset: 1px; }
.cal-legend { display: inline-flex; align-items: center; gap: 3px; }
.cal-legend i { --cell: 8px; }
:root { --cal-empty: rgba(0, 0, 0, 0.07); }
html[data-theme="dark"] { --cal-empty: rgba(255, 255, 255, 0.07); }

/* ---------- streak card ---------- */
.streak-body { display: grid; gap: 14px; }
.streak-top { display: flex; align-items: center; gap: 12px; }
.streak-flame { flex: none; width: 34px; height: 34px; }
.streak-flame .flame-out { fill: var(--dot-off); transition: fill 0.3s ease; }
.streak-flame .flame-in { fill: var(--plate); }
#float-streak.lit .flame-out { fill: var(--flame, var(--accent)); }
#float-streak.lit .streak-flame { filter: drop-shadow(0 0 6px var(--flame-glow, rgba(255, 97, 26, 0.45))); }
#float-streak.lit .flame-in { fill: #ffffff; }
.streak-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.streak-big { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.streak-num { font-size: 30px; font-weight: 400; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.streak-unit { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.streak-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.sw-day { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sw-day i { position: relative; width: 26px; height: 26px; border-radius: 50%; background: var(--cal-empty); display: grid; place-items: center; }
.sw-day svg { width: 100%; height: 100%; }
.sw-day.met i { background: var(--accent); box-shadow: 0 0 10px -2px var(--accent-glow, rgba(255, 97, 26, 0.5)); }
.sw-day.met path { fill: none; stroke: var(--on-accent, #ffffff); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.sw-day.today i { background: none; }
.sw-day.today svg { transform: rotate(-90deg); }
.sw-track { fill: none; stroke: var(--cal-empty); stroke-width: 3.5; }
.sw-ring { fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 100; transition: stroke-dashoffset 0.6s ease; }
.sw-day.future i { opacity: 0.5; }
.sw-day b { font-variant-numeric: tabular-nums; font-size: 9.5px; font-weight: 400; color: var(--muted); }
.sw-day.today b { color: var(--text); }
.streak-goal { padding-top: 12px; border-top: 1px solid var(--line); }
.sg-top { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.sg-pct { font-variant-numeric: tabular-nums; letter-spacing: 0; }
.sg-nums { margin: 4px 0 9px; display: flex; align-items: baseline; gap: 3px; }
.sg-nums b { font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.sg-nums span { font-variant-numeric: tabular-nums; font-size: 11px; color: var(--muted); }
.sg-bar { height: 7px; border-radius: 4px; background: var(--cal-empty); overflow: hidden; }
.sg-bar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }

/* ---------- focus score card ---------- */
.score-body { display: grid; gap: 10px; }
.score-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.score-days button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0; border: none; border-radius: 99px;
  background: var(--cal-empty); color: var(--muted);
  font-size: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}
.score-days button b { font-size: 12px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.score-days button[aria-selected="true"] { background: var(--text); color: var(--plate); }
.score-days button[aria-selected="true"] b { color: var(--plate); }
.score-top { display: flex; align-items: flex-start; justify-content: space-between; margin-top: 4px; }
.score-big { display: flex; align-items: baseline; gap: 3px; }
.score-num { font-size: 36px; font-weight: 300; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.score-of { font-size: 13px; color: var(--muted); }
.score-label { margin-top: 5px; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.score-delta { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--muted); }
.score-delta.up { color: var(--good, #2fbf55); }
.score-chart { height: 64px; display: flex; align-items: flex-end; justify-content: space-between; gap: 1px; }
.score-chart i { flex: 0 1 2px; min-width: 1px; border-radius: 1px; background: var(--muted); opacity: 0.75; }
.score-chart i.empty { background: var(--faint); opacity: 0.5; }
.score-chart i.now, .score-chart i.peak { background: var(--highlight, var(--accent)); opacity: 1; }
.score-axis { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; font-size: 9px; color: var(--muted); margin-bottom: 4px; }
.score-row { display: grid; grid-template-columns: 82px 1fr 34px; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.score-row b { font-weight: 500; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.score-bar { height: 4px; border-radius: 2px; background: var(--cal-empty); overflow: hidden; }
.score-bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.score-row.off b { color: var(--muted); font-weight: 400; }
.score-row.off .score-bar i { background: var(--faint); opacity: 0.4; }
#float-streak .ft-foot, #float-score .ft-foot { line-height: 1.45; }

/* ---------- your row on the live card ---------- */
.live-me { display: flex; align-items: center; gap: 9px; padding: 10px 12px; }
.live-me-who { font-size: 12px; font-weight: 600; }
.live-me .task-pick { flex: 1 1 auto; min-width: 0; max-width: none; }
.live-me .task-pick .pick-text { flex: 1; text-align: left; }
.live-me .live-time { margin-left: 0; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
#me-dot.off { background: var(--dot-off); box-shadow: none; animation: none; }
#me-dot.paused { animation: blink 1.2s steps(1) infinite; }

/* ---------- smart tracking settings ---------- */
.track-sub { margin: 12px 0 2px; font-size: 11px; color: var(--muted); }
.track-list > li { padding: 7px 0; font-size: 12px; }
.track-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-row.off .track-name { color: var(--muted); }
.track-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.track-kind { min-width: 62px; }
.track-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.track-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 9px; border-radius: 99px; font-size: 11px; box-shadow: inset 0 0 0 1px var(--ui-border-strong); }
.track-chip button { border: none; background: none; padding: 0 4px; color: var(--muted); font-size: 13px; line-height: 1; }
.track-chip button:hover { color: var(--text); }

/* ---------- black: the dark theme on pure black ---------- */
html[data-black] {
  --page: #000000;
  --plate: #0c0c0c;
  --groove: #000000;
  --recess: #060606;
  --socket: #0c0c0c;
  --sheet: #0a0a0a;
  --ui-fill: #141414;
  --tkey-bg: linear-gradient(135deg, #1a1a1a 0%, #111111 100%);
  --bevel: inset -1px -1px 2px 0 rgba(0, 0, 0, 0.9), inset -2px -2px 2px 0 rgba(255, 255, 255, 0.03);
}
html[data-black]:is([data-style="flat"], [data-style="mono"]) {
  --page: #000000;
  --plate: #000000;
  --recess: #000000;
  --sheet: #000000;
  --groove: rgba(255, 255, 255, 0.12);
}

.text-btns { display: flex; gap: 16px; flex-wrap: wrap; }

/* ======================================================================
   widgets look: a board of rounded widgets instead of a device. Dark by
   default (light works too), soft hairlines, small uppercase labels and
   even-width numbers, green for progress with a little glow, a red flame
   for the streak. The cards don't float here: they're docked next to the
   timer and flow into columns (see floats.js).
   ====================================================================== */
html[data-style="widgets"] {
  --page: #0b0b0b;
  --plate: #151515;
  --groove: transparent;
  --recess: #151515;
  --text: #f1f1f1;
  --muted: #7c7c7c;
  --faint: #3b3b3b;
  --line: rgba(255, 255, 255, 0.07);
  --accent: #3ddc4f;
  --accent-glow: rgba(61, 220, 79, 0.55);
  --on-accent: #0b0b0b;
  --good: #3ddc4f;
  --flame: #ff4a1c;
  --flame-glow: rgba(255, 74, 28, 0.7);
  --highlight: #b9a4ff;
  --dot-off: #2a2a2a;
  --cal-empty: rgba(255, 255, 255, 0.07);
  --sheet: #121212;
  --ui-border: rgba(255, 255, 255, 0.08);
  --ui-border-strong: rgba(255, 255, 255, 0.14);
  --ui-hover: rgba(255, 255, 255, 0.05);
  --ui-fill: #1e1e1e;
  --scrim: rgba(0, 0, 0, 0.55);
  --toast-bg: #f1f1f1;
  --toast-text: #111111;
  --w-border: rgba(255, 255, 255, 0.06);
  --w-shadow: 0 30px 60px -32px rgba(0, 0, 0, 0.9);
  --w-radius: 30px;
}
html[data-style="widgets"][data-black] { --page: #000000; --plate: #0e0e0e; --recess: #0e0e0e; --sheet: #0a0a0a; }
html[data-style="widgets"][data-theme="light"] {
  --page: #ebebef;
  --plate: #ffffff;
  --recess: #ffffff;
  --text: #111111;
  --muted: #8a8a8f;
  --faint: #cfcfd4;
  --line: rgba(0, 0, 0, 0.06);
  --accent: #23b83a;
  --accent-glow: rgba(35, 184, 58, 0.4);
  --on-accent: #ffffff;
  --good: #23b83a;
  --flame-glow: rgba(255, 74, 28, 0.45);
  --highlight: #8b6dff;
  --dot-off: #e1e1e6;
  --cal-empty: rgba(0, 0, 0, 0.06);
  --sheet: #ffffff;
  --ui-border: rgba(0, 0, 0, 0.08);
  --ui-border-strong: rgba(0, 0, 0, 0.13);
  --ui-hover: rgba(0, 0, 0, 0.035);
  --ui-fill: #f2f2f5;
  --scrim: rgba(30, 30, 30, 0.2);
  --toast-bg: #111111;
  --toast-text: #f4f4f4;
  --w-border: rgba(0, 0, 0, 0.04);
  --w-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.25);
}

/* the board: columns of widgets (dealt by floats.js), at least 340px each */
html[data-style="widgets"] .stage {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  min-height: 0;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 18px calc(28px + env(safe-area-inset-bottom));
}
html[data-style="widgets"] .board-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
html[data-style="widgets"] .stage > .device { flex: 1 1 0; }

/* every widget */
html[data-style="widgets"] .device,
html[data-style="widgets"] .ft {
  width: 100%;
  border-radius: var(--w-radius);
  background: var(--plate);
  border: 1px solid var(--w-border);
  box-shadow: var(--w-shadow);
}

/* ---- the timer widget ---- */
html[data-style="widgets"] .device {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  column-gap: 8px;
  row-gap: 0;
  padding: 18px 20px 20px;
  animation: none;
}
html[data-style="widgets"] .cell { background: none; box-shadow: none; border-radius: 0; }
html[data-style="widgets"] .cell-head { padding: 0 0 4px; }
html[data-style="widgets"] .brand { font-size: 12px; }
html[data-style="widgets"] .led.on { box-shadow: 0 0 8px 1px var(--accent-glow); }
html[data-style="widgets"] .cell-display { text-align: left; padding: 22px 0 18px; border-bottom: 1px solid var(--line); }
html[data-style="widgets"] .display-label,
html[data-style="widgets"] .gauge-label,
html[data-style="widgets"] .key-label,
html[data-style="widgets"] .ft-title {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
html[data-style="widgets"] .display-time {
  justify-content: flex-start;
  margin: 10px 0 10px -2px;
  font-size: clamp(52px, 15vw, 68px);
  font-weight: 200;
  letter-spacing: -0.04em;
}
html[data-style="widgets"] .display-meta { justify-content: flex-start; font-variant-numeric: tabular-nums; font-size: 10.5px; }
html[data-style="widgets"] .display-overlap { font-variant-numeric: tabular-nums; font-size: 10.5px; }
html[data-style="widgets"] .display-task-row { justify-content: flex-start; margin-top: 14px; }

/* keys: plain round buttons in a row */
html[data-style="widgets"] .cell-key { padding: 18px 0 6px; gap: 9px; }
html[data-style="widgets"] .cell-key .dot { display: none; }
html[data-style="widgets"] .push { background: transparent; }
html[data-style="widgets"] .push::before,
html[data-style="widgets"] .push-shadow,
html[data-style="widgets"] .push-glow { display: none; }
html[data-style="widgets"] .push-cap {
  left: 2px;
  top: 2px;
  background: var(--w-cap, var(--ui-fill));
  box-shadow: inset 0 0 0 1px var(--w-border);
  transition: transform var(--press-out), background 0.25s ease, box-shadow 0.4s ease;
}
html[data-style="widgets"] .push-icon { top: 2px; color: var(--w-icon, var(--text)); }
html[data-style="widgets"] .push-orange { --w-cap: var(--text); --w-icon: var(--plate); }
html[data-style="widgets"] .push-orange.is-running .push-cap { box-shadow: 0 0 0 3px var(--plate), 0 0 0 4.5px var(--accent), 0 0 22px 2px var(--accent-glow); }
html[data-style="widgets"] .push.pressed:not(:disabled) .push-cap,
html[data-style="widgets"] .push:active:not(:disabled) .push-cap { transform: scale(0.93); transition: transform var(--press-in); }
html[data-style="widgets"] .push.pressed:not(:disabled) .push-icon,
html[data-style="widgets"] .push:active:not(:disabled) .push-icon { transform: scale(0.93); }

/* reminder gauges: two soft pills */
html[data-style="widgets"] .cell-gauge {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--ui-fill);
  align-items: center;
}
html[data-style="widgets"] .cell-gauge:active { box-shadow: none; opacity: 0.8; }
html[data-style="widgets"] .gauge-value { font-variant-numeric: tabular-nums; font-size: 12.5px; }

/* card switches: a pill strip, the shown ones filled */
html[data-style="widgets"] .cell-cards { justify-content: flex-start; gap: 6px; padding: 16px 0 0; }
html[data-style="widgets"] .cards-label { display: none; }
html[data-style="widgets"] .head-btn {
  height: auto;
  padding: 6px 11px;
  border-radius: 99px;
  background: var(--ui-fill);
  box-shadow: none;
  color: var(--muted);
  font-size: 11px;
}
html[data-style="widgets"] .head-btn .dot { display: none; }
html[data-style="widgets"] .head-btn[aria-pressed="true"] { background: var(--text); color: var(--plate); box-shadow: none; }
html[data-style="widgets"] .head-btn:active { box-shadow: none; opacity: 0.8; }

/* ---- the other widgets ---- */
html[data-style="widgets"] .ft {
  position: relative;
  left: auto;
  top: auto;
  z-index: auto;
  display: none;
  padding: 18px 20px;
  opacity: 1;
  visibility: visible;
  transform: none !important;
  transition: none;
}
html[data-style="widgets"] .ft.open { display: block; }
html[data-style="widgets"] .ft,
html[data-style="widgets"] .ft-notes { width: 100% !important; }
html[data-style="widgets"] .goal-body { display: grid; place-items: center; padding: 6px 0; }
html[data-style="widgets"] .ft-notes.open { display: flex; }
html[data-style="widgets"] .ft > * {
  margin: 0;
  padding-left: 0;
  padding-right: 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
}
html[data-style="widgets"] .ft-head { padding: 0 0 14px; cursor: default; }
html[data-style="widgets"] .ft-count { font-variant-numeric: tabular-nums; font-size: 10.5px; }
html[data-style="widgets"] .ft-hide { width: 20px; height: 20px; background: var(--ui-fill); box-shadow: none; }
html[data-style="widgets"] .ft-body { padding-top: 0; padding-bottom: 0; }
html[data-style="widgets"] .ft-foot { margin-top: 14px; padding: 12px 0 0; border-top: 1px solid var(--line); font-size: 11px; }
html[data-style="widgets"] .ft-hint { padding: 0 0 8px; }
html[data-style="widgets"] .ft-list { padding: 0; }
html[data-style="widgets"] .ft-row { background: var(--plate); }
html[data-style="widgets"] .ft-add { padding: 0; }
html[data-style="widgets"] .mini { background: var(--ui-fill); box-shadow: none; }
html[data-style="widgets"] .goal-dial::before { display: none; }
html[data-style="widgets"] .goal-track { stroke: var(--cal-empty); }
html[data-style="widgets"] .goal-arc { filter: drop-shadow(0 0 5px var(--accent-glow)); }
html[data-style="widgets"] .pick { background: var(--ui-fill); box-shadow: none; }
html[data-style="widgets"] .timebox-pick.over { color: var(--flame); box-shadow: inset 0 0 0 1px var(--flame); background: none; }
html[data-style="widgets"] .live-me { padding: 0 0 12px; border-bottom: 1px solid var(--line); }
html[data-style="widgets"] .live-body { padding: 4px 0 0; }
html[data-style="widgets"] .live-dot { background: var(--accent); }
html[data-style="widgets"] .live-list .live-dot,
html[data-style="widgets"] #me-dot.on { box-shadow: 0 0 6px 1px var(--accent-glow); }

/* streak: the glow is the point here */
html[data-style="widgets"] .streak-flame { width: 40px; height: 40px; }
html[data-style="widgets"] #float-streak.lit .streak-flame { filter: drop-shadow(0 0 10px var(--flame-glow)); }
html[data-style="widgets"] .streak-num { font-size: 34px; font-weight: 500; }
html[data-style="widgets"] .sw-day i { width: 30px; height: 30px; }
html[data-style="widgets"] .sw-day.met i { box-shadow: 0 0 14px -1px var(--accent-glow); }
html[data-style="widgets"] .sw-day b { font-size: 10px; }
html[data-style="widgets"] .sg-bar { height: 10px; border-radius: 6px; overflow: visible; }
html[data-style="widgets"] .sg-bar i { border-radius: 6px; box-shadow: 0 0 14px 1px var(--accent-glow); }
html[data-style="widgets"] .sg-nums b { font-size: 22px; }
html[data-style="widgets"] .score-bar i { box-shadow: 0 0 8px var(--accent-glow); }

/* score: day pills like a calendar strip, a thin-line timeline */
html[data-style="widgets"] .score-days { gap: 6px; }
html[data-style="widgets"] .score-days button { padding: 9px 0 8px; background: var(--ui-fill); }
html[data-style="widgets"] .score-days button[aria-selected="true"] { background: var(--text); }
html[data-style="widgets"] .score-num { font-size: 40px; font-weight: 300; }
html[data-style="widgets"] .score-chart { height: 76px; }
html[data-style="widgets"] .score-chart i { background: var(--text); opacity: 0.55; }
html[data-style="widgets"] .score-chart i.empty { background: var(--faint); opacity: 0.6; }
html[data-style="widgets"] .score-chart i.now,
html[data-style="widgets"] .score-chart i.peak { background: var(--highlight); opacity: 1; box-shadow: 0 0 6px var(--highlight); }

/* calendar: green squares, github style */
html[data-style="widgets"] .cal-grid i.today { outline-color: var(--muted); }

/* drawer and dialogs follow the rounder shapes */
html[data-style="widgets"] .sheet { border-radius: 28px 28px 0 0; box-shadow: none; border: 1px solid var(--w-border); }
html[data-style="widgets"] .dialog { border-radius: 24px; box-shadow: none; }
html[data-style="widgets"] .switch:checked { background: var(--accent); }

.hotkey-btn { min-width: 64px; font-size: 12px; color: var(--text); font-variant-numeric: tabular-nums; }
.hotkey-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
