
:root {
  color-scheme: light dark;
  --bg: #eff2f5;
  --card: #ffffff;
  --text: #1c1f24;
  --muted: #5f6674;
  --line: #d8dde5;
  --primary: #25d366;
  --primary-hover: #1ebe5a;
  --link: #128c7e;
  --danger-bg: #ffe9e9;
  --danger-text: #8c3030;
  --notice-bg: #e6f8ec;
  --notice-text: #1d6a34;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1418;
    --card: #182028;
    --text: #ebf0f6;
    --muted: #9ca8b8;
    --line: #2f3a47;
    --primary: #2ed873;
    --primary-hover: #25c665;
    --link: #62d6c7;
    --danger-bg: #3e1f22;
    --danger-text: #ffb9b9;
    --notice-bg: #1b3f2a;
    --notice-text: #aef5c5;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #ffffff 0%, var(--bg) 58%);
  color: var(--text);
  min-height: 100vh;
}

@media (prefers-color-scheme: dark) {
  body {
    background: radial-gradient(circle at top, #24313f 0%, var(--bg) 52%);
  }
}

a {
  color: var(--link);
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  padding: 1rem;
}

.screen-wrap {
  min-height: calc(100vh - 2rem);
  display: grid;
  align-items: center;
}

.app-card {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
}

.hero-icon {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.headline {
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 0 0 0.45rem;
}

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

.button-stack {
  display: grid;
  gap: 0.6rem;
}

.btn-primary,
.btn-secondary {
  appearance: none;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #0b2a16;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.04);
}

@media (prefers-color-scheme: dark) {
  .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
  }
}

form {
  display: grid;
  gap: 0.7rem;
}

.form-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.form-input {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--card);
  color: var(--text);
  padding: 0.65rem 0.7rem;
  font-size: 1rem;
}

.form-input:focus {
  outline: 2px solid color-mix(in srgb, var(--primary) 35%, transparent);
  border-color: var(--primary);
}

.form-error {
  margin: 0.35rem 0 0;
  color: #d93025;
  font-size: 0.85rem;
}

.link-row {
  margin-top: 0.75rem;
  text-align: center;
}

.text-link:hover {
  text-decoration: underline;
}

.flash {
  max-width: 28rem;
  margin: 0 auto 0.8rem;
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
}

.flash-alert {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.flash-notice {
  background: var(--notice-bg);
  color: var(--notice-text);
}

@media (min-width: 768px) {
  .app-shell {
    padding: 2rem;
  }

  .screen-wrap {
    min-height: calc(100vh - 4rem);
  }

  .app-card {
    padding: 1.5rem;
  }
}
