/* Public booking, client cabinet, visit / offer pages.
   Palette "lacquer": porcelain base, aubergine ink, cherry gel accent, nude. */

:root {
  --bg: #F3F0F7;
  --bg-2: #EAE4F1;
  --surface: rgba(255, 255, 255, .78);
  --surface-solid: #FFFFFF;
  --ink: #1E1630;
  --ink-2: #5B5070;
  --ink-3: #8E84A0;
  --line: rgba(30, 22, 48, .10);
  --accent: #B0154E;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(176, 21, 78, .10);
  --nude: #E8CFC4;
  --ok: #1F8A5B;
  --warn: #B26A00;
  --danger: #C0283A;
  --shadow-1: 0 1px 2px rgba(46, 16, 52, .08), 0 4px 14px rgba(46, 16, 52, .08);
  --shadow-2: 0 2px 6px rgba(46, 16, 52, .10), 0 18px 44px -10px rgba(46, 16, 52, .30);
  --shadow-3: 0 30px 80px -20px rgba(46, 16, 52, .45);
  --gloss: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0) 55%);
  --r-s: 10px;
  --r-m: 16px;
  --r-l: 26px;
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17111F; --bg-2: #1E1628; --surface: rgba(38, 29, 50, .78); --surface-solid: #251C30;
    --ink: #F4EEFB; --ink-2: #C3B8D2; --ink-3: #8F84A0; --line: rgba(244, 238, 251, .10);
    --accent: #E0407A; --accent-soft: rgba(224, 64, 122, .16); --nude: #5A4048;
    --shadow-1: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35);
    --shadow-2: 0 2px 6px rgba(0,0,0,.4), 0 22px 50px -12px rgba(0,0,0,.7);
    --shadow-3: 0 30px 80px -20px rgba(0,0,0,.8);
    --gloss: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0) 55%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17111F; --bg-2: #1E1628; --surface: rgba(38, 29, 50, .78); --surface-solid: #251C30;
  --ink: #F4EEFB; --ink-2: #C3B8D2; --ink-3: #8F84A0; --line: rgba(244, 238, 251, .10);
  --accent: #E0407A; --accent-soft: rgba(224, 64, 122, .16); --nude: #5A4048;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35);
  --shadow-2: 0 2px 6px rgba(0,0,0,.4), 0 22px 50px -12px rgba(0,0,0,.7);
  --shadow-3: 0 30px 80px -20px rgba(0,0,0,.8);
  --gloss: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,0) 55%);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; font-family: var(--font); font-size: 16px; line-height: 1.5;
  color: var(--ink); background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 110% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    radial-gradient(900px 500px at -20% 10%, rgba(232, 207, 196, .55), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
img { display: block; max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- shell */

.top {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}
.top-in { max-width: 1120px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand > span:last-child { display: grid; min-width: 0; line-height: 1.2; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px; flex: none;
  background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--accent) 45%, #fff), var(--accent) 55%, color-mix(in srgb, var(--accent) 60%, #000));
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.25), inset 0 2px 3px rgba(255,255,255,.5), 0 6px 14px -4px color-mix(in srgb, var(--accent) 60%, transparent);
}
.brand-name { font-weight: 750; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { margin-left: auto; display: flex; gap: 8px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 20px 16px 140px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 14px; border: 0;
  font-weight: 650; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  color: var(--accent-ink);
  background: var(--gloss), var(--accent);
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 -2px 0 rgba(0,0,0,.18) inset, 0 12px 26px -10px color-mix(in srgb, var(--accent) 75%, transparent);
}
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 -2px 0 rgba(0,0,0,.18) inset, 0 16px 34px -10px color-mix(in srgb, var(--accent) 90%, transparent); }
.btn-primary[disabled] { opacity: .45; box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); border: 1px solid var(--line); }
.btn-text { background: none; color: var(--ink-2); min-height: 40px; padding: 0 10px; }
.btn-text:hover { color: var(--ink); }
.btn-sm { min-height: 36px; padding: 0 14px; border-radius: 11px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-danger { background: none; color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); }

.icon { width: 20px; height: 20px; flex: none; }

/* ---------------------------------------------------------------- hero */

