/* 1.3.x visual polish: preserve the existing ink-and-gold identity while
   improving hierarchy, contrast, spacing and mobile ergonomics. */

:root {
  --polish-gold: #d8b372;
  --polish-gold-soft: rgba(216, 179, 114, .18);
  --polish-jade: #80b9a4;
  --polish-surface: rgba(18, 25, 20, .92);
  --polish-surface-2: rgba(11, 16, 13, .96);
  --polish-line: rgba(216, 179, 114, .18);
  --polish-line-strong: rgba(216, 179, 114, .34);
  --polish-text: #eee7dc;
  --polish-muted: #aaa496;
  --polish-dim: #777d72;
  --polish-shadow: 0 24px 64px rgba(0, 0, 0, .28);
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(216, 179, 114, .30);
  color: #fff8eb;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:is(.art-lobby, .art-review, .art-game, .online-body, .ai-body, .profile-body) .topbar {
  position: sticky;
  top: 0;
  z-index: 150;
  height: 68px;
  border-bottom: 1px solid rgba(216, 179, 114, .16);
  background:
    linear-gradient(180deg, rgba(9, 13, 10, .96), rgba(9, 13, 10, .82) 74%, rgba(9, 13, 10, .72));
  box-shadow: 0 12px 38px rgba(0, 0, 0, .19);
  backdrop-filter: blur(18px) saturate(1.08);
}

:is(.art-lobby, .art-review, .art-game, .online-body, .ai-body, .profile-body) .topbar::after {
  content: "";
  position: absolute;
  left: max(24px, calc((100% - 1400px) / 2));
  right: max(24px, calc((100% - 1400px) / 2));
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 179, 114, .30), transparent);
  pointer-events: none;
}

:is(.art-lobby, .art-review, .art-game, .online-body, .ai-body, .profile-body) .brand {
  gap: 12px;
}

:is(.art-lobby, .art-review, .art-game, .online-body, .ai-body, .profile-body) .brand-seal {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .20), transparent 35%),
    linear-gradient(145deg, #d36248, #a43f2f);
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 232, .22),
    0 7px 18px rgba(0, 0, 0, .22);
  border-radius: 8px;
}

:is(.art-lobby, .art-review, .art-game, .online-body, .ai-body, .profile-body) .brand-name {
  color: #f1e9dc;
  font-weight: 500;
  letter-spacing: .075em;
}

:is(.art-lobby, .art-review, .art-game, .online-body, .ai-body, .profile-body) .nav-btn,
:is(.art-lobby, .art-review, .art-game, .online-body, .ai-body, .profile-body) .main-nav a {
  border-radius: 7px;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

:is(.art-lobby, .art-review, .art-game, .online-body, .ai-body, .profile-body) .nav-btn:hover,
:is(.art-lobby, .art-review, .art-game, .online-body, .ai-body, .profile-body) .main-nav a:hover {
  background: rgba(255, 248, 232, .045);
}

/* Hall: stronger rhythm without adding explanatory copy. */
.art-lobby .hub-main {
  width: min(100% - 52px, 1380px);
  padding-top: clamp(28px, 4.5vh, 54px);
}

.art-lobby .hub-head {
  position: relative;
  padding: 8px 2px 23px;
  border-bottom: 0;
}

.art-lobby .hub-head::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 0;
  height: 1px;
  background:
    linear-gradient(90deg, rgba(216, 179, 114, .34), rgba(216, 179, 114, .10) 34%, transparent 82%);
}

.art-lobby .hub-head h1 {
  color: #f1eadf;
  font-size: clamp(40px, 4.1vw, 54px);
  text-shadow: 0 12px 34px rgba(0, 0, 0, .26);
}

.art-lobby .hub-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.art-lobby .hub-card {
  min-height: 228px;
  padding: 24px 24px 20px;
  border-color: rgba(216, 179, 114, .16);
  border-radius: 15px;
  background:
    radial-gradient(260px 170px at 100% 0%, rgba(216, 179, 114, .075), transparent 68%),
    linear-gradient(155deg, rgba(255, 255, 255, .030), transparent 34%),
    linear-gradient(180deg, rgba(21, 29, 23, .96), rgba(10, 15, 12, .98));
  box-shadow:
    0 18px 44px rgba(0, 0, 0, .20),
    inset 0 1px 0 rgba(255, 248, 232, .055);
  isolation: isolate;
}

