/* OpenHour — one stylesheet. Mobile first, scales up to desktop. */

/* ------------------------------------------------------------- tokens */
:root {
  /* Warm paper base rather than a cold grey — softer for a care context. */
  --paper:      #f8f6f2;
  --surface:    #ffffff;
  --surface-2:  #fdfcfa;

  --ink:        #16241f;
  --ink-2:      #4a5a55;
  --ink-3:      #7c8b85;
  --line:       #e7e2d9;
  --line-2:     #f0ece4;

  /* Brand: deep sea green. Calm and clinical without being corporate blue. */
  --brand-900:  #06403a;
  --brand-800:  #085449;
  --brand-700:  #0b6b5f;
  --brand-600:  #0e8577;
  --brand-500:  #14a897;
  --brand-200:  #b4e5dc;
  --brand-100:  #d7f0eb;
  --brand-050:  #eefaf7;

  /* Matched — warm amber, "something is waiting for you". */
  --sun-700:    #92551a;
  --sun-600:    #b4690e;
  --sun-200:    #f5dfb0;
  --sun-100:    #fdf1d8;
  --sun-050:    #fefaf0;

  /* Reserved — iris. Distinct from both, reads as settled. */
  --iris-700:   #4a43c4;
  --iris-600:   #5b54d6;
  --iris-200:   #d5d1fa;
  --iris-100:   #e9e7fd;
  --iris-050:   #f4f3fe;

  --danger:     #b4272a;
  --danger-bg:  #fdeaea;
  --danger-line:#f4c9c9;

  --radius-lg:  20px;
  --radius:     14px;
  --radius-sm:  10px;
  --radius-xs:  8px;

  /* Layered: a tight contact shadow plus a wide soft one. */
  --shadow-sm:  0 1px 2px rgba(12, 40, 34, .05), 0 1px 3px rgba(12, 40, 34, .04);
  --shadow:     0 1px 2px rgba(12, 40, 34, .05), 0 8px 20px -6px rgba(12, 40, 34, .10);
  --shadow-lg:  0 1px 2px rgba(12, 40, 34, .04), 0 18px 44px -12px rgba(12, 40, 34, .16);
  --shadow-brand: 0 6px 18px -6px rgba(11, 107, 95, .45);

  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;

  --tap: 44px;               /* minimum comfortable touch target */
  --shell: 1120px;           /* max content width */
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-ui);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------- background */
/* Two soft colour blooms plus a fine grain, both fixed and inert. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    radial-gradient(760px 520px at 8% -8%,   rgba(20, 168, 151, .20), transparent 62%),
    radial-gradient(680px 460px at 96% 4%,   rgba(244, 186, 122, .22), transparent 60%),
    radial-gradient(900px 700px at 50% 108%, rgba(91, 84, 214, .10), transparent 62%);
}

body::after {
  /* feTurbulence grain, kept very faint so it reads as paper, not noise. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: .035;
  mix-blend-mode: multiply;
}

/* --------------------------------------------------------- typography */
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.15; letter-spacing: -.02em; }
p { margin: 0 0 1rem; }
a { color: var(--brand-700); text-underline-offset: 3px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .71rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-700);
  background: var(--brand-050);
  border: 1px solid var(--brand-100);
  padding: .32rem .7rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}
.eyebrow .spark {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(20, 168, 151, .18);
}

/* ------------------------------------------------------------- brand */
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; }
.brand-mark { width: 34px; height: 34px; flex: none; border-radius: 10px; box-shadow: var(--shadow-brand); }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.16rem;
  letter-spacing: -.02em;
  color: var(--brand-900);
}
.brand-name em { font-style: normal; color: var(--brand-600); }

/* ----------------------------------------------------------- buttons */
.btn {
  font: inherit;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: var(--tap);
  padding: .7rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease,
              box-shadow .16s ease, transform .08s ease, color .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-block { display: flex; width: 100%; }

.btn-primary {
  background: linear-gradient(180deg, var(--brand-600), var(--brand-700));
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--brand-500), var(--brand-600));
  box-shadow: 0 8px 22px -6px rgba(11, 107, 95, .55);
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink-2);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover:not(:disabled) { border-color: var(--brand-200); color: var(--brand-700); }

.btn-sm { min-height: 38px; padding: .4rem .8rem; font-size: .85rem; }

:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 2px; border-radius: var(--radius-xs); }

