:root {
  --go-nox: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='%23141414' d='M20 24 13 6c5 3 9 8 11 16z'/%3E%3Cpath fill='%23141414' d='M44 24 51 6c-5 3-9 8-11 16z'/%3E%3Cpath fill='%233a3a3a' d='M20 23 15 10c3.5 2 6 5 7 11z'/%3E%3Cpath fill='%233a3a3a' d='M44 23 49 10c-3.5 2-6 5-7 11z'/%3E%3Ccircle cx='32' cy='36' r='21' fill='%23111111'/%3E%3Cellipse cx='23' cy='28' rx='7' ry='4' fill='%23fff' opacity='.14'/%3E%3Cellipse cx='23.5' cy='35' rx='5.2' ry='6' fill='%23e7ff6a'/%3E%3Cellipse cx='40.5' cy='35' rx='5.2' ry='6' fill='%23e7ff6a'/%3E%3Cellipse cx='24.2' cy='36' rx='2.2' ry='3' fill='%2317140f'/%3E%3Cellipse cx='41.2' cy='36' rx='2.2' ry='3' fill='%2317140f'/%3E%3Ccircle cx='23.2' cy='34.2' r='.9' fill='%23fff'/%3E%3Ccircle cx='40.2' cy='34.2' r='.9' fill='%23fff'/%3E%3Cpath d='M26.5 45.5c1.8 2.4 3.6 3.4 5.5 3.4s3.7-1 5.5-3.4' fill='none' stroke='%23e7ff6a' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E");
  --go-mochi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cellipse cx='32' cy='13' rx='7' ry='8' fill='%23ffb7c8'/%3E%3Ccircle cx='32' cy='11' r='2.4' fill='%23fff' opacity='.7'/%3E%3Ccircle cx='32' cy='36' r='21' fill='%23fff6ef'/%3E%3Cellipse cx='24' cy='28' rx='7' ry='4' fill='%23fff' opacity='.85'/%3E%3Cellipse cx='18.5' cy='40' rx='4' ry='2.4' fill='%23ffb4c6'/%3E%3Cellipse cx='45.5' cy='40' rx='4' ry='2.4' fill='%23ffb4c6'/%3E%3Cellipse cx='24' cy='35.5' rx='3.2' ry='3.7' fill='%23261f1a'/%3E%3Cellipse cx='40' cy='35.5' rx='3.2' ry='3.7' fill='%23261f1a'/%3E%3Ccircle cx='22.9' cy='34.2' r='1' fill='%23fff'/%3E%3Ccircle cx='38.9' cy='34.2' r='1' fill='%23fff'/%3E%3Cpath d='M27.2 45c1.6 2.3 3.1 3.3 4.8 3.3s3.2-1 4.8-3.3' fill='none' stroke='%23d48396' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E");
}

body.page-games {
  background: #f7f6f3;
}

.games-wrap { max-width: 1120px; }
.page-games .games-wrap {
  width: min(1120px, 100%);
  margin-left: auto;
  margin-right: auto;
  padding-top: 10px;
  padding-bottom: 20px;
}
.page-games .crumb { margin-bottom: 6px; }