.art-lobby .hub-card::before {
  width: 220px;
  height: 220px;
  right: -76px;
  top: -94px;
  background:
    radial-gradient(circle, rgba(216, 179, 114, .11), transparent 64%);
}

.art-lobby .hub-card::after {
  left: 22px;
  right: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 179, 114, .28), transparent);
}

.art-lobby .hub-card:hover {
  transform: translateY(-4px);
  border-color: rgba(216, 179, 114, .38);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, .29),
    inset 0 1px 0 rgba(255, 248, 232, .085);
}

.art-lobby .hub-card .hub-seal {
  width: 40px;
  height: 40px;
  margin-bottom: 28px;
  border-radius: 9px;
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 239, .16),
    0 9px 22px rgba(0, 0, 0, .20);
  transition: transform .22s ease, box-shadow .22s ease;
}

.art-lobby .hub-card:hover .hub-seal {
  transform: translateY(-1px) rotate(-2deg);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 239, .20),
    0 12px 28px rgba(0, 0, 0, .24);
}

.art-lobby .hub-card h2 {
  font-size: 26px;
  color: #eee6d9;
}

.art-lobby .hub-card .hub-meta {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid rgba(216, 179, 114, .075);
  font-size: 9px;
  letter-spacing: .04em;
}

.art-lobby .hub-card .hub-no {
  display: grid;
  place-items: center;
  min-width: 29px;
  height: 20px;
  right: 20px;
  top: 19px;
  border: 1px solid rgba(216, 179, 114, .13);
  border-radius: 999px;
  background: rgba(255, 255, 255, .018);
}

.art-lobby .hub-card .hub-arrow {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(216, 179, 114, .16);
  border-radius: 50%;
  background: rgba(216, 179, 114, .035);
  font-size: 13px;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.art-lobby .hub-card:hover .hub-arrow {
  transform: translate(2px, -2px);
  border-color: rgba(216, 179, 114, .34);
  background: rgba(216, 179, 114, .075);
}

/* Online lobby: give the shorter join card a quiet Go-board watermark. */
.online-body .online-page {
  padding-top: clamp(22px, 3.2vh, 36px);
}

.online-body .lobby-grid {
  max-width: 1080px;
  gap: 18px;
}

.online-body .lobby-card {
  padding: 28px;
  border-radius: 16px;
  border-color: rgba(216, 179, 114, .19);
  background:
    radial-gradient(420px 260px at 100% 0%, rgba(216, 179, 114, .055), transparent 70%),
    linear-gradient(155deg, rgba(255, 255, 255, .025), transparent 36%),
    linear-gradient(180deg, rgba(21, 29, 23, .96), rgba(10, 15, 12, .98));
  box-shadow:
    0 28px 74px rgba(0, 0, 0, .24),
    inset 0 1px 0 rgba(255, 248, 232, .055);
}

.online-body .join-card {
  position: relative;
  isolation: isolate;
}

.online-body .join-card::before {
  content: "";
  position: absolute;
  right: -88px;
  bottom: -102px;
  z-index: -1;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(216, 179, 114, .11);
  border-radius: 16px;
  background:
    linear-gradient(90deg, transparent calc(50% - .5px), rgba(216, 179, 114, .09) 50%, transparent calc(50% + .5px)),
    linear-gradient(transparent calc(50% - .5px), rgba(216, 179, 114, .09) 50%, transparent calc(50% + .5px)),
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(216, 179, 114, .055) 34px 35px),
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(216, 179, 114, .055) 34px 35px);
  transform: rotate(-8deg);
  opacity: .80;
  pointer-events: none;
}

.online-body .lobby-card-head {
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(216, 179, 114, .10);
}

