/* Lifestyle composition/theme extensions; shared H.A.N.K. owns primitives/runtime. */
:root{--lifestyle-accent:#1155cc;--lifestyle-panel:rgba(12,18,24,.76);--lifestyle-soft:rgba(255,255,255,.055);--lifestyle-line:color-mix(in srgb,var(--lifestyle-accent) 58%,rgba(255,255,255,.28))}
html,body,.hank-blue-page{background-color:#020304}.hank-blue-page{color:#f4f7fb}
.lifestyle-logo{position:relative}.lifestyle-logo span{position:absolute;right:-3%;bottom:27%;z-index:2;color:var(--lifestyle-accent);font-family:"Segoe Script","Brush Script MT",cursive;font-size:clamp(34px,4.8vw,66px);font-style:italic;font-weight:700;letter-spacing:-.035em;line-height:.8;transform:rotate(-4deg);text-shadow:0 2px 12px rgba(0,0,0,.75),0 0 14px color-mix(in srgb,var(--lifestyle-accent) 40%,transparent)}
#tiles{width:min(1200px,92vw);margin-inline:auto;align-items:stretch;padding-bottom:90px}.lifestyle-page{width:100%;display:grid;gap:clamp(16px,2.2vw,28px);min-width:0}
body:not(.hank-chat-mode) .hank-question,.lifestyle-page h2,.lifestyle-page>h3,.lifestyle-heading-row>span,.lifestyle-page>p,.lifestyle-block>p{color:var(--lifestyle-accent)}.lifestyle-page h2{text-align:center;letter-spacing:.045em}
.lifestyle-toolbar{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}.lifestyle-toolbar .hank-button{min-width:130px}.lifestyle-page .hank-button,.hank-auth-panel .hank-button{border-color:color-mix(in srgb,var(--lifestyle-accent) 78%,white);background:color-mix(in srgb,var(--lifestyle-accent) 82%,#050505);color:#fff}
.lifestyle-block{width:100%;min-width:0;padding:clamp(18px,2.4vw,30px);border:1px solid var(--lifestyle-line);border-radius:22px;background:linear-gradient(145deg,rgba(255,255,255,.055),rgba(4,8,12,.76));box-shadow:0 18px 42px rgba(0,0,0,.24),inset 0 1px rgba(255,255,255,.055)}.lifestyle-block>:first-child{margin-top:0}.lifestyle-block>:last-child{margin-bottom:0}
.lifestyle-heading-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px 24px;text-align:center}.lifestyle-heading-row h2,.lifestyle-heading-row h3{margin:0}
.lifestyle-summary-grid,.lifestyle-metric-grid,.lifestyle-connection-grid,.lifestyle-library-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(210px,100%),1fr));gap:14px}
.lifestyle-summary-grid>.hank-info-box,.lifestyle-metric,.lifestyle-connection,.lifestyle-library-tile,.lifestyle-diary>.hank-info-box,.lifestyle-theme-preview{min-width:0;padding:18px;border:1px solid var(--lifestyle-line);border-radius:16px;background:var(--lifestyle-soft);color:#f6f8fb;text-align:center;box-shadow:inset 0 1px rgba(255,255,255,.045)}
.lifestyle-stat-value{display:block;color:var(--lifestyle-accent);font-size:clamp(24px,4vw,38px);font-weight:700}.lifestyle-stat-label,.lifestyle-muted,.lifestyle-state{color:#b9c3cf}
.lifestyle-focus-grid{display:grid;grid-template-columns:repeat(4,minmax(0,200px));justify-content:space-evenly;gap:clamp(12px,1.6vw,20px)}.lifestyle-focus-tile{box-sizing:border-box;width:100%;min-width:0}.lifestyle-focus-tile .hank-tile-box{box-sizing:border-box;width:100%;min-height:185px;height:100%;padding:20px 16px;display:flex;flex-direction:column;justify-content:center;gap:8px;border:1px solid var(--lifestyle-line);border-radius:24px;background:radial-gradient(circle at 50% 18%,color-mix(in srgb,var(--lifestyle-accent) 24%,transparent),transparent 55%),var(--lifestyle-panel);box-shadow:0 18px 35px rgba(0,0,0,.3),inset 0 1px rgba(255,255,255,.08)}.lifestyle-focus-tile .hank-tile-initial{color:var(--lifestyle-accent);font-size:38px}.lifestyle-focus-tile .hank-tile-label{color:#fff;font-size:20px}.lifestyle-tile-summary{font-size:13px;line-height:1.4;color:#ced7e1}
.lifestyle-weight-flow{display:grid;grid-template-columns:1fr auto 1fr auto 1fr;gap:10px;align-items:center;text-align:center}.lifestyle-weight-flow strong{display:block;color:var(--lifestyle-accent);font-size:clamp(22px,4vw,34px)}.lifestyle-progress{width:100%;height:12px;border-radius:999px;overflow:hidden;background:rgba(255,255,255,.12)}.lifestyle-progress span{display:block;height:100%;width:var(--progress,50%);border-radius:inherit;background:var(--lifestyle-accent);box-shadow:0 0 16px var(--lifestyle-accent)}
.lifestyle-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:20px}.lifestyle-form-grid>section{min-width:0;padding:18px;border:1px solid var(--lifestyle-line);border-radius:16px;background:var(--lifestyle-soft)}.lifestyle-form-grid label{display:grid;min-width:0;gap:7px;margin-bottom:14px;color:var(--lifestyle-accent)}.lifestyle-form-grid input,.lifestyle-form-grid select,.lifestyle-form-grid textarea{box-sizing:border-box;width:100%;min-width:0;padding:11px 12px;border:1px solid var(--lifestyle-line);border-radius:10px;background:rgba(0,0,0,.48);color:#fff}
.lifestyle-status{display:inline-flex;justify-content:center;padding:4px 9px;border:1px solid currentColor;border-radius:999px;font-size:12px}.lifestyle-connection{display:flex;flex-direction:column;align-items:center;justify-content:center}
.lifestyle-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;padding:4px 2px 10px}.lifestyle-day{min-height:180px;padding:12px;border:1px solid var(--lifestyle-line);border-radius:16px;background:var(--lifestyle-soft);text-align:center}.lifestyle-day h3{margin:0 0 10px;color:var(--lifestyle-accent)}.lifestyle-workout-slot{width:100%;min-height:76px;margin-top:8px;padding:10px;border:1px dashed var(--lifestyle-accent);border-radius:12px;background:rgba(0,0,0,.32);color:var(--lifestyle-accent);text-align:center;cursor:pointer}.lifestyle-workout-slot.scheduled{border:1px solid var(--workout-colour);background:color-mix(in srgb,var(--workout-colour) 28%,rgba(0,0,0,.72));color:#fff;box-shadow:inset 4px 0 var(--workout-colour)}
.lifestyle-library-tile{display:grid;place-content:center;min-height:112px;gap:6px}.lifestyle-library-tile strong{color:var(--lifestyle-accent);font-size:18px}.lifestyle-plan-tile{border-color:var(--workout-colour);background:color-mix(in srgb,var(--workout-colour) 18%,transparent)}.lifestyle-plan-tile strong{color:color-mix(in srgb,var(--workout-colour) 80%,white)}.lifestyle-plan-colour{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:7px;font-size:12px}.lifestyle-plan-colour input{width:38px;height:30px;padding:2px;border:1px solid currentColor;border-radius:7px;background:transparent}
.lifestyle-exercise-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));align-items:end;gap:12px;margin:18px 0}.lifestyle-exercise-filters label,.lifestyle-inline-editor label{display:grid;gap:6px;color:var(--lifestyle-accent)}.lifestyle-exercise-filters input,.lifestyle-exercise-filters select,.lifestyle-inline-editor input,.lifestyle-inline-editor textarea,.lifestyle-add-row select{box-sizing:border-box;width:100%;min-width:0;padding:10px;border:1px solid var(--lifestyle-line);border-radius:9px;background:rgba(0,0,0,.48);color:#fff}.lifestyle-exercise-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(190px,100%),1fr));gap:14px}.lifestyle-exercise-tile{appearance:none;display:grid;justify-items:center;gap:7px;min-width:0;padding:14px;border:1px solid var(--lifestyle-line);border-radius:16px;background:var(--lifestyle-soft);color:#fff;text-align:center;cursor:pointer;font:inherit}.lifestyle-exercise-tile img{width:100%;max-width:180px;aspect-ratio:1;object-fit:contain;border-radius:12px}.lifestyle-exercise-tile strong{color:var(--lifestyle-accent);font-size:17px}.lifestyle-exercise-tile small{color:#b9c3cf}.lifestyle-library-empty{grid-column:1/-1;display:grid;gap:8px;padding:30px;text-align:center}.lifestyle-attribution{text-align:center;color:#b9c3cf!important;font-size:13px}.lifestyle-attribution a{color:var(--lifestyle-accent)}.lifestyle-pose-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:14px}.lifestyle-pose-grid img{width:min(280px,100%);height:auto;border-radius:16px}.lifestyle-exercise-detail li{text-align:left;margin-block:7px}.lifestyle-card-link,.lifestyle-workout-open{display:grid;justify-items:center;gap:5px;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer}.lifestyle-workout-open{width:100%}.lifestyle-schedule-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:4px;margin-top:8px}.lifestyle-schedule-actions button,.lifestyle-planned-row button,.lifestyle-library-tile>button:not(.lifestyle-card-link){min-height:34px;border:1px solid currentColor;border-radius:8px;background:rgba(0,0,0,.28);color:#fff;cursor:pointer}.lifestyle-inline-editor{display:grid;grid-template-columns:2fr 100px 3fr auto;align-items:end;gap:12px}.lifestyle-routine-list{display:grid;gap:10px}.lifestyle-planned-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;padding:14px;border:1px solid var(--lifestyle-line);border-radius:12px;background:var(--lifestyle-soft)}.lifestyle-planned-row strong{color:var(--lifestyle-accent)}.lifestyle-add-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;margin:18px 0}
.lifestyle-table-wrap{overflow-x:auto;border-radius:14px}.lifestyle-table{width:100%;min-width:620px;border-collapse:collapse;color:#f3f6fa;background:rgba(0,0,0,.34)}.lifestyle-table th,.lifestyle-table td{padding:11px;border:1px solid rgba(255,255,255,.2);text-align:center}.lifestyle-table th{color:var(--lifestyle-accent)}
.lifestyle-metric{appearance:none;width:100%;cursor:pointer;font:inherit}.lifestyle-metric strong{display:block;margin-top:8px;color:var(--lifestyle-accent);font-size:22px}.lifestyle-state{margin-top:8px;font-size:12px}
.lifestyle-chart{height:210px;display:flex;align-items:end;gap:8px;padding:20px;border:1px solid var(--lifestyle-line);border-radius:16px;background:repeating-linear-gradient(to top,transparent 0 39px,rgba(255,255,255,.1) 40px),linear-gradient(145deg,rgba(255,255,255,.055),rgba(0,0,0,.54))}.lifestyle-chart span{flex:1;height:var(--bar);min-width:8px;background:var(--lifestyle-accent);border-radius:7px 7px 2px 2px;box-shadow:0 0 10px color-mix(in srgb,var(--lifestyle-accent) 58%,transparent)}
.lifestyle-periods{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}.lifestyle-periods button,.lifestyle-quick-add{min-height:44px;padding:8px 12px}.lifestyle-periods button{border:1px solid var(--lifestyle-line);border-radius:999px;background:transparent;color:var(--lifestyle-accent)}.lifestyle-diary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.lifestyle-chat-context{color:#8fa0b3;font-size:12px}.lifestyle-login-actions{display:grid;gap:10px}
.lifestyle-colour-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.lifestyle-colour{display:grid;justify-items:center;gap:8px;min-height:92px;padding:12px;border:1px solid rgba(255,255,255,.22);border-radius:14px;background:rgba(255,255,255,.04);color:#fff;cursor:pointer}.lifestyle-colour span{width:38px;aspect-ratio:1;border-radius:50%;background:var(--swatch);box-shadow:0 0 16px color-mix(in srgb,var(--swatch) 65%,transparent)}.lifestyle-colour.selected{border-color:var(--swatch);box-shadow:inset 0 0 0 2px var(--swatch)}.lifestyle-custom-colour{display:flex;align-items:center;justify-content:center;gap:12px;margin:18px 0;color:var(--lifestyle-accent)}.lifestyle-custom-colour input{width:64px;height:44px;padding:3px;border:1px solid var(--lifestyle-line);border-radius:9px;background:transparent}.lifestyle-theme-preview strong{display:block;color:var(--lifestyle-accent);font-size:22px}
/* Featured is a canonical Agent-selector variant; only placement is extended. */
.lifestyle-page .hank-agent-page{width:100%}.lifestyle-page .hank-assistant-row{justify-content:center;gap:clamp(16px,3vw,34px)}.lifestyle-page .hank-featured-heading{color:var(--lifestyle-accent);text-align:center}
@media(max-width:900px){.lifestyle-focus-grid{grid-template-columns:repeat(2,minmax(0,200px));justify-content:center}.lifestyle-calendar{grid-template-columns:repeat(3,minmax(0,1fr))}.lifestyle-form-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:720px){#tiles{width:calc(100% - (2 * var(--hank-content-gutter)))}.lifestyle-diary{grid-template-columns:minmax(0,1fr)}.lifestyle-toolbar .hank-button{flex:1 1 140px}.lifestyle-weight-flow{grid-template-columns:1fr}.lifestyle-weight-arrow{transform:rotate(90deg)}.lifestyle-logo span{right:-2%;bottom:25%}}
@media(max-width:440px){.lifestyle-focus-grid{grid-template-columns:minmax(0,1fr)}.lifestyle-focus-tile .hank-tile-box{min-height:170px}.lifestyle-block{padding:16px;border-radius:18px}}
@media(max-width:720px){.lifestyle-inline-editor{grid-template-columns:minmax(0,1fr)}.lifestyle-add-row{grid-template-columns:minmax(0,1fr)}}

/* Exercise metadata is descriptive text, scoped separately from statistics. */
.lifestyle-exercise-metadata>.hank-info-box{min-width:0;height:auto;white-space:normal;overflow-wrap:anywhere}
.lifestyle-exercise-metadata .lifestyle-stat-value{display:block;min-width:0;max-width:100%;font-size:18px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
.lifestyle-exercise-metadata .lifestyle-stat-label{display:block;margin-top:6px;font-size:13px;line-height:1.4;color:#b9c3cf}
.lifestyle-pose-single img{width:min(420px,100%);object-fit:contain}
.lifestyle-quick-guide{min-width:0;max-width:640px;margin:14px auto;padding:14px 18px;border:1px solid var(--lifestyle-line);border-radius:14px;background:var(--lifestyle-soft);overflow-wrap:anywhere}
.lifestyle-exercise-detail .lifestyle-quick-guide h2{margin:0 0 8px;font-size:18px}
.lifestyle-quick-guide ol{margin:0;padding-left:22px;font-size:15px;line-height:1.5}

/* Keep programmatic content focus from drawing a second editor frame. */
#tiles.lifestyle-editor-content:focus{outline:none}
.lifestyle-fitness-editor{min-width:0;margin:0;padding:0;border:0;background:transparent;box-shadow:none}
.lifestyle-inline-editor{grid-template-columns:repeat(auto-fit,minmax(min(170px,100%),1fr))}
.lifestyle-inline-editor select,.lifestyle-prescription-fields input,.lifestyle-prescription-fields select,.lifestyle-prescription-fields textarea{box-sizing:border-box;width:100%;min-width:0;padding:10px;border:1px solid var(--lifestyle-line);border-radius:9px;background:rgba(0,0,0,.48);color:#fff;font:inherit}
.lifestyle-prescription{display:block;box-sizing:border-box;min-width:0;margin:0}
.lifestyle-prescription legend{max-width:100%;padding:0 6px;color:var(--lifestyle-accent);overflow-wrap:anywhere}
.lifestyle-prescription-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr));gap:12px}
.lifestyle-prescription-fields label{display:grid;min-width:0;gap:6px;color:#b9c3cf}
.lifestyle-exercise-notes{grid-column:1/-1}
.lifestyle-prescription-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.lifestyle-fitness-editor .lifestyle-toolbar{margin-top:18px}
.lifestyle-day,.lifestyle-workout-slot,.lifestyle-workout-open,.lifestyle-schedule-actions{box-sizing:border-box;width:100%;max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere}
.lifestyle-workout-open>*{min-width:0;max-width:100%}
.lifestyle-schedule-actions button{box-sizing:border-box;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;flex:1 1 65px}
@media(max-width:1100px){.lifestyle-calendar{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.lifestyle-calendar{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:540px){.lifestyle-calendar{grid-template-columns:minmax(0,1fr)}.lifestyle-day{min-height:0}}

/* Card-contained disclosure: actions expand in flow rather than covering another day. */
.lifestyle-workout-management{display:flex;flex-direction:column;align-items:stretch;min-width:0;max-width:100%;margin-top:6px}
.lifestyle-workout-manage{align-self:flex-end;box-sizing:border-box;width:44px;max-width:100%;min-height:44px;padding:0;border:1px solid var(--lifestyle-line);border-radius:9px;background:var(--lifestyle-soft);color:inherit;font-size:26px;line-height:1;cursor:pointer}
.lifestyle-workout-menu{flex-direction:column;gap:4px;padding:6px;border:1px solid var(--lifestyle-line);border-radius:10px;background:var(--lifestyle-panel)}
.lifestyle-workout-menu[hidden]{display:none}
.lifestyle-workout-menu button{flex:0 0 auto;width:100%;min-height:44px;padding:6px;font:inherit}
.lifestyle-workout-management.opens-up .lifestyle-workout-menu{order:-1;margin:0 0 6px}

.lifestyle-week-navigation h2{flex:1 1 220px;min-width:0;font-size:18px;overflow-wrap:anywhere}
.lifestyle-week-navigation>button{min-width:44px;min-height:44px}
.lifestyle-block>.lifestyle-progress{margin-block:16px}

/* Exercise-by-exercise Runner, including touch-sized controls at phone widths. */
.lifestyle-runner{max-width:900px;margin-inline:auto;overflow-wrap:anywhere}
.lifestyle-runner h3,.lifestyle-runner h4{color:var(--lifestyle-accent)}
.lifestyle-runner .lifestyle-pose-grid img{width:min(180px,100%);max-height:220px;object-fit:contain}
.lifestyle-runner .lifestyle-pose-single img{width:min(300px,100%)}
.lifestyle-runner-progress{display:flex;flex-wrap:wrap;gap:6px;margin-block:16px}
.lifestyle-runner-progress .hank-button{min-width:44px;min-height:44px;padding:6px}
.lifestyle-runner-progress [aria-current]{outline:2px solid var(--lifestyle-accent);outline-offset:2px}
.lifestyle-runner-sets{display:grid;gap:14px;margin-block:16px}
.lifestyle-runner-set{box-sizing:border-box;min-width:0;max-width:100%;margin:0;padding:14px;border:1px solid var(--lifestyle-line);border-radius:14px;background:var(--lifestyle-soft)}
.lifestyle-runner-set.is-complete{border-color:var(--lifestyle-accent);box-shadow:inset 4px 0 var(--lifestyle-accent)}
.lifestyle-runner-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(130px,100%),1fr));gap:12px;margin-bottom:12px}
.lifestyle-runner-fields label,.lifestyle-runner-note{display:grid;min-width:0;gap:6px;color:#ced7e1}
.lifestyle-runner-fields input,.lifestyle-runner-fields select,.lifestyle-runner-note textarea{box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:44px;padding:10px;border:1px solid var(--lifestyle-line);border-radius:9px;background:rgba(0,0,0,.48);color:#fff;font:inherit;font-size:16px}
.lifestyle-runner-note{margin-block:16px}
.lifestyle-runner .hank-button{min-height:44px;max-width:100%;white-space:normal}
.lifestyle-runner button:disabled{opacity:.45;cursor:default}
.lifestyle-runner-rest{margin-block:16px;padding:14px;border:1px solid var(--lifestyle-line);border-radius:14px;background:var(--lifestyle-panel);text-align:center}
.lifestyle-runner-rest [role="timer"]{font-size:24px;color:var(--lifestyle-accent);margin:8px}
.lifestyle-runner details{margin-block:12px}.lifestyle-runner summary{min-height:44px;cursor:pointer}
@media(max-width:440px){.lifestyle-runner .lifestyle-pose-grid img{width:min(130px,100%)}.lifestyle-runner .lifestyle-pose-single img{width:min(240px,100%)}.lifestyle-runner .lifestyle-toolbar{gap:8px}.lifestyle-runner .lifestyle-toolbar .hank-button{flex:1 1 120px}}

/* Runner-only interaction hierarchy: information first, compact secondary controls. */
.lifestyle-runner-page>.lifestyle-toolbar{justify-content:flex-start}
.lifestyle-runner-page>.lifestyle-toolbar .hank-back-button{flex:0 0 auto;min-width:44px;width:auto;min-height:44px;padding:6px 12px;background:transparent;color:var(--lifestyle-accent);border-color:var(--lifestyle-accent)}
.lifestyle-runner-active .hank-button{min-width:44px;min-height:44px;padding:6px 10px;background:rgba(0,0,0,.22);border:1px solid var(--lifestyle-accent);color:var(--lifestyle-accent);font-size:14px;line-height:1.2}
.lifestyle-runner-active .lifestyle-toolbar{gap:8px}
.lifestyle-runner-active .lifestyle-toolbar .hank-button{flex:0 1 auto}
.lifestyle-runner-active [data-run-primary]{background:color-mix(in srgb,var(--lifestyle-accent) 22%,#080d13);font-weight:700}
.lifestyle-runner-active .lifestyle-runner-progress{flex-wrap:nowrap;overflow-x:auto;max-width:100%;min-width:0;padding:4px;box-sizing:border-box}
.lifestyle-runner-active .lifestyle-runner-progress button{flex:0 0 44px}
.lifestyle-runner-progress button:not([aria-current]):not([data-completed]){opacity:.65}
.lifestyle-runner-active .lifestyle-runner-set-heading{font-size:24px;line-height:1.2;margin:16px 0 8px}
.lifestyle-runner-active .lifestyle-runner-sets{gap:8px;margin:8px 0 12px}
.lifestyle-runner-active .lifestyle-runner-set{padding:6px 10px 10px}
.lifestyle-runner-active .lifestyle-runner-set legend{font-size:12px;color:#b9c3cf;padding:0 4px}
.lifestyle-runner-active .lifestyle-runner-set.is-current{border:2px solid var(--lifestyle-accent);background:color-mix(in srgb,var(--lifestyle-accent) 9%,#080d13)}
.lifestyle-runner-set-main{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:end;gap:8px}
.lifestyle-runner-active .lifestyle-runner-fields{grid-template-columns:repeat(auto-fit,minmax(min(80px,100%),1fr));gap:8px;margin:0}
.lifestyle-runner-active .lifestyle-runner-fields label{font-size:11px;gap:3px}
.lifestyle-runner-active .lifestyle-runner-fields input{padding:4px 8px;font-size:22px;font-weight:700;line-height:1.2}
.lifestyle-runner-active .is-current .lifestyle-runner-fields input{font-size:26px}
.lifestyle-runner-active .lifestyle-runner-target{font-size:18px;line-height:1.4}
.lifestyle-runner-active details>summary{display:flex;align-items:center;min-height:44px;color:var(--lifestyle-accent);font-size:14px}
.lifestyle-runner-controls{position:sticky;bottom:0;z-index:5;box-sizing:border-box;min-width:0;max-width:100%;padding:10px;border:1px solid var(--lifestyle-line);border-radius:16px;background:#080d13;box-shadow:0 -4px 20px rgba(0,0,0,.45)}
.lifestyle-runner-control-main{display:grid;grid-template-columns:44px minmax(0,1fr) minmax(70px,110px);align-items:center;gap:8px}
.lifestyle-runner-focus{display:grid;min-width:0;text-align:center;overflow-wrap:anywhere}
.lifestyle-runner-focus>span{font-size:12px;font-weight:700;color:#b9c3cf}
.lifestyle-runner-focus>strong{font-size:clamp(19px,4vw,28px);line-height:1.2;color:var(--lifestyle-accent)}
.lifestyle-runner-focus [role="timer"]{font-size:clamp(34px,9vw,46px);font-variant-numeric:tabular-nums}
.lifestyle-runner-rest-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:6px;margin-top:8px}
@media(max-width:720px){
  .lifestyle-runner-active{padding-bottom:210px}
  .lifestyle-runner-active [data-run-current],.lifestyle-runner-active [data-run-finish]{scroll-margin-bottom:200px}
  .lifestyle-runner-controls{position:fixed;bottom:env(safe-area-inset-bottom,0px);left:max(12px,env(safe-area-inset-left,0px));right:max(12px,env(safe-area-inset-right,0px));width:auto;max-height:42vh;overflow-y:auto;z-index:30}
}

/* Immersive active workout only; normal pages and Session summaries retain their chrome. */
body.lifestyle-runner-mode .hank-logo,
body.lifestyle-runner-mode .hank-question{display:none}
body.lifestyle-runner-mode .hank-gate-inner{padding-top:8px;gap:0;justify-content:flex-start}
body.lifestyle-runner-mode #tiles{margin-top:0;max-width:100%;min-width:0}
.lifestyle-runner-page{width:100%;min-width:0}
.lifestyle-runner-active{box-sizing:border-box;padding:12px;min-width:0}
.lifestyle-runner-topbar{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;min-height:44px}
.lifestyle-runner-topbar #runnerWorkoutElapsed{text-align:center;font-size:18px;font-variant-numeric:tabular-nums;color:#ced7e1}
.lifestyle-runner-topbar .lifestyle-runner-exit{width:44px;padding:0;font-size:24px;background:transparent}
.lifestyle-runner-active .lifestyle-runner-progress{margin:4px 0;gap:4px}
.lifestyle-runner-active .lifestyle-runner-exercise-name{font-size:clamp(22px,5vw,30px);line-height:1.2;margin:8px 0}
.lifestyle-runner-active .lifestyle-pose-grid{flex-wrap:nowrap;gap:8px;margin:8px 0}
.lifestyle-runner-active .lifestyle-pose-grid img{width:calc(50% - 4px);min-width:0;max-width:180px;height:150px;object-fit:contain}
.lifestyle-runner-active .lifestyle-pose-single img{width:100%;max-width:220px;height:150px}
.lifestyle-runner-active .lifestyle-runner-target{margin:6px 0;font-size:16px}
.lifestyle-runner-active .lifestyle-runner-previous{margin:4px 0;font-size:13px}
.lifestyle-runner-active details{margin:4px 0}
.lifestyle-runner-active .lifestyle-runner-set-heading{margin:8px 0;font-size:26px}
.lifestyle-runner-active .lifestyle-runner-set:not(.is-current){padding-block:2px 6px}
.lifestyle-runner-active .lifestyle-runner-set:not(.is-current) input{font-size:18px}
@media(max-width:720px){
  body.lifestyle-runner-mode .hank-gate-inner{padding-top:4px}
  .lifestyle-runner-active{padding:8px 8px 210px}
}

/* Lifestyle-local phone density; active Runner retains its immersive controls. */
@media(max-width:720px){
  body:not(.lifestyle-runner-mode):not(.hank-chat-mode) .lifestyle-logo{width:min(240px,65vw);max-width:100%;margin:8px auto}
  body:not(.lifestyle-runner-mode):not(.hank-chat-mode) .lifestyle-logo img{width:100%;height:auto}
  body:not(.lifestyle-runner-mode):not(.hank-chat-mode) .lifestyle-logo span{font-size:clamp(30px,8vw,42px)}
  body:not(.lifestyle-runner-mode):not(.hank-chat-mode) .hank-question{font-size:clamp(24px,6vw,30px);line-height:1.2;margin:10px 0 16px;padding:0}
  .lifestyle-page:not(.lifestyle-runner-page){gap:14px}
  .lifestyle-page:not(.lifestyle-runner-page) .lifestyle-block{box-sizing:border-box;padding:14px}
  .lifestyle-page:not(.lifestyle-runner-page) h2{font-size:22px;margin-bottom:12px}
  .lifestyle-page:not(.lifestyle-runner-page) .hank-button{box-sizing:border-box;width:auto;max-width:100%;min-width:44px;min-height:44px;padding:8px 12px;white-space:normal;font-size:15px;justify-self:center}
  .lifestyle-page:not(.lifestyle-runner-page) .lifestyle-toolbar{gap:8px;justify-content:center}
  .lifestyle-page:not(.lifestyle-runner-page) .lifestyle-toolbar .hank-button{flex:0 1 auto}
  .lifestyle-page:not(.lifestyle-runner-page) .hank-back-button{width:auto;flex:0 0 auto;justify-self:start}
  .lifestyle-focus-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .lifestyle-focus-tile .hank-tile-box{min-height:125px;padding:12px 8px;gap:4px;border-radius:18px}
  .lifestyle-focus-tile .hank-tile-initial{font-size:28px}
  .lifestyle-focus-tile .hank-tile-label{font-size:18px}
  .lifestyle-tile-summary{font-size:12px;line-height:1.3}
  .lifestyle-today .lifestyle-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .lifestyle-today .hank-info-box{box-sizing:border-box;padding:10px;min-height:0}
  .lifestyle-today .lifestyle-stat-value{font-size:26px;line-height:1.2}
  .lifestyle-today .lifestyle-stat-label{font-size:13px}
  .lifestyle-landing .lifestyle-weight-flow{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-block:12px}
  .lifestyle-landing .lifestyle-weight-arrow{display:none}
  .lifestyle-landing .lifestyle-weight-flow strong{font-size:22px}
  .lifestyle-landing .lifestyle-landing-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .lifestyle-landing .lifestyle-landing-actions .hank-button{justify-self:stretch}
  .lifestyle-form-grid{gap:12px}
  .lifestyle-form-grid>section{padding:12px}
}
@media(max-width:440px){
  .lifestyle-focus-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lifestyle-focus-tile .hank-tile-box{min-height:120px}
}

/* Fitness-only mobile refinement; no Runner or landing changes. */
.lifestyle-week-short{display:none}
@media(max-width:720px){
  .lifestyle-fitness-mobile .lifestyle-week-navigation{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:6px;align-items:center}
  .lifestyle-fitness-mobile .lifestyle-week-navigation [data-calendar-week]{width:44px;height:44px;min-width:44px;padding:0;font-size:24px;justify-self:center}
  .lifestyle-fitness-mobile .lifestyle-week-navigation h2{min-width:0;margin:0;font-size:18px;letter-spacing:0;line-height:1.2;white-space:nowrap;text-align:center}
  .lifestyle-week-full{display:none}
  .lifestyle-week-short{display:inline}
  .lifestyle-fitness-mobile [data-calendar-today]{grid-column:2;justify-self:center;min-height:44px;padding:6px 12px}
  .lifestyle-fitness-mobile .lifestyle-calendar{gap:8px;margin-top:8px}
  .lifestyle-fitness-mobile .lifestyle-day{padding:8px}
  .lifestyle-fitness-mobile .lifestyle-day h3{margin-bottom:6px}
  .lifestyle-fitness-mobile .lifestyle-workout-slot:not(.scheduled){min-height:44px;width:auto;max-width:100%;padding:8px 12px;margin-top:4px}
  .lifestyle-fitness-mobile .lifestyle-block{padding:12px}
  .lifestyle-fitness-mobile h2{margin-block:10px;font-size:21px}
  .lifestyle-fitness-mobile .lifestyle-inline-editor{grid-template-columns:minmax(0,1fr);gap:8px}
  .lifestyle-fitness-mobile .lifestyle-fitness-editor label{margin-bottom:4px}
  .lifestyle-fitness-mobile .lifestyle-fitness-editor input:not([type="hidden"]),
  .lifestyle-fitness-mobile .lifestyle-fitness-editor select{min-height:44px}
  .lifestyle-fitness-mobile .lifestyle-toolbar{gap:6px}
  .lifestyle-fitness-mobile .lifestyle-fitness-editor .lifestyle-toolbar{margin-top:10px}
  .lifestyle-fitness-mobile .lifestyle-add-row{margin:10px 0;gap:8px}
  .lifestyle-fitness-mobile .lifestyle-routine-list{gap:8px}
  .lifestyle-fitness-mobile .lifestyle-planned-row{padding:10px;gap:6px;min-height:0}
  .lifestyle-fitness-mobile .lifestyle-planned-row>div{display:flex;flex-wrap:wrap;gap:6px}
  .lifestyle-fitness-mobile .lifestyle-planned-row button{min-height:44px;padding:6px 10px}
  .lifestyle-fitness-mobile [role="status"]:empty{display:none}
  .lifestyle-page.lifestyle-fitness-mobile .hank-button{width:auto;min-height:44px;padding:8px 10px;justify-self:center;flex:0 1 auto}
}
@media(max-width:440px){
  .lifestyle-fitness-mobile>.lifestyle-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;justify-items:center}
  .lifestyle-fitness-mobile>.lifestyle-toolbar .hank-back-button{grid-column:1/-1}
  .lifestyle-fitness-mobile .lifestyle-week-navigation h2{font-size:16px}
}

/* Canonical featured tiles, centred without a category panel. */
.lifestyle-page .hank-assistant-row{display:grid;grid-template-columns:repeat(4,minmax(0,180px));justify-content:center;gap:20px;width:100%;min-width:0}
.lifestyle-page .hank-assistant-row>.hank-tile{box-sizing:border-box;width:100%;min-width:0;margin:0}
.lifestyle-page .hank-assistant-row .hank-tile-box{box-sizing:border-box;width:100%}
@media(max-width:720px){
  .lifestyle-page .hank-assistant-row{grid-template-columns:repeat(2,minmax(0,160px));gap:16px;justify-content:center}
}

/* Shared metric/history and Focus user-data views. */
.lifestyle-data-workspace{display:grid;gap:14px;min-width:0;width:100%;overflow-wrap:anywhere}
.lifestyle-data-workspace .lifestyle-block{box-sizing:border-box}
.lifestyle-data-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(210px,100%),1fr));gap:12px;align-items:end;margin-block:12px}
.lifestyle-data-form label{display:grid;gap:5px;min-width:0;color:#ced7e1}
.lifestyle-data-form input,.lifestyle-data-form select,.lifestyle-data-form textarea{box-sizing:border-box;width:100%;min-width:0;min-height:44px;border:1px solid var(--lifestyle-line);border-radius:9px;padding:9px;background:#090e14;color:#fff;font:inherit;font-size:16px}
.lifestyle-data-form textarea{min-height:80px}
.lifestyle-data-form .hank-button{justify-self:center;min-height:44px}
.lifestyle-history-item{display:grid;gap:6px;padding:12px;margin-block:10px;border:1px solid var(--lifestyle-line);border-radius:14px;background:var(--lifestyle-soft);min-width:0}
.lifestyle-history-item p{margin:4px 0}
.lifestyle-history-item pre{white-space:pre-wrap;overflow-wrap:anywhere}
.lifestyle-history-chart{margin:12px 0;min-width:0}
.lifestyle-history-chart svg{width:100%;height:auto;max-height:240px;background:rgba(255,255,255,.04);border-radius:12px}
.lifestyle-history-chart polyline{stroke:var(--lifestyle-accent);stroke-width:2;fill:none}
.lifestyle-history-chart circle{fill:var(--lifestyle-accent)}
.lifestyle-history-chart text{fill:#ced7e1;font-size:11px}
.lifestyle-current-value{font-size:clamp(24px,6vw,34px);color:var(--lifestyle-accent);font-weight:700}
.lifestyle-data-workspace a{color:var(--lifestyle-accent)}
.lifestyle-preserve-lines{white-space:pre-wrap}
@media(max-width:720px){.lifestyle-data-workspace .lifestyle-block{padding:12px}.lifestyle-data-form{gap:8px}.lifestyle-data-workspace .lifestyle-toolbar .hank-button{flex:0 1 auto;min-height:44px}}

/* One mobile interior, derived from ui/css/hank-layout.css frame geometry:
   outer frame 24px + 6px border; corner detail 38px + 2px border.
   Keep both decorations outside the usable content plus the canonical gutter. */
@media (max-width:720px) {
  body:not(.hank-chat-mode) {
    --lifestyle-frame-inset:24px;
    --lifestyle-frame-stroke:6px;
    --lifestyle-corner-inset:38px;
    --lifestyle-corner-stroke:2px;
    --lifestyle-frame-inner:max(calc(var(--lifestyle-frame-inset) + var(--lifestyle-frame-stroke)),calc(var(--lifestyle-corner-inset) + var(--lifestyle-corner-stroke)));
    --lifestyle-mobile-inset:calc(var(--lifestyle-frame-inner) + var(--hank-content-gutter) + max(var(--hank-safe-left),var(--hank-safe-right)));
    --lifestyle-mobile-inner-width:calc(100% - 2 * var(--lifestyle-mobile-inset));
  }
  body:not(.hank-chat-mode) #tiles,
  body:not(.hank-chat-mode) .hank-question {
    box-sizing:border-box;
    width:var(--lifestyle-mobile-inner-width);
    max-width:var(--lifestyle-mobile-inner-width);
    margin-inline:auto;
    min-width:0;
    overflow-wrap:anywhere;
  }
  body:not(.hank-chat-mode) #tiles *,
  body:not(.hank-chat-mode) #tiles *::before,
  body:not(.hank-chat-mode) #tiles *::after {box-sizing:border-box}
  body:not(.hank-chat-mode) #tiles :where(section,form,fieldset,label,article,details,figure,div) {min-width:0;max-width:100%}
  body:not(.hank-chat-mode) #tiles :where(p,h2,h3,strong,a,span,summary) {overflow-wrap:anywhere}
  body:not(.hank-chat-mode) #tiles :where(input,select,textarea) {max-width:100%;min-width:0;font-size:16px;min-height:44px}
  body:not(.hank-chat-mode) #tiles :where(button,.hank-button) {max-width:100%;min-height:44px;white-space:normal}
  body:not(.hank-chat-mode) #tiles .hank-auth-panel {width:100%;margin-inline:0}
  body:not(.hank-chat-mode) .lifestyle-toolbar .hank-button {min-width:min(130px,100%)}
  body:not(.hank-chat-mode) .lifestyle-form-grid {grid-template-columns:minmax(0,1fr)}
  body:not(.hank-chat-mode) .lifestyle-exercise-filters {grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr))}
  body:not(.hank-chat-mode) .lifestyle-data-form {grid-template-columns:minmax(0,1fr)}
  body:not(.hank-chat-mode) .lifestyle-runner-controls {
    left:0;right:0;margin-inline:auto;
    width:var(--lifestyle-mobile-inner-width);
    max-width:var(--lifestyle-mobile-inner-width);
  }
  body:not(.hank-chat-mode) .lifestyle-runner-controls :where(button,input) {min-width:44px;min-height:44px}
  body:not(.hank-chat-mode) .lifestyle-runner-control-main {grid-template-columns:44px minmax(0,1fr) minmax(44px,70px)}
  body:not(.hank-chat-mode) .lifestyle-runner-active .lifestyle-pose-grid {justify-content:center}
  body:not(.hank-chat-mode) .lifestyle-runner-fields {grid-template-columns:repeat(auto-fit,minmax(min(86px,100%),1fr))}
  body:not(.hank-chat-mode) .lifestyle-history-chart {margin-inline:0}
  body:not(.hank-chat-mode) .lifestyle-data-workspace details>summary {min-height:44px;padding-block:10px}
}

/* Nutrition uses the established frame width and dark Lifestyle panels. */
.nutrition-facts{border:1px solid var(--lifestyle-line);border-radius:12px;padding:14px;background:rgba(6,12,18,.7);margin-block:12px;min-width:0}
.nutrition-facts h3{font-size:24px;margin:0 0 8px;border-bottom:6px solid var(--lifestyle-accent);padding-bottom:8px}
.nutrition-serving{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}
.nutrition-calories{display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap;border-bottom:4px solid var(--lifestyle-line);padding-bottom:8px;font-weight:700}
.nutrition-calories strong{font-size:28px;color:var(--lifestyle-accent)}
.nutrition-facts dl{margin:0}.nutrition-dv-heading{text-align:right;font-weight:700}
.nutrition-fact-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;border-top:1px solid var(--lifestyle-line);padding-block:7px}
.nutrition-fact-row dd{margin:0;text-align:right}.nutrition-fact-row dt span{white-space:normal}.nutrition-subnutrient dt{padding-left:10px}
.nutrition-footnote{font-size:13px;line-height:1.5}.nutrition-progress{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));gap:8px}
.nutrition-workspace meter{display:block;width:100%;height:16px;accent-color:var(--lifestyle-accent)}
.nutrition-macros{display:grid;gap:10px}.nutrition-results{list-style:none;padding:0}.nutrition-results li{display:grid;gap:8px;padding-block:12px;border-bottom:1px solid var(--lifestyle-line)}
.lifestyle-connection-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:12px}
.lifestyle-connection-card{margin:0;display:grid;align-content:start;gap:8px}
.lifestyle-connection-heading{display:flex;align-items:start;justify-content:space-between;gap:8px;flex-wrap:wrap}
.lifestyle-connection-heading h2{margin:0;font-size:19px}
.lifestyle-connection-status{display:inline-block;border:1px solid var(--lifestyle-line);border-radius:20px;padding:5px 9px;font-size:13px;color:var(--lifestyle-accent)}
.lifestyle-connection-card p{margin:0;line-height:1.5}.lifestyle-connection-card details{border-top:1px solid var(--lifestyle-line);padding-top:4px}
@media (max-width:720px) {
  /* Move the complete Runner top region below the existing corner geometry.
     Exit, elapsed time and step progress move together; width and footer stay intact. */
  body.lifestyle-runner-mode:not(.hank-chat-mode) .hank-gate-inner {
    padding-top:calc(var(--lifestyle-frame-inner) + var(--hank-content-gutter) + env(safe-area-inset-top,0px));
  }
  .nutrition-facts{padding:10px}.nutrition-fact-row{grid-template-columns:minmax(0,1fr) minmax(0,auto)}
  .nutrition-workspace .lifestyle-toolbar{gap:6px;flex-wrap:wrap}
}

/* Focused USDA / ingredient controls; existing frame geometry stays unchanged. */
.nutrition-navigation .lifestyle-toolbar{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(140px,100%),1fr));gap:6px}
.nutrition-navigation .hank-button{width:100%;min-width:0}
.nutrition-ingredient-row{min-width:0;border:1px solid var(--lifestyle-line);border-radius:12px;padding:10px}
.nutrition-ingredient-row legend{padding-inline:6px}
.nutrition-segmented{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;max-width:100%;padding:4px;border:1px solid var(--lifestyle-line);border-radius:12px}
.nutrition-segmented .hank-button{width:100%;min-width:0;min-height:44px}
.nutrition-segmented [aria-pressed="true"],.fodmap-alphabet [aria-pressed="true"]{background:var(--lifestyle-accent);color:#080d13;border-color:var(--lifestyle-accent)}
.fodmap-alphabet{display:flex;flex-wrap:wrap;gap:4px}.fodmap-alphabet .hank-button{min-width:44px;min-height:44px;padding:6px}
.fodmap-food-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr));gap:8px}
.fodmap-rating{width:fit-content;border:1px solid currentColor;border-radius:10px;padding:4px 8px;font-weight:700}
.fodmap-low{color:#9aefac}.fodmap-moderate{color:#ffda85}.fodmap-high{color:#ffaaaa}
.lifestyle-data-form .nutrition-checkbox{display:flex;align-items:center;gap:8px;min-height:44px}
.lifestyle-data-form .nutrition-checkbox input{width:24px;min-width:24px;min-height:24px;height:24px;accent-color:var(--lifestyle-accent)}
@media (max-width:720px){
  .nutrition-navigation .lifestyle-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}
  body:not(.hank-chat-mode) .nutrition-navigation .hank-button,
  body:not(.hank-chat-mode) .nutrition-segmented .hank-button{min-width:0;width:100%}
  .nutrition-ingredient-row .lifestyle-toolbar{display:grid;grid-template-columns:minmax(0,1fr)}
  .nutrition-ingredient-row .lifestyle-data-form{margin-block:8px}
  body:not(.hank-chat-mode) #tiles .nutrition-checkbox input{min-height:24px;flex:0 0 24px}
}
