:root {
  font-family: Inter, "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: #f6fbff;
  background: #07131b;
  font-synthesis: none;
  --panel: #102531;
  --panel-2: #0b1d27;
  --line: #294757;
  --muted: #8fb0c2;
  --cyan: #55d9ee;
  --green: #2ee59d;
  --red: #ff6b78;
  --amber: #ffc857;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% -10%, rgba(50, 160, 190, .2), transparent 34rem),
    linear-gradient(160deg, #07131b 0%, #091922 55%, #061017 100%);
}
button, input, textarea { font: inherit; }
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0 28px; }
.hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 8px; color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 0; font-size: clamp(32px, 7vw, 58px); line-height: 1; letter-spacing: -.045em; }
.lead { margin: 14px 0 0; max-width: 620px; color: var(--muted); line-height: 1.65; }
.trust-pill { flex: 0 0 auto; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(7, 19, 27, .65); font-weight: 800; }
.trust-pill[data-tone="ok"] { color: var(--green); border-color: rgba(46, 229, 157, .5); }
.trust-pill[data-tone="bad"] { color: var(--red); border-color: rgba(255, 107, 120, .5); }
.trust-pill[data-tone="wait"] { color: var(--amber); border-color: rgba(255, 200, 87, .5); }
.card { border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(145deg, rgba(16, 37, 49, .98), rgba(9, 27, 37, .98)); box-shadow: 0 18px 45px rgba(0, 0, 0, .22); }
.loader, .proof-card, .result-card, .board-card { padding: 22px; }
.section-title, .section-title > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-title h2 { margin: 0; font-size: 18px; }
.step { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(85, 217, 238, .1); color: var(--cyan); font-size: 11px; font-weight: 900; }
.api-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr auto; gap: 12px; margin-top: 18px; align-items: end; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; outline: none; color: #f7fcff; background: #061722; }
input { min-height: 43px; padding: 0 12px; }
textarea { min-height: 370px; resize: vertical; padding: 14px; font: 12px/1.55 "Cascadia Code", Consolas, monospace; }
input:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(85, 217, 238, .1); }
button { min-height: 42px; padding: 0 15px; border: 0; border-radius: 10px; cursor: pointer; font-weight: 850; }
.primary { color: #031217; background: var(--cyan); }
.primary:hover { filter: brightness(1.07); }
.quiet { min-height: 34px; color: var(--cyan); background: rgba(85, 217, 238, .08); }
.hint { margin: 12px 0 0; color: #6f93a6; font-size: 12px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); gap: 18px; margin-top: 18px; }
.proof-card textarea { margin-top: 16px; }
.algorithm { max-width: 220px; overflow-wrap: anywhere; color: var(--cyan); font: 11px/1.4 "Cascadia Code", monospace; text-align: right; }
.metadata { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 18px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.metadata div { min-width: 0; padding: 12px; background: var(--panel-2); }
.metadata dt { color: var(--muted); font-size: 11px; }
.metadata dd { margin: 5px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 12px "Cascadia Code", monospace; }
.checks { display: grid; gap: 10px; }
.check { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(4, 17, 24, .55); }
.check-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.check h3 { margin: 0; font-size: 14px; }
.check strong { font-size: 12px; }
.check[data-ok="true"] strong { color: var(--green); }
.check[data-ok="false"] strong { color: var(--red); }
.check code { display: block; margin-top: 9px; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; line-height: 1.5; }
.empty-state { padding: 34px 18px; color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: 12px; line-height: 1.6; }
.error { margin: 12px 0 0; padding: 12px; color: #ffd9dc; background: rgba(255, 107, 120, .1); border-radius: 10px; }
.board-card { margin-top: 18px; }
.legend { color: var(--muted); font-size: 12px; }
.legend i { font-style: normal; margin-left: 10px; }
.gem { color: var(--cyan); }.mine { color: var(--red); }
.mines-board { display: grid; grid-template-columns: repeat(5, minmax(42px, 62px)); justify-content: center; gap: 8px; margin: 24px auto 4px; }
.tile { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid #315366; border-radius: 12px; background: linear-gradient(145deg, #163748, #0b202c); color: var(--cyan); font-size: 22px; box-shadow: inset 0 1px rgba(255, 255, 255, .05); }
.tile.is-mine { color: var(--red); border-color: rgba(255, 107, 120, .45); background: linear-gradient(145deg, #3b2028, #21141a); }
.tile span { position: absolute; opacity: 0; }
footer { padding: 22px 4px 0; color: #698898; font-size: 11px; text-align: center; }

@media (max-width: 840px) {
  .api-grid { grid-template-columns: 1fr 1fr; }
  .round-field { grid-column: 1 / -1; }
  .load-button { width: 100%; }
  .workspace { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .shell { width: min(100% - 20px, 1120px); padding-top: 24px; }
  .hero { display: block; }
  .trust-pill { display: inline-block; margin-top: 18px; }
  .loader, .proof-card, .result-card, .board-card { padding: 16px; border-radius: 14px; }
  .api-grid { grid-template-columns: 1fr; }
  .round-field { grid-column: auto; }
  .metadata { grid-template-columns: 1fr; }
  .section-title { align-items: flex-start; }
  .mines-board { gap: 5px; grid-template-columns: repeat(5, minmax(42px, 1fr)); }
}

