:root {
  --ink: #0b4f6c;
  --ink-deep: #083d54;
  --ink-body: #1f5a72;
  --ink-soft: #3a748c;
  --sand: #f4f0e7;
  --foam: #fffdf8;
  --coral: #a34b1c;
  --line: rgba(11, 79, 108, 0.14);
  --shadow:
    0 0 0 1px rgba(11, 79, 108, 0.05),
    0 0.35rem 0.7rem rgba(11, 79, 108, 0.05),
    0 1.1rem 2.4rem rgba(11, 79, 108, 0.07);
  --radius: 18px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --space-gutter: clamp(1.5rem, 4vw, 2rem);
  --space-panel: 2.25rem;
  --space-card: 1.5rem;
  --duration-fast: 100ms;
  --duration-dialog: 180ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-overshoot: cubic-bezier(0.25, 1.25, 0.5, 1);
  --focus-ring: 2px solid rgba(11, 79, 108, 0.35);
}

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

/* Author display rules (e.g. .time-chip { display: grid }) must not override hidden. */
[hidden] {
  display: none !important;
}


html {
  scroll-behavior: smooth;
  overflow-x: clip;
  interpolate-size: allow-keywords;
}

html:has(dialog:modal) {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink-body);
  background: var(--sand);
  line-height: 1.6;
  position: relative;
  overflow-x: clip;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

p {
  text-align: left;
  text-wrap: pretty;
}


.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--sand);
}

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem var(--space-gutter);
  max-width: 960px;
  margin: 0 auto;
}

.brand-mark {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.topbar-nav {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: auto;
  gap: 0.5rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.topbar-links {
  display: none;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-menu {
  position: relative;
  display: flex;
  flex: 0 0 2.75rem;
  width: 2.75rem;
  height: 2.75rem;
}

.topbar-menu-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--foam);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.topbar-menu-button::-webkit-details-marker,
.topbar-menu-button::marker {
  display: none;
  content: "";
}

.topbar-menu[open] .topbar-menu-button {
  border-color: var(--ink);
  background: rgba(11, 79, 108, 0.08);
}

.topbar-menu-dots,
.topbar-menu-dots::before,
.topbar-menu-dots::after {
  display: block;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 999px;
  background: currentColor;
}

.topbar-menu-dots {
  position: relative;
}

.topbar-menu-dots::before,
.topbar-menu-dots::after {
  content: "";
  position: absolute;
  left: 0;
}

.topbar-menu-dots::before {
  top: -0.42rem;
}

.topbar-menu-dots::after {
  top: 0.42rem;
}

.topbar-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 12.5rem;
  display: grid;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--foam);
  box-shadow: var(--shadow);
  z-index: 30;
}

.topbar-menu-item {
  appearance: none;
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
  color: var(--ink-deep);
  text-decoration: none;
  cursor: pointer;
}

.topbar-menu-item:hover,
.topbar-menu-item.is-active {
  background: rgba(11, 79, 108, 0.08);
  color: var(--ink);
}

.topbar-menu-panel form {
  display: contents;
}

.topbar .topbar-cta {
  display: none;
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
}

@media (min-width: 820px) {
  .topbar-links {
    display: flex;
  }

  .topbar-menu {
    display: none;
  }

  .topbar .topbar-cta {
    display: inline-flex;
  }
}

.nav-link,
.nav-button {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0.35rem 0.15rem;
  text-decoration: none;
}

.nav-link:hover,
.nav-button:hover,
.nav-link.is-active {
  color: var(--ink);
}

.main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.75rem var(--space-gutter) 5rem;
  min-width: 0;
  overflow-x: clip;
  overflow-y: visible;
}

body:has(.schedule-studio) .main,
body:has(.schedule-studio) .topbar,
body:has(.schedule-studio) .site-footer,
body:has(.create-sheet) .main,
body:has(.create-sheet) .topbar,
body:has(.create-sheet) .site-footer {
  max-width: 1200px;
}


body:has(.landing),
body:has(.marketing) {
  --landing-gutter: clamp(1.75rem, 5vw, 3rem);
  --landing-section: clamp(5.5rem, 12vw, 9rem);
  --landing-stack: clamp(4rem, 9vw, 7rem);
  --landing-pair: clamp(2.25rem, 5vw, 4.5rem);
}

body:has(.landing) .main,
body:has(.marketing) .main {
  max-width: 1240px;
  padding: 0 var(--landing-gutter) 0;
}

body:has(.landing) .topbar,
body:has(.marketing) .topbar,
body:has(.landing) .site-footer,
body:has(.marketing) .site-footer {
  max-width: 1240px;
  padding-inline: var(--landing-gutter);
}

body:has(.landing) .topbar,
body:has(.marketing) .topbar {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.hero {
  display: grid;
  grid-template-areas:
    "copy"
    "visual";
  align-content: start;
  gap: var(--landing-pair);
  padding: clamp(2rem, 5vh, 3.25rem) 0 var(--landing-section);
  animation: rise 0.7s ease both;
}

.hero-copy {
  grid-area: copy;
}

.hero-visual {
  grid-area: visual;
  animation: float-in 0.9s 0.1s ease both;
  min-width: 0;
}

@media (max-width: 819px) {
  .hero {
    gap: 2.5rem;
    padding: 1.5rem 0 4.5rem;
  }
}

@media (min-width: 820px) {
  .hero {
    grid-template-areas: "copy visual";
    grid-template-columns: minmax(20rem, 1fr) minmax(22rem, 1.05fr);
    align-content: start;
    align-items: start;
    gap: clamp(2.5rem, 5vw, 4.5rem);
    padding: 3.25rem 0 clamp(5.5rem, 10vh, 8rem);
  }

  .hero-copy {
    padding-top: 0.35rem;
  }
}

.hero-kicker,
.home-showcase-kicker,
.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-line {
  font-family: var(--font-display);
  font-size: clamp(2.45rem, 5.2vw, 4.25rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin: 0 0 1.35rem;
  color: var(--ink-deep);
  max-width: 14ch;
}

.hero-sub {
  margin: 0 0 1.75rem;
  max-width: 32rem;
  color: var(--ink-body);
  font-size: 1.12rem;
  line-height: 1.65;
}

.hero-punch {
  margin: 0 0 1.5rem;
  max-width: 26rem;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.45;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.35rem;
}

.hero-cta-link {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 0.2em;
}

.hero-cta-link:hover {
  text-decoration: underline;
}

.hero-proof {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.hero-brand {
  margin: 1.1rem 0 0;
  max-width: 26rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.4;
}

@media (max-width: 819px) {
  .hero-line {
    font-size: clamp(2.2rem, 9.4vw, 3.1rem);
    line-height: 1.12;
    max-width: none;
    margin-bottom: 1.2rem;
  }

  .hero-sub {
    margin-bottom: 1.35rem;
    font-size: 1.08rem;
    line-height: 1.65;
  }

  .hero-punch {
    margin-bottom: 1.6rem;
    font-size: 1.1rem;
    line-height: 1.5;
  }
}

.hero-demo {
  display: grid;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line);
  background:
    linear-gradient(165deg, rgba(255, 253, 248, 0.96), rgba(243, 239, 230, 0.88));
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.hero-demo[data-phase="reset"] {
  opacity: 0;
  transform: translateY(6px) scale(0.985);
}

.hero-demo-chat,
.hero-demo-schedule {
  grid-area: 1 / 1;
  padding: 1.55rem 1.6rem 1.7rem;
  display: grid;
  gap: 1.1rem;
  min-width: 0;
  min-height: 100%;
}

.hero-demo-chat {
  grid-template-rows: auto auto auto 1fr;
  align-content: start;
}

.hero-demo-schedule {
  align-content: start;
}

/* Keep both panes in layout so chat↔schedule never changes page height. */
.hero-demo-chat:not(.is-active),
.hero-demo-schedule:not(.is-active) {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-demo-chat.is-active,
.hero-demo-schedule.is-active {
  visibility: visible;
  opacity: 1;
  z-index: 1;
}


.hero-demo-chat-head,
.hero-demo-schedule-head {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink-deep);
  letter-spacing: -0.02em;
}

.hero-demo-thread {
  display: grid;
  gap: 0.65rem;
  align-content: start;
  align-self: stretch;
}

.hero-demo-follow-slot {
  display: grid;
  justify-items: start;
}

.hero-demo-follow-slot > * {
  grid-area: 1 / 1;
}

.hero-demo-bubble {
  justify-self: end;
  max-width: 92%;
  padding: 0.7rem 0.9rem;
  border-radius: 16px 16px 4px 16px;
  background: var(--ink);
  color: #fff;
  font-size: 0.98rem;
  line-height: 1.35;
}

.hero-demo-bubble:not(.is-pending) {
  animation: hero-bubble-in 0.35s ease both;
}

.hero-demo-bubble.is-assistant {
  justify-self: start;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  color: var(--ink-deep);
  border-radius: 16px 16px 16px 4px;
}

.hero-demo-status {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.hero-demo-status:not(.is-pending) {
  animation: rise 0.35s ease both;
}

.hero-demo .is-pending {
  visibility: hidden;
  opacity: 0;
}

.hero-demo-status-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--coral);
  animation: pulse-soft 1.1s ease-in-out infinite;
}

.hero-demo-schedule .hero-demo-composer {
  margin-top: auto;
}

.hero-demo-composer {
  position: relative;
  min-width: 0;
  min-height: 3.1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.9);
  color: var(--ink-deep);
  font-size: 1rem;
  line-height: 1.35;
  overflow-wrap: break-word;
  transition: background 0.28s ease, color 0.28s ease, border-color 0.28s ease, border-radius 0.28s ease, max-width 0.28s ease;
}

.hero-demo-sizer {
  display: block;
  visibility: hidden;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.hero-demo-live {
  position: absolute;
  inset: 0;
  padding: inherit;
}

.hero-demo-composer.is-sent {
  justify-self: end;
  width: fit-content;
  max-width: 92%;
  background: var(--ink);
  color: #fff;
  border-color: transparent;
  border-radius: 16px 16px 4px 16px;
}

.hero-demo-typed {
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.hero-demo-caret {
  display: inline-block;
  width: 0.12rem;
  height: 1.1em;
  margin-left: 1px;
  background: var(--coral);
  vertical-align: text-bottom;
  animation: hero-caret 0.9s steps(1) infinite;
}

.hero-demo-canvas {
  display: grid;
  gap: 0.55rem;
  min-height: 0;
  align-content: start;
}

.hero-demo-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.3rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.hero-demo-weekdays.is-visible {
  opacity: 1;
  transform: none;
}

.hero-demo-weekdays span {
  text-align: center;
  padding: 0.45rem 0.1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.72);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.hero-demo-weekdays .is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.hero-demo-rule {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.hero-demo-rule.is-visible {
  opacity: 1;
  transform: none;
}

.hero-demo-day-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
}

.hero-demo-day-rail span {
  text-align: center;
  padding: 0.55rem 0.25rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.72);
  font-size: 0.82rem;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.hero-demo-day-rail span.is-visible {
  opacity: 1;
  transform: none;
}

.hero-demo-day-rail .is-on.is-visible {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.hero-demo-times {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.hero-demo-times span {
  padding: 0.85rem 0.55rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.72);
  font-family: var(--font-display);
  font-size: 1.05rem;
  text-align: center;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.25s ease;
}

.hero-demo-times span.is-visible {
  opacity: 1;
  transform: none;
}

.hero-demo-times .is-extra {
  opacity: 0;
}

.hero-demo-times .is-extra.is-visible {
  opacity: 1;
  background: rgba(196, 92, 38, 0.12);
  border-color: rgba(196, 92, 38, 0.45);
}

@media (max-width: 819px) {
  .hero-demo-times span:nth-child(n+7):not(.is-extra) {
    display: none;
  }
}

@keyframes hero-caret {
  0%,
  45% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

@keyframes hero-bubble-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    interpolate-size: none;
  }

  .hero-demo,
  .hero-demo-bubble,
  .hero-demo-status,
  .hero-demo-caret,
  .hero-demo-rule,
  .hero-demo-weekdays,
  .hero-demo-day-rail span,
  .hero-demo-times span,
  .panel,
  .flash,
  .time-chip {
    animation: none !important;
  }

  .hero-demo,
  .hero-demo-bubble,
  .hero-demo-status,
  .hero-demo-caret,
  .hero-demo-rule,
  .hero-demo-weekdays,
  .hero-demo-day-rail span,
  .hero-demo-times span,
  .booking-drawer,
  .auth-modal,
  .booking-drawer::backdrop,
  .auth-modal::backdrop,
  .sheet-advanced::details-content,
  .schedule-builder-manual::details-content {
    transition: none !important;
  }

  .rule-pop-panel {
    animation: none;
  }

  .hero-demo-caret {
    opacity: 0;
  }

  .booking-drawer,
  .auth-modal,
  .booking-drawer[open],
  .auth-modal[open] {
    transform: none;
    opacity: 1;
  }

  /* Without the fade, keep notices in the page flow so they never linger on top. */
  #flash .flash-notice {
    position: static;
    transform: none;
    width: fit-content;
    margin: 0 auto 1rem;
    background: rgba(11, 79, 108, 0.1);
    color: var(--ink);
    box-shadow: none;
    pointer-events: auto;
  }

  .blank-slate {
    rotate: none;
  }
}

.panel {
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-panel);
  box-shadow: var(--shadow);
  margin-bottom: 1.75rem;
  animation: rise 0.32s var(--ease-out) both;
  max-width: 100%;
  min-width: 0;
}

.panel.narrow {
  max-width: 520px;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  align-items: flex-start;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--coral);
  margin: 0 0 0.65rem;
}

