/* The front page. A quiet list beside a quiet map. One accent, used only for the event
   you have open. Harm is a row's first icon and its map mark's colour, from
   src/pipeline/harm.ts, and nothing else here alarms. The one other colour is each tag's
   icon, its own hue from src/pipeline/tags.ts, small so it can be told apart. */

@font-face {
  font-family: "Instrument Sans";
  src: url(fonts/instrument-sans.woff2) format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Plex Mono";
  src: url(fonts/plex-mono-400.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #fafaf7;
  --stage: #eff1ea;
  --sheet: #fcfcf9;
  --line: #e4e5de;
  --line-2: #d0d3c8;
  --ink: #1a201d;
  --ink-2: #525a54;
  --ink-3: #6b726c;
  --accent: #23694f;
  --coast: #b5baac;
  --road: #dcdfd4;
  --ring: #d3d6ca;
  --sans: "Instrument Sans", -apple-system, system-ui, sans-serif;
  --mono: "Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0d1110;
  --stage: #0a0e0d;
  --sheet: #121715;
  --line: #1f2623;
  --line-2: #303935;
  --ink: #e2e9e5;
  --ink-2: #a2aea7;
  --ink-3: #808d86;
  --accent: #7fd8b0;
  --coast: #3c4b45;
  --road: #1a2320;
  --ring: #212b27;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1110;
    --stage: #0a0e0d;
    --sheet: #121715;
    --line: #1f2623;
    --line-2: #303935;
    --ink: #e2e9e5;
    --ink-2: #a2aea7;
    --ink-3: #808d86;
    --accent: #7fd8b0;
    --coast: #3c4b45;
    --road: #1a2320;
    --ring: #212b27;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

ol,
ul,
dl,
dd {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
p {
  margin: 0;
  font-weight: inherit;
  font-size: inherit;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 2px;
}

/* Page */
.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: start;
}

.list {
  padding: 0 64px 96px;
  min-width: 0;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 104px;
}

.mark {
  display: flex;
  align-items: center;
  gap: 11px;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
}

.mark .glyph {
  color: var(--accent);
}

.status {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: var(--ink-3);
}

.status time {
  font-family: var(--mono);
  font-size: 12.5px;
}

/* The page's data is old. The only update sign a phone shows. */
.stale {
  display: inline-flex;
  white-space: nowrap;
  align-items: center;
  gap: 6px;
  margin-left: -10px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-2);
}

.stale i {
  width: 7px;
  height: 7px;
  border: 1px solid var(--ink-2);
  border-radius: 50%;
}

.theme {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--ink-3);
}

.theme:hover {
  color: var(--ink);
}

.refresh {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--ink-3);
}

.refresh:hover {
  color: var(--ink);
}

.refresh svg {
  transform-origin: 50% 50%;
}

/* An update is running. The button stays put and turns, so it is plainly not stuck. */
.refresh:disabled {
  cursor: progress;
  color: var(--accent);
}

.refresh:disabled svg {
  animation: refresh-turn 1.1s linear infinite;
}

@keyframes refresh-turn {
  to {
    transform: rotate(360deg);
  }
}

.refresh-note[hidden] {
  display: none;
}

.refresh-note.failed i {
  border-color: var(--accent);
  background: var(--accent);
}

.nav-link {
  font-size: 13px;
  color: var(--ink-2);
}

.nav-link:hover {
  color: var(--ink);
}

.inline {
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
}

.inline:hover {
  color: var(--ink);
  text-decoration-color: var(--ink-3);
}

.endnote .inline {
  color: var(--ink-2);
}

/* Trouble with the live run, or with reaching the server. */
.trouble {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 28px;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--ink-2);
}

/* Capture and the live run can both be in trouble: two lines, close together. */
.trouble:has(+ .trouble) {
  margin-bottom: 10px;
}

.trouble i {
  flex: none;
  width: 8px;
  height: 8px;
  border: 1px solid var(--ink-2);
  border-radius: 50%;
}

