@font-face {
  font-family: "Inconsolata";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/inconsolata-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inconsolata";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/inconsolata-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1d1d1f;
  --muted: #6e6e73;
  --line: #e3e3e8;
  --accent: #2f6fde;
  --danger: #d70015;
  --hover: #f2f2f5;
  --running: #e8f0fe;
  --off-hours: #b45309;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161618;
    --fg: #f2f2f7;
    --muted: #98989f;
    --line: #2f2f34;
    --accent: #5e9bff;
    --danger: #ff6961;
    --hover: #222226;
    --running: #1c2a42;
    --off-hours: #fbbf24;
  }
}

[data-color="red"] {
  --tint: #e5534b;
}

[data-color="orange"] {
  --tint: #e8912d;
}

[data-color="yellow"] {
  --tint: #d4a72c;
}

[data-color="green"] {
  --tint: #3fb950;
}

[data-color="teal"] {
  --tint: #2ea89b;
}

[data-color="blue"] {
  --tint: #4c8dff;
}

[data-color="purple"] {
  --tint: #a371f7;
}

[data-color="pink"] {
  --tint: #e26aa8;
}

[data-color="grey"] {
  --tint: #8b949e;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.5 "Inconsolata", monospace;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1rem;
}

main.centred {
  min-height: 80vh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1rem;
}

header > h1 {
  white-space: nowrap;
}

h1 {
  font-size: 1.5rem;
  margin: 0.5rem 0;
}

@media (max-width: 30rem) {
  h1 {
    font-size: 1.2rem;
  }
}

button,
.button {
  font: inherit;
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  cursor: pointer;
}

button.quiet {
  background: none;
  color: var(--muted);
  border: 1px solid var(--line);
}

.error {
  color: var(--danger);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

@media (max-width: 30rem) {
  .header-actions button.quiet {
    padding-inline: 0.65rem;
  }
}

.empty {
  margin-top: 20vh;
  text-align: center;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.folder {
  margin-top: 1rem;
}

.folder-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
}

button.folder-toggle {
  padding: 0.25rem 0;
  background: none;
  color: var(--fg);
  font-size: 1.35rem;
  font-weight: 600;
}

@media (max-width: 30rem) {
  button.folder-toggle {
    font-size: 1.2rem;
  }
}

.cards {
  margin: 0.25rem 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.card > :first-child {
  flex: 1;
  min-width: 0;
}

button.card-add {
  min-width: 2.25rem;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--accent);
  font-size: 1.3rem;
}

.card-edit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
}

.card.closed .card-name {
  color: var(--muted);
  text-decoration: line-through;
}

.card-group {
  margin-bottom: 1.5rem;
}

.card-group .section-title {
  margin-top: 0.75rem;
}

.tools {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.tool {
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.35rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: none;
  color: var(--muted);
  font: inherit;
  line-height: 1;
}

.tool[aria-pressed="true"] {
  border-color: var(--accent);
}

.tool[aria-pressed="false"] .tool-icon {
  opacity: 0.5;
  filter: grayscale(1);
}

button.add {
  padding: 0.25rem 0;
  background: none;
  color: var(--accent);
}

dialog.share {
  max-width: 24rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--bg);
  color: var(--fg);
}

dialog.share ul {
  padding: 0;
  list-style: none;
}

dialog.share li {
  padding: 0.25rem 0;
}

dialog::backdrop {
  background: rgb(0 0 0 / 0.4);
}

dialog.share label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timer-slot {
  position: sticky;
  top: 0;
  z-index: 1;
}

.timer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem -1rem;
  padding: 0.75rem 1rem;
  min-height: 3rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.timer.idle {
  color: var(--muted);
}

.timer.running {
  background: var(--running);
}

.timer-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.timer-card > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timer-name {
  font-weight: 600;
}

