@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/Vazirmatn.woff2") format("woff2-variations"), url("/fonts/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #faf4f4;
  --bg-deep: #f0dfe1;
  --surface: #fffafa;
  --surface-2: #f8edef;
  --ink: #1a2230;
  --ink-2: #3a4352;
  --muted: #7d7074;
  --line: rgba(26, 34, 48, 0.08);
  --line-strong: rgba(26, 34, 48, 0.14);
  --accent: #b9152b;
  --accent-2: #d52d42;
  --accent-deep: #921126;
  --accent-soft: #f8dfe3;
  --navy: #1c2430;
  --good: #2f7d57;
  --good-soft: #dff0e6;
  --warn: #a8722a;
  --warn-soft: #f7ead2;
  --bad: #b23b3b;
  --bad-soft: #f8e0dd;
  --grad: linear-gradient(135deg, #b9152b 0%, #d52d42 100%);
  --grad-night: linear-gradient(150deg, #253042 0%, #1a2230 100%);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 30px;
  --shadow-sm: 0 1px 2px rgba(26, 34, 48, 0.06), 0 2px 8px rgba(26, 34, 48, 0.04);
  --shadow-md: 0 2px 6px rgba(26, 34, 48, 0.05), 0 12px 32px -10px rgba(26, 34, 48, 0.16);
  --shadow-lg: 0 24px 60px -18px rgba(26, 34, 48, 0.32);
  --shadow-accent: 0 12px 28px -10px rgba(185, 21, 43, 0.6);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --tabbar-h: 74px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  font-feature-settings: "ss01";
  line-height: 1.6;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(1000px 520px at 110% -10%, rgba(213, 45, 66, 0.22), transparent 60%),
    radial-gradient(700px 480px at -20% 110%, rgba(28, 36, 48, 0.08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

h1, h2, h3, p { margin: 0; }

button, input, textarea { font: inherit; color: inherit; }

a { color: inherit; }

.ic {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ic.sm { width: 18px; height: 18px; }
.ic.lg { width: 28px; height: 28px; }
.ic.xl { width: 40px; height: 40px; stroke-width: 1.6; }

.hidden, [hidden] { display: none !important; }

.ltr { direction: ltr; unicode-bidi: isolate; }

.app {
  position: relative;
  width: min(480px, 100%);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.app.with-tabs { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); }

@media (min-width: 560px) {
  .app {
    min-height: calc(100vh - 48px);
    margin: 24px auto;
    border-radius: 36px;
    background: rgba(255, 250, 250, 0.35);
    box-shadow: 0 0 0 1px var(--line), var(--shadow-lg);
    overflow: hidden;
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(250, 244, 244, 0.78);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.topbar.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(26, 34, 48, 0.35); }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad);
  color: white;
  box-shadow: var(--shadow-accent);
  flex: 0 0 auto;
}

.brand-mark .ic { width: 22px; height: 22px; stroke-width: 2; }

.brand-text { min-width: 0; }

.brand-text small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-deep);
  line-height: 1.3;
}

.brand-text strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
  flex: 0 0 auto;
}

.icon-btn:hover { background: white; }
.icon-btn:active { transform: scale(0.92); }

.screen {
  flex: 1;
  padding: 8px 20px 24px;
}

.panel { animation: panel-in 0.42s var(--ease) both; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.page-title {
  margin: 10px 0 4px;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.page-sub {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 15px;
}

.page-sub:empty { display: none; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 2px 12px;
}

.section-head h2 {
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.count-chip {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 800;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  padding: 4px 2px;
  color: var(--accent-deep);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.link-btn .ic { width: 16px; height: 16px; }

.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 18px;
}

.card + .card { margin-top: 12px; }
.card.spaced { margin-top: 16px; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 22px;
  border: 0;
  border-radius: 18px;
  background: var(--grad);
  color: white;
  font-size: 16px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-accent);
  transition: transform 0.22s var(--spring), box-shadow 0.22s var(--ease), opacity 0.2s var(--ease), filter 0.2s var(--ease);
  user-select: none;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 55%);
  pointer-events: none;
}

.btn:hover { filter: brightness(1.04); box-shadow: 0 16px 34px -12px rgba(185, 21, 43, 0.7); }
.btn:active { transform: scale(0.97); }
.btn:focus-visible, .icon-btn:focus-visible, .tab:focus-visible, .frame:focus-visible { outline: 3px solid rgba(185, 21, 43, 0.35); outline-offset: 2px; }
.btn.block { display: flex; width: 100%; }
.btn.sm { min-height: 42px; padding: 0 16px; border-radius: 14px; font-size: 14px; }

.btn:disabled, .btn.disabled {
  cursor: default;
  background: #d9cfc3;
  color: rgba(26, 34, 48, 0.45);
  box-shadow: none;
  transform: none;
  filter: none;
}

.btn.secondary {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-sm);
}

.btn.secondary:hover { background: white; }
.btn.secondary::after, .btn.ghost::after, .btn.danger::after { display: none; }

.btn.ghost {
  background: transparent;
  color: var(--ink-2);
  box-shadow: none;
}

.btn.ghost:hover { background: rgba(26, 34, 48, 0.05); }

.btn.dark { background: var(--grad-night); box-shadow: 0 12px 28px -12px rgba(26, 34, 48, 0.6); }

.btn.danger {
  background: var(--bad-soft);
  color: var(--bad);
  box-shadow: none;
}

.btn.danger:hover { background: #f4d2ce; }

.btn.busy { color: transparent; pointer-events: none; }
.btn.busy .ic { opacity: 0; }

.btn.busy::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

.btn.secondary.busy::before, .btn.danger.busy::before { border-color: rgba(26, 34, 48, 0.15); border-top-color: var(--accent); }

@keyframes spin { to { transform: rotate(360deg); } }

.field { display: grid; gap: 8px; }

.field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}

.input {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 1.5px solid var(--line-strong);
  border-radius: 16px;
  background: white;
  font-size: 17px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.input::placeholder { color: #b3aaa0; font-weight: 500; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(185, 21, 43, 0.14); }

.hero {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--r-xl);
  background: var(--grad);
  color: white;
  box-shadow: 0 22px 44px -18px rgba(185, 21, 43, 0.75);
  isolation: isolate;
}

.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  z-index: -1;
}

.hero::before {
  width: 220px;
  height: 220px;
  left: -60px;
  top: -80px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 70%);
}

