:root {
  --color-primary: #4361ee;
  --color-primary-hover: #3651d4;
  --color-bg-dark: #1a1a2e;
  --color-border: #e5e7eb;
  --color-muted: #6b7280;
  --radius: 8px;
  --transition: 0.2s ease;
}
* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
body { margin: 0; font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif; font-size: 16px; line-height: 1.5; color: #111; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.header { padding: 1rem; padding-top: max(1rem, env(safe-area-inset-top)); background: var(--color-bg-dark); color: #fff; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.logo { color: #fff; text-decoration: none; font-weight: 700; min-height: 44px; display: flex; align-items: center; transition: opacity var(--transition); }
.logo:hover { opacity: 0.9; }
.user { font-size: 0.9rem; opacity: 0.9; }
.main { padding: 1rem; max-width: 600px; margin: 0 auto; }
.welcome { text-align: center; padding: 2rem 0; }
.welcome h1 { margin-bottom: 0.5rem; }
.tagline { color: #666; margin-bottom: 1rem; }
.hint { font-size: 0.9rem; color: #999; margin-top: 1rem; }
.btn { display: inline-block; padding: 0.75rem 1.5rem; min-height: 44px; min-width: 44px; border-radius: var(--radius); text-decoration: none; border: none; cursor: pointer; font-size: 1rem; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background var(--transition), transform 0.1s; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover, .btn-primary:active { background: var(--color-primary-hover); }
.btn-secondary { background: #f3f4f6; color: #374151; }
.btn-secondary:hover { background: #e5e7eb; }
.btn-block { display: block; text-align: center; margin-bottom: 0.75rem; width: 100%; }
.btn-back { color: #4361ee; min-height: 44px; display: inline-flex; align-items: center; }
.nav-buttons { margin-top: 2rem; }
.page-header { margin-bottom: 1.5rem; }
.page-header h2 { margin: 0.5rem 0; }
.order-card { display: block; padding: 1rem; min-height: 44px; border: 1px solid var(--color-border); border-radius: var(--radius); margin-bottom: 0.75rem; text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background var(--transition), box-shadow var(--transition); }
.order-card:hover, .order-card:active { background: #f9fafb; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.order-id { font-weight: 600; }
.order-status { float: right; color: #666; font-size: 0.9rem; }
.empty { color: #666; padding: 2rem; text-align: center; }
.text-muted { color: #666; }
.text-error { color: #991b1b; }
.seller-info { margin-top: 0.25rem; font-size: 0.9rem; }
.text-muted a { color: #4361ee; }
.order-status-badge { background: #e0e0e0; padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.9rem; }
.order-data { background: #f9f9f9; padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.25rem; font-weight: 500; }
.form-group input:not([type="radio"]):not([type="checkbox"]), .form-group textarea, .form-group select { width: 100%; padding: 0.75rem; min-height: 44px; border: 1px solid #e0e0e0; border-radius: 4px; font-size: 16px; -webkit-appearance: none; appearance: none; }
.form-group textarea { min-height: 80px; }
.form-group select { cursor: pointer; background: #fff; }
.order-form { margin-top: 1rem; }
.order-summary { background: #f9f9f9; padding: 1rem; border-radius: 8px; margin-bottom: 1rem; }
.card-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem; min-height: 44px; border: 1px solid #e0e0e0; border-radius: 8px; margin-bottom: 0.5rem; }
.mobile-nav { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid #e0e0e0; display: flex; justify-content: space-around; padding: 0.75rem; padding-bottom: max(0.75rem, env(safe-area-inset-bottom)); }
.mobile-nav a { text-decoration: none; color: #4361ee; font-size: 0.9rem; min-height: 44px; display: flex; align-items: center; justify-content: center; padding: 0 0.5rem; -webkit-tap-highlight-color: transparent; }
.main { padding-bottom: max(4rem, env(safe-area-inset-bottom)); }
@media (min-width: 768px) { .mobile-nav { display: none; } .main { padding-bottom: 1rem; } }
@media (max-width: 767px) { .btn { padding: 1rem 1.5rem; } }
.onboarding { padding: 2rem 1rem; text-align: center; }
.onboarding-slides { min-height: 200px; position: relative; }
.onboarding .slide { display: none; padding: 1rem; }
.onboarding .slide.active { display: block; }
.onboarding .slide h2 { margin-bottom: 1rem; }
.onboarding .slide p { color: #666; line-height: 1.6; }
.onboarding-controls { margin-top: 2rem; }
.slide-dots { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 1rem; }
.slide-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: #ddd; cursor: pointer; }
.slide-dots .dot.active { background: #4361ee; }
.btn-link { color: #666; margin-top: 0.5rem; display: block; }
.order-filter { background: #f9f9f9; padding: 1rem; border-radius: 8px; margin-bottom: 1rem; }
.filter-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.filter-row .form-group { margin-bottom: 0; flex: 1; min-width: 120px; }
.filter-actions { display: flex; gap: 0.5rem; align-items: center; }
.filter-actions .btn-link { margin: 0; }
@media (max-width: 767px) { .filter-row { flex-direction: column; } .filter-row .form-group { min-width: 100%; } }
.card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); }
.card-padded { padding: 1rem; }
.alert { padding: 1rem; border-radius: var(--radius); margin-bottom: 1rem; position: relative; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-close { position: absolute; top: 0.5rem; right: 0.5rem; background: none; border: none; font-size: 1.25rem; cursor: pointer; opacity: 0.6; }
.alert-close:hover { opacity: 1; }
.alert-list { margin: 0; padding-left: 1.25rem; }
.welcome h1 { font-size: 1.75rem; letter-spacing: -0.02em; }
.welcome .btn { margin: 0.25rem; }
.auth-form { max-width: 360px; margin: 0 auto; padding: 2rem 0; }
.auth-form h1 { margin-bottom: 1.5rem; font-size: 1.25rem; }
.auth-form .form { margin-bottom: 1rem; }
.auth-link { text-align: center; margin-top: 1rem; }
.auth-link a { color: var(--color-primary); text-decoration: none; }
.auth-link a:hover { text-decoration: underline; }
.card-add-inline { background: #f9f9f9; padding: 1rem; border-radius: var(--radius); margin-bottom: 1.5rem; }
.card-add-inline h3 { margin: 0 0 1rem; font-size: 1rem; }
.card-option { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem; margin-bottom: 0.5rem; border: 1px solid var(--color-border); border-radius: var(--radius); cursor: pointer; transition: background var(--transition); }
.card-option:hover { background: #f9fafb; }
.card-option input[type="radio"] { width: auto; min-height: auto; margin: 0; flex-shrink: 0; cursor: pointer; }
.card-option .card-masked { font-family: monospace; letter-spacing: 0.05em; }
.cards-list { margin-top: 0.5rem; }
.btn-add-card { margin-bottom: 0.5rem; }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 120px; }
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; pointer-events: none; transition: opacity var(--transition); }
.modal[aria-hidden="false"] { opacity: 1; pointer-events: auto; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.modal-content { position: relative; background: #fff; border-radius: var(--radius); max-width: 400px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem; border-bottom: 1px solid var(--color-border); }
.modal-header h3 { margin: 0; font-size: 1.1rem; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; opacity: 0.6; line-height: 1; padding: 0; }
.modal-close:hover { opacity: 1; }
.modal-body { padding: 1rem; }
.modal-footer { display: flex; gap: 0.5rem; justify-content: flex-end; }
body.modal-open { overflow: hidden; }
.form-group .checkbox { display: flex; align-items: center; gap: 0.5rem; font-weight: normal; cursor: pointer; }
.form-group .checkbox input { width: auto; min-height: auto; }
.logout-form { display: inline; margin-left: 0.5rem; }
.logout-form .btn-link { background: none; border: none; color: rgba(255,255,255,0.8); font-size: 0.9rem; margin: 0; padding: 0.25rem 0.5rem; min-height: auto; }
.logout-form .btn-link:hover { color: #fff; }
.main-screen h2 { font-size: 1.25rem; font-weight: 600; color: #374151; }
.nav-buttons .btn { transition: transform var(--transition); }
.nav-buttons .btn:hover { transform: translateY(-1px); }
