@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@500;700&family=Space+Grotesk:wght@700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  color-scheme: light dark;
  --paper: #F8F5F2;
  --ink: #0A0A0B;
  --surface: #FFFFFF;
  --surface-2: #F2EEE9;
  --muted: #7B746D;
  --border: rgba(40, 24, 10, .10);
  --border-strong: rgba(40, 24, 10, .18);
  --accent: #FF6A1F;
  --accent-a: #FF9A55;
  --accent-c: #E85A0F;
  --accent-soft: rgba(255, 106, 31, .12);
  --accent-line: rgba(255, 106, 31, .38);
  --accent-text: #C2410C;
  --accent-ink: #0A0A0B;
  --radius: 14px;
  --font-display: 'Zen Kaku Gothic New', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0C0A09;
    --ink: #F8F5F2;
    --surface: #1B1816;
    --surface-2: #141110;
    --muted: #918A83;
    --border: rgba(255, 235, 220, .09);
    --border-strong: rgba(255, 235, 220, .17);
    --accent: #FF7A33;
    --accent-a: #FFA066;
    --accent-c: #F06A1A;
    --accent-soft: rgba(255, 122, 51, .16);
    --accent-line: rgba(255, 122, 51, .42);
    --accent-text: #FF9A5C;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background: var(--paper);
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: clip;
  padding-top: 64px;
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.navbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--paper);
  z-index: 50;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -.01em;
  background: linear-gradient(135deg, var(--ink) 0%, var(--accent) 40%, var(--ink) 50%, var(--accent) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: brandShine 5s linear infinite;
  text-decoration: none;
  white-space: nowrap;
}

.brand-logo {
  width: 51px;
  height: 24px;
  flex-shrink: 0;
}

.brand-logo-fill {
  fill: var(--accent);
}

@keyframes brandShine {
  to { background-position: 200% center; }
}

.signup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-a), var(--accent) 50%, var(--accent-c));
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent-ink);
  text-decoration: none;
  white-space: nowrap;
  transition: filter .15s ease, transform .12s ease;
}

.signup-btn:hover {
  filter: brightness(1.05);
}

.signup-btn:active {
  transform: scale(.97);
}

.content {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px 56px;
}

.download-card {
  max-width: 460px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.download-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-a), var(--accent) 50%, var(--accent-c));
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 15px 22px;
  border-bottom: 1px solid var(--border);
}

.summary-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  flex-shrink: 0;
}

.summary-value {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  text-align: right;
  min-width: 0;
  overflow-wrap: anywhere;
}

.name-cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.name-text {
  text-align: left;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.name-text.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}

.name-toggle {
  padding: 0;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color .15s ease;
}

.name-toggle:hover {
  color: var(--accent-text);
}

.name-toggle[hidden] {
  display: none;
}

.action-area {
  padding: 22px;
}

.captcha-box {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.captcha-box:hover {
  border-color: var(--accent);
}

.captcha-box[aria-disabled="true"] {
  cursor: default;
}

.captcha-box[aria-disabled="true"]:hover {
  border-color: var(--border-strong);
}

.captcha-box.is-verified {
  border-color: var(--accent);
}

.captcha-check {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background .15s ease, border-color .15s ease;
}

.captcha-box.is-verified .captcha-check {
  background: var(--accent);
  border-color: var(--accent);
}

.captcha-tick {
  width: 15px;
  height: 15px;
  color: var(--accent-ink);
  display: none;
}

.captcha-box.is-verified .captcha-tick {
  display: block;
}

.captcha-spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  display: none;
  animation: spin .7s linear infinite;
}

.captcha-box.is-checking .captcha-spinner {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.captcha-label {
  flex: 1;
  min-width: 0;
}

.captcha-note {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 400;
  color: var(--muted);
  text-align: right;
  line-height: 1.35;
  flex-shrink: 0;
}

.status-line {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#captchaSlot {
  margin-bottom: 16px;
}

.download-btn {
  position: relative;
  width: 100%;
  height: 46px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--accent-a), var(--accent) 50%, var(--accent-c));
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--accent-ink);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: filter .15s ease, transform .12s ease, opacity .2s ease;
}

.download-btn:hover:not(:disabled) {
  filter: brightness(1.04);
}

.download-btn:active:not(:disabled) {
  transform: scale(.98);
}

.download-btn:disabled {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--muted);
  cursor: not-allowed;
}

.progress-track {
  height: 3px;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  overflow: hidden;
  opacity: 0;
  transition: opacity .2s ease;
}

.progress-track.is-active {
  opacity: 1;
}

.progress-bar {
  height: 100%;
  width: 100%;
  background: var(--accent);
  border-radius: 999px;
  transform-origin: left center;
  transform: scaleX(0);
}

.card-foot {
  display: flex;
  justify-content: center;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.report-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.report-btn:hover {
  color: var(--accent-text);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.report-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.slot-wrap {
  max-width: 460px;
  margin: 16px auto 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.slot-label {
  align-self: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.slot-frame {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.slot-frame img,
.slot-frame iframe,
.slot-frame ins {
  display: block;
  max-width: 100%;
}

.slot-placeholder {
  width: 300px;
  height: 250px;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 8px;
}

.cta-panel {
  max-width: 460px;
  margin: 16px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.cta-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  color: var(--ink);
}

.cta-text {
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-a), var(--accent) 50%, var(--accent-c));
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent-ink);
  text-decoration: none;
  white-space: nowrap;
  transition: filter .15s ease, transform .12s ease;
}

.cta-btn:hover {
  filter: brightness(1.05);
}

.cta-btn:active {
  transform: scale(.98);
}

.site-footer {
  max-width: 460px;
  margin: 32px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
  list-style: none;
}

.footer-links a {
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease;
}

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

.footer-partner {
  font-size: 12.5px;
  color: var(--muted);
}

.footer-partner a {
  color: var(--accent-text);
  text-decoration: none;
}

.footer-partner a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-copy {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 12px);
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 80;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 480px) {
  .content { padding: 20px 10px 40px; }
    .summary-row { padding: 13px 16px; }
  .action-area { padding: 16px; }
  .card-foot { padding: 12px 16px; }
  .captcha-box { padding: 0 12px; gap: 11px; }
  .captcha-note { font-size: 10px; }
  .navbar { padding: 0 12px; }
  .cta-panel { flex-direction: column; align-items: stretch; padding: 18px 16px; }
  .cta-btn { width: 100%; }
}

@media (max-width: 360px) {
  .captcha-note { display: none; }
}

@media (min-width: 960px) {
  .navbar {
    padding: 0 max(16px, calc((100% - 960px) / 2 + 24px));
  }

  .content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-rows: auto 1fr;
    gap: 20px 24px;
    align-items: start;
    padding-top: 48px;
  }

  .download-card {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: stretch;
    max-width: none;
    margin: 0;
    display: flex;
    flex-direction: column;
  }

  .action-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

    .summary-row {
    padding: 17px 28px;
  }

  .action-area {
    padding: 28px;
  }

  .card-foot {
    padding: 16px 28px;
  }

  .slot-wrap {
    grid-column: 2;
    grid-row: 1;
    max-width: none;
    margin: 0;
  }

  .cta-panel {
    grid-column: 2;
    grid-row: 2;
    align-self: stretch;
    justify-content: center;
    max-width: none;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 22px;
  }

  .cta-btn {
    width: 100%;
  }

  .site-footer {
    grid-column: 1 / -1;
    max-width: none;
    margin-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand { animation: none; }
  .captcha-spinner { animation-duration: 1.6s; }
  .toast, .progress-track, .download-btn { transition: none; }
}
