/* 토큰·리셋·타이포그래피·버튼·입력 — 다른 시트보다 먼저 온다. */
/* ═══════════════════════════════════════════════════════════
   월간남친(MonthlyBF) — 조선 다크 테마 (짙은 남색 · 금색)
   ═══════════════════════════════════════════════════════════ */

:root {
  --ink: #0a0d18;          /* 최심부 배경 */
  --ink-2: #10152a;        /* 패널 배경 */
  --panel: #141a30;
  --line: #2a3352;
  --line-soft: #1f2740;
  --gold: #d8b45a;
  --gold-bright: #f0d488;
  --gold-dim: #8f7638;
  --text: #e9e5d9;
  --muted: #99a0b8;
  --danger: #e07a7a;
  --gain: #9fd6a8;
  --navy-accent: #7b86d9;
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(1100px 500px at 50% -10%, #1b2145 0%, transparent 60%),
    radial-gradient(800px 400px at 90% 110%, #171034 0%, transparent 55%),
    var(--ink);
  color: var(--text);
  font-family: 'Noto Serif KR', system-ui, serif;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
[hidden] { display: none !important; }

/* 화면 전체 배경 이미지 (Gemini 실사 등 — 파일 없으면 숨김, 그라디언트 유지) */
.screen-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.screen-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(8, 8, 16, 0.30), rgba(8, 8, 16, 0.74));
  pointer-events: none;
}
#screen-login > *:not(.screen-bg):not(.screen-scrim),
#screen-main > *:not(.screen-bg):not(.screen-scrim) {
  position: relative;
  z-index: 2;
}

.mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small-text { font-size: 0.82rem; }
.row-between {
  display: flex; justify-content: space-between;
  align-items: center; gap: 8px;
}

/* ── 버튼 ─────────────────────────────────────────────── */

.btn {
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 18px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.2s ease,
              background 0.2s ease, border-color 0.2s ease;
}
.btn:hover:not(:disabled) { border-color: var(--gold-dim); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-gold {
  background: linear-gradient(180deg, #3d3213 0%, #2a2110 100%);
  border-color: var(--gold-dim);
  color: var(--gold-bright);
}
.btn-gold:hover:not(:disabled) {
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(216, 180, 90, 0.25);
}

.btn-ghost {
  background: rgba(20, 26, 48, 0.72);
  backdrop-filter: blur(4px);
}
.btn-block { width: 100%; }
.btn-big { width: 100%; font-size: 1.05rem; padding: 13px; margin-top: 14px; }
.btn-small { font-size: 0.8rem; padding: 5px 12px; border-radius: 8px; }

/* ── 입력창 ───────────────────────────────────────────── */

input[type="text"] {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 14px;
}
input[type="text"]:focus-visible {
  outline: none;
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 2px rgba(216, 180, 90, 0.15);
}

/* ── 전역 토스트 ──────────────────────────────────────── */

.toasts {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  max-width: min(480px, calc(100vw - 32px));
  font-size: 0.9rem;
  background: rgba(13, 17, 34, 0.95);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 20px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.3s ease both;
  transition: opacity 0.3s, transform 0.3s;
}
.toast.out { opacity: 0; transform: translateY(8px); }
.toast-error { border-color: rgba(224, 122, 122, 0.6); color: var(--danger); }
.toast-gain { border-color: rgba(216, 180, 90, 0.55); color: var(--gold-bright); }
