/* Kanji Wars — homepage. Arena, not a study sheet. Phone first. */

:root {
  --bg: #12100e;
  --fg: #f3eee4;
  --muted: #c4bdb0;
  --accent: #e8c36a;
  --accent-ink: #1a160e;
  --focus: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--fg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 20px;
  line-height: 1.45;
  background: var(--bg);
  color: var(--fg);
  padding:
    max(24px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));
}

.home {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 28rem;
  margin: 0 auto;
  width: 100%;
}

.mark {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 0 28px;
  object-fit: contain;
}

h1 {
  margin: 0 0 12px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.lead {
  margin: 0 0 20px;
  font-size: 24px;
  font-weight: 600;
  color: var(--accent);
}

.status {
  margin: 0 0 32px;
  color: var(--muted);
  max-width: 22rem;
}

#enter {
  appearance: none;
  display: block;
  width: 100%;
  max-width: 22rem;
  margin: 0;
  padding: 18px 24px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  cursor: pointer;
}

#enter:hover {
  filter: brightness(1.06);
}

#enter:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.next {
  margin: 24px 0 0;
  color: var(--fg);
  max-width: 22rem;
}

.next:focus {
  outline: none;
}

footer {
  max-width: 28rem;
  margin: 40px auto 0;
  width: 100%;
  font-size: 16px;
  line-height: 1.4;
  color: var(--muted);
}

footer p {
  margin: 0 0 6px;
}

footer a {
  color: var(--fg);
  text-underline-offset: 3px;
}

footer a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.copy {
  margin: 0;
}

@media screen and (min-width: 769px) {
  body {
    font-size: 22px;
    padding: 40px 32px;
  }

  h1 {
    font-size: 56px;
  }

  .lead {
    font-size: 28px;
  }

  .mark {
    width: 88px;
    height: 88px;
  }

  #enter {
    width: auto;
    min-width: 12rem;
    padding: 18px 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #enter:hover {
    filter: none;
  }
}
