/* 설정 창·내 계정 창·로그인 창 */
.sound-panel {
  position: fixed;
  z-index: 30;
  right: 12px;
  top: calc(64px + env(safe-area-inset-top));
  width: min(280px, calc(100% - 24px));
  padding: 16px;
  display: grid;
  gap: 12px;
  background: var(--card-hi);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.sound-panel[hidden] { display: none; }
.sound-panel h3 { margin: 0; font-size: 15px; }
.sound-panel label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.sound-panel input[type="range"] { width: 100%; accent-color: var(--red); }
/* 설정 창 맨 아래 "게임 통계 보내기" (js/shell/analytics.js). 다른 항목과 줄로 나눈다 */
.stats-opt { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.sound-panel .stats-opt-row { display: flex; align-items: center; gap: 10px; min-height: 32px; font-size: 14px; color: var(--text); cursor: pointer; }
.stats-opt-row input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--red); cursor: pointer; }
.stats-opt-note { margin: 4px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); word-break: keep-all; overflow-wrap: anywhere; }
.lang-select {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
}
.account-tier { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.prompt-card input { width: 100%; margin-bottom: 16px; }
.login-card { text-align: left; }
.login-card h3 { margin: 0 0 14px; font-size: 20px; text-align: center; }
.login-google { width: 100%; color: #1f1f1f; }
.login-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: var(--muted); font-size: 12px; }
.login-or::before, .login-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.login-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.login-tabs button { min-height: 38px; font-size: 14px; }
.login-tabs button[aria-selected="true"] { border-color: var(--red); background: #d6283b22; }
.login-form { display: grid; gap: 10px; }
.login-form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.login-form input {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  font: inherit;
  font-size: 15px;
}
.login-form input:focus { outline: none; border-color: var(--red); }
@media (pointer: coarse) { .login-form input { font-size: 16px; } } /* 아이폰이 입력칸을 누를 때 확대하지 않게 (16px 미만이면 확대) */
.login-form .hint { font-size: 12px; color: var(--muted); }
.login-error { min-height: 1.2em; margin: 0; color: var(--red-hi); font-size: 13px; }
.login-note { margin: 0; font-size: 12px; color: var(--gold); }
.login-close { width: 100%; margin-top: 10px; }
.account-panel { width: min(320px, calc(100% - 24px)); gap: 14px; max-height: calc(100dvh - 90px); overflow-y: auto; }
.ap-head { display: flex; align-items: center; gap: 12px; }
.ap-badge { flex-shrink: 0; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--tier) 45%, transparent)); }
.ap-badge svg { display: block; }
.ap-who { min-width: 0; display: grid; }
.ap-who strong { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-who small { color: var(--muted); font-size: 12px; }
.ap-tier { display: grid; gap: 6px; padding: 12px; border-radius: 12px; background: #0000002e; border: 1px solid var(--line); }
.ap-tier-top { display: flex; justify-content: space-between; align-items: baseline; }
.ap-tier-top strong { color: var(--tier); font-size: 16px; }
.ap-tier-top span { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.ap-bar { height: 8px; border-radius: 999px; background: #ffffff12; overflow: hidden; }
.ap-bar i { display: block; height: 100%; background: var(--tier); border-radius: inherit; transition: width .4s ease; }
.ap-tier > small { font-size: 12px; color: var(--muted); }
.ap-ladder { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; margin-top: 4px; }
.ap-ladder span { display: grid; justify-items: center; gap: 2px; opacity: .35; }
.ap-ladder span.done { opacity: .7; }
.ap-ladder span.now { opacity: 1; }
.ap-ladder small { font-size: 9px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ap-ladder span.now small { color: var(--tier); font-weight: 800; }
.ap-formula { font-size: 11px !important; opacity: .8; }
.ap-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; }
.ap-stats div { padding: 8px 10px; border-radius: 10px; background: #0000002e; border: 1px solid var(--line); min-width: 0; }
.ap-stats dt { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-stats dd { margin: 2px 0 0; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ap-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.ap-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.ap-actions .btn { min-height: 40px; font-size: 14px; }
.ap-actions .btn[hidden] { display: none; }
.sound-panel {
  border-radius: 20px;
  border: 1px solid var(--line-hi);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(18, 15, 23, .92);
}
.lang-select {
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid var(--line-hi);
  color: var(--text);
}
.lang-select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-dim); }
.sound-panel, .account-panel {
  background: rgba(20, 13, 26, .94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line-hi);
  border-radius: 20px;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .95), 0 0 40px -18px rgba(224, 100, 154, .3);
}
.ap-bar { background: rgba(255, 255, 255, .07); }
.ap-bar i { box-shadow: 0 0 12px color-mix(in srgb, var(--tier, var(--blue)) 60%, transparent); }
.ap-ladder span.now small { color: var(--tier); }
.ap-stats div, .ap-tier { background: rgba(0, 0, 0, .26); border: 1px solid var(--line); }
.login-tabs button[aria-selected="true"] { border-color: var(--blue); background: var(--blue-dim); color: var(--blue-hi); }
.login-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-dim); }
.login-note { color: var(--gold); }
.login-error { color: var(--red-hi); }

/* ---------- 로그인 창 개선 (2026-11-28 사용자 지시 "초기 로그인 할때의 창도 개선해 구글 아이디 로그인 버튼은 기본적으로 흰 색이 상식") ---------- */
/* 구글 버튼: 구글 안내대로 흰 바탕 + 어두운 글자 + 옅은 테두리 */
.modal-card .btn.login-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 48px;
  background: #fff; color: #1f1f1f;
  border: 1px solid #dadce0; border-radius: 12px;
  font-size: 15px; font-weight: 600; letter-spacing: 0;
  text-shadow: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 16px rgba(0, 0, 0, .35);
}
.modal-card .btn.login-google:hover, .modal-card .btn.login-google:focus-visible { background: #f2f4f7; border-color: #c6c9ce; color: #1f1f1f; }
.modal-card .btn.login-google:active { background: #e8eaed; transform: translateY(1px); }
.modal-card .btn.login-google:disabled { opacity: .6; }
.modal-card .btn.login-google svg { flex: 0 0 auto; }
/* 숨긴 칸(아이디 만들기 전용)은 정말 숨긴다: label 의 display: grid 가 hidden 을 이기던 것 수정 */
.login-card [hidden] { display: none !important; }
.login-card { width: min(400px, 100%); }
.login-form label { text-align: left; font-size: 13px; font-weight: 700; color: #cfc3d6; }
.login-form input {
  min-height: 48px; padding: 0 14px; border-radius: 12px;
  background: #100a16; border: 1px solid rgba(190, 170, 215, .32);
  font-size: 16px; font-weight: 600;
}
.login-form .hint { font-weight: 500; }
.login-form .login-error:empty { display: none; }
.login-form > .btn.primary { min-height: 48px; margin-top: 4px; }
.login-tabs { padding: 4px; border-radius: 14px; background: rgba(0, 0, 0, .28); }
.login-tabs button { border-color: transparent; background: transparent; box-shadow: none; }
.modal-card .login-note { margin: 0; font-size: 12.5px; font-weight: 600; line-height: 1.5; text-align: left; color: var(--gold); }
.modal-card .login-error { margin: 0; font-size: 13px; font-weight: 600; text-align: left; }

/* 부의 징표 지급 (운영자 계정의 내 계정 창에만 보인다. js/shell/wealth.js) */
.wealth-admin { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: #0000002e; border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); }
.wealth-admin strong { font-size: 14px; }
.wealth-admin label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.wealth-admin input { width: 100%; min-width: 0; }
.wealth-admin-msg { margin: 0; min-height: 1.3em; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
