:root{--bg: #f4f1ea;--surface: #fffdf8;--surface-2: #f0ebe0;--border: #ddd4c3;--text: #2a2620;--muted: #776d5e;--accent: #9a4a1c;--accent-text: #ffffff;--good: #2f7d45;--good-bg: #e2f1e5;--warn: #9a6400;--warn-bg: #fbefd4;--bad: #b3362b;--bad-bg: #f8e1de;--info: #2c5f8f;--info-bg: #e0ebf6;--radius: 8px;color-scheme:light;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:15px;line-height:1.45}@media(prefers-color-scheme:dark){:root{--bg: #17150f;--surface: #211e17;--surface-2: #2b271e;--border: #3d372b;--text: #ece5d8;--muted: #a59a88;--accent: #e08447;--accent-text: #1a120b;--good: #6cc184;--good-bg: #1d3324;--warn: #e3b04f;--warn-bg: #3a2e14;--bad: #ee7b6f;--bad-bg: #3d1e1a;--info: #79aee0;--info-bg: #1b2a3a;color-scheme:dark}}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}h2{font-size:1.05rem;margin:0}h3{font-size:.95rem;margin:1.2rem 0 .5rem}button{font:inherit;cursor:pointer;border-radius:6px;padding:.4rem .8rem;border:1px solid var(--accent);background:var(--accent);color:var(--accent-text);font-weight:600}button:disabled{opacity:.45;cursor:not-allowed}button.ghost{background:transparent;color:var(--text);border-color:var(--border);font-weight:500}button.ghost:hover:not(:disabled){background:var(--surface-2)}button.danger{background:var(--bad);border-color:var(--bad);color:#fff}button.danger-text{color:var(--bad)}button.link{background:none;border:0;padding:0;color:var(--accent);font-weight:500;text-align:left}button.link:hover{text-decoration:underline}input,select,textarea{font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:.35rem .5rem;min-width:0}textarea{width:100%;font-family:ui-monospace,Consolas,monospace;font-size:.85rem}input[type=checkbox]{width:1rem;height:1rem;accent-color:var(--accent)}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.topbar{display:flex;flex-wrap:wrap;gap:.75rem;align-items:center;justify-content:space-between;padding:.75rem 1.25rem;background:var(--surface);border-bottom:1px solid var(--border)}.brand{font-weight:700;font-size:1.05rem;display:flex;gap:.5rem;align-items:center}.logo{color:var(--accent)}.context-bar{display:flex;flex-wrap:wrap;gap:.5rem}.context-bar select{min-width:9rem}.tabs{display:flex;gap:.25rem;padding:0 1.25rem;overflow-x:auto;background:var(--surface);border-bottom:1px solid var(--border)}.tabs button{background:none;border:0;border-bottom:3px solid transparent;border-radius:0;color:var(--muted);padding:.65rem .8rem;white-space:nowrap;font-weight:500}.tabs button.on{color:var(--text);border-bottom-color:var(--accent);font-weight:650}.tabs.sub{background:var(--bg)}.tabs.sub button{padding:.45rem .7rem;font-size:.9rem;border-bottom-width:2px}main{max-width:1400px;margin:0 auto;padding:1.25rem}.page{display:flex;flex-direction:column;gap:1rem}.grid-2{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,480px),1fr));gap:1rem;align-items:start}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1rem;min-width:0}.card-head{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;justify-content:space-between;margin-bottom:.75rem}.card-actions,.row-actions,.toolbar,.form-actions{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center}.toolbar{margin-bottom:.75rem}.spacer{flex:1}.stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(165px,1fr));gap:.6rem}.stat{display:flex;flex-direction:column;align-items:flex-start;gap:.1rem;text-align:left;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:var(--radius);padding:.75rem .9rem;font-weight:400}.stat:disabled{opacity:1;cursor:default}.stat.clickable:hover{border-color:var(--accent)}.stat-value{font-size:1.5rem;font-weight:700;font-variant-numeric:tabular-nums}.stat-label{color:var(--muted);font-size:.85rem}.stat-hint{color:var(--muted);font-size:.75rem}.stat.good .stat-value{color:var(--good)}.stat.warn .stat-value{color:var(--warn)}.stat.bad .stat-value{color:var(--bad)}.cycle{display:flex;flex-wrap:wrap;gap:.3rem;list-style:none;margin:0;padding:0;counter-reset:step}.cycle li{counter-increment:step;display:flex;align-items:center;gap:.3rem;font-size:.85rem}.cycle li:before{content:counter(step);display:inline-grid;place-items:center;width:1.3rem;height:1.3rem;border-radius:50%;background:var(--surface-2);color:var(--muted);font-size:.75rem;font-weight:700}.cycle li:not(:last-child):after{content:"→";color:var(--muted);margin-left:.3rem}.table-wrap{overflow-x:auto}.table{width:100%;border-collapse:collapse;font-size:.9rem}.table th{text-align:left;color:var(--muted);font-weight:600;font-size:.8rem;padding:.4rem .5rem;border-bottom:1px solid var(--border);white-space:nowrap}.table td{padding:.45rem .5rem;border-bottom:1px solid var(--border);vertical-align:middle;font-variant-numeric:tabular-nums}.table tr:last-child td{border-bottom:0}.table tr.dim td{opacity:.55}.table tr.focus td{background:var(--warn-bg)}.table.num input{width:6rem}.neg{color:var(--bad)}.pos{color:var(--good)}.badge{display:inline-block;padding:.05rem .45rem;border-radius:999px;font-size:.75rem;font-weight:600;background:var(--surface-2);color:var(--muted);white-space:nowrap}.badge.good{background:var(--good-bg);color:var(--good)}.badge.warn{background:var(--warn-bg);color:var(--warn)}.badge.bad{background:var(--bad-bg);color:var(--bad)}.badge.info{background:var(--info-bg);color:var(--info)}.badges{display:flex;gap:.25rem;flex-wrap:wrap}.score{display:inline-block;min-width:2.2rem;text-align:center;font-weight:700;border-radius:6px;padding:0 .3rem}.score.good{background:var(--good-bg);color:var(--good)}.score.warn{background:var(--warn-bg);color:var(--warn)}.score.bad{background:var(--bad-bg);color:var(--bad)}.composition{display:inline-flex;flex-wrap:wrap;gap:.1rem .6rem}.muted{color:var(--muted)}.small{font-size:.82rem}.empty{color:var(--muted);font-style:italic;margin:.5rem 0}.error{color:var(--bad);background:var(--bad-bg);padding:.5rem .75rem;border-radius:6px;margin:.5rem 0}.notice{background:var(--info-bg);color:var(--text);padding:.6rem .8rem;border-radius:6px;margin:0}.notice.warn{background:var(--warn-bg)}.form{display:flex;flex-direction:column;gap:.75rem}.form label{display:flex;flex-direction:column;gap:.25rem;font-size:.88rem}.form .row{display:flex;gap:.5rem;flex-wrap:wrap}.form .row label{flex:1;min-width:8rem}label.inline,.form label.inline{flex-direction:row;align-items:center;gap:.45rem}fieldset{border:1px solid var(--border);border-radius:6px;padding:.6rem .75rem;margin:0}legend{font-size:.85rem;color:var(--muted);padding:0 .3rem}.comp-editor{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.5rem}.comp-editor label{font-size:.8rem}.comp-editor p{grid-column:1 / -1;margin:0}.settings label>span{font-weight:600}.settings input[type=number]{max-width:10rem}.with-unit{display:flex;align-items:center;gap:.35rem;font-weight:400!important}.inline-form{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.75rem;padding-top:.75rem;border-top:1px dashed var(--border)}.inline-form input,.inline-form select{flex:1 1 8rem}.inline-form .error{flex-basis:100%}.simple-list{list-style:none;margin:0;padding:0}.simple-list li{display:flex;justify-content:space-between;gap:.5rem;align-items:center;padding:.35rem 0;border-bottom:1px solid var(--border)}.checklist{list-style:none;padding:0;margin:0 0 .75rem;display:flex;flex-direction:column;gap:.4rem}.segmented{display:inline-flex;flex-wrap:wrap;border:1px solid var(--border);border-radius:6px;overflow:hidden}.segmented button{background:transparent;color:var(--muted);border:0;border-radius:0;font-weight:500;padding:.3rem .65rem}.segmented button.on{background:var(--surface-2);color:var(--text);font-weight:650}.recs{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.6rem}.rec{border:1px solid var(--border);border-radius:6px;padding:.6rem .75rem}.rec p{margin:.35rem 0}.rec-head{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center}.pending-reports{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.5rem}.pending-reports li{display:flex;flex-wrap:wrap;justify-content:space-between;gap:.5rem;border-bottom:1px solid var(--border);padding-bottom:.5rem}.result{border-top:1px solid var(--border);padding-top:.5rem}.kv{display:grid;grid-template-columns:max-content 1fr;gap:.3rem 1rem;margin:0;font-size:.9rem}.kv dt{color:var(--muted)}.kv dd{margin:0}.timeline{padding-left:1rem;font-size:.88rem;display:flex;flex-direction:column;gap:.35rem}.skipped{margin-top:.75rem;font-size:.88rem}.skipped summary{cursor:pointer;color:var(--muted)}.instructions{background:var(--surface-2);padding:.75rem;border-radius:6px;white-space:pre-wrap;font-size:.85rem;max-height:60vh;overflow:auto}.perf-totals{display:flex;flex-wrap:wrap;gap:1.25rem;margin-bottom:.75rem}.bars{display:flex;align-items:flex-end;gap:4px;height:160px;overflow-x:auto;padding-bottom:1.2rem}.bar-col{flex:1 0 18px;height:100%;display:flex;flex-direction:column;align-items:center;position:relative}.bar-stack{flex:1;width:100%;display:flex;align-items:flex-end;gap:2px}.bar{flex:1;border-radius:3px 3px 0 0;min-height:1px}.bar.good,.dot.good{background:var(--good)}.bar.bad,.dot.bad{background:var(--bad)}.bar-label{position:absolute;bottom:-1.2rem;font-size:.65rem;color:var(--muted);white-space:nowrap}.legend{display:flex;align-items:center;gap:.35rem;color:var(--muted)}.dot{display:inline-block;width:.65rem;height:.65rem;border-radius:2px;margin-left:.4rem}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000073;display:grid;place-items:center;padding:1rem;z-index:10}.modal{background:var(--surface);border-radius:var(--radius);padding:1rem 1.25rem;width:min(640px,100%);max-height:92vh;overflow:auto}.modal.wide{width:min(1100px,100%)}@media(max-width:640px){main{padding:1rem}.topbar,.tabs{padding-left:1rem;padding-right:1rem}.context-bar select{flex:1 1 100%}}.storage{display:flex;flex-direction:column;gap:.65rem}.storage-head{display:flex;justify-content:space-between;gap:.5rem;flex-wrap:wrap}.gauge{height:.6rem;background:var(--surface-2);border-radius:999px;overflow:hidden;margin:.25rem 0}.gauge-fill{height:100%;background:var(--good);border-radius:999px;transition:width .4s}.storage-row.warn .gauge-fill{background:var(--warn)}.storage-row.alert .gauge-fill,.storage-row.full .gauge-fill{background:var(--bad)}.storage-foot{color:var(--muted)}.advice{margin:.75rem 0 .25rem;padding-left:1.1rem;font-size:.88rem;display:flex;flex-direction:column;gap:.2rem}.autosync{margin:.75rem 0}.autosync select{margin-left:.35rem}.game-page{gap:.6rem}.game-bar{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}.game-bar .small{padding:.3rem .55rem;font-size:.82rem}.game-address{display:flex;align-items:center;gap:.4rem;flex:1 1 260px;min-width:0;border:1px solid var(--border);border-radius:6px;padding:0 .5rem;background:var(--surface)}.game-address input{border:0;flex:1;min-width:0;padding:.35rem 0;background:transparent}.game-screen{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;background:#000;outline:none}.game-screen:focus-visible{box-shadow:0 0 0 2px var(--accent)}.game-screen img{display:block;width:100%;height:auto;cursor:pointer;-webkit-user-select:none;user-select:none}main:has(.game-page){max-width:none}.launch-bar{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin:.5rem 0}.launch-bar .error{flex-basis:100%}.launch-notice{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}.launch-notice .launch-bar{margin:0}.auth-screen{min-height:100vh;display:grid;place-items:center;padding:16px}.auth-card{width:min(420px,100%);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.5rem}.auth-card h1{font-size:1.2rem;margin:1rem 0}.user-menu{display:flex;align-items:center;gap:.5rem}.user-menu .small{padding:.3rem .6rem;font-size:.82rem}.launch-summary{display:flex;flex-wrap:wrap;gap:1rem;align-items:center;justify-content:space-between;background:var(--surface-2);border-radius:var(--radius);padding:.75rem 1rem;margin-bottom:.75rem}button.big{font-size:1.05rem;padding:.65rem 1.4rem}.launch-ready{border-left:4px solid var(--good)}
