Client-side optimizer for Neverness to Everness console builds. Imports a gear export from nte-history-exporter, keeps it in IndexedDB, and solves for the best module placement per character or across a team. - domain/: pure ports of the Python research scripts (shapes, cartridges, board tiling, stats, scoring, set bonuses, Arc effects, sheet prediction). No DOM, no storage imports, so they stay worker-safe and Node-testable. - solver/: single-character solve with branch and bound, plus a three-phase team solve (portfolio, leximin, column generation) over disjoint item sets. Runs in a Worker when one can be constructed, inline otherwise. - db/: three storage tiers selected by use rather than feature detection, fail-closed import validation, and undo that restores both sides of a steal. - ui/: React 19 views for items, characters and teams; the board is drawn as the deliverable rather than a score. - Two build targets: a hosted bundle and a single self-contained nte.html with no external requests. Values the model cannot measure are reported as unavailable rather than guessed: cartridge set bonuses, the level 80 base-stat multiplier, and the distinction between "optimal for this packing" and globally optimal. 145 tests, tsc clean, both build targets clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
166 lines
5.7 KiB
CSS
166 lines
5.7 KiB
CSS
:root {
|
|
color-scheme: dark;
|
|
--bg: #14161a;
|
|
--panel: #1c1f26;
|
|
--line: #2c313b;
|
|
--text: #e6e8ec;
|
|
--dim: #9aa2b1;
|
|
--accent: #7aa2f7;
|
|
--warn: #e0af68;
|
|
--bad: #f7768e;
|
|
font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
body {
|
|
margin: 0;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
}
|
|
|
|
.app { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
|
|
|
|
header { display: flex; align-items: baseline; gap: 1.5rem; flex-wrap: wrap; }
|
|
h1 { font-size: 1.1rem; margin: 0 0 1rem; letter-spacing: 0.02em; }
|
|
nav { display: flex; gap: 0.25rem; }
|
|
nav a {
|
|
color: var(--dim);
|
|
text-decoration: none;
|
|
padding: 0.35rem 0.7rem;
|
|
border-radius: 6px;
|
|
text-transform: capitalize;
|
|
}
|
|
nav a:hover { background: var(--panel); color: var(--text); }
|
|
nav a.active { background: var(--panel); color: var(--accent); }
|
|
|
|
.dim { color: var(--dim); }
|
|
.warning { color: var(--warn); }
|
|
.problem { color: var(--bad); }
|
|
.empty { color: var(--dim); padding: 2rem 0; }
|
|
|
|
.filters {
|
|
display: flex;
|
|
gap: 1rem;
|
|
flex-wrap: wrap;
|
|
align-items: flex-end;
|
|
padding: 0.75rem 0 1rem;
|
|
}
|
|
.filters label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.8rem; color: var(--dim); }
|
|
.filters .count { margin-left: auto; font-size: 0.8rem; color: var(--dim); }
|
|
|
|
select, input, button {
|
|
background: var(--panel);
|
|
color: var(--text);
|
|
border: 1px solid var(--line);
|
|
border-radius: 6px;
|
|
padding: 0.35rem 0.5rem;
|
|
font: inherit;
|
|
font-size: 0.85rem;
|
|
}
|
|
button { cursor: pointer; }
|
|
button:disabled { opacity: 0.45; cursor: default; }
|
|
|
|
table.items { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
|
|
table.items th {
|
|
text-align: left;
|
|
color: var(--dim);
|
|
font-weight: 500;
|
|
border-bottom: 1px solid var(--line);
|
|
padding: 0.4rem 0.5rem;
|
|
}
|
|
table.items td { padding: 0.35rem 0.5rem; border-bottom: 1px solid #23262e; }
|
|
table.items .subs { color: var(--dim); font-size: 0.78rem; }
|
|
|
|
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.6rem; }
|
|
.card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.2rem;
|
|
padding: 0.7rem 0.8rem;
|
|
background: var(--panel);
|
|
border: 1px solid var(--line);
|
|
border-radius: 8px;
|
|
text-decoration: none;
|
|
color: inherit;
|
|
font-size: 0.85rem;
|
|
}
|
|
.card:hover { border-color: var(--accent); }
|
|
|
|
.board { display: grid; gap: 0; margin: 1rem 0; width: max-content; }
|
|
.board-cell {
|
|
width: 100%;
|
|
aspect-ratio: 1;
|
|
border-style: solid;
|
|
border-color: #0d0f13;
|
|
border-width: 0;
|
|
}
|
|
.board-cell--blocked { background: #0f1115; border: 1px solid #191c22; }
|
|
|
|
.tooltip {
|
|
background: var(--panel);
|
|
border: 1px solid var(--line);
|
|
border-radius: 8px;
|
|
padding: 0.6rem 0.8rem;
|
|
font-size: 0.82rem;
|
|
width: max-content;
|
|
}
|
|
.tooltip ul { margin: 0.3rem 0 0; padding-left: 1.1rem; color: var(--dim); }
|
|
|
|
.team { list-style: decimal; padding-left: 1.4rem; }
|
|
.team li { padding: 0.3rem 0; display: flex; gap: 0.6rem; align-items: center; cursor: grab; }
|
|
.actions { display: flex; gap: 0.5rem; margin: 1rem 0; }
|
|
|
|
.assignment { padding: 0.35rem 0; border-bottom: 1px solid #23262e; font-size: 0.9rem; }
|
|
.unidentified { margin-bottom: 1.5rem; }
|
|
.group { display: flex; gap: 0.8rem; align-items: center; padding: 0.3rem 0; font-size: 0.85rem; }
|
|
.todo { margin: 0.5rem 0 1rem; color: var(--dim); font-size: 0.85rem; }
|
|
|
|
.data { margin: 1rem 0 2rem; padding: 0.9rem 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
|
|
.data h2 { font-size: 0.9rem; margin: 0 0 0.6rem; color: var(--dim); font-weight: 500; }
|
|
.review { margin-top: 0.8rem; padding: 0.8rem; border: 1px solid var(--line); border-radius: 6px; font-size: 0.85rem; }
|
|
.review ul { margin: 0.4rem 0; padding-left: 1.1rem; font-size: 0.8rem; }
|
|
|
|
.targets { margin: 0.8rem 0; font-size: 0.85rem; }
|
|
.targets summary { cursor: pointer; color: var(--dim); }
|
|
.target-row { display: flex; gap: 0.4rem; align-items: center; padding: 0.2rem 0; }
|
|
.target-row input { width: 6rem; }
|
|
.arc { display: inline-flex; flex-direction: column; gap: 0.25rem; font-size: 0.8rem; color: var(--dim); margin-top: 0.6rem; }
|
|
|
|
.bar { width: 140px; height: 8px; background: #23262e; border-radius: 4px; overflow: hidden; }
|
|
.bar div { height: 100%; background: var(--accent); }
|
|
.result { margin-top: 1rem; }
|
|
|
|
.icon { border-radius: 6px; object-fit: cover; background: #0f1115; flex: none; }
|
|
.icon--fallback {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 0.8rem;
|
|
color: var(--dim);
|
|
border: 1px solid var(--line);
|
|
}
|
|
.card-head { display: flex; align-items: center; gap: 0.6rem; }
|
|
|
|
.arc-row { display: flex; gap: 1rem; align-items: flex-end; margin-top: 0.6rem; }
|
|
.arc-row input { width: 5rem; }
|
|
|
|
.toggle { display: flex; gap: 0.5rem; align-items: center; font-size: 0.85rem; margin: 0.8rem 0 0; }
|
|
|
|
.row--clickable { cursor: pointer; }
|
|
.row--clickable:hover td { background: #1a1d24; }
|
|
.row--editing td { background: #1a1d24; }
|
|
.editor { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: flex-end; padding: 0.6rem 0; }
|
|
.editor label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.75rem; color: var(--dim); }
|
|
.editor input { width: 6rem; }
|
|
.editor p { flex-basis: 100%; margin: 0 0 0.2rem; font-size: 0.78rem; }
|
|
|
|
.sheet table { max-width: 560px; }
|
|
.sheet input { width: 7rem; }
|
|
.row--drifted td { background: #2a2318; }
|
|
|
|
.source-toggle { display: flex; gap: 0.4rem; align-items: center; margin-top: 0.8rem; }
|
|
.source-toggle button.active { border-color: var(--accent); color: var(--accent); }
|
|
|
|
.boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; }
|
|
.boards .assignment { border: 1px solid var(--line); border-radius: 8px; padding: 0.7rem 0.8rem; background: var(--panel); }
|