/* Sesh, styled after iOS 27. Content sits on calm solid surfaces; Liquid Glass is kept for
   the floating layer (tab bar, bar buttons, banners, alerts), where it has something to
   refract. Every text pair meets 4.5:1 in both appearances. */

/* Tokens: light by default. Dark is declared twice below, once for "Automatic" on a dark
   phone and once for an explicit Dark choice, because CSS cannot OR a media query with a
   selector. */
:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", system-ui, sans-serif;

  --canvas: #f2f2f7;
  --surface: #ffffff;
  --surface-hover: #f7f7f9;
  --surface-pressed: #e5e5ea;
  --fill: rgba(120, 120, 128, 0.12);
  --fill-strong: rgba(120, 120, 128, 0.2);
  --thumb: #ffffff;
  --shadow-thumb: 0 3px 8px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  --label: #111114;
  --label-2: #636366;
  --label-3: #a1a1a6;
  --separator: rgba(60, 60, 67, 0.18);
  --separator-strong: rgba(60, 60, 67, 0.36);

  --tint: #16773e;
  --tint-ink: #ffffff;
  --tint-pressed: #11602f;
  --tint-soft: rgba(22, 119, 62, 0.12);
  --upcoming: #4b49cf;
  --upcoming-soft: rgba(75, 73, 207, 0.1);
  --warning: #8f5500;
  --warning-ink: #ffffff;
  --warning-soft: rgba(255, 159, 10, 0.16);
  --danger: #c8001b;
  --danger-soft: rgba(200, 0, 27, 0.1);

  --badge-live: #146a39;
  --badge-upcoming: #3a38b8;
  --badge-full: #48484a;

  /* Liquid Glass. iOS 27's default is milkier than 26, with a darker outer edge and a
     brighter top highlight. */
  --bar: rgba(242, 242, 247, 0.86);
  --glass-fill: rgba(255, 255, 255, 0.62);
  --glass-thick: rgba(255, 255, 255, 0.84);
  --glass-solid: #fbfbfd;
  --glass-tint: rgba(22, 119, 62, 0.9);
  --glass-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 55%);
  --glass-rim: inset 0 1px 0.5px rgba(255, 255, 255, 0.9), inset 0 0 0 0.5px rgba(255, 255, 255, 0.55),
    0 0 0 0.5px rgba(0, 0, 0, 0.1);
  --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  --glow: rgba(255, 255, 255, 0.75);
  --tab-selected: rgba(120, 120, 128, 0.16);

  --google-bg: #ffffff;
  --google-ink: #1f1f1f;
  --google-line: #747775;

  --radius-card: 24px;
  --radius-block: 18px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --gutter-left: max(16px, env(safe-area-inset-left, 0px));
  --gutter-right: max(16px, env(safe-area-inset-right, 0px));
  --column: 40rem;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #000000;
    --surface: #1c1c1e;
    --surface-hover: #232325;
    --surface-pressed: #2c2c2e;
    --fill: rgba(120, 120, 128, 0.24);
    --fill-strong: rgba(120, 120, 128, 0.36);
    --thumb: #636366;
    --shadow-thumb: 0 3px 8px rgba(0, 0, 0, 0.3);
    --label: #f5f5f7;
    --label-2: #aeaeb2;
    --label-3: #6c6c70;
    --separator: rgba(84, 84, 88, 0.6);
    --separator-strong: rgba(120, 120, 128, 0.7);
    --tint: #3ccf7f;
    --tint-ink: #04170b;
    --tint-pressed: #34b56f;
    --tint-soft: rgba(60, 207, 127, 0.16);
    --upcoming: #9b99ff;
    --upcoming-soft: rgba(155, 153, 255, 0.14);
    --warning: #ffb340;
    --warning-ink: #2b1700;
    --warning-soft: rgba(255, 179, 64, 0.14);
    --danger: #ff7a72;
    --danger-soft: rgba(255, 122, 114, 0.14);
    --bar: rgba(0, 0, 0, 0.8);
    --glass-fill: rgba(44, 44, 48, 0.7);
    --glass-thick: rgba(44, 44, 48, 0.88);
    --glass-solid: #2c2c2e;
    --glass-tint: rgba(60, 207, 127, 0.9);
    --glass-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 50%);
    --glass-rim: inset 0 1px 0.5px rgba(255, 255, 255, 0.22), inset 0 0 0 0.5px rgba(255, 255, 255, 0.12),
      0 0 0 0.5px rgba(0, 0, 0, 0.6);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
    --glow: rgba(255, 255, 255, 0.25);
    --tab-selected: rgba(255, 255, 255, 0.12);
    --google-bg: #131314;
    --google-ink: #e3e3e3;
    --google-line: #8e918f;
  }
}

