:root {
  --canvas: #f5f5f7;
  --surface: #ffffff;
  --fg: #1d1d1f;
  --secondary: #86868b;
  --separator: rgba(60, 60, 67, 0.12);
  --fill: rgba(120, 120, 128, 0.12);
  --fill-hover: rgba(120, 120, 128, 0.16);
  --blue: #007aff;
  --red: #ff3b30;
  --red-fill: rgba(255, 59, 48, 0.12);
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.06), 0 0 1px rgba(0, 0, 0, 0.04);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    system-ui, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #000000;
    --surface: #1c1c1e;
    --fg: #f5f5f7;
    --secondary: #98989d;
    --separator: rgba(84, 84, 88, 0.48);
    --fill: rgba(120, 120, 128, 0.24);
    --fill-hover: rgba(120, 120, 128, 0.32);
    --blue: #0a84ff;
    --red: #ff453a;
    --red-fill: rgba(255, 69, 58, 0.18);
    --shadow: 0 2px 24px rgba(0, 0, 0, 0.4), 0 0 1px rgba(255, 255, 255, 0.06);
  }
}
* { box-sizing: border-box; }
[hidden] {
  display: none !important;
}
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.022em;
  background: var(--canvas);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}
main {
  max-width: 26.5rem;
  margin: 0 auto;
  padding: max(1.35rem, env(safe-area-inset-top)) 1.25rem max(3rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
.head {
  text-align: center;
  margin-bottom: 0.65rem;
}
.head h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 0.35rem;
  line-height: 1.1;
}
.head p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--secondary);
  font-weight: 400;
  letter-spacing: -0.01em;
}
.settings-shell {
  margin-bottom: 1.5rem;
}
.settings-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: none;
  color: var(--fg);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.02em;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.settings-toggle:focus-visible {
  outline: none;
  box-shadow: var(--shadow), 0 0 0 3px color-mix(in srgb, var(--blue) 30%, transparent);
}
.settings-toggle-chevron {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  line-height: 0;
}
.settings-toggle-chevron svg {
  width: 0.65rem;
  height: 0.65rem;
  display: block;
  transform: rotate(180deg);
  transform-origin: 50% 50%;
  transition: transform 0.22s ease;
}
.settings-shell.collapsed .settings-toggle-chevron svg {
  transform: rotate(0deg);
}
.settings-shell.collapsed .settings-toggle {
  margin-bottom: 0;
}
.settings-panel-inner {
  /* Visible when expanded so location / saved dropdowns can extend past the panel edge. */
  overflow: visible;
  transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  max-height: 3200px;
  opacity: 1;
}
.settings-shell.collapsed .settings-panel-inner {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.14s ease;
}
.sheet {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 0.5rem 0;
  margin-bottom: 0;
}
.sheet-section {
  padding: 0.65rem 1rem;
}
.sheet-section + .sheet-section {
  border-top: 0.5px solid var(--separator);
}
#postLoginSettings:not([hidden]):not(.post-login-flush-top) {
  border-top: 0.5px solid var(--separator);
}
.auth-footer {
  margin-top: auto;
  padding-top: 1.25rem;
  text-align: center;
}
.auth-footer .pill {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  margin: 0 auto 0.65rem;
  max-width: 100%;
}
.auth-footer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}
.auth-footer-actions .ghost {
  background: transparent;
  color: var(--secondary);
  font-size: 0.8125rem;
  font-weight: 400;
  padding: 0.2rem 0.45rem;
  min-height: unset;
  border-radius: var(--radius-sm);
}
.auth-footer-actions .ghost:hover:not(:disabled) {
  background: var(--fill);
  color: var(--secondary);
}
.auth-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  width: 100%;
}
.pill {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--secondary);
  letter-spacing: -0.01em;
}
.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  min-width: 0;
}
.auth-actions .auth-field {
  margin-bottom: 1rem;
}
.auth-actions-row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 0;
}
.auth-secondary-row:not([hidden]) {
  margin-top: 0.35rem;
}
.auth-action-half {
  flex: 1;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.auth-secondary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}
