:root{
  --green:#2e7d57; --green-2:#3f9468; --green-dark:#1f5c40; --green-light:#e9f4ee;
  --bg:#f2f7f3; --card:#ffffff; --ink:#1f2a24; --muted:#6b7a70; --line:#e4ebe6;
  --warn:#d9822b; --radius:14px;
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
html,body{margin:0;padding:0;}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Source Han Sans SC",sans-serif;
  background:var(--bg); color:var(--ink); -webkit-font-smoothing:antialiased;
}
button{font-family:inherit;}
a{color:var(--green);}

/* ---------- survey ---------- */
.hero{
  position:relative; overflow:hidden; color:#fff; padding:28px 20px 30px;
  background:linear-gradient(140deg,#276b4b 0%,#2e7d57 45%,#4c9c72 100%);
  border-radius:0 0 26px 26px;
}
.hero:before,.hero:after{
  content:""; position:absolute; border-radius:50%; background:rgba(255,255,255,.08);
}
.hero:before{width:220px;height:220px;right:-90px;top:-110px;}
.hero:after{width:150px;height:150px;left:-70px;bottom:-90px;background:rgba(255,255,255,.06);}
.hero-badge{
  display:inline-block; font-size:11px; letter-spacing:.5px; color:#e9f7ef;
  background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.25);
  padding:4px 10px; border-radius:999px; margin-bottom:12px;
}
.hero h1{font-size:21px; line-height:1.5; margin:0 0 8px; font-weight:700; position:relative;}
.hero .sub{font-size:12.5px; line-height:1.6; color:rgba(255,255,255,.82); margin:0 0 14px; position:relative;}
.chips{display:flex; gap:8px; flex-wrap:wrap; position:relative;}
.chip{
  font-size:11.5px; color:#eefaf2; background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.22); border-radius:999px; padding:4px 10px;
}
.wrap{max-width:680px; margin:0 auto; padding:14px 14px 120px;}
.intro-card{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  padding:14px 15px; font-size:13px; line-height:1.75; color:#4b5b51;
  box-shadow:0 2px 8px rgba(31,58,44,.04);
}
.intro-card .note{color:#7c8b81; font-size:12px; margin-top:6px;}
.sec-title{
  display:flex; align-items:center; gap:8px; margin:20px 4px 10px;
  font-size:14px; font-weight:700; color:var(--green-dark);
}
.sec-title:before{content:""; width:4px; height:15px; border-radius:2px; background:var(--green);}
.q-card{
  background:var(--card); border:1px solid #e8eee9; border-radius:var(--radius);
  padding:15px 14px 13px; margin-bottom:12px; box-shadow:0 2px 6px rgba(31,58,44,.045);
  scroll-margin-top:64px;
}
.q-head{display:flex; gap:10px; align-items:flex-start;}
.q-no{
  flex:none; width:26px; height:26px; border-radius:8px; background:var(--green-light);
  color:var(--green-dark); font-size:12px; font-weight:700; display:grid; place-items:center;
  margin-top:1px;
}
.q-title{font-size:15px; line-height:1.65; font-weight:600; color:#22302a;}
.q-tag{
  font-size:10.5px; font-weight:400; color:#7a8b80; background:#f3f6f4;
  border-radius:4px; padding:1px 6px; margin-left:4px; vertical-align:2px; white-space:nowrap;
}
.opts{display:grid; gap:8px; margin-top:11px;}
.opt{
  display:flex; align-items:center; gap:10px; padding:11px 12px; cursor:pointer;
  border:1px solid #e4ebe6; border-radius:10px; background:#fbfdfb;
  font-size:14.5px; color:#2c3a32; transition:border-color .15s, background .15s, transform .08s;
}
.opt:active{transform:scale(.995);}
.opt .box{
  flex:none; width:18px; height:18px; border:1.5px solid #b7c7be; border-radius:50%;
  background:#fff; position:relative; transition:all .15s;
}
.opt.multi .box{border-radius:5px;}
.opt.on{border-color:var(--green); background:#eef8f1;}
.opt.on .box{border-color:var(--green); background:var(--green);}
.opt.on .box:after{
  content:""; position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width:7px; height:7px; border-radius:50%; background:#fff;
}
.opt.multi.on .box:after{
  width:9px; height:5px; border-radius:0; background:transparent;
  border-left:2px solid #fff; border-bottom:2px solid #fff;
  transform:translate(-50%,-60%) rotate(-45deg);
}
.other-wrap{margin-top:9px; display:none;}
.other-wrap.show{display:block;}
.other-wrap input{
  width:100%; padding:10px 12px; font-size:14px; color:var(--ink);
  border:1px solid #d8e3db; border-radius:9px; background:#fff; outline:none;
}
.other-wrap input:focus{border-color:var(--green);}

.progress-wrap{
  position:sticky; top:0; z-index:20; background:rgba(242,247,243,.94);
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
  padding:8px 14px 7px; border-bottom:1px solid rgba(228,235,230,.9);
}
.progress{height:6px; border-radius:3px; background:#dbe7df; overflow:hidden;}
.progress .bar{height:100%; width:0; border-radius:3px; background:linear-gradient(90deg,#5cb184,#2e7d57); transition:width .25s;}
.progress-text{display:flex; justify-content:space-between; font-size:11px; color:var(--muted); margin-top:5px;}

.submit-bar{
  position:fixed; left:0; right:0; bottom:0; z-index:30;
  padding:10px 14px calc(10px + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.96); backdrop-filter:blur(10px);
  border-top:1px solid #e6ece7;
}
.submit-bar .inner{max-width:680px; margin:0 auto;}
.btn-primary{
  width:100%; height:48px; border:none; border-radius:12px; cursor:pointer;
  background:linear-gradient(135deg,#2e7d57,#42996c); color:#fff;
  font-size:16px; font-weight:700; letter-spacing:1px;
  box-shadow:0 6px 16px rgba(46,125,87,.28);
}
.btn-primary:disabled{opacity:.6;}
.btn-primary:active{transform:translateY(1px);}

.toast{
  position:fixed; left:50%; bottom:92px; transform:translate(-50%,8px);
  background:rgba(30,42,35,.92); color:#fff; font-size:13px; padding:10px 16px;
  border-radius:10px; z-index:60; opacity:0; pointer-events:none; transition:all .2s;
  max-width:80vw; text-align:center;
}
.toast.show{opacity:1; transform:translate(-50%,0);}

.success{max-width:560px; margin:0 auto; padding:70px 24px 40px; text-align:center;}
.ok-circle{
  width:76px; height:76px; margin:0 auto 20px; border-radius:50%;
  background:linear-gradient(135deg,#3f9468,#2e7d57); color:#fff; font-size:36px;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 10px 26px rgba(46,125,87,.3);
}
.success h2{font-size:21px; margin:0 0 10px;}
.success .seq{font-size:13px; color:var(--muted); margin:0 0 18px;}
.success .seq b{color:var(--green-dark); font-size:18px;}
.success .muted{font-size:13px; color:var(--muted); line-height:1.8;}
.success .brand{margin-top:30px; font-size:11.5px; color:#9aa8a0;}
.foot-note{text-align:center; font-size:11px; color:#93a29a; margin:18px 0 6px; line-height:1.7;}

/* ---------- admin ---------- */
.admin-body{background:#f4f6f7;}
.login-wrap{min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px;}
.login-card{
  width:100%; max-width:380px; background:#fff; border:1px solid var(--line);
  border-radius:18px; padding:26px 24px; box-shadow:0 12px 34px rgba(31,58,44,.1);
}
.login-card h1{font-size:18px; margin:0 0 6px;}
.login-card p{font-size:12.5px; color:var(--muted); margin:0 0 18px; line-height:1.7;}
.login-card input{
  width:100%; padding:12px 13px; font-size:14px; border:1px solid #d8e3db;
  border-radius:10px; outline:none; margin-bottom:12px;
}
.login-card input:focus{border-color:var(--green);}
.login-card .err{color:#c0392b; font-size:12px; min-height:16px; margin-bottom:8px;}
.topbar{
  position:sticky; top:0; z-index:20; background:rgba(255,255,255,.96);
  backdrop-filter:blur(10px); border-bottom:1px solid #e6ece7;
}
.topbar .inner{
  max-width:1120px; margin:0 auto; padding:11px 18px; display:flex; align-items:center; gap:14px;
}
.topbar h1{font-size:15.5px; margin:0; flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.topbar .dot{width:7px; height:7px; border-radius:50%; background:#38b26e; display:inline-block; margin-right:5px; animation:pulse 1.8s infinite;}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.35}}
.topbar .link{font-size:12px; color:var(--muted);}
.admin-wrap{max-width:1120px; margin:0 auto; padding:16px 18px 60px;}
.tabs{display:flex; gap:6px; margin:4px 0 16px; flex-wrap:wrap;}
.tab{
  border:1px solid #dfe7e2; background:#fff; color:#51625a; padding:8px 15px;
  font-size:13px; border-radius:9px; cursor:pointer;
}
.tab.on{background:var(--green); border-color:var(--green); color:#fff; font-weight:600;}
.stats{display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:16px;}
.stat{
  background:#fff; border:1px solid var(--line); border-radius:13px; padding:14px 16px;
}
.stat .k{font-size:12px; color:var(--muted);}
.stat .v{font-size:26px; font-weight:700; margin-top:6px; color:#1f3226; font-variant-numeric:tabular-nums;}
.stat .v small{font-size:13px; font-weight:400; color:var(--muted);}
.panel{
  background:#fff; border:1px solid var(--line); border-radius:14px; padding:16px 16px 18px;
  margin-bottom:14px;
}
.panel h3{font-size:14px; margin:0 0 14px; color:#22302a; display:flex; align-items:center; gap:8px;}
.panel h3 .cnt{font-size:11px; color:var(--muted); font-weight:400;}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:14px;}
.grid3{display:grid; grid-template-columns:1fr 1fr 1fr; gap:14px;}
.bar-row{display:grid; grid-template-columns:92px 1fr 52px; align-items:center; gap:8px; margin-bottom:9px; font-size:12.5px;}
.bar-row .lbl{color:#44554c; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.bar-row .track{display:block; height:9px; background:#eef3f0; border-radius:5px; overflow:hidden;}
.bar-row .fill{display:block; height:9px; border-radius:5px; background:linear-gradient(90deg,#63b389,#2e7d57); width:0; transition:width .5s;}
.bar-row .num{text-align:right; color:var(--muted); font-variant-numeric:tabular-nums;}
.donut-wrap{display:flex; align-items:center; gap:18px;}
.donut{
  width:132px; height:132px; border-radius:50%; flex:none; position:relative;
  background:conic-gradient(#2e7d57 0deg,#2e7d57 0deg,#e9f0ec 0deg);
}
.donut .hole{
  position:absolute; inset:20px; background:#fff; border-radius:50%;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
}
.donut .hole b{font-size:19px;}
.donut .hole span{font-size:10.5px; color:var(--muted);}
.legend{font-size:12.5px; color:#44554c; line-height:2;}
.legend i{display:inline-block; width:9px; height:9px; border-radius:2px; margin-right:7px;}
.legend .pct{color:var(--muted); margin-left:6px;}
.empty{padding:34px 10px; text-align:center; color:#9aa8a0; font-size:13px;}
table.tb{width:100%; border-collapse:collapse; font-size:12.5px;}
table.tb th,table.tb td{padding:9px 10px; border-bottom:1px solid #eef2ef; text-align:left; white-space:nowrap;}
table.tb th{color:var(--muted); font-weight:500; background:#fafcfb; position:sticky; top:0;}
table.tb tr.click{cursor:pointer;}
table.tb tr.click:hover{background:#f6fbf8;}
.table-scroll{max-height:520px; overflow:auto; border:1px solid #eef2ef; border-radius:10px;}
.cross-wrap{overflow:auto;}
.cross{border-collapse:collapse; font-size:12px; min-width:520px;}
.cross th,.cross td{border:1px solid #e8efea; padding:7px 9px; text-align:center; white-space:nowrap;}
.cross th{background:#f7faf8; color:#51625a; font-weight:500;}
.cross td.heat{font-variant-numeric:tabular-nums;}
.cross td.rowhead,.cross th.rowhead{text-align:left; background:#fbfdfb;}
.muted{color:var(--muted);}
.small{font-size:11.5px;}
.btn{
  border:1px solid #d8e3db; background:#fff; color:#3c4f45; border-radius:9px;
  padding:8px 14px; font-size:12.5px; cursor:pointer;
}
.btn.primary{background:var(--green); color:#fff; border-color:var(--green);}
.btn:active{transform:translateY(1px);}
.toolbar{display:flex; gap:9px; align-items:center; flex-wrap:wrap;}
.qr-box{display:flex; gap:18px; align-items:center; flex-wrap:wrap;}
.qr-box img{width:148px; height:148px; border:1px solid #e4ebe6; border-radius:10px; background:#fff; padding:6px;}
.qr-meta{font-size:12px; color:var(--muted); line-height:1.9; word-break:break-all;}
.qr-meta code{background:#f4f8f6; padding:2px 6px; border-radius:5px; color:#2e7d57; font-size:12px;}
.modal-mask{
  position:fixed; inset:0; background:rgba(20,30,25,.45); z-index:80;
  display:none; align-items:center; justify-content:center; padding:18px;
}
.modal-mask.show{display:flex;}
.modal{
  background:#fff; border-radius:16px; width:100%; max-width:620px; max-height:82vh;
  overflow:auto; padding:20px 20px 24px;
}
.modal h3{margin:0 0 4px; font-size:16px;}
.modal .meta{font-size:12px; color:var(--muted); margin-bottom:14px;}
.qa{display:grid; grid-template-columns:1fr; gap:8px;}
.qa .item{border-bottom:1px dashed #e8efea; padding-bottom:8px;}
.qa .qt{font-size:12.5px; color:#44554c;}
.qa .qv{font-size:13px; margin-top:3px; color:#1f3226; font-weight:600;}
.close-x{float:right; cursor:pointer; color:#9aa8a0; font-size:20px; line-height:1;}
@media(max-width:880px){
  .stats{grid-template-columns:1fr 1fr;}
  .grid2,.grid3{grid-template-columns:1fr;}
}
@media(max-width:560px){
  .topbar .link{display:none;}
  .hero h1{font-size:19px;}
  .bar-row{grid-template-columns:80px 1fr 46px;}
}