.online-body .lobby-card-head h2 {
  font-size: 28px;
  color: #f0e8dc;
}

.online-body .field-label {
  margin-top: 16px;
  color: #989b8f;
  font-size: 10px;
}

.online-body .text-input {
  height: 46px;
  border-color: rgba(216, 179, 114, .18);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .038), rgba(255, 255, 255, .015));
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .16);
}

.online-body .text-input:focus {
  border-color: rgba(216, 179, 114, .56);
  box-shadow:
    0 0 0 3px rgba(216, 179, 114, .075),
    inset 0 1px 2px rgba(0, 0, 0, .13);
}

.online-body .preset-option {
  padding: 12px 13px;
  border-radius: 10px;
}

.online-body .preset-option.active {
  box-shadow:
    inset 2px 0 0 rgba(216, 179, 114, .70),
    inset 0 1px 0 rgba(255, 248, 232, .035);
}

.online-body .create-submit,
.online-body .join-submit {
  height: 48px;
  border-radius: 9px;
  letter-spacing: .04em;
}

.online-body .create-submit {
  background:
    linear-gradient(180deg, #e2c184, #cda76b);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .34),
    0 12px 28px rgba(216, 179, 114, .13);
}

.online-body .join-submit {
  border-color: rgba(216, 179, 114, .30);
  background:
    linear-gradient(180deg, rgba(216, 179, 114, .085), rgba(216, 179, 114, .025));
}

.online-body .nigiri-note {
  margin-top: 16px;
  padding: 13px 14px;
  border-radius: 11px;
}

/* Shared panel and control refinement. */
.online-body .panel,
.ai-body .panel {
  border-color: rgba(216, 179, 114, .17);
  border-radius: 14px;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, .20),
    inset 0 1px 0 rgba(255, 248, 232, .045);
}

.online-body .panel-head.compact h2,
.ai-body .panel-head.compact h2 {
  font-size: 16px;
  color: #eee6d9;
}

.online-body .action-btn,
.ai-body .action-btn {
  min-height: 38px;
  border-radius: 8px;
  font-weight: 500;
  letter-spacing: .025em;
}

.online-body .action-btn.primary,
.ai-body .action-btn.primary {
  border-color: rgba(235, 205, 150, .70);
  background:
    linear-gradient(180deg, #e4c184, #cda66a);
  color: #19140c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .36),
    0 10px 24px rgba(216, 179, 114, .12);
}

.online-body .phase-pill,
.ai-body .phase-pill,
.online-body .live-pill {
  padding: 4px 8px;
  letter-spacing: .06em;
}

/* AI page: restore the intended paper opponent card and improve side rails. */
.ai-body .workspace {
  grid-template-columns: minmax(0, 660px) 386px;
  gap: 30px;
}

.ai-body .match-line,
.ai-body .board-frame {
  max-width: 660px;
}

.ai-body .board-frame,
.online-body .board-frame {
  box-shadow:
    0 0 0 3px #2b1a0d,
    0 0 0 4px #62401f,
    0 0 0 5px rgba(216, 179, 114, .25),
    0 30px 72px rgba(0, 0, 0, .36),
    inset 0 1px 0 rgba(255, 248, 232, .060);
}

.ai-body .analysis-column {
  gap: 14px;
}

.ai-body .panel.ai-panel {
  color: #1b201a;
  border-color: rgba(244, 232, 210, .34);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .48), transparent 34%),
    radial-gradient(500px 190px at 100% 0%, rgba(199, 160, 101, .19), transparent 70%),
    linear-gradient(180deg, #f2ecdf 0%, #e7ddca 100%);
  box-shadow:
    0 22px 52px rgba(0, 0, 0, .30),
    inset 0 1px 0 rgba(255, 255, 255, .72);
}

.ai-body .ai-panel-head {
  gap: 13px;
}

.ai-body .ai-panel-head h2 {
  color: #1d221c;
}

.ai-body .ai-title p {
  color: #6f6c61;
  font-size: 10px;
}

