/* Checkout, e-ticket viewer and My Tickets — built on tokens.css */

[hidden] { display: none !important; }

.event-card-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: var(--space-16);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  font-size: 16px;
  text-align: center;
}

.empty-state {
  padding: var(--space-32) var(--space-16);
  text-align: center;
  color: var(--color-muted);
}

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

/* Shared modal additions */
.modal-box {
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
}
.modal-box .modal-content {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-box--wide { max-width: 560px; }

.btn-primary:disabled,
.btn-default:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary:focus-visible,
.btn-default:focus-visible,
.btn-outline:focus-visible,
.zone-btn:focus-visible,
.qty-btn:focus-visible,
.modal-close:focus-visible,
.slip-dropzone:focus-within {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-block { width: 100%; padding-top: var(--space-12); padding-bottom: var(--space-12); }

/* Order summary */
.pay-order {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-bottom: var(--space-16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pay-order-title { font-size: 15px; font-weight: 700; }

.pay-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-12);
  font-size: 13px;
}

.pay-row span:first-child { color: var(--color-muted); }

/* QR block */
.pay-qr-box {
  background: #FFFFFF;
  color: #000000;
  border-radius: var(--radius-card);
  padding: var(--space-20);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-12);
  position: relative;
}

.pay-qr-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 13px;
  color: #000;
}

.pp-badge {
  background: #0E3D6B;
  color: #fff;
  padding: 2px 8px;
  border-radius: var(--radius-btn);
  font-size: 11px;
  letter-spacing: 0.4px;
}

.pay-qr,
.pay-qr-canvas-wrap,
#payQrCanvas,
#payQr {
  width: 220px;
  height: 220px;
  min-width: 220px;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto;
  position: relative;
  background: #ffffff;
}

.pay-qr svg,
.pay-qr-canvas-wrap svg,
#payQrCanvas svg,
#payQr svg {
  width: 220px !important;
  height: 220px !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block !important;
}

.pay-qr img,
.pay-qr-canvas-wrap img,
#payQrCanvas img,
#payQr img {
  width: 220px !important;
  height: 220px !important;
  display: block !important;
}

.qr-error { color: var(--color-primary); font-size: 12px; text-align: center; }

.pay-amount-label { font-size: 12px; color: #555; }

.pay-amount {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.pay-amount small { font-size: 14px; font-weight: 600; margin-left: var(--space-4); }
.pay-amount span { font-size: inherit; line-height: inherit; }

.pay-merchant { font-size: 12px; color: #555; text-align: center; }

.pay-qr-box.is-expired .pay-qr { opacity: 0.12; filter: grayscale(1); }

.pay-expired {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-12);
  font-weight: 600;
  color: #000;
}

.pay-expired[hidden] { display: none; }

.pay-countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-8);
  font-size: 13px;
  color: var(--color-muted);
}

.pay-countdown strong {
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}

.pay-countdown.is-urgent strong { color: #FF5A5A; }

.pay-steps {
  list-style: none;
  counter-reset: s;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  font-size: 13px;
  color: #CCCCCC;
}

.pay-steps li { counter-increment: s; display: flex; gap: var(--space-8); align-items: flex-start; }

.pay-steps li::before {
  content: counter(s);
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Slip upload */
.field-label { font-weight: 600; margin-bottom: var(--space-8); display: block; }

.slip-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-20);
  border: 1.5px dashed rgba(204, 204, 204, 0.4);
  border-radius: var(--radius-card);
  background: #2b2b2b;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.slip-dropzone:hover,
.slip-dropzone.is-dragging {
  border-color: var(--color-accent);
  background: #303438;
}

.slip-dropzone[hidden] { display: none; }

.slip-dropzone svg { color: var(--color-accent); }

.slip-dropzone-title { font-weight: 600; color: var(--color-text); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.slip-preview {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  padding: var(--space-12);
  border: 1px solid rgba(34, 155, 255, 0.4);
  background: rgba(34, 155, 255, 0.08);
  border-radius: var(--radius-card);
}

.slip-preview[hidden] { display: none; }

.slip-preview img {
  width: 56px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-btn);
  background: #222;
  flex-shrink: 0;
}

.slip-meta { flex: 1; min-width: 0; }

.slip-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slip-error { color: #FF6B6B; font-size: 12px; min-height: 16px; margin-top: var(--space-4); }

.pay-confirm-hint { text-align: center; font-size: 12px; color: var(--color-muted); }

.pay-footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  padding: var(--space-16) var(--space-20);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--color-elevated);
}

