/**
 * 2026 Modern Mobile-First App Design System
 * Inspired by Tailwind CSS & Glassmorphic Neo-Fintech
 */

:root {
  --font-sans: 'Kanit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --color-primary: #4f46e5;
  --color-primary-hover: #4338ca;
  --color-primary-light: #eef2ff;
  --color-accent: #06b6d4;
  --color-gold: #f59e0b;
  --color-success: #10b981;
  --color-danger: #ef4444;
  --color-warning: #f97316;
  --color-slate-900: #0f172a;
  --color-slate-800: #1e293b;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-500: #64748b;
  --color-slate-400: #94a3b8;
  --color-slate-100: #f1f5f9;
  --color-slate-50: #f8fafc;

  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-glass: rgba(255, 255, 255, 0.85);
  --border-glass: rgba(255, 255, 255, 0.5);

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.08);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 25px -5px rgba(79, 70, 229, 0.35);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --brand-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #06b6d4 100%);
  --hero-radial: radial-gradient(circle at 50% 0%, rgba(79, 70, 229, 0.12) 0%, rgba(248, 250, 252, 0) 70%);
}

/* ==========================================================================
   Dynamic Day-of-the-Week Auto Color System (Sunday 0 - Saturday 6)
   Matches auspicious daily colors with high WCAG 2.1 AA contrast
   ========================================================================== */

/* 0: Sunday (วันอาทิตย์ - แดงมงคล Ruby Red) */
[data-day="0"] {
  --color-primary: #dc2626;
  --color-primary-hover: #b91c1c;
  --color-primary-light: #fef2f2;
  --color-accent: #f97316;
  --shadow-glow: 0 0 25px -5px rgba(220, 38, 38, 0.35);
  --brand-gradient: linear-gradient(135deg, #dc2626 0%, #ea580c 50%, #e11d48 100%);
  --hero-radial: radial-gradient(circle at 50% 0%, rgba(220, 38, 38, 0.12) 0%, rgba(248, 250, 252, 0) 70%);
}

/* 1: Monday (วันจันทร์ - ทอง/เหลืองมงคล Royal Amber / Gold) */
[data-day="1"] {
  --color-primary: #d97706;
  --color-primary-hover: #b45309;
  --color-primary-light: #fffbeb;
  --color-accent: #f59e0b;
  --shadow-glow: 0 0 25px -5px rgba(217, 119, 6, 0.35);
  --brand-gradient: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #eab308 100%);
  --hero-radial: radial-gradient(circle at 50% 0%, rgba(217, 119, 6, 0.12) 0%, rgba(248, 250, 252, 0) 70%);
}

/* 2: Tuesday (วันอังคาร - ชมพูสดใส Rose / Pink) */
[data-day="2"] {
  --color-primary: #db2777;
  --color-primary-hover: #be185d;
  --color-primary-light: #fdf2f8;
  --color-accent: #f43f5e;
  --shadow-glow: 0 0 25px -5px rgba(219, 39, 119, 0.35);
  --brand-gradient: linear-gradient(135deg, #db2777 0%, #e11d48 50%, #f43f5e 100%);
  --hero-radial: radial-gradient(circle at 50% 0%, rgba(219, 39, 119, 0.12) 0%, rgba(248, 250, 252, 0) 70%);
}

/* 3: Wednesday (วันพุธ - เขียวเหนี่ยวทรัพย์ Emerald / Forest Green) */
[data-day="3"] {
  --color-primary: #059669;
  --color-primary-hover: #047857;
  --color-primary-light: #ecfdf5;
  --color-accent: #10b981;
  --shadow-glow: 0 0 25px -5px rgba(5, 150, 105, 0.35);
  --brand-gradient: linear-gradient(135deg, #059669 0%, #10b981 50%, #14b8a6 100%);
  --hero-radial: radial-gradient(circle at 50% 0%, rgba(5, 150, 105, 0.12) 0%, rgba(248, 250, 252, 0) 70%);
}

/* 4: Thursday (วันพฤหัสบดี - แสด/ส้มปัญญา Vibrant Orange / Tangerine) */
[data-day="4"] {
  --color-primary: #ea580c;
  --color-primary-hover: #c2410c;
  --color-primary-light: #fff7ed;
  --color-accent: #f97316;
  --shadow-glow: 0 0 25px -5px rgba(234, 88, 12, 0.35);
  --brand-gradient: linear-gradient(135deg, #ea580c 0%, #f97316 50%, #fb923c 100%);
  --hero-radial: radial-gradient(circle at 50% 0%, rgba(234, 88, 12, 0.12) 0%, rgba(248, 250, 252, 0) 70%);
}

/* 5: Friday (วันศุกร์ - ฟ้าสุขุม ครามมหาลาภ Ocean Sky / Indigo Blue) */
[data-day="5"] {
  --color-primary: #0284c7;
  --color-primary-hover: #0369a1;
  --color-primary-light: #f0f9ff;
  --color-accent: #06b6d4;
  --shadow-glow: 0 0 25px -5px rgba(2, 132, 199, 0.35);
  --brand-gradient: linear-gradient(135deg, #0284c7 0%, #06b6d4 50%, #3b82f6 100%);
  --hero-radial: radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.12) 0%, rgba(248, 250, 252, 0) 70%);
}

/* 6: Saturday (วันเสาร์ - ม่วงบารมี Royal Violet / Deep Purple) */
[data-day="6"] {
  --color-primary: #7c3aed;
  --color-primary-hover: #6d28d9;
  --color-primary-light: #f5f3ff;
  --color-accent: #9333ea;
  --shadow-glow: 0 0 25px -5px rgba(124, 58, 237, 0.35);
  --brand-gradient: linear-gradient(135deg, #7c3aed 0%, #9333ea 50%, #c026d3 100%);
  --hero-radial: radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.12) 0%, rgba(248, 250, 252, 0) 70%);
}

/* Base Reset & Typography */
html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
}

*, *::before, *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-app);
  color: var(--color-slate-800);
  line-height: 1.6;
  min-height: 100dvh;
  width: 100%;
  max-width: 100vw;
  padding-bottom: 80px; /* Reserve space for mobile bottom dock */
  overflow-x: hidden;
}