:root[data-theme="dark"] {
  --canvas: #000000;
  --surface: #1c1c1e;
  --surface-hover: #232325;
  --surface-pressed: #2c2c2e;
  --fill: rgba(120, 120, 128, 0.24);
  --fill-strong: rgba(120, 120, 128, 0.36);
  --thumb: #636366;
  --shadow-thumb: 0 3px 8px rgba(0, 0, 0, 0.3);
  --label: #f5f5f7;
  --label-2: #aeaeb2;
  --label-3: #6c6c70;
  --separator: rgba(84, 84, 88, 0.6);
  --separator-strong: rgba(120, 120, 128, 0.7);
  --tint: #3ccf7f;
  --tint-ink: #04170b;
  --tint-pressed: #34b56f;
  --tint-soft: rgba(60, 207, 127, 0.16);
  --upcoming: #9b99ff;
  --upcoming-soft: rgba(155, 153, 255, 0.14);
  --warning: #ffb340;
  --warning-ink: #2b1700;
  --warning-soft: rgba(255, 179, 64, 0.14);
  --danger: #ff7a72;
  --danger-soft: rgba(255, 122, 114, 0.14);
  --bar: rgba(0, 0, 0, 0.8);
  --glass-fill: rgba(44, 44, 48, 0.7);
  --glass-thick: rgba(44, 44, 48, 0.88);
  --glass-solid: #2c2c2e;
  --glass-tint: rgba(60, 207, 127, 0.9);
  --glass-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 50%);
  --glass-rim: inset 0 1px 0.5px rgba(255, 255, 255, 0.22), inset 0 0 0 0.5px rgba(255, 255, 255, 0.12),
    0 0 0 0.5px rgba(0, 0, 0, 0.6);
  --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
  --glow: rgba(255, 255, 255, 0.25);
  --tab-selected: rgba(255, 255, 255, 0.12);
  --google-bg: #131314;
  --google-ink: #e3e3e3;
  --google-line: #8e918f;
}

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

/* Base. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Focused fields stay clear of the floating bars. */
  scroll-padding-top: calc(var(--safe-top) + 72px);
  scroll-padding-bottom: 128px;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.35;
  color: var(--label);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  caret-color: var(--tint);
  accent-color: var(--tint);
}

::selection {
  background: var(--tint-soft);
}

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

a {
  color: var(--tint);
  text-underline-offset: 0.18em;
}

h1,
h2,
p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

h1,
h2 {
  text-wrap: balance;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  touch-action: manipulation;
}

time,
[data-until],
.pill,
.counter {
  font-variant-numeric: tabular-nums;
}

/* "6:30 PM" never breaks across lines. */
time {
  white-space: nowrap;
}

.icon {
  display: inline-block;
  flex: none;
  width: 1.25em;
  height: 1.25em;
  vertical-align: middle;
}

/* Type scale (iOS): Large Title 34, Title 1 28, Title 2 22, Title 3 20, Body 17,
   Subhead 15, Footnote 13. */
.large-title {
  margin: 0 0 16px;
  font-size: 2.125rem;
  line-height: 1.2;
  font-weight: 700;
}

.title1 {
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 700;
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}

.title2 {
  font-size: 1.375rem;
  line-height: 1.25;
  font-weight: 700;
}

.lead {
  color: var(--label-2);
}

.large-title + .lead {
  margin: -10px 0 8px;
}

.secondary {
  color: var(--label-2);
}

.footnote {
  margin: 8px 16px 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--label-2);
}

.centered {
  text-align: center;
}

/* Page frame. */
.main {
  width: 100%;
  max-width: var(--column);
  margin: 0 auto;
  padding: calc(var(--safe-top) + 20px) var(--gutter-right) calc(var(--safe-bottom) + 40px)
    var(--gutter-left);
}

.chrome-tabs .main {
  padding-bottom: calc(var(--safe-bottom) + 128px);
}

.chrome-back .main {
  padding-top: calc(var(--safe-top) + 64px);
}

.chrome-sheet .main {
  padding-top: 12px;
}

.main-narrow {
  max-width: 26rem;
}

.main-center {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-content: center;
}

/* Liquid Glass: blur and lift what is behind, a bright rim on top, a dark hairline outside. */
.glass {
  background: var(--glass-sheen), var(--glass-fill);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow: var(--glass-rim), var(--glass-shadow);
}

.glass-tint {
  --glass-fill: var(--glass-tint);
  color: var(--tint-ink);
}

/* Floating chrome. */
.edge-top {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  height: calc(var(--safe-top) + 44px);
  padding: var(--safe-top) 76px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bar);
  box-shadow: 0 0.5px 0 var(--separator);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease);
}

.chrome-back .edge-top {
  height: calc(var(--safe-top) + 60px);
  padding-top: calc(var(--safe-top) + 8px);
  padding-bottom: 8px;
}

/* The blur only runs while the strip shows, which spares low-end phones at rest. */
[data-scroll] .edge-top {
  opacity: 1;
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}

.edge-title {
  overflow: hidden;
  font-size: 1.0625rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
}

[data-scroll="title"] .edge-title {
  opacity: 1;
  transform: none;
}

.float-bar {
  position: fixed;
  z-index: 30;
  top: calc(var(--safe-top) + 8px);
  left: 0;
  right: 0;
  max-width: var(--column);
  margin: 0 auto;
  padding: 0 var(--gutter-right) 0 var(--gutter-left);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.float-bar > *,
.float-trailing > * {
  pointer-events: auto;
}

.float-trailing {
  display: flex;
  gap: 8px;
}

.float-button,
.tabbar-action {
  position: relative;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  text-decoration: none;
  transition: transform 220ms var(--ease);
}

.float-button {
  width: 44px;
  height: 44px;
  color: var(--label);
}

.float-button .icon {
  width: 20px;
  height: 20px;
}

/* Touched glass swells slightly and glows from the finger. */
.float-button::after,
.tabbar-action::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--press-x, 50%) var(--press-y, 50%), var(--glow), transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms ease-out;
}

.float-button:active,
.tabbar-action:active {
  transform: scale(1.08);
}

.float-button:active::after,
.tabbar-action:active::after {
  opacity: 1;
  transition-duration: 60ms;
}

.tabbar {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: max(16px, calc(var(--safe-bottom) - 10px));
  max-width: var(--column);
  margin: 0 auto;
  padding: 0 max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
  view-transition-name: tabbar;
}

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

.tabbar-tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
}

.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 88px;
  height: 54px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--label);
  font-size: 0.6875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}

.tab .icon {
  width: 26px;
  height: 26px;
}

.tab[aria-current="page"] {
  color: var(--tint);
  background: var(--tab-selected);
}

.tab:active {
  background: var(--fill-strong);
}

.tab-dot {
  position: absolute;
  top: 7px;
  left: calc(50% + 8px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tint);
}

.tabbar-action {
  width: 62px;
  height: 62px;
}

