*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  :root {
    --bg: #FAFAF7;
    --surface: #FFFFFF;
    --surface2: #F4F3EE;
    --text: #1C1917;
    --muted: #78716C;
    --accent: #D97706;
    --accent-light: #FEF3C7;
    --accent2: #B45309;
    --green: #047857;
    --green-light: #ECFDF5;
    --blue: #2563EB;
    --blue-light: #EFF6FF;
    --red: #DC2626;
    --red-light: #FEF2F2;
    --border: #E7E5DF;
  }
  body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; display: flex; flex-direction: column; }
  header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 2rem; height: 60px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
  .logo { font-family: 'Lora', serif; font-size: 22px; color: var(--accent2); text-decoration: none; letter-spacing: -0.5px; }
  .logo span { font-style: italic; }
  .nav-links { display: flex; gap: 1.25rem; align-items: center; }
  .nav-links a { font-size: 13px; text-decoration: none; color: var(--muted); font-weight: 500; }
  .nav-links a:hover { color: var(--accent); }
  @media (max-width: 520px) { .nav-links a:not(.nav-home) { display: none; } }
  .ad-banner { background: #f5f5f5; border-bottom: 1px solid var(--border); text-align: center; padding: 10px; }
  .ad-label { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 3px; }
  .ad-placeholder { height: 90px; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 12px; border: 1px dashed #ddd; border-radius: 4px; margin: 0 auto; max-width: 728px; }
  .hero-banner { position: relative; height: 280px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
  .hero-bg { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(180,83,9,0.88) 0%, rgba(217,119,6,0.78) 100%), url('https://images.unsplash.com/photo-1490645935967-10de6ba17061?w=1000&q=72&fit=crop&auto=format') center/cover no-repeat; }
  .hero-content { position: relative; text-align: center; color: white; padding: 0 1.5rem; }
  .hero-eyebrow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.15em; color: rgba(255,255,255,0.75); margin-bottom: 0.75rem; }
  .hero-content h1 { font-family: 'Lora', serif; font-size: clamp(2rem, 5vw, 3rem); font-weight: 400; line-height: 1.1; margin-bottom: 0.75rem; }
  .hero-content h1 em { font-style: italic; }
  .hero-content p { font-size: 15px; color: rgba(255,255,255,0.82); font-weight: 300; max-width: 420px; margin: 0 auto; }
  main { flex: 1; max-width: 720px; margin: 0 auto; width: 100%; padding: 2.5rem 1.5rem; }
  .card { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 2.5rem; margin-bottom: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
  .unit-toggle { display: flex; background: var(--surface2); border-radius: 12px; padding: 4px; margin-bottom: 2rem; }
  .unit-btn { flex: 1; padding: 0.6rem; border: none; border-radius: 9px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; background: transparent; color: var(--muted); }
  .unit-btn.active { background: var(--surface); color: var(--accent2); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
  .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
  @media (max-width: 480px) { .form-grid { grid-template-columns: 1fr; } }
  .field { margin-bottom: 0; }
  .field label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.5rem; }
  .input-wrap { position: relative; }
  .input-wrap input, .input-wrap select { width: 100%; padding: 0.85rem 3rem 0.85rem 1rem; border: 1.5px solid var(--border); border-radius: 12px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; color: var(--text); background: var(--bg); outline: none; transition: border-color 0.2s; appearance: none; -webkit-appearance: none; }
  .input-wrap select { padding-right: 2.5rem; cursor: pointer; }
  .input-wrap input:focus, .input-wrap select:focus { border-color: var(--accent); background: white; }
  .input-unit { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--muted); font-weight: 500; pointer-events: none; }
  .height-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .activity-section { margin-bottom: 1.5rem; }
  .activity-section label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.75rem; }
  .activity-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  @media (max-width: 480px) { .activity-grid { grid-template-columns: 1fr; } }
  .activity-btn { padding: 0.75rem 1rem; border: 1.5px solid var(--border); border-radius: 12px; background: var(--bg); font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; color: var(--muted); cursor: pointer; text-align: left; transition: all 0.15s; line-height: 1.3; }
  .activity-btn:hover { border-color: var(--accent); color: var(--text); }
  .activity-btn.selected { border-color: var(--accent); background: var(--accent-light); color: var(--accent2); font-weight: 500; }
  .activity-btn strong { display: block; font-size: 12px; margin-bottom: 1px; }
  .activity-btn span { font-size: 11px; color: inherit; opacity: 0.8; }
  .goal-section { margin-bottom: 1.5rem; }
  .goal-section label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.75rem; }
  .goal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  @media (max-width: 480px) { .goal-grid { grid-template-columns: 1fr; } }
  .goal-btn { padding: 0.85rem 0.5rem; border: 1.5px solid var(--border); border-radius: 12px; background: var(--bg); font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; color: var(--muted); cursor: pointer; text-align: center; transition: all 0.15s; }
  .goal-btn:hover { border-color: var(--accent); color: var(--text); }
  .goal-btn.selected { border-color: var(--accent); background: var(--accent-light); color: var(--accent2); font-weight: 500; }
  .goal-btn .goal-icon { font-size: 1.5rem; display: block; margin-bottom: 4px; }
  .calc-btn { width: 100%; padding: 1rem; background: var(--accent2); color: white; border: none; border-radius: 14px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; font-weight: 600; cursor: pointer; transition: background 0.2s, transform 0.1s; }
  .calc-btn:hover { background: var(--accent); }
  .calc-btn:active { transform: scale(0.99); }
  .result-box { display: none; }
  .result-box.show { display: block; animation: fadeUp 0.4s ease; }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
  .calorie-hero { background: linear-gradient(135deg, var(--accent2), var(--accent)); border-radius: 20px; padding: 2rem; text-align: center; color: white; margin-bottom: 1rem; }
  .calorie-number { font-family: 'Lora', serif; font-size: clamp(4rem, 15vw, 6rem); font-weight: 600; line-height: 1; }
  .calorie-unit { font-size: 18px; opacity: 0.85; margin-top: 0.25rem; }
  .calorie-goal { font-size: 14px; opacity: 0.75; margin-top: 0.5rem; }
  .calorie-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-bottom: 1rem; }
  @media (max-width: 400px) { .calorie-cards { grid-template-columns: 1fr; } }
  .calorie-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem; text-align: center; }
  .calorie-card .num { font-family: 'Lora', serif; font-size: 1.5rem; font-weight: 600; line-height: 1; }
  .calorie-card .lbl { font-size: 11px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
  .calorie-card.loss { border-color: #BFDBFE; background: var(--blue-light); }
  .calorie-card.loss .num { color: var(--blue); }
  .calorie-card.maintain { border-color: #A7F3D0; background: var(--green-light); }
  .calorie-card.maintain .num { color: var(--green); }
  .calorie-card.gain { border-color: #FECACA; background: var(--red-light); }
  .calorie-card.gain .num { color: var(--red); }
  .macro-section { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; margin-bottom: 1rem; }
  .macro-section h2 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 1rem; }
  .macro-bar { margin-bottom: 0.75rem; }
  .macro-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 0.3rem; }
  .macro-label span:first-child { font-weight: 500; }
  .macro-label span:last-child { color: var(--muted); }
  .macro-track { height: 8px; background: var(--surface2); border-radius: 100px; overflow: hidden; }
  .macro-fill { height: 100%; border-radius: 100px; transition: width 0.6s ease; }
  .macro-fill.protein { background: var(--blue); }
  .macro-fill.carbs { background: var(--accent); }
  .macro-fill.fat { background: var(--green); }
  .bmr-box { background: var(--accent-light); border: 1px solid rgba(217,119,6,0.2); border-radius: 14px; padding: 1.25rem; margin-bottom: 1rem; }
  .bmr-box h3 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent2); margin-bottom: 0.5rem; }
  .bmr-box p { font-size: 14px; color: var(--text); }
  .bmr-box strong { font-family: 'Lora', serif; font-size: 18px; color: var(--accent2); }
  .ad-block { background: #f9f9f9; border: 1px dashed #ddd; border-radius: 12px; padding: 1rem; text-align: center; font-size: 11px; color: var(--muted); margin-bottom: 1.5rem; min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
  .info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-bottom: 1.5rem; }
  @media (max-width: 480px) { .info-grid { grid-template-columns: 1fr; } }
  .info-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.25rem; }
  .info-card .icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
  .info-card h2 { font-size: 13px; font-weight: 600; margin-bottom: 0.25rem; }
  .info-card h3 { font-size: 13px; font-weight: 600; margin-bottom: 0.25rem; }
  .info-card p { font-size: 12px; color: var(--muted); line-height: 1.5; }
  .faq { margin-bottom: 2rem; }
  .faq h2 { font-family: 'Lora', serif; font-size: 1.75rem; font-weight: 400; margin-bottom: 1rem; }
  .faq-item { border-bottom: 1px solid var(--border); padding: 1rem 0; }
  .faq-item h3 { font-size: 14px; font-weight: 600; margin-bottom: 0.4rem; }
  .faq-item p { font-size: 13px; color: var(--muted); line-height: 1.6; }
  footer { background: var(--surface); border-top: 1px solid var(--border); padding: 1.5rem 2rem; text-align: center; font-size: 12px; color: var(--muted); }
  footer a { color: var(--accent2); text-decoration: underline; }
  .error-msg { display: none; color: #EF4444; font-size: 13px; margin-top: 0.75rem; text-align: center; }
  .error-msg.show { display: block; }

.cal-content h2 { font-family: 'Fraunces', serif; font-size: 1.6rem; font-weight: 400; margin: 2rem 0 0.75rem; line-height: 1.2; }
    .cal-content h2 em { font-style: italic; }
    .cal-content p { font-size: 15px; color: #2C2B28; margin-bottom: 1rem; line-height: 1.75; }
    .cal-content strong { font-weight: 600; color: var(--text); }
    .cal-data-table { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; margin: 1.5rem 0; }
    .cal-data-table .t-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 1rem 1.25rem 0.75rem; border-bottom: 1px solid var(--border); }
    .cal-data-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
    .cal-data-table th { text-align: left; padding: 0.6rem 1.25rem; background: var(--surface2); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
    .cal-data-table td { padding: 0.7rem 1.25rem; border-bottom: 1px solid var(--border); }
    .cal-data-table tr:last-child td { border-bottom: none; }
    .cal-data-table td.hi { font-family: 'Fraunces', serif; font-size: 15px; font-weight: 700; color: var(--accent); }
    @media (max-width: 520px) { .cal-data-table td, .cal-data-table th { padding: 0.5rem 0.75rem; font-size: 12px; } }
    .cal-insight { background: var(--blue-light); border-left: 4px solid var(--blue); border-radius: 0 12px 12px 0; padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
    .cal-insight .i-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--blue); margin-bottom: 0.4rem; }
    .cal-insight p { font-size: 14px; color: var(--text); margin: 0; line-height: 1.6; }
    .cal-formula { background: var(--surface2); padding: 1rem 1.25rem; border-radius: 10px; font-family: monospace; font-size: 13px; color: var(--text); margin: 1rem 0; }
    .cal-mistake-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 1.5rem 0; }
    @media (max-width: 520px) { .cal-mistake-grid { grid-template-columns: 1fr; } }
    .cal-mistake-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.1rem; }
    .cal-mistake-card h3 { font-size: 13px; font-weight: 600; margin-bottom: 0.25rem; color: var(--text); }
    .cal-mistake-card p { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0; }
