:root {
  color-scheme: dark;
  --bg: #070a0d;
  --panel: #10171d;
  --line: rgba(183, 202, 216, 0.2);
  --text: #f4f8fa;
  --muted: #a9b7c1;
  --cyan: #3bc7d7;
  --green: #7fd16a;
  --gold: #f0ba5b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at 82% 0, rgba(57, 200, 216, 0.14), transparent 30rem), var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
}

a { color: inherit; }

.download-header,
.download-main,
.download-footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.download-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.brand img { width: 150px; background: #fff; }

.language-switch {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.language-switch a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.language-switch a:hover,
.language-switch a:focus-visible {
  color: #071014;
  background: var(--cyan);
}

.download-main { padding: 72px 0 80px; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.16em;
}

h1 {
  max-width: 1100px;
  margin: 0 0 20px;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.lead {
  max-width: 760px;
  margin: 0 0 42px;
  color: #d1dce2;
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.8;
}

.notarization-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 720px;
  margin: -16px 0 42px;
  padding: 13px 16px;
  border: 1px solid rgba(59, 199, 215, 0.38);
  border-radius: 12px;
  background: rgba(24, 46, 54, 0.46);
}

.notarization-check {
  display: grid;
  width: 1.45rem;
  height: 1.45rem;
  flex: 0 0 auto;
  place-items: center;
  margin-top: 0.1rem;
  border-radius: 50%;
  background: rgba(59, 199, 215, 0.18);
  color: var(--cyan);
  font-weight: 900;
}

.notarization-note p { margin: 0; color: #d7e3e8; line-height: 1.55; }
.notarization-note strong { display: block; color: var(--text); font-size: 0.98rem; }
.notarization-note span:not(.notarization-check) { color: var(--muted); font-size: 0.9rem; }

.update-guide {
  margin: 0 0 24px;
  padding: clamp(22px, 4vw, 30px);
  background: linear-gradient(135deg, rgba(55, 199, 214, 0.12), rgba(240, 186, 91, 0.08));
  border: 1px solid rgba(55, 199, 214, 0.4);
  border-radius: 14px;
}

.update-guide h2 { margin: 5px 0 10px; font-size: clamp(1.25rem, 3vw, 1.75rem); }
.update-guide p:last-child { margin: 0; color: #d7e0e5; line-height: 1.8; }

.trial-agreement {
  max-width: 920px;
  margin: 0 0 30px;
  padding: clamp(22px, 4vw, 32px);
  background: linear-gradient(135deg, rgba(24, 46, 54, 0.96), rgba(13, 20, 25, 0.98));
  border: 1px solid rgba(59, 199, 215, 0.48);
  border-radius: 18px;
}

.trial-agreement h2 { margin: 0 0 12px; font-size: clamp(1.35rem, 3vw, 2rem); }
.trial-agreement > p:not(.eyebrow):not(.trial-agreement-links):not(.trial-agreement-status) { color: #d7e3e8; line-height: 1.8; }
.trial-agreement ul { margin: 16px 0; padding-left: 1.3em; color: var(--muted); line-height: 1.8; }
.trial-agreement-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 20px 0; }
.trial-agreement-links a { color: var(--cyan); font-weight: 850; }

.trial-agreement-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-weight: 800;
  line-height: 1.65;
  cursor: pointer;
}

.trial-agreement-check input { width: 1.2rem; height: 1.2rem; margin: 0.24rem 0 0; flex: 0 0 auto; accent-color: var(--cyan); }
.trial-agreement-status { margin: 14px 0 0; color: var(--gold); font-size: 0.9rem; font-weight: 800; }

.trial-download-link.is-disabled {
  opacity: 0.42;
  filter: grayscale(0.6);
  cursor: not-allowed;
  pointer-events: none;
}

.terms-content { max-width: 900px; }
.terms-intro { margin: 0 0 40px; color: #d1dce2; font-size: 1.08rem; line-height: 1.85; }
.terms-section { margin: 0 0 32px; padding: 0 0 28px; border-bottom: 1px solid var(--line); }
.terms-section h2 { margin: 0 0 12px; font-size: clamp(1.25rem, 3vw, 1.8rem); }
.terms-section p, .terms-section li { color: #d1dce2; line-height: 1.85; }
.terms-section ul { margin: 12px 0; padding-left: 1.3em; }
.terms-section a { color: var(--cyan); }
.terms-content a,
.legal-details dd { overflow-wrap: anywhere; }
.terms-back { margin-top: 34px; }
.legal-details { margin: 0; }
.legal-details div { padding: 15px 0; border-top: 1px solid rgba(123, 157, 174, 0.24); }
.legal-details div:first-child { border-top: 0; padding-top: 0; }
.legal-details dt { color: var(--gold); font-weight: 900; }
.legal-details dd { margin: 5px 0 0; color: #d1dce2; line-height: 1.85; }

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.download-card {
  scroll-margin-top: 24px;
  padding: clamp(24px, 4vw, 38px);
  background: linear-gradient(145deg, rgba(28, 39, 47, 0.96), rgba(11, 16, 20, 0.98));
  border: 1px solid var(--line);
  border-radius: 18px;
}

.download-card.sound { border-color: rgba(127, 209, 106, 0.35); }
.download-card.video { border-color: rgba(57, 200, 216, 0.35); }

.download-card h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.download-card p { color: var(--muted); line-height: 1.7; }

.download-variants {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.download-variant {
  padding: 16px;
  border: 1px solid rgba(183, 202, 216, 0.18);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.download-variant > strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.download-variant .meta { margin: 10px 0 14px; }
.download-variant .button { width: 100%; }

.release-update {
  display: grid;
  gap: 4px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.55;
}

.release-update span { display: block; }

.release-update a {
  width: fit-content;
  color: var(--cyan);
  font-weight: 900;
}

.release-update a:hover,
.release-update a:focus-visible { color: #8debf4; }

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 20px 0;
  color: #d7e0e5;
  font-size: 0.84rem;
  font-weight: 800;
}

.buttons { display: flex; flex-wrap: wrap; gap: 10px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-weight: 950;
  text-decoration: none;
}

.button.primary { color: #071014; background: var(--cyan); border-color: transparent; }
.button.secondary { background: rgba(255, 255, 255, 0.06); }
.button:hover, .button:focus-visible { filter: brightness(1.1); }

.stream-deck-beta-download {
  scroll-margin-top: 24px;
  margin-top: 26px;
  padding: clamp(26px, 5vw, 46px);
  border: 1px solid rgba(240, 186, 91, 0.5);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(240, 186, 91, 0.17), transparent 30rem),
    linear-gradient(145deg, rgba(29, 28, 23, 0.98), rgba(8, 13, 17, 0.99));
}

.stream-deck-beta-download:target {
  border-color: rgba(240, 186, 91, 0.88);
  box-shadow: 0 0 0 3px rgba(240, 186, 91, 0.12);
}

.stream-deck-beta-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.stream-deck-beta-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.stream-deck-beta-badge {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(240, 186, 91, 0.56);
  border-radius: 999px;
  color: #fff3dc;
  background: rgba(240, 186, 91, 0.14);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.1em;
}

.stream-deck-beta-lead {
  max-width: 900px;
  margin: 20px 0 16px;
  color: #d7e0e5;
  line-height: 1.8;
}

.stream-deck-beta-lead strong { color: #fff3dc; }

.stream-deck-beta-requirements {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.stream-deck-beta-requirements span {
  padding: 6px 10px;
  border: 1px solid rgba(59, 199, 215, 0.36);
  border-radius: 999px;
  color: #dffbff;
  background: rgba(59, 199, 215, 0.08);
  font-size: 0.75rem;
  font-weight: 900;
}

.stream-deck-beta-components {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stream-deck-beta-component {
  padding: 22px;
  border: 1px solid rgba(183, 202, 216, 0.2);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.24);
}

.component-kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.stream-deck-beta-component h3 {
  margin: 0 0 8px;
  font-size: 1.18rem;
}

.stream-deck-beta-component > p:not(.component-kicker) {
  margin: 0;
  color: #cbd8de;
  line-height: 1.72;
}

.stream-deck-beta-component .meta { margin: 14px 0; }
.stream-deck-beta-component .button { width: 100%; }

.stream-deck-beta-cautions {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 17px 18px;
  border: 1px solid rgba(240, 186, 91, 0.28);
  border-radius: 12px;
  background: rgba(240, 186, 91, 0.07);
}

.stream-deck-beta-cautions p {
  margin: 0;
  color: #d1dce2;
  line-height: 1.72;
}

.stream-deck-beta-cautions strong { color: #fff3dc; }

.stream-deck-beta-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  color: var(--gold);
  font-weight: 950;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.stream-deck-beta-detail-link:hover,
.stream-deck-beta-detail-link:focus-visible { color: #ffd68d; }

.recent-updates {
  margin-top: 26px;
  padding: clamp(26px, 5vw, 46px);
  border: 1px solid rgba(59, 199, 215, 0.42);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(59, 199, 215, 0.16), transparent 32rem),
    linear-gradient(145deg, rgba(20, 31, 38, 0.98), rgba(8, 13, 17, 0.99));
}

.recent-updates-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 26px;
  align-items: end;
  margin-bottom: 24px;
}

.recent-updates-heading h2 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.recent-updates-heading > p {
  margin: 0;
  color: #c7d5dc;
  line-height: 1.8;
}

.recent-update-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.recent-update-card {
  padding: 20px;
  border: 1px solid rgba(183, 202, 216, 0.18);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
}

.recent-update-card.is-latest {
  border-color: rgba(59, 199, 215, 0.62);
  background: linear-gradient(145deg, rgba(32, 76, 84, 0.46), rgba(0, 0, 0, 0.2));
}

.recent-update-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.recent-update-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #061013;
  background: var(--cyan);
}

.recent-update-card h3 {
  margin: 13px 0 8px;
  font-size: 1.16rem;
}

.recent-update-card p {
  margin: 0;
  color: #cbd8de;
  line-height: 1.72;
}

.recent-updates-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  color: var(--cyan);
  font-weight: 950;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.recent-updates-link:hover,
.recent-updates-link:focus-visible { color: #8debf4; }

.release-index {
  display: grid;
  gap: 18px;
  max-width: 920px;
}

.release-entry {
  scroll-margin-top: 24px;
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(28, 39, 47, 0.96), rgba(11, 16, 20, 0.98));
}

.release-entry:target {
  border-color: rgba(59, 199, 215, 0.72);
  box-shadow: 0 0 0 3px rgba(59, 199, 215, 0.12);
}

.release-entry-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.release-entry h2 { margin: 0; font-size: clamp(1.35rem, 3vw, 2rem); }
.release-date { margin: 5px 0 0; color: var(--gold); font-size: 0.86rem; font-weight: 900; }
.release-products { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }

.release-product {
  padding: 5px 9px;
  border: 1px solid rgba(59, 199, 215, 0.34);
  border-radius: 999px;
  color: #d9f7fa;
  background: rgba(59, 199, 215, 0.09);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.release-entry ul { margin: 0; padding-left: 1.25em; }
.release-entry li { margin: 7px 0; color: #d1dce2; line-height: 1.75; }

.notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.note {
  padding: 20px;
  background: rgba(16, 23, 29, 0.88);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.note strong { display: block; margin-bottom: 8px; color: var(--gold); }
.note p { margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.7; }

.download-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 760px) {
  .download-header { align-items: flex-start; flex-direction: column; padding: 18px 0; }
  .download-main { padding-top: 44px; padding-bottom: 68px; }
  .download-grid, .stream-deck-beta-components, .recent-updates-heading, .recent-update-grid, .notes { grid-template-columns: 1fr; }
  .stream-deck-beta-heading { flex-direction: column; }
  .release-entry-header { flex-direction: column; }
  .release-products { justify-content: flex-start; }
  .download-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 520px) {
  h1 {
    font-size: clamp(2.2rem, 10vw, 3.1rem);
    line-height: 1.04;
    letter-spacing: -0.045em;
  }

  .terms-intro { margin-bottom: 32px; }
  .terms-section { margin-bottom: 24px; padding-bottom: 20px; }
  .release-index { gap: 14px; }
  .release-entry { padding: 18px; }
  .release-entry li { line-height: 1.65; }
}
