/* AI8899 站点适配：返回入口、音效、重开和全屏布局 */
#site-bar {
  position: fixed; z-index: 9000; top: 10px; left: 10px;
  display: flex; align-items: center; gap: 8px;
}
.site-back, .site-btn {
  min-height: 34px; display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.42);
  background: rgba(32,32,32,.82); color: #fff; text-decoration: none;
  font: 600 12px/1 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  letter-spacing: .02em; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0,0,0,.22);
}
.site-back:hover, .site-btn:hover { background: rgba(32,32,32,.95); }
.site-back:focus-visible, .site-btn:focus-visible { outline: 3px solid #fdc44c; outline-offset: 2px; }
.inline-restart {
  border: 1px solid #ddd; background: #fff; color: #555; border-radius: 6px;
  padding: 5px 12px; font: 12px/1.4 inherit; cursor: pointer;
}
.inline-restart:hover { border-color: #bbb; background: #fafafa; }

/* 原生全屏不可用时的窗口内全屏：把棋盘扩大并隐藏规则说明 */
html.games-fs body { background: #f0f0f0; overflow: hidden; }
html.games-fs #game-area {
  width: 100vw; height: 100dvh; max-width: none; padding: 8px 12px;
  display: flex; flex-direction: column; align-items: center;
}
html.games-fs #status-bar { margin: 0 0 8px; padding: 6px 12px; flex: none; }
html.games-fs #game-main { flex: 1; min-height: 0; width: 100%; align-items: stretch; justify-content: center; }
html.games-fs #board-container { height: 100%; width: auto; max-width: min(56vw, calc((100dvh - 150px) * 480 / 780)); aspect-ratio: 480 / 780; flex: none; margin: 0 auto; }
html.games-fs #board-container svg { height: 100%; width: 100%; }
html.games-fs #rules-panel { max-height: 100%; overflow: auto; flex: 0 1 260px; width: 260px; }
html.games-fs #captured-area, html.games-fs #message { display: none; }
@media (max-width: 900px) {
  html.games-fs #rules-panel { display: none; }
  html.games-fs #board-container { max-width: calc(100vw - 24px); }
}
@media (max-width: 500px) {
  #site-bar { top: 8px; left: 8px; gap: 6px; }
  .site-back, .site-btn { min-height: 31px; padding: 5px 9px; font-size: 11px; }
  .overlay-content { margin-top: 42px; max-height: calc(100dvh - 58px); overflow-y: auto; }
}
