/* ═══════════════════════════════════════════════════════
   Helpdesk Customer Portal — Modern Minimal Redesign
   Direction: Clean, flat, no gradients, one accent, WCAG AA
   OD Craft: 3-weight system, accent ≤2/screen, tracking on caps
   ═══════════════════════════════════════════════════════ */

:root {
  /* Surfaces */
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-secondary: #f4f4f5;
  --border: #e4e4e7;
  --border-light: #f0f0f2;

  /* Text — all pass WCAG AA 4.5:1 on --bg */
  --text-primary: #18181b;
  --text-secondary: #52525b;
  --text-tertiary: #71717a;
  --text-placeholder: #a1a1aa;

  /* Accent — single color, max 2 visible per screen */
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-active: #1e40af;
  --accent-muted: #eff6ff;
  --brand-color: var(--accent);
  --brand-muted: var(--accent-muted);

  /* Semantic */
  --success: #16a34a;
  --success-muted: #f0fdf4;
  --warning: #ca8a04;
  --warning-muted: #fefce8;
  --danger: #dc2626;
  --danger-muted: #fef2f2;

  /* Typography — Inter, 3-weight system */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --weight-read: 400;
  --weight-ui: 500;
  --weight-announce: 600;

  /* Scale */
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 20px;
  --text-xl: 28px;
  --text-display: 36px;

  /* Spacing (4px base) */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 100px;

  /* Shadows — subtle, no colored glows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  font-weight: var(--weight-read);
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-5) var(--sp-10);
  min-height: 100vh;
}

/* ── Header ── */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-4) 0;
  margin-bottom: var(--sp-6);
  border-bottom: 1px solid var(--border);
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

#headerLogo {
  font-size: var(--text-md);
  font-weight: var(--weight-announce);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  letter-spacing: -0.02em;
}

#headerBadge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--weight-ui);
  background: var(--surface-secondary);
  color: var(--text-secondary);
}

#headerBadge.hidden { display: none; }
#headerBadge img { width: 14px; height: 14px; object-fit: contain; }

.header-right { display: flex; gap: 2px; }

/* ── Language switcher ── */
.lang-btn {
  padding: 6px var(--sp-3);
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  font-size: var(--text-xs);
  font-weight: var(--weight-announce);
  color: var(--text-tertiary);
  transition: all 0.15s;
  font-family: inherit;
  letter-spacing: 0.06em;
}

.lang-btn:hover { color: var(--text-primary); background: var(--surface-secondary); }

.lang-btn.active {
  background: var(--text-primary);
  color: var(--surface);
}

/* ── Hero ── */
.product-hero {
  padding: var(--sp-5) 0;
  text-align: center;
}

.hero-icon {
  display: flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-3);
  border-radius: var(--radius-md);
  background: var(--surface-secondary);
}

.hero-title {
  font-size: var(--text-display);
  font-weight: var(--weight-announce);
  color: var(--text-primary);
  margin: var(--sp-8) 0 var(--sp-3);
  text-align: center;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero-sub {
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--text-base);
  margin-bottom: var(--sp-8);
  line-height: 1.5;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  margin-bottom: var(--sp-4);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* ── Product grid ── */
.product-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-width: 560px;
  margin: 0 auto;
}

.product-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  width: 100%;
  font-family: inherit;
  position: relative;
}

.product-btn:hover {
  border-color: var(--text-tertiary);
  box-shadow: var(--shadow-md);
}

.product-btn:active { transform: scale(0.995); }

.product-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--surface-secondary);
}

.product-icon img { width: 28px; height: 28px; object-fit: contain; }

.product-info { flex: 1; }

.product-name {
  font-weight: var(--weight-announce);
  font-size: var(--text-base);
  color: var(--text-primary);
}

.product-desc {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-top: 2px;
  line-height: 1.4;
}

.product-arrow {
  color: var(--text-placeholder);
  font-size: var(--text-md);
  flex-shrink: 0;
  transition: color 0.15s;
}

