/* Locke's look: one structure, three looks you choose in Settings (the same on the phone and
   the Mac). Nightfall is night blue with moonlight glow; Broadcast is warm black and signal yellow
   with hard offset shadows; Riot is red, black and white, cut out and stamped. Everything below
   reads the tokens, so a component looks right in all three. Slanted shapes are drawn behind the
   text (::before), so words stay upright and shadows aren't clipped. */
:root {
  color-scheme: dark;
  /* Nightfall (the default) */
  --bg: #030f26;
  --bg-2: #071a3c;
  --bg-3: #0c2754;
  --line: #173a70;
  --text: #e8f6ff;
  --text-2: #c3dbf1;
  --muted: #87a8c8;
  --faint: #4f6f94;
  --hi: #43d8ff;
  --hi-2: #8be9ff;
  --on-hi: #021230;
  --done: #7dffd0;
  --miss: #ff5c86;
  --warn: #ffc46b;
  --hi-soft: rgba(67, 216, 255, 0.14);
  --done-soft: rgba(125, 255, 208, 0.13);
  --miss-soft: rgba(255, 92, 134, 0.14);
  --warn-soft: rgba(255, 196, 107, 0.14);
  /* Locke's own: what the app puts on every household's day, not one of theirs (the day's journal; the owner, December
     3: "a different color in the ui or something to clarify that it's special and a part of the app for all users").
     A hue no other role has in any look: not a command's accent, a countdown's amber, a miss, nor what's done. */
  --own: #b9a0ff;
  /* At rest, a paler print of it (the owner, December 3: "a paler violet for when its not selected"). */
  --own-pale: #ddd0ff;
  --display: "Saira Extra Condensed", "Arial Narrow", sans-serif;
  --head: "Saira Condensed", "Arial Narrow", sans-serif;
  --body: "Saira", "Helvetica Neue", Arial, sans-serif;
  --head-style: italic;
  --head-case: none;
  --head-weight: 700;
  --skew: -14deg;
  --slant: 9px;
  --cut: 10px;
  --radius: 2px;
  --glow: 0 0 18px rgba(67, 216, 255, 0.38);
  --hard: 0 0 0 transparent;
  --panel-edge: inset 0 0 0 1px var(--line);
  /* At twice the size, from Midjourney's upscale (ui.mjs SHARP_WIDE; tools/art/sharp_wide.py). */
  --art-wide: url("/art/hour-wide-1-2x.webp");
  --art-tall: url("/art/hour-tall-1.webp");
  /* The look's own tall art, which a scene never replaces (ui.mjs showScene sets --art-tall). */
  --art-portrait: url("/art/hour-tall-1.webp");
  /* Today's world on a narrow screen: the part of the art it shows, sharp (tools/art/narrow_cuts.py). */
  --art-narrow: url("/art/hour-narrow-1.webp");
  --art-tint: rgba(3, 15, 38, 0.35);
  /* Older names, so every page's own styles follow the look */
  --ink: var(--text);
  --ink-2: var(--text-2);
  --card: var(--bg-2);
  --accent: var(--hi);
  --accent-2: var(--hi-2);
  --accent-ink: var(--on-hi);
  --accent-soft: var(--hi-soft);
  --radius-sm: var(--radius);
  --shadow: var(--panel-edge);
  --shadow-lift: var(--panel-edge), var(--glow);
  --spring: cubic-bezier(0.3, 1.5, 0.5, 1);
  --ease: cubic-bezier(0.2, 0.9, 0.25, 1);
  font: 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
:root[data-look="midnight"] {
  --bg: #0d0b08;
  --bg-2: #17130d;
  --bg-3: #221c12;
  --line: #3a2f1c;
  --text: #fff4d8;
  --text-2: #f0dfb4;
  --muted: #b3a483;
  --faint: #6e6249;
  --hi: #ffd21e;
  --hi-2: #ff8a1f;
  --on-hi: #140f05;
  --done: #c6f25b;
  --miss: #ff5a43;
  --warn: #ffb13d;
  --hi-soft: rgba(255, 210, 30, 0.13);
  --done-soft: rgba(198, 242, 91, 0.12);
  --miss-soft: rgba(255, 90, 67, 0.14);
  --warn-soft: rgba(255, 177, 61, 0.14);
  --own: #c4a3ff;
  --own-pale: #e4d3ff;
  --display: "Anton", "Bebas Neue", Impact, sans-serif;
  --head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --head-style: italic;
  --head-case: uppercase;
  --head-weight: 800;
  --skew: -12deg;
  --slant: 10px;
  --cut: 16px;
  --radius: 0px;
  --glow: 0 0 0 transparent;
  --hard: 4px 4px 0 var(--hi-2);
  --panel-edge: inset 0 0 0 1px var(--line);
  --art-wide: url("/art/midnight-wide-1.webp");
  --art-tall: url("/art/midnight-tall-1.webp");
  --art-portrait: url("/art/midnight-tall-1.webp");
  --art-narrow: url("/art/midnight-narrow-1.webp");
  --art-tint: rgba(13, 11, 8, 0.25);
}
:root[data-look="phantom"] {
  --bg: #0b0b0b;
  --bg-2: #161616;
  --bg-3: #222;
  --line: #3b3b3b;
  --text: #fff;
  --text-2: #e9e9e9;
  --muted: #ababab;
  --faint: #6b6b6b;
  --hi: #ff2638;
  --hi-2: #fff;
  --on-hi: #0b0b0b;
  --done: #f2f2f2;
  --miss: #ff2638;
  --warn: #ffd400;
  --hi-soft: rgba(255, 38, 56, 0.16);
  --done-soft: rgba(255, 255, 255, 0.1);
  --miss-soft: rgba(255, 38, 56, 0.16);
  --warn-soft: rgba(255, 212, 0, 0.13);
  --own: #b98cff;
  --own-pale: #dcc6ff;
  --display: "Anton", Impact, sans-serif;
  --head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", "Helvetica Neue", Arial, sans-serif;
  --head-style: italic;
  --head-case: uppercase;
  --head-weight: 900;
  --skew: -10deg;
  --slant: 12px;
  --cut: 0px;
  --radius: 0px;
  --glow: 0 0 0 transparent;
  --hard: 5px 5px 0 var(--hi);
  --panel-edge: inset 0 0 0 2px var(--text);
  --art-wide: url("/art/phantom-wide-1.webp");
  --art-tall: url("/art/phantom-tall-1.webp");
  --art-portrait: url("/art/phantom-tall-1.webp");
  --art-narrow: url("/art/phantom-narrow-1.webp");
  --art-tint: rgba(11, 11, 11, 0.2);
}
* {
  box-sizing: border-box;
}
/* No page wider than the screen, whatever is in it (November 12: the Talk page scrolled sideways, every row's left edge
   cut off). The root clips too: with only the body clipping, its clip passed up to the window as a scroll that hides,
   and the page could still be moved sideways (a field brought into view); now the body itself clips and there is
   nothing to the side to move to. A word or a link breaks where it must, even inside a row of parts; pictures, code
   and tables keep to the width, a table scrolling inside itself. */
html {
  background: var(--bg);
  overflow-x: clip;
}
body {
  overflow-wrap: anywhere;
}
img,
video,
canvas,
iframe {
  max-width: 100%;
}
pre {
  max-width: 100%;
  white-space: pre-wrap;
}
table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}
/* The body is its own layer, so the ground and the art (below zero) paint above its background. */
body {
  position: relative;
  z-index: 0;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: clip;
}
.evidence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
[hidden] {
  display: none !important;
}