/* ------------------------------------------------------------- forms */
label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-2);
  margin: 1.1rem 0 .4rem;
}

input[type="text"], input[type="email"], select {
  font: inherit;
  width: 100%;
  min-height: var(--tap);
  padding: .7rem .85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  appearance: none;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
input::placeholder { color: #a9b5b0; }
input[type="text"]:focus, input[type="email"]:focus, select:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(20, 168, 151, .15);
}

.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 1.05rem; top: 50%;
  width: 8px; height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg);
  pointer-events: none;
}

.field-hint { margin: .45rem 0 0; font-size: .77rem; color: var(--ink-3); }

.form-error {
  display: flex;
  gap: .55rem;
  margin: .9rem 0 0;
  padding: .65rem .8rem;
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  color: var(--danger);
  border-radius: var(--radius-sm);
  font-size: .86rem;
}

.fineprint { margin: 1.2rem 0 0; font-size: .75rem; color: var(--ink-3); line-height: 1.5; }

/* ---------------------------------------------------------- services */
/* Segmented picker on the booking page: the service the next picks are for. */
.service-card .card-sub { margin-bottom: .9rem; }

.service-picker { display: grid; gap: .5rem; }

.service-opt {
  font: inherit;
  display: flex; align-items: center; gap: .6rem;
  min-height: var(--tap);
  padding: .6rem .9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink-2);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease,
              color .15s ease, box-shadow .15s ease;
}
.service-opt:hover:not(.is-on) { border-color: var(--brand-200); background: var(--brand-050); color: var(--brand-700); }

.service-opt-label { flex: 1; display: flex; align-items: center; gap: .45rem; min-width: 0; }
.service-opt-name { font-size: .92rem; font-weight: 600; }
.service-opt-abbr {
  flex: none;
  font-size: .66rem; font-weight: 800;
  letter-spacing: .06em;
  padding: .1rem .3rem;
  border-radius: 5px;
  background: rgba(22, 36, 31, .09);
  opacity: .8;
}
.service-opt.is-on .service-opt-abbr { background: rgba(255, 255, 255, .24); opacity: 1; }

.service-opt-count {
  flex: none;
  min-width: 22px;
  padding: .05rem .4rem;
  border-radius: 999px;
  font-size: .72rem; font-weight: 700;
  text-align: center;
  background: var(--brand-100);
  color: var(--brand-700);
  font-variant-numeric: tabular-nums;
}

.service-opt.is-on {
  background: linear-gradient(180deg, var(--brand-600), var(--brand-700));
  border-color: var(--brand-700);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.service-opt.is-on .service-opt-count { background: rgba(255, 255, 255, .24); color: #fff; }

@media (min-width: 620px) {
  .service-picker { grid-template-columns: repeat(3, 1fr); }
}

/* Two-letter service tag under the time. Shown on every hour that has a service,
   matching the current selection or not, so what is being booked is never ambiguous.
   It inherits the button's colour, which keeps it legible on all four states. */
.svc-tag {
  display: block;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .07em;
  line-height: 1.15;
  color: inherit;
  opacity: .72;
}
/* Hours with no service yet still reserve the line, so the grid stays even. */
.svc-tag.is-blank { visibility: hidden; }

/* Chips grouped under a service heading. */
.chip-group + .chip-group { margin-top: .95rem; }
.chip-group-title {
  display: flex; align-items: center; gap: .35rem;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3);
}
.chip-group-title svg { width: 11px; height: 11px; }
.chip-group-abbr {
  font-weight: 800;
  padding: .05rem .28rem;
  border-radius: 4px;
  background: var(--line-2);
  color: var(--ink-3);
  letter-spacing: .06em;
}
.chip-group .chips { margin-top: .45rem; }

/* -------------------------------------------------- who this page is for */
.identity { display: flex; align-items: center; gap: .8rem; margin-bottom: .85rem; }
.avatar {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-700));
  color: #fff;
  font-size: 1rem; font-weight: 700;
  letter-spacing: .02em;
  box-shadow: var(--shadow-brand);
}
.identity-text { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; }
.identity-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 4.6vw, 1.7rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--brand-900);
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Small echo in the sticky bar, for when the page is scrolled past the name. */
.who-name-mini {
  font-size: .84rem; font-weight: 600;
  color: var(--ink-2);
  max-width: 40vw;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* -------------------------------------------------------------- card */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.35rem;
}
.card-title { font-size: 1.05rem; font-weight: 700; letter-spacing: -.015em; margin: 0; }
.card-sub { color: var(--ink-3); font-size: .87rem; margin: .2rem 0 0; }

