:root {
  color-scheme: light;
  --background: #bcc9e4;
  --paper: #f5f0dc;
  --ink: #252921;
  --accent: #d8ec98;
  --digital-red: #e34b4b;
  --digital-shadow: 1px 1px 0 var(--digital-red);
  --edge: 2px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--ink);
  background-color: var(--background);
  background-image:
    repeating-linear-gradient(0deg, transparent 0 3px, rgb(37 41 33 / 2%) 3px 4px),
    radial-gradient(ellipse at 50% 45%, #d9e1ee 0%, var(--background) 70%);
  font-family: "Courier New", Courier, monospace;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.masthead {
  position: absolute;
  inset: 0 0 auto;
  padding: clamp(20px, 4vw, 48px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: bold;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.wordmark-dot { font-size: 11px; }
.subpage { text-align: center; }

.home-page { display: flex; flex-direction: column; }
.home-page .stage { flex: 1; min-height: 0; }
.home-footer {
  display: flex;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px) 16px;
}
.demo-secret-link { display: block; flex: none; width: 44px; height: 44px; }
.arcade-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #626b75;
  font-size: 13px;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.arcade-link:hover { color: var(--ink); }

.stage {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 120px 28px;
}

.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  width: min(100%, 960px);
}

.arcade-choices { grid-template-columns: minmax(0, 1fr); max-width: 452px; }

.big-button {
  --button-shadow-size: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: clamp(120px, 14vw, 180px);
  padding: clamp(24px, 3vw, 40px);
  border: var(--edge);
  border-radius: 3px;
  background: var(--paper);
  box-shadow: var(--button-shadow-size) var(--button-shadow-size) 0 var(--ink);
  font-size: clamp(28px, 3.8vw, 48px);
  font-weight: bold;
  letter-spacing: -0.065em;
  text-decoration: none;
  text-align: center;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.big-button, h1, .download-button {
  text-shadow: var(--digital-shadow);
}

@media (hover: hover) and (pointer: fine) {
  .big-button:hover, .download-button:not(:disabled):hover {
    background: var(--accent);
    transform: translate(-1px, -1px);
    box-shadow: calc(var(--button-shadow-size) + 1px) calc(var(--button-shadow-size) + 1px) 0 var(--ink);
  }
}

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 7px;
}

.big-button:active, .download-button:not(:disabled):active {
  transform: translate(1px, 1px);
  box-shadow: calc(var(--button-shadow-size) - 1px) calc(var(--button-shadow-size) - 1px) 0 var(--ink);
}

.panel {
  display: grid;
  justify-items: center;
  width: min(100%, 680px);
  padding: clamp(28px, 6vw, 64px);
  background: var(--paper);
  border: var(--edge);
  border-radius: 3px;
  box-shadow: var(--shadow);
  text-align: center;
}

h1 {
  margin: 0 0 28px;
  font-size: clamp(38px, 7vw, 64px);
  line-height: 1;
  letter-spacing: -0.065em;
  overflow-wrap: anywhere;
}

.announcement { margin: 0; font-size: clamp(18px, 2.5vw, 24px); line-height: 1.6; }

.download-button {
  --button-shadow-size: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 100%;
  margin-top: 32px;
  padding: 18px 22px;
  background: var(--paper);
  border: var(--edge);
  border-radius: 3px;
  box-shadow: var(--button-shadow-size) var(--button-shadow-size) 0 var(--ink);
  color: var(--ink);
  font: bold 16px/1.4 "Courier New", Courier, monospace;
  text-decoration: none;
  text-align: center;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.ringtone-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 20px;
  margin-top: 32px;
}

.ringtone-actions .download-button {
  margin-top: 0;
  margin-inline: auto;
}

.download-help {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.install-link { line-height: 1.6; text-underline-offset: 3px; }

.installation-guide { gap: 28px; }
.installation-guide h1 { font-size: clamp(30px, 6vw, 48px); margin: 0; }
.installation-guide section { width: 100%; }
.installation-guide h2 { margin: 0 0 16px; font-size: 24px; }
.installation-guide p { margin: 0; line-height: 1.7; }
.installation-guide ol { margin: 16px 0; padding: 0; list-style-position: inside; }
.installation-guide li { margin: 0 0 16px; line-height: 1.7; }
.installation-guide a { text-underline-offset: 3px; }
.installation-guide .guide-source { font-size: 14px; }

.donation-button {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 112px;
  padding-bottom: 38px;
  background: var(--paper);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.donation-disclaimer {
  position: absolute;
  right: 6px;
  bottom: 5px;
  max-width: calc(100% - 12px);
  font-size: 9px;
  font-weight: normal;
  line-height: 1.15;
  text-align: right;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .choices { grid-template-columns: 1fr; max-width: 400px; gap: 28px; }
  .big-button { min-height: 120px; font-size: clamp(28px, 7vw, 40px); }
}

@media (prefers-reduced-motion: reduce) {
  .big-button, .download-button { transition: none; }
  .big-button:hover, .big-button:active,
  .download-button:not(:disabled):hover, .download-button:not(:disabled):active { transform: none; }
}