/* The ground each look stands on, behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(40% 30% at 25% 85%, rgba(67, 216, 255, 0.1), transparent 70%),
    radial-gradient(35% 25% at 80% 55%, rgba(125, 255, 208, 0.06), transparent 70%),
    linear-gradient(180deg, var(--bg), #061b42 70%, var(--bg));
}
:root[data-look="midnight"] body::before {
  background: repeating-linear-gradient(0deg, rgba(255, 244, 216, 0.03) 0 1px, transparent 1px 3px), var(--bg);
}
:root[data-look="phantom"] body::before {
  background:
    radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.6px) 0 0/7px 7px,
    linear-gradient(115deg, transparent 62%, rgba(255, 38, 56, 0.12) 62% 74%, transparent 74%),
    var(--bg);
}

/* Type: a display face for numbers that matter, a slanted head face, a quiet body face */
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--head);
  font-style: var(--head-style);
  font-weight: var(--head-weight);
  text-transform: var(--head-case);
  letter-spacing: 0.01em;
  line-height: 1.05;
  text-wrap: balance;
}
a {
  color: var(--hi);
  text-decoration: none;
  font-weight: 600;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.eyebrow {
  margin: 0;
  color: var(--muted);
  font: var(--head-style) 700 13px/1.2 var(--head);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13.5px;
}

/* Buttons: a slanted slab behind upright words; it lifts on hover and punches in on a tap */
button,
.button {
  position: relative;
  isolation: isolate;
  font: var(--head-style) 700 16px/1 var(--head);
  text-transform: var(--head-case);
  letter-spacing: 0.05em;
  border: 0;
  border-radius: 0;
  padding: 12px 20px 11px;
  background: transparent;
  color: var(--on-hi);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.16s var(--spring),
    filter 0.2s var(--ease),
    opacity 0.2s;
}
button::before,
.button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hi);
  transform: skewX(var(--skew));
  box-shadow: var(--hard), var(--glow);
  transition:
    box-shadow 0.16s var(--ease),
    background-color 0.2s var(--ease);
}
button:hover:not(:disabled),
.button:hover {
  transform: translate(-1px, -2px);
}
button:hover:not(:disabled)::before,
.button:hover::before {
  box-shadow:
    var(--hard),
    var(--glow),
    0 0 0 1px var(--hi-2);
}
:root[data-look="midnight"] button:hover:not(:disabled)::before {
  box-shadow: 7px 7px 0 var(--hi-2);
}
:root[data-look="phantom"] button:hover:not(:disabled)::before {
  box-shadow: 7px 7px 0 var(--hi-2);
}
button:active:not(:disabled) {
  transform: scale(0.94);
  transition-duration: 0.07s;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button.quiet {
  color: var(--text);
}
button.quiet::before {
  background: var(--bg-3);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
button.quiet:hover:not(:disabled)::before {
  box-shadow: inset 0 0 0 1.5px var(--hi);
}
button.accent::before {
  background: var(--hi);
}
/* Dark words on the miss colour in every look (October 31): light ones read at under 3:1. One rule for all three, so
   a look's own rule doesn't outrank a page that draws its danger buttons as an outline. */
button.danger {
  color: var(--on-hi);
}
button.danger::before {
  background: var(--miss);
  box-shadow: none;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--hi);
  outline-offset: 3px;
}

/* Fields: dark wells, an edge that lights up when you're in one */
input,
select,
textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg-3);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  width: 100%;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
input::placeholder,
textarea::placeholder {
  color: var(--faint);
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--hi);
  box-shadow: 0 0 0 3px var(--hi-soft);
  outline: none;
}
textarea {
  resize: vertical;
  min-height: 84px;
}
label {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-2);
}
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  accent-color: var(--hi);
}

