:root {
  --bg: #3d312e;
  --surface: #544a46;
  --surface-hover: #65524d;
  --border: #65524d;
  --text: #fafafa;
  --text-muted: #b5b0ad;
  --accent: #7fc29b;
  --accent-hover: #5daa7f;
  --accent-soft: #2d5a42;
  --danger: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 720px;
}

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

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.card h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.card p, .card li {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.05s ease;
}

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

.btn-primary {
  background: var(--accent);
  color: #fff;
}

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

.btn-secondary {
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border);
}

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

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.link-list li {
  margin-bottom: 0.5rem;
}

.link-list a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9375rem;
}

.step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.step-number {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 9999px;
}

.step-content {
  flex: 1;
}

.step-title {
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--text);
}

.step-desc {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0;
}

.step-image {
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-width: 100%;
}

.step-image img {
  display: block;
  width: 100%;
  height: auto;
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

footer p {
  margin: 0;
}

footer a {
  color: var(--text-muted);
  text-decoration: underline;
}

footer a:hover {
  color: var(--text);
}

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

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
}

.version-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.version-chip {
  padding: 0.375rem 0.75rem;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  cursor: pointer;
}

.version-chip.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

.release-notes ul {
  margin: 0;
  padding-left: 1.25rem;
}

.release-notes li {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.banner {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.banner.success {
  background: var(--accent-soft);
  color: var(--accent);
}

.banner.info {
  background: #2d5a42;
  color: #7fc29b;
}

.iframe-container {
  position: relative;
  width: 100%;
  height: 600px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}

.iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.policy-section {
  margin-bottom: 2rem;
}

.policy-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.policy-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem;
  color: var(--text);
}

.policy-section p,
.policy-section li {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.policy-section ul {
  padding-left: 1.25rem;
}

.policy-section li {
  margin-bottom: 0.375rem;
}

.meta {
  color: var(--text-muted);
  font-size: 0.875rem;
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .step {
    flex-direction: column;
    gap: 0.75rem;
  }
}
