/* Adaptive Loop — dark laboratory glass aesthetic. Procedural SVG/CSS only. */ :root { --bg: #0a0e14; --bg-2: #11161f; --panel: #141b26; --ink: #e6edf3; --muted: #8b98a9; --accent: #5cc8ff; --accent-2: #b98cff; --ok: #7bd389; --bad: #ff6b6b; --warn: #ffb45c; --line: #243042; --producer: #7bd389; --grazer: #ffb45c; --phage: #ff8aa8; --radius: 10px; } * { box-sizing: border-box; } html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 16px; line-height: 1.4; } #app { min-height: 100vh; display: flex; flex-direction: column; } h1, h2 { margin: 0 0 0.3em; line-height: 1.15; } h1 { font-size: 1.35rem; } h2 { font-size: 1.05rem; } .muted { color: var(--muted); } .small { font-size: 0.8rem; } .ok { color: var(--ok); } .bad { color: var(--bad); } .skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--accent); color: #001019; padding: 0.5rem 0.8rem; border-radius: 0 0 var(--radius) 0; } .skip-link:focus { left: 0; } .visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; } :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; } button { font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.5rem 0.8rem; cursor: pointer; min-height: 40px; } button:hover:not(:disabled) { border-color: var(--accent); } button:disabled { opacity: 0.45; cursor: not-allowed; } button.primary { background: var(--accent); color: #001019; border-color: var(--accent); font-weight: 600; } button.primary:hover:not(:disabled) { background: #7fd4ff; } button.link { background: transparent; border: none; color: var(--accent); min-height: auto; padding: 0.3rem; } /* ── topbar ─────────────────────────────────────── */ .topbar { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.7rem 1rem; background: var(--bg-2); border-bottom: 1px solid var(--line); flex-wrap: wrap; } .topbar-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; } details.legend { position: relative; } details.legend summary { cursor: pointer; padding: 0.3rem 0.6rem; border: 1px solid var(--line); border-radius: var(--radius); min-height: 40px; display: flex; align-items: center; } details.legend[open] summary { border-color: var(--accent); } details.legend .legend-body, details.legend p { max-width: 60ch; } /* ── layout ─────────────────────────────────────── */ .layout { flex: 1; display: grid; gap: 0.8rem; padding: 0.8rem; grid-template-columns: 17rem 1fr 19rem; align-items: start; } .rail { display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; } .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.7rem 0.8rem; } .panel h2 { color: var(--accent); } .objective-text { margin: 0.2em 0 0.6em; } .stat { margin: 0.2em 0; } .board-wrap { display: flex; align-items: flex-start; justify-content: center; } #board { width: 100%; max-width: 520px; height: auto; } /* ── board svg ──────────────────────────────────── */ .ring { opacity: 0.9; } .chamber-bg { fill: #0d131c; stroke: var(--line); stroke-width: 2; } .chamber { transition: transform 0.2s ease; } .chamber text { text-anchor: middle; font-size: 11px; fill: var(--ink); } .pops { font-size: 12px; font-weight: 600; } .pop-producer { fill: var(--producer); } .pop-grazer { fill: var(--grazer); } .pop-phage { fill: var(--phage); } .res { fill: var(--muted); font-size: 9.5px; } .slot-label { fill: var(--muted); font-size: 9px; } .fx-glyph { fill: var(--warn); font-size: 11px; } .delta { fill: var(--accent); font-size: 10px; font-weight: 700; } .flow-dot { fill: var(--accent); opacity: 0.5; } /* ── controls ───────────────────────────────────── */ .rotate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; margin-bottom: 0.6rem; } .rotate-btn { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; font-size: 1.1rem; padding: 0.6rem 0.3rem; } .rotate-btn .loop-tag { font-weight: 700; font-size: 0.8rem; } .rotate-btn.selected { border-color: var(--accent); background: #16202c; box-shadow: 0 0 0 2px var(--accent) inset; } .commit-row { display: flex; gap: 0.5rem; } .commit-row button { flex: 1; } /* ── pressures panel ────────────────────────────── */ .prow { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; margin: 0.2em 0; } .pline { font-size: 0.85rem; } .pcells { display: flex; gap: 0.3rem; } .pcell { display: inline-flex; align-items: center; gap: 2px; padding: 1px 5px; border-radius: 6px; border: 1px solid var(--line); font-size: 0.8rem; background: #0d131c; } .pcell.adapted { border-color: var(--ok); background: #0f1a14; } .pglyph { color: var(--pc, var(--ink)); } .pval { font-variant-numeric: tabular-nums; } .tick { color: var(--ok); } /* ── events ─────────────────────────────────────── */ .events { max-height: 240px; overflow-y: auto; font-size: 0.85rem; } .events .ev { margin: 0.15em 0; padding-left: 0.3em; border-left: 2px solid var(--line); } .ev .ev-kind { color: var(--accent); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; } .ev-outcome { border-left-color: var(--ok); font-weight: 600; } /* ── menu screens ───────────────────────────────── */ .menu { padding: 1.2rem; max-width: 60ch; margin: 0 auto; } .menu-buttons { display: flex; flex-direction: column; gap: 0.6rem; margin: 1rem 0; max-width: 24rem; } .lede { color: var(--ink); } .scenario-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; } .scenario-pick { text-align: left; width: 100%; } .legend-static p { margin: 0.4em 0; } .sp { white-space: nowrap; } .sp.producer { color: var(--producer); } .sp.grazer { color: var(--grazer); } .sp.phage { color: var(--phage); } .status { padding: 0.4rem 1rem; background: var(--bg-2); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; min-height: 1.6em; } /* ── responsive ─────────────────────────────────── */ @media (max-width: 920px) { .layout { grid-template-columns: 1fr; } .board-wrap { order: -1; } #board { max-width: 420px; } } @media (max-width: 410px) { .topbar { padding: 0.5rem; } .layout { padding: 0.4rem; gap: 0.5rem; } .panel { padding: 0.5rem; } h1 { font-size: 1.1rem; } .rotate-btn { font-size: 0.95rem; padding: 0.5rem 0.2rem; } #board { max-width: 100%; } } @media (min-resolution: 1.9dppx) { .pops { font-size: 13px; } .res, .slot-label, .delta { font-size: 10.5px; } button { min-height: 44px; } } /* ── reduced motion ─────────────────────────────── */ @media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } .chamber { transition: none; } }