/* ====== 플레이어(스마트폰) 화면 ======
   엄지 조작 기준: 터치 타깃 최소 56px, 세로 폰(360~430px)에서 위젯이 스크롤 없이 한 화면 */
body.play { position: fixed; inset: 0; overscroll-behavior: none; touch-action: manipulation; font-size: 16px; line-height: 1.3; }
.play .screen { position: absolute; inset: 0; display: flex; flex-direction: column; padding: max(12px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); gap: 12px; overflow: auto; -webkit-overflow-scrolling: touch; }
.play .s-game { padding: 0; overflow: hidden; }
#offline-bar { position: fixed; top: 0; left: 0; right: 0; background: var(--bad); color: #fff; text-align: center; font-size: 13px; font-weight: 800; padding: max(5px, env(safe-area-inset-top)) 8px 5px; z-index: 999; display: none; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
body.is-offline #offline-bar { display: block; animation: fadeIn .2s; }

/* ---- 입장 ---- */
.join-form { display: flex; flex-direction: column; gap: 10px; max-width: 420px; width: 100%; margin: auto; animation: fadeUp .35s var(--ease-pop); }
.join-brand { text-align: center; margin-bottom: 6px; }
.join-logo { font-size: 56px; line-height: 1.1; animation: floatY 3s ease-in-out infinite; filter: drop-shadow(0 8px 20px rgba(0,0,0,.4)); }
.join-title { font-size: 28px; font-weight: 900; letter-spacing: -.02em; background: linear-gradient(135deg, #fff, var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.join-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.join-error { background: rgba(255,95,109,.18); border: 1px solid var(--bad); border-radius: 12px; padding: 12px; font-size: 14px; font-weight: 700; text-align: center; animation: shake .4s; }
.join-label { font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 4px; letter-spacing: .02em; }
.join-input { background: rgba(0,0,0,.3); border: 1.5px solid var(--line2); color: var(--text); border-radius: 14px; padding: 14px 16px; font-size: 18px; min-height: 56px; width: 100%; transition: border-color .15s, box-shadow .15s; }
.join-input:focus { outline: none; border-color: var(--accent2); box-shadow: 0 0 0 4px rgba(255,195,113,.25); }
.join-code { text-align: center; letter-spacing: .4em; font-size: 30px; font-weight: 900; text-transform: uppercase; padding-left: calc(16px + .4em); }
.join-avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.join-avatar { font-size: 28px; min-height: 56px; border-radius: 14px; border: 2px solid transparent; background: var(--panel); display: flex; align-items: center; justify-content: center; transition: transform .12s var(--ease-pop), background .15s, border-color .15s; }
.join-avatar:active { transform: scale(.92); }
.join-avatar.is-selected { border-color: var(--accent2); background: rgba(255,195,113,.18); box-shadow: 0 0 16px rgba(255,195,113,.3); transform: scale(1.06); }
.join-submit { margin-top: 10px; }

/* ---- 대기 ---- */
.p-wait { margin: auto; text-align: center; animation: fadeIn .3s; }
.p-wait-spin { width: 48px; height: 48px; border: 5px solid var(--line); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto 16px; animation: spin .9s linear infinite; }
.p-wait-text { color: var(--muted); font-weight: 700; font-size: 16px; }

/* ---- 로비 ---- */
.lb-me {
  display: flex; align-items: center; gap: 12px; position: relative;
  background: var(--panel); background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 32%, transparent), rgba(255,255,255,.06) 75%);
  border: 1px solid rgba(255,255,255,.1); border-left: 7px solid var(--pc); border-radius: 16px; padding: 10px 12px; animation: fadeUp .3s var(--ease-pop);
}
.lb-me-avatar { font-size: 26px; line-height: 1; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--pc); box-shadow: 0 0 0 2px rgba(255,255,255,.18), 0 0 16px color-mix(in srgb, var(--pc) 60%, transparent); flex-shrink: 0; }
.lb-me-name { font-weight: 900; font-size: 19px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-me-code { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .06em; }
.lb-me-edit { background: transparent; border: 1px solid var(--line2); color: var(--muted); border-radius: 10px; width: 44px; height: 44px; font-size: 18px; }
.lb-me-edit:active { background: var(--panel2); }
.lb-tabs { display: flex; gap: 6px; background: rgba(0,0,0,.25); padding: 4px; border-radius: 14px; }
.lb-tab { flex: 1; background: transparent; border: 0; color: var(--muted); border-radius: 11px; padding: 12px; min-height: 48px; font-weight: 800; font-size: 15px; transition: background .15s, color .15s; }
.lb-tab.is-active { background: var(--panel3); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.lb-panel { display: flex; flex-direction: column; gap: 10px; animation: fadeIn .2s; }
.lb-hint { font-size: 13px; color: var(--muted); text-align: center; line-height: 1.4; }
.lb-cat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.lb-cat summary { padding: 14px 16px; min-height: 52px; font-weight: 800; font-size: 16px; cursor: pointer; list-style: none; display: flex; align-items: center; }
.lb-cat summary::-webkit-details-marker { display: none; }
.lb-cat summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform .2s; }
.lb-cat[open] summary::after { transform: rotate(180deg); }
.lb-cat-list { display: flex; flex-direction: column; }
.lb-game { display: flex; gap: 12px; align-items: center; text-align: left; background: transparent; border: 0; border-top: 1px solid var(--line); padding: 12px 16px; min-height: 60px; width: 100%; color: var(--text); transition: background .1s; }
.lb-game:active { background: var(--panel2); }
.lb-game.is-dim { opacity: .45; }
.lb-game-emoji { font-size: 28px; line-height: 1; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(0,0,0,.25); flex-shrink: 0; }
.lb-game-body { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.lb-game-name { font-weight: 800; font-size: 16px; }
.lb-game-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-plist { display: flex; flex-direction: column; gap: 6px; }
.lb-prow {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 22%, transparent), rgba(255,255,255,.05) 70%);
  border: 1px solid rgba(255,255,255,.06); border-left: 6px solid var(--pc); border-radius: 12px; padding: 10px 12px; min-height: 52px; font-weight: 800; animation: fadeUp .3s var(--ease-pop) both;
}
.lb-prow.is-me { border-color: rgba(255,195,113,.6); border-left-color: var(--pc); box-shadow: 0 0 0 1px rgba(255,195,113,.3), 0 0 16px rgba(255,195,113,.15); }
.lb-prow.is-offline { opacity: .4; filter: grayscale(.6); }
.lb-prow-avatar { font-size: 20px; line-height: 1; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--pc); box-shadow: 0 0 0 2px rgba(255,255,255,.15); flex-shrink: 0; }
.lb-prow-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-prow-pts { color: var(--accent2); font-variant-numeric: tabular-nums; font-weight: 900; }
.lb-prow-rank { width: 22px; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.rs-list { display: flex; flex-direction: column; gap: 6px; }
.rs-list .lb-prow:nth-child(1) { background: linear-gradient(90deg, rgba(255,209,102,.45), rgba(255,195,113,.15)); box-shadow: 0 0 24px rgba(255,209,102,.3); border-color: rgba(255,209,102,.55); border-left-color: var(--pc); font-size: 18px; }
.rs-list .lb-prow:nth-child(1) .lb-prow-rank { color: var(--gold); font-weight: 900; }
.rs-list .lb-prow:nth-child(1) .lb-prow-pts { color: var(--gold); }
.rs-list .lb-prow:nth-child(2) { background: linear-gradient(90deg, rgba(217,220,234,.2), rgba(255,255,255,.05)); }
.rs-list .lb-prow:nth-child(3) { background: linear-gradient(90deg, rgba(227,162,111,.22), rgba(255,255,255,.05)); }
.rs-list .lb-prow:nth-child(n+2) { animation-delay: calc(60ms * var(--i, 1)); }

/* ---- 게임 컨트롤러 루트 ---- */
.ctrl-root { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; padding: max(10px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); overflow: hidden; }

/* ---- UI Kit 위젯 ---- */
.ui-status { font-size: 13px; font-weight: 700; color: var(--muted); text-align: center; padding: 4px 8px; letter-spacing: .02em; flex-shrink: 0; }
.ui-message { text-align: center; padding: 10px 8px; animation: fadeUp .3s var(--ease-pop); flex-shrink: 0; }
.ui-message-emoji { font-size: 56px; line-height: 1.1; filter: drop-shadow(0 8px 18px rgba(0,0,0,.4)); animation: pop .45s var(--ease-pop); }
.ui-message-title { font-size: 28px; font-weight: 900; letter-spacing: -.01em; line-height: 1.2; }
.ui-message-sub { font-size: 16px; color: var(--muted); margin-top: 6px; line-height: 1.4; font-weight: 600; }

/* 일반 버튼: 56px+ 터치 타깃, 눌림 = 아래로 눌리는 3D 느낌 */
.ui-btn {
  position: relative; background: var(--btn); background: linear-gradient(180deg, color-mix(in srgb, var(--btn) 82%, #fff), var(--btn) 55%, color-mix(in srgb, var(--btn) 88%, #000));
  border: 0; border-bottom: 5px solid rgba(0,0,0,.35); color: #fff; border-radius: 16px; padding: 14px 20px; min-height: 56px;
  font-size: 20px; font-weight: 800; width: 100%; line-height: 1.2; text-shadow: 0 1px 2px rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.22);
  transition: transform .06s, filter .1s, box-shadow .1s, border-bottom-width .06s;
}
.ui-btn.is-pressed, .ui-btn:active { transform: translateY(3px); border-bottom-width: 2px; filter: brightness(1.15); box-shadow: 0 2px 8px rgba(0,0,0,.3), 0 0 22px color-mix(in srgb, var(--btn) 55%, transparent); }
.ui-btn-sm { padding: 8px 14px; min-height: 44px; font-size: 15px; width: auto; border-radius: 12px; border-bottom-width: 3px; }
.ui-btn-xl { padding: 22px; min-height: 76px; font-size: 26px; border-radius: 20px; }
.ui-btn-accent { --btn: var(--accent); background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 6px 22px rgba(255,95,109,.45), inset 0 1px 0 rgba(255,255,255,.25); }
.ui-btn-ghost { --btn: #ffffff; background: transparent; border: 1.5px solid var(--line2); border-bottom-width: 1.5px; color: var(--muted); box-shadow: none; text-shadow: none; }
.ui-btn-ghost.is-pressed, .ui-btn-ghost:active { transform: scale(.97); border-bottom-width: 1.5px; background: var(--panel2); box-shadow: none; filter: none; }
.ui-btn-emoji { font-size: 1.35em; line-height: 1; }
.ui-perm { --btn: var(--info); }

/* 거대 버튼 */
.ui-bigbtn {
  position: relative; flex: 1; min-height: min(40vh, 320px);
  background: var(--btn); background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--btn) 70%, #fff) 0%, var(--btn) 45%, color-mix(in srgb, var(--btn) 82%, #000) 100%);
  border: 0; border-bottom: 10px solid rgba(0,0,0,.35); color: #fff; border-radius: 30px; font-size: 40px; font-weight: 900; letter-spacing: -.01em;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-shadow: 0 2px 6px rgba(0,0,0,.3);
  transition: transform .05s, filter .08s, box-shadow .1s, border-bottom-width .05s;
  box-shadow: 0 14px 40px rgba(0,0,0,.4), 0 0 50px color-mix(in srgb, var(--btn) 35%, transparent), inset 0 2px 0 rgba(255,255,255,.3);
}
.ui-bigbtn::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 3px rgba(255,255,255,.12); pointer-events: none; }
.ui-bigbtn.is-pressed { transform: scale(.97) translateY(6px); border-bottom-width: 4px; filter: brightness(1.2); box-shadow: 0 4px 16px rgba(0,0,0,.4), 0 0 70px color-mix(in srgb, var(--btn) 65%, transparent), inset 0 2px 0 rgba(255,255,255,.3); }
.ui-bigbtn-emoji { font-size: 64px; line-height: 1; filter: drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
.ui-bigbtn.is-pressed .ui-bigbtn-emoji { transform: scale(1.1); }

/* 버튼 그리드 */
.ui-grid { display: grid; gap: 10px; flex: 1; min-height: 0; }
.ui-grid-btn { min-height: 64px; height: 100%; flex-direction: column; gap: 2px; padding: 10px 8px; font-size: 20px; }
.ui-grid-btn .ui-btn-emoji { font-size: 1.6em; }

/* 선택지 */
.ui-choices { display: grid; gap: 10px; flex-shrink: 0; }
.ui-choice {
  background: var(--panel2); border: 2px solid var(--line2); color: var(--text); border-radius: 16px; padding: 14px 16px; font-size: 18px; font-weight: 800; text-align: left;
  display: flex; align-items: center; gap: 12px; min-height: 60px; line-height: 1.25; transition: transform .1s, background .15s, border-color .15s, opacity .2s, box-shadow .15s;
}
.ui-choice.is-pressed, .ui-choice:active { transform: scale(.97); background: var(--panel3); }
.ui-choice.is-selected { border-color: var(--accent2); background: rgba(255,195,113,.2); box-shadow: 0 0 0 1px var(--accent2), 0 0 20px rgba(255,195,113,.3); }
.ui-choice.is-selected::after { content: '✓'; color: var(--accent2); font-weight: 900; font-size: 20px; }
.ui-choices.is-locked .ui-choice:not(.is-selected) { opacity: .4; }
.ui-choice-label { flex: 1; }

/* 텍스트 입력 */
.ui-text { display: flex; gap: 8px; flex-shrink: 0; }
.ui-input { flex: 1; background: rgba(0,0,0,.3); border: 1.5px solid var(--line2); color: var(--text); border-radius: 14px; padding: 12px 16px; font-size: 18px; min-width: 0; min-height: 56px; transition: border-color .15s, box-shadow .15s; }
.ui-input:focus { outline: none; border-color: var(--accent2); box-shadow: 0 0 0 4px rgba(255,195,113,.25); }
.ui-text-submit { width: auto; padding: 10px 18px; font-size: 17px; min-height: 56px; }

/* 슬라이더 */
.ui-slider { display: flex; flex-direction: column; gap: 4px; padding: 10px 8px; flex-shrink: 0; }
.ui-slider input { width: 100%; height: 56px; margin: 0; accent-color: var(--accent); -webkit-appearance: none; appearance: none; background: transparent; }
.ui-slider input::-webkit-slider-runnable-track { height: 14px; border-radius: 999px; background: rgba(255,255,255,.14); box-shadow: inset 0 2px 4px rgba(0,0,0,.35); }
.ui-slider input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 40px; height: 40px; margin-top: -13px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 3px solid #fff; box-shadow: 0 4px 14px rgba(255,95,109,.5); }
.ui-slider input:active::-webkit-slider-thumb { transform: scale(1.12); }
.ui-slider input::-moz-range-track { height: 14px; border-radius: 999px; background: rgba(255,255,255,.14); }
.ui-slider input::-moz-range-thumb { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 3px solid #fff; box-shadow: 0 4px 14px rgba(255,95,109,.5); }
.ui-slider-label { color: var(--muted); font-size: 14px; font-weight: 700; text-align: center; }
.ui-slider-value { font-size: 36px; font-weight: 900; text-align: center; font-variant-numeric: tabular-nums; line-height: 1.1; }

/* 방향패드 */
.ui-dpad { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 8px; width: min(82vw, 340px, 48vh); aspect-ratio: 1; margin: auto; flex-shrink: 0; }
.ui-dpad-btn {
  background: var(--btn); background: linear-gradient(180deg, color-mix(in srgb, var(--btn) 82%, #fff), var(--btn) 55%, color-mix(in srgb, var(--btn) 88%, #000));
  border: 0; border-bottom: 6px solid rgba(0,0,0,.35); color: #fff; border-radius: 16px; font-size: 30px; font-weight: 900; min-height: 56px;
  box-shadow: 0 6px 16px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.22); transition: transform .05s, filter .08s, border-bottom-width .05s;
}
.ui-dpad-btn.is-pressed { filter: brightness(1.25); transform: translateY(3px); border-bottom-width: 3px; box-shadow: 0 2px 8px rgba(0,0,0,.3), 0 0 22px color-mix(in srgb, var(--btn) 55%, transparent); }
.ui-dpad-u { grid-area: 1 / 2; border-radius: 16px 16px 10px 10px; } .ui-dpad-l { grid-area: 2 / 1; border-radius: 16px 10px 10px 16px; } .ui-dpad-r { grid-area: 2 / 3; border-radius: 10px 16px 16px 10px; } .ui-dpad-d { grid-area: 3 / 2; border-radius: 10px 10px 16px 16px; }
.ui-dpad-c { grid-area: 2 / 2; --btn: var(--accent); border-radius: 50%; font-size: 22px; }

/* 조이스틱 */
.ui-joy { width: min(70vw, 260px, 42vh); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.04), rgba(255,255,255,.1)); border: 2px solid var(--line2); margin: auto; position: relative; touch-action: none; flex-shrink: 0; box-shadow: inset 0 6px 24px rgba(0,0,0,.45), 0 0 0 10px rgba(255,255,255,.03); }
.ui-joy::before { content: ''; position: absolute; inset: 12%; border-radius: 50%; border: 1.5px dashed rgba(255,255,255,.14); pointer-events: none; }
.ui-joy-knob { position: absolute; left: 50%; top: 50%; width: 40%; height: 40%; margin: -20% 0 0 -20%; border-radius: 50%; background: var(--btn); background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--btn) 60%, #fff), var(--btn) 55%, color-mix(in srgb, var(--btn) 80%, #000)); box-shadow: 0 8px 24px rgba(0,0,0,.5), 0 0 30px color-mix(in srgb, var(--btn) 45%, transparent), inset 0 2px 0 rgba(255,255,255,.35); pointer-events: none; }

/* 스와이프 영역 */
.ui-swipe { flex: 1; min-height: min(40vh, 320px); border-radius: 26px; background: var(--panel); border: 2px dashed var(--line2); display: flex; align-items: center; justify-content: center; touch-action: none; box-shadow: inset 0 0 60px rgba(0,0,0,.2); }
.ui-swipe:active { background: var(--panel2); border-style: solid; }
.ui-swipe-hint { color: var(--muted); font-size: 22px; font-weight: 900; letter-spacing: .02em; text-align: center; padding: 0 20px; }

/* 그림판 */
.ui-draw { flex: 1; min-height: min(50vh, 420px); display: flex; flex-direction: column; gap: 8px; }
.ui-draw-canvas { flex: 1; width: 100%; min-height: 0; border-radius: 16px; touch-action: none; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.4), 0 0 0 3px rgba(255,255,255,.1); }
.ui-draw-palette { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-start; padding: 2px 0; flex-shrink: 0; }
.ui-draw-color { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); box-shadow: 0 2px 6px rgba(0,0,0,.4); transition: transform .12s var(--ease-pop), border-color .12s; }
.ui-draw-color.is-selected { border-color: var(--accent2); transform: scale(1.18); box-shadow: 0 0 14px rgba(255,195,113,.5); }
.ui-draw-palette .ui-btn-sm { margin-left: auto; flex: 1 1 auto; min-width: 72px; min-height: 40px; }

