/* ==========================================================================
   صالون حمزة الجابي — دفتر الدور
   "Chair & Razor" — a palette pulled from the shop itself:
     oxblood  — the leather of the barber chair      (action)
     steel    — the straight razor                   (cool accent, info)
     brass    — the chair's fittings & the pole caps (hairlines, numerals)
     bone     — the porcelain basin                  (page)
     espresso — the signboard & the ink              (text, dark panels)
   ========================================================================== */

:root {
  --bone: #ece4d6;
  --bone-2: #e3d9c7;
  --porcelain: #f8f3ea;
  --porcelain-2: #f1e9db;
  --espresso: #261b16;
  --espresso-2: #35271f;
  --espresso-3: #4a382d;
  --ink: #261b16;
  --ink-2: #6b5d53;
  --ink-3: #a3968a;
  --oxblood: #6f2430;
  --oxblood-hi: #8d3442;
  --oxblood-lo: #4f1720;
  --steel: #5c7385;
  --steel-soft: #dfe5e7;
  --brass: #b98b45;
  --brass-hi: #dcbb80;
  --brass-lo: #8a6430;
  --ok: #3d7a5c;
  --line: rgba(38, 27, 22, .09);
  --hair: rgba(185, 139, 69, .5);

  --display: 'El Messiri', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --ui: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --hand: var(--display);
  --text-3: var(--ink-3);

  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.45, .64, 1);
  --r: 20px;
  --leather: linear-gradient(180deg, var(--oxblood-hi) 0%, var(--oxblood) 55%, var(--oxblood-lo) 100%);
  --brass-foil: linear-gradient(135deg, #f0dcae 0%, #cfa660 30%, #a97b3a 55%, #e2c487 78%, #b58a47 100%);
  --lift: 0 1px 0 rgba(255,255,255,.85) inset, 0 1px 2px rgba(38,27,22,.08), 0 10px 30px -12px rgba(38,27,22,.28), 0 30px 60px -30px rgba(38,27,22,.25);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; background: var(--bone); }
body {
  font-family: var(--ui); color: var(--ink);
  background:
    radial-gradient(120% 55% at 50% -8%, #f6efe3 0%, rgba(246, 239, 227, 0) 70%),
    radial-gradient(70% 50% at 110% 100%, rgba(92, 115, 133, .12), transparent 70%),
    var(--bone);
  background-attachment: fixed;
  font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .06; background-image: var(--grain); mix-blend-mode: multiply; }

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
input { min-width: 0; }
:focus-visible { outline: 2px solid var(--steel); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ltr { direction: ltr; }
.num { font-variant-numeric: lining-nums tabular-nums; }
#app { position: relative; z-index: 1; }
b, strong { font-weight: 600; }

/* ---------------- motion primitives ---------------- */
.enter-up { animation: rise .8s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.stagger > * { animation: rise .9s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .02s; }
.stagger > *:nth-child(2) { animation-delay: .09s; }
.stagger > *:nth-child(3) { animation-delay: .16s; }
.stagger > *:nth-child(4) { animation-delay: .23s; }
.stagger > *:nth-child(5) { animation-delay: .30s; }
.stagger > *:nth-child(n+6) { animation-delay: .36s; }
::view-transition-old(root) { animation: vtOut .32s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vtIn .6s var(--ease) both; }
@keyframes vtOut { to { opacity: 0; transform: scale(.985); filter: blur(3px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(14px) scale(1.01); } }

/* ---------------- splash ---------------- */
.splash { position: fixed; inset: 0; z-index: 9500; display: grid; place-content: center; justify-items: center; gap: 6px; background: var(--bone); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.splash.out { opacity: 0; transform: scale(1.03); pointer-events: none; }
.pole { position: relative; width: 30px; height: 116px; margin-bottom: 22px; border-radius: 15px; overflow: hidden; background: var(--porcelain); box-shadow: 0 0 0 3px var(--brass), 0 0 0 4px rgba(38,27,22,.25), 0 22px 40px -12px rgba(38,27,22,.45); }
.pole span { position: absolute; inset: -60px 0 0; background: repeating-linear-gradient(-40deg, var(--oxblood) 0 9px, var(--porcelain) 9px 18px, var(--steel) 18px 27px, var(--porcelain) 27px 36px); animation: pole 1.6s linear infinite; }
.pole span::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.22), rgba(255,255,255,.6) 38%, rgba(255,255,255,0) 56%, rgba(0,0,0,.25)); }
@keyframes pole { to { transform: translateY(47px); } }
.splash-title { font-family: var(--display); font-weight: 600; font-size: 30px; color: var(--espresso); }
.splash-sub { font-size: 12px; letter-spacing: .4em; color: var(--ink-2); }

/* ---------------- layout ---------------- */
.screen { max-width: 520px; margin: 0 auto; padding: calc(16px + var(--safe-t)) 18px calc(44px + var(--safe-b)); display: flex; flex-direction: column; gap: 18px; }
.screen.wide { max-width: 1180px; padding-bottom: calc(112px + var(--safe-b)); }

/* ---------------- buttons ---------------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 24px; border-radius: 999px;
  font-size: 16.5px; font-weight: 600; letter-spacing: .01em; color: var(--ink); background: var(--porcelain);
  box-shadow: var(--lift);
  transition: transform .5s var(--spring), box-shadow .3s, opacity .2s;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(.965); transition-duration: .12s; }
.btn[disabled] { opacity: .42; pointer-events: none; }
/* primary = oxblood leather with a faint grain and a stitched inner edge */
.btn-brass {
  color: #fbf3e6; background: var(--grain), var(--leather); background-blend-mode: soft-light, normal;
  box-shadow: 0 1px 0 rgba(255,255,255,.22) inset, 0 -2px 0 rgba(0,0,0,.25) inset, 0 12px 26px -10px rgba(111, 36, 48, .7), 0 2px 4px rgba(38,27,22,.25);
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
.btn-brass::before { content: ''; position: absolute; inset: 4px; border-radius: inherit; border: 1px dashed rgba(220, 187, 128, .35); pointer-events: none; }
.btn-brass::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.22) 50%, transparent 62%) 150% 0 / 250% 100% no-repeat; animation: sheen 6s 1.4s var(--ease) infinite; }
@keyframes sheen { 0%, 72% { background-position: 150% 0; } 100% { background-position: -150% 0; } }
.btn.loading span { opacity: .65; }
.btn.loading::after { animation: sheen 1s linear infinite; }
.btn-ghost { background: transparent; box-shadow: inset 0 0 0 1px rgba(38,27,22,.18); }
.btn-ghost:hover { background: rgba(38,27,22,.04); }
.btn-danger { background: var(--oxblood); color: #fbf3e6; }
.btn-block { width: 100%; }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14.5px; gap: 7px; }

