/* ============================================
   NLN Friends Raffle - iOS Native Styles
   ============================================ */

/* --- iOS System Colors --- */
:root {
  /* Catppuccin Mocha */
  --ios-bg: #1e1e2e;
  --ios-bg-secondary: #181825;
  --ios-bg-tertiary: #313244;
  --ios-bg-elevated: #45475a;
  --ios-label: #cdd6f4;
  --ios-label-secondary: #a6adc8;
  --ios-label-tertiary: #6c7086;
  --ios-separator: #313244;
  --ios-accent: #0A84FF;
  --ios-accent-dim: #0051D5;
  --ios-accent-bright: #5DA9FF;
  --ios-accent-bg: rgba(10, 132, 255, 0.12);
  --ios-red: #FF453A;
  --ios-red-bg: rgba(255, 69, 58, 0.12);
  --ios-green: #30D158;
  --ios-blue: #0A84FF;
  --ios-gray1: #a6adc8;
  --ios-gray2: #6c7086;
  --ios-gray3: #585b70;
  --ios-gray4: #45475a;
  --ios-gray5: #313244;
  --ios-gray6: #181825;

  /* Semantic mapping (dark default) */
  --bg: var(--ios-bg);
  --bg-secondary: var(--ios-bg-secondary);
  --bg-tertiary: var(--ios-bg-tertiary);
  --bg-elevated: var(--ios-bg-elevated);
  --text: var(--ios-label);
  --text-secondary: var(--ios-label-secondary);
  --text-tertiary: var(--ios-label-tertiary);
  --separator: var(--ios-separator);
  --accent: var(--ios-accent);
  --accent-dim: var(--ios-accent-dim);
  --accent-bright: var(--ios-accent-bright);
  --accent-bg: var(--ios-accent-bg);
  --red: var(--ios-red);
  --red-bg: var(--ios-red-bg);
  --green: var(--ios-green);
  --blue: var(--ios-blue);
  --shadow: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  /* iOS Light Mode */
  --ios-bg: #F2F2F7;
  --ios-bg-secondary: #FFFFFF;
  --ios-bg-tertiary: #FFFFFF;
  --ios-bg-elevated: #E5E5EA;
  --ios-label: #000000;
  --ios-label-secondary: #8E8E93;
  --ios-label-tertiary: #C7C7CC;
  --ios-separator: #C6C6C8;
  --ios-accent: #007AFF;
  --ios-accent-dim: #0040DD;
  --ios-accent-bright: #409CFF;
  --ios-accent-bg: rgba(0, 122, 255, 0.10);
  --ios-red: #FF3B30;
  --ios-red-bg: rgba(255, 59, 48, 0.10);
  --ios-green: #34C759;
  --ios-blue: #007AFF;
  --ios-gray1: #8E8E93;
  --ios-gray2: #AEAEB2;
  --ios-gray3: #C7C7CC;
  --ios-gray4: #D1D1D6;
  --ios-gray5: #E5E5EA;
  --ios-gray6: #F2F2F7;

  --bg: var(--ios-bg);
  --bg-secondary: var(--ios-bg-secondary);
  --bg-tertiary: var(--ios-bg-tertiary);
  --bg-elevated: var(--ios-bg-elevated);
  --text: var(--ios-label);
  --text-secondary: var(--ios-label-secondary);
  --text-tertiary: var(--ios-label-tertiary);
  --separator: var(--ios-separator);
  --accent: var(--ios-accent);
  --accent-dim: var(--ios-accent-dim);
  --accent-bright: var(--ios-accent-bright);
  --accent-bg: var(--ios-accent-bg);
  --red: var(--ios-red);
  --red-bg: var(--ios-red-bg);
  --green: var(--ios-green);
  --blue: var(--ios-blue);
  --shadow: rgba(0, 0, 0, 0.08);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background 0.25s ease, color 0.25s ease;
}

[x-cloak] { display: none !important; }

/* --- App Container --- */
.app-container {
  max-width: 680px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 0 16px env(safe-area-inset-bottom, 0px);
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .app-container { padding: 0 20px env(safe-area-inset-bottom, 0px); }
}

/* --- Icons (SF Symbols style) --- */
.icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke-width: 1.5;
}

.icon-small {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke-width: 2;
}