.tabbar-action .icon {
  width: 26px;
  height: 26px;
}

.sheet-bar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  padding: calc(var(--safe-top) + 8px) max(var(--gutter-right), calc((100% - var(--column)) / 2 + 16px)) 8px
    max(var(--gutter-left), calc((100% - var(--column)) / 2 + 16px));
  transition: background-color 200ms var(--ease), box-shadow 200ms var(--ease);
}

[data-scroll] .sheet-bar {
  background: var(--bar);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 0.5px 0 var(--separator);
}

.sheet-bar-title {
  overflow: hidden;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Buttons are capsules: prominent for the one main action, filled for the rest. */
.button {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--fill);
  color: var(--label);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease), opacity 160ms var(--ease);
}

.button:active {
  transform: scale(0.97);
}

.button .icon {
  width: 1.2em;
  height: 1.2em;
}

.button-prominent {
  background: var(--tint);
  color: var(--tint-ink);
}

.button-prominent:active {
  background: var(--tint-pressed);
}

.button-glass {
  background: var(--fill);
  color: var(--label);
}

.button-destructive {
  background: var(--danger-soft);
  color: var(--danger);
}

.button-plain {
  padding-inline: 12px;
  background: transparent;
  color: var(--tint);
}

.button.destructive,
.row-button.destructive {
  color: var(--danger);
}

.button-large {
  width: 100%;
  min-height: 52px;
}

.button-small {
  padding: 8px 14px;
  font-size: 0.9375rem;
}

.button:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}

.button-google {
  background: var(--google-bg);
  color: var(--google-ink);
  box-shadow: inset 0 0 0 1px var(--google-line);
}

.google-mark {
  width: 20px;
  height: 20px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--tint-soft);
  color: var(--tint);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms var(--ease);
}

.chip:active {
  transform: scale(0.96);
}

/* Inset grouped lists: one card per group, hairlines between rows. */
.list {
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  background: var(--surface);
  border-radius: var(--radius-card);
}

.list > * {
  position: relative;
}

.list > * + *::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  left: 16px;
  right: 0;
  height: 0.5px;
  background: var(--separator);
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 16px;
  color: var(--label);
  text-decoration: none;
}

.row-link {
  transition: background-color 120ms var(--ease);
}

.row-link:active {
  background: var(--surface-pressed);
}

.row-link > .icon:last-child,
.activity > .icon:last-child {
  width: 14px;
  height: 14px;
  color: var(--label-3);
}

.row-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.row-title {
  font-weight: 600;
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}

.row-sub {
  font-size: 0.9375rem;
  color: var(--label-2);
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}

.row-sub .icon {
  width: 1em;
  height: 1em;
  margin-right: 4px;
  vertical-align: -0.125em;
}

.row-label {
  flex: none;
  color: var(--label-2);
}

.row-value {
  flex: 1;
  min-width: 0;
  text-align: right;
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}

.row-value-sub {
  display: block;
  font-size: 0.9375rem;
  color: var(--label-2);
}

.row-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.row-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--tint);
  color: var(--tint-ink);
}

.row-icon .icon {
  width: 20px;
  height: 20px;
}

.row-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--upcoming);
}

.row-flag .icon {
  width: 14px;
  height: 14px;
}

.row-button {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 0;
  background: none;
  color: var(--tint);
  font-size: 1.0625rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.row-button:active {
  background: var(--surface-pressed);
}

.row-button .icon {
  width: 22px;
  height: 22px;
}

.row-summary {
  color: var(--label);
  list-style: none;
}

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

.row-summary > :first-child {
  flex: 1;
}

.row-summary .row-label {
  color: var(--label);
}

.row-summary .row-value {
  flex: none;
  color: var(--label-2);
}

/* Disclosure chevron: points right when closed, down when open. */
.row-summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin: 0 4px 0 2px;
  border: solid var(--label-3);
  border-width: 0 2px 2px 0;
  transform: rotate(-45deg);
  transition: transform 200ms var(--ease);
}