/* Panels: the cards everything sits on; each look cuts them its own way */
.card {
  background: var(--bg-2);
  border: 0;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--panel-edge);
}
:root[data-look="midnight"] .card {
  border-left: 5px solid var(--hi);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}
:root[data-look="phantom"] .card {
  box-shadow:
    inset 0 0 0 2px var(--text),
    6px 6px 0 var(--hi);
}
.enter {
  animation: rise 0.6s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateX(-26px) skewX(-6deg);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
:root:not([data-look="midnight"]):not([data-look="phantom"]) .enter {
  animation-name: float;
}
@keyframes float {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
.fade {
  animation: fade 0.35s var(--ease) both;
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Chips and pills: small slanted labels */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: var(--head-style) 700 12.5px/1 var(--head);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 11px 4px;
  color: var(--muted);
  background: var(--bg-3);
  clip-path: polygon(var(--slant) 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
  white-space: nowrap;
}
.chip.done {
  background: var(--done-soft);
  color: var(--done);
}
.chip.missed {
  background: var(--miss-soft);
  color: var(--miss);
}
.chip.active {
  background: var(--hi-soft);
  color: var(--hi);
}
.chip.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.chip.done::before {
  content: "";
  width: 5px;
  height: 9px;
  border: solid currentColor;
  border-width: 0 2.2px 2.2px 0;
  transform: translateY(-1px) rotate(45deg);
  margin: 0 2px 0 1px;
}
.chip.active::before {
  content: "";
  width: 7px;
  height: 7px;
  background: currentColor;
  transform: rotate(45deg);
  animation: blink 1.4s steps(2, jump-none) infinite;
}
@keyframes blink {
  50% {
    opacity: 0.25;
  }
}
.pop {
  animation: pop 0.5s var(--spring) both;
}
@keyframes pop {
  0% {
    transform: scale(0.55);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
/* A marker's pulse: a ring grows 8px out of each side and fades, drawn on the marker's ::after at 45% of its colour and
   moved by scale and opacity alone, so it runs on the compositor. Until October 31 it was a box-shadow, restyled and
   repainted every frame for as long as a row was on or late, and never drawn on a phone: Chromium can't blend a shadow
   of a currentColor mix, so it jumped to transparent at once. 28/12 for the day's 12px markers (plan.css), 25/9 for
   the 9px device dot. */
@keyframes pulse {
  from {
    scale: 1;
    opacity: 1;
  }
  to {
    scale: 2.333;
    opacity: 0;
  }
}
@keyframes pulse-dot {
  from {
    scale: 1;
    opacity: 1;
  }
  to {
    scale: 2.778;
    opacity: 0;
  }
}
.pill {
  display: inline-block;
  border: 0;
  background: var(--hi);
  color: var(--on-hi);
  padding: 1px 12px;
  line-height: 1.6;
  font-weight: 700;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  transition:
    transform 0.2s var(--spring),
    background-color 0.35s var(--ease);
}
.bump {
  animation: bump 0.38s var(--spring);
}
@keyframes bump {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.16);
  }
  100% {
    transform: scale(1);
  }
}

/* Waiting: a sweep of light instead of a spinner */
.skeleton {
  padding: 18px;
  background: var(--bg-2);
  box-shadow: var(--panel-edge);
}
.skeleton i {
  display: block;
  height: 14px;
  margin: 10px 0;
  background: linear-gradient(90deg, var(--bg-3) 0%, var(--line) 45%, var(--bg-3) 90%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
  transform: skewX(var(--skew));
}
.skeleton i:nth-child(2) {
  width: 72%;
}
.skeleton i:nth-child(3) {
  width: 48%;
}
@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* Bars fill in: stripes in Broadcast, light in Nightfall, solid red in Riot */
.bar {
  height: 8px;
  background: var(--line);
  overflow: hidden;
  transform: skewX(var(--skew));
}
.bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--hi), var(--hi-2));
  box-shadow: var(--glow);
  transform-origin: left;
  animation: fill 0.9s var(--ease) both;
}
:root[data-look="midnight"] .bar > span {
  background: repeating-linear-gradient(-45deg, var(--hi) 0 8px, var(--hi-2) 8px 16px);
}
:root[data-look="phantom"] .bar > span {
  background: var(--hi);
}
.bar.good > span {
  background: var(--done);
}
.bar.bad > span {
  background: var(--miss);
}
@keyframes fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* A toast slashes up from the bottom and goes away on its own */
/* Full width to wrap in (October 14: centred on a point, it had half the screen, and wrapped into a tall slanted column);
   corners cut at a fixed size, so a tall one keeps its shape; the message in the body face, */
#toast {
  position: fixed;
  left: max(16px, calc(50% - 260px));
  right: max(16px, calc(50% - 260px));
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  width: auto;
  margin: 0 auto;
  transform: translateY(160%);
  padding: 13px 20px 13px 24px;
  font: 600 15px/1.4 var(--body);
  color: var(--on-hi);
  isolation: isolate;
  transition:
    transform 0.45s var(--spring),
    opacity 0.3s;
  opacity: 0;
  pointer-events: none;
  text-wrap: pretty;
}
#toast::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hi);
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}
#toast.show {
  transform: none;
  opacity: 1;
}
/* An error keeps the toast's dark words, on the miss colour (October 31): light ones read at under 3:1. */
#toast.error::before {
  background: var(--miss);
}
@media (min-width: 860px) {
  #toast {
    bottom: 28px;
  }
}