.elapsed {
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.search {
  box-sizing: border-box;
  width: 100%;
  margin: 0.5rem 0;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}

.section-title {
  margin: 1rem 0 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

button.card-start {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  padding: 0.9rem 0 0.9rem 0.75rem;
  border-radius: 0;
  background: none;
  color: var(--fg);
  text-align: left;
  overflow-wrap: anywhere;
}

@media (hover: hover) {
  button.tile:hover,
  .tile button:hover {
    background: color-mix(in srgb, var(--fg) 6%, var(--tile-bg));
  }

  button.entry:hover,
  button.menu-choice:hover {
    background: var(--hover);
  }
}

.card-list {
  font-size: 0.8rem;
}

[data-long-press] {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

dialog.ask {
  box-sizing: border-box;
  width: calc(100% - 2rem);
  max-width: 24rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--bg);
  color: var(--fg);
}

dialog.ask h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.dialog-input {
  box-sizing: border-box;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}

.menu-choices {
  display: grid;
  gap: 0.4rem;
}

button.menu-choice {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  background: none;
  color: var(--fg);
  text-align: left;
}

button.menu-choice.danger {
  color: var(--danger);
}

.menu-icon {
  display: inline-block;
  width: 1.6rem;
  margin-right: 0.4rem;
  text-align: center;
}

.menu:not(.swatches) button.menu-choice[aria-pressed="true"]::after {
  content: "✓";
  float: right;
  color: var(--accent);
}

.swatches .menu-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.swatches button.menu-choice {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 50%;
  background: var(--tint);
}

.swatches button.menu-choice:not([data-color]) {
  background: linear-gradient(
    to top right,
    transparent calc(50% - 1px),
    var(--muted) 50%,
    transparent calc(50% + 1px)
  );
}

.swatches button.menu-choice[aria-pressed="true"] {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

.dot {
  box-sizing: border-box;
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  border-radius: 50%;
  background: var(--tint);
}

.dot:not([data-color]) {
  border: 1.5px solid var(--muted);
}

.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  z-index: 10;
  max-width: calc(100% - 2rem);
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  background: var(--fg);
  color: var(--bg);
  transform: translateX(-50%);
}

.toast.error {
  background: var(--danger);
  color: white;
}

header .title {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}

header .title h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.back {
  min-width: 2.25rem;
  min-height: 2.75rem;
  padding: 0 0.5rem 0.2rem 0;
  background: none;
  color: var(--accent);
  font-size: 2rem;
  line-height: 1;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(11rem, 50% - 0.25rem), 1fr));
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
  padding: 0;
  list-style: none;
  font-size: clamp(15px, 4.2vw, 17px);
}

.tile {
  --tile-bg: var(--bg);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: var(--tile-bg);
  color: var(--fg);
}

.card.tile {
  position: relative;
  overflow: visible;
  border-radius: 0.2rem;
}

.card.tile button.card-start {
  border-radius: 0.2rem 0 0 0.2rem;
}

.card.tile button.card-add {
  border-radius: 0 0.2rem 0.2rem 0;
}

/* Who is on a card: a cut-out in the tile's top edge, near its right end. */
.team-badges {
  position: absolute;
  top: -1px;
  right: 0.75rem;
  display: flex;
  gap: 0.15rem;
  padding: 0 0.3rem;
  border-radius: 0.6rem;
  background: var(--bg);
  font-size: 1rem;
  line-height: 1;
  transform: translateY(-50%);
}

.tile[data-color] {
  --tile-bg: color-mix(in srgb, var(--tint) 12%, var(--bg));
  border-color: color-mix(in srgb, var(--tint) 45%, var(--line));
}

