:root {
  color-scheme: light dark;
  --bg: #0f1419;
  --surface: #1a222c;
  --border: #2d3a47;
  --text: #e8eef4;
  --muted: #9aa8b5;
  --accent: #5eb8ff;
  --accent-dim: #2a5f8a;
  --danger: #f07178;
  font-family: 'Pretendard', 'Apple SD Gothic Neo', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

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

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

header.page-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 700;
}

header.page-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.stats {
  display: flex;
  gap: 1rem;
  margin: 1.25rem 0;
}

.stats div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  min-width: 7rem;
}

.stats strong {
  display: block;
  font-size: 1.35rem;
}

.stats span {
  color: var(--muted);
  font-size: 0.85rem;
}

.mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.mode-tab {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.mode-tab.is-active {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.panel h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.hint-title {
  margin: 0.5rem 0 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.hint-title.compliance {
  margin-top: 0.85rem;
  color: var(--muted);
}

#mode-hints ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

#mode-hints ul.compliance {
  font-size: 0.82rem;
}

label.stack {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  background: var(--accent);
  color: #051018;
  font-weight: 600;
  cursor: pointer;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn.small {
  padding: 0.35rem 0.6rem;
  font-size: 0.82rem;
  margin-top: 0.5rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.65rem;
  background: var(--bg);
}

.card h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.meta,
.notes {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.job-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-dim);
  white-space: nowrap;
}

.empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
}

.toolbar label {
  font-size: 0.85rem;
  color: var(--muted);
}

footer.page-footer {
  margin-top: 2rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.gate-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
}

.gate-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.gate-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.gate-tab {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  padding: 0.45rem;
  cursor: pointer;
}

.gate-tab.is-active {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.gate-error {
  color: var(--danger);
  font-size: 0.88rem;
  margin: 0 0 0.75rem;
}

.gate-error.ok {
  color: #7dcea0;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.account-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.account-email {
  font-size: 0.88rem;
  color: var(--muted);
}