/* 툼카드 v2 · 바탕 규칙 (DESIGN_PLAN.md). 색 · 글꼴 · 모양은 여기서만 정한다. */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');
:root {
  --bg: #F5F5F2; --surface: #FFFFFF; --line: #E6E6E1; --line-strong: #D6D6D0; --text: #111216; --sub: #5E616A; --faint: #8C8F96; --accent: #5B2DB8; --accent-ink: #FFFFFF; --accent-soft: #EEE7FB; --warn: #C2410C; color-scheme: light;
  --r-ui: 12px; --r-card: 20px;
  --font: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', system-ui, sans-serif;
}
/* 다크 모드: 폰 설정을 따르고, 화면의 버튼(data-theme)으로도 바꾼다 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #111214; --surface: #1A1B1F; --line: #2A2B30; --line-strong: #3A3B41; --text: #F2F2F3; --sub: #A2A4AB; --faint: #73767D; --accent: #B79CFF; --accent-ink: #1B0F3A; --accent-soft: #2A2142; --warn: #F59E6B; color-scheme: dark; }
}
:root[data-theme="dark"] { --bg: #111214; --surface: #1A1B1F; --line: #2A2B30; --line-strong: #3A3B41; --text: #F2F2F3; --sub: #A2A4AB; --faint: #73767D; --accent: #B79CFF; --accent-ink: #1B0F3A; --accent-soft: #2A2142; --warn: #F59E6B; color-scheme: dark; }
:root[data-theme="light"] { --bg: #F5F5F2; --surface: #FFFFFF; --line: #E6E6E1; --line-strong: #D6D6D0; --text: #111216; --sub: #5E616A; --faint: #8C8F96; --accent: #5B2DB8; --accent-ink: #FFFFFF; --accent-soft: #EEE7FB; --warn: #C2410C; color-scheme: light; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* hidden 속성은 늘 이긴다 — .btn · .kakao 같은 display 지정이 hidden 을 덮어 모두에게 보이던 문제 (11-06) */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.3; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
input, select, textarea { color: var(--text); color-scheme: light dark; }
input::placeholder, textarea::placeholder { color: var(--faint); opacity: 1; }
select option { color: var(--text); background: var(--surface); }
.btn { display: flex; align-items: center; justify-content: center; height: 48px; padding: 0 18px; border-radius: 24px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; transition: transform .12s ease; }
.btn:active { transform: scale(.98); }
.btn.main { height: 52px; border-color: var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field textarea { height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-ui); background: var(--surface); outline: none; }
.field textarea { height: 96px; padding: 12px 14px; resize: none; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.field select { height: 48px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-ui); background: var(--surface); outline: none; }
.err { min-height: 20px; font-size: 13px; color: var(--warn); }
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 30; }
.sheet-bg.on { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: var(--r-card) var(--r-card) 0 0; background: var(--bg); transform: translateY(100%); transition: transform .25s ease; z-index: 31; max-height: 92dvh; overflow: auto; }
.sheet.on { transform: none; }
/* 아래서 올라오는 창이 화면과 구분되게 (11-06 대표님 «색이 같아서 구분이 안 돼»): 한 단계 밝은 바탕 · 위 테두리 · 그림자 · 손잡이 */
.sheet { background: var(--surface); border-top: 1px solid var(--line-strong); box-shadow: 0 -16px 48px rgba(0,0,0,.45); padding-top: 26px; }
.sheet::before { content: ''; position: absolute; top: 9px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line-strong); }
.skel { background: linear-gradient(90deg, var(--line) 25%, var(--surface) 50%, var(--line) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r-ui); }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .btn, .sheet, .sheet-bg { transition: none; } .skel { animation: none; } }

/* 첫 화면과 같은 말투: 굵고 큰 제목 */
h1 { letter-spacing: -0.035em; }

/* 밝게 · 어둡게 버튼 (어느 화면이든 class="themebtn") */
.themebtn { width: 36px; height: 36px; border-radius: 18px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