.hero { display: grid; gap: 10px; margin: 8px 0 22px; }
.hero h1 { margin: 0; font-size: clamp(30px, 6.4vw, 52px); line-height: 1.02; letter-spacing: -.035em; font-weight: 800; max-width: 15ch; }
.hero p { margin: 0; color: var(--ink-2); max-width: 52ch; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); text-decoration: none;
}
.pill .icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- layout */

.layout { display: grid; gap: 24px; }
.layout > * { min-width: 0; }
html, body { overflow-x: clip; }
@media (max-width: 959px) { .aside { display: none; } }
@media (min-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
  .aside { position: sticky; top: 84px; }
}

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l);
  box-shadow: var(--shadow-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 20px;
}
.section-title { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; }
.section-title h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; font-weight: 750; }
.section-title .hint { color: var(--ink-3); font-size: 14px; }

/* category chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -2px 6px; scrollbar-width: none; overscroll-behavior-x: contain; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-solid); color: var(--ink-2); font-weight: 600; font-size: 14px;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); box-shadow: var(--shadow-1); }

/* services */
.cat-title { font-size: 15px; font-weight: 700; color: var(--ink-2); margin: 18px 0 10px; }
.svc-list { display: grid; gap: 10px; }
.svc {
  position: relative; display: block;
  width: 100%; text-align: left; padding: 14px 16px; border-radius: var(--r-m);
  background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  transition: box-shadow .2s ease, border-color .2s ease, transform .15s ease;
}
.svc:hover { box-shadow: var(--shadow-2); }
.svc-name { font-weight: 650; font-size: 16px; line-height: 1.3; }
.svc-meta { color: var(--ink-3); font-size: 14px; display: flex; gap: 12px; flex-wrap: wrap; }
.svc-price { font-weight: 700; white-space: nowrap; text-align: right; }
.svc-add {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg-2); color: var(--ink-2);
  transition: background .2s, color .2s, transform .25s cubic-bezier(.3,1.6,.5,1);
}
.svc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 34px; gap: 4px 12px; align-items: center; }
.svc-row > span:first-child { display: grid; gap: 2px; min-width: 0; }
.svc.on { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-2); }
.svc.on .svc-add { background: var(--accent); color: #fff; transform: rotate(45deg); }
.svc-desc { display: block; color: var(--ink-2); font-size: 14px; margin-top: 4px; }

.upsell {
  display: flex; gap: 12px; align-items: center; margin: -2px 0 4px 18px; padding: 10px 12px 10px 14px;
  border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; background: var(--accent-soft);
  font-size: 14px;
}
.upsell b { font-weight: 650; }
.upsell .btn { margin-left: auto; }

/* ---------------------------------------------------------------- tray (visit summary) */

.tray {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30;
  border-radius: 22px; padding: 12px 12px 12px 18px;
  background: color-mix(in srgb, var(--surface-solid) 86%, transparent);
  backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid var(--line); box-shadow: var(--shadow-3);
  display: flex; align-items: center; gap: 12px;
  transform: translateY(140%); transition: transform .45s cubic-bezier(.2,.9,.25,1.1);
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}
.tray.show { transform: translateY(0); }
.tray-info { min-width: 0; }
.tray-count { font-weight: 700; }
.tray-sub { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tray .btn { margin-left: auto; }
@media (min-width: 960px) { .tray { display: none; } }

.summary h3 { margin: 0 0 12px; font-size: 18px; letter-spacing: -.01em; }
.sum-list { display: grid; gap: 10px; margin: 0 0 14px; padding: 0; list-style: none; }
.sum-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 15px; }
.sum-item small { color: var(--ink-3); grid-column: 1; }
.sum-total { display: flex; justify-content: space-between; padding-top: 12px; border-top: 1px dashed var(--line); font-weight: 750; font-size: 18px; }
.sum-empty { color: var(--ink-3); font-size: 15px; }

/* ---------------------------------------------------------------- masters */

.assign { display: grid; gap: 18px; }
.assign-row h3 { margin: 0 0 10px; font-size: 16px; font-weight: 700; }
.masters { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; overscroll-behavior-x: contain; }
.masters::-webkit-scrollbar { display: none; }
.mcard {
  flex: none; width: 128px; padding: 12px 10px; border-radius: var(--r-m); text-align: center;
  background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  display: grid; justify-items: center; gap: 6px;
}
.mcard[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-2); }
.avatar {
  width: 58px; height: 58px; border-radius: 50%; object-fit: cover; display: grid; place-items: center;
  font-weight: 750; font-size: 20px; color: #fff; box-shadow: inset 0 -4px 10px rgba(0,0,0,.2), 0 6px 14px -6px rgba(0,0,0,.4);
}
.mname { font-weight: 650; font-size: 14px; line-height: 1.25; }
.mpos { font-size: 12px; color: var(--ink-3); line-height: 1.3; }
.mprice { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.mrate { font-size: 12px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 3px; }
.mcard .link { font-size: 12px; color: var(--accent); background: none; border: 0; padding: 0; }

/* ---------------------------------------------------------------- dates */

.days { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; overscroll-behavior-x: contain; scroll-snap-type: x proximity; }
.days::-webkit-scrollbar { display: none; }
.day {
  flex: none; width: 62px; padding: 10px 0 9px; border-radius: 16px; text-align: center; scroll-snap-align: start;
  background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  display: grid; gap: 2px;
}
.day .wd { font-size: 12px; color: var(--ink-3); }
.day .dn { font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.day .mo { font-size: 11px; color: var(--ink-3); }
.day[disabled] { opacity: .35; box-shadow: none; cursor: default; background: transparent; }
.day[aria-pressed="true"] { background: var(--gloss), var(--accent); color: #fff; border-color: transparent; box-shadow: 0 14px 26px -12px color-mix(in srgb, var(--accent) 80%, transparent); }
.day[aria-pressed="true"] .wd, .day[aria-pressed="true"] .mo { color: rgba(255,255,255,.8); }

/* ---------------------------------------------------------------- time options (signature) */

.dayparts { display: grid; gap: 18px; }
.daypart h4 { margin: 0 0 10px; font-size: 14px; font-weight: 650; color: var(--ink-3); }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.time {
  min-height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-solid);
  font-weight: 700; font-size: 16px; box-shadow: var(--shadow-1); position: relative;
}
.time.fit::after {
  content: ''; position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.time[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.legend .btn { white-space: normal; text-align: left; height: auto; }
.legend { font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* The visit plan: one lane per master, bars like strokes of lacquer. */
.plan {
  margin-top: 16px; padding: 16px; border-radius: var(--r-l);
  background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow-2);
  animation: rise .35s cubic-bezier(.2,.9,.3,1);
}
.plan-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 14px; }
.plan-time { white-space: nowrap; }
.plan-time { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.plan-time span { color: var(--ink-3); font-weight: 600; font-size: 18px; letter-spacing: 0; }
.plan-note { font-size: 13px; color: var(--ink-2); }
.lanes { display: grid; gap: 10px; }
.lane { display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: center; }
.lane-who { font-size: 13px; font-weight: 650; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.lane-who small { display: block; font-weight: 500; color: var(--ink-3); }
.lane-track { position: relative; height: 40px; border-radius: 12px; background: repeating-linear-gradient(90deg, var(--bg-2) 0 1px, transparent 1px 25%); }
.bar {
  position: absolute; top: 3px; bottom: 3px; border-radius: 10px; color: #fff; overflow: hidden;
  padding: 0 10px; display: flex; align-items: center; font-size: 12px; font-weight: 650; white-space: nowrap;
  background: var(--gloss), var(--c, var(--accent));
  box-shadow: inset 0 -3px 6px rgba(0,0,0,.18), inset 0 1px 1px rgba(255,255,255,.4), 0 6px 14px -6px var(--c, var(--accent));
  transform-origin: left center; animation: stroke .55s cubic-bezier(.2,.9,.3,1) both;
}
.bar span { overflow: hidden; text-overflow: ellipsis; }
.plan-scale { display: grid; grid-template-columns: 76px 1fr; gap: 10px; margin-top: 6px; font-size: 11px; color: var(--ink-3); }
.plan-scale div { display: flex; justify-content: space-between; }
@keyframes stroke { from { transform: scaleX(0); opacity: .4; } to { transform: scaleX(1); opacity: 1; } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

.nearest { display: grid; gap: 8px; }
.near {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; width: 100%; text-align: left;
  background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.near b { font-weight: 700; }
.near small { color: var(--ink-3); display: block; }
.near .go { margin-left: auto; color: var(--accent); font-weight: 650; font-size: 14px; }

/* ---------------------------------------------------------------- forms */

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.input {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface-solid); font-size: 16px; box-shadow: inset 0 1px 2px rgba(46,16,52,.06);
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea.input { min-height: 84px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin-top: 1px; }
.err { color: var(--danger); font-size: 14px; margin: 8px 0; }
.note { font-size: 14px; color: var(--ink-2); background: var(--bg-2); border-radius: 14px; padding: 12px 14px; }
.note.warn { background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--ink); }

.steps-nav { display: flex; gap: 10px; align-items: center; margin-top: 18px; }
.steps-nav .btn-primary { margin-left: auto; }

.back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; }

/* ---------------------------------------------------------------- confirmation / visit page */

.done { text-align: left; }
.done-mark {
  width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; margin-bottom: 16px;
  background: var(--gloss), var(--accent); color: #fff; box-shadow: 0 18px 40px -14px color-mix(in srgb, var(--accent) 90%, transparent);
  animation: pop .5s cubic-bezier(.3,1.6,.5,1);
}
.done h2 { font-size: 30px; letter-spacing: -.03em; margin: 0 0 6px; line-height: 1.1; }
.done p { color: var(--ink-2); margin: 0 0 16px; }
@keyframes pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 15px; margin: 0 0 16px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.status {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 650;
  background: var(--bg-2); color: var(--ink-2);
}
.status.st-confirmed, .status.st-booked { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.status.st-pending { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.status.st-cancelled, .status.st-no_show { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }

.stars { display: flex; gap: 6px; }
.star {
  width: 52px; height: 52px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-solid);
  display: grid; place-items: center; color: var(--ink-3); box-shadow: var(--shadow-1); transition: transform .2s cubic-bezier(.3,1.6,.5,1);
}
.star.on { color: #fff; background: var(--gloss), var(--accent); border-color: transparent; transform: translateY(-2px); }
.star svg { width: 24px; height: 24px; }

/* cabinet */
.cab-grid { display: grid; gap: 16px; }
@media (min-width: 860px) { .cab-grid { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.vcard {
  padding: 16px; border-radius: var(--r-m); background: var(--surface-solid); border: 1px solid var(--line);
  box-shadow: var(--shadow-1); display: grid; gap: 6px;
}
.vcard + .vcard { margin-top: 10px; }
.vcard-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.vcard-when { font-weight: 750; font-size: 17px; letter-spacing: -.01em; }
.vcard-what { color: var(--ink-2); font-size: 15px; }
.muted { color: var(--ink-3); }
.empty { color: var(--ink-3); padding: 18px 0; }

.otp { display: flex; gap: 8px; }
.otp input { text-align: center; font-size: 24px; letter-spacing: .3em; font-weight: 700; }

/* toasts */
.toast {
  position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 20px); opacity: 0; z-index: 60;
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow-3);
  font-size: 15px; font-weight: 600; transition: opacity .25s, transform .3s; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* gallery sheet */
.sheet-back { position: fixed; inset: 0; background: rgba(20, 10, 28, .5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet {
  width: 100%; max-width: 640px; max-height: 88vh; overflow: auto; overscroll-behavior: contain;
  background: var(--surface-solid); border-radius: 26px 26px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--shadow-3); animation: up .35s cubic-bezier(.2,.9,.3,1);
}
@media (min-width: 700px) { .sheet-back { align-items: center; } .sheet { border-radius: 26px; } }
.sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sheet-head h3 { margin: 0; font-size: 20px; }
.sheet-head .btn-text { margin-left: auto; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

.skeleton { border-radius: 14px; background: linear-gradient(90deg, var(--bg-2), var(--surface-solid), var(--bg-2)); background-size: 200% 100%; animation: sh 1.2s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

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