:root {
  --ink: #15202b;
  --ink-soft: #3d4f5f;
  --stone: #f0f0f0;
  --stone-deep: #d6d6d6;
  --panel: #f7f7f7;
  --card: #ffffff;
  --teal: #b71c1c;
  --teal-deep: #7f0000;
  --teal-mid: #c62828;
  --teal-soft: #ffebee;
  --amber: #ef6c00;
  --amber-soft: #fff3e0;
  --crimson: #b71c1c;
  --ok: #2e7d32;
  --ok-soft: #e8f5e9;
  --border: #e0e0e0;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.08);
  --radius: 6px;
  --font: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --brand-red: #b71c1c;
  --brand-red-dark: #7f0000;
  --primary: var(--brand-red);
  --bg: var(--stone);
  --text: var(--ink);
  --muted: var(--ink-soft);
  --success: var(--ok);
}

* {
  box-sizing: border-box;
}

::selection {
  background: var(--teal-soft);
  color: var(--ink);
}

body {
  margin: 0;
  font-family: var(--font);
  background: linear-gradient(160deg, #ffebee 0%, #f5f5f5 40%, var(--panel) 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: linear-gradient(90deg, var(--brand-red-dark), var(--brand-red));
  color: #ffffff;
  box-shadow: var(--shadow);
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 4px;
  background: #ffffff;
  color: var(--brand-red);
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-header h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-header p {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.88);
}

.header-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.header-link:hover {
  background: rgba(255, 255, 255, 0.16);
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

.intro {
  margin-bottom: 24px;
}

.intro h2 {
  margin: 0 0 8px;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand-red);
}

.intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 62ch;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0;
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: inset 0 3px 0 var(--teal), var(--shadow);
  animation: route-arrive 0.5s var(--ease-out) both;
}

.card:nth-child(2) {
  animation-delay: 0.08s;
  box-shadow: inset 0 3px 0 var(--ink), var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.platform-icon {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0;
  position: relative;
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.platform-icon::before {
  content: "";
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.platform-icon.android {
  background: var(--ok-soft);
  color: var(--ok);
}

.platform-icon.ios {
  background: #eceff1;
  color: var(--ink);
}

.platform-icon.ios::before {
  border-radius: 6px 6px 4px 4px;
}

.card h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 750;
}

.card .version {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.meta {
  display: grid;
  gap: 8px;
  font-size: 0.875rem;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}

.meta-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.meta-label {
  color: var(--muted);
  font-weight: 600;
}

.release-notes {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 12px;
  border: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: background 0.15s var(--ease-out), transform 0.1s;
}

.btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--teal);
  color: #ffffff;
}

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

.btn-android {
  background: var(--ok);
  color: #fff;
}

.btn-android:hover {
  background: #155a30;
}

.btn-ios {
  background: var(--ink);
  color: #ffffff;
}

.btn-ios:hover {
  background: #243447;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.hint {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.45;
}

.hint strong {
  color: var(--text);
}

.steps {
  margin: 8px 0 0;
  padding-left: 18px;
}

.steps li {
  margin-bottom: 4px;
}

.status-banner {
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
}

.status-banner.error {
  background: #f8e4e4;
  color: var(--crimson);
  border: 1px solid #e8b4b4;
}

.status-banner.info {
  background: var(--teal-soft);
  color: var(--teal-deep);
  border: 1px solid #a8d4d4;
}

.deploy-box {
  margin-top: 32px;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.deploy-box h4 {
  margin: 0 0 12px;
  color: var(--brand-red-dark);
}

.deploy-box code {
  background: var(--panel);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8125rem;
}

.deploy-box pre {
  margin: 8px 0 0;
  padding: 12px;
  background: var(--ink);
  color: #eceff1;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 0.75rem;
  line-height: 1.5;
}

.footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

@keyframes route-arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    animation: none;
  }
}

@media (max-width: 600px) {
  .brand-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