.page-title,
.auth-title,
.section-title,
.subsection-title {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--ink-deep);
}

.page-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  overflow-wrap: anywhere;
}

.section-title {
  font-size: 1.45rem;
}

.subsection-title {
  font-size: 1.15rem;
  margin-top: 0.5rem;
}

.lede {
  margin: 0 0 1.75rem;
  color: var(--ink-body);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.muted {
  color: var(--ink-soft);
}

.stack {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
  max-width: 100%;
}

.stack.compact {
  gap: 0.75rem;
}

.field {
  display: grid;
  gap: 0.35rem;
  font-weight: 500;
}

.field em {
  font-style: normal;
  font-weight: 400;
  color: var(--ink-soft);
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="time"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  font: inherit;
  font-size: max(16px, 1em);
  color: var(--ink-deep);
  background: var(--foam);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.timezone-select {
  width: 100%;
  max-width: 100%;
}


:is(a, button, input, textarea, select, summary, .btn) {
  touch-action: manipulation;
}

input:focus,
textarea:focus,
button:focus-visible,
.btn:focus-visible,
.studio-tab:focus-visible,
.day-rail-item:focus-visible,
.time-chip:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0.7rem 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out),
    filter var(--duration-fast) var(--ease-out);
}

@media (any-hover: hover) {
  .btn:hover {
    transform: scale(1.02);
  }

  .btn-secondary:hover,
  .btn-ghost:hover {
    filter: brightness(0.96);
  }
}

.btn:active {
  transform: scale(0.98);
  filter: none;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
}

.btn-primary:hover {
  background: var(--ink-deep);
}

.btn-secondary {
  background: rgba(11, 79, 108, 0.08);
  color: var(--ink);
}

.btn-ghost,
.btn-danger-ghost {
  background: transparent;
  color: var(--ink-soft);
}

.btn-danger-ghost {
  color: var(--coral);
}

.btn-lg {
  padding: 0.9rem 1.4rem;
  font-size: 1.05rem;
}

.btn.is-busy {
  cursor: wait;
  opacity: 0.88;
  transform: none;
}

.btn-spinner {
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: btn-spin 0.7s linear infinite;
  flex-shrink: 0;
}

.btn-spinner[hidden] {
  display: none !important;
}

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

.btn-sm {
  padding: 0.45rem 0.8rem;
  font-size: 0.92rem;
}

.btn-block {
  width: 100%;
}

.text-button {
  appearance: none;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.copied {
  color: var(--coral);
  font-weight: 600;
  font-size: 0.9rem;
  animation: rise 0.25s ease both;
}

.slots {
  display: grid;
  gap: 1.1rem;
  margin-top: 2rem;
}

.slot {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.4rem 1.45rem;
  background: var(--foam);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.slot-open:hover {
  border-color: rgba(11, 79, 108, 0.28);
  transform: translateY(-1px);
}

.slot-locked {
  background: rgba(196, 92, 38, 0.06);
  border-color: rgba(196, 92, 38, 0.22);
}

.slot-full {
  opacity: 0.72;
}

.slot-locking {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(11, 79, 108, 0.08);
}

.slot-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.slot-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0;
  color: var(--ink-deep);
}

.slot-meta {
  margin: 0.15rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.slot-pill {
  display: inline-flex;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(11, 79, 108, 0.08);
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 600;
}

.claim-list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.claim-list li,
.claim-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(11, 79, 108, 0.07);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.9rem;
}

.claim-item.is-mine {
  background: rgba(11, 79, 108, 0.14);
  box-shadow: inset 0 0 0 1px rgba(11, 79, 108, 0.18);
}

.claim-cancel {
  font-size: 0.85rem;
}


.slot-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  animation: rise 0.25s ease both;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.slot-admin-list,
.sheet-list,
.account-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.slot-admin,
.sheet-list-item,
.account-list-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.slot-admin-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  flex: 1;
}

.slot-admin-name {
  flex: 1 1 12rem;
}

.slot-admin-capacity {
  width: 4.5rem;
}