.btn-text {
  background: none;
  border: none;
  color: var(--color-muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: var(--space-4);
  border-radius: var(--radius-btn);
}

.btn-text:hover { color: var(--color-text); }
.btn-text:focus-visible { outline: 2px solid var(--color-accent); }

/* Verifying */
.verifying {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-16);
  padding: var(--space-32) var(--space-20);
  text-align: center;
}

.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--color-primary);
  animation: spin 0.8s linear infinite;
}

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

/* Ticket viewer */
.ticket-stage {
  background: #1a1a1a;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 1080 / 1720;
  max-height: 58vh;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ticket-stage img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ticket-stage img[hidden] { display: none; }

.ticket-skeleton {
  width: 100%;
  height: 100%;
  background: linear-gradient(100deg, #2a2a2a 30%, #3a3a3a 50%, #2a2a2a 70%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.ticket-skeleton[hidden] { display: none; }

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

.ticket-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); }
.ticket-actions .btn-primary { grid-column: 1 / -1; }
.ticket-actions [hidden] { display: none; }

.ticket-tip { font-size: 12px; color: var(--color-muted); text-align: center; }

/* My tickets */
.my-ticket {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  padding: var(--space-16);
  background: #2e2e2e;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-card);
}

.my-ticket-main { min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); align-items: flex-start; }
.my-ticket-title { font-size: 14px; font-weight: 700; }
.my-ticket-ref { font-size: 12px; font-weight: 600; color: var(--color-accent); letter-spacing: 0.5px; }

.toast.toast-error { border-left-color: var(--color-primary); }

@media (max-width: 480px) {
  body .modal-backdrop { padding: 0; align-items: flex-end; }
  body .modal-box { width: 100% !important; max-width: 100vw !important; border-radius: var(--radius-card) var(--radius-card) 0 0; max-height: 94vh; }
  body .zone-selection-grid { grid-template-columns: 1fr; }
  body .holder-grid { grid-template-columns: 1fr; gap: 8px; }
  body .toast { left: 16px; right: 16px; bottom: 16px; }
  .nav-actions .btn-outline { display: none; }
  .my-ticket { flex-direction: column; align-items: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  .spinner, .ticket-skeleton { animation-duration: 3s; }
}

/* ========================================================
   Interactive Seating Map & Stage Styles
   ======================================================== */
.seat-mode-tabs {
  display: flex;
  background: #252525;
  border-radius: var(--radius-btn);
  padding: 4px;
  gap: 4px;
  margin-bottom: var(--space-12);
  border: 1px solid var(--color-border-subtle);
}

.seat-mode-tab {
  flex: 1;
  padding: 8px 12px;
  background: transparent;
  color: var(--color-muted);
  border: none;
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.seat-mode-tab.active {
  background: var(--color-primary);
  color: #FFFFFF;
}

.seat-mode-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
}

.seat-map-wrapper {
  background: #1c1c1c;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-card);
  padding: var(--space-16);
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.stage-display {
  background: linear-gradient(180deg, #333333 0%, #1a1a1a 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(180, 0, 0, 0.15);
}

.stage-lights {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #B40000, #229BFF, #B40000, transparent);
}

.stage-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #FFFFFF;
  text-transform: uppercase;
}

/* Stage Layout Variants */
.stage-t-shape {
  padding-bottom: 24px;
}
.stage-catwalk {
  position: relative;
  width: 90px;
  height: 24px;
  margin: 8px auto -18px;
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.9), #1a1a1a);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
.catwalk-label {
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}

.stage-center-360 {
  border-radius: 16px;
  background: radial-gradient(circle, #3d1212 0%, #171717 80%);
  border: 1px solid rgba(229, 9, 20, 0.45);
  box-shadow: 0 0 20px rgba(229, 9, 20, 0.2);
  padding: 12px;
}
.stage-center-ring {
  display: inline-block;
  padding: 4px 18px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.3);
}

.stage-intimate-club {
  background: linear-gradient(135deg, #241432 0%, #120e18 100%);
  border: 1px solid rgba(168, 85, 247, 0.45);
  box-shadow: 0 4px 18px rgba(168, 85, 247, 0.2);
}
.club-lights {
  background: linear-gradient(90deg, transparent, #a855f7, #ec4899, #a855f7, transparent) !important;
}
.club-bar-indicator {
  margin-top: 5px;
  font-size: 10px;
  font-weight: 700;
  color: #d8b4fe;
  letter-spacing: 1px;
}

.seat-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-12);
  padding: 6px var(--space-12);
  background: #242424;
  border-radius: 6px;
  font-size: 11px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-muted);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.dot-available { background: #229BFF; }
.dot-selected { background: var(--color-primary); box-shadow: 0 0 6px var(--color-primary); }
.dot-occupied { background: #404040; }

.seating-grid-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.seat-zone-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  transition: border-color 0.2s ease;
}

.seat-zone-block:has(.seat-grid-vip) {
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.04);
}

.seat-zone-block:has(.seat-grid-a) {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.04);
}

.seat-zone-block:has(.seat-grid-b) {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.04);
}

