/* ── RAI 테마 시스템 ──────────────────────────────────────
   data-theme 속성으로 전환. 기본(dark)은 style.css :root에 정의.
   ────────────────────────────────────────────────────────── */

/* ===== 라이트 테마 ===== */
[data-theme="light"] {
  --bg-base:    #f6f8fa;
  --bg-surface: #ffffff;
  --bg-card:    #ffffff;
  --bg-overlay: #f0f2f5;
  --bg-hover:   #e8eaed;
  --border:     #d0d7de;
  --border-muted: #e1e4e8;
  --text:       #1f2328;
  --text-muted: #656d76;
  --text-dim:   #8b949e;
  --accent:     #0969da;
  --accent-hover:#0550ae;
  --color-green: #1a7f37;
  --color-orange:#bf5700;
  --color-error: #cf222e;
  --color-purple:#8250df;
}
[data-theme="light"] ::-webkit-scrollbar-track { background: #f0f2f5; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: #c1c7cd; }
[data-theme="light"] * { scrollbar-color: #c1c7cd #f0f2f5; }

/* ===== 어린이 테마 ===== */
[data-theme="kids"] {
  --bg-base:    #fff8f0;
  --bg-surface: #ffffff;
  --bg-card:    #fffaf5;
  --bg-overlay: #fff3e6;
  --bg-hover:   #ffe8cc;
  --border:     #ffd6a5;
  --border-muted: #ffe8cc;
  --text:       #3d2c1e;
  --text-muted: #7a6352;
  --text-dim:   #a08b78;
  --accent:     #ff6b35;
  --accent-hover:#e85d2c;
  --color-green: #2ec866;
  --color-orange:#ff9f43;
  --color-error: #ee5253;
  --color-purple:#a55eea;
  --radius:     12px;
  --radius-lg:  18px;
}
[data-theme="kids"] ::-webkit-scrollbar-track { background: #fff3e6; }
[data-theme="kids"] ::-webkit-scrollbar-thumb { background: #ffd6a5; border-radius: 6px; }
[data-theme="kids"] * { scrollbar-color: #ffd6a5 #fff3e6; }

/* 어린이: 더 큰 글꼴, 둥근 요소 */
[data-theme="kids"] html, [data-theme="kids"] body { font-size: 17px; }
[data-theme="kids"] .btn { border-radius: 12px; font-weight: 700; }
[data-theme="kids"] .prompt-card { border-radius: 18px; border-width: 2px; }
[data-theme="kids"] .cat-chip { border-radius: 24px; font-size: .85rem; padding: .4rem 1rem; }
[data-theme="kids"] .badge { border-radius: 24px; font-size: .78rem; }
[data-theme="kids"] .nav-item { border-radius: 12px; font-size: .95rem; }
[data-theme="kids"] .card-title { font-size: 1.05rem; }

/* ===== 여성친화 테마 ===== */
[data-theme="feminine"] {
  --bg-base:    #fdf2f8;
  --bg-surface: #ffffff;
  --bg-card:    #fefafe;
  --bg-overlay: #fce7f3;
  --bg-hover:   #fbcfe8;
  --border:     #f9a8d4;
  --border-muted: #fce7f3;
  --text:       #4a1942;
  --text-muted: #86507a;
  --text-dim:   #b07aaa;
  --accent:     #db2777;
  --accent-hover:#be185d;
  --color-green: #059669;
  --color-orange:#d97706;
  --color-error: #e11d48;
  --color-purple:#9333ea;
  --radius:     8px;
  --radius-lg:  14px;
}
[data-theme="feminine"] ::-webkit-scrollbar-track { background: #fce7f3; }
[data-theme="feminine"] ::-webkit-scrollbar-thumb { background: #f9a8d4; border-radius: 4px; }
[data-theme="feminine"] * { scrollbar-color: #f9a8d4 #fce7f3; }

[data-theme="feminine"] .prompt-card { border-radius: 14px; }
[data-theme="feminine"] .cat-chip { border-radius: 22px; }
[data-theme="feminine"] .btn-primary { background: linear-gradient(135deg, #db2777, #9333ea); border-color: transparent; color: #fff; }
[data-theme="feminine"] .btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #be185d, #7e22ce); }
[data-theme="feminine"] .badge-featured { background: rgba(147,51,234,.12); color: #9333ea; border-color: rgba(147,51,234,.3); }

/* ===== 남성친화 테마 ===== */
[data-theme="masculine"] {
  --bg-base:    #0c1220;
  --bg-surface: #131c2e;
  --bg-card:    #182438;
  --bg-overlay: #1e2d44;
  --bg-hover:   #263650;
  --border:     #2a3f5f;
  --border-muted: #1e2d44;
  --text:       #c8d6e5;
  --text-muted: #7f8fa6;
  --text-dim:   #576574;
  --accent:     #00b4d8;
  --accent-hover:#0096c7;
  --color-green: #00b894;
  --color-orange:#e17055;
  --color-error: #d63031;
  --color-purple:#6c5ce7;
}
[data-theme="masculine"] ::-webkit-scrollbar-track { background: #0c1220; }
[data-theme="masculine"] ::-webkit-scrollbar-thumb { background: #2a3f5f; }
[data-theme="masculine"] * { scrollbar-color: #2a3f5f #0c1220; }

[data-theme="masculine"] .btn-primary { background: #00b4d8; color: #0c1220; font-weight: 700; }
[data-theme="masculine"] .btn-primary:hover:not(:disabled) { background: #0096c7; }
[data-theme="masculine"] .prompt-card { border-color: #2a3f5f; }
[data-theme="masculine"] .prompt-card:hover { border-color: #00b4d8; box-shadow: 0 0 0 1px #00b4d8; }

/* ===== 시니어 테마 ===== */
[data-theme="senior"] {
  --bg-base:    #fafaf9;
  --bg-surface: #ffffff;
  --bg-card:    #ffffff;
  --bg-overlay: #f5f5f4;
  --bg-hover:   #e7e5e4;
  --border:     #a8a29e;
  --border-muted: #d6d3d1;
  --text:       #1c1917;
  --text-muted: #44403c;
  --text-dim:   #78716c;
  --accent:     #0066cc;
  --accent-hover:#004fa3;
  --color-green: #15803d;
  --color-orange:#b45309;
  --color-error: #b91c1c;
  --color-purple:#7c3aed;
}
[data-theme="senior"] ::-webkit-scrollbar { width: 10px; height: 10px; }
[data-theme="senior"] ::-webkit-scrollbar-track { background: #f5f5f4; }
[data-theme="senior"] ::-webkit-scrollbar-thumb { background: #a8a29e; border-radius: 5px; }
[data-theme="senior"] * { scrollbar-color: #a8a29e #f5f5f4; scrollbar-width: auto; }

/* 시니어: 큰 글꼴, 높은 대비, 넓은 간격 */
[data-theme="senior"] html, [data-theme="senior"] body { font-size: 18px; line-height: 1.8; }
[data-theme="senior"] .btn { min-height: 52px; font-size: 1.05rem; padding: .6rem 1.2rem; font-weight: 600; }
[data-theme="senior"] .btn-sm { min-height: 44px; font-size: .95rem; }
[data-theme="senior"] .nav-item { font-size: 1rem; padding: .6rem .85rem; min-height: 48px; }
[data-theme="senior"] .form-control { font-size: 1.1rem; min-height: 52px; }
[data-theme="senior"] .form-label { font-size: 1rem; font-weight: 600; }
[data-theme="senior"] .card-title { font-size: 1.1rem; }
[data-theme="senior"] .card-desc { font-size: .92rem; }
[data-theme="senior"] .cat-chip { font-size: .9rem; padding: .4rem 1rem; min-height: 42px; }
[data-theme="senior"] .prompt-card { border-width: 2px; }
[data-theme="senior"] .badge { font-size: .82rem; padding: .2rem .6rem; }
[data-theme="senior"] .data-table { font-size: 1rem; }
[data-theme="senior"] .data-table th, [data-theme="senior"] .data-table td { padding: .75rem 1rem; }
[data-theme="senior"] .credit-badge { font-size: .85rem; padding: .2rem .6rem; }