.disclosure[open] > .row-summary::after {
  transform: rotate(45deg);
}

.disclosure-body {
  display: grid;
  gap: 14px;
  padding: 4px 16px 16px;
}

.disclosure-body .field {
  padding: 0;
}

.disclosure-body input:not([type="time"]) {
  border-radius: 12px;
  background: var(--fill);
  padding: 0 12px;
}

.disclosure-body .footnote {
  margin: 0;
}

.pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--label-2);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.pill-full {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--separator-strong);
}

.pill-own {
  background: var(--tint-soft);
  color: var(--tint);
}

/* Sections. */
.section {
  margin-top: 32px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 700;
}

.section-note {
  margin: 0;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tint);
  animation: live-pulse 2.4s ease-out infinite;
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 var(--tint-soft);
  }
  70%,
  100% {
    box-shadow: 0 0 0 8px transparent;
  }
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 24px;
  text-align: center;
}

.empty-hero {
  padding-top: 56px;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--tint-soft);
  color: var(--tint);
}

.empty-icon .icon {
  width: 34px;
  height: 34px;
}

.empty-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.empty .secondary {
  max-width: 22rem;
  text-wrap: balance;
}

.empty .button {
  margin-top: 8px;
}

/* Text stays centered as a block; only the button spans the card. */
.empty-compact {
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius-card);
}

.empty-compact .button {
  align-self: stretch;
}

.empty-page {
  min-height: 70vh;
  min-height: 70svh;
  justify-content: center;
}

.callout {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius-block);
  background: var(--fill);
  font-size: 0.9375rem;
}

.callout a {
  font-weight: 600;
}

.note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: var(--radius-block);
  background: var(--upcoming-soft);
  font-size: 0.9375rem;
}

.note .icon {
  color: var(--upcoming);
}

/* Forms. Labels sit above borderless inputs inside the card, with no example text. */
.form,
.stack {
  display: grid;
  gap: 16px;
}

.stack {
  gap: 12px;
}

.form .footnote,
.stack .footnote {
  margin-top: -8px;
}

.field {
  display: grid;
  gap: 4px;
  padding: 12px 16px 4px;
}

.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.field-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--label-2);
  transition: color 160ms var(--ease);
}

.field:focus-within .field-label {
  color: var(--tint);
}

.counter {
  font-size: 0.8125rem;
  color: var(--label-2);
}

.field input:not([type="radio"]):not([type="time"]):not([type="datetime-local"]) {
  width: 100%;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--label);
  font-size: 1.0625rem;
  outline: none;
}

input[type="time"],
input[type="datetime-local"] {
  -webkit-appearance: none;
  appearance: none;
  justify-self: start;
  min-width: 8rem;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--fill);
  color: var(--label);
  font-size: 1.0625rem;
  font-weight: 600;
}

input::-webkit-date-and-time-value {
  text-align: left;
}

.field input[type="time"],
.field input[type="datetime-local"] {
  margin-bottom: 8px;
}

.field-row {
  grid-template-columns: 1fr auto;
  align-items: center;
  padding-bottom: 12px;
}

.field-row .field-label {
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--label);
}

.field .segmented {
  margin-bottom: 8px;
}

.select {
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
  padding: 0 36px 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--fill)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 18' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2 7 4-4 4 4M2 11l4 4 4-4'/%3E%3C/svg%3E")
    no-repeat right 14px center / 10px 15px;
  color: var(--label);
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
}

/* Fields that only matter for one choice appear with it. */
.field-later,
.field-custom-end {
  display: none;
}

