.calorie-calculator{max-width:680px;margin:0 auto;color:#1d3448}.calc-head{margin-bottom:24px}.calc-head>p,.calc-result-label{margin:0 0 6px;color:#557082;font-size:calc(var(--app-text-scale, 1) * 14px)}.calc-head h2{margin:0 0 16px;padding:12px 18px;border:1px solid #dce8f0;border-radius:999px;background:linear-gradient(120deg,#edf5fa,#f6f8fb);color:#214f6e;font-size:calc(var(--app-text-scale, 1) * 24px);font-weight:750;line-height:1.25;text-align:center;overflow-wrap:anywhere}.calc-progress-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center}.calc-progress-value{min-width:42px;color:#315971;font-size:calc(var(--app-text-scale, 1) * 14px);font-weight:650;font-variant-numeric:tabular-nums;text-align:right}.calc-progress{height:8px;border-radius:99px;background:#e3edf2;overflow:hidden}.calc-progress-fill{display:block;height:100%;width:var(--calc-to);border-radius:inherit;background:#1680ad}@keyframes calc-progress-step{from{width:var(--calc-from)}to{width:var(--calc-to)}}html[data-motion-enabled="true"] .calorie-calculator[data-animate-progress="true"] .calc-progress-fill{animation:calc-progress-step 350ms ease-out both}.calorie-calculator fieldset{border:0;padding:0;margin:0}.calorie-calculator legend{font-weight:600;font-size:calc(var(--app-text-scale, 1) * 17px);line-height:1.4;margin-bottom:14px}.calc-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0 22px}.calc-choice{display:flex;align-items:center;gap:11px;min-height:56px;padding:10px 13px;border:1px solid #d4e1e8;border-radius:11px;background:#fff;cursor:pointer}.calc-choice:has(input:checked){border-color:#368cb1;background:#eef7fb;box-shadow:0 0 0 1px #368cb1}.calc-choice input{width:20px;height:20px;flex:0 0 auto;accent-color:#087ca8}.calc-choice span{display:grid;gap:2px}.calc-choice strong{font-size:calc(var(--app-text-scale, 1) * 15px);font-weight:600}.calc-choice small{font-size:calc(var(--app-text-scale, 1) * 13px);line-height:1.35;color:#526c7b}.calc-field{display:grid;gap:7px;font-weight:550;font-size:calc(var(--app-text-scale, 1) * 15px);max-width:360px}.calc-input-wrap{display:flex;align-items:center;gap:8px}.calc-input-wrap input{width:100%;min-width:0;min-height:48px;padding:10px 12px;border:1px solid #bacbd6;border-radius:9px;background:#fff;color:#1d3448;font:inherit;font-size:calc(var(--app-text-scale, 1) * 16px)}.calc-input-wrap>span{color:#526c7b;font-size:calc(var(--app-text-scale, 1) * 14px);white-space:nowrap}.calc-input-wrap input:focus-visible,.calc-choice:focus-within,.calc-actions button:focus-visible{outline:3px solid #1680ad;outline-offset:2px}.calc-help{font-size:calc(var(--app-text-scale, 1) * 14px);line-height:1.45;color:#526c7b}.calc-result{padding:22px;border:1px solid #d4e1e8;border-radius:14px;background:#f5fafc}.calc-result>p{color:#526c7b;font-size:calc(var(--app-text-scale, 1) * 14px);line-height:1.45}.calc-energy{margin:0;font-size:calc(var(--app-text-scale, 1) * 18px)}.calc-energy strong{font-size:calc(var(--app-text-scale, 1) * 34px);color:var(--macro-kcal-text)}.calc-basis{font-weight:600;color:#1d3448!important}.calc-macros{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:20px 0}.calc-macros>div{padding:13px;background:white;border:1px solid #dbe7ec;border-radius:10px}.calc-macros dt{font-size:calc(var(--app-text-scale, 1) * 13px);color:#526c7b}.calc-macros dd{margin:4px 0 0;font-size:calc(var(--app-text-scale, 1) * 20px);font-weight:650}.calc-error{padding:12px 14px;border-radius:9px;background:#fff1ef;color:#8b332b;font-size:calc(var(--app-text-scale, 1) * 14px);line-height:1.45}.calc-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:center;margin-top:24px}.calc-actions button{min-height:48px;padding:10px 16px;border:1px solid #bdced8;border-radius:9px;background:white;color:#1d3448;font:inherit;font-weight:550;cursor:pointer}.calc-actions button.primary{margin-left:0;background:#087ca8;color:white;border-color:#087ca8}.calc-actions button:hover{filter:brightness(.97)}.calc-actions button:disabled{color:#8a9aa5;border-color:#e0e7ec;background:#f5f7f9;cursor:default}@media(max-width:520px){.calorie-calculator{width:100%;max-width:100%}.calc-head{margin-bottom:20px}.calc-head h2{font-size:calc(var(--app-text-scale, 1) * 22px)}.calc-choice-grid{grid-template-columns:1fr}.calc-choice{min-height:56px}.calc-macros{gap:6px}.calc-macros>div{padding:10px 8px}.calc-macros dd{font-size:calc(var(--app-text-scale, 1) * 17px)}.calc-actions{position:sticky;bottom:0;flex-wrap:wrap;padding:10px;margin:20px -12px -12px;background:#ffffffed;backdrop-filter:blur(8px);z-index:2}.calc-actions button{flex:1;min-width:95px}.calc-actions button.primary{margin-left:0}}@media(prefers-reduced-motion:reduce){.calorie-calculator *{scroll-behavior:auto!important;transition:none!important}html[data-motion-enabled="true"] .calorie-calculator .calc-progress-fill{animation:none!important}}
.calc-result{text-align:center}.calc-result-label{margin:0 auto 10px;max-width:30ch;font-size:calc(var(--app-text-scale, 1) * 17px);color:#315971}.calc-result .calc-energy{margin:0}.calc-macros{grid-template-columns:repeat(4,minmax(0,1fr));text-align:center}.calc-result-macro dt{display:flex;align-items:center;justify-content:center;gap:6px;font-weight:600}.calc-result-macro dt .macro-chip-icon,.calc-fibre-icon{width:23px;height:23px;flex:0 0 23px}.calc-result-macro dd{margin-top:7px}.calc-result-macro.macro-kcal{background:var(--macro-kcal-bg);border-color:var(--macro-kcal-accent);color:var(--macro-kcal-text)}.calc-result-macro.macro-protein{background:var(--macro-protein-bg);border-color:var(--macro-protein-accent);color:var(--macro-protein-text)}.calc-result-macro.macro-carbs{background:var(--macro-carbs-bg);border-color:var(--macro-carbs-accent);color:var(--macro-carbs-text)}.calc-result-macro.macro-fat{background:var(--macro-fat-bg);border-color:var(--macro-fat-accent);color:var(--macro-fat-text)}.calc-result-macro.macro-fibre{background:var(--macro-fibre-bg);border-color:var(--macro-fibre-accent);color:var(--macro-fibre-text)}.calc-result-macro dt .macro-chip-icon{background-image:url('./images/macro-icons.png');background-size:200% 200%;background-repeat:no-repeat}.calc-result-macro dt .macro-chip-icon-protein{background-position:100% 0%}.calc-result-macro dt .macro-chip-icon-carbs{background-position:0% 100%}.calc-result-macro dt .macro-chip-icon-fat{background-position:100% 100%}
@media(max-width:520px){.calc-macros{grid-template-columns:repeat(2,minmax(0,1fr))}.calc-result-macro dt{gap:4px}}
/* Native popover keeps help above the calculator without moving its choices. */
html .calorie-calculator button.calc-protein-info,
html #modal button.calc-protein-info{display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;min-height:44px;margin:0;padding:10px;border:0;border-radius:50%;background:transparent;color:#1e678b;box-shadow:none;cursor:pointer}
html .calorie-calculator button.calc-protein-info:hover,
html #modal button.calc-protein-info:hover{background:#eaf4fa}
.calc-protein-info svg,.calc-info-close svg{display:block;width:24px;height:24px;flex:none;pointer-events:none}
html .calc-info-popover[popover]{box-sizing:border-box;position:fixed;inset:0;width:min(360px,calc(100vw - 40px));max-width:none;max-height:calc(100dvh - 48px);margin:auto;padding:50px 22px 22px;overflow:auto;border:1px solid #d4e1e8;border-radius:22px;background:#fff;color:#1d3448;box-shadow:0 16px 60px #163d6030;text-align:left}
.calc-info-popover::backdrop{background:#153d6426}
html .calc-info-popover>h3{margin:0 0 12px;font-size:calc(var(--app-text-scale, 1) * 18px);line-height:1.3;font-weight:700}
html .calc-info-popover>p{margin:0 0 12px;font-size:calc(var(--app-text-scale, 1) * 15px);line-height:1.55;color:#526c7b}
html .calc-info-popover>p:last-child{margin-bottom:0}
html #modal .calc-info-close,html .calorie-calculator .calc-info-close{position:absolute;inset:5px 5px auto auto;display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;min-height:44px;margin:0;padding:10px;border:0;border-radius:50%;background:transparent;color:#315971;box-shadow:none;cursor:pointer}
html .calorie-calculator .calc-protein-info:focus-visible,
html .calorie-calculator .calc-info-close:focus-visible{outline:3px solid #1680ad;outline-offset:2px}

.calc-progress-row{grid-template-columns:minmax(0,1fr)}.calc-progress{position:relative;height:22px}.step-progress-percent{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#20354e;font-size:calc(var(--app-text-scale, 1) * 12px);font-weight:750;font-variant-numeric:tabular-nums;text-shadow:0 1px 2px #fff,0 0 3px #fff}
.calc-result-macro dt .macro-chip-icon{background:none!important;background-image:none!important}

.calc-progress .step-progress-percent{position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;width:max-content;height:max-content;margin:auto;padding:1px 7px;border-radius:99px;background:#fff;color:#214f6e;font-size:calc(var(--app-text-scale, 1) * 13px);font-weight:700;font-variant-numeric:tabular-nums;text-shadow:none;line-height:1.4}
.calc-goal-groups{display:grid;gap:12px}.calc-goal-group{min-width:0;margin:0;padding:12px;border:1px solid #d8e5ed;border-radius:14px;background:#f8fbfd}.calc-goal-group>h3{margin:0 0 8px;color:#315971;font-size:calc(var(--app-text-scale, 1) * 14px);font-weight:700}.calc-goal-group .calc-choice-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:8px;margin:0}.calc-goal-group .calc-choice{min-width:0;margin:0}.calc-goal-group .calc-choice>span{min-width:0}.calc-goal-group .calc-choice small{overflow-wrap:anywhere}.calc-protein-info,.calc-fat-info{display:flex;align-items:center;justify-content:center;margin:8px auto 0}
html .calorie-calculator button.calc-fat-info{width:44px;min-width:44px;height:44px;min-height:44px;padding:10px;border:0;border-radius:50%;background:transparent;color:#1e678b;box-shadow:none;cursor:pointer}
html .calorie-calculator button.calc-fat-info:hover{background:#eaf4fa}
html .calorie-calculator button.calc-fat-info:focus-visible{outline:3px solid #1680ad;outline-offset:2px}
@media(max-width:520px){.calc-goal-group{padding:10px}.calc-goal-group .calc-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.calc-goal-maintenance .calc-choice-grid{grid-template-columns:1fr}.calc-goal-group .calc-choice{padding:8px;gap:6px}.calc-goal-group .calc-choice strong{font-size:calc(var(--app-text-scale, 1) * 14px);overflow-wrap:anywhere}.calc-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.calc-actions button{min-width:0;white-space:normal;overflow-wrap:anywhere}}

.calc-energy-context{display:grid;gap:8px;margin:16px 0}.calc-energy-context>span{display:block}.calc-energy-context strong{white-space:nowrap}

.calc-goal-group+.calc-goal-group{margin-top:12px}.calc-goal-group.calc-goal-maintenance .calc-choice-grid{grid-template-columns:1fr}
html .calorie-calculator button.calc-protein-info,html #modal button.calc-protein-info,html .calorie-calculator button.calc-fat-info,html #modal button.calc-fat-info{display:flex;margin:8px auto 0}.calc-fat-info svg{display:block;width:24px;height:24px;flex:none;pointer-events:none}