.tile.running {
  --tile-bg: var(--running);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.one-card-per-line .card-tiles {
  grid-template-columns: 1fr;
  font-size: inherit;
}

.one-card-per-line .card-tiles button.card-start {
  flex-direction: row;
  justify-content: flex-start;
  align-items: baseline;
  gap: 0.75rem;
  padding-block: 0.6rem;
}

.one-card-per-line .card-tiles .card-name {
  flex: 1;
}

/* A fixed width keeps the emojis just before it in line from card to card. */
.one-card-per-line .card-tiles .card-list {
  flex: none;
  width: 7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.one-card-per-line .card-tiles .team-badges {
  position: static;
  padding: 0;
  background: none;
  transform: none;
}

.timer .team-badges {
  position: static;
  display: inline-flex;
  margin-left: 0.5rem;
  padding: 0;
  background: none;
  font-weight: normal;
  transform: none;
}

/* Each emoji hops in turn: --i is its place in the group, --phase where the
   group is in its --cycle. */
.team-badges > span {
  animation: hop var(--cycle) ease-in-out infinite;
  animation-delay: calc(var(--phase) + var(--i) * 120ms);
}

@keyframes hop {
  0%,
  30%,
  100% {
    transform: translateY(0);
  }

  12% {
    transform: translateY(-3px);
  }

  22% {
    transform: translateY(0);
  }

  26% {
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-badges > span {
    animation: none;
  }
}

button.layout {
  align-self: stretch;
  padding: 0 0.75rem;
}

.layout-icon {
  display: block;
  width: 1rem;
  height: 1rem;
  background-repeat: no-repeat;
}

.layout-icon.columns {
  background-image:
    linear-gradient(currentColor 0 0), linear-gradient(currentColor 0 0),
    linear-gradient(currentColor 0 0), linear-gradient(currentColor 0 0);
  background-position: 0 0, 100% 0, 0 100%, 100% 100%;
  background-size: 42% 42%;
}

.layout-icon.rows {
  background-image: linear-gradient(currentColor 0 0), linear-gradient(currentColor 0 0);
  background-position: 0 0, 0 100%;
  background-size: 100% 42%;
}

/* Room for a 16rem column either side of the 40rem one, with 2rem gaps and margins. */
@media (width >= 78rem) {
  .pinned-slot,
  .recent-slot {
    position: fixed;
    top: 1rem;
    width: 16rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }

  .pinned-slot {
    right: calc(50% + 22rem);
  }

  .recent-slot {
    left: calc(50% + 22rem);
    bottom: 1rem;
  }

  .pinned-slot .tiles,
  .recent-slot .tiles {
    grid-template-columns: 1fr;
  }

  .recent-slot .picker {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  /* Margins don't collapse in a flex column, so the tiles' own top margin is the whole gap. */
  .recent-slot .section-title {
    margin-bottom: 0;
  }

  /* Tiles that don't fit wrap into a second column, which is clipped, so only whole ones show.
     Only sideways, so the emojis on the top tile's edge aren't cut off. */
  .recent-slot .card-tiles {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-flow: column wrap;
    overflow-x: clip;
  }

  .recent-slot .card-tiles > .tile {
    box-sizing: border-box;
    width: 100%;
  }
}

@media (width < 78rem) {
  .searching .pinned-slot,
  .searching .recent-slot {
    display: none;
  }

  .recent-slot .tile:nth-child(n + 7) {
    display: none;
  }
}

button.list-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 0.75rem;
  text-align: left;
  white-space: nowrap;
}

.list-button-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-button .team-badges {
  position: static;
  padding: 0;
  background: none;
  transform: none;
}

.list-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
}

button.list-name {
  padding: 0;
  background: none;
  color: var(--fg);
  font-weight: 600;
}

button.timer-card {
  padding: 0;
  background: none;
  color: inherit;
  text-align: left;
}

.field {
  display: block;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.field > .dialog-input,
.field > div,
.field > p {
  margin-top: 0.25rem;
  color: var(--fg);
  font-size: 1rem;
}

.dialog-subtitle {
  margin: -0.5rem 0 0.75rem;
}

.dialog-hint {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
}

.dialog-error {
  margin: 0.75rem 0 0;
  color: var(--danger);
}

.dialog-error:empty {
  display: none;
}

.dialog-buttons .danger {
  margin-right: auto;
  color: var(--danger);
}

.segments {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  overflow: hidden;
}

button.segment {
  flex: 1;
  padding: 0.4rem;
  border-radius: 0;
  background: none;
  color: var(--muted);
  white-space: nowrap;
}

button.segment[aria-pressed="true"] {
  background: var(--accent);
  color: white;
}

button.now {
  box-sizing: border-box;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px dashed var(--line);
  background: none;
  color: var(--fg);
  text-align: left;
}

.person-picker {
  margin-bottom: 0.5rem;
}

.week {
  margin-bottom: 1.5rem;
}

.week-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 1rem 0 0.25rem;
  font-size: 1rem;
}

.week-title .section-title {
  margin: 0;
}

.day-title {
  display: flex;
  justify-content: space-between;
  margin: 0.75rem 0 0.25rem;
  font-size: 1rem;
}

.entries {
  margin: 0;
  padding: 0;
  list-style: none;
}

.entries li {
  border-bottom: 1px solid var(--line);
}

button.entry {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.4rem 0.5rem;
  border-radius: 0;
  background: none;
  color: var(--fg);
  text-align: left;
}

.entry-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.entry-card > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-card .muted,
.entry-times {
  font-size: 0.85rem;
}

.entry-duration {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.button-links {
  margin-top: 2rem;
}

.button-links p {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.9rem;
}

.button-links-actions {
  display: flex;
  gap: 0.5rem;
}

.signed-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.shared-name {
  font-weight: 600;
}

.shared-note {
  font-size: 0.8rem;
}

.export {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
  margin-top: 2rem;
}

.export .field {
  flex: 1;
  margin: 0;
}

/* Below the month and button, though it comes first for the keyboard. */
.export-headers {
  display: flex;
  flex-basis: 100%;
  order: 1;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.export-headers input {
  accent-color: var(--accent);
}

.people {
  display: grid;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
  padding: 0;
  list-style: none;
}

.person {
  display: flex;
  align-items: center;
}

.person-body {
  display: grid;
  flex: 1;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.6rem 0.75rem;
}

.person-who {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.person-emoji {
  font-size: 1.6rem;
}

.person-initials {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.person-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.person-card > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-card-name {
  font-weight: 600;
}

.person:not(.running) .person-card {
  color: var(--muted);
}

.person-when {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.elapsed-small {
  font-weight: 600;
}

.person-clock {
  color: var(--muted);
  font-size: 0.8rem;
}

.person-clock.off-hours {
  color: var(--off-hours);
}

.person .tools {
  padding-right: 0.75rem;
}

.team-tabs {
  width: fit-content;
  margin: 0.5rem 0 1rem;
}

.team-tabs .segment {
  padding-inline: 1.25rem;
}

.day-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.day-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.day-nav button.quiet {
  padding: 0.25rem 0.65rem;
}

.day-nav button:disabled {
  opacity: 0.3;
  cursor: default;
}

.day-heading {
  min-width: 6.5rem;
  font-weight: 600;
  text-align: center;
}

.day-nav input[type="range"] {
  width: 9rem;
}

.day-tools {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}

.day-tools .search {
  flex: 1;
  margin: 0;
}

input[type="range"] {
  accent-color: var(--accent);
}

/* On wide screens this grows past the column, centred on it. */
.breakout {
  width: min(72rem, 100vw - 2rem);
  margin-left: 50%;
  overflow-x: auto;
  transform: translateX(-50%);
}

.day-calendar > .day-week {
  margin: 0 auto;
}

.day-timeline {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.day-gutter {
  position: relative;
  flex: none;
  width: 2.75rem;
}

.day-gutter span {
  position: absolute;
  right: 0.35rem;
  color: var(--muted);
  font-size: 0.7rem;
  transform: translateY(-50%);
}

.day-column {
  flex: 1;
  min-width: 0;
}

.day-who {
  margin: 0;
  overflow: hidden;
  font-size: 1.1rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-total,
.day-stats {
  margin: 0 0 0.3rem;
  overflow: hidden;
  font-size: 0.7rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-strip {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 26px;
  margin-bottom: 0.3rem;
}

.week-strip button {
  flex: 1;
  padding: 0;
  border-radius: 2px 2px 0 0;
  background: var(--line);
}

.week-strip button[aria-current="true"] {
  background: var(--accent);
}

.day-lane {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: color-mix(in srgb, var(--fg) 3%, var(--bg));
}

.day-hour {
  position: absolute;
  right: 0;
  left: 0;
  border-top: 1px solid var(--line);
}

.day-now {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 2;
  border-top: 2px solid var(--danger);
}

.day-block {
  --tile-bg: color-mix(in srgb, var(--fg) 8%, var(--bg));
  position: absolute;
  right: 3px;
  left: 3px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  background: var(--tile-bg);
  font-size: 0.75rem;
  line-height: 1.3;
}

.day-block[data-color] {
  --tile-bg: color-mix(in srgb, var(--tint) 18%, var(--bg));
  border-color: color-mix(in srgb, var(--tint) 55%, var(--line));
}

.day-block.running {
  --tile-bg: var(--running);
  border-color: var(--accent);
}

.day-block-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-block.dim,
.bar-row.dim {
  opacity: 0.25;
}

.day-dot {
  position: absolute;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  transform: translate(-50%, -50%);
}

.day-week {
  border-collapse: collapse;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.day-week th,
.day-week td {
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

.day-week tr:first-child th {
  font-size: 1.1rem;
}

.day-week tr th:first-child {
  text-align: left;
}

.day-week .team-total,
.day-week .week-total {
  font-weight: 600;
}

button.day-link {
  padding: 0;
  background: none;
  color: var(--accent);
}

.breakdown {
  margin: 1.5rem 0;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.2rem 0;
  font-size: 0.8rem;
}

.bar-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  flex: none;
  width: 7rem;
  border-radius: 0.25rem;
  background: var(--line);
}

.bar {
  display: block;
  height: 0.5rem;
  border-radius: 0.25rem;
  background: var(--accent);
}

.bar[data-color] {
  background: var(--tint);
}

.bar-numbers {
  flex: none;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: pre;
}

.options {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.85rem 1rem;
}

.option-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.option-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.option-control input {
  flex: 1;
  min-width: 0;
}

.option-value {
  min-width: 2.5rem;
  font-size: 0.85rem;
  text-align: right;
}

.list-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  align-items: start;
  gap: 1rem;
  margin-top: 1rem;
}

.list-card {
  padding: 0.75rem 0.9rem;
}

.list-card h2 {
  margin: 0;
  font-size: 1.2rem;
}

.list-card-total {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
}

.list-card.team {
  --tile-bg: color-mix(in srgb, var(--accent) 8%, var(--bg));
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.list-card .bar-track {
  width: 5rem;
}