.offline-note {
  display: none;
}

body.offline .offline-note {
  display: flex;
}

/* Summary */
.summary {
  padding: 0 0 40px;
}

.s-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}

.s-head h1 {
  font-size: 30px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.s-head h1 span {
  display: block;
  font-size: 13.5px;
  letter-spacing: 0;
  color: var(--ink-3);
  margin-top: 8px;
  min-height: 20px;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 44px;
  flex: none;
  width: 136px;
}

.bar {
  flex: 1 1 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
}

.bar i {
  display: block;
  width: 100%;
  height: calc(var(--n) * 100%);
  min-height: 3px;
  background: var(--ink-3);
  opacity: 0.5;
  border-radius: 2px 2px 0 0;
}

.bar:hover i {
  opacity: 1;
}

.bar.today i {
  background: none;
  box-shadow: inset 0 0 0 1px var(--ink-3);
  opacity: 1;
}

/* A day before daily capture began: no height, so it cannot read as a rise. */
.bar.uncovered i {
  background: repeating-linear-gradient(90deg, var(--ink-3) 0 2px, transparent 2px 4px);
  opacity: 0.6;
  border-radius: 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-top: 24px;
  font-size: 14px;
  color: var(--ink-2);
}

.tag span {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-3);
  margin-left: 5px;
}

.tag:hover {
  color: var(--ink);
}

.tag[aria-pressed="true"],
.tag[aria-pressed="true"] span {
  color: var(--accent);
}

/* A tag's icon, in the tag's own colour, set on the icon itself. A row shows icons alone. */
.ti {
  width: 1.2em;
  height: 1.2em;
  flex: none;
  vertical-align: -0.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tag .ti,
.tag-label .ti {
  margin-right: 0.3em;
}

.tag-label {
  white-space: nowrap;
}

.tag-label + .tag-label {
  margin-left: 1em;
}

.tag-marks {
  display: inline-flex;
  gap: 6px;
  margin-right: 8px;
  vertical-align: -0.25em;
}

.tag-mark {
  display: inline-flex;
  -webkit-touch-callout: none;
  user-select: none;
}

/* Harm leads the icons, a touch heavier than the tags after it. */
.harm-mark .ti {
  stroke-width: 1.8;
}

/* The words for the map's harm colours, in those colours. */
.harm-key.died {
  color: var(--died);
}

.harm-key.injured {
  color: var(--injured);
}

/* The name a long press on an icon shows, from assets/tag-tip.js. */
.tag-tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 50;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  pointer-events: none;
}

.tag-tip[hidden] {
  display: none;
}

/* List */
.dayhead {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 2;
  padding: 28px 0 10px;
  font-size: 13px;
  font-weight: 500;
  border-bottom: 1px solid var(--line-2);
  display: flex;
  justify-content: space-between;
}

.dayhead em {
  font-style: normal;
}

.dayhead span {
  font: 400 12.5px var(--mono);
  color: var(--ink-3);
}

.dayhead small {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 400;
  margin-left: 8px;
}

.section {
  position: relative;
  z-index: 0;
}

.row {
  display: block;
  position: relative;
  padding: 16px 0 15px;
  border-bottom: 1px solid var(--line);
}

.r-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.r-place {
  font-weight: 500;
  font-size: 15px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.r-time {
  flex: none;
  font: 400 12.5px var(--mono);
  color: var(--ink-2);
  white-space: nowrap;
}

.r-time small {
  font: 400 12px var(--sans);
  color: var(--ink-3);
}

.r-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.42;
  color: var(--ink-2);
}

.r-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-3);
}