.form:has(#start-later:checked) .field-later,
.form:has(#until-other:checked) .field-custom-end {
  display: grid;
}

@supports not selector(:has(*)) {
  .field-later,
  .field-custom-end {
    display: grid;
  }
}

.form-error {
  padding: 12px 16px;
  border-radius: var(--radius-block);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.9375rem;
  font-weight: 600;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.inline-form .field-label {
  flex-basis: 100%;
}

.sheet-actions {
  margin-top: 4px;
}

/* Segmented control: a raised thumb slides to the chosen segment. */
.segmented {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  padding: 2px;
  border-radius: 999px;
  background: var(--fill);
}

.segment-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.segment {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--label);
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
  cursor: pointer;
}

.segment-input:checked + .segment {
  background: var(--thumb);
  box-shadow: var(--shadow-thumb);
}

.segment-input:focus-visible + .segment {
  outline: 2px solid var(--tint);
  outline-offset: -2px;
}

@supports selector(:has(*)) {
  .segmented::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 2px;
    bottom: 2px;
    left: 2px;
    width: calc((100% - 4px) / var(--segments, 2));
    border-radius: 999px;
    background: var(--thumb);
    box-shadow: var(--shadow-thumb);
    transform: translateX(calc(100% * var(--selected, 0)));
    transition: transform 260ms var(--ease);
  }

  .segment-input:checked + .segment {
    background: none;
    box-shadow: none;
  }

  .segmented:has(> .segment-input:nth-of-type(3)) {
    --segments: 3;
  }

  .segmented:has(> .segment-input:nth-of-type(4)) {
    --segments: 4;
  }

  .segmented:has(> .segment-input:nth-of-type(2):checked) {
    --selected: 1;
  }

  .segmented:has(> .segment-input:nth-of-type(3):checked) {
    --selected: 2;
  }

  .segmented:has(> .segment-input:nth-of-type(4):checked) {
    --selected: 3;
  }
}

/* Now tab. */
.activity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  margin: 0 0 16px;
  padding: 12px 16px 12px 12px;
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--label);
  text-decoration: none;
  transition: transform 160ms var(--ease);
}

.activity:active {
  transform: scale(0.98);
}

.activity-alert {
  background: var(--warning-soft);
}

.activity-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--tint-ink);
}

.activity-alert .activity-icon {
  background: var(--warning);
  color: var(--warning-ink);
}

.activity-icon .icon {
  width: 22px;
  height: 22px;
}

.activity-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.activity-title {
  font-weight: 600;
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}

.activity-sub {
  font-size: 0.9375rem;
  color: var(--label-2);
}

.search {
  margin: 0 0 8px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--label-2);
}

.search-field:focus-within {
  box-shadow: inset 0 0 0 2px var(--tint);
}

.search-field .icon {
  width: 18px;
  height: 18px;
}

.search-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  color: var(--label);
  font-size: 1.0625rem;
  outline: none;
}

/* Sesh detail. */
.hero {
  display: grid;
  gap: 8px;
  margin: 4px 0 20px;
}

/* Status lines mix text with <time>, so they flow as text: a flex container would drop
   the space before the time. */
.status {
  font-size: 0.9375rem;
  font-weight: 600;
}

.status .icon {
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -0.1em;
}

.status-live {
  color: var(--tint);
}

.status-upcoming {
  color: var(--upcoming);
}

.status-full {
  color: var(--label-2);
}

.seat-meter {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 10px;
}

.dots {
  display: inline-flex;
  gap: 4px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--label-3);
}

.dot-taken {
  background: var(--label-2);
  box-shadow: none;
}

.eta-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.eta-buttons > form {
  display: flex;
}

.eta-buttons .button {
  flex: 1;
  flex-direction: column;
  gap: 0;
  min-height: 84px;
  border-radius: var(--radius-card);
}

.eta-number {
  font-size: 1.75rem;
  line-height: 1.1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.eta-unit {
  font-size: 0.9375rem;
}

/* Host: the prompt, then the table badge, the signature screen of Sesh. */
.alert {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--warning-soft);
}

.alert-text {
  display: grid;
  gap: 4px;
}

.alert-text span {
  font-size: 0.9375rem;
}