/* Locked in: a stamp lands */
.stamp {
  display: inline-block;
  border: 2.5px solid var(--done);
  color: var(--done);
  padding: 2px 10px;
  font: italic 800 13px/1.3 var(--head);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-4deg);
  animation: stamp 0.5s var(--spring) both;
}
@keyframes stamp {
  0% {
    transform: scale(1.8) rotate(-12deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(-4deg);
    opacity: 1;
  }
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: var(--faint);
  transform: rotate(45deg);
  vertical-align: middle;
  margin-right: 6px;
}
.dot.on {
  position: relative;
  background: var(--done);
  color: var(--done);
}
.dot.on::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: color-mix(in srgb, currentColor 45%, transparent);
  opacity: 0;
  animation: pulse-dot 2s var(--ease) infinite;
}

/* The tabs: a bar along the bottom of a phone, a row across the top of a wide screen */
.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: color-mix(in srgb, var(--bg-2) 92%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 -1px 0 var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tabs a {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  padding: 15px 4px 14px;
  font: var(--head-style) 700 14px/1 var(--head);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
.tabs a::before {
  content: "";
  position: absolute;
  inset: 7px 9px;
  z-index: -1;
  background: var(--hi);
  transform: skewX(var(--skew)) scaleX(0);
  transition: transform 0.28s var(--spring);
}
.tabs a[aria-current="page"] {
  color: var(--on-hi);
}
.tabs a[aria-current="page"]::before {
  transform: skewX(var(--skew)) scaleX(1);
  box-shadow: var(--glow);
}
:root:not([data-look="midnight"]):not([data-look="phantom"]) .tabs a[aria-current="page"] {
  color: var(--hi);
}
:root:not([data-look="midnight"]):not([data-look="phantom"]) .tabs a[aria-current="page"]::before {
  background: transparent;
  border-bottom: 2px solid var(--hi);
  box-shadow: 0 8px 16px -10px var(--hi);
}
.tabs a:hover {
  color: var(--text);
  text-decoration: none;
}
body.has-tabs {
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}
/* In the phone app, its own tab bar is under the page (MainActivity's TabBar), so the page's isn't drawn */
:root[data-tabs="native"] .tabs {
  display: none;
}
:root[data-tabs="native"] body.has-tabs {
  padding-bottom: 20px;
}
:root[data-tabs="native"] #toast {
  bottom: 16px;
}
/* Six tabs on a narrow phone (Write, October 8): a little smaller, so Settings fits */
@media (max-width: 420px) {
  .tabs a {
    font-size: 11.5px;
    letter-spacing: 0.04em;
    padding-left: 1px;
    padding-right: 1px;
  }
  .tabs a::before {
    inset: 7px 3px;
  }
}
@media (min-width: 860px) {
  .tabs {
    position: sticky;
    top: 0;
    bottom: auto;
    grid-auto-columns: auto;
    justify-content: start;
    padding: 0 max(16px, calc(50% - 560px));
    box-shadow: 0 1px 0 var(--line);
  }
  .tabs a {
    padding: 19px 18px 17px;
  }
  body.has-tabs {
    padding-bottom: 0;
  }
}

/* Art from each look's world: a scene behind the top of the page that fades into it and drifts */
.art {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: min(62vh, 560px);
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, rgba(0, 0, 0, 0.55) 62%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 30%, rgba(0, 0, 0, 0.55) 62%, transparent 100%);
}
.art::before {
  content: "";
  position: absolute;
  inset: -4%;
  background: var(--art-tall) center 20% / cover no-repeat;
  animation: drift 38s ease-in-out infinite alternate;
  transform: translateY(var(--parallax, 0px));
}
.art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, var(--art-tint) 45%, transparent 75%),
    linear-gradient(180deg, transparent 40%, var(--bg) 100%);
}
@media (min-width: 700px) {
  .art::before {
    background-image: var(--art-wide);
    background-position: right 30%;
  }
  .art {
    height: min(56vh, 520px);
  }
}
:root[data-look="midnight"] .art::after {
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px),
    linear-gradient(90deg, var(--bg) 0%, var(--art-tint) 48%, transparent 78%),
    linear-gradient(180deg, transparent 40%, var(--bg) 100%);
}
:root[data-look="phantom"] .art::after {
  background:
    radial-gradient(rgba(0, 0, 0, 0.35) 1px, transparent 1.7px) 0 0/5px 5px,
    linear-gradient(90deg, var(--bg) 0%, var(--art-tint) 45%, transparent 72%),
    linear-gradient(180deg, transparent 40%, var(--bg) 100%);
}
@keyframes drift {
  from {
    scale: 1.06;
    translate: -1.5% 0;
  }
  to {
    scale: 1;
    translate: 1.5% -1%;
  }
}

