@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/variable/pretendardvariable.css');
@import url('https://cdn.jsdelivr.net/gh/toss/tossface/dist/tossface.css');
:root{color-scheme:dark;--bg:#07111e;--surface:#101d2c;--surface2:#18283b;--line:#2b4056;--text:#eaf4ff;--muted:#a9bdd3;--blue:#3b8dff;--ice:#9ddcff;--good:#a7decf;--bad:#edb5b5}*{box-sizing:border-box}html{background:var(--bg)}body{margin:0;background:var(--bg);word-break:keep-all;overflow-wrap:break-word;text-wrap:pretty}button,input,select,textarea{font:inherit}button{cursor:pointer;font-family:Tossface,"Pretendard Variable",Pretendard,system-ui,sans-serif}input,select,textarea{width:100%;outline:none}input[type=file]{padding:9px}input[type=checkbox]{width:auto}h1,h2,h3,p{margin:0}h1,h2,h3{text-wrap:balance}p{text-wrap:pretty}.shell{margin:auto;min-height:100dvh;}.header{display:flex;justify-content:space-between;align-items:center;}.brand{display:flex;align-items:center}.eyebrow{font-weight:800;letter-spacing:.12em;text-transform:uppercase}.nav{position:fixed;z-index:10;bottom:0;left:0;right:0;display:flex;justify-content:center;padding:7px max(9px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom))}.nav-inner{display:flex;justify-content:space-around}.nav button{border:0;background:none;min-width:55px;}.nav b{display:block;font-size:19px;margin-bottom:3px;font-family:Tossface,"Apple Color Emoji","Segoe UI Emoji",sans-serif}.page-head{display:flex;justify-content:space-between;}.page-head p{color:var(--muted);font-size:13px;}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}.card{border:1px solid #263c52;}.card h3{font-size:16px;margin-bottom:10px}.metric{min-height:127px}.metric strong{display:block;font-size:31px;letter-spacing:-.05em;margin:16px 0 4px}.metric small,.hint{color:var(--muted);font-size:12px}.unit{font-size:14px;color:var(--muted);font-weight:500}.section-title{font-size:17px;display:flex;justify-content:space-between}.section-title small{font-size:12px;font-weight:500}.row{display:flex;align-items:center;justify-content:space-between;gap:10px}.gap{display:grid;}.muted{color:var(--muted)}.small{font-size:12px}.chip-row{display:flex;overflow:auto;}.chip{border:1px solid #375b7b;border-radius:100px;padding:7px 11px;white-space:nowrap;font-size:12px}.chip.active{font-weight:800}.button{border:0;font-weight:800;}.button:disabled{opacity:.45;cursor:not-allowed}.actions{display:flex;flex-wrap:wrap}.actions>*{flex:1}.chart{height:175px;width:100%;display:block}.chart .gridline{stroke:#2d4359;stroke-width:1}.chart .line{fill:none;stroke:var(--ice);stroke-width:3;stroke-linejoin:round;stroke-linecap:round}.chart .area{fill:#3b8dff22}.chart text{fill:#9db4c9;font-size:12px}.chart circle{fill:var(--ice)}.tabs{display:flex;margin:17px 0}.tabs button{flex:1;border-radius:11px;border:1px solid #405e79;color:#a9bdd3;padding:10px 8px;font-size:12px}.record{border-bottom:1px solid #2c4258;display:flex;justify-content:space-between;}.record:last-child{border:0}.record strong{font-size:13px}.record small{font-size:12px;color:var(--muted);display:block;}.record button{border:0;background:#1c3a55;color:#acdfff;border-radius:8px;padding:6px 9px;}.field{display:grid;font-size:12px;color:#d0e0ed}.form-grid{display:grid;grid-template-columns:1fr 1fr;}.form-grid .wide{grid-column:1/-1}.modal-backdrop{position:fixed;z-index:20;inset:0;display:flex;justify-content:center;align-items:end}.sheet{padding:23px 20px calc(22px + env(safe-area-inset-bottom));width:min(100%,600px);max-height:92dvh;overflow:auto}.sheet-head{display:flex;justify-content:space-between;align-items:start}.close{border:0;background:transparent;color:var(--muted);font-size:24px}.sheet form{display:grid;}.toast{position:fixed;z-index:30;bottom:86px;box-shadow:0 8px 30px #0009;}.macrobar{display:flex;height:10px;border-radius:10px;overflow:hidden;}.macro{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.macro>div{border-radius:12px;padding:10px}.macro strong{display:block;font-size:17px}.macro small{font-size:12px;color:var(--muted)}.exercise{border:1px solid #405e79;border-radius:14px;padding:12px;display:grid;gap:8px}.set-row{display:grid;gap:6px}.set-row input{min-width:0}.set-row button{border:0;border-radius:9px;}.empty{text-align:center;color:var(--muted);padding:28px 12px;font-size:13px}.calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}.calendar button{border:1px solid #2c4258;background:#142538;color:var(--text);border-radius:9px;height:38px}.calendar button.filled{background:#245b83}.calendar button.today{border-color:var(--ice)}.calendar button.selected{outline:2px solid var(--ice)}.calendar span{text-align:center;font-size:12px;color:var(--muted)}.preview{width:100%;max-height:270px;object-fit:contain;background:#0c1a2b;border-radius:12px}.alert{padding:12px;border:1px solid #6b5b49;border-radius:12px;font-size:12px;line-height:1.5}.hidden{display:none!important}@media (max-width:650px){.shell{padding:19px 15px 100px}.page-head h2{font-size:23px}.card{padding:14px}.metric strong{font-size:26px}}@media (max-width:380px){.grid{grid-template-columns:1fr 1fr}.metric strong{font-size:23px}.nav button{min-width:48px}}

.record-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:flex-end;max-width:55%}.record-actions button{white-space:nowrap}
.text-button{border:0;background:transparent;color:var(--ice);font-size:12px;}
.previous-record{font-size:12px;color:var(--good);background:#1b302f;padding:8px 10px;border-radius:9px}.set-row{align-items:center}
.set-row input,.set-row select{padding:8px 5px;min-width:0}.set-row button{padding:8px 4px}
.set-complete{display:flex;flex-direction:column;gap:1px;align-items:center;font-size:12px;color:var(--muted)}.set-complete input{width:16px;height:16px}
.progress-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.progress-photo{display:block;width:100%;height:260px;object-fit:contain;background:#08121f;border-radius:12px}.progress-grid .empty{grid-column:1/-1}
.plate-calc{display:grid;align-items:end;gap:8px;padding:10px;border-radius:12px}.plate-calc .hint{grid-column:1/-1}
@media (max-width:650px){.record{align-items:flex-start}.record-actions{max-width:48%}.set-row{font-size:12px}.sheet{padding-left:15px;padding-right:15px}.macro strong{font-size:14px}}
.sheet,.sheet form,#exercise-list,.exercise,.form-grid,.form-grid>*,.plate-calc,.plate-calc>*{min-width:0;max-width:100%}
.sheet{overflow-x:hidden}.sheet form,#exercise-list{width:100%}.exercise{overflow-x:hidden}
.set-row{width:100%;min-width:0;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-areas:'weight reps type type' 'rpe done copy remove'}
.set-row [data-set="weight"]{grid-area:weight}.set-row [data-set="reps"]{grid-area:reps}.set-row [data-set="type"]{grid-area:type}.set-row [data-set="rpe"]{grid-area:rpe}.set-row .set-complete{grid-area:done}.set-row [data-copy-set]{grid-area:copy}.set-row [data-remove-set]{grid-area:remove}
.plate-calc{grid-template-columns:minmax(0,1fr) auto}.plate-calc .button{white-space:normal;font-size:12px;padding:10px}
@media (max-width:650px){.sheet .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.set-row{gap:5px}.set-row input,.set-row select{font-size:12px}.set-row button{font-size:12px}}

/* Workout atlas and compact, touch-first set editor. */
.exercise-picker{display:grid;gap:12px;padding:15px;border:1px solid #385e82;border-radius:18px;}
.exercise-picker h3{font-size:18px;margin-top:4px}.exercise-picker .row{align-items:start}.exercise-picker .text-button{white-space:nowrap}
.exercise-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;}
.exercise-choice{display:flex;min-width:0;border:1px solid #3d5d79;border-radius:12px;overflow:hidden;align-items:center}
.exercise-pick{display:flex;gap:8px;align-items:center;text-align:left;min-width:0;flex:1;border:0;background:none;color:var(--text);padding:11px 7px}.exercise-pick span{min-width:0}.exercise-pick strong{display:block;font-size:12px;line-height:1.45}.exercise-pick small{display:block;color:var(--muted);font-size:12px;margin-top:3px;line-height:1.4}
.exercise-part-mark{display:grid;place-items:center;flex:0 0 28px;width:28px;height:33px;border-radius:8px;background:#254768;color:#c5e9ff;font-weight:700}.machine-icon{width:32px;height:32px;flex:0 0 32px;color:#c5e9ff}
.favorite-toggle{align-self:stretch;min-width:32px;padding:4px;border:0;background:none;color:var(--ice);font-size:20px}.favorite-toggle[aria-pressed=true]{color:#f0d590}
.anatomy-pair{display:flex;justify-content:center;gap:24px;padding:12px 0 5px}.anatomy-map{width:120px;max-width:42%;height:auto;overflow:visible}.anatomy-map [role=button]{cursor:pointer}.anatomy-map [role=button]:focus{stroke:#fff;stroke-width:3;outline:none}
.target-legend{display:flex;align-items:center;justify-content:center;gap:5px;font-size:12px;color:var(--muted)}.primary-dot,.secondary-dot{display:inline-block;width:10px;height:10px;border-radius:3px;background:#f25d68}.secondary-dot{background:repeating-linear-gradient(135deg,#64454f,#64454f 2px,#f1b9c5 2px,#f1b9c5 4px)}
.exercise-targets{padding:10px 12px;background:#102236;border-radius:12px}.exercise-targets summary{cursor:pointer;color:var(--ice);font-size:12px}.exercise-targets .hint{margin-top:8px;text-align:center;line-height:1.5}
.exercise-order{display:flex;gap:5px}.exercise-order button{border:1px solid #3e6586;background:#1c3a57;color:#c6e7ff;border-radius:8px;min-width:32px;min-height:32px}.exercise-order button:disabled{opacity:.35;cursor:default}
.set-row.set-card{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:none;gap:10px;width:100%;padding:11px;border:1px solid #3c5973;background:#102337;border-radius:12px}
.set-card-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.set-card-head strong{font-size:12px;color:var(--ice)}.set-card-head small{font-size:12px;color:var(--muted)}.set-card-head .set-complete{margin-left:auto;flex-direction:row;gap:5px;font-size:12px}.set-card-head .set-complete input{width:20px;height:20px;accent-color:var(--ice)}
.set-input-grid{display:grid;grid-template-columns:minmax(0,1fr) 76px;gap:8px}.set-input-grid>*{min-width:0}.set-input-grid .field{font-size:12px}.step-input{display:flex;align-items:stretch;min-width:0}.step-input input{border-radius:0;text-align:center;min-width:0;width:100%;padding:9px 2px!important;appearance:textfield}.step-input input::-webkit-inner-spin-button{appearance:none}.step-input button{flex:0 0 32px;min-width:32px;border-radius:8px 0 0 8px!important;background:#1e4568!important;color:#d8efff!important;font-size:16px!important;padding:8px 3px!important}.step-input button:last-child{border-radius:0 8px 8px 0!important}
.set-card .set-card-footer{display:grid;grid-template-columns:minmax(0,1fr) 52px 44px;gap:7px}.set-card-footer button{font-size:12px}.set-card-footer select{min-width:0}.set-card [data-set],.set-card [data-copy-set],.set-card [data-remove-set],.set-card .set-complete{grid-area:auto!important}
.set-card input,.set-card select{min-height:38px}.exercise .previous-record{line-height:1.5}.exercise .previous-record .text-button{padding:6px 0;font-size:12px}.exercise .hint{line-height:1.55}#exercise-list{display:grid;gap:14px}
button:focus-visible,summary:focus-visible{outline:2px solid var(--ice);outline-offset:2px}
@media(max-width:380px){.exercise-picker{padding:11px}.exercise-cards{grid-template-columns:minmax(0,1fr)}.exercise-pick strong{font-size:13px}.set-row.set-card{padding:9px}.step-input button{flex-basis:28px;min-width:28px}.set-input-grid{grid-template-columns:minmax(0,1fr) 68px}}

/* Approved direction 03: one atlas across editor, result, home and analysis. */
.atlas-block{padding:16px 12px;background:radial-gradient(ellipse at 50% 40%,#12263d,#0b1a2b 75%);border:1px solid #2c455f;border-radius:14px;overflow:hidden}.atlas-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px}.atlas-heading span{font-size:12px;letter-spacing:.1em;color:#9cb6ce}.atlas-heading strong{font-size:12px;color:#d8ebff}.atlas-block .anatomy-pair{display:flex;gap:16px;justify-content:center;align-items:flex-start;max-width:440px;margin:auto}.atlas-figure{flex:1;min-width:0;max-width:190px;margin:0;text-align:center}.atlas-block .anatomy-map{display:block;width:100%;max-width:100%;height:auto;max-height:370px;overflow:visible}.atlas-figure figcaption{font-size:12px;color:#a4bed6;margin:8px 0}.atlas-block .target-legend{font-size:12px;line-height:1.7;justify-content:center;flex-wrap:wrap}.atlas-block .hint{font-size:12px;line-height:1.7}.atlas-block .primary-dot{background:#a84659}.atlas-block .secondary-dot{background:repeating-linear-gradient(-28deg,#dfadbd 0 1px,#644257 1px 4px)}.load-dot{display:inline-block;width:10px;height:10px;border-radius:3px;}.technical-atlas .muscle[role=button]:focus{stroke:#fff;stroke-width:2;outline:none}.atlas-load-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}.atlas-load-list .record{display:block;padding:10px;border:1px solid #2d4359;border-radius:8px}.atlas-load-list small{display:block;color:#a2b9cd}.atlas-switch{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}@media(max-width:420px){.atlas-block{padding:14px 8px}.atlas-block .anatomy-pair{gap:8px}.atlas-heading strong{font-size:12px}.atlas-block .target-legend{font-size:12px}}

.sheet{overflow-anchor:none}

/* Settings rhythm and breathing room around the app header. */
.shell{padding-top:calc(30px + env(safe-area-inset-top,0px))}
.settings-page .page-head{margin-bottom:22px}
.settings-page>.card,.settings-page>.section.card{display:grid;gap:16px;padding:24px;margin-top:18px;min-width:0}
.settings-page>.page-head+.card{margin-top:0}
.settings-page>.card h3,.settings-page>.section.card h3{margin:0;line-height:1.35}
.settings-page>.card>p,.settings-page>.section.card>p{margin:0;line-height:1.65;overflow-wrap:anywhere}
.settings-page>.card .hint,.settings-page>.section.card .hint{line-height:1.6;overflow-wrap:anywhere}
.settings-page>.card .form-grid{gap:14px}
.settings-page>.card .actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:10px;min-width:0}
.settings-page>.card .actions>.button{min-width:0;min-height:44px;white-space:normal;line-height:1.4}
.settings-page>.card>.button{min-height:44px;justify-self:start;white-space:normal;line-height:1.4}
.settings-page>.card>.button+.button{margin-top:-6px}
.settings-page>.card .record{min-height:40px}
.settings-page>.card .record span:last-child{white-space:nowrap}
.settings-page>.card>.text-button{justify-self:start;text-align:left}
@media(max-width:650px){
  .shell{padding-top:calc(24px + env(safe-area-inset-top,0px));padding-left:calc(18px + env(safe-area-inset-left,0px));padding-right:calc(18px + env(safe-area-inset-right,0px))}
  .header{min-height:52px;}
  .settings-page>.card,.settings-page>.section.card{padding:20px 18px;gap:15px;margin-top:16px}
  .settings-page>.card .actions{grid-template-columns:minmax(0,1fr)}
  .settings-page>.card>.button{width:100%;justify-self:stretch}
}

/* Mylogue blue system — all application surfaces share one rhythm. */
:root{--bg:#050c16;--surface:#0e1d30;--surface2:#162b43;--line:#28435f;--text:#e9f3ff;--muted:#a8c0d8;--blue:#2379ed;--ice:#76c9ff;--good:#83d9c1;--bad:#f0a5aa;--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:24px;--space-6:32px}
html,body{background:var(--bg)}body{font-family:'Noto Sans KR','Pretendard Variable',Pretendard,system-ui,sans-serif;}button,input,select,textarea{font-family:inherit}::selection{background:#287bd5;color:#fff}
.shell{padding:calc(32px + env(safe-area-inset-top,0px)) 24px calc(112px + env(safe-area-inset-bottom,0px))}
.header{min-height:60px;padding-bottom:18px;}
.brand h1{letter-spacing:-.025em}.sub,.hint{line-height:1.6}.page-head{align-items:center;gap:24px;margin-bottom:24px}.page-head h2{font-size:27px;letter-spacing:-.025em}.page-head p{line-height:1.6;margin-top:8px}
.card{background:var(--surface);border-color:var(--line);border-radius:16px;min-width:0}.card h3{line-height:1.4}.section-title{align-items:center}.actions{gap:12px}.actions>*{min-width:0}.record{min-width:0}.record>div{min-width:0}.record small{line-height:1.55;margin-top:5px}
.button{border-radius:11px;}.button.secondary{background:#193755;color:#e6f3ff}.button.ghost{border-color:#47749a}.chip{background:#17304a;color:#d8edff;border-color:#37628a}.chip.active{background:var(--blue);border-color:var(--blue);color:#fff}.chip-row{gap:9px;padding-bottom:4px}.tabs{gap:10px}.tabs button{background:#142a42;border-color:#385d80}.tabs button.active{background:#20558a;border-color:#65b6ff;color:#fff}
input,select,textarea{border-color:#3a5d7d;min-height:44px}input:focus,select:focus,textarea:focus{box-shadow:0 0 0 3px #2379ed40}
.sheet{border-color:#365a7a;max-height:92dvh}.sheet h2{margin-bottom:18px}.macro>div{background:#142b43}.macrobar{background:#243b54}
.set-row button{background:#234969;color:#dcedfb}.alert{background:#193046;border-color:#4a6883;color:#e2f1ff}
.nav{border-color:#294764}
.eyebrow{color:var(--ice)}.exercise{background:#11263c;border-color:#355a7d}.exercise-choice{background:#16314b}.exercise-picker{background:#11263b}.plate-calc{background:#17324d}
button:focus-visible,[role=button]:focus-visible,summary:focus-visible{outline:2px solid var(--ice);outline-offset:3px}
@media(max-width:650px){.shell{padding:calc(24px + env(safe-area-inset-top,0px)) calc(18px + env(safe-area-inset-right,0px)) calc(108px + env(safe-area-inset-bottom,0px)) calc(18px + env(safe-area-inset-left,0px))}.header{padding-bottom:16px}.page-head{align-items:flex-start;gap:16px}.section{margin-top:28px}.grid{gap:12px}.form-grid{gap:14px}}.timeline-date{font-weight:750;font-variant-numeric:tabular-nums}.timeline-hero h2{letter-spacing:-.03em;}.timeline-hero>p:last-child{font-size:15px;color:var(--muted);line-height:1.6}.timeline-list{display:grid;}.timeline-card{border:1px solid var(--line);border-radius:16px;min-width:0}.timeline-card-top{display:flex;justify-content:space-between;align-items:baseline;gap:16px;font-size:14px;font-weight:750;}.timeline-card-top time{color:var(--muted);font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}.timeline-card h3{font-size:22px;line-height:1.3;}.timeline-foods,.timeline-preview{margin-top:16px;font-size:14px;line-height:1.6;color:var(--text)}.timeline-metrics,.timeline-macros{font-size:12px;line-height:1.6;color:var(--muted)}.timeline-metrics{margin:0 0 12px}.timeline-preview{border-top:1px solid var(--line);padding-top:14px}.timeline-link{display:block;margin:10px 0 0 auto;padding:8px 0;font-size:13px;font-weight:750}.timeline-value{margin:14px 0 12px}.timeline-value strong{font-size:26px;font-weight:800;}.timeline-value small{font-size:12px;font-family:'Noto Sans KR',sans-serif;font-weight:500;color:var(--muted)}.timeline-card .macrobar{height:8px}.timeline-macros{margin-top:12px}
@media(max-width:650px){.timeline-hero{}.timeline-card{padding:20px}.timeline-card h3{font-size:20px}}
.nutrition-date{max-width:190px}.nutrition-summary{display:grid;gap:16px}.nutrition-summary .section-title{margin:0}.nutrition-goal{min-width:0}.nutrition-goal-head{display:flex;justify-content:space-between;gap:16px;align-items:baseline;font-size:14px;font-variant-numeric:tabular-nums}.nutrition-goal-head span{text-align:right}.nutrition-goal small{display:block;color:var(--muted);margin-top:6px;font-size:12px}.nutrition-track{display:flex;height:9px;margin-top:10px;background:#213952;border-radius:8px;overflow:hidden}.nutrition-track i{display:block;height:100%;border-radius:8px}.nutrition-track b{display:block;height:100%;background:#ef9aa5}.nutrition-goal.kcal{color:#76c9ff}.nutrition-goal.carbs{color:#f2b66d}.nutrition-goal.protein{color:#77dbbd}.nutrition-goal.fat{color:#f0a783}.nutrition-summary .hint{margin:0}.nutrition-meal{padding:22px 24px}.nutrition-meal-head{display:flex;justify-content:space-between;align-items:baseline;gap:16px}.nutrition-meal-head h4{font-size:18px;margin:0}.nutrition-meal-head time{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}.nutrition-food-list{margin:18px 0 0}.nutrition-food{display:flex;justify-content:space-between;align-items:center;gap:16px;border-bottom:1px solid var(--line);padding:12px 0}.nutrition-food>div{min-width:0}.nutrition-food strong{display:block;font-size:14px}.nutrition-food small{display:block;color:var(--muted);font-size:12px;margin-top:5px}.nutrition-food-side{display:flex;align-items:center;gap:12px;white-space:nowrap;font-size:13px}.nutrition-food-side button{border:0;background:transparent;color:var(--ice);padding:7px}.nutrition-meal-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:18px}.nutrition-share{display:grid;gap:5px;padding:12px;background:#142a41;border-radius:12px;min-width:0}.nutrition-share span{font-size:12px}.nutrition-share strong{font-size:17px;font-variant-numeric:tabular-nums}.nutrition-share small{font-size:12px;color:var(--muted)}.nutrition-share.kcal span{color:#76c9ff}.nutrition-share.carbs span{color:#f2b66d}.nutrition-share.protein span{color:#77dbbd}.nutrition-share.fat span{color:#f0a783}
@media (max-width:650px){.nutrition-meal-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.nutrition-meal{padding:20px}.nutrition-food-side{gap:6px}.nutrition-summary{gap:14px}}
.food-entry-list{display:grid;gap:18px}.food-entry{margin:0;min-width:0;border:1px solid var(--line);border-radius:14px;background:#12263c;padding:20px;display:grid;gap:16px}.food-entry legend{font-weight:800;padding:0 8px}.food-entry .nutrient-fields{padding-top:16px;border-top:1px solid var(--line)}.gram-picks{display:flex;gap:8px;flex-wrap:wrap}.gram-manager{font-size:12px;color:var(--muted)}.gram-manager summary{cursor:pointer;padding:8px 0}.gram-editor{display:flex;gap:8px;align-items:center}.gram-editor input{flex:1;min-width:0}.meal-running-total{padding:14px 16px;border-radius:11px;background:#17334e;color:#dff0ff;font-weight:750}.title-presets{display:flex;flex-wrap:wrap;gap:8px}.title-preset{display:inline-flex;background:#173b5c;border:1px solid #37638a;border-radius:100px;overflow:hidden}.title-preset button{border:0;background:none;color:#e9f4ff;min-height:36px;padding:7px 12px}.title-preset button+button{padding:7px 10px;color:#b8d4e9;border-left:1px solid #37638a;font-size:18px}.set-time{margin-top:6px}
@media(max-width:650px){.food-entry{padding:16px}.gram-editor{display:grid}.title-presets{gap:6px}}

/* Nutrition palette D: one meaning and one color in every view. */
:root{--nutrient-kcal:#66d9ef;--nutrient-carbs:#ead96b;--nutrient-protein:#77d7b0;--nutrient-fat:#ff8396}
.nutrition-goal.kcal,.nutrition-share.kcal span{color:var(--nutrient-kcal)}
.nutrition-goal.carbs,.nutrition-share.carbs span{color:var(--nutrient-carbs)}
.nutrition-goal.protein,.nutrition-share.protein span{color:var(--nutrient-protein)}
.nutrition-goal.fat,.nutrition-share.fat span{color:var(--nutrient-fat)}
.nutrition-goal.kcal i{background:var(--nutrient-kcal)}
.nutrition-goal.carbs i{background:var(--nutrient-carbs)}
.nutrition-goal.protein i{background:var(--nutrient-protein)}
.nutrition-goal.fat i{background:var(--nutrient-fat)}
@media(max-width:650px){.nutrition-summary{gap:20px}.nutrition-summary .card{padding:22px 20px}.nutrition-summary .nutrition-goal-head{line-height:1.5}.nutrition-summary .nutrition-goal small{line-height:1.5;margin-top:8px}.nutrition-summary .nutrition-track{margin-top:12px}.nutrition-meal-list{gap:18px}.nutrition-meal{padding:22px 20px}.nutrition-food{padding:14px 0}.nutrition-food small{line-height:1.5}.nutrition-share{padding:14px;gap:7px}.nutrition-share span,.nutrition-share small{line-height:1.4}}

/* Shared content rhythm: headings, explanatory copy and actions remain separate. */
.section.card:not(details){display:grid;align-content:start;gap:18px}
.section.card:not(details)>h3{margin:0}
.section.card:not(details)>p{margin:0;line-height:1.65}
.section.card:not(details)>.actions{margin-top:2px}
.section.card:not(details)>.button{justify-self:start;min-width:min(100%,190px)}
.section.card:not(details)>.form-grid,.section.card:not(details)>.chip-row{min-width:0}
.section:not(.card)>.card+.hint,.section:not(.card)>.grid+.hint{margin-top:16px;line-height:1.65}
.section:not(.card)>.actions+.hint{margin-top:14px}
.card>.row+svg.chart{margin-top:18px}
.card>svg.chart+h3{margin-top:22px}
.card>svg.chart+.hint{margin-top:14px}
.text-button{min-height:36px;padding:8px 6px;line-height:1.45}
.actions{row-gap:12px}
details.section.card>summary{padding:5px 0;line-height:1.5}
details.section.card[open]>summary{margin-bottom:20px}
details.section.card[open]>h3{margin:20px 0 12px}

.session-card{gap:18px}
.session-card>.hint{font-size:12px;line-height:1.6}
.session-card>.actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.session-card>.actions>.button{min-width:0}
.recommendation-card{grid-template-columns:repeat(2,minmax(0,1fr))}
.recommendation-card>:not(.button){grid-column:1/-1}
.recommendation-card>.button{width:100%;min-width:0;justify-self:stretch}
.settings-page>.card:has(#draft-export){grid-template-columns:repeat(2,minmax(0,1fr))}
.settings-page>.card:has(#draft-export)>:not(.button){grid-column:1/-1}
.settings-page>.card:has(#draft-export)>.button{width:100%;min-width:0;justify-self:stretch;margin-top:0}
.progress-section>.progress-grid{gap:14px}
.progress-section>.progress-grid .card.empty{display:grid;place-items:center;min-height:112px;padding:24px;line-height:1.6}
.progress-section>.hint{margin-top:16px;line-height:1.65}
.progress-section>.progress-grid+.hint+.card{margin-top:18px!important}
.progress-section:has(.progress-grid .empty)>.progress-grid+.hint+.card{display:none}
@media(max-width:650px){
  .section.card:not(details){gap:16px}
  .section.card:not(details)>.button{justify-self:stretch}
  .recommendation-card,.settings-page>.card:has(#draft-export){grid-template-columns:minmax(0,1fr)}
  .progress-section>.progress-grid .card.empty{min-height:100px}
}
@media(max-width:380px){.session-card>.actions{grid-template-columns:minmax(0,1fr)}}
.page-head>.button{flex:0 0 auto;min-width:96px;white-space:nowrap}

/* Beta 2.0: AI review stays readable on desktop, mobile web and Android. */
.ai-draft-list{display:grid;}
.page-head+.alert{margin:24px 0}
.alert+.card.empty{margin-top:24px}
.ai-draft{display:grid;gap:22px;padding:28px}
.ai-draft-head{display:flex;justify-content:space-between;align-items:start;gap:16px;flex-wrap:wrap}
.ai-draft-head h3{margin:8px 0 0;line-height:1.35}
.ai-draft-head time{color:var(--muted);font-size:13px}
.ai-draft blockquote{margin:0;padding:15px 18px;border-left:3px solid var(--blue);background:var(--surface2);border-radius:0 10px 10px 0;line-height:1.65;word-break:keep-all;overflow-wrap:break-word}
.ai-review-form,.ai-items{display:grid;gap:20px;min-width:0}
.ai-item{display:grid;gap:16px;min-width:0;margin:0;padding:20px;border:1px solid var(--line);border-radius:14px}
.ai-item legend{padding:0 8px;font-weight:700}
.ai-duplicate{margin:0;padding:14px 16px;background:#3b2d1d;border:1px solid #a4713c;border-radius:10px;line-height:1.6}
.ai-set{padding-top:14px;border-top:1px solid var(--line)}
.ai-sets{display:grid;gap:14px;min-width:0}
.ai-estimate-edit{padding:14px;border:1px solid var(--line);border-radius:12px;min-width:0}
.ai-estimate-edit>.form-grid{margin:12px 0}
.ai-estimate,.nutrition-estimate{color:#ead96b}
.ai-estimate summary,.nutrition-estimate summary{cursor:pointer;line-height:1.5;word-break:keep-all;overflow-wrap:break-word}
.ai-estimate p{margin:8px 0 0;color:var(--muted);line-height:1.55}
.nutrition-estimate small{display:block;max-width:250px;margin-top:8px;color:var(--muted);line-height:1.5}
.ai-review-form>.actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.ai-review-form>.actions>.button{min-width:0}
@media(max-width:650px){.ai-draft{padding:20px;gap:18px}.ai-item{padding:16px}.ai-review-form>.actions{grid-template-columns:minmax(0,1fr)}}