.capacity-field {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.slot-admin-meta {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.add-slot-row {
  display: grid;
  grid-template-columns: 1fr 4.5rem auto;
  gap: 0.5rem;
  align-items: stretch;
}

.add-slot-row.avail-add-row {
  grid-template-columns: 1fr auto;
}

.add-slot-row input[type="text"] {
  min-height: 2.85rem;
}

.add-slot-row .btn {
  min-height: 2.85rem;
}

.list-public-options {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0 0 1.25rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.check-field {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  flex: 1 1 16rem;
  cursor: pointer;
}

.check-field input {
  margin-top: 0.3rem;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--ink);
}

.check-field span {
  display: grid;
  gap: 0.15rem;
}

.check-field strong {
  color: var(--ink);
  font-weight: 600;
}

.check-field em {
  font-style: normal;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.signup-fields {
  display: grid;
  gap: 0.75rem;
  padding-top: 0.35rem;
}

.signup-field-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.signup-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.signup-field-add {
  display: grid;
  gap: 0.55rem;
}

.sheet-attachment-editor {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
}

.sheet-file-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 0.9rem;
  min-width: 0;
  cursor: pointer;
}

.sheet-file-picker .btn {
  pointer-events: none;
}

.sheet-file-picker-names {
  flex: 1 1 10rem;
  min-width: 0;
  color: var(--ink-soft);
  font-weight: 400;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.sheet-file-picker:focus-within .btn {
  outline: 2px solid rgba(11, 79, 108, 0.35);
  outline-offset: 2px;
}

.sheet-attachment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.sheet-attachment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.sheet-attachment-row > span {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.sheet-attachment-row .btn {
  flex-shrink: 0;
}

.sheet-attachments {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
  margin: 0 0 1.5rem;
}

.sheet-attachment-image {
  margin: 0;
}

.sheet-attachment-image img {
  display: block;
  width: 100%;
  max-width: 32rem;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.sheet-attachment-file {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-all;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  color: var(--ink);
}

.sheet-attachment-name,
.sheet-attachment-meta {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.sheet-attachment-name {
  font-weight: 600;
}

.sheet-attachment-meta {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.page-preview-copy .sheet-attachments {
  margin: 0.35rem 0 0;
}

.sheet-attachment-setup {
  min-width: 0;
  padding: 0.95rem 1.05rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.page-preview-section .sheet-attachment-setup {
  margin-top: 0.45rem;
}

.page-preview-copy .sheet-attachment-image img {
  max-width: 22rem;
}

.slot-admin-claims {
  flex: 1 1 100%;
  list-style: none;
  margin: 0.15rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
  font-size: 0.9rem;
  color: var(--ink-body);
}

.custom-item-panel {
  margin-top: 2.25rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.custom-item-panel .subsection-title {
  margin: 0 0 0.25rem;
}

.custom-item-panel .muted {
  margin: 0 0 0.85rem;
}

.custom-item-form {
  max-width: 28rem;
}

@media (max-width: 560px) {
  .add-slot-row {
    grid-template-columns: 1fr 5rem;
  }

  .add-slot-row.avail-add-row {
    grid-template-columns: 1fr;
  }

  .add-slot-row input[type="text"] {
    grid-column: 1 / -1;
    min-height: 3.1rem;
    font-size: 1.05rem;
  }

  .add-slot-row .btn {
    min-height: 3.1rem;
  }
}

.sheet-list-item h2,
.account-list-item h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.2rem;
}

.sheet-list-item h2 a {
  color: inherit;
  text-decoration: none;
}

.save-account {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.sheet-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.sheet-list-actions form {
  margin: 0;
}

.sheet-delete {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.sheet-advanced {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.sheet-advanced > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-soft);
  list-style: none;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
}

.sheet-advanced > summary::-webkit-details-marker {
  display: none;
}

.sheet-advanced > summary::after {
  content: "Show";
  margin-left: auto;
  font-size: 0.88rem;
}

.sheet-advanced[open] > summary::after {
  content: "Hide";
}

.sheet-advanced-body {
  display: grid;
  gap: 0.85rem;
  padding: 0.35rem 0 0.15rem;
}

.sheet-csv-import {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}

.flash {
  width: fit-content;
  max-width: min(40rem, calc(100% - 2 * var(--space-gutter)));
  margin: 0 auto 1rem;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-weight: 500;
  animation: rise 0.32s var(--ease-out) both;
}

.flash-notice {
  background: rgba(11, 79, 108, 0.1);
  color: var(--ink);
}

/* Page-level confirmations float in, then get out of the way. Errors stay put. */
#flash .flash-notice {
  /* Rises from the bottom: clear of the topbar nav and the sticky day rail
     at every width, and at thumb height on phones. */
  position: fixed;
  bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px));
  /* left/right + auto margins center a fit-content box without `left: 50%`,
     which would halve the width available to shrink-to-fit and wrap badly on phones. */
  left: 0.85rem;
  right: 0.85rem;
  z-index: 60;
  width: fit-content;
  max-width: 36rem;
  margin: 0 auto;
  padding: 0.8rem 1.2rem;
  border-radius: 16px;
  text-align: center;
  line-height: 1.35;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  pointer-events: none;
  animation: toast-in-out 3.6s var(--ease-out) both;
}

@keyframes toast-in-out {
  0% { opacity: 0; transform: translateY(0.6rem); }
  8%, 78% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(0.4rem); visibility: hidden; }
}

.flash-alert {
  background: rgba(196, 92, 38, 0.12);
  color: #8a3a12;
}

.auth-modal {
  border: 0;
  border-radius: 20px;
  padding: 0;
  width: min(420px, calc(100% - 2rem));
  max-width: calc(100% - 2rem);
  box-shadow: var(--shadow);
  background: var(--foam);
}

.auth-modal-close-row {
  display: flex;
  justify-content: flex-end;
  margin: 0;
  padding: 0.5rem 0.5rem 0;
}

.icon-button {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
  padding: 0.35rem 0.6rem;
}

.auth-modal-body {
  padding: 0 2rem 2rem;
}

.auth-actions {
  display: grid;
  gap: 0.6rem;
  margin: 1.25rem 0;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin: 1rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.auth-status {
  margin-top: 1rem;
  color: var(--ink);
  font-weight: 500;
}

.account-switcher {
  position: relative;
}

.account-switcher summary {
  cursor: pointer;
  list-style: none;
  color: var(--ink-soft);
  font-weight: 500;
}

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

.account-switcher-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 12rem;
  background: var(--foam);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.35rem;
  box-shadow: var(--shadow);
  z-index: 20;
  display: grid;
}

.account-switcher-item {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  color: var(--ink-deep);
  text-decoration: none;
  cursor: pointer;
}

.account-switcher-item:hover,
.account-switcher-item.is-current {
  background: rgba(11, 79, 108, 0.08);
}

.invite-line {
  margin: 0.35rem 0;
  font-size: 0.92rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kind-picker {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.kind-card {
  position: relative;
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--foam);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.kind-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.kind-card.is-selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(11, 79, 108, 0.1);
  transform: translateY(-1px);
}

.kind-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
}

.kind-card-copy {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.builder-block {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
  max-width: 100%;
}

.builder-label {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}

.builder-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.calendar-presets {
  display: flex;
  gap: 0.45rem;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.1rem 0 0.35rem;
  scrollbar-width: none;
}

.calendar-presets::-webkit-scrollbar {
  display: none;
}

.calendar-preset {
  flex: 0 0 auto;
  min-height: 2.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--foam);
  color: var(--ink-deep);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.calendar-preset:active {
  background: rgba(11, 79, 108, 0.08);
}

/* Calendar: a compact month picker, not a wall of squares. Sized like a
   date picker (~21rem) and paired with the hour controls beside it. */
.manual-builder-grid {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

@media (min-width: 700px) {
  .manual-builder-grid {
    grid-template-columns: minmax(0, 18.5rem) minmax(11rem, 1fr);
    gap: 1.5rem;
    align-items: start;
  }

  .manual-builder-grid .calendar-presets {
    flex-wrap: wrap;
    overflow: visible;
  }
}

.manual-builder-fill {
  justify-self: start;
}

.calendar-widget {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem 0.8rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.72);
  width: 100%;
  max-width: 18.5rem;
  min-width: 0;
  overflow: hidden;
}

.calendar-nav {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 2rem;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.calendar-nav-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.calendar-nav-btn:hover:not(:disabled) {
  border-color: var(--line);
  background: var(--foam);
}

.calendar-nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.calendar-month-label {
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  min-width: 0;
  overflow-wrap: anywhere;
}

.calendar-months,
.calendar-month {
  display: block;
  min-width: 0;
  max-width: 100%;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.15rem;
  width: 100%;
  min-width: 0;
}

.calendar-weekdays span {
  text-align: center;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding-bottom: 0.05rem;
}

.calendar-cell {
  aspect-ratio: 1;
  width: 100%;
  max-height: 2.5rem;
  min-width: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 0.86rem;
}

.calendar-cell.is-empty {
  visibility: hidden;
}

.calendar-cell.is-muted {
  color: rgba(11, 79, 108, 0.28);
}

.calendar-day {
  position: relative;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-deep);
  -webkit-tap-highlight-color: transparent;
  transition:
    background var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.calendar-day input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.calendar-day:hover {
  border-color: rgba(11, 79, 108, 0.28);
  background: var(--foam);
}

.calendar-day:has(input:focus-visible) {
  outline: var(--focus-ring);
  outline-offset: 1px;
}

.calendar-day:has(input:checked) {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.calendar-day-num {
  font-weight: 500;
  line-height: 1;
}

.calendar-day:has(input:checked) .calendar-day-num {
  font-weight: 600;
}

.calendar-selected-count {
  margin: 0;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.duration-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(4.4rem, 1fr));
  gap: 0.45rem;
}

.duration-choice {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 2.75rem;
  padding: 0.65rem 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--foam);
  cursor: pointer;
  font-weight: 600;
  user-select: none;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out-overshoot);
}

.duration-choice:active {
  transform: scale(0.96);
}

.duration-choice span {
  position: relative;
  z-index: 0;
  pointer-events: none;
}

.duration-choice input {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.duration-choice.is-selected,
.duration-choice:has(input:checked) {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.builder-preview {
  margin: 0;
  font-weight: 600;
  color: var(--coral);
  min-height: 1.4em;
}

.builder-hint {
  margin: -0.25rem 0 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.builder-ai-panel,
.schedule-studio {
  border-color: rgba(11, 79, 108, 0.22);
  background:
    radial-gradient(700px 240px at 0% 0%, rgba(196, 92, 38, 0.1), transparent 55%),
    radial-gradient(600px 220px at 100% 0%, rgba(11, 79, 108, 0.1), transparent 50%),
    var(--foam);
}

.schedule-studio {
  padding-top: 1.1rem;
}

.builder-ai-panel .section-title,
.schedule-studio .section-title {
  margin-bottom: 0.35rem;
}

.schedule-rule-summary {
  margin: 0.15rem 0 0.85rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(11, 79, 108, 0.18);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-deep);
  font-weight: 600;
  line-height: 1.35;
}

.schedule-studio-prompt,
.schedule-studio-build {
  display: grid;
  gap: 1.15rem;
}

.schedule-studio-body {
  display: grid;
  gap: 1.15rem;
  min-width: 0;
}

.schedule-chat-rail,
.schedule-chat,
.schedule-chat-composer,
.schedule-build-canvas {
  display: grid;
  gap: 0.7rem;
  min-width: 0;
}

.schedule-chat-thread {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  max-height: min(22rem, 46vh);
  overflow: auto;
  padding-right: 0.15rem;
}

/* Studio layout: on desktop the chat is its own pane to the left of the card,
   not a box inside it. studio_tabs_controller moves the aside into .studio-side. */
.studio-layout {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.studio-side:empty,
.studio-rail-slot:empty {
  display: none;
}

@media (min-width: 820px) {
  .studio-layout {
    grid-template-columns: minmax(17rem, 21rem) minmax(0, 1fr);
    align-items: start;
    gap: 2rem;
  }

  .studio-side {
    position: sticky;
    top: 0.85rem;
    min-width: 0;
    max-height: calc(100dvh - 1.75rem);
    display: grid;
  }

  .schedule-chat-rail,
  .schedule-chat-rail[hidden] {
    display: grid !important;
  }

  .studio-side .schedule-chat-rail {
    align-content: start;
    gap: 0.85rem;
    max-height: calc(100dvh - 1.75rem);
    padding: 0.35rem 0.15rem 0.5rem 0;
    overflow: auto;
  }

  .studio-side .schedule-chat-bubble.is-assistant {
    background: rgba(255, 255, 255, 0.6);
  }

  .schedule-chat-thread {
    max-height: min(30rem, calc(100dvh - 22rem));
    min-height: 0;
  }
}

.schedule-chat-bubble {
  max-width: 94%;
  padding: 0.7rem 0.9rem;
  border-radius: 16px;
  line-height: 1.4;
  font-size: 0.98rem;
}

.schedule-chat-bubble.is-user {
  justify-self: end;
  background: var(--ink);
  color: #fff;
  border-radius: 16px 16px 4px 16px;
}

.schedule-chat-bubble.is-assistant {
  justify-self: start;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 4px;
}

.schedule-chat-bubble.is-status {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.studio-layout.has-schedule .builder-ai-prompt {
  min-height: 4.25rem;
}

.schedule-live-editor {
  display: grid;
  gap: 0.9rem;
  padding: 1rem 1.05rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.schedule-live-editor .lede {
  margin: 0.15rem 0 0;
}

.schedule-live-peek {
  display: grid;
  gap: 0.45rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
}

.schedule-live-peek-times {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.schedule-live-peek-times span {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 600;
  font-size: 0.88rem;
}

.schedule-live-peek-times .is-more {
  color: var(--ink-soft);
  background: transparent;
}

.schedule-live-peek .text-button {
  justify-self: start;
}

.studio-tabs {
  position: sticky;
  top: 0.25rem;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin: 0 0 1rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(8px);
}

.studio-tab {
  appearance: none;
  min-height: 2.75rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out-overshoot);
}

.studio-tab.is-active,
.studio-tab[aria-selected="true"] {
  background: var(--ink);
  color: #fff;
}

/* Unsaved edits in the details form: a small marker on the Details tab. */
.studio-tab[data-studio-tabs-tab-param="details"] {
  position: relative;
}

.schedule-studio:has(form.is-dirty) .studio-tab[data-studio-tabs-tab-param="details"]::after {
  content: "";
  position: absolute;
  top: 0.55rem;
  right: 0.7rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 2px rgba(255, 253, 248, 0.9);
}

/* Desktop shows the chat rail next to the page, so a Chat tab is redundant. */
@media (min-width: 820px) {
  .studio-tab[data-studio-tabs-tab-param="chat"] {
    display: none;
  }

  .studio-tabs:has(.studio-tab[data-studio-tabs-tab-param="chat"]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.studio-tab-panel {
  display: grid;
  gap: 1.1rem;
  min-width: 0;
  max-width: 100%;
}

.studio-tab-panel[hidden] {
  display: none !important;
}

.studio-empty {
  display: grid;
  gap: 0.65rem;
  justify-items: start;
  padding: 0.35rem 0 0.5rem;
}

.schedule-studio-rule {
  margin: 0;
}

.schedule-studio-manual {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.55rem;
}

.schedule-studio-preview {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

@media (max-width: 560px) {
  .studio-tabs {
    top: 0.15rem;
    margin-left: -0.15rem;
    margin-right: -0.15rem;
  }

  .studio-tab {
    min-height: 3rem;
    font-size: 0.92rem;
  }
}

.weekday-picker {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
}

.weekday-chip {
  position: relative;
  min-width: 0;
  width: 100%;
  min-height: 2.5rem;
  display: grid;
  place-items: center;
  padding: 0.4rem 0.15rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

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

.weekday-chip span {
  position: relative;
  z-index: 0;
  pointer-events: none;
}

.weekday-chip input {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.weekday-chip.is-selected,
.weekday-chip:has(input:checked) {
  border-color: var(--ink);
  background: rgba(11, 79, 108, 0.08);
  color: var(--ink);
}

.day-title-fields {
  display: none;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.schedule-rule-fields:has(input[name="by_day[]"]:checked) .day-title-fields {
  display: grid;
}

.day-title-row {
  display: none;
}

.schedule-rule-fields:has(input[name="by_day[]"][value="SU"]:checked) .day-title-row[data-day="SU"],
.schedule-rule-fields:has(input[name="by_day[]"][value="MO"]:checked) .day-title-row[data-day="MO"],
.schedule-rule-fields:has(input[name="by_day[]"][value="TU"]:checked) .day-title-row[data-day="TU"],
.schedule-rule-fields:has(input[name="by_day[]"][value="WE"]:checked) .day-title-row[data-day="WE"],
.schedule-rule-fields:has(input[name="by_day[]"][value="TH"]:checked) .day-title-row[data-day="TH"],
.schedule-rule-fields:has(input[name="by_day[]"][value="FR"]:checked) .day-title-row[data-day="FR"],
.schedule-rule-fields:has(input[name="by_day[]"][value="SA"]:checked) .day-title-row[data-day="SA"] {
  display: grid;
}

.rule-duration-choices {
  margin-top: 0.25rem;
}

.duration-custom-field {
  margin-top: 0.55rem;
}

.duration-custom-field input {
  max-width: 11rem;
}

.sheet-advanced::details-content,
.schedule-builder-manual::details-content {
  block-size: 0;
  overflow: clip;
  transition:
    block-size var(--duration-dialog) var(--ease-out),
    content-visibility var(--duration-dialog) var(--ease-out);
  transition-behavior: allow-discrete;
}

.sheet-advanced[open]::details-content,
.schedule-builder-manual[open]::details-content {
  block-size: auto;
}

/* Popups inside the by-hand panel must escape the collapsed-height clip. */
.schedule-studio-rule[open]::details-content {
  overflow: visible;
}

/* Rule sentence: the schedule reads as prose, every changeable word is a chip
   that pops open its controls (borrowed from Fizzy's filter bar). */
.rule-sentence {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.rule-sentence-line {
  position: relative;
  display: flex;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.45rem;
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.5;
  color: var(--ink-deep);
}

.rule-sentence-line-secondary {
  font-size: 0.98rem;
  color: var(--ink-soft);
}

.rule-word {
  white-space: nowrap;
}

.rule-pop {
  position: static;
  display: inline-block;
  min-width: 0;
  max-width: 100%;
}

.rule-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  min-height: 2.1rem;
  padding: 0.2rem 0.7rem 0.2rem 0.8rem;
  border: 1px solid rgba(11, 79, 108, 0.28);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 650;
  font-size: 0.95em;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
  user-select: none;
  transition:
    background var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.rule-chip::-webkit-details-marker {
  display: none;
}

.rule-chip > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-chip::after {
  content: "";
  flex: none;
  width: 0.42em;
  height: 0.42em;
  margin-top: -0.2em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
  transition: transform var(--duration-fast) var(--ease-out);
}

.rule-chip:hover {
  border-color: var(--ink);
  background: rgba(11, 79, 108, 0.06);
}

.rule-chip:active {
  transform: scale(0.97);
}

.rule-chip:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.rule-pop[open] .rule-chip {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.rule-pop[open] .rule-chip::after {
  transform: rotate(225deg);
  margin-top: 0.2em;
}

.rule-chip-quiet {
  border-style: dashed;
  color: var(--ink-soft);
  font-weight: 550;
}

.rule-chip.is-empty {
  border-color: rgba(176, 58, 46, 0.6);
  color: #8a2f24;
}

.rule-pop-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 8;
  display: grid;
  gap: 0.65rem;
  padding: 0.95rem 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--foam);
  box-shadow: 0 14px 34px rgba(11, 79, 108, 0.14);
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink-deep);
  transform-origin: top left;
  animation: rule-pop-in var(--duration-fast) var(--ease-out);
}

@keyframes rule-pop-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
}

.rule-pop-panel .builder-hint {
  margin: 0;
}

.rule-pop-panel .weekday-picker {
  margin: 0;
}

.rule-pop-grid {
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
}

.rule-pop-grid .field {
  margin: 0;
}

.rule-sentence:not(:has(select[name="freq"] option[value="monthly"]:checked)) .rule-monthly-only {
  display: none;
}

.rule-pop-panel .day-title-fields {
  margin-top: 0.2rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.rule-pop-more summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-soft);
  min-height: 2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.rule-pop-more summary::-webkit-details-marker {
  display: none;
}

.rule-pop-more summary em {
  font-style: normal;
  font-weight: 400;
}

.rule-pop-more summary::before {
  content: "";
  width: 0.4em;
  height: 0.4em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--duration-fast) var(--ease-out);
}

.rule-pop-more[open] summary::before {
  transform: rotate(45deg);
}

.rule-pop-more .builder-hint {
  margin: 0.1rem 0 0.5rem;
}

.day-title-grid {
  display: grid;
  gap: 0.45rem;
}

.day-title-grid .day-title-row {
  grid-template-columns: 6.5rem minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
}

.day-title-grid .day-title-row input {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

/* Unsaved edits: the Save button turns primary, matching the details tab. */
.schedule-live-editor:has(.rule-sentence.is-dirty) #schedule-rule-actions .btn-secondary,
.schedule-studio-rule:has(.rule-sentence.is-dirty) #schedule-rule-actions .btn-secondary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.sheet-edit-chrome {
  margin-bottom: 0.85rem;
}

.sheet-edit-chrome .page-title,
.studio-chrome .page-title {
  font-size: clamp(1.45rem, 4vw, 2rem);
  margin-bottom: 0;
}

.studio-chrome {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.studio-chrome .eyebrow {
  margin-bottom: 0.2rem;
}

.studio-chrome .link-actions {
  margin-left: auto;
}

.studio-chrome-copy {
  min-width: 0;
}

.studio-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.55rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}

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

.studio-actions .copied {
  flex-basis: 100%;
  text-align: right;
}

/* Empty states say what happens next, like Fizzy's blank slates. */
.blank-slate {
  display: grid;
  gap: 0.35rem;
  justify-items: start;
  margin-top: 1.25rem;
  padding: 1.35rem 1.4rem 1.45rem;
  border: 2px dashed rgba(11, 79, 108, 0.22);
  border-radius: 14px;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.5);
  rotate: -1deg;
}

.blank-slate .empty-title {
  margin: 0;
  font-size: 1.15rem;
}

.blank-slate p {
  margin: 0;
}

.blank-slate .btn {
  margin-top: 0.6rem;
}

.page-preview {
  display: grid;
  gap: 1.75rem;
  min-width: 0;
}

.page-preview-section {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
}

.page-preview-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.page-preview-section .section-title {
  margin-bottom: 0;
}

.page-preview-section .lede {
  margin-bottom: 0.25rem;
}

.page-preview-hint {
  margin: 0 0 0.9rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.page-preview-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.page-preview-field {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.page-preview-field span:not(.visually-hidden) {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 600;
}

/* Editable text that looks exactly like the public page. Selectors are
   scoped under .page-preview so they outrank the global input[type=…] box. */
.page-preview .page-preview-eyebrow,
.page-preview .page-preview-title,
.page-preview .page-preview-lede,
.page-preview .page-preview-legend,
.page-preview .page-preview-option-name,
.page-preview .page-preview-specifics input {
  width: 100%;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0.1rem 0.4rem;
  margin-left: -0.4rem;
  box-shadow: 0 0 0 1px transparent;
  transition:
    background var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

.page-preview .page-preview-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--coral);
}

.page-preview .page-preview-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink-deep);
}

.page-preview .page-preview-lede,
.page-preview .page-preview-legend {
  color: var(--ink-body);
  line-height: 1.65;
  resize: vertical;
}

.page-preview .page-preview-legend {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.page-preview .page-preview-option-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink-deep);
}

.page-preview .page-preview-eyebrow::placeholder,
.page-preview .page-preview-title::placeholder,
.page-preview .page-preview-option-name::placeholder {
  color: rgba(58, 116, 140, 0.45);
  font: inherit;
}

.page-preview .page-preview-eyebrow:hover,
.page-preview .page-preview-title:hover,
.page-preview .page-preview-lede:hover,
.page-preview .page-preview-legend:hover,
.page-preview .page-preview-option-name:hover,
.page-preview .page-preview-specifics input:hover {
  background: rgba(11, 79, 108, 0.05);
  box-shadow: 0 0 0 1px rgba(11, 79, 108, 0.16);
}

.page-preview .page-preview-eyebrow:focus,
.page-preview .page-preview-title:focus,
.page-preview .page-preview-lede:focus,
.page-preview .page-preview-legend:focus,
.page-preview .page-preview-option-name:focus,
.page-preview .page-preview-specifics input:focus {
  background: #fff;
  box-shadow: 0 0 0 1px var(--ink);
  outline: none;
}

.page-preview-specifics {
  display: grid;
  grid-template-columns: 7rem 7rem minmax(0, 1fr);
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.page-preview .page-preview-specifics input {
  min-height: 2.4rem;
  margin-left: 0;
  padding: 0.4rem 0.7rem;
  box-shadow: 0 0 0 1px var(--line);
  background: #fff;
  font-weight: 600;
}

/* Items as the same cards people see, with the text editable in place. */
.page-options.page-preview-section {
  padding-top: 0;
  border-top: 0;
}

.page-preview-slots {
  margin-top: 0.25rem;
}

.page-preview-row {
  position: relative;
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.page-preview-row:hover,
.page-preview-row:focus-within {
  border-color: rgba(11, 79, 108, 0.28);
  transform: none;
}

.page-preview-row:focus-within {
  box-shadow: 0 0 0 3px rgba(11, 79, 108, 0.08);
}

.page-preview-item-form {
  min-width: 0;
}

.page-preview-item-form .slot-copy,
.page-preview-add .slot-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.page-preview-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.2rem;
}

.page-preview-capacity {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: inherit;
}

.page-preview .page-preview-capacity-input {
  width: 3.4rem;
  min-height: 0;
  margin: 0 0 0 -0.35rem;
  padding: 0.1rem 0.35rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-deep);
  font: inherit;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(11, 79, 108, 0.16);
  -moz-appearance: textfield;
}

.page-preview .page-preview-capacity-input::-webkit-outer-spin-button,
.page-preview .page-preview-capacity-input::-webkit-inner-spin-button {
  margin: 0;
}

.page-preview .page-preview-capacity-input:hover {
  background: rgba(11, 79, 108, 0.05);
}

.page-preview .page-preview-capacity-input:focus {
  background: #fff;
  box-shadow: 0 0 0 1px var(--ink);
  outline: none;
}

.slot-claim-btn.is-preview {
  flex: none;
  opacity: 0.55;
  pointer-events: none;
}

.page-preview-remove-form {
  position: absolute;
  top: 0.6rem;
  right: 0.75rem;
}

.page-preview-remove {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-soft);
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

.page-preview-row:hover .page-preview-remove,
.page-preview-row:focus-within .page-preview-remove,
.page-preview-remove:focus-visible {
  opacity: 1;
}

.page-preview-remove:hover {
  color: var(--coral);
}

@media (hover: none) {
  .page-preview-remove {
    opacity: 1;
  }
}

.page-preview-row .slot-main {
  padding-right: 0;
}

.page-preview-row:has(.page-preview-remove-form) .slot-main {
  padding-top: 0.35rem;
}

.page-preview-add {
  border-style: dashed;
  border-color: rgba(11, 79, 108, 0.22);
  background: transparent;
}

.page-preview-add:focus-within {
  border-style: solid;
  border-color: var(--ink);
  background: var(--foam);
}

.page-preview-add .slot-claim-btn {
  flex: none;
}

.page-preview-add .page-preview-option-name::placeholder {
  color: var(--ink-soft);
}

.avail-identity.is-preview {
  pointer-events: none;
  opacity: 0.72;
}

.page-preview .avail-chip.is-option {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

@media (max-width: 819px) {
  input[type="text"],
  input[type="email"],
  input[type="number"],
  input[type="tel"],
  input[type="time"],
  select,
  textarea {
    font-size: 16px;
  }

  .studio-chrome {
    flex-direction: column;
    align-items: stretch;
  }

  .studio-chrome .page-title {
    font-size: clamp(1.35rem, 6.5vw, 1.8rem);
  }

  .page-preview-title {
    font-size: clamp(1.45rem, 7vw, 1.9rem);
  }

  .page-preview-specifics {
    grid-template-columns: 1fr 1fr;
  }

  .page-preview-specifics .is-wide {
    grid-column: 1 / -1;
  }

  .page-preview .avail-chip.is-option,
  .avail-chip.is-option {
    grid-template-columns: 1fr;
  }

  .page-preview .avail-chip.is-option .avail-chip-actions,
  .avail-chip.is-option .avail-chip-actions {
    min-width: 0;
    width: 100%;
  }

  .avail-choice {
    min-height: 2.75rem;
  }

  .compare-swipe {
    display: block;
  }

  .compare-table {
    font-size: 0.88rem;
  }

  .compare-table th,
  .compare-table td {
    padding: 0.85rem 0.9rem;
  }

  .sheet-list-item,
  .account-list-item {
    flex-direction: column;
    align-items: stretch;
  }

  .sheet-list-item .btn,
  .account-list-item .btn {
    width: 100%;
    min-height: 2.85rem;
  }
}

.sheet-details-panel {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.sheet-details-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

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

.sheet-details-panel[open] .sheet-details-summary {
  margin-bottom: 1rem;
}

.sheet-details-panel .schedule-builder-manual-toggle-label[data-open] {
  display: none;
}

.sheet-details-panel[open] .schedule-builder-manual-toggle-label[data-closed] {
  display: none;
}

.sheet-details-panel[open] .schedule-builder-manual-toggle-label[data-open] {
  display: inline;
}

.sheet-details-panel[open] .schedule-builder-manual-toggle-icon {
  transform: rotate(45deg) translateY(1px);
}

.details-edit-link {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.55rem;
  justify-items: start;
}

.schedule-studio .schedule-builder-manual {
  margin: 0.25rem 0 0;
  box-shadow: none;
  background: transparent;
  border: 1px solid var(--line);
}

.builder-ai-field {
  margin-top: 0.35rem;
}

.builder-ai-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.15rem 0 0.35rem;
}

.builder-ai-sample {
  flex: 0 1 auto;
  min-height: 2.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(11, 79, 108, 0.22);
  background: #fff;
  color: var(--ink-deep);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.builder-ai-sample:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.builder-ai-sample:active {
  transform: none;
}

.builder-ai-sample.is-selected {
  border-color: var(--ink);
  background: rgba(11, 79, 108, 0.08);
  color: var(--ink);
}

.builder-ai-prompt {
  min-height: 7.5rem;
  font-size: 1.08rem;
  line-height: 1.45;
  border-width: 2px;
  border-color: rgba(11, 79, 108, 0.28);
  background: #fff;
}

.builder-ai-prompt:focus {
  border-color: var(--ink);
  outline: 2px solid rgba(11, 79, 108, 0.15);
}

.builder-ai-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.create-sheet-prompt {
  border-color: rgba(11, 79, 108, 0.22);
  background:
    radial-gradient(700px 240px at 0% 0%, rgba(196, 92, 38, 0.1), transparent 55%),
    radial-gradient(600px 220px at 100% 0%, rgba(11, 79, 108, 0.1), transparent 50%),
    var(--foam);
}

.create-sheet-prompt .builder-ai-samples {
  margin: 0.15rem 0 0.15rem;
}

.create-sheet-prompt .builder-ai-field {
  margin-top: 0;
}

.create-sheet-prompt .builder-ai-prompt {
  min-height: 9rem;
}

.create-sheet-layout {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.create-sheet-intro .lede {
  margin-bottom: 0;
}

.create-sheet-templates-kicker {
  display: none;
}

.create-sheet .template-grid {
  margin-top: 0;
}

.create-sheet-composer {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.create-sheet-composer .sheet-attachment-editor {
  margin: 0;
}

.create-sheet-errors {
  margin: 0;
}

@media (min-width: 820px) {
  .create-sheet-layout {
    grid-template-columns: minmax(22rem, 0.9fr) minmax(24rem, 1.2fr);
    grid-template-areas:
      "intro intro"
      "composer templates";
    column-gap: 2.75rem;
    row-gap: 2rem;
    align-items: start;
  }

  .create-sheet-intro {
    grid-area: intro;
    max-width: 38rem;
  }

  .create-sheet-templates {
    grid-area: templates;
  }

  .create-sheet-composer {
    grid-area: composer;
  }

  .create-sheet-templates-kicker {
    display: block;
    margin: 0 0 1rem;
    color: var(--coral);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .create-sheet .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
  }

  .create-sheet .page-title {
    font-size: clamp(2.35rem, 3.6vw, 3.25rem);
    letter-spacing: -0.04em;
    line-height: 1.05;
    max-width: 14ch;
  }

  .create-sheet .lede {
    max-width: 32rem;
  }

  .create-sheet-prompt .builder-ai-prompt {
    min-height: 12.5rem;
  }

  .create-sheet-composer .btn-lg {
    justify-self: start;
    width: auto;
    min-width: 12rem;
  }
}

.schedule-load-more {
  margin-top: 1rem;
  width: 100%;
}

.day-rail-sentinel {
  flex: 0 0 1px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.calendar-preset:has(input:checked),
.calendar-preset.is-selected {
  border-color: var(--ink);
  background: rgba(11, 79, 108, 0.08);
}

.schedule-builder-manual {
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.schedule-builder-manual-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.15rem 0;
}

.schedule-builder-manual-summary::-webkit-details-marker {
  display: none;
}

.schedule-builder-manual-copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  flex: 1;
}

.schedule-builder-manual-summary .section-title {
  margin: 0;
}

.schedule-builder-manual-summary .lede {
  margin: 0;
}

.schedule-builder-manual-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(11, 79, 108, 0.06);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
}

.schedule-builder-manual-toggle-label[data-open] {
  display: none;
}

.schedule-builder-manual[open] .schedule-builder-manual-toggle-label[data-closed] {
  display: none;
}

.schedule-builder-manual[open] .schedule-builder-manual-toggle-label[data-open] {
  display: inline;
}

.schedule-builder-manual-toggle-icon {
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(-45deg) translateY(-1px);
  transition: transform 0.15s ease;
}

.schedule-builder-manual[open] .schedule-builder-manual-toggle-icon {
  transform: rotate(45deg) translateY(1px);
}

.schedule-builder-manual .stack {
  margin-top: 1rem;
}

@media (max-width: 560px) {
  .schedule-builder-manual-summary {
    align-items: flex-start;
  }

  .schedule-builder-manual-toggle {
    min-height: 3rem;
    padding: 0.7rem 1rem;
    font-size: 1rem;
  }

  .schedule-builder-manual-toggle-icon {
    width: 0.8rem;
    height: 0.8rem;
    border-right-width: 3px;
    border-bottom-width: 3px;
  }
}

.day-times-list {
  display: grid;
  gap: 0.65rem;
}

.day-times-row {
  display: grid;
  gap: 0.35rem;
}

@media (min-width: 640px) {
  .day-times-row {
    grid-template-columns: 7.5rem 1fr;
    align-items: center;
    gap: 0.75rem;
  }
}

.day-times-label {
  display: grid;
  gap: 0.1rem;
}

.day-times-label strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
}

.day-times-label span {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.day-times-row input[type="text"] {
  width: 100%;
}

.empty-schedule {
  padding: 2.25rem 0.25rem 1rem;
}

.empty-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
  color: var(--ink);
}

.schedule-day-admin {
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.schedule-day-admin-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.schedule-day-admin-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.day-title-edit {
  margin-top: 0.3rem;
  max-width: 14rem;
}

.day-title-edit input {
  min-height: 2rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--ink-soft);
  border-color: transparent;
  background: transparent;
}

.day-title-edit input:hover,
.day-title-edit input:focus {
  border-color: var(--line);
  background: var(--foam);
  color: var(--ink);
}

.admin-time-grid,
.time-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.65rem;
}

.admin-time-grid {
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
}

.admin-time-chip,
.time-chip {
  position: relative;
  display: grid;
  gap: 0.1rem;
  padding: 0.95rem 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--foam);
  text-align: left;
  font: inherit;
  color: inherit;
  transition:
    transform var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

.admin-time-chip strong,
.time-chip-time {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.time-chip-range {
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.admin-time-chip span,
.time-chip-meta {
  font-size: 0.84rem;
  color: var(--ink-soft);
  margin-top: 0.2rem;
}

.admin-time-chip.is-taken {
  opacity: 0.7;
  background: rgba(11, 79, 108, 0.06);
}

.chip-remove {
  position: absolute;
  top: 0.2rem;
  right: 0.35rem;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.2rem;
}

.admin-time-chip.is-preview-editable {
  padding-right: 1.6rem;
}

.admin-time-chip .chip-remove:hover {
  color: var(--ink);
}

.preview-add-time,
.preview-edit-time {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  min-width: 0;
}

.preview-add-time {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  min-height: 3.6rem;
  padding: 0.45rem 0.55rem;
  border-radius: 14px;
  border: 1px dashed rgba(11, 79, 108, 0.35);
  background: rgba(255, 255, 255, 0.65);
}

.preview-edit-time input[type="time"],
.preview-add-time input[type="time"] {
  min-width: 6.25rem;
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.02em;
  padding: 0;
}

.preview-edit-time input[type="time"]::-webkit-calendar-picker-indicator,
.preview-add-time input[type="time"]::-webkit-calendar-picker-indicator {
  width: 1rem;
  height: 1rem;
  margin: 0 0 0 0.15rem;
  padding: 0;
  cursor: pointer;
  opacity: 0.7;
}

.preview-edit-time input[type="time"] {
  cursor: pointer;
}

.preview-edit-meta {
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.preview-add-time .btn {
  flex: 0 0 auto;
}

.preview-add-hint {
  margin-top: 0.85rem;
}

.public-sheet,
.public-schedule {
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  animation: none;
}

.timezone-hint {
  margin: -0.35rem 0 1.35rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.day-rail {
  position: sticky;
  top: 0.35rem;
  z-index: 5;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 1.5rem;
  padding: 0.45rem 0 0.2rem;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96) 55%, rgba(255, 253, 248, 0.72) 100%);
  backdrop-filter: blur(8px);
  border-radius: 18px;
}

.day-rail-track {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0.2rem 0.45rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.day-rail-track::-webkit-scrollbar {
  height: 6px;
}

.day-rail-track::-webkit-scrollbar-thumb {
  background: rgba(11, 79, 108, 0.28);
  border-radius: 999px;
}


.day-rail-item {
  flex: 0 0 auto;
  width: 5.15rem;
  scroll-snap-align: start;
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.92);
  border-radius: 16px;
  padding: 0.65rem 0.45rem 0.7rem;
  display: grid;
  gap: 0.08rem;
  justify-items: center;
  cursor: pointer;
  font: inherit;
  color: var(--ink-deep);
  text-decoration: none;
  text-align: center;
  transition:
    border-color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out-overshoot);
}

.day-rail-item:hover:not(.is-selected) {
  border-color: rgba(11, 79, 108, 0.32);
}

.day-rail-item:active {
  transform: scale(0.96);
}


.day-rail-item.is-selected {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 0 0 1px var(--ink);
}

.day-rail-item.is-selected .day-rail-meta,
.day-rail-item.is-selected .day-rail-month {
  color: rgba(255, 255, 255, 0.8);
}

.day-rail-item.is-full:not(.is-selected) {
  opacity: 0.55;
}

.day-rail-dow {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.day-rail-num {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1;
}

.day-rail-month {
  font-size: 0.72rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.day-rail-meta {
  font-size: 0.72rem;
  color: var(--ink-soft);
  margin-top: 0.15rem;
}

.time-board {
  display: grid;
  gap: 0.75rem;
}

.time-day {
  scroll-margin-top: 8.5rem;
  padding: 0.95rem 0.9rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.62);
}

.time-day.is-selected-day .time-grid-heading {
  color: var(--ink);
}

.time-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.time-grid-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.5vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.time-day-meta {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.time-day-title {
  color: inherit;
  font-weight: 400;
}

.time-chip-wrap {
  display: grid;
  min-width: 0;
}

.time-chip {
  cursor: pointer;
  min-height: 5rem;
  animation: rise 0.28s var(--ease-out) both;
  width: 100%;
  align-content: start;
}

.time-chip-mine-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--ink);
  background: rgba(11, 79, 108, 0.1);
  text-align: left;
  min-height: 5rem;
  width: 100%;
}

.time-chip-mine-card .time-chip-time {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
}

.time-chip-mine-card .time-chip-meta {
  font-size: 0.84rem;
  color: var(--ink-soft);
}

.time-chip-cancel {
  justify-self: start;
  margin-top: 0.15rem;
  padding-inline: 0.7rem;
}

@media (any-hover: hover) {
  .time-chip:hover:not(:disabled) {
    transform: scale(1.025);
    border-color: rgba(11, 79, 108, 0.4);
  }
}

.time-chip:active:not(:disabled) {
  transform: scale(0.97);
}

.time-chip-open .time-chip {
  background: #fff;
  border-color: rgba(11, 79, 108, 0.22);
  box-shadow: 0 10px 24px rgba(11, 79, 108, 0.07);
}

.time-chip-open .time-chip-meta {
  color: var(--ink);
  font-weight: 600;
}

.time-chip-locked .time-chip {
  background: rgba(196, 92, 38, 0.08);
  border-color: rgba(196, 92, 38, 0.28);
  animation: pulse-soft 1.6s ease-in-out infinite;
}

.time-chip-full .time-chip {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(11, 79, 108, 0.04);
  box-shadow: none;
}

.booking-drawer,
.auth-modal {
  opacity: 0;
  transform: translateY(1.15rem) scale(0.96);
  transition:
    display var(--duration-dialog) var(--ease-out),
    overlay var(--duration-dialog) var(--ease-out),
    opacity var(--duration-dialog) var(--ease-out),
    transform var(--duration-dialog) var(--ease-out);
  transition-behavior: allow-discrete;
}

.booking-drawer {
  border: 0;
  border-radius: 24px 24px 0 0;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  width: min(480px, calc(100% - 1.5rem));
  max-width: calc(100% - 1.5rem);
  margin: auto auto 0;
  background: var(--foam);
  box-shadow: 0 -12px 40px rgba(8, 61, 84, 0.18);
}

.booking-drawer::backdrop,
.auth-modal::backdrop {
  background: rgba(8, 61, 84, 0.45);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition:
    display var(--duration-dialog) var(--ease-out),
    overlay var(--duration-dialog) var(--ease-out),
    opacity var(--duration-dialog) var(--ease-out);
  transition-behavior: allow-discrete;
}

.booking-drawer[open],
.auth-modal[open] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.booking-drawer[open]::backdrop,
.auth-modal[open]::backdrop {
  opacity: 1;
}

@starting-style {
  .booking-drawer[open],
  .auth-modal[open] {
    opacity: 0;
    transform: translateY(1.15rem) scale(0.96);
  }

  .booking-drawer[open]::backdrop,
  .auth-modal[open]::backdrop {
    opacity: 0;
  }
}

@media (min-width: 640px) {
  .booking-drawer {
    border-radius: 24px;
    margin: auto;
    transform: scale(0.94);
  }

  .booking-drawer[open] {
    transform: scale(1);
  }

  @starting-style {
    .booking-drawer[open] {
      transform: scale(0.94);
      opacity: 0;
    }
  }
}

.booking-drawer-close {
  display: flex;
  justify-content: flex-end;
  margin: 0;
  padding: 0.45rem 0.45rem 0;
}

.booking-drawer-body {
  padding: 0 2rem 2rem;
}

.booking-headline {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  margin: 0 0 0.55rem;
  color: var(--ink-deep);
  letter-spacing: -0.02em;
}

.booking-status {
  margin: 0;
  color: var(--coral);
  font-weight: 600;
}

.avail-summary {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--foam);
}

.avail-summary.is-ready {
  border-color: rgba(11, 79, 108, 0.35);
  background: rgba(11, 79, 108, 0.06);
}

.avail-summary-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.avail-summary-line {
  margin: 0;
  color: var(--ink-deep);
  font-weight: 600;
}

.avail-identity {
  display: grid;
  gap: 0.85rem;
  margin: 0 0 0.85rem;
}

.avail-legend {
  margin: 0 0 1.15rem;
}

.avail-status {
  margin: 0;
  color: var(--coral);
  font-weight: 600;
}

.avail-chip-grid {
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
}

.avail-option-list {
  display: grid;
  gap: 0.7rem;
}

.avail-chip.is-option {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 1rem 1.1rem;
}

.avail-chip.is-option .avail-chip-actions {
  min-width: 8.5rem;
}

@media (max-width: 560px) {
  .avail-chip.is-option {
    grid-template-columns: 1fr;
  }
}

.avail-chip {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.7rem;
  min-width: 0;
  padding: 0.9rem 0.85rem 0.8rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--foam);
}

.avail-chip:hover,
.avail-chip.is-best:hover {
  border-color: rgba(11, 79, 108, 0.45);
}

.avail-chip.is-best {
  border-color: rgba(11, 79, 108, 0.45);
  box-shadow: 0 0 0 1px rgba(11, 79, 108, 0.18);
}

.avail-chip.is-mine-yes {
  background: rgba(11, 79, 108, 0.07);
}

.avail-chip.is-mine-no {
  background: rgba(163, 75, 28, 0.07);
}

.avail-chip-body {
  display: grid;
  gap: 0.12rem;
  cursor: pointer;
}

.avail-chip-names {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-body);
  line-height: 1.35;
}

.avail-chip-names.is-no {
  color: var(--ink-soft);
}

.avail-chip-actions {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.avail-choice {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.45rem 0.4rem;
  min-height: 2.5rem;
  cursor: pointer;
  touch-action: manipulation;
}

.avail-choice:hover {
  border-color: var(--ink);
}

.avail-chip.is-mine-yes .avail-choice-yes,
.avail-chip.is-mine-no .avail-choice-no {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.admin-time-chip.is-best {
  border-color: rgba(11, 79, 108, 0.45);
  background: rgba(11, 79, 108, 0.06);
}

@media (min-width: 640px) {
  .avail-identity {
    grid-template-columns: 1.4fr 1fr;
    align-items: end;
  }

  .avail-identity .avail-status {
    grid-column: 1 / -1;
  }
}

.muted-tight {
  margin: 0;
}

.home-section {
  margin: 0 0 var(--landing-section);
}

.home-section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.15rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 0;
  color: var(--ink-deep);
  max-width: 18ch;
}

.home-section-lede {
  margin: 0.85rem 0 0;
  max-width: 32rem;
  color: var(--ink-body);
  font-size: 1.05rem;
  line-height: 1.65;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.75rem, 1fr));
  gap: 1.1rem;
  margin: 2rem 0 0;
}

.template-card {
  appearance: none;
  display: grid;
  gap: 0.35rem;
  width: 100%;
  margin: 0;
  padding: var(--space-card) 1.35rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.78);
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.template-card:hover,
.template-card.is-selected {
  border-color: var(--ink);
  background: rgba(255, 253, 248, 0.96);
}

.template-card strong {
  color: var(--ink);
  font-size: 1rem;
}

.template-card span {
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.35;
}

@media (max-width: 819px) {
  .eyebrow,
  .home-showcase-kicker {
    margin-bottom: 1rem;
  }

  .home-section-title,
  .home-showcase-title,
  .home-faq-title,
  .feature-pillar-title,
  .feature-band-title,
  .compare-section-title,
  .page-hero-title,
  .page-finale h2,
  .about-person-name,
  .about-company-name {
    line-height: 1.22;
  }

  .home-section-lede {
    margin-top: 1.2rem;
  }

  .home-showcase-title {
    margin-bottom: 1.25rem;
  }

  .home-faq-title,
  .feature-pillar-title,
  .feature-band-title,
  .compare-section-title {
    margin-bottom: 1.2rem;
  }

  .home-faq-lede,
  .feature-pillar-lead,
  .compare-section-lead {
    margin-bottom: 2.35rem;
  }

  .home-layers {
    margin-top: 2.35rem;
  }

  .page-hero-title {
    margin-bottom: 1.4rem;
  }

  .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2.35rem;
  }

  .template-card {
    padding: 1.4rem 1.3rem 1.45rem;
    min-height: 5.25rem;
  }

  .template-page .home-showcase {
    padding: 0.5rem 0 0.85rem;
    gap: 2.25rem;
  }

  .template-page .feature-pillar {
    margin-top: 0.75rem;
    margin-bottom: 3.5rem;
  }

  .template-page .home-section {
    margin-bottom: 3.25rem;
  }

  .template-page .page-finale {
    padding-top: 2.25rem;
    padding-bottom: 1.15rem;
  }

  .template-page .home-shot-frame {
    padding: 1.65rem 1.5rem 1.75rem;
  }
}

.home-proof {
  max-width: 36rem;
  margin: 0 0 var(--landing-section);
}

.home-proof-line,
.home-proof-brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.4;
  color: var(--ink-deep);
}

.home-proof-brand {
  margin-top: 1rem;
  color: var(--coral);
}

.made-with {
  margin: 2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.made-with a {
  color: var(--ink);
}

.page-hero-cta {
  margin-top: 1.5rem;
}

.page-hero-cta .button_to,
.page-finale .button_to {
  display: inline-block;
  margin: 0;
}

.page-hero .hero-proof {
  margin-top: 0.85rem;
}

.page-hero .hero-brand {
  margin-top: 1.15rem;
}

.home-layers {
  display: grid;
  gap: 0;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.home-layers li {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 1rem 1.5rem;
  margin: 0;
  padding: 1.65rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.home-layer-num {
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.home-layers strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink-deep);
  margin: 0 0 0.3rem;
}

.home-layers span {
  color: var(--ink-body);
  font-size: 1.02rem;
  line-height: 1.5;
}

.home-benefits {
  margin: 0 0 var(--landing-section);
  padding-top: var(--landing-pair);
  border-top: 1px solid var(--line);
}

.home-benefits .home-section-title {
  max-width: 16ch;
}

.home-benefit-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.25rem;
}

@media (min-width: 820px) {
  .home-benefit-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.35rem;
  }
}

.home-benefit {
  padding: 1.6rem 1.45rem 1.7rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.72);
}

.home-benefit h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink-deep);
}

.home-benefit p {
  margin: 0;
  color: var(--ink-body);
  font-size: 1.02rem;
  line-height: 1.5;
}

.home-band {
  width: 100vw;
  margin: 0 0 var(--landing-section);
  margin-left: calc(50% - 50vw);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  background: var(--ink-deep);
}

.home-band-inner {
  display: grid;
  gap: 2rem;
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: var(--landing-gutter);
}

@media (min-width: 820px) {
  .home-band-inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 4rem 5rem;
    align-items: end;
  }
}

.home-band .home-showcase-kicker {
  color: rgba(255, 253, 248, 0.72);
}

.home-band-line {
  margin: 0;
  max-width: 32rem;
  color: var(--foam);
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  font-weight: 500;
  line-height: 1.5;
}

.home-band-brand {
  margin: 0;
  max-width: 12ch;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #f3c9b0;
}

.home-band-fine {
  margin: 0.85rem 0 0;
  max-width: 24rem;
  color: rgba(255, 253, 248, 0.72);
  font-size: 1.05rem;
  line-height: 1.45;
}

.home-finale,
.page-finale {
  display: grid;
  gap: 1.5rem;
  margin: 0 0 var(--landing-section);
  padding-top: var(--landing-pair);
}

.home-finale h2,
.page-finale h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 5vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--ink-deep);
}

