:root { --motion-ease: cubic-bezier(.2,.8,.2,1); --mobile-dock-space: calc(96px + env(safe-area-inset-bottom, 0px)); }
body { letter-spacing: -.025em; }
button { transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, opacity 160ms ease, transform 180ms var(--motion-ease); }
button:active:not(:disabled) { transform: scale(.96); }
.mobile-banner-copy strong, .scanner-content h1, .crm-topbar h1 { letter-spacing: -.065em; }
.mobile-banner-copy small, .mobile-identity p, .mobile-section-title, .attempt-status, .recent-prizes-empty, .profile-stats small, .staff-stats article > span, .notification-toggle, .claim-sheet p, .inventory-empty { letter-spacing: -.015em; }
.mobile-banner-copy small { color: #aaa; }
.mobile-section-title { color: #999; }
.reward-title { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; letter-spacing: -.03em; text-wrap: balance; }
.profile-stats .profile-best-prize { font-size: 9px; line-height: 11px; letter-spacing: -.015em; }
.profile-stats b, .staff-stats strong, .metric strong, .return-panel strong { letter-spacing: -.065em; font-variant-numeric: tabular-nums; }
.inventory-placeholder { color: #555; border-color: #1c1c1c; }
.notification-toggle { color: #aaa; }
.primary-button, .manual-trigger, .staff-sheet form button, .staff-result > button:not(.sheet-close) { box-shadow: 0 2px 10px #0002; }
.primary-button.is-unavailable { box-shadow: none; }
.app-shell { height: 100svh; }
.app-shell > .screen { height: 100svh; min-height: 100svh; padding-bottom: calc(var(--mobile-dock-space) + 24px); overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: none; }
.staff-app { height: 100svh; padding-bottom: 0; overflow: hidden; }
.staff-dashboard { height: 100svh; padding-bottom: calc(var(--mobile-dock-space) + 24px); overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: none; }
.app-shell > .screen::-webkit-scrollbar, .staff-dashboard::-webkit-scrollbar { display: none; }

.mobile-nav { isolation: isolate; background: transparent; }
.mobile-nav::after, .mobile-nav::before { position: absolute; z-index: -2; top: 0; left: 0; width: 54px; height: 54px; border-radius: 50%; pointer-events: none; content: ""; }
.mobile-nav::after { background: #101010; box-shadow: 59px 0 #101010; }
.mobile-nav::before { z-index: -1; background: #fff; transform: translateX(0); transition: transform 360ms cubic-bezier(.22,1,.36,1); }
.mobile-nav[data-active="1"]::before { transform: translateX(59px); }
.mobile-nav button, .mobile-nav button.is-active { background: transparent; }
.mobile-nav button.is-active { color: #000; }
.mobile-nav .figma-icon { transition: filter 160ms ease, transform 200ms var(--motion-ease); }
.mobile-nav button:active .figma-icon { transform: scale(.9); }

.reward-card, .mobile-banner { transition: transform 240ms var(--motion-ease), box-shadow 240ms ease, border-color 180ms ease; }
.mobile-banner > img { transition: opacity 260ms ease, transform 450ms var(--motion-ease); }
.reward-card > img, .recent-prize > img, .best-prize-stat > img, .claim-reward-art { transition: opacity 260ms ease; }
.recent-prize > img, .best-prize-stat > img { object-fit: contain; border-radius: 0; background: transparent; }
img.media-pending { opacity: 0; }
.roulette-window { isolation: isolate; }
.roulette-window::before, .roulette-window::after { position: absolute; z-index: 3; top: 0; bottom: 0; width: 30px; pointer-events: none; content: ""; }
.roulette-window::before { left: 0; background: linear-gradient(90deg, #101010b3, #10101000); }
.roulette-window::after { right: 0; background: linear-gradient(270deg, #101010b3, #10101000); }
.is-busy { cursor: wait; }
.is-busy .figma-icon { animation: busy-breathe 800ms ease-in-out infinite alternate; }
.button-spinner { display: block; flex: 0 0 16px; width: 16px; height: 16px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: busy-spin 650ms linear infinite; }
.spin-button[aria-busy="true"] { color: #555; }
.spin-button { min-width: 124px; }

.claim-dialog, .staff-sheet-backdrop, .staff-sheet, .reward-toast, .content-enter > *, .crm-toast, .reward-item { animation: none; }
body.has-crm-dialog { overflow: hidden; }
.claim-sheet, .staff-sheet { box-shadow: 0 18px 70px #0005, inset 0 1px #ffffff04; }
.claim-sheet h2 { letter-spacing: -.045em; }
.qr-code-button { min-height: 36px; color: #bbb; }
.claim-close, .sheet-close { transition: background-color 180ms ease, color 180ms ease, transform 180ms ease; }
.claim-qr { border-radius: 3px; }
.reward-toast, .staff-toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid #ffffff12; border-radius: 14px; background: #1b1b1bf5; color: #f4f4f4; box-shadow: 0 8px 28px #0005; backdrop-filter: blur(12px); letter-spacing: -.015em; }
.reward-toast .toast-copy { display: grid; min-width: 0; gap: 3px; color: inherit; }
.staff-toast .toast-copy { min-width: 0; }
.reward-toast strong { font-weight: 500; }
.reward-toast .toast-copy > span { color: #aaa; }
.reward-toast .toast-symbol, .staff-toast .toast-symbol { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; border: 1px solid #c2a2ff50; border-radius: 50%; color: #d0baff; }
.toast-symbol::after { width: 9px; height: 5px; margin-top: -2px; border-bottom: 1.5px solid currentColor; border-left: 1.5px solid currentColor; transform: rotate(-45deg); content: ""; }
.reward-toast .toast-symbol.is-error, .staff-toast .toast-symbol.is-error { border-color: #ffaaaa50; color: #ffb3b3; }
.toast-symbol.is-error::after { width: 2px; height: 10px; margin: 0; border: 0; border-radius: 1px; background: currentColor; transform: none; }
.metric span, .chart-legend, .data-table, .crm-sidebar nav button { letter-spacing: -.025em; }
.crm-sidebar nav button { transition: background-color 180ms ease, color 180ms ease; }
.crm-sidebar nav button.is-active { box-shadow: inset 0 1px #ffffff04; }
.crm-sidebar nav img { transition: opacity 180ms ease, transform 180ms ease; }
.crm-sidebar nav button:active img { transform: scale(.9); }
.metric, .chart-panel { box-shadow: inset 0 1px #ffffff65; }
.crm-toast { letter-spacing: -.02em; }

:where(button.micro-control) { position: relative; overflow: hidden; }
.micro-control::before { position: absolute; z-index: 4; left: var(--press-x, 50%); top: var(--press-y, 50%); width: var(--press-size, 120px); height: var(--press-size, 120px); border-radius: 50%; background: radial-gradient(circle, currentColor, transparent 68%); opacity: 0; transform: translate(-50%, -50%) scale(.05); pointer-events: none; content: ""; }
.micro-control.is-pressed::before { animation: touch-ink 460ms ease-out; }
.roulette-indicator { position: absolute; z-index: 5; top: 6px; left: 50%; width: 10px; height: 6px; background: #fff; clip-path: polygon(0 0, 100% 0, 50% 100%); transform: translateX(-50%); transform-origin: 50% 0; pointer-events: none; }
.roulette-track .reward-card, .roulette-track .reward-card > img, .roulette-track .reward-title { animation: none; transition: none; }
.roulette-track .reward-title { display: block; white-space: nowrap; text-overflow: ellipsis; opacity: 1; backface-visibility: hidden; }
.qr-code-button[data-confirmed] { border-color: #c2a2ff70; color: #d0baff; }
.modal button[data-confirmed] { color: var(--blue); }
input, textarea, select { transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease; }
.staff-sheet input:focus-visible { border-color: #a76bdd; box-shadow: 0 0 0 3px #a76bdd12; }
.settings-form input:focus-visible, .modal input:focus-visible, .modal textarea:focus-visible, .customer-note-form textarea:focus-visible { border-color: var(--blue); box-shadow: 0 0 0 3px #1526d512; }
.staff-sheet label, .settings-form label { transition: color 180ms ease; }
.staff-sheet label:focus-within { color: #d0baff; }
.settings-form label:focus-within { color: var(--blue); }
.crm-sidebar nav button, .crm-sidebar nav img { transition: background-color 180ms ease, color 180ms ease, opacity 180ms ease; }

@keyframes touch-ink { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.05); } 18% { opacity: .15; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); } }

@keyframes busy-spin { to { transform: rotate(360deg); } }
@keyframes busy-breathe { to { opacity: .45; } }
@media (hover: hover) and (pointer: fine) {
  button.mobile-banner:hover { border-color: #ffffff28; }
  button.mobile-banner:hover > img { transform: scale(1.025); }
  .reward-card.is-inventory:hover { transform: translateY(-2px); box-shadow: 0 5px 18px #0004; }
  .primary-button:not(:disabled):hover, .manual-trigger:hover { background: #eee; }
  .claim-close:hover, .sheet-close:hover { background: #ffffff08; color: #fff; }
  .notification-toggle:not(:disabled):hover { color: #ddd; border-color: #444; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