.hero::after {
  width: 180px;
  height: 180px;
  right: -40px;
  bottom: -90px;
  background: radial-gradient(circle, rgba(28, 36, 48, 0.25), transparent 70%);
}

.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 700;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.hero-eyebrow .ic { width: 15px; height: 15px; }

.hero h2 {
  margin-top: 16px;
  font-size: 15px;
  font-weight: 600;
  opacity: 0.88;
}

.hero-number {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 2px 0 18px;
}

.hero-number strong {
  font-size: 56px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero-number span { font-size: 16px; font-weight: 600; opacity: 0.9; }

.hero .btn {
  background: white;
  color: var(--accent-deep);
  box-shadow: 0 10px 24px -10px rgba(26, 34, 48, 0.45);
}

.hero .btn.disabled { background: rgba(255, 255, 255, 0.3); color: rgba(255, 255, 255, 0.85); box-shadow: none; }

.hero-art {
  position: absolute;
  left: 18px;
  top: 58px;
  width: 92px;
  height: 92px;
  z-index: -1;
  opacity: 0.95;
}

.polaroid {
  position: absolute;
  width: 58px;
  height: 68px;
  padding: 5px 5px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 20px -8px rgba(26, 34, 48, 0.45);
}

.polaroid i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(160deg, #f3a9b3, #b9152b 70%, #921126);
}

.polaroid:nth-child(1) { left: 0; top: 10px; transform: rotate(-12deg); }
.polaroid:nth-child(2) { left: 30px; top: 0; transform: rotate(8deg); animation: float 5s ease-in-out infinite; }
.polaroid:nth-child(2) i { background: linear-gradient(160deg, #a9c3d6, #3a4f6a 75%); }

@keyframes float {
  0%, 100% { transform: rotate(8deg) translateY(0); }
  50% { transform: rotate(5deg) translateY(-5px); }
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.stat {
  padding: 14px 12px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.stat-icon .ic { width: 18px; height: 18px; }
.stat-icon.good { background: var(--good-soft); color: var(--good); }
.stat-icon.night { background: #e3e6ec; color: var(--navy); }

.stat strong { display: block; font-size: 22px; font-weight: 850; line-height: 1.2; }
.stat > span:last-child { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }

.live-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--grad-night);
  color: white;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s var(--ease);
}

.live-card:active { transform: scale(0.98); }

.live-dot {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  flex: 0 0 auto;
}

.live-dot::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7be0a8;
  box-shadow: 0 0 0 0 rgba(123, 224, 168, 0.6);
  animation: ping 1.6s var(--ease) infinite;
}

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(123, 224, 168, 0.6); }
  100% { box-shadow: 0 0 0 10px rgba(123, 224, 168, 0); }
}

.live-card div { flex: 1; min-width: 0; }
.live-card strong { display: block; font-size: 15px; font-weight: 750; }
.live-card div span { display: block; font-size: 13px; opacity: 0.7; }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.photo {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow-sm);
  animation: pop-in 0.45s var(--ease) both;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.4s var(--ease), transform 0.6s var(--ease);
}