.auth-secondary-row .ghost {
  flex: 1;
  min-width: 8rem;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--secondary);
  margin: 0 0 0.4rem 0.05rem;
  letter-spacing: -0.01em;
}
.label-note {
  font-weight: 400;
  color: var(--secondary);
  opacity: 0.85;
}
.field {
  margin-bottom: 1rem;
}
.field:last-child {
  margin-bottom: 0;
}
.field-snap-label {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 0;
  padding: 0.75rem 0.85rem;
  background: var(--fill);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--fg);
  cursor: pointer;
  max-width: 100%;
  transition: background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.field-snap-label:hover {
  background: var(--fill-hover);
}
.field-snap-label:focus-within {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 30%, transparent);
}
.field-snap-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  min-height: 1.25rem;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
  align-self: center;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--separator) 85%, var(--fg));
  background: var(--surface);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
  box-sizing: border-box;
  position: relative;
}
.field-snap-label input[type="checkbox"]:hover {
  border-color: color-mix(in srgb, var(--secondary) 55%, var(--fg));
}
.field-snap-label input[type="checkbox"]:checked {
  background: var(--blue);
  border-color: var(--blue);
}
.field-snap-label input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.3rem;
  height: 0.52rem;
  margin-top: -0.06rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
  box-sizing: border-box;
}
.field-snap-label input[type="checkbox"]:focus-visible {
  outline: none;
}
.field-snap-text {
  flex: 1;
  min-width: 0;
}
input, select, button {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
input:not([type="checkbox"]):not([type="radio"]),
select {
  width: 100%;
  border: none;
  background-color: var(--fill);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  transition: background-color 0.15s ease;
}
input:not([type="checkbox"]):not([type="radio"]):hover:not(:read-only) {
  background-color: var(--fill-hover);
}
select:hover:not(:disabled) {
  background-color: var(--fill-hover);
}
input::placeholder {
  color: var(--secondary);
  opacity: 0.65;
}
input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 30%, transparent);
}
select {
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--fill);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%236c6c70' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.25L6 7.75l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.7rem 0.7rem;
  padding-right: 2.35rem;
  min-height: 2.75rem;
  line-height: 1.25;
}
@media (prefers-color-scheme: dark) {
  select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%239a9aa0' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.25L6 7.75l3.5-3.5'/%3E%3C/svg%3E");
  }
}
select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
input[readonly] {
  opacity: 0.92;
  cursor: default;
}
.row-inline {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}
.row-inline input {
  flex: 1;
  min-width: 0;
}
button {
  border: none;
  border-radius: var(--radius-md);
  padding: 0.55rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.12s ease;
  white-space: nowrap;
}
button:active:not(:disabled) {
  transform: scale(0.98);
}
button.ghost {
  background: var(--fill);
  color: var(--blue);
}
button.ghost:hover:not(:disabled) {
  background: var(--fill-hover);
}
button.ghost:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  color: var(--secondary);
}
button.filled {
  background: var(--blue);
  color: #fff;
}
button.filled:hover:not(:disabled) {
  filter: brightness(1.05);
}
button.filled:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
button.destructive {
  background: var(--red-fill);
  color: var(--red);
}
button.destructive:hover:not(:disabled) {
  filter: brightness(1.08);
}
button.destructive:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.timer-block {
  text-align: center;
  padding: 1.25rem 1rem 0.5rem;
}
.title-hero {
  margin: 0 auto 1.15rem;
  max-width: 26.5rem;
  padding: 0 0.35rem;
}
.title-hero-label {
  margin: 0 0 0.4rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  line-height: 1.2;
}
.title-hero-text {
  margin: 0;
  font-size: clamp(0.9375rem, 3.6vw, 1.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.35;
  color: var(--fg);
  word-break: break-word;
  hyphens: auto;
}
.timer {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-size: 3.25rem;
  font-weight: 200;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0 0 1.25rem;
  color: var(--fg);
}
.msg {
  font-size: 0.875rem;
  color: var(--red);
  min-height: 0;
  margin: 0 0 0.5rem;
  text-align: center;
  letter-spacing: -0.01em;
}
.title-centerpiece {
  text-align: center;
  margin: 1.35rem -0.15rem 0.25rem;
  padding: 1.35rem 1rem 1.45rem;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--fill) 88%, var(--surface));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--fg) 0.08, transparent),
    0 1px 0 color-mix(in srgb, var(--fg) 0.04, transparent);
}
.title-centerpiece-eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  line-height: 1.2;
}
.title-centerpiece-text {
  margin: 0 auto;
  max-width: 100%;
  font-size: clamp(1.0625rem, 4.2vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.32;
  color: var(--fg);
  word-break: break-word;
  hyphens: auto;
}
.field-input-wrap {
  position: relative;
}
.saved-dropdown-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 60;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
  border: 0.5px solid var(--separator);
  overflow: hidden;
}
.saved-dropdown-scroll {
  max-height: min(40vh, 11.5rem);
  overflow-y: auto;
  padding: 0.35rem;
  -webkit-overflow-scrolling: touch;
}
.saved-dd-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.saved-dd-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 2.1rem;
  padding: 0.15rem 0.4rem 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--fill);
}
.saved-dd-row:hover {
  background: var(--fill-hover);
}
.saved-dd-text {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0.25rem 0;
}
.saved-dd-del {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 300;
  color: var(--secondary);
  background: transparent;
  border: none;
  cursor: pointer;
}
.saved-dd-del:hover {
  background: var(--red-fill);
  color: var(--red);
}
.saved-dd-empty {
  margin: 0;
  padding: 0.5rem 0.45rem;
  font-size: 0.8125rem;
  color: var(--secondary);
  text-align: center;
}
.actions {
  display: flex;
  gap: 0.65rem;
  max-width: 26.5rem;
  margin: 0 auto;
  padding: 0 0.25rem;
}
.event-sanity {
  max-width: 26.5rem;
  margin: 0 auto 1.35rem;
  padding: 0 1.25rem;
}
.event-sanity.calendar-check-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: none;
  margin: 0;
  padding: 1.25rem 1rem;
  background: var(--canvas);
  overflow: auto;
  overscroll-behavior: contain;
}
.event-sanity.calendar-check-overlay .event-sanity-card {
  width: 100%;
  max-width: 26.5rem;
  max-height: min(92vh, 36rem);
  overflow-y: auto;
  flex-shrink: 0;
}
.event-sanity-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1rem 1rem 0.9rem;
  border: 0.5px solid var(--separator);
}
.event-sanity-eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  line-height: 1.2;
}
.event-sanity-sub {
  margin: 0 0 0.15rem;
  font-size: 0.8125rem;
  color: var(--secondary);
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.event-sanity-timeline {
  --sanity-axis: 0.5rem;
  position: relative;
  margin: 0.85rem 0 0.5rem;
  padding-left: 0.15rem;
}
.event-sanity-timeline::before {
  content: "";
  position: absolute;
  left: calc(var(--sanity-axis) - 1px);
  top: 0.4rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--separator);
  border-radius: 1px;
}
.event-sanity-row {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.8rem;
}
.event-sanity-row:last-child {
  margin-bottom: 0.15rem;
}
.event-sanity-row::before {
  content: "";
  position: absolute;
  left: calc(var(--sanity-axis) - 0.15rem - 0.225rem);
  top: 0.38rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--event-dot, var(--secondary));
  box-shadow: 0 0 0 2px var(--surface);
}
.event-sanity-row.is-matched::before {
  width: 0.55rem;
  height: 0.55rem;
  left: calc(var(--sanity-axis) - 0.15rem - 0.275rem);
  top: 0.3rem;
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 4px color-mix(in srgb, var(--blue) 55%, transparent);
}
.event-sanity-row-inner {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  align-items: flex-start;
}
.event-sanity-time {
  font-size: 0.75rem;
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.event-sanity-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg);
  line-height: 1.28;
  letter-spacing: -0.02em;
  word-break: break-word;
}
.event-sanity-loc {
  font-size: 0.8125rem;
  color: var(--secondary);
  line-height: 1.35;
  word-break: break-word;
}
.event-sanity-open {
  margin-top: 0.2rem;
  padding: 0.15rem 0;
  font-size: 0.8125rem;
  font-weight: 500;
  background: transparent;
  border: none;
  color: var(--blue);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}
