/* PITHEAD — halaman Mine (terminal permainan) */
.game { padding-top: 22px; }
.strip {
  display: grid; grid-template-columns: .7fr 1.2fr 1.1fr .8fr 1.6fr;
  background: var(--paper2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.strip .cell { padding: 14px 18px; border-right: 1px solid var(--line); min-width: 0; }
.strip .cell:last-child { border-right: 0; }
.strip b { display: block; font: 700 26px/1.15 var(--mono); letter-spacing: -.02em; margin-top: 6px; }
.strip small { color: var(--ink3); font: 600 11px/1 var(--mono); }
.strip .phase.closing b { color: var(--copper); }
.meter { height: 4px; background: var(--paper3); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--copper); transition: width 1s linear; }
.chips { display: flex; gap: 5px; margin-top: 8px; flex-wrap: nowrap; overflow: hidden; }
.chips span { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font: 700 12px/1 var(--mono); background: var(--copper); color: #fff; }
.chips span.s { background: var(--brass); }
.chips span.r { background: var(--paper3); color: var(--ink3); }
.chips span.new { animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(.2); } to { transform: scale(1); } }

.board { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; margin-top: 16px; align-items: start; }
.stage { height: min(78vh, 760px); min-height: 520px; }
.stage .banner {
  position: absolute; left: 50%; top: 22px; transform: translate(-50%, -12px); opacity: 0;
  background: rgba(246, 241, 231, .96); color: var(--ink); border-radius: 12px; padding: 12px 22px; text-align: center;
  transition: .35s cubic-bezier(.2, 1.3, .4, 1); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .6); min-width: 220px;
}
.stage .banner.show { opacity: 1; transform: translate(-50%, 0); }
.stage .banner b { display: block; font: 850 38px/1 var(--font); letter-spacing: -.02em; color: var(--copper); margin: 6px 0 2px; }
.stage .banner small { color: var(--ink2); font-size: 13px; font-weight: 600; }
.stage .banner.you { background: var(--copper); color: #fff; }
.stage .banner.you .k, .stage .banner.you small { color: rgba(255, 255, 255, .85); }
.stage .banner.you b { color: #fff; }
.legend { position: absolute; left: 20px; bottom: 18px; display: flex; gap: 14px; font: 600 11px/1 var(--mono); color: rgba(246, 241, 231, .78); letter-spacing: .06em; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.lg-split { background: #6a6158; } .lg-solo { background: #c9a04a; } .lg-mine { background: var(--copper2); }

.panel { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.pcard { background: var(--paper2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 0 #fff inset; }
.phead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.link { background: none; border: 0; color: var(--copper); font-weight: 700; font-size: 13px; padding: 0; }
.grid2d { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.g {
  aspect-ratio: 1; border-radius: 9px; border: 1px solid var(--line); background: var(--paper);
  position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 6px 7px;
  font: 700 13px/1 var(--mono); text-align: left; transition: transform .08s, border-color .12s, background .12s;
}
.g:hover { border-color: var(--ink); }
.g:active { transform: scale(.96); }
.g .amt { font: 600 9.5px/1 var(--mono); color: var(--ink3); }
.g .bar { position: absolute; left: 6px; right: 6px; bottom: 4px; height: 3px; border-radius: 2px; background: var(--paper3); overflow: hidden; }
.g .bar i { display: block; height: 100%; background: var(--copper); width: 0; transition: width .4s; }
.g.solo { background: var(--brass-soft); border-color: #dcc58e; }
.g.solo:after { content: "×"; position: absolute; right: 6px; top: 3px; color: var(--brass); font: 700 13px/1 var(--font); }
.g.sel { background: var(--copper); border-color: var(--copper); color: #fff; }
.g.sel .amt { color: rgba(255, 255, 255, .8); }
.g.sel .bar { background: rgba(255, 255, 255, .25); } .g.sel .bar i { background: #fff; }
.g.sel:after { color: #fff; }
.g.mine { box-shadow: inset 0 0 0 2px var(--mint); }
.g.mine.sel { box-shadow: inset 0 0 0 2px #fff; }
.g.locked { opacity: .45; cursor: not-allowed; background-image: repeating-linear-gradient(45deg, transparent 0 5px, rgba(27, 24, 20, .07) 5px 7px); }
.g.win { outline: 3px solid var(--copper); outline-offset: 1px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.chip { border: 1px solid var(--line2); background: var(--paper); border-radius: 7px; padding: 6px 9px; font: 600 12px/1 var(--mono); }
.chip:hover { border-color: var(--ink); }
.amtbox { display: flex; align-items: center; border: 1.5px solid var(--line2); border-radius: 10px; background: #fff; margin-top: 8px; padding: 0 14px; }
.amtbox:focus-within { border-color: var(--ink); }
.amtbox input { flex: 1; border: 0; outline: 0; background: transparent; font: 700 26px/1 var(--mono); padding: 12px 0; min-width: 0; color: var(--ink); }
.amtbox span { font: 700 14px/1 var(--mono); color: var(--ink3); }
.calc { margin: 14px 0; display: grid; gap: 7px; }
.calc div { display: flex; justify-content: space-between; font-size: 13.5px; }
.calc dt { color: var(--ink2); } .calc dd { margin: 0; font-weight: 700; }
.deploy { width: 100%; }
.note { font-size: 12px; color: var(--ink3); margin: 10px 0 0; }
.txmsg { font-size: 13px; font-weight: 600; margin: 8px 0 0; min-height: 1px; }
.txmsg.err { color: #a2331b; } .txmsg.ok { color: #1d6a4b; }
.youtiles { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.youtiles .t { font: 700 12px/1 var(--mono); padding: 6px 8px; border-radius: 6px; background: var(--copper-soft); color: #8a3517; }
.youtiles .t.s { background: var(--brass-soft); color: #6b4f12; }
.youtiles .t.w { background: var(--copper); color: #fff; }
.muted { color: var(--ink3); }
.claimrow { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.claimrow b { display: block; font: 700 22px/1.1 var(--mono); color: #1d6a4b; margin-top: 4px; }

.tabs { margin-top: 18px; background: var(--paper2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tabbar { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 6px; overflow-x: auto; }
.tabbar button { border: 0; background: none; padding: 9px 14px; border-radius: 8px; font-weight: 700; font-size: 14px; color: var(--ink2); white-space: nowrap; }
.tabbar button.on { background: var(--ink); color: var(--paper2); }
.tabbody > div { display: none; max-height: 420px; overflow: auto; }
.tabbody > div.on { display: block; }
.tbl tr.flash td { animation: flash 1.2s; }
@keyframes flash { from { background: var(--copper-soft); } to { background: transparent; } }
.tbl .you { color: var(--copper); font-weight: 700; }
.proofline { font-size: 11.5px; color: var(--ink3); padding: 10px 12px; margin: 0; word-break: break-all; border-top: 1px solid var(--line); }
.mestat { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.mestat div { padding: 14px 16px; border-right: 1px solid var(--line); } .mestat div:last-child { border-right: 0; }
.mestat b { display: block; font: 700 20px/1.2 var(--mono); margin-top: 6px; color: var(--ink); }

body.mine footer { margin-top: 60px; }
#connectBtn.connected { background: var(--paper2); color: var(--ink); border-color: var(--line2); font-family: var(--mono); font-size: 13px; }

@media (max-width: 1100px) {
  .board { grid-template-columns: 1fr; }
  .stage { height: 56vh; min-height: 380px; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .strip .cell { border-bottom: 1px solid var(--line); }
  .strip .hist { grid-column: span 2; }
}
@media (max-width: 600px) {
  .stage { height: 46vh; min-height: 300px; }
  .strip b { font-size: 20px; }
  .legend { display: none; }
  .mestat { grid-template-columns: 1fr 1fr; }
  .nav #soundBtn { display: none; }
}

.strip .phase.stale b { color: var(--ink3); }