.product-btn:hover .product-arrow { color: var(--text-primary); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-ui);
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  height: 44px;
  min-height: 44px;
}

.btn-primary {
  background: var(--brand-color);
  color: white;
}

.btn-primary:hover { filter: brightness(0.94); }
.btn-primary:active { filter: brightness(0.88); }

.btn-primary:disabled {
  background: var(--border);
  color: var(--text-placeholder);
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--surface-secondary); }

.btn-dark {
  background: var(--text-primary);
  color: var(--surface);
}

.btn-dark:hover { opacity: 0.9; }

.btn-full { width: 100%; }

.btn-back {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  font-weight: var(--weight-ui);
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-2) 0;
  margin-bottom: var(--sp-4);
  transition: color 0.15s;
}

.btn-back:hover { color: var(--text-primary); }

/* ── FAQ ── */
.faq-head {
  text-align: left;
  padding: var(--sp-4) 0 var(--sp-2);
}

.faq-title {
  margin-bottom: var(--sp-1);
  color: var(--text-primary);
  font-size: var(--text-xl);
  font-weight: 700;
}

.faq-subtitle {
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  text-align: left;
  margin: 0;
}

.search-field {
  position: relative;
  margin-bottom: var(--sp-4);
}

.search-field svg {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
}

.search-field input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  font: inherit;
  font-size: var(--text-base);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.search-field input:focus {
  border-color: var(--brand-color);
  box-shadow: 0 0 0 3px var(--brand-muted);
}

.faq-card {
  overflow: hidden;
  padding: 0;
}

.faq-tabs {
  display: flex;
  gap: var(--sp-1);
  padding: var(--sp-3);
  border-bottom: 1px solid var(--border-light);
  overflow-x: auto;
}

.faq-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px var(--sp-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-ui);
  color: var(--text-tertiary);
  background: none;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: all 0.15s;
}

.faq-tab svg,
.faq-tab .tab-icon,
.faq-tab .tab-chevron {
  display: none;
}

.faq-tab:hover { color: var(--text-primary); background: var(--surface-secondary); }

.faq-tab.active {
  background: var(--text-primary);
  color: var(--surface);
}

.faq-item { border-bottom: 1px solid var(--border-light); }
.faq-item:last-child { border-bottom: none; }

.faq-q {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: var(--weight-ui);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: var(--text-primary);
  min-height: 48px;
  transition: background 0.1s;
}

.faq-q:hover { background: var(--surface-secondary); }

.faq-chevron {
  flex-shrink: 0;
  color: var(--text-placeholder);
  transition: transform 0.2s ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--text-secondary);
}

.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }

.faq-answer-inner {
  padding: 0 var(--sp-4) var(--sp-4) var(--sp-4);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 65ch;
}

.faq-cta {
  text-align: center;
  margin-top: var(--sp-5);
  padding: var(--sp-4);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.faq-cta-text {
  padding: var(--sp-3) 0;
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  text-align: center;
}

/* ── Forms ── */
.form-group { margin-bottom: var(--sp-4); }

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-ui);
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}

.form-group label span { color: var(--text-tertiary) !important; font-weight: var(--weight-read); }

.label-muted {
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  font-weight: var(--weight-read);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: var(--sp-3) var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  background: var(--surface);
  color: var(--text-primary);
  min-height: 44px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--brand-color);
  box-shadow: 0 0 0 3px var(--brand-muted);
}

.ticket-form-card {
  border-top: 4px solid var(--brand-color);
}

.ticket-form-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.ticket-form-head h2 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--sp-1);
}

.ticket-form-head .subtitle {
  margin-bottom: 0;
}

.ticket-product-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--brand-muted);
  border: 1px solid var(--border);
}

.ticket-product-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

.form-body { margin-bottom: var(--sp-5); }
.form-footer { margin-top: var(--sp-5); }

