/* Good-health mobile-first overrides; standalone local HTML + CSS + JS. */
html{scroll-padding-top:76px;-webkit-text-size-adjust:100%}
.hero-start{display:none}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button,a,input,select,textarea{touch-action:manipulation}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #7ab692;outline-offset:2px}
.mobile-survey-switch{display:none}
@media(max-width:1024px){
  .hero-art{right:-5%}
  .survey-layout{grid-template-columns:minmax(200px,250px) minmax(0,1fr);gap:16px}
  .question-body{padding:27px 24px}
  .panel-actions{padding:18px 24px}
  .step-grid{gap:5px}
  .step{min-height:44px;height:44px}
}
@media(max-width:740px){
  body{min-width:0;width:100%;overflow-x:clip}
  .site-shell{min-width:0;max-width:100%;overflow-x:clip}
  .topbar{height:auto;min-height:66px;padding:9px 16px;gap:10px;padding-top:calc(9px + env(safe-area-inset-top));position:relative;z-index:4}
  .brand{min-width:0;gap:10px}
  .mobile-survey-switch{display:flex;align-items:center;justify-content:center;min-height:44px;padding:0 11px;border:1px solid #d5e4d9;border-radius:9px;color:#236344;background:#f2f8f3;font-size:12px;font-weight:700;white-space:nowrap;text-decoration:none;flex:none}
  .brand-symbol{width:38px;height:38px;flex:none;border-radius:11px}
  .brand strong{font-size:18px}
  .brand small{font-size:10px;letter-spacing:.8px}
  .mobile-manage{display:flex;align-items:center;justify-content:center;min-height:44px;min-width:88px;padding:0 14px;border:1px solid #d5e4d9;border-radius:9px;color:#236344;background:#f2f8f3;font-size:13px;font-weight:700;white-space:nowrap}
  .hero{min-height:236px;padding:34px 18px 28px}
  .hero .eyebrow{font-size:10px;letter-spacing:1.15px;line-height:1.5}
  .hero h1{font-size:clamp(29px,8vw,40px);letter-spacing:0;margin:18px 0 10px;line-height:1.22}
  .hero-content>p{font-size:13px;letter-spacing:0;line-height:1.65;max-width:310px}
  .hero-art{right:-270px;top:-48px;opacity:.23;transform:scale(.72);pointer-events:none}
  .hero-stats{margin-top:19px;gap:10px;font-size:11px}
  .hero-stats strong{font-size:15px}
  .hero-start{display:inline-flex;align-items:center;justify-content:center;gap:11px;min-height:44px;margin-top:16px;padding:0 14px;background:#fff9;color:#27674c;border:1px solid #bcd5c4;border-radius:9px;font-size:13px;font-weight:700;position:relative;z-index:3}
  .question-panel{scroll-margin-top:12px}
  .view{padding:25px 14px calc(35px + env(safe-area-inset-bottom))}
  .section-caption{margin-bottom:15px;display:block}
  .section-caption h2{font-size:18px;line-height:1.5;margin:8px 0 4px}
  .section-caption p{font-size:12px;line-height:1.6}
  .section-caption .outline-btn{margin-top:14px;min-height:44px}
  .save-status{display:flex;font-size:11px;margin-top:10px}
  .survey-layout{display:flex;flex-direction:column;gap:12px}
  .survey-sidebar{min-width:0;max-width:100%;padding:15px 14px 13px;border-radius:11px}
  .sidebar-top{margin:0 0 8px}
  .sidebar-label{font-size:13px}
  .sidebar-top strong{font-size:18px}
  .small-info{margin:7px 0 11px;font-size:12px}
  .step-grid{display:flex;grid-template-columns:none;flex-wrap:nowrap;gap:8px;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;padding:0 1px 5px;scrollbar-width:thin}
  .step{flex:0 0 44px;min-width:44px;min-height:44px;height:44px;border-radius:8px;font-size:13px}
  .aside-quote{display:none}
  .question-panel{min-width:0;min-height:0;border-radius:12px;overflow:visible}
  .panel-topline{padding:17px 17px 14px;gap:12px;align-items:center}
  .phase-label{font-size:11px;letter-spacing:0}
  .qcount{font-size:10px;letter-spacing:0;white-space:nowrap}
  .question-body{padding:21px 17px 24px}
  .question-title-row{align-items:start;gap:7px}
  .question-title-row>div{min-width:0;flex:1}
  .question-title-row h3{font-size:18px;line-height:1.5;margin-top:9px;overflow-wrap:anywhere}
  .type-pill{padding:6px 8px;white-space:nowrap;font-size:11px}
  .question-help{font-size:12px;line-height:1.6;margin:12px 0 17px}
  .options,.options.multiline{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
  .option{width:100%;min-width:0;min-height:60px;padding:12px 13px;gap:12px;border-radius:10px}
  .option-code{width:33px;height:33px;flex:0 0 33px;font-size:13px}
  .option-label{font-size:15px;line-height:1.55;overflow-wrap:anywhere}
  .option-check{flex:none;font-size:19px}
  .answer-textarea{font-size:16px;min-height:150px;padding:13px}
  .panel-actions{position:sticky;bottom:0;z-index:3;padding:12px 14px calc(12px + env(safe-area-inset-bottom));background:#fff;box-shadow:0 -9px 20px #2446340b;display:flex;flex-wrap:wrap;gap:8px;border-radius:0 0 11px 11px}
  .panel-actions .ghost-btn,.panel-actions .primary-btn{min-height:48px;flex:1;margin:0;min-width:0;font-size:15px;padding:10px 12px}
  .panel-actions .ghost-btn{border:1px solid #e0e9e2;border-radius:8px;color:#496855;background:#f8fbf8}
  .panel-actions .primary-btn{flex:1.45}
  .question-error{order:-1;flex:0 0 100%;margin:0;text-align:left;font-size:13px;line-height:1.5}
  .question-error:empty{display:none}
  .research-notice{padding:14px;line-height:1.8;font-size:12px;margin-top:15px}
  .dashboard-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .metric{min-width:0;padding:14px;min-height:111px}
  .metric strong{font-size:26px}
  .metric strong.metric-text{font-size:17px;overflow-wrap:anywhere}
  .data-toolbar,.seed-panel,.records-card,.analysis-card,.privacy-card{padding:16px;margin-bottom:12px;border-radius:10px;min-width:0}
  .data-toolbar{gap:13px}
  .toolbar-actions{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .toolbar-actions .primary-btn{grid-column:1/-1}
  .toolbar-actions .primary-btn,.toolbar-actions .outline-btn,.seed-panel button{display:flex;align-items:center;justify-content:center;min-width:0;min-height:46px;font-size:13px;padding:9px;white-space:normal;text-align:center}
  .seed-panel{display:flex;flex-wrap:wrap;gap:10px}
  .seed-icon{font-size:24px}
  .seed-panel>div:nth-child(2){min-width:0}
  .seed-panel button{width:100%;margin-top:3px}
  .records-head{display:flex;flex-direction:column;align-items:stretch;gap:12px}
  .records-head>div{display:flex;justify-content:space-between;align-items:center;gap:10px}
  .search-input{width:100%;min-width:0;min-height:46px;font-size:16px}
  .table-wrap{max-width:100%;width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;touch-action:pan-x}
  .table-wrap table{min-width:620px}
  .table-wrap:before{content:"左右滑动查看完整表格 ↔";position:sticky;left:0;display:block;width:max-content;color:#7b9d86;font-size:11px;padding-bottom:8px}
  .table-info{line-height:1.8}
  .distribution-list{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin:18px 0}
  .distribution-group{min-width:0;padding:15px}
  .distribution-group>strong{line-height:1.6;overflow-wrap:anywhere}
  .dist-row{grid-template-columns:20px minmax(0,1fr) 48px;gap:7px}
  .done-card{margin:0 auto 24px;padding:42px 19px}
  .done-card h2{font-size:22px;line-height:1.45}
  .done-actions{flex-direction:column;gap:10px}
  .done-actions>*{width:100%;display:flex;align-items:center;justify-content:center;min-height:48px}
  footer{padding:20px 16px calc(22px + env(safe-area-inset-bottom));gap:10px}
  #goodhealth-admin-host{max-width:100%}
  .toast{bottom:calc(20px + env(safe-area-inset-bottom));font-size:12px;line-height:1.5}
}
@media(max-width:390px){
  /* 390px phones share the full single-column layout. */
  .hero{min-height:229px}
  .hero h1{font-size:30px}
  .hero-stats{font-size:10px;gap:7px}
  .hero-stats i{height:12px}
  .view{padding-left:12px;padding-right:12px}
  .question-title-row h3{font-size:17px}
  .question-body{padding:18px 14px 21px}
  .panel-topline{padding:15px 14px}
  .option{padding:11px 10px}
  .option-label{font-size:14px}
  .toolbar-actions>*{flex:none}
}
@media(max-width:340px){
  .hero h1{font-size:27px;letter-spacing:-.3px}
  .hero-stats{flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .step,.option,.primary-btn{transition:none}
}
/* Node 模式禁用无需鉴权的旧浏览器本地数据管理入口。 */
html.gh-node-mode [data-view="dashboard"],html.gh-node-mode #dashboard-view{display:none!important}
html.gh-node-mode .done-actions [data-view="dashboard"]{display:none!important}

