/* =========================================================
   Idővonal — foglalási felület design rendszer
   Paletta: tintakék + borostyán, meleg papír alapon.
   A jegy-motívum (perforált szegély) a teljes felületen
   visszatér: a foglalás olyan, mint egy kiállított jegy.
   ========================================================= */


:root {
  /* --- Színek --- */
  --ink: #1c2541;
  --ink-soft: #3a4361;
  --paper: #f6f2ea;
  --paper-raised: #fffdf9;
  --paper-sunken: #efe8da;
  --line: #e2d9c6;
  --line-strong: #cdc0a3;

  --amber: #e2a33b;
  --amber-ink: #7a4b12;
  --amber-soft: #fbead0;

  --sage: #416653;
  --sage-soft: #e4ede7;
  --rose: #b23a48;
  --rose-soft: #f7e5e6;

  --muted: #6b6558;

  --shadow-sm: 0 2px 8px rgba(28, 37, 65, 0.06);
  --shadow-md: 0 12px 32px rgba(28, 37, 65, 0.10);
  --shadow-lg: 0 24px 60px rgba(28, 37, 65, 0.16);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --font-display: 'Iowan Old Style', 'Palatino Linotype', ui-serif, Georgia, serif;
  --font-body: 'Segoe UI', ui-sans-serif, system-ui, -apple-system, Arial, sans-serif;
  --font-mono: 'Cascadia Mono', Consolas, ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* --- Alap --- */
* { box-sizing: border-box; }
[v-cloak] { display: none !important; }

html { scroll-behavior: smooth; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 5000;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--paper-raised);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-140%);
}
.skip-link:focus { transform: translateY(0); }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% -10%, rgba(226, 163, 59, 0.14), transparent 40rem),
    radial-gradient(circle at 100% 0%, rgba(28, 37, 65, 0.08), transparent 34rem),
    var(--paper);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2.5px solid var(--amber);
  outline-offset: 2px;
}

.password-field {
  position: relative;
  display: block;
  width: 100%;
}
.password-field > input {
  width: 100%;
  padding-right: 52px;
}
.password-field > input::-ms-reveal,
.password-field > input::-ms-clear { display: none; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 2px;
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 9px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}
.password-toggle:hover { background: var(--paper-sunken); color: var(--ink); }
.password-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
h1 { margin: 0; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.06; font-weight: 600; }
h2 { margin: 0 0 4px; font-size: clamp(20px, 2.6vw, 25px); }
h3 { margin: 0; font-size: 17px; }
p { margin: 0; }
.lead { color: var(--muted); font-size: 16.5px; max-width: 46ch; }

.mono { font-family: var(--font-mono); letter-spacing: -0.01em; }

/* --- Topbar --- */
.topbar {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 13px; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--paper-raised);
  background: linear-gradient(155deg, var(--ink), #2c3968);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  box-shadow: var(--shadow-sm);
}
.brand-mark img { width:100%; height:100%; object-fit:contain; display:block; border-radius:inherit; background:#fff; }
.brand strong { display: block; font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.brand small { display: block; color: var(--muted); font-size: 12.5px; }
nav { display: flex; gap: 10px; }
nav a, .ghost-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  background: var(--paper-raised);
  transition: border-color .15s ease, transform .15s ease;
}
nav a:hover, .ghost-link:hover { border-color: var(--ink); transform: translateY(-1px); }

/* --- Layout --- */
.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 72px;
}
.narrow { width: min(720px, calc(100% - 32px)); }

.booking-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-raised);
  box-shadow: var(--shadow-md);
  padding: 30px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--amber-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--amber);
}