.finale-break {
  display: block;
}

.finale-cta {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}

.finale-cta p {
  margin: 0;
  color: var(--ink-soft);
}

.home-finale .button_to,
.page-finale .button_to {
  display: inline-block;
  margin: 0;
}

@media (min-width: 820px) {
  .home-finale,
  .page-finale {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 2rem 4rem;
  }

  .finale-cta {
    justify-items: end;
    text-align: right;
  }
}

.home-steps {
  display: grid;
  gap: 0;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background: rgba(255, 253, 248, 0.72);
  overflow: hidden;
}

@media (min-width: 720px) {
  .home-steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-steps li + li {
    border-left: 1px solid var(--line);
  }
}

.home-steps li {
  display: grid;
  align-content: start;
  gap: 0.45rem;
  margin: 0;
  padding: 1.65rem 1.55rem 1.75rem;
  min-width: 0;
}

.home-steps li + li {
  border-top: 1px solid var(--line);
}

@media (min-width: 720px) {
  .home-steps li + li {
    border-top: 0;
  }
}

.home-steps strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}

.home-steps span {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.4;
}

.home-showcases {
  display: grid;
  gap: var(--landing-stack);
  margin: 0;
  padding: 0 0 var(--landing-section);
}

.home-showcase {
  display: grid;
  gap: var(--landing-pair);
  align-items: start;
}