.photo img.loaded { opacity: 1; }
.photo:hover img { transform: scale(1.03); }

.photo figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 12px 10px;
  background: linear-gradient(transparent, rgba(16, 20, 28, 0.72));
  color: white;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.photo figcaption small { display: block; opacity: 0.75; font-weight: 500; }

.photo .remove {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 12px;
  background: rgba(16, 20, 28, 0.45);
  color: white;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.photo .remove:hover { background: var(--bad); }
.photo .remove:active { transform: scale(0.9); }
.photo .remove .ic { width: 17px; height: 17px; }
.photo .remove:disabled { opacity: 0.5; }

.photo.removing { animation: pop-out 0.3s var(--ease) forwards; }

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: none; }
}

@keyframes pop-out {
  to { opacity: 0; transform: scale(0.9); }
}

.shimmer {
  background: linear-gradient(100deg, var(--surface-2) 30%, #fff8fa 50%, var(--surface-2) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

.ticket {
  position: relative;
  display: flex;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  animation: pop-in 0.45s var(--ease) both;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.ticket + .ticket { margin-top: 14px; }

.ticket-main { flex: 1; min-width: 0; padding: 18px 18px 18px 14px; }

.ticket-stub {
  position: relative;
  width: 96px;
  flex: 0 0 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 8px;
  border-right: 2px dashed var(--line-strong);
  text-align: center;
}

.ticket-stub::before, .ticket-stub::after {
  content: "";
  position: absolute;
  right: -11px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg);
}

.ticket-stub::before { top: -10px; }
.ticket-stub::after { bottom: -10px; }

.ticket-stub small { font-size: 11px; color: var(--muted); font-weight: 600; }

.ticket-stub strong {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--accent-deep);
}

.ticket-stub span { font-size: 11px; color: var(--muted); }

.ticket-head { display: flex; align-items: center; gap: 10px; }

.ticket-logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 900;
  font-size: 17px;
  flex: 0 0 auto;
}

.ticket-head div { min-width: 0; }
.ticket-head strong { display: block; font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ticket-code {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.dots { display: flex; flex-wrap: wrap; gap: 5px; margin: 14px 0; }

.dots i {
  width: 100%;
  max-width: 26px;
  flex: 1 1 0;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.dots i.left { background: var(--line-strong); }

.ticket-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ticket-foot .meta { font-size: 13px; color: var(--muted); font-weight: 600; }

.ticket.focus { box-shadow: 0 0 0 2px var(--accent), var(--shadow-md); }
.ticket.focus .ticket-stub::before, .ticket.focus .ticket-stub::after { background: var(--bg); }

.ticket.spent { opacity: 0.62; box-shadow: var(--shadow-sm); }
.ticket.spent .ticket-stub strong { color: var(--muted); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  background: var(--surface-2);
  color: var(--ink-2);
  white-space: nowrap;
}

.pill .ic { width: 14px; height: 14px; stroke-width: 2.2; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.accent { background: var(--accent-soft); color: var(--accent-deep); }

.promo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--r-lg);
  border: 1.5px dashed rgba(185, 21, 43, 0.4);
  background: rgba(248, 223, 227, 0.4);
}

.promo-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--grad);
  color: white;
  flex: 0 0 auto;
}

.promo div { flex: 1; min-width: 0; }
.promo strong { display: block; font-size: 15px; font-weight: 800; }
.promo div span { display: block; font-size: 13px; color: var(--muted); }

.print {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  animation: pop-in 0.45s var(--ease) both;
}

.print + .print { margin-top: 12px; }

.print-thumb {
  width: 72px;
  height: 88px;
  flex: 0 0 72px;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
}

.print-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.print-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.print-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.print-top strong { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.print-meta { font-size: 12px; color: var(--muted); font-weight: 600; }

.stepper { display: flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 6px; }

.stepper i {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: var(--line-strong);
  position: relative;
  overflow: hidden;
}

.stepper i.done { background: var(--accent); }

.stepper i.now { background: var(--accent-soft); }

.stepper i.now::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 50%;
  border-radius: inherit;
  background: var(--accent);
  animation: progress 1.4s var(--ease) infinite;
}

@keyframes progress {
  from { transform: translateX(110%); }
  to { transform: translateX(-210%); }
}

.step-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); font-weight: 600; }

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: rgba(26, 34, 48, 0.06);
}

.segmented button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.segmented button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 30px 22px;
  border-radius: var(--r-lg);
  background: rgba(255, 250, 250, 0.6);
  border: 1.5px dashed var(--line-strong);
  animation: pop-in 0.4s var(--ease) both;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 6px;
  border-radius: 20px;
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.empty strong { font-size: 15px; font-weight: 800; }
.empty > span:not(.empty-icon) { font-size: 13px; color: var(--muted); max-width: 260px; }
.empty .btn { margin-top: 12px; }

