*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --border: #334155;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --danger: #dc2626;
  --success: #16a34a;
  --warn: #f59e0b;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

html {
  font-size: 17px;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.wrap {
  max-width: 28rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
}

header h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-top: 1rem;
}

.card h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.status-pill {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: #334155;
}

.status-pill.ok {
  background: rgba(22, 163, 74, 0.25);
  color: #86efac;
}

.status-pill.bad {
  background: rgba(220, 38, 38, 0.25);
  color: #fca5a5;
}

.status-pill.warn {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--muted);
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  margin-bottom: 0.75rem;
}

button {
  width: 100%;
  padding: 0.9rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  margin-top: 0.35rem;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

button.danger {
  background: var(--danger);
}

.message {
  font-size: 0.9rem;
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: #0f172a;
  border: 1px solid var(--border);
}

.message.error {
  border-color: var(--danger);
  color: #fecaca;
}

.message.success {
  border-color: var(--success);
  color: #bbf7d0;
}

.ios-guide {
  border-left: 4px solid var(--warn);
  padding-left: 0.85rem;
}

.ios-guide ol {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.admin {
  margin-top: 1.5rem;
}

.admin summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.5rem 0;
  color: var(--muted);
}

.admin-inner {
  margin-top: 0.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

th,
td {
  text-align: left;
  padding: 0.5rem 0.35rem;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-weight: 600;
}

.results li {
  margin: 0.35rem 0;
  font-size: 0.85rem;
}