:root {
  --ink: #191d2b;
  --muted: #697083;
  --blue: #5269e8;
  --blue-dark: #3447b9;
  --paper: #f7f8fc;
  --wood: #e5ad5d;
  --wood-dark: #8b5522;
}

@media (max-width: 760px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  textarea,
  select {
    font-size: 16px !important;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Pretendard, "Noto Sans KR", system-ui, sans-serif;
  background:
    radial-gradient(circle at 12% 4%, #dfe4ff, transparent 30rem),
    radial-gradient(circle at 90% 90%, #e0f3e8, transparent 32rem), var(--paper);
}
button,
input {
  font: inherit;
}
.shell {
  width: min(100% - 28px, 980px);
  margin: auto;
  padding: 18px 0 44px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-weight: 900;
  text-decoration: none;
}
.brand-logo {
  display: block;
  width: 60px;
  height: 60px;
  object-fit: contain;
}
.brand-copy {
  display: grid;
  gap: 2px;
}
.brand-copy strong { font-size: 16px; line-height: 1.05; }
.brand-copy small {
  color: #687087;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #7185f4, var(--blue));
  box-shadow: 0 9px 22px #3f52be3d;
}
.portal-link {
  color: #4d566e;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.screen[hidden] {
  display: none;
}
.hero,
.panel {
  border: 1px solid #27304e1f;
  border-radius: 28px;
  background: #ffffffd9;
  box-shadow: 0 18px 54px #2e36571a;
}
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 480px;
  overflow: hidden;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 54px);
}
.eyebrow {
  width: max-content;
  padding: 6px 9px;
  border-radius: 999px;
  color: #3349bd;
  font-size: 11px;
  font-weight: 900;
  background: #edf0ff;
}
.hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(38px, 7vw, 70px);
  letter-spacing: -0.07em;
}
.hero p {
  margin: 0 0 28px;
  color: var(--muted);
  line-height: 1.7;
}
.hero-board {
  min-height: 100%;
  background: #dda03d url("/omok/assets/omok-showcase.webp") center / cover no-repeat;
}
.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.mode-button,
.primary,
.secondary,
.small-button {
  border: 0;
  cursor: pointer;
  font-weight: 900;
}
.mode-button {
  position: relative;
  min-height: 94px;
  padding: 20px;
  border: 1px solid #5269e829;
  border-radius: 18px;
  text-align: left;
  color: #27378f;
  background: linear-gradient(145deg, #f7f8ff, #e8ecff);
  box-shadow: 0 6px 0 #c9d0f7, 0 12px 22px #5269e824;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.mode-button:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow: 0 8px 0 #c9d0f7, 0 16px 26px #5269e82b;
}
.mode-button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #c9d0f7, 0 6px 12px #5269e81f;
}
.mode-button:focus-visible {
  outline: 3px solid #5269e859;
  outline-offset: 4px;
}
.mode-button strong {
  display: block;
  font-size: 18px;
  letter-spacing: -0.025em;
}
.mode-button span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.mode-button.online {
  border-color: #54a87230;
  color: #28623c;
  background: linear-gradient(145deg, #f7fcf8, #e5f5e9);
  box-shadow: 0 6px 0 #c4e4cd, 0 12px 22px #388d5621;
}
.mode-button.online:hover {
  box-shadow: 0 8px 0 #c4e4cd, 0 16px 26px #388d5629;
}
.mode-button.online:active {
  box-shadow: 0 2px 0 #c4e4cd, 0 6px 12px #388d561c;
}
.mode-button.online:focus-visible {
  outline-color: #3b9a5c59;
}
.panel {
  padding: clamp(22px, 5vw, 44px);
}
.screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.screen-head h1 {
  margin: 0;
  font-size: clamp(27px, 5vw, 40px);
  letter-spacing: -0.055em;
}
.back {
  border: 0;
  color: var(--muted);
  font-weight: 850;
  background: transparent;
  cursor: pointer;
}
.choice-group {
  margin: 24px 0;
}
.choice-group h2 {
  font-size: 15px;
}
.choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.choices.two {
  grid-template-columns: repeat(2, 1fr);
}
.choice input {
  position: absolute;
  opacity: 0;
}
.choice span {
  display: block;
  padding: 16px;
  border: 2px solid transparent;
  border-radius: 14px;
  text-align: center;
  font-weight: 850;
  background: #f3f4f8;
  cursor: pointer;
}
.choice input:checked + span {
  border-color: var(--blue);
  color: var(--blue-dark);
  background: #eef0ff;
}
.primary,
.secondary {
  padding: 14px 18px;
  border-radius: 14px;
}
.primary {
  color: white;
  background: var(--blue);
}
.secondary {
  color: var(--blue-dark);
  background: #edf0ff;
}
.full {
  width: 100%;
}
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 680px) 230px;
  gap: 18px;
  align-items: start;
}
.board-wrap {
  padding: clamp(10px, 2vw, 18px);
  border: 1px solid #8d551e;
  border-radius: 12px;
  background: #dfa74e url("/omok/assets/omok-board-wood.webp") center / cover no-repeat;
  box-shadow: inset 0 0 28px #7e471926, 0 20px 50px #70451f2b;
}
.board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  aspect-ratio: 1;
  isolation: isolate;
}
.board::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: calc(100% / 30);
  background-image:
    radial-gradient(circle at 21.428% 21.428%, #3e2814 0 3px, transparent 3.5px),
    radial-gradient(circle at 50% 21.428%, #3e2814 0 3px, transparent 3.5px),
    radial-gradient(circle at 78.572% 21.428%, #3e2814 0 3px, transparent 3.5px),
    radial-gradient(circle at 21.428% 50%, #3e2814 0 3px, transparent 3.5px),
    radial-gradient(circle at 50% 50%, #3e2814 0 3px, transparent 3.5px),
    radial-gradient(circle at 78.572% 50%, #3e2814 0 3px, transparent 3.5px),
    radial-gradient(circle at 21.428% 78.572%, #3e2814 0 3px, transparent 3.5px),
    radial-gradient(circle at 50% 78.572%, #3e2814 0 3px, transparent 3.5px),
    radial-gradient(circle at 78.572% 78.572%, #3e2814 0 3px, transparent 3.5px),
    linear-gradient(#70471f 1px, transparent 1px),
    linear-gradient(90deg, #70471f 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%, calc(100% / 14) calc(100% / 14), calc(100% / 14) calc(100% / 14);
  background-position: center;
  display: none;
}
.grid-line,
.board-star {
  position: absolute;
  z-index: 0;
  display: block;
  pointer-events: none;
}
.grid-line.vertical {
  top: calc(100% / 30);
  bottom: calc(100% / 30);
  left: var(--pos);
  width: 1px;
  background: #63401f;
  transform: translateX(-0.5px);
}
.grid-line.horizontal {
  left: calc(100% / 30);
  right: calc(100% / 30);
  top: var(--pos);
  height: 1px;
  background: #63401f;
  transform: translateY(-0.5px);
}
.board-star {
  left: var(--x);
  top: var(--y);
  width: clamp(5px, 1%, 7px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #3e2814;
  transform: translate(-50%, -50%);
}
.point {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.stone {
  position: absolute;
  z-index: 2;
  inset: 4%;
  border-radius: 50%;
  box-shadow: inset -4px -5px 8px #0005, 0 3px 5px #42270f80;
}
.black {
  background: #080808 url("/omok/assets/omok-stone-black.webp") center / 140% 140% no-repeat;
}
.white {
  background: #eeeae0 url("/omok/assets/omok-stone-white.webp") center / 136% 136% no-repeat;
  box-shadow: inset -4px -5px 8px #8a89874d, 0 3px 5px #42270f66;
}
.point.last:after {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 36%;
  border-radius: 50%;
  background: #ff3d3d;
  box-shadow: 0 0 0 2px #fff, 0 0 9px 3px #ff3d3dbd;
  animation: last-move-pulse 1s ease-in-out infinite alternate;
}
.point.last .stone { outline: 2px solid #ff4a4a; outline-offset: 1px; }
@keyframes last-move-pulse { to { transform: scale(.72); opacity: .72; } }
.pending-stone { z-index: 3; opacity: .5; filter: saturate(.75); }
.point.pending::after {
  content: "한 번 더";
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 86%;
  transform: translateX(-50%);
  width: max-content;
  padding: 3px 5px;
  border-radius: 6px;
  color: white;
  font-size: clamp(7px, 1.8vw, 10px);
  font-weight: 900;
  background: #27304ee6;
  box-shadow: 0 4px 10px #0003;
}
.point.pending[data-col="0"]::after { left: 0; transform: none; }
.point.pending[data-col="14"]::after { right: 0; left: auto; transform: none; }
.point.pending[data-row="0"]::after { top: 86%; bottom: auto; }
.point.winner {
  border-radius: 50%;
  background: #ffe66b99;
}
.board.finishing .point.winner {
  z-index: 5;
  background: radial-gradient(circle, #fff27bba 0 45%, #ffb00073 46% 70%, transparent 72%);
  animation: winning-point-glow .56s ease-in-out calc(var(--win-index) * 90ms) 2 alternate;
}
.board.finishing .point.winner .stone {
  animation: winning-five-pulse .56s ease-in-out calc(var(--win-index) * 90ms) 2 alternate;
}
.board.finishing .point.winner.last .stone {
  animation: final-stone-land .5s cubic-bezier(.12, 1.55, .35, 1) both, winning-final-pulse .48s ease-in-out .55s 2 alternate;
}
.board.finishing .point.last::after { animation: none; transform: scale(1.18); box-shadow: 0 0 0 3px #fff, 0 0 15px 5px #ff3d3de8; }
@keyframes final-stone-land { from { opacity: 0; transform: translateY(-90%) scale(1.65); filter: blur(2px); } 72% { opacity: 1; transform: translateY(5%) scale(.88); } to { transform: translateY(0) scale(1); } }
@keyframes winning-five-pulse { to { transform: scale(1.16); filter: brightness(1.24); box-shadow: 0 0 0 3px #fff7ad, 0 0 18px 6px #ffc400b8; } }
@keyframes winning-final-pulse { to { transform: scale(1.18); filter: brightness(1.28); box-shadow: 0 0 0 3px #fff7ad, 0 0 22px 8px #ffae00d1; } }
@keyframes winning-point-glow { to { transform: scale(1.17); opacity: .8; } }
@media (hover: hover) and (pointer: fine) {
  .board.player-turn .point:not(:has(.stone)):hover::before {
    content: "";
    position: absolute;
    z-index: 3;
    inset: 4%;
    border-radius: 50%;
    background: #080808 url("/omok/assets/omok-stone-black.webp") center / 140% 140% no-repeat;
    box-shadow: 0 3px 7px #42270f66;
    opacity: 0.38;
  }
}
.game-side {
  display: grid;
  gap: 12px;
}
.status-card {
  padding: 18px;
  border-radius: 18px;
  background: white;
  box-shadow: 0 12px 36px #2e365712;
}
.turn {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}
.turn-timer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 13px;
  color: var(--muted);
  background: #f6f7fb;
}
.turn-timer strong { color: var(--ink); font-size: 24px; font-variant-numeric: tabular-nums; line-height: 1; }
.turn-timer strong.urgent { color: #e64242; animation: timer-pulse .8s ease-in-out infinite alternate; }
@keyframes timer-pulse { to { opacity: .55; } }
.mini-stone {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: 0 2px 5px #0004;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.tags span {
  padding: 5px 8px;
  border-radius: 99px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  background: #f1f2f6;
}
.game-side .secondary {
  width: 100%;
}
.takeback-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid #df9d392f;
  border-radius: 16px;
  background: linear-gradient(135deg, #fffdf8, #fff8ea);
  box-shadow: 0 10px 28px #7a4a100d;
}
.takeback-card .secondary { border-color: #d39431; color: #8b550b; background: #fff; }
.takeback-card .secondary:not(:disabled):hover { border-color: #b36b0e; background: #fff8e8; }
.takeback-card small { color: #8b6b3b; font-size: 10px; font-weight: 800; text-align: center; }
.takeback-card button:disabled { cursor: not-allowed; opacity: .55; }
.color-swap-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid #5269e82b;
  border-radius: 16px;
  background: linear-gradient(135deg, #fbfcff, #f0f3ff);
  box-shadow: 0 10px 28px #2e36570d;
}
.color-swap-card .secondary { border-color: #5269e866; color: var(--blue-dark); background: white; }
.color-swap-card .secondary:not(:disabled):hover { border-color: var(--blue); background: #f7f8ff; }
.color-swap-card small { color: #556188; font-size: 10px; font-weight: 800; text-align: center; }
.color-swap-card button:disabled { cursor: not-allowed; opacity: .55; }
.invite-button { width: 100%; }
.lobby-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.online-name {
  display: grid;
  grid-template-columns: auto minmax(0, 220px);
  align-items: center;
  justify-content: end;
  gap: 10px;
  margin: -8px 0 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.online-name input {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #27304e2b;
  border-radius: 11px;
  background: white;
}
.online-title { text-align: right; }
.online-title small { color: var(--blue-dark); font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.online-title h1 { margin-top: 3px; }
.online-players { display: grid; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid #27304e1a; }
.online-players div { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.online-players .mini-stone { width: 20px; height: 20px; }
.online-players strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.online-players small { color: var(--muted); font-size: 9px; }
.room-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}
.room-list-head h2 { margin: 0; font-size: 16px; }
.room-list {
  padding: 0;
  margin: 0;
  list-style: none;
}
.room-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 2px;
  border-bottom: 1px solid #27304e1a;
}
.room-list li div {
  display: grid;
  gap: 5px;
}
.room-list span {
  color: var(--muted);
  font-size: 12px;
}
.small-button {
  padding: 9px 13px;
  border-radius: 10px;
  color: var(--blue-dark);
  background: #edf0ff;
}
.small-button:disabled {
  opacity: 0.45;
}
.empty-room {
  color: var(--muted);
}
dialog {
  width: min(92%, 430px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  box-shadow: 0 28px 80px #18203a4d;
}
dialog::backdrop {
  background: #171b286b;
  backdrop-filter: blur(5px);
}
.dialog-body {
  display: grid;
  gap: 14px;
  padding: 26px;
}
.dialog-body h2 {
  margin: 0;
}
.dialog-body label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 850;
}
.dialog-body input,
.dialog-body select {
  width: 100%;
  padding: 12px;
  border: 1px solid #27304e2b;
  border-radius: 11px;
  background: white;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.invite-dialog-body { justify-items: center; text-align: center; }
.invite-dialog-body h2 { margin-top: -4px; }
.invite-dialog-body p { margin: -3px 0 0; color: var(--muted); font-size: 12px; }
.invite-dialog-body img { display: block; width: min(100%, 280px); height: auto; aspect-ratio: 1; border: 10px solid white; border-radius: 18px; background: white; box-shadow: 0 12px 34px #1c22351f; }
.invite-link-field { width: 100%; text-align: left; }
.invite-link-field input { color: var(--muted); font-size: 11px; font-weight: 600; }
.invite-dialog-actions { width: 100%; }
.invite-dialog-actions button { flex: 1; padding-inline: 8px; }
.undo-dialog-body { max-width: 390px; text-align: center; }
.undo-dialog-body h2 { margin-bottom: 0; }
.undo-dialog-body p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.dialog-note { color: #7a8194; font-size: 11px; line-height: 1.55; }
.undo-dialog-body .dialog-actions button { flex: 1; }
.result-modal {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #171b286b;
}
.result-modal[hidden],
.toast[hidden] {
  display: none;
}
.result-card {
  position: relative;
  width: min(100%, 340px);
  overflow: hidden;
  padding: 34px 28px 28px;
  border-radius: 24px;
  text-align: center;
  background: white;
  box-shadow: 0 24px 80px #10142166;
}
.result-card[data-result="defeat"] { color: #f2f3f7; background: linear-gradient(155deg, #333846, #171a22); }
.result-card[data-result="draw"] { background: #f3f4f8; }
.result-stamp {
  width: 112px;
  margin: 0 auto 16px;
  padding: 14px 8px 10px;
  transform: rotate(-7deg);
  border: 6px double #e33232;
  border-radius: 12px;
  color: #e33232;
  font-size: 32px;
  font-weight: 1000;
  letter-spacing: .12em;
  line-height: 1;
  text-indent: .12em;
  animation: stamp-in .42s cubic-bezier(.2, 1.55, .45, 1) both;
}
.result-card[data-result="defeat"] .result-stamp { border-color: #9299a8; color: #aeb4bf; filter: grayscale(1); }
.result-card[data-result="draw"] .result-stamp { border-color: #687189; color: #687189; font-size: 22px; }
@keyframes stamp-in { from { transform: rotate(-7deg) scale(2.4); opacity: 0; } 70% { transform: rotate(-7deg) scale(.9); opacity: 1; } to { transform: rotate(-7deg) scale(1); } }
.result-card h2 {
  margin: 0;
  font-size: 30px;
}
.result-card p { margin: 10px 0 22px; color: var(--muted); }
.result-card[data-result="defeat"] p { color: #b9bec9; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.result-actions button, .record-button { width: 100%; }
.record-button { margin-top: 18px; }
.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  border-radius: 12px;
  color: white;
  font-size: 13px;
  font-weight: 800;
  background: #202638;
  box-shadow: 0 12px 35px #0004;
}
.mobile-fixed-ad { display: none; }
.home-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.home-info section {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid #27304e1f;
  border-radius: 22px;
  background: #ffffffd9;
}
.home-info section.wide { grid-column: 1 / -1; }
.home-info h2 { margin: 8px 0 10px; font-size: 21px; letter-spacing: -.045em; }
.home-info p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.home-info ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px 24px; margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: 13px; }
.mode-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.mode-guide-grid article { padding: 17px; border: 1px solid #27304e18; border-radius: 16px; background: #f7f8fc; }
.mode-guide-grid strong { display: block; margin-bottom: 6px; font-size: 14px; }
.home-info .update-list { display: grid; grid-template-columns: 1fr; gap: 9px; padding: 0; list-style: none; }
.home-info .update-list li { display: grid; grid-template-columns: 82px 1fr; gap: 9px; }
.home-info .update-list time { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.game-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 4px 0; color: var(--muted); font-size: 11px; }
.game-footer nav { display: flex; flex-wrap: wrap; gap: 12px; }
.game-footer a { text-decoration: none; }
.lobby-note { color: var(--muted); font-size: 12px; line-height: 1.6; }
.adfit-shell[hidden] { display: none; }
.adfit-shell { width: min(100%, 380px); min-height: 132px; place-items: center; grid-template-rows: 10px 100px; gap: 7px; margin: 22px auto; padding: 8px 30px 14px; overflow: hidden; border: 1px solid #27304e1a; border-radius: 16px; background: #ffffffb8; }
.adfit-label { color: #8b92a2; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
@media (max-width: 980px) { .adfit-shell { display: grid; } }
@media (max-width: 760px) {
  .brand-logo { width: 50px; height: 50px; }
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .mobile-fixed-ad:not([hidden]) {
    position: fixed;
    z-index: 18;
    left: 50%;
    bottom: env(safe-area-inset-bottom);
    display: block;
    width: 320px;
    height: 50px;
    overflow: hidden;
    transform: translateX(-50%);
    background: white;
    box-shadow: 0 -8px 24px #1f263d26;
  }
  .mobile-fixed-ad .adfit-label { display: none; }
  .toast { bottom: calc(66px + env(safe-area-inset-bottom)); }
  .hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    min-height: 310px;
  }
  .hero-board {
    min-height: 310px;
    grid-column: 2;
    grid-row: 1;
  }
  .hero-copy {
    grid-column: 1;
    grid-row: 1;
    padding: 22px 16px;
  }
  .hero h1 { margin: 10px 0 8px; font-size: clamp(34px, 11vw, 48px); }
  .hero p { margin-bottom: 16px; font-size: 11px; line-height: 1.55; }
  .hero .mode-grid { grid-template-columns: 1fr; gap: 7px; }
  .hero .mode-button { min-height: 62px; padding: 14px 16px; border-radius: 14px; }
  .hero .mode-button strong { font-size: 15px; }
  .hero .mode-button span { display: none; }
  .game-layout {
    grid-template-columns: 1fr;
  }
  .game-side {
    grid-template-columns: 1fr auto;
  }
  .game-side .secondary {
    height: 100%;
  }
  .takeback-card .secondary {
    height: auto;
  }
  .home-info { grid-template-columns: 1fr; }
  .home-info section.wide { grid-column: auto; }
  .mode-guide-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .shell {
    width: min(100% - 18px, 980px);
  }
  .hero {
    min-height: 0;
    border-radius: 22px;
  }
  .lobby-actions {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 18px;
    border-radius: 22px;
  }
  .board-wrap {
    padding: 8px;
  }
  .point {
    touch-action: manipulation;
  }
  .choices {
    gap: 6px;
  }
  .choice span {
    padding: 13px 6px;
    font-size: 13px;
  }
  .game-side { grid-template-columns: 1fr; }
  .single-game-side { grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; }
  .single-game-side .status-card { min-width: 0; padding: 10px; border-radius: 12px; }
  .single-game-side .turn { gap: 6px; font-size: 11px; white-space: nowrap; }
  .single-game-side .mini-stone { width: 18px; height: 18px; }
  .single-game-side .tags { display: none; }
  .single-game-side .secondary { width: auto; height: 100%; padding: 0 11px; font-size: 11px; white-space: nowrap; }
  .portal-link {
    font-size: 11px;
  }
  .online-name { grid-template-columns: 1fr; justify-content: stretch; }
  .online-name input { width: 100%; }
  .home-info ul { grid-template-columns: 1fr; }
  .home-info .update-list li { grid-template-columns: 1fr; gap: 3px; }
  .game-footer { align-items: flex-start; flex-direction: column; }
}
