/*
 * ══════════════════════════════════════════════════════════════
 *  Factive Design System — common.css
 *  Central design tokens, resets, and shared components.
 *
 *  Master reference: hub.html (dark premium aesthetic)
 *  This file provides LIGHT-MODE tokens for supplement & cosmetic
 *  pages, plus shared component classes.
 *
 *  Usage: <link rel="stylesheet" href="/css/common.css">
 *         (must be loaded BEFORE page-specific <style> blocks)
 * ══════════════════════════════════════════════════════════════
 */

/* ── 1. Design Tokens ─────────────────────────────────────── */

:root {
    /* ── Typography ──
     * --font-ui: 본문, 데이터, 성분명, 점수 등 정보성 텍스트 (Pretendard)
     * --font-serif: 히어로 타이틀, 브랜드 로고 등 제한적 사용 (Playfair / Noto Serif KR)
     */
    --font-ui:    'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-serif: 'Playfair Display', 'Noto Serif KR', Georgia, 'Times New Roman', serif;

    /* ── Font Size Scale (9단계 — 새 코드에서 이 토큰 사용 권장) ──
     * --text-2xs: 극소 캡션, 법적 고지
     * --text-xs:  캡션, 라벨, 보조
     * --text-sm:  작은 본문, 설명
     * --text-md:  기본 본문
     * --text-lg:  부제목, 카드 제목
     * --text-xl:  섹션 제목
     * --text-2xl: 페이지 제목
     * --text-3xl: 히어로 제목
     */
    --text-2xs: 10px;
    --text-xs:  11px;
    --text-sm:  13px;
    --text-md:  14px;
    --text-lg:  16px;
    --text-xl:  20px;
    --text-2xl: 24px;
    --text-3xl: 32px;

    /* ── Font Weight (3단계 — 새 코드에서 이 토큰 사용 권장) ── */
    --weight-normal:  400;
    --weight-semi:    600;
    --weight-bold:    700;

    /* ── Surfaces ── */
    --color-bg:          #FFFFFF;
    --color-bg-alt:      #FAFAF9;
    --color-card:        #FFFFFF;
    --color-card-hover:  #FAFAF9;

    /* ── Ink (Text) ── */
    --color-ink:         #1C1917;
    --color-ink-light:   #57534E;
    --color-ink-muted:   #78716C;  /* WCAG AA fix: was #A8A29E (2.94:1), now 4.7:1 */
    --color-ink-dark:    #1C1917;  /* alias for --color-ink, used in inline styles */
    --color-ink-faint:   #D6D3D1;

    /* ── Borders ── */
    --color-border:      #E7E5E4;
    --color-border-hover: rgba(0,0,0,0.12);

    /* ── Accent: Supplement (Green) ── */
    --color-green:       #34D399;
    --color-green-deep:  #2F5D50;
    --color-green-light: #3D7A6A;
    --color-green-pale:  #E8F0ED;
    --color-green-dim:   rgba(52,211,153,0.12);

    /* ── Accent: Cosmetic (Violet) ── */
    --color-violet:      #A78BFA;
    --color-violet-deep: #8B5CF6;
    --color-violet-pale: #EDE9FE;
    --color-violet-dim:  rgba(167,139,250,0.12);

    /* ── Semantic Colors ── */
    --color-amber:       #FBBF24;
    --color-rose:        #E11D48;
    --color-rose-pale:   #FFF1F2;
    --color-emerald:     #059669;
    --color-emerald-pale:#ECFDF5;

    /* ── Grade Colors (Semantic) ── */
    --grade-s:  #2563EB;
    --grade-a:  #059669;
    --grade-a-light: #10B981;
    --grade-b:  #CA8A04;
    --grade-c:  #EA580C;
    --grade-d:  #DC2626;
    --grade-f:  #9CA3AF;

    /* ── Spacing ── */
    --space-xs:   4px;
    --space-sm:   8px;
    --space-md:   16px;
    --space-lg:   24px;
    --space-xl:   32px;
    --space-2xl:  48px;
    --space-3xl:  64px;
    --space-4xl:  96px;

    /* ── Radius ── */
    --radius-sm:  8px;
    --radius-md:  12px;
    --radius-lg:  16px;
    --radius-xl:  20px;
    --radius-2xl: 24px;
    --radius-full: 999px;

    /* ── Shadows ── */
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.06);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg:  0 8px 32px rgba(0,0,0,0.10);
    --shadow-xl:  0 20px 60px rgba(0,0,0,0.12);

    /* ── Transitions ── */
    --ease-out:   cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast: 0.15s;
    --duration-normal: 0.3s;

    /* ── Z-index Scale ── */
    --z-base:       1;    /* in-flow stacking */
    --z-dropdown:   10;   /* dropdowns, popovers */
    --z-sticky:     40;   /* sticky headers, tabs */
    --z-gnb:        50;   /* global nav bar */
    --z-sticky-cta: 60;   /* sticky bottom CTA bars */
    --z-overlay:    1000; /* modals, overlays */
    --z-sheet:      1001; /* bottom sheets */
    --z-toast:      9999; /* toasts, alerts */

    /* ── Semantic Aliases ── */
    --fc-primary:     var(--color-green-deep);
    --fc-accent:      var(--color-violet-deep);
    --fc-bg-warm:     #FAF8F6;
    --fc-ink-heading:  #1F2933;
    --fc-ink-body:     #4A5568;
    --fc-ink-caption:  #9AA5B1;
    /* ── Semantic UI Colors (replacing hardcoded JS colors) ── */
    --color-warning:     #D97706;  /* was #B8860B — amber for adequate/caution */
    --color-warning-bg:  #FFFBF5;
    --color-warning-border: #FED7AA;
    --color-danger:      #DC2626;  /* red for danger/avoid */
    --color-danger-bg:   #FEF2F2;
    --color-danger-border: #FECACA;
    --color-info:        #2563EB;  /* was #3A6EA5 — blue for citations/links */
    --color-info-bg:     #EFF6FF;
    --color-success-bg:  #F0FAF6;
    --color-success-border: #D1E8DD;
    --color-neutral-bg:  #FAFAF9;  /* card backgrounds */
    --color-neutral-border: #F0F0EE;
}

html {
    overflow-x: hidden;
}