@media (min-width: 820px) {
  .home-showcase {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: clamp(2.25rem, 4.5vw, 3.75rem);
  }

  .home-showcase:nth-child(even) .home-showcase-copy {
    order: 2;
  }

  .home-showcase:nth-child(even) .home-shot {
    order: 1;
  }
}

.home-showcase-copy {
  padding-block: 0.65rem 0.35rem;
}

@media (min-width: 820px) {
  .home-showcase-copy {
    padding-top: 0.55rem;
  }
}

.home-showcase-kicker {
  margin: 0 0 0.85rem;
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-showcase-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.45rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 0.95rem;
  color: var(--ink-deep);
}

.home-showcase-text {
  margin: 0;
  color: var(--ink-body);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 26rem;
}

.home-shot {
  min-width: 0;
}

.home-shot-frame {
  display: grid;
  gap: 1.1rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line);
  background:
    linear-gradient(165deg, rgba(255, 253, 248, 0.98), rgba(243, 239, 230, 0.9));
  box-shadow: var(--shadow);
  padding: clamp(1.6rem, 3.2vw, 2.15rem);
  pointer-events: none;
  user-select: none;
}

.home-shot-chat {
  display: grid;
  gap: 0.5rem;
}

.home-shot-bubble {
  max-width: 92%;
  padding: 0.65rem 0.8rem;
  font-size: 0.95rem;
  line-height: 1.35;
}