/* ----------------------------------------------------------- landing */
.landing { min-height: 100vh; display: flex; flex-direction: column; }

.topbar { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 1.4rem 1.15rem .5rem; }

.hero {
  flex: 1; width: 100%;
  max-width: var(--shell); margin: 0 auto;
  padding: 1.5rem 1.15rem 2rem;
  display: grid;
  gap: 2.25rem;
  align-content: start;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 7.5vw, 3.4rem);
  color: var(--brand-900);
}
.hero-copy h1 .accent { color: var(--brand-600); font-style: italic; }

.lede { font-size: 1.04rem; color: var(--ink-2); max-width: 33rem; }

.hero-points { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: .75rem; }
.hero-points li { display: flex; align-items: flex-start; gap: .7rem; font-size: .93rem; color: var(--ink-2); }
.hero-points .tick {
  flex: none;
  width: 20px; height: 20px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--brand-100);
  color: var(--brand-700);
  display: grid; place-items: center;
}
.hero-points .tick svg { width: 11px; height: 11px; }

/* Product illustration: two columns of hours and where they overlap. */
.hero-art { position: relative; order: 3; }
.hero-art svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 20px 40px rgba(12, 40, 34, .12)); }

.signin-card { align-self: start; order: 2; }
.signin-card .card-title { font-size: 1.2rem; }
.signin-card button[type="submit"] { margin-top: 1.5rem; }

/* how it works */
.steps { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 1rem 1.15rem 3rem; display: grid; gap: 1rem; }
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
}
.step-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: grid; place-items: center;
  margin-bottom: .8rem;
  background: var(--brand-050);
  border: 1px solid var(--brand-100);
  color: var(--brand-700);
}
.step-icon svg { width: 19px; height: 19px; }
.step-n { font-size: .69rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.step h3 { font-size: 1rem; margin: .2rem 0 .3rem; }
.step p { font-size: .87rem; color: var(--ink-2); margin: 0; }

.site-footer { border-top: 1px solid var(--line); background: rgba(255, 255, 255, .5); }
.site-footer-inner {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem;
  justify-content: space-between; align-items: center;
  max-width: var(--shell); width: 100%; margin: 0 auto;
  padding: 1.1rem 1.15rem;
  font-size: .78rem; color: var(--ink-3);
}
.demo-tag {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 600; color: var(--sun-700);
  background: var(--sun-100); border: 1px solid var(--sun-200);
  padding: .2rem .6rem; border-radius: 999px;
  font-size: .72rem;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr .95fr;
    gap: 3.5rem;
    padding-top: 2.5rem;
    align-items: center;
  }
  .hero-art   { grid-column: 1; grid-row: 2; margin-top: -.5rem; }
  .signin-card { grid-column: 2; grid-row: 1 / span 2; }
  .card { padding: 1.75rem; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 1.15rem; }
}

/* --------------------------------------------------------- app shell */
.app { min-height: 100vh; display: flex; flex-direction: column; }

.appbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.appbar-inner {
  max-width: var(--shell); margin: 0 auto;
  padding: .65rem 1.15rem;
  display: flex; align-items: center; gap: .75rem;
}
.appbar .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
.appbar .brand-name { font-size: 1.02rem; }
.appbar-spacer { flex: 1; }

.whoami { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; min-width: 0; }
.whoami .who-name {
  font-size: .82rem; font-weight: 600;
  max-width: 38vw;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pill {
  display: inline-block;
  font-size: .66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: .1rem .5rem;
  border-radius: 999px;
  border: 1px solid transparent;
}
.pill-provider { background: var(--brand-100); color: var(--brand-700); border-color: var(--brand-200); }
.pill-patient  { background: var(--iris-100); color: var(--iris-700); border-color: var(--iris-200); }

.app-main {
  flex: 1; width: 100%;
  max-width: var(--shell); margin: 0 auto;
  padding: 1.25rem 1.15rem 8rem;
  display: grid;
  gap: 1.15rem;
}

.page-head h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.45rem, 4.5vw, 1.95rem);
  color: var(--brand-900);
}
.page-head p { color: var(--ink-2); font-size: .93rem; margin: 0; max-width: 44rem; }

