.seal-game[hidden] { display: none !important; }
.seal-game {
  position: fixed;
  z-index: 1800;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
}
.seal-game-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(3, 5, 12, .9);
  backdrop-filter: blur(12px);
}
.seal-game-panel {
  position: relative;
  width: min(100%, 780px);
  max-height: calc(100vh - 40px);
  padding: clamp(16px, 3vw, 26px);
  overflow-y: auto;
  color: #f5f7ff;
  border: 1px solid rgba(129, 172, 255, .52);
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 10% 0%, rgba(46, 103, 187, .25), transparent 38%),
    radial-gradient(ellipse at 100% 100%, rgba(120, 63, 205, .2), transparent 42%),
    #101522;
  box-shadow: 0 28px 100px rgba(0, 0, 0, .76), 0 0 45px rgba(83, 142, 255, .16);
}
.seal-game-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.seal-game-kicker { display: block; margin-bottom: 5px; color: #83c9ff; font-size: .68rem; font-weight: 800; letter-spacing: .16em; }
.seal-game-heading h2 { margin: 0; color: #fff; font-size: clamp(1.25rem, 3vw, 1.65rem); line-height: 1.2; }
.seal-game-close { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; color: #f7f8ff; border: 1px solid rgba(255,255,255,.17); border-radius: 13px; background: #242d42; font: inherit; font-size: 1.5rem; cursor: pointer; }
.seal-game-close:hover { border-color: #96c9ff; background: #33415e; }
.seal-game-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 16px; }
.seal-game-stats > div { display: grid; gap: 3px; min-width: 0; padding: 9px 12px; border: 1px solid rgba(163, 188, 236, .2); border-radius: 13px; background: rgba(32, 42, 62, .86); }
.seal-game-stats span { color: #bbc8e2; font-size: .68rem; }
.seal-game-stats b { color: #fff; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.seal-game-layout { display: grid; grid-template-columns: minmax(0, 300px) minmax(180px, 1fr); justify-content: center; gap: 17px; }
.seal-game-board-wrap { position: relative; display: grid; place-items: center; padding: 10px; border: 1px solid rgba(153, 186, 246, .45); border-radius: 17px; background: linear-gradient(145deg, #1b273b, #111827); box-shadow: inset 0 0 28px rgba(41, 91, 160, .18), 0 12px 30px rgba(0,0,0,.22); }
.seal-game-over[hidden] { display: none !important; }
.seal-game-over { position: absolute; inset: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px; text-align: center; border: 1px solid rgba(172, 143, 255, .48); border-radius: 10px; background: rgba(8, 11, 20, .88); backdrop-filter: blur(5px); }
.seal-game-over strong { color: #fff; font-size: 1.35rem; }
.seal-game-over span { color: #c7d2e7; font-size: .86rem; }
.seal-game-over button { min-height: 42px; padding: 9px 15px; color: #fff; border: 1px solid #9d7cff; border-radius: 11px; background: linear-gradient(135deg, #7548d8, #4b72df); font: inherit; font-weight: 750; cursor: pointer; }
.seal-game-over button:hover { filter: brightness(1.12); }
.seal-game-board { display: block; width: min(100%, 300px); height: auto; aspect-ratio: 1 / 2; border-radius: 7px; background: #101725; touch-action: none; }
.seal-game-side { display: flex; flex-direction: column; align-items: stretch; gap: 11px; min-width: 0; padding: 14px; border: 1px solid rgba(163, 188, 236, .18); border-radius: 17px; background: rgba(25, 33, 49, .88); }
.seal-game-next { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 78px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: #131a28; }
.seal-game-next > span { color: #cdd7eb; font-size: .78rem; font-weight: 700; }
.seal-game-next-board { display: block; width: 120px; height: 120px; border-radius: 9px; background: #131a28; }
.seal-game-status { min-height: 42px; margin: 0; padding: 10px 11px; color: #c8e8ff; border-left: 3px solid #47c9ef; border-radius: 8px; background: rgba(47, 175, 220, .1); font-size: .8rem; line-height: 1.5; }
.seal-game-controls-hint { color: #aebbd1; font-size: .76rem; line-height: 1.9; }
.seal-game-controls-hint span { display: inline-block; min-width: 72px; color: #e8d8ff; font-weight: 750; }
.seal-game-action { min-height: 42px; padding: 9px 12px; color: #fff; border: 1px solid #6997ff; border-radius: 11px; background: linear-gradient(135deg, #477de7, #8254e8); font: inherit; font-size: .84rem; font-weight: 750; cursor: pointer; box-shadow: 0 5px 17px rgba(73, 105, 218, .24); }
.seal-game-action:hover { filter: brightness(1.13); }
.seal-game-action.is-muted { color: #d4def1; border-color: rgba(185, 201, 229, .22); background: rgba(255,255,255,.045); box-shadow: none; }
.seal-game-touch { display: none; }
.seal-game-leaderboard { margin-top: 15px; padding: 14px; border: 1px solid rgba(163, 188, 236, .18); border-radius: 15px; background: rgba(15, 21, 33, .88); }
.seal-game-leaderboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.seal-game-leaderboard-heading .seal-game-kicker { margin-bottom: 3px; font-size: .58rem; }
.seal-game-leaderboard-heading h3 { margin: 0; color: #f7f8ff; font-size: .95rem; }
.seal-game-private-note { padding: 5px 8px; color: #bac7df; border: 1px solid rgba(180, 199, 232, .15); border-radius: 999px; background: rgba(255, 255, 255, .04); font-size: .64rem; white-space: nowrap; }
.seal-game-leaderboard-status { min-height: 1.3em; margin: 10px 0 8px; color: #aebbd2; font-size: .74rem; }
.seal-game-leaderboard-list { display: grid; gap: 5px; max-height: 230px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.seal-game-leaderboard-list:empty { display: none; }
.seal-game-leaderboard-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; min-width: 0; padding: 8px 10px; color: #dfe7f6; border: 1px solid rgba(255, 255, 255, .055); border-radius: 9px; background: rgba(255, 255, 255, .025); font-size: .75rem; }
.seal-game-leaderboard-list li.is-top { border-color: rgba(174, 143, 255, .2); background: rgba(127, 90, 196, .09); }
.seal-game-player { overflow: hidden; color: #d8c8ff; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.seal-game-leaderboard-list strong { color: #fff; font-variant-numeric: tabular-nums; }
.seal-game-leaderboard-list small { color: #aebbd2; font-size: .68rem; white-space: nowrap; }
.seal-game-action:disabled { opacity: .55; cursor: not-allowed; }
.seal-game-hint { margin: 13px 0 0; color: #9eabc1; font-size: .73rem; line-height: 1.55; text-align: center; }
@media (max-width: 600px) {
  .seal-game { padding: 10px; }
  .seal-game-panel { max-height: calc(100vh - 20px); padding: 14px; border-radius: 18px; }
  .seal-game-stats { gap: 6px; }
  .seal-game-stats > div { padding: 7px 8px; }
  .seal-game-stats span { font-size: .62rem; }
  .seal-game-stats b { font-size: 1rem; }
  .seal-game-layout { grid-template-columns: minmax(0, 1fr) 112px; gap: 9px; }
  .seal-game-board-wrap { padding: 5px; }
  .seal-game-board { width: min(100%, 250px); }
  .seal-game-side { gap: 8px; padding: 8px; }
  .seal-game-next { min-height: 64px; padding: 6px; }
  .seal-game-next-board { width: 82px; height: 82px; }
  .seal-game-controls-hint { font-size: .64rem; line-height: 1.7; }
  .seal-game-controls-hint span { min-width: 48px; }
  .seal-game-action { min-height: 36px; padding: 7px; font-size: .72rem; }
  .seal-game-touch { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-top: 10px; }
  .seal-game-touch button { min-height: 43px; color: #f7f8ff; border: 1px solid rgba(156, 190, 255, .43); border-radius: 11px; background: #25324a; font: inherit; font-size: 1.15rem; font-weight: 800; touch-action: manipulation; }
  .seal-game-touch button:active { transform: translateY(1px); background: #3a4e73; }
  .seal-game-touch button:last-child { color: #fff; background: #4e65b6; }
  .seal-game-hint { font-size: .68rem; }
}
@media (max-width: 380px) {
  .seal-game-layout { grid-template-columns: minmax(0, 1fr) 96px; }
  .seal-game-next > span { font-size: .67rem; }
  .seal-game-next-board { width: 70px; height: 70px; }
  .seal-game-side { padding: 6px; }
}
