/* ==========================================================================
   Leaf API demo kit: shared styles
   ========================================================================== */

:root {
  --bg: #faf8f6;
  --fg: #1a4d2e;
  --fg-soft: rgba(26, 77, 46, 0.72);
  --fg-mute: rgba(26, 77, 46, 0.5);
  --card: #ffffff;
  --primary: #2d7a4f;
  --primary-hover: #256842;
  --primary-fg: #ffffff;
  --secondary: #f0ebe3;
  --muted: #e8ddf5;
  --border: #e0d5ca;
  --input: #ffffff;
  --danger: #c41e3a;
  --dark: #0f2818;
  --dark-2: #1a3a2a;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(26, 77, 46, 0.06), 0 1px 3px rgba(26, 77, 46, 0.08);
  --shadow-lg: 0 10px 30px rgba(15, 40, 24, 0.12);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--fg);
  background: linear-gradient(180deg, var(--secondary) 0%, var(--bg) 280px);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--primary); }

/* ---------- Shell ---------- */
.leaf-shell { max-width: 1240px; margin: 0 auto; padding: 16px; }
.leaf-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 14px; flex-wrap: wrap; }
.leaf-brand { display: flex; align-items: center; gap: 10px; }
.leaf-logo {
  width: 34px; height: 34px; border-radius: 9px; background: var(--primary); color: var(--primary-fg);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800;
}
.leaf-brand-title { font-weight: 700; font-size: 16px; }
.leaf-brand-sub { font-size: 12px; color: var(--fg-mute); display: flex; align-items: center; gap: 6px; }
.leaf-status { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.status-chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--card);
  border-radius: 999px; padding: 5px 10px; color: var(--fg-soft);
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; }
.status-dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }

.leaf-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.leaf-app {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
  padding: 22px; min-height: 520px; min-width: 0;
}
.leaf-stage { min-width: 0; }
/* The demo's own layouts respond to the space the demo really has (page, tablet or phone), not the window. */
.leaf-screen { container: site / inline-size; }
@media (max-width: 960px) { .leaf-layout { grid-template-columns: minmax(0, 1fr); } }
@container site (max-width: 960px) { .leaf-app { padding: 16px; } }