.home-shot-bubble.is-user {
  justify-self: end;
  border-radius: 16px 16px 4px 16px;
  background: var(--ink);
  color: #fff;
}

.home-shot-bubble.is-assistant {
  justify-self: start;
  border-radius: 16px 16px 16px 4px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  color: var(--ink-deep);
}

.home-shot-note {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
}

.home-shot-caption {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.4;
}

.home-shot-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-deep);
  line-height: 1.15;
}

.home-shot-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.3rem;
  margin: 0;
}

.home-shot-weekdays span {
  text-align: center;
  padding: 0.45rem 0.15rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.85);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 600;
}

.home-shot-weekdays .is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.home-shot-field {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.95);
  color: var(--ink-deep);
  font-size: 0.95rem;
}

.home-shot-upcoming-times {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

.home-shot-upcoming-times span {
  padding: 0.55rem 0.35rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.88);
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-align: center;
  color: var(--ink);
}

.home-shot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}

.home-shot-btn-sm {
  padding: 0.45rem 0.8rem;
  font-size: 0.85rem;
}

.home-shot-slots {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.home-shot-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.05rem 1.15rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.88);
}

.home-shot-slot strong {
  color: var(--ink);
  font-size: 1rem;
}

.home-shot-slot.is-full {
  opacity: 0.72;
}

