:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #102a33;
  background: #f5f9f8;
  --page: #f5f9f8;
  --surface: #fff;
  --text: #102a33;
  --secondary: #647b83;
  --muted: #87999f;
  --brand: #0c8b7a;
  --brand-dark: #087466;
  --brand-soft: #e5f5f1;
  --border: #d7e4e1;
  --success: #078956;
  --success-soft: #e4f6ed;
  --danger: #c93434;
  --danger-soft: #fcecec;
  --warning: #a45f0a;
  --warning-soft: #fff1da;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; min-width: 320px; background: var(--page); font-size: 16px; line-height: 22px; }
button, input, select { font: inherit; }
button, .button, input, select, summary { min-height: 44px; }
button, .button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--brand-dark); }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #55b7a6; outline-offset: 3px; }
[hidden] { display: none !important; }
.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; }
.icon { flex: none; vertical-align: middle; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 28px; line-height: 34px; letter-spacing: -.035em; font-weight: 700; margin-bottom: 8px; }
h2 { font-size: 22px; line-height: 28px; letter-spacing: -.025em; font-weight: 700; }
h3 { font-size: 18px; line-height: 23px; font-weight: 700; }
small { font-size: 14px; }
.eyebrow { color: var(--brand-dark); text-transform: uppercase; letter-spacing: .1em; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.muted, .page-description, .field-hint { color: var(--secondary); }
.app-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner { max-width: 760px; margin: auto; padding: 16px 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; min-height: 40px; color: var(--text); font-size: 28px; font-weight: 700; line-height: 34px; letter-spacing: -.055em; text-decoration: none; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.app-nav { display: flex; gap: 24px; align-items: center; }
.app-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--secondary); font-size: 17px; font-weight: 600; text-decoration: none; white-space: nowrap; padding: 8px 0 10px; border-bottom: 2px solid transparent; }
.app-nav a.active { color: var(--text); border-color: var(--brand); }
.app-nav a:hover { color: var(--text); }
.app-main { max-width: 760px; min-height: 65vh; margin: 0 auto; padding: 24px 20px 48px; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 12px 20px 32px; }
.button, button[type="submit"] { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 10px 12px; border: 1px solid var(--brand); border-radius: 14px; background: var(--brand); color: #fff; font-size: 16px; line-height: 20px; font-weight: 650; text-decoration: none; text-align: center; }
.button:hover, button[type="submit"]:hover { background: var(--brand-dark); color: #fff; text-decoration: none; }
.button.secondary, button.secondary { background: #fff; color: var(--brand-dark); border-color: var(--border); }
.button.secondary:hover, button.secondary:hover { background: var(--brand-soft); color: var(--brand-dark); }
.button.danger, button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.button.danger:hover, button.danger:hover { background: #ad2929; color: #fff; }
.button.full, button.full { width: 100%; }
.quiet-button, button.quiet-button { background: transparent; border: 0; color: var(--secondary); padding: 8px 0; min-height: 44px; font-weight: 600; }
.quiet-button:hover, button.quiet-button:hover { background: transparent; color: var(--text); text-decoration: underline; }
form { margin: 0; }
label { display: block; font-weight: 600; }
input:not([type="checkbox"]):not([type="radio"]), select { display: block; width: 100%; height: 52px; padding: 0 14px; margin-top: 7px; border: 1px solid var(--border); border-radius: 13px; background: #fff; color: var(--text); }
input::placeholder { color: var(--muted); }
input:focus, select:focus { border-color: var(--brand); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
.panel, .public { background: var(--surface); border: 1px solid var(--border); border-radius: 17px; padding: 24px; }
.public { max-width: 540px; margin: 24px auto; }
.public form { display: grid; gap: 16px; }
.public form label { margin: 0; }
.public button { width: 100%; }
.inline-notice { border-radius: 12px; background: var(--warning-soft); color: #744d17; padding: 12px 14px; margin: 18px 0; }
.inline-notice.success { background: var(--success-soft); color: #146543; }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--secondary); font-size: 14px; font-weight: 600; text-decoration: none; margin: -8px 0 12px; }
.back-link:hover { color: var(--text); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; width: max-content; padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.status-pill.success { color: var(--success); background: var(--success-soft); }
.status-pill.warning { color: var(--warning); background: var(--warning-soft); }
.status-pill.neutral { color: var(--secondary); background: #eaf0ef; }
.appointment-summary { display: grid; gap: 3px; margin: 12px 0; color: var(--text); }
.appointment-summary > div { display: flex; align-items: center; gap: 7px; }
.appointment-summary .icon { color: var(--secondary); }
.appointment-summary .summary-date { font-size: 15px; line-height: 20px; font-weight: 650; }
.appointment-summary .summary-time { font-size: 15px; line-height: 20px; font-weight: 600; }
.appointment-summary .summary-time span, .appointment-summary .summary-zone { color: var(--secondary); font-size: 14px; line-height: 20px; font-weight: 400; }
.appointment-summary .summary-title { color: var(--secondary); font-size: 14px; }
.appointment-summary.compact { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 5px 0; }
.appointment-summary.compact .icon { display: none; }
.appointment-summary.compact .summary-date, .appointment-summary.compact .summary-time { font-size: 14px; line-height: 20px; }
.appointment-summary.compact .summary-zone { width: 100%; }

/* Operator bookings */
.next-section { margin-bottom: 24px; }
.next-section > h2 { margin-bottom: 16px; }
.next-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 10px 12px; }
.next-card-top { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; }
.next-when { color: var(--brand-dark); background: var(--brand-soft); border-radius: 999px; font-weight: 700; font-size: 13px; line-height: 18px; padding: 3px 8px; }
.next-card-top .operational-signals { justify-content: flex-end; flex: 1; margin: 0; }
.next-card h3 { margin: 2px 0 0; }
.next-card h3 a { color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.next-card h3.email-identity { font-size: 20px; line-height: 27px; }
.next-email, .detail-email { color: var(--secondary); margin: 0; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.next-meta, .detail-payment { display: flex; align-items: center; gap: 5px; margin: 2px 0 0; font-size: 14px; line-height: 20px; }
.next-schedule { margin: 2px 0 0; font-size: 14px; line-height: 19px; }
.next-meta strong, .detail-payment strong { font-size: 14px; line-height: 20px; }
.next-actions, .primary-actions { display: grid; grid-template-columns: minmax(0,1.22fr) minmax(0,1fr); gap: 8px; margin-top: 6px; }
.next-actions .button { min-height: 46px; min-width: 0; white-space: nowrap; font-size: 14px; letter-spacing: -.02em; gap: 4px; padding-inline: 4px; }
.primary-actions .button { min-width: 0; white-space: nowrap; font-size: 16px; gap: 4px; padding-inline: 8px; }
.primary-actions.single { display: block; }
.primary-actions.single .button { width: 100%; }
.next-actions .icon, .primary-actions .icon { width: 17px; height: 17px; }
.empty-state { padding: 24px; border: 1px dashed var(--border); border-radius: 16px; background: #fff; }
.empty-state p { margin-bottom: 14px; font-weight: 650; }
.booking-browser { margin-top: 0; }
.booking-browser-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.booking-browser-heading h2 { margin: 0; }
.segmented-control { display: grid; grid-template-columns: 1fr 1fr; width: 170px; flex: none; padding: 3px; border: 1px solid var(--border); border-radius: 12px; background: #eaf1ef; }
.segmented-control button { color: var(--secondary); background: transparent; border: 0; border-radius: 9px; padding: 6px 5px; min-height: 36px; font-size: 13px; line-height: 18px; font-weight: 650; }
.segmented-control button.active { color: var(--text); background: #fff; }
.booking-filters { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(0,1fr); gap: 10px; margin-bottom: 16px; }
.booking-filters input, .booking-filters select { height: 50px !important; font-size: 14px; }
.booking-filters select { padding-inline: 10px; }
.search-field { position: relative; margin: 0; }
.search-field .icon { position: absolute; left: 12px; top: 15px; color: var(--muted); }
.search-field input { margin: 0 !important; padding-left: 38px !important; padding-right: 8px !important; }
.date-filter select { margin: 0; }
.date-group { margin-bottom: 20px; }
.date-group h3 { font-size: 14px; color: var(--secondary); margin-bottom: 8px; }
.booking-list { background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.booking-row { display: grid; grid-template-columns: 55px minmax(0,1fr) 80px 14px; align-items: center; gap: 8px; min-height: 82px; padding: 10px 12px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); }
.booking-row:last-child { border-bottom: 0; }
.booking-row:hover { background: #fbfdfc; text-decoration: none; }
.booking-row time { font-weight: 700; font-size: 14px; align-self: start; padding-top: 4px; }
.row-person { min-width: 0; }
.row-person strong, .row-person small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-person strong { font-size: 15px; }
.row-person strong.email-identity { white-space: normal; overflow-wrap: anywhere; line-height: 20px; }
.row-person small { color: var(--secondary); margin-top: 1px; }
.row-state { display: grid; justify-items: end; gap: 3px; }
.row-state strong { font-size: 15px; }
.booking-row > .icon { color: var(--muted); }
.empty-list { color: var(--secondary); padding: 14px 0; }
.operational-signals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.live-signal, .help-signal { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 7px; font-size: 12px; line-height: 18px; font-weight: 700; }
.live-signal { color: var(--success); background: var(--success-soft); }
.help-signal { color: var(--danger); background: var(--danger-soft); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* Appointment detail */
.detail-view h1 { margin-bottom: 2px; overflow-wrap: anywhere; }
.detail-view h1.email-identity, .room-heading h1.email-identity { font-size: 22px; line-height: 27px; }
.detail-view .appointment-summary { margin: 12px 0 0; }
.detail-view .appointment-summary .icon { width: 17px; height: 17px; }
.detail-view .detail-payment { margin-top: 8px; }
.current-state { border-left: 4px solid var(--success); background: var(--success-soft); border-radius: 0 12px 12px 0; padding: 12px 14px; margin: 16px 0; }
.current-state.has-help { border-color: var(--danger); background: var(--danger-soft); }
.current-state h2 { display: flex; align-items: center; gap: 7px; font-size: 18px; line-height: 23px; margin-bottom: 2px; }
.current-state p, .current-state small { color: var(--secondary); margin-bottom: 0; font-size: 13px; line-height: 18px; }
.current-state .current-waiting { display: grid; gap: 1px; margin-top: 8px; }
.current-state .current-waiting:first-child { margin-top: 0; }
.current-state .current-waiting strong, .room-operational strong { display: flex; gap: 8px; align-items: center; }
.current-state .current-waiting .icon { color: var(--success); }
.call-client { margin: 12px 0 0; }
.call-client a { display: flex; align-items: center; gap: 9px; width: max-content; max-width: 100%; color: var(--text); text-decoration: none; }
.call-client .icon { color: var(--danger); }
.call-client span, .call-client strong, .call-client small { display: block; }
.call-client strong { font-size: 16px; line-height: 22px; font-weight: 650; }
.call-client small { color: var(--secondary); font-size: 14px; line-height: 20px; }
.call-client a:hover strong { text-decoration: underline; }
.resolve-help { margin-top: 8px; }
.resolve-help .quiet-button { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-dark); font-size: 14px; font-weight: 650; }
.current-state .primary-actions { margin-top: 12px; }
.secondary-actions { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 18px; }
.action-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.action-grid form { display: block; }
.action-grid .button, .action-grid button { width: 100%; min-height: 44px; font-size: 14px; padding: 8px; }
.action-grid > #copy-booking-link { grid-column: 1 / -1; }
#copy-link-status { display: block; color: var(--secondary); font-size: 13px; min-height: 0; margin-top: 4px; }
.more-actions { margin-top: 2px; }
.more-actions > summary, .technical-details > summary { cursor: pointer; color: var(--secondary); font-weight: 600; padding: 10px 0; }
.more-actions > div { display: grid; gap: 12px; padding: 8px 0 16px; }
.danger-action { border-top: 1px solid var(--border); padding-top: 8px; }
.danger-action summary { cursor: pointer; color: var(--danger); font-weight: 600; padding: 7px 0; }
.danger-action form { display: grid; gap: 12px; max-width: 440px; }
.confirm-cancel { display: flex; align-items: flex-start; gap: 10px; }
.confirm-cancel input { margin-top: 5px; }
.activity-section { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 16px; }
.activity-section h2 { margin-bottom: 8px; }
.activity-list { margin: 0; padding: 0; list-style: none; }
.activity-list li { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; line-height: 20px; }
.activity-list time { color: var(--secondary); width: 42px; flex: none; font-size: 13px; }
.technical-details { margin-top: 24px; color: var(--secondary); border-top: 1px solid var(--border); }
.technical-details dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; overflow-wrap: anywhere; }
.technical-details dd { margin: 0; color: var(--text); }
.technical-details li { margin-bottom: 8px; overflow-wrap: anywhere; }

/* Booking form */
.form-page { max-width: 720px; }
.form-page h1 { margin-bottom: 2px; font-size: 26px; line-height: 32px; }
.page-description { font-size: 14px; line-height: 19px; margin-bottom: 10px; }
.form-section { border-top: 1px solid var(--border); padding: 10px 0 12px; }
.form-section h2 { font-size: 12px; line-height: 16px; text-transform: uppercase; letter-spacing: .12em; color: var(--secondary); margin-bottom: 7px; }
.appointment-heading { display: flex; align-items: center; justify-content: space-between; }
.appointment-heading h2 { margin-bottom: 0; }
.appointment-heading:has(.optional-title[open]) { display: block; }
.appointment-heading:has(.optional-title[open]) h2 { margin-bottom: 5px; }
.form-section label { font-size: 14px; line-height: 20px; margin-bottom: 0; }
.form-section input:not([type="radio"]), .form-section select { height: 46px; min-height: 46px; margin-top: 3px; margin-bottom: 0; border-radius: 11px; }
.form-section .field-hint { font-size: 12px; line-height: 16px; margin: 3px 0 0; }
.contact-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 8px; }
.contact-field { position: relative; }
.contact-suggestions { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; right: 0; max-height: 240px; overflow: auto; list-style: none; margin: 0; padding: 4px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 6px 24px rgba(16,42,51,.05); }
.contact-suggestions button { display: grid; gap: 1px; width: 100%; min-height: 44px; padding: 7px 10px; border: 0; border-radius: 8px; background: #fff; color: var(--text); text-align: left; }
.contact-suggestions button:hover, .contact-suggestions button:focus-visible { background: var(--brand-soft); }
.contact-suggestions strong { font-size: 14px; }
.contact-suggestions span, .contact-suggestions small { color: var(--secondary); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 8px; }
.optional-title { margin: 0; }
.optional-title summary { width: max-content; color: var(--brand-dark); font-size: 14px; font-weight: 650; list-style: none; cursor: pointer; }
.optional-title summary::-webkit-details-marker { display: none; }
.optional-title[open] summary { margin-bottom: 5px; }
.form-grid input[type="date"], .form-grid input[type="time"] { min-width: 0; width: 100%; appearance: auto; font-size: 16px; color: var(--text); }
.form-grid input::-webkit-date-and-time-value { text-align: left; min-width: 0; }
.form-grid input::-webkit-datetime-edit { min-width: 0; }
.form-grid input::-webkit-calendar-picker-indicator { opacity: .8; margin-left: 0; }
.payment-timing { padding: 0; margin: 5px 0 0; border: 0; min-width: 0; }
.payment-timing legend { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.timing-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.timing-grid label { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 56px; padding: 6px; border: 1px solid var(--border); border-radius: 11px; background: #fff; cursor: pointer; }
.timing-grid label:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); }
.timing-grid input { width: 16px; height: 16px; min-height: 16px; margin: 0; flex: none; }
.timing-title { font-size: 13px; line-height: 17px; font-weight: 650; }
.timing-help { color: var(--secondary); font-size: 12px; line-height: 16px; margin: 4px 0 0; }
.form-summary { border: 1px solid var(--border); border-radius: 11px; background: #eef7f4; padding: 7px 10px; margin: 2px 0 8px; }
.form-summary p { margin: 0; color: var(--secondary); font-size: 12px; line-height: 18px; overflow-wrap: anywhere; }
.form-summary p:first-child { color: var(--text); font-size: 13px; line-height: 18px; font-weight: 650; }
.form-page #booking-submit { min-height: 50px; }
.form-context { color: var(--secondary); margin-bottom: 18px; }

/* Client */
.client-content { max-width: 540px; margin: 18px auto 0; }
.client-content .appointment-summary { margin: 26px 0 24px; }
.client-amount { font-size: 27px; font-weight: 700; margin: 22px 0 28px; }
.payment-methods { border-top: 1px solid var(--border); padding-top: 23px; margin-top: 20px; }
.payment-methods h2 { font-size: 24px; margin-bottom: 15px; }
.payment-methods form { margin-bottom: 10px; }
.payment-option { display: flex !important; align-items: center !important; justify-content: flex-start !important; gap: 14px !important; width: 100%; min-height: 78px !important; padding: 12px 15px !important; border: 1px solid var(--border) !important; border-radius: 15px !important; background: #fff !important; color: var(--text) !important; text-align: left !important; }
.payment-option:hover { background: var(--brand-soft) !important; }
.payment-brand { display: flex; flex: none; align-items: center; justify-content: center; gap: 4px; width: 64px; min-height: 42px; }
.payment-mark { display: block; width: 52px; height: 36px; object-fit: contain; }
.payment-mark.card-mark { width: 30px; height: 26px; }
.payment-mark.swish-mark { height: 34px; }
.payment-copy { flex: 1; display: grid; gap: 1px; }
.payment-copy strong { font-size: 17px; }
.payment-copy small { color: var(--secondary); font-size: 14px; font-weight: 400; }
.payment-option > .icon { color: var(--secondary); }
.text-action { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 13px 0; border-top: 1px solid var(--border); margin-top: 26px; color: var(--text); font-weight: 600; text-decoration: none; }
.text-action .icon:last-child { margin-left: auto; color: var(--secondary); }
.compact-success { display: flex; align-items: center; gap: 8px; width: max-content; color: var(--success); background: var(--success-soft); border-radius: 999px; font-size: 14px; font-weight: 700; padding: 7px 11px; margin: 22px 0; }
.room-window, .good-to-know { border-top: 1px solid var(--border); padding-top: 22px; margin-top: 26px; }
.room-window h2, .good-to-know h2 { font-size: 21px; margin-bottom: 8px; }
.room-window p, .good-to-know p { color: var(--secondary); }
.confirmed-view .appointment-summary { margin: 14px 0 12px; }
.confirmed-view .compact-success { margin: 14px 0; }
.confirmed-view .text-action { margin-top: 12px; }
.return-guidance { color: var(--secondary); font-size: 13px; margin-top: 10px; }
.payment-method-note { color: var(--secondary); font-size: 13px; margin: -6px 0 10px; }
.good-to-know strong { display: block; margin-bottom: 3px; }
.manage-view .manage-actions { display: grid; gap: 18px; margin-top: 25px; }
.manage-view .client-amount { font-size: 20px; margin: 14px 0 20px; }
.manage-view .client-amount small { color: var(--secondary); font-size: 14px; font-weight: 500; }
.manage-view .manage-actions > .button { justify-self: start; }
.cancel-request { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 10px; }
.cancel-request summary { cursor: pointer; color: var(--danger); font-weight: 600; padding: 8px 0; }
.cancel-request form { display: grid; gap: 12px; }
.help-request { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 8px; }
.help-request summary { cursor: pointer; color: var(--secondary); font-weight: 600; padding: 9px 0; }
.help-request h2 { font-size: 20px; margin: 10px 0; }
.help-request p { color: var(--secondary); font-size: 14px; }
.help-request form { display: grid; gap: 8px; }
.help-request button { justify-self: start; }
.help-state { display: flex; align-items: flex-start; gap: 10px; background: var(--success-soft); color: var(--success); border-radius: 13px; padding: 13px; }
.help-state span, .help-state strong, .help-state small { display: block; }
.help-state small { color: var(--secondary); margin-top: 2px; }

/* Prejoin and in-call */
.room-main { max-width: 760px; margin: 0 auto; padding: 16px 20px 32px; }
.video { width: 100%; }
.room-heading .back-link { margin-bottom: 4px; }
.room-heading h1 { margin-bottom: 2px; }
.room-heading > p:last-child { color: var(--secondary); font-size: 14px; line-height: 20px; margin-bottom: 12px; }
.client-room-heading .room-brand { color: var(--text); font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -.055em; margin-bottom: 16px; }
#video-status { color: var(--secondary); font-size: 14px; line-height: 20px; margin: 0 0 8px; }
.video[data-media-state="ready"][data-media-warning="0"] #video-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
#video-hint { color: var(--secondary); margin: -6px 0 16px; }
.video[data-media-state="unavailable"] #video-status { color: var(--text); font-size: 20px; font-weight: 700; line-height: 1.25; }
.preview-stage { position: relative; display: grid; place-items: center; aspect-ratio: 16/9; width: 100%; background: #19323a; border-radius: 16px; overflow: hidden; }
.preview-stage video { width: 100%; height: 100%; object-fit: cover; }
.preview-stage p { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px; background: #213c43; color: #fff; text-align: center; }
.camera-flip { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #ffffff88; border-radius: 50%; color: #fff; background: #102a33aa; }
.media-toggles { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 10px; }
.media-toggles > div { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 4px; min-height: 64px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.media-toggles span { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 13px; font-weight: 650; }
.media-toggles .icon { width: 17px; height: 17px; }
.media-toggle { min-width: 42px; min-height: 44px; padding: 0 5px; border: 1px solid var(--border); border-radius: 999px; color: var(--text); background: #fff; font-size: 13px; font-weight: 650; }
.media-toggle[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand-soft); }
.device-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }
.device-settings label { font-size: 14px; }
.device-settings select { margin-bottom: 0; }
.prejoin-actions { display: grid; gap: 8px; margin-top: 12px; }
.join-window-hint { color: var(--secondary); font-size: 13px; line-height: 18px; margin: -2px 0 0; text-align: center; }
.prejoin-actions .text-action { margin-top: 0; }
.prejoin-actions #retry-devices-button { margin-top: 0; }
.room-operational { margin: 12px 0 0; }
.room-operational > div { display: grid; gap: 4px; }
.room-operational > div + div { margin-top: 12px; }
.room-operational a { font-weight: 700; }
.video[data-media-state="unavailable"] .preview-stage { aspect-ratio: auto; min-height: 90px; background: var(--warning-soft); }
.video[data-media-state="unavailable"] .preview-stage video { display: none; }
.video[data-media-state="unavailable"] .preview-stage p { background: var(--warning-soft); color: var(--secondary); }
.video.in-call { position: fixed; inset: 0; z-index: 20; width: 100vw; height: 100dvh; background: #102a33; color: #fff; }
#call-view { display: flex; flex-direction: column; height: 100%; }
.call-top { display: grid; gap: 1px; padding: 16px 20px; min-height: 66px; }
.call-top strong { font-size: 19px; }
.call-top strong { overflow-wrap: anywhere; }
.call-top span { color: #d3e4e1; font-size: 14px; }
.call-stage { position: relative; flex: 1; min-height: 0; background: #15272c; overflow: hidden; }
#remote-video { display: grid; place-items: center; width: 100%; height: 100%; }
#remote-video video { width: 100%; height: 100%; object-fit: contain; }
#remote-video .waiting { color: #d3e4e1; }
#self-video { position: absolute; top: 14px; right: 14px; width: min(27vw, 170px); height: min(38vw, 128px); object-fit: cover; background: #274149; border: 2px solid #fff; border-radius: 12px; }
.call-actions { display: grid; grid-template-columns: repeat(4,1fr); align-items: stretch; gap: 5px; min-height: 78px; padding: 9px max(12px,calc((100vw - 760px)/2)); background: #102a33; }
.call-actions > button, .call-more > button { display: grid; justify-items: center; align-content: center; gap: 2px; width: 100%; min-height: 58px; padding: 5px; border: 0; border-radius: 12px; color: #fff; background: transparent; font-size: 13px; font-weight: 600; }
.call-actions button:hover { background: #ffffff1c; }
.call-actions button.leave { background: #a92c2c; }
.call-actions button.leave:hover { background: #8f2424; }
.call-more { position: relative; }
#more-menu { position: absolute; right: 0; bottom: 69px; width: 185px; padding: 6px; border: 1px solid #45616a; border-radius: 12px; background: #17343d; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
#more-menu button { width: 100%; min-height: 44px; border: 0; border-radius: 8px; color: #fff; background: transparent; text-align: left; }

@media (max-width: 650px) {
  .header-inner { display: grid; gap: 4px; padding: 10px 20px 0; }
  .app-nav { gap: 24px; }
  .app-nav a { padding: 6px 0 8px; }
  .app-main { padding-top: 20px; }
  .booking-row { grid-template-columns: 50px minmax(0,1fr) 76px 13px; gap: 5px; padding: 10px 8px; }
  .booking-row .operational-signals { grid-column: 1 / -1; }
  .booking-row .live-signal, .booking-row .help-signal { font-size: 12px; padding: 3px 6px; }
  .row-state .status-pill { font-size: 12px; padding: 3px 6px; }
  .row-person small { font-size: 12px; }
  .device-settings #camera-device-field { display: none; }
  .device-settings { grid-template-columns: 1fr; }
  .room-main { padding: 12px 20px 28px; }
  .form-page { margin-inline: -4px; }
  .form-page .form-section { padding-block: 6px 7px; }
  .form-page .form-section h2 { margin-bottom: 6px; }
  .form-page .contact-fields label { white-space: nowrap; font-size: 13px; }
  .form-page .form-grid { column-gap: 8px; }
  .form-page .form-summary { max-width: 100%; }
  .call-actions { padding-bottom: max(9px,env(safe-area-inset-bottom)); }
}
@media (max-width: 370px) {
  .booking-browser-heading { align-items: flex-start; }
  .segmented-control { width: 150px; }
  .next-actions, .primary-actions { grid-template-columns: 1fr; }
  .booking-filters { grid-template-columns: 1fr; }
  .media-toggles { grid-template-columns: 1fr; }
  .booking-row { grid-template-columns: 45px minmax(0,1fr) 64px 14px; }
  .row-state strong { font-size: 13px; }
  .contact-fields { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: live-pulse 2.4s ease-in-out infinite; }
  @keyframes live-pulse { 50% { opacity: .45; } }
}