body {
    overflow-x: clip;
    background: var(--fc-bg-warm, #FAF8F6);
}

button,
a,
input,
select,
textarea {
    font-family: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(47, 93, 80, 0.28);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    body {
        -webkit-text-size-adjust: 100%;
    }

    button,
    [role="button"],
    input,
    select,
    .fc-btn,
    .adc-bottom-cta__btn {
        min-height: 44px;
    }
}

/* ── Dark Mode — auto-detect ─────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg:          #0F0F0F;
    --color-bg-alt:      #1A1A1A;
    --color-card:        #1A1A1A;
    --color-card-hover:  #222222;
    --color-ink:         #E7E5E4;
    --color-ink-light:   #A8A29E;
    --color-ink-muted:   #78716C;
    --color-ink-faint:   #57534E;
    --color-border:      #2E2E2E;
    --color-border-hover: rgba(255,255,255,0.12);
    --color-green-pale:  rgba(74,222,128,0.1);
    --color-violet-pale: rgba(167,139,250,0.1);
    --color-rose-pale:   rgba(225,29,72,0.1);
    --color-emerald-pale:rgba(5,150,105,0.1);
    --fc-bg-warm:        #141414;
    --fc-ink-heading:    #E7E5E4;
    --fc-ink-body:       #A8A29E;
    --fc-ink-caption:    #78716C;
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.3);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg:  0 8px 32px rgba(0,0,0,0.5);
    --shadow-xl:  0 20px 60px rgba(0,0,0,0.6);
    --color-warning-bg:  #2A2114;
    --color-warning-border: #5C4A2A;
    --color-danger-bg:   #2A1414;
    --color-danger-border: #5C2A2A;
    --color-info-bg:     #141D2A;
    --color-success-bg:  #142A20;
    --color-success-border: #2A5C3A;
    --color-neutral-bg:  #1A1A1A;
    --color-neutral-border: #2E2E2E;
  }
}

/* ── Dark Mode — manual override ─────────────────────────── */
:root[data-theme="dark"] {
    --color-bg:          #0F0F0F;
    --color-bg-alt:      #1A1A1A;
    --color-card:        #1A1A1A;
    --color-card-hover:  #222222;
    --color-ink:         #E7E5E4;
    --color-ink-light:   #A8A29E;
    --color-ink-muted:   #78716C;
    --color-ink-faint:   #57534E;
    --color-border:      #2E2E2E;
    --color-border-hover: rgba(255,255,255,0.12);
    --color-green-pale:  rgba(74,222,128,0.1);
    --color-violet-pale: rgba(167,139,250,0.1);
    --color-rose-pale:   rgba(225,29,72,0.1);
    --color-emerald-pale:rgba(5,150,105,0.1);
    --fc-bg-warm:        #141414;
    --fc-ink-heading:    #E7E5E4;
    --fc-ink-body:       #A8A29E;
    --fc-ink-caption:    #78716C;
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.3);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg:  0 8px 32px rgba(0,0,0,0.5);
    --shadow-xl:  0 20px 60px rgba(0,0,0,0.6);
    --color-warning-bg:  #2A2114;
    --color-warning-border: #5C4A2A;
    --color-danger-bg:   #2A1414;
    --color-danger-border: #5C2A2A;
    --color-info-bg:     #141D2A;
    --color-success-bg:  #142A20;
    --color-success-border: #2A5C3A;
    --color-neutral-bg:  #1A1A1A;
    --color-neutral-border: #2E2E2E;
}

/* ── Dark Mode — component overrides (hardcoded colors) ─── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .fc-search,
  :root:not([data-theme="light"]) .fc-chip,
  :root:not([data-theme="light"]) .fc-share-btn,
  :root:not([data-theme="light"]) .fc-next-actions__btn,
  :root:not([data-theme="light"]) .fc-verdict {
    background: var(--color-card);
    color: var(--color-ink);
  }
  :root:not([data-theme="light"]) .fc-section-tabs {
    background: rgba(15,15,15,0.95);
  }
  :root:not([data-theme="light"]) .fc-sticky-cta {
    background: rgba(15,15,15,0.96);
  }
  :root:not([data-theme="light"]) .fc-skeleton {
    background: linear-gradient(90deg, #1A1A1A 25%, #252525 50%, #1A1A1A 75%);
    background-size: 200% 100%;
  }
  :root:not([data-theme="light"]) .fc-skeleton-card {
    background: var(--color-card);
  }
  :root:not([data-theme="light"]) .fc-skeleton-card__img,
  :root:not([data-theme="light"]) .fc-skeleton-card__line {
    background: linear-gradient(90deg, #1A1A1A 25%, #252525 50%, #1A1A1A 75%);
    background-size: 200% 100%;
  }
  :root:not([data-theme="light"]) .fc-img-placeholder {
    background: linear-gradient(135deg, #1A1A1A 0%, #252525 100%);
  }
  :root:not([data-theme="light"]) .bg-white {
    background-color: var(--color-card);
  }
  :root:not([data-theme="light"]) .hover\:bg-gray-50:hover {
    background-color: #1E1E1E;
  }
  :root:not([data-theme="light"]) .hover\:bg-gray-100:hover {
    background-color: #252525;
  }
}
:root[data-theme="dark"] .fc-search,
:root[data-theme="dark"] .fc-chip,
:root[data-theme="dark"] .fc-share-btn,
:root[data-theme="dark"] .fc-next-actions__btn,
:root[data-theme="dark"] .fc-verdict {
  background: var(--color-card);
  color: var(--color-ink);
}
:root[data-theme="dark"] .fc-section-tabs {
  background: rgba(15,15,15,0.95);
}
:root[data-theme="dark"] .fc-sticky-cta {
  background: rgba(15,15,15,0.96);
}
:root[data-theme="dark"] .fc-skeleton {
  background: linear-gradient(90deg, #1A1A1A 25%, #252525 50%, #1A1A1A 75%);
  background-size: 200% 100%;
}
:root[data-theme="dark"] .fc-skeleton-card {
  background: var(--color-card);
}
:root[data-theme="dark"] .fc-skeleton-card__img,
:root[data-theme="dark"] .fc-skeleton-card__line {
  background: linear-gradient(90deg, #1A1A1A 25%, #252525 50%, #1A1A1A 75%);
  background-size: 200% 100%;
}
:root[data-theme="dark"] .fc-img-placeholder {
  background: linear-gradient(135deg, #1A1A1A 0%, #252525 100%);
}
:root[data-theme="dark"] .bg-white {
  background-color: var(--color-card);
}
:root[data-theme="dark"] .hover\:bg-gray-50:hover {
  background-color: #1E1E1E;
}
:root[data-theme="dark"] .hover\:bg-gray-100:hover {
  background-color: #252525;
}


/* ── 2. Base Reset ────────────────────────────────────────── */

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

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