.ai-body .rating-cell span,
.ai-body .rating-cell small,
.ai-body .ai-latency {
  color: #817b6d;
}

.ai-body .ai-blurb {
  color: #565b50;
  font-size: 11px;
}

.ai-body .analysis-stats span {
  color: #8b8f84;
  font-size: 9px;
}

.ai-body .analysis-stats b {
  font-size: 11px;
}

.ai-body .move-list {
  max-height: 180px;
}

/* Online game: make the clock and action hierarchy easier to scan. */
.online-body .online-game {
  grid-template-columns: minmax(0, 600px) 376px;
  gap: 30px;
}

.online-body .board-area {
  max-width: 600px;
}

.online-body .clock-card {
  padding: 12px 14px 10px;
  border-radius: 10px;
}

.online-body .clock-card.active {
  box-shadow:
    inset 0 1px 0 rgba(216, 179, 114, .15),
    0 16px 36px rgba(0, 0, 0, .25);
}

.online-body .clock-main {
  margin-top: 5px;
  font-size: 30px;
  font-weight: 450;
}

.online-body .online-actions .action-btn {
  height: 40px;
}

.online-body .hidden-winrate {
  background:
    radial-gradient(280px 170px at 50% 0%, rgba(216, 179, 114, .085), transparent 72%),
    linear-gradient(180deg, rgba(24, 31, 26, .96), rgba(14, 20, 16, .98));
}

.online-body .side-meta,
.online-body .hidden-winrate p,
.online-body .chat-empty,
.online-body .role-note {
  font-size: 10px;
}

.online-body .move-count,
.online-body .chat-msg,
.online-body .chat-msg-name,
.online-body .chat-msg-role,
.online-body .chat-msg-time {
  font-size: 9px;
}

.online-body .chat-msg,
.online-body .report-texts p,
.online-body .traditional-report p {
  font-size: 10px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.online-body .review-playback {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(216, 179, 114, .17);
  border-radius: 11px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, .022), transparent 36%),
    rgba(14, 20, 16, .90);
  box-shadow: inset 0 1px 0 rgba(255, 248, 232, .035);
}

.online-body .review-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 78px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(216, 179, 114, .34);
  border-radius: 8px;
  background: rgba(216, 179, 114, .065);
  color: var(--gold);
  font: 10px var(--font-ui);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.online-body .review-play-btn:hover {
  border-color: rgba(216, 179, 114, .58);
  background: rgba(216, 179, 114, .11);
}

.online-body .review-play-btn.playing {
  border-color: rgba(235, 205, 150, .72);
  background: linear-gradient(180deg, #e2c184, #cda66a);
  color: #17130b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .32),
    0 9px 22px rgba(216, 179, 114, .11);
}

.review-play-icon {
  min-width: 10px;
  font: 11px var(--font-mono);
  line-height: 1;
}

.online-body .review-progress-wrap {
  display: block;
  min-width: 0;
}

.online-body .review-progress-wrap input[type="range"] {
  --review-progress: 0%;
  width: 100%;
  height: 20px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.online-body .review-progress-wrap input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--gold) 0 var(--review-progress), rgba(255, 248, 232, .10) var(--review-progress) 100%);
}

.online-body .review-progress-wrap input[type="range"]::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  margin-top: -5.5px;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid #151b16;
  border-radius: 50%;
  background: #e5c388;
  box-shadow:
    0 0 0 1px rgba(216, 179, 114, .45),
    0 5px 14px rgba(0, 0, 0, .38);
}

.online-body .review-progress-wrap input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 248, 232, .10);
}

.online-body .review-progress-wrap input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--gold);
}

.online-body .review-progress-wrap input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid #151b16;
  border-radius: 50%;
  background: #e5c388;
  box-shadow: 0 0 0 1px rgba(216, 179, 114, .45);
}

.review-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: -1px;
  color: #777d72;
  font: 8px var(--font-mono);
  letter-spacing: .035em;
}

.review-progress-meta span:last-child {
  color: #5e655b;
}

.online-body .review-speed {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #8a9084;
  font-size: 9px;
  white-space: nowrap;
}

