:root { --bg: #111714; --panel: #1b2420; --ink: #f0f1df; --muted: #98a29a; --line: rgba(216, 230, 203, .14); --lime: #c7ed83; --orange: #ed9462; }
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--bg); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; -webkit-font-smoothing: antialiased; }
body::before { content: ''; position: fixed; z-index: -1; inset: 0; pointer-events: none; background: radial-gradient(circle at 85% 0, rgba(141,174,94,.14), transparent 35%); }
.board { width: min(100% - 24px, 760px); min-height: 100svh; margin: auto; padding: max(12px, env(safe-area-inset-top)) max(0px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.board-settings { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mode-toggle, .tr-control { display: flex; align-items: center; min-height: 38px; border: 1px solid var(--line); border-radius: 3px; background: rgba(255,255,255,.025); }
.mode-button, .tr-button { min-height: 36px; border: 0; color: var(--muted); background: transparent; cursor: pointer; font: 600 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.mode-button { padding: 0 10px; }
.mode-button[aria-pressed="true"] { color: #152014; background: var(--lime); }
.mode-button:focus-visible, .tr-button:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--lime); outline-offset: 1px; }
.tr-control { padding-left: 9px; }
.tr-label { color: var(--orange); font-size: 10px; font-weight: 700; }
.tr-button { width: 34px; color: var(--ink); font-size: 18px; }
.tr-button:hover { color: var(--lime); }
.tr-value { min-width: 28px; color: var(--ink); text-align: center; font-size: 15px; }
.board-actions { display: flex; gap: 8px; }
.board-actions button { min-height: 44px; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; font: 600 12px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; transition: transform .12s, background .15s, border-color .15s; }
.board-actions button:active { transform: scale(.97); }
.board-actions button:focus-visible, .step-button:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.advance-button { flex: 1; color: #152014; background: var(--lime); border-color: var(--lime) !important; }
.advance-button:hover { background: #dbf9a1; }
.reset-button { width: 70px; color: var(--muted); background: transparent; }
.reset-button:hover { color: var(--ink); border-color: rgba(240,241,223,.4); }
.resource-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.resource-row { min-width: 0; padding: 12px 7px 8px; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--icon); border-radius: 3px; text-align: center; }
.resource-icon { width: 36px; height: 36px; margin: 0 auto 7px; display: grid; place-items: center; border-radius: 50%; color: var(--icon); background: var(--icon-bg); font: 19px Georgia, serif; }
.resource-name { overflow: hidden; margin: 0 0 8px; color: var(--muted); font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; white-space: nowrap; }
.resource-values { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.resource-value { padding: 6px 2px 5px; }
.resource-value + .resource-value { border-left: 1px solid var(--line); }
.value-label { display: block; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .03em; }
.value-number { display: block; margin-top: 3px; font-size: 17px; line-height: 1; }
.production-value { color: var(--orange); }
.resource-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.control { display: grid; gap: 4px; }
.control-label { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.stepper { display: flex; gap: 3px; }
.step-button { width: 100%; min-width: 0; height: 44px; padding: 0; border: 1px solid rgba(240,241,223,.24); border-radius: 3px; color: var(--ink); background: rgba(255,255,255,.025); cursor: pointer; font: 21px/1 system-ui, sans-serif; touch-action: manipulation; transition: transform .1s, background .15s, border-color .15s, color .15s; }
.step-button:hover, .step-button:focus-visible { color: var(--lime); border-color: var(--lime); background: rgba(199,237,131,.08); }
.production .step-button:hover, .production .step-button:focus-visible { color: var(--orange); border-color: var(--orange); background: rgba(237,148,98,.08); }
.step-button:active { transform: scale(.93); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (orientation: landscape) and (min-width: 560px) { .board { width: min(100% - 24px, 760px); padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: max(8px, env(safe-area-inset-bottom)); gap: 8px; } .resource-list { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; } .resource-row { padding: 10px 5px 7px; } .resource-icon { margin-bottom: 5px; } .resource-name { margin-bottom: 6px; } .resource-values { margin-bottom: 6px; } .resource-value { padding: 5px 1px 4px; } .value-number { font-size: 16px; } .control-label { font-size: 7px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }
