:root {
  color-scheme: dark;
  font-family: "Segoe UI", sans-serif;
  color: #e9f4ed;
  background: #101c29;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 75% 0, #203e43, transparent 55%), #101c29; }
main { width: min(1120px, calc(100% - 64px)); margin: auto; padding: 46px 0 42px; }
header { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 30px; }
.collection { display: flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: .19em; font-size: .7rem; font-weight: 700; color: #a0d4c6; margin: 0 0 12px; }
.collection span, h2 span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #83dcc1; box-shadow: 0 0 14px #83dcc1; }
h1, h3 { font-family: Georgia, serif; margin: 0; font-weight: 400; }
h1 { font-size: clamp(3rem, 7vw, 6rem); line-height: .87; letter-spacing: -.065em; }
h1 em { font-weight: 400; color: #a2dac5; }
.mission { max-width: 290px; color: #adcbca; line-height: 1.65; margin: 0 2px 2px 0; }
.game { border: 1px solid #3c6062; border-radius: 18px; overflow: hidden; background: #15252f; box-shadow: 0 20px 70px #080f185c; }
.gamebar, footer { padding: 13px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
h2 { color: #e0eee9; font-size: .83rem; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 10px; }
h2 span { width: 5px; height: 5px; }
.indicators { display: flex; gap: 20px; white-space: nowrap; font-size: .9rem; }
.seeds { color: #f5de9c; }
.health { color: #ff9a8d; letter-spacing: .1em; }
.viewport { position: relative; background: #153945; }
canvas { display: block; width: 100%; aspect-ratio: 2; height: auto; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: #03151c47; }
[hidden] { display: none !important; }
.panel { text-align: center; padding: clamp(12px, 3vw, 30px) clamp(18px, 4vw, 48px); border: 1px solid #90cdb67a; background: #102b35ed; border-radius: 16px; box-shadow: 0 12px 48px #07131d7d; }
.panel > p:first-child { color: #ade4c9; font-size: .65rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; margin: 0 0 8px; }
h3 { font-size: clamp(1.55rem, 4vw, 2.8rem); letter-spacing: -.035em; }
.panel > p:nth-of-type(2) { color: #c4dcd7; margin: 9px 0 19px; font-size: .9rem; }
button { font: inherit; cursor: pointer; }
#action { border: 0; border-radius: 8px; background: #a1e2c6; color: #152f35; font-weight: 750; padding: 10px 19px; }
#action span { margin-left: .4rem; }
#action:hover { background: #c3f5de; }
button:focus-visible, canvas:focus-visible { outline: 2px solid #ffd28b; outline-offset: -3px; }
#notice { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); max-width: 85%; margin: 0; padding: 8px 13px; border-radius: 8px; background: #10252e; color: #e5eee7; font-size: .8rem; text-align: center; }
footer { color: #bed0d0; flex-wrap: wrap; font-size: .78rem; }
.controls { display: flex; flex-wrap: wrap; gap: 12px 19px; }
kbd { display: inline-grid; place-items: center; min-width: 20px; padding: 1px 5px 3px; border: 1px solid #476467; border-radius: 4px; background: #203843; color: #e7f2eb; font: inherit; }
.restart { border: 1px solid #507174; color: #d7e6e1; background: transparent; padding: 5px 9px; border-radius: 5px; }
.restart:hover { background: #28444c; }
#chapters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
#chapters button { border: 1px solid #3c6062; color: #b6d2cc; background: #132732; padding: 7px 12px; border-radius: 6px; font-size: .75rem; }
#chapters button[aria-current="true"] { border-color: #9cdebe; color: #d7eddf; }
#chapters button:disabled { opacity: .46; cursor: default; }
.campaign-note { color: #b6d2cc; font-size: .79rem; }
.campaign-note a { color: #b9ead1; margin-left: .5em; text-underline-offset: .22em; }
.campaign-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 16px; }
#open-echoes span { color: #eed79c; margin-left: .35rem; font-variant-numeric: tabular-nums; }
#echo-dialog { width: min(660px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: clamp(14px, 4vw, 28px); color: #e8f4ec; border: 1px solid #63948f; border-radius: 16px; background: #162e3a; box-shadow: 0 24px 80px #06141bba; }
#echo-dialog::backdrop { background: #07131bc9; }
.echo-heading, .echo-puzzle-heading, .echo-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.echo-heading h2 { color: #eff8e9; font: 400 clamp(1.45rem, 5vw, 2.15rem)/1.08 Georgia, serif; }
#echo-intro, #echo-status { color: #bedad5; font-size: .9rem; line-height: 1.5; }
.echo-plates { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 12px; }
.echo-plate { overflow: hidden; border: 1px solid #4b7479; border-radius: 10px; background: #132732; }
.echo-plate canvas { aspect-ratio: 2.5; }
.echo-plate > div { padding: 10px 12px; }
.echo-plate h3 { font: 600 .95rem "Segoe UI", sans-serif; letter-spacing: 0; }
.echo-plate p { min-height: 2.5em; margin: 5px 0 9px; color: #bedad5; font-size: .78rem; line-height: 1.45; }
.echo-plate button:disabled { opacity: .56; cursor: default; }
.echo-puzzle-heading { padding-top: 6px; }
.echo-puzzle-heading h3 { font-size: 1.6rem; }
#echo-round { color: #a7e2c7; font-size: .81rem; }
#echo-status { min-height: 2.9em; }
.echo-pads { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0 18px; }
.echo-pads button { min-width: 0; padding: 7px; color: #eef4ed; background: #213d54; border: 1px solid #5a8992; border-radius: 8px; font-size: clamp(1.25rem, 6vw, 2rem); }
.echo-pads button[data-signal="true"] { color: #1c2b36; background: #ffde9a; border-color: #ffde9a; box-shadow: 0 0 16px #f8d68e86; }
.echo-pads button[aria-disabled="true"] { cursor: default; }
.report { width: min(810px, calc(100% - 35px)); color: #d3e2e0; line-height: 1.65; }
.report a { color: #a6e2d0; text-underline-offset: .2em; }
.report h1 { margin: 30px 0 24px; color: #eef4ed; font-size: clamp(2.6rem, 8vw, 4.7rem); }
.report h2 { font-size: 1.32rem; margin: 31px 0 10px; }
.report li { margin-bottom: .6em; }
.report table { border-collapse: collapse; width: 100%; }
.report th, .report td { padding: .55em .75em; border-bottom: 1px solid #3c6062; text-align: left; }
.report tbody th { color: #a2dac5; }
.report code { color: #f5de9c; }

@media (max-width: 620px) {
  main { width: calc(100% - 22px); padding-top: 26px; }
  header { align-items: start; flex-direction: column; gap: 13px; margin-bottom: 17px; }
  .mission { max-width: 100%; font-size: .85rem; }
  .gamebar, footer { padding: 10px 11px; }
  .indicators { gap: 10px; }
  .panel > p:nth-of-type(2) { margin: 5px 0 10px; font-size: .73rem; }
}