/* Words that sit on the art keep a shadow of the page behind them, so they read over a bright moon */
.on-art,
.ticker,
.phase,
.sec-count,
.cal .eyebrow {
  text-shadow:
    0 1px 2px var(--bg),
    0 0 10px var(--bg),
    0 0 18px var(--bg);
}

/* Riot's cut-out letters: each one on its own scrap (other looks show them plain) */
/* Words keep their own space; Riot's scraps want a little more between them. */
.ransom .rw {
  display: inline-block;
  white-space: nowrap;
}
:root[data-look="phantom"] .ransom .rw {
  margin-right: 0.3em;
}
.ransom .rw:last-child {
  margin-right: 0;
}
.ransom .rw span {
  display: inline-block;
}
:root[data-look="phantom"] .ransom .rw span {
  padding: 0 0.06em;
  margin: 0 0.01em;
  line-height: 1.08;
}
:root[data-look="phantom"] .ransom .r0 {
  background: var(--text);
  color: var(--bg);
  transform: rotate(-4deg);
}
:root[data-look="phantom"] .ransom .r1 {
  background: var(--hi);
  color: var(--text);
  transform: rotate(3deg) translateY(0.04em);
  font-family: var(--display);
  font-style: normal;
}
:root[data-look="phantom"] .ransom .r2 {
  color: var(--text);
  transform: rotate(-2deg);
}
:root[data-look="phantom"] .ransom .r3 {
  background: var(--bg);
  color: var(--text);
  box-shadow: inset 0 0 0 2px var(--text);
  transform: rotate(5deg);
}