.event-sanity-open:hover {
  opacity: 0.85;
}
.event-sanity-warning {
  margin: 0.5rem 0 0.35rem;
  font-size: 0.8125rem;
  color: var(--red);
  line-height: 1.35;
}
.event-sanity-dismiss {
  width: 100%;
  margin-top: 0.35rem;
  min-height: 2.5rem;
}
.actions button {
  flex: 1;
  min-height: 3rem;
  border-radius: var(--radius-md);
}
@media (max-width: 40rem) {
  .actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
    max-width: none;
    padding: 0;
  }
  .actions button {
    flex: 0 0 auto;
    width: 100%;
  }
}
.beta-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: color-mix(in srgb, var(--canvas) 92%, var(--fg));
}
.beta-card {
  width: 100%;
  max-width: 22rem;
  padding: 1.35rem 1.25rem 1.5rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.beta-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-align: center;
}
.beta-copy {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--secondary);
  text-align: center;
  line-height: 1.35;
}
.beta-msg {
  margin: 0 0 0.75rem;
  min-height: 1.25rem;
}
.beta-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--secondary);
  margin: 0 0 0.4rem 0.05rem;
}
.beta-input {
  width: 100%;
  margin-bottom: 1rem;
}
.beta-submit {
  width: 100%;
  min-height: 2.75rem;
}
@media (prefers-reduced-motion: reduce) {
  button:active:not(:disabled) {
    transform: none;
  }
  input:not([type="checkbox"]):not([type="radio"]),
  select {
    transition: none;
  }
  .settings-panel-inner,
  .settings-toggle-chevron svg {
    transition: none;
  }
}
