/* ============================================================
   common.css — Shared styles for input.html & free.html
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@300;400;500;600;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');

/* ── CSS Custom Properties (OKLCH color scales) ── */
:root {
  /* Background scale: warm parchment / rice paper */
  --background-50:  0.988 0.008 88;
  --background-100: 0.975 0.015 85;
  --background-200: 0.955 0.022 82;
  --background-300: 0.920 0.030 80;
  --background-400: 0.880 0.035 78;
  --background-500: 0.840 0.035 76;
  --background-600: 0.760 0.030 74;
  --background-700: 0.680 0.028 72;
  --background-800: 0.570 0.025 70;
  --background-900: 0.430 0.020 68;
  --background-950: 0.310 0.018 66;

  /* Primary scale: muted cinnabar / 朱砂 */
  --primary-50:  0.978 0.012 28;
  --primary-100: 0.948 0.030 30;
  --primary-200: 0.905 0.055 29;
  --primary-300: 0.850 0.080 28;
  --primary-400: 0.780 0.100 27;
  --primary-500: 0.510 0.160 26;
  --primary-600: 0.430 0.145 25;
  --primary-700: 0.350 0.120 24;
  --primary-800: 0.280 0.095 23;
  --primary-900: 0.210 0.070 22;
  --primary-950: 0.130 0.050 21;

  /* Accent scale: champagne / antique gold */
  --accent-50:  0.992 0.012 94;
  --accent-100: 0.978 0.035 91;
  --accent-200: 0.955 0.060 88;
  --accent-300: 0.920 0.085 85;
  --accent-400: 0.875 0.105 82;
  --accent-500: 0.820 0.115 79;
  --accent-600: 0.740 0.105 77;
  --accent-700: 0.640 0.092 75;
  --accent-800: 0.520 0.075 73;
  --accent-900: 0.390 0.058 71;
  --accent-950: 0.270 0.040 69;

  /* Secondary scale: warm 赭石 / terracotta earth */
  --secondary-50:  0.978 0.012 42;
  --secondary-100: 0.950 0.032 40;
  --secondary-200: 0.905 0.055 38;
  --secondary-300: 0.850 0.075 36;
  --secondary-400: 0.785 0.088 35;
  --secondary-500: 0.680 0.105 33;
  --secondary-600: 0.590 0.095 31;
  --secondary-700: 0.500 0.080 30;
  --secondary-800: 0.410 0.065 29;
  --secondary-900: 0.310 0.050 28;
  --secondary-950: 0.210 0.035 27;

  /* Foreground scale: warm deep ink */
  --foreground-50:  0.982 0.006 32;
  --foreground-100: 0.948 0.012 30;
  --foreground-200: 0.895 0.018 28;
  --foreground-300: 0.820 0.022 26;
  --foreground-400: 0.720 0.026 24;
  --foreground-500: 0.600 0.028 22;
  --foreground-600: 0.480 0.026 22;
  --foreground-700: 0.390 0.022 22;
  --foreground-800: 0.300 0.020 22;
  --foreground-900: 0.210 0.016 22;
  --foreground-950: 0.130 0.012 22;

  /* Font families */
  --font-heading: 'Noto Serif TC', serif;
  --font-body:    'Noto Serif TC', serif;
  --font-label:   'Noto Serif TC', serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body header, body main, body section {
  font-family: var(--font-body);
  background: oklch(var(--background-50));
  color: oklch(var(--foreground-950));
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

body img {
  display: revert;
}

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

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: oklch(var(--background-100)); }
::-webkit-scrollbar-thumb { background: oklch(var(--accent-400) / 0.4); border-radius: 3px; }

/* ── Layout Utilities ── */
.min-h-screen { min-height: 100vh; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { inset: 0; }
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }

.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.flex-shrink-0 { flex-shrink: 0; }

.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }

