/* 왕좌 뺏기 (T-261110-043) — 어두운 바탕 + 금색 하나. 폰 우선. */
:root {
  --bg: #0b0a10;
  --surface: #15121d;
  --surface-2: #1d1927;
  --line: #2e2838;
  --text: #f5f1e8;
  --muted: #aaa294;
  --gold: #f2c14e;
  --gold-hi: #ffe39a;
  --gold-ink: #1b1404;
  --radius: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* hidden 속성이 .kofi·.steal 의 display:block 에 덮이지 않게 (11/10 Ko-fi 단추 노출 버그) */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 50% -180px, rgba(242, 193, 78, 0.20), transparent 62%),
    var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui,
    "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

a { color: var(--gold-hi); }
a:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 3px; border-radius: 10px; }

.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px 56px; }

button { font: inherit; }
.topbar { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.lang {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.lang:focus-visible, .steal:focus-visible, .amount:focus-visible, .copy:focus-visible, .kofi:focus-visible {
  outline: 3px solid var(--gold-hi);
  outline-offset: 3px;
}

/* 머리 */
.kicker {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 12px;
  border: 1px solid rgba(242, 193, 78, 0.45);
  border-radius: 999px;
  color: var(--gold-hi);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
h1 {
  margin: 0;
  font-size: clamp(26px, 7.2vw, 36px);
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.02em;
}
h1 em {
  font-style: normal;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede { margin: 12px 0 0; color: var(--muted); font-size: 17px; }

/* 왕좌 카드 */
.throne {
  margin-top: 28px;
  padding: 26px 20px 22px;
  text-align: center;
  border: 1px solid rgba(242, 193, 78, 0.45);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(242, 193, 78, 0.12), rgba(242, 193, 78, 0.02) 70%), var(--surface);
  box-shadow: 0 24px 60px -28px rgba(242, 193, 78, 0.45);
}
.throne-label { margin: 0; color: var(--gold-hi); font-size: 14px; font-weight: 700; }
.crown { margin: 6px 0 2px; font-size: 56px; line-height: 1.2; animation: float 3.2s ease-in-out infinite; }
.king-name { margin: 0; font-size: clamp(28px, 8.4vw, 40px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; }
.king-name.empty { font-size: 24px; color: var(--text); }
.king-sub { margin: 6px 0 0; color: var(--muted); }
.king-amount { margin: 6px 0 0; color: var(--gold); font-weight: 700; font-size: 18px; }
.king-message { margin: 10px 0 0; color: var(--text); font-size: 17px; }
.king-date { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.steal {
  display: block;
  width: 100%;
  border: 0;
  cursor: pointer;
  margin: 20px 0 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  color: var(--gold-ink);
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 24px -12px rgba(242, 193, 78, 0.9);
}
.steal:disabled { opacity: 0.45; box-shadow: none; cursor: not-allowed; }
.steal-hint { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

.banner {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px dashed rgba(242, 193, 78, 0.5);
  border-radius: 14px;
  color: var(--gold-hi);
  font-size: 14px;
  text-align: center;
}

/* 공통 구획 */
section { margin-top: 34px; }
h2 { margin: 0 0 14px; font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }

/* 금액 고르기 */
.amounts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.amount {
  width: 100%;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.amount:hover { border-color: rgba(242, 193, 78, 0.7); }
.amount:active { transform: scale(0.98); }
.amount:disabled { opacity: 0.5; cursor: not-allowed; }
.amount:disabled:hover { border-color: var(--line); }
.amount .emoji { font-size: 28px; line-height: 1.3; }
.amount .mood { font-size: 16px; font-weight: 700; }
.amount .price { color: var(--muted); font-size: 14px; }
.free { margin: 12px 0 0; color: var(--muted); font-size: 14px; text-align: center; }

/* 보내는 곳 */
.pay-box {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.pay-title { margin: 0 0 8px; color: var(--gold-hi); font-size: 14px; font-weight: 700; }
.acct { margin: 0; font-size: 17px; }
.acct strong { font-size: 21px; font-weight: 800; letter-spacing: 0.01em; }
.holder { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.copy, .kofi {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.copy { border: 1px solid rgba(242, 193, 78, 0.7); background: transparent; color: var(--gold-hi); }
.kofi { border: 0; background: var(--text); color: var(--bg); }
.soon { margin: 0; color: var(--muted); font-size: 15px; }
.note { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 32px));
  padding: 14px 16px;
  border: 1px solid rgba(242, 193, 78, 0.7);
  border-radius: 14px;
  background: #1f1a12;
  color: var(--gold-hi);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.8);
  z-index: 10;
}

/* 보내는 법 */
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  position: relative;
  margin: 0 0 12px;
  padding: 0 0 0 40px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--gold-ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 26px;
  text-align: center;
}
.eg { color: var(--muted); font-size: 14px; }

/* 모인 돈 */
.sum { margin: 0 0 10px; font-size: 15px; color: var(--muted); }
.sum strong { color: var(--text); font-size: 24px; font-weight: 800; margin-right: 4px; }
.bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-hi)); border-radius: inherit; }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

/* 명예의 전당 */
.hall-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.hall-row { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.hall-row .rank { width: 28px; text-align: center; color: var(--muted); font-weight: 700; }
.hall-row .who { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hall-row .sum { margin: 0; color: var(--gold); font-weight: 700; font-size: 15px; }
.hall-empty { margin: 0; padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; font-size: 15px; }

/* 꼭 읽어 주세요 */
.rules ul { margin: 0; padding: 18px 18px 18px 34px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.rules li { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.rules li:last-child { margin-bottom: 0; }

.foot { margin-top: 40px; text-align: center; color: var(--muted); font-size: 13px; }
.foot a { color: var(--muted); }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  .crown { animation: none; }
  .amount { transition: none; }
}