.required-note {
  margin-bottom: var(--sp-3);
  color: var(--text-tertiary);
  font-size: var(--text-xs);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: var(--sp-1);
}

.field-error {
  display: none;
  margin-top: var(--sp-2);
  color: var(--danger);
  font-size: var(--text-xs);
  line-height: 1.45;
}

.form-group.has-error input,
.form-group.has-error textarea {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-muted);
}

.form-group.has-error .field-error {
  display: block;
}

.portal-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 2000;
  width: min(520px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  font-size: var(--text-sm);
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px);
  transition: opacity .18s ease, transform .18s ease;
}

.portal-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.portal-toast.error {
  border-color: rgba(220,38,38,.24);
  background: var(--danger-muted);
  color: #991b1b;
}

.portal-toast.success {
  border-color: rgba(22,163,74,.24);
  background: var(--success-muted);
  color: #166534;
}

.file-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--surface-secondary);
  font-size: var(--text-sm);
}

.file-chip-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-chip-size {
  flex-shrink: 0;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
}

.file-chip-remove {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.file-chip-remove:hover {
  background: var(--danger-muted);
}

.file-drop-zone {
  padding: var(--sp-4);
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-secondary);
  cursor: pointer;
  text-align: center;
  transition: border-color .2s, background .2s;
}

.file-drop-zone.dragover {
  border-color: var(--brand-color);
  background: var(--brand-muted);
}

.file-drop-zone svg {
  margin-bottom: 4px;
}

.file-drop-zone div {
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}

/* ── Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: var(--sp-5) 0;
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  font-weight: var(--weight-ui);
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Success screen ── */
.success-screen { text-align: center; padding: var(--sp-8) var(--sp-4); }

.success-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-4);
}

.success-icon svg { width: 24px; height: 24px; color: white; }

.ticket-num {
  font-size: var(--text-lg);
  font-weight: var(--weight-announce);
  color: var(--text-primary);
  margin: var(--sp-2) 0;
  font-family: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
  letter-spacing: 0.5px;
}

/* ── Info rows ── */
.info-row {
  display: flex;
  justify-content: space-between;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-light);
  font-size: var(--text-sm);
}
.info-row:last-child { border-bottom: none; }

.info-label {
  color: var(--text-tertiary);
  font-weight: var(--weight-ui);
}

.info-value {
  font-weight: var(--weight-ui);
  color: var(--text-primary);
}

.info-hint {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-secondary);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--border);
}

/* ── Status badges ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 3px var(--sp-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-new { background: var(--accent-muted); color: var(--accent); }
.status-progress { background: var(--warning-muted); color: var(--warning); }
.status-auto { background: var(--success-muted); color: var(--success); }
.status-operator { background: var(--warning-muted); color: var(--warning); }
.status-closed { background: var(--surface-secondary); color: var(--text-tertiary); }

/* ── Timeline ── */
.timeline-title {
  font-size: var(--text-xs);
  font-weight: var(--weight-announce);
  color: var(--text-tertiary);
  margin: var(--sp-4) 0 var(--sp-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.timeline-step { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-2) 0; }
.timeline-dots { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }

.timeline-dot {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; border: 2px solid;
}

.timeline-dot.done { background: var(--success); border-color: var(--success); color: white; }
.timeline-dot.done svg { width: 10px; height: 10px; }
.timeline-dot.pending { background: var(--surface-secondary); border-color: var(--border); color: var(--text-tertiary); }
.timeline-dot.pending svg { width: 8px; height: 8px; }
.timeline-line { width: 2px; height: 16px; background: var(--border); margin: var(--sp-1) 0; }
.timeline-line.done { background: var(--success); }
.timeline-text { font-size: var(--text-sm); color: var(--text-tertiary); padding-top: var(--sp-1); }
.timeline-text.done { color: var(--text-primary); font-weight: var(--weight-ui); }

/* ── Detail rows ── */
.detail-section { margin-bottom: var(--sp-4); }

.detail-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-announce);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-1);
}