/* Every animation cut to an instant, but inside [data-still]: a picture that holds itself still at a moment that tells
   it (the welcome intro's stages, November 25, which need their own timings to be held at the right moment). */
@media (prefers-reduced-motion: reduce) {
  :where(:not([data-still] *)),
  :where(:not([data-still] *))::before,
  :where(:not([data-still] *))::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}

/* In-page camera: a viewfinder, a shutter, then Use photo or Retake. */
.camera {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.25s var(--ease),
    transform 0.4s var(--spring);
}
.camera.open {
  opacity: 1;
  transform: none;
}
/* The front camera, as a mirror shows you; the photo itself is as the camera saw it. */
.camera.mirror video {
  transform: scaleX(-1);
}
.camera video,
.camera .cam-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.camera .cam-shot {
  object-fit: contain;
  background: #000;
}
.cam-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(rgba(0, 0, 0, 0.6), transparent);
}
.cam-hint {
  margin: 0;
  color: #fff;
  font-weight: 650;
  font-size: 15px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.cam-cancel {
  color: #fff;
}
/* Its own width beside the check's words, which wrap instead (December 2: squeezed by a long check, it broke "Canc / el"). */
.cam-top .cam-cancel {
  flex: none;
}
.cam-cancel::before {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}
/* Clear of the home indicator. Retake and Use photo each on one line: with large text the second goes under the first. */
.cam-bottom {
  position: relative;
  z-index: 3;
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 26px 16px max(40px, calc(env(safe-area-inset-bottom, 0px) + 16px));
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
}
.cam-bottom button {
  white-space: nowrap;
}
/* An iPhone build from before December 2 can't put its tab bar away (ui.mjs wholeScreen): above the bar it floats. */
.camera.under-bar .cam-bottom {
  padding-bottom: 104px;
}
.shutter {
  width: 78px;
  height: 78px;
  padding: 0;
}
.shutter::before {
  border-radius: 50%;
  background: #fff;
  transform: none;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.32);
}
.shutter:hover:not(:disabled) {
  transform: none;
}
.shutter:active:not(:disabled) {
  transform: scale(0.86);
}
.cam-flash {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.cam-flash.go {
  animation: flash 0.38s ease-out;
}
@keyframes flash {
  0% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
  }
}

/* The first minutes of the morning: only getting up, nothing else on the page. Getting dressed keeps its camera and
   what it says (a review, October 26: hidden, the camera opened where nothing could be pressed). */