body {
    font-family: var(--font-ui);
    background: var(--color-bg);
    color: var(--color-ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; }
input, select, textarea { font: inherit; }

/* Typography utilities */
.fc-data { font-family: var(--font-ui); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.fc-serif-hero { font-family: var(--font-serif); }


/* ── 3. Layout Containers ─────────────────────────────────── */
/* 3단계: lg(1140) = 홈/목록/랭킹, md(860) = PDP/상세/비교, sm(640) = 폼/온보딩 */

.fc-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.fc-container--wide {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.fc-container--md {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px;
}

.fc-container--narrow {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 768px) {
    .fc-container,
    .fc-container--wide,
    .fc-container--narrow {
        padding: 0 16px;
    }
}

/* --- 2-Column Report Layout --- */
.fc-2col {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
}
.fc-2col__aside { position: sticky; top: 72px; }
@media (max-width: 960px) {
    .fc-2col { grid-template-columns: 1fr; }
    .fc-2col__aside { position: static; }
}


/* ── 4. Shared Components ─────────────────────────────────── */

/* --- Grade Pill (with accessibility icons + textures) --- */
.fc-grade {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    color: white;
    line-height: 1.3;
    border: 1.5px solid transparent;
    position: relative;
}
/* S — premium blue */
.fc-grade--s  {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    box-shadow: 0 0 8px rgba(37,99,235,0.3);
}
/* A — emerald */
.fc-grade--a  { background: var(--grade-a); }
.fc-grade--al { background: var(--grade-a-light); }
/* B — amber */
.fc-grade--b  { background: var(--grade-b); }
/* C — orange (caution) */
.fc-grade--c  {
    background: var(--grade-c);
}
/* D — red (warning) */
.fc-grade--d  {
    background: var(--grade-d);
}
/* F — muted gray */
.fc-grade--f  {
    background: var(--grade-f);
    color: rgba(255,255,255,0.85);
}

/* Grade accessibility icons — shape + color for color-blind users */
.fc-grade--s::before  { content: '★'; }
.fc-grade--a::before  { content: '✦'; }
.fc-grade--al::before { content: '✓'; }
.fc-grade--b::before  { content: '●'; }
.fc-grade--c::before  { content: '△'; }
.fc-grade--d::before  { content: '▽'; }
.fc-grade--f::before  { content: '⚠'; }


/* --- Skeleton Loading --- */
.fc-skeleton {
    background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
    background-size: 200% 100%;
    animation: fc-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes fc-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Card-shaped skeleton */
.fc-skeleton-card {
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    background: var(--color-card);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.fc-skeleton-card__img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    background: linear-gradient(90deg, #F1F5F9 25%, #E8ECF1 50%, #F1F5F9 75%);
    background-size: 200% 100%;
    animation: fc-shimmer 1.5s ease-in-out infinite;
}
.fc-skeleton-card__line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #F1F5F9 25%, #E8ECF1 50%, #F1F5F9 75%);
    background-size: 200% 100%;
    animation: fc-shimmer 1.5s ease-in-out infinite;
}
.fc-skeleton-card__line--short { width: 55%; }
.fc-skeleton-card__line--medium { width: 80%; }
.fc-skeleton-card__line--badge { width: 40%; height: 10px; margin-top: 2px; }


/* --- Spinner Loading (Premium) --- */
.fc-spinner {
    display: inline-block;
    position: relative;
}
.fc-spinner::before {
    content: '';
    display: block;
    border-radius: 50%;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-violet-deep);
    animation: fc-spin 0.9s cubic-bezier(0.4, 0.15, 0.6, 0.85) infinite;
}
.fc-spinner--green::before {
    border-top-color: var(--color-green-deep);
}
/* Sizes */
.fc-spinner--sm::before { width: 16px; height: 16px; border-width: 2px; }
.fc-spinner--md::before { width: 28px; height: 28px; border-width: 3px; }
.fc-spinner--lg::before { width: 40px; height: 40px; border-width: 3.5px; }
/* White variant (for use inside buttons) */
.fc-spinner--white::before { border-color: rgba(255,255,255,0.3); border-top-color: #fff; }

/* Pulsing dot variant */
.fc-spinner-dots {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.fc-spinner-dots span {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--color-violet-deep);
    animation: fc-dotPulse 1.2s ease-in-out infinite;
}
.fc-spinner-dots span:nth-child(2) { animation-delay: 0.15s; }
.fc-spinner-dots span:nth-child(3) { animation-delay: 0.3s; }
.fc-spinner-dots--green span { background: var(--color-green-deep); }

@keyframes fc-spin {
    to { transform: rotate(360deg); }
}
@keyframes fc-dotPulse {
    0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1.1); }
}

/* --- Fade Animations --- */
.fc-fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fc-fadeUp 0.6s var(--ease-out) forwards;
}

@keyframes fc-fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.fc-delay-1 { animation-delay: 0.1s; }
.fc-delay-2 { animation-delay: 0.2s; }
.fc-delay-3 { animation-delay: 0.3s; }
.fc-delay-4 { animation-delay: 0.4s; }
.fc-delay-5 { animation-delay: 0.5s; }

.fc-fade-in {
    animation: fc-fadeIn 0.4s ease-out both;
}

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


/* --- Buttons --- */
.fc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--duration-fast) ease;
    text-decoration: none;
    line-height: 1.4;
}

.fc-btn--primary {
    background: var(--color-green-deep);
    color: white;
}
.fc-btn--primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.fc-btn--secondary {
    background: transparent;
    color: var(--color-green-deep);
    border: 1px solid var(--color-border);
}
.fc-btn--secondary:hover {
    background: var(--color-green-pale);
    border-color: var(--color-green-deep);
}

.fc-btn--violet {
    background: var(--color-violet-deep);
    color: white;
}
.fc-btn--violet:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}


/* --- Cards --- */
.fc-card {
    border-radius: var(--radius-xl);
    background: var(--color-card);
    border: 1px solid var(--color-border);
    transition: all var(--duration-normal) var(--ease-out);
}

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


/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-ink-faint); }


/* --- Sections --- */
.fc-section {
    padding: var(--space-4xl) 0;
}

.fc-section--alt {
    background: var(--color-bg-alt);
}

@media (max-width: 768px) {
    .fc-section {
        padding: var(--space-3xl) 0;
    }
}


/* --- Search Input --- */
.fc-search {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border-radius: var(--radius-xl);
    border: 1.5px solid var(--color-border);
    background: white;
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.fc-search:focus {
    border-color: var(--color-green-deep);
    box-shadow: 0 0 0 3px rgba(47,93,80,0.12);
}


/* --- Chip / Tag --- */
.fc-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    transition: all var(--duration-fast) ease;
    cursor: pointer;
    border: 1px solid var(--color-border);
    background: white;
    color: var(--color-ink-light);
}

.fc-chip:hover {
    background: var(--color-green-pale);
    color: var(--color-green-deep);
    border-color: var(--color-green-deep);
}

.fc-chip--active {
    background: var(--color-green-deep);
    color: white;
    border-color: var(--color-green-deep);
}


/* --- Divider --- */
.fc-divider {
    height: 1px;
    background: var(--color-border);
    border: none;
}


/* ── 5. Utility Classes ───────────────────────────────────── */

.fc-serif { font-family: var(--font-serif); }
.fc-data { font-family: var(--font-ui); font-variant-numeric: tabular-nums; }
.fc-trust { font-family: var(--font-serif); font-style: italic; color: var(--color-ink-light); }
.fc-text-center { text-align: center; }
.fc-text-muted { color: var(--color-ink-muted); }
.fc-text-light { color: var(--color-ink-light); }
.fc-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }
.hidden { display: none !important; }

/* --- Disclaimer --- */
.fc-disclaimer {
    margin: 20px 0;
    padding: 14px 18px;
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    font-size: 11px;
    color: var(--color-ink-muted);
    line-height: 1.6;
    text-align: center;
}
.fc-disclaimer a { color: var(--color-green-deep); font-weight: 600; }


/* ── 6. Print ─────────────────────────────────────────────── */

@media print {
    .fc-no-print { display: none !important; }
    body { background: white; color: black; }
    .fc-card { box-shadow: none; border: 1px solid #ccc; }
}


/* ── 7. Global Navigation Bar (GNB) ──────────────────────── */

.fc-gnb {
    position: sticky;
    top: 0;
    z-index: var(--z-gnb);
    background: var(--gnb-bg, rgba(255,255,255,0.92));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
}

.fc-gnb__inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 768px) {
    .fc-gnb__inner { padding: 0 16px; gap: 8px; }
    .fc-gnb__nav { flex: 1 1 auto; justify-content: center; min-width: 0; overflow: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; gap: 2px; }
    .fc-gnb__nav::-webkit-scrollbar { display: none; }
    .fc-gnb__link { padding: 6px 10px; font-size: 12px; white-space: nowrap; flex-shrink: 0; }
    .fc-gnb__link[href="/routine"] { display: none; }
    .fc-gnb__logo { font-size: 18px; flex-shrink: 0; }
    .fc-gnb__context { font-size: 11px; margin-left: 4px; }
}

