@font-face { font-family: 'VT323'; src: url('../assets/fonts/vt323-400.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Press'; src: url('../assets/fonts/pressstart2p-400.woff2') format('woff2'); font-display: swap; }
:root {
--ink: #15121e;
--ink2: #221d30;
--ink3: #332c47;
--line: #4d4366;
--text: #f0e9dc;
--dim: #b4a9c4;
--gold: #e8b64c;
--gold2: #ffdf8a;
--ember: #e8622c;
--red: #e0505c;
--ice: #7cc8ee;
--mono: ui-monospace, 'DejaVu Sans Mono', Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--ink); color: var(--text); }
body { font: 400 22px/1.25 'VT323', var(--mono); -webkit-font-smoothing: none; overflow-x: hidden; }
canvas { image-rendering: pixelated; }
h1, h2, h3, h4, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold2); outline-offset: 2px; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
#app { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 16px; }
.screen { width: 100%; max-width: 1120px; display: flex; flex-direction: column; align-items: center; gap: 16px; animation: rise .25s steps(5); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
#s-menu { min-height: calc(100vh - 32px); justify-content: center; gap: 12px; }
.logo { line-height: 0; }
#logo { display: block; max-width: 100%; height: auto; }
.tagline { font: 12px/1.6 'Press', var(--mono); color: var(--gold2); text-shadow: 2px 2px 0 var(--ink); text-align: center; margin-bottom: 18px; }
.menu { display: flex; flex-direction: column; gap: 12px; width: min(420px, 100%); }
.menu-btn {
display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left;
padding: 14px 18px; background: rgba(21, 18, 30, .88); border: 0; color: var(--text);
box-shadow: inset 0 0 0 3px var(--line), 0 4px 0 var(--ink);
}
.menu-btn b { font: 14px/1.3 'Press', var(--mono); }
.menu-btn small { font-size: 20px; color: var(--dim); }
.menu-btn:hover, .menu-btn:focus-visible { box-shadow: inset 0 0 0 3px var(--gold), 0 4px 0 var(--ink); transform: translateX(4px); }
.menu-btn.primary { background: #4a2414; box-shadow: inset 0 0 0 3px var(--ember), 0 4px 0 var(--ink); }
.menu-btn.primary b { color: var(--gold2); }
.menu-btn.primary small { color: #f0c8a8; }
.menu-btn.primary:hover, .menu-btn.primary:focus-visible { box-shadow: inset 0 0 0 3px var(--gold2), 0 4px 0 var(--ink); }
.chip { margin-top: 12px; padding: 6px 12px; background: rgba(21, 18, 30, .88); box-shadow: inset 0 0 0 2px var(--line); color: var(--dim); text-align: center; }
.chip b { color: var(--gold2); font-weight: 400; }
.bar { width: 100%; display: flex; align-items: center; gap: 16px; padding: 4px 48px 4px 0; }
.bar h2 { font: 16px/1.3 'Press', var(--mono); color: var(--gold2); text-shadow: 2px 2px 0 var(--ink); }
.back { flex: none; background: rgba(21, 18, 30, .88); border: 0; padding: 6px 12px; box-shadow: inset 0 0 0 2px var(--line); }
.back:hover { box-shadow: inset 0 0 0 2px var(--gold); }
.icon-btn { position: fixed; top: 12px; right: 12px; z-index: 5; width: 36px; height: 36px; background: rgba(21, 18, 30, .88); border: 0; box-shadow: inset 0 0 0 2px var(--line); }
.icon-btn.off { color: var(--line); text-decoration: line-through; }
.panel { width: 100%; background: rgba(21, 18, 30, .93); padding: 16px; box-shadow: inset 0 0 0 3px var(--line), inset 0 0 0 5px var(--ink), 0 4px 0 rgba(0, 0, 0, .5); }
.panel h4 { font: 11px/1.4 'Press', var(--mono); color: var(--gold); margin-bottom: 12px; }
.narrow { max-width: 560px; display: flex; flex-direction: column; gap: 14px; }
.center { align-items: center; text-align: center; }
.lead { color: var(--text); }
.note { color: var(--dim); font-size: 20px; margin-bottom: 10px; }
.btn { background: var(--ink3); border: 0; padding: 8px 14px; box-shadow: inset 0 0 0 2px var(--line), 0 3px 0 var(--ink); }
.btn:hover:not(:disabled) { box-shadow: inset 0 0 0 2px var(--gold), 0 3px 0 var(--ink); }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 0 0 2px var(--gold); }
.btn.primary { background: #7a3314; box-shadow: inset 0 0 0 2px var(--ember), 0 3px 0 var(--ink); color: #fff1dc; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.big { width: 100%; padding: 12px; font: 12px/1.4 'Press', var(--mono); }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.tabs { display: flex; gap: 6px; }
.tab { flex: 1; background: var(--ink2); border: 0; padding: 8px; color: var(--dim); box-shadow: inset 0 0 0 2px var(--ink3); }
.tab.on { background: var(--ink3); color: var(--gold2); box-shadow: inset 0 0 0 2px var(--gold); }
#tab-new, #tab-load { display: flex; flex-direction: column; gap: 14px; }
.gender { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.gender legend { padding: 0 0 8px; color: var(--gold); }
.gender label { flex: 1 1 130px; }
.gender input { position: absolute; opacity: 0; }
.gender span { display: block; text-align: center; padding: 8px; background: var(--ink2); box-shadow: inset 0 0 0 2px var(--ink3); cursor: pointer; }
.gender input:checked + span { background: #4a2414; color: var(--gold2); box-shadow: inset 0 0 0 2px var(--ember); }
.gender input:focus-visible + span { outline: 3px solid var(--gold2); outline-offset: 2px; }
.field { display: flex; flex-direction: column; gap: 6px; color: var(--gold); }
.field textarea { width: 100%; resize: vertical; background: var(--ink); color: var(--text); border: 0; padding: 10px; box-shadow: inset 0 0 0 2px var(--line); font: 15px/1.4 var(--mono); word-break: break-all; }
.field textarea:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--gold); }
.error { color: #ff9aa2; }
.anvil-wrap { width: 100%; max-width: 760px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
#anvil { width: 100%; max-width: 760px; aspect-ratio: 16 / 9; background: var(--ink); box-shadow: 0 0 0 3px var(--line), 0 0 0 5px var(--ink); cursor: crosshair; touch-action: none; }
.meter { width: 100%; height: 22px; background: var(--ink); box-shadow: inset 0 0 0 2px var(--line); padding: 4px; }
.meter i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--ember) 0 10px, var(--gold) 10px 20px); }
.hint { text-align: center; text-shadow: 2px 2px 0 var(--ink); }
.pool { font: 13px/1.3 var(--mono); color: var(--gold); background: rgba(21, 18, 30, .88); padding: 6px 10px; max-width: 100%; overflow-wrap: anywhere; text-align: center; }
.sheet { width: 100%; display: grid; grid-template-columns: 320px 1fr 1fr; gap: 12px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.wide { grid-column: 1 / -1; }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
#hero { max-width: 100%; height: auto; background: linear-gradient(#2b2540 0 70%, #1d192b 70%); box-shadow: inset 0 0 0 2px var(--ink3); }
#c-name { font: 13px/1.5 'Press', var(--mono); color: var(--gold2); margin-top: 6px; overflow-wrap: anywhere; }
.sub { color: var(--text); }
.seal { font-size: 20px; }
.lore { color: var(--dim); font-size: 20px; }
.attrs { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.attrs li { display: grid; grid-template-columns: 112px 1fr 26px; gap: 8px; align-items: center; }
.attrs .bar-a { height: 12px; background: var(--ink3); }
.attrs .bar-a i { display: block; height: 100%; background: var(--c); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25); }
.attrs b { font-weight: 400; text-align: right; color: var(--gold2); }
.law { color: var(--dim); font-size: 19px; margin: 12px 0 10px; }
.law b { color: var(--gold2); font-weight: 400; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stats div { background: var(--ink2); padding: 4px 8px; display: flex; flex-direction: column; }
.stats span { color: var(--dim); font-size: 18px; }
.stats b { font-weight: 400; color: var(--text); }
.gear { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; }
.gear dt { color: var(--dim); }
.gear dd { margin: 0; }
.skills { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.skills li { padding-left: 10px; box-shadow: inset 3px 0 0 var(--c); }
.skills b { font-weight: 400; color: var(--text); }
.skills small { display: block; color: var(--c); font-size: 18px; }
.skills p { color: var(--dim); font-size: 19px; }
.genome { display: flex; flex-wrap: wrap; font: 16px/1.5 var(--mono); margin-bottom: 10px; }
.genome span { padding: 2px 3px; color: var(--ink); background: var(--c); cursor: help; }
.genome span.dim, .genes button.dim { opacity: .3; }
.genes { display: flex; flex-wrap: wrap; gap: 6px; }
.genes button { background: var(--ink2); border: 0; padding: 2px 8px; box-shadow: inset 3px 0 0 var(--c); font-size: 19px; text-align: left; }
.genes em { font-style: normal; color: var(--dim); }
.addr { margin-top: 10px; color: var(--dim); overflow-wrap: anywhere; }
.addr code { font: 15px var(--mono); color: var(--text); }
.danger { box-shadow: inset 0 0 0 3px var(--red), inset 0 0 0 5px var(--ink), 0 4px 0 rgba(0, 0, 0, .5); display: flex; flex-direction: column; gap: 12px; }
.danger h4 { color: #ff9aa2; margin: 0; }
.warn b { color: #ff9aa2; font-weight: 400; }
.keybox { background: var(--ink); padding: 12px; display: flex; flex-direction: column; gap: 12px; box-shadow: inset 0 0 0 2px var(--ink3); }
#c-wif { font: 15px/1.5 var(--mono); overflow-wrap: anywhere; color: var(--gold2); }
#c-wif.masked { color: var(--line); letter-spacing: 1px; }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--ember); flex: none; }
#soon-hero { width: 192px; height: 240px; }
#soon-name { font: 12px/1.5 'Press', var(--mono); color: var(--gold2); }
.field input, .field select { width: 100%; background: var(--ink); color: var(--text); border: 0; padding: 8px 10px; box-shadow: inset 0 0 0 2px var(--line); }
.field input:focus, .field select:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--gold); }
.room-tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; }
.room-tools .note { margin: 0; }
.table-wrap { overflow-x: auto; }
.rooms { width: 100%; border-collapse: collapse; }
.rooms th { text-align: left; color: var(--gold); font-weight: 400; padding: 4px 8px; white-space: nowrap; }
.rooms td { padding: 5px 8px; border-top: 2px solid var(--ink3); white-space: nowrap; }
.rooms tbody tr:hover { background: var(--ink2); }
.rooms .ping { color: var(--dim); }
.rooms .ping.good { color: #70f090; }
.rooms .ping.mid { color: var(--gold2); }
.rooms .ping.bad { color: #ff9aa2; }
.banner { background: rgba(21, 18, 30, .88); padding: 6px 12px; margin: 0; text-align: center; }
.teams { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.team ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; min-height: 60px; }
.team.t0 h4 { color: #80b8f0; }
.team.t1 h4 { color: #f08878; }
.team li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--ink2); padding: 4px 8px; }
.team li canvas { width: 36px; height: 45px; flex: none; }
.team .who { flex: 1 1 110px; min-width: 0; }
.team .who small { display: block; color: var(--dim); font-size: 18px; }
.mini { display: flex; gap: 4px; flex-wrap: wrap; }
.mini button { background: var(--ink3); border: 0; padding: 0 6px; font-size: 18px; box-shadow: inset 0 0 0 1px var(--line); }
.mini button:hover { box-shadow: inset 0 0 0 1px var(--gold); }
.mini button.bad { color: #ff9aa2; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; align-items: end; margin-bottom: 12px; }
.timer { margin-left: auto; font: 16px 'Press', var(--mono); color: var(--gold2); text-shadow: 2px 2px 0 var(--ink); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.shop-item { display: flex; flex-direction: column; gap: 2px; text-align: left; background: var(--ink2); border: 0; padding: 8px 10px; box-shadow: inset 3px 0 0 var(--c); }
.shop-item:hover:not(:disabled) { background: var(--ink3); }
.shop-item:disabled { opacity: .45; cursor: not-allowed; }
.shop-item small { color: var(--dim); font-size: 18px; }
.shop-item em { font-style: normal; color: var(--gold2); font-size: 19px; }
.bag { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.slot { position: relative; aspect-ratio: 1; min-height: 44px; background: var(--ink2); border: 0; padding: 2px; box-shadow: inset 0 0 0 2px var(--ink3); font-size: 17px; line-height: 1; overflow: hidden; }
.slot b { position: absolute; left: 3px; top: 2px; font-weight: 400; font-size: 15px; color: var(--dim); }
.slot i { position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%); width: 18px; height: 18px; background: var(--c); box-shadow: inset -3px -3px 0 rgba(0,0,0,.3), inset 2px 2px 0 rgba(255,255,255,.3); }
.slot u { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(21, 18, 30, .75); color: var(--gold2); text-decoration: none; font-size: 20px; }
.wide-screen { max-width: 1280px; gap: 6px; }
.battle-top { width: 100%; display: flex; justify-content: space-between; padding-right: 48px; text-shadow: 2px 2px 0 var(--ink); }
#arena { width: 100%; max-height: calc(100vh - 200px); aspect-ratio: 16 / 9; object-fit: contain; background: var(--ink); box-shadow: 0 0 0 3px var(--line); }
.hud { width: 100%; background: rgba(21, 18, 30, .93); padding: 8px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 6px 12px; align-items: center; }
.hud .note { grid-column: 1 / -1; margin: 0; font-size: 18px; text-align: center; }
.hud .items { grid-column: 1 / -1; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.res { position: relative; height: 18px; background: var(--ink3); margin-bottom: 4px; overflow: hidden; }
.res i { display: block; height: 100%; }
.res span { position: absolute; inset: 0; text-align: center; font-size: 17px; line-height: 18px; text-shadow: 1px 1px 0 var(--ink); }
.res.hp i { background: #d84858; }
.res.mp i { background: #4888e0; }
.res.mp.fol i { background: #58b858; }
.keys { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.keys .slot { aspect-ratio: auto; height: 46px; min-height: 0; color: var(--text); text-align: center; padding: 16px 2px 0; }
@media (max-width: 960px) {
.sheet { grid-template-columns: 1fr 1fr; }
.hero { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
body { font-size: 21px; }
.sheet { grid-template-columns: minmax(0, 1fr); }
.tagline { font-size: 10px; }
.bar h2 { font-size: 12px; }
.stats { grid-template-columns: repeat(2, 1fr); }
.teams, .admin-grid { grid-template-columns: minmax(0, 1fr); }
.bag { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.genome { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
.screen { animation: none; }
.menu-btn:hover { transform: none; }
}
