:root {
  color-scheme: light;
  --bg: #f6f7f3;
  --panel: #ffffff;
  --text: #18201f;
  --muted: #5f6966;
  --line: #dfe4dd;
  --accent: #c7192e;
  --accent-dark: #9f1223;
  --focus: #0c7c8a;
  --shadow: 0 20px 60px rgba(24, 32, 31, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background:
    linear-gradient(135deg, rgba(199, 25, 46, 0.08), transparent 42%),
    linear-gradient(225deg, rgba(12, 124, 138, 0.1), transparent 48%),
    var(--bg);
  color: var(--text);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.download-panel {
  width: min(760px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 48px);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.top-row .brand-row {
  margin-bottom: 0;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 32px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}

.brand-name {
  font-weight: 800;
  font-size: 18px;
}

h1 {
  margin: 0;
  max-width: 620px;
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.02;
  letter-spacing: 0;
}

.intro {
  max-width: 620px;
  margin: 18px 0 30px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.download-form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}

.stacked-label {
  margin-top: 18px;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 16px;
  color: var(--text);
  font-size: 16px;
  outline: none;
}

input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(12, 124, 138, 0.16);
}

button {
  min-height: 52px;
  border: 0;
  border-radius: 6px;
  padding: 0 22px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.status {
  min-height: 24px;
  margin-top: 18px;
  color: var(--muted);
  font-weight: 700;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.status.error {
  color: var(--accent-dark);
}

.status.success {
  color: #137044;
}

.notice {
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.logout-link,
.notice a {
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.logout-link:hover,
.notice a:hover {
  text-decoration: underline;
}

.auth-panel {
  max-width: 620px;
}

@media (max-width: 680px) {
  .input-row {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }

  .top-row {
    align-items: stretch;
    flex-direction: column;
  }
}