/* 점수 / 진행 바 */
.ui-score { text-align: center; flex-shrink: 0; padding: 4px 0; }
.ui-score-num { font-size: 68px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.03em; background: linear-gradient(180deg, #fff, var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 18px rgba(255,195,113,.25)); }
.ui-score-label { color: var(--muted); font-size: 14px; font-weight: 700; margin-top: 4px; letter-spacing: .04em; }
.ui-progress { height: 22px; border-radius: 999px; background: rgba(0,0,0,.35); border: 1px solid var(--line); position: relative; overflow: hidden; flex-shrink: 0; box-shadow: inset 0 2px 6px rgba(0,0,0,.4); }
.ui-progress-bar { height: 100%; background: linear-gradient(90deg, var(--good), var(--info)); transition: width .15s; border-radius: 999px; box-shadow: 0 0 14px rgba(79,172,254,.5); }
.ui-progress-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; text-shadow: 0 1px 2px rgba(0,0,0,.6); letter-spacing: .02em; }
.ui-block { padding: 8px; }

/* ---- 가로 모드 (낮은 높이) ---- */
@media (orientation: landscape) and (max-height: 520px) {
  .play .screen { padding: 8px 16px; gap: 8px; }
  .join-form { max-width: 560px; }
  .join-logo { font-size: 36px; }
  .join-title { font-size: 22px; }
  .ctrl-root { gap: 6px; padding: 6px 12px; }
  .ui-message { padding: 4px 8px; }
  .ui-message-emoji { font-size: 34px; }
  .ui-message-title { font-size: 20px; }
  .ui-message-sub { font-size: 13px; margin-top: 2px; }
  .ui-bigbtn { min-height: 0; font-size: 30px; border-radius: 22px; }
  .ui-bigbtn-emoji { font-size: 40px; }
  .ui-score-num { font-size: 44px; }
  .ui-dpad { width: min(54vh, 260px); gap: 6px; }
  .ui-dpad-btn { min-height: 0; font-size: 24px; }
  .ui-joy { width: min(50vh, 220px); }
  .ui-swipe { min-height: 0; }
  .ui-draw { min-height: 0; }
  .ui-slider-value { font-size: 28px; }
  .ui-grid-btn { min-height: 56px; font-size: 18px; }
  .ui-choice { min-height: 56px; padding: 10px 14px; font-size: 16px; }
}
/* 매우 작은 폰 (≤360px 너비) */
@media (max-width: 360px) {
  .ui-btn { font-size: 18px; padding: 12px 14px; }
  .ui-bigbtn { font-size: 34px; }
  .ui-message-title { font-size: 22px; }
  .ui-choice { font-size: 17px; padding: 12px 14px; }
}

/* ---- 코어 보완 (개발팀 피드백 반영) ---- */
.ui-joy { max-width: 100%; }
.ui-grid.no-grow { flex: 0 0 auto; }
.ui-grid.is-locked .ui-grid-btn:not(.is-selected) { opacity: .4; pointer-events: none; }
.ui-draw-width { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; background: var(--panel2); display: inline-flex; align-items: center; justify-content: center; }
.ui-draw-width span { display: block; border-radius: 50%; background: var(--text); }
.ui-draw-width.is-selected { border-color: var(--accent2); }
.lb-quick { display: flex; flex-direction: column; gap: 8px; }
.ui-status.lg { font-size: 20px; font-weight: 800; color: var(--text); padding: 8px; }
.ui-message { flex-shrink: 0; }
.ui-message-sub { white-space: pre-line; }

/* 입장 비밀번호 */
.join-pin { letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