.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-xs { max-width: 20rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-auto { margin-top: auto; margin-bottom: auto; }

/* ── Spacing (margin) ── */
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-auto { margin-top: auto; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-7 { margin-bottom: 1.75rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mx-0\.5 { margin-left: 0.125rem; margin-right: 0.125rem; }
.mx-1 { margin-left: 0.25rem; margin-right: 0.25rem; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }

/* ── Spacing (padding) ── */
.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-1\.5 { padding: 0.375rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-4 { padding-top: 1rem; }
.pt-6 { padding-top: 1.5rem; }
.pt-8 { padding-top: 2rem; }
.pt-10 { padding-top: 2.5rem; }
.pt-20 { padding-top: 5rem; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-3 { padding-bottom: 0.75rem; }
.pb-5 { padding-bottom: 1.25rem; }
.pb-6 { padding-bottom: 1.5rem; }
.pb-10 { padding-bottom: 2.5rem; }
.pb-20 { padding-bottom: 5rem; }
.pr-2 { padding-right: 0.5rem; }
.pl-5 { padding-left: 1.25rem; }

.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }

/* ── Typography ── */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-heading { font-family: var(--font-heading); }
span.font-heading { font-family: var(--font-heading); }
.font-body { font-family: var(--font-body); }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }

.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.625; }

.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.tracking-\[0\.15em\] { letter-spacing: 0.15em; }
.tracking-\[0\.2em\] { letter-spacing: 0.2em; }
.tracking-\[0\.22em\] { letter-spacing: 0.22em; }
.tracking-\[0\.25em\] { letter-spacing: 0.25em; }

.whitespace-nowrap { white-space: nowrap; }

.line-through { text-decoration: line-through; }
.underline { text-decoration: underline; }
.underline-offset-2 { text-underline-offset: 2px; }

.decoration-white\/50 { text-decoration-color: rgba(255,255,255,0.5); }

.break-words { overflow-wrap: break-word; word-break: break-word; }

/* ── Colors: Background ── */
.bg-transparent { background-color: transparent; }
.bg-white { background-color: white; }
.bg-background-50 { background-color: oklch(var(--background-50)); }
.bg-background-100 { background-color: oklch(var(--background-100)); }
.bg-background-200 { background-color: oklch(var(--background-200)); }
.bg-primary-50 { background-color: oklch(var(--primary-50)); }
.bg-primary-50\/40 { background-color: oklch(var(--primary-50) / 0.4); }
.bg-primary-100 { background-color: oklch(var(--primary-100)); }
.bg-primary-200 { background-color: oklch(var(--primary-200)); }
.bg-primary-300 { background-color: oklch(var(--primary-300)); }
.bg-primary-400 { background-color: oklch(var(--primary-400)); }
.bg-primary-400\/60 { background-color: oklch(var(--primary-400) / 0.6); }
.bg-primary-500 { background-color: oklch(var(--primary-500)); }
.bg-primary-600 { background-color: oklch(var(--primary-600)); }
.bg-accent-50 { background-color: oklch(var(--accent-50)); }
.bg-accent-50\/60 { background-color: oklch(var(--accent-50) / 0.6); }
.bg-accent-100 { background-color: oklch(var(--accent-100)); }
.bg-accent-100\/80 { background-color: oklch(var(--accent-100) / 0.8); }
.bg-accent-200 { background-color: oklch(var(--accent-200)); }
.bg-accent-200\/60 { background-color: oklch(var(--accent-200) / 0.6); }
.bg-accent-300 { background-color: oklch(var(--accent-300)); }
.bg-accent-400 { background-color: oklch(var(--accent-400)); }
.bg-accent-500 { background-color: oklch(var(--accent-500)); }
.bg-secondary-50 { background-color: oklch(var(--secondary-50)); }
.bg-secondary-100 { background-color: oklch(var(--secondary-100)); }
.bg-secondary-200 { background-color: oklch(var(--secondary-200)); }
.bg-secondary-300 { background-color: oklch(var(--secondary-300)); }
.bg-secondary-400 { background-color: oklch(var(--secondary-400)); }
.bg-secondary-500 { background-color: oklch(var(--secondary-500)); }
.bg-foreground-50 { background-color: oklch(var(--foreground-50)); }
.bg-foreground-100 { background-color: oklch(var(--foreground-100)); }
.bg-foreground-600 { background-color: oklch(var(--foreground-600)); }
.bg-foreground-900 { background-color: oklch(var(--foreground-900)); }
.bg-foreground-950 { background-color: oklch(var(--foreground-950)); }
.bg-red-500 { background-color: rgb(239, 68, 68); }
.bg-\[\#EFF6FF\] { background-color: #EFF6FF; }
.bg-\[\#FDF6F0\] { background-color: #FDF6F0; }
.bg-\[\#F0FDF4\] { background-color: #F0FDF4; }
.bg-\[\#FFF7ED\] { background-color: #FFF7ED; }
.bg-\[\#FEF2F2\] { background-color: #FEF2F2; }
.bg-\[\#FAF5FF\] { background-color: #FAF5FF; }
.bg-\[\#EEF2FF\] { background-color: #EEF2FF; }
.bg-\[\#06C755\] { background-color: #06C755; }

/* ── Colors: Text ── */
.text-white { color: white; }
.text-white\/30 { color: rgba(255,255,255,0.3); }
.text-white\/50 { color: rgba(255,255,255,0.5); }
.text-white\/60 { color: rgba(255,255,255,0.6); }
.text-background-50 { color: oklch(var(--background-50)); }
.text-primary-50 { color: oklch(var(--primary-50)); }
.text-primary-100 { color: oklch(var(--primary-100)); }
.text-primary-200 { color: oklch(var(--primary-200)); }
.text-primary-400 { color: oklch(var(--primary-400)); }
.text-primary-500 { color: oklch(var(--primary-500)); }
.text-primary-600 { color: oklch(var(--primary-600)); }
.text-primary-700 { color: oklch(var(--primary-700)); }
.text-primary-800 { color: oklch(var(--primary-800)); }
.text-accent-200 { color: oklch(var(--accent-200)); }
.text-accent-300 { color: oklch(var(--accent-300)); }
.text-accent-400 { color: oklch(var(--accent-400)); }
.text-accent-500 { color: oklch(var(--accent-500)); }
.text-accent-600 { color: oklch(var(--accent-600)); }
.text-accent-700 { color: oklch(var(--accent-700)); }
.text-accent-800 { color: oklch(var(--accent-800)); }
.text-secondary-500 { color: oklch(var(--secondary-500)); }
.text-secondary-600 { color: oklch(var(--secondary-600)); }
.text-secondary-700 { color: oklch(var(--secondary-700)); }
.text-secondary-800 { color: oklch(var(--secondary-800)); }
.text-foreground-50 { color: oklch(var(--foreground-50)); }
.text-foreground-100 { color: oklch(var(--foreground-100)); }
.text-foreground-200 { color: oklch(var(--foreground-200)); }
.text-foreground-300 { color: oklch(var(--foreground-300)); }
.text-foreground-400 { color: oklch(var(--foreground-400)); }
.text-foreground-500 { color: oklch(var(--foreground-500)); }
.text-foreground-600 { color: oklch(var(--foreground-600)); }
.text-foreground-700 { color: oklch(var(--foreground-700)); }
.text-foreground-800 { color: oklch(var(--foreground-800)); }
.text-foreground-900 { color: oklch(var(--foreground-900)); }
.text-foreground-950 { color: oklch(var(--foreground-950)); }
.text-\[\#3B82F6\] { color: #3B82F6; }
.text-\[\#8B5E3C\] { color: #8B5E3C; }
.text-\[\#22C55E\] { color: #22C55E; }
.text-\[\#F97316\] { color: #F97316; }
.text-\[\#EF4444\] { color: #EF4444; }
.text-\[\#A855F7\] { color: #A855F7; }
.text-\[\#6366F1\] { color: #6366F1; }
.text-\[\#EA580C\] { color: #EA580C; }
.text-sky-500 { color: #0ea5e9; }
.text-emerald-500 { color: #10b981; }
.text-orange-500 { color: #f97316; }
.text-rose-500 { color: #f43f5e; }
.text-amber-700 { color: #b45309; }
.text-violet-500 { color: #8b5cf6; }
.text-pink-400 { color: #f472b6; }

/* ── Borders ── */
.border { border-width: 1px; border-style: solid; }
.border-0 { border-width: 0; }
.border-2 { border-width: 2px; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-l { border-left-width: 1px; border-left-style: solid; }
.border-t-2 { border-top-width: 2px; border-top-style: solid; }
.border-t-4 { border-top-width: 4px; border-top-style: solid; }
.border-l-2 { border-left-width: 2px; border-left-style: solid; }
.border-l-4 { border-left-width: 4px; border-left-style: solid; }
.border-r-2 { border-right-width: 2px; border-right-style: solid; }
.border-b-2 { border-bottom-width: 2px; border-bottom-style: solid; }
.border-dashed { border-style: dashed; }

.border-white\/20 { border-color: rgba(255,255,255,0.2); }
.border-background-200 { border-color: oklch(var(--background-200)); }
.border-background-300 { border-color: oklch(var(--background-300)); }
.border-primary-100 { border-color: oklch(var(--primary-100)); }
.border-primary-200 { border-color: oklch(var(--primary-200)); }
.border-primary-300 { border-color: oklch(var(--primary-300)); }
.border-primary-400 { border-color: oklch(var(--primary-400)); }
.border-primary-500 { border-color: oklch(var(--primary-500)); }
.border-accent-200 { border-color: oklch(var(--accent-200)); }
.border-accent-200\/50 { border-color: oklch(var(--accent-200) / 0.5); }
.border-accent-300 { border-color: oklch(var(--accent-300)); }
.border-foreground-100 { border-color: oklch(var(--foreground-100)); }
.border-foreground-200 { border-color: oklch(var(--foreground-200)); }
.border-\[\#BFDBFE\] { border-color: #BFDBFE; }
.border-\[\#E8D5C4\] { border-color: #E8D5C4; }
.border-\[\#BBF7D0\] { border-color: #BBF7D0; }
.border-\[\#FED7AA\] { border-color: #FED7AA; }
.border-\[\#FECACA\] { border-color: #FECACA; }
.border-\[\#E9D5FF\] { border-color: #E9D5FF; }
.border-\[\#C7D2FE\] { border-color: #C7D2FE; }
.border-l-primary-500 { border-left-color: oklch(var(--primary-500)); }
.border-y { border-top-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-bottom-style: solid; }

/* ── Rounded ── */
.rounded { border-radius: 0.25rem; }
.rounded-sm { border-radius: 0.125rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.rounded-tl-sm { border-top-left-radius: 0.125rem; }
.rounded-tr-sm { border-top-right-radius: 0.125rem; }
.rounded-bl-sm { border-bottom-left-radius: 0.125rem; }
.rounded-br-sm { border-bottom-right-radius: 0.125rem; }
.rounded-l-xl { border-top-left-radius: 0.75rem; border-bottom-left-radius: 0.75rem; }

/* ── Overflow ── */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

/* ── Width/Height ── */
.w-1 { width: 0.25rem; }
.w-3 { width: 0.75rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-9 { width: 2.25rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-24 { width: 6rem; }
.w-72 { width: 18rem; }
.w-\[64px\] { width: 64px; }
.h-2 { height: 0.5rem; }
.h-3 { height: 0.75rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-9 { height: 2.25rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-\[64px\] { height: 64px; }
.min-h-\[70px\] { min-height: 70px; }
.min-w-\[52px\] { min-width: 52px; }
.min-w-0 { min-width: 0; }
.size-full { width: 100%; height: 100%; }
.aspect-video { aspect-ratio: 16 / 9; }
.aspect-\[3\/4\] { aspect-ratio: 3 / 4; }
.aspect-\[9\/16\] { aspect-ratio: 9 / 16; }

/* ── Object fit ── */
.object-cover { object-fit: cover; }
.object-top { object-position: top; }

/* ── Apperance ── */
.appearance-none { appearance: none; -webkit-appearance: none; }

/* ── Pointer ── */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

/* ── Position helpers ── */
.top-0 { top: 0; }
.top-1 { top: 0.25rem; }
.top-1\/2 { top: 50%; }
.-top-1 { top: -0.25rem; }
.-top-3 { top: -0.75rem; }
.right-0 { right: 0; }
.right-1 { right: 0.25rem; }
.right-3 { right: 0.75rem; }
.-right-1 { right: -0.25rem; }
.bottom-0 { bottom: 0; }
.bottom-1 { bottom: 0.25rem; }
.bottom-4 { bottom: 1rem; }
.left-0 { left: 0; }
.left-1 { left: 0.25rem; }
.left-1\/2 { left: 50%; }

.-translate-y-1\/2 { transform: translateY(-50%); }
.-translate-x-1\/2 { transform: translateX(-50%); }

/* ── Grid ── */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-\[56px_minmax\(0\2c 1fr\)_minmax\(0\2c 1fr\)\] {
  grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr);
}
.col-span-2 { grid-column: span 2 / span 2; }
.row-span-2 { grid-row: span 2 / span 2; }

/* ── Transition ── */
.transition-all { transition-property: all; transition-timing-function: ease; transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: ease; transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-timing-function: ease; transition-duration: 150ms; }
.transition-shadow { transition-property: box-shadow; transition-timing-function: ease; transition-duration: 150ms; }
.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }
.ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.ease-out { transition-timing-function: ease-out; }
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* ── Opacity ── */
.opacity-0 { opacity: 0; }
.opacity-60 { opacity: 0.6; }
.opacity-100 { opacity: 1; }

/* ── Shadow ── */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1); }
.shadow-primary-600\/30 { box-shadow: 0 10px 15px -3px oklch(var(--primary-600) / 0.3), 0 4px 6px -4px oklch(var(--primary-600) / 0.3); }

/* ── Blur ── */
.blur-\[3px\] { filter: blur(3px); }
.backdrop-blur-\[2px\] { backdrop-filter: blur(2px); }
.backdrop-blur-sm { backdrop-filter: blur(4px); }

/* ── Select ── */
.select-none { user-select: none; -webkit-user-select: none; }

/* ── Align ── */
.align-middle { vertical-align: middle; }

/* ── W-px divider ── */
.w-px { width: 1px; }

/* ── Gradient backgrounds ── */
.bg-gradient-to-b { background-image: linear-gradient(to bottom, var(--tw-gradient-stops)); }
.bg-gradient-to-l { background-image: linear-gradient(to left, var(--tw-gradient-stops)); }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.from-black\/30 { --tw-gradient-from: rgba(0,0,0,0.3); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent); }
.from-background-50 { --tw-gradient-from: oklch(var(--background-50)); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent); }
.from-background-50\/30 { --tw-gradient-from: oklch(var(--background-50) / 0.3); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent); }
.from-background-50\/40 { --tw-gradient-from: oklch(var(--background-50) / 0.4); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent); }
.via-transparent { --tw-gradient-to: transparent; --tw-gradient-stops: var(--tw-gradient-from), transparent, var(--tw-gradient-to, transparent); }
.to-background-50\/60 { --tw-gradient-to: oklch(var(--background-50) / 0.6); }
.to-background-50\/70 { --tw-gradient-to: oklch(var(--background-50) / 0.7); }
.to-transparent { --tw-gradient-to: transparent; }

/* ── Custom gradients ── */
.text-shimmer {
  background: linear-gradient(
    90deg,
    oklch(var(--accent-700)),
    oklch(var(--accent-400)),
    oklch(var(--accent-200)),
    oklch(var(--accent-400)),
    oklch(var(--accent-700))
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3.5s linear infinite;
}

.divider-gold {
  height: 1.5px;
  background: linear-gradient(
    90deg,
    transparent,
    oklch(var(--accent-400) / 0.6),
    oklch(var(--accent-300) / 0.8),
    oklch(var(--accent-400) / 0.6),
    transparent
  );
}

.bg-hero-warm {
  background: linear-gradient(
    170deg,
    oklch(var(--background-50)) 0%,
    oklch(var(--accent-50)) 40%,
    oklch(var(--background-100)) 70%,
    oklch(var(--background-50)) 100%
  );
}

.bg-footer-warm {
  background: linear-gradient(
    180deg,
    oklch(var(--accent-100) / 0.7) 0%,
    oklch(var(--background-100)) 100%
  );
}

.text-gold-gradient {
  background: linear-gradient(
    90deg,
    oklch(var(--accent-700)),
    oklch(var(--accent-400)),
    oklch(var(--accent-600))
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Card hover (no shadow, subtle lift) ── */
.card-refined {
  transition: transform 0.25s ease;
}
.card-refined:hover {
  transform: translateY(-2px);
}

/* ── Keyframes ── */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

@keyframes fadeInUp {
  0%   { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

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

@keyframes testimonials-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Animation classes ── */
.animate-shimmer { animation: shimmer 3.5s linear infinite; }
.animate-fadeInUp { animation: fadeInUp 0.5s ease-out forwards; }
.animate-fadeIn { animation: fadeIn 0.5s ease-out forwards; }
.animate-subtleFloat { animation: subtleFloat 4s ease-in-out infinite; }

/* ── Testimonials carousel track ── */
.testimonials-track {
  animation: testimonials-scroll 40s linear infinite;
  width: max-content;
}
.testimonials-track:hover {
  animation-play-state: paused;
}

/* ── Hover states ── */
.hover\:bg-background-50:hover { background-color: oklch(var(--background-50)); }
.hover\:bg-accent-100:hover { background-color: oklch(var(--accent-100)); }
.hover\:bg-accent-200:hover { background-color: oklch(var(--accent-200)); }
.hover\:bg-accent-400:hover { background-color: oklch(var(--accent-400)); }
.hover\:bg-primary-500:hover { background-color: oklch(var(--primary-500)); }
.hover\:bg-primary-600:hover { background-color: oklch(var(--primary-600)); }
.hover\:bg-white\/20:hover { background-color: rgba(255,255,255,0.2); }
.hover\:text-white:hover { color: white; }
.hover\:text-foreground-900:hover { color: oklch(var(--foreground-900)); }
.hover\:text-primary-600:hover { color: oklch(var(--primary-600)); }
.hover\:border-accent-300:hover { border-color: oklch(var(--accent-300)); }
.hover\:border-accent-400:hover { border-color: oklch(var(--accent-400)); }
.hover\:shadow-md:hover { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1); }

/* ── Focus states ── */
.focus\:border-accent-400:focus { border-color: oklch(var(--accent-400)); }

/* ── Placeholder ── */
.placeholder-foreground-400::placeholder { color: oklch(var(--foreground-400)); }

/* ── Outline ── */
.outline-none { outline: none; }

/* ── Hero background overlay ── */
.bg-foreground-900\/40 { background-color: oklch(var(--foreground-900) / 0.4); }

/* ── Form expand animation container ── */
.expandable-section {
  transition: max-height 500ms ease-in-out, opacity 500ms ease-in-out;
  overflow: hidden;
}
.expandable-section.collapsed {
  max-height: 0;
  opacity: 0;
}
.expandable-section.expanded {
  max-height: 3000px;
  opacity: 1;
}

/* FAQ expand animation */
.faq-answer {
  transition: all 300ms ease-in-out;
  overflow: hidden;
}
.faq-answer.collapsed {
  max-height: 0;
  opacity: 0;
}
.faq-answer.expanded {
  max-height: 600px;
  opacity: 1;
}

/* ── Sticky bottom bar ── */
.sticky-bottom-bar {
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}
.sticky-bottom-bar.hidden-bar {
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
}
.sticky-bottom-bar.visible-bar {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

/* ── Select dropdown icon fix ── */
.select-wrapper {
  position: relative;
}
.select-wrapper select {
  padding-right: 2.5rem;
}
.select-wrapper .select-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: oklch(var(--foreground-400));
  font-size: 1.125rem;
}

/* ── Input base ── */
.input-base {
  width: 100%;
  padding: 1rem 1rem;
  border-radius: 0.75rem;
  background-color: white;
  border: 1px solid oklch(var(--background-200));
  font-family: var(--font-body);
  font-size: 1rem;
  color: oklch(var(--foreground-950));
  outline: none;
  transition: border-color 150ms ease;
}
.input-base:focus {
  border-color: oklch(var(--accent-400));
}
.input-base.input-error {
  border-color: oklch(var(--primary-400));
}
.input-base::placeholder {
  color: oklch(var(--foreground-400));
}

/* ── Button base ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  background-color: oklch(var(--primary-500));
  color: white;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  transition: background-color 150ms ease;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}
.btn-primary:hover {
  background-color: oklch(var(--primary-600));
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  border-radius: 0.75rem;
  border: 1px solid oklch(var(--primary-500));
  background-color: white;
  color: oklch(var(--primary-500));
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  transition: background-color 150ms ease, color 150ms ease;
  white-space: nowrap;
  cursor: pointer;
}
.btn-outline:hover {
  background-color: oklch(var(--primary-500));
  color: white;
}

.btn-submit {
  width: 100%;
  padding: 1.25rem;
  border-radius: 0.75rem;
  background-color: oklch(var(--primary-500));
  color: white;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  transition: background-color 150ms ease;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}
.btn-submit:hover {
  background-color: oklch(var(--primary-600));
}

.btn-disabled {
  width: 100%;
  padding: 1rem;
  border-radius: 0.75rem;
  background-color: rgb(239, 68, 68);
  color: white;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
  border: none;
  cursor: not-allowed;
  white-space: nowrap;
}

/* Lock badge */
.btn-lock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background-color: oklch(var(--accent-50));
  border: 1px solid oklch(var(--accent-300));
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.btn-lock-badge:hover {
  background-color: oklch(var(--accent-100));
  border-color: oklch(var(--accent-400));
}

/* ── Female tag ── */
.pill-tag {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ── User pill badge ── */
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background-color: white;
  border-radius: 9999px;
  padding: 0.65rem 1rem;
  border: 1px solid oklch(var(--foreground-100));
  box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
}

/* ── Spacing for line ── */
.bg-foreground-200 { background-color: oklch(var(--foreground-200)); }

/* ── Chart cell base ── */
.chart-cell {
  border-radius: 0.5rem;
  border: 1px solid oklch(var(--foreground-100));
  padding: 0.5rem;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: oklch(var(--background-50));
}
.chart-cell.highlighted {
  background-color: oklch(var(--primary-50));
  border-color: oklch(var(--primary-200));
}

/* ── Decorative corners ── */
.deco-corner-tl {
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  width: 0.75rem;
  height: 0.75rem;
  border-top: 2px solid oklch(var(--accent-300));
  border-left: 2px solid oklch(var(--accent-300));
  border-top-left-radius: 0.125rem;
}
.deco-corner-tr {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 0.75rem;
  height: 0.75rem;
  border-top: 2px solid oklch(var(--accent-300));
  border-right: 2px solid oklch(var(--accent-300));
  border-top-right-radius: 0.125rem;
}
.deco-corner-bl {
  position: absolute;
  bottom: 0.25rem;
  left: 0.25rem;
  width: 0.75rem;
  height: 0.75rem;
  border-bottom: 2px solid oklch(var(--accent-300));
  border-left: 2px solid oklch(var(--accent-300));
  border-bottom-left-radius: 0.125rem;
}
.deco-corner-br {
  position: absolute;
  bottom: 0.25rem;
  right: 0.25rem;
  width: 0.75rem;
  height: 0.75rem;
  border-bottom: 2px solid oklch(var(--accent-300));
  border-right: 2px solid oklch(var(--accent-300));
  border-bottom-right-radius: 0.125rem;
}

/* ── Progress bar base ── */
.progress-bar-bg {
  flex: 1;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: oklch(var(--background-200));
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
}

/* ── Form error text ── */
.form-error {
  color: oklch(var(--primary-500));
  font-size: 1rem;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ── Gender button ── */
.gender-btn {
  flex: 1;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid oklch(var(--background-300));
  background-color: white;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: oklch(var(--foreground-950));
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
  white-space: nowrap;
}
.gender-btn:hover {
  border-color: oklch(var(--accent-300));
}
.gender-btn.active {
  border-color: oklch(var(--primary-400));
  background-color: oklch(var(--primary-500));
  color: white;
}

/* ── Scroll-to-top ── */
.scroll-target {
  scroll-margin-top: 0;
}

/* ── Responsive: md (768px+) ── */
@media (min-width: 768px) {
  .md\:block { display: block; }
  .md\:inline { display: inline; }
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }

  .md\:flex-row { flex-direction: row; }

  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:grid-cols-\[120px_minmax\(0\2c 1fr\)_minmax\(0\2c 1fr\)_minmax\(0\2c 1fr\)\] {
    grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  .md\:gap-2 { gap: 0.5rem; }
  .md\:gap-3 { gap: 0.75rem; }
  .md\:gap-4 { gap: 1rem; }
  .md\:gap-5 { gap: 1.25rem; }
  .md\:gap-6 { gap: 1.5rem; }
  .md\:gap-8 { gap: 2rem; }

  .md\:p-3 { padding: 0.75rem; }
  .md\:p-4 { padding: 1rem; }
  .md\:p-5 { padding: 1.25rem; }
  .md\:p-6 { padding: 1.5rem; }
  .md\:p-8 { padding: 2rem; }
  .md\:p-10 { padding: 2.5rem; }
  .md\:px-4 { padding-left: 1rem; padding-right: 1rem; }
  .md\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .md\:px-8 { padding-left: 2rem; padding-right: 2rem; }
  .md\:py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .md\:py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .md\:py-8 { padding-top: 2rem; padding-bottom: 2rem; }
  .md\:py-20 { padding-top: 5rem; padding-bottom: 5rem; }
  .md\:py-24 { padding-top: 6rem; padding-bottom: 6rem; }

  .md\:mt-8 { margin-top: 2rem; }

  .md\:text-left { text-align: left; }

  .md\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  .md\:text-base { font-size: 1rem; line-height: 1.5rem; }
  .md\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .md\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .md\:text-5xl { font-size: 3rem; line-height: 1; }
  .md\:text-\[3rem\] { font-size: 3rem; }

  .md\:w-5 { width: 1.25rem; }
  .md\:w-12 { width: 3rem; }
  .md\:w-14 { width: 3.5rem; }
  .md\:w-20 { width: 5rem; }
  .md\:w-32 { width: 8rem; }
  .md\:w-\[100px\] { width: 100px; }
  .md\:h-12 { height: 3rem; }
  .md\:h-14 { height: 3.5rem; }
  .md\:h-20 { height: 5rem; }
  .md\:h-\[100px\] { height: 100px; }
  .md\:min-h-\[90px\] { min-height: 90px; }
  .md\:min-w-\[64px\] { min-width: 64px; }
  .md\:max-w-2xl { max-width: 42rem; }

  .md\:items-start { align-items: flex-start; }
  .md\:mx-auto { margin-left: auto; margin-right: auto; }

  /* Comparison table - md only column */
  .md-only-col { display: none; }
  .md\:block.md-only-col { display: block; }
}

/* ── Responsive: lg (1024px+) ── */
@media (min-width: 1024px) {
  .lg\:flex-row { flex-direction: row; }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:w-\[400px\] { width: 400px; }
}

/* ── Responsive: sm (640px+) ── */
@media (min-width: 640px) {
  .sm\:inline { display: inline; }
  .sm\:flex { display: flex; }
  .sm\:hidden { display: none; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:w-auto { width: auto; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:gap-2 { gap: 0.5rem; }
  .sm\:gap-4 { gap: 1rem; }
  .sm\:gap-5 { gap: 1.25rem; }
  .sm\:gap-6 { gap: 1.5rem; }
  .sm\:px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .sm\:px-8 { padding-left: 2rem; padding-right: 2rem; }
  .sm\:px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
  .sm\:py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
  .sm\:py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .sm\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  .sm\:text-base { font-size: 1rem; line-height: 1.5rem; }
  .sm\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .sm\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .sm\:w-12 { width: 3rem; }
  .sm\:h-12 { height: 3rem; }
}

/* 新增 因為會被共用的reset */
body section strong {
  font-weight: bolder;
}