.r-foot .facts {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.r-foot .who {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 68%;
  min-width: 0;
  color: var(--ink-2);
}

.who-names {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* An event's profile: three rising bars filled to its level, solid in the page's ink and
   darker the higher it is, so it never reads as a tag icon. From profile-mark.ts. */
.pm-bars {
  width: 13px;
  height: 13px;
  flex: none;
  fill: currentColor;
}

.pm-bars .pm-off {
  opacity: 0.22;
}

.pm {
  display: inline-flex;
  -webkit-touch-callout: none;
  user-select: none;
}

.pm-low {
  color: var(--ink-3);
}

.pm-medium {
  color: var(--ink-2);
}

.pm-high {
  color: var(--ink);
}

.pm-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  white-space: nowrap;
}

.tag-profile .pm-bars {
  margin-right: 0.4em;
  vertical-align: -0.1em;
  color: var(--ink);
}

.tag-profile[aria-pressed="true"] .pm-bars {
  color: var(--accent);
}

.d-profile {
  margin-top: 8px;
}

.d-why {
  font-size: 14.5px;
  line-height: 1.5;
}

.pm-parts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.pm-parts li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  row-gap: 5px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.pm-parts b {
  font: 400 12px var(--mono);
  color: var(--ink-2);
}

.pm-parts i {
  grid-column: 1 / -1;
  grid-row: 2;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--ink-2) calc(var(--n) * 100%), var(--line-2) 0);
}

.row.routine .r-place {
  font-weight: 400;
  color: var(--ink-2);
}

.row.routine .r-title {
  color: var(--ink-3);
}

/* A day's emergency calls with no harm stated, folded into one line. */
.calls summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 13px 0 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-3);
  cursor: pointer;
  list-style: none;
}

.calls summary::-webkit-details-marker {
  display: none;
}

.calls summary span::before {
  content: "+";
  display: inline-block;
  width: 16px;
  font-family: var(--mono);
}

.calls[open] summary span::before {
  content: "\2212";
}

.calls summary small {
  font-size: 12.5px;
}

.calls summary:hover {
  color: var(--ink);
}

.calls .row {
  padding-left: 16px;
}

.row::before {
  content: "";
  position: absolute;
  inset: 0 -20px;
  background: var(--stage);
  opacity: 0;
  z-index: -1;
  border-radius: 4px;
}

.row:hover::before,
.row.hot::before {
  opacity: 0.7;
}

.row.is-open::before {
  opacity: 1;
}

.row.is-open .r-place,
.row.is-open .r-title {
  color: var(--ink);
}

.row.is-open::after {
  content: "";
  position: absolute;
  left: -20px;
  top: 0;
  bottom: -1px;
  width: 2px;
  background: var(--accent);
}

.endnote,
.empty {
  margin-top: 36px;
  color: var(--ink-3);
  font-size: 13px;
}

/* Map */
.stage {
  position: sticky;
  top: 0;
  height: 100dvh;
  background: var(--stage);
  overflow: hidden;
  border-left: 1px solid var(--line);
}

.map-wrap {
  position: absolute;
  inset: 0;
  transition: bottom 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
}

body.open .map-wrap {
  bottom: 62%;
}

.map {
  display: block;
  width: 100%;
  height: 100%;
}