.home-shot-slot.is-locked {
  background: rgba(196, 92, 38, 0.08);
}

.home-shot-pill {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(11, 79, 108, 0.1);
  color: var(--ink) !important;
  font-size: 0.8rem !important;
  font-weight: 600;
}

.home-shot-slot.is-locked .home-shot-pill {
  background: rgba(196, 92, 38, 0.14);
  color: var(--coral) !important;
}

.home-shot-day-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin: 0;
}

.home-shot-day-rail span {
  display: grid;
  gap: 0.1rem;
  justify-items: center;
  padding: 0.55rem 0.35rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.88);
  text-align: center;
}

.home-shot-day-rail em {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.home-shot-day-rail b {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
}

.home-shot-day-rail .is-on {
  background: var(--ink);
  border-color: var(--ink);
}

.home-shot-day-rail .is-on em,
.home-shot-day-rail .is-on b {
  color: #fff;
}

.home-shot-times {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.home-shot-times span {
  padding: 0.8rem 0.4rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.88);
  font-family: var(--font-display);
  font-size: 1.05rem;
  text-align: center;
  color: var(--ink);
}

.home-shot-times .is-taken {
  opacity: 0.45;
}

.home-shot-times .is-locked {
  background: rgba(196, 92, 38, 0.12);
}

.home-shot-times .is-hot {
  background: rgba(11, 79, 108, 0.12);
  border-color: rgba(11, 79, 108, 0.4);
}

.home-faq {
  max-width: 40rem;
  margin: 0;
  padding: 0 0 var(--landing-section);
  animation: rise 0.7s 0.12s ease both;
}

@media (min-width: 820px) {
  .home-faq {
    margin-inline: auto;
  }
}

.home-faq-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.15rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  margin: 0 0 0.85rem;
  color: var(--ink-deep);
}

.home-faq-lede {
  margin: 0 0 2rem;
  color: var(--ink-body);
  line-height: 1.65;
}

.home-faq-list {
  display: grid;
  gap: 0.55rem;
}

.home-faq-item {
  border-top: 1px solid var(--line);
  padding: 1.65rem 0;
}

.home-faq-item:last-child {
  border-bottom: 1px solid var(--line);
}

.home-faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink-deep);
  list-style: none;
}

.home-faq-item summary::-webkit-details-marker {
  display: none;
}

.home-faq-item summary::after {
  content: "+";
  float: right;
  color: var(--ink-soft);
  font-weight: 500;
}

.home-faq-item[open] summary::after {
  content: "–";
}

.home-faq-item p {
  margin: 0.85rem 0 0;
  color: var(--ink-body);
  line-height: 1.65;
  max-width: 36rem;
}

.marketing {
  padding-bottom: var(--landing-section);
}

.page-hero {
  max-width: 36rem;
  padding: clamp(1.1rem, 2.5vh, 1.6rem) 0 var(--landing-pair);
}

@media (max-width: 819px) {
  .page-hero {
    padding: 1.1rem 0 3.5rem;
  }

  .page-hero .hero-proof {
    margin-top: 1.15rem;
  }

  .page-hero .hero-brand {
    margin-top: 1.45rem;
  }
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 5vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0 0 1.25rem;
  color: var(--ink-deep);
  max-width: 16ch;
}

.page-hero-lead {
  margin: 0;
  color: var(--ink-body);
  font-size: 1.08rem;
  line-height: 1.65;
}