.seat-zone-block:has(.seat-grid-c) {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.04);
}

.zone-header-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--color-muted);
}

.seat-row-grid {
  display: grid;
  gap: 4px;
}

.seat-grid-vip { grid-template-columns: repeat(6, 1fr); }
.seat-grid-a { grid-template-columns: repeat(8, 1fr); }
.seat-grid-b { grid-template-columns: repeat(8, 1fr); }
.seat-grid-c { grid-template-columns: repeat(10, 1fr); }

.seat-btn {
  aspect-ratio: 1;
  padding: 2px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: #242424;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.seat-btn:hover:not(:disabled) {
  transform: scale(1.12);
  z-index: 2;
  border-color: #FFFFFF;
}

/* Seating Mode Button Shapes */
.seat-btn.seat-type-table {
  border-radius: 50%;
  aspect-ratio: 1;
}
.seat-btn.seat-type-chair {
  border-radius: 6px 6px 3px 3px;
  aspect-ratio: 1;
}
.seat-btn.seat-type-standing {
  border-radius: 4px;
  aspect-ratio: 1.1;
  font-size: 9px;
}

.seat-zone-vip {
  border-color: rgba(220, 38, 38, 0.4);
  background: rgba(220, 38, 38, 0.15);
  color: #ff9999;
}

.seat-zone-a {
  border-color: rgba(34, 155, 255, 0.4);
  background: rgba(34, 155, 255, 0.15);
  color: #bae6fd;
}

.seat-zone-b {
  border-color: rgba(2, 132, 199, 0.4);
  background: rgba(2, 132, 199, 0.15);
  color: #bae6fd;
}

.seat-zone-c {
  border-color: rgba(15, 118, 110, 0.4);
  background: rgba(15, 118, 110, 0.15);
  color: #99f6e4;
}

.seat-btn.seat-selected {
  background: var(--color-primary) !important;
  color: #FFFFFF !important;
  border-color: #FFFFFF !important;
  box-shadow: 0 0 10px rgba(180, 0, 0, 0.8);
  font-weight: 700;
  transform: scale(1.08);
}

.seat-btn:disabled,
.seat-btn.seat-occupied {
  background: #333333;
  color: #555555;
  border-color: rgba(255, 255, 255, 0.04);
  cursor: not-allowed;
  opacity: 0.5;
}

.seat-btn.seat-held-other {
  background: rgba(245, 166, 35, 0.22) !important;
  color: #F5A623 !important;
  border-color: rgba(245, 166, 35, 0.6) !important;
  cursor: not-allowed;
  position: relative;
  animation: seatHoldPulse 2s infinite ease-in-out;
}

@keyframes seatHoldPulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 0.45; }
}

.seat-hold-live-ticker {
  background: rgba(34, 155, 255, 0.12);
  border: 1px solid rgba(34, 155, 255, 0.35);
  border-radius: var(--radius-btn);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
}

