/* 색: 새하 프로필의 하늘색(메인), 분홍(구독 표시) */
:root {
  --bg: #ffffff;
  --soft: #f4f6f9;
  --text: #191f28;
  --sub: #6b7684;
  --line: #e3e7ec;
  --blue: #3f78c9;
  --blue-weak: #e8f0fb;
  --on-blue: #ffffff;
  --pink: #d9547f;
  --red: #d93f45;
  --green: #17895a;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16171b;
    --soft: #1f2126;
    --text: #eceef1;
    --sub: #9ba2ad;
    --line: #2f323a;
    --blue: #7eaaea;
    --blue-weak: #1f2b3d;
    --on-blue: #0f1d33;
    --pink: #f08aab;
    --red: #ff6d70;
    --green: #4fc58f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #16171b;
  --soft: #1f2126;
  --text: #eceef1;
  --sub: #9ba2ad;
  --line: #2f323a;
  --blue: #7eaaea;
  --blue-weak: #1f2b3d;
  --on-blue: #0f1d33;
  --pink: #f08aab;
  --red: #ff6d70;
  --green: #4fc58f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
[hidden] { display: none !important; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.35; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.container {
  width: 100%;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* 입력 */
.label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.label small { font-weight: 400; color: var(--sub); margin-left: 4px; }
.input, .select {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
textarea.input { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus { outline: none; border-color: var(--blue); }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--red); }
.err { margin: 6px 0 0; font-size: 13px; color: var(--red); }
.err:empty { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--soft); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-main { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.btn-main:hover { background: var(--blue); filter: brightness(1.06); }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-red:hover { background: var(--red); filter: brightness(1.06); }
.btn-small { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 6px; }
.btn-full { width: 100%; }

.text-btn {
  border: 0;
  background: none;
  padding: 4px 0;
  color: var(--sub);
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-btn:hover { color: var(--text); }
.text-btn.red { color: var(--red); }

.sub-somi, .sub-bbosong { color: var(--pink); font-weight: 600; }
.muted { color: var(--sub); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 50;
}
.toast.show { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
