:root {
  --bg: #080806;
  --surface: #12110d;
  --surface-2: #1a1811;
  --line: #302b1d;
  --text: #f5f2e8;
  --muted: #aaa594;
  --gold: #e6be43;
  --gold-bright: #ffd75b;
  --gold-soft: rgba(230, 190, 67, 0.12);
  --blue: #2284ff;
  --orange: #ff8a27;
  --green: #32c365;
  --danger: #ff6b62;
  --max: 1160px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 82% 3%, rgba(230, 190, 67, 0.09), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI",
    "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--gold-bright);
}

a:hover {
  color: #fff0a6;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
  border-radius: 5px;
}

img {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 99;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--gold);
  color: #171207;
  font-weight: 800;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 8, 6, 0.9);
  backdrop-filter: blur(16px);
}

.topbar__inner {
  width: min(var(--max), calc(100% - 36px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.brand small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  font-weight: 700;
}

.topbar nav a {
  color: var(--muted);
  text-decoration: none;
}

.topbar nav a:hover,
.topbar nav .language {
  color: var(--gold-bright);
}

main {
  width: min(var(--max), calc(100% - 36px));
  margin: 0 auto;
  padding-bottom: 100px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 56px;
  align-items: center;
  padding: 72px 0 62px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(2.35rem, 6vw, 4.7rem);
  line-height: 1.06;
  letter-spacing: -0.055em;
}

h1 em {
  color: var(--gold-bright);
  font-style: normal;
}

.lead {
  max-width: 760px;
  margin-bottom: 0;
  color: #c5c0af;
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.hero__icon {
  width: clamp(128px, 18vw, 196px);
  border: 1px solid #4a4228;
  border-radius: 28%;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.chip {
  padding: 5px 10px;
  border: 1px solid #4a4228;
  border-radius: 999px;
  color: #c8c2ad;
  font-size: 0.75rem;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.download-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: var(--gold);
  color: #171207;
  font-size: 0.88rem;
  font-weight: 850;
  text-decoration: none;
  transition: background 0.16s ease, transform 0.16s ease;
}

.download-button:hover {
  background: var(--gold-bright);
  color: #171207;
  transform: translateY(-1px);
}

.notice {
  margin-bottom: 66px;
  padding: 24px 26px;
  border: 1px solid rgba(230, 190, 67, 0.35);
  border-radius: 16px;
  background: var(--gold-soft);
}

.notice h2 {
  margin-bottom: 8px;
  font-size: 1.22rem;
}

.notice p:last-child {
  margin-bottom: 0;
  color: #c6c0ad;
}

.manual-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 90px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.toc strong {
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 0.76rem;
  letter-spacing: 0.15em;
}

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

.toc li + li {
  margin-top: 8px;
}

.toc a {
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
}

.toc a:hover {
  color: var(--gold-bright);
}

.content {
  min-width: 0;
}

.section {
  scroll-margin-top: 88px;
  padding-bottom: 76px;
}

.section + .section {
  padding-top: 76px;
  border-top: 1px solid var(--line);
}

.section__head {
  max-width: 760px;
  margin-bottom: 28px;
}

.section h2 {
  margin-bottom: 8px;
  font-size: clamp(1.65rem, 4vw, 2.45rem);
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.section__head p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.story {
  max-width: 760px;
  padding: 25px 28px;
  border-left: 3px solid var(--gold);
  border-radius: 0 16px 16px 0;
  background: linear-gradient(135deg, var(--gold-soft), var(--surface));
}

.story p {
  color: #c9c3b2;
}

.story p:last-child {
  margin-bottom: 0;
  color: var(--text);
  font-weight: 700;
}

.steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.steps li {
  position: relative;
  min-height: 72px;
  padding: 18px 20px 18px 72px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  counter-increment: steps;
}

.steps li::before {
  content: counter(steps, decimal-leading-zero);
  position: absolute;
  top: 17px;
  left: 20px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.steps strong {
  display: block;
  margin-bottom: 2px;
}

.steps span {
  color: var(--muted);
  font-size: 0.9rem;
}

.figure {
  margin: 28px 0 0;
}

.figure a {
  display: block;
  border: 1px solid #332f24;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.34);
}

.figure img {
  display: block;
  width: 100%;
}

.figure figcaption {
  padding: 12px 4px 0;
  color: var(--muted);
  font-size: 0.8rem;
}

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

.card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
}

.card h3 {
  margin-bottom: 7px;
  font-size: 1rem;
}

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

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.card ul {
  padding-left: 1.2em;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.dot--green { background: var(--green); }
.dot--orange { background: var(--orange); }

.author-setup {
  overflow: hidden;
  border: 1px solid rgba(230, 190, 67, 0.5);
  border-radius: 18px;
  background: var(--gold-soft);
}

.author-setup__head {
  padding: 24px 26px 18px;
  border-bottom: 1px solid rgba(230, 190, 67, 0.22);
}

.author-setup__head h3 {
  margin-bottom: 4px;
  font-size: 1.25rem;
}

.author-setup__head p {
  margin-bottom: 0;
  color: #c8c1ab;
}

.setting-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.setting-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 13px 26px;
  border-bottom: 1px solid rgba(230, 190, 67, 0.12);
}

.setting-list div:nth-child(odd) {
  border-right: 1px solid rgba(230, 190, 67, 0.12);
}

.setting-list dt {
  color: var(--muted);
}

.setting-list dd {
  margin: 0;
  color: var(--text);
  font-weight: 800;
  text-align: right;
}

.author-setup__warning {
  margin: 0;
  padding: 18px 26px 22px;
  color: #e8d98f;
  font-size: 0.86rem;
}

.control-list {
  display: grid;
  gap: 12px;
}

.control {
  display: grid;
  grid-template-columns: minmax(170px, 0.34fr) minmax(0, 1fr);
  gap: 24px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.control h3 {
  margin: 0;
  font-size: 0.96rem;
}

.control p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.meter-key {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin: 20px 0;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--surface);
}

.meter-key span {
  color: var(--muted);
  font-size: 0.85rem;
}

.meter-key i {
  display: inline-block;
  width: 18px;
  height: 4px;
  margin-right: 7px;
  border-radius: 3px;
  vertical-align: middle;
}

.key-rms { background: var(--blue); }
.key-peak { background: #fff; }
.key-threshold { background: var(--orange); }

.callout {
  margin-top: 20px;
  padding: 20px 22px;
  border-left: 4px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: var(--gold-soft);
}

.callout--danger {
  border-left-color: var(--danger);
  background: rgba(255, 107, 98, 0.09);
}

.callout strong {
  display: block;
  margin-bottom: 4px;
}

.callout p:last-child {
  margin-bottom: 0;
  color: #c7c0ad;
  font-size: 0.9rem;
}

.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  padding: 20px 42px 20px 2px;
  cursor: pointer;
  font-weight: 750;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  top: 16px;
  right: 8px;
  color: var(--gold);
  font-size: 1.35rem;
}

.faq details[open] summary::after {
  content: "−";
}

.faq p,
.faq ul {
  max-width: 760px;
  padding: 0 46px 20px 2px;
  color: var(--muted);
  font-size: 0.9rem;
}

.privacy {
  padding: 26px;
  border: 1px solid rgba(50, 195, 101, 0.32);
  border-radius: 16px;
  background: rgba(50, 195, 101, 0.07);
}

.privacy h3 {
  margin-bottom: 6px;
}

.privacy p:last-child {
  margin-bottom: 0;
  color: #b8c8bb;
}

.footer {
  padding: 44px 20px;
  border-top: 1px solid var(--line);
  color: #736f62;
  text-align: center;
  font-size: 0.76rem;
}

.footer strong {
  color: var(--gold);
}

@media (max-width: 900px) {
  .manual-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .toc {
    position: static;
  }

  .toc ol {
    columns: 2;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 15px;
  }

  .topbar__inner {
    min-height: 58px;
  }

  .brand small,
  .topbar nav a:not(.language) {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 48px 0 44px;
  }

  .hero__icon {
    grid-row: 1;
    width: 112px;
  }

  .notice {
    margin-bottom: 48px;
    padding: 21px;
  }

  .toc ol {
    columns: 1;
  }

  .section {
    padding-bottom: 56px;
  }

  .section + .section {
    padding-top: 56px;
  }

  .status-grid,
  .card-grid,
  .setting-list {
    grid-template-columns: 1fr;
  }

  .setting-list div:nth-child(odd) {
    border-right: 0;
  }

  .control {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .steps li {
    padding-left: 62px;
  }

  .figure {
    margin-right: -8px;
    margin-left: -8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