/* ---------------------------------------------------------- calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: 1rem; }
.cal-title { font-size: 1.02rem; font-weight: 700; letter-spacing: -.015em; }
.cal-nav { display: flex; gap: .35rem; }
.cal-nav button {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}
.cal-nav button svg { width: 15px; height: 15px; }
.cal-nav button:hover:not(:disabled) { border-color: var(--brand-200); color: var(--brand-700); background: var(--brand-050); }
.cal-nav button:disabled { opacity: .35; cursor: not-allowed; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-dow {
  text-align: center;
  font-size: .66rem; font-weight: 700;
  color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .07em;
  padding-bottom: .45rem;
}

.cal-day {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 40px;
  display: grid; place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  font: inherit;
  font-size: .9rem; font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, transform .08s ease;
}
.cal-day:hover:not(:disabled):not(.is-selected) { background: var(--brand-050); border-color: var(--brand-100); }
.cal-day:active:not(:disabled) { transform: scale(.94); }
.cal-day.is-empty { visibility: hidden; }
.cal-day:disabled { color: #c3ccc9; cursor: not-allowed; }
.cal-day.is-today { font-weight: 800; box-shadow: inset 0 0 0 1.5px var(--brand-200); }
.cal-day.is-selected {
  background: linear-gradient(180deg, var(--brand-600), var(--brand-700));
  border-color: var(--brand-700);
  color: #fff; font-weight: 700;
  box-shadow: var(--shadow-brand);
}

.cal-day .dot {
  position: absolute; bottom: 5px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand-600);
}
.cal-day .dot.dot-matched  { background: var(--sun-600); }
.cal-day .dot.dot-reserved { background: var(--iris-600); }
.cal-day.is-selected .dot { background: rgba(255, 255, 255, .95); }

.cal-legend {
  display: flex; flex-wrap: wrap; gap: .5rem .95rem;
  margin-top: 1rem; padding-top: .9rem;
  border-top: 1px solid var(--line-2);
  font-size: .75rem; color: var(--ink-3);
}
.cal-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.swatch { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.swatch-pending  { background: var(--brand-600); }
.swatch-matched  { background: var(--sun-600); }
.swatch-reserved { background: var(--iris-600); }

/* ------------------------------------------------------------- times */
.times-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.times-sub { font-size: .82rem; color: var(--ink-3); margin: .2rem 0 0; }

.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: .45rem;
  margin-top: 1.1rem;
}
.time-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .1rem;
  font: inherit;
  font-size: .85rem; font-weight: 500;
  font-variant-numeric: tabular-nums;
  min-height: 50px;
  padding: .4rem .3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color .13s ease, border-color .13s ease,
              color .13s ease, transform .08s ease, box-shadow .13s ease;
}
.time-btn:hover:not(:disabled) { border-color: var(--brand-200); color: var(--brand-700); background: var(--brand-050); }
.time-btn:active:not(:disabled) { transform: scale(.96); }

.time-btn.is-picked {
  background: linear-gradient(180deg, var(--brand-600), var(--brand-700));
  border-color: var(--brand-700);
  color: #fff; font-weight: 600;
  box-shadow: var(--shadow-brand);
}
.time-btn.is-saved {
  background: var(--brand-050);
  border-color: var(--brand-200);
  color: var(--brand-700);
  font-weight: 600;
}
/* Held for a service other than the one selected: still yours, just not this list. */
.time-btn.is-saved.is-other {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink-3);
}
.time-btn.is-picked.is-other {
  background: var(--brand-100);
  border-color: var(--brand-200);
  color: var(--brand-800);
  box-shadow: none;
}
.time-btn.is-picked .svc-tag { opacity: .85; }
.time-btn.is-matched {
  background: var(--sun-100);
  border-color: var(--sun-200);
  color: var(--sun-700);
  font-weight: 600;
  cursor: not-allowed;
}
.time-btn.is-reserved {
  background: var(--iris-100);
  border-color: var(--iris-200);
  color: var(--iris-700);
  font-weight: 600;
  cursor: not-allowed;
}

/* ------------------------------------------------------ empty states */
.empty-state {
  display: grid;
  justify-items: center;
  gap: .7rem;
  color: var(--ink-3);
  font-size: .88rem;
  text-align: center;
  padding: 1.9rem 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  margin-top: 1rem;
}
.empty-state svg { width: 76px; height: 54px; }
.empty-state p { margin: 0; max-width: 26rem; }