.badge {
  --badge-ink: #ffffff;
  --badge-ink-2: rgba(255, 255, 255, 0.84);
  position: relative;
  overflow: hidden;
  margin: 0 0 8px;
  padding: 24px 20px 20px;
  border-radius: 32px;
  background: var(--badge-live);
  color: var(--badge-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* A soft highlight across the top, like light on glass. */
.badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 45%);
  pointer-events: none;
}

.badge-upcoming {
  background: var(--badge-upcoming);
}

.badge-full {
  background: var(--badge-full);
}

.badge-title {
  font-size: 2.125rem;
  line-height: 1.15;
  font-weight: 800;
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}

.badge-place {
  margin-top: 6px;
  color: var(--badge-ink-2);
  font-size: 1.25rem;
  font-weight: 600;
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}

.badge-status {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.9375rem;
  font-weight: 600;
}

.badge-status .icon {
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -0.1em;
}

.badge-hint {
  margin-top: 16px;
  color: var(--badge-ink-2);
  font-size: 0.9375rem;
}

.codes {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.16);
}

.code-name {
  display: grid;
  min-width: 0;
  font-size: 1.25rem;
  font-weight: 700;
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}

.code-eta {
  color: var(--badge-ink-2);
  font-size: 0.875rem;
  font-weight: 600;
}

.code {
  flex: none;
  font-size: 3rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.code-meter {
  height: 4px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.code-meter-fill {
  display: block;
  height: 100%;
  background: #ffffff;
  transform-origin: left;
  animation: code-drain 60s linear infinite;
}

@keyframes code-drain {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* On the way. */
.hold {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: var(--radius-card);
  background: var(--tint-soft);
}

.hold-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--tint);
  font-weight: 700;
}

.hold-label .icon {
  width: 22px;
  height: 22px;
}

.hold-time {
  font-size: 0.9375rem;
}

.code-form {
  display: grid;
  gap: 12px;
}

.code-input {
  width: 100%;
  min-height: 72px;
  padding: 0 0 0 0.4em;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--label);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.code-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--tint);
}

.code-form + .footnote {
  margin-top: 10px;
}

.actions {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.actions form,
.actions .button {
  width: 100%;
}

/* In sesh: only the time left. */
.main-timer {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
}

.timer-screen {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 24px 0;
  text-align: center;
}

.timer-caption {
  color: var(--label-2);
  overflow-wrap: break-word;
  overflow-wrap: anywhere;
}

.timer {
  font-size: clamp(4rem, 22vw, 6.5rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.timer-label {
  color: var(--label-2);
}

.timer-reminder {
  margin-top: 24px;
  font-size: 1.25rem;
  font-weight: 600;
}

.timer-screen form {
  margin-top: 24px;
}

/* Sign in and the one-time explainer. */
.signin,
.welcome {
  display: grid;
  gap: 16px;
}

.signin {
  justify-items: center;
  text-align: center;
}

.signin .large-title,
.welcome .large-title {
  margin: 0;
}

.signin .lead {
  max-width: 20rem;
}

.signin > .button,
.signin > form,
.signin > details,
.signin > .form-error,
.signin > .callout,
.signin > .embedded-hint {
  width: 100%;
}

.embedded-hint {
  display: grid;
  gap: 12px;
}

.embedded-hint .callout {
  margin: 0;
}

.signin .footnote {
  margin: 0;
}

.app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.dev-signin > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--label-2);
  font-size: 0.9375rem;
  list-style: none;
  cursor: pointer;
}

.dev-signin > summary::-webkit-details-marker {
  display: none;
}

.signin .stack {
  text-align: left;
}

.dev-signin .stack {
  margin-top: 8px;
}

/* As on iOS welcome screens: a centered title and fine print around left-aligned rows. */
.welcome .large-title,
.welcome .footnote {
  text-align: center;
}

.welcome .footnote {
  margin: 0;
}

/* Banners, toasts, and alerts float above everything on glass. */
.notices {
  position: fixed;
  z-index: 50;
  top: calc(var(--safe-top) + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 8px;
  max-width: var(--column);
  margin: 0 auto;
  padding: 0 var(--gutter-right) 0 var(--gutter-left);
  pointer-events: none;
}

.notice {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 4px 12px 18px;
  border-radius: var(--radius-card);
  pointer-events: auto;
  animation: notice-in 320ms var(--ease) both;
  transition: opacity 220ms var(--ease), transform 220ms var(--ease);
}

.notice.seen {
  animation: none;
}

.notice-out {
  opacity: 0;
  transform: translateY(-12px) scale(0.98);
}

@keyframes notice-in {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.98);
  }
}