.icon-tiny {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  stroke-width: 2.5;
}

.icon-spinner {
  width: 18px;
  height: 18px;
  animation: spin 0.7s linear infinite;
}

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

/* --- Header (iOS style — no darker bg, just blur) --- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(30, 30, 46, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--separator);
}

[data-theme="light"] .app-header {
  background: rgba(242, 242, 247, 0.85);
}

@supports (padding-top: env(safe-area-inset-top)) {
  .app-header { padding-top: env(safe-area-inset-top); }
}

.header-content {
  display: flex;
  flex-direction: column;
  padding: 14px 0 16px;
  gap: 5px;
}

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

.header-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.021em;
  line-height: 1;
  color: var(--text);
  white-space: nowrap;
}

.header-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.3;
}

.header-usp {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.header-usp:hover {
  opacity: 0.75;
}

.usp-info {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.9;
  margin-top: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.available-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-dim);
  background: var(--accent-bg);
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle:active { transform: scale(0.92); }

/* --- Legend Bar --- */
.legend-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--separator);
  position: sticky;
  top: calc(95px + env(safe-area-inset-top, 0px));
  z-index: 90;
  background: var(--bg);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-available {
  background: transparent;
  border: 1.5px solid var(--text-tertiary);
}

.legend-selected {
  background: var(--accent);
}

.legend-reserved {
  background: var(--red);
}

.legend-label {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

/* --- Grid --- */
.grid-container {
  flex: 1;
  padding: 16px 0 120px;
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  justify-content: start;
}

@media (min-width: 400px) {
  .number-grid { grid-template-columns: repeat(6, 1fr); gap: 14px; }
}

@media (min-width: 540px) {
  .number-grid { grid-template-columns: repeat(8, 1fr); gap: 14px; }
}

@media (min-width: 640px) {
  .number-grid { grid-template-columns: repeat(10, 1fr); gap: 16px; }
}

/* --- Raffle Balls --- */
.number-ball {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: none;
  font-family: inherit;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.12s ease;
  will-change: transform;
}

/* Available - clean sphere */
.ball-available {
  background: var(--bg-tertiary);
  color: var(--text);
  border: 0.5px solid var(--separator);
}

[data-theme="light"] .ball-available {
  background: #FFFFFF;
  border: 0.5px solid var(--separator);
}

.ball-available:hover {
  transform: scale(1.06);
  border-color: var(--text-tertiary);
}

.ball-available:active { transform: scale(0.94); }

/* Selected - solid accent */
.ball-selected {
  background: var(--accent);
  color: #fff;
  animation: selectBounce 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes selectBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.12); }
  70% { transform: scale(0.96); }
  100% { transform: scale(1); }
}

.ball-selected:hover { transform: scale(1.06); }
.ball-selected:active { transform: scale(0.94); }

/* Reserved - flat, red border only, disabled look */
.ball-reserved {
  background: transparent;
  color: var(--text-tertiary);
  cursor: not-allowed;
  border: 1.5px solid var(--red);
  opacity: 0.5;
}

