/*
 * Calculators v2: [chefit_food_calculator] + [chefit_target_calculator].
 * Same visual language as the nutrition diary v2 (tokens copied from assets/diary-v2/src/diary-tokens.css),
 * fully scoped under .cfc so nothing leaks to other screens.
 *
 * Theme / Elementor kit rules for buttons, inputs, headings and tables are neutralised once, here:
 *   .cfc.cfc :where(...)  → specificity (0,2,0): above the theme and the kit, level with the component
 *   rules below (which come later and therefore win).
 * Buttons take their colors from custom properties, so every state (hover / focus / active) is covered
 * by the single reset rule and a component only sets variables.
 */

@font-face{font-family:ChefitHeebo;src:url('../diary-v2/assets/fonts/heebo-400.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:ChefitHeebo;src:url('../diary-v2/assets/fonts/heebo-700.ttf') format('truetype');font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:ChefitHeebo;src:url('../diary-v2/assets/fonts/heebo-800.ttf') format('truetype');font-weight:800;font-style:normal;font-display:swap}

/* ---------- Tokens + local reset ---------- */
.cfc{
	--cfc-primary:#a6e92c;--cfc-primary-hover:#9cdd26;--cfc-on-primary:#1c2b09;
	--cfc-page:#fafbf7;--cfc-surface:#fff;--cfc-soft:#f4f8ed;--cfc-soft-strong:#edf5df;
	--cfc-border:#e5e9df;--cfc-border-strong:#d8dfd1;--cfc-text:#242b2a;--cfc-muted:#68716b;--cfc-green-ink:#466623;
	--cfc-track:#edf0e7;--cfc-progress:#96bc60;
	--cfc-protein:#80b2aa;--cfc-carbs:#cbb981;--cfc-fat:#d29a91;
	--cfc-danger:#a63838;--cfc-danger-soft:#fff2f1;--cfc-focus:#486b20;
	--cfc-radius:20px;--cfc-radius-small:12px;--cfc-shadow:0 3px 16px #28371305;
	--cfc-font:ChefitHeebo,Heebo,Arial,sans-serif;
	font-family:var(--cfc-font);font-size:15px;line-height:1.55;font-weight:400;color:var(--cfc-text);
	direction:rtl;text-align:start;-webkit-text-size-adjust:100%;overflow-wrap:break-word
}
.cfc *,.cfc *::before,.cfc *::after{box-sizing:border-box}
.cfc.cfc :where(h1,h2,h3,h4,p,ul,ol,li,dl,dt,dd,figure,fieldset,legend,table,caption,th,td,output){margin:0;padding:0;border:0;font:inherit;color:inherit;letter-spacing:normal;text-transform:none;background:none}
/* The theme draws a line above every first header row with a (0,2,4) selector. */
.cfc.cfc table thead tr:first-child :where(th,td){border-block-start:0}
/* The reset above is (0,2,0): a rule that sets margin / padding / border / font / color on one of
   those elements must also carry two classes (`.cfc .x`), or it silently loses to the reset. */
.cfc.cfc :where(ul,ol){list-style:none}
.cfc.cfc :where(legend){float:none;width:auto;max-width:100%;white-space:normal}
.cfc.cfc :where(label){display:block;margin:0;line-height:inherit;vertical-align:baseline}
.cfc.cfc :where(img){display:block;border:0;border-radius:0;box-shadow:none}
.cfc.cfc :where(b,strong){font-weight:700}
.cfc.cfc :where(small){font-size:inherit}
.cfc.cfc :where(a){color:inherit;text-decoration:none}
.cfc [hidden]{display:none!important}

.cfc.cfc :where(button,.cfc-button){
	--cfc-b:transparent;--cfc-c:currentColor;--cfc-bh:var(--cfc-b);--cfc-ch:var(--cfc-c);--cfc-bd:transparent;
	-webkit-appearance:none;appearance:none;margin:0;padding:0;border:1px solid var(--cfc-bd);border-radius:0;
	background:var(--cfc-b);color:var(--cfc-c);font:inherit;line-height:1.3;letter-spacing:normal;text-transform:none;
	text-decoration:none;text-align:center;white-space:normal;box-shadow:none;cursor:pointer;min-width:0;
	transition:background-color .15s,color .15s,border-color .15s,transform .15s;-webkit-tap-highlight-color:transparent
}
.cfc.cfc :where(button,.cfc-button):is(:hover,:focus,:active){background:var(--cfc-bh);color:var(--cfc-ch);border-color:var(--cfc-bd);text-decoration:none}
.cfc.cfc :where(button):disabled{opacity:.55;cursor:default}

.cfc.cfc :where(input,select,textarea){
	-webkit-appearance:none;appearance:none;margin:0;padding:0;width:100%;min-width:0;border:0;border-radius:0;
	background:transparent;color:inherit;font:inherit;line-height:1.3;box-shadow:none;outline:none;transition:none
}
.cfc.cfc :where(input[type=number]){-moz-appearance:textfield}
.cfc input[type=number]::-webkit-outer-spin-button,.cfc input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.cfc.cfc :where(input[type=radio]){position:absolute;inset-inline-start:0;top:0;width:1px;height:1px;opacity:0;pointer-events:none}

.cfc :focus-visible{outline:2px solid var(--cfc-focus);outline-offset:2px}
.cfc :focus:not(:focus-visible){outline:none}

.cfc-sr{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.cfc-icon{width:20px;height:20px;flex:none;display:block}
/* Elementor sizes every image with `.elementor img{height:auto;max-width:100%}` (0,1,1). Each image
   rule here therefore starts with `.cfc ` (two classes), otherwise the art renders at its file size. */
.cfc.cfc :where(.cfc-art){pointer-events:none;-webkit-user-select:none;user-select:none;width:auto;height:auto;max-width:none;max-height:none;object-fit:contain}

/* ---------- Buttons ---------- */
.cfc .cfc-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:9px 20px;border-radius:999px;font-size:15px;font-weight:700}
.cfc .cfc-button--primary{--cfc-b:var(--cfc-primary);--cfc-c:var(--cfc-on-primary);--cfc-bh:var(--cfc-primary-hover)}
.cfc .cfc-button--primary:active{transform:translateY(1px)}
.cfc .cfc-button--dark{--cfc-b:var(--cfc-green-ink);--cfc-c:#fff;--cfc-bh:#3a561c}
.cfc .cfc-button--soft{--cfc-b:var(--cfc-soft-strong);--cfc-c:var(--cfc-green-ink);--cfc-bh:#e3efd0}
.cfc .cfc-button--ghost{--cfc-b:#fff;--cfc-c:var(--cfc-text);--cfc-bd:var(--cfc-border);--cfc-bh:var(--cfc-soft)}
.cfc .cfc-button--small{min-height:40px;padding:6px 16px;font-size:14px}
.cfc .cfc-button .cfc-icon{width:18px;height:18px}

.cfc .cfc-link{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:4px 6px;border-radius:10px;font-size:13px;font-weight:700;--cfc-c:var(--cfc-green-ink);--cfc-bh:var(--cfc-soft)}
.cfc .cfc-link .cfc-icon{width:15px;height:15px}
.cfc .cfc-link--danger{--cfc-c:var(--cfc-danger);--cfc-bh:var(--cfc-danger-soft)}
.cfc .cfc-link--muted{--cfc-c:var(--cfc-muted);font-weight:400}
.cfc a.cfc-link{color:var(--cfc-green-ink);text-decoration:underline;text-underline-offset:3px}

.cfc .cfc-icon-button{display:inline-grid;place-items:center;width:44px;height:44px;border-radius:12px;--cfc-c:var(--cfc-muted);--cfc-bh:var(--cfc-soft);--cfc-ch:var(--cfc-green-ink)}
.cfc .cfc-icon-button .cfc-icon{width:17px;height:17px}
.cfc .cfc-icon-button--danger{--cfc-bh:var(--cfc-danger-soft);--cfc-ch:var(--cfc-danger)}

/* ---------- Page frame ---------- */
.cfc-page{background:var(--cfc-page);overflow-x:clip}
.cfc-wrap{max-width:1200px;margin:0 auto;padding:28px 28px 56px}
.cfc-head{margin:0 0 20px}
.cfc .cfc-title{font-size:30px;font-weight:800;line-height:1.2;color:var(--cfc-text)}
.cfc .cfc-lead{margin-top:6px;max-width:80ch;font-size:15px;color:var(--cfc-muted)}

.cfc-layout{display:grid;grid-template-columns:minmax(0,1fr) 348px;grid-template-rows:repeat(4,auto) 1fr;gap:20px 24px;align-items:start}
.cfc-layout>*{grid-column:1;min-width:0}
.cfc-layout>.cfc-side{grid-column:2;grid-row:1/-1;display:grid;gap:20px;position:sticky;top:var(--cfc-top,96px)}

/* ---------- Cards ---------- */
.cfc-card{background:var(--cfc-surface);border:1px solid var(--cfc-border);border-radius:var(--cfc-radius);box-shadow:var(--cfc-shadow);padding:20px 22px}
.cfc-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:40px;margin-bottom:12px}
.cfc .cfc-card-title{font-size:17px;font-weight:700;line-height:1.35}
.cfc-chip{flex:none;padding:3px 11px;border-radius:999px;background:var(--cfc-soft-strong);color:var(--cfc-green-ink);font-size:12px;font-weight:700;white-space:nowrap}

/* ---------- Add banner ---------- */
/* The one hero illustration of the page: the pair holding a plate, cropped under the plate. */
.cfc-banner{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 252px;align-items:center;min-height:186px;padding:24px 28px;padding-inline-end:0;border:1px solid #e3ecd4;border-radius:var(--cfc-radius);background:linear-gradient(105deg,#eff6e4,#f6faee);overflow:hidden}
.cfc-banner.cfc-banner--no-art{grid-template-columns:minmax(0,1fr);padding-inline-end:28px;min-height:0}
.cfc .cfc-banner-title{font-size:24px;font-weight:800;line-height:1.25}
.cfc .cfc-banner-text{margin:5px 0 16px;font-size:14px;color:var(--cfc-muted);max-width:44ch}
.cfc-banner-art{align-self:stretch;position:relative}
.cfc .cfc-banner-art img{position:absolute;top:14px;inset-inline-end:4px;height:272px;animation:cfc-idle 6s ease-in-out infinite}

/* ---------- Summary: graph ---------- */
.cfc-chart{display:grid;grid-template-columns:132px minmax(0,1fr);gap:18px;align-items:center}
.cfc-donut{position:relative;width:132px;aspect-ratio:1;flex:none}
.cfc-donut svg{display:block;width:100%;height:100%;transform:rotate(-90deg)}
.cfc-donut-track{fill:none;stroke:var(--cfc-track);stroke-width:12}
.cfc-donut-seg{fill:none;stroke-width:12;transition:stroke-dasharray .5s cubic-bezier(.2,.7,.2,1),stroke-dashoffset .5s cubic-bezier(.2,.7,.2,1)}
.cfc-donut-seg--protein{stroke:var(--cfc-protein)}
.cfc-donut-seg--carbs{stroke:var(--cfc-carbs)}
.cfc-donut-seg--fat{stroke:var(--cfc-fat)}
.cfc-donut-copy{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;text-align:center;line-height:1.1}
.cfc .cfc-donut-copy b{font-size:27px;font-weight:800;font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.cfc-donut-copy span{margin-top:3px;font-size:12px;color:var(--cfc-muted)}
.cfc-donut--small{width:112px}
.cfc .cfc-donut--small .cfc-donut-copy b{font-size:22px}

.cfc-legend{display:grid;gap:12px}
.cfc-legend-top{display:flex;align-items:baseline;gap:7px;font-size:13px}
.cfc-legend-name{flex:1;min-width:0}
.cfc-legend-value{white-space:nowrap;font-variant-numeric:tabular-nums}
.cfc .cfc-legend-value b{font-size:15px}
.cfc-legend-pct{min-width:36px;text-align:end;color:var(--cfc-muted);font-variant-numeric:tabular-nums}
.cfc-dot{display:inline-block;flex:none;align-self:center;width:10px;height:10px;border-radius:3px}
.cfc-dot--protein{background:var(--cfc-protein)}
.cfc-dot--carbs{background:var(--cfc-carbs)}
.cfc-dot--fat{background:var(--cfc-fat)}
.cfc-bar{display:block;height:6px;margin-top:6px;border-radius:99px;background:var(--cfc-track);overflow:hidden}
.cfc-bar>span{display:block;width:0;height:100%;border-radius:inherit;background:var(--cfc-progress);transition:width .5s cubic-bezier(.2,.7,.2,1)}
.cfc-bar--protein>span{background:var(--cfc-protein)}
.cfc-bar--carbs>span{background:var(--cfc-carbs)}
.cfc-bar--fat>span{background:var(--cfc-fat)}
.cfc .cfc-chart-note{margin-top:12px;font-size:12px;color:var(--cfc-muted)}

.cfc .cfc-mini{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:14px}
.cfc-mini>div{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:9px 12px;border-radius:var(--cfc-radius-small);background:#f9fbf5}
.cfc .cfc-mini dt{font-size:12px;color:var(--cfc-muted)}
.cfc .cfc-mini dd{font-size:13px;white-space:nowrap;font-variant-numeric:tabular-nums}
.cfc-page--food[data-empty="1"] .cfc-mini,.cfc-page--food[data-empty="1"] .cfc-chart-note{display:none}

/* ---------- Target calculator entry card ---------- */
.cfc-target-card{padding:0;overflow:hidden;background:linear-gradient(140deg,#f1f7e6,#fbfdf7)}
.cfc-target-empty{display:grid;grid-template-columns:104px minmax(0,1fr);min-height:164px}
.cfc[data-characters=off] .cfc-target-empty{grid-template-columns:minmax(0,1fr)}
.cfc-target-art{position:relative;overflow:hidden}
.cfc .cfc-target-art img{position:absolute;top:14px;inset-inline-start:10px;height:230px}
.cfc-target-copy{display:grid;gap:7px;align-content:center;justify-items:start;padding:18px;padding-inline-start:6px}
.cfc[data-characters=off] .cfc-target-copy{padding-inline-start:20px}
.cfc .cfc-target-title{font-size:16px;font-weight:800;line-height:1.35}
.cfc .cfc-target-copy p{font-size:13px;color:var(--cfc-muted)}
.cfc .cfc-target-copy .cfc-button{margin-top:4px;min-height:42px;padding:7px 16px;font-size:14px}

.cfc-target-set{padding:18px 20px 12px;background:#fff}
.cfc-target-kicker{font-size:12px;font-weight:700;color:var(--cfc-green-ink)}
.cfc .cfc-target-num{display:flex;align-items:baseline;gap:6px;line-height:1.15}
.cfc .cfc-target-num b{font-size:30px;font-weight:800;font-variant-numeric:tabular-nums}
.cfc-target-num span{font-size:13px;color:var(--cfc-muted)}
.cfc-target-progress{margin-top:10px}
.cfc-target-progress .cfc-bar{height:8px;margin-top:0}
.cfc .cfc-target-progress p{margin-top:7px;font-size:13px}
.cfc-target-card.is-over .cfc-bar--progress>span{background:#d9a441}
.cfc .cfc-target-macros{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:10px;font-size:12px;color:var(--cfc-muted)}
.cfc-target-macros li{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.cfc .cfc-target-macros b{color:var(--cfc-text)}
.cfc-target-actions{display:flex;gap:4px;margin:8px -6px 0}

/* ---------- Foods list ---------- */
.cfc-empty{display:grid;justify-items:center;gap:4px;padding:10px 0 14px;text-align:center}
.cfc-empty-icon{display:grid;place-items:center;width:56px;height:56px;margin-bottom:8px;border-radius:50%;background:var(--cfc-soft-strong);color:var(--cfc-green-ink)}
.cfc-empty-icon .cfc-icon{width:26px;height:26px}
.cfc .cfc-empty-title{font-size:16px;font-weight:700}
.cfc .cfc-empty-text{font-size:13px;color:var(--cfc-muted)}
.cfc .cfc-quick{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:12px;max-width:680px}
.cfc .cfc-quick-chip{min-height:40px;padding:6px 15px;border-radius:999px;font-size:14px;--cfc-b:#fff;--cfc-c:var(--cfc-text);--cfc-bd:var(--cfc-border);--cfc-bh:var(--cfc-soft);--cfc-ch:var(--cfc-green-ink)}

.cfc .cfc-items{margin:0 -22px}
.cfc .cfc-item{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:13px;padding:13px 22px;border-top:1px solid #edf0e8}
.cfc-item.is-new{animation:cfc-new-item .9s ease-out}
.cfc-item-img{display:grid;place-items:center;width:48px;height:48px;border:1px solid #f0f2ec;border-radius:10px;background:#fff;color:var(--cfc-muted);overflow:hidden}
.cfc .cfc-item-img img{width:100%;height:100%;object-fit:cover}
.cfc-item-img--blank{background:var(--cfc-soft);border-color:transparent}
.cfc-item-info{min-width:0}
.cfc .cfc-item-name{display:block;font-size:14px;font-weight:700;line-height:1.45;overflow-wrap:anywhere}
.cfc-item-detail{display:block;margin-top:2px;font-size:12px;line-height:1.5;color:var(--cfc-muted)}
.cfc-item-tag{display:inline-block;margin-inline-start:6px;padding:0 6px;border-radius:6px;background:#f1f6e4;color:#526d1a;font-size:10px;font-weight:700;vertical-align:1px}
.cfc-item-end{display:flex;align-items:center}
.cfc-item-kcal{margin-inline-end:6px;font-size:14px;line-height:1.2;text-align:center;white-space:nowrap;font-variant-numeric:tabular-nums}
.cfc .cfc-item-kcal small{font-size:11px;color:var(--cfc-muted)}
.cfc .cfc-add-more{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:48px;margin-top:6px;border-radius:14px;border-style:dashed;font-size:14px;font-weight:700;--cfc-c:var(--cfc-green-ink);--cfc-bd:#c9d8b3;--cfc-bh:var(--cfc-soft)}
.cfc-list.has-items .cfc-items{border-bottom:1px solid #edf0e8;margin-bottom:12px}

/* ---------- "Dry" data tables ---------- */
.cfc-tabs{display:flex;gap:4px;padding:4px;margin-bottom:4px;border-radius:14px;background:var(--cfc-soft);overflow-x:auto;scrollbar-width:none}
.cfc-tabs::-webkit-scrollbar{display:none}
.cfc .cfc-tab{flex:1 0 auto;min-height:40px;padding:6px 12px;border-radius:10px;font-size:13px;white-space:nowrap;--cfc-c:var(--cfc-muted);--cfc-ch:var(--cfc-text)}
.cfc .cfc-tab[aria-selected=true]{--cfc-b:#fff;--cfc-c:var(--cfc-text);font-weight:700;box-shadow:0 1px 4px #1a2b1a14}
.cfc-panel{border-radius:10px}
.cfc .cfc-table{width:100%;border-collapse:collapse;border-spacing:0;font-size:14px;table-layout:auto}
.cfc.cfc .cfc-table :where(th,td){padding:11px 0;border-bottom:1px solid var(--cfc-border);background:transparent;font-weight:400;line-height:1.5;text-align:start;vertical-align:baseline}
.cfc.cfc .cfc-table td{text-align:end;white-space:nowrap;font-variant-numeric:tabular-nums}
.cfc.cfc .cfc-table tbody tr:last-child>*{border-bottom:0}
.cfc.cfc .cfc-table .is-strong th{font-weight:700}
.cfc.cfc .cfc-table .is-sub th{padding-inline-start:16px;color:var(--cfc-muted)}
.cfc .cfc-table small{font-size:12px;color:var(--cfc-muted)}
.cfc .cfc-table b.is-zero{font-weight:400;color:var(--cfc-muted)}
.cfc-table-pct{display:inline-block;min-width:42px;margin-inline-start:6px;padding:1px 7px;border-radius:99px;background:var(--cfc-soft);color:var(--cfc-green-ink);font-size:12px;text-align:center}

.cfc.cfc .cfc-table--items thead th{padding:8px 0;font-size:12px;color:var(--cfc-muted);text-align:center}
.cfc.cfc .cfc-table--items thead th:first-child{text-align:start}
.cfc.cfc .cfc-table--items td{width:54px;padding-inline:4px;text-align:center}
.cfc.cfc .cfc-table--items tbody th{padding-inline-end:10px;white-space:normal}
.cfc-by-name{display:block;font-weight:700;overflow-wrap:anywhere}
.cfc-by-qty{display:block;font-size:12px;color:var(--cfc-muted)}
.cfc-by-share{display:flex;align-items:center;gap:8px;margin-top:5px;font-size:11px;color:var(--cfc-muted)}
.cfc-by-share .cfc-bar{flex:1;max-width:180px;height:5px;margin:0}
.cfc.cfc .cfc-table--items tfoot :where(th,td){border-top:2px solid var(--cfc-border);border-bottom:0;font-weight:700}
.cfc .cfc-panel-empty{padding:18px 0 8px;font-size:14px;color:var(--cfc-muted);text-align:center}
.cfc .cfc-data-note{margin-top:12px;font-size:12px;color:var(--cfc-muted)}

/* ---------- Guests: diary invitation ---------- */
.cfc-join{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 20px;border:1px dashed #c9d8b3;border-radius:var(--cfc-radius);background:#fbfdf7}
.cfc-join-copy{display:grid;gap:2px;min-width:0;font-size:13px;color:var(--cfc-muted)}
.cfc .cfc-join-copy strong{font-size:15px;color:var(--cfc-text)}
.cfc .cfc-join .cfc-button{flex:none}

/* ---------- Dialogs / sheets ---------- */
.cfc-dialog{position:fixed;inset:0;margin:auto;width:min(460px,calc(100% - 32px));max-width:none;height:fit-content;max-height:min(90dvh,820px);padding:0;border:1px solid var(--cfc-border);border-radius:24px;background:#fff;color:var(--cfc-text);box-shadow:0 22px 90px #14231526;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.cfc-dialog::backdrop{background:#14201945;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.cfc-dialog:not([open]){display:none}
.cfc-dialog[open]{animation:cfc-pop .22s ease-out}
.cfc-dialog--target{width:min(600px,calc(100% - 32px))}
.cfc-dialog-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:6px;padding:16px 22px 10px 12px;background:#fff}
.cfc .cfc-dialog-title{flex:1;font-size:20px;font-weight:800;line-height:1.3}
.cfc-dialog-body{padding:4px 22px 22px}
.cfc-dialog-actions{display:flex;gap:10px;margin-top:16px}
.cfc-dialog-actions .cfc-button{flex:1}
.cfc-sheet-handle{display:none;width:46px;height:5px;margin:0 auto 2px;border-radius:8px;background:#d7dbd0}
html.cfc-scroll-lock{overflow:hidden}

/* Entry sheet: same structure as the diary's "איך נוח לך לתעד?" */
.cfc-dialog--entry{width:min(430px,calc(100% - 32px));padding:14px 16px 12px}
.cfc .cfc-dialog-close{position:absolute;top:12px;inset-inline-end:8px;z-index:1}
.cfc-entry-intro{display:grid;grid-template-columns:minmax(0,1fr) 112px;align-items:center;gap:4px;min-height:112px;padding-inline-end:30px;overflow:hidden}
.cfc[data-characters=off] .cfc-entry-intro{grid-template-columns:minmax(0,1fr);min-height:0;padding-block:10px 14px}
.cfc .cfc-entry-title{font-size:22px;font-weight:800;line-height:1.25}
.cfc .cfc-entry-copy p{margin-top:6px;font-size:13px;color:var(--cfc-muted)}
.cfc-entry-character{position:relative;height:112px;overflow:hidden}
.cfc .cfc-entry-character img{position:absolute;top:4px;inset-inline-start:0;height:198px;animation:cfc-enter .35s both}
.cfc-entry-options{display:grid;gap:8px;margin-top:6px}
.cfc .cfc-method{display:flex;align-items:center;gap:10px;width:100%;min-height:56px;padding:8px 12px;border-radius:15px;text-align:start;box-shadow:0 2px 5px #211c3509;--cfc-b:#fff;--cfc-c:var(--cfc-text);--cfc-bd:#e4e8dd;--cfc-bh:#fbfff1}
.cfc .cfc-method:hover{transform:translateY(-1px)}
.cfc-method-icon{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:10px;background:#f0f9cc;color:var(--cfc-on-primary)}
.cfc-method-icon .cfc-icon{width:22px;height:22px}
.cfc-method-text{flex:1;min-width:0;display:grid;gap:1px}
.cfc .cfc-method-text strong{font-size:16px;line-height:1.3;overflow-wrap:anywhere}
.cfc .cfc-method-text small{font-size:12px;color:var(--cfc-muted)}
.cfc-method-end{width:17px;height:17px;color:var(--cfc-muted)}
.cfc-ai-badge{flex:none;padding:2px 6px;border-radius:6px;background:#f1f6e4;color:#526d1a;font-size:10px;font-weight:700;direction:ltr}
.cfc-lock{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;background:#eff1ea;color:#5d665f}
.cfc-lock .cfc-icon{width:14px;height:14px}
.cfc .cfc-method.is-locked{--cfc-b:#fafbf8;--cfc-bh:#f5f7f1;box-shadow:none}
.cfc .cfc-method.is-locked:hover{transform:none}
.cfc-method.is-locked .cfc-method-icon{background:#eceee7;color:#6b736c}
.cfc .cfc-method.is-locked .cfc-method-text strong{color:#535b55}
.cfc-entry-note{margin-top:10px;padding:12px 14px;border:1px solid #e3ecd4;border-radius:14px;background:var(--cfc-soft);font-size:13px;line-height:1.6;animation:cfc-enter .25s both}
.cfc-entry-note-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin-top:10px}
.cfc-entry-footer{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:8px;color:#99a094}
.cfc .cfc-text-button{min-height:44px;padding:6px 10px;border-radius:10px;font-size:14px;font-weight:700;text-decoration:underline;text-underline-offset:3px;--cfc-c:#5a6a45;--cfc-bh:var(--cfc-soft)}

/* Manual item */
.cfc-manual-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.cfc .cfc-manual-total{padding:10px 14px;border-radius:12px;background:var(--cfc-soft);font-size:14px;font-weight:700;color:var(--cfc-green-ink)}

/* ---------- Form fields ---------- */
.cfc .cfc-field{display:grid;gap:7px;min-width:0;margin-bottom:16px}
.cfc .cfc-field--tight{margin-bottom:0}
.cfc .cfc-label{font-size:13px;font-weight:700;line-height:1.4;color:var(--cfc-text)}
.cfc fieldset>legend.cfc-label{margin-bottom:7px} /* a legend is not a grid item, so the gap skips it */
.cfc .cfc-label--small{font-weight:400;color:var(--cfc-muted)}
.cfc-input{display:flex;align-items:center;gap:6px;min-height:50px;padding:0 14px;border:1px solid var(--cfc-border-strong);border-radius:12px;background:#fff;transition:border-color .15s,box-shadow .15s}
.cfc-input:focus-within{border-color:var(--cfc-progress);box-shadow:0 0 0 3px var(--cfc-soft-strong)}
.cfc .cfc-input input{flex:1;height:48px;font-size:16px;font-weight:700}
.cfc .cfc-input input::placeholder{color:#a3aba1;font-weight:400;opacity:1}
.cfc-unit{flex:none;font-size:13px;color:var(--cfc-muted);white-space:nowrap}
.cfc-field.is-invalid .cfc-input{border-color:var(--cfc-danger)}
.cfc .cfc-error{font-size:13px;font-weight:700;color:var(--cfc-danger)}
.cfc .cfc-hint{font-size:13px;color:var(--cfc-muted)}

/* ---------- Target wizard ---------- */
.cft-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:24px;align-items:start}
.cft[data-context=sheet] .cft-grid{display:block}
.cft-card{min-width:0;padding:22px 26px 0;border:1px solid var(--cfc-border);border-radius:var(--cfc-radius);background:#fff;box-shadow:var(--cfc-shadow)}
.cft[data-context=sheet] .cft-card{padding:0 22px;border:0;border-radius:0;box-shadow:none}
.cft-progress{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.cft-progress-bar{flex:1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.cft-progress-bar span{height:6px;border-radius:99px;background:var(--cfc-track);transition:background-color .25s}
.cft-progress-bar span.is-done{background:var(--cfc-progress)}
.cfc .cft-progress-text{flex:none;font-size:12px;color:var(--cfc-muted);white-space:nowrap}

.cft-step-head{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 96px;align-items:center;gap:8px;min-height:108px;margin-bottom:18px;padding:14px 18px;padding-inline-end:0;border-radius:16px;background:linear-gradient(105deg,#eff6e4,#f6faee);overflow:hidden}
.cft[data-characters=off] .cft-step-head{grid-template-columns:minmax(0,1fr);min-height:0;padding-inline-end:18px}
.cfc .cft-step-title{font-size:21px;font-weight:800;line-height:1.25}
.cfc .cft-step-copy p{margin-top:4px;font-size:13px;color:var(--cfc-muted)}
.cfc .cft-step-art{position:absolute;top:8px;inset-inline-end:12px;height:172px}
.cfc .cft-step-art.cft-step-art--wide{top:auto;bottom:-6px;inset-inline-end:2px;height:106px}

.cft-picks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.cft-pick,.cft-option,.cft-goal,.cft-seg{position:relative;cursor:pointer}
.cft-pick-body,.cft-option-body,.cft-goal-body{position:relative;border:1.5px solid var(--cfc-border);border-radius:16px;background:#fff;transition:border-color .15s,background-color .15s,box-shadow .15s}
.cft-pick-body{display:flex;align-items:center;gap:10px;min-height:66px;padding:8px 14px;padding-inline-end:40px;font-size:15px;font-weight:700}
.cfc .cft-pick-face{width:48px;height:48px;border-radius:50%;background:var(--cfc-soft-strong);object-fit:cover}
.cft-pick:hover .cft-pick-body,.cft-option:hover .cft-option-body,.cft-goal:hover .cft-goal-body{background:#fbfdf7;border-color:#cfdcbc}
.cft input:checked+.cft-pick-body,.cft input:checked+.cft-option-body,.cft input:checked+.cft-goal-body{border-color:var(--cfc-progress);background:var(--cfc-soft);box-shadow:inset 0 0 0 1px var(--cfc-progress)}
.cft input:focus-visible+.cft-pick-body,.cft input:focus-visible+.cft-option-body,.cft input:focus-visible+.cft-goal-body,.cft input:focus-visible+span{outline:2px solid var(--cfc-focus);outline-offset:2px}
/* Selection mark: a ring that fills with a check, so the choice is not signalled by color alone */
.cft-pick-body::after,.cft-option-body::after,.cft-goal-body::after{content:"";position:absolute;inset-inline-end:14px;top:50%;width:20px;height:20px;margin-top:-10px;border:1.5px solid #c5cdbd;border-radius:50%;background:#fff center/12px no-repeat}
.cft input:checked+.cft-pick-body::after,.cft input:checked+.cft-option-body::after,.cft input:checked+.cft-goal-body::after{border-color:var(--cfc-green-ink);background-color:var(--cfc-green-ink);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")}

.cft-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.cft-fields .cfc-field{align-content:start}

.cft-options{display:grid;gap:8px}
.cft-option-body{display:flex;align-items:center;gap:12px;min-height:62px;padding:9px 14px;padding-inline-end:44px}
.cft-option-text{display:grid;gap:1px;min-width:0}
.cfc .cft-option-text strong{font-size:15px;line-height:1.35}
.cfc .cft-option-text small{font-size:12px;line-height:1.45;color:var(--cfc-muted)}
.cft-level{display:inline-flex;align-items:flex-end;gap:2px;flex:none;width:28px;height:22px}
.cft-level i{flex:1;border-radius:2px;background:#dfe5d6}
.cft-level i:nth-child(1){height:30%}
.cft-level i:nth-child(2){height:47%}
.cft-level i:nth-child(3){height:64%}
.cft-level i:nth-child(4){height:82%}
.cft-level i:nth-child(5){height:100%}
.cft-level[data-level="1"] i:nth-child(-n+1),.cft-level[data-level="2"] i:nth-child(-n+2),.cft-level[data-level="3"] i:nth-child(-n+3),.cft-level[data-level="4"] i:nth-child(-n+4),.cft-level[data-level="5"] i{background:var(--cfc-progress)}

.cft-goals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.cft-goal-body{display:grid;justify-items:start;gap:2px;height:100%;min-height:118px;padding:14px;align-content:start}
.cft-goal-body::after{top:14px;margin-top:0}
.cft-goal-icon{display:grid;place-items:center;width:38px;height:38px;margin-bottom:6px;border-radius:11px;background:#f0f9cc;color:var(--cfc-on-primary)}
.cfc .cft-goal-body strong{font-size:15px;line-height:1.3}
.cfc .cft-goal-body small{font-size:12px;line-height:1.45;color:var(--cfc-muted)}

.cfc .cft-pace{margin-top:4px}
.cft-segment{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:4px;padding:4px;border-radius:14px;background:var(--cfc-soft)}
.cft-seg>span{display:grid;place-content:center;justify-items:center;min-height:48px;padding:4px 6px;border-radius:10px;font-size:14px;line-height:1.25;text-align:center;color:var(--cfc-muted);transition:background-color .15s,color .15s}
.cfc .cft-seg>span small{font-size:11px;direction:ltr;unicode-bidi:isolate}
.cft input:checked+span{background:#fff;color:var(--cfc-text);font-weight:700;box-shadow:0 1px 4px #1a2b1a14}
.cft-segment--small{width:132px}
.cft-segment--small .cft-seg>span{min-height:40px}

/* Result */
.cft-hero{margin-bottom:14px;padding:18px;border-radius:18px;background:var(--cfc-soft)}
.cfc .cft-hero-num{display:flex;align-items:baseline;justify-content:center;gap:8px;margin-bottom:14px}
.cfc .cft-hero-num b{font-size:46px;font-weight:800;line-height:1;letter-spacing:-.015em;font-variant-numeric:tabular-nums}
.cft-hero-num span{font-size:15px;color:var(--cfc-muted)}
.cft-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.cft-stats>div{padding:9px 12px;border-radius:12px;background:#fff}
.cfc .cft-stats dt{font-size:12px;line-height:1.4;color:var(--cfc-muted)}
.cfc .cft-stats dd{font-size:14px;font-weight:700;font-variant-numeric:tabular-nums}
.cfc .cft-warn{margin-bottom:14px;padding:10px 14px;border:1px solid #f0dfb8;border-radius:12px;background:#fff8e8;color:#6a4d12;font-size:13px}
.cfc .cft-subtitle{margin:18px 0 10px;font-size:16px;font-weight:700}
.cft-macro{display:grid;grid-template-columns:112px minmax(0,1fr);gap:18px;align-items:center}
.cfc .cft-macro-table{width:100%;border-collapse:collapse;font-size:14px}
.cfc.cfc .cft-macro-table :where(th,td){padding:9px 4px;border-bottom:1px solid var(--cfc-border);background:transparent;font-weight:400;text-align:center;font-variant-numeric:tabular-nums}
.cfc.cfc .cft-macro-table thead th{padding-block:0 6px;font-size:12px;color:var(--cfc-muted)}
.cfc.cfc .cft-macro-table tbody th{text-align:start;white-space:nowrap}
.cfc.cfc .cft-macro-table tbody tr:last-child>*{border-bottom:0}
.cft-macro-table .cfc-dot{margin-inline-end:7px}

.cft-sliders{display:grid;gap:14px;margin-top:16px;padding:16px;border:1px solid var(--cfc-border);border-radius:16px}
.cft-slider-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;font-size:14px}
.cfc .cft-slider-head label{font-weight:700}
.cfc .cft-slider-head output{color:var(--cfc-green-ink);font-weight:700;font-variant-numeric:tabular-nums}
.cfc.cfc .cft-slider input[type=range]{-webkit-appearance:none;appearance:none;display:block;width:100%;height:34px;margin:0;padding:0;background:transparent;cursor:pointer;direction:rtl;--p:50%}
.cfc .cft-slider input[type=range]::-webkit-slider-runnable-track{height:8px;border-radius:99px;background:linear-gradient(to left,var(--cfc-progress) 0 var(--p),var(--cfc-track) var(--p) 100%)}
.cfc .cft-slider input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:26px;height:26px;margin-top:-9px;border:2px solid var(--cfc-green-ink);border-radius:50%;background:#fff;box-shadow:0 2px 6px #1b2a1026}
.cfc .cft-slider input[type=range]::-moz-range-track{height:8px;border-radius:99px;background:linear-gradient(to left,var(--cfc-progress) 0 var(--p),var(--cfc-track) var(--p) 100%)}
.cfc .cft-slider input[type=range]::-moz-range-thumb{width:22px;height:22px;border:2px solid var(--cfc-green-ink);border-radius:50%;background:#fff;box-shadow:0 2px 6px #1b2a1026}
.cft-slider-scale{display:flex;justify-content:space-between;font-size:11px;color:var(--cfc-muted);font-variant-numeric:tabular-nums}
.cft-sliders-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}

.cft-meals{margin-top:14px;padding:14px 16px;border-radius:16px;background:#f9fbf5}
.cft-meals-head{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px;font-weight:700}
.cfc .cft-meals-out{margin-top:8px;font-size:14px}
.cft-result-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-top:16px}
.cfc .cft-disclaimer{margin-top:12px;font-size:12px;color:var(--cfc-muted)}

.cft-nav{display:flex;align-items:center;gap:10px;margin:18px -26px 0;padding:14px 26px;border-top:1px solid var(--cfc-border);border-radius:0 0 var(--cfc-radius) var(--cfc-radius);background:#fff}
.cft-nav .cfc-button--primary{margin-inline-start:auto;min-width:150px}
.cft[data-context=sheet] .cft-nav{position:sticky;bottom:0;z-index:2;margin:18px -22px 0;padding:12px 22px calc(12px + env(safe-area-inset-bottom));border-radius:0}

.cft-side{position:sticky;top:var(--cfc-top,96px);border:1px solid var(--cfc-border);border-radius:var(--cfc-radius);background:#fff;box-shadow:var(--cfc-shadow);overflow:hidden}
.cft-side-body{padding:18px 20px 10px}
.cfc .cft-side-title{margin-bottom:6px;font-size:16px;font-weight:700}
.cft-live>div{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--cfc-border);font-size:14px}
.cfc .cft-live dt{color:var(--cfc-muted)}
.cfc .cft-live dd{font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}
.cfc .cft-live .is-strong dd{font-size:19px;font-weight:800;color:var(--cfc-green-ink)}
.cft-live>div:last-child{border-bottom:0}
.cft-how summary{display:flex;align-items:center;min-height:44px;font-size:13px;font-weight:700;color:var(--cfc-green-ink);cursor:pointer}
.cfc .cft-how p{padding-bottom:10px;font-size:13px;color:var(--cfc-muted)}

/* ---------- Toast ---------- */
/* Above the shared selector / AI overlays (z-index 999999 to 1000003), so their messages stay visible. */
.cfc-toast{position:fixed;z-index:1000010;left:16px;right:16px;bottom:calc(96px + env(safe-area-inset-bottom));width:fit-content;max-width:calc(100% - 32px);margin-inline:auto;display:flex;align-items:center;gap:12px;padding:11px 16px;border-radius:14px;background:#243024;color:#fff;font-size:14px;box-shadow:0 10px 30px #0f1a0f40;animation:cfc-toast-in .22s ease-out}
.cfc .cfc-toast-action{min-height:36px;padding:2px 6px;border-radius:8px;font-weight:700;text-decoration:underline;text-underline-offset:3px;--cfc-c:#c8f27a;--cfc-bh:#ffffff1a}

/* ---------- Shared selector / AI modals while this screen is open ---------- */
/* The entry sheet is where the method is chosen, and this list has no meals. */
body.cfc-food-active #chefit-item-selector-overlay #chefit-ai-text-btn,
body.cfc-food-active #chefit-item-selector-overlay #chefit-ai-image-btn,
body.cfc-food-active #chefit-item-selector-overlay #chefit-my-menu-btn,
body.cfc-food-active .chefit-ai-meal-row,
body.cfc-food-active .ingredient-controls-modal.meal-time-row-separate{display:none!important}

/* The theme reset loads after the shared modal CSS on this page: it strips the fill of the main
   "add" button, and the quantity steppers shrink to a sliver next to the number field. */
body.cfc-food-active #chefit-item-details-overlay .chefit-modal-footer .button-primary,
body.cfc-food-active #chefit-item-details-overlay .chefit-modal-footer .button-primary:hover,
body.cfc-food-active #chefit-item-details-overlay .chefit-modal-footer .button-primary:focus{flex:1 1 auto;min-height:50px;border-radius:999px;background-color:#a6e92c!important;color:#1c2b09!important;font-size:16px;font-weight:800;text-align:center}
body.cfc-food-active #chefit-item-details-overlay .chefit-modal-footer .button-primary:hover{background-color:#9bdc24!important}
body.cfc-food-active #chefit-item-details-overlay .chefit-modal-footer .button-primary:focus-visible{outline:3px solid #486b20;outline-offset:2px}
body.cfc-food-active #chefit-item-details-overlay .quantity-control .qty-btn{flex:0 0 46px;width:46px;height:46px}
body.cfc-food-active #chefit-item-details-overlay .quantity-control .qty-input{min-width:0;height:46px}

/* ---------- Motion ---------- */
@keyframes cfc-idle{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@keyframes cfc-enter{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes cfc-pop{from{opacity:0;transform:scale(.98) translateY(8px)}to{opacity:1;transform:none}}
@keyframes cfc-sheet-up{from{opacity:.4;transform:translateY(40px)}to{opacity:1;transform:none}}
@keyframes cfc-toast-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes cfc-new-item{from{background:var(--cfc-soft-strong)}to{background:transparent}}

/* The three question steps differ in height. On a centered dialog that moves everything on every
   "next"; here the top edge stays put and the steps share a minimum height. The result step is
   taller than the window and keeps the centered default (also the fallback without :has). */
@media(min-width:981px){
	.cfc-dialog--target:has(.cft-step[data-step="4"][hidden]){margin-block:max(5dvh,calc(50dvh - 332px)) auto}
	.cft[data-context=sheet] .cft-step:not([data-step="4"]){min-height:400px}
}

/* A short window cannot hold the sticky column between the header and the site's bottom bar. */
@media(max-height:739px){
	.cfc-layout>.cfc-side,.cft-side{position:static}
}

/* ---------- Tablet / phone ---------- */
@media(max-width:980px){
	.cfc{--cfc-radius:18px}
	.cfc-wrap{max-width:650px;padding:18px 20px 40px}
	.cfc-head{margin-bottom:16px}
	.cfc .cfc-title{font-size:24px}
	.cfc .cfc-lead{font-size:14px}
	.cfc-layout{display:flex;flex-direction:column;align-items:stretch;gap:16px}
	.cfc-layout>.cfc-side{display:contents}
	/* With food on the list, the list comes right after the summary and the target card follows it. */
	.cfc-page--food[data-empty="0"] .cfc-target-card{order:1}
	.cfc-page--food[data-empty="0"] .cfc-data,.cfc-page--food[data-empty="0"] .cfc-join{order:2}
	.cfc-card{padding:16px 16px}
	.cfc .cfc-items{margin-inline:-16px}
	.cfc .cfc-item{grid-template-columns:40px minmax(0,1fr) auto;gap:9px;padding:13px 12px}
	.cfc-item-img{width:40px;height:40px}
	.cfc .cfc-item-name{font-size:13px}
	.cfc-item-detail{font-size:11px}
	.cfc-item-kcal{font-size:13px}
	.cfc .cfc-item-kcal small{display:block;font-size:10px}
	.cfc .cfc-item .cfc-icon-button{width:40px}

	.cfc-banner{grid-template-columns:minmax(0,1fr) 208px;min-height:164px;padding:18px;padding-inline-end:0}
	.cfc-banner.cfc-banner--no-art{padding-inline-end:18px;min-height:0}
	.cfc .cfc-banner-title{font-size:20px}
	.cfc .cfc-banner-text{margin-bottom:14px;font-size:13px}
	.cfc .cfc-banner-art img{top:12px;inset-inline-end:2px;height:228px}

	.cfc-chart{grid-template-columns:118px minmax(0,1fr);gap:14px}
	.cfc-donut{width:118px}
	.cfc .cfc-donut-copy b{font-size:23px}

	.cfc-target-empty{grid-template-columns:84px minmax(0,1fr);min-height:0}
	.cfc .cfc-target-art img{top:10px;inset-inline-start:8px;height:176px}
	.cfc-target-copy{padding:14px 16px;padding-inline-start:4px}
	.cfc .cfc-target-title{font-size:15px}
	.cfc .cfc-target-copy p{display:none}
	.cfc .cfc-target-copy .cfc-button{min-height:40px}

	.cfc-join{flex-direction:column;align-items:stretch;text-align:center}

	.cfc-dialog{inset:auto 0 0 0;margin:0;width:100%;max-width:100%;max-height:92dvh;border-radius:22px 22px 0 0;border-bottom:0}
	.cfc-dialog--entry,.cfc-dialog--form{padding-bottom:max(12px,env(safe-area-inset-bottom))}
	.cfc-dialog--target{width:100%}
	.cfc-dialog[open]{animation:cfc-sheet-up .26s cubic-bezier(.2,.7,.2,1)}
	.cfc-sheet-handle{display:block}
	.cft-grid{grid-template-columns:minmax(0,1fr);gap:16px}
	.cft-card{padding:18px 18px 0}
	.cft-nav{margin-inline:-18px;padding-inline:18px}
	.cft-nav .cfc-button--primary{flex:1}
	.cft-side{position:static}
	.cft-step-head{grid-template-columns:minmax(0,1fr) 84px;min-height:100px;padding:12px 14px;padding-inline-end:0}
	.cfc .cft-step-title{font-size:19px}
	.cfc .cft-step-art{height:156px;inset-inline-end:8px}
	.cfc .cft-step-art.cft-step-art--wide{height:92px}
}

@media(max-width:560px){
	/* Narrow banner: the whole pair stands on the bottom edge instead of a crop that would cover the text. */
	.cfc-banner{grid-template-columns:minmax(0,1fr) 150px}
	.cfc-banner.cfc-banner--no-art{grid-template-columns:minmax(0,1fr)}
	.cfc .cfc-banner-art img{top:auto;bottom:-4px;inset-inline-end:2px;height:164px;animation:none}
}

@media(max-width:520px){
	.cfc .cfc-tab{padding-inline:6px}
	.cfc-by-share{display:grid;gap:3px}
	.cfc-by-share .cfc-bar{width:100%;max-width:none}
	.cft-goals{grid-template-columns:minmax(0,1fr)}
	.cft-goal-body{grid-template-columns:38px minmax(0,1fr);column-gap:12px;align-items:center;min-height:0;padding:11px 14px;padding-inline-end:44px}
	.cft-goal-body::after{top:50%;margin-top:-10px}
	.cft-goal-icon{grid-row:1/3;margin-bottom:0}
	.cft-fields{gap:8px}
	.cft-fields .cfc-input{padding:0 10px;gap:4px}
	.cft-fields .cfc-unit{font-size:12px}
	.cft-macro{grid-template-columns:96px minmax(0,1fr);gap:12px}
	.cfc-donut--small{width:96px}
	.cfc .cfc-donut--small .cfc-donut-copy b{font-size:19px}
	.cfc .cft-hero-num b{font-size:40px}
	.cft-pick-body{padding-inline:10px 34px;gap:8px}
	.cft-pick-body::after{inset-inline-end:10px}
	.cfc .cft-pick-face{width:42px;height:42px}
}

@media(max-width:359px){
	.cfc-wrap{padding-inline:14px}
	.cfc-banner{grid-template-columns:minmax(0,1fr) 112px;padding:16px;padding-inline-end:0}
	.cfc-banner.cfc-banner--no-art{grid-template-columns:minmax(0,1fr);padding-inline-end:16px}
	.cfc .cfc-banner-art img{height:122px;inset-inline-end:1px}
	.cfc-chart{grid-template-columns:100px minmax(0,1fr);gap:12px}
	.cfc-donut{width:100px}
	.cfc .cfc-donut-copy b{font-size:20px}
	.cfc .cfc-item{grid-template-columns:34px minmax(0,1fr) auto;gap:7px;padding-inline:10px}
	.cfc-item-img{width:34px;height:34px}
	.cfc .cfc-item-name{font-size:12px}
	.cfc .cfc-item .cfc-icon-button{width:36px}
	.cfc .cfc-tab{padding-inline:9px;font-size:12px}
	.cfc.cfc .cfc-table--items td{width:42px;padding-inline:2px;font-size:12px}
	.cfc-entry-intro{grid-template-columns:minmax(0,1fr) 96px}
	.cfc .cfc-entry-title{font-size:20px}
	.cfc .cfc-entry-character img{inset-inline-start:2px}
	.cfc .cfc-method-text strong{font-size:14px}
	.cfc-method-icon{width:34px;height:34px}
	.cft[data-context=sheet] .cft-card{padding-inline:16px}
	.cft[data-context=sheet] .cft-nav{margin-inline:-16px;padding-inline:16px}
	.cft-step-head{grid-template-columns:minmax(0,1fr) 66px}
	.cfc .cft-step-art{height:136px;inset-inline-end:2px}
	.cft-stats{grid-template-columns:minmax(0,1fr)}
}

@media(prefers-reduced-motion:reduce){
	.cfc *,.cfc *::before,.cfc *::after{animation:none!important;transition:none!important}
}

@media print{
	.cfc-banner,.cfc-target-card,.cfc-tabs,.cfc-join,.cfc-add-more,.cfc-item-end .cfc-icon-button,.cfc-card-head button,.cfc-dialog,.cfc-toast{display:none!important}
	.cfc-panel[hidden]{display:block!important}
	.cfc-layout{display:block}
	.cfc-card{margin-bottom:14px;box-shadow:none;break-inside:avoid}
}
