.energy-replay{margin:0;background:var(--ui-canvas);color:var(--ui-ink);font:14px/1.5 var(--ui-font);color-scheme:light;caret-color:var(--ui-accent);scrollbar-color:var(--ui-field) var(--ui-canvas)}
.energy-replay.dark-layout{color-scheme:dark}.energy-replay *{box-sizing:border-box}.energy-replay [hidden]{display:none!important}.energy-replay ::selection{background:var(--ui-tint);color:var(--ui-ink)}
.energy-replay main{max-width:var(--ui-page-width);margin:auto;padding:var(--ui-page-padding)}.energy-replay h1,.energy-replay h2,.energy-replay p{margin:0}.energy-replay h1{font-size:var(--ui-title-size);line-height:1.2;letter-spacing:-.025em;font-weight:700}.energy-replay h2{font-size:var(--ui-section-size);line-height:1.3;font-weight:600}.energy-replay p{color:var(--ui-muted)}
.replay-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}.replay-heading p{margin-top:8px;max-width:72ch}.replay-tag{color:var(--ui-accent);white-space:nowrap;font-size:12px;background:var(--ui-tint);border-radius:5px;padding:7px 10px}
.energy-replay button,.energy-replay select,.energy-replay input{font:inherit;color:inherit}.energy-replay button,.energy-replay select,.energy-replay input:not([type=range]):not([type=checkbox]){min-height:40px;border:1px solid var(--ui-field);border-radius:5px;background:var(--ui-paper);padding:8px 11px;max-width:100%}.energy-replay select{width:100%;text-overflow:ellipsis}.energy-replay label>span{display:block;margin-bottom:6px;font-size:12px;color:var(--ui-muted);font-weight:600}
.energy-replay button{cursor:pointer;line-height:1.25;white-space:nowrap}.energy-replay button:hover:not(:disabled){border-color:var(--ui-accent);background:var(--ui-tint)}.energy-replay button.primary{background:var(--ui-accent);border-color:var(--ui-accent);color:var(--ui-on-accent);font-weight:600}.energy-replay button.primary:hover:not(:disabled){background:var(--ui-accent-hover)}.energy-replay :disabled{opacity:.5;cursor:not-allowed}.energy-replay :focus-visible{outline:2px solid var(--ui-focus);outline-offset:3px}.energy-replay input[type=checkbox],.energy-replay input[type=range]{accent-color:var(--ui-accent)}
.replay-selection{padding:22px 24px;background:var(--ui-paper);border:1px solid var(--ui-line);border-radius:7px;margin-bottom:18px}.replay-fields{display:grid;grid-template-columns:1.3fr 1fr 1.5fr;gap:16px;align-items:end}.replay-fields label{min-width:0}.replay-fields input{width:100%}.replay-range-fields{margin-top:17px;grid-template-columns:1fr 1fr 1.2fr auto}.replay-form-actions{display:flex;gap:8px;align-items:center}.energy-replay .replay-help{font-size:12px;margin-top:12px;max-width:85ch}
.replay-device{display:grid;grid-column:1/-1;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:6px 10px;min-width:0}.replay-device>label{grid-column:1/-1;font-size:12px;color:var(--ui-muted);font-weight:600}.replay-device input,.replay-device select{min-width:0}.replay-device input::placeholder{color:var(--ui-muted);opacity:1}
.replay-status{padding:13px 17px;background:var(--ui-tint);color:var(--ui-accent);border:1px solid var(--ui-line);border-radius:5px;margin:16px 0;overflow-wrap:anywhere}.replay-status:empty{display:none}.replay-status[data-kind=error]{color:var(--ui-danger);background:var(--ui-paper)}.replay-status[data-kind=warning]{color:var(--ui-warning);background:var(--ui-paper)}
.replay-workspace,.replay-trends,.replay-events{background:var(--ui-paper);border:1px solid var(--ui-line);border-radius:7px;margin-top:20px;padding:24px}.replay-section-title{display:flex;align-items:center;justify-content:space-between;gap:18px}.replay-section-title p{margin-top:6px;font-size:13px}.energy-replay .replay-evidence{color:var(--ui-warning);font-size:13px;padding:10px 0 12px;min-height:44px;border-bottom:1px solid var(--ui-line)}
.replay-diagram{overflow:auto;scrollbar-width:thin;padding-top:8px}.replay-diagram svg{display:block;min-width:900px;width:100%;height:auto;max-height:650px;color:var(--ui-ink)}.replay-diagram text{fill:currentColor;font-family:var(--ui-font)}.home-wire{stroke:var(--ui-field);stroke-width:2.5;fill:none;stroke-linejoin:round}.home-wire.flow{stroke:var(--ui-accent);stroke-width:3}.home-wire.moving{stroke-dasharray:8 6;animation:replay-flow 1.1s linear infinite}.home-wire.reverse{animation-direction:reverse}.home-node-bg{fill:var(--ui-paper);stroke:var(--ui-line);stroke-width:1.2}.home-node-name{font-size:15px;font-weight:600}.home-node-value{font-size:19px;font-variant-numeric:tabular-nums}.home-node-meta{font-size:11px;fill:var(--ui-muted)!important}.home-bus-label{font-size:12px;fill:var(--ui-muted)!important}.home-unknown{font-size:12px;fill:var(--ui-warning)!important}.home-direction{fill:var(--ui-accent)}
.replay-observation{display:flex;justify-content:space-between;gap:12px;font-size:12px;color:var(--ui-muted);border-top:1px solid var(--ui-line);padding-top:12px}.replay-observation label{display:flex;gap:6px;align-items:center;white-space:nowrap}.replay-observation label>span{display:inline;margin:0;font-weight:400}.replay-player{display:flex;align-items:end;gap:14px;flex-wrap:wrap;margin-top:20px}.replay-play-buttons{display:flex;gap:6px}.replay-speed{width:85px}.replay-seek{margin-left:auto}.replay-timebar{display:flex;justify-content:space-between;align-items:center;margin-top:20px;font-size:12px;color:var(--ui-muted);gap:12px}.replay-timebar output{color:var(--ui-ink);font-size:18px;font-variant-numeric:tabular-nums}.replay-timeline{display:block;width:100%;margin:0;min-height:26px}.replay-timeline-marks{height:10px;position:relative;margin-top:13px;overflow:hidden}.replay-gap{position:absolute;height:100%;background:var(--ui-field);opacity:.65}.replay-event-mark{position:absolute;height:9px;width:2px;background:var(--ui-warning)}.replay-time-labels{display:flex;justify-content:space-between;gap:10px;color:var(--ui-muted);font-size:11px;font-variant-numeric:tabular-nums}
.replay-metric-details{border-top:1px solid var(--ui-line);margin-top:20px;padding-top:14px}.replay-metric-details summary{cursor:pointer;color:var(--ui-accent);font-weight:600}.replay-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 30px;margin-top:16px}.replay-metrics h3{font-size:14px;margin:0 0 8px}.replay-metrics table{width:100%;border-collapse:collapse;font-size:12px}.replay-metrics th{text-align:left;color:var(--ui-muted);font-weight:400}.replay-metrics td{text-align:right;font-variant-numeric:tabular-nums}.replay-metrics td:last-child{color:var(--ui-muted);font-size:11px}.replay-metrics tr{border-bottom:1px solid var(--ui-line)}.replay-metrics td,.replay-metrics th{padding:5px 0}
.replay-chart{margin-top:22px}.replay-chart h3{font-size:13px;font-weight:600;margin:0 0 10px}.replay-chart svg{display:block;width:100%;height:170px;overflow:visible;touch-action:pan-y}.replay-chart text{fill:var(--ui-muted);font:11px var(--ui-font)}.replay-chart-grid{stroke:var(--ui-line);stroke-width:1}.replay-chart-cursor{stroke:var(--ui-ink);stroke-width:1;stroke-dasharray:3 3}.replay-chart-legend{display:flex;gap:15px;flex-wrap:wrap;font-size:12px;color:var(--ui-muted);margin-top:4px}.energy-replay .replay-chart-toggle{display:flex;align-items:center;gap:5px;min-height:28px;border:0;padding:4px 5px;background:transparent;color:var(--ui-ink);font-size:12px}.energy-replay .replay-chart-toggle[aria-pressed=false]{color:var(--ui-muted);text-decoration:line-through;opacity:.55}.replay-chart-legend i{width:19px;height:0;border-top:2px solid var(--series-color)}.replay-chart-empty{padding:34px 0;text-align:center;color:var(--ui-muted);font-size:13px}
.replay-events ol{list-style:none;margin:15px 0 0;padding:0}.replay-events li{display:grid;grid-template-columns:160px 1fr auto;gap:18px;align-items:center;padding:13px 0;border-top:1px solid var(--ui-line)}.replay-events li>span{color:var(--ui-muted);font-size:12px}.replay-events time{font-variant-numeric:tabular-nums}.replay-events strong{display:block;font-size:13px}.replay-events small{display:block;color:var(--ui-muted);margin-top:4px}.replay-footer{display:flex;justify-content:space-between;gap:24px;color:var(--ui-muted);font-size:11px;margin-top:20px}.replay-footer span:last-child{max-width:75ch}
.energy-replay.dark-layout .replay-diagram image{filter:grayscale(1) brightness(0) invert(.9)}
.energy-replay .replay-effective{font-size:12px;line-height:1.6;margin-top:6px;overflow-wrap:anywhere}.replay-metrics small{display:block;font-size:10px;color:var(--ui-muted);line-height:1.5}
.replay-diagram-help{display:none;font-size:12px;padding:8px 0}
.energy-replay .replay-datetime-input{min-width:0;width:100%;padding-right:36px!important;cursor:pointer;font-variant-numeric:tabular-nums;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2356645c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18'/%3E%3C/svg%3E")!important;background-repeat:no-repeat!important;background-position:right 11px center!important}
.energy-replay .replay-datetime-calendar .flatpickr-current-month select,.energy-replay .replay-datetime-calendar .flatpickr-current-month input{min-height:0;border:0;border-radius:0;padding:0 4px;font-size:inherit}
.energy-replay.dark-layout .replay-datetime-input{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23b6c0c5' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18'/%3E%3C/svg%3E")!important}
.replay-datetime-footer{position:sticky;bottom:0;background:var(--ui-paper);padding:16px;border-top:1px solid var(--ui-line)}
.replay-datetime-footer fieldset{padding:0;margin:0;border:0;min-width:0}
.replay-datetime-footer legend{padding:0;margin-bottom:10px;font-weight:600;font-size:13px}
.replay-datetime-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.replay-datetime-fields input{width:100%;text-align:center;font-variant-numeric:tabular-nums}
.replay-datetime-error{font-size:12px;color:var(--ui-danger)!important;margin-top:10px!important}
.replay-datetime-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}
.replay-datetime-calendar .replay-datetime-actions button{min-height:40px;padding:8px 18px}
@media(max-width:800px){.replay-diagram-help{display:block}}
@keyframes replay-flow{to{stroke-dashoffset:-28}}
@media(prefers-reduced-motion:reduce){.home-wire.moving{animation:none}}
@media(max-width:1050px){.replay-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.replay-heading{align-items:flex-start}.replay-tag{white-space:normal;text-align:right}.replay-seek{margin-left:0}.replay-range-fields .replay-form-actions{align-self:end}.replay-player{gap:10px}}
@media(max-width:600px){.replay-heading{display:block}.replay-tag{display:inline-block;margin-top:12px}.replay-selection,.replay-workspace,.replay-trends,.replay-events{padding:16px}.replay-fields{grid-template-columns:minmax(0,1fr)}.replay-form-actions button{flex:1}.replay-section-title{align-items:flex-start;flex-wrap:wrap}.replay-player{gap:10px}.replay-play-buttons{width:100%}.replay-play-buttons button{flex:1;white-space:normal;font-size:12px;min-height:42px}.replay-seek{flex:1;min-width:160px}.replay-seek input{width:100%}.replay-metrics{grid-template-columns:1fr}.replay-observation,.replay-footer{flex-direction:column}.replay-events li{grid-template-columns:1fr auto;gap:6px}.replay-events li>span{grid-column:1/-1}.replay-timebar output{font-size:15px}.replay-time-labels{font-size:10px}.replay-chart svg{height:150px}}
 .energy-replay .replay-diagram svg{min-width:1100px;max-height:none}
 .energy-replay .home-node-name{font-size:15px}.energy-replay .home-node-value{font-size:21px;font-weight:600}.energy-replay .home-node-detail{font-size:13px;fill:var(--ui-ink);font-variant-numeric:tabular-nums}.energy-replay .home-node-label{font-size:12px;fill:var(--ui-muted)}.energy-replay .home-phase-label{font-size:11px;fill:var(--ui-muted)}.home-node-rule{stroke:var(--ui-line);stroke-width:1}
 .home-run-badge{color:var(--ui-muted)}.home-run-bg{fill:var(--ui-muted)}.home-run-badge[data-state=running] .home-run-bg{fill:var(--ui-accent)}.home-run-icon{fill:none;stroke:var(--ui-paper);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.home-run-badge[data-state=running] .home-run-icon{stroke:var(--ui-on-accent)}.home-run-badge[data-state=unknown] .home-run-bg{fill:var(--ui-paper);stroke:var(--ui-field);stroke-dasharray:3 2}.home-run-badge[data-state=unknown] .home-run-icon{stroke:var(--ui-muted)}
 @media(max-width:600px){.replay-device{grid-template-columns:minmax(0,1fr)}}
 .energy-replay .replay-chart-warning{font-size:12px;color:var(--ui-warning);margin:8px 0}
 .energy-replay .replay-config-basis{align-self:center;color:var(--ui-muted);font-size:12px}
 .energy-replay .replay-config-basis p{margin:8px 0 0;color:var(--ui-ink);font-size:14px}
