:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1c1f24;
  --muted: #5f6672;
  --line: #e3e6eb;
  --primary: #1f6feb;
  --primary-text: #ffffff;
  --danger: #c62828;
  --radius: 12px;
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.brand { font-weight: 700; font-size: 1.1rem; }

.account { display: flex; align-items: center; gap: 8px; min-width: 0; }
.account-email {
  color: var(--muted);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  display: grid;
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

h1, h2 { margin: 0 0 8px; font-size: 1.2rem; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.status { margin: 0 0 12px; color: var(--muted); min-height: 1.5em; }
.status.error { color: var(--danger); }
.status:empty { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn.link { border: 0; min-height: auto; padding: 4px; color: var(--primary); background: none; }
.btn:disabled { opacity: 0.6; cursor: wait; }

.list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.list .name { font-weight: 600; }
.list .sub { color: var(--muted); font-size: 0.85rem; }

.row { display: flex; gap: 8px; }

input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.add-site summary { cursor: pointer; color: var(--primary); padding: 8px 0; }
.add-site[open] summary { margin-bottom: 8px; }
.verify { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.verify label { display: block; margin-bottom: 6px; font-weight: 600; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

[hidden] { display: none !important; }

/* 관리 페이지 */
.page.wide { max-width: 960px; }
.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fff3cd;
  color: #7a5b00;
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
}
h3 { margin: 16px 0 8px; font-size: 1rem; }
code, .code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.code { font-weight: 600; letter-spacing: 0.04em; }
.fields { display: grid; gap: 10px; }
.fields label { display: grid; gap: 4px; font-size: 0.9rem; font-weight: 600; }
.fields label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.fields label.check input { flex: none; min-height: auto; }
.source { margin-top: -6px; color: var(--muted); font-size: 0.8rem; }
select, textarea {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: var(--card);
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