/* ------------------------------------------------------------- chips */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .32rem .35rem .32rem .72rem;
  border-radius: 999px;
  font-size: .79rem; font-weight: 600;
  background: var(--brand-050);
  border: 1px solid var(--brand-100);
  color: var(--brand-700);
  font-variant-numeric: tabular-nums;
}
.chip-matched  { background: var(--sun-100);  border-color: var(--sun-200);  color: var(--sun-700); }
.chip-reserved { background: var(--iris-100); border-color: var(--iris-200); color: var(--iris-700); }
.chip-static   { padding-right: .72rem; }
.chip-x {
  border: 0; background: transparent;
  color: inherit; cursor: pointer;
  font-size: 1rem; line-height: 1;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  transition: background-color .14s ease;
}
.chip-x:hover { background: rgba(0, 0, 0, .09); }

/* ----------------------------------------------------------- matches */
.match-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.match-item {
  display: flex; align-items: center; gap: .8rem;
  flex-wrap: wrap;
  padding: .9rem;
  border: 1px solid var(--sun-200);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--sun-050), var(--sun-100));
}
.match-item.is-reserved {
  border-color: var(--iris-200);
  background: linear-gradient(180deg, var(--iris-050), var(--iris-100));
}
.match-icon {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--sun-600);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 4px 10px -3px rgba(180, 105, 14, .55);
}
.match-icon svg { width: 16px; height: 16px; }
.match-icon-reserved { background: var(--iris-600); box-shadow: 0 4px 10px -3px rgba(91, 84, 214, .5); }

.match-text { flex: 1 1 13rem; min-width: 0; }
.match-when { font-weight: 700; font-size: .93rem; letter-spacing: -.01em; }
.match-with { font-size: .82rem; color: var(--ink-2); word-break: break-word; }
.match-status { font-size: .79rem; color: var(--sun-700); margin-top: .15rem; }
.match-status.is-reserved { color: var(--iris-700); font-weight: 600; }

.match-action { flex: none; margin-left: auto; }

.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: .3rem .65rem;
  border-radius: 999px;
}
.badge svg { width: 11px; height: 11px; }
.badge-reserved { background: var(--iris-200); color: var(--iris-700); }

@media (max-width: 430px) {
  .match-action { margin-left: 0; width: 100%; }
  .match-action.btn { min-height: var(--tap); }
  .badge-reserved { justify-content: center; }
}

/* --------------------------------------------------------- actionbar */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 26px -12px rgba(12, 40, 34, .18);
  padding: .8rem 1.15rem calc(.8rem + env(safe-area-inset-bottom));
}
.actionbar-inner { max-width: var(--shell); margin: 0 auto; display: flex; align-items: center; gap: 1rem; }
.actionbar-count { flex: 1; font-size: .85rem; color: var(--ink-2); min-width: 0; }
.actionbar-count strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.actionbar .btn-primary { min-width: 170px; }

@media (max-width: 500px) {
  .actionbar-inner { flex-direction: column; align-items: stretch; gap: .55rem; }
  .actionbar-count { text-align: center; }
  .actionbar .btn-primary { width: 100%; }
}

@media (min-width: 900px) {
  .app-main { grid-template-columns: 1fr 1fr; align-items: start; padding-bottom: 7rem; }
  .app-main > .page-head,
  .app-main > .full { grid-column: 1 / -1; }
}

/* ------------------------------------------------------------- toast */
.toast {
  position: fixed;
  left: 50%; bottom: 7rem;
  transform: translateX(-50%) translateY(14px);
  z-index: 40;
  max-width: min(92vw, 440px);
  padding: .85rem 1.05rem;
  border-radius: var(--radius);
  background: var(--brand-900);
  color: #fff;
  font-size: .88rem;
  line-height: 1.45;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s cubic-bezier(.2, .8, .3, 1);
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.is-error   { background: #7f1d1d; }
.toast.is-success { background: var(--iris-700); }

/* ------------------------------------------------------------ motion */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.rise { animation: rise .5s cubic-bezier(.2, .8, .3, 1) both; }
.rise-1 { animation-delay: .04s; }
.rise-2 { animation-delay: .10s; }
.rise-3 { animation-delay: .16s; }
.rise-4 { animation-delay: .22s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