.icon-btn { position: relative; overflow: hidden; flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--espresso); box-shadow: inset 0 0 0 1px rgba(38,27,22,.16); transition: transform .45s var(--spring), background .2s; }
.icon-btn:active { transform: scale(.9); transition-duration: .1s; }
.icon-btn:hover { background: rgba(38,27,22,.04); }
.icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sm { width: 17px; height: 17px; }
.ripple { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .12; transform: scale(0); animation: ripple .7s var(--ease) forwards; z-index: -1; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
.btn, .icon-btn, .row, .chip, .tab { -webkit-touch-callout: none; }

/* ---------------- surfaces ---------------- */
.card { position: relative; isolation: isolate; padding: 22px; border-radius: var(--r); background: linear-gradient(180deg, #fcf9f3, var(--porcelain) 45%, var(--porcelain-2)); box-shadow: var(--lift); }
.card::after { content: ''; position: absolute; inset: 7px; border-radius: calc(var(--r) - 6px); border: 1px solid var(--hair); pointer-events: none; opacity: .7; }

/* ---------------- fields ---------------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-2); padding-inline-start: 4px; }
.input { width: 100%; height: 56px; padding: 0 18px; border-radius: 16px; border: 1px solid rgba(38,27,22,.12); background: #fffdf9; color: var(--ink); font-size: 17px; outline: none; transition: border-color .25s, box-shadow .25s, background .25s; box-shadow: 0 1px 2px rgba(38,27,22,.05) inset; }
.input-lg { height: 60px; font-size: 18px; }
.input::placeholder { color: var(--ink-3); }
.input:focus { border-color: var(--steel); box-shadow: 0 0 0 4px rgba(92, 115, 133, .16); background: #fff; }
.field.err .input, .pin.err .pin-box, .phone.err, .field.err .phone, .otp.err .otp-box { border-color: var(--oxblood); box-shadow: 0 0 0 4px rgba(111, 36, 48, .12); }
.shake { animation: shake .45s; }
@keyframes shake { 15%, 85% { transform: translateX(-2px); } 30%, 70% { transform: translateX(5px); } 45%, 55% { transform: translateX(-6px); } }

/* 4-digit PIN (barber) */
.pin { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; direction: ltr; }
.pin-box { height: 60px; border-radius: 16px; border: 1px solid rgba(38,27,22,.12); background: #fffdf9; position: relative; display: grid; place-items: center; transition: border-color .2s, box-shadow .2s; }
.pin-box.focus { border-color: var(--steel); box-shadow: 0 0 0 4px rgba(92, 115, 133, .16); }
.pin-box.filled::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--espresso); animation: pop .35s var(--spring); }
.pin-box.focus::before { content: ''; position: absolute; width: 1.5px; height: 24px; background: var(--steel); animation: caret 1s steps(1) infinite; }
.pin-box.filled.focus::before { display: none; }
.pin input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; font-size: 16px; caret-color: transparent; }
@keyframes caret { 50% { opacity: 0; } }
@keyframes pop { 0% { transform: scale(.3); } }

/* the 05 phone field — "05" is printed on the field and can't be erased */
.phone {
  position: relative; display: flex; align-items: center; direction: ltr; height: 60px; padding: 0 6px;
  border-radius: 16px; border: 1px solid rgba(38,27,22,.12); background: #fffdf9; cursor: text;
  transition: border-color .25s, box-shadow .25s;
}
.phone:focus-within { border-color: var(--steel); box-shadow: 0 0 0 4px rgba(92, 115, 133, .16); }
.phone-pre {
  flex: none; height: 46px; min-width: 54px; display: grid; place-items: center; margin-right: 10px; border-radius: 11px;
  font-family: var(--serif); font-weight: 600; font-size: 26px; letter-spacing: .02em; color: var(--brass-hi);
  background: linear-gradient(180deg, var(--espresso-2), var(--espresso)); box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 4px 10px -4px rgba(38,27,22,.6);
  user-select: none;
}
.phone-in { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-size: 21px; font-weight: 500; letter-spacing: .08em; color: var(--ink); font-variant-numeric: tabular-nums; }
.phone-in::placeholder { color: var(--ink-3); opacity: .55; letter-spacing: .08em; }
.phone-meter { flex: none; display: grid; grid-template-columns: repeat(4, 5px); gap: 4px; margin: 0 10px 0 6px; }
.phone-meter i { width: 5px; height: 5px; border-radius: 50%; background: rgba(38,27,22,.14); transition: background .25s, transform .35s var(--spring); }
.phone-meter i.on { background: var(--brass); transform: scale(1.15); }
.phone.complete { border-color: rgba(61, 122, 92, .55); }
.phone.complete .phone-meter i { background: var(--ok); }
.phone.complete .phone-meter { animation: popIn .5s var(--spring); }
.phone.nudge { animation: nudge .3s; }
@keyframes nudge { 30% { transform: translateX(4px); } 60% { transform: translateX(-3px); } }
@keyframes popIn { 40% { transform: scale(1.25); } }

/* 6-digit email code */
.otp { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; direction: ltr; margin: 6px 0 4px; }
.otp-box { height: 62px; border-radius: 14px; border: 1px solid rgba(38,27,22,.12); background: #fffdf9; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 32px; color: var(--espresso); transition: border-color .2s, box-shadow .2s, background .2s; position: relative; }
.otp-box.focus { border-color: var(--steel); box-shadow: 0 0 0 4px rgba(92, 115, 133, .16); }
.otp-box.focus::before { content: ''; position: absolute; width: 1.5px; height: 26px; background: var(--steel); animation: caret 1s steps(1) infinite; }
.otp-box.filled { background: #fff; }
.otp-box.filled::before { display: none; }
.otp input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; font-size: 16px; caret-color: transparent; }
.otp.checking .otp-box { animation: wave 1s ease-in-out infinite; border-color: var(--brass); }
.otp.checking .otp-box:nth-child(2) { animation-delay: .08s; } .otp.checking .otp-box:nth-child(3) { animation-delay: .16s; }
.otp.checking .otp-box:nth-child(4) { animation-delay: .24s; } .otp.checking .otp-box:nth-child(5) { animation-delay: .32s; } .otp.checking .otp-box:nth-child(6) { animation-delay: .4s; }
@keyframes wave { 50% { transform: translateY(-4px); } }
.otp-foot { display: flex; justify-content: center; margin-top: 10px; }

/* chips & badges */
.chip { position: relative; overflow: hidden; flex: none; height: 36px; padding: 0 16px; border-radius: 99px; box-shadow: inset 0 0 0 1px rgba(38,27,22,.15); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; transition: background .25s, color .25s, transform .4s var(--spring); }
.chip:active { transform: scale(.95); }
.chip[aria-pressed="true"] { background: var(--espresso); color: var(--bone); box-shadow: none; }
.chip .count { font-size: 12px; padding: 0 7px; border-radius: 99px; background: rgba(185,139,69,.25); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 10px; border-radius: 99px; font-size: 12px; font-weight: 500; white-space: nowrap; background: rgba(38,27,22,.05); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { color: var(--ok); } .badge.wait { color: var(--brass-lo); } .badge.bad { color: var(--oxblood); }

/* ---------------- topbar / brand ---------------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--brass-hi); background: linear-gradient(180deg, var(--espresso-2), var(--espresso)); box-shadow: 0 0 0 2px var(--bone), 0 0 0 3px var(--hair), 0 8px 18px -8px rgba(38,27,22,.6); }
.brand-mark .icon { width: 20px; height: 20px; stroke-width: 1.7; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 19px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 12.5px; color: var(--ink-2); line-height: 1.3; }
.live { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; color: var(--ok); }
.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: livePulse 2.2s infinite; }
.live.closed { color: var(--oxblood); }
.live.closed::before, .live.offline::before { animation: none; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(61, 122, 92, .45); } 70% { box-shadow: 0 0 0 7px rgba(61, 122, 92, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 122, 92, 0); } }

/* ---------------- GUEST: espresso signboard ---------------- */
.sign {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  padding: 30px 18px 18px; border-radius: 26px; color: var(--bone);
  background: var(--grain), radial-gradient(120% 90% at 50% 0%, var(--espresso-3), var(--espresso) 65%); background-blend-mode: soft-light, normal;
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 24px 50px -20px rgba(38,27,22,.7);
}
.sign::before { content: ''; position: absolute; inset: 8px; border-radius: 19px; border: 1px solid rgba(220, 187, 128, .28); pointer-events: none; }
@property --lx { syntax: '<percentage>'; inherits: false; initial-value: 20%; }
.sign::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(40% 60% at var(--lx) 0%, rgba(220, 187, 128, .18), transparent 70%); animation: sweep 9s ease-in-out infinite alternate; }
@keyframes sweep { from { --lx: 15%; } to { --lx: 85%; } }
.sign-kicker { font-size: 11.5px; letter-spacing: .42em; color: var(--brass-hi); font-weight: 500; }
.sign-title { margin: 10px 0 18px; font-family: var(--display); font-weight: 600; font-size: clamp(38px, 11.5vw, 56px); line-height: 1.18; color: #f6eee0; }
.sign-title em { font-style: normal; background: var(--brass-foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
.live-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 16px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(220, 187, 128, .2); }
.live-strip:empty { display: none; }
.ls { padding: 10px 6px 9px; display: flex; flex-direction: column; position: relative; }
.ls + .ls::before { content: ''; position: absolute; right: 0; top: 24%; bottom: 24%; width: 1px; background: rgba(220, 187, 128, .22); }
.ls b { font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.05; color: var(--brass-hi); }
.ls .k { font-size: 11.5px; color: rgba(236, 228, 214, .6); }

.perks { display: flex; justify-content: space-between; gap: 6px; }
.perk { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.perk .icon { width: 46px; height: 46px; padding: 12px; border-radius: 50%; color: var(--oxblood); background: var(--porcelain); box-shadow: var(--lift); }
.perk b { font-size: 13px; font-weight: 500; color: var(--ink-2); }

/* teaser book */
.book.teaser .page { overflow: hidden; padding-bottom: 0; }
.row.teaser-first { animation: rise .8s .25s var(--ease) both; }
.row.empty-first .row-name { color: var(--ink-3); font-size: 18px; }
.row.redacted { pointer-events: none; user-select: none; }
.row.redacted .row-name, .row.redacted .row-no { filter: blur(5px); opacity: .5; transition: filter 1s var(--ease), opacity 1s; }
.veil { position: relative; margin: -170px -22px 0; padding: 124px 24px 26px; background: linear-gradient(180deg, rgba(248,243,234,0), rgba(248,243,234,.93) 42%, var(--porcelain) 60%); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.veil-seal { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: var(--brass-hi); background: radial-gradient(circle at 35% 30%, var(--oxblood-hi), var(--oxblood-lo)); box-shadow: 0 0 0 4px var(--porcelain), 0 0 0 5px var(--hair), 0 12px 22px -8px rgba(111,36,48,.6); animation: sealIn .8s .6s var(--spring) both; }
@keyframes sealIn { from { transform: scale(.3) rotate(-30deg); opacity: 0; } }
.veil-count { display: flex; align-items: baseline; gap: 8px; color: var(--ink-2); font-size: 15px; }
.veil-count b { font-family: var(--serif); font-weight: 600; font-size: 40px; line-height: 1; color: var(--espresso); }
.veil .btn { max-width: 320px; height: 56px; font-size: 18px; margin-top: 2px; }
.veil-price { font-size: 13px; color: var(--ink-3); }
.veil-price b { font-family: var(--serif); font-size: 17px; color: var(--ink-2); }
#lockWrap.unlocking .row.redacted .row-name, #lockWrap.unlocking .row.redacted .row-no { filter: blur(0); opacity: 1; }
#lockWrap.unlocking .veil { animation: veilAway .8s .3s var(--ease) forwards; }
@keyframes veilAway { to { opacity: 0; transform: translateY(24px); } }

/* ---------------- sign-in flow (inside the sheet) ---------------- */
.flow { position: relative; overflow: hidden; margin: 0 -4px; padding: 0 4px; }
.pane { padding: 2px 0; }
.pane.leaving { pointer-events: none; }
.flow-head { text-align: center; margin: 4px 0 20px; }
.flow-head h3 { margin: 0; }
.flow-head .sub { margin: 4px 0 0; }
.flow-head .sub b { color: var(--ink); font-weight: 600; }
.flow-mark { width: 58px; height: 58px; margin: 2px auto 12px; border-radius: 50%; display: grid; place-items: center; color: var(--brass-hi); background: linear-gradient(180deg, var(--espresso-2), var(--espresso)); box-shadow: 0 0 0 4px var(--porcelain), 0 0 0 5px var(--hair), 0 12px 24px -10px rgba(38,27,22,.6); animation: sealIn .7s var(--spring) both; }
.flow-mark .icon { width: 24px; height: 24px; }
.flow-mark.ok { color: #fbf3e6; background: radial-gradient(circle at 35% 30%, #4f9273, var(--ok)); }
.flow-mark.ok .icon path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .6s .35s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.flow-back { position: absolute; top: 2px; right: 0; z-index: 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(38,27,22,.12); transition: transform .4s var(--spring); }
.flow-back .icon { transform: rotate(-90deg); }
.flow-back:active { transform: scale(.9); }
.flow-link { display: block; margin: 18px auto 0; padding: 8px 12px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); border-radius: 99px; transition: color .2s, background .2s; }
.flow-link:hover:not([disabled]) { color: var(--ink); background: rgba(38,27,22,.04); }
.flow-link[disabled] { opacity: .55; cursor: default; }
.providers { display: flex; flex-direction: column; gap: 12px; }
.providers > * { animation: rise .7s var(--ease) both; }
.providers > *:nth-child(2) { animation-delay: .07s; } .providers > *:nth-child(3) { animation-delay: .14s; }
.pbtn { position: relative; overflow: hidden; width: 100%; height: 56px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 16px; font-weight: 600; transition: transform .5s var(--spring), box-shadow .3s, opacity .2s; }
.pbtn:active { transform: scale(.97); transition-duration: .12s; }
.pbtn[disabled] { opacity: .6; pointer-events: none; }
.pbtn .brand-g { width: 20px; height: 20px; flex: none; }
.pbtn-apple { background: #000; color: #fff; box-shadow: 0 10px 22px -10px rgba(0,0,0,.7); }
.pbtn-apple .brand-g { width: 19px; height: 22px; margin-top: -3px; }
.pbtn-google { background: #fff; color: #1f1f1f; box-shadow: inset 0 0 0 1px rgba(38,27,22,.14), 0 6px 16px -10px rgba(38,27,22,.4); }
.pbtn-mail { color: var(--ink); background: var(--porcelain); box-shadow: var(--lift); }
.pbtn-mail .icon { color: var(--oxblood); }
.pbtn-gwrap { position: relative; min-height: 56px; }
.g-real { display: none; }
.g-real.ready { display: flex; justify-content: center; align-items: center; min-height: 56px; }
.pbtn-gwrap:has(.g-real.ready) .pbtn-google { display: none; }
.pbtn[disabled]::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.25) 50%, transparent 65%) 150% 0 / 250% 100% no-repeat; animation: sheen 1s linear infinite; }

/* ---------------- lock ---------------- */
.lock-card { text-align: center; padding: 30px 22px 24px; }
.lock-title { font-family: var(--display); font-weight: 600; font-size: 28px; line-height: 1.25; margin: 0 0 4px; }
.lock-text { margin: 0 0 18px; color: var(--ink-2); font-size: 15.5px; }
.lock-text b { color: var(--oxblood); }
.price-tag, .code-label, .steps { display: none; }
.code { display: flex; justify-content: center; gap: 10px; direction: ltr; margin: 0 0 18px; }
.code span { width: 60px; height: 76px; display: grid; place-items: center; border-radius: 14px; font-family: var(--serif); font-weight: 600; font-size: 50px; line-height: 1; color: var(--brass-hi); background: linear-gradient(180deg, var(--espresso-2), var(--espresso)); box-shadow: 0 1px 0 rgba(255,255,255,.1) inset, 0 10px 18px -10px rgba(38,27,22,.7); animation: codeIn .8s var(--spring) both; }
.code span:nth-child(2) { animation-delay: .07s; } .code span:nth-child(3) { animation-delay: .14s; } .code span:nth-child(4) { animation-delay: .21s; }
@keyframes codeIn { from { transform: translateY(14px) rotateX(60deg); opacity: 0; } }
.lock-wait { font-size: 13.5px; color: var(--ink-3); }
.waiting-dots { display: inline-flex; gap: 4px; margin-inline-start: 8px; vertical-align: middle; }
.waiting-dots b { width: 5px; height: 5px; border-radius: 50%; background: var(--brass); animation: dot 1.3s infinite; }
.waiting-dots b:nth-child(2) { animation-delay: .15s; } .waiting-dots b:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* ---------------- now serving ---------------- */
.now { display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-items: center; padding: 20px 22px 22px; }
.now-label { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 12px; }
.now-label .chair { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--oxblood); color: #fbf3e6; }
.flip { display: flex; gap: 5px; direction: ltr; perspective: 500px; }
.flip-d { position: relative; width: 56px; height: 80px; overflow: hidden; border-radius: 12px; background: linear-gradient(180deg, var(--espresso-3) 0 50%, var(--espresso-2) 50%); box-shadow: 0 1px 0 rgba(255,255,255,.1) inset, 0 10px 20px -10px rgba(38,27,22,.7); }
.flip-d::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.5); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.flip-d span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 58px; line-height: 1; color: var(--brass-hi); }
.flip-d .in { animation: flipIn .65s var(--spring) both; }
.flip-d .out { animation: flipOut .35s ease-in both; }
@keyframes flipIn { from { transform: rotateX(-95deg); opacity: 0; } }
@keyframes flipOut { to { transform: rotateX(95deg); opacity: 0; } }
.flip.empty .flip-d { background: var(--bone-2); box-shadow: inset 0 0 0 1px rgba(38,27,22,.06); }
.flip.empty .flip-d span { color: var(--ink-3); }
.now-who { min-width: 0; }
.now-name { font-family: var(--display); font-weight: 600; font-size: 28px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.now-meta .timer { font-weight: 600; color: var(--oxblood); }
.scissor-run { display: inline-block; color: var(--steel); animation: snip 1.2s ease-in-out infinite; }
@keyframes snip { 50% { transform: rotate(-14deg); } }

/* ---------------- booking ---------------- */
.zone { display: flex; flex-direction: column; gap: 12px; position: relative; }
.hold {
  position: relative; overflow: hidden; isolation: isolate; width: 100%; min-height: 84px; border-radius: 999px;
  color: #fbf3e6; background: var(--grain), var(--leather); background-blend-mode: soft-light, normal;
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 -2px 0 rgba(0,0,0,.25) inset, 0 16px 34px -12px rgba(111, 36, 48, .75), 0 3px 6px rgba(38,27,22,.25);
  display: flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 22px;
  touch-action: none; user-select: none; -webkit-user-select: none; transition: transform .5s var(--spring);
}
.hold::before { content: ''; position: absolute; inset: 5px; border-radius: inherit; border: 1px dashed rgba(220, 187, 128, .35); pointer-events: none; }
.hold .fill { position: absolute; inset: 0; z-index: -1; transform: scaleX(0); transform-origin: right; background: linear-gradient(90deg, rgba(220, 187, 128, .25), rgba(220, 187, 128, .45)); }
.hold.holding { transform: scale(.975); transition-duration: .2s; }
.hold .label { display: flex; flex-direction: column; align-items: flex-start; font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1.2; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.hold .hint { font-family: var(--ui); font-size: 12.5px; font-weight: 400; opacity: .78; }
.hold .icon { width: 28px; height: 28px; stroke-width: 1.8; }
.hold.done { animation: holdDone .6s var(--spring); }
@keyframes holdDone { 40% { transform: scale(1.03); } }
.hold.danger { min-height: 52px; background: transparent; color: var(--oxblood); box-shadow: inset 0 0 0 1px rgba(111, 36, 48, .3); }
.hold.danger::before { display: none; }
.hold.danger .label { font-family: var(--ui); font-size: 14.5px; font-weight: 500; text-shadow: none; }
.hold.danger .fill { background: rgba(111, 36, 48, .12); }
.hold.danger .icon { width: 18px; height: 18px; }
.closed-note { text-align: center; color: var(--ink-2); }
.closed-note .big { font-family: var(--display); font-weight: 600; font-size: 22px; color: var(--ink); }

/* ---------------- ticket ---------------- */
.slot { height: 8px; margin: 0 14px -14px; border-radius: 99px; background: var(--espresso); box-shadow: inset 0 2px 3px rgba(0,0,0,.6); position: relative; z-index: 2; }
.ticket-wrap { overflow: hidden; padding: 6px 10px 22px; margin: 0 -10px -16px; }
.ticket { position: relative; isolation: isolate; padding: 22px 22px 18px; border-radius: var(--r); background: linear-gradient(180deg, #fffdf8, var(--porcelain)); box-shadow: var(--lift); -webkit-mask: radial-gradient(circle 11px at 0 58%, transparent 98%, #000), radial-gradient(circle 11px at 100% 58%, transparent 98%, #000); -webkit-mask-composite: source-in; mask-composite: intersect; }
.ticket::after { content: ''; position: absolute; inset: 7px; border-radius: 12px; border: 1px solid var(--hair); pointer-events: none; opacity: .7; }
.ticket.print { animation: print 1.1s var(--ease) both; }
@keyframes print { 0% { transform: translateY(-105%); } 70% { transform: translateY(2%); } 100% { transform: translateY(0); } }
.ticket-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.ticket-k { font-size: 12px; color: var(--ink-2); }
.ticket-no { font-family: var(--serif); font-weight: 600; font-size: 86px; line-height: .9; color: var(--oxblood); }
.ticket-no small { font-size: 36px; color: var(--brass); font-style: italic; }
.ticket-ahead { text-align: center; }
.ticket-ahead .n { font-family: var(--serif); font-weight: 600; font-size: 56px; line-height: 1; color: var(--espresso); }
.ticket-ahead .t { font-size: 12.5px; color: var(--steel); font-weight: 500; }
.perf { margin: 16px -22px 14px; border-top: 1.5px dashed rgba(38,27,22,.14); }
.track { position: relative; height: 44px; display: flex; align-items: center; margin-bottom: 10px; }
.track .seat { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--oxblood); color: #fbf3e6; position: relative; z-index: 1; }
.track .seat .icon { width: 18px; height: 18px; }
.track .line { position: absolute; inset-inline: 19px 10px; top: 50%; border-top: 1px dashed var(--ink-3); opacity: .6; }
.track .people { position: relative; display: flex; gap: 6px; align-items: center; margin-inline-start: 10px; overflow: hidden; }
.track .p { width: 12px; height: 12px; border-radius: 50%; background: var(--steel); opacity: .55; flex: none; display: grid; place-items: center; font-style: normal; }
.track .p.me { width: auto; height: 28px; padding: 0 12px; border-radius: 99px; background: var(--espresso); color: var(--brass-hi); opacity: 1; font-size: 12.5px; font-weight: 600; animation: meBob 1.8s ease-in-out infinite; }
.track .p.more { width: auto; height: 22px; padding: 0 8px; border-radius: 99px; background: var(--bone-2); color: var(--ink-2); opacity: 1; font-size: 11.5px; }
@keyframes meBob { 50% { transform: translateY(-3px); } }
.ticket-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.ticket-foot b { color: var(--ink); font-weight: 600; }
.ticket.serving { background: linear-gradient(180deg, #fff9ee, #f6e8d0); animation: throb 2s ease-in-out infinite; }
@keyframes throb { 50% { transform: scale(1.012); } }
.ticket-actions { display: flex; gap: 10px; }
.ticket-actions > * { flex: 1; }

.notif-prompt { display: flex; align-items: center; gap: 14px; padding: 16px 18px; text-align: start; }
.notif-prompt .bell { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--steel); color: #fff; animation: ring 3.5s infinite; }
.notif-prompt .bell .icon { width: 19px; height: 19px; }
@keyframes ring { 0%, 75%, 100% { transform: rotate(0); } 80% { transform: rotate(14deg); } 85% { transform: rotate(-12deg); } 90% { transform: rotate(8deg); } 95% { transform: rotate(-4deg); } }
.notif-prompt .txt { flex: 1; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.notif-prompt .txt b { display: block; color: var(--ink); font-size: 14.5px; }

/* ---------------- the book ---------------- */
.book { position: relative; }
.binding { display: none; }
.page { position: relative; padding: 0 22px 18px; border-radius: var(--r); background: linear-gradient(180deg, #fcf9f3, var(--porcelain) 30%, var(--porcelain-2)); box-shadow: var(--lift); }
.page::after { content: ''; position: absolute; inset: 7px; border-radius: 13px; border: 1px solid var(--hair); pointer-events: none; opacity: .7; }
.page-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 22px 0 12px; border-bottom: 1px solid var(--hair); position: relative; }
.page-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; border-bottom: 1px solid var(--hair); }
.page-title { font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1.2; }
.page-date { font-size: 12.5px; color: var(--ink-3); }
.tally { display: flex; align-items: center; gap: 10px; padding: 12px 0 2px; font-size: 12.5px; color: var(--ink-2); }
.tally svg { height: 24px; flex: none; }
.tally path { fill: none; stroke: var(--steel); stroke-width: 1.8; stroke-linecap: round; }
.rows { display: flex; flex-direction: column; padding-top: 6px; }
.row { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 8px 2px; text-align: start; border-bottom: 1px solid var(--line); }
button.row { cursor: pointer; }
button.row:active .row-name { transform: translateX(-3px); }
.row-no { flex: none; min-width: 30px; text-align: center; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 24px; line-height: 1; color: var(--brass); }
.row-name { position: relative; flex: 1; min-width: 0; font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: transform .2s; }
.row-tag { flex: none; font-size: 11.5px; font-weight: 500; padding: 3px 11px; border-radius: 99px; white-space: nowrap; background: var(--bone-2); color: var(--ink-2); }
.row-tag.me { background: var(--steel); color: #fff; }
.row-tag.now { background: var(--oxblood); color: #fbf3e6; }
.row-tag.walk { background: var(--steel-soft); color: var(--steel); }
.row-eta { flex: none; font-size: 12px; color: var(--ink-3); }
.row-mark { flex: none; width: 24px; height: 24px; }
.row-mark svg { width: 24px; height: 24px; }
.row-mark path { fill: none; stroke: var(--ok); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; animation: strike .45s .25s var(--ease) both; }
.row-mark.x path { stroke: var(--oxblood); }
.row.serving::before { content: ''; position: absolute; inset: 6px -10px; z-index: 0; border-radius: 12px; background: linear-gradient(90deg, rgba(111, 36, 48, .03), rgba(111, 36, 48, .09)); box-shadow: inset 0 0 0 1px rgba(111, 36, 48, .16); animation: fadeIn .8s var(--ease) both; }
.row.serving > * { position: relative; }
.row.serving .row-no { color: var(--oxblood); }
@keyframes fadeIn { from { opacity: 0; } }
.strike { position: absolute; left: 0; right: 0; top: 52%; width: 100%; height: 10px; transform: translateY(-50%); overflow: visible; pointer-events: none; }
.strike path { fill: none; stroke: var(--brass); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; animation: strike .6s var(--ease) both; }
@keyframes strike { from { stroke-dashoffset: 1; } }
.row.static .strike path, .row.static .row-mark path { animation: none; }
.row.done, .row.skipped, .row.cancelled { opacity: .5; }
.row.skipped .strike path, .row.cancelled .strike path { stroke: var(--oxblood); }
.row.mine .row-name { color: var(--steel); }
.row.mine::after { content: ''; position: absolute; right: -12px; top: 18px; bottom: 18px; width: 3px; border-radius: 3px; background: var(--steel); }
.row.ink-in .row-name, .row.ink-in .row-no, .row.ink-in .row-tag, .row.ink-in .row-eta { animation: inkIn .8s var(--d, 0ms) var(--ease) both; }
@keyframes inkIn { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } }
.row.leaving { animation: rowOut .5s var(--ease) forwards; overflow: hidden; }
@keyframes rowOut { to { opacity: 0; height: 0; min-height: 0; padding-block: 0; } }
.page-empty { padding: 28px 8px; text-align: center; font-size: 16px; color: var(--ink-3); }
.blank-lines { height: 116px; background: repeating-linear-gradient(180deg, transparent 0 57px, var(--line) 57px 58px); }

/* ---------------- barber ---------------- */
.deck { display: flex; flex-direction: column; gap: 16px; }
.deck-actions { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.next-btn { height: 64px; font-size: 18px; }
.next-btn .icon { width: 24px; height: 24px; }
.next-btn.snip .icon { animation: snipOnce .5s var(--spring); }
@keyframes snipOnce { 30% { transform: rotate(-30deg) scale(1.1); } 60% { transform: rotate(10deg); } }
.deck-actions .btn-ghost { height: 64px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--r); background: var(--porcelain); box-shadow: var(--lift); overflow: hidden; }
.stat { padding: 14px 16px; text-align: start; border-bottom: 1px solid var(--line); }
.stat:nth-child(even) { border-inline-start: 1px solid var(--line); }
.stat:nth-child(n+3) { border-bottom: 0; }
.stat .v { font-family: var(--serif); font-weight: 600; font-size: 38px; line-height: 1.05; color: var(--espresso); }
.stat .k { font-size: 12px; color: var(--ink-2); }
.stat.hl { background: linear-gradient(180deg, #f7ecec, #f1dfe0); }
.stat.hl .v { color: var(--oxblood); }
button.stat { cursor: pointer; font: inherit; }
button.stat:active { filter: brightness(.97); }
.barber-grid { display: flex; flex-direction: column; gap: 18px; }
.panel[hidden] { display: none !important; }
@media (min-width: 900px) {
  .barber-grid { display: grid; grid-template-columns: 380px 1fr; align-items: start; gap: 28px; }
  .barber-grid > .side { position: sticky; top: 20px; }
  .tabbar { max-width: 440px; left: 50%; right: auto; transform: translateX(-50%); bottom: 18px; }
  .screen.wide { padding-inline: 28px; }
}

.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; flex: none; font-size: 13.5px; font-weight: 500; }
.switch .track-s { position: relative; width: 52px; height: 30px; border-radius: 99px; background: rgba(38,27,22,.16); transition: background .3s; box-shadow: inset 0 1px 3px rgba(0,0,0,.2); }
.switch .track-s::after { content: ''; position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fffdf8; box-shadow: 0 2px 5px rgba(0,0,0,.3); transition: transform .45s var(--spring), width .2s; }
.switch[aria-checked="true"] .track-s { background: var(--ok); }
.switch[aria-checked="true"] .track-s::after { transform: translateX(-22px); }
.switch:active .track-s::after { width: 29px; }
.switch[aria-checked="true"]:active .track-s::after { transform: translateX(-17px); }

.fab { position: fixed; z-index: 40; left: 18px; bottom: calc(96px + var(--safe-b)); width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; color: #fbf3e6; background: var(--grain), var(--leather); background-blend-mode: soft-light, normal; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 14px 28px -8px rgba(111,36,48,.7); animation: fabIn .6s var(--spring) both; transition: transform .45s var(--spring); }
.fab:active { transform: scale(.9); transition-duration: .1s; }
.fab .icon { width: 28px; height: 28px; stroke-width: 2; }
@keyframes fabIn { from { transform: scale(0) rotate(-90deg); } }
@media (min-width: 900px) { .fab { bottom: 28px; left: 28px; } }

.tabbar { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px; border-radius: 24px; background: rgba(38, 27, 22, .86); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); box-shadow: inset 0 0 0 1px rgba(220, 187, 128, .2), 0 18px 40px -12px rgba(38,27,22,.6); }
.tab { position: relative; height: 54px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11.5px; font-weight: 500; color: rgba(236, 228, 214, .55); transition: color .25s, background .25s, transform .4s var(--spring); }
.tab:active { transform: scale(.94); }
.tab .icon { width: 21px; height: 21px; }
.tab[aria-selected="true"] { color: var(--brass-hi); background: rgba(220, 187, 128, .12); }
.tab .dot { position: absolute; top: 6px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--oxblood); color: #fbf3e6; font-size: 10.5px; display: grid; place-items: center; }
.tab .dot[hidden] { display: none; }

.search { position: relative; }
.search .icon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search .input { padding-right: 46px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.ulist { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.ucard { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 4px; align-items: center; padding: 16px; border-radius: var(--r); background: var(--porcelain); box-shadow: var(--lift); animation: rise .5s var(--ease) both; }
.avatar { grid-row: span 2; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 20px; color: var(--brass-hi); background: linear-gradient(180deg, var(--espresso-2), var(--espresso)); }
.ucard .nm { font-family: var(--display); font-weight: 600; font-size: 18px; line-height: 1.3; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ucard .sub { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.ucard .act { display: flex; gap: 6px; align-items: center; }
.ucard .code-chip { font-family: var(--serif); font-weight: 600; font-size: 14px; color: var(--brass-lo); }
.stamp { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-10deg); font-family: var(--display); font-weight: 700; font-size: 26px; color: var(--ok); border: 2px solid var(--ok); border-radius: 10px; padding: 2px 16px; background: rgba(248, 243, 234, .88); animation: stamp .45s var(--ease) both; pointer-events: none; }
@keyframes stamp { 0% { transform: translate(-50%, -50%) rotate(-10deg) scale(2.4); opacity: 0; } 55% { opacity: 1; } 100% { transform: translate(-50%, -50%) rotate(-10deg) scale(1); } }
.ucard.stamped { animation: thud .4s .2s; }
@keyframes thud { 30% { transform: scale(.98) translateY(2px); } }
.list-empty { text-align: center; padding: 44px 16px; color: var(--ink-2); }
.list-empty .big { font-family: var(--display); font-weight: 600; font-size: 20px; color: var(--ink); }

.set-list { display: flex; flex-direction: column; gap: 10px; }
.set-row { display: flex; align-items: center; gap: 14px; padding: 15px 16px; border-radius: 16px; background: var(--porcelain); box-shadow: var(--lift); }
.set-row > span:first-child { color: var(--oxblood) !important; }
.set-row .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.set-row .t b { font-weight: 500; }
.set-row .t span { font-size: 12.5px; color: var(--ink-2); }
.stepper { display: flex; align-items: center; border-radius: 99px; background: var(--bone-2); flex: none; }
.stepper button { width: 40px; height: 38px; font-size: 20px; display: grid; place-items: center; color: var(--ink-2); }
.stepper button:active { color: var(--oxblood); }
.stepper output { min-width: 40px; text-align: center; font-family: var(--serif); font-weight: 600; font-size: 22px; }
.section-title { font-family: var(--display); font-weight: 600; font-size: 20px; margin: 18px 0 8px; }

/* ---------------- sheet ---------------- */
.backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(38, 27, 22, .38); -webkit-backdrop-filter: blur(6px) saturate(1.2); backdrop-filter: blur(6px) saturate(1.2); animation: fade .35s both; }
.backdrop.out { animation: fade .3s reverse both; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 500px; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; background: linear-gradient(180deg, #fcf9f3, var(--porcelain)); border-radius: 30px 30px 0 0; padding: 10px 22px calc(26px + var(--safe-b)); box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 -24px 60px -12px rgba(38,27,22,.45); animation: sheetIn .6s cubic-bezier(.2, 1.15, .32, 1) both; transition: transform .3s var(--ease); }
.sheet.out { transform: translateY(105%) !important; }
@keyframes sheetIn { from { transform: translateY(100%); } }
@keyframes modalIn { from { transform: translateY(56%) scale(.95); opacity: 0; } }
@media (min-width: 900px) {
  .sheet { bottom: 50%; transform: translateY(50%); border-radius: 28px; max-width: 440px; animation: modalIn .55s var(--spring) both; }
  .sheet.out { opacity: 0; transform: translateY(60%) !important; transition: transform .3s, opacity .3s; }
}
.grab { width: 40px; height: 4px; border-radius: 99px; background: var(--ink); opacity: .16; margin: 0 auto 16px; }
.sheet h3 { font-family: var(--display); font-weight: 600; font-size: 26px; margin: 0; line-height: 1.3; }
.sheet .sub { color: var(--ink-2); font-size: 14px; margin: 4px 0 16px; }
.sheet-hand { font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1.3; text-align: center; }
.actions-list { display: flex; flex-direction: column; gap: 10px; }
.act-row { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; width: 100%; height: 56px; padding: 0 18px; border-radius: 16px; background: #fffdf9; box-shadow: inset 0 0 0 1px rgba(38,27,22,.1); font-weight: 500; font-size: 15.5px; text-align: start; color: var(--ink); text-decoration: none; transition: transform .4s var(--spring); }
a.act-row { color: var(--ink); }
.act-row:active { transform: scale(.98); transition-duration: .1s; }
.act-row .icon { color: var(--steel); }
.act-row.danger, .act-row.danger .icon { color: var(--oxblood); }
.act-row.ok { color: #fbf3e6; background: var(--leather); box-shadow: none; }
.act-row.ok .icon { color: var(--brass-hi); }
.act-row[disabled] { opacity: .4; pointer-events: none; }
.act-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid { display: flex; flex-direction: column; gap: 14px; }
.me-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.me-head .avatar { width: 56px; height: 56px; font-size: 24px; }
.sheet .set-row { box-shadow: inset 0 0 0 1px rgba(38,27,22,.1); background: #fffdf9; }
.sub-meter { height: 6px; border-radius: 99px; overflow: hidden; margin: 12px 0 6px; background: var(--bone-2); }
.sub-meter i { display: block; height: 100%; background: var(--leather); transform-origin: right; animation: meter .9s var(--ease) both; }
@keyframes meter { from { transform: scaleX(0); } }

/* ---------------- toasts ---------------- */
#toasts { position: fixed; z-index: 200; top: calc(12px + var(--safe-t)); left: 12px; right: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 440px; padding: 9px 18px 9px 10px; border-radius: 99px; color: var(--bone); font-size: 14px; font-weight: 500; background: rgba(38, 27, 22, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px rgba(220, 187, 128, .2), 0 14px 30px -10px rgba(38,27,22,.6); animation: toastIn .6s var(--spring) both; }
.toast.out { animation: toastOut .35s var(--ease) both; }
@keyframes toastIn { from { transform: translateY(-140%) scale(.9); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(-140%) scale(.92); opacity: 0; } }
.toast .ti { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--steel); color: #fff; }
.toast.ok .ti { background: var(--ok); }
.toast.err .ti { background: var(--oxblood); }
.toast .ti .icon { width: 15px; height: 15px; }

/* ---------------- your turn ---------------- */
.turn-overlay { position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; color: var(--bone); background: var(--grain), radial-gradient(80% 60% at 50% 38%, var(--oxblood-hi), var(--oxblood-lo) 75%); background-blend-mode: soft-light, normal; animation: fade .4s both; }
.turn-overlay .rings { position: relative; width: 220px; height: 220px; display: grid; place-items: center; margin-bottom: 12px; }
.turn-overlay .rings i { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--brass-hi); animation: rings 2.4s var(--ease) infinite; }
.turn-overlay .rings i:nth-child(2) { animation-delay: .8s; } .turn-overlay .rings i:nth-child(3) { animation-delay: 1.6s; }
@keyframes rings { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.turn-overlay .core { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; background: var(--porcelain); color: var(--oxblood); font-family: var(--serif); font-weight: 600; font-size: 80px; box-shadow: 0 0 0 6px rgba(220,187,128,.35), 0 20px 40px -10px rgba(0,0,0,.6); animation: throb 1.6s infinite; }
.turn-overlay h2 { font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1.2; margin: 0; }
.turn-overlay p { margin: 0 0 14px; font-size: 16px; opacity: .8; }
.turn-overlay .btn-brass { background: var(--porcelain); color: var(--oxblood); text-shadow: none; }
.confetti { position: fixed; inset: 0; z-index: 160; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; height: 10px; border-radius: 2px; animation: fall 3s cubic-bezier(.3, .6, .5, 1) forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

.offline-bar { position: fixed; z-index: 190; left: 0; right: 0; bottom: 0; padding: 10px calc(12px + var(--safe-b)); text-align: center; font-size: 13px; font-weight: 500; color: #fbf3e6; background: var(--oxblood); }
.skeleton { border-radius: var(--r); background: linear-gradient(90deg, rgba(38,27,22,.04) 30%, rgba(38,27,22,.09) 50%, rgba(38,27,22,.04) 70%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.flip-d span, .row-no, .ls b, .ticket-no, .ticket-ahead .n, .code span, .stat .v, .veil-count b, .veil-price b, .stepper output, .turn-overlay .core, .ucard .code-chip, .otp-box, .phone-pre { font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1, "tnum" 1; }

@media (max-width: 380px) {
  .flip-d { width: 48px; height: 70px; } .flip-d span { font-size: 50px; }
  .now-name { font-size: 23px; } .ticket-no { font-size: 72px; } .row-name { font-size: 18px; } .ls b { font-size: 28px; }
  .otp { gap: 6px; } .otp-box { height: 54px; font-size: 28px; }
  .phone-meter { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