.online-body .review-speed select {
  height: 34px;
  padding: 0 25px 0 9px;
  border: 1px solid rgba(216, 179, 114, .20);
  border-radius: 7px;
  outline: none;
  background: #111711;
  color: #d8cdbb;
  font: 10px var(--font-mono);
  cursor: pointer;
}

.online-body .review-speed select:focus {
  border-color: rgba(216, 179, 114, .52);
  box-shadow: 0 0 0 3px rgba(216, 179, 114, .07);
}

/* Profiles, ranking and watch pages share the same sparse editorial layout. */
.profile-body .profile-page,
.art-review .subpage {
  padding-top: clamp(30px, 4.4vh, 52px);
}

.profile-body .profile-empty {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border-color: rgba(216, 179, 114, .17);
  background:
    radial-gradient(420px 260px at 50% 0%, rgba(216, 179, 114, .075), transparent 70%),
    linear-gradient(155deg, rgba(255, 255, 255, .025), transparent 35%),
    linear-gradient(180deg, rgba(21, 29, 23, .92), rgba(10, 15, 12, .96));
  box-shadow:
    0 26px 70px rgba(0, 0, 0, .24),
    inset 0 1px 0 rgba(255, 248, 232, .05);
}

.profile-body .profile-empty::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(216, 179, 114, .08);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    linear-gradient(90deg, transparent calc(50% - .5px), rgba(216, 179, 114, .055) 50%, transparent calc(50% + .5px)),
    linear-gradient(transparent calc(50% - .5px), rgba(216, 179, 114, .055) 50%, transparent calc(50% + .5px));
  pointer-events: none;
}

.profile-body .profile-empty > * {
  position: relative;
  z-index: 1;
}

.profile-body .profile-empty h1 {
  font-size: 34px;
  color: #f0e8dc;
}

.profile-body .profile-empty p {
  color: #a7a296;
  font-size: 13px;
}

.art-review .subpage-head {
  border-bottom: 0;
  position: relative;
  padding-bottom: 24px;
}

.art-review .subpage-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(216, 179, 114, .34), rgba(216, 179, 114, .08) 40%, transparent 88%);
}

.art-review .subpage-head h1 {
  color: #f0e8dc;
  font-size: clamp(38px, 4vw, 48px);
}

.art-review .rank-table {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(216, 179, 114, .15);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .018), transparent 32%),
    rgba(13, 19, 15, .72);
  box-shadow:
    0 22px 56px rgba(0, 0, 0, .19),
    inset 0 1px 0 rgba(255, 248, 232, .04);
}

.art-review .rank-head,
.art-review .rank-row {
  padding-inline: 20px;
}

.art-review .rank-head {
  min-height: 44px;
  background: rgba(216, 179, 114, .035);
  color: #8e9388;
}

.art-review .rank-row {
  min-height: 64px;
  transition: background .18s ease;
}

.art-review .rank-row:hover {
  background: rgba(216, 179, 114, .035);
}

.art-review .rank-row .name {
  color: #efe5d6;
  font-size: 13px;
}

.art-review .rank-row .rating {
  color: #e7c78f;
  font-size: 14px;
}

.art-review .subpage-empty {
  margin-top: 18px;
  padding: 64px 20px;
  border: 1px solid rgba(216, 179, 114, .14);
  border-radius: 14px;
  background: rgba(255, 255, 255, .012);
  color: #969b8f;
  font-size: 13px;
}

/* Mobile ergonomics. */
@media (max-width: 1180px) {
  .art-lobby .hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-body .workspace,
  .online-body .online-game {
    grid-template-columns: minmax(0, 1fr) 350px;
  }
}

@media (max-width: 1020px) {
  .ai-body .workspace,
  .online-body .online-game {
    grid-template-columns: 1fr;
  }

  .ai-body .analysis-column,
  .online-body .online-side {
    gap: 12px;
  }
}

