:root {
  --bg: #050406;
  --win: #0c0a0e;
  --win-2: #141117;
  --edge: #f1eadf;
  --edge-2: #4a4350;
  --line: rgba(241, 234, 223, 0.12);
  --text: #f1eadf;
  --text-2: #c4bbb0;
  --text-3: #8a8178;
  --accent: #ff8a3d;
  --accent-2: #c4602a;
  --accent-soft: rgba(255, 138, 61, 0.14);
  --good: #3ef0a0;
  --bad: #ff5a50;
  --pixel: 'Press Start 2P', ui-monospace, monospace;
  --term: 'VT323', ui-monospace, Menlo, monospace;
  --mono: 'VT323', ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --top: 56px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  background-image: radial-gradient(rgba(241,234,223,.05) 1px, transparent 1px);
  background-size: 6px 6px;
  color: var(--text);
  font: 20px/1.25 var(--term);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
code { font-family: var(--term); font-size: 1em; color: var(--text-2); }
[hidden] { display: none !important; }
.muted { color: var(--text-3); }
.small { font-size: 17px; }
.mono { font-family: var(--term); }
.strong { color: var(--text); }
.label { font: 8px/1.4 var(--pixel); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* ---------- windows: black boxes with a chunky light border ---------- */
.win {
  position: relative; min-width: 0;
  background: var(--win);
  border: 3px solid var(--edge);
  box-shadow: inset 0 0 0 3px var(--win), inset 0 0 0 4px var(--edge-2), 6px 6px 0 rgba(0,0,0,.7);
  padding: 20px 16px 14px;
}
.win > h3 {
  position: absolute; top: -9px; left: 12px; margin: 0; padding: 2px 8px;
  background: var(--win); font: 10px/1.2 var(--pixel); color: var(--accent); letter-spacing: .06em;
}

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20; height: var(--top);
  display: flex; align-items: center; gap: 22px; padding: 0 20px;
  background: var(--win); border-bottom: 3px solid var(--edge);
}
.brand { display: flex; align-items: center; gap: 10px; font: 13px var(--pixel); color: var(--text); }
.brand img { width: 28px; height: 28px; image-rendering: pixelated; display: block; }
.top nav { display: flex; gap: 2px; margin-left: 8px; overflow-x: auto; scrollbar-width: none; }
.top nav a { position: relative; padding: 8px 10px 8px 22px; font: 9px var(--pixel); text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.top nav a:hover { color: var(--text); }
.top nav a.on { color: var(--text); }
.top nav a.on::before, .top nav a:hover::before { content: ''; position: absolute; left: 8px; top: 50%; margin-top: -5px; border: 5px solid transparent; border-left: 7px solid var(--accent); border-right: 0; }
.top nav a.on::before { animation: cursor 1s steps(2) infinite; }
@keyframes cursor { 50% { opacity: 0; } }
.conn { margin-left: auto; display: flex; align-items: center; gap: 8px; font: 8px var(--pixel); color: var(--text-3); }
.conn i { width: 8px; height: 8px; background: var(--text-3); }
.conn.live i { background: var(--good); }
.conn.down i { background: var(--bad); }

/* ---------- mine view ---------- */
.view { position: relative; z-index: 2; }
.view.mine {
  height: calc(100vh - var(--top)); min-height: 640px; padding: 22px 20px 20px;
  display: grid; gap: 22px 22px;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-rows: minmax(0, 1fr) auto auto;
  grid-template-areas: "screen side" "dialog side" "command side";
}
.screen { grid-area: screen; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.dialog { grid-area: dialog; }
.command { grid-area: command; }
.side { grid-area: side; display: flex; flex-direction: column; gap: 22px; min-height: 0; overflow-y: auto; padding: 10px 8px 8px 2px; margin: -10px -8px -8px -2px; scrollbar-width: thin; }

.hud { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: baseline; padding: 12px 14px 8px; border-bottom: 2px solid var(--edge-2); }
.hud-i { display: inline-flex; align-items: baseline; gap: 7px; }
.hud-i em { font: normal 8px var(--pixel); color: var(--text-3); }
.hud-i b { font: 400 24px/1 var(--term); color: var(--text); height: 1em; overflow: hidden; }
.hud-i.grow { margin-left: auto; }
#roundLeft { color: var(--accent); }
#roundLeft.urgent { animation: cursor .6s steps(2) infinite; }
.screen > .seg { padding: 0 14px; margin: 8px 0 0; }
.pit { flex: 1; min-height: 0; width: 100%; display: block; cursor: pointer; image-rendering: pixelated; }
.depthbar { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; padding: 8px 14px 10px; border-top: 2px solid var(--edge-2); }
.depthbar > span { display: inline-flex; align-items: baseline; gap: 7px; }
.depthbar em { font: normal 8px var(--pixel); color: var(--text-3); }
.depthbar b { font: 400 22px/1 var(--term); color: var(--accent); height: 1em; overflow: hidden; }
.depthbar #shaftNext { margin-left: auto; font-size: 17px; }

.dialog { min-height: 92px; padding: 16px 44px 14px 18px; }
.dialog p { margin: 0; font-size: 24px; line-height: 1.2; color: var(--text); min-height: 2.4em; }
.dialog p b { color: var(--accent); font-weight: 400; }
.dialog p .g-emerald { color: #3ef0a0; } .dialog p .g-ruby { color: #ff4d6d; } .dialog p .g-amethyst { color: #c77dff; } .dialog p .g-diamond { color: #dffcff; }
.dialog .more { position: absolute; right: 18px; bottom: 14px; border: 6px solid transparent; border-top: 8px solid var(--accent); animation: bob .8s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(3px); } }

.command { padding: 14px; }
.bar { display: flex; gap: 10px; }
#wallet {
  flex: 1; min-width: 0; height: 48px; padding: 0 14px; border: 2px solid var(--edge-2); background: #000;
  font: 22px var(--term); color: var(--text); border-radius: 0;
}
#wallet::placeholder { color: var(--text-3); font: 9px var(--pixel); }
#wallet:focus { outline: none; border-color: var(--accent); }
#wallet.invalid { border-color: var(--bad); animation: shake .3s; }
#wallet:disabled { color: var(--text-2); }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.btn, .ghost {
  height: 48px; padding: 0 16px; border: 2px solid var(--edge); background: var(--win-2); color: var(--text);
  font: 10px var(--pixel); cursor: pointer; box-shadow: 3px 3px 0 #000; border-radius: 0;
}
.btn:hover, .btn[aria-expanded="true"], .ghost:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.ghost:disabled { opacity: .5; cursor: default; }
.go {
  height: 48px; padding: 0 26px; border: 0; cursor: pointer; border-radius: 0;
  font: 13px var(--pixel); color: #1a0c04; background: var(--accent);
  box-shadow: inset -3px -3px 0 var(--accent-2), inset 3px 3px 0 #ffc79c, 4px 4px 0 #000;
}
.go:active { transform: translate(2px, 2px); box-shadow: inset -3px -3px 0 var(--accent-2), inset 3px 3px 0 #ffc79c, 2px 2px 0 #000; }
.go.stop { background: var(--win-2); color: var(--text); box-shadow: inset 0 0 0 2px var(--edge), 4px 4px 0 #000; }
.go:disabled { opacity: .55; cursor: default; }
.foot { margin-top: 10px; }
.consent { margin: 0; font-size: 17px; color: var(--text-3); }
.ca { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.ca-k { font: 8px var(--pixel); color: var(--accent); }
.ca code { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 220px; user-select: all; }
.ca:not(.set) code { color: var(--text-3); }
.ca-btn { flex: none; padding: 4px 8px; border: 2px solid var(--edge-2); background: none; font: 8px var(--pixel); color: var(--text-2); cursor: pointer; }
.ca-btn:hover { color: var(--accent); border-color: var(--accent); }

.settings { position: absolute; bottom: calc(100% + 18px); right: 0; width: 360px; z-index: 6; padding-top: 22px; animation: pop .2s steps(3); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.ctl { display: grid; grid-template-columns: 116px 1fr 44px; align-items: center; gap: 10px; margin: 8px 0; font-size: 19px; color: var(--text-2); cursor: pointer; }
.ctl b { font-weight: 400; color: var(--text); text-align: right; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 18px; background: transparent; width: 100%; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), #2a252e var(--p, 50%)); }
input[type=range]::-moz-range-track { height: 6px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), #2a252e var(--p, 50%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 16px; margin-top: -5px; background: var(--edge); box-shadow: 2px 2px 0 #000; }
input[type=range]::-moz-range-thumb { width: 12px; height: 16px; background: var(--edge); border: 0; border-radius: 0; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch i { width: 36px; height: 18px; background: #2a252e; position: relative; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; background: var(--text-3); transition: transform .15s steps(3); }
.switch input:checked + i { background: var(--accent-2); }
.switch input:checked + i::after { transform: translateX(18px); background: var(--edge); }
.switch input:disabled + i { opacity: .4; }

/* side windows */
.stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; position: relative; }
.stat b { font: 400 28px/1 var(--term); white-space: nowrap; overflow: hidden; height: 1em; }
.stat em { font: normal 16px var(--term); color: var(--text-3); }
.stat.big { margin: 12px 0 4px; }
.stat.big b { font-size: 48px; color: var(--accent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.grid3 .stat b { font-size: 24px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 18px 0 24px; }
.grid4 .stat { padding: 16px 14px 12px; background: var(--win); border: 3px solid var(--edge); box-shadow: 4px 4px 0 #000; }
#spark { width: 100%; height: 40px; display: block; }
.state { display: inline-flex; align-items: center; gap: 7px; font: 8px var(--pixel); text-transform: uppercase; color: var(--text-2); }
.state i { width: 8px; height: 8px; background: var(--text-3); }
.state.on i { background: var(--accent); animation: cursor .8s steps(2) infinite; }
.state.on b { color: var(--accent); font-weight: 400; }
.state.err i { background: var(--bad); }
.digest { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; background: #000; border: 2px solid var(--edge-2); }
.digest code { font-size: 16px; word-break: break-all; line-height: 1.1; color: var(--text-3); }
.digest code .z { color: var(--accent); }
.digest code.flash { animation: flash .9s steps(4); }
@keyframes flash { from { color: var(--text); } }
.ticker { list-style: none; margin: 8px 0 0; padding: 0; font: 16px/1.2 var(--term); color: var(--text-3); }
.ticker li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker li:nth-child(2) { opacity: .65; } .ticker li:nth-child(3), .ticker li:nth-child(4) { opacity: .35; }
.ticker .good { color: var(--text-2); } .ticker .bad { color: var(--bad); }
.ticker .emerald { color: #3ef0a0; } .ticker .ruby { color: #ff4d6d; } .ticker .amethyst { color: #c77dff; } .ticker .diamond { color: #dffcff; }

.seg { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; }
.seg span { height: 8px; background: #221e26; }
.seg span.on { background: var(--accent); }
.seg span.at { background: var(--accent); animation: cursor .8s steps(2) infinite; }
#thresholdText { margin: 6px 0 12px; }

.gem { width: 15px; height: 15px; flex: none; image-rendering: pixelated; display: inline-block; vertical-align: -2px; }
.haul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.haul li { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 2px; background: #000; border: 2px solid var(--edge-2); }
.haul li b { font: 400 20px var(--term); }
.haul li.none { opacity: .35; }
.best { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; background: #000; border: 2px solid var(--edge-2); margin-bottom: 10px; }
.best-v { display: flex; align-items: center; gap: 8px; font-size: 18px; color: var(--text-3); }
.best-v b { font-weight: 400; color: var(--text); font-size: 20px; }
.best-v em { font-style: normal; font-size: 17px; color: var(--text-3); }
.crew { list-style: none; margin: 0 0 8px; padding: 0 4px 0 0; max-height: 260px; overflow-y: auto; scrollbar-width: thin; }
.crew li { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; padding: 4px 0; border-bottom: 1px dashed var(--line); font-size: 19px; }
.crew li:last-child { border-bottom: 0; }
.crew li i { width: 10px; height: 10px; }
.crew li b { font-weight: 400; color: var(--text-2); }
.crew li.me b, .crew li.me span { color: var(--accent); }
.crew li.empty { display: block; color: var(--text-3); }

/* ---------- strata bar ---------- */
.strata { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; width: 156px; }
.strata span { position: relative; height: 10px; overflow: hidden; opacity: .45; }
.strata span i { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(255,255,255,.35); }
.strata span.done, .strata span.at { opacity: 1; }
.strata span.at { box-shadow: 0 0 0 2px var(--accent); }
.st-topsoil { background: #634a37; } .st-coal { background: #43403c; } .st-copper { background: #8f5536; }
.st-crystal { background: #6e5d86; } .st-magma { background: #a8401f; } .st-core { background: #e0943a; }
.shaft { display: none; }

/* ---------- pages ---------- */
.view.page { min-height: calc(100vh - var(--top)); padding: 34px 20px 60px; }
.sheet { max-width: 1040px; margin: 0 auto; }
.sheet article { position: relative; background: var(--win); border: 3px solid var(--edge); box-shadow: inset 0 0 0 3px var(--win), inset 0 0 0 4px var(--edge-2), 6px 6px 0 rgba(0,0,0,.7); padding: 30px 28px 26px; }
.eyebrow { display: flex; gap: 10px; align-items: center; margin: 0 0 14px; font: 8px var(--pixel); text-transform: uppercase; color: var(--text-3); }
.brandword { color: var(--accent); }
.brandword::after { content: ' /'; color: var(--text-3); }
.sheet h1 { font: 26px/1.3 var(--pixel); margin: 0 0 14px; text-shadow: 3px 3px 0 #000; }
.sheet .lede { color: var(--text-2); font-size: 22px; margin: 0 0 22px; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border: 2px solid var(--edge-2); background: #000; }
.tabs button { position: relative; border: 0; background: none; padding: 8px 12px 8px 24px; cursor: pointer; color: var(--text-3); font: 9px var(--pixel); text-transform: uppercase; }
.tabs button.on { color: var(--text); }
.tabs button.on::before { content: ''; position: absolute; left: 8px; top: 50%; margin-top: -5px; border: 5px solid transparent; border-left: 7px solid var(--accent); border-right: 0; animation: cursor 1s steps(2) infinite; }
.table-wrap { border: 2px solid var(--edge-2); background: #000; overflow: hidden; margin-bottom: 14px; }
.table { width: 100%; border-collapse: collapse; font-size: 19px; }
.table th { text-align: left; font: 8px var(--pixel); text-transform: uppercase; color: var(--text-3); padding: 14px 14px 10px; border-bottom: 2px solid var(--edge-2); }
.table td { padding: 8px 14px; border-bottom: 1px dashed var(--line); color: var(--text-2); }
.table tr:last-child td { border-bottom: 0; }
.table tr.me td { background: var(--accent-soft); color: var(--text); }
.table .num { text-align: right; }
.table .share-bar { height: 4px; background: var(--accent); margin: 4px 0 0 auto; }
.table .empty { color: var(--text-3); padding: 28px 14px; text-align: center; }
.table a { color: var(--accent); }
.table td.dim { opacity: .4; }
.gem-th span { margin-left: 6px; }
.st { font-size: 16px; padding: 1px 6px; background: #1a171d; color: var(--text-3); }
.st-sent { color: var(--good); }
.st-submitted, .st-queued { color: var(--accent); }
.kv { border: 2px solid var(--edge-2); background: #000; padding: 4px 16px; margin-bottom: 20px; }
.kv:empty { display: none; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv span { color: var(--text-2); }
.kv b { font-weight: 400; word-break: break-all; text-align: right; }
.kv a { color: var(--accent); }
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.flow > div { padding: 16px; background: #000; border: 2px solid var(--edge-2); }
.flow span { font: 9px var(--pixel); color: var(--accent); }
.flow b { display: block; font: 10px/1.4 var(--pixel); margin: 10px 0 8px; }
.flow p { margin: 0; color: var(--text-2); font-size: 19px; }
.finds { list-style: none; margin: 0 0 14px; padding: 0; border: 2px solid var(--edge-2); background: #000; }
.finds li { display: grid; grid-template-columns: 18px 110px 110px 1fr auto; gap: 10px; align-items: center; padding: 6px 14px; border-bottom: 1px dashed var(--line); font-size: 19px; }
.finds li:last-child { border-bottom: 0; }
.finds li b { font-weight: 400; }
.finds li span { color: var(--text-2); }
.finds li em, .finds li time { font-style: normal; color: var(--text-3); }
.finds li.me { background: var(--accent-soft); }
.finds li.empty { display: block; color: var(--text-3); text-align: center; padding: 20px; }
h2.section { font: 10px var(--pixel); margin: 28px 0 12px; color: var(--accent); }

.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.chart-card { margin: 0; padding: 14px 14px 8px; border: 2px solid var(--edge-2); background: #000; }
.chart-card figcaption { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.chart { position: relative; height: 200px; }
.chart canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
.chart-tip { position: absolute; pointer-events: none; padding: 6px 9px; white-space: nowrap; background: var(--win); border: 2px solid var(--edge); display: flex; flex-direction: column; gap: 1px; font-size: 16px; }
.chart-tip span { color: var(--text-3); }
.chart-tip b { color: var(--text); font-weight: 400; font-size: 20px; }
.chart-tip em { font-style: normal; color: var(--text-3); }
.ctl.switch.inline { display: inline-flex; gap: 10px; margin: -6px 0 16px; grid-template-columns: none; }
.table-toggle summary { cursor: pointer; color: var(--text-2); margin: 6px 0 12px; }
.table-toggle summary:hover { color: var(--accent); }
.table.clickable tr[data-round] { cursor: pointer; }
.table.clickable tr[data-round]:hover td { background: #141117; color: var(--text); }
.round-nav { margin-bottom: 18px; }
.back, .pill { color: var(--text-2); }
.back:hover, .pill:hover { color: var(--accent); }
.pill { display: inline-block; padding: 4px 10px; border: 2px solid var(--edge-2); margin-left: 6px; }

.bench { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; align-items: start; }
.bench-run, .bench-result { padding: 18px; border: 2px solid var(--edge-2); background: #000; display: flex; flex-direction: column; gap: 14px; }
.bench-rate { display: flex; align-items: baseline; gap: 10px; }
.bench-rate b { font: 400 64px/1 var(--term); color: var(--accent); height: 1em; overflow: hidden; }
.bench-rate em { font-style: normal; font-size: 22px; color: var(--text-3); }
.bench .go { align-self: start; }
.bench-result .grid3 { margin: 0; }
.calc { display: flex; flex-direction: column; gap: 12px; padding: 12px; border: 2px dashed var(--edge-2); }
.calc-inputs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.calc-inputs label { display: flex; flex-direction: column; gap: 6px; font-size: 17px; color: var(--text-3); }
.calc-inputs input { width: 100%; height: 38px; padding: 0 10px; border: 2px solid var(--edge-2); background: var(--win); font: 20px var(--term); color: var(--text); border-radius: 0; -moz-appearance: textfield; }
.calc-inputs input:focus { outline: none; border-color: var(--accent); }
.calc-inputs em { font-style: normal; font-size: 15px; }
.calc-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 18px; color: var(--text-2); }
.calc-steps b { font-weight: 400; color: var(--text); margin-left: 4px; }
.calc-steps li:last-child b { color: var(--accent); }

/* ---------- motion ---------- */
.reel { display: inline-block; height: 1em; line-height: 1; overflow: hidden; vertical-align: top; }
.reel > span { display: flex; flex-direction: column; transition: transform .5s steps(6); }
.reel i { font-style: normal; height: 1em; line-height: 1; }
.lit { display: inline-block; line-height: 1; vertical-align: top; }
.view.enter > *, .view.enter .sheet article:not([hidden]) { animation: rise .4s steps(4) both; }
.view.enter > .side { animation-delay: .1s; }
.view.enter > .dialog { animation-delay: .15s; }
.view.enter > .command { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.view::after { content: ''; position: fixed; inset: var(--top) 0 0 0; pointer-events: none; opacity: 0; z-index: 4; background: var(--accent); }
.view.sweep::after { animation: blinkall .5s steps(2); }
@keyframes blinkall { 0%, 100% { opacity: 0; } 50% { opacity: .12; } }
.is-mining .rig { border-color: var(--accent); }
.floater { position: absolute; left: 0; top: -6px; font: 8px var(--pixel); color: var(--accent); pointer-events: none; animation: float-up 1.2s steps(8) forwards; }
@keyframes float-up { from { opacity: 0; transform: translateY(8px); } 15% { opacity: 1; } to { opacity: 0; transform: translateY(-24px); } }
.pulse b { animation: stat-pulse .5s steps(3); }
@keyframes stat-pulse { 40% { color: var(--accent); } }

.toasts { position: fixed; right: 20px; top: calc(var(--top) + 14px); z-index: 30; display: flex; flex-direction: column; gap: 10px; width: min(340px, calc(100vw - 32px)); }
.toast { display: grid; grid-template-columns: 10px 1fr; gap: 12px; align-items: start; padding: 12px 14px; background: var(--win); border: 3px solid var(--edge); box-shadow: 5px 5px 0 #000; animation: toast-in .3s steps(3) both; }
.toast.out { animation: toast-out .3s steps(3) forwards; }
.toast b { font: 9px/1.4 var(--pixel); display: block; }
.toast p { margin: 4px 0 0; font-size: 18px; color: var(--text-2); }
.toast-mark { width: 8px; height: 8px; margin-top: 2px; background: var(--text-3); }
.toast.good .toast-mark { background: var(--accent); }
.toast.bad .toast-mark { background: var(--bad); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }
.go, .btn, .tabs button { position: relative; overflow: hidden; }
.ripple { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .view.mine { height: auto; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "screen screen" "dialog dialog" "command command" "side side"; }
  .screen { height: 62vh; min-height: 420px; }
  .side { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; margin: 0; padding: 0; }
  .side .party { grid-column: span 2; }
}
@media (max-width: 720px) {
  :root { --top: 52px; }
  .top { gap: 10px; padding: 0 12px; }
  .brand span { display: none; }
  .top nav { margin-left: 0; }
  .top nav a { padding: 8px 6px 8px 18px; font-size: 8px; }
  .top nav a.on::before, .top nav a:hover::before { left: 4px; }
  .conn b { display: none; }
  .view.mine { padding: 16px 12px 40px; gap: 20px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "screen" "dialog" "command" "side"; }
  .screen { height: 70vh; min-height: 460px; }
  .hud { gap: 4px 14px; } .hud-i b { font-size: 20px; } .hud-i.grow { margin-left: 0; }
  .depthbar #shaftNext { margin-left: 0; }
  .side { grid-template-columns: 1fr; } .side .party { grid-column: auto; }
  .bar { flex-wrap: wrap; } #wallet { flex-basis: 100%; } .go { flex: 1; }
  .foot { flex-direction: column; align-items: flex-start; }
  .settings { width: 100%; }
  .view.page { padding: 20px 12px 40px; }
  .sheet article { padding: 24px 16px 18px; }
  .sheet h1 { font-size: 18px; }
  .grid4 { grid-template-columns: 1fr 1fr; }
  .flow, .charts, .bench { grid-template-columns: 1fr; }
  .table-wrap { overflow-x: auto; }
  .table td, .table th { padding: 8px; }
  .finds li { grid-template-columns: 18px 1fr auto; } .finds li em { display: none; } .finds li time { grid-row: 1; grid-column: 3; }
  .toasts { top: calc(var(--top) + 8px); right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