.detail-value { font-size: var(--text-sm); color: var(--text-primary); line-height: 1.5; }

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-light);
  gap: var(--sp-3);
}
.detail-row:last-child { border-bottom: none; }

/* ── Rating ── */
.rating-section {
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.rating-section.rated { background: var(--success-muted); border-color: var(--success); }

.rating-title {
  font-size: var(--text-xs);
  font-weight: var(--weight-announce);
  color: var(--text-tertiary);
  margin-bottom: var(--sp-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rating-section.rated .rating-title { color: var(--success); }

.rating-stars { display: flex; gap: var(--sp-1); margin-bottom: var(--sp-2); }

.rating-star {
  cursor: pointer;
  background: none;
  border: none;
  padding: var(--sp-1);
  transition: transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rating-star:hover { transform: scale(1.15); }
.rating-star svg { width: 24px; height: 24px; }
.rating-star .star-empty { fill: var(--border); }
.rating-star .star-filled { fill: #eab308; }
.rating-star .star-hover { fill: #eab308; }
.rating-thanks { font-size: var(--text-xs); color: var(--success); font-weight: var(--weight-ui); }
.rating-disabled .rating-star { cursor: default; pointer-events: none; }

/* ── Utilities ── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mb-4 { margin-bottom: var(--sp-4); }
.gap-3 { display: flex; gap: var(--sp-3); }
.subtitle { color: var(--text-secondary); line-height: 1.45; }

/* Public support flow */
.support-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-2);
  max-width: 560px;
  margin: var(--sp-5) auto 0;
}

.support-steps div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--weight-ui);
}

.support-steps strong {
  display: inline-flex;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--accent-muted);
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: var(--weight-announce);
}

.support-steps span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.form-assurance {
  margin: calc(var(--sp-2) * -1) 0 var(--sp-5);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-secondary);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.45;
}

/* ── Footer ── */
.footer {
  text-align: center;
  padding: var(--sp-8) 0 var(--sp-4);
  color: var(--text-tertiary);
  font-size: var(--text-xs);
}
.footer a { color: var(--text-tertiary); text-decoration: none; }
.footer a:hover { color: var(--text-primary); }

/* ── Screen transitions ── */
#screenSelect, #screenFaq, #screenForm, #screenDone, #screenTrack {
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive: Tablet ── */
@media (max-width: 768px) {
  .wrap { padding: var(--sp-4) var(--sp-4) var(--sp-8); }
  .hero-title { font-size: var(--text-xl); }
  .form-row { grid-template-columns: 1fr; }
  .card { padding: var(--sp-5); }
  .support-steps { grid-template-columns: 1fr; }
}

/* ── Responsive: Small phone ── */
@media (max-width: 400px) {
  .wrap { padding: var(--sp-3) var(--sp-3) var(--sp-6); }
  .hero-title { font-size: var(--text-lg); }
  .hero-sub { font-size: var(--text-sm); }
  .card { padding: var(--sp-4); border-radius: var(--radius-md); }
  .faq-q { padding: var(--sp-3); font-size: var(--text-sm); }
  .faq-answer-inner { padding: 0 var(--sp-3) var(--sp-3); font-size: var(--text-sm); }
  .btn { height: 42px; min-height: 42px; font-size: var(--text-sm); }
  .footer { font-size: var(--text-xs); }
}

/* ── Touch devices ── */
@media (hover: none) and (pointer: coarse) {
  .product-btn { min-height: 56px; }
  .product-btn:hover { border-color: var(--border); background: var(--surface); }
  .product-btn:active { background: var(--surface-secondary); }
  .btn { min-height: 44px; }
  .faq-q { min-height: 48px; }
  .form-group input, .form-group textarea, .form-group select { min-height: 44px; }
}

/* ── Safe area ── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .wrap { padding-bottom: calc(var(--sp-10) + env(safe-area-inset-bottom)); }
  .footer { padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom)); }
}