.fc-gnb__logo {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 800;
    color: var(--color-ink);
    text-decoration: none;
    letter-spacing: 0;
    display: flex;
    align-items: baseline;
    gap: 0;
}

.fc-gnb__logo-dot {
    color: var(--color-green);
}

.fc-gnb__context {
    color: var(--color-ink-muted);
    font-weight: 400;
    font-size: 13px;
    margin-left: 6px;
    font-family: var(--font-ui);
    letter-spacing: 0;
}

.fc-gnb__nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.fc-gnb__link {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--color-ink-light);
    text-decoration: none;
    transition: all var(--duration-fast) ease;
}

.fc-gnb__link:hover {
    background: var(--color-bg-alt);
    color: var(--color-ink);
}

/* Active state — Supplement (green) */
.fc-gnb__link--active-green {
    background: var(--color-green-deep);
    color: white;
}
.fc-gnb__link--active-green:hover {
    background: var(--color-green-deep);
    color: white;
    opacity: 0.9;
}

/* Active state — Cosmetic (violet) */
.fc-gnb__link--active-violet {
    background: var(--color-violet-deep);
    color: white;
}
.fc-gnb__link--active-violet:hover {
    background: var(--color-violet-deep);
    color: white;
    opacity: 0.9;
}

/* Dark-mode GNB overrides (used by hub.html) */
.fc-gnb--dark {
    --gnb-bg: rgba(12, 10, 9, 0.92);
    background: var(--gnb-bg);
    border-bottom-color: rgba(255,255,255,0.06);
}

.fc-gnb--dark .fc-gnb__link {
    color: var(--color-ink-muted);
}

.fc-gnb--dark .fc-gnb__link:hover {
    background: rgba(255,255,255,0.06);
    color: var(--color-ink);
}

/* Search button in GNB */
.fc-gnb__search-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--color-ink-light);
    cursor: pointer;
    transition: background var(--duration-fast) ease;
}

.fc-gnb__search-btn:hover {
    background: var(--color-bg-alt);
}

.fc-gnb--dark .fc-gnb__search-btn:hover {
    background: rgba(255,255,255,0.06);
}


/* ── 8. Section Tab Bar (Sticky) ─────────────────────────── */

.fc-section-tabs {
    position: sticky;
    top: 56px;
    z-index: var(--z-sticky);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.fc-section-tabs::-webkit-scrollbar { display: none; }

.fc-section-tabs__inner {
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.fc-section-tabs__item {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--fc-ink-caption);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all var(--duration-fast) ease;
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.fc-section-tabs__item:hover {
    color: var(--fc-ink-body);
}

.fc-section-tabs__item--active {
    color: var(--fc-primary);
    border-bottom-color: var(--fc-primary);
}


/* ── 9. Scroll Reveal & Stagger ──────────────────────────── */

.fc-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.fc-reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

.fc-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    animation: fc-staggerIn 0.4s var(--ease-out) forwards;
}

@keyframes fc-staggerIn {
    to { opacity: 1; transform: translateY(0); }
}

/* Stagger delays: applied via style="animation-delay: Xms" */


/* ── 10. Radar Chart Container ───────────────────────────── */

.fc-radar-wrap {
    width: 180px;
    height: 180px;
    flex-shrink: 0;
}

.fc-radar-wrap canvas {
    width: 100%;
    height: 100%;
}

@media (max-width: 640px) {
    .fc-radar-wrap { width: 140px; height: 140px; }
}


/* ── 11. Image Placeholder ───────────────────────────────── */

.fc-img-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #F5F3F0 0%, #EDE9E4 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-ink-faint);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.fc-img-placeholder::before {
    content: 'F.';
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 800;
    color: var(--color-ink-faint);
    opacity: 0.4;
}


/* ── 12. Next Actions (막다른 페이지 제거) ────────────── */

.fc-next-actions {
    margin-top: var(--space-2xl);
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--color-border);
}

.fc-next-actions__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-ink);
    margin-bottom: var(--space-md);
}

.fc-next-actions__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.fc-next-actions__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 600;
    border: 1.5px solid var(--color-border);
    background: white;
    color: var(--color-ink);
    cursor: pointer;
    transition: all var(--duration-fast) ease;
    text-decoration: none;
    min-height: 44px;
}

.fc-next-actions__btn:hover {
    background: var(--color-green-pale);
    border-color: var(--color-green-deep);
    color: var(--color-green-deep);
    transform: translateY(-1px);
}

.fc-next-actions__btn--primary {
    background: var(--color-green-deep);
    color: white;
    border-color: var(--color-green-deep);
}

.fc-next-actions__btn--primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    background: var(--color-green-deep);
    color: white;
}

.fc-next-actions__btn--violet {
    background: var(--color-violet-deep);
    color: white;
    border-color: var(--color-violet-deep);
}

.fc-next-actions__btn--violet:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    background: var(--color-violet-deep);
    color: white;
}


/* ── 13. Sticky CTA (Mobile) ────────────────────────── */

.fc-sticky-cta {
    position: fixed;
    bottom: 72px;
    left: 0;
    right: 0;
    padding: 10px 16px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--color-border);
    z-index: var(--z-overlay);
    display: none;
}

.fc-sticky-cta__btn {
    width: 100%;
    padding: 14px 24px;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 700;
    border: none;
    background: var(--color-green-deep);
    color: white;
    cursor: pointer;
    min-height: 48px;
    transition: opacity var(--duration-fast) ease;
}

.fc-sticky-cta__btn:active {
    opacity: 0.85;
}

.fc-sticky-cta__btn--violet {
    background: var(--color-violet-deep);
}

@media (max-width: 768px) {
    .fc-sticky-cta { display: block; }
    body.fc-has-btab.fc-has-sticky { padding-bottom: 132px; }
}


/* ── 14. Trust Indicator ────────────────────────────── */

.fc-trust-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    font-size: 12px;
    color: var(--color-ink-light);
}

