/* PixalCream Studios - game.html only. Builds on site.css and fx.css (same tokens, cards, pills and lightbox look).
   Every class here starts with "g-" so nothing collides with the shared sheets. */

/* ---------- hero extras ---------- */
.g-toc { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.75rem; }
.g-toc a { font-size: .875rem; color: var(--muted); padding: .375rem .875rem; border: 1px solid var(--line); border-radius: 62.4375rem; background: rgba(14, 21, 38, .6); }
.g-toc a:hover, .g-toc a:focus-visible { color: var(--text); border-color: var(--accent-2); text-decoration: none; }
.g-center { margin: 18px auto 0; text-align: center; }
section.g-glance { padding-top: 2rem; }
.g-glance .statbar { padding-top: 0; }

/* ---------- pills: one more state between "now" and "soon" ---------- */
.pill.part { background: rgba(255, 138, 61, .14); color: var(--accent); }

/* ---------- the loop ---------- */
.g-steps { list-style: none; padding: 0; }
.g-steps .step .pill { margin-left: .5rem; vertical-align: .55rem; }

/* ---------- systems in depth ---------- */
.g-filter-slot { margin: -1rem 0 1.5rem; }
.g-filter { display: flex; flex-wrap: wrap; gap: .5rem; }
.g-chip { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .5rem 1rem; border-radius: 62.4375rem; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: inherit; font-size: .9375rem; font-weight: 700; cursor: pointer; transition: border-color .2s, color .2s, background-color .2s; }
.g-chip:hover { color: var(--text); border-color: #2f4270; }
.g-chip[aria-pressed="true"] { color: var(--text); border-color: var(--accent-2); background: rgba(78, 201, 255, .1); }
.g-chip:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.g-chip-n { font-size: .75rem; min-width: 1.5rem; padding: .125rem .375rem; border-radius: 62.4375rem; background: rgba(141, 154, 181, .16); color: var(--text); text-align: center; font-variant-numeric: tabular-nums; }
.g-chip-built[aria-pressed="true"] .g-chip-n { background: rgba(78, 201, 255, .2); }
.g-chip-partly[aria-pressed="true"] .g-chip-n { background: rgba(255, 138, 61, .22); }
.g-meter { display: flex; height: .375rem; margin: 1rem 0 .5rem; border-radius: 62.4375rem; overflow: hidden; background: var(--line); max-width: 32rem; }
.g-meter span { flex: 0 1 0; min-width: 0; }
.g-meter-built { background: var(--accent-2); }
.g-meter-partly { background: var(--accent); }
.g-meter-planned { background: #3a4766; }
.g-count { margin: 0; color: var(--muted); font-size: .875rem; }

.g-feats { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.g-feat { display: flex; flex-direction: column; }
.g-feat[hidden] { display: none; }
.g-feat-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .25rem; }
.g-feat .ico { margin-bottom: 0; }
.g-feat p strong { display: block; color: var(--text); font-weight: 700; margin-bottom: .375rem; line-height: 1.45; }
.g-feat details.more p { margin-top: .625rem; }
.g-feat .g-next { margin-top: auto; padding-top: .875rem; border-top: 1px solid var(--line); font-size: .9375rem; }
.g-feat details.more + .g-next, .g-feat p + .g-next { margin-top: 1rem; }
.g-next b { color: var(--text); }
.g-feat:target { border-color: var(--accent-2); }

/* ---------- calculators ---------- */
.g-tools { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); }
.g-tool h3 { margin-bottom: .375rem; }
.g-tool .g-tool-lead { margin-bottom: 1rem; }
.g-form[hidden], .g-static[hidden], .g-field[hidden] { display: none; }
.g-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: .875rem; }
.g-field { display: grid; gap: .375rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.g-field > span, .g-field legend { color: var(--text); font-size: .9375rem; font-weight: 700; padding: 0; }
.g-field select, .g-field input[type="number"] {
  width: 100%; min-height: 2.75rem; padding: .5rem .75rem; border-radius: .625rem; border: 1px solid var(--line);
  background: rgba(5, 7, 13, .7); color: var(--text); font: inherit; font-size: .9375rem;
}
.g-field select:focus-visible, .g-field input:focus-visible, .g-check input:focus-visible, .g-radios input:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.g-field option { background: #0a0f1c; color: var(--text); }
.g-field input[type="range"] { width: 100%; min-height: 2rem; accent-color: var(--accent); }
.g-field output { color: var(--accent); font-variant-numeric: tabular-nums; }
.g-radios { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.g-radios legend { flex: 1 1 100%; margin-bottom: .25rem; }
.g-radios label, .g-check { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.25rem; color: #c3cde2; font-size: .9375rem; cursor: pointer; }
.g-radios input, .g-check input { width: 1.125rem; height: 1.125rem; accent-color: var(--accent); margin: 0; }
.g-out { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: .375rem 1rem; margin: .25rem 0 0; padding: 1rem; border-radius: .75rem; border: 1px solid rgba(78, 201, 255, .3); background: rgba(78, 201, 255, .05); font-size: .9375rem; }
.g-out:empty { display: none; }
.g-out dt { color: var(--muted); }
.g-out dd { margin: 0; color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.g-tool p.g-static { color: #c3cde2; }
.g-tool p.g-fine { margin-top: .875rem; font-size: .8125rem; color: var(--muted); }

.g-jumpviz { position: relative; height: 7rem; border-radius: .75rem; border: 1px solid var(--line); background: linear-gradient(0deg, rgba(78, 201, 255, .08), transparent); overflow: hidden; }
.g-jumpbar { position: absolute; left: 50%; bottom: .625rem; width: .25rem; margin-left: -.125rem; height: calc(var(--h, 5%) * .85); background: linear-gradient(0deg, var(--accent), rgba(255, 138, 61, .2)); border-radius: 62.4375rem; transition: height .35s cubic-bezier(.2, .7, .2, 1); }
.g-jumpman { position: absolute; left: 50%; bottom: calc(.625rem + var(--h, 5%) * .85); transition: bottom .35s cubic-bezier(.2, .7, .2, 1); width: .875rem; height: .875rem; margin-left: -.4375rem; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 .75rem rgba(78, 201, 255, .6); }
.g-jumpviz::after { content: ""; position: absolute; left: 0; right: 0; bottom: .5rem; border-top: 1px solid var(--line); }

/* wide tools take the whole row; they hold canvases, so the card does not lift on hover */
.g-tool.g-wide { grid-column: 1 / -1; }
.g-tool.g-wide:hover { transform: none; }
.g-chips { gap: .5rem; }
.g-chips label { min-height: 2.75rem; padding: .375rem .875rem; border: 1px solid var(--line); border-radius: 62.4375rem; background: rgba(5, 7, 13, .5); transition: border-color .15s, background-color .15s, color .15s; }
.g-chips label:hover { border-color: #2f4270; color: var(--text); }
.g-chips label:has(input:checked) { border-color: var(--accent-2); background: rgba(78, 201, 255, .1); color: var(--text); }
.g-chips label:has(input:focus-visible) { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.g-tool .btn.ghost { justify-self: start; min-height: 2.75rem; }
.g-tool .btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

/* flight planner */
.g-plan-grid { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; }
.g-plan-controls { display: grid; gap: .875rem; min-width: 0; }
.g-plan-view { display: grid; gap: .625rem; min-width: 0; }
.g-plan-canvas { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: .75rem; border: 1px solid var(--line); background: radial-gradient(ellipse at 50% 50%, #0d1528, #05070d 75%); }
.g-plan-canvas.g-drag { cursor: grab; touch-action: none; }
.g-plan-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.g-tool p.g-plan-clock { margin: 0; color: #c3cde2; font-size: .9375rem; font-variant-numeric: tabular-nums; flex: 1 1 12rem; }
.g-maths > summary { cursor: pointer; color: var(--accent-2); font-weight: 700; list-style: none; min-height: 2.75rem; display: flex; align-items: center; }
.g-maths > summary::-webkit-details-marker { display: none; }
.g-maths > summary::before { content: "+"; display: inline-block; width: 1.25rem; color: var(--accent); font-weight: 800; }
.g-maths[open] > summary::before { content: "\2212"; }
.g-maths > summary:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.g-mathlist { margin: .25rem 0 0; padding-left: 1.5rem; display: grid; gap: .5rem; color: #c3cde2; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.g-mathlist li { overflow-wrap: anywhere; }
.g-mathlist li::marker { color: var(--accent); font-weight: 700; }

/* scan pulse */
.g-tool p.g-groundnote { margin: 0; color: #c3cde2; font-size: .9375rem; }
.g-scan-canvas { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: .75rem; border: 1px solid var(--line); background: #121823; cursor: crosshair; }
.g-scan-canvas:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.g-scanbtns { display: flex; flex-wrap: wrap; gap: .625rem; }
.g-tool p.g-scanlog { min-height: 1.5rem; color: #c3cde2; font-size: .9375rem; }
.sw-scrap { background: #e8ac4e; box-shadow: 0 0 .5rem rgba(232, 172, 78, .7); }
.sw-iron { background: #de683e; box-shadow: 0 0 .5rem rgba(222, 104, 62, .7); }
.sw-copper { background: #56ccaa; box-shadow: 0 0 .5rem rgba(86, 204, 170, .7); }
.sw-veil { background: #b072ff; box-shadow: 0 0 .625rem rgba(176, 114, 255, .9); }

/* production chain */
.g-chain-picks { display: grid; gap: .875rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); align-items: start; }
.g-chain-counts { display: flex; flex-wrap: wrap; gap: .5rem .75rem; }
.g-stepper { display: inline-flex; align-items: center; gap: .375rem; padding: .25rem .375rem .25rem .875rem; border: 1px solid var(--line); border-radius: 62.4375rem; background: rgba(5, 7, 13, .5); }
.g-stepper[hidden] { display: none; }
.g-step-name { color: var(--text); font-size: .9375rem; font-weight: 700; margin-right: .25rem; }
.g-step-btn { width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 1.125rem; font-weight: 800; line-height: 1; cursor: pointer; }
.g-step-btn:hover:not(:disabled) { border-color: var(--accent-2); }
.g-step-btn:disabled { opacity: .4; cursor: default; }
.g-step-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.g-step-val { min-width: 1.5rem; text-align: center; color: var(--accent); font-weight: 800; font-variant-numeric: tabular-nums; }
.g-chain { list-style: none; margin: 0; padding: 0; display: grid; gap: .875rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); }
.g-station { position: relative; display: grid; gap: .375rem; align-content: start; min-width: 0; padding: .75rem .875rem; border: 1px solid var(--line); border-radius: .75rem; background: rgba(5, 7, 13, .55); transition: border-color .2s, box-shadow .2s, background-color .2s; }
.g-station[hidden] { display: none; }
.g-station + .g-station::before { content: "\2192"; position: absolute; left: -.4375rem; top: 50%; transform: translate(-50%, -50%); color: var(--accent-2); font-weight: 800; pointer-events: none; }
.g-station.g-in { border-color: var(--accent-2); box-shadow: inset 0 0 0 1px rgba(78, 201, 255, .45); }
.g-station.g-done { border-color: var(--accent); background: rgba(255, 138, 61, .08); }
.g-st-title { color: var(--text); font-size: .9375rem; }
.g-st-info, .g-st-made { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.g-st-made { color: #c3cde2; }
.g-st-bar { display: block; height: .375rem; border-radius: 62.4375rem; background: var(--line); overflow: hidden; }
.g-st-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.g-chain-ctrl { display: flex; flex-wrap: wrap; align-items: end; gap: .625rem; }
.g-chain-ctrl .btn { min-height: 2.75rem; }
.g-field.g-inline { display: inline-grid; }
.g-field.g-inline select { width: auto; min-width: 9rem; }
.g-tool p.g-chain-clock { margin: 0; min-height: 1.5rem; color: #c3cde2; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.g-legend { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .375rem; font-size: .9375rem; color: #c3cde2; }
.g-legend li { display: flex; gap: .625rem; align-items: baseline; }
.g-legend i { flex: 0 0 .75rem; height: .75rem; border-radius: 50%; transform: translateY(.0625rem); }

/* ---------- keyboard map ---------- */
.g-keymap { max-width: 60rem; }
.g-kbwrap { display: grid; gap: 1rem; }
.g-modes { display: flex; flex-wrap: wrap; gap: .5rem; }
.g-mode { min-height: 2.75rem; padding: .5rem 1rem; border-radius: 62.4375rem; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: inherit; font-size: .9375rem; font-weight: 700; cursor: pointer; }
.g-mode:hover { color: var(--text); }
.g-mode[aria-selected="true"] { color: #1a0d02; background: var(--accent); border-color: var(--accent); }
.g-mode:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.g-kb { display: grid; gap: .3125rem; padding: .875rem; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(5, 7, 13, .7); }
.g-kbrow { display: flex; gap: .3125rem; }
.g-kbrow:first-child { margin-bottom: .375rem; }
.g-kgap { flex: 1 1 0; min-width: 0; }
.g-key {
  flex: 1 1 0; min-width: 0; height: 2.625rem; padding: 0 .125rem; border-radius: .4375rem; border: 1px solid var(--line);
  background: linear-gradient(180deg, #121a2c, #0b1120); color: #56627d; font: inherit; font-size: .875rem; font-weight: 700;
  cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: border-color .15s, color .15s, background-color .15s, transform .1s;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .45);
}
.g-key-word { font-size: .75rem; letter-spacing: .02em; }
.g-key.lit { color: var(--text); border-color: rgba(78, 201, 255, .45); background: linear-gradient(180deg, #16304a, #0e1d30); }
.g-key:hover { border-color: var(--accent-2); color: var(--text); }
.g-key.sel { color: #1a0d02; background: var(--accent); border-color: var(--accent); }
.g-key:active { transform: translateY(1px); }
.g-key:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; position: relative; z-index: 1; }
.g-readout { display: flex; gap: 1rem; align-items: flex-start; min-height: 4.5rem; padding: 1rem 1.25rem; border-radius: var(--radius); border: 1px solid rgba(78, 201, 255, .35); background: rgba(78, 201, 255, .06); color: #c3cde2; }
.g-readkey { flex: 0 0 auto; display: inline-grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; padding: 0 .625rem; border-radius: .5rem; background: var(--accent); color: #1a0d02; font: inherit; font-weight: 800; font-size: .9375rem; }
.g-readtext { align-self: center; }
.g-capture { display: grid; gap: .125rem; padding: .875rem 1.25rem; border-radius: var(--radius); border: 1px dashed #2f4270; color: var(--muted); font-size: .875rem; cursor: pointer; user-select: none; transition: border-color .15s, background-color .15s; }
.g-capture b { color: var(--text); font-size: 1rem; }
.g-capture:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-style: solid; border-color: var(--accent-2); background: rgba(78, 201, 255, .05); }
.g-capture.hit { background: rgba(255, 138, 61, .12); border-color: var(--accent); }
.g-kbhint { margin: 0; color: var(--muted); font-size: .875rem; }
.g-alllist { margin-top: 1.25rem; }
.g-alllist > summary { cursor: pointer; color: var(--accent-2); font-weight: 700; list-style: none; min-height: 2.75rem; display: flex; align-items: center; }
.g-alllist > summary::-webkit-details-marker { display: none; }
.g-alllist > summary::before { content: "+"; display: inline-block; width: 1.25rem; color: var(--accent); font-weight: 800; }
.g-alllist[open] > summary::before { content: "\2212"; }
.g-alllist > summary:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.g-ctables { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); margin-top: 1rem; }
.g-ctable { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); font-size: .9375rem; }
.g-ctable caption { text-align: left; font-weight: 700; color: var(--text); padding: 0 0 .5rem; }
.g-ctable th, .g-ctable td { padding: .5rem .875rem; border-top: 1px solid var(--line); vertical-align: top; text-align: left; }
.g-ctable th { color: var(--text); font-weight: 400; white-space: nowrap; width: 1%; }
.g-ctable td { color: #c3cde2; }
kbd { display: inline-block; padding: .0625rem .4375rem; border-radius: .3125rem; border: 1px solid #2f4270; background: #0e1626; color: var(--text); font: inherit; font-size: .875em; font-weight: 700; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .5); }
.g-readout kbd.g-readkey { border: 0; box-shadow: none; }

/* toy console */
.g-console { border-radius: var(--radius); border: 1px solid #3d2d66; background: rgba(6, 4, 14, .92); font: .875rem/1.5 Consolas, "Cascadia Mono", "SFMono-Regular", Menlo, monospace; color: #cfc4ff; overflow: hidden; }
.g-console[hidden] { display: none; }
.g-con-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .375rem .375rem .375rem 1rem; border-bottom: 1px solid #2a2045; color: #8f82c0; font-size: .8125rem; }
.g-con-x { min-height: 2.25rem; padding: .25rem .875rem; border-radius: .5rem; border: 1px solid #3d2d66; background: transparent; color: #cfc4ff; font: inherit; cursor: pointer; }
.g-con-x:hover { border-color: #a463ff; }
.g-con-x:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.g-con-log { max-height: 12rem; overflow-y: auto; padding: .625rem 1rem; }
.g-con-log p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.g-con-log .g-con-echo { color: #8f82c0; }
.g-con-row { display: flex; align-items: center; gap: .5rem; padding: .375rem 1rem .625rem; border-top: 1px solid #2a2045; }
.g-con-prompt { color: #a463ff; font-weight: 700; }
.g-con-in { flex: 1 1 auto; min-width: 0; min-height: 2.5rem; border: 0; background: transparent; color: #f1ecff; font: inherit; font-size: 1rem; }
.g-con-in:focus { outline: none; }
.g-con-row:focus-within { box-shadow: inset 0 0 0 2px rgba(164, 99, 255, .55); }

/* ---------- screenshots ---------- */
.g-shots { display: grid; gap: .875rem; grid-template-columns: repeat(3, 1fr); }
.g-shot { margin: 0; display: flex; flex-direction: column; gap: .4375rem; min-width: 0; }
.g-shot a { position: relative; display: block; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); aspect-ratio: 16 / 9; background: #000; }
.g-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.g-shot a:hover img, .g-shot a:focus-visible img { transform: scale(1.05); }
.g-shot a:hover, .g-shot a:focus-visible { border-color: var(--accent-2); }
.g-shot figcaption { color: var(--muted); font-size: .875rem; }
.g-shot.g-big { grid-column: span 2; grid-row: span 2; }
.g-shot.g-big a { flex: 1 1 auto; aspect-ratio: auto; min-height: 12rem; }
.g-zoomable a { cursor: zoom-in; }
.g-lb .lb-cap { display: block; max-width: 46rem; }
.g-lb .lb-cap b { color: var(--text); }
.g-lb-note { color: #c3cde2; }
@media (max-width: 860px) {
  .g-shots { grid-template-columns: 1fr 1fr; }
  .g-shot.g-big { grid-column: span 2; grid-row: auto; }
  .g-shot.g-big a { aspect-ratio: 16 / 9; min-height: 0; }
}

/* ---------- corners we cut ---------- */
.g-cuts { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.g-cut { padding: 1.125rem 1.25rem; border-radius: var(--radius); border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--panel); }
.g-cut b { display: block; color: var(--text); margin-bottom: .375rem; }
.g-cut p { margin: .25rem 0 0; color: #b6c1d9; font-size: .9375rem; }
.g-cut p span { color: var(--muted); font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; margin-right: .25rem; }
.g-faqmore { margin-top: 1.5rem; color: #c3cde2; }

/* ---------- toast fallback (only used when the shared toast is not on the page) ---------- */
.g-toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: 60; width: max-content; max-width: calc(100% - 2rem); padding: .75rem 1.25rem; border-radius: .875rem; border: 1px solid rgba(164, 99, 255, .6); background: rgba(12, 8, 26, .95); color: #f1ecff; font-size: .9375rem; box-shadow: 0 .75rem 2rem rgba(0, 0, 0, .5); transform: translate(-50%, 1rem); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.g-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- console effects: Creative chip and weather over the page ---------- */
.g-creative { position: fixed; left: 1rem; bottom: 1rem; z-index: 45; padding: .375rem .875rem; border-radius: .5rem; background: rgba(78, 201, 255, .15); border: 1px solid var(--accent-2); color: var(--accent-2); font-weight: 800; letter-spacing: .2em; font-size: .8125rem; }
.g-creative[hidden] { display: none; }
.g-wx { position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0; transition: opacity .6s; }
.g-wx[class*="wx-"] { opacity: 1; }
.g-wx.wx-rain, .g-wx.wx-storm { background: repeating-linear-gradient(105deg, transparent 0 14px, rgba(170, 200, 255, .09) 14px 15px), rgba(20, 30, 50, .08); background-size: 120px 120px, auto; animation: g-fall .5s linear infinite; }
.g-wx.wx-storm { background-color: rgba(5, 8, 16, .28); }
.g-wx.wx-snow { background-image: radial-gradient(circle, rgba(255, 255, 255, .55) 0 1.5px, transparent 2px), radial-gradient(circle, rgba(255, 255, 255, .35) 0 1px, transparent 1.5px); background-size: 90px 90px, 53px 53px; background-position: 0 0, 20px 30px; animation: g-snow 9s linear infinite; }
.g-wx.wx-fog { background: linear-gradient(180deg, rgba(200, 210, 225, .06), rgba(200, 210, 225, .16)); }
.g-wx.wx-dust { background: linear-gradient(180deg, rgba(190, 120, 60, .1), rgba(190, 120, 60, .18)); }
.g-wx.wx-ash { background-image: radial-gradient(circle, rgba(160, 160, 160, .4) 0 1px, transparent 1.5px), linear-gradient(rgba(40, 40, 40, .2), rgba(40, 40, 40, .2)); background-size: 61px 61px, auto; animation: g-snow 16s linear infinite; }
.g-wx.wx-veilstorm { background: radial-gradient(ellipse 70% 40% at 30% 20%, rgba(164, 99, 255, .15), transparent 70%), radial-gradient(ellipse 60% 35% at 75% 70%, rgba(110, 60, 220, .12), transparent 70%); background-size: 200% 200%; animation: g-veil 14s ease-in-out infinite alternate; }
@keyframes g-fall { to { background-position: -30px 120px, 0 0; } }
@keyframes g-snow { to { background-position: 30px 360px, -40px 420px; } }
@keyframes g-veil { from { background-position: 0% 0%, 100% 100%; } to { background-position: 100% 60%, 0% 30%; } }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .g-kb { padding: .5rem; gap: .25rem; }
  .g-kbrow { gap: .1875rem; }
  .g-key { height: 2.25rem; font-size: .75rem; border-radius: .3125rem; }
  .g-key-word { font-size: .5625rem; letter-spacing: 0; }
  .g-out { grid-template-columns: 1fr; gap: .125rem; }
  .g-out dd { margin-bottom: .5rem; }
  .g-ctable th { white-space: normal; }
  .g-readout { gap: .75rem; padding: .875rem 1rem; }
  .g-station + .g-station::before { content: "\2193"; left: 50%; top: -.4375rem; }
}
@media (max-width: 860px) {
  .g-plan-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- reduced motion: no moving weather, no ring, no jump transitions ---------- */
@media (prefers-reduced-motion: reduce) {
  .g-wx, .g-wx[class*="wx-"] { animation: none !important; }
  .g-jumpbar, .g-jumpman, .g-shot img, .g-key, .g-toast, .g-wx, .g-station, .g-chips label { transition: none; }
  .g-shot img, .g-shot a:hover img, .g-shot a:focus-visible img, .g-key:active { transform: none; }
}
@media (forced-colors: active) {
  .g-key.lit { border: 2px solid CanvasText; }
  .g-key.sel { outline: 3px solid Highlight; }
  .g-wx { display: none; }
}
