:root {
  color-scheme: dark light;
  --bg: #0a0a0a;
  --fg: #f5f5f5;
  --muted: #a0a0a0;
  --accent: #4f9eff;
  --surface: #161616;
  --border: #2a2a2a;
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);
  --safe-right: env(safe-area-inset-right);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body {
  min-height: 100dvh;
  padding:
    max(16px, var(--safe-top))
    max(16px, var(--safe-right))
    max(16px, var(--safe-bottom))
    max(16px, var(--safe-left));
}

main {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 24px;
}

header h1 {
  font-size: 28px;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

header p {
  margin: 0;
  color: var(--muted);
}

.status {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status .phase {
  margin: 0;
  font-weight: 600;
  color: var(--accent);
}

.status .hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.lang-switcher {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

button {
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 18px;
  min-height: 44px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease;
}

button:hover,
button:active,
button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --fg: #0a0a0a;
    --muted: #555;
    --surface: #f5f5f5;
    --border: #e0e0e0;
  }
}