.fc-trust-bar__item {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.fc-trust-bar__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fc-trust-bar__dot--high { background: var(--grade-a); }
.fc-trust-bar__dot--mid { background: var(--grade-b); }
.fc-trust-bar__dot--low { background: var(--grade-d); }


/* ── 15. Scoring Methodology (shared) ──────────────── */

.fc-scoring-method,
.pd-scoring-method,
.cd-scoring-method {
    margin-top: var(--space-md);
    border-top: 1px solid var(--color-neutral-border);
    padding-top: var(--space-sm);
}
.fc-scoring-toggle,
.pd-scoring-toggle,
.cd-scoring-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-ink-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
}
.fc-scoring-toggle::after,
.pd-scoring-toggle::after,
.cd-scoring-toggle::after {
    content: '▾';
    transition: transform 0.2s;
}
.fc-scoring-toggle.open::after,
.pd-scoring-toggle.open::after,
.cd-scoring-toggle.open::after {
    transform: rotate(180deg);
}
.fc-scoring-detail,
.pd-scoring-detail,
.cd-scoring-detail {
    display: none;
    margin-top: var(--space-sm);
    padding: var(--space-md);
    background: var(--color-neutral-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-neutral-border);
}
.fc-scoring-detail.open,
.pd-scoring-detail.open,
.cd-scoring-detail.open {
    display: block;
}
.fc-scoring-row,
.pd-scoring-row,
.cd-scoring-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--color-neutral-border);
}
.fc-scoring-row:last-of-type,
.pd-scoring-row:last-of-type,
.cd-scoring-row:last-of-type {
    border-bottom: none;
}
.fc-scoring-label,
.pd-scoring-label,
.cd-scoring-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-ink);
    min-width: 80px;
}
.fc-scoring-weight,
.pd-scoring-weight,
.cd-scoring-weight {
    font-size: 13px;
    font-weight: 700;
    color: var(--fc-primary);
    min-width: 36px;
}
.fc-scoring-desc,
.pd-scoring-desc,
.cd-scoring-desc {
    font-size: 12px;
    color: var(--color-ink-muted);
}
.fc-scoring-note,
.pd-scoring-note,
.cd-scoring-note {
    font-size: 11px;
    color: var(--color-ink-muted);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px dashed var(--color-border);
}
@media (max-width: 640px) {
    .fc-scoring-row, .pd-scoring-row, .cd-scoring-row { flex-wrap: wrap; }
    .fc-scoring-desc, .pd-scoring-desc, .cd-scoring-desc { width: 100%; margin-top: 2px; }
}


/* ── 16. Share Button ───────────────────────────────── */

.fc-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--color-border);
    background: white;
    color: var(--color-ink-light);
    cursor: pointer;
    transition: all var(--duration-fast) ease;
}

.fc-share-btn:hover {
    background: var(--color-bg-alt);
    color: var(--color-ink);
}


/* ── 16. Verdict Card (최종 판정) ───────────────────── */

.fc-verdict {
    padding: var(--space-lg);
    border-radius: var(--radius-xl);
    border: 1.5px solid var(--color-border);
    background: white;
    margin-bottom: var(--space-lg);
}

.fc-verdict__label {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.fc-verdict__result {
    font-size: 20px;
    font-weight: 800;
    color: var(--color-ink);
    margin-bottom: 8px;
}

.fc-verdict__reason {
    font-size: 14px;
    color: var(--color-ink-light);
    line-height: 1.6;
}

.fc-verdict--buy { border-color: var(--grade-a); }
.fc-verdict--buy .fc-verdict__result { color: var(--grade-a); }

.fc-verdict--conditional { border-color: var(--grade-b); }
.fc-verdict--conditional .fc-verdict__result { color: var(--grade-b); }

.fc-verdict--low { border-color: var(--grade-c); }
.fc-verdict--low .fc-verdict__result { color: var(--grade-c); }

.fc-verdict--avoid { border-color: var(--grade-d); }
.fc-verdict--avoid .fc-verdict__result { color: var(--grade-d); }


/* ══════════════════════════════════════════════════════════════
   8. Tailwind Replacement Utilities
   Drop-in replacements for Tailwind classes used across pages.
   This allows removal of the Tailwind CDN script.
   ══════════════════════════════════════════════════════════════ */

/* ── Display & Flex ── */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
/* .hidden already defined above with !important — do not re-define here */
.block { display: block; }
.inline-block { display: inline-block; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.self-center { align-self: center; }

/* ── Grid ── */
.grid { display: 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)); }