/* --- Stepper --- */
.stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 26px 0 32px;
  list-style: none;
  padding: 0;
}
.stepper li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 600;
  font-size: 13.5px;
}
.stepper li .dot {
  width: 30px; height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--paper-raised);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  transition: all .2s ease;
}
.stepper li.done .dot { background: var(--ink); border-color: var(--ink); color: var(--paper-raised); }
.stepper li.active .dot { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.stepper li.active, .stepper li.done { color: var(--ink); }
.stepper .step-label { display: none; }
.stepper .bar {
  width: 34px;
  height: 1.5px;
  margin: 0 10px;
  background: var(--line-strong);
}
.stepper li.done + .bar,
.stepper li.done ~ .bar.filled { background: var(--ink); }
@media (min-width: 640px) { .stepper .step-label { display: inline; } }

/* --- Category chips --- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.chip {
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.selected { background: var(--ink); border-color: var(--ink); color: var(--paper-raised); }

/* --- Service cards --- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.service-card {
  position: relative;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-raised);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 150px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.service-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.service-card.selected { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.service-card .cat {
  color: var(--amber-ink);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.service-card .name { font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.service-card .desc { color: var(--muted); font-size: 13.5px; flex: 1; }
.service-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
}
.service-card .meta .price { font-weight: 600; color: var(--ink); }
.service-card .check {
  position: absolute;
  top: 14px; right: 14px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: var(--paper-raised);
  display: grid;
  place-items: center;
}
.service-card.selected .check { background: var(--amber); border-color: var(--amber); }
.service-card.selected .check svg { opacity: 1; }
.service-card .check svg { opacity: 0; width: 13px; height: 13px; }

/* --- Date strip --- */
.date-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  margin-top: 8px;
  scrollbar-width: thin;
}
.date-pill {
  flex: none;
  width: 62px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.date-pill:hover { transform: translateY(-2px); }
.date-pill .dow { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; font-weight: 700; letter-spacing: .04em; }
.date-pill .dnum { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 600; margin-top: 2px; }
.date-pill.selected { border-color: var(--amber); background: var(--amber-soft); }
.date-pill.today .dnum::after { content: '•'; color: var(--amber-ink); margin-left: 2px; }
.date-custom { margin-top: 10px; }
.date-custom summary { cursor: pointer; color: var(--ink-soft); font-weight: 600; font-size: 13.5px; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.date-custom summary::-webkit-details-marker { display: none; }
.date-custom input { max-width: 220px; margin-top: 10px; }

/* --- Time slots (grouped rail) --- */
.slot-period { margin-top: 20px; }
.slot-period h4 {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.slot-period h4::before { content: ''; width: 14px; height: 1.5px; background: var(--line-strong); }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 9px; }
.slot {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
  color: var(--ink);
  cursor: pointer;
  padding: 10px 8px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  transition: all .15s ease;
}
.slot:hover { border-color: var(--ink-soft); }
.slot.selected { background: var(--ink); border-color: var(--ink); color: var(--paper-raised); }

/* --- Forms --- */
.field, label { display: block; color: var(--ink-soft); font-weight: 600; font-size: 13.5px; margin-top: 16px; }
input, select, textarea {
  width: 100%;
  min-height: 46px;
  margin-top: 7px;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
  font: inherit;
  color: var(--ink);
  transition: border-color .15s ease;
}
textarea { min-height: 88px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { border-color: var(--ink); }
::placeholder { color: #716a5c; opacity:1; }
.field-error { display:block; margin-top:6px; color:var(--rose); font-size:12px; line-height:1.45; font-weight:700; }
input:invalid:not(:placeholder-shown), textarea:invalid:not(:placeholder-shown) { border-color:rgba(190,68,78,.55); }

.booking-form, .form-row, .login-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 16px;
  margin-top: 4px;
}
.full { grid-column: 1 / -1; }

/* --- Buttons --- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-raised);
  color: var(--ink);
  cursor: pointer;
  min-height: 48px;
  padding: 10px 22px;
  font: inherit;
  font-weight: 700;
  font-size: 14.5px;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.button.primary { border-color: var(--ink); color: var(--paper-raised); background: var(--ink); }
.button.primary:hover { background: #262f52; }
.button.danger { border-color: var(--rose); color: var(--rose); background: var(--rose-soft); }
.button.danger:hover { background: var(--rose); color: #fff; }
.button.ghost { border-color: transparent; background: transparent; }
.button.sm { min-height: 36px; padding: 6px 14px; font-size: 13px; }
.button.block { width: 100%; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.spinner {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: currentColor;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Ticket (signature element) ---
   A perforált / fogazott szélű "jegy" motívum: a foglalás
   olyan, mint egy kiállított belépő. Ez a side-panel és a
   visszaigazoló képernyő közös eleme. */
.ticket {
  position: relative;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper-raised);
  box-shadow: var(--shadow-md);
  padding: 26px 26px 22px;
  overflow: hidden;
}
.ticket::before, .ticket::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--line);
  top: 148px;
}
.ticket::before { left: -12px; }
.ticket::after { right: -12px; }
.ticket .perforation {
  border-top: 1.5px dashed var(--line-strong);
  margin: 18px -26px 18px;
}
.ticket h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.ticket .stub-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.ticket .status-badge { margin-left: auto; }
.ticket dl { display: grid; gap: 13px; margin: 0; }
.ticket dl div { display: grid; grid-template-columns: 1fr; gap: 2px; }
.ticket dt { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.ticket dd { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.ticket dd.mono { font-family: var(--font-mono); font-size: 15px; font-weight: 600; }
.ticket .big-time { font-family: var(--font-mono); font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }

.side-panel { position: sticky; top: 20px; }

/* --- Status badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.booked { background: var(--sage-soft); color: var(--sage); }
.badge.completed { background: #e6e9f5; color: var(--ink); }
.badge.cancelled { background: var(--rose-soft); color: var(--rose); }
.badge.no_show { background: var(--paper-sunken); color: var(--muted); }

/* --- Notices / toasts --- */
.notice {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-sunken);
  font-size: 14px;
}
.notice a { text-decoration: underline; font-weight: 700; }
.notice.success { border-color: var(--sage); background: var(--sage-soft); color: #2c4b3c; }
.notice.error { border-color: var(--rose); background: var(--rose-soft); color: var(--rose); }
.empty {
  margin-top: 16px;
  padding: 22px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.toast-stack {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100% - 32px));
}
.toast {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--paper-raised);
  box-shadow: var(--shadow-md);
  font-size: 14px;
  animation: slide-in .2s ease;
}
.toast.success { border-color: var(--sage); }
.toast.error { border-color: var(--rose); color: var(--rose); }
@keyframes slide-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* --- Confirmation screen --- */
.confirm-wrap { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 22px; align-items: start; }
.confirm-hero { text-align: left; }
.confirm-hero .check-mark {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

/* --- Loading skeleton --- */
.skeleton { position: relative; overflow: hidden; background: var(--paper-sunken); border-radius: var(--radius-sm); }
.skeleton::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* =========================================================
   Admin
   ========================================================= */
.login-shell {
  min-height: calc(100vh - 90px);
  display: grid;
  place-items: center;
}
.login-card { width: min(400px, 100%); text-align: center; }
.login-card .brand-mark { margin: 0 auto 18px; }
.login-box { grid-template-columns: 1fr; margin-top: 22px; text-align: left; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 26px;
}
.stat-card {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-raised);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.stat-card .label { display: block; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.stat-card .value { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 600; margin-top: 4px; }
.stat-card.accent { border-color: var(--amber); }

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 6px;
}
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-row select, .filter-row input { min-height: 42px; margin-top: 0; width: auto; min-width: 150px; }
.filter-row input[type="text"] { min-width: 200px; }

.admin-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }

.table-wrap { overflow-x: auto; margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th {
  padding: 12px 14px;
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  background: var(--paper-sunken);
  border-bottom: 1px solid var(--line);
}
td { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(226, 163, 59, 0.06); }
td.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }
.customer-cell strong { display: block; }
.customer-cell small { color: var(--muted); }

.block-list { display: grid; gap: 10px; margin-top: 14px; }
.block-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-sunken);
}
.block-item .info { font-size: 13.5px; }
.block-item .info strong { display: block; font-family: var(--font-mono); }
.block-item .info span { color: var(--muted); }
.icon-btn {
  border: none; background: transparent; cursor: pointer;
  color: var(--muted); width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
}
.icon-btn:hover { background: var(--rose-soft); color: var(--rose); }

/* --- Details grid (manage page reuse) --- */
.details { display: grid; gap: 12px; }
.details div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; }

/* --- Responsive --- */
@media (max-width: 980px) {
  .booking-grid, .admin-layout, .confirm-wrap { grid-template-columns: 1fr; }
  .side-panel { position: static; }
  .stat-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .topbar { flex-direction: column; align-items: stretch; gap: 12px; }
  .booking-form, .form-row, .login-box { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .admin-toolbar { flex-direction: column; align-items: stretch; }
  .filter-row { flex-direction: column; }
  .filter-row select, .filter-row input { width: 100%; }
  input, select, textarea { font-size:16px; }
  nav { flex-wrap:wrap; }
  .button, nav a, .ghost-link { min-height:44px; }
  .toast-stack { top:10px; right:10px; width:calc(100% - 20px); }
  .panel { padding:22px 18px; }
  .shell, .narrow { width:calc(100% - 20px); max-width:1180px; }
}

@media (max-width: 390px) {
  .topbar { width:calc(100% - 20px); padding-top:16px; }
  .brand { min-width:0; }
  .brand > span:last-child { min-width:0; }
  .brand strong, .brand small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .button-row { align-items:stretch; }
  .button-row .button { flex:1 1 100%; }
  .ticket { padding-left:18px; padding-right:18px; }
  .ticket .big-time { font-size:25px; }
}

@media (forced-colors: active) {
  .button, .panel, .ticket, input, select, textarea, .badge, .toast { border:1px solid CanvasText; }
  .spinner { border-color:CanvasText; border-top-color:Highlight; }
}


/* Extra-small phone hardening */
@media (max-width:360px) {
  .topbar,
  .shell,
  .narrow { width:calc(100% - 16px); }
  .panel { padding:16px 12px; border-radius:16px; }
  .button { padding-left:13px; padding-right:13px; font-size:14px; }
  .button-row { flex-direction:column; align-items:stretch; }
  .button-row .button { width:100%; }
  .lead { font-size:15px; }
  .service-card { padding:14px; }
  .date-pill { width:58px; }
  .slot-grid { grid-template-columns:repeat(auto-fill,minmax(76px,1fr)); }
}


/* Extra-small 390px hardening */
@media (max-width:390px) {
  .panel { padding:20px 16px; }
  .button { min-height:44px; padding:9px 16px; }
  .button-row { flex-direction:column; align-items:stretch; }
  .button-row .button { width:100%; }
  .toast-stack { top:10px; right:10px; width:calc(100% - 20px); }
  .stepper { margin-top:20px; margin-bottom:24px; }
}