@media (min-width: 1024px) {
  body {
    padding-bottom: 0;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

/* Container */
.app-container {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Header & Glass Navbar */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.2s ease;
}

.app-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-slate-900);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-slate-600);
  transition: color 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-primary);
}

/* Language Switcher Button */
.lang-switch {
  display: flex;
  align-items: center;
  background: var(--color-slate-100);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid #e2e8f0;
}

.lang-btn {
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  color: var(--color-slate-600);
  transition: all 0.2s ease;
  display: inline-block;
}

.lang-btn.active {
  background: #ffffff;
  color: var(--color-primary);
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
}

/* Hero Section */
.hero-wrapper {
  position: relative;
  overflow: hidden;
  background: var(--hero-radial);
  padding: 2.5rem 0 2rem;
}

@media (min-width: 768px) {
  .hero-wrapper {
    padding: 3.5rem 0 3rem;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
  border: 1px solid rgba(79, 70, 229, 0.15);
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--color-slate-900);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2.75rem;
  }
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--color-slate-600);
  max-width: 620px;
  margin: 0 auto 2rem;
  font-weight: 400;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 1.125rem;
  }
}

/* Main Input Card - App Style */
.search-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  border: 1px solid rgba(226, 232, 240, 0.9);
  max-width: 620px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

@media (min-width: 768px) {
  .search-card {
    padding: 2rem;
  }
}

.search-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.phone-input {
  width: 100%;
  height: 58px;
  padding: 0 1rem 0 3.25rem;
  font-size: 1.25rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--color-slate-900);
  background: var(--color-slate-50);
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-lg);
  outline: none;
  transition: all 0.2s ease;
  letter-spacing: 0.05em;
}

