:root{
  --bg:#FFF8EC;
  --card:#FFFFFF;
  --text:#2F251E;
  --muted:#76695D;
  --green:#6B8434;
  --green-dark:#536B25;
  --terracotta:#CF6549;
  --terracotta-dark:#B7533C;
  --brown:#4B2E1C;
  --line:#EADFD2;
  --ok:#4E8A4D;
  --warn:#D99A2B;
  --danger:#C74B43;
  --off:#8A817A;
  --shadow:0 12px 30px rgba(57,43,32,.08);
  --radius:22px;
}
*{box-sizing:border-box}
html{background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body{margin:0;background:linear-gradient(180deg,#fffdfa 0%,var(--bg) 65%);min-height:100vh}
button,a{font:inherit}
button{-webkit-appearance:none;appearance:none;color:var(--text);-webkit-text-fill-color:currentColor}
a{color:inherit}
button{-webkit-tap-highlight-color:rgba(107,132,52,.12)}
.wrap{width:min(720px,100%);margin:0 auto;padding:18px 16px 36px}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.brand{display:flex;align-items:center;gap:10px}
.brand img{height:46px;width:auto;max-width:240px;object-fit:contain}
.demo-pill{font-size:12px;font-weight:800;letter-spacing:.04em;background:#FFF1CC;color:#74550D;border:1px solid #F0D68F;padding:7px 10px;border-radius:999px}
.hero{background:rgba(255,255,255,.86);border:1px solid var(--line);border-radius:28px;padding:24px 20px;box-shadow:var(--shadow);text-align:center;backdrop-filter:blur(10px)}
.hero-symbol{width:122px;height:122px;object-fit:contain;margin:-2px auto 10px;display:block}
.hero h1{font-size:28px;margin:0 0 7px}
.hero p{margin:0;color:var(--muted);line-height:1.5}
.notice{margin-top:14px;background:#FFF4E3;border:1px solid #F1D2A3;padding:11px 13px;border-radius:14px;font-size:13px;color:#70543D;text-align:left}
.menu{display:grid;gap:12px;margin-top:16px}
.menu-btn,.secondary-btn,.primary-btn{width:100%;border:0;border-radius:18px;padding:16px;cursor:pointer;text-align:left;transition:.15s ease}
.menu-btn{background:var(--card);color:var(--text);-webkit-text-fill-color:var(--text);border:1px solid var(--line);box-shadow:0 5px 18px rgba(57,43,32,.04);display:flex;gap:14px;align-items:center;padding:13px 15px}
.menu-btn:active,.secondary-btn:active,.primary-btn:active{transform:scale(.99)}
.menu-btn:hover{border-color:#DFCDBB;box-shadow:0 7px 20px rgba(57,43,32,.065)}
.menu-btn:focus-visible,.choice:focus-visible,.county-select:focus-visible{outline:3px solid rgba(107,132,52,.22);outline-offset:2px}
.menu-svg{width:58px;height:58px;flex:0 0 58px;display:block;object-fit:contain;border-radius:15px}
.menu-copy{display:block;flex:1;min-width:0;padding-top:1px}
.menu-title{display:block;color:var(--text);-webkit-text-fill-color:var(--text);font-weight:800;font-size:16px;line-height:1.3;letter-spacing:-.01em}
.menu-sub{display:block;color:var(--muted);font-size:13px;line-height:1.4;margin-top:4px}
.screen{display:none}
.screen.active{display:block}
.screen-head{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.back{width:44px;height:44px;border-radius:14px;border:1px solid var(--line);background:#fff;color:var(--text);-webkit-text-fill-color:var(--text);cursor:pointer;font-size:22px}
.screen-head h2{margin:0;font-size:22px}
.screen-head p{margin:2px 0 0;color:var(--muted);font-size:13px}
.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:18px;box-shadow:0 4px 18px rgba(57,43,32,.04)}
.progress-row{display:flex;justify-content:space-between;color:var(--muted);font-size:12px;margin-bottom:8px}
.progress{height:8px;border-radius:999px;background:#EFE7DE;overflow:hidden;margin-bottom:20px}
.progress > div{height:100%;background:linear-gradient(90deg,var(--green),#8DA94C);border-radius:999px;transition:.25s}
.question{font-weight:850;font-size:19px;margin-bottom:14px}
.choices{display:grid;gap:10px}
.choice{border:1px solid var(--line);background:#fff;border-radius:16px;padding:14px;text-align:left;cursor:pointer}
.choice.selected{border-color:var(--green);box-shadow:0 0 0 2px rgba(107,132,52,.16);background:#FBFFF4}
.nav-row{display:flex;gap:10px;margin-top:12px}
.secondary-btn{background:#fff;color:var(--text);-webkit-text-fill-color:var(--text);border:1px solid var(--line);text-align:center;font-weight:750}
.primary-btn{background:var(--terracotta);color:#fff;-webkit-text-fill-color:#fff;text-align:center;font-weight:850}
.primary-btn:hover{background:var(--terracotta-dark)}
.primary-btn:disabled{opacity:.45;cursor:not-allowed}
.result-icon{font-size:44px;margin-bottom:7px}
.result-title{font-size:21px;font-weight:900;margin-bottom:8px}
.small{font-size:13px;color:var(--muted);line-height:1.55}
.warning-box{background:#FFF4E3;border:1px solid #F1D2A3;border-radius:14px;padding:12px;margin-top:14px;font-size:13px;line-height:1.5}
.knowledge-grid,.rescue-list{display:grid;gap:11px}
.knowledge-item{background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px}
.card-like{display:flex;gap:14px;align-items:center}
.knowledge-icon{width:72px;height:72px;object-fit:contain;flex:0 0 72px;border-radius:18px;background:#FFFCF7;border:1px solid #F3E6D7}
.knowledge-text b{display:block;margin-bottom:4px;font-size:16px}
.rescue-item{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px}
.rescue-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.rescue-name{font-weight:850}
.status{font-size:12px;font-weight:850;padding:6px 9px;border-radius:999px;white-space:nowrap;display:inline-flex;align-items:center;gap:6px}
.status-dot{width:10px;height:10px;border-radius:50%;display:inline-block;flex:0 0 10px}
.status.ok{background:#EAF5E8;color:#376A36}.status.ok .status-dot{background:#4E8A4D}
.status.warn{background:#FFF2CF;color:#78570B}.status.warn .status-dot{background:#D99A2B}
.status.danger{background:#FBE6E3;color:#903B34}.status.danger .status-dot{background:#C74B43}
.status.off{background:#EEEAE7;color:#625B56}.status.off .status-dot{background:#8A817A}
.filter-card{margin-top:12px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:14px}
.filter-label{display:block;font-weight:800;font-size:14px;margin-bottom:8px}
.county-select{width:100%;border:1px solid var(--line);border-radius:14px;padding:12px 14px;font:inherit;background:#fff;color:var(--text)}
.filter-summary{margin-top:8px;font-size:12px;color:var(--muted)}
.empty-state{background:#FFFCF7;border:1px dashed #E2D2BF;border-radius:16px;padding:16px;text-align:center;color:var(--muted);font-size:14px}
.weight-box{margin-top:12px;padding:14px;border:1px solid var(--line);border-radius:16px;background:#FFFCF7}
.weight-label{display:block;font-weight:800;font-size:14px;margin-bottom:8px}
.weight-row{display:flex;align-items:center;gap:10px}
.weight-input{width:150px;max-width:58%;border:1px solid var(--line);border-radius:14px;padding:12px 13px;font:inherit;font-size:16px;background:#fff;color:var(--text)}
.weight-unit{font-weight:800;color:var(--muted)}
.weight-hint{font-size:12px;color:var(--muted);margin-top:8px;line-height:1.45}
.range-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
.range-btn{border:1px solid var(--line);background:#fff;border-radius:13px;padding:11px 10px;text-align:center;cursor:pointer;font-weight:700;color:var(--text)}
.range-btn.selected{border-color:var(--green);box-shadow:0 0 0 2px rgba(107,132,52,.16);background:#FBFFF4}
.answer-summary{margin-top:12px;padding:11px 12px;border-radius:13px;background:#F5F1EA;color:var(--brown);font-size:13px;font-weight:700}
.meta{font-size:12px;color:var(--muted);margin-top:8px;line-height:1.45}
.updated{font-size:11px;color:var(--muted);margin-top:7px}
.support-card{display:grid;gap:10px}
.support-feature-icon{width:92px;height:92px;object-fit:contain;border-radius:20px;background:#FFFCF7;border:1px solid #F3E6D7}
.linklike{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;background:var(--green);color:#fff;font-weight:800;border-radius:14px;padding:12px}
.footer{margin-top:22px;border-top:1px solid var(--line);padding-top:17px;text-align:center;color:var(--muted);font-size:12px;line-height:1.55}
.footer b{color:var(--text)}
.install{display:none;margin-top:12px}
.install.show{display:block}
.admin-link{display:inline-block;margin-top:10px;font-size:12px;color:var(--green-dark);font-weight:700}
@media (min-width:640px){
  .menu{grid-template-columns:1fr 1fr}
  .menu-btn-wide{grid-column:1 / -1}
  .hero{padding:28px}
}
@media (max-width:639px){
  .menu-svg{width:54px;height:54px;flex-basis:54px}
  .menu-btn{padding:12px 14px}
  .card-like{align-items:flex-start}
  .knowledge-icon{width:64px;height:64px;flex-basis:64px}
}
