/* smirk booking — public scheduling page.
   Centered white card on a very light grey page: left sidebar (event + host
   details), right panel (month calendar + times, then the booking form).
   Flat, minimal, near-black on white. One accent (#F04438), used only for
   selection and confirmation. Albert Sans (same face as the app), no build
   step. This file lives under /_booking/ (the marketing site owns the
   hosting root; the ** rewrite serves /_booking/index.html for every
   /{username}/{link-slug} path). Fonts are SHARED with the marketing site
   at the root /fonts/ — the absolute URLs resolve from any path depth, and
   "_" can never appear in a username, so the directory can't collide with
   a user's URL.

   On desktop the card never changes height: the right panel is one fixed
   height for both steps (calendar + times, then the form), the calendar
   always renders 6 week rows, and anything that doesn't fit — a dense day's
   times, the form's field stack — scrolls internally. See the min-width
   media block near the bottom. */

@font-face {
  font-family: "Albert Sans";
  src: url("/fonts/AlbertSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Albert Sans";
  src: url("/fonts/AlbertSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Albert Sans";
  src: url("/fonts/AlbertSans-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Albert Sans";
  src: url("/fonts/AlbertSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #16181c;
  --muted: #6b7280;
  --faint: #c6c8ce;
  --line: #e7e7ea;
  --hover: #f4f4f5;
  --chip: #f3f4f6;
  --accent: #f04438;
  --error: #b42318;
  --bg: #f7f7f8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: "Albert Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* The hidden attribute drives all state switching — it must beat any
   display value set below. */
[hidden] {
  display: none !important;
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

.state {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---- Card -------------------------------------------------------------- */

.card {
  width: 100%;
  max-width: 880px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 16px 40px -12px rgba(16, 24, 40, 0.1);
  display: grid;
  grid-template-columns: 280px 1fr;
  overflow: hidden;
}

.card-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 72px 40px;
  max-width: 560px;
}

/* ---- Sidebar ------------------------------------------------------------ */

.sidebar {
  padding: 36px 28px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

/* Hidden entirely when the page doc has no hostImageURL or the image fails
   to load — the name simply moves up. */
.host-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin-bottom: 16px;
  background: var(--chip);
}

.host-name {
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
  overflow-wrap: break-word;
}

.host-email {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  overflow-wrap: break-word;
}

.details {
  list-style: none;
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.details li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
  min-width: 0;
}

.details svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.details span {
  overflow-wrap: break-word;
  min-width: 0;
}

/* The timezone row is a button: tapping it opens the timezone picker. The
   40px tap target uses the back-btn trick — negative margins hand the extra
   height back to the layout so the row sits like a plain text row. */
.tz-button {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  min-height: 40px;
  margin: -10px 0;
  min-width: 0;
}

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

.tz-button:hover span {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Beats the generic .details svg sizing. */
.details .tz-chevron {
  width: 12px;
  height: 12px;
  margin-top: 0;
  flex-shrink: 0;
}

/* ---- Owner note ---------------------------------------------------------- */

.owner-note {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: break-word;
}

/* ---- Right panel --------------------------------------------------------- */

.panel {
  padding: 36px 32px;
  min-width: 0;
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

/* ---- Notice (slot just taken, etc.) -------------------------------------- */

.notice {
  margin-bottom: 20px;
  padding: 10px 14px;
  border: 1px solid #f5d0cc;
  border-radius: 8px;
  background: #fef4f3;
  color: var(--error);
  font-size: 0.9rem;
}

/* ---- Calendar + times ------------------------------------------------------ */

.picker-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 216px;
  gap: 36px;
  margin-top: 24px;
  align-items: start;
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cal-caption {
  font-size: 0.95rem;
  font-weight: 600;
}

.cal-nav {
  display: flex;
  gap: 4px;
}

.cal-nav-btn {
  appearance: none;
  border: none;
  background: transparent;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
}

.cal-nav-btn svg {
  width: 16px;
  height: 16px;
}

.cal-nav-btn:hover:not(:disabled) {
  background: var(--hover);
  color: var(--ink);
}

.cal-nav-btn:disabled {
  color: var(--faint);
  cursor: default;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}

.cal-weekdays span {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 0;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  /* Explicit row height so the trailing pad rows (booking.js always renders
     6 week rows) hold their height even when empty. */
  grid-auto-rows: 38px;
  row-gap: 4px;
}

.cal-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-day {
  appearance: none;
  border: none;
  background: transparent;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font: inherit;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.cal-day.open {
  background: var(--chip);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}

.cal-day.open:hover {
  background: #e9eaec;
}

.cal-day.today {
  box-shadow: inset 0 0 0 1px var(--faint);
}

.cal-day.selected,
.cal-day.selected:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}

/* ---- Times column ----------------------------------------------------------- */

.times {
  min-width: 0;
  position: relative;
}

/* More-below fade at the scroll boundary. booking.js toggles .has-more while
   the slot list renders and scrolls; the fade sits over the list's last few
   pixels and disappears once the booker reaches the end. */
.times::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 32px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.times.has-more::after {
  opacity: 1;
}

.times-head {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
  padding-top: 2px;
}

.slot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 322px;
  overflow-y: auto;
  padding-right: 2px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--faint) transparent;
}

/* Older WebKit fallback for the thin scrollbars (engines that support the
   standard scrollbar-* properties ignore these). */
.slot-list::-webkit-scrollbar,
.form-fields::-webkit-scrollbar {
  width: 6px;
}

.slot-list::-webkit-scrollbar-thumb,
.form-fields::-webkit-scrollbar-thumb {
  background: var(--faint);
  border-radius: 3px;
}

.slot-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 10px 8px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  flex-shrink: 0;
  transition: border-color 0.12s ease, color 0.12s ease;
}

.slot-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.slot-btn:active {
  background: #fef4f3;
}

.no-slots {
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---- Booking form ------------------------------------------------------------ */

.back-btn {
  appearance: none;
  border: none;
  background: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  /* 40px tap target; the negative margins give the extra height back to the
     layout so the text sits exactly where a plain text row would. */
  min-height: 40px;
  margin: -10px 0;
}

.back-btn svg {
  width: 14px;
  height: 14px;
}

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

.picked-time {
  margin-top: 14px;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

#booking-form {
  margin-top: 24px;
}

/* The form splits into a field stack (.form-fields) and a confirm footer
   (.form-foot). On desktop the stack scrolls inside the fixed-height panel
   and the footer stays pinned; .scrollable (toggled in booking.js) draws a
   hairline between them whenever the stack overflows. */
.form-fields {
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--faint) transparent;
}

.form-foot {
  border-top: 1px solid transparent;
}

#form-panel.scrollable .form-foot {
  border-top-color: var(--line);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field > span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.field em {
  font-style: normal;
}

.field input,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
}

/* Guests chips */

.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: text;
}

.chips:focus-within {
  border-color: var(--ink);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--chip);
  border-radius: 6px;
  padding: 3px 4px 3px 10px;
  font-size: 0.85rem;
  max-width: 100%;
}

.chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-x {
  appearance: none;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
  cursor: pointer;
}

.chip-x:hover {
  color: var(--ink);
  background: #e9eaec;
}

.chips input {
  flex: 1;
  min-width: 150px;
  border: none;
  outline: none;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  padding: 6px 4px;
  background: transparent;
}

.chips input::placeholder {
  color: var(--faint);
}

.helper {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.guest-error,
.form-error {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 6px;
}

.form-error {
  margin-bottom: 14px;
}

.confirm {
  appearance: none;
  border: none;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
}

.confirm:hover {
  filter: brightness(0.95);
}

.confirm:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ---- Confirmation / empty / loading ------------------------------------------- */

.check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.confirm-title {
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.confirm-detail {
  margin-top: 10px;
  font-size: 1.05rem;
}

.confirm-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
  overflow-wrap: break-word;
  max-width: 100%;
}

.empty-title {
  font-size: 1.4rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.empty-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line);
  border-top-color: var(--muted);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- Timezone picker modal -------------------------------------------------------- */

.tz-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.tz-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.4);
}

.tz-sheet {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: min(520px, calc(100dvh - 40px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 16px 40px -12px rgba(16, 24, 40, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tz-search {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 16px 20px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.tz-search::placeholder {
  color: var(--faint);
}

.tz-list {
  overflow-y: auto;
  padding: 8px;
  overscroll-behavior: contain;
}

.tz-row {
  appearance: none;
  border: none;
  background: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  min-height: 44px;
  border-radius: 8px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tz-row:hover {
  background: var(--hover);
}

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

.tz-row-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}

.tz-row-id {
  font-size: 0.75rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tz-check {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
}

.tz-empty {
  padding: 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---- Footer --------------------------------------------------------------------- */

.foot {
  margin-top: 28px;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: #b9bcc1;
}

/* ---- Desktop: one fixed card height ------------------------------------------------ */
/* 720.02px is the standard complement of the max-width: 720px block below —
   fractional viewport widths can't land between the two. */

@media (min-width: 720.02px) {
  :root {
    /* The single content height for the right panel: 520px of content plus
       the panel's 2 × 36px vertical padding. Step 1 (calendar + times) and
       step 2 (form) both render inside this same box, so switching days,
       months, or steps never moves the page. The sidebar matches via the
       card's grid row. */
    --panel-h: 592px;
  }

  .panel {
    height: var(--panel-h);
    display: flex;
    flex-direction: column;
  }

  #picker,
  #form-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  /* The picker body fills whatever the (fixed) panel leaves; its single grid
     row is pinned to that height so a dense day can't stretch it. */
  .picker-body {
    flex: 1;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
  }

  .times {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  /* The list fills the column and scrolls internally: 30 slots scroll, 2
     slots leave whitespace — the card never grows or shrinks. */
  .slot-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
  }

  /* Step 2: the field stack scrolls; the confirm button (with any form error
     above it) stays pinned at the panel's bottom edge. */
  #booking-form {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .form-fields {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 4px;
  }

  .form-foot {
    flex-shrink: 0;
    padding-top: 14px;
  }

  /* The confirmed card keeps the booking card's exact height (panel plus the
     card's own top/bottom border). */
  #state-confirmed .card-message {
    min-height: calc(var(--panel-h) + 2px);
    justify-content: center;
  }
}

/* ---- Small screens ---------------------------------------------------------------- */
/* No card on phones — the page itself is the surface: one white sheet to the
   screen edges. The grey page tint and the card treatment are desktop-only.
   viewport-fit=cover lets the sheet run under the notch/Dynamic Island and
   home indicator; the safe-area insets pad the content back inside. */

@media (max-width: 720px) {
  body {
    background: #fff;
  }

  .page {
    padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
    justify-content: flex-start;
  }

  .card {
    grid-template-columns: 1fr;
    max-width: none;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .card-message {
    padding: 56px 24px;
  }

  .sidebar {
    padding: 28px 24px 24px;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .panel {
    padding: 28px 24px 36px;
  }

  .picker-body {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .cal-grid {
    row-gap: 2px;
    grid-auto-rows: 40px;
  }

  /* Touch targets: at least 40px on phones. */
  .cal-day {
    width: 40px;
    height: 40px;
  }

  /* The chip stays visually compact — the remove button's real box grows to
     40x40 and the negative margins hand the extra size back to the layout,
     so only the tappable area changes. */
  .chip-x {
    flex: none;
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: -10px -14px -10px -8px;
  }

  /* The card is NOT height-fixed on phones — the page flows naturally — but
     a dense day shouldn't produce an endless page: the times list keeps a
     viewport cap and scrolls internally. */
  .slot-list {
    max-height: 50vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* iOS zooms a focused input whose font-size is under 16px, which would
     defeat the page's no-zoom viewport — keep every text field at 16px+. */
  .field input,
  .field textarea,
  .chips input,
  .tz-search {
    font-size: 1rem;
  }

  /* The footer keeps clear of the home indicator. */
  .foot {
    margin: 24px 0 calc(32px + env(safe-area-inset-bottom));
  }
}

/* ---- Dark appearance ---------------------------------------------------------------- */
/* Per-page theme: booking.js sets <html data-theme="dark"> (before the booking
   state first paints) when the page doc's `appearance` is "dark". The palette
   mirrors the app's dark tokens: page #0D0D0F, cards/surfaces #121214, white
   primary text, #A0A0A1 secondary, #222224 hairlines. The accent (#F04438),
   white-on-accent selection, and the confirm button are identical in both
   themes. Everything below only overrides the light literals; anything set
   via the :root variables follows automatically. */

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #ffffff;
  --muted: #a0a0a1;
  --faint: #48484d;
  --line: #222224;
  --hover: #1c1c1f;
  --chip: #202024;
  --accent: #f04438;
  --error: #f97066;
  --bg: #0d0d0f;
}

[data-theme="dark"] .card {
  background: #121214;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -12px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .notice {
  border-color: #4a201c;
  background: #221113;
}

[data-theme="dark"] .cal-day.open:hover {
  background: #2a2a2e;
}

/* Re-assert the selected day AFTER the dark hover rule — its specificity
   would otherwise beat .cal-day.selected:hover and grey out a hovered
   selected day. Accent circle, white numeral, both themes identical. */
[data-theme="dark"] .cal-day.selected,
[data-theme="dark"] .cal-day.selected:hover {
  background: var(--accent);
  color: #fff;
}

/* The more-below scroll fade dissolves into the panel surface. */
[data-theme="dark"] .times::after {
  background: linear-gradient(to bottom, rgba(18, 18, 20, 0), #121214);
}

[data-theme="dark"] .slot-btn {
  background: #121214;
}

[data-theme="dark"] .slot-btn:active {
  background: rgba(240, 68, 56, 0.12);
}

/* Inputs sit slightly proud of the surface, with borders brighter than the
   hairline token so the field edges stay visible on dark. */
[data-theme="dark"] .field input,
[data-theme="dark"] .field textarea,
[data-theme="dark"] .chips {
  background: #1a1a1c;
  border-color: #37373c;
}

[data-theme="dark"] .field input:focus,
[data-theme="dark"] .field textarea:focus,
[data-theme="dark"] .chips:focus-within {
  border-color: var(--ink);
}

[data-theme="dark"] .chip-x:hover {
  background: #2a2a2e;
}

[data-theme="dark"] .tz-backdrop {
  background: rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .tz-sheet {
  background: #121214;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -12px rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .tz-search {
  background: #121214;
}

[data-theme="dark"] .foot {
  color: #5c5c60;
}

/* Flat mobile mode: the page itself is the sheet — one dark surface edge to
   edge. The card goes transparent again (the dark .card override above would
   otherwise beat the light block's transparent card and draw a #121214 seam
   against the page), and the times fade dissolves into the page background
   instead of the card's. */
@media (max-width: 720px) {
  [data-theme="dark"] body {
    background: #0d0d0f;
  }

  [data-theme="dark"] .card {
    background: transparent;
    box-shadow: none;
  }

  [data-theme="dark"] .times::after {
    background: linear-gradient(to bottom, rgba(13, 13, 15, 0), #0d0d0f);
  }
}