@media (max-width: 760px) {
  :is(.art-lobby, .art-review, .art-game, .online-body, .ai-body, .profile-body) .topbar {
    height: 62px;
    padding-inline: 14px;
  }

  :is(.art-lobby, .art-review, .art-game, .online-body, .ai-body, .profile-body) .topbar::after {
    left: 14px;
    right: 14px;
  }

  .art-lobby .hub-main {
    width: calc(100% - 24px);
    padding-top: 20px;
  }

  .art-lobby .hub-head {
    padding-bottom: 17px;
  }

  .art-lobby .hub-head h1 {
    font-size: 37px;
  }

  .art-lobby .hub-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 15px;
  }

  .art-lobby .hub-card {
    min-height: 164px;
    padding: 19px;
    border-radius: 13px;
  }

  .art-lobby .hub-card .hub-seal {
    width: 34px;
    height: 34px;
    margin-bottom: 18px;
  }

  .art-lobby .hub-card h2 {
    font-size: 23px;
  }

  .online-body .lobby-card {
    padding: 20px;
    border-radius: 14px;
  }

  .online-body .lobby-card-head h2 {
    font-size: 24px;
  }

  .online-body .text-input {
    height: 48px;
  }

  .online-body .clock-main {
    font-size: 22px;
  }

  .online-body .online-actions .action-btn {
    min-width: 0;
  }

  .online-body .panel,
  .ai-body .panel {
    border-radius: 12px;
  }

  .ai-body .setup-opponent {
    padding: 13px;
  }

  .ai-body .ai-setup {
    align-items: end;
    justify-items: center;
    overflow-x: hidden;
    padding: 10px;
  }

  .ai-body .ai-setup-card {
    width: 100%;
    max-width: calc(100vw - 20px);
    padding: 22px 16px 18px;
    overflow-x: hidden;
  }

  .ai-body .setup-opponent {
    gap: 9px;
  }

  .ai-body .setup-opponent .action-btn {
    border-color: rgba(216, 179, 114, .28);
    background: rgba(216, 179, 114, .055);
    color: #d6c8b2;
  }

  .ai-body .setup-exit {
    color: #9b9c90;
  }

  .ai-body .setup-opponent-copy b,
  .ai-body .setup-opponent-copy span,
  .ai-body .setup-opponent-copy em {
    overflow-wrap: anywhere;
  }

  .ai-body .setup-sizes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ai-body .setup-mode span:last-child {
    margin-left: 0;
  }

  .online-body .review-playback {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 9px 10px;
    padding: 10px;
  }

  .online-body .review-play-btn {
    min-width: 74px;
  }

  .online-body .review-speed {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .online-body .review-progress-wrap {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 520px) {
  :is(.online-body, .ai-body) .brand {
    gap: 0;
  }

  :is(.online-body, .ai-body) .brand-name {
    display: none;
  }

  :is(.online-body, .ai-body) .brand-seal {
    width: 31px;
    height: 31px;
    font-size: 19px;
  }

  :is(.online-body, .ai-body) .main-nav {
    flex: 0 1 auto;
    min-width: 0;
    gap: 3px;
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 18px), transparent 100%);
  }

  :is(.online-body, .ai-body) .main-nav .nav-btn:not(.active):not(.online-nav-cta) {
    display: none;
  }

  :is(.online-body, .ai-body) .main-nav .nav-btn {
    padding-inline: 8px;
  }

  .online-body .clock-card {
    padding: 9px 8px 8px;
  }

  .online-body .clock-name {
    font-size: 10px;
  }

  .online-body .clock-role {
    font-size: 8px;
  }

  .online-body .clock-main {
    font-size: 20px;
  }

  .online-body .board-frame,
  .ai-body .board-frame {
    box-shadow:
      0 0 0 2px #2b1a0d,
      0 0 0 3px #62401f,
      0 0 0 4px rgba(216, 179, 114, .22),
      0 22px 48px rgba(0, 0, 0, .34);
  }

  .online-body .confirm-bar {
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .art-lobby .hub-card,
  .art-lobby .hub-card .hub-seal,
  .art-lobby .hub-card .hub-arrow {
    transition: none !important;
  }
}