.profile-card {
  position: relative;
  overflow: hidden;
  padding: 26px 20px 20px;
  border-radius: var(--r-xl);
  background: var(--grad-night);
  color: white;
  text-align: center;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

.profile-card::before {
  content: "";
  position: absolute;
  top: -170px;
  left: 50%;
  width: 380px;
  height: 340px;
  margin-left: -190px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(213, 45, 66, 0.42), transparent);
}

.avatar {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto 12px;
  border-radius: 28px;
  background: var(--grad);
  color: white;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.08), var(--shadow-accent);
}

.avatar .ic { width: 40px; height: 40px; stroke-width: 1.6; }

.profile-card strong { display: block; font-size: 22px; font-weight: 850; letter-spacing: 0.04em; }
.profile-card > span { display: block; font-size: 13px; opacity: 0.65; }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-stats div + div { border-right: 1px solid rgba(255, 255, 255, 0.1); }
.profile-stats b { display: block; font-size: 20px; font-weight: 850; }
.profile-stats small { font-size: 12px; opacity: 0.6; }

.menu {
  margin-top: 16px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 62px;
  padding: 0 16px;
  border: 0;
  background: none;
  text-align: right;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.menu-item + .menu-item { border-top: 1px solid var(--line); }
.menu-item:hover { background: var(--surface-2); }

.menu-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink-2);
  flex: 0 0 auto;
}

.menu-icon .ic { width: 19px; height: 19px; }
.menu-item > span:not(.menu-icon) { flex: 1; font-size: 15px; font-weight: 700; }
.menu-item > .ic { color: var(--muted); width: 18px; height: 18px; }
.menu-item.danger { color: var(--bad); }
.menu-item.danger .menu-icon { background: var(--bad-soft); color: var(--bad); }

.station-form { display: flex; gap: 10px; margin-top: 14px; }
.station-form .input { flex: 1; min-width: 0; }
.station-form .btn { flex: 0 0 auto; width: 56px; padding: 0; }

.footnote { margin-top: 24px; text-align: center; font-size: 12px; color: var(--muted); }

.tabbar {
  position: fixed;
  z-index: 30;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, 100%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 10px calc(8px + var(--safe-b));
  background: rgba(255, 250, 250, 0.86);
  -webkit-backdrop-filter: saturate(170%) blur(22px);
  backdrop-filter: saturate(170%) blur(22px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px -18px rgba(26, 34, 48, 0.3);
}

@media (min-width: 560px) {
  .tabbar {
    bottom: 36px;
    width: min(440px, calc(100% - 40px));
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: var(--shadow-lg);
  }
}

.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 0 5px;
  border-radius: 18px;
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  transition: color 0.25s var(--ease);
}

.tab-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 32px;
  border-radius: 999px;
  transition: background 0.3s var(--ease), transform 0.3s var(--spring);
}

.tab-icon .ic { width: 23px; height: 23px; transition: stroke-width 0.2s var(--ease); }

.tab:active .tab-icon { transform: scale(0.88); }

.tab.on { color: var(--accent-deep); }
.tab.on .tab-icon { background: var(--accent-soft); }
.tab.on .tab-icon .ic { stroke-width: 2.2; animation: tab-bounce 0.45s var(--spring); }

@keyframes tab-bounce {
  0% { transform: scale(0.8); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.tab-badge {
  position: absolute;
  top: -3px;
  left: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
  animation: pop-in 0.3s var(--spring) both;
}

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 18px);
  width: min(440px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--navy);
  color: white;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, 24px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s var(--spring), opacity 0.3s var(--ease);
}

@media (min-width: 560px) { .toast { bottom: 132px; } }

.toast.on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.toast.bare { bottom: calc(var(--safe-b) + 24px); }
.toast-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; flex: 0 0 auto; background: rgba(255, 255, 255, 0.12); }
.toast-icon .ic { width: 18px; height: 18px; stroke-width: 2.2; }
.toast.good .toast-icon { background: #2f7d57; }
.toast.bad .toast-icon { background: #b23b3b; }

.flow-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 20px;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  transition: color 0.3s var(--ease);
}

.flow-step b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-strong);
  font-size: 13px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.flow-step b .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.flow-step.now { color: var(--ink); }
.flow-step.now b { background: var(--ink); color: white; box-shadow: none; }
.flow-step.done { color: var(--accent-deep); }
.flow-step.done b { background: var(--accent); color: white; box-shadow: none; }

.flow-line { flex: 1; height: 2px; border-radius: 2px; background: var(--line-strong); }

