/* ---------- fonts ---------- */
/* Hanken Grotesk (SIL Open Font License), self-hosted so the CSP can stay 'self'. */
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/hanken-grotesk-latin-ext-wght.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/hanken-grotesk-latin-wght.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */
/* Two base colors. Every other color is one of them at a lower opacity.
   Hues are variables so /assets/js/colors.js can pick a new palette on each page load:
   --hue is shared by fg and bg; --accent-hue is always at least 90° away from it.
   The values here are the defaults (used without JavaScript).

   OKLCH keeps perceived lightness and saturation the same whatever the hue.
   fg and bg chroma are the highest that stay inside sRGB at every hue, so no hue gets clipped.
   The accent keeps a higher chroma (it's only a faint glow and tinted error text); at hues
   where that's out of range the browser maps it to the nearest displayable color. */
:root {
  --hue: 153;
  --accent-hue: 24;

  --fg: oklch(87.9% 0.059 var(--hue));
  --bg: oklch(17.8% 0.031 var(--hue));
  --accent: oklch(53.4% 0.205 var(--accent-hue));  /* only for the glow at the bottom of the page and error text */

  --fg-80: color-mix(in srgb, var(--fg) 80%, transparent);
  --fg-60: color-mix(in srgb, var(--fg) 60%, transparent);
  --fg-40: color-mix(in srgb, var(--fg) 40%, transparent);
  --fg-25: color-mix(in srgb, var(--fg) 25%, transparent);
  --fg-15: color-mix(in srgb, var(--fg) 15%, transparent);
  --fg-10: color-mix(in srgb, var(--fg) 10%, transparent);
  --fg-5: color-mix(in srgb, var(--fg) 5%, transparent);

  --bg-80: color-mix(in srgb, var(--bg) 80%, transparent);
  --bg-shade: color-mix(in srgb, var(--bg) 72%, black); /* faint logo on event pages */

  --error: color-mix(in srgb, var(--accent) 50%, white);

  --radius: 4px;
  --control-h: 60px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}
body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1.0625rem/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
h1 { font-size: clamp(3rem, 7.5vw, 6.25rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(2rem, 3.6vw, 3.25rem); }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--fg); color: var(--bg); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Accent glow: a blurred radial gradient fixed to the bottom edge of the viewport (stays put while scrolling). */
body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  bottom: -50px;
  height: min(560px, 70vh);
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    50% 100% at 50% 100%,
    color-mix(in srgb, var(--accent) 32%, transparent),
    color-mix(in srgb, var(--accent) 12%, transparent) 55%,
    transparent
  );
  background-size: min(1100px, 130vw) 100%;
  background-position: center bottom;
  background-repeat: no-repeat;
  filter: blur(100px);
}

/* ---------- logo header ---------- */
.site-header {
  position: relative;
  z-index: 1;
  padding: var(--gutter) var(--gutter) 0;
}
.logo {
  display: block;
  color: var(--fg);
  aspect-ratio: 1328 / 138.61; /* reserves the space before the SVG is built */
}
.logo svg { display: block; width: 100%; height: auto; overflow: visible; }
/* logo.js adds .is-faded to each character, one at a time, once they've all finished growing. */
.logo path, .logo circle { transition: fill 1.2s ease; }
.logo .is-faded { fill: var(--bg-shade); }
.logo:focus-visible { outline-offset: 6px; }

/* ---------- layout ---------- */
.container {
  position: relative;
  z-index: 1;
  max-width: calc(1088px + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(40px, 4.6vw, 80px) var(--gutter) 160px;
}
.section { margin-top: clamp(72px, 9vw, 120px); }
.section-title { margin-bottom: clamp(24px, 3vw, 40px); }
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(32px, 5vw, 64px);
}
.section-head .meta { display: flex; align-items: center; gap: 20px; padding-top: 6px; flex-wrap: wrap; font-size: 1.0625rem; color: var(--fg-40); }
.section-head .meta .hint, .section-head .meta .text-link { font-size: inherit; }

/* Two-column rows: small bold label on the left, control on the right. */
.form { display: flex; flex-direction: column; gap: 40px; }
.field-row {
  display: grid;
  grid-template-columns: minmax(0, 419fr) minmax(0, 635fr);
  column-gap: 32px;
  row-gap: 12px;
  align-items: start;
}
.field-label {
  display: block;
  margin: 0;
  padding-top: 4px;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.45;
}
.optional { margin-left: 8px; font-weight: 400; color: var(--fg-40); }
.field-control { min-width: 0; display: flex; flex-direction: column; gap: 10px; }

