/* N2D booking prototype — dependency-free, mobile-first */
:root {
  --paper: #f5f1ea;
  --surface: #fffdf9;
  --surface-2: #eee8df;
  --ink: #282522;
  --muted: #746e67;
  --line: #ddd5cb;
  --accent: #ad6655;
  --accent-dark: #874a3d;
  --accent-soft: #f0ddd6;
  --sage: #708071;
  --sage-soft: #e1e7df;
  --gold: #a98752;
  --blue: #657b86;
  --danger: #a84f4f;
  --shadow: 0 10px 35px rgba(57, 45, 34, .10);
  --radius: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(173,102,85,.25); outline-offset: 2px; }
button, [data-action] { -webkit-tap-highlight-color: transparent; }

#demoStrip { height: 30px; padding: 0 14px; border-bottom: 1px solid var(--line); background: #eee8df; color: #6f6861; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 10px; letter-spacing: .02em; }
#demoStrip .demo-dot { width: 6px; height: 6px; border-radius: 99px; background: var(--accent); }
#demoStrip button { margin-left: 6px; padding: 3px 7px; color: #655d56; border: 1px solid #c9c0b6; border-radius: 6px; background: rgba(255,255,255,.45); font-size: 10px; cursor: pointer; }
body[data-mode="customer"] #demoStrip { display: none; }
body[data-mode="customer"] #shell { min-height: 100vh; }
body[data-mode="customer"] .mode-switch,
body[data-mode="customer"] .saved-state,
body[data-mode="customer"] .mobile-nav { display: none; }
body[data-mode="customer"] #app { padding-bottom: 30px; }
body.modal-open { overflow: hidden; }
#shell { min-height: calc(100vh - 30px); }
.topbar { height: 68px; padding: 0 18px; border-bottom: 1px solid var(--line); background: rgba(245,241,234,.96); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; }
.brand { border: 0; padding: 0; background: none; display: flex; align-items: center; gap: 9px; cursor: pointer; text-align: left; }
.brand-mark { width: 34px; height: 33px; object-fit: contain; display: block; }
.brand strong { display: block; font: 600 18px Georgia, serif; letter-spacing: .01em; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .11em; }
.mode-switch { display: none; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: #ebe5dc; }
.mode-switch button { min-height: 36px; border: 0; border-radius: 9px; padding: 0 14px; color: var(--muted); background: transparent; cursor: pointer; font-size: 13px; }
.mode-switch button.active { color: var(--ink); background: var(--surface); box-shadow: 0 2px 9px rgba(42,35,30,.08); }
.topbar-end { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.language-switch { display: flex; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,253,249,.6); }
.language-switch button { min-width: 32px; min-height: 30px; padding: 0 7px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; font-size: 10px; font-weight: 750; letter-spacing: .04em; }
.language-switch button.active { color: var(--ink); background: var(--surface); box-shadow: 0 1px 5px rgba(42,35,30,.10); }
.saved-state { display: none; color: var(--sage); font-size: 12px; }
.saved-state::before { content: "✓"; margin-right: 5px; }
#app { min-height: calc(100vh - 100px); padding-bottom: calc(84px + var(--safe-bottom)); }

/* Shared */
.eyebrow { margin: 0 0 7px; color: var(--accent-dark); font-size: 11px; line-height: 1.2; text-transform: uppercase; letter-spacing: .13em; font-weight: 750; }
h1, h2, h3, p { margin-top: 0; }
h1, .serif { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
h1 { margin-bottom: 10px; font-size: clamp(30px, 9vw, 45px); line-height: 1.04; letter-spacing: -.025em; }
h2 { margin-bottom: 7px; font-size: 21px; letter-spacing: -.02em; }
h3 { margin-bottom: 5px; font-size: 15px; }
.subtle { color: var(--muted); font-size: 14px; line-height: 1.55; }
.microcopy { color: var(--muted); font-size: 12px; line-height: 1.45; }
.field-error { margin: 8px 2px 0; color: var(--danger); font-size: 13px; line-height: 1.45; }
.divider { height: 1px; background: var(--line); margin: 20px 0; }
.demo-badge, .status-pill { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 4px 9px; border-radius: 99px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.demo-badge { color: var(--accent-dark); background: var(--accent-soft); }
.status-pill { color: #4f6650; background: var(--sage-soft); }
.status-pill.warn { color: #856125; background: #f2e6cf; }
.status-pill.neutral { color: var(--muted); background: var(--surface-2); }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 2px 0 rgba(66,55,45,.02); }
.primary-btn, .secondary-btn, .quiet-btn, .danger-btn { min-height: 48px; border-radius: 13px; padding: 0 17px; font-weight: 700; cursor: pointer; transition: transform .15s, background .15s; }
.primary-btn:active, .secondary-btn:active, .quiet-btn:active { transform: scale(.985); }
.primary-btn { border: 1px solid var(--ink); color: #fff; background: var(--ink); }
.primary-btn:hover { background: #141312; }
.primary-btn:disabled { border-color: #b9b2aa; background: #b9b2aa; cursor: not-allowed; }
.secondary-btn { border: 1px solid var(--line); background: var(--surface); }
.secondary-btn:hover { border-color: #b8ada2; }
.quiet-btn { border: 0; background: transparent; color: var(--muted); }
.danger-btn { border: 1px solid #dcb8b5; color: var(--danger); background: #fff8f7; }
.icon-btn { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; display: grid; place-items: center; background: var(--surface); cursor: pointer; font-size: 20px; }
.full { width: 100%; }
.button-row { display: flex; gap: 10px; }
.button-row > * { flex: 1; }

/* Customer flow */
.customer-shell { max-width: 740px; margin: 0 auto; padding: 18px 16px 30px; }
.customer-top { display: flex; align-items: center; min-height: 44px; margin-bottom: 12px; }
.back-btn { width: 40px; height: 40px; margin-left: -9px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; font-size: 25px; }
.progress-wrap { flex: 1; padding: 0 8px; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.progress-track { height: 3px; border-radius: 9px; background: var(--line); overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); transition: width .25s; }
.intro-note { margin: 21px 0; padding: 13px 14px; border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; color: #655d55; background: #eee7dd; font-size: 12px; line-height: 1.5; }
.choice-stack { display: grid; gap: 10px; margin: 22px 0; }
.choice-card { width: 100%; min-height: 76px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; text-align: left; transition: border .15s, transform .15s, box-shadow .15s; }
.choice-card:hover { border-color: #bba99c; box-shadow: 0 8px 25px rgba(61,48,37,.07); transform: translateY(-1px); }
.choice-card.selected { border: 2px solid var(--accent); padding: 14px 15px; background: #fffaf7; }
.choice-card strong { display: block; margin-bottom: 4px; font-size: 16px; }
.choice-card small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.choice-arrow { color: var(--accent); font-size: 22px; }
.salon-symbol { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); display: grid; place-items: center; font: 500 19px Georgia, serif; }
.choice-main { flex: 1; display: flex; align-items: center; gap: 12px; }
.service-group { margin-top: 24px; }
.service-group-title { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; font: 500 18px Georgia, serif; }
.duration-pill { flex: 0 0 auto; padding: 6px 9px; border-radius: 9px; color: #5d5650; background: var(--surface-2); font-size: 12px; white-space: nowrap; }
.choice-card .price-line { display: block; margin-top: 3px; color: var(--accent-dark); font-size: 12px; font-weight: 650; }

/* Zdobení add-on picker — appears inline under a selected manicure card; never
   its own booking step, never changes the reserved appointment duration. */
.addon-panel { margin-top: 14px; padding: 14px; border: 1px dashed var(--line); border-radius: 16px; background: var(--surface); }
.addon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 8px; }
.addon-chip { min-height: 54px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; text-align: left; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.addon-chip strong { font-size: 12.5px; line-height: 1.3; }
.addon-chip small { color: var(--muted); font-size: 11px; }
.addon-chip.selected { border: 2px solid var(--accent); padding: 9px 11px; background: #fffaf7; }
.addon-chip.selected strong::before { content: "✓ "; color: var(--accent-dark); }
.selection-summary { margin: 14px 0 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.selection-summary strong { display: block; }
.selection-summary button { border: 0; padding: 6px; color: var(--accent-dark); background: transparent; font-weight: 700; cursor: pointer; }
.date-scroller { display: flex; gap: 8px; margin: 18px -16px 16px; padding: 0 16px 8px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.date-scroller::-webkit-scrollbar { display: none; }
.date-chip { flex: 0 0 64px; min-height: 76px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; scroll-snap-align: start; }
.date-chip .dow { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.date-chip .num { margin: 5px 0 2px; color: var(--ink); font: 500 22px Georgia, serif; }
.date-chip .tiny { font-size: 9px; }
.date-chip.selected { border-color: var(--ink); color: #fff; background: var(--ink); }
.date-chip.selected .num { color: #fff; }
.date-chip.unavailable { opacity: .46; }
.time-header { margin: 16px 0 10px; display: flex; align-items: center; justify-content: space-between; }
.time-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.time-btn { min-height: 47px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font-weight: 650; }
.time-btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.empty-times { padding: 30px 20px; border: 1px dashed #cfc4b9; border-radius: 16px; color: var(--muted); background: rgba(255,253,249,.5); text-align: center; font-size: 13px; line-height: 1.5; }
.field { margin: 15px 0; }
.field label, .field-label { display: block; margin-bottom: 7px; color: #4c4641; font-size: 12px; font-weight: 750; }
.input, .select { width: 100%; min-height: 50px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); }
textarea.input { min-height: 80px; padding-top: 12px; resize: vertical; }
.input::placeholder { color: #aaa29b; }
.segmented { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 13px; background: #ebe5dd; }
.segmented button { flex: 1; min-height: 40px; padding: 0 9px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; font-weight: 650; }
.segmented button.active { color: var(--ink); background: var(--surface); box-shadow: 0 2px 8px rgba(50,42,34,.08); }
.photo-upload { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 1px dashed #cfc4b9; border-radius: 12px; color: var(--accent-dark); background: rgba(255,253,249,.5); font-size: 13px; font-weight: 700; cursor: pointer; }
.photo-upload:hover { border-color: var(--accent); }
.photo-preview { display: flex; align-items: center; gap: 12px; }
.photo-thumb { width: 64px; height: 64px; border: 1px solid var(--line); border-radius: 12px; object-fit: cover; display: block; }
.photo-thumb-lg { width: 96px; height: 96px; border-radius: 14px; }
.toggle-line { min-height: 66px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toggle-line strong { display: block; margin-bottom: 3px; font-size: 13px; }
.toggle { position: relative; width: 46px; height: 27px; flex: 0 0 auto; }
.toggle input { position: absolute; opacity: 0; }
.toggle span { position: absolute; inset: 0; border-radius: 99px; background: #c7c0b8; transition: .2s; cursor: pointer; }
.toggle span::after { content: ""; width: 21px; height: 21px; border-radius: 50%; position: absolute; top: 3px; left: 3px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: .2s; }
.toggle input:checked + span { background: var(--sage); }
.toggle input:checked + span::after { transform: translateX(19px); }
.review-card { margin: 20px 0; padding: 4px 16px; }
.review-row { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 85px 1fr; gap: 12px; font-size: 13px; line-height: 1.45; }
.review-row:last-child { border: 0; }
.review-row span:first-child { color: var(--muted); }
.review-row strong { font-weight: 650; }
/* Phase 3D — the customer's own remembered bookings on the cancel screen
   (see app.js rememberMyBooking). Mobile-first: one card per booking, actions
   wrap under the text on narrow screens instead of forcing a wide row. */
.my-booking-list { display: grid; gap: 8px; }
.my-booking-row { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.my-booking-row.selected { border: 2px solid var(--accent); padding: 9px 11px; background: #fffaf7; }
.my-booking-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.my-booking-main strong { font-size: 13.5px; }
.my-booking-main small { color: var(--muted); font-size: 11.5px; }
.my-booking-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.my-booking-actions .quiet-btn { min-height: 38px; padding: 0 10px; font-size: 12.5px; }
.my-booking-actions .quiet-btn:disabled { opacity: .6; }
.confirmation { padding-top: 20px; text-align: center; }
.confirm-mark { width: 72px; height: 72px; margin: 10px auto 20px; border-radius: 50%; color: #fff; background: var(--sage); display: grid; place-items: center; font-size: 33px; box-shadow: 0 10px 30px rgba(78,101,81,.22); }
.confirmation .review-card { text-align: left; }
.confirmation .button-row { margin-top: 16px; }

/* Staff shell and navigation */
.staff-layout { max-width: 1440px; margin: 0 auto; }
.staff-main { padding: 18px 14px 30px; }
.staff-heading { margin-bottom: 15px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.staff-heading h1 { margin: 0; font-size: 30px; }
.staff-actions { display: flex; gap: 7px; }
.staff-actions .secondary-btn { min-height: 42px; padding: 0 11px; font-size: 12px; }
.salon-tabs { margin-bottom: 13px; }
.viewbar { margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.viewbar .segmented { flex: 1; }
.date-nav { display: flex; align-items: center; justify-content: space-between; margin: 14px 0; }
.date-nav-title { text-align: center; }
.date-nav-title strong { display: block; font: 500 18px Georgia, serif; }
.date-nav-title small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.day-meta { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.day-meta .pills { display: flex; flex-wrap: wrap; gap: 6px; }
.day-meta button { border: 0; padding: 8px; color: var(--accent-dark); background: transparent; cursor: pointer; font-size: 12px; font-weight: 750; }

/* Day schedule */
.schedule-card { border: 1px solid var(--line); border-radius: 17px; background: var(--surface); overflow: hidden; }
.schedule-head { min-height: 47px; padding: 0 12px 0 54px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.schedule-head strong { color: var(--ink); }
.timeline { position: relative; min-height: 480px; background: linear-gradient(to bottom, transparent 59px, #e7e0d8 60px); background-size: 100% 60px; }
.time-label { position: absolute; left: 8px; width: 39px; color: #857d75; font-size: 10px; transform: translateY(-6px); }
.timeline-events { position: absolute; inset: 0 7px 0 51px; }
.appt-card { position: absolute; z-index: 2; padding: 8px 8px 6px; border: 1px solid rgba(80,61,49,.11); border-left: 4px solid var(--accent); border-radius: 10px; overflow: hidden; background: #f0ddd6; cursor: pointer; text-align: left; box-shadow: 0 2px 5px rgba(47,38,30,.08); }
.appt-card:hover { z-index: 4; filter: brightness(.985); box-shadow: 0 5px 13px rgba(47,38,30,.13); }
.appt-card:focus-visible { z-index: 5; outline: 3px solid rgba(40,37,34,.28); outline-offset: 2px; }
.appt-card.color-1 { border-left-color: var(--accent); background: #f2ded7; }
.appt-card.color-2 { border-left-color: var(--sage); background: #e1e8df; }
.appt-card.color-3 { border-left-color: var(--blue); background: #dfe7e9; }
.appt-card.color-4 { border-left-color: var(--gold); background: #eee5d3; }
.appt-card .appt-time { display: block; margin-bottom: 2px; font-size: 9px; font-weight: 800; letter-spacing: .02em; }
.appt-card .appt-name { display: block; font-size: 12px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-card .appt-service { display: block; margin-top: 2px; font-size: 9px; line-height: 1.2; color: #5f5851; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.block-card { position: absolute; z-index: 1; right: 0; padding: 6px 8px; border: 1px dashed #9d948b; border-radius: 8px; color: #625c56; background: repeating-linear-gradient(135deg, #e5e0d9, #e5e0d9 6px, #f2eee8 6px, #f2eee8 12px); overflow: hidden; cursor: pointer; font-size: 9px; font-weight: 750; white-space: nowrap; text-overflow: ellipsis; }
.block-card:hover { border-color: #746d66; filter: brightness(.98); }
.block-card:focus-visible { z-index: 5; outline: 3px solid rgba(40,37,34,.24); outline-offset: 2px; }
.timeline-empty { position: absolute; z-index: 0; top: 30px; left: 50%; width: min(280px, 72%); padding: 13px 16px; border: 1px dashed #d8d0c7; border-radius: 12px; color: var(--muted); background: rgba(245,241,234,.72); transform: translateX(-50%); text-align: center; pointer-events: none; }
.timeline-empty strong { display: block; margin-bottom: 3px; color: #5f5851; font: 500 14px Georgia, serif; }
.timeline-empty span { font-size: 10px; }
.no-hours { min-height: 330px; padding: 35px 20px; display: grid; place-items: center; text-align: center; }
.no-hours .empty-icon { width: 55px; height: 55px; margin: 0 auto 12px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 22px; }

/* Week and month */
.week-grid { display: grid; gap: 9px; }
.week-day { padding: 13px; cursor: pointer; }
.week-day.today { border-color: var(--accent); }
.week-day-head { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.week-day-head strong { font: 500 17px Georgia, serif; }
.week-day-head span { color: var(--muted); font-size: 11px; }
.mini-event { margin: 6px 0; padding: 8px 9px; border-left: 3px solid var(--accent); border-radius: 8px; background: var(--accent-soft); font-size: 11px; line-height: 1.3; }
.mini-event b { margin-right: 4px; }
.mini-empty { padding: 7px 0; color: #aaa198; font-size: 11px; }
.month-card { padding: 8px; }
.month-labels, .month-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.month-labels span { padding: 7px 0; color: var(--muted); text-align: center; font-size: 9px; text-transform: uppercase; }
.month-day { position: relative; min-height: 55px; padding: 7px 5px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; }
.month-day:hover { background: var(--surface-2); }
.month-day.muted { color: #aaa29a; }
.month-day.selected { background: var(--ink); color: #fff; }
.month-day.today:not(.selected) .month-num { color: var(--accent-dark); font-weight: 800; }
.month-num { font-size: 11px; }
.event-dots { position: absolute; left: 5px; right: 5px; bottom: 7px; display: flex; gap: 3px; }
.event-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.event-count { position: absolute; right: 5px; bottom: 4px; font-size: 8px; }

/* Setup */
.setup-header { margin-bottom: 20px; }
.setup-header h1 { font-size: 31px; }
.assumption-box { margin: 14px 0 20px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); color: #69625b; font-size: 11px; line-height: 1.5; }
.assumption-box strong { display: block; margin-bottom: 3px; color: #4f4943; }
.setup-section { margin: 26px 0; }
.section-head { margin-bottom: 11px; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.section-head h2 { margin: 0 0 3px; }
.section-head button { border: 0; padding: 7px; color: var(--accent-dark); background: transparent; cursor: pointer; font-size: 12px; font-weight: 750; }
.service-list, .hours-list { overflow: hidden; }
.service-row, .hours-row { width: 100%; min-height: 67px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); color: inherit; background: transparent; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; text-align: left; }
.service-row:last-child, .hours-row:last-child { border-bottom: 0; }
.service-row:hover, .hours-row:hover { background: #fdfaf6; }
.service-row strong, .hours-row strong { display: block; margin-bottom: 3px; font-size: 13px; }
.service-row small, .hours-row small { color: var(--muted); font-size: 11px; }
.service-meta { display: flex; align-items: center; gap: 7px; }
.inactive { opacity: .55; }
.today-config { padding: 15px; }
.config-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-top: 13px; }
.config-tile { padding: 12px; border-radius: 12px; background: var(--surface-2); }
.config-tile span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.config-tile strong { display: block; margin-top: 5px; font: 500 17px Georgia, serif; }

/* Modals */
.modal-backdrop { position: fixed; z-index: 100; inset: 0; height: 100dvh; padding: 14px 10px calc(8px + var(--safe-bottom)); background: rgba(35,30,26,.48); display: flex; align-items: flex-end; justify-content: center; animation: fade .16s ease-out; }
.modal { width: min(100%, 530px); max-height: calc(100dvh - 22px - var(--safe-bottom)); border-radius: 22px 22px 17px 17px; background: var(--paper); box-shadow: 0 25px 80px rgba(33,27,22,.28); overflow: auto; overscroll-behavior: contain; animation: rise .2s ease-out; }
.modal-head { position: sticky; z-index: 3; top: 0; padding: 18px 18px 11px; background: rgba(245,241,234,.96); display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.modal-head h2 { margin: 0; font: 500 24px Georgia, serif; }
.modal-close { width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); cursor: pointer; font-size: 19px; }
.modal-body { padding: 5px 18px 20px; }
.modal-foot { position: sticky; bottom: 0; padding: 12px 18px 17px; border-top: 1px solid var(--line); background: rgba(245,241,234,.97); display: flex; gap: 9px; }
.modal-foot > * { flex: 1; }
.detail-hero { margin: 4px 0 18px; padding: 16px; border-radius: 16px; background: var(--accent-soft); }
.detail-hero .time-big { margin: 4px 0; font: 500 27px Georgia, serif; }
.detail-list { border-top: 1px solid var(--line); }
.detail-row { padding: 13px 2px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 100px 1fr; gap: 10px; font-size: 13px; line-height: 1.4; }
.detail-row span:first-child { color: var(--muted); }
.modal-actions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 17px; }
.modal-actions-grid button { min-height: 45px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font-size: 12px; font-weight: 750; }
.modal-actions-grid button.danger { color: var(--danger); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.form-grid .span-2 { grid-column: span 2; }
.inline-note { padding: 10px 12px; border-radius: 10px; color: #625a53; background: var(--surface-2); font-size: 11px; line-height: 1.45; }
.slot-picker { max-height: 205px; margin: 7px 0; padding: 1px; overflow-y: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.slot-picker button { min-height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.slot-picker button.selected { border-color: var(--ink); color: #fff; background: var(--ink); }
.warning-card { margin: 8px 0 18px; padding: 14px; border: 1px solid #e2c3c0; border-radius: 13px; color: #6f4542; background: #fff7f6; font-size: 13px; line-height: 1.5; }
.photo-thumb-btn { padding: 0; border: 0; background: none; cursor: zoom-in; display: inline-block; line-height: 0; border-radius: 14px; }
.photo-thumb-btn:hover .photo-thumb-lg { filter: brightness(.93); }
.photo-thumb-btn:focus-visible { outline: 3px solid rgba(173,102,85,.4); outline-offset: 2px; }

/* Reference-photo full-screen viewer — layers above the appointment modal (z-index
   above .modal-backdrop's 100) so the modal stays open, unaffected, underneath. */
.photo-viewer-backdrop { position: fixed; z-index: 150; inset: 0; padding: 20px; background: rgba(20,17,15,.88); display: flex; align-items: center; justify-content: center; animation: fade .16s ease-out; }
.photo-viewer-img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 12px; box-shadow: 0 25px 80px rgba(0,0,0,.45); animation: rise .2s ease-out; }
.photo-viewer-close { position: fixed; top: 16px; right: 16px; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; color: #fff; background: rgba(255,255,255,.12); cursor: pointer; font-size: 22px; line-height: 1; backdrop-filter: blur(6px); }
.photo-viewer-close:hover { background: rgba(255,255,255,.22); }
body.photo-viewer-open { overflow: hidden; }

/* Mobile nav and toast */
.mobile-nav { position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(9px + var(--safe-bottom)); height: 64px; padding: 5px; border: 1px solid rgba(202,193,184,.9); border-radius: 18px; background: rgba(255,253,249,.94); box-shadow: 0 9px 35px rgba(50,42,34,.15); backdrop-filter: blur(12px); display: flex; }
.mobile-nav button { flex: 1; border: 0; border-radius: 13px; color: var(--muted); background: transparent; cursor: pointer; font-size: 10px; font-weight: 700; }
.mobile-nav button .nav-icon { display: block; margin-bottom: 3px; font-size: 19px; line-height: 1; }
.mobile-nav button.active { color: var(--ink); background: var(--surface-2); }
#toast { position: fixed; z-index: 200; left: 50%; bottom: calc(86px + var(--safe-bottom)); max-width: calc(100% - 30px); padding: 11px 15px; border-radius: 12px; color: #fff; background: #292724; box-shadow: var(--shadow); font-size: 12px; font-weight: 650; transform: translate(-50%, 15px); opacity: 0; pointer-events: none; transition: .2s; }
#toast.show { transform: translate(-50%, 0); opacity: 1; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(18px); opacity: .7; } }

@media (min-width: 700px) {
  #demoStrip { font-size: 12px; }
  .topbar { height: 76px; padding: 0 28px; }
  .brand-mark { width: 38px; height: 37px; }
  .mode-switch { display: flex; }
  .saved-state { display: inline-block; }
  #app { padding-bottom: 30px; }
  .mobile-nav { display: none; }
  .customer-shell { padding-top: 30px; }
  .time-grid { grid-template-columns: repeat(4, 1fr); }
  .modal-backdrop { align-items: center; padding: 20px; }
  .modal { border-radius: 22px; }
  #toast { bottom: 25px; }
  .staff-main { padding: 27px 28px 45px; }
  .staff-heading h1 { font-size: 37px; }
  .salon-tabs { max-width: 390px; }
  .staff-controls-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
  .staff-controls-row .viewbar { width: 390px; margin: 0; }
  .week-grid { grid-template-columns: repeat(7, 1fr); gap: 7px; }
  .week-day { min-height: 250px; padding: 10px; }
  .week-day-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .month-day { min-height: 88px; padding: 9px; }
  .month-card { padding: 13px; }
  .setup-columns { display: grid; grid-template-columns: 1.15fr .85fr; gap: 25px; align-items: start; }
}

@media (min-width: 1040px) {
  .staff-layout { display: grid; grid-template-columns: 210px 1fr; min-height: calc(100vh - 108px); }
  .staff-side { display: block; padding: 29px 17px; border-right: 1px solid var(--line); }
  .side-date { margin-bottom: 28px; padding: 13px; border-radius: 14px; background: var(--surface-2); }
  .side-date .big { font: 500 28px Georgia, serif; }
  .side-date small { display: block; margin-top: 4px; color: var(--muted); }
  .side-nav button { width: 100%; min-height: 46px; margin: 3px 0; padding: 0 12px; border: 0; border-radius: 11px; color: var(--muted); background: transparent; cursor: pointer; text-align: left; font-size: 13px; font-weight: 650; }
  .side-nav button.active { color: var(--ink); background: var(--surface); box-shadow: 0 2px 10px rgba(55,45,37,.07); }
  .staff-main { min-width: 0; padding: 31px 34px 55px; }
  .timeline { background-size: 100% 68px; }
  .appt-card { padding: 10px; }
  .appt-card .appt-name { font-size: 13px; }
  .appt-card .appt-service { font-size: 10px; }
  .schedule-card { border-radius: 19px; }
}

@media (max-width: 1039px) { .staff-side { display: none; } }
@media (max-width: 420px) {
  .staff-heading h1 { font-size: 27px; }
  .appt-card { padding: 7px 6px 5px; }
  .appt-card .appt-time { font-size: 9px; }
  .appt-card .appt-name { font-size: 12px; }
  .appt-card .appt-service { font-size: 9px; }
  .staff-actions .secondary-btn .wide-label { display: none; }
  .review-row { grid-template-columns: 76px 1fr; }
  .form-grid { display: block; }
  .month-day { min-height: 48px; }
}