.page-hero-about {
  max-width: 38rem;
}

.feature-pillar {
  max-width: 40rem;
  margin: 0 0 var(--landing-stack);
}

@media (min-width: 820px) {
  .template-page .feature-pillar {
    margin-top: var(--landing-stack);
  }
}

.feature-pillar-title {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.85rem;
  color: var(--ink-deep);
}

.feature-pillar-lead {
  margin: 0 0 2rem;
  color: var(--ink-body);
  font-size: 1.05rem;
  line-height: 1.65;
}

.feature-list {
  display: grid;
  gap: 1.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list h3 {
  margin: 0 0 0.45rem;
  font-size: 1.02rem;
  color: var(--ink-deep);
}

.feature-list p {
  margin: 0;
  color: var(--ink-body);
  line-height: 1.65;
}

.feature-band {
  max-width: 36rem;
  margin: 0 0 var(--landing-stack);
  padding: 2.25rem 0 0;
  border-top: 1px solid var(--line);
}

.feature-band-title {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.8vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
  color: var(--ink-deep);
}

.feature-band-lead {
  margin: 0 0 1.15rem;
  color: var(--ink-body);
  line-height: 1.65;
}

.feature-band-links {
  margin: 0;
}

.compare-table-section {
  margin: 0 0 var(--landing-stack);
}

.compare-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--ink-deep);
}

.compare-section-lead {
  margin: 0 0 1.85rem;
  max-width: 36rem;
  color: var(--ink-body);
  line-height: 1.65;
}

.compare-swipe {
  display: none;
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.compare-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background: rgba(255, 253, 248, 0.78);
}

.compare-table {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.compare-table th,
.compare-table td {
  padding: 1.15rem 1.25rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  line-height: 1.5;
}

.compare-table tr:last-child th,
.compare-table tr:last-child td {
  border-bottom: 0;
}

.compare-table thead th {
  background: rgba(11, 79, 108, 0.06);
  color: var(--ink);
  font-weight: 700;
}

.compare-table tbody th {
  font-weight: 600;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.9);
}

.compare-table td {
  color: var(--ink-body);
}

.compare-table thead th:nth-child(2),
.compare-table tbody td:nth-child(2) {
  background: rgba(11, 79, 108, 0.07);
  color: var(--ink-deep);
}

.compare-table td.is-yes {
  color: var(--ink);
  font-weight: 600;
}

.compare-points {
  display: grid;
  gap: 1.5rem;
  margin: 0 0 var(--landing-stack);
}

@media (min-width: 720px) {
  .compare-points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
  }
}

.compare-card {
  padding: 1.85rem 1.75rem 2rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background: rgba(255, 253, 248, 0.72);
}

.compare-card h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  color: var(--ink-deep);
}

.compare-card p {
  margin: 0;
  color: var(--ink-body);
  line-height: 1.65;
}

.about-person,
.about-company {
  max-width: 36rem;
  margin: 0 0 var(--landing-pair);
}

.about-person-name,
.about-company-name {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.8vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
  color: var(--ink-deep);
}

.about-person-role {
  margin: 0 0 0.75rem;
  color: var(--coral);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.about-person-bio,
.about-company p {
  margin: 0 0 1.15rem;
  color: var(--ink-body);
  line-height: 1.65;
}

.about-company p:last-child {
  margin-bottom: 0;
}

.site-footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 3.25rem var(--space-gutter) 4rem;
  border-top: 1px solid var(--line);
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin-bottom: 0.75rem;
}

.site-footer-nav a,
.site-footer-fine a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-footer-nav a:hover,
.site-footer-fine a:hover {
  color: var(--ink);
}

.site-footer-fine {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

@media (max-width: 560px) {
  .topbar,
  .main {
    padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
  }

  body:has(.landing) .main,
  body:has(.marketing) .main,
  body:has(.landing) .topbar,
  body:has(.marketing) .topbar,
  body:has(.landing) .site-footer,
  body:has(.marketing) .site-footer {
    padding-left: max(1.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.75rem, env(safe-area-inset-right, 0px));
  }

  .main {
    padding-top: 0.65rem;
    padding-bottom: max(4rem, calc(2.5rem + env(safe-area-inset-bottom, 0px)));
  }

  body:has(.landing) .main,
  body:has(.marketing) .main {
    padding-top: 0.35rem;
  }

  .panel {
    padding: 1.75rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 14px;
  }

  /* Public pages: the card is the screen. Drop the floating card chrome
     so the day rail and options get the leftover gutter on both sides. */
  .main:has(.public-sheet),
  .main:has(.public-schedule) {
    padding-left: 0;
    padding-right: 0;
  }

  .public-sheet,
  .public-schedule {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
    margin-bottom: 1.15rem;
    padding-top: 1.35rem;
    padding-bottom: 1.5rem;
    padding-left: max(1.1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.1rem, env(safe-area-inset-right, 0px));
  }

  .main:has(.public-sheet) .made-with,
  .main:has(.public-schedule) .made-with {
    padding-left: max(1.1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.1rem, env(safe-area-inset-right, 0px));
  }

  .create-sheet {
    padding: 1.85rem 1.6rem 2.1rem;
  }

  .panel-header {
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .link-actions {
    width: 100%;
  }

  .link-actions .btn {
    flex: 1 1 auto;
    min-height: 2.85rem;
  }

  .builder-row {
    grid-template-columns: 1fr;
  }

  .duration-choices {
    grid-template-columns: repeat(3, 1fr);
  }

  .weekday-chip {
    min-width: 0;
    min-height: 3rem;
    font-size: 0.95rem;
  }

  .builder-ai-prompt {
    min-height: 6.5rem;
    font-size: 1.05rem;
  }

  .btn-lg {
    width: 100%;
  }

  .calendar-widget {
    max-width: 100%;
  }

  .studio-tabs {
    top: 0.1rem;
  }

  .slot-admin,
  .slot-admin-form {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .slot-admin-name {
    grid-column: 1 / -1;
    min-height: 2.85rem;
  }

  .studio-chrome .link-actions {
    width: 100%;
    margin-left: 0;
  }

  .brand-mark {
    font-size: 1.2rem;
  }

  .topbar {
    gap: 0.65rem;
  }

  .nav-link,
  .nav-button {
    min-height: 2.75rem;
    padding: 0.55rem 0.35rem;
  }

  .builder-ai-sample {
    min-height: 2.85rem;
    padding: 0.55rem 0.95rem;
    font-size: 0.95rem;
  }

  .slot-main {
    display: grid;
    gap: 0.85rem;
  }

  .slot-claim-btn,
  .slot-main .btn-primary {
    width: 100%;
    min-height: 3.1rem;
  }

  .day-rail {
    top: 0.1rem;
    margin-left: -0.15rem;
    margin-right: -0.15rem;
  }

  .day-rail-track {
    padding-left: 0.15rem;
    padding-right: 0.15rem;
  }

  .day-rail-item {
    width: 5.6rem;
    min-height: 5.6rem;
    padding: 0.75rem 0.4rem 0.8rem;
  }

  .time-chip-grid,
  .admin-time-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  /* Find a time: one option per row so the Can / Can't buttons sit side by
     side on a single line instead of wrapping into three-line pills. */
  .time-chip-grid.avail-chip-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
  }

  .avail-chip {
    gap: 0.6rem;
    padding: 0.85rem 0.9rem 0.8rem;
  }

  .avail-chip-actions {
    gap: 0.5rem;
  }

  .avail-choice {
    white-space: nowrap;
    min-height: 2.75rem;
  }

  .time-chip,
  .time-chip-mine-card {
    min-height: 5.35rem;
    padding: 0.9rem 0.75rem;
  }

  .booking-drawer {
    width: 100%;
    max-width: 100%;
  }

  .booking-drawer-body {
    padding: 0 1.6rem 1.85rem;
  }

  .inline-actions .btn-lg {
    flex: 1 1 100%;
  }

  body:has(.landing) .main,
  body:has(.marketing) .main {
    padding-bottom: 0;
  }

  .auth-modal {
    width: calc(100% - 1.25rem);
    max-width: calc(100% - 1.25rem);
    max-height: calc(100dvh - 1.25rem);
    overflow: auto;
    margin: auto;
  }

  .auth-modal-body {
    padding: 0 1.35rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  }

  .site-footer {
    padding-bottom: max(3rem, calc(1.75rem + env(safe-area-inset-bottom, 0px)));
  }

  .page-preview-add .btn {
    width: 100%;
    min-height: 3.1rem;
  }

  /* No hover on phones: Remove sits as a quiet row at the foot of the card. */
  .page-preview-remove-form {
    position: static;
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
  }

  .page-preview-row:has(.page-preview-remove-form) .slot-main {
    padding-top: 0;
  }

  .page-preview-remove,
  .details-edit-link .btn {
    min-height: 2.75rem;
  }

  .me .panel-header,
  .panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-header .btn {
    width: 100%;
    min-height: 2.85rem;
  }

  .timezone-select,
  .field input,
  .field textarea,
  .field select {
    min-height: 3.1rem;
  }

  .field trix-editor {
    min-height: 6.5rem;
  }

  .schedule-chat-thread {
    max-height: min(16rem, 38vh);
  }

  .page-hero-title {
    font-size: clamp(1.85rem, 8.4vw, 2.45rem);
  }
}

.field trix-editor,
.page-preview-field trix-editor {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.field trix-editor {
  font: inherit;
  color: var(--ink-deep);
  background: var(--foam);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  min-height: 6.5rem;
}

.field trix-editor:focus {
  outline: 2px solid rgba(11, 79, 108, 0.35);
  outline-offset: 2px;
}

trix-toolbar {
  min-width: 0;
}

trix-toolbar .trix-button-row {
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* The description reads like the public page; formatting tools only show
   while you're in it, below the text so nothing jumps when they appear. */
.page-preview-field trix-toolbar {
  display: none;
  order: 2;
  margin: 0.35rem 0 0 -0.4rem;
  animation: rise var(--duration-fast) var(--ease-out) both;
}

.page-preview-field:focus-within trix-toolbar {
  display: block;
}

.page-preview-field trix-editor.page-preview-lede {
  min-height: 2.4rem;
  padding: 0.25rem 0.4rem;
  resize: none;
}

.page-preview-field trix-editor.page-preview-lede:empty::before {
  color: var(--ink-soft);
  opacity: 0.75;
}

.sheet-rich-text,
.sheet-rich-text .trix-content,
trix-editor,
.trix-content {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sheet-rich-text .trix-content {
  color: inherit;
  line-height: inherit;
}

.sheet-rich-text .trix-content > * + * {
  margin-top: 0.65em;
}

.sheet-rich-text .trix-content a,
trix-editor a,
.trix-content a {
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: break-all;
}

.trix-content .attachment,
.trix-content .attachment--file,
action-text-attachment {
  display: block;
  max-width: 100%;
  min-width: 0;
}

.attachment__name,
.attachment__caption,
.trix-content .attachment__name,
trix-editor .attachment__metadata .attachment__name {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-all;
  white-space: normal;
}
