/* 강만두 사이트 기본 테마 — 흰 배경, 강조색 하나, 넉넉한 여백 (설계서 10.1) */
:root {
  --accent: #3b6ef5;
  --accent-weak: #eef3ff;
  --text: #1d1f23;
  --muted: #6b7280;
  --line: #e7e9ee;
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --ok: #157f3b;
  --ok-bg: #ebf7ef;
  --warn: #9a5b00;
  --warn-bg: #fff6e5;
  --danger: #c0262d;
  --radius: 12px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.65; font-size: 16px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; border-radius: 8px; }
code { font-size: 0.9em; background: var(--bg-soft); padding: 0.1em 0.35em; border-radius: 4px; }
[hidden] { display: none !important; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.wrap.wide { max-width: 1080px; }
.main { padding-top: 28px; padding-bottom: 64px; min-height: 60vh; }

/* 머리말 */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 18px; color: var(--text); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.site-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.site-nav a, .link-button { color: var(--muted); padding: 6px 10px; border-radius: 8px; font-size: 15px; }
.site-nav a:hover, .link-button:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.site-nav a.active { color: var(--text); font-weight: 600; }
.lang-switch { border: 1px solid var(--line); margin-left: 6px; }
.link-button { background: none; border: 0; font: inherit; cursor: pointer; }
form.inline { display: inline; margin: 0; }

.lang-suggest { background: var(--accent-weak); font-size: 14px; }
.lang-suggest .wrap { display: flex; gap: 12px; align-items: center; min-height: 40px; }
.lang-suggest button { margin-left: auto; }

/* 바닥글 */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; gap: 16px; align-items: center; min-height: 64px; flex-wrap: wrap; }
.footer-inner a { color: var(--muted); }
.footer-login { margin-left: auto; }