/* Ball number text */
.ball-number {
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* Stagger animation */
.number-ball {
  opacity: 0;
  animation: ballFadeIn 0.35s ease forwards;
}

@keyframes ballFadeIn {
  from { opacity: 0; transform: translateY(8px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.number-ball:nth-child(1) { animation-delay: 0.01s; }
.number-ball:nth-child(2) { animation-delay: 0.02s; }
.number-ball:nth-child(3) { animation-delay: 0.03s; }
.number-ball:nth-child(4) { animation-delay: 0.04s; }
.number-ball:nth-child(5) { animation-delay: 0.05s; }
.number-ball:nth-child(6) { animation-delay: 0.06s; }
.number-ball:nth-child(7) { animation-delay: 0.07s; }
.number-ball:nth-child(8) { animation-delay: 0.08s; }
.number-ball:nth-child(9) { animation-delay: 0.09s; }
.number-ball:nth-child(10) { animation-delay: 0.10s; }
.number-ball:nth-child(n+11) { animation-delay: 0.11s; }
.number-ball:nth-child(n+21) { animation-delay: 0.12s; }
.number-ball:nth-child(n+31) { animation-delay: 0.13s; }
.number-ball:nth-child(n+41) { animation-delay: 0.14s; }
.number-ball:nth-child(n+51) { animation-delay: 0.15s; }
.number-ball:nth-child(n+61) { animation-delay: 0.16s; }
.number-ball:nth-child(n+71) { animation-delay: 0.17s; }
.number-ball:nth-child(n+81) { animation-delay: 0.18s; }
.number-ball:nth-child(n+91) { animation-delay: 0.19s; }
.number-ball:nth-child(n+101) { animation-delay: 0.20s; }
.number-ball:nth-child(n+111) { animation-delay: 0.21s; }
.number-ball:nth-child(n+121) { animation-delay: 0.22s; }

/* --- Empty State --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
}

.empty-icon {
  width: 48px;
  height: 48px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.empty-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.empty-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
}

/* --- Floating Checkout Button --- */
.checkout-float {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  display: flex;
  justify-content: center;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--bg) 60%, transparent);
  pointer-events: none;
}

.checkout-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 22px;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.1s ease, opacity 0.15s ease;
}

.checkout-btn:hover { opacity: 0.9; }
.checkout-btn:active { transform: scale(0.96); }

.cart-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-icon {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 100px;
  padding: 0 5px;
  border: 2px solid var(--accent);
  transform: scale(1);
}

.btn-spring {
  animation: btnSpring 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.badge-spring {
  animation: badgeSpring 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes btnSpring {
  0% { transform: scale(1); }
  35% { transform: scale(1.14); }
  60% { transform: scale(0.96); }
  100% { transform: scale(1); }
}

@keyframes badgeSpring {
  0% { transform: scale(1); }
  35% { transform: scale(1.5); }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

@keyframes floatBounceIn {
  from { opacity: 0; transform: translateY(16px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.float-enter { transition: all 0.25s ease; }
.float-enter-start { opacity: 0; transform: translateY(16px); }
.float-enter-end { opacity: 1; transform: translateY(0); }
.float-leave { transition: all 0.18s ease; }
.float-leave-start { opacity: 1; transform: translateY(0); }
.float-leave-end { opacity: 0; transform: translateY(16px); }

/* --- Bottom Sheet (iOS style) --- */
.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  background: var(--bg-secondary);
  border-radius: 20px 20px 0 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.sheet-handle-bar {
  display: flex;
  justify-content: center;
  padding: 10px 0 6px;
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  z-index: 5;
}

.sheet-handle {
  width: 36px;
  height: 5px;
  background: var(--text-tertiary);
  border-radius: 2.5px;
}

/* Sheet animations */
.overlay-enter { transition: opacity 0.2s ease; }
.overlay-enter-start { opacity: 0; }
.overlay-enter-end { opacity: 1; }
.overlay-leave { transition: opacity 0.15s ease; }
.overlay-leave-start { opacity: 1; }
.overlay-leave-end { opacity: 0; }

.sheet-enter { transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1); }
.sheet-enter-start { transform: translateY(100%); }
.sheet-enter-end { transform: translateY(0); }
.sheet-leave { transition: transform 0.25s ease-in; }
.sheet-leave-start { transform: translateY(0); }
.sheet-leave-end { transform: translateY(100%); }

/* --- Sheet Content --- */
.sheet-content { padding: 8px 16px 28px; }

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.sheet-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.021em;
  color: var(--text);
}

.sheet-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.sheet-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s ease;
}

.sheet-close:hover { background: var(--bg-elevated); color: var(--text); }
.sheet-close:active { transform: scale(0.92); }

/* Selected pills */
.selected-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 110px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 4px;
}

.selected-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 9999px;
  letter-spacing: -0.01em;
}

.pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.1s ease;
}

.pill-remove:hover { opacity: 1; }

.sheet-divider {
  height: 0.5px;
  background: var(--separator);
  margin: 14px 0;
}

/* --- Form (iOS style) --- */
.sheet-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  padding-left: 2px;
}

.form-input {
  width: 100%;
  font-family: inherit;
  font-size: 17px;
  font-weight: 400;
  color: var(--text);
  background: var(--bg-tertiary);
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  transition: box-shadow 0.15s ease;
  -webkit-appearance: none;
}

.form-input::placeholder { color: var(--text-tertiary); }

.form-input:focus {
  box-shadow: 0 0 0 2px var(--accent);
}