.phone-input:focus {
  border-color: var(--color-primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.input-icon-prefix {
  position: absolute;
  left: 1rem;
  color: var(--color-slate-400);
  pointer-events: none;
  font-size: 1.35rem;
}

.btn-submit-analyze {
  width: 100%;
  height: 52px;
  margin-top: 1rem;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1.1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-submit-analyze:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

.btn-submit-analyze:active {
  transform: scale(0.98);
}

/* Sample Quick-pick Pills */
.sample-pills-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.25rem;
}

.sample-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-slate-500);
}

.sample-pill {
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--color-slate-100);
  color: var(--color-slate-700);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 1px solid #e2e8f0;
  transition: all 0.15s ease;
}

.sample-pill:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: rgba(79, 70, 229, 0.3);
}

/* Results Section - 2026 App Score Dashboard */
.result-card-main {
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  margin-top: 2rem;
}

.result-hero-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #312e81 100%);
  color: #ffffff;
  padding: 2.5rem 1.5rem;
  text-align: center;
  position: relative;
}

.result-phone-display {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .result-phone-display {
    font-size: 2.5rem;
  }
}

.operator-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  margin-bottom: 1.5rem;
}

/* Big Grade Badge Circle */
.grade-circle-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.grade-badge-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  font-weight: 900;
  box-shadow: 0 0 30px rgba(0,0,0,0.3);
  margin-bottom: 0.75rem;
}

/* Grade Colors */
.grade-A-plus { background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: #ffffff; }
.grade-A { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); color: #ffffff; }
.grade-B { background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%); color: #ffffff; }
.grade-C { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: #ffffff; }
.grade-D { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%); color: #ffffff; }
.grade-E { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: #ffffff; }

.grade-desc-pill {
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 500;
  max-width: 480px;
  margin: 0 auto;
}

/* Stat Grid (Score & Sum) */
.result-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.stat-box {
  background: #ffffff;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid #e2e8f0;
  text-align: center;
}

.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--color-slate-900);
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-slate-500);
  margin-top: 0.25rem;
}

/* Pairs Grid */
.pairs-grid-section {
  padding: 2rem 1.5rem;
}

.section-subheading {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-slate-900);
  margin-bottom: 0.25rem;
}

.section-desc {
  font-size: 0.9rem;
  color: var(--color-slate-500);
  margin-bottom: 1.5rem;
}

.pairs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .pairs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pair-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.pair-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.pair-badge-num {
  min-width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, monospace;
  background: var(--color-slate-100);
  color: var(--color-slate-800);
}

.pair-badge-num.pair-high {
  background: #dcfce7;
  color: #166534;
}

.pair-badge-num.pair-caution {
  background: #fee2e2;
  color: #991b1b;
}

.pair-info-wrap {
  flex: 1;
}

.pair-meta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.pair-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-slate-900);
}

.pair-score-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.score-tag-good { background: #dcfce7; color: #15803d; }
.score-tag-caution { background: #fee2e2; color: #b91c1c; }
.score-tag-neutral { background: #e0f2fe; color: #0369a1; }

.pair-meaning {
  font-size: 0.88rem;
  color: var(--color-slate-600);
  line-height: 1.5;
}

/* Avoid Section */
.avoid-box {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.avoid-box.avoid-clean {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.avoid-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #9f1239;
  margin-bottom: 0.5rem;
}

.avoid-box.avoid-clean .avoid-header {
  color: #166534;
}

.avoid-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0.75rem 0;
}

.avoid-chip {
  background: #ffffff;
  color: #be123c;
  border: 1px solid #fda4af;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-md);
  font-family: monospace;
}

/* Action & Share Buttons */
.action-buttons-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 1.5rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.btn-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--color-slate-700);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-action-pill:hover {
  background: var(--color-slate-100);
  color: var(--color-slate-900);
}

.btn-action-pill.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.btn-action-pill.btn-primary:hover {
  background: var(--color-primary-hover);
}

/* E-E-A-T Knowledge Cards */
.eeat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .eeat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.eeat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.eeat-card-num {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.eeat-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-slate-900);
  margin-bottom: 0.5rem;
}

.eeat-card-desc {
  font-size: 0.88rem;
  color: var(--color-slate-600);
  line-height: 1.55;
}

/* FAQ Accordion - Modern Native */
.faq-wrap {
  margin-top: 3.5rem;
}

.accordion-item-modern {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: all 0.2s ease;
}

.accordion-trigger {
  width: 100%;
  padding: 1.15rem 1.25rem;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-slate-800);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.accordion-trigger:hover {
  color: var(--color-primary);
}

.accordion-icon {
  transition: transform 0.2s ease;
  font-size: 1.1rem;
  color: var(--color-slate-400);
}

.accordion-item-modern.open .accordion-icon {
  transform: rotate(180deg);
  color: var(--color-primary);
}

.accordion-body-modern {
  display: none;
  padding: 0 1.25rem 1.25rem;
  font-size: 0.92rem;
  color: var(--color-slate-600);
  line-height: 1.65;
  border-top: 1px solid #f1f5f9;
  padding-top: 1rem;
}

.accordion-item-modern.open .accordion-body-modern {
  display: block;
}

/* Mobile Bottom Dock (App Navigation) */
.mobile-bottom-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 64px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 0.5rem;
}

