@charset "UTF-8";
/* Layout, responsive behaviour and interaction geometry. */
:root { color-scheme: light; --gold: #b58b5d; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 280px; background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); font-size: 14px; line-height: 1.65; }
button, input, select { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
button, a { touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
p, h1, h2 { margin: 0; }
svg { display: block; }
.page-wrap { max-width: 1256px; padding: 0 44px; margin: 0 auto; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 20; padding: 10px 16px; color: #fff; background: var(--green-dark); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.site-header { min-height: 116px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 10px); gap: 4px; padding: 10px; border: 1px solid #b9c4b5; }
.brand-mark i { width: 10px; height: 10px; border-radius: 50%; }
.brand-name { display: flex; align-items: baseline; gap: 10px; }
.brand-game { font: 12px var(--sans); white-space: nowrap; }
.rule-choice { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
.rule-choice legend { padding: 0; }
.rule-options { display: grid; grid-template-columns: 1fr 1fr; }
.rule-options label { position: relative; margin: 0; min-width: 0; }
.rule-options input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; padding: 0; cursor: pointer; }
.rule-options span { display: flex; align-items: center; justify-content: center; padding: 8px 5px; white-space: nowrap; border: 1px solid #d8dfcf; }
.rule-choice:disabled { opacity: .65; }
.play-modes { display: flex; }
.play-modes button { flex: 1; border: 0; background: transparent; }
.play-modes button[aria-pressed="true"] { font-weight: 600; }
.identity-fields { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 10px; }
.identity-fields > div { min-width: 0; }
.identity-fields select { width: 100%; min-height: 49px; padding: 10px 6px; font: inherit; }
.local-game #nextSides { display: none; }
.local-game [data-panel="invite"], .local-game #openInvite { display: none; }
.local-game .game-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.connection-status[data-state="local"] .status-dot { background: var(--gold); box-shadow: 0 0 0 3px #b27e381c; }
.rules-badge { white-space: nowrap; }
.header-note { display: flex; align-items: center; gap: 10px; }
.tiny-seal { display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); }
.home-view { display: grid; }
.eyebrow { display: flex; align-items: center; gap: 11px; font-size: 11px; letter-spacing: .18em; color: var(--green); font-weight: 500; }
.eyebrow > span:first-child:empty { width: 23px; height: 1px; background: var(--green); }
.intro-description { margin-top: 23px; font-size: 13px; line-height: 2.05; letter-spacing: .03em; }
.home-features { display: flex; gap: 0; }
.home-features span + span::before { content: "·"; padding: 0 13px; color: #a3ad98; }
.card-heading { display: flex; justify-content: space-between; align-items: center; }
.card-leaf { line-height: 1; }
.card-description { margin-top: 6px; color: var(--muted); font-size: 12px; }
label { display: block; }
.label-note { margin-left: 8px; }
input { display: block; min-width: 0; width: 100%; padding: 13px 14px; line-height: 1.5; }
input:disabled { opacity: .6; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 46px; padding: 11px 17px; border: 1px solid transparent; text-align: center; line-height: 1.5; transition: background .15s, border-color .15s, transform .15s; }
.button:not(:disabled):active { transform: translateY(1px); }
.create-button { width: 100%; justify-content: space-between; padding-inline: 20px; }
.create-button > span:last-child { font-size: 20px; line-height: 1; }
.form-divider { display: flex; align-items: center; gap: 13px; }
.form-divider::before, .form-divider::after { content: ""; flex: 1; height: 1px; }
.join-fields { display: flex; align-items: stretch; gap: 9px; }
.join-fields input { flex: 1; text-transform: uppercase; letter-spacing: .08em; font-size: 14px; padding-inline: 11px; }
.join-fields input::placeholder { letter-spacing: 0; }
.join-fields .button { flex-shrink: 0; padding-inline: 14px; }
.field-hint { margin-top: 9px; }
.privacy-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 25px; padding-top: 20px; border-top: 1px solid #eeeee5; }
.privacy-note svg { width: 15px; height: 15px; stroke-width: 1.2; flex: 0 0 auto; }
.invitation-notice { padding: 10px 12px; margin-top: 16px; background: var(--green-soft); border-radius: 6px; color: var(--green); font-size: 11px; line-height: 1.8; }
.has-invitation .create-button { background: var(--green-soft); color: var(--green); box-shadow: none; }
.has-invitation #joinButton { background: var(--green); border-color: var(--green); color: white; }
.resume-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 8px; padding: 11px; margin-top: 17px; }
.resume-card > div { display: flex; flex-direction: column; font-size: 10px; }
.resume-card strong { color: var(--ink); letter-spacing: .12em; font-size: 12px; font-weight: 500; }
.text-button { padding: 5px 1px; border: 0; background: transparent; color: var(--green); font-size: 11px; font-weight: 500; line-height: 1.6; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 23px 0 28px; border-top: 1px solid var(--line); }
.footer-brand > span { padding: 0 8px; }
.connection-status { display: flex; align-items: center; gap: 8px; }
.status-dot, .player-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #acae9f; flex: 0 0 auto; }
.connection-status[data-state="connecting"] .status-dot, .connection-status[data-state="reconnecting"] .status-dot, .connection-status[data-state="authenticating"] .status-dot { background: #ba9562; animation: breathe 1.5s ease-in-out infinite; }
.connection-status[data-state="failed"] .status-dot, .connection-status[data-state="offline"] .status-dot { background: #b08771; }
.game-view { padding-top: 29px; padding-bottom: 35px; }
.game-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 23px; }
.game-heading .eyebrow { font-size: 10px; gap: 8px; }
.heading-slash { color: #b4bbab; padding: 0 3px; }
.game-heading h1 { font: 500 27px/1.65 var(--serif); letter-spacing: .045em; margin-top: 6px; }
.game-heading .button { min-height: 38px; padding: 8px 12px; font-size: 11px; }
.game-heading .button > span { font-size: 17px; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 282px; gap: 27px; align-items: start; }
.play-column { min-width: 0; max-width: 718px; }
.players { display: flex; gap: 11px; align-items: stretch; margin-bottom: 15px; }
.player-card { position: relative; display: flex; gap: 11px; align-items: center; flex: 1; min-width: 0; padding: 13px 14px; border: 1px solid #e2e4d9; border-radius: 10px; transition: border-color .2s, background .2s; }
.player-card.is-turn { background: #f0f3e9; border-color: #a6b99a; }
.player-avatar { flex: 0 0 auto; width: 31px; height: 31px; border-radius: 50%; }
.avatar-black { box-shadow: 1px 2px 3px #2a312020; }
.avatar-white { background: radial-gradient(circle at 28% 24%, #fffefa, #f0ede0 60%, #dfddcd); border: 1px solid #dedfd2; box-shadow: 1px 2px 3px #2a312013; }
.player-info { min-width: 0; flex: 1; }
.player-name-line { display: flex; gap: 6px; align-items: center; min-width: 0; }
.player-name-line strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.you-tag { font-size: 9px; padding: 0 4px; border-radius: 3px; line-height: 1.7; flex: 0 0 auto; }
.player-meta { display: flex; gap: 4px; align-items: center; white-space: nowrap; }
.player-dot { width: 4px; height: 4px; }
.player-dot.is-online { background: #658b5a; }
.role-label { margin-left: 4px; }
.turn-indicator { position: absolute; top: -7px; right: 9px; padding: 0 6px; color: #fffef6; }
.versus { flex: 0 0 auto; align-self: center; font-size: 11px; line-height: 1.5; }
.board-turn-strip { display: flex; align-items: center; gap: 7px; padding: 0 3px; margin: -1px 0 12px; font-size: 10px; }
.board-turn-strip strong { font-weight: 500; }
.board-turn-strip > span:last-child { margin-left: auto; font-size: 9px; }
.turn-strip-dot { width: 5px; height: 5px; border-radius: 50%; }
.board-shell { border: 1px solid #cbb28b; border-radius: 12px; padding: 10px; }
.board-surface { position: relative; width: 100%; aspect-ratio: 1; border: 1px solid #c4a16b; border-radius: 5px; user-select: none; -webkit-user-select: none; }
.board-play-area { position: absolute; inset: 4.3%; }
.board-lines, .board-grid { position: absolute; inset: 0; width: 100%; height: 100%; }
.board-lines { overflow: visible; pointer-events: none; }
.board-lines .grid-line { stroke: #826b46; stroke-width: .026; opacity: .78; }
.board-lines .star-point { fill: #745f3d; }
.board-lines .winning-path { fill: none; stroke: #456b40; stroke-width: .17; stroke-linecap: round; stroke-linejoin: round; opacity: .6; }
.board-grid { display: grid; grid-template-rows: repeat(15, minmax(0, 1fr)); }
.board-row { display: grid; grid-template-columns: repeat(15, minmax(0, 1fr)); min-height: 0; }
.board-axis-top { position: absolute; display: grid; grid-template-columns: repeat(15, 1fr); left: 4.3%; right: 4.3%; top: .5%; text-align: center; font-size: clamp(7px, .9vw, 9px); line-height: 2; }
.board-axis-left { position: absolute; display: grid; grid-template-rows: repeat(15, 1fr); top: 4.3%; bottom: 4.3%; left: .35%; width: 3%; text-align: center; font-size: clamp(7px, .9vw, 9px); }
.board-axis-left > span { display: flex; align-items: center; justify-content: center; }
.intersection { appearance: none; -webkit-appearance: none; position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 5px; background: transparent; line-height: 1; color: var(--ink); touch-action: manipulation; cursor: default; }
.intersection[aria-disabled="false"] { cursor: pointer; }
.intersection:focus-visible { outline: 2px solid #38664f; outline-offset: -1px; background: #f9e6bc60; z-index: 2; }
.stone { display: block; width: 85%; height: 85%; position: relative; border-radius: 50%; opacity: 0; pointer-events: none; }
.has-black .stone { opacity: 1; box-shadow: 1px 2px 3px #57432166, inset 0 1px 1px #a5a69b33; }
.has-white .stone { opacity: 1; background: radial-gradient(circle at 28% 23%, #fffef7, #f3eedf 55%, #e0d5bd 95%); box-shadow: 1px 2px 3px #74583460, inset 0 0 0 1px #88745130; }
.is-last .stone::after { content: ""; position: absolute; width: 21%; height: 21%; left: 39.5%; top: 39.5%; border: 1.5px solid #ce916a; border-radius: 50%; }
.is-winning .stone { outline: 2px solid #547a46; outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) {
  .can-play .intersection[aria-disabled="false"]:hover::before { content: ""; width: 77%; height: 77%; border-radius: 50%; background: #29372d65; position: absolute; }
  .can-play[data-role="white"] .intersection[aria-disabled="false"]:hover::before { background: #fffbeeaa; box-shadow: inset 0 0 0 1px #bba77d; }
}
.move-controls { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.confirm-setting { display: flex; align-items: center; gap: 8px; margin: 0; min-height: 44px; cursor: pointer; }
.confirm-setting input { width: 18px; height: 18px; padding: 0; margin: 0; }
.move-controls .text-button { min-height: 44px; }
.move-preview { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid #c4d1b7; }
.move-preview p { font-size: 12px; line-height: 1.8; }
.move-preview > div { display: flex; gap: 8px; }
.move-preview .button { min-height: 44px; }
.intersection.is-preview .stone { opacity: .55; outline: 2px dashed #38664f; outline-offset: 2px; }
[data-role="white"] .intersection.is-preview .stone { background: #fffef7; }
.board-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 0 2px; }
.board-footer p { display: flex; align-items: center; gap: 6px; }
.legend-last { width: 7px; height: 7px; border: 1.5px solid #bd8d66; border-radius: 50%; }
.legend-win { width: 7px; height: 7px; border-radius: 50%; margin-left: 10px; }
.board-instructions { font-size: 9px; line-height: 1.8; margin-top: 9px; padding: 0 2px; }
.game-sidebar { display: flex; flex-direction: column; gap: 16px; }
.status-card { padding: 22px 23px; background: #eaf0e4; border: 1px solid #dce5d3; border-radius: 11px; }
.status-emblem { display: flex; align-items: center; justify-content: center; margin: 18px 0 12px; width: 43px; height: 43px; border: 1px solid #b9c9a7; border-radius: 50%; font: 23px var(--serif); }
.status-card h2 { font: 600 22px/1.6 var(--serif); letter-spacing: .03em; overflow-wrap: anywhere; }
.status-card > p { margin-top: 6px; min-height: 42px; }
.your-role { border-top: 1px solid #d7e1cc; padding-top: 11px; margin-top: 15px; }
.invite-card, .rematch-card { padding: 20px 22px; }
.small-card-heading { display: flex; align-items: center; justify-content: space-between; }
.small-card-heading > span { font-size: 19px; }
.invite-card h2, .rematch-card h2 { font-size: 13px; font-weight: 500; }
.invite-card > p, .rematch-card > p { margin-top: 5px; }
.room-code { display: flex; align-items: center; gap: 10px; margin: 15px 0 13px; padding: 12px 11px; }
.room-code > span { font-size: 9px; padding-right: 9px; border-right: 1px solid #dde1d2; white-space: nowrap; }
.room-code > strong { min-width: 0; overflow-wrap: anywhere; }
.copy-button, .rematch-card > .button { width: 100%; min-height: 40px; padding-block: 9px; font-size: 11px; }
.copy-button svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.3; }
.invite-card > .invite-footnote { margin-top: 10px; font-size: 9px; }
.copy-fallback { margin-top: 12px; }
.copy-fallback label { font-size: 10px; margin-bottom: 6px; }
.copy-fallback label > span { display: block; font-size: 9px; font-weight: 400; }
.copy-fallback input { font-size: 11px; padding: 9px; }
.copy-fallback .text-button { margin-top: 3px; }
.vote-status { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }
.vote-status span { font-size: 9px; border: 1px solid #e7e9dd; border-radius: 4px; padding: 3px 7px; }
.rematch-card > .button { justify-content: space-between; padding-inline: 14px; }
.rematch-card > .button > span { font-size: 18px; line-height: 1; }
.network-notice { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 16px; margin-bottom: 16px; background: #f1ecdf; border: 1px solid #e3d8bf; border-radius: 8px; }
.network-notice strong { font-size: 12px; font-weight: 500; color: #88734d; }
.network-notice p { margin-top: 2px; font-size: 10px; color: #a18b65; }
.network-notice .text-button { flex: 0 0 auto; color: #88734d; }
.storage-warning { margin-bottom: 16px; font-size: 11px; padding: 10px 14px; border-radius: 6px; background: #f5e9db; color: #967256; }
.leave-dialog { max-width: 415px; width: calc(100% - 38px); padding: 29px; border: 1px solid #dbdfd0; border-radius: 15px; color: var(--ink); }
.leave-dialog::backdrop { backdrop-filter: blur(3px); }
.leave-dialog h2 { font: 600 25px/1.6 var(--serif); margin-top: 10px; }
.leave-dialog p { font-size: 12px; margin-top: 12px; line-height: 1.9; }
.dialog-actions { display: flex; gap: 10px; margin-top: 25px; }
.dialog-actions .button { flex: 1; }
.toast { position: fixed; z-index: 30; display: flex; align-items: center; gap: 10px; bottom: max(26px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); padding: 13px 13px 13px 17px; max-width: min(490px, calc(100% - 32px)); width: max-content; border: 1px solid #52634d; color: #faf8eb; font-size: 12px; }
.toast-mark { font-size: 28px; line-height: .8; }
.toast button { border: 0; padding: 3px 7px; background: transparent; font-size: 20px; line-height: 1; margin-left: 5px; }
#toastText { overflow-wrap: anywhere; }
.noscript-note { padding: 16px; position: fixed; inset: auto 16px 16px; text-align: center; color: #fff; background: var(--green-dark); border-radius: 8px; }
@keyframes breathe { 50% { opacity: .4; }; }
@media (min-width: 1100px) {
  .game-layout { grid-template-columns: minmax(0, 718px) 282px; justify-content: center; gap: 32px; }
}
@media (max-width: 1000px) {
  .page-wrap { padding-inline: 28px; }
  .home-view { padding-inline: 0; }
  .game-layout { grid-template-columns: minmax(0, 1fr) 248px; gap: 20px; }
  .status-card, .invite-card, .rematch-card { padding: 18px; }
  .player-card { padding: 12px 10px; gap: 8px; }
  .role-label { display: none; }
  .status-card h2 { font-size: 20px; }
}
@media (max-width: 760px) {
  .page-wrap { padding-inline: 22px; }
  .site-header { min-height: 88px; }
  .brand-mark { padding: 8px; }
  .header-note { gap: 7px; }
  .home-intro { padding-inline: 4px; }
  .intro-description { margin-top: 14px; font-size: 12px; }
  .room-card { justify-self: center; }
  .join-fields input { font-size: 16px; }
  .site-footer { flex-direction: column; justify-content: center; gap: 5px; text-align: center; padding: 20px 0 25px; }
  .game-view { padding-top: 24px; }
  .game-heading h1 { font-size: 24px; }
  .game-layout { display: flex; flex-direction: column; gap: 20px; }
  .play-column { width: 100%; max-width: 620px; margin-inline: auto; }
  .game-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; width: 100%; }
  .status-card { grid-column: 1 / -1; display: grid; grid-template-columns: 44px 1fr; column-gap: 15px; padding: 16px 19px; align-items: center; }
  .status-card .section-number { display: none; }
  .status-emblem { grid-column: 1; grid-row: 1 / 3; margin: 0; }
  .status-card h2 { grid-column: 2; font-size: 21px; }
  .status-card > p { grid-column: 2; min-height: 0; margin-top: 2px; }
  .status-card .your-role { grid-column: 1 / -1; margin-top: 12px; padding-top: 9px; }
  .role-label { display: inline; }
  .board-axis-top, .board-axis-left { font-size: 8px; }
  .board-instructions { font-size: 9px; }
  .game-heading { margin-bottom: 17px; }
  .game-sidebar .rematch-card { align-self: start; }
}
@media (max-width: 460px) {
  .page-wrap { padding-inline: 18px; }
  .intro-description { font-size: 11px; }
  .home-features span + span::before { padding-inline: 9px; }
  .join-fields .button { padding-inline: 11px; font-size: 11px; }
  .privacy-note { gap: 5px; }
  .game-heading h1 { font-size: 21px; letter-spacing: 0; }
  .game-heading .button { font-size: 10px; padding: 7px 9px; gap: 4px; }
  .game-heading .eyebrow { font-size: 9px; }
  .game-heading { gap: 10px; }
  .players { gap: 8px; margin-bottom: 12px; }
  .player-card { padding: 11px 9px; gap: 8px; border-radius: 8px; }
  .player-avatar { width: 25px; height: 25px; }
  .player-meta { gap: 3px; }
  .role-label { display: none; }
  .you-tag { font-size: 8px; }
  .versus { font-size: 9px; }
  .board-shell { padding: 7px; border-radius: 9px; }
  .board-surface { border-radius: 3px; }
  .board-axis-top, .board-axis-left { font-size: 6px; }
  .stone { width: 87%; height: 87%; }
  .is-last .stone::after { border-width: 1px; }
  .is-winning .stone { outline-width: 1.5px; outline-offset: 0; }
  .board-footer { margin-top: 10px; }
  .board-instructions { font-size: 8px; }
  .game-sidebar { gap: 12px; }
  .invite-card, .rematch-card { padding: 16px; }
  .invite-card { grid-column: 1 / -1; }
  .rematch-card { grid-column: 1 / -1; }
  .invite-card .room-code { margin-block: 11px; }
  .status-card { column-gap: 12px; padding: 15px 17px; }
  .status-card h2 { font-size: 20px; }
  .network-notice { padding: 11px 13px; }
  .network-notice p { font-size: 9px; }
}
@media (max-width: 350px) {
  .page-wrap { padding-inline: 12px; }
  .brand-mark { padding: 7px; gap: 3px; }
  .label-note { margin-left: 3px; }
  .game-heading h1 { font-size: 18px; }
  .game-heading .button { font-size: 9px; padding-inline: 7px; }
  .player-card { gap: 6px; padding: 10px 7px; }
  .player-avatar { width: 21px; height: 21px; }
  .player-name-line { gap: 4px; }
  .you-tag { padding-inline: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.active-game { height: 100dvh; overflow: hidden; }
.active-game .page-wrap { height: 100%; display: grid; grid-template-rows: 48px minmax(0, 1fr); max-width: 1600px; padding-inline: 24px; }
.active-game .site-header { min-height: 0; }
.active-game .brand-mark { padding: 7px; grid-template-columns: repeat(2, 8px); gap: 3px; }
.active-game .brand-mark i { width: 8px; height: 8px; }
.active-game .brand-name { font-size: 23px; }
.active-game main { min-height: 0; }
.active-game .site-footer { display: none; }
.active-game .game-view { height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 6px 0 8px; }
.active-game .game-heading { flex: 0 0 auto; margin: 0; }
.active-game .game-heading > div { display: flex; align-items: baseline; gap: 17px; }
.active-game .game-heading h1 { margin: 0; }
.active-game .game-heading .eyebrow { letter-spacing: .04em; }
.active-game .game-layout { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr) 252px; gap: 20px; }
.active-game .play-column { height: 100%; max-width: none; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto 52px auto; min-height: 0; }
.active-game .players { margin: 0 0 6px; }
.active-game .player-card { padding: 6px 12px; }
.active-game .board-turn-strip { margin: 0 0 4px; }
.board-stage { min-width: 0; min-height: 0; display: grid; place-items: center; container-type: size; }
.active-game .board-shell { width: min(100cqw, 100cqh); max-width: 100%; padding: 4px; }
.active-game .board-lines .grid-line { stroke: #72542f; stroke-width: .032; opacity: .85; }
.active-game .board-axis-top, .active-game .board-axis-left { font-size: clamp(8px, 1vw, 11px); font-weight: 500; }
.active-game .board-footer { margin: 2px 0 0; }
.active-game .move-controls { margin-top: 2px; }
.move-slot { display: flex; align-items: center; min-width: 0; min-height: 0; }
.move-idle { width: 100%; border-top: 1px solid var(--line); padding: 12px 6px; text-align: center; }
.active-game .move-preview { width: 100%; flex-wrap: nowrap; padding: 8px 12px; gap: 8px; }
.active-game .move-preview p { font-size: 11px; }
.active-game .move-preview > div { flex: 0 0 auto; }
.active-game .move-preview .button { min-height: 40px; padding: 7px 12px; }
.active-game .game-sidebar { min-height: 0; max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 1px 4px 4px; scrollbar-width: thin; }
.active-game .status-card { display: block; padding: 18px; }
.active-game .status-emblem { margin: 12px 0; font-size: 21px; }
.active-game .status-card > p { font-size: 12px; min-height: 0; }
.panel-tabs { display: flex; gap: 5px; }
.panel-tabs button { flex: 1; min-height: 42px; padding: 6px; border: 0; background: transparent; white-space: nowrap; }
.panel-tabs .has-notice { color: #9c5f31; }
.rules-card { padding: 20px; }
.rules-card h2 { margin: 12px 0; }
.rules-card p { margin-top: 12px; }
.game-tools { display: none; }
.tools-dialog { padding: 22px; color: var(--ink); border: 1px solid #d7dfcc; border-radius: 22px 22px 0 0; width: min(100%, 520px); max-width: 100%; max-height: calc(100dvh - 40px); margin: auto auto 0; overflow-y: auto; overscroll-behavior: contain; }
.tools-dialog::backdrop { backdrop-filter: blur(3px); }
.tools-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.tools-heading h2 { font: 23px/1.6 var(--serif); margin-top: 5px; }
.tools-heading .text-button { min-height: 44px; font-size: 12px; }
.tools-heading .text-button span { font-size: 22px; padding-left: 8px; }
.active-game .toast { bottom: max(26px, env(safe-area-inset-bottom)); }
@media (max-width: 900px) {
  .active-game .page-wrap { padding: 0 6px; grid-template-rows: 46px minmax(0, 1fr); }
  .active-game .game-view { padding: 8px 0 max(8px, env(safe-area-inset-bottom)); gap: 8px; }
  .active-game .game-heading > div { display: block; }
  .active-game .game-heading .eyebrow { font-size: 9px; }
  .active-game .game-heading .button { min-height: 36px; }
  .active-game .game-layout { display: block; }
  .active-game .game-layout > .game-sidebar { display: none; }
  .active-game .play-column { max-width: 880px; margin: 0 auto; grid-template-rows: auto auto minmax(0, 1fr) auto 52px auto; }
  .active-game .player-card { padding: 8px 10px; }
  .active-game .player-avatar { width: 27px; height: 27px; }
  .active-game .players { margin-bottom: 8px; }
  .active-game .game-sidebar { max-height: none; padding: 0; overflow: visible; }
  .active-game .game-sidebar .status-card { padding: 14px 16px; }
  .active-game .game-sidebar .status-emblem { display: none; }
  .active-game .game-sidebar .status-card h2 { font-size: 19px; }
  .active-game .game-sidebar .your-role { margin-top: 8px; padding-top: 8px; }
  .game-tools { flex: 0 0 auto; display: grid; grid-template-columns: 1fr 1.15fr .8fr; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
  .game-tools button { min-height: 46px; border-radius: 10px; font-size: 12px; }
  .game-tools button > span:first-child { font-size: 18px; margin-right: 7px; }
  .active-game .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media (max-width: 760px) {
  .home-intro .eyebrow, .intro-description { display: none; }
}
@media (max-width: 360px) {
  .active-game .page-wrap { padding-inline: 6px; }
  .active-game .move-preview { padding: 7px; }
  .active-game .move-preview p { font-size: 10px; }
  .active-game .move-preview .button { padding-inline: 9px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .active-game .page-wrap { grid-template-rows: 42px minmax(0, 1fr); }
  .active-game .game-view { gap: 5px; padding-block: 4px; }
  .active-game .game-heading .button { min-height: 30px; padding-block: 4px; }
  .active-game .play-column { max-width: none; grid-template-columns: minmax(0, 1fr) 210px; grid-template-rows: auto minmax(0, 1fr) 68px; column-gap: 16px; }
  .active-game .players { grid-column: 2; grid-row: 1; }
  .active-game .board-turn-strip { grid-column: 1; grid-row: 1; align-self: center; }
  .active-game .board-stage { grid-column: 1; grid-row: 2 / 4; }
  .active-game .move-controls { grid-column: 2; grid-row: 2; align-self: start; }
  .active-game .move-slot { grid-column: 2; grid-row: 3; }
  .active-game .move-preview { flex-wrap: wrap; justify-content: center; }
  .active-game .move-preview p { width: 100%; text-align: center; }
  .active-game .move-preview .button { min-height: 32px; padding-block: 4px; }
  .active-game .board-footer { display: none; }
  .active-game .role-label, .active-game .player-meta { display: none; }
  .active-game .player-avatar { width: 20px; height: 20px; }
  .game-tools { padding-top: 4px; }
  .game-tools button { min-height: 36px; }
}
.brand-mark { transform: none; }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { border-color: #fff8e9; }
.tiny-seal { border-color: var(--vermilion); color: #fff8ee; }
.intro-description, .home-features { color: #676a76; }
.room-card { border-color: #dcdedb; background: var(--card); }
.privacy-note { border-color: var(--line); }
input { border-color: #d4d3da; }
button:focus-visible, a:focus-visible, input:focus-visible, .rule-options input:focus-visible + span { outline-color: var(--green); }
.button-quiet:hover { background: #e8e7ed; }
.form-divider::before, .form-divider::after { background: var(--line); }
.resume-card { background: #ececf3; }
.resume-card > div { color: #686b79; }
.has-invitation .create-button:hover:not(:disabled) { background: #dfe6f1; }
.player-card { border-color: #d6d8e1; background: #fbfaf8; }
#blackPlayer.is-turn { border-color: #7e92b3; background: #e9eef7; box-shadow: inset 3px 0 var(--green); }
#whitePlayer.is-turn { border-color: #c48b67; background: #faf0e2; box-shadow: inset 3px 0 var(--vermilion); }
.avatar-black, .has-black .stone { background: radial-gradient(circle at 30% 23%, #646d78, #292f39 57%, #151b23); }
#whitePlayer .turn-indicator { background: var(--vermilion); }
.board-shell { border-color: #ab895f; background: linear-gradient(135deg, #f2dec0, #b58b57); box-shadow: 0 14px 35px #4e392824, 0 2px 4px #4e39281c, inset 0 1px 0 #fff5e0; }
.board-surface { background-color: #e9cb98; background-size: cover; border-color: #c4a16b; box-shadow: inset 0 0 18px #976b3412; }
.board-axis-top, .board-axis-left { color: #785a34; }
.is-last .stone::after { border-color: #ef9872; }
.has-white.is-last .stone::after, .legend-last { border-color: var(--vermilion); }
.is-winning .stone { outline-color: var(--vermilion); }
.legend-win { background: var(--vermilion); }
.intersection:focus-visible { outline-color: var(--green); }
.intersection.is-preview .stone { background: #293248; outline-color: var(--green); }
.confirm-setting input { accent-color: var(--green); }
.move-preview p { color: var(--green-dark); }
.status-card { background-color: var(--green-dark); background-image: linear-gradient(140deg, #203746f7, #203746e8), url('./moju-hero.webp'); background-size: cover; background-position: center; border-color: #203746; color: #fff8ed; box-shadow: 0 8px 25px #20374616; }
.status-emblem { color: #f5cf96; border-color: #a3937b; background: #ffffff0a; }
.invite-card, .rematch-card, .rules-card { border-color: #d9d7d5; }
.small-card-heading > span { color: var(--vermilion); }
.invite-card > p, .rematch-card > p, .rules-card p, .invite-card > .invite-footnote, .board-instructions, .copy-fallback label > span { color: #72717b; }
.vote-status span { background: #f1f0f5; border-color: #d9d9e2; color: #717381; }
.tools-dialog::backdrop, .leave-dialog::backdrop { background: #19243b70; }
.game-tools button { border-color: #d6c8b7; }
.toast-mark { color: #f1c184; }
.toast button { color: #e2e8f2; }
body:not(.active-game) .page-wrap { max-width: 1360px; padding-inline: 36px; }
body:not(.active-game) .site-header { min-height: 86px; }
.home-view { grid-template-columns: minmax(0, 1.25fr) minmax(350px, .9fr); padding: 28px 0; align-items: stretch; min-height: calc(100svh - 156px); }
.home-intro { position: relative; min-height: 610px; overflow: hidden; isolation: isolate; background: #eee8dc; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; z-index: -2; }
.home-intro::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-copy { position: relative; }
.home-intro .eyebrow { font: 11px/1.6 var(--sans); }
.home-intro h1 { font: 600 clamp(36px, 3.8vw, 52px)/1.35 var(--serif); }
.home-intro .intro-description { display: block; margin-top: 20px; }
.home-features { margin-top: 22px; color: #52616c; letter-spacing: .02em; }
.home-features span { backdrop-filter: blur(6px); }
.home-features span + span { margin-left: 7px; }
.home-features span + span::before { display: none; }
.hero-caption { position: absolute; left: 32px; right: 32px; bottom: 24px; display: flex; align-items: center; gap: 12px; color: #fffdf6; text-shadow: 0 1px 7px #312419; }
.caption-line { width: 24px; height: 1px; background: currentColor; }
.caption-mark { margin-left: auto; border: 1px solid #fff8e6b3; padding: 2px 7px; font: 20px var(--serif); }
.room-card { align-self: center; width: 100%; max-width: none; }
.card-leaf { font-size: 14px; letter-spacing: .2em; }
.room-card h2 { font: 600 25px/1.5 var(--sans); }
.room-card .card-description { line-height: 1.65; }
.active-game .site-header { border-bottom-color: #d7dedf; }
.active-game .player-card { border-color: #d5dcdf; }
.room-code { border-color: #cdbb9f; }
.move-idle { font-size: 13px; }
@media (max-width: 1050px) and (min-width: 761px) {
  body:not(.active-game) .page-wrap { padding-inline: 24px; }
  .home-view { grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr); }
}
@media (max-width: 760px) {
  body:not(.active-game) .page-wrap { padding-inline: 18px; }
  body:not(.active-game) .site-header { min-height: 60px; }
  .home-view { grid-template-columns: 1fr; min-height: 0; padding: 14px 0; }
  .hero-image { object-position: center 65%; }
  .home-intro .eyebrow, .home-intro .intro-description, .hero-caption { display: none; }
  .home-intro h1 br { display: none; }
  .home-intro h1 span { display: block; font-size: 20px; }
  .home-features span + span { margin-left: 4px; }
  .room-card { max-width: 520px; }
  .card-heading { display: none; }
  .card-description { font-size: 11px; }
  .form-divider { margin-block: 14px; }
  .privacy-note { margin-top: 9px; padding-top: 8px; }
  body:not(.active-game) .site-footer { padding-block: 10px; }
}
