:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #10120f;
  color: #f2f0e7;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; min-height: 100vh; background: #10120f; }
button, a { font: inherit; }
button { color: inherit; }

.bar {
  height: 58px;
  padding: 0 22px;
  border-bottom: 1px solid #34362f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #171915;
}

.brand { color: #fff; text-decoration: none; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 850; }
.brand-mark { width: 29px; height: 29px; display: grid; place-items: center; background: #f3ba2f; color: #171208; font-weight: 950; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.chain { display: flex; align-items: center; gap: 8px; color: #b8b9b2; font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.chain span { width: 7px; height: 7px; border-radius: 50%; background: #8c8e87; }
.chain.live span { background: #58d68d; box-shadow: 0 0 0 4px #58d68d1e; }

main { min-height: calc(100vh - 58px); display: grid; grid-template-columns: minmax(0, 1fr) 350px; }
.stage { min-width: 0; background: #080a08; display: grid; place-items: center; padding: clamp(12px, 3vw, 44px); }
#game-frame { display: block; width: min(100%, 1080px); aspect-ratio: 16 / 9; border: 0; background: #111; box-shadow: 0 28px 80px #0009; }

.proof { border-left: 1px solid #34362f; background: #171915; padding: 34px 24px 24px; overflow: auto; }
.proof-heading p { margin: 0 0 8px; color: #f3ba2f; font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.proof h1 { margin: 0 0 26px; font-size: 27px; line-height: 1.08; letter-spacing: 0; }
.primary { width: 100%; min-height: 48px; border: 1px solid #f3ba2f; background: #f3ba2f; color: #18140a; font-weight: 850; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; }
.primary:disabled { cursor: wait; opacity: .65; }

dl { margin: 28px 0 20px; }
dl div { border-top: 1px solid #34362f; padding: 11px 0; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; }
dl div:last-child { border-bottom: 1px solid #34362f; }
dt { color: #858880; font-size: 11px; text-transform: uppercase; }
dd { margin: 0; color: #dedfd7; font-size: 12px; min-width: 0; text-align: right; overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
code { font: 11px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; word-break: break-word; }

.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.actions button { height: 48px; border: 1px solid #3f423a; background: #23261f; display: grid; place-items: center; gap: 2px; cursor: pointer; font-size: 10px; }
.actions button span:first-child { font-size: 16px; }
.actions button:disabled { color: #656860; cursor: not-allowed; }
.actions button:not(:disabled):hover { border-color: #f3ba2f; }

.explorer { display: grid; margin-top: 18px; }
.explorer a { border-top: 1px solid #34362f; min-height: 42px; display: flex; align-items: center; justify-content: space-between; color: #d8d9d1; text-decoration: none; font-size: 12px; }
.explorer a:last-child { border-bottom: 1px solid #34362f; }
.explorer a[aria-disabled="true"] { color: #5e615a; pointer-events: none; }
.status { color: #8f928a; font-size: 11px; line-height: 1.5; margin: 18px 0 0; }
.status.error { color: #ff8d80; }
.proof-note { color: #6f726b; font-size: 10px; line-height: 1.45; margin: 14px 0 0; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; background: #f2f0e7; color: #111; padding: 10px 14px; font-size: 12px; transition: .18s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 820px) {
  .bar { height: 52px; padding: 0 14px; }
  main { min-height: calc(100vh - 52px); grid-template-columns: 1fr; }
  .stage { min-height: 52vh; padding: 10px; }
  .proof { border-left: 0; border-top: 1px solid #34362f; padding: 24px 16px 30px; }
  .proof h1 { font-size: 23px; }
}