.go-kicker {
  margin: 0 0 4px;
  color: #8a7560;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.go-hero { text-align: center; margin-bottom: 14px; }
.go-hero h1 {
  font-size: 1.7rem;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 2px;
}
.go-hero .lead { margin: 0 auto; max-width: 34rem; font-size: 0.95rem; color: #6f6256; }

.go-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.go-play {
  display: flex;
  flex-direction: column;
  width: min(100%, 680px);
  max-width: 100%;
  min-width: 0;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}
.go-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 14px 18px;
  border-radius: 22px 22px 0 0;
  background: #1c1916;
  color: #f7f3ec;
  box-shadow: none;
}
.go-status__main {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.go-status i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #1f7a56;
  box-shadow: none;
  display: block;
}
.go-status.is-think i { animation: go-pulse 1s ease-in-out infinite; }
.go-status.is-win { background: #245c32; }
.go-status.is-lose { background: #6d2e24; }
.go-status.is-alert { background: #3d2a12; }
.go-status.is-alert i { background: #ffb07a; box-shadow: 0 0 0 4px rgba(255, 176, 122, 0.22); }
.go-status.is-hot i { box-shadow: 0 0 0 4px rgba(231, 255, 106, 0.45); }
.go-status__count {
  color: rgba(246, 241, 231, 0.72);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.go-board-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.go-wood {
  background:
    radial-gradient(90% 55% at 50% 0%, rgba(255, 244, 226, 0.7), transparent 46%),
    linear-gradient(165deg, #efd0a2 0%, #e2b56f 46%, #d09a4e 100%);
  border-radius: 0 0 22px 22px;
  padding: 8px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -18px 28px rgba(120, 68, 18, 0.14),
    0 18px 40px rgba(70, 42, 16, 0.12);
}
.go-frame { display: grid; grid-template-columns: 18px 1fr; grid-template-rows: auto 1fr; gap: 4px; }
.go-x {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(15, 1fr);
}
.go-y { grid-column: 1; grid-row: 2; }
.go-wood, .go-frame { max-width: 100%; min-width: 0; }
.go-board { grid-column: 2; grid-row: 2; max-width: 100%; min-width: 0; }
.go-x span, .go-y span {
  text-align: center;
  font-size: 0.62rem;
  font-weight: 650;
  color: rgba(92, 58, 24, 0.55);
  line-height: 1;
}
.go-y {
  display: grid;
  grid-template-rows: repeat(15, 1fr);
}
.go-y span { display: grid; place-items: center; }
.go-board {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  aspect-ratio: 1;
  touch-action: manipulation;
}
.go-cell {
  position: relative;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
  min-height: 0;
  background: transparent;
  cursor: pointer;
}
.go-cell:disabled { cursor: default; }
.go-cell:focus-visible {
  outline: 2px solid #17140f;
  outline-offset: -2px;
  z-index: 3;
  border-radius: 6px;
}
.go-cell::before,
.go-cell::after {
  content: "";
  position: absolute;
  background: rgba(92, 52, 18, 0.42);
  z-index: 0;
  pointer-events: none;
}
.go-cell::before {
  left: 0;
  right: 0;
  top: 50%;
  height: 1.5px;
  transform: translateY(-50%);
}
.go-cell::after {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1.5px;
  transform: translateX(-50%);
}
.go-cell.edge-l::before { left: 50%; }
.go-cell.edge-r::before { right: 50%; }
.go-cell.edge-t::after { top: 50%; }
.go-cell.edge-b::after { bottom: 50%; }
.go-star {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18%;
  height: 18%;
  min-width: 4px;
  min-height: 4px;
  border-radius: 50%;
  background: rgba(62, 34, 12, 0.8);
  transform: translate(-50%, -50%);
  z-index: 1;
}
.go-stone, .go-ghost {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 92%;
  height: 92%;
  transform: translate(-50%, -58%) scale(0.55);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  background: center / contain no-repeat;
}
.go-cell.is-black .go-stone,
.go-cell.is-white .go-stone {
  opacity: 1;
  transform: translate(-50%, -58%) scale(1);
  filter: drop-shadow(0 2px 1px rgba(40, 22, 8, 0.38));
}
.go-cell.is-black .go-stone { background-image: var(--go-nox); }
.go-cell.is-white .go-stone { background-image: var(--go-mochi); }
.go-cell.is-fresh .go-stone { animation: go-drop 0.18s ease-out; }
.go-cell.is-last .go-stone::after {
  content: "";
  position: absolute;
  top: 2%;
  right: 6%;
  width: 18%;
  height: 18%;
  border-radius: 50%;
  background: #ff4d3a;
  box-shadow: 0 0 0 1.5px #fff;
}
.go-cell.is-win .go-stone {
  border-radius: 50%;
  box-shadow: 0 0 0 2px #e7ff6a;
  animation: go-win 0.42s ease;
}
.go-ban {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22%;
  height: 22%;
  min-width: 5px;
  min-height: 5px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #b42318;
  box-shadow: 0 0 0 1.5px #fff;
  z-index: 4;
  pointer-events: none;
}
.go-cell.is-forbid .go-ban { display: block; }
.go-board[data-side="black"]:not(.is-locked) .go-cell:not(.is-black):not(.is-white):hover .go-ghost,
.go-board[data-side="white"]:not(.is-locked) .go-cell:not(.is-black):not(.is-white):hover .go-ghost {
  opacity: 0.55;
  transform: translate(-50%, -58%) scale(1);
}
.go-board[data-side="black"] .go-ghost { background-image: var(--go-nox); }
.go-board[data-side="white"] .go-ghost { background-image: var(--go-mochi); }

.go-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #1c1916;
  color: #f7f3ec;
  border: 0;
  border-radius: 28px;
  padding: 18px;
  width: min(100%, 680px);
  box-shadow: 0 22px 50px rgba(28, 25, 22, 0.2);
}
.go-player {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 16px;
  background: #2a2520;
}
.go-player.is-active { background: #322c26; }
.go-player div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.go-player strong { letter-spacing: -0.03em; color: #f7f3ec; font-size: 1rem; }
.go-player small { color: #cbbbaa; font-size: 0.84rem; }
.go-avatar {
  width: 42px;
  height: 42px;
  display: block;
  border-radius: 50%;
  background-color: #3a332c;
  background-position: center;
  background-size: 86%;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(23, 20, 15, 0.06);
}
.go-avatar.is-black { background-image: var(--go-nox); }
.go-avatar.is-white { background-image: var(--go-mochi); }
.go-face {
  width: 22px;
  height: 22px;
  display: block;
  flex: none;
  background: center / contain no-repeat;
}
.go-face--nox { background-image: var(--go-nox); }
.go-face--mochi { background-image: var(--go-mochi); }
.go-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
}
.go-player.is-active .go-pulse {
  background: #d6f25a;
  box-shadow: 0 0 0 4px rgba(214, 242, 90, 0.28);
}

.go-block { display: grid; gap: 8px; }
.go-block[hidden] { display: none; }
.go-block:has(#goReset) .go-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.go-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #a89888;
}
.go-seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #2a2520;
}
.go-seg button { color: #e7dfd4; }
.go-seg button {
  flex: 1;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.go-seg button.is-on {
  background: #f7f3ec;
  color: #1c1916;
  box-shadow: none;
}
.go-picks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.go-picks button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  background: #2a2520;
  color: #f7f3ec;
  cursor: pointer;
  font-weight: 700;
}
.go-picks .go-face {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #fff;
}
.go-picks button.is-on {
  background: #f7f3ec;
  color: #1c1916;
  box-shadow: none;
}
.go-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #2a2520;
  border-radius: 16px;
  overflow: hidden;
}
.go-stat {
  background: transparent;
  padding: 12px 8px 10px;
  text-align: center;
}
.go-stat + .go-stat { box-shadow: inset 1px 0 0 rgba(247, 243, 236, 0.08); }
.go-stat b {
  display: block;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.go-stat span { color: #cbbbaa; font-size: 0.78rem; }
.go-streak {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 750;
  color: #c6e38a;
}
.go-streak[hidden] { display: none; }
.go-btn--block { width: 100%; }
.go-side #goReset.is-armed {
  background: #9a3b2f;
  color: #fff;
  box-shadow: none;
}
.go-actions { display: flex; gap: 8px; }
.go-btn, .go-icon-btn {
  border: 0;
  cursor: pointer;
  font-weight: 750;
}
.go-btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: #1c1916;
  color: #f7f3ec;
}
.go-side .go-btn:not(.go-btn--ghost) {
  background: #f7f3ec;
  color: #1c1916;
}
.go-side .go-btn--ghost {
  background: transparent;
  color: #f7f3ec;
  box-shadow: inset 0 0 0 1px rgba(247, 243, 236, 0.22);
}
.go-side #goReset {
  min-height: 36px;
  background: transparent;
  color: #b3a69a;
  box-shadow: none;
  font-size: 0.84rem;
  font-weight: 650;
}
.go-btn--ghost {
  background: #f6f1ea;
  color: #1c1916;
  box-shadow: none;
}
.go-btn:disabled, .go-icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.go-actions .go-btn { flex: 1; }
.go-icon-btn {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: #f6f1ea;
  color: #1c1916;
}
.go-side .go-icon-btn {
  background: #2a2520;
  color: #f7f3ec;
}
.go-icon-btn.is-on {
  background: #1c1916;
  color: #d6f25a;
}
.go-actions .go-icon-btn { flex: none; }
.go-tools {
  display: flex;
  justify-content: flex-end;
}
.go-rules {
  border-radius: 16px;
  background: #2a2520;
  color: #f7f3ec;
  padding: 12px 14px;
}
.go-rules summary {
  cursor: pointer;
  font-weight: 750;
}
.go-rules ul {
  margin: 8px 0 0;
  padding-left: 1.1rem;
  color: #d9cfc3;
  font-size: 0.86rem;
}
.go-rules li + li { margin-top: 6px; }

.go-modal[hidden] { display: none !important; }
.go-modal .go-confetti { display: none; }
.go-modal.is-celebrate .go-confetti { display: block; }
.go-modal.is-lose .go-modal__title { color: #6d2e24; }
.go-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 20, 15, 0.48);
  backdrop-filter: blur(8px);
}
.go-modal__card {
  position: relative;
  width: min(100%, 420px);
  overflow: hidden;
  background: #fbf7f1;
  border-radius: 28px;
  padding: 28px 22px 22px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}
.go-modal__title {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: -0.05em;
  font-weight: 750;
  line-height: 1.1;
  color: #17140f;
}
.go-modal__card p { margin: 0 0 18px; color: #5c5148; }
.go-modal__card .go-modal__title { margin-bottom: 8px; color: #17140f; }
.go-confetti {
  pointer-events: none;
  position: absolute;
  inset: 0;
}
.go-confetti span {
  position: absolute;
  top: -8px;
  width: 8px;
  height: 14px;
  border-radius: 3px;
  animation: go-fall 1.1s ease-in forwards;
}
.go-confetti span:nth-child(1) { left: 12%; background: #e7ff6a; animation-delay: 0s; }
.go-confetti span:nth-child(2) { left: 28%; background: #17140f; animation-delay: .05s; }
.go-confetti span:nth-child(3) { left: 46%; background: #ffb07a; animation-delay: .1s; }
.go-confetti span:nth-child(4) { left: 63%; background: #e7ff6a; animation-delay: .02s; }
.go-confetti span:nth-child(5) { left: 78%; background: #17140f; animation-delay: .12s; }
.go-confetti span:nth-child(6) { left: 90%; background: #ff5a45; animation-delay: .08s; }

.lobby-grid {
  display: grid;
  gap: 14px;
}
.lobby-card {
  display: grid;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #e4e7e4;
  border-radius: 12px;
  padding: 18px;
  max-width: 420px;
  margin: 0 auto;
}
.lobby-card strong {
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}
.lobby-card span { color: #5c5148; }
.lobby-preview {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  aspect-ratio: 1.6;
  border-radius: 16px;
  padding: 10px;
  background:
    linear-gradient(160deg, #f3d7ad, #c99258);
}
.lobby-preview i {
  border-radius: 50%;
  align-self: center;
  justify-self: center;
  width: 70%;
  height: 70%;
}
.lobby-preview i:nth-child(3),
.lobby-preview i:nth-child(8),
.lobby-preview i:nth-child(13) {
  background: var(--go-mochi) center / contain no-repeat;
}
.lobby-preview i:nth-child(7),
.lobby-preview i:nth-child(12) {
  background: var(--go-nox) center / contain no-repeat;
}

@keyframes go-drop {
  from { transform: translate(-50%, -72%) scale(0.72); }
  to { transform: translate(-50%, -58%) scale(1); }
}
@keyframes go-win {
  0% { transform: translate(-50%, -58%) scale(1); }
  45% { transform: translate(-50%, -70%) scale(1.14); }
  100% { transform: translate(-50%, -58%) scale(1); }
}
.go-seo {
  max-width: 46rem;
  margin: 36px auto 0;
  padding: 8px 4px 12px;
  color: #3d342c;
}
.go-seo h2,
.go-seo h3 { scroll-margin-top: 76px; }
.go-seo h2 {
  margin: 28px 0 8px;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  text-align: left;
}
.go-seo h3 {
  margin: 16px 0 6px;
  font-size: 1.05rem;
  text-align: left;
}
.go-seo p,
.go-seo li { line-height: 1.65; }
.go-seo p { margin: 0 0 12px; }
.go-seo ul,
.go-seo ol { margin: 0 0 14px; padding-left: 1.2rem; }
.go-seo a { color: #17140f; font-weight: 750; }
.go-seo table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 16px;
  font-size: 0.92rem;
}
.go-seo th,
.go-seo td {
  border-bottom: 1px solid rgba(23, 20, 15, 0.1);
  text-align: left;
  padding: 8px 10px;
  vertical-align: top;
}
.go-seo th { color: #6d6256; font-weight: 750; }
.go-status.is-win, .go-status.is-lose { font-size: 1.05rem; }
@media (max-width: 720px) {
  .page-games .games-wrap { padding-left: 8px; padding-right: 8px; }
  .go-wood { padding: 4px; }
  .go-frame { grid-template-columns: 12px 1fr; gap: 2px; }
  .go-cell { touch-action: manipulation; }
}
@keyframes go-pulse {
  50% { transform: scale(0.7); opacity: 0.55; }
}
@keyframes go-fall {
  to { transform: translateY(180px) rotate(160deg); opacity: 0; }
}

@media (min-width: 900px) {
  .go-layout {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
  }
  .go-play { width: min(62vw, calc(100dvh - 150px), 720px); }
  .go-side {
    width: 340px;
    flex: none;
    position: sticky;
    top: 76px;
  }
  .lobby-grid { justify-content: center; }
}
#game-catalog { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
@media (hover: none) {
  .go-ghost { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .go-cell.is-fresh .go-stone,
  .go-cell.is-win .go-stone,
  .go-status.is-think i,
  .go-confetti span { animation: none; }
}