@media (max-width: 820px) {
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .field-label { padding-top: 0; }
}

.hint { font-size: 0.8125rem; color: var(--fg-40); }
.form-error { font-size: 0.9375rem; color: var(--error); }
.form-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  text-align: right;
}
.form-actions .btn-lg { margin-bottom: 18px; }
.saved-note, .form-actions .hint { font-size: 1.0625rem; color: var(--fg-40); }
.saved-note strong { color: var(--fg); font-weight: 600; }

/* ---------- page head ---------- */
.page-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: clamp(64px, 8vw, 80px); }
.page-head .desc {
  /* margin-top: clamp(24px, 3.5vw, 48px); */
  max-width: 44em;
  color: var(--fg-80);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.page-head h1 { overflow-wrap: anywhere; }
/* Setup page: "Your event is ready" line right under the title. */
.page-head .page-note { color: var(--fg-80); }
.page-head .page-note strong { color: var(--fg); font-weight: 600; }
.eyebrow { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.eyebrow .tz { font-size: 0.8125rem; color: var(--fg-40); }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 10px 2px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.pill.is-outline { background: transparent; color: var(--fg); }

/* ---------- inputs ---------- */
input[type="text"], input[type="date"], input[type="time"], input:not([type]), textarea, select {
  width: 100%;
  min-height: var(--control-h);
  padding: 0 20px;
  font-size: 1.0625rem;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--fg-40);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { display: block; resize: vertical; min-height: 152px; padding: 18px 20px; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: var(--fg-40); opacity: 1; }
input:hover, textarea:hover, select:hover { border-color: var(--fg-60); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--fg);
  box-shadow: 0 0 0 3px var(--fg-15);
}
input:disabled, textarea:disabled, select:disabled { opacity: 0.5; cursor: not-allowed; }
input[readonly] { text-overflow: ellipsis; }
input[type="date"], input[type="time"] { padding: 0 16px; font-variant-numeric: tabular-nums; }
::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.75; }
::-webkit-datetime-edit-fields-wrapper { padding: 0; }

.input-xl {
  min-height: 92px !important;
  font-size: clamp(1.75rem, 3.3vw, 2.75rem) !important;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 52px; cursor: pointer; }
.select select option { background: var(--bg); color: var(--fg); }
.select::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -7px;
  border-right: 1.5px solid var(--fg);
  border-bottom: 1.5px solid var(--fg);
  transform: rotate(45deg);
  pointer-events: none;
}

/* switch */
.switch-row { display: flex; align-items: flex-start; gap: 16px; cursor: pointer; }
.switch-row + .switch-row { margin-top: 18px; }
.switch-text { display: flex; flex-direction: column; gap: 2px; }
.switch-text strong { font-weight: 600; }
.switch {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 54px;
  height: 30px;
  margin: 0;
  border-radius: 999px;
  background: var(--fg-15);
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--fg);
  transition: transform 0.18s, background 0.15s;
}
.switch:checked { background: var(--fg); }
.switch:checked::after { background: var(--bg); transform: translateX(24px); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-h);
  padding: 0 22px;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s, opacity 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn-primary:hover:not(:disabled) { background: var(--fg-80); }
.btn-outline { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn-outline:hover:not(:disabled) { background: var(--fg-10); }
.btn-lg { min-height: 64px; min-width: min(300px, 100%); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 0.9375rem; }
.btn-icon { width: var(--control-h); padding: 0; flex: none; }
.btn-icon svg { width: 18px; height: 18px; }

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font-weight: 600;
  color: var(--fg);
  cursor: pointer;
  text-decoration: none;
}
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link { font-size: 0.9375rem; color: var(--fg-60); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.text-link:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg-60);
  cursor: pointer;
  font-size: 1.125rem;
  line-height: 1;
}
.icon-btn:hover { background: var(--fg-10); color: var(--fg); }

.copy-row { display: flex; gap: 8px; }
.copy-row input { min-width: 0; flex: 1; }