.seat-hold-ticker-badge {
  background: var(--color-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.seat-hold-ticker-msg {
  color: #bae6fd;
  flex: 1;
}

.seat-hold-timer-text {
  color: #FFFFFF;
  font-family: monospace;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 6px;
  border-radius: 3px;
}

.selected-seats-bar {
  background: #242424;
  border-radius: 6px;
  padding: 8px 12px;
}

.selected-seats-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.selected-seats-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.seat-tag {
  background: var(--color-primary);
  color: #FFFFFF;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Seat Hold Reservation Banner */
.seat-hold-banner {
  background: rgba(34, 155, 255, 0.1);
  border: 1px solid rgba(34, 155, 255, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #bae6fd;
}

.seat-hold-badge {
  background: var(--color-accent);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Slip Verified Banner */
.slip-verified-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 8px;
  color: #6ee7b7;
  font-size: 12px;
  font-weight: 600;
}

/* Sound Toggle Button in Header */
.sound-toggle-btn {
  background: transparent;
  border: 1px solid var(--color-border-subtle);
  color: var(--color-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sound-toggle-btn:hover {
  border-color: #FFFFFF;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.05);
}

.sound-toggle-btn.is-active {
  color: var(--color-accent);
  border-color: rgba(34, 155, 255, 0.4);
}

/* Print Styles */
@media print {
  body * { visibility: hidden; }
  #ticketModal, #ticketModal * { visibility: visible; }
  #ticketModal { position: absolute; left: 0; top: 0; width: 100%; background: none; }
  .modal-box { box-shadow: none; border: none; }
  .modal-header, .ticket-actions, .ticket-tip, .modal-close { display: none !important; }
}

/* Ticket Holder Form */
.holder-form {
  background: #2b2b2b;
  padding: var(--space-12) var(--space-16);
  border-radius: var(--radius-input);
  border: 1px solid var(--color-border-subtle);
}

.holder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}

.holder-sub-label {
  display: block;
  font-size: 11px;
  color: var(--color-muted);
  margin-bottom: 4px;
}

.holder-input {
  padding: 8px 12px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  white-space: nowrap;
}

/* Status Badges & Banners */
.badge-pending {
  background-color: rgba(245, 166, 35, 0.15);
  color: #F5A623;
  border: 1px solid rgba(245, 166, 35, 0.35);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
}

.badge-rejected {
  background-color: rgba(180, 0, 0, 0.2);
  color: #FF6B6B;
  border: 1px solid rgba(180, 0, 0, 0.45);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
}

.ticket-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  padding: var(--space-12) var(--space-16);
  border-radius: var(--radius-input);
  font-size: 12px;
}

.ticket-status-banner p {
  font-size: 12px;
  color: #CCCCCC;
  margin-top: 2px;
}

.ticket-status-banner.is-pending {
  background: rgba(245, 166, 35, 0.12);
  border: 1px solid rgba(245, 166, 35, 0.4);
  color: #F5A623;
}

.ticket-status-banner.is-approved {
  background: rgba(34, 155, 255, 0.12);
  border: 1px solid rgba(34, 155, 255, 0.4);
  color: var(--color-accent);
}

.ticket-status-banner.is-rejected {
  background: rgba(180, 0, 0, 0.16);
  border: 1px solid rgba(180, 0, 0, 0.45);
  color: #FF6B6B;
}

/* LINE Official Account Flex Message Bubble Preview */
.line-flex-card {
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--color-border-subtle);
  background: #333333;
}

.line-flex-header {
  background: #1E1E1E;
  padding: var(--space-16);
  border-top: 4px solid var(--color-primary);
}

.line-flex-body {
  padding: var(--space-16);
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

.line-flex-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
}

.line-flex-row small {
  display: block;
  font-size: 11px;
  color: var(--color-muted);
}

.line-flex-row strong {
  font-size: 13px;
  color: var(--color-text);
}

.line-flex-ref {
  border-top: 1px dashed rgba(204, 204, 204, 0.25);
  padding-top: var(--space-12);
  text-align: center;
}

.line-flex-ref small {
  display: block;
  font-size: 11px;
  color: var(--color-muted);
}

.line-flex-ref strong {
  font-size: 20px;
  color: var(--color-text);
  letter-spacing: 0.5px;
}

.copy-pp-btn {
  background: #f0f4f8;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  border-radius: 4px;
  padding: 2px 8px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-pp-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.live-security-bar {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-input);
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(180, 0, 0, 0.24) 0%, rgba(34, 155, 255, 0.24) 50%, rgba(180, 0, 0, 0.24) 100%);
  background-size: 200% 100%;
  animation: securityShimmer 4s linear infinite;
  border: 1px solid rgba(34, 155, 255, 0.45);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@keyframes securityShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.live-security-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.live-security-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #229BFF;
  box-shadow: 0 0 8px #229BFF;
  display: inline-block;
  animation: pulseDot 1.2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.55; }
}

.live-security-title {
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
  flex: 1;
}

.live-security-token {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #229BFF;
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.live-security-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #CCCCCC;
  flex-wrap: wrap;
  gap: 6px;
}

.live-security-progress {
  height: 4px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 4px;
  overflow: hidden;
}

.live-security-fill {
  height: 100%;
  width: 100%;
  background: var(--color-accent);
  transition: width 0.9s linear;
}

/* ==========================================================================
   iPhone & iPad Responsive Architecture
   ========================================================================== */

/* iPad & Tablet Portrait/Landscape (641px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
  .holder-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }
  .seating-grid-container {
    max-height: 340px;
  }
  .seat-btn {
    min-height: 32px;
    font-size: 11px;
  }
}

/* iPhone & Compact Mobile (<= 640px) */
@media (max-width: 640px) {
  /* Forms & Inputs */
  .holder-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .holder-form {
    padding: 12px;
  }
  .holder-input {
    min-height: 44px;
    font-size: 16px !important; /* Prevents iOS Safari auto-zoom */
  }

  /* Quick Zone Selection */
  .zone-selection-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .zone-btn {
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 48px;
  }
  .zone-btn-price {
    margin-top: 0;
    font-size: 13px;
    font-weight: 700;
  }

  /* Interactive Seating Map on iPhone */
  .seating-grid-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 260px;
    padding-bottom: 8px;
  }
  .seat-row-grid {
    min-width: 320px;
    gap: 5px;
  }
  .seat-btn {
    min-height: 28px;
    min-width: 28px;
    font-size: 10px;
    border-radius: 4px;
  }
  .seat-legend {
    gap: 8px;
    font-size: 10px;
    padding: 6px 8px;
  }

  /* Quantity Controls (Comfortable Thumb Tapping) */
  .quantity-control {
    padding: 10px 14px;
  }
  .qty-btn {
    width: 38px;
    height: 38px;
    font-size: 20px;
    border-radius: 6px;
  }

  /* Payment QR Modal on iPhone */
  .pay-qr-box {
    padding: 14px;
  }
  .pay-qr,
  .pay-qr-canvas-wrap,
  #payQrCanvas,
  #payQr {
    width: 190px;
    height: 190px;
    min-width: 190px;
    min-height: 190px;
  }
  .pay-amount {
    font-size: 24px;
  }
  .slip-dropzone {
    padding: 16px 12px;
    min-height: 110px;
  }

  /* E-Ticket Viewer & Actions on iPhone */
  .ticket-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  .ticket-actions button,
  .ticket-actions a {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
  .ticket-status-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 12px;
  }
  .live-security-bar {
    padding: 8px 10px;
  }
  .live-security-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .live-security-token {
    font-size: 11px;
    padding: 1px 6px;
  }

  /* LINE Flex Preview Mockup on iPhone */
  .phone-mockup-frame {
    border-width: 6px;
    border-radius: 24px;
    max-width: 100%;
  }
}

/* Extra Compact Screens (iPhone SE / 375px) */
@media (max-width: 380px) {
  .pay-qr,
  .pay-qr-canvas-wrap,
  #payQrCanvas,
  #payQr {
    width: 170px;
    height: 170px;
    min-width: 170px;
    min-height: 170px;
  }
  .pay-amount {
    font-size: 22px;
  }
  .seat-mode-tabs {
    flex-direction: column;
  }
  .seat-mode-tab {
    width: 100%;
    text-align: center;
  }
}