.leaf-boot { min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--fg-mute); font-size: 14px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--secondary); border-top-color: var(--primary); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- API call log ---------- */
.leaf-log {
  background: var(--dark); color: #f0ebe3; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column;
  height: 640px; position: sticky; top: 16px;
}
@media (max-width: 960px) { .leaf-log { position: static; height: 360px; } }
.log-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); font-size: 14px; font-weight: 600; }
.log-head .count { color: rgba(255, 255, 255, 0.5); font-weight: 500; font-size: 12px; }
.log-head .spacer { flex: 1; }
.log-head button { background: none; border: 0; color: rgba(255, 255, 255, 0.55); padding: 4px; display: inline-flex; }
.log-head button:hover { color: #fff; }
.pulse { position: relative; width: 8px; height: 8px; }
.pulse::before, .pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #4ade80; }
.pulse::before { animation: ping 1.4s cubic-bezier(0, 0, 0.2, 1) infinite; opacity: 0.6; }
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }
.log-body { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.log-empty { text-align: center; color: rgba(255, 255, 255, 0.5); font-size: 13px; padding: 40px 16px; line-height: 1.5; }
.log-item { background: rgba(255, 255, 255, 0.05); border-radius: 10px; padding: 10px; animation: slideIn 0.3s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.log-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.log-copy {
  margin-left: auto; flex-shrink: 0; width: 24px; height: 24px; border: 0; border-radius: 6px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.75); opacity: 0; transition: opacity 0.15s, background 0.15s;
}
.log-copy svg { width: 13px; height: 13px; }
.log-item:hover .log-copy, .log-copy:focus-visible, .log-copy.done { opacity: 1; }
.log-copy:hover { background: #22c55e; color: #052e16; }
.log-copy.done { background: #22c55e; color: #052e16; }
@media (hover: none) { .log-copy { opacity: 1; } }
.log-path { font-family: var(--mono); font-size: 11.5px; color: rgba(255, 255, 255, 0.92); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-body pre { margin: 8px 0 0; max-height: 110px; overflow: auto; background: rgba(0, 0, 0, 0.3); border-radius: 6px; padding: 8px; font-family: var(--mono); font-size: 11px; line-height: 1.5; color: rgba(255, 255, 255, 0.72); }
.log-result { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11px; }
.log-result.ok { color: #86efac; }
.log-result.err { color: #fca5a5; }
.log-result .ms { margin-left: auto; color: rgba(255, 255, 255, 0.4); }
.log-result svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ---------- Methods ---------- */
.method { flex-shrink: 0; font-size: 10px; font-weight: 700; border-radius: 4px; padding: 2px 6px; letter-spacing: 0.02em; }
.m-GET { background: #dbeafe; color: #1e40af; }
.m-POST { background: #dcfce7; color: #166534; }
.m-PATCH { background: #f3e8ff; color: #6b21a8; }
.m-PUT { background: #fef9c3; color: #854d0e; }
.m-DELETE { background: #fee2e2; color: #991b1b; }

/* ---------- Primitives ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 9px; border: 1px solid transparent;
  padding: 8px 14px; font-size: 14px; font-weight: 600; background: var(--primary); color: var(--primary-fg); white-space: nowrap; text-decoration: none;
  transition: background 0.15s, transform 0.1s, border-color 0.15s;
}
.btn:hover:not(:disabled) { background: var(--primary-hover); }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn svg { width: 16px; height: 16px; }
.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn-outline { background: var(--card); color: var(--fg); border-color: var(--border); }
.btn-outline:hover:not(:disabled) { background: var(--secondary); border-color: rgba(45, 122, 79, 0.35); }
.btn-ghost { background: transparent; color: var(--fg-soft); }
.btn-ghost:hover:not(:disabled) { background: var(--secondary); color: var(--fg); }
.btn-danger, .btn.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #a3182f; border-color: #a3182f; color: #fff; }
.btn-warn, .btn.btn-warn { background: #f59e0b; border-color: #f59e0b; color: #422006; }
.btn-warn:hover:not(:disabled) { background: #d97706; border-color: #d97706; color: #422006; }
/* Armed "click again to confirm" state for destructive buttons. */
.btn.armed { background: var(--danger); border-color: var(--danger); color: #fff; animation: armPulse 1s ease-in-out infinite; }
.btn.armed:hover:not(:disabled) { background: #a3182f; border-color: #a3182f; color: #fff; }
@keyframes armPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(196, 30, 58, 0.35); } 50% { box-shadow: 0 0 0 5px rgba(196, 30, 58, 0); } }
.btn-block { width: 100%; }
.icon-btn { background: none; border: 0; padding: 4px; color: var(--fg-mute); display: inline-flex; border-radius: 6px; }
.icon-btn { transition: color .15s, background .15s; }
.icon-btn:hover { color: var(--fg); background: var(--secondary); }
.icon-btn.danger:hover { color: var(--danger); background: #fee2e2; }
.icon-btn.armed, .icon-btn.armed:hover { background: var(--danger); color: #fff; padding: 4px 8px; font-size: 12px; font-weight: 600; gap: 4px; align-items: center; }
.icon-btn svg { width: 15px; height: 15px; }

.input, .select, .textarea {
  width: 100%; border: 1px solid var(--border); background: var(--input); border-radius: 9px; padding: 8px 11px; font-size: 14px;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(45, 122, 79, 0.15); }
.textarea { resize: vertical; min-height: 90px; }

.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 600; border: 1px solid transparent; }
.badge-low { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.badge-medium { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.badge-hard { background: #ffe4e6; color: #9f1239; border-color: #fecdd3; }
.badge-expert { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }
.badge-mobile { background: #e0f2fe; color: #075985; border-color: #bae6fd; }
.chip { border: 0; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 500; background: var(--secondary); color: var(--fg-soft); transition: background .15s, color .15s; }
.chip:hover:not(.active) { background: #e7dfd3; color: var(--fg); }
.chip.active { background: var(--primary); color: var(--primary-fg); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.muted { color: var(--fg-mute); }
.soft { color: var(--fg-soft); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.row { display: flex; align-items: center; gap: 8px; }
.row-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 8px; }
.grid { display: grid; gap: 12px; }
.title { font-size: 20px; font-weight: 700; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-mute); }
.skeleton { background: var(--secondary); border-radius: 10px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.55; } }
.error-banner { margin-bottom: 14px; border: 1px solid rgba(196, 30, 58, 0.3); background: rgba(196, 30, 58, 0.08); color: var(--danger); padding: 9px 12px; border-radius: 10px; font-size: 13px; }
.hide-sm { }
@media (max-width: 640px) { .hide-sm { display: none !important; } }

/* ---------- Modal ---------- */
.leaf-overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(15, 40, 24, 0.45); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.leaf-modal {
  width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--card); border-radius: 20px;
  box-shadow: 0 25px 60px rgba(15, 40, 24, 0.3); animation: popIn 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
.modal-hero { padding: 22px 22px 0; display: flex; gap: 14px; align-items: flex-start; }
.modal-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #dcfce7; color: var(--primary); }
.modal-icon.warn { background: #fef3c7; color: #b45309; }
.modal-icon.err { background: #ffe4e6; color: #be123c; }
.modal-icon svg { width: 22px; height: 22px; }
.modal-title { font-size: 18px; font-weight: 700; }
.modal-sub { font-size: 13.5px; color: var(--fg-soft); margin-top: 4px; line-height: 1.5; }
.modal-body { padding: 18px 22px 22px; }
.modal-close { margin-left: auto; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.field-label { display: block; font-size: 12px; font-weight: 600; color: var(--fg-soft); margin-bottom: 6px; }
.field-error { color: var(--danger); font-size: 12.5px; margin-top: 8px; }
.key-input { font-family: var(--mono); letter-spacing: 0.02em; }
.hint { font-size: 12px; color: var(--fg-mute); margin-top: 8px; line-height: 1.5; }
.account-note { display: flex; align-items: center; gap: 6px; color: var(--primary); }
.account-note svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-google { width: 100%; gap: 10px; padding: 10px 14px; color: var(--primary); border-color: var(--primary); }
.btn-google svg { width: 18px; height: 18px; }
.or-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0 14px; font-size: 12px; color: var(--fg-mute); }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--secondary); border-radius: 12px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 19px; }
.stat span { font-size: 11px; color: var(--fg-soft); }
.meter { height: 6px; background: var(--secondary); border-radius: 999px; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: var(--primary); transition: width 0.5s ease; }
.meter.warn > i { background: #f59e0b; }
.meter.full > i { background: var(--danger); }
.res-list { display: flex; flex-direction: column; gap: 6px; }
.res-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 11px; padding: 9px 10px; }
.res-item.current { border-color: var(--primary); background: rgba(45, 122, 79, 0.05); }
.res-item .grow { flex: 1; min-width: 0; }
.res-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-meta { font-size: 11.5px; color: var(--fg-mute); }
.tag { font-size: 10px; font-weight: 700; border-radius: 4px; padding: 1px 5px; background: var(--secondary); color: var(--fg-soft); }
.tag.green { background: #dcfce7; color: #166534; }
.tag.red { background: #ffe4e6; color: #9f1239; }
.need-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border: 1px dashed #c4b5fd; background: #f5f3ff; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.need-box p { flex-basis: 100%; margin: 0; }
.need-facts { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--fg-soft); }
.need-facts b { color: #6d28d9; }
.need-count { display: flex; align-items: baseline; gap: 6px; }
.need-count b { font-size: 30px; font-weight: 800; color: #6d28d9; line-height: 1; transition: transform .2s; }
.need-count span { font-size: 12px; color: var(--fg-soft); }
.need-slots { display: flex; gap: 5px; }
.need-slots i { width: 22px; height: 22px; border-radius: 6px; background: #ddd6fe; border: 2px solid #c4b5fd; }
.need-slots i.used { background: #7c3aed; border-color: #7c3aed; }
.need-slots i.just-freed { animation: popIn .35s ease; background: #dcfce7; border-color: #22c55e; }
.res-item.freed { opacity: .55; border-style: dashed; }
/* Project choice rows: info on the left, the two choices (each with an optional Recommended badge) on the right. */
.res-item.res-choice { flex-wrap: wrap; row-gap: 10px; }
.res-choice-info { display: flex; align-items: center; gap: 10px; flex: 1 1 220px; min-width: 0; }
.res-choice-actions { display: flex; align-items: flex-end; gap: 8px; margin-left: auto; }
.choice { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.choice.recommended .btn-warn { box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3); }
.choice.recommended .btn-danger { box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.22); }
.rec-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
.rec-badge svg { width: 10px; height: 10px; fill: currentColor; }
.rec-badge.use { background: #fef3c7; color: #92400e; }
.rec-badge.delete { background: #ffe4e6; color: #9f1239; }
.res-meta.fit-ok { color: #166534; }
.res-meta.fit-short { color: #9f1239; }
.res-meta.fit-tight { color: #92400e; }
.res-item.suggested { border-color: rgba(196, 30, 58, 0.45); background: rgba(196, 30, 58, 0.04); }
.ok-box { border-radius: 12px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; padding: 10px 12px; font-size: 13px; line-height: 1.5; }
.warn-box { border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; padding: 10px 12px; font-size: 13px; line-height: 1.5; }
.progress-line { height: 4px; background: var(--secondary); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.progress-line > i { display: block; height: 100%; background: var(--primary); transition: width 0.25s; }

/* ---------- Toast ---------- */
.leaf-toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; background: var(--dark); color: #fff;
  padding: 10px 16px; border-radius: 12px; font-size: 13.5px; box-shadow: var(--shadow-lg); animation: popIn 0.25s ease;
}

/* ==========================================================================
   Device preview (website / tablet / mobile): only the demo goes in the frame
   ========================================================================== */
.leaf-statusbar, .leaf-homebar { display: none; }
.leaf-device { position: relative; }
html:not([data-device="desktop"]) .leaf-layout { align-items: stretch; }
html:not([data-device="desktop"]) .leaf-stage {
  display: flex; justify-content: center; align-items: flex-start; padding: 18px 12px; border-radius: 18px; border: 1px solid var(--border);
  background: radial-gradient(circle at 30% 20%, rgba(45,122,79,.12), transparent 50%), radial-gradient(circle at 80% 80%, rgba(139,92,246,.10), transparent 45%), #ece7df;
}
html:not([data-device="desktop"]) .leaf-device {
  display: flex; flex-direction: column; overflow: hidden; background: var(--card); flex-shrink: 0;
  border: 12px solid #121212; box-shadow: 0 0 0 2px #3a3a3a, 0 30px 70px rgba(0,0,0,.28);
}
/* Real device proportions (390×844 phone, 820×1180 tablet). leaf-api.js zooms the whole frame down to fit the
   window instead of squashing its height, so the preview always has the shape of a real device. */
html[data-device="mobile"] .leaf-device { width: 390px; height: 844px; border-radius: 56px; --leaf-screen-r: 44px; }
html[data-device="tablet"] .leaf-device { width: 820px; height: 1180px; border-radius: 38px; border-width: 16px; --leaf-screen-r: 22px; }
html:not([data-device="desktop"]) .leaf-screen { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
/* Chrome (GPU compositing) ignores the frame's rounded overflow clip for backdrop-filter, so a blurred bottom nav or
   sheet backdrop paints square corners over the frame. A solid mask forces a real mask layer that clips to the
   element's own rounded corners (radius = frame radius - border). clip-path: inset() is not enough for sticky navs. */
html:not([data-device="desktop"]) .leaf-screen,
html:not([data-device="desktop"]) .leaf-device > .in-device { -webkit-mask-image: linear-gradient(#000, #000); mask-image: linear-gradient(#000, #000); }
html:not([data-device="desktop"]) .leaf-screen { border-radius: 0 0 var(--leaf-screen-r) var(--leaf-screen-r); }
html:not([data-device="desktop"]) .leaf-device > .in-device { border-radius: var(--leaf-screen-r); overflow: hidden; }
html:not([data-device="desktop"]) .leaf-screen::-webkit-scrollbar { width: 0; }
html:not([data-device="desktop"]) .leaf-app { border: 0; border-radius: 0; box-shadow: none; min-height: 100%; padding: 16px 16px 28px; }
/* Apps drawn edge to edge (chat, full-screen tools): a root with .leaf-bleed fills the whole device screen with no
   white gutter around it, the way a native app does. */
html:not([data-device="desktop"]) .leaf-app:has(> .leaf-bleed) { padding: 0; display: flex; flex-direction: column; }
html:not([data-device="desktop"]) .leaf-app > .leaf-bleed { flex: 1; min-height: 0; border: 0; border-radius: 0; }
/* The API calls panel stays beside the device and matches its height. */
html:not([data-device="desktop"]) .leaf-log { height: auto; contain: size; position: static; }
@media (max-width: 960px) { html:not([data-device="desktop"]) .leaf-log { contain: none; height: 360px; } }
html:not([data-device="desktop"]) .leaf-statusbar {
  display: flex; align-items: center; justify-content: space-between; position: relative; flex-shrink: 0;
  padding: 0 26px; height: 48px; font-size: 15px; font-weight: 600; color: #111; background: var(--card);
}
html[data-device="tablet"] .leaf-statusbar { height: 30px; font-size: 12px; padding: 0 20px; }
.sb-island { position: absolute; left: 50%; top: 11px; width: 122px; height: 34px; transform: translateX(-50%); background: #000; border-radius: 999px; }
html[data-device="tablet"] .sb-island { width: 8px; height: 8px; top: 11px; background: #2a2a2a; }
.sb-icons { display: inline-flex; align-items: center; gap: 6px; }
.sb-icons svg { fill: #111; }
.sb-battery { position: relative; width: 25px; height: 12px; border: 1.5px solid rgba(0,0,0,.45); border-radius: 4px; padding: 1.5px; }
.sb-battery::after { content: ""; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; background: rgba(0,0,0,.45); border-radius: 0 2px 2px 0; }
.sb-level { display: block; height: 100%; width: 100%; background: #111; border-radius: 1.5px; }
.sb-level.low { background: #ef4444; }
html:not([data-device="desktop"]) .leaf-homebar {
  display: block; position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); width: 134px; height: 5px; border-radius: 999px; background: #111; opacity: .85; z-index: 5; pointer-events: none;
}
html[data-device="tablet"] .leaf-homebar { width: 180px; }
/* The demo's own toasts appear on the device screen. */
.leaf-device > .leaf-toast { position: absolute; }

/* ---------- Top bar controls: preview size + settings ---------- */
.tb-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border); background: var(--card); border-radius: 999px; }
.tb-seg-btn, .tb-btn {
  width: 30px; height: 28px; border: 0; border-radius: 999px; background: transparent; color: var(--fg-mute);
  display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: background .15s, color .15s;
}
.tb-seg-btn svg, .tb-btn svg { width: 16px; height: 16px; }
.tb-seg-btn:hover, .tb-btn:hover { color: var(--fg); background: var(--secondary); }
.tb-seg-btn.on { background: var(--primary); color: var(--primary-fg); }
.tb-btn { width: 36px; height: 36px; border: 1px solid var(--border); background: var(--card); }
.tb-btn:hover svg { animation: spin 2s linear infinite; }
@media (max-width: 600px) { .tb-seg { display: none; } }

/* ---------- Narrow demo widths (mobile preview, small screens) ---------- */
@media (max-width: 480px) {
  .leaf-shell { padding: 12px; }
  .leaf-status .status-chip { font-size: 11px; }
  .stat-grid { gap: 6px; }
}
@container site (max-width: 480px) {
  .leaf-app { padding: 14px; border-radius: 14px; min-height: 0; }
  .title { font-size: 18px; }
}

/* ---------- Parking Booking (Baylight, city parking) ----------
   Palette: night asphalt (#0b0e14 → #232a3a surfaces), signage blue #2f6bff, sodium-lamp amber #ffb547 (your picks,
   your bay, the meter), lane yellow #ffd84d, go green #3ddc97 (free bays), EV cyan #39d0ff, stop red #ff5468, and
   ticket paper #f5f2ea with ink #151922. Radius scale 8 / 12 / 16 / 24 / 30, 4-8px rhythm.
   Display: Geist 800 tight-tracked; signage (bays, plates, timers, LED) in Geist Mono. */
.leaf-app:has(> .pk) { padding: 0; overflow: hidden; background: #0f131b; border-color: #1c2230; }
html[data-device="desktop"] .pk { height: clamp(620px, calc(100vh - 116px), 860px); }
.leaf-device:has(.pk) { background: #0b0e14; }
.leaf-device:has(.pk) .leaf-statusbar { background: #0b0e14; color: #f2f4f8; }
.leaf-device:has(.pk) .sb-icons svg { fill: #f2f4f8; }
.leaf-device:has(.pk) .sb-battery { border-color: rgba(255, 255, 255, 0.55); }
.leaf-device:has(.pk) .sb-battery::after { background: rgba(255, 255, 255, 0.55); }
.leaf-device:has(.pk) .sb-level { background: #f2f4f8; }
.leaf-device:has(.pk) .leaf-homebar { background: #f2f4f8; opacity: 0.5; }
.leaf-device:has(.pk) > .leaf-toast, body:has(.pk) > .leaf-toast { bottom: 96px; max-width: calc(100% - 40px); text-align: center; background: #f5f2ea; color: #11151d; font-weight: 600; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45); }

.pk, .pk-host {
  --pk-ink: #0b0e14;
  --pk-bg: #0f131b;
  --pk-s1: #151a24;
  --pk-s2: #1b2130;
  --pk-s3: #252d3e;
  --pk-line: rgba(255, 255, 255, 0.07);
  --pk-line2: rgba(255, 255, 255, 0.12);
  --pk-text: #edf0f5;
  --pk-soft: rgba(237, 240, 245, 0.72);
  --pk-mute: rgba(237, 240, 245, 0.5);
  --pk-sign: #2f6bff;
  --pk-amber: #ffb547;
  --pk-lane: #ffd84d;
  --pk-go: #3ddc97;
  --pk-ev: #39d0ff;
  --pk-acc: #7fa3ff;
  --pk-stop: #ff5468;
  --pk-paper: #f5f2ea;
  --pk-print: #151922;
  --pk-r-xs: 8px;
  --pk-r-sm: 12px;
  --pk-r: 16px;
  --pk-r-lg: 24px;
  --pk-r-xl: 30px;
  --pk-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --pk-spring: cubic-bezier(0.3, 1.4, 0.5, 1);
  color: var(--pk-text);
  font-family: var(--font);
}
.pk { position: relative; display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; overflow: clip; background: var(--pk-bg); -webkit-font-smoothing: antialiased; }
.pk button, .pk-host button { font-family: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
.pk :focus-visible, .pk-host :focus-visible { outline: 2px solid #ffc65c; outline-offset: 2px; }
.pk-display { font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; }
.pk-grow { flex: 1; min-width: 0; }
.pk-dim { color: var(--pk-mute); }
.pk-small { font-size: 12px; }
.pk-star { color: #ffc65c; font-weight: 700; }
.pk-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--hue, var(--pk-amber)); }
.pk-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pk-mute); margin: 18px 2px 8px; }
.pk-h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.pk-h3 { font-size: 15px; font-weight: 700; margin: 20px 2px 10px; display: flex; align-items: center; gap: 8px; }
.pk-h3 span { font: 700 11px var(--mono); padding: 2px 8px; border-radius: 999px; background: var(--pk-s2); color: var(--pk-soft); }
.pk-scroll { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #2a3242 transparent; }
/* Inside the phone / tablet frame, scroll like a native app: no visible scrollbars. */
html:not([data-device="desktop"]) .pk-scroll { scrollbar-width: none; }
html:not([data-device="desktop"]) .pk-scroll::-webkit-scrollbar { display: none; }
.pk-logo { display: block; width: 32px; height: 32px; flex-shrink: 0; filter: drop-shadow(0 4px 10px rgba(47, 107, 255, 0.35)); }

/* ---------- shell ---------- */
.pk-top { display: none; }
.pk-main { position: relative; flex: 1; min-height: 0; }
.pk-page { position: absolute; inset: 0; }
.pk-doc { padding: 18px 16px 28px; }
.pk-tabbar { flex: none; position: relative; z-index: 10; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px 14px 20px; background: rgba(11, 14, 20, 0.94); border-top: 1px solid var(--pk-line); }
.pk-in-detail .pk-tabbar { display: none; }
.pk-tab { position: relative; min-height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 14px; background: none; color: var(--pk-mute) !important; font-size: 11px; font-weight: 600; transition: color 0.2s, background 0.2s, transform 0.15s var(--pk-ease); }
.pk-tab-ico { display: inline-flex; transition: transform 0.3s var(--pk-spring), filter 0.2s; }
.pk-tab svg { width: 22px; height: 22px; }
.pk-tab.on { color: #fff !important; }
.pk-tab.on .pk-tab-ico { color: var(--pk-amber); transform: translateY(-1px); filter: drop-shadow(0 0 8px rgba(255, 181, 71, 0.55)); }
.pk-tab:active { transform: scale(0.95); }
.pk-tab-badge { position: absolute; top: 5px; left: calc(50% + 8px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--pk-go); color: #04140c; font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--pk-ink); }

/* ---------- buttons ---------- */
.pk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 14px; font-size: 14px; font-weight: 700; color: #fff !important; white-space: nowrap; background: linear-gradient(180deg, #3b77ff, #285de6); box-shadow: 0 6px 18px rgba(47, 107, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.22); transition: transform 0.15s var(--pk-ease), box-shadow 0.2s, filter 0.2s, background 0.2s; }
.pk-btn svg { width: 17px; height: 17px; flex-shrink: 0; }
.pk-btn small { font-weight: 600; opacity: 0.7; font-size: 12px; }
.pk-btn:active:not(:disabled) { transform: scale(0.97); }
.pk-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.pk-btn-go { background: linear-gradient(180deg, #ffc35e, #ffa726); color: #1d1404 !important; box-shadow: 0 6px 18px rgba(255, 167, 38, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.pk-btn-soft { background: var(--pk-s2); color: var(--pk-text) !important; box-shadow: inset 0 0 0 1px var(--pk-line2); }
.pk-btn-sm { min-height: 44px; padding: 0 14px; font-size: 13px; border-radius: 12px; }
.pk-btn-sm svg { width: 15px; height: 15px; }
.pk-btn-big { min-height: 54px; font-size: 15px; border-radius: 16px; }
.pk-btn-block { width: 100%; }
.pk-btn-ink { background: var(--pk-print); color: var(--pk-paper) !important; box-shadow: 0 4px 12px rgba(21, 25, 34, 0.25); }
.pk-btn-ghost-ink { background: transparent; color: var(--pk-print) !important; box-shadow: inset 0 0 0 1.5px rgba(21, 25, 34, 0.22); }
.pk-danger { background: rgba(255, 84, 104, 0.1); color: #ff8a98 !important; box-shadow: inset 0 0 0 1px rgba(255, 84, 104, 0.3); }
.pk-btn.armed { background: #e0364b; color: #fff !important; box-shadow: 0 6px 18px rgba(224, 54, 75, 0.4); animation: pkArm 1s ease-in-out infinite; }
.pk-icon-btn { width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; border: 1px solid var(--pk-line2); background: var(--pk-s1); color: var(--pk-soft) !important; display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: background 0.15s, color 0.15s, transform 0.15s var(--pk-ease); }
.pk-icon-btn svg { width: 18px; height: 18px; }
.pk-icon-btn:active { transform: scale(0.93); }
.pk-round { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--pk-line2); background: rgba(15, 19, 27, 0.86); color: var(--pk-text) !important; display: inline-flex; align-items: center; justify-content: center; padding: 0; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4); backdrop-filter: blur(12px); transition: transform 0.15s var(--pk-ease), background 0.15s; }
.pk-round svg { width: 19px; height: 19px; }
.pk-round:active { transform: scale(0.93); }
.pk-link { align-self: center; border: 0; background: none; color: var(--pk-amber) !important; font-weight: 700; font-size: 13px; min-height: 44px; padding: 0 6px; text-decoration: underline; text-decoration-color: rgba(255, 181, 71, 0.4); text-underline-offset: 3px; }
.pk-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 16px; background: var(--pk-s1); border: 1px solid var(--pk-line); }
.pk-seg button { min-height: 44px; border: 0; border-radius: 12px; background: none; color: var(--pk-soft) !important; font-weight: 700; font-size: 13.5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px 6px; transition: background 0.2s var(--pk-ease), color 0.2s, box-shadow 0.2s; }
.pk-seg button span { font-size: 11px; font-weight: 600; color: var(--pk-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pk-seg button:active:not(:disabled) { transform: scale(0.97); }
.pk-seg button.on { background: var(--pk-s3); color: #fff !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 4px 12px rgba(0, 0, 0, 0.3); }
.pk-seg-sm { padding: 3px; border-radius: 13px; }
.pk-seg-sm button { min-height: 42px; font-size: 12.5px; padding: 0 10px; border-radius: 10px; }

/* ---------- search ---------- */
.pk-search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 6px 0 14px; border-radius: 16px; background: var(--pk-s1); border: 1px solid var(--pk-line2); transition: border-color 0.2s, box-shadow 0.2s; }
.pk-search:focus-within { border-color: rgba(255, 181, 71, 0.6); box-shadow: 0 0 0 4px rgba(255, 181, 71, 0.12); }
.pk-search > svg { width: 18px; height: 18px; color: var(--pk-mute); flex-shrink: 0; }
.pk-search input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: none; font-size: 15px; color: var(--pk-text); }
.pk-search input::placeholder { color: var(--pk-mute); }
.pk-search input::-webkit-search-cancel-button { display: none; }
.pk .pk-search input:focus-visible { outline: none; }
.pk-search-x { width: 36px; height: 36px; border: 0; border-radius: 11px; background: var(--pk-s3); color: var(--pk-soft) !important; display: none; align-items: center; justify-content: center; padding: 0; }
.pk-search-x svg { width: 15px; height: 15px; }
.pk-has-q .pk-search-x { display: inline-flex; }
.pk-search-float { height: 52px; padding-left: 9px; background: rgba(13, 17, 25, 0.88); backdrop-filter: blur(16px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); }
.pk-search-logo { display: inline-flex; }

/* ---------- explore: map ---------- */
.pk-mapwrap { position: absolute; inset: 0; overflow: hidden; overflow: clip; }
.pk-map { position: absolute; inset: 0; overflow: hidden; overflow: clip; background: #0d1017; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.pk-map.pk-dragging { cursor: grabbing; }
.pk-world { position: absolute; left: 0; top: 0; width: 1330px; height: 1330px; transform-origin: 0 0; will-change: transform; }
.pk-city, .pk-route { position: absolute; left: 0; top: 0; display: block; overflow: visible; }
.pk-m-label { font: 600 9.5px var(--font); letter-spacing: 0.22em; text-transform: uppercase; fill: rgba(255, 255, 255, 0.24); }
.pk-m-river { font-style: italic; fill: rgba(120, 190, 230, 0.45); letter-spacing: 0.5em; font-size: 10px; }
.pk-m-park { fill: rgba(130, 214, 156, 0.45); letter-spacing: 0.32em; }
.pk-m-p { font: 800 24px var(--font); text-anchor: middle; }
.pk-m-bridge { fill: #222938; }
.pk-m-rail { stroke: rgba(255, 255, 255, 0.2); stroke-width: 1.2; fill: none; }
.pk-route-glow { fill: none; stroke: #ffb547; stroke-opacity: 0.16; stroke-width: 18; stroke-linecap: round; stroke-linejoin: round; }
.pk-route-line { fill: none; stroke: #ffc65c; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; }
.pk-route-end { fill: #ffc65c; }
/* Little cars cruising the two avenues: their own layers, so the big map never repaints. */
.pk-mcar { position: absolute; left: 0; top: 0; width: 4px; height: 9px; border-radius: 2px; pointer-events: none; opacity: 0.9; }
.pk-mcar-1 { left: 657px; background: #fff6d8; box-shadow: 0 0 10px 3px rgba(255, 236, 180, 0.5); }
.pk-mcar-2 { left: 671px; background: #ff5a6a; box-shadow: 0 0 10px 3px rgba(255, 70, 90, 0.45); }
.pk-mcar-3 { top: 657px; width: 9px; height: 4px; background: #ff5a6a; box-shadow: 0 0 10px 3px rgba(255, 70, 90, 0.45); }
.pk-mcar-4 { top: 671px; width: 9px; height: 4px; background: #fff6d8; box-shadow: 0 0 10px 3px rgba(255, 236, 180, 0.5); }
.pk-map-shade { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 38%, transparent 50%, rgba(4, 6, 10, 0.6)), linear-gradient(180deg, rgba(8, 10, 15, 0.55), transparent 120px); }
.pk-pins { position: absolute; inset: 0; pointer-events: none; }
.pk-pins-layer { position: absolute; inset: 0; }
.pk-you { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 0; }
.pk-you i { position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%; background: #4f8bff; border: 3px solid #fff; box-shadow: 0 0 0 5px rgba(79, 139, 255, 0.25), 0 2px 8px rgba(0, 0, 0, 0.5); }
.pk-you::before { content: ""; position: absolute; left: -28px; top: -28px; width: 56px; height: 56px; border-radius: 50%; background: rgba(79, 139, 255, 0.28); opacity: 0; }
.pk-pin { position: absolute; left: 0; top: 0; z-index: 1; padding: 0; border: 0; background: none; pointer-events: auto; cursor: pointer; }
.pk-pin.on { z-index: 3; }
.pk-pin.hot { z-index: 2; }
.pk-pin-in { display: flex; flex-direction: column; align-items: center; transform-origin: 50% 100%; transition: transform 0.35s var(--pk-spring), opacity 0.25s, filter 0.25s; }
.pk-pin-body { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 5px 0 5px; border-radius: 12px; background: #0f1420; border: 1px solid rgba(255, 255, 255, 0.16); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.5); transition: border-color 0.2s, box-shadow 0.25s; }
.pk-pin-p { width: 24px; height: 24px; border-radius: 8px; background: var(--pk-sign); color: #fff; font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2); }
.pk-pin-body b { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; }
.pk-pin-body i { font-style: normal; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 8px; font: 700 11.5px var(--mono); display: inline-flex; align-items: center; justify-content: center; background: rgba(61, 220, 151, 0.16); color: var(--pk-go); }
.pk-pin-low .pk-pin-body i { background: rgba(255, 181, 71, 0.18); color: var(--pk-amber); }
.pk-pin-full .pk-pin-body i { background: rgba(255, 84, 104, 0.18); color: #ff8a98; }
.pk-pin-closed .pk-pin-body i { background: rgba(255, 255, 255, 0.08); color: var(--pk-mute); }
.pk-pin-closed .pk-pin-p { background: #3a4256; }
.pk-pin-tip { width: 11px; height: 11px; margin-top: -6px; background: #0f1420; border-right: 1px solid rgba(255, 255, 255, 0.16); border-bottom: 1px solid rgba(255, 255, 255, 0.16); transform: rotate(45deg); transition: border-color 0.2s; }
.pk-pin-name { order: -1; margin-bottom: 6px; padding: 5px 10px; border-radius: 9px; background: var(--pk-amber); color: #1d1404; font-size: 12px; font-weight: 800; white-space: nowrap; pointer-events: none; opacity: 0; transform: translateY(6px) scale(0.92); transition: opacity 0.2s, transform 0.3s var(--pk-spring); box-shadow: 0 8px 18px rgba(255, 167, 38, 0.3); }
.pk-pin.on .pk-pin-in { transform: scale(1.08); }
.pk-pin.on .pk-pin-body, .pk-pin.on .pk-pin-tip { border-color: var(--pk-amber); }
.pk-pin.on .pk-pin-body { box-shadow: 0 0 0 4px rgba(255, 181, 71, 0.22), 0 12px 28px rgba(0, 0, 0, 0.55); }
.pk-pin.on .pk-pin-name { opacity: 1; transform: none; }
.pk-pin.hot .pk-pin-body { border-color: rgba(255, 255, 255, 0.45); }
.pk-pin-out .pk-pin-in { opacity: 0.3; filter: grayscale(1); }
.pk-pin:active .pk-pin-in { transform: scale(0.94); transition-duration: 0.1s; }
.pk-map-top { position: absolute; left: 12px; right: 12px; top: 10px; z-index: 4; }
.pk-map-tools { position: absolute; right: 12px; top: 72px; z-index: 4; display: flex; flex-direction: column; gap: 8px; }
.pk-zoom { display: flex; flex-direction: column; border-radius: 14px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4); }
.pk-zoom .pk-round { box-shadow: none; }
.pk-zoom .pk-round:first-child { border-radius: 14px 14px 0 0; border-bottom-color: transparent; }
.pk-zoom .pk-round:last-child { border-radius: 0 0 14px 14px; }
.pk-zoom .pk-round svg { width: 18px; height: 18px; }
.pk-session-slot { position: absolute; left: 12px; right: 68px; top: 72px; z-index: 4; pointer-events: none; }
.pk-session-slot > * { pointer-events: auto; }
.pk-session { max-width: 100%; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 12px; border-radius: 14px; border: 1px solid rgba(255, 181, 71, 0.35); background: rgba(22, 17, 9, 0.88); color: #fff !important; backdrop-filter: blur(12px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), 0 0 26px rgba(255, 181, 71, 0.12); transition: transform 0.15s var(--pk-ease), border-color 0.2s; text-align: left; }
.pk-session:active { transform: scale(0.97); }
.pk-live-dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: var(--pk-go); box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.18); }
.pk-session-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.pk-session-txt b { font: 700 12.5px var(--mono); letter-spacing: 0.04em; }
.pk-session-txt small { font-size: 11px; color: var(--pk-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-session-left { font: 700 15px var(--mono); color: var(--pk-amber); font-variant-numeric: tabular-nums; }
.pk-session.pk-soon { border-color: rgba(255, 84, 104, 0.55); }
.pk-session.pk-soon .pk-session-left { color: #ff8a98; }
.pk-session-sm { height: 40px; }

/* ---------- explore: garage list ---------- */
.pk-list { display: flex; flex-direction: column; min-height: 0; }
.pk-list-sheet { position: absolute; left: 0; right: 0; top: 64px; bottom: 0; z-index: 5; background: var(--pk-bg); border-radius: 26px 26px 0 0; border-top: 1px solid var(--pk-line2); box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.5); transform: translate3d(0, calc(100% - 292px), 0); transition: transform 0.45s var(--pk-ease); will-change: transform; }
.pk-list-sheet.open { transform: translate3d(0, 0, 0); }
.pk-list-head { flex: none; padding: 4px 16px 10px; }
.pk-list-sheet .pk-list-head { touch-action: none; cursor: grab; }
.pk-grab { display: flex; justify-content: center; padding: 6px 0 10px; }
.pk-grab i { width: 40px; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.22); }
.pk-list-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pk-list-title h2 { font-size: 19px; }
.pk-list-title p { font-size: 12px; color: var(--pk-mute); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-list-title > div:first-child { min-width: 0; }
.pk-chips { display: flex; gap: 8px; overflow-x: auto; margin: 12px -16px 0; padding: 0 16px 2px; scrollbar-width: none; touch-action: pan-x; }
.pk-chips::-webkit-scrollbar { display: none; }
.pk-chip { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: 13px; border: 1px solid var(--pk-line2); background: var(--pk-s1); color: var(--pk-soft) !important; font-size: 13px; font-weight: 600; transition: background 0.2s var(--pk-ease), color 0.2s, border-color 0.2s, transform 0.15s var(--pk-ease); }
.pk-chip svg { width: 15px; height: 15px; }
.pk-chip.on { background: rgba(47, 107, 255, 0.18); border-color: rgba(87, 140, 255, 0.7); color: #fff !important; }
.pk-chip.on svg { color: #8fb1ff; }
.pk-chip:active { transform: scale(0.96); }
.pk-list-body { flex: 1; min-height: 0; overflow-y: hidden; padding: 2px 16px 18px; scrollbar-width: none; }
.pk-list-sheet.open .pk-list-body { overflow-y: auto; }
.pk-glist { display: flex; flex-direction: column; gap: 10px; }
.pk-gcard { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 14px 18px; border-radius: 18px; background: var(--pk-s1); border: 1px solid var(--pk-line); cursor: pointer; overflow: hidden; transition: transform 0.25s var(--pk-ease), border-color 0.2s, box-shadow 0.25s, background 0.2s; }
.pk-gcard:active { transform: scale(0.985); }
.pk-gcard.on { border-color: rgba(255, 181, 71, 0.55); background: linear-gradient(135deg, rgba(255, 181, 71, 0.08), var(--pk-s1) 60%); box-shadow: 0 0 0 3px rgba(255, 181, 71, 0.12); }
.pk-gsign { width: 42px; height: 42px; border-radius: 13px; background: var(--pk-sign); display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.22), 0 0 0 3px color-mix(in srgb, var(--hue) 28%, transparent), 0 6px 16px rgba(47, 107, 255, 0.25); }
.pk-gsign b { color: #fff; font-size: 22px; font-weight: 800; line-height: 1; }
.pk-gmain { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pk-gname { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-gmeta { font-size: 12px; color: var(--pk-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-feats { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.pk-feat { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); font-size: 10.5px; font-weight: 600; color: var(--pk-soft); }
.pk-feat svg { width: 11px; height: 11px; }
.pk-feat-ev { color: var(--pk-ev); background: rgba(57, 208, 255, 0.1); }
.pk-feat-acc { color: var(--pk-acc); background: rgba(127, 163, 255, 0.12); }
.pk-gside { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.pk-gprice { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pk-gprice small { font-size: 11px; color: var(--pk-mute); font-weight: 600; margin-left: 1px; }
.pk-free { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 7px; font: 700 11px var(--mono); white-space: nowrap; }
.pk-free i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.pk-free-ok { background: rgba(61, 220, 151, 0.12); color: var(--pk-go); }
.pk-free-low { background: rgba(255, 181, 71, 0.13); color: var(--pk-amber); }
.pk-free-full { background: rgba(255, 84, 104, 0.13); color: #ff8a98; }
.pk-free-closed { background: rgba(255, 255, 255, 0.06); color: var(--pk-mute); }
.pk-closing { font-size: 10.5px; color: var(--pk-mute); }
.pk-gbar { position: absolute; left: 14px; right: 14px; bottom: 8px; height: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.pk-gbar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--hue) 55%, transparent), var(--hue)); transform-origin: left center; transition: transform 0.6s var(--pk-ease); }

/* skeletons + empty states */
.pk-skel { position: relative; overflow: hidden; border-radius: 18px; background: var(--pk-s1); }
.pk-skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%); transform: translateX(-100%); animation: pkSweep 1.3s linear infinite; }
.pk-skel-list { display: grid; gap: 10px; }
.pk-skel-card { height: 92px; }
.pk-skel-cars { height: 112px; }
.pk-skel-ticket { height: 520px; border-radius: 22px; }
.pk-skel-car { height: 240px; border-radius: 22px; }
.pk-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 26px 18px; border-radius: var(--pk-r-lg); background: var(--pk-s1); border: 1px dashed var(--pk-line2); }
.pk-empty-art { width: 120px; margin-bottom: 6px; }
.pk-empty-art svg { display: block; width: 100%; }
.pk-empty b { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.pk-empty p { font-size: 13px; color: var(--pk-mute); max-width: 270px; line-height: 1.45; margin-bottom: 8px; }
.pk-empty-sm { padding: 18px 14px; }
.pk-empty-sm .pk-empty-art { width: 90px; }
.pk-list-sheet:not(.open) .pk-empty-sm { padding: 12px 14px; gap: 2px; }
.pk-list-sheet:not(.open) .pk-empty-sm .pk-empty-art { display: none; }
.pk-list-sheet:not(.open) .pk-empty-sm p { margin-bottom: 6px; }

/* ---------- garage detail ---------- */
.pk-detail { display: flex; flex-direction: column; }
.pk-detail-scroll { flex: 1; min-height: 0; }
.pk-hero { position: relative; height: 250px; overflow: hidden; background: #0a0d16; }
.pk-hero-svg { position: absolute; left: 0; top: 0; width: 100%; height: calc(100% - 26px); display: block; }
.pk-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 52%, rgba(15, 19, 27, 0.82) 78%, var(--pk-bg) 98%); }
.pk-hero-p { font: 800 28px var(--font); fill: #fff; }
.pk-hero-led-k { font: 700 6.5px var(--mono); letter-spacing: 0.24em; }
.pk-hero-led { font: 700 15px var(--mono); letter-spacing: 0.1em; filter: drop-shadow(0 0 3px currentColor); }
.pk-back { position: absolute; top: 12px; left: 12px; z-index: 3; }
.pk-hero-copy { position: absolute; left: 16px; right: 16px; bottom: 6px; z-index: 2; display: flex; flex-direction: column; gap: 4px; }
.pk-hero-copy h1 { font-size: 27px; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6); overflow-wrap: anywhere; }
.pk-hero-copy p { font-size: 12.5px; color: var(--pk-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-detail-body { padding: 4px 16px 28px; }
.pk-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.pk-stat { min-width: 0; padding: 10px 6px; border-radius: 14px; background: var(--pk-s1); border: 1px solid var(--pk-line); text-align: center; }
.pk-stat b { display: block; font-size: 14.5px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-stat span { display: block; font-size: 10.5px; color: var(--pk-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-stat-bad b { color: #ff8a98; }
.pk-levels-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 2px 10px; }
.pk-levels-head > div { min-width: 0; }
.pk-levels-head p { font-size: 12px; margin-top: 2px; }
.pk-levels button b { font: 800 14px var(--mono); }
.pk-levels button span { color: var(--pk-go); }
.pk-levels button span.pk-zero { color: #ff8a98; }
.pk-plan { margin-top: 12px; }
.pk-plan-frame { padding: 10px; border-radius: 22px; background: #0b0e14; border: 1px solid var(--pk-line); box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35); }
.pk-plan-svg { display: block; width: 100%; height: auto; margin: 0 auto; overflow: visible; }
.pk-fp-floor { fill: #141922; stroke: rgba(255, 255, 255, 0.08); }
.pk-fp-aisle { fill: #0f131b; }
.pk-fp-dash { fill: none; stroke: #ffd84d; stroke-opacity: 0.22; stroke-width: 1.4; stroke-dasharray: 6 7; }
.pk-fp-arrow { fill: none; stroke: #ffd84d; stroke-opacity: 0.42; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pk-fp-in { stroke-opacity: 0.8; }
.pk-fp-tag { font: 700 8.5px var(--mono); fill: rgba(255, 216, 77, 0.65); text-anchor: middle; letter-spacing: 0.14em; }
.pk-fp-wall { fill: #232a38; }
.pk-fp-lines { fill: none; stroke: rgba(240, 244, 250, 0.62); stroke-width: 1.7; }
.pk-fp-pillar { fill: #2d3548; }
.pk-fp-code { font: 700 10px var(--mono); text-anchor: middle; fill: rgba(237, 240, 245, 0.34); }
.pk-fp-ev { fill: var(--pk-ev); }
.pk-fp-acc { fill: none; stroke: #9db8ff; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.pk-fp-permit { font: 700 7px var(--mono); fill: rgba(255, 255, 255, 0.3); text-anchor: middle; letter-spacing: 0.2em; }
.pk-fp-you { font: 800 7px var(--mono); fill: var(--pk-amber); text-anchor: middle; letter-spacing: 0.16em; }
.pk-bay-bg { fill: transparent; transition: fill 0.2s; }
.pk-bay[data-bay] { cursor: pointer; outline: none; }
.pk-bay[data-bay]:focus-visible .pk-bay-bg { stroke: #fff; stroke-width: 2; }
.pk-bay-free .pk-bay-bg { fill: rgba(61, 220, 151, 0.07); }
.pk-bay-free .pk-fp-code { fill: #74e6b6; }
.pk-bay-free.pk-k-ev .pk-bay-bg { fill: rgba(57, 208, 255, 0.11); }
.pk-bay-free.pk-k-ev .pk-fp-code { fill: #8fe3ff; }
.pk-bay-free.pk-k-acc .pk-bay-bg { fill: rgba(127, 163, 255, 0.16); }
.pk-bay-free.pk-k-acc .pk-fp-code { fill: #b4c8ff; }
.pk-bay-taken .pk-fp-ev, .pk-bay-mine .pk-fp-ev { opacity: 0.5; }
.pk-bay-mine .pk-bay-bg { fill: rgba(255, 181, 71, 0.08); }
.pk-bay-sel .pk-bay-bg { fill: rgba(255, 181, 71, 0.14); }
.pk-bay-sel .pk-fp-code { fill: var(--pk-amber); }
.pk-bay-ring { fill: none; stroke: #ffb547; stroke-width: 2.2; }
.pk-mycar { transform-box: fill-box; transform-origin: center; }
.pk-bay-lost .pk-bay-bg { fill: rgba(255, 84, 104, 0.22); stroke: #ff5468; stroke-width: 1.6; }
.pk-bay-hint .pk-bay-bg { stroke: var(--pk-go); stroke-width: 2; stroke-dasharray: 4 3; }
.pk-legend { display: grid; grid-template-columns: repeat(3, max-content); gap: 7px 22px; margin: 12px 6px 0; font-size: 11.5px; color: var(--pk-mute); }
.pk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pk-legend i { width: 10px; height: 14px; border-radius: 3px; }
.pk-lg-free { background: rgba(61, 220, 151, 0.35); box-shadow: inset 0 0 0 1.5px #3ddc97; }
.pk-lg-ev { background: rgba(57, 208, 255, 0.3); box-shadow: inset 0 0 0 1.5px #39d0ff; }
.pk-lg-acc { background: rgba(127, 163, 255, 0.35); box-shadow: inset 0 0 0 1.5px #7fa3ff; }
.pk-lg-taken { background: #5d6677; }
.pk-lg-permit { background: repeating-linear-gradient(45deg, #151a24 0 2px, #2a3242 2px 4px); box-shadow: inset 0 0 0 1px #2a3242; }
.pk-lg-sel { background: #ffb547; box-shadow: 0 0 8px rgba(255, 181, 71, 0.6); }
.pk-more { margin-top: 8px; }
.pk-blurb { margin-top: 18px; font-size: 13.5px; line-height: 1.55; color: var(--pk-soft); }
.pk-amen { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-amen span { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 12px; background: var(--pk-s1); border: 1px solid var(--pk-line); font-size: 12.5px; font-weight: 600; color: var(--pk-soft); }
.pk-amen svg { width: 15px; height: 15px; color: var(--pk-amber); }
.pk-rates { margin: 0; padding: 2px 14px; border-radius: 16px; background: var(--pk-s1); border: 1px solid var(--pk-line); }
.pk-rates div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--pk-line2); }
.pk-rates div:last-child { border-bottom: 0; }
.pk-rates dt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--pk-soft); }
.pk-rates dt svg { width: 14px; height: 14px; color: var(--pk-ev); }
.pk-rates dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.pk-rates dd small { font-size: 11px; color: var(--pk-mute); font-weight: 600; }
.pk-cta { flex: none; position: relative; z-index: 6; padding: 10px 12px 20px; background: rgba(11, 14, 20, 0.95); border-top: 1px solid var(--pk-line); }
.pk-cta-bar { display: flex; align-items: center; gap: 10px; animation: pkRise 0.35s var(--pk-ease); }
.pk-cta-hint { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--pk-soft); }
.pk-cta-hint i { width: 10px; height: 14px; border-radius: 3px; flex-shrink: 0; }
.pk-cta-txt { flex: 1; min-width: 0; }
.pk-cta-txt b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-cta-txt small { display: block; font-size: 12px; color: var(--pk-mute); font-variant-numeric: tabular-nums; }
.pk-baychip { flex-shrink: 0; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 52px; height: 50px; padding: 0 8px; border-radius: 13px; background: linear-gradient(180deg, #ffc35e, #ffa726); color: #1d1404; box-shadow: 0 0 22px rgba(255, 181, 71, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.pk-baychip small { font: 700 9.5px var(--mono); opacity: 0.7; letter-spacing: 0.06em; }
.pk-baychip b { font: 800 19px var(--mono); line-height: 1.05; }
.pk-baychip-lg { min-width: 62px; height: 58px; }
.pk-baychip-lg b { font-size: 23px; }

/* ---------- booking panel ---------- */
.pk-book { display: flex; flex-direction: column; padding: 0 18px 8px; }
.pk-sheet-head { display: flex; align-items: center; gap: 10px; padding: 24px 0 12px; }
.pk-sheet-head h2 { flex: 1; min-width: 0; font-size: 21px; }
.pk-b-sec .pk-label { margin-top: 18px; }
.pk-b-bay { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: linear-gradient(135deg, rgba(255, 181, 71, 0.12), rgba(255, 181, 71, 0.02)); border: 1px solid rgba(255, 181, 71, 0.3); animation: pkRise 0.35s var(--pk-ease); }
.pk-b-bay .pk-grow b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-b-bay .pk-grow span { display: block; font-size: 12.5px; color: var(--pk-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-b-bay em { font-style: normal; font-weight: 700; }
.pk-b-bay em svg { width: 13px; height: 13px; vertical-align: -2px; }
.pk-ev { color: var(--pk-ev); }
.pk-acc { color: var(--pk-acc); }
.pk-b-pick { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 14px; border-radius: 18px; border: 1.5px dashed rgba(61, 220, 151, 0.35); background: rgba(61, 220, 151, 0.04); }
.pk-b-pick-art svg { display: block; width: 66px; }
.pk-b-pick b { font-size: 15px; }
.pk-b-pick p { font-size: 12.5px; color: var(--pk-mute); line-height: 1.4; margin-top: 2px; }
.pk-b-pick .pk-btn { grid-column: 1 / -1; margin-top: 10px; }
.pk-slots { display: flex; gap: 8px; overflow-x: auto; margin: 10px -18px 0; padding: 0 18px 2px; scrollbar-width: none; }
.pk-slots::-webkit-scrollbar { display: none; }
.pk-slot { flex-shrink: 0; min-width: 80px; min-height: 52px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--pk-line2); background: var(--pk-s1); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; transition: background 0.2s, border-color 0.2s, transform 0.15s var(--pk-ease); }
.pk-slot b { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.pk-slot span { font-size: 10.5px; color: var(--pk-mute); font-weight: 600; }
.pk-slot.on { background: rgba(255, 181, 71, 0.14); border-color: var(--pk-amber); }
.pk-slot:disabled { opacity: 0.38; cursor: not-allowed; }
.pk-slot:active:not(:disabled) { transform: scale(0.96); }
.pk-dial-wrap { display: flex; align-items: center; justify-content: center; gap: 4px; }
.pk-dial { position: relative; width: 224px; aspect-ratio: 1; flex-shrink: 1; min-width: 0; touch-action: none; cursor: grab; border-radius: 50%; }
.pk-dial.pk-turning { cursor: grabbing; }
.pk-dial svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pk-dial-track { fill: none; stroke: #1c2230; stroke-width: 18; stroke-linecap: round; }
.pk-dial-shut { fill: none; stroke: rgba(255, 84, 104, 0.45); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 0.1 9; }
.pk-dial-ticks { fill: none; stroke: rgba(255, 255, 255, 0.2); stroke-width: 1.5; stroke-linecap: round; }
.pk-dial-labels text { font: 600 10px var(--mono); fill: rgba(237, 240, 245, 0.42); text-anchor: middle; }
.pk-dial-glow { fill: none; stroke: #ffb547; stroke-opacity: 0.16; stroke-width: 32; stroke-linecap: round; }
.pk-dial-fill { fill: none; stroke: #ffb547; stroke-width: 18; stroke-linecap: round; }
.pk-knob-halo { fill: rgba(255, 181, 71, 0.22); transition: transform 0.25s var(--pk-spring); }
.pk-knob { fill: #fff; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45)); }
.pk-knob-ch { fill: none; stroke: #8a5a10; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pk-turning .pk-knob-halo { transform: scale(1.35); }
.pk-dial-off .pk-dial-knob { display: none; }
.pk-dial-centre { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.pk-dial-centre b { font-size: 33px; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.pk-dial-centre span { font-size: 12.5px; color: var(--pk-soft); margin-top: 6px; font-variant-numeric: tabular-nums; }
.pk-dial-centre small { font-size: 11px; color: var(--pk-mute); margin-top: 3px; min-height: 13px; font-weight: 600; }
.pk-dial-centre small.pk-warn { color: #ff8a98; }
.pk-dial-off .pk-dial-centre b { color: #ff8a98; font-size: 26px; }
.pk-dial-btn { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--pk-line2); background: var(--pk-s1); color: var(--pk-text) !important; display: inline-flex; align-items: center; justify-content: center; padding: 0; transition: background 0.15s, transform 0.15s var(--pk-ease); }
.pk-dial-btn svg { width: 17px; height: 17px; }
.pk-dial-btn:active { transform: scale(0.9); }
.pk-presets { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pk-preset { min-width: 52px; height: 44px; padding: 0 10px; border-radius: 11px; border: 1px solid var(--pk-line2); background: var(--pk-s1); font: 700 12.5px var(--mono); color: var(--pk-soft) !important; transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s var(--pk-ease); }
.pk-preset.on { background: rgba(255, 181, 71, 0.14); border-color: var(--pk-amber); color: var(--pk-amber) !important; }
.pk-preset:disabled { opacity: 0.35; cursor: not-allowed; }
.pk-preset:active:not(:disabled) { transform: scale(0.94); }
.pk-vpicks { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 4px; scrollbar-width: none; }
.pk-vpicks::-webkit-scrollbar { display: none; }
.pk-vpick { position: relative; flex-shrink: 0; width: 148px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 12px 12px; border-radius: 16px; border: 1.5px solid var(--pk-line2); background: var(--pk-s1); text-align: left; transition: border-color 0.2s, background 0.2s, transform 0.15s var(--pk-ease); }
.pk-vpick:active { transform: scale(0.97); }
.pk-vpick-art { display: block; width: 100%; height: 50px; }
.pk-vpick-art .pk-carside { width: 100%; height: 100%; }
.pk-vpick-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; max-width: 100%; }
.pk-vpick-txt b { font-size: 13.5px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-vpick-ev { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 7px; background: rgba(57, 208, 255, 0.14); color: var(--pk-ev); display: inline-flex; align-items: center; justify-content: center; }
.pk-vpick-ev svg { width: 13px; height: 13px; }
.pk-vpick.on { border-color: var(--pk-amber); background: linear-gradient(160deg, rgba(255, 181, 71, 0.12), var(--pk-s1) 70%); }
.pk-vpick-add { width: 104px; align-items: center; justify-content: center; border-style: dashed; color: var(--pk-soft) !important; }
.pk-vpick-add span { width: 40px; height: 40px; border-radius: 13px; background: rgba(47, 107, 255, 0.16); color: #8fb1ff; display: inline-flex; align-items: center; justify-content: center; }
.pk-vpick-add svg { width: 20px; height: 20px; }
.pk-vpick-add b { font-size: 13px; }
.pk-carside { display: block; overflow: visible; }
.pk-plate { position: relative; display: inline-flex; align-items: center; height: 24px; padding: 0 8px 0 19px; border-radius: 6px; background: #f5f2ea; color: #12161f; font: 700 12.5px var(--mono); letter-spacing: 0.07em; white-space: nowrap; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.25); }
.pk-plate::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 11px; border-radius: 6px 0 0 6px; background: linear-gradient(180deg, #3b77ff, #2457e0); }
.pk-plate-sm { height: 20px; padding-left: 15px; font-size: 11px; }
.pk-plate-sm::before { width: 9px; }
.pk-plate-lg { height: 40px; padding: 0 14px 0 30px; font-size: 20px; border-radius: 8px; }
.pk-plate-lg::before { width: 18px; border-radius: 8px 0 0 8px; }
.pk-bill { margin: 18px 0 0; padding: 6px 14px; border-radius: 16px; background: var(--pk-s1); border: 1px solid var(--pk-line); }
.pk-bill div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 13px; color: var(--pk-soft); }
.pk-bill dt { display: flex; flex-direction: column; min-width: 0; }
.pk-bill dt svg { width: 13px; height: 13px; color: var(--pk-ev); display: inline; vertical-align: -2px; }
.pk-bill dt small { font: 500 11px var(--mono); color: var(--pk-mute); margin-top: 1px; }
.pk-bill dd { margin: 0; font-weight: 700; color: var(--pk-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pk-bill-cap { color: var(--pk-go) !important; }
.pk-bill-cap dd { color: var(--pk-go); }
.pk-bill-total { margin-top: 4px; padding-top: 12px !important; border-top: 1px dashed var(--pk-line2); color: var(--pk-text) !important; font-weight: 700; }
.pk-bill-total dd { font-size: 23px; font-weight: 800; letter-spacing: -0.03em; }
.pk-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); font-size: 12.5px; line-height: 1.45; color: var(--pk-soft); animation: pkRise 0.3s var(--pk-ease); }
.pk-note svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; color: var(--pk-amber); }
.pk-note-bad { background: rgba(255, 84, 104, 0.09); color: #ffc0c7; }
.pk-note-bad svg { color: #ff8a98; }
.pk-conflict { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding: 16px; border-radius: 20px; background: linear-gradient(180deg, rgba(255, 84, 104, 0.12), rgba(255, 84, 104, 0.03)); border: 1px solid rgba(255, 84, 104, 0.38); }
.pk-conflict-art svg { display: block; width: 100%; max-width: 230px; margin: 0 auto 4px; }
.pk-conflict b { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.pk-conflict p { font-size: 13px; line-height: 1.5; color: var(--pk-soft); }
.pk-conflict .pk-btn { flex-direction: column; gap: 0; min-height: 54px; margin-top: 4px; white-space: normal; text-align: center; }
.pk-b-foot { position: sticky; bottom: 0; z-index: 4; margin-top: auto; padding: 16px 0 6px; background: linear-gradient(180deg, rgba(15, 19, 27, 0), var(--pk-bg) 34%); }
.pk-slide { --x: 0px; --p: 0; position: relative; height: 62px; border-radius: 20px; background: #10141c; border: 1px solid rgba(255, 181, 71, 0.38); overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: none; box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4); }
.pk-slide[hidden] { display: none; }
.pk-slide-fill { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(255, 181, 71, 0.04), rgba(255, 181, 71, 0.4)); transform: translateX(calc(-100% + 66px + var(--x))); transition: transform 0.4s var(--pk-spring); }
.pk-slide-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 44px 0 70px; font-weight: 700; font-size: 14.5px; color: #ffe2b3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: calc(1 - var(--p) * 1.7); transition: opacity 0.2s; }
.pk-slide-chev { position: absolute; right: 16px; top: 50%; display: flex; gap: 1px; transform: translateY(-50%); opacity: calc(1 - var(--p) * 2); }
.pk-slide-chev i { width: 8px; height: 8px; border-top: 2px solid var(--pk-amber); border-right: 2px solid var(--pk-amber); transform: rotate(45deg); opacity: 0.3; }
.pk-slide-knob { position: absolute; left: 5px; top: 5px; width: 56px; height: 50px; border: 0; border-radius: 15px; padding: 0; background: linear-gradient(180deg, #ffc35e, #ffa726); color: #1d1404 !important; display: flex; align-items: center; justify-content: center; transform: translateX(var(--x)); transition: transform 0.4s var(--pk-spring), background 0.25s; box-shadow: 0 6px 16px rgba(255, 167, 38, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.45); cursor: grab; touch-action: none; }
.pk-slide-knob svg { width: 24px; height: 24px; }
.pk-slide-knob > svg:last-child, .pk-slide-spin { display: none; }
.pk-slide-spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(29, 20, 4, 0.25); border-top-color: #1d1404; }
.pk-sliding .pk-slide-knob, .pk-sliding .pk-slide-fill { transition: none; cursor: grabbing; }
.pk-checking .pk-slide-knob > svg:first-child, .pk-posting .pk-slide-knob > svg:first-child, .pk-done .pk-slide-knob > svg:first-child { display: none; }
.pk-checking .pk-slide-spin, .pk-posting .pk-slide-spin { display: block; }
.pk-checking .pk-slide-label, .pk-posting .pk-slide-label, .pk-done .pk-slide-label { opacity: 1; padding: 0 76px 0 18px; justify-content: flex-start; }
.pk-checking .pk-slide-chev, .pk-posting .pk-slide-chev, .pk-done .pk-slide-chev { display: none; }
.pk-done { border-color: rgba(61, 220, 151, 0.6); }
.pk-done .pk-slide-fill { background: linear-gradient(90deg, rgba(61, 220, 151, 0.08), rgba(61, 220, 151, 0.42)); }
.pk-done .pk-slide-knob { background: linear-gradient(180deg, #62f0b2, #2fcf88); box-shadow: 0 6px 18px rgba(61, 220, 151, 0.45); }
.pk-done .pk-slide-knob > svg:last-child { display: block; }
.pk-done .pk-slide-label { color: #b8ffdd; }
.pk-off { border-color: var(--pk-line2); }
.pk-off .pk-slide-knob { background: var(--pk-s3); color: var(--pk-mute) !important; box-shadow: none; cursor: not-allowed; }
.pk-off .pk-slide-label { color: var(--pk-mute); }
.pk-off .pk-slide-chev { display: none; }

/* ---------- tickets ---------- */
.pk-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.pk-page-head h1 { font-size: 30px; margin-top: 4px; }
.pk-tk-layout > section { min-width: 0; }
.pk-tk-list { display: grid; gap: 16px; }
.pk-ticket { position: relative; padding: 16px; border-radius: 22px; background: var(--pk-paper); color: var(--pk-print); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), inset 0 -3px 0 rgba(21, 25, 34, 0.06); overflow: hidden; }
.pk-ticket::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: repeating-linear-gradient(90deg, var(--pk-print) 0 14px, #ffd84d 14px 28px); opacity: 0.9; }
.pk-tk-head { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.pk-tk-logo .pk-logo { width: 34px; height: 34px; filter: none; }
.pk-tk-head b { display: block; font-size: 15.5px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-tk-head small { display: block; font: 600 11px var(--mono); color: rgba(21, 25, 34, 0.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-tk-state { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(22, 163, 106, 0.14); color: #0c7a4b; font-size: 12px; font-weight: 800; }
.pk-tk-state i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pk-tk-next { background: rgba(47, 107, 255, 0.13); color: #2457e0; }
.pk-tk-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: center; margin-top: 16px; }
.pk-ring { position: relative; width: 100%; max-width: 150px; aspect-ratio: 1; justify-self: center; }
.pk-ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.pk-ring-bg { fill: none; stroke: rgba(21, 25, 34, 0.09); stroke-width: 9; }
.pk-ring-fg { fill: none; stroke: #16a36a; stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 0.9s var(--pk-ease), stroke 0.3s; }
.pk-tone-soon .pk-ring-fg { stroke: #e08a00; }
.pk-tone-late .pk-ring-fg { stroke: #e0364b; }
.pk-tone-next .pk-ring-fg { stroke: #2f6bff; stroke-dasharray: 4 6 !important; }
.pk-ring-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.pk-ring-txt b { font: 800 21px var(--mono); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin: 2px 0; }
.pk-ring-txt small { font-size: 10.5px; color: rgba(21, 25, 34, 0.55); font-weight: 600; }
.pk-tone-late .pk-ring-txt b { color: #c42a3d; }
.pk-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pk-qr-svg { display: block; width: 100%; max-width: 136px; border-radius: 10px; box-shadow: 0 0 0 1px rgba(21, 25, 34, 0.12); }
.pk-qr small { font-size: 10.5px; color: rgba(21, 25, 34, 0.5); font-weight: 600; }
.pk-tk-bay { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 8px; margin-top: 16px; }
.pk-tk-bay > div { padding: 7px 12px; border-radius: 12px; background: rgba(21, 25, 34, 0.06); }
.pk-tk-bay small { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(21, 25, 34, 0.5); }
.pk-tk-bay b { font: 800 22px var(--mono); line-height: 1.1; }
.pk-tk-car { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.pk-tk-car-art { width: 62px; height: 31px; flex-shrink: 1; min-width: 0; }
.pk-tk-car-art svg { width: 100%; height: 100%; }
.pk-tk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin: 14px 2px 0; }
.pk-tk-grid div { position: relative; min-width: 0; }
.pk-tk-grid dt { font-size: 9.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(21, 25, 34, 0.5); }
.pk-tk-grid dd { margin: 2px 0 0; font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pk-tk-total { font-size: 17px !important; font-weight: 800 !important; }
.pk-plus { position: absolute; left: 0; top: -6px; padding: 2px 7px; border-radius: 7px; background: #16a36a; color: #fff; font: 800 11.5px var(--mono); pointer-events: none; animation: pkFloat 1.1s var(--pk-ease) forwards; }
.pk-perf { position: relative; height: 0; margin: 16px -16px 14px; border-top: 2px dashed rgba(21, 25, 34, 0.16); }
.pk-perf::before, .pk-perf::after { content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--pk-bg); }
.pk-perf::before { left: -11px; }
.pk-perf::after { right: -11px; }
.pk-tk-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; }
.pk-tk-actions .pk-btn { padding: 0 12px; }
.pk-btn-quiet { min-height: 44px; padding: 0 10px; font-size: 13px; border-radius: 12px; background: transparent; color: var(--pk-text) !important; box-shadow: inset 0 0 0 1px var(--pk-line2); }
.pk-btn-quiet svg { width: 15px; height: 15px; }
.pk-tk-actions .pk-btn:only-child { grid-column: 1 / -1; }
.pk-tk-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 20px; }
.pk-tk-stats > div { min-width: 0; padding: 12px; border-radius: 16px; background: var(--pk-s1); border: 1px solid var(--pk-line); }
.pk-tk-stats b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-tk-stats span { display: block; font-size: 11px; color: var(--pk-mute); }
.pk-tk-stats .pk-tk-fav { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; background: linear-gradient(135deg, rgba(255, 181, 71, 0.1), var(--pk-s1) 70%); border-color: rgba(255, 181, 71, 0.22); }
.pk-tk-stats .pk-tk-fav b { font-size: 15px; }
.pk-pasts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.pk-pasts li { min-width: 0; }
.pk-past { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--pk-s1); border: 1px solid var(--pk-line); text-align: left; transition: border-color 0.2s, background 0.2s, transform 0.15s var(--pk-ease); }
.pk-past:active { transform: scale(0.98); }
.pk-past-art { width: 58px; height: 30px; flex-shrink: 0; }
.pk-past-art svg { width: 100%; height: 100%; }
.pk-past b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-past small { display: block; font-size: 11.5px; color: var(--pk-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-past-side { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.pk-past-side b { font-variant-numeric: tabular-nums; }
.pk-st { display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: 10.5px !important; font-weight: 700; color: inherit; }
.pk-st-done { background: rgba(61, 220, 151, 0.13); color: var(--pk-go) !important; }
.pk-st-ended { background: rgba(255, 181, 71, 0.14); color: var(--pk-amber) !important; }
.pk-st-cancelled { background: rgba(255, 255, 255, 0.07); color: var(--pk-mute) !important; }

/* ---------- receipt ---------- */
.pk-receipt-wrap { display: flex; flex-direction: column; gap: 12px; padding: 0 18px 22px; }
.pk-receipt-wrap .pk-sheet-head { padding-bottom: 0; }
.pk-done { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(61, 220, 151, 0.09); border: 1px solid rgba(61, 220, 151, 0.3); font-size: 13px; color: var(--pk-soft); line-height: 1.4; }
.pk-done b { color: #fff; }
.pk-done-ico { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; background: #3ddc97; color: #062b1a; display: inline-flex; align-items: center; justify-content: center; }
.pk-done-ico svg { width: 20px; height: 20px; stroke-width: 3; }
.pk-slot-mouth { position: relative; z-index: 2; height: 12px; margin: 4px 6px -6px; border-radius: 999px; background: #05070b; box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.06); }
.pk-receipt-clip { overflow: hidden; padding: 0 8px 14px; margin: 0 -8px; }
.pk-receipt { position: relative; padding: 20px 18px 18px; background: var(--pk-paper); color: var(--pk-print); border-radius: 3px 3px 0 0; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4); }
.pk-receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 10px; background: linear-gradient(135deg, var(--pk-paper) 50%, transparent 50%) 0 0 / 12px 10px repeat-x, linear-gradient(225deg, var(--pk-paper) 50%, transparent 50%) 0 0 / 12px 10px repeat-x; }
.pk-receipt header { display: flex; align-items: center; gap: 10px; }
.pk-receipt header .pk-logo { width: 30px; height: 30px; filter: none; }
.pk-receipt header > div { flex: 1; min-width: 0; }
.pk-receipt header b { display: block; font-size: 14px; font-weight: 800; }
.pk-receipt header small { font: 600 11px var(--mono); color: rgba(21, 25, 34, 0.55); }
.pk-receipt .pk-st-done { background: rgba(22, 163, 106, 0.14); color: #0c7a4b !important; }
.pk-receipt .pk-st-ended { background: rgba(224, 138, 0, 0.14); color: #a36200 !important; }
.pk-receipt .pk-st-cancelled { background: rgba(21, 25, 34, 0.08); color: rgba(21, 25, 34, 0.6) !important; }
.pk-receipt h3 { margin-top: 14px; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.pk-r-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 4px; font-size: 12.5px; color: rgba(21, 25, 34, 0.6); }
.pk-r-lines { margin: 14px 0 12px; font-family: var(--mono); }
.pk-r-lines div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 12.5px; }
.pk-r-lines dt { color: rgba(21, 25, 34, 0.62); }
.pk-r-lines dd { margin: 0; font-weight: 600; text-align: right; }
.pk-r-lines hr { border: 0; border-top: 1.5px dashed rgba(21, 25, 34, 0.2); margin: 8px 0; }
.pk-r-refund dd { color: #0c7a4b; }
.pk-r-total { margin-top: 4px; font-size: 16px !important; font-weight: 800; }
.pk-r-total dt { color: var(--pk-print) !important; }
.pk-r-total dd { font-weight: 800 !important; }
.pk-barcode { display: block; width: 100%; height: 40px; }
.pk-r-foot { display: block; margin-top: 8px; text-align: center; font: 600 10.5px var(--mono); color: rgba(21, 25, 34, 0.5); letter-spacing: 0.06em; }

/* ---------- cars ---------- */
.pk-car-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 14px; }
.pk-carcard { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 22px; background: var(--pk-s1); border: 1px solid var(--pk-line); overflow: hidden; transition: border-color 0.2s, transform 0.25s var(--pk-ease), box-shadow 0.25s; }
.pk-carcard.pk-default { border-color: rgba(255, 181, 71, 0.22); }
.pk-carcard.pk-flash::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 2px var(--pk-amber), 0 0 30px rgba(255, 181, 71, 0.3); animation: pkFadeOut 1.6s ease-out forwards; }
.pk-carcard-art { position: relative; height: 112px; display: flex; align-items: flex-end; justify-content: center; padding: 14px 20px 8px; background: var(--pk-bg); border-bottom: 1px solid var(--pk-line); }
.pk-carcard-art::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 12px; height: 1px; background: rgba(255, 255, 255, 0.06); }
.pk-carcard-art .pk-carside { width: 70%; max-width: 220px; height: auto; position: relative; z-index: 1; transition: transform 0.4s var(--pk-ease); }
.pk-default-tag { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; background: rgba(255, 181, 71, 0.16); color: var(--pk-amber); font-size: 11px; font-weight: 800; }
.pk-default-tag svg { width: 12px; height: 12px; fill: currentColor; }
.pk-carcard-body { display: flex; align-items: center; gap: 12px; padding: 12px 14px 2px; }
.pk-carcard-body b { display: block; font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-carcard-body small { display: block; font-size: 12px; color: var(--pk-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-carcard-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px 14px; min-height: 64px; }
.pk-car-new { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; min-height: 72px; padding: 12px 14px; border: 1px dashed var(--pk-line2); background: transparent; text-align: left; color: var(--pk-mute) !important; }
.pk-car-new b { display: block; font-size: 14.5px; font-weight: 700; color: var(--pk-text); }
.pk-car-new .pk-grow > span { display: block; font-size: 12px; color: var(--pk-mute); margin-top: 1px; }
.pk-car-new > svg { width: 16px; height: 16px; }
.pk-new-plus { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: var(--pk-s2); color: var(--pk-soft); display: inline-flex; align-items: center; justify-content: center; transition: transform 0.3s var(--pk-ease), color 0.2s; }
.pk-new-plus svg { width: 20px; height: 20px; }

/* add-car form */
.pk-form { padding: 0 18px 22px; }
.pk-form-stage { position: relative; height: 112px; display: flex; align-items: flex-end; justify-content: center; padding: 0 20px 12px; border-radius: var(--pk-r); border: 1px solid var(--pk-line); background: var(--pk-bg); }
.pk-form-stage::after { content: ""; position: absolute; left: 14%; right: 14%; bottom: 14px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.pk-form-car { position: relative; z-index: 1; display: block; width: 62%; max-width: 230px; }
.pk-form-car svg { width: 100%; height: auto; }
.pk-form-plate { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0 4px; min-width: 0; }
.pk-form-plate b { font-size: 14px; color: var(--pk-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pk-field { display: block; }
.pk-input { width: 100%; height: 50px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--pk-line2); background: var(--pk-s1); color: var(--pk-text); font-size: 16px; font-weight: 600; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.pk-input::placeholder { color: rgba(237, 240, 245, 0.3); }
.pk-input:focus { border-color: var(--pk-amber); box-shadow: 0 0 0 4px rgba(255, 181, 71, 0.14); }
.pk-input-plate { font: 700 18px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.pk-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-swatch { width: 36px; height: 36px; border: 0; border-radius: 50%; padding: 0; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 0 2px var(--pk-bg), 0 0 0 3px transparent; transition: transform 0.2s var(--pk-ease), box-shadow 0.2s; }
.pk-swatch.on { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 0 3px var(--pk-bg), 0 0 0 4.5px rgba(255, 255, 255, 0.85); }
.pk-swatch:active { transform: scale(0.92); }
.pk-toggle { width: 100%; display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; min-height: 62px; border-radius: 16px; border: 1px solid var(--pk-line2); background: var(--pk-s1); text-align: left; transition: border-color 0.2s, background 0.2s; }
.pk-toggle b { display: block; font-size: 14px; }
.pk-toggle small { display: block; font-size: 12px; color: var(--pk-mute); }
.pk-toggle-ico { width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; background: rgba(57, 208, 255, 0.12); color: var(--pk-ev); display: inline-flex; align-items: center; justify-content: center; }
.pk-toggle-ico svg { width: 18px; height: 18px; }
.pk-switch { position: relative; width: 46px; height: 28px; flex-shrink: 0; border-radius: 999px; background: var(--pk-s3); transition: background 0.2s; }
.pk-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4); transition: transform 0.3s var(--pk-spring); }
.pk-toggle:active { transform: scale(0.99); }
.pk-toggle.on { border-color: rgba(57, 208, 255, 0.45); background: rgba(57, 208, 255, 0.06); }
.pk-toggle.on .pk-switch { background: var(--pk-ev); }
.pk-toggle.on .pk-switch::after { transform: translateX(18px); }
.pk-form-err { margin: 12px 2px 0; font-size: 13px; color: #ff8a98; font-weight: 600; }
.pk-form-err:empty { display: none; }
.pk-form > .pk-btn { margin-top: 18px; }

/* ---------- sheet ---------- */
.pk-host { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.pk-host.in-device { position: absolute; }
.pk-backdrop { position: absolute; inset: 0; background: rgba(3, 5, 9, 0.62); backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.3s; }
.pk-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; max-height: 92%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; background: var(--pk-bg); border-radius: 28px 28px 0 0; border-top: 1px solid var(--pk-line2); transform: translateY(100%); transition: transform 0.42s cubic-bezier(0.2, 0.9, 0.25, 1); box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.55); }
.pk-sheet::-webkit-scrollbar { display: none; }
.pk-host.open { pointer-events: auto; }
.pk-host.open .pk-backdrop { opacity: 1; }
.pk-host.open .pk-sheet { transform: none; }
.pk-sheet-grab { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: center; padding: 10px 0 12px; touch-action: none; cursor: grab; }
.pk-sheet-grab i { width: 42px; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.22); }
.pk-host.in-device .pk-sheet-body { padding-bottom: 12px; }
.pk-host[data-view="book"] .pk-sheet { height: 92%; }
.pk-host[data-view="book"] .pk-sheet-body, .pk-host[data-view="book"] .pk-book { min-height: 100%; }
@media (min-width: 700px) {
  .pk-host:not(.in-device) .pk-sheet { top: 50%; bottom: auto; left: 50%; right: auto; width: 500px; max-height: 88vh; height: auto; border-radius: 28px; border: 1px solid var(--pk-line2); transform: translate(-50%, -44%) scale(0.97); opacity: 0; transition: transform 0.3s var(--pk-ease), opacity 0.2s; }
  .pk-host.open:not(.in-device) .pk-sheet { transform: translate(-50%, -50%); opacity: 1; }
  .pk-host:not(.in-device) .pk-sheet-grab { display: none; }
}

/* ---------- hover (pointer devices only) ---------- */
@media (hover: hover) {
  .pk-btn:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
  .pk-btn-soft:hover:not(:disabled) { background: var(--pk-s3); }
  .pk-btn-ghost-ink:hover:not(:disabled) { background: rgba(21, 25, 34, 0.06); }
  .pk-btn-quiet:hover:not(:disabled):not(.armed) { background: var(--pk-s2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
  .pk-danger:hover:not(:disabled) { background: rgba(255, 84, 104, 0.18); }
  .pk-icon-btn:hover, .pk-round:hover, .pk-dial-btn:hover { background: var(--pk-s3); color: #fff !important; }
  .pk-tab:hover:not(.on) { color: var(--pk-text) !important; background: rgba(255, 255, 255, 0.04); }
  .pk-chip:hover:not(.on) { border-color: rgba(255, 255, 255, 0.24); color: var(--pk-text) !important; }
  .pk-seg button:hover:not(.on):not(:disabled) { color: var(--pk-text) !important; background: rgba(255, 255, 255, 0.04); }
  .pk-gcard:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.16); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35); }
  .pk-gcard.on:hover { border-color: rgba(255, 181, 71, 0.7); }
  .pk-pin:hover .pk-pin-body { border-color: rgba(255, 255, 255, 0.45); }
  .pk-pin.on:hover .pk-pin-body { border-color: var(--pk-amber); }
  .pk-bay-free:hover .pk-bay-bg { fill: rgba(61, 220, 151, 0.2); }
  .pk-bay-free.pk-k-ev:hover .pk-bay-bg { fill: rgba(57, 208, 255, 0.24); }
  .pk-bay-free.pk-k-acc:hover .pk-bay-bg { fill: rgba(127, 163, 255, 0.28); }
  .pk-slot:hover:not(.on):not(:disabled), .pk-preset:hover:not(.on):not(:disabled), .pk-vpick:hover:not(.on) { border-color: rgba(255, 255, 255, 0.24); }
  .pk-past:hover { border-color: rgba(255, 255, 255, 0.16); background: var(--pk-s2); }
  .pk-carcard:hover { border-color: rgba(255, 255, 255, 0.16); }
  .pk-carcard:hover .pk-carside { transform: translateX(4px); }
  .pk-car-new:hover { border-color: rgba(255, 255, 255, 0.2); }
  .pk-car-new:hover .pk-new-plus { color: var(--pk-text); transform: rotate(90deg); }
  .pk-toggle:hover { border-color: rgba(255, 255, 255, 0.24); }
  .pk-session:hover { border-color: rgba(255, 181, 71, 0.6); }
  .pk-link:hover { text-decoration-color: currentColor; }
  .pk-slide:not(.pk-off) .pk-slide-knob:hover { filter: brightness(1.06); }
}

/* ---------- motion ---------- */
@keyframes pkFade { from { opacity: 0; transform: translateY(8px); } }
@keyframes pkPush { from { opacity: 0; transform: translateX(30px); } }
@keyframes pkPop { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
@keyframes pkRise { from { opacity: 0; transform: translateY(8px); } }
@keyframes pkPinDrop { 0% { opacity: 0; transform: translateY(-26px) scale(0.6); } 60% { opacity: 1; transform: translateY(3px) scale(1.04); } 100% { opacity: 1; transform: none; } }
@keyframes pkPing { 0% { opacity: 0.8; transform: scale(0.3); } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes pkBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes pkDraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes pkGlowPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes pkBrake { 0%, 100% { opacity: 1; } 30%, 60% { opacity: 1; fill: #ff1f3d; } 45% { opacity: 0.4; } }
@keyframes pkSettle { 0% { transform: translateY(0); } 40% { transform: translateY(-1.5px); } 100% { transform: none; } }
@keyframes pkRipple { from { opacity: 0.9; transform: scale(0.6); } to { opacity: 0; transform: scale(1.6); } }
@keyframes pkPrint { 0% { opacity: 0; transform: translateY(-46px) scale(0.96); } 55% { opacity: 1; transform: translateY(6px) scale(1.005); } 75% { transform: translateY(-2px); } 100% { opacity: 1; transform: none; } }
@keyframes pkReceipt { from { transform: translateY(-104%); } to { transform: none; } }
@keyframes pkFloat { 0% { opacity: 0; transform: translateY(6px) scale(0.9); } 25% { opacity: 1; transform: translateY(-6px) scale(1); } 100% { opacity: 0; transform: translateY(-30px); } }
@keyframes pkSweep { to { transform: translateX(100%); } }
@keyframes pkChev { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes pkDriveS { from { transform: translateY(-40px); } to { transform: translateY(1370px); } }
@keyframes pkDriveN { from { transform: translateY(1370px); } to { transform: translateY(-40px); } }
@keyframes pkDriveE { from { transform: translateX(-40px); } to { transform: translateX(1370px); } }
@keyframes pkDriveW { from { transform: translateX(1370px); } to { transform: translateX(-40px); } }
@keyframes pkShake { 0%, 100% { transform: none; } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
@keyframes pkSpin { to { transform: rotate(360deg); } }
@keyframes pkArm { 0%, 100% { box-shadow: 0 0 0 0 rgba(224, 54, 75, 0.45); } 50% { box-shadow: 0 0 0 6px rgba(224, 54, 75, 0); } }
@keyframes pkFadeOut { 0%, 40% { opacity: 1; } 100% { opacity: 0; } }
@keyframes pkPopIn { 0% { opacity: 0; transform: scale(0.4); } 70% { transform: scale(1.12); } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .pk-page.pk-enter.pk-fade { animation: pkFade 0.36s var(--pk-ease) both; }
  .pk-page.pk-enter.pk-push { animation: pkPush 0.4s var(--pk-ease) both; }
  .pk-enter .pk-gcard, .pk-enter .pk-carcard, .pk-enter .pk-pasts li, .pk-enter .pk-ticket { animation: pkPop 0.5s var(--pk-ease) both; animation-delay: calc(90ms + var(--i, 0) * 55ms); }
  .pk-enter .pk-pin-in { animation: pkPinDrop 0.6s var(--pk-ease) both; animation-delay: calc(160ms + var(--i, 0) * 80ms); }
  .pk-enter .pk-page-head, .pk-enter .pk-list-head, .pk-enter .pk-hero-copy, .pk-enter .pk-stats, .pk-enter .pk-levels-head, .pk-enter .pk-levels, .pk-enter .pk-plan, .pk-enter .pk-more, .pk-enter .pk-empty, .pk-enter .pk-h3 { animation: pkFade 0.45s var(--pk-ease) both; }
  .pk-enter .pk-stats { animation-delay: 60ms; }
  .pk-enter .pk-levels-head, .pk-enter .pk-levels { animation-delay: 110ms; }
  .pk-enter .pk-plan { animation-delay: 150ms; }
  .pk-enter .pk-more { animation-delay: 200ms; }
  .pk-plan.pk-enter, [data-plan].pk-enter .pk-plan { animation: pkFade 0.35s var(--pk-ease) both; }
  .pk-ticket.pk-print { animation: pkPrint 0.95s var(--pk-ease) both !important; }
  .pk-fresh .pk-receipt { animation: pkReceipt 1.2s cubic-bezier(0.3, 0.7, 0.3, 1) 0.25s both; }
  .pk-done-ico { animation: pkPopIn 0.5s var(--pk-ease) both; }
  .pk-you::before { animation: pkPing 2.4s ease-out infinite; }
  .pk-live-dot, .pk-tk-state i { animation: pkBlink 1.8s ease-in-out infinite; }
  .pk-route-line { animation: pkDraw 0.75s ease-out both; }
  .pk-route-end { animation: pkPopIn 0.4s 0.6s var(--pk-ease) both; transform-box: fill-box; transform-origin: center; }
  .pk-bay-ring { animation: pkGlowPulse 1.6s ease-in-out infinite; }
  .pk-bay-hint .pk-bay-bg, .pk-bay-lost .pk-bay-bg { animation: pkGlowPulse 1s ease-in-out infinite; }
  .pk-parked .pk-tail { animation: pkBrake 0.9s ease-out; }
  .pk-parked .pk-cart { animation: pkSettle 0.45s ease-out; transform-box: fill-box; }
  .pk-slide-chev i { animation: pkChev 1.4s ease-in-out infinite; }
  .pk-slide-chev i:nth-child(2) { animation-delay: 0.18s; }
  .pk-slide-chev i:nth-child(3) { animation-delay: 0.36s; }
  .pk-slide-spin { animation: pkSpin 0.8s linear infinite; }
  .pk-conflict { animation: pkShake 0.5s ease-out; }
  .pk-conflict .pk-cf-mine { animation: pkFade 0.6s 0.2s both; }
  .pk-mcar-1 { animation: pkDriveS 19s linear infinite; }
  .pk-mcar-2 { animation: pkDriveN 23s linear -9s infinite; }
  .pk-mcar-3 { animation: pkDriveW 21s linear -4s infinite; }
  .pk-mcar-4 { animation: pkDriveE 17s linear -12s infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .pk *, .pk-host * { transition-duration: 0.01ms !important; animation: none !important; }
  .pk-mcar { display: none; }
  .pk-route-line { stroke-dasharray: none; }
}

/* ---------- tablet + desktop: map + floor plan on the left, list / booking panel on the right ---------- */
@container site (min-width: 640px) {
  .pk-tabbar { display: none; }
  .pk-top { position: relative; z-index: 10; flex: none; display: flex; align-items: center; gap: 18px; height: 64px; padding: 0 16px; border-bottom: 1px solid var(--pk-line); background: var(--pk-ink); }
  .pk-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .pk-brand .pk-logo { width: 36px; height: 36px; }
  .pk-brand b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -0.03em; }
  .pk-brand small { display: block; font-size: 11px; color: var(--pk-mute); white-space: nowrap; }
  .pk-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 15px; background: var(--pk-s1); border: 1px solid var(--pk-line); }
  .pk-tabs .pk-tab { flex-direction: row; min-height: 40px; padding: 0 14px; gap: 8px; font-size: 13.5px; border-radius: 11px; }
  .pk-tabs .pk-tab svg { width: 17px; height: 17px; }
  .pk-tabs .pk-tab.on { background: var(--pk-s3); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
  .pk-tabs .pk-tab-badge { position: static; box-shadow: none; }
  .pk-top-session { margin-left: auto; min-width: 0; }
  .pk-split { display: grid; grid-template-columns: minmax(0, 1fr) 356px; }
  .pk-split > * { min-width: 0; min-height: 0; }
  .pk-explore.pk-split .pk-mapwrap { position: relative; inset: auto; }
  .pk-map-tools { top: 14px; right: 14px; }
  .pk-session-slot { display: none; }
  .pk-list-side { position: relative; border-left: 1px solid var(--pk-line); background: var(--pk-bg); }
  .pk-list-side .pk-list-head { padding: 16px 16px 10px; }
  .pk-list-side .pk-search { margin-top: 14px; }
  .pk-list-side .pk-chips { flex-wrap: wrap; margin: 12px 0 0; padding: 0; }
  .pk-list-side .pk-chip { height: 38px; }
  .pk-btn-sm { min-height: 40px; }
  .pk-seg-sm button { min-height: 38px; }
  .pk-preset { height: 40px; }
  .pk-list-side .pk-list-body { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #2a3242 transparent; }
  .pk-split-detail { grid-template-columns: minmax(0, 1fr) 356px; }
  .pk-list-side .pk-list-title h2 { font-size: 18px; white-space: nowrap; }
  .pk-left { position: relative; }
  .pk-right { position: relative; border-left: 1px solid var(--pk-line); background: linear-gradient(180deg, #121722, var(--pk-bg) 240px); }
  .pk-book-side .pk-book { min-height: 100%; padding: 6px 18px 0; }
  .pk-book-side .pk-slots { margin: 10px -18px 0; }
  .pk-hero { height: 236px; }
  .pk-detail-body { padding: 4px 20px 28px; }
  .pk-plan-frame { padding: 14px; }
  .pk-legend { grid-template-columns: repeat(6, max-content); gap: 7px 16px; }
  .pk-doc { padding: 22px 24px 32px; }
  .pk-tk-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .pk-tk-layout > section > .pk-h3:first-child { margin-top: 10px; }
  .pk-car-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pk-page-head h1 { font-size: 32px; }
}
@container site (min-width: 900px) {
  .pk-split { grid-template-columns: minmax(0, 1fr) 380px; }
  .pk-split-detail { grid-template-columns: minmax(0, 1fr) 380px; }
  .pk-car-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pk-hero { height: 260px; }
}
