/* Style A — the supplied warm-card handoff, shared by phone and iPad. */
body,body[data-theme=light]{--bg:#fbf6ef;--paper:#fff;--ink:#2b211c;--muted:#8a7b70;--line:#efe5d9;--accent:#e2573b;--accent-ink:#fff;--brand2:#f28a3c;--soft:#fcebdd;--subtle:#faf5ee;--shadow:0 8px 24px rgba(120,70,30,.10);--shadow-sm:0 2px 8px rgba(120,70,30,.08);--sans:"PingFang SC","Noto Sans CJK SC","Noto Sans SC",system-ui,sans-serif;background:var(--bg);font-family:var(--sans);line-height:1.6}
body[data-theme=dark]{--bg:#1c1714;--paper:#2a221e;--ink:#f8ede3;--muted:#c0aa9b;--line:#49382e;--accent:#ff8b70;--accent-ink:#2b1710;--brand2:#e58b4d;--soft:#452b21;--subtle:#30251f;--shadow:0 8px 24px #0003;--shadow-sm:0 2px 8px #0002;color-scheme:dark}
[hidden]{display:none!important}button{border-radius:16px;min-height:44px}button.primary{border:0;background:linear-gradient(115deg,var(--brand2),#e2573b);color:#fff;box-shadow:0 8px 20px rgba(226,87,59,.18)}button:disabled{cursor:default}button.soft{border:0}button:hover{filter:brightness(.98)}h1,h2,h3{font-family:var(--sans);letter-spacing:0}h1{font-size:26px;line-height:1.35;font-weight:800}h2{font-size:20px;font-weight:800}svg.icon{stroke-width:1.8}.app-shell,body[data-device=phone] .app-shell,body[data-device=ipad] .app-shell{display:block;max-width:1100px;min-height:100svh;margin:auto;border:0}.sidebar,body[data-device=ipad] .sidebar{display:none}.app-shell main,body[data-device=phone] main,body[data-device=ipad] main{padding:0 20px 112px;min-width:0}.app-header,body[data-device=phone] .app-header{height:56px;margin:0 0 12px;border:0;position:relative;display:flex;background:transparent}.app-header .mobile-brand{display:flex;font-size:16px;letter-spacing:0}.app-header .brand-mark{width:30px;height:30px;font-size:16px;border-radius:10px;background:var(--accent)}#header-context{display:none}.header-actions{gap:10px}.header-actions .avatar,.header-actions .icon-button{width:40px;height:40px;min-height:40px;min-width:40px;border-radius:14px;background:var(--paper);box-shadow:var(--shadow-sm);font-size:15px;color:var(--ink)}#background-jobs-toggle{font-size:11px;padding:4px;min-height:40px}.header-actions .avatar{font-family:var(--sans)}.app-footer{font-size:10px;text-align:center;margin-top:40px;color:var(--muted)}
body[data-screen=recipes] .app-header{position:absolute;top:18px;right:max(20px,calc((100vw - 1060px)/2));height:40px;margin:0;z-index:5}body[data-screen=recipes] .app-header .mobile-brand{display:none}body[data-screen=recipes] #background-jobs-toggle{width:0;padding:0;overflow:hidden;min-height:0;position:absolute;right:0;top:48px;height:0}body[data-screen=recipes] #background-jobs-toggle.has-jobs{position:static;width:auto;height:auto}.home-welcome{padding-top:14px;padding-right:100px;margin-bottom:18px;min-height:84px}.home-greeting{color:var(--muted);font-size:12px;line-height:1.5;margin:0 0 6px}.home-welcome h1{font-size:24px;white-space:nowrap}.search-field{margin:0 0 18px;padding:0 6px 0 17px;gap:10px;background:var(--paper);height:48px;border:0;border-radius:16px;box-shadow:var(--shadow-sm)}.search-field input{height:48px;font-size:14px;padding:0;border:0;box-shadow:none}.search-field input::placeholder{color:#b2a295}.search-field>svg{color:#b2a295;width:17px}.search-folders{display:grid;place-items:center;min-height:36px;height:36px;min-width:36px;width:36px;padding:8px;border:0;border-radius:12px;background:var(--soft);color:var(--accent)}.search-folders .icon{width:18px}
.import-hero{display:block;width:100%;height:196px;min-height:0;margin:0 0 18px;isolation:isolate;border-radius:24px;background:#38251d;box-shadow:var(--shadow);overflow:hidden}.import-copy{position:relative;padding:20px;z-index:2;pointer-events:none}.import-copy>*{pointer-events:auto}.import-chip{display:inline-flex;padding:2px 10px;background:#ffffff38;border-radius:18px;font-size:11px;color:#fff;margin-bottom:6px}.import-copy h2{font-family:var(--sans);font-size:22px;font-weight:800;line-height:1.3;white-space:pre-line;letter-spacing:0;color:#fff}.import-copy p{font-size:12px;line-height:1.5;margin:5px 0 12px;color:#f5ece4}.import-copy .primary{display:inline-flex;align-items:center;gap:8px;background:#fff;color:#df5035;border:0;box-shadow:none;min-height:36px;padding:7px 14px;font-size:13px;border-radius:12px;font-weight:700}.import-copy .icon{width:15px;height:15px}.change-home-background{position:absolute;top:12px;right:12px;z-index:5;width:32px;height:32px;min-height:32px;padding:7px;background:#0005;backdrop-filter:blur(10px);border:1px solid #fff4;color:#fff;border-radius:12px}.change-home-background .icon{width:17px;height:17px}.home-background-media,.home-fallback-image{position:absolute;inset:0;z-index:0;overflow:hidden}.home-fallback-image{width:100%;height:100%;object-fit:cover}.home-background-source{position:absolute;max-width:none;object-fit:fill;pointer-events:none}.home-background-shade{position:absolute;inset:0;pointer-events:none}.import-hero .home-background-shade{background:linear-gradient(90deg,#140b05a6,#0000);z-index:1}.hide-hero-title .import-copy,.hide-hero-title .background-preview-copy{visibility:hidden}.home-categories{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:22px}.home-category{border:0;background:var(--paper);padding:12px 2px 9px;min-width:0;display:flex;align-items:center;flex-direction:column;gap:6px;min-height:86px;border-radius:18px;box-shadow:var(--shadow-sm);font-size:12px;white-space:nowrap}.category-icon{width:40px;height:40px;border-radius:14px;display:grid;place-items:center;background:#fde6df;color:#a14832}.category-icon .icon{width:25px;height:25px;stroke-width:1.6}.home-category:nth-child(2) .category-icon{background:#fff0d6;color:#967235}.home-category:nth-child(3) .category-icon{background:#e4f0e7;color:#4d7b58}.home-category:nth-child(4) .category-icon{background:#f3e5f6;color:#925a8e}.home-category:nth-child(5) .category-icon{background:#e4edf8;color:#4b719c}.folder-box{border:0;padding:0;margin:0;background:transparent}.folder-box>summary{font-size:12px;color:var(--muted);min-height:30px;cursor:pointer;list-style:none}.folder-box:not([open]){display:none}.folder-box[open]{margin:-8px 0 14px;padding:12px;border:1px solid var(--line);border-radius:18px;background:var(--paper)}.folder-box[open] summary{list-style:disclosure-open}.section-head{margin:0 0 12px}.section-head h2{font-size:18px}.section-head small{font-size:12px;color:var(--muted)}.chips{display:flex;gap:8px;overflow:auto;flex-wrap:nowrap;margin:0 0 14px;padding-bottom:0;scrollbar-width:none}.chips button{white-space:nowrap;border:0;min-height:32px;padding:5px 14px;background:var(--paper);box-shadow:var(--shadow-sm);border-radius:22px;font-size:13px;color:var(--muted)}.chips button.active{background:var(--ink);color:var(--bg)}.recipe-grid,body[data-device=phone] .recipe-grid,body[data-device=ipad] .recipe-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.recipe-card{position:relative;background:var(--paper);border:0;border-radius:20px;overflow:hidden;box-shadow:var(--shadow-sm);padding:0 0 11px;min-width:0}.recipe-image-button{display:block;width:100%;height:112px;min-height:0;padding:0;border:0;border-radius:0;background:var(--subtle);overflow:hidden;position:relative}.recipe-image-button img{width:100%;height:100%;aspect-ratio:auto;object-fit:cover;display:block}.recipe-image-button .tag{position:absolute;left:8px;top:8px;background:#0007;color:#fff;padding:2px 7px;font-size:10px;border-radius:10px}.recipe-image-button .image-type{font-size:9px;position:absolute;bottom:5px;left:8px;color:#fff;background:#0005;padding:1px 5px;border-radius:5px}.recipe-card>.card-title-button{padding:9px 12px 0;display:block;text-align:left;min-height:0;width:100%;border:0;background:transparent;border-radius:0}.recipe-card h3{font-size:14px;line-height:1.6;font-weight:750;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.recipe-card .recipe-card-meta{margin:3px 28px 0 12px;font-size:11px;line-height:1.5;color:var(--muted)}.recipe-card .add-meal{position:absolute;bottom:8px;right:7px;min-height:28px;width:28px;height:28px;padding:5px;border:0;color:var(--accent);background:var(--soft);border-radius:10px}.add-meal .icon{width:16px;height:16px}.card-favorite{position:absolute;right:8px;top:8px;min-height:28px;width:28px;height:28px;padding:6px;border:0;background:#fffd;backdrop-filter:blur(6px);border-radius:50%;color:#e2573b;z-index:2}.card-favorite .icon{width:16px;height:16px}.is-favorite .icon{fill:currentColor}.bottom-nav,body[data-device=phone] .bottom-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;bottom:0;left:50%;transform:translateX(-50%);right:auto;width:100%;max-width:1100px;height:calc(82px + env(safe-area-inset-bottom,0px));padding:8px 0 env(safe-area-inset-bottom,0px);background:var(--paper);border-top:1px solid var(--line);z-index:25;box-shadow:none}.bottom-nav button{background:transparent;border:0;min-height:54px;font-size:11px;color:var(--muted);padding:0;display:flex;flex-direction:column;align-items:center;gap:3px}.bottom-nav button:nth-child(3){grid-column:4}.bottom-nav button:nth-child(4){grid-column:5}.bottom-nav button.active{color:var(--accent);font-weight:700}.bottom-nav .icon{width:24px;height:24px}.floating-add,body[data-device=phone] .floating-add{display:grid;place-items:center;position:fixed;left:50%;right:auto;transform:translateX(-50%);bottom:calc(42px + env(safe-area-inset-bottom,0px));width:58px;height:58px;min-height:58px;padding:12px;z-index:26;border:4px solid var(--bg);border-radius:20px;color:#fff;background:linear-gradient(135deg,#f28a3c,#e2573b);box-shadow:0 10px 22px #e2573b66}.floating-add .icon{width:28px;height:28px}
/* Recipe details and preparation retain the original source and edit controls. */
.recipe-toolbar{display:flex;align-items:center;gap:4px;margin:0 0 14px;flex-wrap:wrap}.recipe-toolbar button{display:inline-flex;align-items:center;gap:6px}.recipe-bar-title{display:none}.recipe-heading h1{font-size:24px}.recipe-heading{margin-bottom:16px}.recipe-detail-tabs,.plan-tabs{display:flex;gap:8px;border:0;background:var(--paper);padding:5px;border-radius:18px;box-shadow:var(--shadow-sm);margin:18px 0}.plan-tabs button{flex:1;border:0;min-height:42px;font-size:14px;border-radius:13px;background:transparent;color:var(--muted)}.plan-tabs button.active{background:var(--soft);color:var(--accent);font-weight:700}.panel,.summary-banner,.meal-row,.stock-card,.profile-head,.stats>div{background:var(--paper);border:0;border-radius:20px;box-shadow:var(--shadow-sm)}.panel{padding:18px}.ingredient-list li{padding:13px 0}.recipe-prep{background:transparent;border:0;border-radius:0;padding:4px 0;margin:18px 0}.recipe-prep-head{align-items:flex-start;gap:8px;margin-bottom:14px}.recipe-prep-head h2{font-size:26px;line-height:1.4}.recipe-prep-eyebrow{font-size:12px;font-weight:700;color:var(--accent);letter-spacing:1.5px}.recipe-prep-subtitle{font-size:13px!important;color:var(--muted);margin:4px 0 0}.recipe-prep-head button{font-size:11px;padding:5px;white-space:nowrap}.prep-progress-card{display:flex;align-items:center;gap:14px;background:var(--paper);padding:14px 16px;border-radius:20px;box-shadow:var(--shadow-sm);margin-bottom:12px}.recipe-prep-summary{margin:0;font-size:13px;white-space:nowrap;font-weight:700;color:var(--ink)}progress{appearance:none;-webkit-appearance:none;display:block;height:8px;width:100%;border:0;border-radius:8px;background:var(--line);overflow:hidden}progress::-webkit-progress-bar{background:var(--line);border-radius:8px}progress::-webkit-progress-value{background:var(--accent);border-radius:8px}progress::-moz-progress-bar{background:var(--accent);border-radius:8px}.recipe-prep-list{list-style:none;padding:4px 16px!important;margin:0!important;background:var(--paper);border-radius:20px;box-shadow:var(--shadow-sm)}.recipe-prep-item{margin:0;padding:13px 0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent}.recipe-prep-item:last-child{border-bottom:0}.recipe-prep-taskline{font-size:15px;margin:0;gap:12px;line-height:1.7}.recipe-prep-taskline input,.check-row input{width:24px;height:24px;margin:0;accent-color:var(--accent)}.recipe-prep-copy{font-size:15px}.recipe-prep-amounts,.recipe-prep-time{margin:4px 0 0 36px!important;font-size:12px;color:var(--muted)}.recipe-prep-evidence{font-size:11px;margin-left:36px}.recipe-prep-empty{padding:20px;background:var(--paper);border-radius:20px}.prep-start{min-height:56px;border-radius:18px;font-weight:750;font-size:16px;margin:20px 0}.prep-start .icon{display:none}body[data-screen=detail][data-recipe-tab=prep][data-cooking=false] #media-slot{display:none}body[data-screen=detail][data-recipe-tab=prep][data-cooking=false] .recipe-heading,body[data-screen=detail][data-recipe-tab=prep][data-cooking=false] #recipe-before>.button-row{display:none}body[data-screen=detail][data-recipe-tab=prep][data-cooking=false] .recipe-bar-title{display:block;font-size:16px;font-weight:750;order:-1;flex:1}body[data-screen=detail][data-recipe-tab=prep] .recipe-toolbar{margin-bottom:8px}
/* The original video remains one continuous player across modes and steps. */
body[data-screen=detail][data-cooking=true] .app-header,body[data-screen=detail][data-cooking=true] .app-footer,body[data-screen=detail][data-cooking=true] #bottom-nav,body[data-screen=detail][data-cooking=true] #floating-add{display:none}body[data-screen=detail][data-cooking=true] main{padding:0!important}body[data-screen=detail][data-cooking=true] #recipe-workspace{position:relative}body[data-screen=detail][data-cooking=true] #recipe-before{position:absolute;left:16px;right:16px;top:16px;z-index:12;pointer-events:none}body[data-screen=detail][data-cooking=true] .recipe-toolbar{justify-content:flex-end;flex-wrap:nowrap;pointer-events:auto;gap:8px}body[data-screen=detail][data-cooking=true] .recipe-toolbar>button{width:40px;min-height:40px;height:40px;padding:10px;border:0;border-radius:14px;color:#fff;background:#20171170;backdrop-filter:blur(12px);font-size:0}body[data-screen=detail][data-cooking=true] .recipe-toolbar>button:first-child{margin-right:auto}body[data-screen=detail][data-cooking=true] .recipe-toolbar>button .icon{width:20px;height:20px}body[data-screen=detail][data-cooking=true] .recipe-heading,body[data-screen=detail][data-cooking=true] .recipe-bar-title{display:none}body[data-screen=detail][data-cooking=true] #recipe-before>.button-row{display:none}body[data-screen=detail][data-cooking=true] .cook-more-menu{position:relative;color:var(--ink)}.cook-more-menu>summary{list-style:none;cursor:pointer;background:#20171170;backdrop-filter:blur(12px);border-radius:14px;color:#fff;padding:9px 12px;min-height:40px;font-size:13px}.cook-more-menu[open]>div{position:absolute;right:0;top:48px;min-width:180px;padding:12px;background:var(--paper);border-radius:18px;box-shadow:var(--shadow)}.cook-more-menu .button-row{display:grid}.cook-more-menu button{width:100%;font-size:13px}.cook-more-menu button svg{display:none}.video-panel{border:0;border-radius:24px;overflow:hidden;box-shadow:var(--shadow-sm);background:var(--paper)}body[data-screen=detail][data-cooking=true] #media-slot .video-panel{margin:0;border-radius:0;background:#17130f;box-shadow:none}body[data-screen=detail][data-cooking=true] #media-slot .video-stage{height:38svh;min-height:250px;max-height:480px;aspect-ratio:auto!important;margin:0;background:#17130f;border-radius:0}body[data-screen=detail][data-cooking=true] #media-slot video{height:100%;max-height:100%;object-fit:contain;border-radius:0}body[data-screen=detail][data-cooking=true] #media-slot .video-toolbar,body[data-screen=detail][data-cooking=true] #media-slot .video-note,body[data-screen=detail][data-cooking=true] #media-slot>.video-panel>p{display:none}body[data-screen=detail][data-cooking=true] #recipe-after{position:relative;background:var(--bg);border-radius:28px 28px 0 0;margin-top:-12px;z-index:3;padding:22px 20px 24px}.cook-focus{border:0;margin:0;padding:0;background:transparent;border-radius:0}.cook-focus>.recipe-prep{margin-top:0;margin-bottom:22px}.cook-title{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:15px}.cook-title>div:first-child{min-width:0}.cook-recipe-name{font-size:12px;font-weight:700;color:var(--accent);margin:0 0 4px}.cook-title h2{font-size:20px;line-height:1.5}.cook-progress-ring{flex:none;width:50px;height:50px;display:grid;place-items:center;border-radius:50%;font-size:13px;font-weight:750;background:radial-gradient(closest-side,var(--bg) 79%,transparent 80% 100%),conic-gradient(var(--accent) var(--progress,0%),var(--line) 0)}.cook-segments{display:flex;gap:6px;margin:0 0 14px}.cook-segments span{flex:1;height:5px;border-radius:5px;background:var(--line)}.cook-segments .done{background:var(--accent)}.cook-segments .current{background:var(--brand2)}.step-card{border:0;background:var(--paper);border-radius:22px;padding:18px;box-shadow:var(--shadow);margin:0 0 18px}.step-card>img{border-radius:16px}.focus-step-card{margin:0}.focus-step-badge{display:inline-flex;padding:3px 12px;background:var(--soft);color:var(--accent);border-radius:16px;font-size:13px;font-weight:750;margin-bottom:12px}.focus-step-card .focus-step-text{font-size:18px;line-height:1.8;margin:0}.step-card .uses{font-size:13px;line-height:1.6;background:var(--subtle);color:#78695e;border:0;padding:14px 16px;border-radius:16px;margin:14px 0 0}body[data-theme=dark] .step-card .uses{color:var(--muted)}.cook-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}.cook-metric{display:block;text-align:left;background:var(--paper);border:0;border-radius:18px;box-shadow:var(--shadow-sm);padding:12px;min-height:68px}.cook-metric span{font-size:11px;color:var(--muted);display:block}.cook-metric strong{display:block;font-size:17px;line-height:1.5;margin-top:2px}.cook-controls{position:static;display:grid;grid-template-columns:1fr 2.1fr;gap:10px;background:transparent;padding:0;margin-top:28px;border:0}.cook-controls button{min-height:54px;border:0;font-size:16px;border-radius:18px;font-weight:800;box-shadow:var(--shadow-sm)}.cook-controls .primary{box-shadow:0 10px 24px #e2573b40}.cook-tools{display:flex;align-items:center;justify-content:center;gap:10px;margin:14px 0 0}.cook-tools button{font-size:12px;display:flex;align-items:center;gap:5px;padding:6px;min-height:36px}.cook-tools svg{width:16px;height:16px}.voice-status{font-size:11px;text-align:center;color:var(--muted);margin:4px 0 0}
/* Shared preparation and purchase cards. */
.warm-page-bar{display:flex;gap:10px;align-items:center;margin:0 0 20px}.warm-page-bar h1{font-size:18px;flex:1;white-space:nowrap}.warm-page-bar>.icon-button{background:var(--paper);box-shadow:var(--shadow-sm);border-radius:14px}.warm-page-bar>input{width:122px;font-size:11px;padding:8px;border:0;min-height:40px;box-shadow:var(--shadow-sm)}.warm-page-intro{margin:0 0 18px}.warm-page-intro small{font-size:12px;color:var(--accent);letter-spacing:1px}.warm-page-intro h2{font-size:26px;margin:3px 0}.warm-page-intro p{font-size:13px;color:var(--muted)}.summary-banner{padding:14px 16px;margin:14px 0}.summary-banner strong{font-size:14px}.shopping-summary{display:flex;align-items:center;gap:12px}.shopping-summary strong{font-size:13px;white-space:nowrap}.shopping-summary progress{flex:1;min-width:30px}.shopping-summary button{font-size:11px;min-height:34px;padding:7px;white-space:nowrap}.shopping-summary button svg{display:none}.shopping-group-title{font-size:13px;color:var(--accent);letter-spacing:1px;margin:16px 0 8px}.shopping-group{padding:0 16px;background:var(--paper);border-radius:20px;box-shadow:var(--shadow-sm)}.shopping-group .check-row{padding:13px 0;gap:12px;margin:0;border:0;border-bottom:1px solid var(--line);background:transparent;border-radius:0}.shopping-group .check-row:last-child{border-bottom:0}.check-copy strong{font-size:15px;font-weight:500}.check-copy small{font-size:11px;margin-top:2px;line-height:1.5}.shopping-group .check-copy details{font-size:11px;color:var(--muted);margin-top:2px}.shopping-group .check-copy details summary{min-height:26px}.shopping-amount{font-size:13px;color:var(--ink);font-weight:650;max-width:100px;text-align:right}.check-row.checked .check-copy{opacity:.5;text-decoration:line-through}.source-note{font-size:11px;line-height:1.7;margin:14px 0}.stock-grid{gap:12px}.meal-row{padding:14px}.settings-row{gap:15px}.profile-head{padding:20px}.stats>div{padding:18px}.calendar{border:0;background:var(--paper);border-radius:20px;padding:12px;box-shadow:var(--shadow-sm)}
/* Background editor uses the real media, with normalized crop coordinates. */
dialog{background:var(--bg);color:var(--ink);border:0;border-radius:28px;padding:22px;box-shadow:var(--shadow);max-height:92svh;max-width:540px;width:calc(100% - 24px)}dialog::backdrop{background:#21171070;backdrop-filter:blur(4px)}.dialog-head{margin-bottom:12px}.dialog-head h2{font-size:18px}.dialog-actions{display:flex;gap:10px;margin-top:18px}.dialog-actions button{flex:1;min-height:50px}.dialog-actions .primary{flex:2}.background-editor-preview{position:relative;height:200px;border-radius:22px;background:#38251d;overflow:hidden;isolation:isolate;margin:14px 0;cursor:grab}.background-preview-copy{position:absolute;left:20px;top:36px;z-index:2;color:#fff;pointer-events:none}.background-preview-copy small{font-size:12px}.background-preview-copy h3{font-size:22px;max-width:200px;line-height:1.5}.crop-hint{position:absolute;z-index:3;bottom:12px;left:50%;transform:translateX(-50%);border-radius:12px;padding:4px 8px;font-size:11px;background:#0006;color:#fff;white-space:nowrap;pointer-events:none}.background-section-label{font-size:13px;margin:16px 0 10px}.background-album{display:flex;gap:8px;overflow-x:auto;padding-bottom:3px;min-height:40px}.background-album button{flex:none;border-radius:16px;width:72px;height:72px;min-height:72px;border:2px solid transparent;padding:0;overflow:hidden}.background-album button[aria-pressed=true]{border-color:var(--accent)}.background-album img{width:100%;height:100%;object-fit:cover}.background-file-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.background-file-button{position:relative;display:flex;justify-content:center;align-items:center;background:var(--paper);border-radius:14px;min-height:44px;cursor:pointer;box-shadow:var(--shadow-sm);font-size:13px;overflow:hidden}.background-file-button input{position:absolute;inset:0;opacity:0;cursor:pointer}.background-file-button:focus-within{outline:3px solid var(--accent)}.background-picker input[type=range]{padding:0;border:0;background:none;accent-color:var(--accent);margin:10px 0;display:block;min-height:28px}.background-title-toggle{display:flex;justify-content:space-between;align-items:center;min-height:44px}.background-title-toggle input{width:22px;height:22px;accent-color:var(--accent)}.background-picker-status{font-size:12px;color:var(--muted);min-height:18px}
/* Capture is opt-in; no stock photograph is presented as a live camera. */
dialog:has(.dish-record){padding:0;width:min(100%,540px);max-width:none;max-height:100svh;height:100svh;margin:auto;border-radius:24px;overflow:auto;background:#191713}dialog:has(.dish-record) .dialog-head{position:absolute;z-index:5;top:18px;left:20px;right:20px;color:white;margin:0;display:flex;align-items:center;justify-content:space-between}dialog:has(.dish-record) .dialog-head h2{font-size:18px}dialog:has(.dish-record) .dialog-head button{background:#ffffff26;backdrop-filter:blur(10px);color:white;border-radius:14px}.dish-record{display:flex;flex-direction:column}.dish-record .dish-camera{margin:0;max-width:none!important;display:flex;flex-direction:column;color:var(--ink);position:relative;background:var(--bg);padding-bottom:16px}.dish-camera-stage{aspect-ratio:auto;height:62svh;min-height:330px;width:100%;border:0;border-radius:0!important;background:#191713}.dish-camera-guide{width:min(70%,300px);aspect-ratio:1;inset:auto;left:50%;top:50%;transform:translate(-50%,-50%);border:2px dashed var(--accent);box-shadow:0 0 0 500px #0004!important}.dish-camera-guide span{align-self:end;max-width:none;margin-bottom:-52px;padding:0 8px;background:transparent;color:#fff;font-size:13px;white-space:nowrap}.dish-camera.is-live .dish-camera-guide span{margin-bottom:-42px;background:transparent}.dish-camera-status{font-size:12px;text-align:center;order:4;margin:8px 20px 0}.dish-camera-styles{order:1;justify-content:center;gap:8px;margin:-20px 0 0;padding:18px 20px 8px;background:var(--bg);border-radius:22px 22px 0 0;z-index:3}.dish-camera-styles button{flex:0 1 auto;border:1px solid var(--line);border-radius:20px;min-height:36px;padding:6px 14px}.dish-camera-styles button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}.dish-camera-actions{order:2;display:flex;justify-content:center;padding:8px 20px 0;gap:12px}.dish-camera-actions button{flex:0 1 auto;min-height:60px;border-radius:24px;min-width:112px;font-weight:700}.dish-camera-actions button:has(+button:not([hidden])){min-width:74px}.dish-camera.is-live .dish-camera-actions button:not([hidden]){min-height:74px;min-width:74px;border-radius:50%;outline:3px solid var(--accent);outline-offset:4px;margin:5px 0}.dish-camera-fallback{order:3;margin:12px 20px 0}.dish-camera-note{order:5;margin:8px 20px 0;text-align:center;font-size:10px}.dish-record-fields{background:var(--bg);margin:0;padding:0 20px}.dish-record-fields>label:first-child{margin-top:0}.dish-record-fields input,.dish-record-fields select{background:var(--paper)}.dish-cover-option,.dish-record-hint{background:var(--bg);margin:0;padding:8px 20px;min-height:44px}.dish-record-hint{font-size:11px;min-height:0;padding-bottom:12px}dialog:has(.dish-record) .dialog-actions{margin:0;padding:12px 20px calc(16px + env(safe-area-inset-bottom));background:var(--bg);position:sticky;bottom:0;border:0;z-index:6}.dish-camera-preview{object-fit:contain;background:#191713}.dish-camera-live{object-fit:cover}
@media(min-width:700px){.app-shell main,body[data-device=ipad] main{padding:0 32px 112px}.app-header{height:68px}.home-welcome{padding-top:24px;margin-bottom:24px}.home-welcome h1{font-size:32px}.home-greeting{font-size:14px}.search-field{height:54px}.import-hero{height:300px;border-radius:28px}.import-copy{padding:34px}.import-copy h2{font-size:32px}.import-copy p{font-size:15px;margin:10px 0 18px}.import-copy .primary{min-height:44px;font-size:15px}.import-chip{font-size:13px;padding:4px 12px;margin-bottom:12px}.home-categories{gap:16px;margin-bottom:28px}.home-category{min-height:108px;font-size:14px;padding:16px;gap:10px}.category-icon{width:48px;height:48px;border-radius:16px}.category-icon .icon{width:28px;height:28px}.recipe-grid{gap:20px!important}.recipe-image-button{height:220px}.recipe-card>.card-title-button{padding:13px 18px 0}.recipe-card h3{font-size:18px}.recipe-card .recipe-card-meta{font-size:13px;margin:4px 40px 4px 18px}.recipe-card .add-meal{width:34px;height:34px;right:12px;bottom:12px}.card-favorite{width:36px;height:36px;top:12px;right:12px;padding:9px}.card-favorite .icon{width:18px;height:18px}.recipe-prep-list{padding-inline:22px!important}.recipe-prep-taskline{min-height:38px}.cook-focus{max-width:900px;margin:auto}.cook-title h2{font-size:28px}.cook-title{margin-bottom:20px}.cook-recipe-name{font-size:14px}.cook-progress-ring{width:62px;height:62px;font-size:17px}.focus-step-card{padding:26px}.focus-step-card .focus-step-text{font-size:22px}.step-card .uses{font-size:15px}.cook-metric{padding:16px 20px;min-height:82px}.cook-metric span{font-size:13px}.cook-metric strong{font-size:21px}.cook-controls button{min-height:60px;font-size:18px}body[data-screen=detail][data-cooking=true] #recipe-after{padding:26px 32px 30px}body[data-screen=detail][data-cooking=true] #media-slot .video-stage{height:39svh;min-height:300px;max-height:500px}.warm-page-intro h2{font-size:32px}.shopping-group .check-row{padding:18px 0}.shopping-amount{font-size:16px;max-width:150px}.check-copy strong{font-size:17px}.check-copy small{font-size:13px}dialog:has(.dish-record){width:650px;border-radius:28px;max-height:95svh}.dish-camera-stage{height:58svh}.recipe-detail-tabs{max-width:600px}.prep-start{max-width:100%}}
@media(max-width:359px){.app-shell main,body[data-device=phone] main{padding-inline:16px}.home-welcome h1{font-size:21px}.home-categories{gap:6px}.home-category{font-size:11px}.home-greeting{font-size:10px}.header-actions{gap:6px}.shopping-summary{gap:7px}.shopping-summary strong{font-size:11px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
body[data-screen=detail][data-cooking=true] #media-slot .media-panel{margin:0;border:0;border-radius:0;background:#17130f}body[data-screen=detail][data-cooking=true] #media-slot .video-stage{width:100%;height:calc(38svh - 48px);min-height:220px;max-height:430px;aspect-ratio:auto!important;margin:0;border-radius:0}body[data-screen=detail][data-cooking=true] #media-slot .video-layout-controls-host{background:#17130f;padding:0 12px 12px}body[data-screen=detail][data-cooking=true] .cooking-video-controls{background:#17130f;color:white;border-radius:0;padding:0;gap:8px}body[data-screen=detail][data-cooking=true] .cooking-video-time{color:#fff;font-size:12px}body[data-screen=detail][data-cooking=true] .cooking-video-controls button{background:#ffffff25;color:white;border:0;border-radius:50%;min-width:34px;width:34px;min-height:34px;height:34px;padding:4px;font-size:11px}body[data-screen=detail][data-cooking=true] .cooking-video-controls input{accent-color:#fff}body[data-screen=detail][data-cooking=true] .cooking-video-framing-toggle{color:white;font-size:10px;margin:0 0 4px auto;min-height:28px;padding:3px 8px}body[data-screen=detail][data-cooking=true] #media-slot .video-toolbar{display:none}.voice-status{background:transparent;padding:0}.recipe-image-button{aspect-ratio:auto}.recipe-card h3{margin:0}.recipe-card .add-meal{top:auto}.recipe-card .image-type{right:auto}.background-preview-copy{max-width:calc(100% - 40px)}
@media(min-width:700px){body[data-screen=detail][data-cooking=true] #media-slot .video-stage{height:calc(39svh - 48px);min-height:300px}}
.import-copy{display:flex;flex-direction:column;align-items:flex-start;height:100%;padding:20px}.import-chip{line-height:14px;padding:2px 10px;margin-bottom:6px}.import-copy h2{flex:none}.import-copy p{max-width:none;white-space:nowrap;margin:4px 0 8px}.import-copy .primary{margin-top:auto;flex:none}.header-actions .avatar{display:grid;place-items:center}.header-actions .avatar .icon{width:20px;height:20px}body[data-screen=recipes] #background-jobs-toggle{display:none}.recipe-image-button:hover img{transform:none}
@media(min-width:700px){.import-copy{padding:34px}.import-copy p{margin:10px 0 18px}.import-chip{line-height:18px;padding:4px 12px;margin-bottom:12px}}
body[data-screen=detail][data-recipe-tab=prep][data-cooking=false] .app-header,body[data-screen=detail][data-recipe-tab=prep][data-cooking=false] .recipe-detail-tabs,body[data-screen=detail][data-recipe-tab=prep][data-cooking=false] .app-footer,body[data-screen=detail][data-recipe-tab=prep][data-cooking=false] #bottom-nav{display:none}body[data-screen=detail][data-recipe-tab=prep][data-cooking=false] .recipe-toolbar{padding-top:16px;flex-wrap:nowrap;gap:12px;margin-bottom:18px}body[data-screen=detail][data-recipe-tab=prep][data-cooking=false] .recipe-toolbar>.icon-button{min-width:40px;width:40px;height:40px;min-height:40px;font-size:0;background:var(--paper);box-shadow:var(--shadow-sm);border-radius:14px;padding:10px}body[data-screen=detail][data-recipe-tab=prep][data-cooking=false] .recipe-bar-title{order:0;text-align:center;font-size:16px;line-height:1.4}body[data-screen=detail][data-recipe-tab=prep][data-cooking=false] .recipe-prep-head h2{font-size:26px}body[data-screen=detail][data-recipe-tab=prep][data-cooking=false] .prep-start{position:sticky;bottom:20px;z-index:8;margin-top:28px}body[data-screen=plan][data-plan-tab=shop] .app-header,body[data-screen=plan][data-plan-tab=prep] .app-header{display:none}.warm-page-bar{padding-top:16px}.recipe-prep-list .recipe-prep-item{padding:13px 0}.recipe-prep-copy{font-size:15px;line-height:1.7}.recipe-prep-taskline{padding:0;margin:0;min-height:28px;display:flex;align-items:center}
@media(max-width:699px){.home-welcome{min-height:0;padding-top:10px;margin-bottom:16px}.home-greeting{margin-bottom:2px}body[data-screen=recipes] .app-header{top:14px}}
body[data-screen=detail][data-recipe-tab=prep][data-cooking=false] .prep-start{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);width:calc(100% - 40px);max-width:1036px;margin:0;box-shadow:0 8px 24px #e2573b33}.recipe-footnotes{font-size:12px;color:var(--muted);margin:16px 0 24px}.recipe-footnotes summary{min-height:44px;display:flex;align-items:center;cursor:pointer}.recipe-footnotes[open]{padding:0 14px 10px;background:var(--paper);border-radius:16px}.dish-record .dish-camera-stage{height:calc(100svh - 190px);min-height:330px}dialog:has(.dish-record) .dialog-actions{position:static}dialog:has(.dish-camera-preview:not([hidden])) .dialog-actions{position:sticky}
@media(min-width:700px){.dish-record .dish-camera-stage{height:calc(95svh - 220px)}}
.background-preview-copy h3{white-space:pre-line;max-width:none;line-height:1.3}.background-preview-copy{top:30px}.background-picker>p.muted:first-child{display:none}
@media(max-width:699px){dialog:has(.background-picker){margin:20px auto 0;width:100%;height:calc(100svh - 20px);max-height:calc(100svh - 20px);padding:20px;border-radius:28px 28px 0 0}dialog:has(.background-picker) #modal-content{display:flex;flex-direction:column;min-height:100%}dialog:has(.background-picker) .dialog-actions{margin-top:auto;position:sticky;bottom:-20px;background:var(--bg);padding-top:14px;padding-bottom:2px;z-index:4}dialog:has(.background-picker) .dialog-head{margin-bottom:0}.background-editor-preview{margin-top:14px}}
/* Personal groups retain source categories, and allow more than one group per dish. */
.recipe-groups-home{position:relative;background:var(--paper);border-radius:16px;margin:0 0 20px;box-shadow:var(--shadow-sm)}.recipe-groups-home details>summary{min-height:52px;padding:12px 76px 12px 16px;cursor:pointer;list-style:none;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.recipe-groups-home summary strong{font-size:14px;font-weight:700;white-space:nowrap}.recipe-groups-home summary span{font-size:11px;color:var(--muted)}.recipe-groups-home details[open]>summary{border-bottom:1px solid var(--line)}.personal-groups-edit{position:absolute;right:8px;top:5px;display:flex;align-items:center;gap:4px;font-size:12px;min-height:40px;padding:7px 9px}.personal-groups-edit .icon{width:15px;height:15px}.personal-group-options{display:flex;gap:8px;flex-wrap:wrap;padding:12px 14px}.personal-group-options button{min-height:36px;border:1px solid var(--line);border-radius:20px;font-size:12px;padding:6px 12px;background:var(--bg)}.personal-group-options button.active{background:var(--soft);color:var(--accent);border-color:var(--accent)}.personal-group-options p{width:100%;margin:0 0 4px;font-size:12px}.card-group-action{display:inline-flex;align-items:center;gap:4px;margin:6px 38px 0 10px;padding:3px 5px;min-height:28px;background:transparent;border:0;font-size:11px;color:var(--muted);border-radius:8px}.card-group-action .icon{width:13px;height:13px}.card-group-action:hover{color:var(--accent);background:var(--soft)}
.group-create-row{display:flex;align-items:center;gap:8px;margin-top:14px}.group-create-row input{flex:1;min-width:0;font-size:13px}.group-create-row>button{flex:none;white-space:nowrap;font-size:12px;padding:9px 12px;display:inline-flex;align-items:center;gap:5px}.group-create-row .icon{width:16px;height:16px}.group-name-suggestions{display:flex;align-items:center;gap:3px;flex-wrap:wrap;margin:6px 0 14px;font-size:11px;color:var(--muted)}.group-name-suggestions button{min-height:32px;padding:4px 9px;font-size:12px;color:var(--accent)}.group-manager-layout{display:grid;grid-template-columns:140px minmax(0,1fr);gap:16px;min-height:240px}.group-manager-nav{display:flex;flex-direction:column;gap:4px;max-height:410px;overflow:auto}.group-manager-nav button{display:flex;justify-content:space-between;align-items:center;gap:8px;text-align:left;min-height:44px;padding:9px 10px;border:0;font-size:13px;background:transparent;word-break:break-word}.group-manager-nav button small{font-size:10px;color:var(--muted);flex:none;white-space:nowrap}.group-manager-nav button.active{background:var(--soft);color:var(--accent);font-weight:650}.group-manager-nav button[aria-pressed=true]{border-color:var(--accent)}.group-manager-content{min-width:0}.group-manager-content>label{margin:0;font-size:12px}.group-manager-content>label input{margin-top:5px;font-size:14px}.group-order-actions{display:flex;gap:4px;margin:4px 0 10px}.group-order-actions button{min-height:34px;font-size:11px;padding:5px 8px}.group-order-actions button:last-child{margin-left:auto}.group-manager-content>input{font-size:12px}.group-selection-actions{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin:7px 0}.group-selection-count{flex:1;font-size:11px;color:var(--muted);white-space:nowrap;margin:0}.group-selection-actions button{min-height:32px;padding:4px 5px;font-size:10px}.group-recipe-list{max-height:340px;overflow:auto;overscroll-behavior:contain;border-top:1px solid var(--line)}.group-recipe-option{display:flex;align-items:center;gap:10px;min-height:68px;margin:0;padding:10px 2px;border-bottom:1px solid var(--line);cursor:pointer;font-size:13px}.group-recipe-option input{width:21px;height:21px;margin:0;flex:none}.group-recipe-option img{width:42px;height:42px;object-fit:cover;border-radius:11px;flex:none}.group-recipe-option>span{min-width:0}.group-recipe-option strong{display:block;font-weight:600;font-size:12px;line-height:1.6}.group-recipe-option small{display:block;font-size:10px;line-height:1.5;color:var(--muted)}.group-recipe-option.checked{background:var(--soft)}.group-editor-message{font-size:12px;color:var(--accent);min-height:18px;margin:12px 0 0}.assignment-group-list{display:flex;flex-direction:column;gap:0;max-height:42svh;overflow:auto;margin:14px 0}.assignment-group-option{display:flex;align-items:center;gap:12px;margin:0;min-height:50px;padding:11px 4px;border-bottom:1px solid var(--line);cursor:pointer}.assignment-group-option strong{font-size:14px;font-weight:500}.assignment-group-option input{margin:0;width:22px;height:22px}.recipe-group-assignment>h3{font-size:16px}.recipe-group-assignment>p{font-size:12px}
dialog:has(.recipe-groups-editor){max-width:780px}dialog:has(.recipe-groups-editor) .dialog-actions,dialog:has(.recipe-group-assignment) .dialog-actions{position:sticky;bottom:-22px;background:var(--bg);padding-top:12px;padding-bottom:2px;z-index:5}
@media(max-width:599px){dialog:has(.recipe-groups-editor){padding:18px;max-height:94svh;width:calc(100% - 16px)}.group-manager-layout{display:block}.group-manager-nav{flex-direction:row;overflow:auto;max-height:none;gap:7px;padding-bottom:10px;margin-bottom:10px}.group-manager-nav button{flex:none;min-height:36px;padding:7px 11px;background:var(--paper);border:1px solid var(--line);border-radius:20px;font-size:12px;max-width:210px;white-space:normal}.group-manager-nav button small{font-size:10px}.group-recipe-list{max-height:32svh}.group-create-row>button{padding:9px;font-size:12px}.group-create-row input{padding:10px}.recipe-groups-home details>summary{gap:3px 10px}.recipe-groups-home summary span{font-size:10px}.recipe-groups-editor>.muted{font-size:12px}.group-manager-content>label{font-size:11px}dialog:has(.recipe-groups-editor) .dialog-actions{bottom:-18px}}
@media(min-width:700px){.card-group-action{font-size:12px;margin-left:14px}.recipe-groups-home summary strong{font-size:15px}.recipe-groups-home summary span{font-size:12px}.personal-group-options button{font-size:13px}.group-recipe-option strong{font-size:13px}}
.recipe-groups-home summary span,.assignment-group-option strong{min-width:0;overflow-wrap:anywhere}.assignment-group-option strong{flex:1}.group-manager-nav button>span{min-width:0;overflow-wrap:anywhere}body:has(dialog[open] .recipe-groups-editor),body:has(dialog[open] .recipe-group-assignment){overflow:hidden}
/* Cooking playback follows the visible video, including after device rotation.
   A fixed-height letterbox must not override the detected content aspect ratio. */
body[data-screen=detail][data-cooking=true] #media-slot .video-panel{background:var(--bg)}
body[data-screen=detail][data-cooking=true] #media-slot .video-stage{--cooking-video-height-limit:54svh;width:min(100%,calc(var(--cooking-video-height-limit) * var(--cooking-video-ratio)));height:auto;min-height:0;max-height:none;aspect-ratio:var(--cooking-video-ratio)!important;margin-inline:auto;background:transparent}
body[data-screen=detail][data-cooking=true] #media-slot video{max-height:none}
@media(orientation:landscape) and (min-width:650px){
 body[data-screen=detail][data-cooking=true] #recipe-workspace{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(280px,1fr);align-items:start;min-height:100svh}
 body[data-screen=detail][data-cooking=true] #media-slot{position:sticky;top:0;align-self:start;padding-top:64px}
 body[data-screen=detail][data-cooking=true] #media-slot .video-stage{--cooking-video-height-limit:calc(100svh - 120px)}
 body[data-screen=detail][data-cooking=true] #recipe-after{margin-top:0;border-radius:0;padding:20px}
 body[data-screen=detail][data-cooking=true] #recipe-before{right:calc(46.5% + 16px)}
}
body:not([data-language=zh]) .home-welcome h1{white-space:normal;font-size:clamp(24px,5.9vw,32px)}
body:not([data-language=zh]) .home-category{font-size:11px;line-height:1.25;overflow-wrap:anywhere}
body:not([data-language=zh]) .import-copy .primary{white-space:normal;max-width:100%;line-height:1.35}
body:not([data-language=zh]) .bottom-nav button{font-size:10px;line-height:1.15;text-align:center}
.language-row{gap:16px}.language-row select{max-width:190px}
body[data-screen=detail][data-cooking=true] #media-slot .media-panel{background:var(--bg);border-radius:0;overflow:visible}
body[data-screen=detail][data-cooking=true] #media-slot .cooking-video-stage{border-radius:0}
body[data-screen=detail][data-cooking=true] .recipe-toolbar>button,body[data-screen=detail][data-cooking=true] .cook-more-menu>summary{background:#34281fde}
@media(orientation:portrait) and (max-width:600px){body[data-screen=detail][data-cooking=true] #media-slot .video-stage[data-video-orientation=portrait]{width:100%}}
body[data-screen=detail][data-cooking=true] #media-slot .video-toolbar{background:var(--bg)}
body[data-screen=detail][data-cooking=true] #media-slot .video-layout-controls-host{background:var(--bg);padding:0}
body[data-screen=detail][data-cooking=true] #media-slot .video-layout-controls-host:empty{display:none}
/* One reading column: recipe text first, the original below, at every orientation. */
body[data-screen=detail] #recipe-workspace{display:flex;flex-direction:column;min-height:0}
body[data-screen=detail] #recipe-before,body[data-screen=detail] #recipe-after,body[data-screen=detail] #media-slot{width:100%;max-width:900px;margin-inline:auto;box-sizing:border-box}
body[data-screen=detail][data-cooking=true] #recipe-before{position:static;inset:auto;padding:12px 20px 0}
body[data-screen=detail][data-cooking=true] #recipe-before .recipe-toolbar{position:static;inset:auto;justify-content:flex-start}
body[data-screen=detail][data-cooking=true] #recipe-after{position:static;margin-top:0;border-radius:0;padding:20px}
body[data-screen=detail] #media-slot,body[data-screen=detail][data-cooking=true] #media-slot{display:block;position:static;inset:auto;align-self:auto;margin-top:24px;padding:0 20px 32px;scroll-margin-top:20px}
body[data-screen=detail] #recipe-after,.step-card{scroll-margin-top:24px}
.recipe-video-navigation{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.recipe-video-navigation h2{font-size:18px}.recipe-video-navigation button{min-height:44px;display:flex;align-items:center;gap:6px}
body[data-screen=detail][data-cooking=true] #media-slot .video-stage{--cooking-video-height-limit:65svh}
body[data-screen=detail][data-cooking=true] .cook-focus{margin:0}
body[data-screen=detail] #media-slot iframe{display:block}

body[data-screen=detail][data-cooking=true] #recipe-workspace{display:flex;grid-template-columns:none}
body[data-screen=detail][data-recipe-tab=prep][data-cooking=false] #media-slot{display:block}