.notice-text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
  font-size: 0.9375rem;
}

.notice-text strong {
  font-size: 1rem;
}

.notice-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-weight: 600;
  text-decoration: none;
}

.notice-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--label-2);
  cursor: pointer;
}

.notice-close .icon {
  width: 16px;
  height: 16px;
}

.toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 104px);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  transform: translateX(-50%);
  animation: toast-in 240ms var(--ease) both;
  transition: opacity 240ms var(--ease);
}

.toast-out {
  opacity: 0;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
}

.confirm {
  --glass-fill: var(--glass-thick);
  width: min(calc(100% - 48px), 22rem);
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 34px;
  color: var(--label);
}

.confirm[open] {
  animation: confirm-in 240ms var(--ease) both;
}

.confirm::backdrop {
  background: rgba(0, 0, 0, 0.28);
  animation: fade-in 200ms ease-out both;
}

@keyframes confirm-in {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.confirm-body {
  display: grid;
  gap: 6px;
  padding: 22px 18px 18px;
}

.confirm-title,
.confirm-message {
  padding: 0 6px;
}

.confirm-title {
  font-weight: 700;
}

.confirm-message {
  color: var(--label-2);
  font-size: 0.9375rem;
}

.confirm-message:empty {
  display: none;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.confirm-actions .button {
  min-height: 48px;
  padding-inline: 12px;
}

/* Pages cross-fade like a native app, with the tab bar held in place. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 180ms;
}

@media (hover: hover) {
  .row-link:hover,
  .row-button:hover {
    background: var(--surface-hover);
  }

  .button:hover:not(:disabled),
  .chip:hover {
    filter: brightness(1.04);
  }
}

/* Accessibility: calmer motion, solid surfaces when transparency is unwanted or missing,
   and outlines when contrast is raised. */
@media (prefers-reduced-motion: reduce) {
  .live-dot,
  .notice,
  .toast,
  .confirm[open],
  .confirm::backdrop {
    animation: none;
  }

  .code-meter {
    display: none;
  }

  .button:active,
  .chip:active,
  .activity:active,
  .float-button:active,
  .tabbar-action:active {
    transform: none;
  }

  .segmented::before,
  .edge-title,
  .notice {
    transition: none;
  }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass {
    background: var(--glass-solid);
  }

  .glass-tint {
    background: var(--tint);
  }

  .edge-top,
  [data-scroll] .sheet-bar {
    background: var(--canvas);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .glass,
  .edge-top,
  [data-scroll] .edge-top,
  [data-scroll] .sheet-bar {
    background: var(--glass-solid);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .glass-tint {
    background: var(--tint);
  }
}

@media (prefers-contrast: more) {
  .glass {
    background: var(--glass-solid);
    box-shadow: 0 0 0 1px var(--label);
  }

  .glass-tint {
    background: var(--tint);
  }

  .list,
  .button:not(.button-prominent),
  .chip,
  .pill,
  .search-field,
  .segmented {
    box-shadow: inset 0 0 0 1px var(--separator-strong);
  }
}

@media (forced-colors: active) {
  .glass,
  .button,
  .chip {
    border: 1px solid CanvasText;
  }

  .segment-input:checked + .segment {
    outline: 2px solid Highlight;
  }
}
