*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden}
body{font-family:'Inter',system-ui,sans-serif;color:#1d2530;background:linear-gradient(110deg,#fbf2e2 0%,#f1f3f1 45%,#ddecfb 100%)}
#stage{position:fixed;inset:0;display:block;width:100%;height:100%;touch-action:none}
.glass{background:rgba(255,255,255,.84);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(29,37,48,.08);border-radius:16px;box-shadow:0 8px 30px rgba(29,37,48,.08)}
.panel{position:fixed;left:20px;top:20px;bottom:20px;width:min(380px,calc(100% - 40px));padding:18px 20px;display:flex;flex-direction:column;gap:14px;overflow:auto}
.eyebrow{font-size:12px;letter-spacing:.08em;color:#5b6675;font-weight:600}
h1{margin:2px 0 0;font-family:'Space Grotesk',sans-serif;font-size:20px;line-height:1.2}
.progress{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:4px}
.progress span{height:5px;border-radius:3px;background:#dfe4ea}
.progress span.done{background:#2e9e52}.progress span.now{background:#2f6fdb}
h2{margin:0;font-family:'Space Grotesk',sans-serif;font-size:19px;color:#0f4fa8}
p{margin:0;font-size:14.5px;line-height:1.5;color:#36404d}
.ctrl{display:flex;flex-direction:column;gap:12px}
.field{display:flex;flex-direction:column;gap:6px}
.field label,.lbl{display:flex;justify-content:space-between;font-size:13.5px;color:#36404d;font-weight:500}
.field label b,.lbl b{font-family:'Space Grotesk',sans-serif;font-size:15px;color:#1d2530}
input[type=range]{width:100%;accent-color:#2f6fdb;height:28px}
button{font:500 14.5px 'Inter',sans-serif;color:#1d2530;background:#fff;border:1px solid #d5dbe3;border-radius:10px;min-height:44px;padding:0 14px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;user-select:none;-webkit-user-select:none;touch-action:none}
button:hover{background:#f4f6f9}
button:disabled{opacity:.45;cursor:not-allowed}
button:focus-visible,input:focus-visible{outline:3px solid #2f6fdb;outline-offset:2px}
.primary{background:#1d2530;color:#fff;border-color:#1d2530}.primary:hover{background:#2c3644}
.hold{background:#2f6fdb;color:#fff;border-color:#2f6fdb;min-height:52px;font-weight:600}
.hold:hover{background:#285fbd}.hold.active{background:#0f4fa8;transform:scale(.98)}
.meter{height:10px;border-radius:5px;background:#e3e8ee;overflow:hidden;position:relative}
.meter i{display:block;height:100%;background:#2f6fdb;border-radius:5px;width:0}
.meter .zone{position:absolute;top:0;bottom:0;background:rgba(46,158,82,.28);border-left:2px solid #2e9e52;border-right:2px solid #2e9e52}
.hint{font-size:13px;line-height:1.45;color:#0f4fa8;background:#e9f1fd;border-radius:10px;padding:10px 12px}
.warn{font-size:13px;line-height:1.45;color:#8a3b12;background:#fdf0e6;border-radius:10px;padding:10px 12px}
.seg{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.seg button.on{background:#e6effc;border-color:#9dbbe8;color:#0f4fa8;font-weight:600}
.row{display:flex;gap:8px;flex-wrap:wrap}
.row>*{flex:1}
.top{position:fixed;right:20px;top:20px;display:flex;gap:8px}
.top button{background:rgba(255,255,255,.84)}
.top button.on{background:#e6effc;border-color:#9dbbe8;color:#0f4fa8}
.result{border-radius:12px;padding:12px 14px;font-size:14px;line-height:1.5}
.result.ok{background:#e8f6ee;color:#14532d}.result.fail{background:#fdeceb;color:#7f1d1d}
.result h3{margin:0 0 4px;font-family:'Space Grotesk',sans-serif;font-size:17px}
ul.diag{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:6px;font-size:13.5px;line-height:1.45;color:#36404d}
.score{display:flex;align-items:baseline;gap:8px;font-family:'Space Grotesk',sans-serif}
.score b{font-size:40px}.score span{color:#5b6675}
.toast{position:fixed;left:60%;top:20px;transform:translateX(-50%);background:#1d2530;color:#fff;font-size:14px;padding:10px 16px;border-radius:10px;opacity:0;transition:opacity .2s;pointer-events:none;max-width:calc(100% - 40px)}
.toast.show{opacity:1}
.err{position:fixed;inset:0;display:none;align-items:center;justify-content:center;padding:24px;text-align:center;font-size:15px;color:#36404d}
@media (max-width:760px){
  .panel{top:auto;left:10px;right:10px;bottom:10px;width:auto;max-height:52%;padding:14px 16px;gap:10px}
  .top{top:10px;right:10px}
  .toast{left:50%}
}
/* --- tambahan water heater --- */
#inset{position:fixed;inset:0;width:100%;height:100%;pointer-events:none}
.small{font-size:13px;color:#5b6675;line-height:1.45}
.seg{gap:6px}
.list{display:flex;flex-direction:column;gap:6px}
.list button{flex-direction:column;align-items:flex-start;gap:2px;padding:8px 12px;text-align:left;min-height:52px}
.list button small{font-size:12px;color:#5b6675;font-weight:400}
.list button.on{background:#e6effc;border-color:#9dbbe8;color:#0f4fa8}
.toggle.on{background:#e6effc;border-color:#9dbbe8;color:#0f4fa8;font-weight:600}
.obs{font-size:13.5px;line-height:1.45;color:#1d2530;background:#f3f5f8;border-radius:10px;padding:10px 12px;min-height:40px}
.level{position:relative;height:22px;border-radius:11px;background:linear-gradient(#e3f2d9,#cde6bf);border:1px solid #8fb27f;overflow:hidden}
.level::before,.level::after{content:"";position:absolute;top:2px;bottom:2px;width:2px;background:#4b5b45;left:calc(50% - 13px)}
.level::after{left:calc(50% + 11px)}
.level i{position:absolute;top:3px;width:22px;height:14px;margin-left:-11px;border-radius:8px;background:rgba(255,255,255,.95);border:1px solid #7da06c;transition:left .08s}
.level i.ok{box-shadow:0 0 0 3px rgba(46,158,82,.35)}
.test{background:#e2553d;border-color:#e2553d;color:#fff;font-weight:700}.test:hover{background:#c94a33}
.reset{background:#2f6fdb;border-color:#2f6fdb;color:#fff;font-weight:700}.reset:hover{background:#285fbd}
.status{position:fixed;right:20px;bottom:20px;width:230px;padding:14px 16px;display:none;flex-direction:column;gap:8px}
.status.show{display:flex}
.status .lbl[hidden]{display:none}
.score .stars{color:#e0a100;font-size:22px;letter-spacing:2px;margin-left:auto}
.tag{display:inline-block;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;border-radius:6px;padding:1px 6px}
.tag.bahaya{background:#fdeceb;color:#b42318}.tag.catatan{background:#fff4e0;color:#9a5b00}
.warn[hidden],.hint[hidden]{display:none}
@media (max-width:760px){
  .status{left:10px;right:10px;top:60px;bottom:auto;width:auto;padding:6px 10px;flex-direction:row;flex-wrap:wrap;gap:2px 10px}
  .status .lbl{font-size:11px;gap:4px}.status .lbl b{font-size:12px}
}