.form-input-error { box-shadow: 0 0 0 2px var(--red) !important; }

.form-error {
  font-size: 12px;
  color: var(--red);
  padding-left: 2px;
}

.form-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  margin-top: 10px;
  letter-spacing: -0.01em;
  transition: transform 0.1s ease, filter 0.15s ease;
  -webkit-appearance: none;
}

.form-submit:hover { filter: brightness(1.05); }
.form-submit:active { transform: scale(0.98); }
.form-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.form-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px;
}

/* --- Redirecting State --- */
.redirecting-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 20px 44px;
  animation: successFadeIn 0.4s ease;
}

.redirect-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--accent-bg);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 20px;
}

.redirect-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.021em;
  color: var(--text);
  margin-bottom: 8px;
}

.redirect-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 280px;
  line-height: 1.4;
}

/* --- Success State --- */
.sheet-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 20px 44px;
  animation: successFadeIn 0.4s ease;
}

@keyframes successFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.success-icon {
  width: 56px;
  height: 56px;
  color: var(--green);
  margin-bottom: 16px;
  animation: successPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successPop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.success-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.021em;
  color: var(--text);
  margin-bottom: 8px;
}

.success-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 280px;
  line-height: 1.4;
}

/* ============================================
   RESERVATION PAGE
   ============================================ */

.reservation-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 12px;
}

.reservation-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--separator);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.reservation-loading-text {
  font-size: 14px;
  color: var(--text-secondary);
}

.reservation-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 0 20px;
}

.reservation-error-icon {
  width: 52px;
  height: 52px;
  color: var(--red);
  margin-bottom: 14px;
  animation: errorShake 0.45s ease;
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.reservation-error-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.021em;
  color: var(--text);
  margin-bottom: 6px;
}

.reservation-error-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Reservation Success View */
.reservation-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 44px 20px;
  animation: successFadeIn 0.5s ease;
}

.reservation-mail-icon {
  width: 52px;
  height: 52px;
  color: var(--accent);
  margin-bottom: 20px;
  animation: mailFloat 3s ease-in-out infinite;
}

@keyframes mailFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.reservation-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.021em;
  color: var(--text);
  margin-bottom: 6px;
}

.reservation-email {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.reservation-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 20px;
}

.reservation-number-ball {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  animation: ballFadeIn 0.35s ease forwards;
}

.reservation-date {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

.reservation-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border: 1px solid var(--separator);
  border-radius: 10px;
  background: transparent;
  color: var(--blue);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
}

.reservation-back-btn:hover {
  background: var(--bg-tertiary);
}

.reservation-back-btn:active {
  transform: scale(0.96);
}

/* --- Scrollbar --- */
.selected-pills::-webkit-scrollbar { width: 3px; }
.selected-pills::-webkit-scrollbar-track { background: transparent; }
.selected-pills::-webkit-scrollbar-thumb { background: var(--separator); border-radius: 2px; }

/* --- Safe Area --- */
@supports (padding-top: env(safe-area-inset-top)) {
  .app-header { padding-top: env(safe-area-inset-top); }
}

  animation: ballFadeIn 0.4s ease forwards;
}

.reservation-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.reservation-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1.5px solid var(--accent);
  border-radius: 12px;
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  margin-top: 32px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.purchase-details summary::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid var(--text-tertiary);
  margin-right: 6px;
  transition: transform 0.2s ease;
  vertical-align: middle;
}

.purchase-details[open] summary::before {
  transform: rotate(90deg);
}

.reservation-back-btn:hover {
  background: var(--accent-bg);
}

.reservation-back-btn:active {
  transform: scale(0.96);
}

/* --- Scrollbar --- */
.selected-pills::-webkit-scrollbar {
  width: 4px;
}

.selected-pills::-webkit-scrollbar-track {
  background: transparent;
}

.selected-pills::-webkit-scrollbar-thumb {
  background: var(--ctp-surface1);
  border-radius: 2px;
}

/* --- Safe Area for iPhone notch --- */
@supports (padding-top: env(safe-area-inset-top)) {
  .app-header {
    padding-top: env(safe-area-inset-top);
  }
}

/* --- Delight: ambient floating particles on selection --- */
@keyframes floatParticle {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.6;
  }
  100% {
    transform: translateY(-40px) scale(0);
    opacity: 0;
  }
}
