* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #ffffff;
  color: #111111;
}

.game-site-nav {
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 16px 0;
  font-size: 14px;
}

.game-site-nav a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.game-site-nav a:hover {
  text-decoration: underline;
}

.game-site-nav .sep {
  color: #999999;
  margin: 0 6px;
}

.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
}

.game-screen {
  position: relative;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  background: #fafafa;
  padding-bottom: 26px;
}

.game-credit {
  position: absolute;
  right: 10px;
  bottom: 8px;
  margin: 0;
  font-size: 11px;
  color: #888888;
  pointer-events: none;
  z-index: 2;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.top-bar h1 {
  margin: 0;
  font-size: 24px;
  color: #000000;
}

.controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  color: #111111;
}

button,
select {
  border: 1px solid #cccccc;
  border-radius: 6px;
  background: #ffffff;
  color: #111111;
  padding: 6px 10px;
  cursor: pointer;
}

button:hover {
  background: #f0f0f0;
}

.score-panel {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}

.score-item {
  background: #ffffff;
  border: 1px solid #dddddd;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #111111;
}

.score-item.black strong::before {
  content: "● ";
  color: #111;
}

.score-item.white strong::before {
  content: "○ ";
  color: #555;
}

.status-panel {
  margin-top: 12px;
  background: #ffffff;
  border: 1px solid #dddddd;
  border-radius: 8px;
  padding: 10px 12px;
  min-height: 44px;
  display: flex;
  align-items: center;
}

#statusText {
  margin: 0;
  font-weight: 600;
  color: #000000;
}

.board-wrap {
  margin-top: 14px;
  width: 100%;
  overflow-x: auto;
}

.rules-panel {
  margin-top: 16px;
  background: #ffffff;
  border: 1px solid #dddddd;
  border-radius: 8px;
  padding: 12px;
}

.rules-panel h2 {
  margin: 0;
  font-size: 19px;
  color: #000000;
}

.rules-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.rules-lang-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}

.rules-grid.single-column {
  grid-template-columns: 1fr;
}

.rules-card {
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 10px 12px;
  color: #111111;
}

.rules-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: #000000;
}

.rules-card ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.55;
}

.rules-card.is-hidden {
  display: none;
}

.game-description {
  margin-top: 12px;
}

.game-description h2 {
  color: #000000;
  font-size: 1.05rem;
}

.game-description p,
.game-description em {
  color: #222222;
}

.board {
  width: 750px;
  height: 750px;
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  grid-template-rows: repeat(15, 1fr);
  border: 2px solid #865d2d;
  background: #e8c88c;
  position: relative;
}

.cell {
  border: 1px solid rgba(109, 75, 34, 0.35);
  position: relative;
}

.stone {
  width: 80%;
  height: 80%;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.stone.black {
  background: radial-gradient(circle at 30% 30%, #666, #111 68%);
}

.stone.white {
  background: radial-gradient(circle at 30% 30%, #fff, #d6d6d6 70%);
  border: 1px solid #bcbcbc;
}

@media (max-width: 820px) {
  .board {
    width: 600px;
    height: 600px;
  }

  .rules-grid {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  max-width: 980px;
  margin: 32px auto 24px;
  padding: 16px;
  border-top: 1px solid #e5e5e5;
  text-align: center;
  font-size: 14px;
}

.site-footer a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.game-original-footer {
  max-width: 980px;
  margin: 0 auto 40px;
  padding: 16px 16px 8px;
  border-top: 1px solid #e5e5e5;
  font-size: 0.85rem;
  color: #555555;
}

.game-original-footer .hub-original {
  margin: 0;
  max-width: 720px;
  line-height: 1.65;
}

.game-original-footer .hub-original > p {
  margin: 0;
}

.game-original-footer .hub-original > p + p {
  margin-top: 0.65em;
}

.game-original-footer .hub-original-title {
  margin-bottom: 0.15em;
}

.game-original-footer .hub-original strong {
  color: #111111;
}

.en-page-shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.en-page-shell .game-site-nav {
  max-width: none;
}

.en-main-beside-ad .app {
  margin-left: 0;
  margin-right: 0;
  max-width: 980px;
}
