:root { --bg: #1c1f29; --card: #262a36; --ink: #f3efe8; --muted: #a9adb8; --accent: #e08868; --blue: #4f86b8; --red: #c4553a; --ok: #6fae7c; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 640px; margin: 0 auto; padding: 18px 16px 60px; }
h1 { font: 700 30px/1.15 Georgia, serif; margin: 8px 0 6px; }
h2 { font: 700 22px/1.2 Georgia, serif; margin: 4px 0 10px; }
.kicker { color: var(--accent); letter-spacing: .12em; font-size: 12px; text-transform: uppercase; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--card); border-radius: 14px; padding: 14px 16px; margin: 12px 0; }
.adv { margin: 6px 0; }
.adv b { color: var(--muted); font-weight: 600; }
button.opt { display: block; width: 100%; text-align: left; background: #f3efe8; color: #1c1f29; border: 0; border-radius: 12px; padding: 12px 14px; margin: 8px 0; font-size: 16px; cursor: pointer; }
button.opt:hover { background: #fff; }
button.opt .hint { display: block; color: #555b66; font-size: 13px; margin-top: 2px; }
button.opt.locked { background: #3a3f4c; color: var(--muted); cursor: not-allowed; }
button.main { background: var(--accent); color: #1c1f29; border: 0; border-radius: 12px; padding: 12px 18px; font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 8px; }
button.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-size: 14px; text-decoration: underline; }
.bars { display: grid; grid-template-columns: 110px 1fr; gap: 6px 10px; align-items: center; font-size: 14px; }
.bar { height: 8px; background: #3a3f4c; border-radius: 4px; position: relative; overflow: hidden; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--red); border-radius: 4px; }
.bar.edge i { background: #f0c24b; }
.dice { font-variant-numeric: tabular-nums; }
.tag { display: inline-block; font-size: 11px; border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }
.tag.fact { background: #2f5d3a; } .tag.analog { background: #5b4a24; } .tag.assumption { background: #4a3a52; }
.report { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 12px; font-size: 14px; }
.report .h { color: var(--muted); font-size: 12px; }
.galina { border-left: 3px solid var(--blue); padding-left: 12px; }
.stripe { display: flex; gap: 3px; margin: 8px 0; } .stripe span { width: 18px; height: 18px; border-radius: 3px; background: #3a3f4c; } .stripe span.m { background: var(--blue); } .stripe span.d { background: var(--accent); }
table.rt { width: 100%; border-collapse: collapse; font-size: 14px; } table.rt td, table.rt th { padding: 5px 4px; border-bottom: 1px solid #343846; text-align: left; vertical-align: top; } table.rt th { color: var(--muted); font-weight: 500; font-size: 12px; }
canvas { width: 100%; border-radius: 12px; margin-top: 8px; }
.ev { margin: 8px 0; } .ev .y { color: var(--accent); font-weight: 600; margin-right: 6px; }
a { color: var(--accent); }
.warn { border: 1px solid #6b4d2a; background: #2e271d; }
.bar.blue i { background: var(--blue); }
.eff { margin: 8px 0 10px; }
details summary { cursor: pointer; color: var(--accent); }
details { margin-top: 2px; }
canvas { width: 100%; height: auto; }
.forces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0 12px; font-size: .8em; }
.force .bar { position: relative; } .force .bar::before, .force .bar::after { content: ''; position: absolute; top: 0; bottom: 0; width: 1px; background: currentColor; opacity: .4; }
.force .bar::before { left: 15%; } .force .bar::after { left: 85%; } .force.edge { color: #f0c24b; font-weight: 600; }
.opt .dots { float: right; } .opt .dots i { display: inline-block; width: 6px; height: 6px; margin-left: 4px; border-radius: 50%; border: 1px solid currentColor; opacity: .35; }
.opt .dots i.on { background: currentColor; opacity: .8; } .opt .dots i.big { width: 10px; height: 10px; background: currentColor; opacity: 1; }
.opt .risk { display: block; color: #b9541f; font-size: .85em; margin-top: 4px; } .opt .for { display: block; font-size: .75em; opacity: .6; }
.opt.locked { opacity: .55; } .adv.yes { font-style: italic; opacity: .7; } .adv.odds { font-size: .9em; border-left: 3px solid #b9541f; padding-left: 8px; }
.die { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; } .die i { width: 30px; height: 14px; border: 1px solid #999; border-radius: 7px; opacity: .5; }
.die i.on { background: var(--accent); border-color: var(--accent); opacity: 1; transform: scale(1.15); } .die .lo, .die .hi { font-size: .75em; opacity: .6; } .die b { flex-basis: 100%; margin-top: 4px; }
.eff .up { color: #7cc48a; } .eff .down { color: #e0705a; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .tile { display: grid; padding: 8px; border: 1px solid #3a3f4c; border-radius: 6px; } .tile b { font-size: 1.6em; }
.row { display: flex; gap: 8px; margin: 8px 0; } .row button, #same { background: #3a3f4c; color: var(--ink); border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer; margin-top: 8px; }
