/* The scene explains solar generation; this file provides the game controls. */
.blackout-game{--bo-blue:#004eaa;--bo-ink:#244d60;--bo-muted:#67838a;--bo-line:#d8e7e3;background:#fff;border:1px solid var(--bo-line);border-radius:21px;color:var(--bo-ink);overflow:hidden;scroll-margin-top:8px;box-shadow:0 15px 45px #254e4c08}
.blackout-game *,.blackout-game *:before,.blackout-game *:after{box-sizing:border-box}
.blackout-game [hidden]{display:none!important}
.blackout-game button{font:inherit;touch-action:manipulation;cursor:pointer;-webkit-tap-highlight-color:transparent}
.blackout-game button:focus-visible,.blackout-game summary:focus-visible{outline:3px solid #0067b7;outline-offset:3px}
.blackout-game button:disabled{cursor:default;opacity:1}
.blackout-game [tabindex="-1"]:focus{outline:none}
.blackout-game .bo-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.blackout-game .bo-topbar{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:9px 22px;background:#f0f7f6;border-bottom:1px solid var(--bo-line)}
.blackout-game .bo-brand{display:flex;align-items:baseline;gap:14px;min-width:0}
.blackout-game .bo-brand>span{font-size:14px;font-weight:650;line-height:1.25}
.blackout-game .bo-brand>strong{font-size:12px;line-height:1.3;font-weight:500;color:#628477}
.blackout-game .bo-top-actions{display:flex;align-items:center;gap:4px;flex-shrink:0}
.blackout-game .bo-primary,.blackout-game .bo-secondary,.blackout-game .bo-quiet{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:11px 19px;border-radius:24px;border:1px solid transparent;background:var(--bo-blue);color:#fff;font-size:14px;font-weight:650;line-height:1.35}
.blackout-game .bo-primary:hover:not(:disabled){background:#003e89}
.blackout-game .bo-secondary{background:#fff;color:#2c657d;border-color:#c8dbdf}
.blackout-game .bo-secondary:hover:not(:disabled){background:#eff7f9}
.blackout-game .bo-quiet{background:transparent;color:#416f7a;font-size:12px;padding:10px 12px}
.blackout-game .bo-quiet:hover:not(:disabled){background:#e5f0ef}
.blackout-game .bo-eyebrow{font-size:11px;letter-spacing:.08em;line-height:1.5;font-weight:700;color:#5c8477}
.blackout-game .bo-intro{text-align:center;padding:25px 35px 30px;background:radial-gradient(ellipse at 52% 16%,#fff2ba 0,transparent 48%),linear-gradient(130deg,#eff8ff,#f2f8ed)}
.blackout-game .bo-intro-art{position:relative;width:310px;max-width:100%;height:155px;margin:0 auto}
.blackout-game .bo-intro-art>img{position:absolute;left:calc(50% - 55px);bottom:0;width:110px;height:150px;object-fit:contain}
.blackout-game .bo-intro-sun{position:absolute;top:7px;left:10px;width:72px;height:72px;color:#c49d38;transform:rotate(-9deg)}
.blackout-game .bo-intro-house{position:absolute;right:4px;bottom:20px;width:73px;height:73px;color:#447987;transform:rotate(4deg)}
.blackout-game .bo-intro-art svg{width:100%;height:100%}
.blackout-game .bo-intro h2{font-size:39px;line-height:1.06;letter-spacing:-.04em;margin:12px 0 16px;font-weight:650}
.blackout-game .bo-intro>p{font-size:15px;line-height:1.6;color:#597882;max-width:470px;margin:0 auto 18px}
.blackout-game .bo-intro-level{font-size:12px;color:#739083;line-height:1.5;margin-bottom:16px}
.blackout-game .bo-intro-level strong{display:block;font-size:13px;color:#427463;margin-bottom:3px}
.blackout-game .bo-intro-actions{display:flex;flex-direction:column;align-items:center;gap:2px}
.blackout-game .bo-intro-actions>.bo-primary{min-width:225px}
.blackout-game .bo-record{display:block;font-size:12px;line-height:1.5;color:#5c806d;margin:9px 0 0}
.blackout-game .bo-play{padding:11px 19px 10px;background:#fbfdfb}
.blackout-game .bo-hud{display:flex;align-items:center;justify-content:space-between;gap:30px;padding:0 3px 10px}
.blackout-game .bo-time{display:flex;align-items:center;gap:8px;font-size:12px;color:#6a858b;flex-shrink:0}
.blackout-game .bo-time>strong{font-size:25px;font-weight:650;line-height:1.1;font-variant-numeric:tabular-nums;color:#28596d}
.blackout-game .bo-stability{width:min(360px,65%);display:grid;grid-template-columns:auto minmax(80px,1fr);column-gap:13px;align-items:center}
.blackout-game .bo-stability>div:first-child{font-size:13px;color:#537a67;line-height:1.3}
.blackout-game .bo-stability-track{position:relative;height:8px;border-radius:5px;background:#e0e9e1}
.blackout-game .bo-stability-track>i{display:block;height:100%;width:var(--value,100%);border-radius:5px;background:#7dab85;transition:width .2s linear}
.blackout-game .bo-stability-track>b{position:absolute;width:2px;height:12px;top:-2px;left:var(--target,65%);background:#557262;border-radius:1px}
.blackout-game .bo-stability-track[data-warning="true"]>i{background:#d29a63}
.blackout-game .bo-stability>small{grid-column:2;font-size:10px;color:#82978b;margin-top:4px;line-height:1.2}
.blackout-game .bo-sky{position:relative;overflow:hidden;border:1px solid #d5e7ec;border-radius:15px;min-height:160px}
.blackout-game .bo-districts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;margin-top:10px}
.blackout-game .bo-districts[data-count="1"]{grid-template-columns:1fr}
.blackout-game .bo-districts[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}
.blackout-game .bo-district{min-width:0;padding:8px 8px 9px;border:1px solid #dbe7e2;border-radius:12px;background:#f0f6ee}
.blackout-game .bo-district:nth-child(2){background:#eff5f8;border-color:#d7e4ec}
.blackout-game .bo-district:nth-child(3){background:#faf6e9;border-color:#e7dfca}
.blackout-game .bo-district>h3{font-size:12px;font-weight:600;color:#749082;line-height:1.3;margin:0 0 5px;padding-left:3px}
.blackout-game .bo-buildings{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;min-width:0}
.blackout-game .bo-district[data-members="3"] .bo-buildings{grid-template-columns:repeat(3,minmax(0,1fr))}
.blackout-game .bo-district[data-members="1"] .bo-buildings{grid-template-columns:1fr}
.blackout-game .bo-building{position:relative;display:flex;flex-direction:column;align-items:stretch;min-width:0;min-height:120px;padding:18px 7px 7px;border:1px solid #d0e0de;border-radius:10px;background:#fff;color:#426e83;text-align:left;box-shadow:0 3px 6px #244d4504}
.blackout-game .bo-building:hover:not(:disabled){border-color:#7baeb5;background:#f8fdff}
.blackout-game .bo-building[data-selected="true"]{border-color:#72ad8a;background:#f5fff6;box-shadow:inset 0 -2px #88b995}
.blackout-game .bo-building[data-pending="true"]{border-style:dashed}
.blackout-game .bo-house-art{display:block;width:100%;height:100px;flex-shrink:0}
.blackout-game .bo-building-caption{display:flex;align-items:center;justify-content:space-between;gap:4px;margin-top:3px;line-height:1.25}
.blackout-game .bo-building-name{font-size:14px;font-weight:650;color:#365e6b}
.blackout-game .bo-building-caption>small{font-size:10px;color:#7c9586}
.blackout-game .bo-building-action{display:block;text-align:center;background:#edf5f8;border-radius:7px;font-size:12px;font-weight:600;line-height:1.25;padding:6px 3px;margin-top:6px;min-height:28px;color:#527d92}
.blackout-game .bo-building[data-selected="true"] .bo-building-action{background:#e0f2df;color:#4a8359}
.blackout-game .bo-building[data-full="true"] .bo-building-action{color:#6a8c5c;background:#eef5df}
.blackout-game .bo-demand-badge{font-size:11px;line-height:1.2;padding:4px 3px 0;color:#a16d2c;text-align:center}
.blackout-game .bo-hint{display:flex;align-items:center;gap:9px;min-height:43px;padding-top:7px}
.blackout-game .bo-hint>img{width:30px;height:38px;object-fit:contain;flex-shrink:0}
.blackout-game .bo-hint>p{font-size:13px;line-height:1.4;color:#658174;margin:0}
.blackout-game .bo-hint[data-tone="warning"]>p{color:#96703b}
.blackout-game .bo-tutorial{display:flex;align-items:center;justify-content:space-between;gap:18px;background:#fff6d8;border:1px solid #e9dca9;border-radius:13px;padding:13px 16px;margin-bottom:10px}
.blackout-game .bo-tutorial>div:first-child{min-width:0;flex:1}
.blackout-game .bo-tutorial strong{font-size:15px;color:#6f693c;line-height:1.35}
.blackout-game .bo-tutorial p{font-size:14px;line-height:1.45;margin:5px 0 0;color:#877a50;max-width:600px}
.blackout-game .bo-tutorial-actions{display:flex;align-items:center;gap:3px;flex-shrink:0}
.blackout-game .bo-tutorial-actions>.bo-primary{min-width:125px}
.blackout-game[data-blackout-phase="tutorial"] .bo-districts{max-width:640px;width:100%;margin-left:auto;margin-right:auto}
.blackout-game[data-blackout-phase="tutorial"] .bo-building{padding-top:20px}
.blackout-game .bo-building[data-tutorial-target="true"]{outline:3px solid #f2bf43;outline-offset:2px;animation:bo-tutorial-pulse 1.3s ease-in-out infinite}
@keyframes bo-tutorial-pulse{50%{box-shadow:0 0 0 7px #f2bf432d}}
.blackout-game .bo-pause{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:14px 22px;background:#fff5d9;border-bottom:1px solid #e5d6aa}
.blackout-game .bo-pause h2{font-size:20px;font-weight:650;margin:0 0 5px}
.blackout-game .bo-pause p{font-size:12px;line-height:1.4;color:#817754;margin:0}
.blackout-game .bo-pause>div:last-child{display:flex;gap:5px;flex-shrink:0}
.blackout-game .bo-result{padding:30px 30px 24px;background:linear-gradient(140deg,#f1f8ff,#f5f9ee);text-align:center}
.blackout-game .bo-result h2{font-size:36px;line-height:1.12;letter-spacing:-.035em;font-weight:650;margin:12px auto 15px;max-width:650px}
.blackout-game .bo-result>p:not(.bo-main-score):not(.bo-record):not(.bo-award-caption){font-size:14px;line-height:1.6;color:#587782;max-width:560px;margin:0 auto 20px}
.blackout-game .bo-result-actions{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:7px}
.blackout-game .bo-main-score{font-size:14px;color:#587e79;margin:22px 0 0}
.blackout-game .bo-main-score>strong{font-size:31px;color:#2e6b68;font-weight:650}
.blackout-game .bo-result .bo-record{margin-top:4px}
.blackout-game .bo-celebration{position:relative;max-width:470px;height:170px;margin:16px auto 0}
.blackout-game .bo-celebration>img{position:absolute;left:calc(50% - 55px);bottom:0;width:110px;height:165px;object-fit:contain}
.blackout-game[data-blackout-finale="true"] .bo-celebration>img{left:17%}
.blackout-game .bo-award{position:absolute;width:100px;height:140px;top:8px;right:18%;filter:drop-shadow(0 6px 7px #705f1e18)}
.blackout-game .bo-award svg{width:100%;height:100%}
.blackout-game .bo-star{position:absolute;color:#e3b83b;font-size:29px}.blackout-game .bo-star-one{left:13%;top:9px}.blackout-game .bo-star-two{right:6%;bottom:18px;font-size:41px}.blackout-game .bo-star-three{right:39%;top:21px;font-size:19px}
.blackout-game .bo-award-caption{font-size:13px;font-weight:650;color:#687d51;margin:10px 0 0}
.blackout-game .bo-result-details{max-width:550px;margin:17px auto 0;font-size:12px;color:#6b8783;border-top:1px solid #dce7df}
.blackout-game summary{cursor:pointer;min-height:44px;padding:12px 0;font-weight:550}
.blackout-game .bo-result-stats{display:flex;justify-content:center;gap:18px;padding:8px 0}.blackout-game .bo-result-stats>div{flex:1;font-size:12px;color:#738785}.blackout-game .bo-result-stats strong{display:block;font-size:24px;color:#4d7773;font-weight:600;margin-bottom:4px}.blackout-game .bo-result-details p{font-size:12px;line-height:1.5;margin:7px auto;color:#7a8d87}
@media(max-width:700px){
 .blackout-game{border-radius:15px;scroll-margin-top:6px}.blackout-game .bo-topbar{padding:6px 11px;gap:6px}.blackout-game .bo-brand{display:block}.blackout-game .bo-brand>span{display:block;font-size:13px}.blackout-game .bo-brand>strong{display:block;font-size:12px;margin-top:2px}.blackout-game .bo-top-actions{gap:0}.blackout-game .bo-top-actions .bo-quiet{font-size:12px;padding:9px;min-width:44px}
 .blackout-game .bo-intro{padding:18px 20px 23px}.blackout-game .bo-intro-art{height:132px;width:260px}.blackout-game .bo-intro-art>img{height:130px;width:98px;left:calc(50% - 49px)}.blackout-game .bo-intro-sun{width:63px;height:63px;left:3px}.blackout-game .bo-intro-house{width:65px;height:65px;right:0}.blackout-game .bo-intro h2{font-size:34px;margin:11px 0 14px}.blackout-game .bo-intro>p{font-size:14px;line-height:1.55;margin-bottom:16px}.blackout-game .bo-intro-level{font-size:12px}.blackout-game .bo-intro-level strong{font-size:13px}.blackout-game .bo-intro-actions>.bo-primary{min-width:230px}
 .blackout-game .bo-play{padding:8px 10px}.blackout-game .bo-hud{gap:12px;padding:0 2px 8px}.blackout-game .bo-time{font-size:12px;gap:5px}.blackout-game .bo-time>strong{font-size:23px}.blackout-game .bo-stability{display:block;width:62%;max-width:225px}.blackout-game .bo-stability>div:first-child{font-size:12px;margin-bottom:4px}.blackout-game .bo-stability>small{font-size:10px;margin-top:3px;display:block}.blackout-game .bo-stability-track{height:6px}.blackout-game .bo-stability-track>b{height:10px}.blackout-game .bo-sky{border-radius:12px}
 .blackout-game .bo-districts,.blackout-game .bo-districts[data-count="2"]{grid-template-columns:1fr;gap:6px;margin-top:7px}.blackout-game .bo-district{padding:5px 6px 6px;border-radius:10px}.blackout-game .bo-district>h3{font-size:12px;line-height:1.2;margin-bottom:3px}.blackout-game .bo-buildings{gap:7px}.blackout-game .bo-building{padding:16px 7px 6px;border-radius:8px;min-height:105px}.blackout-game .bo-house-art{height:68px}.blackout-game .bo-building-caption{margin-top:1px;gap:3px}.blackout-game .bo-building-name{font-size:13px}.blackout-game .bo-building-caption>small{font-size:10px}.blackout-game .bo-building-action{font-size:12px;line-height:1.15;margin-top:4px;min-height:25px;padding:5px 2px}.blackout-game .bo-demand-badge{font-size:11px;padding-top:3px}.blackout-game .bo-hint{padding-top:5px;min-height:37px;gap:7px}.blackout-game .bo-hint>img{width:27px;height:34px}.blackout-game .bo-hint>p{font-size:12px;line-height:1.3}
 .blackout-game .bo-district[data-members="3"] .bo-building{padding-left:3px;padding-right:3px}.blackout-game .bo-district[data-members="3"] .bo-building-caption{flex-direction:column;align-items:center;gap:1px}.blackout-game .bo-district[data-members="3"] .bo-building-name{font-size:12px}.blackout-game .bo-district[data-members="3"] .bo-building-caption>small{font-size:10px}.blackout-game .bo-district[data-members="3"] .bo-building-action{font-size:12px;min-height:36px;display:flex;align-items:center;justify-content:center}
 .blackout-game .bo-tutorial{padding:10px 12px;gap:9px;flex-direction:column;align-items:stretch;margin-bottom:8px}.blackout-game .bo-tutorial strong{font-size:14px}.blackout-game .bo-tutorial p{font-size:13px;line-height:1.4;margin-top:4px}.blackout-game .bo-tutorial-actions{justify-content:flex-end;gap:0}.blackout-game .bo-tutorial-actions .bo-primary,.blackout-game .bo-tutorial-actions .bo-quiet{min-height:44px;font-size:12px;padding:9px 13px}.blackout-game[data-blackout-phase="tutorial"] .bo-house-art{height:93px}.blackout-game[data-blackout-phase="tutorial"] .bo-building{padding-top:20px}.blackout-game .bo-pause{padding:12px;gap:10px;align-items:flex-start}.blackout-game .bo-pause h2{font-size:19px}.blackout-game .bo-pause>div:last-child{flex-direction:column;gap:0}.blackout-game .bo-pause .bo-primary,.blackout-game .bo-pause .bo-quiet{font-size:12px;padding:9px 13px}
 .blackout-game .bo-result{padding:25px 20px 19px}.blackout-game .bo-result h2{font-size:29px;margin:10px 0 14px}.blackout-game .bo-result>p:not(.bo-main-score):not(.bo-record):not(.bo-award-caption){font-size:13px}.blackout-game .bo-result-actions{gap:7px}.blackout-game .bo-result-actions>.bo-primary{width:100%}.blackout-game .bo-result-actions>.bo-secondary{font-size:13px;padding:10px 15px}.blackout-game .bo-main-score{margin-top:18px}.blackout-game .bo-celebration{height:155px;margin-top:10px}.blackout-game .bo-celebration>img{height:150px}.blackout-game .bo-award{width:90px;height:127px;right:10%}.blackout-game[data-blackout-finale="true"] .bo-celebration>img{left:7%}.blackout-game .bo-award-caption{font-size:12px}.blackout-game .bo-result-stats{gap:10px}.blackout-game .bo-result-stats strong{font-size:22px}
}
@media(max-width:360px){
 .blackout-game .bo-topbar{padding:5px 8px;gap:4px}.blackout-game .bo-brand>span{font-size:12px;max-width:145px}.blackout-game .bo-brand>strong{font-size:11px}.blackout-game .bo-top-actions .bo-quiet{padding:9px 6px;font-size:12px}.blackout-game .bo-play{padding:7px}.blackout-game .bo-hud{gap:10px}.blackout-game .bo-time>span{display:none}.blackout-game .bo-time>strong{font-size:22px}.blackout-game .bo-stability{width:68%}.blackout-game .bo-building{padding:15px 5px 5px}.blackout-game .bo-building-name{font-size:12px}.blackout-game .bo-building-caption>small{font-size:10px}.blackout-game .bo-building-action{font-size:12px}.blackout-game .bo-district{padding:5px}.blackout-game .bo-buildings{gap:6px}.blackout-game .bo-district[data-members="3"] .bo-house-art{height:60px}.blackout-game .bo-intro{padding:17px 15px 20px}.blackout-game .bo-intro h2{font-size:31px}.blackout-game .bo-intro>p{font-size:14px}.blackout-game .bo-result{padding:22px 15px}.blackout-game .bo-result h2{font-size:27px}
}
@media(prefers-reduced-motion:reduce){.blackout-game *,.blackout-game *:before,.blackout-game *:after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
/* Each phone column is one charging cable, with its buildings underneath. */
@media(max-width:700px){
 .blackout-game .bo-districts[data-count="3"]{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .blackout-game .bo-districts[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 .blackout-game .bo-districts[data-count="3"] .bo-buildings,.blackout-game .bo-districts[data-count="2"] .bo-buildings{grid-template-columns:1fr;gap:6px}
 .blackout-game .bo-districts[data-count="3"] .bo-district,.blackout-game .bo-districts[data-count="2"] .bo-district{padding:5px}
 .blackout-game .bo-districts[data-count="3"] .bo-district>h3,.blackout-game .bo-districts[data-count="2"] .bo-district>h3{display:flex;align-items:center;justify-content:center;text-align:center;min-height:28px;margin-bottom:4px;padding:0;font-size:12px;line-height:1.15;overflow-wrap:anywhere;hyphens:auto}
 .blackout-game .bo-districts[data-count="3"] .bo-building,.blackout-game .bo-districts[data-count="2"] .bo-building{padding-left:4px;padding-right:4px}
 .blackout-game .bo-districts[data-count="3"] .bo-building-caption,.blackout-game .bo-districts[data-count="2"] .bo-building-caption{flex-direction:column;align-items:center;gap:1px}
 .blackout-game .bo-districts[data-count="3"] .bo-building-name,.blackout-game .bo-districts[data-count="2"] .bo-building-name{font-size:12px}
 .blackout-game .bo-districts[data-count="3"] .bo-building-action,.blackout-game .bo-districts[data-count="2"] .bo-building-action{display:flex;align-items:center;justify-content:center;min-height:36px;font-size:12px;line-height:1.15}
}