@media (min-width: 1024px) {
  .mobile-bottom-dock {
    display: none;
  }
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--color-slate-500);
  font-size: 0.72rem;
  font-weight: 600;
  flex: 1;
  height: 100%;
  transition: color 0.15s ease;
}

.dock-item.active, .dock-item:hover {
  color: var(--color-primary);
}

.dock-icon {
  font-size: 1.25rem;
}

/* Site Footer */
.site-footer {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  color: var(--color-slate-600);
  font-size: 0.9rem;
}

.footer-brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-slate-900);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Modern Embed Code Snippet */
.embed-code-box {
  background: #0f172a;
  color: #f8fafc;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.85rem;
  overflow-x: auto;
  position: relative;
  margin-top: 1rem;
}

.btn-copy-embed {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-copy-embed:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   2026 Mobile Ergonomics & Strict Overflow Protection (320px - 480px)
   Prevents any horizontal pushing, clipped borders, or right-side scroll drift
   ========================================================================== */
@media (max-width: 640px) {
  .app-container {
    padding-left: 0.875rem;
    padding-right: 0.875rem;
    overflow-x: hidden;
  }

  .search-card {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-lg);
  }

  .phone-input {
    font-size: 1.1rem;
    padding-left: 2.85rem;
    height: 52px;
  }

  .input-icon-prefix {
    left: 0.85rem;
    font-size: 1.15rem;
  }

  .result-hero-banner {
    padding: 2rem 1rem;
  }

  .result-phone-display {
    font-size: 1.55rem;
    letter-spacing: 0.04em;
    word-break: break-word;
  }

  .grade-badge-circle {
    width: 95px;
    height: 95px;
    font-size: 2.6rem;
  }

  .grade-desc-pill {
    font-size: 0.85rem;
    padding: 4px 12px;
    line-height: 1.4;
  }

  .result-stats-row {
    padding: 1rem;
    gap: 0.75rem;
  }

  .stat-box {
    padding: 0.85rem 0.5rem;
  }

  .stat-value {
    font-size: 1.45rem;
  }

  .pairs-grid-section {
    padding: 1.25rem 1rem;
  }

  .pair-card {
    padding: 1rem 0.85rem;
    gap: 0.75rem;
  }

  .pair-badge-num {
    min-width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }

  .pair-title {
    font-size: 0.88rem;
  }

  .pair-meaning {
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .avoid-box {
    padding: 1.1rem 0.85rem;
  }

  .action-buttons-wrap {
    padding: 1.25rem 0.75rem;
    gap: 8px;
  }

  .btn-action-pill {
    padding: 8px 14px;
    font-size: 0.84rem;
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }

  /* Captcha responsive containment */
  .captcha-wrapper {
    max-width: 100%;
    transform: scale(0.92);
    transform-origin: center center;
  }
}

@media (max-width: 380px) {
  .app-container {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .hero-title {
    font-size: 1.55rem;
  }

  .result-phone-display {
    font-size: 1.35rem;
  }

  .captcha-wrapper {
    transform: scale(0.84);
  }
}

