[hidden] { display: none !important; }
:root { --mono: "Noto Sans Mono", ui-monospace, monospace; }

.colony-home { --deck-blue: #152c61; }
.colony-home .pt-h1 { line-height: 1.08; }
.colony-home .pt-intro { max-width: 550px; }
.colony-home .pt-acts .page-key { width: 240px; }
.colony-home .pt-acts .page-key .px { image-rendering: pixelated; }
.colony-tv {
  width: min(100%, 880px); padding: 18px;
  border: 1px solid #9a9ca0; border-radius: 24px;
  background: var(--steel-sheet); background-blend-mode: overlay, normal, normal;
  box-shadow: inset 0 1px 2px #fff, 0 12px 30px #0b17344a;
}
.colony-tv > .crt-case { border: 5px solid #14151a; box-shadow: 0 0 0 3px #777b85, inset 0 0 5px #fff, 0 4px 6px #0006; }
.colony-glass { aspect-ratio: auto; min-height: 264px; padding: clamp(15px,4.6cqi,30px); color: #d0e4d2; }
.colony-glass, .episode-screen {
  background: radial-gradient(85% 95% at 50% 35%, #18242a, #0a1218 72%, #041216);
  box-shadow: inset 0 0 34px #030807;
}
.colony-glass::before { opacity: .65; }
.colony-glass::after { opacity: .42; }
.tv-top, .tv-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px 12px;
  font: 600 clamp(9px,2.3cqi,11px)/1.4 var(--mono, monospace); text-transform: uppercase; letter-spacing: .06em;
}
.tv-top { color: #a7c1ac; border-bottom: 1px solid #627e695c; padding-bottom: 12px; }
.tv-top i { display: inline-block; width: 6px; height: 6px; margin-right: 7px; background: #acf58a; box-shadow: 0 0 7px #80e47c; }
.tv-title { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 10px 0; }
.tv-title > strong { color: #d3ffb8; font: 700 clamp(19px,5.5cqi,34px)/1.1 var(--mono, monospace); letter-spacing: -.04em; }
.tv-title > small { color: #a7c1ac; font: 500 clamp(10px,2.3cqi,12px) var(--mono, monospace); }
.tv-question { margin: 0 0 10px; color: #d0e4d2; font: 500 clamp(11px,2.5cqi,13px)/1.45 var(--mono, monospace); }
.tv-agents { display: grid; gap: 4px; }
.green { --agent: #b7f28d; --agent-ink: #254727; }
.blue { --agent: #a2cfff; --agent-ink: #1f4470; }
.amber { --agent: #f3cf85; --agent-ink: #664411; }
.agent-pixel { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--agent); border-radius: 2px; background: var(--agent-ink); color: var(--agent); font: 700 15px var(--mono, monospace); box-shadow: inset 0 0 0 2px #131d254d; }
.tv-agent { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; padding: 5px 8px; border: 1px solid #657d713d; background: #a5e0aa08; }
.tv-agent b, .tv-agent > strong { color: var(--agent); font: 700 clamp(12px,3cqi,15px)/1.15 var(--mono, monospace); }
.tv-agent > div { min-width: 0; display: grid; gap: 2px; }
.tv-agent small { color: #b5c5b7; font: 400 clamp(8px,2.2cqi,11px)/1.15 var(--mono, monospace); }
.tv-agent[data-state="terminated"] { --agent: #f0aba1; --agent-ink: #482421; }
.tv-bottom { margin-top: 10px; color: #9cbaa8; }
.tv-bottom b { color: #c2f2a6; }
.tv-buttons { display: flex; gap: 4px; margin-left: auto; }
.tv-buttons button {
  width: 35px; height: 26px; border: 1px solid #d6cdb5; border-radius: 4px; color: #494538;
  background: linear-gradient(#faf8ef, #d8d1bf); box-shadow: inset 0 1px #fff, 0 1px 2px #483c2966;
  font: 700 13px var(--ui); padding: 0;
}
.tv-buttons button:active { background: linear-gradient(#d8d1bf, #f3f0e8); }
.tv-buttons button:disabled { opacity: .45; }
.tv-brand { color: #6d6654; font: 700 9px var(--mono, monospace); letter-spacing: .1em; }

.home > .colony-library, .home > .colony-episodes, .home > .colony-faq { padding: clamp(36px,8cqi,68px) clamp(16px,5cqi,48px); }
.colony-bound { max-width: 1020px; margin: auto; }
.colony-bound > h2 { margin: 0; font: 700 clamp(27px,5.5cqi,42px)/1.12 var(--display); letter-spacing: -.035em; }
.colony-bound > p { margin: 10px 0 0; font: 400 14px/1.55 var(--read); }
.colony-library {
  color: #fff; background: url('asset/Home/band-deep-dither-16.png') repeat, radial-gradient(90% 122% at 75% 20%, #24458a, #101c46 74%);
  background-blend-mode: soft-light, normal;
}
.colony-library .colony-bound > p { color: #d5dff2; }
.replay-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; margin-top: 24px; }
.replay-card { display: flex; flex-direction: column; border: 1px solid #9badcf; background: #e7e9ee; color: #15213e; box-shadow: inset 0 1px #fff, 0 6px 14px #07102b5c; }
.replay-preview { display: flex; flex-wrap: wrap; align-content: space-between; justify-content: space-between; min-height: 116px; padding: 10px;
  background: repeating-linear-gradient(0deg,#0003 0 1px,transparent 1px 3px), radial-gradient(100% 110% at 30% 100%, #253b31, #101923);
  color: #b7e299; font: 700 10px/1.3 var(--mono, monospace); }
.replay-preview-1 { background-color: #5f4a28; background-blend-mode: normal, luminosity; color: #ffd598; }
.replay-preview-2 { background-color: #543033; background-blend-mode: normal, luminosity; color: #ffc7bc; }
.replay-pips { order: 1; width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; }
.replay-pips b { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid currentColor; background: #070f15; }
.replay-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 8px; padding: 13px; }
.replay-copy h3 { margin: 0; font: 700 16px var(--ui); }
.replay-copy p { margin: 0 0 5px; font: 400 13px/1.5 var(--read); }
.replay-copy .page-key { margin-top: auto; min-height: 33px; min-width: 0; padding: 5px 9px; font-size: 12px; }
.colony-episodes { background: var(--print-sheet); }
.remote-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(102px,28%); gap: 24px; margin-top: 24px; align-items: start; }
.episode-screen { min-height: 158px; padding: 9px; border-radius: 8px; color: #edf4fc; }
.episode-title { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 3px 3px 0 0; background: var(--cap); color: #fff; font: 700 13px var(--ui); }
.episode-copy { padding: 14px; background: #e9eee4; color: #161e24; }
.episode-copy h3 { margin: 0 0 6px; font: 700 17px var(--ui); }
.episode-copy p { margin: 0; font: 400 13px/1.5 var(--read); }
.episode-remote { display: grid; gap: 7px; padding: 10px; border: 1px solid #383940; border-radius: 12px; background: linear-gradient(#36393b,#22252c); box-shadow: inset 0 1px #777, 0 6px 10px #1a283040; }
.episode-remote button {
  display: flex; align-items: center; gap: 8px; min-height: 35px; padding: 3px 7px; border: 1px solid #12171e; border-radius: 4px;
  background: linear-gradient(#535961,#363b42); color: #fff; text-align: left; box-shadow: inset 0 1px #8f9396; font: 700 12px var(--ui);
}
.episode-remote button span { font: 700 12px var(--mono, monospace); color: #c7edac; }
.episode-remote button[aria-pressed="true"] { border-color: #7daa58; background: linear-gradient(#466a38, #2d452a); }
.colony-faq { background: #e4e8ed; box-shadow: inset 0 1px #fff; }
.help-window { margin-top: 22px; border: 1px solid #2460c5; background: #f8f9fc; box-shadow: 2px 4px 10px #19375b23; }
.help-caption { display: flex; align-items: center; gap: 7px; padding: 7px 9px; color: #fff; background: var(--cap); font-weight: 700; }
.help-topic { border-top: 1px solid #cdd7eb; padding: 0 13px; font: 400 13px/1.55 var(--read); }
.help-topic summary { padding: 10px 0; font-weight: 700; cursor: pointer; }
.help-topic p { margin-top: 0; }
.home-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; font-size: 12px; }
.home-footer > span { margin-right: auto; }

.win[data-id="console"] .win-body { background: #1a2c57; }
.console-shell { display: grid; grid-template-columns: 164px minmax(0,1fr); height: 100%; padding: 8px; gap: 8px; background: repeating-linear-gradient(90deg,#e0e3e7 0 2px,#d6d9de 2px 4px); }
.console-dial { display: flex; min-height: 0; overflow-y: auto; flex-direction: column; gap: 7px; padding: 8px; border: 1px solid #969aa5; border-radius: 7px; background: #e0e3ea; }
.console-dial h3 { margin: 0 0 2px; font: 700 12px var(--ui); }
.console-dial > button { min-height: 34px; padding: 4px; }
.console-dial [aria-pressed="true"] { color: #fff; border-color: #152e77; background: linear-gradient(#3972cf,#294592); box-shadow: inset 0 1px #c6ddff; }
.console-dial p { color: #26334d; margin: 3px 0; font: 400 11px/1.4 var(--read); }
.console-shortcuts { display: grid; gap: 5px; margin-top: auto; }
.console-deck { min-height: 0; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.console-view { flex: 1; min-height: 0; overflow: auto; padding: clamp(14px,3cqi,30px); color: #edf2ff; border-radius: 13px 13px 4px 4px; border: 5px solid #36404e;
  background: url('asset/Home/band-deep-dither-16.png') repeat, radial-gradient(110% 135% at 70% 0%, #253f7a, #0b193d 74%); background-blend-mode: soft-light, normal;
  box-shadow: inset 0 0 24px #0008; }
.console-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px; }
.console-head p { margin: 0; color: #c3d7ef; font: 500 11px/1.3 var(--mono, monospace); text-transform: uppercase; }
.console-head h1 { margin: 8px 0 0; font: 700 clamp(24px,5cqi,44px)/1.08 var(--display); letter-spacing: -.04em; }
.console-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 15px 0 18px; border: 1px solid #859dcc66; }
.console-stats > div { padding: 9px 10px; min-width: 0; border-right: 1px solid #859dcc66; background: #1523455c; }
.console-stats > div:last-child { border: 0; }
.console-stats small { display: block; color: #c7d6f0; font: 400 10px var(--mono,monospace); }
.console-stats strong { display: block; margin-top: 3px; color: #cdf0ac; font: 700 clamp(17px,3cqi,26px)/1.1 var(--mono,monospace); }
.console-stats strong span { font-size: 10px; }
.console-details { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; align-items: start; }
.console-details h2 { margin: 0 0 8px; color: #f0f4ff; font: 700 19px/1.1 var(--ui); }
.lineage-tree { padding: 0; margin: 0; list-style: none; display: grid; gap: 5px; }
.lineage-tree .lineage-tree { margin: 5px 0 0 8px; border-left: 1px solid #8da5c966; padding-left: 7px; }
.agent-pick { width: 100%; display: flex; align-items: center; gap: 7px; text-align: left; padding: 5px 7px; border: 1px solid #728cb87f; background: #101f43; color: #f0f4fc; }
.agent-pick:hover, .agent-pick[aria-pressed="true"] { border-color: var(--agent); background: #234374; }
.agent-pick b, .agent-pick small { display: block; }
.agent-pick small { color: #d4e0f6; font-size: 10px; }
.agent-pick code { margin-left: auto; white-space: nowrap; color: var(--agent); }
.agent-detail { padding: 11px; border: 1px solid #728cb87f; background: #111f418c; }
.agent-detail p { margin: 0; color: #d2ddf2; }
.agent-detail dl, .meta-grid { display: grid; grid-template-columns: max-content minmax(0,1fr); gap: 5px 12px; }
.agent-detail dd, .meta-grid dd { margin: 0; }
.agent-detail dt { color: #c4d7ee; }
.epoch-history { margin-top: 20px; }
.epoch-history h2 { margin: 0 0 7px; font: 700 19px var(--ui); }
.epoch-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(31px,1fr); gap: 4px; overflow: auto; padding: 2px; }
.epoch-strip button { position: relative; height: 49px; padding: 0; display: grid; align-items: end; border: 1px solid #7993c281; background: #14254b; color: #deebff; isolation: isolate; }
.epoch-strip button span { position: absolute; inset: auto 3px 3px; height: var(--height); max-height: calc(100% - 6px); min-height: 3px; z-index: -1; background: #709c66; opacity: .66; }
.epoch-strip button span.withdrawal { background: #e3b071; }
.epoch-strip button b { font: 700 10px/1.8 var(--mono); text-shadow: 0 1px 2px #050e23; }
.epoch-strip button[aria-pressed="true"], .epoch-strip button:hover { border-color: #c5efa8; }
.console-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 7px 3px 0; color: #1a2845; }
.console-controls input { min-width: 64px; flex: 1; accent-color: #2c5fbb; }
.console-controls output { font-family: var(--mono, monospace); }
.console-controls button { min-width: 42px; }
.utility-window { padding: clamp(14px,4cqi,30px); min-height: 100%; background: #eeeee6; color: #172039; }
.utility-window h1 { margin: 0 0 8px; font: 700 clamp(23px,5cqi,38px)/1.15 var(--display); letter-spacing: -.035em; }
.utility-window h1 + p { margin: 0 0 18px; font: 400 14px/1.4 var(--read); }
.xp-fieldset { padding: 12px; margin: 12px 0; border: 1px solid #a8b0bf; box-shadow: inset 1px 1px #fff; background: #f9fafb; }
.xp-fieldset h2 { margin: 0 0 7px; font: 700 15px var(--ui); color: #213e78; }
.xp-fieldset p { line-height: 1.5; }
.monitor-controls, .receipt-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.monitor-controls select, .receipt-pick select { min-height: 27px; }
.live-status { min-height: 18px; margin-bottom: 0; color: #243f72; }
.receipt-events { padding: 0; list-style: none; }
.receipt-events li { display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: baseline; padding: 8px 0; border-top: 1px solid #d4dbe6; }
.receipt-events a { margin-left: auto; }
.receipt-table { max-width: 100%; overflow: auto; }
.receipt-table table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; font-size: 12px; }
.receipt-table th, .receipt-table td { border: 1px solid #d9deea; padding: 6px; }
.receipt-table thead th { background: #dde7f8; color: #1a3671; }
.receipt-note { font: 400 12px/1.5 var(--read); }
.sm-foot .sm-item { width: auto; padding-right: 8px; }
#registry-preview:not(:empty) { padding: 7px 10px; margin-bottom: 10px; background: #fff1cd; border: 1px solid #bd9d59; color: #5a420e; }
.registry-field { display: grid; grid-template-columns: 105px minmax(0,1fr); gap: 7px; align-items: center; margin: 8px 0; }
.registry-field .field, .registry-founders .field { width: 100%; min-height: 32px; padding-inline: 6px; }
.registry-rule { margin: 8px 0 13px; color: #415574; }
.registry-founders { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding: 10px; border: 1px solid #c9d3e0; }
.registry-founders legend { color: #253d65; font-weight: 700; }
.registry-founders label { display: block; margin-bottom: 5px; }
.registry-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; margin-top: 12px; }
.registry-actions p { margin: 0; }
.registry-list { list-style: none; margin: 0; padding: 0; }
.registry-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid #d6deeb; }
.registry-list li div { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.registry-list li span { color: #425b7b; font-size: 11px; }
.registry-list button { flex: none; min-height: 32px; }
.forecast-panel { margin: 14px 0; padding: 12px; border: 1px solid #7eab845d; background: #142d3c; }
.forecast-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.forecast-panel h2 { margin: 0; color: #d7f1bc; font: 700 18px var(--ui); }
.forecast-panel p { margin: 6px 0; color: #c8d9df; font: 400 11px/1.5 var(--mono); }
.forecast-heading > span { color: #dbe0ef; font-size: 11px; }
.forecast-calls { padding: 0; margin: 10px 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.forecast-calls li { padding: 4px 7px; border: 1px solid #7eab845d; color: #dfe9f4; }
.forecast-calls li span { margin-left: 5px; color: #b8d0bd; font-size: 11px; }
.forecast-hash, .console-head h1, .tv-title strong { overflow-wrap: anywhere; }
.forecast-hash { font-size: 11px; }
.forecast-receipt-calls { padding-inline-start: 18px; }

@container home (max-width: 610px) {
  .replay-grid { grid-template-columns: 1fr; }
  .replay-preview { min-height: 86px; }
  .remote-layout { gap: 9px; }
  .episode-remote { padding: 6px; }
}
@container (max-width: 630px) {
  .console-shell { display: flex; flex-direction: column; }
  .console-dial { flex: 0 0 auto; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; padding: 4px; overflow: auto; }
  .console-dial h3, .console-dial p, .console-shortcuts { display: none; }
  .console-dial > button { min-width: 0; padding-inline: 3px; }
  .console-deck { flex: 1; }
  .console-details { grid-template-columns: 1fr; }
}
@media (max-width: 720px), (max-height: 500px) and (pointer: coarse) {
  .registry-field { grid-template-columns: 85px minmax(0,1fr); }
  .registry-founders { grid-template-columns: 1fr; }
  .registry-founders > div { display: grid; grid-template-columns: 80px minmax(0,1fr); align-items: center; gap: 5px; }
  .colony-home .pt-h1 { font-size: clamp(29px,8.2vw,36px); }
  .colony-tv { padding: 9px; border-radius: 17px; }
  .colony-tv > .crt-case { border-width: 3px; }
  .colony-glass { min-height: 224px; border-radius: 9px; padding: 12px; }
  .colony-tv .crt-chin { padding: 0 2%; }
  .colony-tv .tv-brand { display: none; }
  .tv-top { padding-bottom: 8px; }
  .tv-title { padding: 8px 0; }
  .tv-agent { padding: 4px 6px; }
  .tv-agent .agent-pixel { width: 23px; height: 23px; }
  .tv-buttons button { min-height: 31px; }
}