.allowance-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.block-title h2 { font-size: 16px; font-weight: 800; }
.block-title span { font-size: 12px; color: var(--muted); font-weight: 600; }

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 220px;
  padding: 24px;
  border-radius: 20px;
  border: 2px dashed rgba(185, 21, 43, 0.35);
  background:
    radial-gradient(circle at 50% 0%, rgba(213, 45, 66, 0.14), transparent 70%),
    var(--surface-2);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), background 0.25s var(--ease);
}

.dropzone:hover { border-color: var(--accent); }
.dropzone:active { transform: scale(0.985); }

.dropzone-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-bottom: 6px;
  border-radius: 22px;
  background: var(--grad);
  color: white;
  box-shadow: var(--shadow-accent);
  animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.dropzone strong { font-size: 16px; font-weight: 800; }
.dropzone > span:not(.dropzone-icon) { font-size: 13px; color: var(--muted); }

.photo-stage {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--navy);
  animation: pop-in 0.4s var(--ease) both;
}

.photo-stage img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.photo-stage .change {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(16, 20, 28, 0.55);
  color: white;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.photo-stage .change .ic { width: 16px; height: 16px; }

.upload-state {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  color: white;
  background: rgba(16, 20, 28, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.upload-state::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

.upload-state.ok { background: rgba(47, 125, 87, 0.92); }
.upload-state.ok::before { content: "✓"; border: 0; width: auto; height: auto; animation: none; font-size: 12px; }
.upload-state.bad { background: rgba(178, 59, 59, 0.92); }
.upload-state.bad::before { content: "!"; border: 0; width: auto; height: auto; animation: none; }

.frames {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.frame {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 8px 10px;
  border: 0;
  border-radius: 18px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1.5px var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--spring), background 0.25s var(--ease);
  animation: pop-in 0.4s var(--ease) both;
}

.frame:active { transform: scale(0.96); }

.frame img, .frame-blank {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  border-radius: 12px;
  background: white;
}

.frame-blank {
  display: grid;
  place-items: center;
  border: 2px dashed var(--line-strong);
  background: transparent;
  color: var(--muted);
}

.frame.selected { background: var(--accent-soft); box-shadow: inset 0 0 0 2.5px var(--accent); }

.frame::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 15px no-repeat;
  box-shadow: 0 4px 10px -2px rgba(185, 21, 43, 0.6);
  transform: scale(0);
  transition: transform 0.3s var(--spring);
}

.frame.selected::after { transform: scale(1); }

.skeleton-frame { aspect-ratio: 4 / 5.6; border-radius: 18px; }

.action-bar {
  position: sticky;
  bottom: 0;
  z-index: 10;
  margin: 18px -20px -24px;
  padding: 14px 20px calc(16px + var(--safe-b));
  background: linear-gradient(180deg, rgba(250, 244, 244, 0), rgba(250, 244, 244, 0.92) 30%);
}

.status-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 36px 22px 26px;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  animation: pop-in 0.45s var(--ease) both;
}

.status-screen h2 { font-size: 21px; font-weight: 850; line-height: 1.45; }
.status-screen p { font-size: 15px; color: var(--muted); max-width: 320px; }
.status-screen p:empty { display: none; }
.status-screen .btn { margin-top: 12px; }

.orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.orb .ic { width: 44px; height: 44px; stroke-width: 1.7; }

.orb.loading::before, .orb.loading::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--accent);
  border-right-color: rgba(185, 21, 43, 0.25);
  animation: spin 1.1s linear infinite;
}

.orb.loading::after { inset: -18px; border-top-color: rgba(185, 21, 43, 0.25); border-right-color: transparent; animation-duration: 1.8s; animation-direction: reverse; }

.orb.loading .ic { animation: breathe 1.6s ease-in-out infinite; }

.orb.success { background: var(--good-soft); color: var(--good); animation: orb-pop 0.6s var(--spring) both; }
.orb.success::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--good);
  animation: ripple 1.6s var(--ease) 0.2s infinite;
}

.orb.draw .ic { stroke-width: 2.4; stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw 0.5s var(--ease) 0.25s forwards; }

.orb.fail { background: var(--bad-soft); color: var(--bad); animation: orb-pop 0.6s var(--spring) both; }

.orb.printing { background: var(--grad); color: white; box-shadow: var(--shadow-accent); }
.orb.printing .ic { animation: print-bob 1.2s ease-in-out infinite; }

@keyframes print-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

@keyframes orb-pop {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes ripple {
  from { transform: scale(1); opacity: 0.6; }
  to { transform: scale(1.5); opacity: 0; }
}

@keyframes draw { to { stroke-dashoffset: 0; } }

.scanner {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin: 8px 0 4px;
  border-radius: 26px;
  overflow: hidden;
  background: var(--navy);
}

.scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }

.scanner-frame {
  position: absolute;
  inset: 16%;
  border-radius: 22px;
  box-shadow: 0 0 0 999px rgba(16, 20, 28, 0.4);
  pointer-events: none;
}

.scanner-frame::before {
  content: "";
  position: absolute;
  inset: -4px;
  background:
    linear-gradient(white, white) top left / 34px 3px no-repeat,
    linear-gradient(white, white) top left / 3px 34px no-repeat,
    linear-gradient(white, white) top right / 34px 3px no-repeat,
    linear-gradient(white, white) top right / 3px 34px no-repeat,
    linear-gradient(white, white) bottom left / 34px 3px no-repeat,
    linear-gradient(white, white) bottom left / 3px 34px no-repeat,
    linear-gradient(white, white) bottom right / 34px 3px no-repeat,
    linear-gradient(white, white) bottom right / 3px 34px no-repeat;
}

.scanner-frame::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-2);
  box-shadow: 0 0 14px 3px rgba(213, 45, 66, 0.7);
  animation: scan-line 2.2s ease-in-out infinite;
}

@keyframes scan-line {
  0%, 100% { top: 8%; }
  50% { top: 92%; }
}

.scan-note { font-size: 13px; color: var(--muted); }
.scan-note:empty { display: none; }

.landing {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 24px 22px calc(28px + var(--safe-b));
}

.landing-art {
  position: relative;
  height: 260px;
  margin: 18px 0 8px;
}

.landing-art .polaroid { width: 130px; height: 158px; padding: 10px 10px 32px; border-radius: 10px; }
.landing-art .polaroid:nth-child(1) { left: calc(50% - 130px); top: 40px; transform: rotate(-10deg); }
.landing-art .polaroid:nth-child(2) { left: calc(50% - 30px); top: 10px; transform: rotate(7deg); }
.landing-art .polaroid:nth-child(3) { left: calc(50% - 76px); top: 78px; transform: rotate(-2deg); animation: float-b 6s ease-in-out infinite; z-index: 2; }
.landing-art .polaroid:nth-child(3) i { background: linear-gradient(160deg, #ffd5dc, #d52d42 50%, #921126); }

@keyframes float-b {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50% { transform: rotate(1deg) translateY(-8px); }
}

.landing-glow {
  position: absolute;
  inset: 20% 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(213, 45, 66, 0.45), transparent 70%);
  filter: blur(20px);
}

.landing h1 { font-size: 30px; font-weight: 900; line-height: 1.4; letter-spacing: -0.01em; }
.landing h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing .lead { margin: 10px 0 24px; font-size: 15px; color: var(--muted); }
.landing form { display: grid; gap: 12px; }
.landing .divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.landing .divider::before, .landing .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }

.splash {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 24px;
  text-align: center;
}

.splash h1 { font-size: 22px; font-weight: 850; }
.splash p { font-size: 15px; color: var(--muted); max-width: 300px; }
.splash p:empty { display: none; }

.error-text { color: var(--bad); font-size: 14px; font-weight: 600; text-align: center; }
.error-text:empty { display: none; }

.delay-1 { animation-delay: 0.05s !important; }
.delay-2 { animation-delay: 0.1s !important; }
.delay-3 { animation-delay: 0.15s !important; }
.delay-4 { animation-delay: 0.2s !important; }

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

