:root {
  color-scheme: light;
  --surface-1: #fcfcfb;
  --page-plane: #f9f9f7;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --muted: #898781;
  --gridline: #e1e0d9;
  --border: rgba(11, 11, 11, 0.1);
  --critical: #d03b3b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface-1: #1a1a19;
    --page-plane: #0d0d0d;
    --text-primary: #ffffff;
    --text-secondary: #c3c2b7;
    --muted: #898781;
    --gridline: #2c2c2a;
    --border: rgba(255, 255, 255, 0.1);
    --critical: #e66767;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface-1: #1a1a19;
  --page-plane: #0d0d0d;
  --text-primary: #ffffff;
  --text-secondary: #c3c2b7;
  --muted: #898781;
  --gridline: #2c2c2a;
  --border: rgba(255, 255, 255, 0.1);
  --critical: #e66767;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  background: var(--page-plane);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.hidden {
  display: none !important;
}

.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.top-actions {
  display: flex;
  gap: 8px;
  flex: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

h1 {
  font-size: 20px;
  margin: 0 0 4px;
}
.subtitle {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0;
}

label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

input[type="text"],
input[type="password"],
input[type="file"],
input[type="number"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--page-plane);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  margin-bottom: 14px;
  font-family: inherit;
}
textarea {
  resize: vertical;
  line-height: 1.4;
}

.panel {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

/* 작은 pill 버튼 - 내비게이션, 토글, 부가 액션에 사용 */
.btn {
  display: inline-block;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover {
  background: var(--gridline);
}
.icon-btn {
  padding: 6px 9px;
  font-size: 15px;
  line-height: 1;
}

/* 페이지의 주된 액션(폼 제출)에 사용하는 꽉 찬 강조 버튼 */
.btn-primary {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  background: var(--text-primary);
  color: var(--page-plane);
  border-radius: 6px;
  padding: 9px 16px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  text-align: center;
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: default;
}

.error-box {
  font-size: 14px;
  color: var(--critical);
}

.notice {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 16px;
}
.notice.warn {
  color: var(--critical);
}