body.waking > *:not(#wake):not(.camera):not(#toast),
body.waking:not(.dressing) > #toast {
  display: none !important;
}
.wake {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 20px;
  gap: 10px;
}
.wake h1 {
  font-family: var(--display);
  font-style: normal;
  font-size: clamp(72px, 22vw, 120px);
  line-height: 0.9;
  color: var(--hi);
  text-shadow: var(--hard), var(--glow);
  animation: wake-in 0.6s var(--spring) both;
}
.wake-clock {
  margin: 6px 0 0;
  font: var(--head-style) 700 46px/1 var(--head);
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}
.wake-note {
  margin: 0;
  max-width: 22em;
  color: var(--muted);
}
/* Get dressed: the photo, what was said of the last one, and a line to explain it. */
.wake-take {
  margin-top: 14px;
  min-width: 14em;
}
.wake-result {
  color: var(--text-2);
}
.wake-explain {
  display: flex;
  gap: 8px;
  width: min(100%, 26em);
}
.wake-explain input {
  flex: 1;
  min-width: 0;
}
@keyframes wake-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* The fanfare (ui.mjs): a reward lands. A bright slab slams in, rays turn behind it, and the figure counts up. */
.fanfare {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  cursor: pointer;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: fade 0.25s var(--ease) both;
}
.fanfare.leaving {
  animation: fade 0.35s var(--ease) reverse both;
}
.fanfare-rays {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 170vmax;
  height: 170vmax;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: repeating-conic-gradient(
    from 0deg,
    color-mix(in srgb, var(--hi) 22%, transparent) 0 6deg,
    transparent 6deg 18deg
  );
  -webkit-mask-image: radial-gradient(closest-side, #000 18%, transparent 70%);
  mask-image: radial-gradient(closest-side, #000 18%, transparent 70%);
  animation: fanfare-rays 14s linear infinite;
}
@keyframes fanfare-rays {
  from {
    transform: translate(-50%, -50%) rotate(0);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
.fanfare-card {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: min(78vw, 300px);
  max-width: min(88vw, 420px);
  padding: 26px 34px 24px;
  color: var(--on-hi);
  text-align: center;
  animation: slam 0.6s var(--spring) both;
}
.fanfare-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hi);
  transform: skewX(var(--skew));
  box-shadow:
    var(--hard),
    0 0 60px color-mix(in srgb, var(--hi) 55%, transparent);
}
:root[data-look="midnight"] .fanfare-card::before {
  box-shadow: 8px 8px 0 var(--hi-2);
}
:root[data-look="phantom"] .fanfare-card::before {
  box-shadow:
    inset 0 0 0 3px var(--on-hi),
    9px 9px 0 var(--hi-2);
}
.fanfare-stamp {
  padding: 5px 12px 4px;
  font: var(--head-style) 900 14px/1 var(--head);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hi);
  background: var(--on-hi);
  transform: rotate(-4deg) skewX(var(--skew));
}
.fanfare-figure {
  font: 400 clamp(84px, 24vw, 132px)/0.9 var(--display);
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
}
.fanfare-unit {
  font: var(--head-style) 800 17px/1.1 var(--head);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.fanfare-text {
  margin: 8px 0 0;
  max-width: 30ch;
  font-size: 15px;
  line-height: 1.4;
  opacity: 0.85;
}
@keyframes slam {
  0% {
    opacity: 0;
    transform: scale(1.9) rotate(-6deg);
  }
  55% {
    opacity: 1;
    transform: scale(0.94) rotate(1deg);
  }
  100% {
    transform: none;
  }
}
/* A task's scene (ui.mjs showScene) is wide art; on a phone's tall header, the right of it, where its subject is */
:root[data-scene] .art::before {
  background-position: 78% 30%;
}
/* On a phone a scene is drawn no larger than its pixels allow, around its subject (November 8, the owner: "Look at this
   badly cropped low res background image"). A scene is 1680 x 720: drawn the height of a phone's screen it showed a
   fifth of its width, often not its subject, each pixel stretched over three. Its phone slice is cut around its
   subject, a little left of it (tools/art/phone_crops.py), so it's placed by its middle. On a page's own art (Today,
   the plan) it fills a band no taller than 440 px, about 1.6 times its pixels on a phone's screen, fading into the
   page under it. The handover, the takeover and the ceremony keep their scene full-screen behind the moment, dimmed
   under its words (lock.css .scene): there the subject-cut slice puts the subject in view, two-thirds across. */
@media (max-width: 699px) {
  :root[data-scene] .art::before {
    background-position: 50% 30%;
  }
  :root[data-scene] body > .art::before {
    bottom: auto;
    height: min(100%, 440px);
    -webkit-mask-image: linear-gradient(180deg, #000 50%, transparent);
    mask-image: linear-gradient(180deg, #000 50%, transparent);
  }
  /* Today's light and its drifting band (plan/motion.css) stay on the picture, fading as it does, not across the page
     under it (a review, November 8: Riot's red cut ran on down the bare page). The band's box starts 30% of the art's
     height above it and is 160% tall, so its gradient line starts 18.75% above the art's top. */
  :root[data-scene] body > .art .art-light {
    -webkit-mask-image: linear-gradient(180deg, #000 min(50%, 220px), transparent min(100%, 440px));
    mask-image: linear-gradient(180deg, #000 min(50%, 220px), transparent min(100%, 440px));
  }
  :root[data-scene] body > .art .art-band {
    -webkit-mask-image: linear-gradient(180deg, #000 calc(18.75% + 220px), transparent calc(18.75% + 440px));
    mask-image: linear-gradient(180deg, #000 calc(18.75% + 220px), transparent calc(18.75% + 440px));
  }
}

/* What Locke knows about you (Settings): a fact, where it came from, and taking it back. */
.facts {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.facts:empty {
  display: none;
}
.facts li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-3);
  box-shadow: var(--panel-edge);
}
.facts li span {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.facts li small {
  grid-column: 1;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.facts li button {
  grid-row: 1 / span 2;
  grid-column: 2;
  padding: 8px 12px;
  font-size: 13px;
}
/* Moving a fixed time (event-move.mjs): drawn as each look draws a card, its name on a tab and the title large and
   tilted, the fields in the head face, Save as the card's way on. It rises in over a dimmed page and drops away when
   it closes (October 29, the owner: it "just pops open"). */
.event-editor {
  color: var(--text);
  background: var(--bg-2);
  border: 0;
  border-radius: 0;
  padding: 22px 22px 20px;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  box-shadow:
    var(--panel-edge),
    0 24px 60px rgba(0, 0, 0, 0.5);
  animation: editor-in 0.42s var(--spring) both;
}
:root:not([data-look="midnight"]):not([data-look="phantom"]) .event-editor {
  background: linear-gradient(140deg, #0c2754, #071a3c);
  box-shadow:
    inset 0 0 0 1px var(--line),
    0 0 44px rgba(67, 216, 255, 0.16),
    0 24px 60px rgba(0, 0, 0, 0.5);
}
:root[data-look="midnight"] .event-editor {
  border-left: 6px solid var(--hi);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
}
:root[data-look="phantom"] .event-editor {
  box-shadow:
    inset 0 0 0 2.5px var(--text),
    8px 8px 0 var(--hi);
}
.event-editor::backdrop {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fade 0.25s var(--ease) both;
}
.event-editor.leaving {
  animation: editor-out 0.17s cubic-bezier(0.4, 0, 0.7, 0.2) both;
}
.event-editor.leaving::backdrop {
  animation: fade 0.17s var(--ease) reverse both;
}
@keyframes editor-in {
  from {
    opacity: 0;
    transform: translateY(28px) skewX(-5deg) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes editor-out {
  to {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
}
@media (prefers-reduced-motion: reduce) {
  .event-editor::backdrop {
    animation: none;
  }
}
.event-editor form {
  display: grid;
  gap: 14px;
}
.event-editor .editor-tab {
  position: relative;
  isolation: isolate;
  justify-self: start;
  margin-left: 4px;
  padding: 6px 12px 5px;
  color: var(--on-hi);
  font-weight: 900;
}
.event-editor .editor-tab::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hi);
  transform: skewX(var(--skew));
}
.event-editor h2 {
  margin: 0 0 4px;
  font-size: clamp(26px, 7vw, 34px);
  line-height: 1;
  transform: rotate(-1.4deg);
  transform-origin: 0 100%;
}
.event-editor label {
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font: var(--head-style) 700 12.5px/1.2 var(--head);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.event-editor input {
  min-width: 0;
  width: 100%;
  padding: 11px 14px;
  color: var(--text);
  font: var(--head-style) 800 20px/1.2 var(--head);
  letter-spacing: 0.02em;
  text-transform: none;
}
.event-editor p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
}
.event-editor p[role="alert"]:empty {
  display: none;
}
.event-editor p[role="alert"] {
  color: var(--miss);
}
.event-editor .editor-acts {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}
.event-editor .editor-acts button:not(.quiet) {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 18px 0 20px;
  font: italic 900 22px/1 var(--display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.event-editor .editor-acts button:not(.quiet)::after {
  content: "\203A\203A\203A";
  font-size: 28px;
  letter-spacing: -0.12em;
  opacity: 0.45;
}
:root[data-look="midnight"] .event-editor .editor-acts button:not(.quiet),
:root[data-look="phantom"] .event-editor .editor-acts button:not(.quiet) {
  font-weight: 400;
}
button.event-time {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
}

/* A name changed in place (name-edit.mjs, November 14): the field the width of its row, Save and Cancel under it. */
.name-edit {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 8px;
}
.name-edit input {
  flex: 1 1 100%;
  min-width: 0;
}

/* Where to get Locke on another device (get-locke.mjs): its address taken whole by a tap, and wrapped anywhere, since
   it's long. */
.get-locke-at {
  -webkit-user-select: all;
  user-select: all;
  overflow-wrap: anywhere;
  color: var(--text);
}
.get-locke button {
  margin-left: 4px;
}