/* 공통 요소 */
.page-title { font-size: 26px; line-height: 1.3; margin: 0 0 20px; letter-spacing: -0.02em; }
.section-title { font-size: 18px; margin: 28px 0 12px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--bg); margin-bottom: 16px; }
.card .section-title:first-child { margin-top: 0; }
.card.narrow { max-width: 440px; }
.empty-state { text-align: center; color: var(--muted); padding: 40px 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.text-link { font-weight: 600; font-size: 15px; }
.back-link { display: inline-block; color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.notice { background: var(--bg-soft); border-radius: 8px; padding: 10px 14px; font-size: 14px; color: var(--muted); }
.flash { border-radius: 8px; padding: 10px 14px; font-size: 15px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.warn { background: var(--warn-bg); color: var(--warn); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack > .btn { align-self: flex-start; }
.row-between > .page-title { margin: 0; }
.row-between:has(> .page-title) { margin-bottom: 20px; }
.tag { color: var(--muted); font-size: 14px; margin-left: 8px; }

/* 버튼·입력 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--bg-soft); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
.btn.primary:hover { filter: brightness(0.95); }
.btn.danger { color: var(--danger); border-color: #f1c9cb; }
.btn.small { padding: 5px 10px; font-size: 13px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
label.radio, label.checkbox { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 15px; }
label.disabled { color: var(--muted); }
input, textarea, select { font: inherit; font-size: 16px; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--bg); width: 100%; }
input[type="radio"], input[type="checkbox"] { width: auto; }
input:focus, textarea:focus { outline: 2px solid var(--accent-weak); border-color: var(--accent); }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
.warn-box { background: var(--warn-bg); padding: 12px; border-radius: 10px; }

/* 홈·소개 */
.profile-card { display: flex; gap: 18px; align-items: center; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-weak); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 26px; flex: none; }
.profile-name { margin: 0; font-size: 22px; }
.profile-bio { margin: 4px 0 0; color: var(--muted); }

/* 글 목록·본문 */
.post-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.post-card { display: grid; gap: 2px; padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--text); }
.post-card:hover { text-decoration: none; background: var(--bg-soft); }
.post-card-title { font-weight: 600; font-size: 17px; }
.post-card-excerpt { color: var(--muted); font-size: 15px; }
.post-card-date { color: var(--muted); font-size: 13px; }
.pager { display: flex; gap: 12px; margin-top: 16px; }
.post-title { font-size: 30px; line-height: 1.3; margin: 0 0 8px; letter-spacing: -0.02em; }
.post-meta { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.prose { font-size: 17px; overflow-wrap: anywhere; }
.prose h1, .prose h2, .prose h3 { line-height: 1.35; margin: 1.6em 0 0.6em; }
.prose h2 { font-size: 22px; }
.prose blockquote { margin: 1em 0; padding-left: 14px; border-left: 3px solid var(--line); color: var(--muted); }
.prose pre { background: var(--bg-soft); padding: 14px; border-radius: 10px; overflow-x: auto; font-size: 14px; }
.prose pre code { background: none; padding: 0; }

/* 작업실 */
.studio-list { list-style: none; padding: 0; margin: 0; }
.studio-item-title { font-weight: 600; font-size: 17px; color: var(--text); }
.studio-item > p { margin: 6px 0 0; }
.studio-item form.row { margin-top: 10px; }
.lang-tag { display: inline-block; font-size: 12px; font-weight: 500; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; margin-left: 8px; vertical-align: 2px; }
.chip { display: inline-block; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); white-space: nowrap; }
.chip-published { background: var(--ok-bg); color: var(--ok); }
.chip-edited { background: var(--accent-weak); color: var(--accent); }
.chip-preparing { background: var(--warn-bg); color: var(--warn); }
.chip-held { background: #fde8e8; color: var(--danger); }
.chip-deleting { background: #fde8e8; color: var(--danger); }
.helper-note { background: var(--accent-weak); border-radius: 10px; padding: 10px 14px; font-size: 15px; margin: 10px 0; }
.helper-note strong { color: var(--accent); margin-right: 6px; }

.editor { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.editor-title { font-size: 24px; font-weight: 700; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 10px 2px; }
.editor-title:focus { outline: none; border-bottom-color: var(--accent); }
.editor-tags { font-size: 15px; }
.editor-toolbar { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: var(--bg-soft); }
.editor-toolbar button, .toolbar-file { font: inherit; font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; cursor: pointer; flex-direction: row; }
.editor-toolbar button:hover, .toolbar-file:hover { border-color: var(--accent); }
.toolbar-spacer { flex: 1; }
.editor-toolbar .tab.active { background: var(--text); color: #fff; border-color: var(--text); }
.editor-body { min-height: 420px; resize: vertical; line-height: 1.7; font-size: 17px; }
.editor-preview { min-height: 420px; border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.editor-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; border-top: 1px solid var(--line); }
.editor-actions [data-save-status] { margin-right: auto; }
.danger-zone { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 16px; }
.danger-zone summary { cursor: pointer; color: var(--danger); font-size: 14px; }

/* 관리실 */
.admin .site-header { background: #111827; border-bottom-color: #111827; }
.admin .brand { color: #fff; }
.admin .site-nav a { color: #c7cbd4; }
.admin .site-nav a:hover, .admin .site-nav a.active { background: #1f2937; color: #fff; }
.admin .header-inner .muted { color: #9ca3af; }
.badge { display: inline-block; background: #f59e0b; color: #111827; font-size: 12px; font-weight: 700; padding: 0 7px; border-radius: 999px; margin-left: 6px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 12px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: var(--text); display: grid; }
.stat:hover { text-decoration: none; border-color: var(--accent); }
.stat-num { font-size: 30px; font-weight: 700; }
.stat-label { color: var(--muted); font-size: 14px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--bg-soft); font-weight: 600; color: var(--muted); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table td.actions { display: flex; gap: 6px; white-space: nowrap; }
.table td.actions form { margin: 0; }
.table td.detail { color: var(--muted); max-width: 360px; overflow-wrap: anywhere; font-size: 13px; }
.review-title { margin: 0; font-size: 20px; }
.review-body { border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 12px 0; max-height: 520px; overflow-y: auto; }
.review-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.review-actions form { margin: 0; }
.review-actions details { position: relative; }
.review-actions details summary { list-style: none; }
.review-actions details summary::-webkit-details-marker { display: none; }
.review-actions details[open] form { margin-top: 8px; min-width: 280px; }

@media (max-width: 600px) {
  .page-title { font-size: 22px; }
  .post-title { font-size: 24px; }
  .header-inner { padding-top: 8px; padding-bottom: 8px; }
  .site-nav { margin-left: 0; width: 100%; }
  .footer-login { margin-left: 0; }
}

/* ── 게임 갤러리 (2단계) ─────────────────────────────── */
.thumb { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; background: var(--bg-soft); }
.thumb.placeholder { display: grid; place-items: center; color: #fff; font-size: 34px; font-weight: 700; }
.thumb.placeholder.big { font-size: 64px; }
.hue-0 { background: linear-gradient(135deg, #3b6ef5, #7aa2ff); }
.hue-1 { background: linear-gradient(135deg, #0f9d74, #5fd3a8); }
.hue-2 { background: linear-gradient(135deg, #e0603a, #f5a26b); }
.hue-3 { background: linear-gradient(135deg, #8b5cf6, #c4a6ff); }
.hue-4 { background: linear-gradient(135deg, #0e7490, #5ec4dc); }
.hue-5 { background: linear-gradient(135deg, #be185d, #f472b6); }

.featured-game { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: var(--text); margin-bottom: 24px; }
.featured-game:hover { text-decoration: none; border-color: var(--accent); }
.featured-body { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.featured-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.eyebrow { font-size: 13px; font-weight: 700; color: var(--accent); }

.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.game-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.game-row > * { scroll-snap-align: start; }
.game-card { display: flex; flex-direction: column; gap: 4px; color: var(--text); }
.game-card:hover { text-decoration: none; }
.game-card:hover .thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.game-card-thumb { position: relative; margin-bottom: 4px; }
.game-badge { position: absolute; top: 8px; left: 8px; background: var(--text); color: var(--bg); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; letter-spacing: 0.03em; }
.game-card-title { font-weight: 600; font-size: 16px; }
.game-card-summary { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.game-card-meta { color: var(--muted); font-size: 13px; }

.player { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: #0b0d12; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #0b0d12; }
.player:fullscreen { border-radius: 0; aspect-ratio: auto; }
.player-start { all: unset; cursor: pointer; position: absolute; inset: 0; display: block; }
.player-start .thumb { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
.play-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(17, 24, 39, 0.82); color: #fff; font-weight: 700; font-size: 20px; padding: 14px 28px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
.player-start:hover .play-badge, .player-start:focus-visible .play-badge { background: var(--accent); }
.player-bar { display: flex; gap: 8px; align-items: center; margin: 12px 0 20px; flex-wrap: wrap; }
.next-game { margin-left: auto; }

.heart-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer; }
.heart-btn .heart-icon { color: #c7cbd4; font-size: 18px; transition: transform 0.2s; }
.heart-btn:hover .heart-icon { color: #f472b6; }
.heart-btn.on { border-color: color-mix(in srgb, #e11d74 35%, var(--bg)); background: color-mix(in srgb, #e11d74 9%, var(--bg)); }
.heart-btn.on .heart-icon { color: #e11d74; }
.heart-btn.pop .heart-icon { transform: scale(1.35); }
.post-actions { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); }

.game-summary { font-size: 17px; margin: 0 0 12px; }
.stat-row { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.stat-row strong { color: var(--text); font-size: 16px; }
.device-tag { display: inline-block; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; margin-right: 6px; font-size: 13px; }
.plain-list { padding-left: 18px; }
.plain-list li { margin: 4px 0; }
.version-list { list-style: none; padding: 0; margin: 0; }
.version-list li { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.version-list li:last-child { border-bottom: 0; }
.version-no { font-weight: 700; font-size: 14px; background: var(--bg-soft); border-radius: 6px; padding: 1px 8px; }
.version-list .btn { margin-left: auto; }

.tabs { display: inline-flex; gap: 4px; background: var(--bg-soft); border-radius: 10px; padding: 3px; }
.tabs .tab { font: inherit; font-size: 13px; border: 0; background: none; padding: 5px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); }
.tabs .tab.active { background: var(--bg); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.board-list { list-style: none; padding: 0; margin: 8px 0 0; counter-reset: none; }
.board-list li { display: grid; grid-template-columns: 32px 1fr auto; gap: 8px; padding: 8px 4px; border-bottom: 1px solid var(--line); align-items: center; }
.board-list li:last-child { border-bottom: 0; }
.board-list li.me { background: var(--accent-weak); border-radius: 8px; }
.board-rank { font-weight: 700; color: var(--muted); text-align: center; }
.board-list li:nth-child(1) .board-rank { color: #d4a106; }
.board-list li:nth-child(2) .board-rank { color: #8a94a6; }
.board-list li:nth-child(3) .board-rank { color: #b26d3a; }
.board-score { font-variant-numeric: tabular-nums; font-weight: 700; }
.board-empty { margin: 12px 0 4px; }

.score-dialog { background: var(--bg); color: var(--text); border: 0; border-radius: 16px; padding: 24px; width: min(92vw, 380px); box-shadow: 0 20px 60px rgba(0,0,0,0.25); }
.score-dialog::backdrop { background: rgba(17, 24, 39, 0.45); }
.score-dialog .section-title { margin: 0; }
.score-line { font-size: 17px; margin: 0; }
.score-line strong { font-size: 28px; color: var(--accent); margin-left: 6px; }
.nick-options { display: flex; flex-direction: column; gap: 6px; }
.nick-option { flex-direction: row; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text); font-size: 16px; cursor: pointer; }
.nick-option:has(input:checked) { border-color: var(--accent); background: var(--accent-weak); }

.inline-game { display: grid; grid-template-columns: 160px 1fr; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; color: var(--text); margin: 1em 0; }
.inline-game:hover { text-decoration: none; border-color: var(--accent); }
.inline-game > span { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.inline-game .thumb { margin: 0; }

/* 작업실: 게임 */
.game-item { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: start; }
.game-item .thumb { border-radius: 8px; }
.featured-chip { margin-left: 8px; vertical-align: 2px; }
.thumb-preview { width: 200px; }
.upload-form { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.hint-box { background: var(--accent-weak); border-radius: 10px; padding: 12px 14px; }
.hint-box p { margin: 4px 0; }
.copy-text { display: block; white-space: normal; background: var(--bg); padding: 8px 10px; border-radius: 8px; user-select: all; }
.toolbar-select { width: auto; font-size: 14px; padding: 5px 8px; border-radius: 8px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge-item { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; color: #b0b5c0; }
.badge-item .badge-icon { filter: grayscale(1); opacity: 0.5; }
.badge-item.got { border-style: solid; border-color: var(--accent); color: var(--text); background: var(--accent-weak); }
.badge-item.got .badge-icon { filter: none; opacity: 1; }
.country-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.country-list li { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.flag { margin-right: 4px; }

/* 관리실: 게임 */
.review-game { display: grid; grid-template-columns: 220px 1fr; gap: 16px; margin: 12px 0; }
.review-game p { margin: 0; }
.row-hidden td { color: #b0b5c0; text-decoration: line-through; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

@media (max-width: 600px) {
  .featured-game { grid-template-columns: 1fr; }
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .inline-game { grid-template-columns: 1fr; }
  .game-item { grid-template-columns: 84px 1fr; }
  .review-game, .two-col { grid-template-columns: 1fr; }
  .next-game { margin-left: 0; }
  /* 휴대폰에서는 게임 아래 터치 버튼까지 들어가도록 세로로 넉넉하게 */
  .player { aspect-ratio: 4 / 5; }
}

/* ── 5단계: 테마 (설계서 10.4) ─────────────────────────── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap.wide { max-width: calc(var(--page-width, 1040px) + 40px); }
body.public { background-color: var(--page-color, var(--bg)); background-image: var(--page-image, none); background-size: var(--page-size, auto); background-repeat: var(--page-repeat, repeat); background-attachment: var(--page-attach, scroll); background-position: center top; font-feature-settings: "ss06"; word-break: keep-all; overflow-wrap: break-word; }
.public .main { padding-top: 32px; }

/* 공개 화면 머리말·바닥글: 배경 위에 얹힌 얇은 띠 */
/* 머리글 (꾸미기: 얇은 띠·큰 배너, 정렬, 배경 색·그림, 글자 색, 로고) */
.site-header.pub { background-color: var(--hd-bg, color-mix(in srgb, var(--page-color, var(--bg)) 86%, transparent)); background-image: var(--hd-image, none); background-size: cover; background-position: center; color: var(--hd-text, var(--text)); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--card-border, var(--line)); }
.site-header.pub .header-inner { min-height: 64px; }
.site-header.pub .brand { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; letter-spacing: -0.035em; color: var(--hd-text, var(--text)); }
.brand-mark { width: 18px; height: 18px; fill: currentColor; flex: none; }
.brand-mark .on { fill: var(--accent); }
.brand-logo { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; flex: none; }
.site-header.pub .site-nav { gap: 2px; }
.site-header.pub .site-nav a { color: var(--hd-muted, var(--muted)); font-weight: 500; padding: 7px 12px; border-radius: 999px; }
.site-header.pub .site-nav a:hover { background: var(--bg); color: var(--text); }
.site-header.pub .site-nav a.active { background: var(--bg); color: var(--text); font-weight: 700; box-shadow: 0 0 0 1px var(--card-border, var(--line)); }
.site-header.pub .lang-switch { border-color: color-mix(in srgb, currentColor 22%, transparent); border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.hd-tagline { margin: 0; font-size: 18px; color: var(--hd-muted, var(--muted)); }
.site-header.pub.hd-bar.hd-center .header-inner { flex-direction: column; justify-content: center; gap: 4px; padding-top: 12px; padding-bottom: 10px; }
.site-header.pub.hd-bar.hd-center .site-nav { margin-left: 0; }
.site-header.pub.hd-banner { position: relative; backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-header.pub.hd-banner .header-inner { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 56px; padding-bottom: 18px; }
.site-header.pub.hd-banner.hd-center .header-inner { align-items: center; text-align: center; }
.site-header.pub.hd-banner .brand { font-size: clamp(32px, 5vw, 54px); letter-spacing: -0.045em; gap: 16px; line-height: 1.1; }
.site-header.pub.hd-banner .brand-mark { width: 0.8em; height: 0.8em; }
.site-header.pub.hd-banner .brand-logo { width: 1.3em; height: 1.3em; border-radius: 0.32em; }
.site-header.pub.hd-banner .site-nav { margin: 18px 0 0; }
.site-header.pub.hd-banner.hd-center .site-nav { justify-content: center; }
.public .site-footer { border-top: 1px solid var(--card-border, var(--line)); }

/* 공개 화면 공통 요소 */
.public .page-title { font-size: 34px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.2; }
.public .post-title { font-size: 36px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.22; }
.public .card { background: var(--bg); border-color: var(--card-border, var(--line)); box-shadow: var(--shadow, none); border-radius: var(--radius); }
.public .btn { border-radius: 999px; }
.public .featured-game, .public .inline-game { background: var(--bg); border-color: var(--card-border, var(--line)); box-shadow: var(--shadow, none); }
.public .featured-game:hover, .public .inline-game:hover { border-color: var(--accent); }
.public .post-card:hover { background: var(--bg); }
.game-card-meta { display: flex; gap: 12px; font-variant-numeric: tabular-nums; }
.public .btn.primary { padding-left: 20px; padding-right: 20px; }

/* ── 5단계: 위젯 격자 (편집기와 같은 크기: 공개 줄 높이 = 칸 높이 - 간격) ── */
/* 줄 높이는 최소값. 본문 위젯(글 목록·갤러리·소개)만 내용만큼 늘어나고, 나머지는 크기를 내용과 떼어 놓는다 */
.wgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: minmax(var(--grid-row, 56px), auto); gap: var(--grid-gap, 16px); }
.wgrid > .w { contain: size; }
.wgrid > .w-grow { contain: none; }
.w { position: relative; min-width: 0; min-height: 0; color: var(--text); }
.w-card { background-color: var(--bg); background-image: var(--w-image, none); background-size: cover; background-position: center; border: 1px solid var(--card-border, var(--line)); border-radius: var(--radius); box-shadow: var(--shadow, none); padding: var(--wpad, 24px); overflow: hidden; display: flex; flex-direction: column; container-type: inline-size; }
.w-plain { background-color: transparent; background-image: none; border-color: transparent; box-shadow: none; padding-left: 0; padding-right: 0; }
.w-title { font-size: 15px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; margin: 0 0 12px; }
.w-more { margin-top: auto; padding-top: 12px; font-size: 14px; font-weight: 600; align-self: flex-start; }
.w-empty { color: var(--muted); font-size: 14px; margin: 0; }
.w-prep { position: absolute; top: 10px; right: 10px; background: var(--warn-bg); color: var(--warn); font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }

/* 프로필: 이름이 이 페이지의 첫인상 */
.wp { display: flex; gap: 20px; align-items: center; height: 100%; }
.wp .avatar { width: 76px; height: 76px; border-radius: 26px; font-size: 32px; font-weight: 800; overflow: hidden; }
.wp .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.wp-text { min-width: 0; }
.wp-name { margin: 0; font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; line-height: 1.08; letter-spacing: -0.04em; }
.wp-bio { margin: 8px 0 0; color: var(--muted); font-size: 17px; line-height: 1.5; }
@container (max-width: 380px) {
  .wp { gap: 14px; }
  .wp .avatar { width: 56px; height: 56px; border-radius: 18px; font-size: 24px; }
  .wp-name { font-size: 26px; }
  .wp-bio { font-size: 15px; }
}

/* 최신 글 */
.wl { list-style: none; margin: 0; padding: 0; }
.wl a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); color: var(--text); }
.wl li:first-child a { border-top: 0; padding-top: 2px; }
.wl a:hover { text-decoration: none; }
.wl a:hover .wl-title { color: var(--accent); }
.wl-title { font-weight: 600; font-size: 15.5px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wl time { color: var(--muted); font-size: 13px; flex: none; font-variant-numeric: tabular-nums; }
@container (max-width: 300px) { .wl a { flex-direction: column; gap: 0; } }

/* 대표 게임: 그림은 카드 끝까지 */
.w-featured-game { padding: 0; }
.wf { display: flex; flex-direction: column; height: 100%; color: var(--text); min-height: 0; }
.wf:hover { text-decoration: none; }
.wf-thumb { flex: 1 1 auto; min-height: 0; overflow: hidden; background: #0b0d12; }
.wf-thumb .thumb { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; transition: transform 0.4s ease; }
.wf:hover .wf-thumb .thumb { transform: scale(1.02); }
.wf-body { display: flex; flex-direction: column; gap: 6px; flex: none; padding: var(--wpad, 24px); }
.wf-kicker { font-size: 13px; font-weight: 600; color: var(--muted); }
.wf-title { font-size: 26px; font-weight: 800; line-height: 1.2; letter-spacing: -0.035em; }
.wf-sum { color: var(--muted); font-size: 15px; line-height: 1.55; }
.wf-stats { display: flex; gap: 14px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wf-play { align-self: flex-start; margin-top: 12px; padding: 11px 22px; font-size: 15px; }
@container (min-width: 560px) {
  .wf { flex-direction: row; }
  .wf-thumb { flex: 0 0 60%; }
  .wf-body { flex: 1; justify-content: center; }
  .wf-title { font-size: 32px; }
}

/* 게임 목록 */
.wg { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 14px; }
.wg-item { display: flex; flex-direction: column; gap: 8px; color: var(--text); min-width: 0; }
.wg-item:hover { text-decoration: none; }
.wg-item .thumb { border-radius: max(6px, calc(var(--radius) - 8px)); transition: transform 0.2s ease; }
.wg-item:hover .thumb { transform: translateY(-2px); }
.wg-item .thumb.placeholder { font-size: 26px; }
.wg-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@container (max-width: 280px) {
  .wg { grid-template-columns: 1fr; gap: 10px; }
  .wg-item { flex-direction: row; align-items: center; gap: 12px; }
  .wg-item .thumb { width: 76px; flex: none; }
}

/* 숫자 카운터: 좁으면 세로로, 넓으면 가로로 */
.wc { display: flex; flex-direction: column; justify-content: center; height: 100%; }
.wc-item { display: flex; flex-direction: column; gap: 2px; padding: 14px 0; border-top: 1px solid var(--line); min-width: 0; }
.wc-item:first-child { border-top: 0; padding-top: 0; }
.wc-item:last-child { padding-bottom: 0; }
.wc-num { font-size: 40px; font-weight: 800; line-height: 1.05; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wc-label { font-size: 14px; color: var(--muted); }
@container (min-width: 440px) {
  .wc { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-content: center; }
  .wc-item { padding: 0 20px; border-top: 0; border-left: 1px solid var(--line); }
  .wc-item:first-child { padding-left: 0; border-left: 0; }
}

/* 나라 지도 */
.wm-map { display: block; width: 100%; flex: 1 1 auto; min-height: 0; }
.wm-land { fill: color-mix(in srgb, var(--text) 10%, var(--bg)); stroke: var(--bg); stroke-width: 0.6; }
.wm-on { fill: var(--accent); stroke: var(--bg); stroke-width: 0.6; }
.wm-sum { margin: 8px 0 0; font-size: 14px; color: var(--muted); flex: none; font-variant-numeric: tabular-nums; }
.wm-flags { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 2px 6px; font-size: 18px; line-height: 1.3; flex: none; }

/* 글 상자 */
.wt { height: 100%; display: flex; flex-direction: column; justify-content: center; font-size: 17px; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
.wt-center { text-align: center; align-items: center; }
.wt-big { font-size: 26px; font-weight: 800; line-height: 1.28; letter-spacing: -0.035em; }

/* 그림 */
.w-image { padding: 0; }
.wi { display: block; width: 100%; height: 100%; border-radius: 0; }
.wi-cover { object-fit: cover; }
.wi-contain { object-fit: contain; background: var(--bg-soft); }
.w-image.w-custom .wi-contain { background: var(--bg); }

/* SNS 버튼 */
.ws { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; height: 100%; }
.ws-label { font-weight: 700; margin-right: 6px; }
.w-sns-links { justify-content: center; padding-top: 10px; padding-bottom: 10px; }

/* 공지 띠 */
.w-notice { display: flex; align-items: center; padding: 0 var(--wpad, 24px); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow, none); }
.wn-accent { background: var(--accent); color: var(--on-accent, #fff); }
.wn-soft { background: var(--accent-weak); color: var(--text); }
.w-notice.w-custom { background-color: var(--bg); background-image: var(--w-image, none); background-size: cover; background-position: center; color: var(--text); }
.wn-text { margin: 0; font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 제목 배너 */
.hl { display: flex; flex-direction: column; justify-content: center; height: 100%; min-height: 0; }
.hl-center { align-items: center; text-align: center; justify-content: center; }
.hl-title { margin: 0; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; }
.hl-normal .hl-title { font-size: 28px; }
.hl-big .hl-title { font-size: clamp(32px, 4vw, 46px); }
.hl-huge .hl-title { font-size: clamp(40px, 6.4vw, 72px); letter-spacing: -0.05em; }
.hl-sub { margin: 10px 0 0; color: var(--muted); font-size: 17px; line-height: 1.5; }
.w-headline.w-custom .hl { justify-content: flex-end; }

/* 본문 위젯 */
.w-post-list .post-card { padding-left: 0; padding-right: 0; }
.w-post-list:not(.w-plain) .post-card:hover { background: transparent; }
.w-post-list .post-card:hover .post-card-title { color: var(--accent); }
.w-post-list .pager { margin-top: 20px; }
.w-game-gallery .featured-game { margin-bottom: 20px; }
.ab { display: flex; align-items: center; height: 100%; }
.ab-note { margin: 0; color: var(--muted); font-size: 14px; }

/* 좁은 화면: 격자 대신 위에서 아래로 한 줄씩 (모양 순서대로) */
@media (max-width: 760px) {
  .wgrid { display: flex; flex-direction: column; gap: max(var(--grid-gap, 16px), 12px); }
  .wgrid > .w { contain: none; }
  .w-notice { padding: 14px 18px; }
  .wn-text { white-space: normal; }
  .wf-thumb { flex: none; aspect-ratio: 16 / 10; }
  .wm-map { flex: none; }
  .wi { height: auto; max-height: 70vh; }
  .wt { padding: 4px 0; }
  .wc { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .wc-item, .wc-item:first-child { padding: 0 0 0 14px; border-top: 0; border-left: 1px solid var(--line); }
  .wc-item:first-child { padding-left: 0; border-left: 0; }
  .wc-num { font-size: 30px; }
  .wg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public .page-title { font-size: 28px; }
  .public .post-title { font-size: 28px; }
}

/* ── 5단계: 꾸미기 편집기 ─────────────────────────────── */
.cz-page .main { padding-top: 12px; }
.cz-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; position: sticky; top: 60px; z-index: 15; background: var(--bg); padding: 10px 0; border-bottom: 1px solid var(--line); }
.btn.icon { padding: 9px 12px; min-width: 40px; }
.btn:disabled { opacity: 0.45; cursor: default; }
.cz-help { margin: 10px 0; }
.cz-narrow { display: none; }
.cz-page .wrap.wide.main, .cz-page .site-header .wrap.wide { max-width: none; }
.cz-stage { background-color: var(--page-color); background-image: var(--page-image); background-size: var(--page-size); border-radius: 14px; padding: 24px 20px 40px; box-shadow: inset 0 0 0 1px #e4e7ec; }
.cz-scope { position: relative; max-width: var(--page-width, 1040px); margin: 0 auto; color: var(--text); font-family: var(--font); min-height: 60vh; }
.cz .grid-stack { margin: 0 calc(var(--grid-gap, 16px) / -2); }
.cz-edge { position: absolute; top: 0; bottom: 0; width: 1px; background-image: linear-gradient(#9aa3b2 50%, transparent 50%); background-size: 1px 8px; pointer-events: none; }
.cz-edge.left { left: 0; }
.cz-edge.right { right: 0; }
.cz-handle { position: absolute; top: 0; bottom: 0; width: 24px; z-index: 6; cursor: ew-resize; touch-action: none; outline: none; }
.cz-handle.left { left: -12px; }
.cz-handle.right { right: -12px; }
.cz-grip { position: sticky; top: calc(50vh - 32px); display: block; width: 24px; height: 64px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px #c9ced8, 0 2px 8px rgba(0, 0, 0, 0.12); }
.cz-grip::before { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 22px; margin: -11px 0 0 -3px; border-left: 2px solid #9aa3b2; border-right: 2px solid #9aa3b2; }
.cz-handle:hover .cz-grip, .cz-handle.dragging .cz-grip, .cz-handle:focus-visible .cz-grip { box-shadow: 0 0 0 2px #2f5bea, 0 2px 8px rgba(0, 0, 0, 0.16); }
.cz-size-tip { position: fixed; top: 140px; left: 50%; transform: translateX(-50%); z-index: 35; background: #16181d; color: #fff; font: 600 13px/1 "Pretendard Variable", Pretendard, system-ui, sans-serif; padding: 8px 12px; border-radius: 8px; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.cz-range { display: flex; align-items: center; gap: 10px; }
.cz-range input[type="range"] { flex: 1; padding: 0; border: 0; accent-color: #2f5bea; }
.cz-range output { min-width: 56px; text-align: right; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cz .grid-stack > .grid-stack-item > .grid-stack-item-content { overflow: hidden; border-radius: var(--radius); cursor: grab; }
.cz .grid-stack-item-content > .w { height: 100%; }
.cz .w, .cz .w * { pointer-events: none; }
.cz .grid-stack-item-content::after { content: attr(data-label); position: absolute; top: 6px; left: 6px; z-index: 2; font: 600 11px/1.7 "Pretendard Variable", Pretendard, system-ui, sans-serif; background: rgba(17, 24, 39, 0.78); color: #fff; padding: 0 8px; border-radius: 999px; opacity: 0; transition: opacity 0.15s; pointer-events: none; }
.cz .grid-stack-item:hover > .grid-stack-item-content::after, .cz .cz-selected > .grid-stack-item-content::after { opacity: 1; }
.cz .grid-stack-item:hover > .grid-stack-item-content { outline: 2px solid rgba(59, 110, 245, 0.45); outline-offset: 2px; }
.cz .cz-selected > .grid-stack-item-content { outline: 2px solid #3b6ef5; outline-offset: 2px; }
.cz .grid-stack-placeholder > .placeholder-content { background: rgba(59, 110, 245, 0.1); border: 2px dashed rgba(59, 110, 245, 0.55); border-radius: var(--radius); }
.cz-empty { text-align: center; color: var(--muted); padding: 60px 20px; margin: 0; }
.cz-panel { position: fixed; top: 60px; right: 0; bottom: 0; z-index: 30; width: min(360px, 92vw); overflow-y: auto; background: #fff; color: #1d1f23; border-left: 1px solid #e7e9ee; box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08); padding: 16px 18px 28px; }
.cz-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cz-panel-head h2 { font-size: 17px; margin: 0; }
.cz-panel-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid #e7e9ee; }
.cz-add-list { display: flex; flex-direction: column; gap: 8px; }
.cz-add-item { display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 12px; border: 1px solid #e7e9ee; border-radius: 10px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.cz-add-item:hover { border-color: #3b6ef5; background: #eef3ff; }
.cz-add-item strong { display: block; }
.cz-add-icon { font-size: 22px; width: 32px; text-align: center; flex: none; }
.cz-fields { display: flex; flex-direction: column; gap: 16px; }
.cz-field { display: flex; flex-direction: column; gap: 6px; }
.cz-label { font-size: 14px; font-weight: 600; }
.cz-check { display: flex; flex-direction: row; align-items: center; gap: 8px; font-size: 15px; }
.cz-multi { display: flex; flex-direction: column; gap: 6px; }
.cz-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.cz-choice { border: 1px solid #e7e9ee; background: #fff; color: inherit; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.cz-choice.on { background: #1d1f23; color: #fff; border-color: #1d1f23; }
.cz-swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cz-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #d5d9e0; cursor: pointer; padding: 0; }
.cz-swatch.on { box-shadow: 0 0 0 2px #1d1f23; }
.cz-swatches input[type="color"] { width: 38px; height: 32px; padding: 0; border: 0; background: none; }
.cz-image-preview img { max-height: 140px; border-radius: 8px; display: block; }
.cz-history { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.cz-history li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.cz-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40; background: #111827; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; max-width: 90vw; }
@media (max-width: 760px) {
  .cz-narrow { display: block; }
  .cz-bar, .cz-help, .cz-stage { display: none; }
}

/* 관리실: 꾸미기 확인 */
.widget-text { border-left: 3px solid var(--line); margin: 10px 0; padding: 6px 12px; white-space: pre-wrap; }
.widget-image { max-height: 240px; width: auto; }

/* ── 꾸미기 편집기: 화면 탭·머리글 미리보기 ─────────────── */
.cz-pages { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.cz-page-tab { font: inherit; font-size: 15px; font-weight: 600; padding: 8px 16px; border-radius: 999px; border: 1px solid #e4e7ec; background: #fff; color: #4b5563; cursor: pointer; }
.cz-page-tab.on { background: #16181d; border-color: #16181d; color: #fff; }
.cz-pages .cz-help { margin: 0 0 0 10px; }
.cz-stage { background-repeat: var(--page-repeat, repeat); background-attachment: scroll; background-position: center top; padding-top: 0; overflow: hidden; }
.cz-header { position: relative; margin: 0 -20px 24px; cursor: pointer; border-radius: 14px 14px 0 0; }
.cz-header .site-header.pub { position: relative; z-index: 1; border-radius: 14px 14px 0 0; font-family: var(--font); }
.cz-header .site-header.pub .wrap.wide { max-width: calc(var(--page-width, 1040px) + 40px); }
.cz-header .site-header.pub a { pointer-events: none; }
.cz-header:hover .site-header.pub { outline: 2px solid rgba(59, 110, 245, 0.45); outline-offset: -2px; }
.cz-header.cz-selected .site-header.pub { outline: 2px solid #3b6ef5; outline-offset: -2px; }
.cz-header .w-prep { z-index: 2; }
.cz-subhead { font-size: 14px; margin: 22px 0 10px; padding-top: 16px; border-top: 1px solid #e7e9ee; }
.cz-color { display: flex; align-items: center; gap: 10px; }
.cz-color input[type="color"] { width: 44px; height: 34px; padding: 0; border: 1px solid #e4e7ec; border-radius: 8px; background: none; cursor: pointer; }
.cz .cz-core > .grid-stack-item-content::before { content: "본문 · 사이트에서는 내용만큼 길어져요"; position: absolute; right: 8px; bottom: 8px; z-index: 2; font: 600 11px/1.7 "Pretendard Variable", Pretendard, system-ui, sans-serif; background: rgba(17, 24, 39, 0.72); color: #fff; padding: 0 8px; border-radius: 999px; pointer-events: none; }

/* ── 게임 화면: 가능한 크게 ─────────────────────────────── */
.game-stage { background: #0b0d12; color: #e9ebf0; padding: 14px 20px 16px; }
/* 머리글(64px) + 위아래 여백 + 아래 버튼 줄(약 64px)을 빼고 남은 높이를 16:10으로 다 쓴다 */
.game-stage-inner { width: min(100%, calc((100vh - 150px) * 1.6)); width: min(100%, calc((100svh - 150px) * 1.6)); min-width: min(100%, 640px); margin: 0 auto; }
.game-stage .back-link { color: #9aa2af; margin: 0; }
.game-stage .back-link:hover { color: #fff; }
.player-bar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.game-stage .player { border-radius: 12px; view-transition-name: game-hero; }
.game-stage .player-bar { margin: 12px 0 0; justify-content: space-between; }
.game-stage .btn { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.14); color: #f3f4f6; }
.game-stage .btn:hover { background: rgba(255, 255, 255, 0.16); }
.game-stage .heart-btn { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.14); color: #f3f4f6; }
.game-stage .heart-btn.on { background: rgba(225, 29, 116, 0.22); border-color: rgba(225, 29, 116, 0.5); }
.game-info { padding-top: 8px; }
@media (max-width: 760px) {
  .game-stage { padding: 10px 12px 12px; }
  .game-stage-inner { width: 100%; min-width: 0; }
}

/* ── 게임 고르기: 마우스를 따라 기우는 카드, 누르면 반짝 → 썸네일이 플레이 화면으로 커진다 ── */
.game-pick [data-pick-thumb] { position: relative; display: block; border-radius: max(6px, calc(var(--radius) - 8px)); transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px)); transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s; }
.game-pick [data-pick-thumb]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.32), transparent 58%); opacity: 0; transition: opacity 0.25s; pointer-events: none; }
.game-pick:hover [data-pick-thumb], .game-pick:focus-visible [data-pick-thumb] { --lift: -4px; box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22); }
.game-pick:hover [data-pick-thumb]::after { opacity: 1; }
.game-pick:focus-visible { outline: none; }
.game-pick:focus-visible [data-pick-thumb] { outline: 3px solid var(--accent); outline-offset: 3px; }
.wf.game-pick [data-pick-thumb] { border-radius: 0; transform: none; box-shadow: none; }
.game-pick.picked [data-pick-thumb] { animation: game-pick 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes game-pick {
  0% { transform: perspective(800px) translateY(-4px) scale(1); box-shadow: 0 0 0 0 var(--accent); }
  40% { transform: perspective(800px) translateY(-2px) scale(0.96); box-shadow: 0 0 0 4px var(--accent); }
  100% { transform: perspective(800px) translateY(-6px) scale(1.04); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 0%, transparent), 0 20px 40px rgba(0, 0, 0, 0.3); }
}
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-group(game-hero) { animation-duration: 0.5s; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); }
}
@media (prefers-reduced-motion: reduce) {
  .game-pick [data-pick-thumb] { transition: none; transform: none; }
  .game-pick.picked [data-pick-thumb] { animation: none; }
}