/* ---------- options editor ---------- */
.option-adder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.adder-to { font-size: 0.8125rem; color: var(--fg-40); text-transform: uppercase; letter-spacing: 0.02em; }
.option-adder .btn { padding: 0 20px; }
@media (max-width: 560px) {
  .option-adder { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .option-adder .opt-date, .option-adder .btn { grid-column: 1 / -1; }
}
.option-groups { display: flex; flex-direction: column; gap: 10px; }
.option-group {
  display: grid;
  grid-template-columns: minmax(96px, 0.36fr) minmax(0, 1fr);
  gap: 10px 16px;
  align-items: start;
  padding: 18px 20px;
  background: var(--fg-5);
  border: 1px solid var(--fg-10);
  border-radius: var(--radius);
}
.option-group-date { font-weight: 600; padding-top: 4px; }
.chips { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 10px;
  border-radius: 999px;
  background: var(--bg);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.chip .icon-btn { width: 22px; height: 22px; font-size: 1rem; border-radius: 50%; }
.empty-note {
  display: grid;
  place-items: center;
  min-height: var(--control-h);
  padding: 12px 16px;
  text-align: center;
  font-size: 1.0625rem;
  color: var(--fg-40);
  border: 1px dashed var(--fg-40);
  border-radius: var(--radius);
}
@media (max-width: 520px) {
  .option-group { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- slot picker (public page) ---------- */
.slot-groups { display: flex; flex-direction: column; gap: 40px; }
.slot-group-date { font-size: clamp(2rem, 3.6vw, 3.25rem); }
.slots { display: flex; flex-direction: column; gap: 10px; }
.slot {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 10px 20px;
  text-align: left;
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
  background: var(--fg-5);
  border: 1px solid var(--fg-10);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.slot:hover:not(:disabled) { border-color: var(--fg-40); }
.slot:disabled { cursor: not-allowed; opacity: 0.55; }
.slot .slot-time { flex: 1; }
.slot .check {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1.5px solid var(--fg-80);
  transition: background 0.12s, border-color 0.12s;
}
.slot[aria-pressed="true"] { border-color: var(--fg); }
.slot[aria-pressed="true"] .check { background: var(--fg); border-color: var(--fg); }

/* ---------- ranking ---------- */
.ranking { display: flex; flex-direction: column; gap: 24px; }
.rank-row {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) minmax(0, 1fr) auto;
  grid-template-areas:
    "date time badge count"
    "bar bar bar bar"
    "names names names names";
  align-items: center;
  column-gap: 16px;
  font-variant-numeric: tabular-nums;
}
.rank-date { grid-area: date; font-weight: 600; }
.rank-time { grid-area: time; }
.rank-badge { grid-area: badge; }
.rank-count { grid-area: count; font-weight: 600; text-align: right; }
.rank-bar {
  grid-area: bar;
  height: 18px;
  margin-top: 10px;
  border-radius: var(--radius);
  background: var(--fg-15);
  overflow: hidden;
}
.rank-bar span { display: block; height: 100%; border-radius: inherit; background: var(--fg); }
.rank-names {
  grid-area: names;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 20px;
  margin-top: 8px;
  color: var(--fg-40);
  overflow-wrap: anywhere;
}
.badge {
  display: inline-block;
  padding: 0 10px 1px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
  line-height: 1.45;
}
@media (max-width: 640px) {
  .rank-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "date count"
      "time badge"
      "bar bar"
      "names names";
  }
}

/* ---------- results grid ---------- */
.table-wrap { margin-top: clamp(40px, 5vw, 56px); overflow-x: auto; }
.grid {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-variant-numeric: tabular-nums;
}
.grid th, .grid td {
  padding: 8px 20px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
  font-weight: 400;
}
.grid thead th { padding-top: 22px; padding-bottom: 16px; min-width: 200px; }
.grid thead th:first-child { min-width: 0; }
.grid .col-date { display: block; font-weight: 600; }
.grid th:first-child, .grid td:first-child {
  width: 190px;
  max-width: 190px;
  padding-left: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
/* Pin names while the table scrolls sideways on small screens. The solid background this needs
   would otherwise show as a dark box over the bottom glow, so it's limited to where scrolling happens. */
@media (max-width: 820px) {
  .grid th:first-child, .grid td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--bg);
  }
}
.grid tbody tr:first-child > * { padding-top: 12px; }
.grid tfoot td { padding-top: 14px; padding-bottom: 22px; font-weight: 600; }
.grid .best { background: var(--fg-10); }
.grid thead .best { border-radius: var(--radius) var(--radius) 0 0; }
.grid tfoot .best { border-radius: 0 0 var(--radius) var(--radius); }
.grid .you-tag { margin-left: 8px; font-size: 0.75rem; font-weight: 600; color: var(--fg-40); }
.grid .dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--fg);
  vertical-align: middle;
}
.grid .no {
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--fg-25);
  vertical-align: middle;
}
.grid .actions-col { width: 1%; min-width: 0; padding: 4px 0 4px 8px; }
.grid-empty { padding: 32px 0; color: var(--fg-40); }

/* ---------- banners, misc ---------- */
.banner {
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--fg-5);
  border: 1px solid var(--fg-15);
}
.banner strong { font-weight: 600; }
.banner { margin-bottom: 40px; }

.danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}
.danger-row strong { display: block; font-weight: 600; }

.event-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.event-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 14px 20px;
  background: var(--fg-5);
  border: 1px solid var(--fg-10);
  border-radius: var(--radius);
}
.event-list .ev-main { flex: 1; min-width: 0; }
.event-list .ev-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-list .ev-meta { font-size: 0.8125rem; color: var(--fg-40); }
.event-list .ev-links { display: flex; gap: 6px; align-items: center; }
@media (max-width: 520px) {
  .event-list li { flex-wrap: wrap; }
  .event-list .ev-main { flex-basis: 100%; }
}

.loading { padding: 64px 0; color: var(--fg-40); }
.center-card { padding: 24px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.center-card p { color: var(--fg-60); max-width: 36em; }
.center-card .btn { margin-top: 16px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  background: var(--fg);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 10;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- create page: large, borderless inline fields ---------- */
.container-narrow { max-width: calc(972px + 2 * var(--gutter)); }
.form-inline {
  --name-size: clamp(2.25rem, 4.2vw, 4.5rem); /* Event Name */
  --field-size: clamp(1.375rem, 1.75vw, 1.875rem); /* Details, date and times */
  gap: 32px;
}
.form-inline :is(input, textarea, select) {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.form-inline :is(input, textarea) {
  font-size: var(--field-size);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.form-inline #title { font-size: var(--name-size); letter-spacing: -0.025em; }
.form-inline textarea { display: block; resize: none; overflow: hidden; line-height: 1; }
.form-inline :is(input, textarea):focus { box-shadow: 0 2px 0 var(--fg-25); }
.form-inline select { min-height: 40px; padding-right: 32px; font-weight: 600; }
.form-inline .select::after { right: 6px; }

/* Date on the left, "+" on the right, and the time range centered in the space between them. */
.form-inline .option-adder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.form-inline .time-range { display: flex; align-items: center; gap: 16px; }
.form-inline .option-adder input { width: auto; min-width: 0; min-height: var(--control-h); }
.form-inline .option-adder .btn-icon { width: 66px; }
.form-inline .option-group { border-color: var(--fg-25); }
.form-inline .empty-note { display: none; }

/* Add button: outlined and muted until a date is entered. */
.btn-add:not(.is-ready) { background: transparent; color: var(--fg-40); border-color: var(--fg-40); }
.btn-add:not(.is-ready):hover { background: var(--fg-5); color: var(--fg-60); }
.btn-add svg { width: 22px; height: 22px; }

/* Setup page: the time range doesn't need its own box in the grid. */
.time-range { display: contents; }

/* Date and time fields with a picker icon button in front.
   Date: a text input ("02/16/27") plus a hidden native date input that supplies the calendar.
   Time: the native input, with the browser's own trailing icon hidden. */
.picker-field { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; }
.picker-field > .picker-input { flex: 1; min-width: 0; padding-left: 48px; font-variant-numeric: tabular-nums; }
.picker-field input::-webkit-calendar-picker-indicator { display: none; }
.picker-btn {
  position: absolute;
  left: 12px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg-80);
  cursor: pointer;
}
.picker-btn svg { width: 18px; height: 18px; }
.picker-btn:hover { color: var(--fg); background: var(--fg-10); }

/* Create page: icon sits just before the large text, no box. */
.form-inline .picker-field { gap: 6px; }
.form-inline .picker-btn { position: static; flex: none; margin-left: -5px; } /* icon flush with the column edge */
.form-inline .picker-field > .picker-input { flex: none; padding-left: 0; }
.form-inline .picker-field > .date-text { width: 4.9em; }
/* Hug the text (or placeholder) so nothing trails after it. */
@supports (field-sizing: content) {
  .form-inline .picker-field > .date-text { field-sizing: content; width: auto; }
}

/* Muted "--:-- --" until a time is picked (set by the options editor). */
input.is-empty::-webkit-datetime-edit { color: var(--fg-40); }

@media (max-width: 760px) {
  .form-inline .option-adder { flex-wrap: wrap; gap: 8px 16px; }
  .form-inline .option-adder .opt-date,
  .form-inline .time-range { flex-basis: 100%; }
  .form-inline .option-adder .btn { flex-basis: 100%; width: auto; margin-top: 8px; }
}

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

/* The native date input only anchors the picker; keep it out of sight (after the .form-inline rules it must beat). */
.picker-field input.date-native {
  position: absolute;
  left: 12px;
  bottom: 0;
  width: 28px;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}
