/* Russell Booking: public booking pages (profile, event, details, confirmation, manage).
   Light theme only. Tokens follow the project design spec §1. */
:root {
  color-scheme: light;
  --blue: #006bff;
  --blue-hover: #004eba;
  --blue-text: #004eba;
  --blue-tint: #f4f8ff;
  --blue-tint-2: #e6f0ff;
  --blue-tint-3: #edf4ff;
  --focus: #0099ff;
  --navy: #0a2540;
  --icon: #0b3558;
  --gray: #476788;
  --muted: #8a9db5;
  --disabled: #a6bbd1;
  --line: #d4e0ed;
  --line-soft: #e7edf6;
  --field: #a6bbd1;
  --bg: #ffffff;
  --bg-app: #fafafa;
  --bg-2: #f5f6f9;
  --bg-3: #f0f3f8;
  --overlay: rgba(10, 37, 64, .5);
  --danger: #d53c00;
  --danger-text: #b03200;
  --danger-bg: #fff4f1;
  --success: #0a6439;
  --success-bg: #cdf9e5;
  --success-dot: #14aa51;
  --shadow-card: 0 1px 8px rgba(0, 0, 0, .08);
  --shadow-1: 0 1px 6px rgba(10, 37, 64, .10);
  --shadow-pop: 0 1px 5px rgba(10, 37, 64, .15);
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg-app); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-app);
  color: var(--navy);
  font: 400 14px/21px var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue-text); }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[data-heading]:focus, [data-heading]:focus-visible, .tz-pop:focus-visible { outline: none; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.noscript { max-width: 480px; margin: 15vh auto; padding: 0 16px; text-align: center; color: var(--gray); font-size: 16px; line-height: 24px; }

/* ---------- page + card ---------- */
.wrap { display: flow-root; padding: 0 16px; }
.card {
  position: relative;
  display: flex;
  width: 800px;
  max-width: 100%;
  min-height: 700px;
  margin: 66px auto 30px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: width .25s ease;
}
.card.is-wide { width: 1060px; }
.card.is-single { display: block; }
.card.is-loading { display: flex; align-items: center; justify-content: center; }

.info {
  flex: 0 0 400px;
  min-width: 0;
  padding: 25px 30px;
  border-right: 1px solid var(--line);
  transition: flex-basis .25s ease;
}
.card.is-wide .info { flex-basis: 370px; }
.main { flex: 1 1 auto; min-width: 0; padding: 28px 24px 24px 32px; }

/* ---------- left info panel ---------- */
.back {
  display: inline-flex; align-items: center; justify-content: center;
  width: 43px; height: 43px; margin: 0 0 24px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--blue-text); cursor: pointer;
  transition: background-color .15s ease;
}
.back:hover { background: var(--blue-tint); }
.avatar { display: block; width: 65px; height: 65px; border-radius: 50%; object-fit: cover; margin: 0 0 8px; background: var(--bg-3); }
.initials {
  display: flex; align-items: center; justify-content: center;
  width: 65px; height: 65px; border-radius: 50%;
  background: var(--bg-3); color: var(--navy); font: 700 22px/1 var(--font); letter-spacing: .02em;
}
.host { margin: 0; font: 700 16px/24px var(--font); color: var(--gray); }
.event-title { margin: 0; font: 700 28px/32px var(--font); color: var(--navy); overflow-wrap: anywhere; }
.rows { margin-top: 24px; }
.row { display: flex; align-items: flex-start; margin-bottom: 12px; font: 700 14px/21px var(--font); color: var(--gray); }
.row:last-child { margin-bottom: 0; }
.row-ico { flex: 0 0 20px; display: flex; align-items: center; justify-content: center; height: 21px; margin-right: 8px; color: var(--icon); }
.row-text { min-width: 0; overflow-wrap: anywhere; }
.row-sub { display: block; margin-top: 2px; font-weight: 400; }
.row-link { font-weight: 600; color: var(--blue-text); text-decoration: none; overflow-wrap: anywhere; }
.row-link:hover { text-decoration: underline; }
.row.is-struck .row-text { text-decoration: line-through; }
.former { margin-bottom: 16px; }
.former-label { margin: 0 0 4px; font: 700 12px/16px var(--font); text-transform: uppercase; letter-spacing: .02em; color: var(--gray); }
.former .row { margin: 0; }
.former .row-text { text-decoration: line-through; }
.desc { margin-top: 20px; font: 400 16px/24px var(--font); color: var(--navy); overflow-wrap: anywhere; }
.desc p { margin: 0 0 24px; }
.desc p:last-child { margin-bottom: 0; }
.desc a { color: var(--blue-text); }

