@font-face {
  font-family: 'Jua';
  src: url('assets/fonts/Jua-Regular.ttf') format('truetype');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --gold: #f4d47d;
  --gold-dim: #785a28;
  --gold-dark: #463714;
  --bg: #010a13;
  --panel: rgba(1, 10, 19, 0.92);
  --teal: #0ac8b9;
  --blue: #3a9cff;
  --red: #ff4848;
  --green: #3fc24a;
  --text: #f0e6d2;
  --muted: #bfb2cb;
  --entry-text: #f4edda;
  --entry-green: #b9e39e;
  --entry-muted: #b3c2c3;
  --entry-ink: #171e24;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #05080d; color: var(--text); font-family: 'Jua', sans-serif; user-select: none; }
#game { position: fixed; inset: 0; }
#game canvas { display: block; }
.music-credit {
  position: fixed; bottom: calc(4px + env(safe-area-inset-bottom)); right: max(12px, env(safe-area-inset-right));
  max-width: calc(100% - 24px); z-index: 5; text-align: right;
  color: #a7a9b0; font: 10px/12px sans-serif; pointer-events: none;
  text-shadow: 0 1px 3px #000;
}
.music-credit a { color: inherit; text-decoration: none; pointer-events: auto; }
.music-credit a:hover { text-decoration: underline; }
.music-credit a:focus-visible { outline: 2px solid var(--entry-green); outline-offset: 2px; }
.hidden { display: none !important; }

/* ---------- 격투 게임 HUD ---------- */
#topbar {
  --ink: #252132;
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  width: min(960px, calc(100% - 40px)); height: 100px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start; gap: 32px; pointer-events: none;
}
.fighter { --accent: #8ddfe7; display: flex; align-items: center; min-width: 0; gap: 10px; }
.fighter.red { --accent: #ffaaa0; flex-direction: row-reverse; }
.fight-portrait {
  position: relative; flex: 0 0 82px; height: 86px; margin-top: 1px;
}
.fight-portrait img {
  display: block; width: 100%; height: 100%; object-fit: contain;
  border-radius: 12px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 20%, #000 80%, transparent), linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 20%, #000 80%, transparent), linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.red .fight-portrait img { transform: scaleX(-1); }
.fighter-info { flex: 1; min-width: 0; padding-top: 7px; }
.fighter-name { display: flex; justify-content: space-between; align-items: center; margin: 0 3px 5px; color: #fff0cd; font-size: 19px; white-space: nowrap; }
.fighter-name small { color: var(--accent); font-size: 10px; letter-spacing: 1px; }
.red .fighter-name { flex-direction: row-reverse; }
.health-track {
  --health: 1; position: relative; height: 27px; overflow: hidden; isolation: isolate;
  background: #51425e; border: 3px solid var(--ink); border-radius: 9px 12px 8px 11px;
}
.health-fill { position: absolute; inset: 0; transform: scaleX(var(--health)); transform-origin: left; }
.red .health-fill { transform-origin: right; }
.health-fill {
  background: linear-gradient(to bottom, #bcf397 0 15%, #328449 15% 78%, #246139 78%);
  border-radius: 5px;
  transition: transform .12s ease-out; border-right: 2px solid #22452e;
}
.red .health-fill { border-right: 0; border-left: 2px solid #22452e; }
.health-value { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff9e7; font-size: 14px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.health-track.reset > div { transition: none; }
.knocked-out .fight-portrait img { filter: grayscale(1); opacity: .55; }
.twin-track { display: none; }
.twins .twin-track { display: block; }
.twins .red .health-track { height: 16px; }
.twins .red .health-track + .health-track { margin-top: 4px; }
.twins .red .health-value { font-size: 11px; }
.health-track.knocked-out { opacity: .45; }
@media (prefers-reduced-motion: reduce) {
  .health-fill { transition: none; }
}

@keyframes kfIn { from { transform: translateX(30px); opacity: 0; } }

#chat { position: fixed; left: 12px; bottom: 150px; width: 380px; display: flex; flex-direction: column; gap: 2px; pointer-events: none; font-size: 13px; }
#chat .line { animation: kfIn 0.2s ease; }
#chat .line.fade { opacity: 0; transition: opacity 1s; }
#chat .sys { color: var(--gold); }

/* ---------- 하단 HUD ---------- */
#hud {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  pointer-events: none;
}
.skills { display: flex; gap: 14px; padding: 10px 14px 8px; background: #14202ce8; border: 3px solid #080e16; border-radius: 20px; box-shadow: 0 5px 0 #080e16, inset 0 2px 0 #ffffff18; }
.spell { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.spell-name { font-size: 11px; font-weight: 900; color: #f4e8c8; }
.skill { position: relative; width: 64px; height: 64px; border: 3px solid #697b88; border-radius: 12px; background: #111; overflow: hidden; }
.skill .icon { position: absolute; inset: 0; background-size: cover; background-position: center; }
.skill .cd { position: absolute; inset: 0; background: conic-gradient(transparent calc(var(--p, 1) * 360deg), #07111cda 0); }
.skill .cdtext { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 900 23px 'Jua'; }
.skill .key { position: absolute; left: 0; bottom: 0; min-width: 22px; padding: 1px 5px; border-radius: 0 7px 0 0; font: 900 14px 'Jua'; background: #101521; color: #fff4d5; }
#sk-q.ready { border-color: #9fffbf; }
#sk-d.ready { border-color: #ffe36c; }
#sk-f.ready { border-color: #7eeeff; }
.skill.flash-ready { animation: ready 0.4s ease; }
#hud.unavailable { opacity: 0.45; filter: grayscale(0.8); }
@keyframes ready { 50% { box-shadow: 0 0 18px #fff; } }
.q-icon { background-image: url('assets/cartoon/cleaver-throw-icon-v1.png'); }
.q-icon.soccer-icon { background-image: url('assets/cartoon/soccer-throw-icon-v1.png'); }
.q-icon.mushroom-icon { background-image: url('assets/cartoon/teemo-mushroom-throw-icon-v1.png'); }
.d-icon { background-image: url('assets/cartoon/flash.png'); }
.f-icon { background-image: url('assets/cartoon/ghost.png'); }

/* ---------- 화면들 ---------- */
.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px 16px; overflow-y: auto; background: radial-gradient(ellipse at center, #78618a55, #202332dc 80%); z-index: 10; }
* { -webkit-tap-highlight-color: transparent; }
:focus { outline: none; }
button { border-radius: 16px; }
button:focus-visible { outline: 3px solid #fff3bd; outline-offset: 4px; }
/* ---------- 첫 로딩 ---------- */
#loading {
  background: radial-gradient(ellipse at 50% 38%, #28434a 0, #14252d 42%, #0c171f 85%);
  color: var(--entry-text);
}
#loading::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(#a5dbaa15 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse at center, #000, transparent 72%);
}
.loading-content { position: relative; width: min(360px, 100%); margin: auto; text-align: center; padding: 16px 0; }
.loading-art {
  width: clamp(150px, 24vh, 216px); aspect-ratio: 1; margin: 0 auto 30px;
}
.loading-art img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  mask-image: radial-gradient(ellipse, #000 48%, transparent 72%);
}
#loading-title, .setup-brand { font-size: clamp(48px, 10vw, 64px); font-weight: 400; line-height: 1.15; letter-spacing: -2px; text-shadow: 0 4px #08171f; }
#loading-title { margin: 0; }
#loading-title span, .setup-brand span { color: var(--entry-green); }
.loading-tagline { margin: 12px 0 36px; color: var(--entry-muted); font-size: 15px; }
.loading-progress { width: min(280px, 100%); margin: auto; }
.loading-status { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; }
#load-text { color: #c3d0ce; }
#load-percent { color: var(--entry-green); font-variant-numeric: tabular-nums; }
.loadbar { height: 8px; margin-top: 12px; background: #08171f; border-radius: 8px; overflow: hidden; }
#load-fill { height: 100%; width: 0; border-radius: inherit; background: var(--entry-green); box-shadow: 0 0 12px #b9e39e44; transition: width .2s ease-out; }
.loading-tip { margin: 30px 0 0; color: #8fa7aa; font-size: 12px; line-height: 2; }
.loading-tip kbd { display: inline-block; min-width: 22px; margin: 0 3px; border: 1px solid #52676d; border-bottom-width: 3px; border-radius: 5px; color: #d1ded9; font: inherit; line-height: 21px; }
@media (max-height: 600px) {
  .loading-content { padding: 0; }
  .loading-art { width: 110px; margin-bottom: 18px; }
  #loading-title, .setup-brand { font-size: 42px; }
  .loading-tagline { margin: 8px 0 20px; }
  .loading-tip { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  #load-fill { transition: none; }
}

/* ---------- 대전 결과 ---------- */
#result {
  background: radial-gradient(ellipse at 50% 38%, #28434ae8, #14252df2 48%, #0c171ff7 90%);
  color: var(--entry-text);
}
.match-result { width: min(620px, 100%); margin: auto; padding: 16px 0; text-align: center; }
.result-portrait {
  display: block; width: 160px; height: 160px; margin: 0 auto 12px; object-fit: cover;
  mask-image: radial-gradient(ellipse, #000 48%, transparent 72%);
}
.result-meme {
  display: none; width: auto; max-width: 100%; height: auto; max-height: 42dvh;
  margin: 0 auto 16px; border-radius: 12px;
}
#result:is([data-art="custom-loss"], [data-art="custom-win"]) .result-portrait { display: none; }
#result[data-art="custom-loss"] .result-meme-loss,
#result[data-art="custom-win"] .result-meme-win { display: block; }
#result:is([data-art="custom-loss"], [data-art="custom-win"]) #result-title { margin-bottom: 8px; }
#result-subtitle {
  margin: 0 0 24px; color: var(--entry-text); font-size: clamp(18px, 3vw, 24px);
  line-height: 1.5; word-break: keep-all;
}
#result-title {
  margin: 8px 0 40px; color: var(--entry-green); font-size: clamp(40px, 6vw, 56px);
  font-weight: 400; line-height: 1.3; letter-spacing: -1px; text-shadow: 0 4px #08171f;
  word-break: keep-all; text-wrap: balance;
}
#result[data-outcome="lose"] #result-title { color: #f0b2a8; }
.result-actions { display: grid; width: min(380px, 100%); margin-inline: auto; gap: 12px; }
.result-actions button {
  width: 100%; padding: 17px 24px; border: 3px solid var(--entry-ink);
  font: 400 22px 'Jua', sans-serif; cursor: pointer;
  transition: transform .15s, background .15s;
}
#again-btn { background: var(--entry-green); color: #26362c; box-shadow: inset 0 3px #e2ffd780; }
#menu-btn { background: #35434b; color: var(--entry-muted); box-shadow: inset 0 2px #ffffff10; }
#share-btn { background: #c5a4ed; color: #30223e; box-shadow: inset 0 3px #eee0ff80; }
#humiliate-btn { background: #f2c94c; color: #3a2a06; box-shadow: inset 0 3px #fff3c480; }
#share-btn:disabled { cursor: wait; opacity: .7; }
.share-status { min-height: 1.5em; margin: 8px 0 0; color: var(--entry-green); font-size: 16px; }
@media (hover: hover) {
  #share-btn:hover { background: #dbc0fb; transform: translateY(-2px); }
  #humiliate-btn:hover { background: #f8da7d; transform: translateY(-2px); }
  #again-btn:hover { background: #c9efb4; transform: translateY(-2px); }
  #menu-btn:hover { background: #43555c; color: var(--entry-text); }
}
.result-actions button:active { transform: translateY(1px); }
@media (max-height: 560px) {
  .match-result { padding: 0; }
  .result-meme { max-height: 36dvh; margin-bottom: 4px; }
  #result:is([data-art="custom-loss"], [data-art="custom-win"]) #result-title { margin-bottom: 4px; }
  #result-subtitle { margin-bottom: 12px; }
  .result-portrait { width: 96px; height: 96px; margin-bottom: 4px; }
  #result-title { margin: 4px 0 24px; font-size: 40px; }
  .result-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #share-btn { grid-column: 1 / -1; }
  .result-actions:has(#humiliate-btn:not(.hidden)) { width: min(640px, 100%); grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .result-actions button { padding: 14px 8px; font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .result-actions button { transition: none; }
}

.spell-name { font-size: 13px; }

/* ---------- 난이도 선택 ---------- */
#menu {
  --setup-ink: var(--entry-ink);
  --setup-accent: var(--entry-green);
  padding: 40px 24px;
  background: radial-gradient(ellipse at 50% 38%, #28434ad9, #14252de6 48%, #0c171ff0 90%);
  color: var(--entry-text);
  animation: menu-reveal .4s ease-out both;
}
.match-setup { width: min(900px, 100%); margin: auto; }
.riot-disclaimer { max-width: 760px; margin: 28px auto 0; color: var(--entry-muted); font: 12px/1.7 sans-serif; text-align: center; word-break: keep-all; overflow-wrap: anywhere; }
.riot-disclaimer p { margin: 0; }
/* 홈: 본문은 가운데, 고지문은 화면 맨 아래에 작게 붙인다 */
#menu:not(.practice-view) { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
#menu:not(.practice-view) .match-setup { display: flex; flex-direction: column; min-height: 100%; }
#menu:not(.practice-view) .setup-heading { margin-top: auto; }
#menu:not(.practice-view) .match-setup > .riot-disclaimer { margin: auto auto 0; padding-top: 16px; font-size: 10px; line-height: 1.6; opacity: .6; }
.creator-contact { display: block; }
.creator-contact a { color: var(--entry-text); text-underline-offset: 3px; }
.creator-contact a:focus-visible { outline: 2px solid var(--entry-green); outline-offset: 4px; }
.analytics-consent {
  margin: auto; padding: 24px; width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid #668786; border-radius: 16px; background: #142b33;
  color: var(--entry-text); text-align: left; font: 13px/1.65 sans-serif;
  word-break: keep-all; overflow-wrap: anywhere;
}
.analytics-consent::backdrop { background: #030c13b8; backdrop-filter: blur(5px); }
.consent-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.consent-summary h2 { margin: 0; font: 18px/1.4 'Jua', sans-serif; }
.consent-summary h2:focus { outline: none; }
.consent-summary h2 span { color: var(--entry-green); white-space: nowrap; }
.analytics-consent p { margin: 10px 0 0; color: var(--entry-muted); }
.analytics-consent details { margin-top: 10px; }
.analytics-consent summary { cursor: pointer; text-underline-offset: 3px; }
.analytics-consent a { color: var(--entry-green); text-underline-offset: 3px; }
.analytics-consent summary:focus-visible, .analytics-consent a:focus-visible { outline: 2px solid var(--entry-green); outline-offset: 2px; }
.analytics-consent button { min-height: 44px; padding: 10px 16px; border: 1px solid #668786; border-radius: 10px; background: #263f48; color: var(--entry-text); font: 16px/1.2 'Jua', sans-serif; cursor: pointer; }
#analytics-settings {
  position: fixed; top: max(20px, env(safe-area-inset-top)); right: max(24px, env(safe-area-inset-right));
  z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 2px solid var(--entry-ink); border-radius: 12px; background: #2f4853; color: var(--entry-text); cursor: pointer;
  box-shadow: inset 0 2px #ffffff12;
  transition: background .15s, border-color .15s;
}
#analytics-settings svg { display: block; width: 22px; height: 22px; }
#analytics-settings:active { background: #263f48; box-shadow: inset 0 2px #0b182040; }
#menu.practice-view #analytics-settings { display: none; }
@media (hover: hover) {
  #analytics-settings:hover { background: #3b5963; border-color: #88a9a5; }
}
.consent-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
/* 설정 */
.settings-dialog { width: min(420px, calc(100% - 32px)); }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid #2c4a52; }
.consent-summary + .settings-row { margin-top: 8px; border-top: 1px solid #2c4a52; }
.settings-row:last-child { padding-bottom: 4px; border-bottom: 0; }
.settings-dialog .game-guide-link { display: inline-block; margin-top: 16px; color: var(--entry-text); font: 17px/1.3 'Jua', sans-serif; text-underline-offset: 4px; }
.settings-dialog .game-guide-link:hover { color: var(--entry-green); }
.settings-dialog .consent-summary { margin: -8px -10px 0 0; }
.analytics-consent .settings-close { display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--entry-muted); }
@media (hover: hover) { .analytics-consent .settings-close:hover { background: #263f48; color: var(--entry-text); } }
.settings-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; font: 17px/1.3 'Jua', sans-serif; }
.settings-label small { color: var(--entry-muted); font: 13px/1.4 sans-serif; }
.analytics-consent .settings-switch { display: flex; align-items: center; gap: 10px; flex-shrink: 0; padding: 8px 4px; border: 0; background: none; }
.settings-switch-track { position: relative; width: 40px; height: 22px; border-radius: 11px; background: #4a5d63; transition: background .15s; }
.settings-switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--entry-text); transition: transform .15s; }
.settings-switch[aria-checked="true"] .settings-switch-track { background: var(--entry-green); }
.settings-switch[aria-checked="true"] .settings-switch-track::after { transform: translateX(18px); background: #172c26; }
.analytics-consent button:focus-visible { outline: 2px solid var(--entry-green); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .settings-switch-track, .settings-switch-track::after { transition: none; } }
.humiliate-dialog { width: min(480px, calc(100% - 32px)); }
.humiliate-meme { display: block; width: 100%; height: auto; margin: 14px 0; border-radius: 12px; }
.humiliate-dialog label, .humiliate-preview-label { display: block; margin: 0 0 6px; color: var(--entry-muted); font: 14px/1.4 'Jua', sans-serif; }
#humiliate-name { width: 100%; min-width: 0; padding: 12px; border: 2px solid #52676d; border-radius: 10px; background: #0c171f; color: var(--entry-text); font: 16px/1.4 'Jua', sans-serif; }
#humiliate-name::placeholder { color: #8fa7aa; }
#humiliate-name:focus-visible { outline: 2px solid var(--entry-green); outline-offset: 2px; }
.analytics-consent .humiliate-preview-label { margin-top: 14px; }
.analytics-consent .humiliate-preview { margin: 0; padding: 12px; border-radius: 10px; background: #0c171f; color: var(--entry-text); font: 18px/1.4 'Jua', sans-serif; }
.analytics-consent .humiliate-status { min-height: 1.4em; margin-top: 8px; color: #f0b2a8; }
.humiliate-dialog .consent-actions { margin-top: 6px; }
@media (min-width: 601px) and (max-height: 560px) {
  .humiliate-dialog { width: min(760px, calc(100% - 32px)); }
  #humiliate-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 20px; align-content: start; }
  #humiliate-form > * { grid-column: 2; }
  #humiliate-form > .humiliate-meme { grid-column: 1; grid-row: 1 / span 8; align-self: center; margin: 0; }
  #humiliate-form > .consent-summary { margin-bottom: 10px; }
}
.consent-actions #humiliate-copy,
.consent-actions #analytics-accept { background: var(--entry-green); border-color: var(--entry-green); color: #172c26; }
#menu.practice-view .riot-disclaimer { display: none; }
.setup-heading { text-align: center; }
.setup-intro { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 18px; }
.setup-portrait {
  display: block; flex-shrink: 0; width: 144px; height: 144px; object-fit: cover;
  mask-image: radial-gradient(ellipse, #000 48%, transparent 72%);
}
.setup-intro-copy { text-align: left; }
.setup-brand { margin: 0 0 12px; color: var(--entry-text); }
.setup-description { margin: 0; font-size: 18px; line-height: 1.5; word-break: keep-all; }
.setup-arena-tip { margin: 6px 0 0; color: var(--entry-muted); font-size: 14px; line-height: 1.5; word-break: keep-all; }
.setup-controls {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 10px 22px;
  margin: 0 0 32px; padding: 14px 12px; list-style: none;
  border-block: 1px solid #b3c2c325; color: var(--entry-muted); font-size: 14px;
}
.setup-controls li { display: flex; align-items: center; gap: 7px; }
.setup-controls kbd, .setup-mouse {
  display: inline-block; padding: 2px 6px; border: 1px solid #52676d; border-bottom-width: 3px;
  border-radius: 5px; color: var(--entry-text); font: inherit; line-height: 20px;
}
.setup-controls kbd { min-width: 26px; text-align: center; }
.setup-heading h1 { margin: 0 0 10px; color: var(--entry-text); font-size: 24px; font-weight: 400; }
.setup-subtitle { margin: 0 0 28px; color: var(--entry-muted); font-size: 16px; }
#opt-diff { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
#opt-diff button {
  --level-color: #b5dfba;
  display: flex; flex-direction: column; align-items: flex-start;
  min-width: 0; padding: 18px; border: 3px solid var(--entry-ink);
  background: #35434b; color: var(--entry-text); text-align: left;
  box-shadow: inset 0 3px #ffffff18;
  font: 400 16px 'Jua', sans-serif; cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
#opt-diff button[data-v="easy"] { --level-color: #9cd9ea; }
#opt-diff button[data-v="hard"] { --level-color: #f4d47d; }
#opt-diff button[data-v="faker"] { --level-color: #ff6b6b; background: #3d3440; }
#opt-diff button[data-v="faker"].on { background: #4a3238; box-shadow: inset 0 3px #ffffff18, 0 0 18px #ff6b6b55; }
#opt-diff button[data-v="twins"] { --level-color: #c9b2f4; }
.difficulty-top { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 4px; }
.difficulty-level { font-size: 11px; letter-spacing: 1px; color: var(--entry-muted); }
.difficulty-check { display: grid; place-items: center; flex-shrink: 0; width: 22px; height: 22px; border: 2px solid #73878a; border-radius: 50%; }
.difficulty-check::after { content: ''; width: 5px; height: 9px; border: solid var(--entry-ink); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); opacity: 0; }
.difficulty-meter { display: flex; align-items: flex-end; gap: 5px; height: 44px; margin: 22px 0 18px; }
.difficulty-meter i { display: block; width: 15px; height: 20px; border-radius: 4px; background: #ffffff12; }
.difficulty-meter i:nth-child(2) { height: 30px; }
.difficulty-meter i:nth-child(3) { height: 36px; }
.difficulty-meter i:nth-child(4) { height: 44px; }
.difficulty-meter i:first-child,
[data-v="normal"] .difficulty-meter i:nth-child(2),
[data-v="hard"] .difficulty-meter i:nth-child(2),
[data-v="hard"] .difficulty-meter i:nth-child(3),
[data-v="faker"] .difficulty-meter i,
[data-v="twins"] .difficulty-meter i { background: var(--level-color); }
[data-v="twins"] .difficulty-meter i { height: 30px; }
[data-v="faker"] .difficulty-meter i { box-shadow: 0 0 8px var(--level-color); }
.difficulty-name { font-size: 26px; }
.difficulty-description { margin-top: 8px; font-size: 13px; color: var(--entry-muted); }
#opt-diff button.on { border-color: var(--level-color); background: #435550; box-shadow: inset 0 3px #ffffff18; }
#opt-diff button.on .difficulty-check { background: var(--level-color); border-color: var(--level-color); }
#opt-diff button.on .difficulty-check::after { opacity: 1; }
#opt-diff button.on .difficulty-level { color: var(--level-color); }
@media (hover: hover) {
  #opt-diff button:hover { transform: translateY(-4px); border-color: var(--level-color); }
  #start-btn:hover { background: #c9efb4; transform: translateY(-2px); }
}
#start-btn {
  display: flex; align-items: center; justify-content: center; position: relative;
  width: 100%; margin-top: 24px; padding: 20px 48px;
  border: 3px solid var(--entry-ink); background: var(--setup-accent); color: #26362c;
  font: 400 24px 'Jua', sans-serif; cursor: pointer;
  box-shadow: inset 0 3px #e2ffd780; transition: transform .15s, background .15s;
}
#start-btn:active { transform: translateY(1px); box-shadow: inset 0 2px #171e2420; }
#menu button:focus-visible { outline: 3px solid #fff3d7; outline-offset: 5px; }
@media (max-width: 800px) {
  #opt-diff { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-height: 560px) {
  #menu { padding-block: 22px; }
  .setup-intro { flex-direction: row; gap: 12px; margin-bottom: 10px; }
  .setup-portrait { width: 88px; height: 88px; }
  .setup-brand { margin-bottom: 6px; }
  .setup-controls { margin-bottom: 16px; padding-block: 10px; }
  .setup-subtitle { margin-bottom: 20px; }
  .difficulty-meter { height: 32px; margin: 12px 0; }
  .difficulty-meter i { max-height: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  #opt-diff button, #start-btn { transition: none; }
  #menu { animation: none; }
}
@keyframes menu-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- 게임 모드 선택 ---------- */
.mode-select { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.mode-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 24px 16px; border: 3px solid #637c85; border-radius: 20px;
  background: #33444d; color: var(--entry-text); font: inherit; cursor: pointer;
  box-shadow: inset 0 3px #ffffff15; transition: transform .15s, border-color .15s;
}
.mode-card img { width: clamp(96px, 20vh, 160px); height: clamp(96px, 20vh, 160px); object-fit: contain; }
#online-btn img { width: 100%; max-width: 320px; }
.mode-name { font-size: clamp(20px, 2.5vw, 28px); word-break: keep-all; }
.mode-description { color: var(--entry-muted); font-size: 16px; word-break: keep-all; }
#practice-btn { border-color: #9cd9ea; }
#online-btn { border-color: #c9b2f4; }
#quick-btn { border-color: var(--entry-green); }
.mode-card:focus-visible, #mode-back-btn:focus-visible { outline: 3px solid var(--entry-text); outline-offset: 4px; }
#mode-back-btn {
  border: 3px solid var(--entry-ink); border-radius: 12px; background: #33444d;
  color: var(--entry-text); font: 400 22px 'Jua', sans-serif; cursor: pointer;
}
@media (hover: hover) { .mode-card:not(:disabled):hover { transform: translateY(-3px); background: #40535d; } }

/* Home keeps room for the attribution and contact on shorter screens. */
#menu:not(.practice-view) .riot-disclaimer { margin-top: clamp(10px, 2dvh, 20px); }
@media (max-height: 800px) {
  #menu:not(.practice-view) { padding-block: 12px; }
  #menu:not(.practice-view) .setup-intro { margin-bottom: 8px; }
  #menu:not(.practice-view) .setup-portrait { width: clamp(48px, 12dvh, 88px); height: clamp(48px, 12dvh, 88px); }
  #menu:not(.practice-view) .setup-brand { font-size: 32px; margin-bottom: 4px; }
  #menu:not(.practice-view) .setup-controls { padding-block: 6px; margin-bottom: 10px; }
  #menu:not(.practice-view) .setup-subtitle { margin-bottom: 10px; }
  .mode-select { gap: 10px; }
  .mode-card { padding: 12px 10px; gap: 8px; }
  .mode-card img { height: clamp(48px, 12dvh, 96px); }
}

/* Keep the complete setup visible as the available window height changes. */
#menu { padding-block: clamp(12px, 3vh, 32px); }
.setup-intro { margin-bottom: clamp(8px, 2vh, 18px); }
.setup-portrait { width: clamp(80px, 15vh, 144px); height: clamp(80px, 15vh, 144px); }
.setup-controls { margin-bottom: clamp(12px, 3vh, 28px); }
.setup-subtitle { margin-bottom: clamp(12px, 2.5vh, 24px); }
.difficulty-meter { margin-block: clamp(8px, 2vh, 18px); }
.setup-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: clamp(12px, 2.5vh, 24px); }
.setup-actions #start-btn, .setup-actions #online-btn { margin: 0; padding: 12px 16px; }
@media (min-width: 801px) and (max-height: 740px) {
  .setup-brand { font-size: 44px; margin-bottom: 4px; }
  .setup-controls { padding-block: 8px; }
  #opt-diff button { padding: 14px; }
  .difficulty-meter { height: 32px; }
  .difficulty-meter i { max-height: 100%; }
}
@media (max-width: 800px) {
  #menu { padding: 12px 16px; }
  .setup-intro { flex-direction: row; gap: 8px; margin-bottom: 8px; }
  .setup-portrait { width: 72px; height: 72px; }
  .setup-intro-copy { text-align: left; }
  .setup-brand { font-size: 32px; margin-bottom: 4px; }
  .setup-description { font-size: 13px; }
  .setup-arena-tip { font-size: 12px; margin-top: 2px; }
  .setup-controls { gap: 6px 12px; padding: 8px 0; margin-bottom: 12px; font-size: 12px; }
  .setup-heading h1 { font-size: 20px; margin-bottom: 4px; }
  .setup-subtitle { font-size: 13px; margin-bottom: 12px; }
  #opt-diff { grid-template-columns: 1fr; gap: 6px; }
  #opt-diff button { position: relative; display: grid; grid-template-columns: 54px 54px 1fr; align-items: center; gap: 6px; min-height: 48px; padding: 6px 36px 6px 10px; }
  .difficulty-top { grid-row: auto; }
  .difficulty-check { position: absolute; right: 12px; top: calc(50% - 9px); width: 18px; height: 18px; }
  .difficulty-level { font-size: 10px; letter-spacing: .5px; }
  .difficulty-meter { display: none; }
  .difficulty-name { font-size: 18px; }
  .difficulty-description { min-height: 0; margin: 0; font-size: 12px; line-height: 1.4; }
  .setup-actions { gap: 8px; margin-top: 12px; }
  .setup-actions #start-btn, .setup-actions #online-btn { font-size: 20px; padding: 10px 8px; }
  #online-btn small { font-size: 11px; }
}
@media (max-width: 800px) and (max-height: 700px) {
  .setup-portrait { width: 56px; height: 56px; }
  .setup-brand { font-size: 28px; }
  .setup-description { font-size: 12px; }
  .setup-arena-tip { font-size: 11px; }
  .setup-controls { gap: 4px 8px; margin-bottom: 8px; font-size: 11px; }
  .setup-controls kbd, .setup-mouse { padding: 1px 4px; line-height: 16px; }
  .setup-subtitle { margin-bottom: 8px; }
}

#lobby {
  background: radial-gradient(ellipse at 50% 38%, #28434ae8, #14252df2 48%, #0c171ff7 90%);
  color: var(--entry-text); padding: 24px;
}
.lobby-card { width: min(760px, 100%); margin: auto; }
.lobby-heading {
  display: grid; grid-template-columns: 1fr 280px; grid-template-areas: 'brand art' 'title art';
  align-items: center; gap: 8px 20px; margin-bottom: 16px;
}
.lobby-card .setup-brand { grid-area: brand; margin: 0; font-size: 22px; letter-spacing: -1px; }
#lobby-title { grid-area: title; margin: 0; font-size: 34px; line-height: 1.2; font-weight: 400; }
.lobby-brand-image { grid-area: art; justify-self: end; display: block; width: 280px; height: 128px; object-fit: cover; }
/* 빠른 대전 그림은 정사각형이지만 위아래가 투명 여백이라 3:2로 여백만 잘라낸다 */
#lobby:is([data-state="queue"], [data-quick]) .lobby-brand-image { width: 192px; }
.practice-view .setup-intro, .practice-view .setup-controls { display: none; }
.lobby-status { min-height: 24px; margin: 0 0 14px; color: var(--entry-muted); font-size: 16px; line-height: 1.5; word-break: keep-all; }
#lobby:is([data-state="entry"], [data-state="creating"]) .lobby-status, .lobby-status:empty { display: none; }
#lobby:not([data-state="error"]) .lobby-error, #lobby[data-state="error"] :is(.lobby-heading, .lobby-status) { display: none; }
.lobby-error { padding: 8px 0 20px; text-align: center; word-break: keep-all; }
#lobby[data-state="error"] .lobby-actions { justify-content: center; }
#lobby[data-state="error"] #lobby-leave { width: min(320px, 100%); }
#lobby-error-title {
  margin: 0; color: #f0b2a8; font-size: clamp(24px, 3.6vw, 34px); font-weight: 400;
  line-height: 1.3; letter-spacing: -0.5px; text-shadow: 0 3px #08171f; text-wrap: balance;
}
.lobby-entry, .lobby-room { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
#lobby:not([data-state="room"]) .lobby-room,
#lobby:not(:is([data-state="entry"], [data-state="creating"])) .lobby-entry { display: none; }
.lobby-panel { min-width: 0; padding: 20px; border: 1px solid #52676d; border-radius: 18px; background: #10212be6; }
.lobby-panel h2, #lobby-join-form label { display: block; margin: 0 0 16px; font-size: 20px; font-weight: 400; }
.lobby-entry .lobby-panel { display: flex; flex-direction: column; }
.lobby-create-panel p { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 50px; margin: 0 0 16px; color: var(--entry-muted); font-size: 15px; line-height: 1.5; word-break: keep-all; }
#lobby button { border: 2px solid var(--entry-ink); border-radius: 12px; font: 18px 'Jua', sans-serif; cursor: pointer; transition: background .15s; }
#lobby button:disabled { cursor: wait; opacity: .6; }
#lobby-create, #lobby-join { width: 100%; margin-top: auto; padding: 12px; background: var(--entry-green); color: #26362c; }
#lobby-join { background: #c5a4ed; color: #30223e; }
#lobby-join-code, #lobby-link { width: 100%; min-width: 0; padding: 12px; border: 2px solid #52676d; border-radius: 10px; background: #0c171f; color: var(--entry-text); font: 16px/1.4 'Jua', sans-serif; user-select: text; }
#lobby-join-code { text-transform: uppercase; letter-spacing: 2px; }
#lobby-join-code::placeholder { color: #8fa7aa; letter-spacing: 0; }
#lobby-join-code:focus-visible, #lobby-link:focus-visible { outline: 2px solid var(--entry-green); outline-offset: 2px; }
#lobby-join-code[aria-invalid="true"] { outline-color: #f0b2a8; }
#lobby-join-status { min-height: 21px; margin: 12px 0 14px; font-size: 14px; line-height: 1.5; color: #f0b2a8; }
.lobby-invite, .lobby-match { display: flex; flex-direction: column; }
.lobby-code { display: flex; align-items: center; justify-content: center; min-height: 84px; margin-bottom: 16px; padding: 12px 8px; border: 1px solid transparent; border-radius: 12px; background: transparent; }
.lobby-code strong { font-size: 38px; font-weight: 400; letter-spacing: 5px; color: #fff3bd; }
.lobby-link { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
#lobby-link { font-family: sans-serif; font-size: 13px; }
#lobby-copy { width: 100%; padding: 12px 8px; background: #c5a4ed; color: #30223e; font-size: 20px; }
.lobby-players { display: grid; grid-template-columns: 1fr 1fr; min-height: 84px; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; text-align: center; }
.lobby-players li { display: flex; flex-direction: column; gap: 8px; padding: 18px 4px; border: 1px solid #52676d; border-radius: 12px; background: #0c171f99; }
.lobby-role { font-size: 17px; }
.lobby-player-status { color: var(--entry-muted); font-size: 13px; }
.lobby-players li[data-state="joined"] { border-style: solid; border-color: #8fa7aa; }
.lobby-players li[data-state="ready"] { border-style: solid; border-color: var(--entry-green); background: #b9e39e1f; }
.lobby-players li[data-state="ready"] .lobby-player-status { color: var(--entry-green); }
.lobby-players li[data-state="away"] .lobby-player-status { color: #f0b2a8; }
#lobby-ready { width: 100%; margin-top: auto; padding: 12px; background: var(--entry-green); color: #26362c; font-size: 20px; }
#lobby-ready.on { background: #35434b; color: var(--entry-muted); }
.lobby-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
#lobby[data-state="queue"] .lobby-status { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 76px; margin: 24px 0 16px; text-align: center; }
.queue-main { color: var(--entry-text); font-size: clamp(26px, 4vw, 34px); line-height: 1.2; }
.queue-dots-rest { visibility: hidden; }
.queue-sub { color: var(--entry-muted); font-size: clamp(15px, 2vw, 18px); line-height: 1.3; }
/* 설명은 위 안내와 떨어뜨리고 취소 버튼 쪽에 붙인다 */
.queue-note { margin-top: 22px; color: var(--entry-muted); font-size: 13px; line-height: 1.4; opacity: .75; word-break: keep-all; }
.queue-sub b, #lobby[data-state="room"] .lobby-status b {color: var(--entry-green); font-weight: 400; font-variant-numeric: tabular-nums; }
#lobby[data-state="queue"] .lobby-actions { flex-direction: column; align-items: center; gap: 10px; }
#lobby[data-state="queue"] #lobby-leave { width: min(320px, 100%); }
/* 기다리는 동안 문도봇과 플레이를 고를 수 있다. 위 안내 문구와는 버튼 사이보다 넓게 띄운다 */
#lobby #lobby-bot { display: none; width: min(320px, 100%); min-height: 58px; margin-top: 20px; padding: 12px; border-width: 3px; border-radius: 16px; background: var(--entry-green); color: #26362c; font-size: 20px; }
#lobby[data-state="queue"][data-bot="ready"] #lobby-bot { display: block; }
/* 빠른 대전 준비 대기실: 초대 코드 없이 준비 패널만 */
#lobby[data-quick] .lobby-room { grid-template-columns: 1fr; }
#lobby[data-quick] .lobby-invite { display: none; }
#lobby #lobby-leave { width: 100%; min-width: 100px; min-height: 58px; padding: 12px; border-width: 3px; border-radius: 16px; background: #35434b; color: var(--entry-muted); font-size: 20px; }
.practice-view #mode-back-btn { width: 100%; margin-top: 0; padding: 16px 12px; border: 3px solid var(--entry-ink); border-radius: 16px; background: #35434b; color: var(--entry-muted); font-size: 20px; box-shadow: inset 0 3px #ffffff18; transition: transform .15s, background .15s; }
@media (hover: hover) {
  #lobby button:hover { filter: brightness(1.1); }
  .practice-view #mode-back-btn:hover { background: #43555c; color: var(--entry-text); }
}
#lobby button:active { transform: translateY(1px); }
@media (max-height: 600px) {
  #lobby { padding: 12px 16px; }
  .lobby-card .setup-brand { font-size: 18px; }
  #lobby-title { font-size: 26px; }
  .lobby-heading { margin-bottom: 8px; }
  .lobby-brand-image { width: min(176px, 100%); height: 80px; }
  #lobby:is([data-state="queue"], [data-quick]) .lobby-brand-image { width: 120px; }
  .lobby-status { margin-bottom: 8px; }
  .lobby-panel { padding: 12px; }
  .lobby-panel h2, #lobby-join-form label { margin-bottom: 8px; }
  .lobby-code, .lobby-players { min-height: 60px; margin-bottom: 12px; }
  .lobby-players li { padding-block: 8px; gap: 4px; }
  #lobby-ready, #lobby-copy { padding-block: 10px; }
  .lobby-actions { margin-top: 8px; }
  #lobby :is(#lobby-leave, #lobby-bot) { min-height: 50px; padding: 8px; }
  #lobby #lobby-bot { margin-top: 12px; }
  .lobby-error .net-portrait { width: clamp(80px, 27dvh, 150px); margin-bottom: 12px; }
}

#copy-snackbar {
  word-break: keep-all; text-wrap: balance;
  position: fixed; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; z-index: 30;
  width: max-content; max-width: calc(100% - 32px); padding: 18px 32px; border: 1px solid #52676d; border-radius: 12px;
  background: #10212b; color: var(--entry-text); box-shadow: 0 6px 24px #0005;
  font-size: 20px; text-align: center; pointer-events: none;
  opacity: 0; visibility: hidden; transform: translate(-50%, 8px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
#copy-snackbar.visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) {
  #copy-snackbar { transition: none; }
}

#online-countdown {
  position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 5; pointer-events: none;
  color: #fff3bd; font-size: clamp(72px, 14vw, 128px); text-shadow: 0 6px #08171f, 0 0 24px #0008;
}
#online-countdown.pop { animation: countdown-pop .5s ease-out; }
@keyframes countdown-pop { from { transform: translate(-50%, -50%) scale(1.6); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
#net-banner {
  position: fixed; inset: 0; z-index: 11; display: grid; place-items: center;
  padding: 24px 20px; overflow-y: auto; text-align: center; word-break: keep-all;
  background: radial-gradient(ellipse at 50% 38%, #203d46dc, #132830ed 80%);
}
.net-status { width: min(760px, 100%); margin: auto; }
.net-portrait {
  display: block; width: clamp(160px, 30dvh, 300px); height: auto; margin: 0 auto 24px;
  mask-image: radial-gradient(ellipse, #000 48%, transparent 72%);
}
#net-title {
  margin: 0; color: #f0b2a8; font-size: clamp(32px, 6.5vw, 64px); font-weight: 400;
  line-height: 1.2; letter-spacing: -1px; text-shadow: 0 5px #08171f; text-wrap: balance;
}
#net-detail { margin: 20px 0 0; color: var(--entry-green); font-size: clamp(16px, 2.4vw, 22px); line-height: 1.5; }
#net-wait {
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px;
  width: fit-content; margin: 32px auto 0; padding: 13px 22px;
  border: 2px solid #53676d; border-radius: 16px; background: #35434b;
  color: var(--entry-muted); font-size: clamp(16px, 2vw, 20px); box-shadow: 0 3px #101e25;
}
#net-seconds { color: var(--entry-text); font-weight: 400; font-variant-numeric: tabular-nums; }
#net-seconds:empty { display: none; }
.net-wait-dots { display: flex; gap: 4px; }
.net-wait-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--entry-green); animation: net-pulse 1.4s ease-in-out infinite; }
.net-wait-dots i:nth-child(2) { animation-delay: .15s; }
.net-wait-dots i:nth-child(3) { animation-delay: .3s; }
#net-banner[data-state="back"] { pointer-events: none; }
#net-banner[data-state="back"] #net-title { color: var(--entry-green); }
#net-banner[data-state="back"] #net-detail { color: var(--entry-text); }
@keyframes net-pulse { 0%, 80%, 100% { opacity: .35; } 40% { opacity: 1; } }
@media (max-height: 560px) {
  #net-banner { padding: 16px; }
  .net-portrait { width: clamp(80px, 27dvh, 150px); margin-bottom: 12px; }
  #net-title { font-size: clamp(28px, 5vw, 44px); }
  #net-detail { margin-top: 12px; }
  #net-wait { margin-top: 18px; padding: 10px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .net-wait-dots i { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  #online-countdown.pop { animation: none; }
  #online-btn, #lobby button, .practice-view #mode-back-btn { transition: none; }
}

/* Practice: five upright difficulty cards below a compact introduction. */
#menu.practice-view { background: radial-gradient(ellipse at 25% 50%, #284a50ec, #101e28f5 75%); }
.practice-view .match-setup { width: min(1040px, 100%); display: grid; grid-template-columns: 1fr; align-items: center; gap: 28px; }
.practice-view .setup-heading { display: grid; grid-template-areas: 'brand art' 'title art' 'subtitle art'; grid-template-columns: 1fr 200px; column-gap: 24px; align-items: center; text-align: left; }
.practice-view .practice-heading { display: contents; }
.practice-view .practice-heading .setup-brand { grid-area: brand; margin: 0 0 24px; font-size: 24px; letter-spacing: -1px; }
.practice-view #select-title { grid-area: title; margin: 0 0 12px; font-size: 38px; line-height: 1.2; word-break: keep-all; }
.practice-view #difficulty-label { grid-area: subtitle; margin: 0; font-size: 16px; line-height: 1.65; word-break: keep-all; }
.practice-art { grid-area: art; display: block; width: 100%; height: clamp(120px, 22dvh, 200px); object-fit: contain; margin: 0; transform: scale(1.24); transform-origin: right center; filter: drop-shadow(0 16px 20px #0003); }
.practice-view #opt-diff { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.practice-view #opt-diff button { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-height: 240px; padding: 20px 16px; border: 2px solid #526b73; border-radius: 16px; background: #263b45; box-shadow: none; }
.practice-view .difficulty-top { width: 100%; }
.practice-view .difficulty-level { font-size: 10px; letter-spacing: .8px; }
.practice-view .difficulty-meter { display: flex; height: 44px; margin: 26px 0 22px; }
.practice-view .difficulty-name { font-size: 24px; }
.practice-view .difficulty-description { min-height: 0; margin: 10px 0 0; font-size: 13px; line-height: 1.4; word-break: keep-all; }
.practice-view .difficulty-check { position: static; width: 20px; height: 20px; }
.practice-view #opt-diff button.on { border-color: var(--level-color); background: #354f50; box-shadow: none; }
.practice-view #opt-diff button[data-v='faker'] { background: #3a303f; }
.practice-view #opt-diff button[data-v='faker'].on { background: #4b3544; }
.practice-view .setup-actions { grid-template-columns: 1.6fr 1fr; gap: 10px; margin-top: 20px; }
.practice-view .setup-actions #start-btn, .practice-view #mode-back-btn { min-height: 56px; padding: 12px; font-size: 22px; border-radius: 12px; }
.practice-view .setup-actions #mode-back-btn { border-radius: 16px; font-size: 20px; }
.practice-view #mode-back-btn:active { transform: translateY(1px); }
@media (hover: hover) {
  .practice-view #opt-diff button:hover { transform: translateY(-3px); }
}
@media (min-width: 601px) and (max-height: 650px) {
  .practice-view .match-setup { gap: 16px; }
  .practice-view .setup-heading { grid-template-columns: 1fr 140px; }
  .practice-view .practice-heading .setup-brand { margin-bottom: 8px; font-size: 20px; }
  .practice-view #select-title { font-size: 30px; margin-bottom: 8px; }
  .practice-art { height: 120px; }
  .practice-view #opt-diff button { min-height: 180px; padding: 14px 12px; }
  .practice-view .difficulty-meter { margin: 14px 0; }
  .practice-view .setup-actions { margin-top: 12px; }
  .practice-view .setup-actions #start-btn, .practice-view #mode-back-btn { min-height: 48px; padding: 8px; }
}

/* 빠른 대전 카드: 나 말고도 접속자가 있으면 설명 대신 접속자 수 */
.online-count-num { color: var(--entry-green); }