.m-road,
.m-coast,
.m-ring {
  fill: none;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.m-road {
  stroke: var(--road);
}

.m-coast {
  stroke: var(--coast);
}

.m-ring {
  stroke: var(--ring);
}

.m-centre {
  fill: var(--ink-3);
}

.m-label {
  font-family: var(--mono);
  font-size: 1.45px;
  fill: var(--ink-3);
}

.m-range {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 2 5;
  vector-effect: non-scaling-stroke;
  opacity: 0.6;
}

.blip {
  fill: var(--ink-2);
  stroke: var(--stage);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill 0.15s;
}

/* Colour is harm, from src/pipeline/harm.ts; hollow is social only, whatever the harm. */
.blip.h-died {
  fill: var(--died);
}

.blip.h-injured {
  fill: var(--injured);
}

.blip.hollow {
  fill: var(--stage);
  stroke: var(--ink-3);
}

.blip.hollow.h-died {
  stroke: var(--died);
}

.blip.hollow.h-injured {
  stroke: var(--injured);
}

.blip.off {
  display: none;
}

.blip:hover,
.blip.hot {
  fill: var(--ink);
}

.blip.on {
  display: inline;
  fill: var(--accent);
  stroke: var(--stage);
  opacity: 1;
}

.blip.faint {
  fill: var(--ink-3);
  opacity: 0.4;
}

.blip.faint:hover,
.blip.faint.hot {
  fill: var(--ink);
  opacity: 1;
}

.blip.faint.on {
  fill: var(--accent);
  opacity: 1;
}

.blip.dim {
  opacity: 0.12;
}

.map-note {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 24px;
  font-size: 12.5px;
  color: var(--ink-3);
  transition: opacity 0.2s;
}

body.open .map-note {
  opacity: 0;
}

/* Only the phone folds the map; the desk keeps it beside the list. */
.map-toggle {
  display: none;
}

.reach {
  position: absolute;
  left: 32px;
  top: 24px;
  font: 400 12.5px var(--mono);
  color: var(--ink-2);
  opacity: 0;
  transition: opacity 0.2s;
}

body.open .reach {
  opacity: 1;
}

/* The event */
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62%;
  background: var(--sheet);
  border-top: 1px solid var(--line-2);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s 0.32s;
}

body.open .sheet {
  transform: none;
  visibility: visible;
  transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.sheet-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 44px 0;
  flex: none;
  font-size: 13px;
  color: var(--ink-3);
}

.sheet-bar .pos {
  font: 400 12.5px var(--mono);
  margin-right: auto;
}

.nav,
.close {
  height: 32px;
  min-width: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  color: var(--ink-2);
  font-size: 13px;
}

.nav:hover,
.close:hover {
  color: var(--ink);
  border-color: var(--ink-3);
}

.sheet-body {
  overflow: auto;
  padding: 16px 44px 44px;
  flex: 1;
  overscroll-behavior: contain;
}

.sheet-body[aria-busy="true"] {
  opacity: 0.5;
}

.d-title {
  font-size: 21px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.008em;
  overflow-wrap: anywhere;
}

.d-where {
  margin-top: 12px;
  font-size: 15px;
}

.d-when {
  color: var(--ink-2);
  font-size: 14px;
  margin-top: 1px;
}

.d-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 36px;
  margin-top: 20px;
}

.d-facts dt {
  font-size: 12.5px;
  color: var(--ink-3);
}

.d-facts dd {
  font-size: 14px;
  margin-top: 1px;
}

.d-sum {
  margin-top: 20px;
  font-size: 15.5px;
  line-height: 1.55;
}

.d-sum-by {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.d-head {
  margin-top: 28px;
  font-size: 13px;
  color: var(--ink-3);
}

.d-head span {
  font-family: var(--mono);
  margin-left: 6px;
}

.d-sources {
  margin-top: 6px;
}

.d-sources li {
  border-top: 1px solid var(--line);
}

.d-sources a,
.d-src-plain {
  display: block;
  padding: 10px 0;
}

.d-src-line {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 12.5px;
  color: var(--ink-3);
}

.d-src-line b {
  font-weight: 500;
  color: var(--ink);
  font-size: 14px;
}

.d-src-line time {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}

.d-src-head {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 14px;
  margin-top: 1px;
  overflow-wrap: anywhere;
}

.d-sources a:hover .d-src-head {
  color: var(--ink);
}

.d-changes {
  margin-top: 6px;
}

.d-changes li {
  display: flex;
  gap: 16px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-2);
}

.d-changes time {
  flex: none;
  width: 132px;
  font: 400 12px/21px var(--mono);
  color: var(--ink-3);
}

.d-more {
  margin-top: 24px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.d-more a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-2);
}