/* ---------- right panel: date & time ---------- */
.step-title { margin: 0 0 20px; font: 700 22px/28px var(--font); color: var(--navy); }
.step-title.tight { margin-bottom: 12px; }
.picker { display: flex; align-items: flex-start; }
.cal-col { flex: 0 0 343px; width: 343px; }
.times-col { flex: 1 1 auto; min-width: 0; max-width: 282px; margin-left: 24px; animation: rb-fade .25s ease both; }

.cal-head { display: flex; align-items: center; justify-content: center; height: 38px; margin-bottom: 23px; }
.cal-month { min-width: 125px; margin: 0 5px; font: 700 16px/21px var(--font); text-align: center; color: var(--navy); }
.nav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--blue-text); cursor: pointer;
  transition: background-color .15s ease;
}
.nav-btn:hover { background: var(--blue-tint); }
.nav-btn[aria-disabled="true"] { color: var(--gray); cursor: default; background: transparent; opacity: .55; }

.grid-wrap { position: relative; }
.cal-grid { width: 343px; max-width: 100%; border-collapse: separate; border-spacing: 0 8px; table-layout: fixed; margin: -8px 0; }
.cal-grid th { padding: 0 0 4px; font: 600 12px/12px var(--font); color: var(--gray); text-align: center; }
.cal-grid td { padding: 0; text-align: center; vertical-align: middle; }
.day {
  position: relative; display: block;
  width: 44px; height: 44px; margin: 0 auto; padding: 1px 0 0;
  border: 1px solid transparent; border-radius: 50%;
  background: transparent; color: var(--gray);
  font: 400 16px/24px var(--font); font-variant-numeric: tabular-nums;
  cursor: default;
  transition: background-color .15s ease, color .15s ease;
}
.day.is-avail { background: var(--blue-tint); color: var(--blue-text); font-weight: 700; cursor: pointer; }
.day.is-avail:hover, .day.is-avail:focus-visible { background: var(--blue-tint-2); }
.day.is-selected, .day.is-selected:hover, .day.is-selected:focus-visible { background: var(--blue); color: #fff; }
.day.is-today::after {
  content: ""; position: absolute; left: 50%; bottom: 6px;
  width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor;
}
.day:disabled { cursor: default; }
.grid-wrap.is-loading .cal-grid { opacity: .4; }
.grid-overlay { position: absolute; inset: 24px 0 0; display: flex; align-items: center; justify-content: center; padding: 0 12px; }
.empty-pill {
  max-width: 300px; padding: 12px 16px; border-radius: 8px;
  background: #fff; box-shadow: var(--shadow-pop); text-align: center;
  font: 400 14px/20px var(--font); color: var(--navy);
}
.empty-pill .link-btn { display: inline-block; margin-top: 4px; }

/* dots loader */
.dots { display: inline-flex; gap: 6px; padding: 8px; }
.dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--gray); animation: rb-pulse 1.1s ease-in-out infinite; }
.dots span:nth-child(2) { animation-delay: .15s; }
.dots span:nth-child(3) { animation-delay: .3s; }
@keyframes rb-pulse { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }

/* time zone */
.tz { margin-top: 24px; }
.tz-label { margin: 0 0 4px; font: 700 14px/19.6px var(--font); color: var(--navy); }
.tz-btn {
  display: inline-flex; align-items: center; gap: 3px; max-width: 100%;
  padding: 2px 0; border: 0; background: none; cursor: pointer;
  font: 400 14px/20px var(--font); color: var(--navy); text-align: left;
}
.tz-btn svg { flex: 0 0 auto; color: var(--icon); }
.tz-btn:hover .tz-name { text-decoration: underline; }
.tz-name { min-width: 0; }
.tz-now { margin-left: 3px; white-space: nowrap; }
.tz.is-centered { text-align: center; }

/* times column */
.times-day { margin: 0 0 10px; font: 400 16px/38px var(--font); color: var(--navy); }
.times-list { list-style: none; margin: 0; padding: 0 4px 0 0; max-height: 520px; overflow-y: auto; scrollbar-width: none; }
.times-list::-webkit-scrollbar { display: none; }
.times-col .callout + .times-list { max-height: 448px; }
.slot { margin: 10px 2px; }
.slot:first-child { margin-top: 0; }
.slot-btn {
  display: block; width: 100%; height: 52px; padding: 13px 10px;
  border: 1px solid var(--blue); border-radius: 4px;
  background: transparent; color: var(--blue-text);
  font: 700 16px/24px var(--font); cursor: pointer; text-align: center;
}
.slot-btn:hover { border-width: 2px; padding: 12px 9px; }
.slot-split { display: flex; gap: 8px; }
.slot-time, .slot-next {
  flex: 1 1 0; min-width: 0; height: 52px; padding: 0 6px;
  border-radius: 4px; font: 700 16px/24px var(--font); white-space: nowrap; overflow: hidden;
}
.slot-time { border: 2px solid transparent; background: var(--overlay); color: #fff; cursor: default; }
.slot-next {
  border: 0; background: var(--blue); color: #fff; cursor: pointer; box-shadow: var(--shadow-1);
  animation: rb-next .2s ease both; transition: background-color .15s ease;
}
.slot-next:hover, .slot-next:active { background: var(--blue-hover); }
@keyframes rb-next { from { flex-grow: 0; opacity: 0; } to { flex-grow: 1; opacity: 1; } }
.times-loading { display: flex; justify-content: center; padding: 24px 0; }
.times-empty { margin: 0; font: 400 14px/21px var(--font); color: var(--gray); }
.times-col .callout, .m-times .callout { margin-bottom: 12px; }

/* ---------- callouts, buttons, spinner ---------- */
.callout { padding: 16px; border-radius: 8px; font: 400 14px/20px var(--font); }
.callout-danger { background: var(--danger-bg); border: 1px solid var(--danger); color: var(--danger-text); }
.callout-info { background: var(--blue-tint-2); border: 1px solid #c5dbff; color: var(--navy); }
.callout .link-btn { display: inline-block; margin-top: 6px; }
.callout-text { display: block; }

.link-btn {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: 600 14px/20px var(--font); color: var(--blue-text); text-decoration: none;
}
.link-btn:hover { text-decoration: underline; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 8px 16px; border: 1px solid transparent; border-radius: 9999px;
  font: 600 14px/21px var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn svg { flex: 0 0 auto; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.btn-primary[disabled] { cursor: progress; background: var(--blue); border-color: var(--blue); opacity: .85; }
.btn-outline { background: #fff; border-color: var(--gray); color: var(--navy); }
.btn-outline:hover { background: var(--bg-2); border-color: var(--navy); }
.btn-danger-outline { background: #fff; border-color: var(--danger); color: var(--danger-text); }
.btn-danger-outline:hover { background: var(--danger-bg); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-text); border-color: var(--danger-text); }
.btn-danger[disabled] { cursor: progress; opacity: .85; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  animation: rb-spin .8s linear infinite;
}
@keyframes rb-spin { to { transform: rotate(360deg); } }
@keyframes rb-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- details form ---------- */
.form { max-width: 400px; }
.field { margin-bottom: 24px; }
.label { display: block; margin-bottom: 4px; font: 600 14px/20px var(--font); color: var(--navy); }
.input, .textarea {
  display: block; width: 100%; height: 40px; padding: 8px 12px;
  border: 1px solid var(--field); border-radius: 8px; background: #fff;
  font: 400 14px/19.6px var(--font); color: var(--navy);
  -webkit-appearance: none; appearance: none; box-shadow: none;
}
.textarea { height: auto; min-height: 57px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--gray); opacity: 1; }
.input:focus, .textarea:focus { border: 2px solid var(--focus); padding: 7px 11px; outline: none; }
.field.is-invalid .input, .field.is-invalid .textarea { border-color: var(--danger); }
.field.is-invalid .input:focus, .field.is-invalid .textarea:focus { border-color: var(--danger); }
.err { display: flex; align-items: flex-start; gap: 6px; margin-top: 4px; font: 400 14px/20px var(--font); color: var(--danger-text); }
.err svg { flex: 0 0 auto; margin-top: 2px; }
.help { margin: 6px 0 0; font: 400 14px/20px var(--font); color: var(--gray); }
.help + .help { margin-top: 4px; }
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.submit-msg:empty { display: none; }
.submit-msg { margin: -4px 0 20px; }
.submit-msg .callout .link-btn { margin-right: 16px; }
.form-lead { margin: 0 0 20px; font: 400 14px/21px var(--font); color: var(--navy); }

/* summary box used by confirmation, manage and reschedule */
.box { text-align: left; padding: 20px 24px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.box + .box { margin-top: 16px; }
.box.spaced { margin-bottom: 24px; }
.box-title { margin: 0 0 12px; font: 700 18px/24px var(--font); color: var(--navy); overflow-wrap: anywhere; }
.box-label { margin: 0 0 8px; font: 700 12px/16px var(--font); text-transform: uppercase; letter-spacing: .02em; color: var(--gray); }

/* ---------- confirmation ---------- */
.confirm { max-width: 560px; margin: 0 auto; padding: 40px 32px; text-align: center; }
.confirm .avatar, .confirm .initials { margin: 0 auto 12px; }
.confirm-title {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0; font: 700 22px/28px var(--font); color: var(--navy);
}
.confirm-title svg { flex: 0 0 auto; color: var(--success-dot); }
.confirm-sub { margin: 8px 0 24px; font: 400 14px/21px var(--font); color: var(--navy); }
.confirm-sub + .confirm-sub { margin-top: -16px; }
.confirm .callout { margin-top: 16px; text-align: left; }
.add-cal { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 20px; }
.add-cal-label { width: 100%; margin: 0 0 4px; font: 700 14px/20px var(--font); color: var(--navy); }
.pill-out {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px;
  border: 1px solid var(--gray); border-radius: 9999px; background: #fff;
  font: 600 14px/30px var(--font); color: var(--navy); text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease;
}
.pill-out:hover { background: var(--bg-2); border-color: var(--navy); }
.foot { margin: 24px 0 0; font: 400 14px/21px var(--font); color: var(--gray); }
.foot a { font-weight: 600; color: var(--blue-text); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot .sep { margin: 0 6px; color: var(--muted); }

/* ---------- manage / cancel ---------- */
.manage .box { max-width: 480px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.manage .add-cal { justify-content: flex-start; max-width: 480px; }
.manage .add-cal-label { font-size: 14px; }
.manage-text { margin: 0 0 20px; font: 400 14px/21px var(--font); color: var(--navy); max-width: 480px; }
.done-title { display: flex; align-items: center; gap: 8px; }
.done-title svg { flex: 0 0 auto; color: var(--success-dot); }
.cancel-form { max-width: 480px; }
.cancel-form .actions { align-items: center; gap: 20px; }
.manage .callout { max-width: 480px; margin-bottom: 20px; }

/* ---------- message card (errors, not found) ---------- */
.msg { max-width: 460px; margin: 0 auto; padding: 96px 32px 40px; text-align: center; }
.msg h1 { margin: 0 0 8px; font: 700 22px/28px var(--font); }
.msg p { margin: 0 0 24px; font: 400 16px/24px var(--font); color: var(--gray); }

/* ---------- profile ---------- */
.profile { margin: 0 99px; padding: 25px 30px 40px; }
.profile-head { text-align: center; }
.profile-head .avatar, .profile-head .initials { margin: 0 auto 10px; }
.profile-name { margin: 10.72px 0; font: 700 16px/24px var(--font); color: var(--gray); }
.welcome { max-width: 360px; margin: 0 auto 24px; padding: 0 20px; font: 400 14px/21px var(--font); color: var(--gray); white-space: pre-line; overflow-wrap: anywhere; }
.events { display: flex; flex-wrap: wrap; margin: 0 -20px; padding: 0; list-style: none; }
.ev { width: 360px; margin: 20px; }
.ev-link {
  display: block; min-height: 160px; padding: 20px;
  border-top: 1px solid var(--line); border-bottom: 1px solid transparent;
  color: var(--navy); text-decoration: none;
  transition: background-color .15s ease;
}
.ev-link:hover { background: var(--line-soft); }
.ev-link:focus-visible { outline-offset: -2px; }
.ev-top { display: flex; align-items: center; }
.ev-dot { flex: 0 0 auto; width: 30px; height: 30px; margin-right: 10px; border: 2px solid #fff; box-sizing: content-box; border-radius: 50%; background: var(--c, #8247f5); }
.ev-name { flex: 1 1 auto; min-width: 0; font: 700 16px/22.4px var(--font); overflow-wrap: anywhere; }
.ev-arrow { flex: 0 0 auto; width: 0; height: 0; margin-left: 12px; border: 8px solid transparent; border-left-color: var(--navy); border-right-width: 0; }
.ev-meta { display: flex; align-items: center; gap: 6px; margin-top: 15px; font: 700 14px/20px var(--font); color: var(--gray); }
.ev-meta svg { color: var(--icon); }
.ev-desc {
  margin-top: 8px; font: 400 14px/19.6px var(--font); color: var(--navy);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.empty-events { margin: 32px auto 0; font: 400 16px/24px var(--font); color: var(--gray); text-align: center; }

/* ---------- time zone popover / sheet ---------- */
.tz-pop {
  position: fixed; z-index: 50;
  display: flex; flex-direction: column;
  width: 396px; max-width: calc(100vw - 32px); max-height: min(320px, calc(100vh - 32px));
  padding-top: 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow-pop);
  animation: rb-fade .12s ease both;
}
.tz-sheet-head { display: none; }
.tz-search { position: relative; margin: 0 20px; }
.tz-search svg { position: absolute; left: 12px; top: 12px; color: var(--gray); pointer-events: none; }
.tz-search input {
  display: block; width: 100%; height: 40px; padding: 8px 12px 8px 36px;
  border: 1px solid var(--field); border-radius: 8px; background: #fff;
  font: 400 14px/20px var(--font); color: var(--navy); -webkit-appearance: none; appearance: none;
}
.tz-search input:focus { border: 2px solid var(--focus); padding: 7px 11px 7px 35px; }
.tz-search input::placeholder { color: var(--gray); opacity: 1; }
.tz-pop-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; }
.tz-pop-title { font: 700 12px/16px var(--font); text-transform: uppercase; letter-spacing: .02em; color: var(--navy); }
.tf-switch { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; font: 400 12px/16px var(--font); color: var(--navy); }
.tf-track { position: relative; width: 28px; height: 16px; border-radius: 8px; background: var(--line); transition: background-color .15s ease; }
.tf-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(10, 37, 64, .25); transition: transform .15s ease; }
.tf-switch[aria-checked="true"] .tf-track { background: var(--blue); }
.tf-switch[aria-checked="true"] .tf-track::after { transform: translateX(12px); }
.tz-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-bottom: 8px; overscroll-behavior: contain; }
.tz-group { padding: 10px 20px 5px; font: 700 14px/20px var(--font); text-transform: uppercase; color: var(--navy); }
.tz-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 36px; padding: 8px 20px; border: 0; background: none;
  font: 400 14px/20px var(--font); color: var(--navy); text-align: left; cursor: pointer;
}
.tz-opt:hover { background: var(--bg-2); }
.tz-opt:focus-visible { outline-offset: -2px; }
.tz-opt[aria-selected="true"] { background: var(--blue); color: #fff; }
.tz-opt-time { flex: 0 0 auto; white-space: nowrap; }
.tz-none { padding: 16px 20px; color: var(--gray); }

/* ---------- compact desktop (768–1079px) ---------- */
@media (min-width: 768px) and (max-width: 1079.98px) {
  .card, .card.is-wide { width: auto; max-width: 1060px; margin: 24px 16px; }
  .wrap { padding: 0; }
  .info, .card.is-wide .info { flex: 0 0 33%; min-width: 260px; padding: 25px 24px; }
  .main { padding: 28px 24px 24px; }
  .picker { display: block; }
  .cal-col { width: 100%; max-width: 343px; }
  .times-col { max-width: none; margin: 28px 0 0; }
  .times-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-height: none; overflow: visible; padding: 0; }
  .slot, .slot:first-child { margin: 0; }
  .slot.is-selected { grid-column: 1 / -1; }
  .profile { margin: 0; padding: 25px 24px 40px; }
  .events { margin: 0 -10px; }
  .ev { width: calc(50% - 20px); margin: 10px; }
  .confirm { padding: 40px 24px; }
}

/* ---------- mobile (<768px) ---------- */
@media (max-width: 767.98px) {
  html, body { background: #fff; }
  .wrap { padding: 0; }
  .card, .card.is-wide {
    display: block; width: auto; min-height: 100vh; min-height: 100dvh; margin: 0;
    border: 0; border-radius: 0; box-shadow: none; overflow: visible; overflow-x: clip; transition: none;
  }
  .info, .card.is-wide .info {
    border-right: 0; border-bottom: 1px solid var(--line);
    padding: 24px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left));
  }
  .main { padding: 24px max(16px, env(safe-area-inset-right)) 40px max(16px, env(safe-area-inset-left)); }
  .event-title { font-size: 26px; line-height: 32px; }

  .m-screen { position: relative; padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
  .m-screen.enter-fwd { animation: rb-in-right .25s var(--ease) both; }
  .m-screen.enter-back { animation: rb-in-left .25s var(--ease) both; }
  .m-head { padding: 25px 25px 0; text-align: center; }
  .m-head .avatar, .m-head .initials { margin: 0 auto 8px; }
  .m-head.has-back { padding-top: 70px; }
  .back.abs { position: absolute; left: max(16px, env(safe-area-inset-left)); top: 16px; z-index: 2; margin: 0; background: #fff; }
  .back.abs:hover { background: var(--blue-tint); }
  .m-rows { margin: 0; padding: 24px 24px 0; }
  .m-desc { padding: 12px 24px 0; }
  .m-desc .desc { margin-top: 0; }
  .m-desc .desc.is-clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .m-desc .desc.is-clamped p { margin-bottom: 0; }
  .show-more { margin: 4px 0 5px; padding: 6px 0; border: 0; background: none; cursor: pointer; font: 700 14px/20px var(--font); text-transform: uppercase; color: var(--navy); }
  .m-divider { height: 0; margin: 20px 0 0; border: 0; border-bottom: 1px solid var(--line); }
  .m-step-title { margin: 24px 0 10px; font: 700 22px/33px var(--font); text-align: center; }
  .m-cal-wrap { width: 320px; max-width: calc(100% - 24px); margin: 0 auto; }
  .m-cal-wrap .cal-grid { width: 100%; }
  .m-cal-wrap .day { width: min(44px, 100%); height: auto; aspect-ratio: 1 / 1; }
  .m-cal-wrap .cal-head { margin-bottom: 16px; }
  .m-cal-wrap .tz { margin-top: 24px; }
  .m-cal-wrap .grid-overlay { inset: 24px 0 0; }

  .m-times-screen { padding: 16px max(16px, env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .m-day { margin: 25px 0 5px; font: 700 22px/26px var(--font); text-align: center; }
  .m-date { margin: 0 0 10px; font: 400 14px/21px var(--font); text-align: center; color: var(--navy); }
  .m-times-screen .tz { margin-top: 12px; }
  .m-times-screen .m-divider { margin: 20px -16px 0; margin-left: calc(-1 * max(16px, env(safe-area-inset-left))); margin-right: calc(-1 * max(16px, env(safe-area-inset-right))); }
  .m-select-time { margin: 16px 0 5px; font: 700 21px/31.5px var(--font); text-align: center; }
  .m-duration { margin: 0 0 16px; font: 400 14px/21px var(--font); text-align: center; }
  .m-times .times-list { max-height: none; overflow: visible; padding: 0; }
  .m-times .slot { margin: 0 0 10px; }
  .m-times .times-empty { text-align: center; }

  .m-details { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
  .m-details .m-head { padding: 70px 25px 0; }
  .m-details .m-rows { padding: 20px max(16px, env(safe-area-inset-left)) 0; }
  .m-details .rows .former { margin-bottom: 12px; }
  .desc-toggle {
    display: flex; align-items: center; gap: 8px; width: 100%; height: 52px; margin-top: 12px; padding: 16px;
    border: 0; border-top: 1px solid var(--line); background: none; cursor: pointer;
    font: 400 14px/20px var(--font); color: var(--navy); text-align: left;
  }
  .desc-toggle svg { color: var(--blue); transition: transform .2s ease; }
  .desc-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
  .desc-panel { padding: 0 16px 8px; }
  .desc-panel + .m-divider { margin-top: 0; }
  .desc-panel .desc { margin-top: 0; }
  .m-form-wrap { padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
  .m-form-wrap .step-title { margin: 24px 0 12px; }
  .form { max-width: none; }
  .input, .textarea { font-size: 16px; line-height: 22px; }
  .input { height: 44px; padding: 10px 12px; }
  .input:focus { padding: 9px 11px; }
  .btn-submit { width: 100%; height: 44px; }

  .confirm { max-width: none; padding: 32px max(16px, env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .box { padding: 16px; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { width: 100%; height: 44px; }
  .cancel-form .actions { align-items: stretch; }
  .cancel-form .actions .link-btn { align-self: center; padding: 8px; }
  .manage .add-cal { justify-content: center; }

  .profile { margin: 0; padding: 32px 0 40px; }
  .events { flex-direction: column; margin: 0; }
  .ev { width: auto; margin: 0 16px; }
  .ev-link { min-height: 0; padding: 20px 4px; }
  .ev:last-child .ev-link { border-bottom-color: var(--line); }
  .msg { padding: 72px 24px 40px; }

  .tz-pop.is-sheet {
    inset: 0; width: auto; max-width: none; max-height: none; height: 100%;
    padding-top: env(safe-area-inset-top); border: 0; border-radius: 0; box-shadow: none;
    animation: rb-sheet .22s var(--ease) both;
  }
  .tz-pop.is-sheet .tz-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 12px 16px; }
  .tz-sheet-title { font: 700 18px/24px var(--font); }
  .tz-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--navy); cursor: pointer; }
  .tz-pop.is-sheet .tz-search { margin: 0 16px; }
  .tz-pop.is-sheet .tz-search input { font-size: 16px; }
  .tz-pop.is-sheet .tz-pop-head { padding: 12px 16px; }
  .tz-pop.is-sheet .tz-group { padding: 12px 16px 6px; }
  .tz-pop.is-sheet .tz-opt { min-height: 44px; padding: 10px 16px; }
  .tz-pop.is-sheet .tz-list { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}
@keyframes rb-in-right { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rb-in-left { from { transform: translateX(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rb-sheet { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

html.no-scroll, html.no-scroll body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .dots span { animation: none; opacity: .7; }
}