/* ── Gap ── */
.gap-1 { gap: 4px; }
.gap-1\.5 { gap: 6px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.gap-10 { gap: 40px; }
.gap-12 { gap: 48px; }
.gap-16 { gap: 64px; }

/* ── Spacing: Margin ── */
.mt-0 { margin-top: 0; }
.mt-0\.5 { margin-top: 2px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mr-1 { margin-right: 4px; }
.mb-0\.5 { margin-bottom: 2px; }
.-mx-1 { margin-left: -4px; margin-right: -4px; }

/* ── Spacing: Padding ── */
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }
.px-1 { padding-left: 4px; padding-right: 4px; }
.px-1\.5 { padding-left: 6px; padding-right: 6px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-5 { padding-left: 20px; padding-right: 20px; }
.px-8 { padding-left: 32px; padding-right: 32px; }
.py-0\.5 { padding-top: 2px; padding-bottom: 2px; }
.py-1 { padding-top: 4px; padding-bottom: 4px; }
.py-1\.5 { padding-top: 6px; padding-bottom: 6px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-3\.5 { padding-top: 14px; padding-bottom: 14px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-12 { padding-top: 48px; padding-bottom: 48px; }
.py-16 { padding-top: 64px; padding-bottom: 64px; }
.py-20 { padding-top: 80px; padding-bottom: 80px; }
.pt-1 { padding-top: 4px; }
.pt-6 { padding-top: 24px; }
.pb-1 { padding-bottom: 4px; }
.pb-3 { padding-bottom: 12px; }
.pb-28 { padding-bottom: 112px; }
.pl-12 { padding-left: 48px; }
.pr-4 { padding-right: 16px; }
.pr-10 { padding-right: 40px; }

/* ── Width & Height ── */
.w-4 { width: 16px; }
.w-5 { width: 20px; }
.w-7 { width: 28px; }
.w-full { width: 100%; }
.h-4 { height: 16px; }
.h-5 { height: 20px; }
.h-7 { height: 28px; }
.h-20 { height: 80px; }
.h-40 { height: 160px; }
.h-px { height: 1px; }
.min-w-0 { min-width: 0; }
.min-h-screen { min-height: 100vh; }
.max-w-sm { max-width: 384px; }
.max-w-2xl { max-width: 672px; }
.max-w-3xl { max-width: 768px; }
.w-48 { width: 192px; }

/* ── Typography ── */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-xs { font-size: 12px; line-height: 1.5; }
.text-\[9px\] { font-size: 9px; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-\[13px\] { font-size: 13px; }
.text-\[15px\] { font-size: 15px; }
.text-sm { font-size: 14px; line-height: 1.5; }
.text-base { font-size: 16px; line-height: 1.5; }
.text-lg { font-size: 18px; line-height: 1.6; }
.text-xl { font-size: 20px; }
.text-3xl { font-size: 30px; }
.text-\[28px\] { font-size: 28px; }
.text-\[40px\] { font-size: 40px; }
.text-white { color: #fff; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.6; }
.tracking-tight { letter-spacing: 0; }
.underline { text-decoration: underline; }
.uppercase { text-transform: uppercase; }

/* ── Border & Radius ── */
.rounded { border-radius: 4px; }
.rounded-lg { border-radius: 8px; }
.rounded-xl { border-radius: 12px; }
.rounded-2xl { border-radius: 16px; }
.rounded-full { border-radius: 9999px; }
.border { border-width: 1px; }

/* ── Background ── */
.bg-white { background-color: #fff; }
.bg-transparent { background-color: transparent; }

/* ── Position ── */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.left-4 { left: 16px; }
.right-3 { right: 12px; }
.top-1\/2 { top: 50%; }
.-translate-y-1\/2 { transform: translateY(-50%); }

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

/* ── Z-index ── */
.z-50 { z-index: var(--z-gnb); }

/* ── Effects ── */
.transition { transition: all 0.2s ease; }
.cursor-pointer { cursor: pointer; }
.opacity-0 { opacity: 0; }

/* ── Focus ── */
.focus\:outline-none:focus { outline: none; }

/* ── Hover ── */
.hover\:bg-gray-50:hover { background-color: #F9FAFB; }
.hover\:bg-gray-100:hover { background-color: #F3F4F6; }
.hover\:shadow-sm:hover { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }

/* ── Text clamp ── */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Space between children ── */
.space-y-2 > * + * { margin-top: 8px; }
.space-y-2\.5 > * + * { margin-top: 10px; }
.space-y-6 > * + * { margin-top: 24px; }

/* ── Misc ── */
.mx-auto { margin-left: auto; margin-right: auto; }
.backdrop-blur-md { backdrop-filter: blur(12px); }
.pointer-events-none { pointer-events: none; }
.select-none { user-select: none; }

/* ── Responsive ── */
@media (min-width: 640px) {
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .sm\:flex-row { flex-direction: row; }
    .sm\:flex { display: flex; }
}
@media (min-width: 1024px) {
    .lg\:flex-row { flex-direction: row; }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .lg\:text-left { text-align: left; }
    .lg\:justify-start { justify-content: flex-start; }
}
@media (min-width: 768px) {
    .md\:text-\[48px\] { font-size: 48px; }
}

/* ── Serif font utility ── */
.serif { font-family: var(--font-serif); }


/* ══════════════════════════════════════════════════════════════
   Missing Tailwind Utilities (P0 fix)
   Classes used in JS templates but not previously defined.
   ══════════════════════════════════════════════════════════════ */

/* ── Width & Height (missing) ── */
.w-2\.5 { width: 10px; }
.w-3 { width: 12px; }
.w-8 { width: 32px; }
.w-9 { width: 36px; }
.w-10 { width: 40px; }
.w-11 { width: 44px; }
.w-12 { width: 48px; }
.w-16 { width: 64px; }
.h-2\.5 { height: 10px; }
.h-3 { height: 12px; }
.h-8 { height: 32px; }
.h-9 { height: 36px; }
.h-10 { height: 40px; }
.h-11 { height: 44px; }
.h-12 { height: 48px; }
.h-16 { height: 64px; }
.h-1\.5 { height: 6px; }

/* ── Spacing (missing) ── */
.px-6 { padding-left: 24px; padding-right: 24px; }
.py-5 { padding-top: 20px; padding-bottom: 20px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }
.pt-2 { padding-top: 8px; }
.pt-3 { padding-top: 12px; }
.pt-4 { padding-top: 16px; }
.pb-2 { padding-bottom: 8px; }
.pb-4 { padding-bottom: 16px; }
.pl-4 { padding-left: 16px; }
.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.ml-auto { margin-left: auto; }
.mr-2 { margin-right: 8px; }
.mt-1\.5 { margin-top: 6px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }

/* ── Space between (missing) ── */
.space-y-1 > * + * { margin-top: 4px; }
.space-y-1\.5 > * + * { margin-top: 6px; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; }
.space-x-2 > * + * { margin-left: 8px; }

/* ── Typography (missing) ── */
.text-\[8px\] { font-size: 8px; }
.text-\[12px\] { font-size: 12px; }
.text-\[14px\] { font-size: 14px; }
.text-\[16px\] { font-size: 16px; }
.text-\[17px\] { font-size: 17px; }
.text-\[20px\] { font-size: 20px; }
.text-\[22px\] { font-size: 22px; }
.text-\[24px\] { font-size: 24px; }
.text-\[32px\] { font-size: 32px; }
.text-\[36px\] { font-size: 36px; }
.text-2xl { font-size: 24px; }
.leading-snug { line-height: 1.375; }
.leading-\[1\.15\] { line-height: 1.15; }
.leading-none { line-height: 1; }
.tracking-wide { letter-spacing: 0.025em; }
.font-normal { font-weight: 400; }
.font-black { font-weight: 900; }
.italic { font-style: italic; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.break-keep { word-break: keep-all; }

/* ── Colors (missing) ── */
.text-gray-400 { color: #9CA3AF; }
.text-gray-500 { color: #6B7280; }
.text-gray-600 { color: #4B5563; }
.text-gray-700 { color: #374151; }
.text-green-700 { color: #15803D; }
.bg-gray-50 { background-color: #F9FAFB; }
.bg-gray-100 { background-color: #F3F4F6; }
.bg-green-50 { background-color: #F0FDF4; }
.border-gray-200 { border-color: #E5E7EB; }
.border-gray-300 { border-color: #D1D5DB; }

/* ── Layout (missing) ── */
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.object-cover { object-fit: cover; }
.object-contain { object-fit: contain; }
.shrink-0 { flex-shrink: 0; }
.grow { flex-grow: 1; }

/* ── Effects (missing) ── */
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
.ring-1 { box-shadow: 0 0 0 1px var(--tw-ring-color, #D1D5DB); }
.opacity-50 { opacity: 0.5; }
.opacity-60 { opacity: 0.6; }
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }

/* ── Responsive (missing) ── */
@media (min-width: 768px) {
    .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\:flex-row { flex-direction: row; }
}
@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── AI Labs CDN removal补充 ── */
.text-4xl { font-size: 36px; line-height: 1.2; }
.text-gray-300 { color: #D1D5DB; }
.text-gray-500 { color: #6B7280; }
.text-gray-900 { color: #111827; }
.max-w-4xl { max-width: 896px; }
.py-2\.5 { padding-top: 10px; padding-bottom: 10px; }
.font-light { font-weight: 300; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1); }
.hover\:bg-gray-100:hover { background-color: #F3F4F6; }

/* ── PDP Missing Utilities (P0 design fix) ── */
.rounded-md { border-radius: 6px; }
.w-2 { width: 8px; }
.h-2 { height: 8px; }
.h-full { height: 100%; }
.text-red-500 { color: #EF4444; }
.bg-white\/95 { background-color: rgba(255, 255, 255, 0.95); }
.divide-y > * + * { border-top: 1px solid #E5E7EB; }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-1000 { transition-duration: 1000ms; }
.mb-1\.5 { margin-bottom: 6px; }


/* ══════════════════════════════════════════════════════════════
   9. Animation Aliases (non-prefixed)
   HTML pages use .fade-up / .delay-* (without fc- prefix).
   These are aliases to the fc- keyframes defined above.
   ══════════════════════════════════════════════════════════════ */

.fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fc-fadeUp 0.6s var(--ease-out) forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }


/* ══════════════════════════════════════════════════════════════
   10. Loading Progress Bar (adc-loading)
   Used in routine.html and add_check.html loading states.
   ══════════════════════════════════════════════════════════════ */

.adc-loading {
    text-align: center;
    padding: 48px 20px;
}
.adc-loading__text {
    margin-top: 16px;
    font-size: 14px;
    color: var(--color-ink-light);
    font-weight: 500;
}
.adc-loading__progress {
    margin-top: 20px;
}
.adc-loading__bar {
    width: 200px;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 12px;
}
.adc-loading__fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-green-deep), var(--color-green));
    border-radius: 2px;
    transition: width 0.4s ease;
}
.adc-loading__steps {
    display: flex;
    justify-content: center;
    gap: 16px;
}
.adc-loading__step {
    font-size: 12px;
    color: var(--color-ink-faint);
    font-weight: 500;
    transition: color 0.3s;
}
.adc-loading__step--active {
    color: var(--color-green-deep);
    font-weight: 700;
}


/* ══════════════════════════════════════════════════════════════
   11. Page Tab Navigation (.rt-top-tabs)
   Shared between /routine and /add-check pages.
   ══════════════════════════════════════════════════════════════ */

.rt-top-tabs {
    display: flex;
    border-bottom: 1px solid #E2E8F0;
    margin-bottom: 0;
}
.rt-top-tab {
    flex: 1;
    text-align: center;
    padding: 16px 0;
    font-weight: 500;
    color: var(--color-ink-muted);
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
    border-bottom: 2px solid transparent;
    font-size: 14px;
}
.rt-top-tab:hover {
    color: var(--color-ink);
}
.rt-top-tab--active {
    font-weight: 700;
    color: var(--color-green-deep);
    border-bottom-color: var(--color-green-deep);
}


/* ══════════════════════════════════════════════════════════════
   12. Shared Input Components
   Bottom CTA, Bottom Sheet, Chips — shared by routine/add-check.
   Extracted here to eliminate ~170 lines of duplication.
   ══════════════════════════════════════════════════════════════ */

/* ── Type toggle buttons ── */
.adc-type-btn {
    flex: 1;
    padding: 10px;
    border-radius: var(--radius-md);
    background: #F3F4F6;
    border: 1px solid transparent;
    color: var(--color-ink-light);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.adc-type-btn--active {
    background: #fff;
    border-color: var(--color-green-deep);
    color: var(--color-green-deep);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* ── Quick-fill chips ── */
.adc-chip {
    padding: 6px 12px;
    border-radius: 20px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    color: var(--color-ink-light);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}
.adc-chip:hover {
    background: #F1F5F9;
    border-color: var(--color-green-deep);
    color: var(--color-green-deep);
}

/* ── Sticky Bottom CTA ── */
.adc-bottom-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid #E5E7EB;
    z-index: var(--z-sticky-cta);
    display: flex;
    justify-content: center;
}
body.fc-result-mode .adc-bottom-cta {
    display: none;
}
.adc-bottom-cta__btn {
    width: 100%;
    max-width: 600px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: #E5E7EB;
    color: #9CA3AF;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: not-allowed;
    transition: all 0.2s;
    font-family: inherit;
    min-height: 44px;
}
.adc-bottom-cta__btn--active {
    background: var(--color-green-deep);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(47, 93, 80, 0.2);
}
.adc-bottom-cta__btn--active:hover {
    background: var(--color-green-light);
}

#fc-routine-result-card,
#fc-add-check-result-card,
#verdict-section {
    scroll-margin-top: 88px;
}

.fc-result-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 8px;
    margin-top: 20px;
}

.fc-result-actions .rt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.3;
    text-align: center;
    word-break: keep-all;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.fc-result-actions .rt-btn--primary {
    background: var(--color-green-deep);
    color: #fff;
}

.fc-result-actions .rt-btn--outline {
    background: #fff;
    color: var(--color-green-deep);
    border-color: rgba(47, 93, 80, 0.22);
}

.fc-result-actions .rt-btn:hover {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    #fc-routine-result-card,
    #fc-add-check-result-card,
    #verdict-section {
        scroll-margin-top: 72px;
    }

    body.fc-has-btab #fc-bubble {
        bottom: calc(76px + env(safe-area-inset-bottom));
    }

    body.fc-has-sticky:not(.fc-result-mode) #fc-bubble {
        bottom: calc(92px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 480px) {
    .fc-result-actions {
        grid-template-columns: 1fr;
    }
}

/* ── Bottom Sheet Overlay ── */
.fc-sheet-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: var(--z-overlay);
    opacity: 1;
    transition: opacity 0.3s;
}
.fc-sheet-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    display: none !important;
}

/* ── Bottom Sheet ── */
.fc-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 100%);
    width: 100%;
    max-width: 600px;
    background: var(--color-bg);
    border-radius: 24px 24px 0 0;
    z-index: var(--z-sheet);
    padding: 24px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.fc-bottom-sheet--open {
    transform: translate(-50%, 0);
}
.fc-sheet__handle {
    width: 40px; height: 4px;
    background: #E5E7EB;
    border-radius: 2px;
    margin: 0 auto 16px;
}
.fc-sheet__header h3 {
    font-size: 18px; font-weight: 700; margin-bottom: 4px;
    color: var(--color-ink);
}
.fc-sheet__header p {
    font-size: 13px; color: var(--color-ink-muted); margin-bottom: 24px;
}
.fc-sheet__body {
    overflow-y: auto;
    max-height: 60vh;
}
.fc-sheet-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px;
}
.fc-sheet-row label {
    font-size: 14px; font-weight: 600; color: var(--color-ink);
}
.fc-sheet-row select {
    padding: 8px 12px; border-radius: 8px; border: 1px solid #E5E7EB;
    font-size: 14px; background: var(--color-bg); color: var(--color-ink);
    font-family: inherit;
}
.fc-sheet__actions {
    display: flex; gap: 12px; margin-top: 24px;
}
.fc-sheet__btn {
    flex: 1; padding: 14px; border-radius: 12px;
    font-size: 15px; font-weight: 600; cursor: pointer;
    border: none; font-family: inherit; min-height: 44px;
    transition: all 0.2s;
}
.fc-sheet__btn--secondary {
    background: #F3F4F6; color: var(--color-ink);
}
.fc-sheet__btn--secondary:hover { background: #E5E7EB; }
.fc-sheet__btn--primary {
    background: var(--color-green-deep); color: #fff;
}
.fc-sheet__btn--primary:hover { background: var(--color-green-light); }

/* ── Preset Button & Cards ── */
.rt-preset-btn {
    font-size: 12px;
    color: var(--color-green-deep);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    font-weight: 600;
    font-family: inherit;
}
.fc-sheet-preset-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, border-color 0.2s;
    width: 100%;
    font-family: inherit;
}
.fc-sheet-preset-card:hover {
    background: #F1F5F9;
    border-color: var(--color-green-deep);
}
.preset-card__icon { font-size: 24px; flex-shrink: 0; }
.preset-card__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.preset-card__text strong {
    font-size: 15px;
    color: var(--color-ink);
    font-weight: 700;
}
.preset-card__text span {
    font-size: 13px;
    color: var(--color-ink-muted);
}

/* ── Dark mode overrides for new components ── */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .adc-bottom-cta {
        background: rgba(15, 15, 15, 0.95);
        border-top-color: rgba(255,255,255,0.08);
    }
    :root:not([data-theme="light"]) .fc-bottom-sheet {
        background: var(--color-card);
    }
    :root:not([data-theme="light"]) .fc-sheet-row select {
        background: var(--color-card);
    }
    :root:not([data-theme="light"]) .fc-sheet-preset-card {
        background: var(--color-card);
        border-color: var(--color-border);
    }
    :root:not([data-theme="light"]) .adc-chip {
        background: var(--color-card);
        border-color: var(--color-border);
    }
    :root:not([data-theme="light"]) .adc-type-btn {
        background: var(--color-card);
        color: var(--color-ink-light);
    }
}
:root[data-theme="dark"] .adc-bottom-cta {
    background: rgba(15, 15, 15, 0.95);
    border-top-color: rgba(255,255,255,0.08);
}
:root[data-theme="dark"] .fc-bottom-sheet {
    background: var(--color-card);
}

/* ── Status message ── */
.rt-status-message {
    padding: 16px;
    margin-bottom: 16px;
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--color-ink);
    line-height: 1.5;
    font-weight: 500;
    border: 1px solid var(--color-border);
}

/* ── Hero desc alias ── */
.adc-hero__desc {
    font-size: 15px;
    color: var(--color-ink-light);
    margin-top: 12px;
    line-height: 1.6;
}

/* Release visual system polish: consumer-ready healthcare + wellness */
:root {
    --fc-page-bg: #F7F8F6;
    --fc-surface: #FFFFFF;
    --fc-surface-soft: #F2F6F4;
    --fc-surface-warm: #FBFAF7;
    --fc-border-soft: #E1E7E3;
    --fc-border-strong: #C8D7D0;
    --fc-brand: #2F5D50;
    --fc-brand-hover: #264D43;
    --fc-wellness: #8B7355;
    --fc-beauty: #8B5CF6;
    --fc-text: #111827;
    --fc-text-subtle: #5F6B63;
    --fc-text-muted: #7C8780;
    --fc-shadow-card: 0 12px 34px rgba(17, 24, 39, 0.055);
    --fc-shadow-float: 0 18px 54px rgba(17, 24, 39, 0.09);
    --fc-shadow-focus: 0 0 0 4px rgba(47, 93, 80, 0.13);

    --color-bg: var(--fc-surface);
    --color-bg-alt: var(--fc-surface-warm);
    --color-card: var(--fc-surface);
    --color-border: var(--fc-border-soft);
    --color-border-hover: var(--fc-border-strong);
    --color-ink: var(--fc-text);
    --color-ink-light: var(--fc-text-subtle);
    --color-ink-muted: var(--fc-text-muted);
    --color-green-deep: var(--fc-brand);
    --color-green-light: #3C7567;
    --color-green-pale: #EAF3EF;
    --fc-bg-warm: var(--fc-page-bg);
    --shadow-sm: 0 1px 3px rgba(17, 24, 39, 0.045);
    --shadow-md: var(--fc-shadow-card);
    --shadow-lg: var(--fc-shadow-float);
}

body {
    background: var(--fc-page-bg);
}

.fc-container,
.fc-container--wide,
.fc-container--md,
.fc-container--narrow {
    width: 100%;
}

.fc-btn,
.adc-bottom-cta__btn,
.rt-analyze-btn,
.vr-analyze-btn,
.adc-action__btn,
.vr-pd__cta-btn,
.rt-result-cta__btn {
    min-height: 48px;
    border-radius: 14px;
    font-weight: 750;
}

.fc-btn--primary,
.adc-bottom-cta__btn--active,
.rt-analyze-btn,
.vr-analyze-btn,
.adc-action__btn,
.vr-pd__cta-btn,
.rt-result-cta__btn--primary {
    background: var(--fc-brand);
    color: #fff;
    box-shadow: 0 10px 22px rgba(47, 93, 80, 0.16);
}

.fc-btn--primary:hover,
.adc-bottom-cta__btn--active:hover,
.rt-analyze-btn:hover,
.vr-analyze-btn:hover,
.adc-action__btn:not(:disabled):hover,
.vr-pd__cta-btn:hover,
.rt-result-cta__btn--primary:hover {
    background: var(--fc-brand-hover);
    transform: translateY(-1px);
}

.fc-card,
.section-block,
.rt-goals,
.rt-input-section,
.rt-coverage,
.rt-warning-card,
.rt-rec-card,
.adc-section > .fc-container,
.adc-compare-card,
.adc-warning-card,
.adc-synergy-card,
.vr-mode-card,
.vr-fact-item,
.vr-goal-match,
.score-card,
.breakdown,
.decision-card,
.raw-ings,
.accordion,
.poly-card,
.key-ing-card,
.similar-card {
    border-color: var(--fc-border-soft);
    box-shadow: var(--fc-shadow-card);
}

.fc-card:hover,
.rt-goal-btn:hover,
.hub-question-card:hover,
.hub-domain-card:hover,
.adc-compare-card:hover,
.vr-mode-card:hover,
.poly-card:hover,
.key-ing-card:hover,
.similar-card:hover {
    box-shadow: var(--fc-shadow-float);
}

.hub-search__input,
.rt-search-input,
.adc-search-input,
.vr-search,
.fc-sheet-row select,
.vr-fact-textarea {
    min-height: 50px;
    border-color: var(--fc-border-soft);
    background: #fff;
    color: var(--fc-text);
    box-shadow: 0 3px 12px rgba(17, 24, 39, 0.035);
}

.hub-search__input:focus,
.rt-search-input:focus,
.adc-search-input:focus,
.vr-search:focus,
.vr-fact-textarea:focus {
    border-color: rgba(47, 93, 80, 0.55);
    box-shadow: var(--fc-shadow-focus);
}

.hub-search__results,
.rt-search-results,
.adc-dropdown,
.vr-search-results {
    border: 1px solid rgba(200, 215, 208, 0.95);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 44px rgba(17, 24, 39, 0.12);
    z-index: 80;
    overflow: hidden;
}

.hub-sr-item,
.rt-sr-item,
.adc-dropdown__item,
.vr-sr-item {
    min-height: 52px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.hub-sr-item:hover,
.rt-sr-item:hover,
.adc-dropdown__item:hover,
.vr-sr-item:hover {
    background: var(--fc-surface-soft);
}

.hub-sr-name,
.rt-sr-name,
.adc-dropdown__name,
.vr-sr-name,
.fc-footer__desc,
.fc-footer__col a {
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.fc-gnb {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 0 rgba(17, 24, 39, 0.02);
}

.fc-gnb__link {
    border-radius: 12px;
}

.fc-gnb__link--active-green,
.fc-gnb__link--active-violet {
    box-shadow: 0 6px 16px rgba(47, 93, 80, 0.16);
}

.fc-disclaimer,
.rt-disclaimer,
.adc-disclaimer,
.hub-disclaimer {
    color: var(--fc-text-muted);
}

@media (max-width: 768px) {
    body.fc-has-btab {
        padding-bottom: calc(92px + env(safe-area-inset-bottom));
    }

    .fc-footer__inner {
        padding-bottom: calc(108px + env(safe-area-inset-bottom));
    }

    .fc-btab {
        min-height: 64px;
        box-shadow: 0 -10px 30px rgba(17, 24, 39, 0.08);
    }

    .fc-btab__item {
        border-radius: 12px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .fc-btab__item--active {
        background: rgba(47, 93, 80, 0.08);
    }

    body:has(.adc-bottom-cta:not(.hidden)) #fc-bubble,
    body:has(#bottom-cta:not(.hidden)) #fc-bubble {
        bottom: calc(138px + env(safe-area-inset-bottom));
    }
}