.ticket-balance { display: flex; flex-direction: column; gap: 5px; padding: 22px; margin-bottom: 22px; border-radius: 20px; background: var(--ink, #302921); color: #fff; text-align: center; }
.ticket-balance span { font-size: 14px; opacity: .85; }
.ticket-balance strong { font-size: 44px; line-height: 1.3; }
.ticket-balance small { font-size: 12px; opacity: .7; }

.wallet-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.wallet-heading .page-title { margin-bottom:0; }
.free-dialog { position:fixed; inset:0; width:100vw; height:100dvh; max-width:none; max-height:none; margin:0; padding:0; border:0; background:var(--bg, #faf4f4); color:var(--ink, #302921); }
.free-dialog::backdrop { background:var(--bg, #faf4f4); }
.free-header { position:sticky; top:0; z-index:1; display:flex; justify-content:space-between; align-items:center; gap:16px; padding:24px max(20px,calc((100vw - 720px)/2)); background:var(--bg, #faf4f4); border-bottom:1px solid #30292118; }
.free-header h1 { font-size:24px; margin:0 0 6px; }
.free-header p,.free-content>p { font-size:14px; color:var(--muted); line-height:1.9; margin:0; }
.free-content { max-width:760px; margin:auto; padding:24px 20px 50px; }
#free-note { min-height:30px; margin:12px 0; }
.free-offer { display:flex; flex-wrap:wrap; align-items:center; gap:16px; border:1px solid #54a88155; background:#eef8f0; padding:22px; margin:14px 0; border-radius:20px; }
.free-offer>div { flex:1 1 250px; }
.free-offer strong { font-size:19px; }
.free-offer p { font-size:13px; margin:8px 0 0; line-height:1.8; }
.free-offer .offer-state { font-size:13px; color:#226744; }
.free-offer .btn { background:#28734c; color:white; }
.free-offer.claimed { background:#fff2e5; border-color:#d9985255; }
.free-offer.claimed .offer-state { color:#975017; }
.free-offer.claimed .btn { background:#c48b53; opacity:.65; cursor:default; }

/* Phone sign-in shares the customer app's brand palette. */
.auth-page { justify-content:flex-start; padding-top:32px; }
.auth-page > .brand { flex:0 0 auto; }
.auth-logo { width:56px; height:56px; object-fit:contain; }
.auth-intro { margin:54px 0 24px; }
.auth-kicker { color:var(--accent); font-size:13px; font-weight:750; }
.auth-intro h1 { margin-top:12px; font-size:27px; }
.auth-intro .lead { margin:12px 0 0; line-height:1.9; }
.auth-page form { gap:16px; }
.auth-page .auth-help { font-size:12px; color:var(--muted); line-height:1.9; }
.auth-page .auth-phone { direction:ltr; text-align:center; font-weight:750; }
.auth-page .auth-code { text-align:center; letter-spacing:.5em; font-size:30px; }
.code-boxes{display:flex;direction:ltr;justify-content:center;gap:12px}.code-digit{width:58px;height:64px;padding:0;text-align:center;font-size:30px;font-weight:800;direction:ltr}.code-digit:focus{border-color:var(--accent)}
.auth-timer { text-align:center; color:var(--accent-deep); font-size:13px; font-variant-numeric:tabular-nums; }
.auth-page .link-btn { justify-content:center; min-height:44px; }
.auth-page #auth-error { margin-top:18px; }
.auth-foot { margin-top:auto; padding-top:36px; font-size:11px; text-align:center; color:var(--muted); }

/* Central print action and explicit ticket selection. */
.tabbar { grid-template-columns:repeat(5,minmax(0,1fr)); }
.tab-create { color:var(--accent-deep); font-weight:850; }
.tab-create .tab-icon { width:52px; height:46px; margin-top:-17px; margin-bottom:3px; border-radius:16px; background:var(--grad); color:#fff; box-shadow:var(--shadow-accent); border:3px solid var(--surface); }
.tab-create.on .tab-icon { background:var(--grad); }
.tab-create .create-plus { position:absolute; right:2px; bottom:0; font-size:20px; font-weight:900; line-height:1; }
.print-guide { list-style:none; padding:18px; margin:20px 0; border-radius:var(--r-lg); background:var(--surface); display:grid; gap:18px; }
.print-guide li { display:flex; gap:12px; align-items:flex-start; }
.print-guide li > span { display:grid; place-items:center; width:30px; height:30px; flex:0 0 30px; border-radius:50%; color:var(--accent-deep); background:var(--accent-soft); font-weight:800; }
.print-guide strong { font-size:14px; }
.print-guide p { font-size:12px; color:var(--muted); margin-top:3px; }
.print-ticket-options { display:grid; gap:10px; }
.print-ticket-choice { display:flex; align-items:center; gap:10px; min-height:76px; padding:14px; border-radius:18px; border:1.5px solid var(--line-strong); background:var(--surface); cursor:pointer; }
.print-ticket-choice input { accent-color:var(--accent); width:20px; height:20px; flex:0 0 20px; }
.print-ticket-detail { flex:1; min-width:0; }
.print-ticket-detail strong,.print-ticket-detail small { display:block; }
.print-ticket-detail small { color:var(--muted); font-size:12px; }
.print-ticket-pick { font-size:12px; color:var(--accent-deep); font-weight:750; }
.print-ticket-choice.selected { border-color:var(--accent); background:var(--accent-soft); }
.print-ticket-choice.exhausted { opacity:.55; cursor:default; }
#print-selection-note { margin:14px 0; font-size:13px; color:var(--muted); }

.print-steps { direction:ltr; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); list-style:none; padding:32px 0; margin:16px 0 30px; }
.print-steps li { position:relative; display:flex; flex-direction:column; align-items:center; gap:12px; text-align:center; }
.print-steps li:not(:last-child)::after { content:""; position:absolute; top:25px; left:calc(50% + 26px); width:calc(100% - 52px); height:2px; background:var(--accent-soft); }
.print-steps li > span { display:grid; place-items:center; width:52px; height:52px; border:2px solid var(--accent); border-radius:50%; background:var(--surface); color:var(--accent-deep); font-size:21px; font-weight:850; }
.print-steps strong { direction:rtl; font-size:13px; }
#print-intro-note { margin:16px 0; color:var(--muted); text-align:center; font-size:13px; }
#print-intro-note:empty { display:none; }

.print-steps li > .step-symbol { position:relative; width:64px; height:64px; background:var(--accent-soft); border:0; box-shadow:inset 0 0 0 1px rgba(185,21,43,.12); }
.print-steps .step-symbol .ic { width:29px; height:29px; stroke-width:1.8; }
.print-steps .step-symbol small { position:absolute; right:-3px; bottom:-3px; display:grid; place-items:center; width:23px; height:23px; border-radius:50%; background:var(--accent); color:#fff; border:2px solid var(--bg); font-size:11px; font-weight:800; }
.print-steps li:not(:last-child)::after { top:31px; left:calc(50% + 32px); width:calc(100% - 64px); background:linear-gradient(90deg,var(--accent-soft),var(--accent),var(--accent-soft)); }

.print-picker-toolbar { display:flex; justify-content:flex-end; }
.print-back { direction:ltr; min-height:44px; gap:7px; }
.print-list-head,.print-ticket-row { display:grid; grid-template-columns:minmax(0,1fr) 92px 78px; align-items:center; gap:10px; }
.print-list-head { position:sticky; top:68px; z-index:5; padding:14px 12px; background:var(--bg); border-bottom:1px solid var(--line-strong); font-size:11px; color:var(--muted); font-weight:750; }
.print-list-head span:not(:first-child) { text-align:center; }
.print-ticket-options { gap:0; border-radius:0 0 18px 18px; overflow:hidden; background:var(--surface); }
.print-ticket-row { padding:16px 12px; min-height:88px; border-bottom:1px solid var(--line); }
.print-ticket-row:last-child { border-bottom:0; }
.print-ticket-name { font-size:15px; overflow-wrap:anywhere; }
.print-ticket-count { font-size:30px; line-height:1.2; text-align:center; font-weight:900; color:var(--accent-deep); font-variant-numeric:tabular-nums; }
.print-ticket-row .btn { padding:0 10px; min-width:0; font-size:12px; border-radius:12px; }
.print-ticket-row.exhausted .print-ticket-count { color:var(--muted); }
@media(max-width:360px) { .print-list-head,.print-ticket-row { grid-template-columns:minmax(0,1fr) 76px 68px; gap:6px; padding-left:8px; padding-right:8px; } }

.photo-actions { display:flex; gap:12px; margin:16px 0; }
.photo-actions .btn { flex:1; padding:0 12px; font-size:14px; }
#fit-canvas { display:block; width:100%; height:auto; touch-action:none; cursor:grab; border-radius:12px; }
#fit-canvas:active { cursor:grabbing; }
.fit-hint { font-size:12px; color:var(--muted); margin:8px 0 14px; }
.fit-zoom { display:flex; align-items:center; gap:12px; font-size:12px; margin:16px 0; }
.fit-zoom input { flex:1; min-width:0; accent-color:var(--accent); direction:ltr; }
#stage .upload-state { display:none; }
.profile-password-dialog{width:min(520px,calc(100vw - 32px));border:0;border-radius:24px;padding:26px;box-shadow:0 20px 70px #2b172044}.profile-password-dialog::backdrop{background:rgba(35,25,30,.45);backdrop-filter:blur(7px)}.profile-password-dialog .block-title{display:flex;align-items:center;justify-content:space-between}.profile-password-dialog .icon-btn{border:0;background:#f5e9e9;border-radius:50%;width:38px;height:38px;font-size:25px;cursor:pointer}.profile-password-dialog[open]{animation:profile-dialog-in .18s ease-out}@keyframes profile-dialog-in{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}

.reward-celebration{border:0;padding:0;border-radius:28px;width:min(420px,calc(100vw - 36px));overflow:visible;background:var(--surface,#fff);box-shadow:0 24px 90px #0004}.reward-celebration::backdrop{background:#17202b99;backdrop-filter:blur(10px)}.reward-celebration-card{position:relative;text-align:center;padding:36px 24px;overflow:hidden;border-radius:28px}.reward-celebration-logo{width:88px;height:88px;object-fit:contain;border-radius:22px;margin:0 auto 18px;font-size:60px}.reward-celebration-card h2{margin:8px 0}.reward-celebration-card strong{display:block;font-size:24px;color:#ba663d;margin:24px 0}.reward-celebration-card .btn{width:100%;margin-top:16px}.reward-particle{position:absolute;pointer-events:none;top:40%;left:50%;width:8px;height:12px;animation:reward-burst 1.5s ease-out both}@keyframes reward-burst{0%{transform:translate(0,0) rotate(0);opacity:1}100%{transform:translate(var(--x),var(--y)) rotate(360deg);opacity:0}}