@media (max-width: 1180px) {
  .list {
    padding: 0 40px 96px;
  }
}

/* Phone: the map is pinned above the list, and an event fills the rest. Once the list has
   been read down a little the map folds to a thin strip so more events fit; the strip
   brings it back. An open event always has the map, since the event is a place. */
@media (max-width: 820px) {
  body {
    --stage-h: 34dvh;
    --strip-h: 44px; /* Keep in step with STRIP_PX in scope.js. */
  }

  body.map-shut {
    --stage-h: var(--strip-h);
  }

  body.map-shut.open {
    --stage-h: 34dvh;
  }

  .shell {
    display: block;
  }

  .list {
    /* The map is pinned over the page, so the list starts below where it rests. */
    padding: 34dvh 24px calc(72px + env(safe-area-inset-bottom));
    width: 100%;
  }

  .stage {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--stage-h);
    z-index: 3;
    border-left: 0;
    border-bottom: 1px solid var(--line-2);
    overflow: visible;
    transition: height 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .map-wrap {
    overflow: hidden;
  }

  body.open .map-wrap {
    bottom: 0;
  }

  body.map-shut:not(.open) .map-wrap,
  body.map-shut:not(.open) .reach {
    visibility: hidden;
  }

  .map-toggle {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    background: var(--bg);
    border: 1px solid var(--line-2);
    border-radius: 16px;
    font-size: 12.5px;
    color: var(--ink-2);
  }

  .map-toggle::after {
    content: "";
    width: 6px;
    height: 6px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: translateY(-2px) rotate(45deg);
  }

  /* A folded map is one full-width button, so the whole strip is the target. */
  body.map-shut:not(.open) .map-toggle {
    inset: 0;
    height: auto;
    padding: 0 24px;
    justify-content: space-between;
    border: 0;
    border-radius: 0;
    background: var(--stage);
    font-size: 13px;
  }

  body.map-shut:not(.open) .map-toggle::after {
    transform: translateY(1px) rotate(-135deg);
  }

  .map-toggle .to-show,
  body.map-shut:not(.open) .map-toggle .to-hide {
    display: none;
  }

  body.map-shut:not(.open) .map-toggle .to-show {
    display: inline;
  }

  body.open .map-toggle {
    display: none;
  }

  .m-label,
  .map-note {
    display: none;
  }

  .reach {
    left: 16px;
    top: 12px;
  }

  .top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    gap: 8px;
    padding: 0 16px;
    z-index: 4;
    pointer-events: none;
  }

  .top > * {
    pointer-events: auto;
  }

  .status {
    gap: 10px;
  }

  .status .upd {
    display: none;
  }

  .stale {
    margin-left: 0;
    font-size: 11.5px;
  }

  .stale i {
    display: none;
  }

  .mark {
    gap: 8px;
    font-size: 13.5px;
  }

  body.open .top {
    opacity: 0;
    pointer-events: none;
  }

  #trouble {
    padding-top: 20px;
  }

  .trouble {
    margin-bottom: 0;
  }

  .refresh-note {
    margin-top: 10px;
  }

  .summary {
    padding: 24px 0 12px;
  }

  .s-head h1 {
    font-size: 25px;
  }

  .bars {
    width: 112px;
    height: 36px;
  }

  .tags {
    margin-top: 18px;
  }

  .pm-parts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dayhead {
    top: var(--stage-h);
    padding: 20px 0 8px;
    transition: top 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .row::before {
    inset: 0 -12px;
  }

  .row.is-open::after {
    left: -12px;
  }

  .sheet {
    position: fixed;
    top: 34dvh;
    height: auto;
    border-top: 1px solid var(--line-2);
    z-index: 6;
  }

  .sheet-bar {
    order: 2;
    padding: 10px 24px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
  }

  .sheet-body {
    order: 1;
    padding: 20px 24px 24px;
  }

  .nav,
  .close {
    height: 40px;
    min-width: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
