@font-face {
  font-family: 'Outfit';
  src: url('/fonts/Outfit-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #07080f;
  --bg-2: #0d1022;
  --bg-3: #141936;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #eef0ff;
  --muted: #a3a9cc;
  --dim: #6e7499;
  --amber: #ffc857;
  --amber-2: #ffb020;
  --coral: #ff6b7a;
  --mint: #5be7c4;
  --radius: 14px;
  --wrap: 1180px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(140, 123, 255, 0.13), transparent 60%),
    radial-gradient(900px 500px at 0% 20%, rgba(255, 200, 87, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 400 17px/1.6 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  min-height: 100vh;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.4px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
  z-index: -1;
}
a { color: var(--amber); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #ffe0a0; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(32px, 4.6vw, 54px); font-weight: 800; text-wrap: balance; }
h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0 0 1em; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* Header and footer */
.top {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand svg { width: 30px; height: 30px; flex: none; }
.top nav { display: flex; gap: 22px; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.top nav a:hover, .top nav a[aria-current='page'] { color: var(--text); }

.foot {
  max-width: var(--wrap);
  margin: 72px auto 0;
  padding: 28px 20px 48px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: space-between;
  color: var(--dim);
  font-size: 15px;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }

main { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* Home hero */
.hero { text-align: center; padding: 14px 0 24px; max-width: 820px; margin: 0 auto; }
.hero h1 span { color: var(--amber); }
.lede { color: var(--muted); font-size: clamp(17px, 2vw, 20px); margin: 0 auto; max-width: 720px; text-wrap: pretty; }

/* Maker */
.maker {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  background: linear-gradient(180deg, rgba(20, 25, 54, 0.75), rgba(13, 16, 34, 0.75));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.stage { position: sticky; top: 16px; }
.phone {
  position: relative;
  aspect-ratio: 9 / 16;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 53%, #151a38 0%, #07080f 64%);
  border: 1px solid var(--line-2);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.03), 0 18px 60px rgba(0, 0, 0, 0.5);
}
.phone-wait {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(7, 8, 15, 0.55);
  color: var(--muted);
  font-size: 15px;
  backdrop-filter: blur(2px);
}
.phone-error { color: var(--coral); padding: 24px; text-align: center; background: rgba(7, 8, 15, 0.85); }
.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--amber);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.stage-note { text-align: center; color: var(--dim); font-size: 14px; margin: 10px 0 0; }
.play-big {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 200, 87, 0.96);
  color: #1a1300;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 0 10px rgba(255, 200, 87, 0.16);
  transition: transform 0.15s;
}
.play-big:hover { transform: translate(-50%, -50%) scale(1.06); }
.play-big svg { width: 32px; height: 32px; margin-left: 5px; }

.panel { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.step h2 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.num {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--amber);
  color: #1a1300;
  font-size: 14px;
  font-weight: 800;
}
.hint { color: var(--dim); font-size: 14px; margin: 10px 0 0; }
.hint.inline { margin: 0; }

.scene-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.scene-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.scene-tile img { width: 46px; height: 46px; flex: none; object-fit: cover; border-radius: 8px; background: #0b0e1f; display: block; }
.scene-tile:hover { border-color: var(--line-2); transform: translateY(-1px); }
.scene-tile.on { border-color: var(--amber); background: rgba(255, 200, 87, 0.08); box-shadow: 0 0 0 1px var(--amber) inset; }
.scene-name { font-size: 14px; line-height: 1.25; color: var(--muted); font-weight: 600; }
.scene-tile.on .scene-name { color: var(--text); }

.song-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.song-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.song-chip:hover { border-color: var(--line-2); }
.song-chip.on { border-color: var(--amber); background: rgba(255, 200, 87, 0.08); }
.song-title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.song-by { color: var(--dim); font-size: 12.5px; line-height: 1.3; }

.midi-drop {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px dashed var(--line-2);
  border-radius: 12px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1.35;
  transition: border-color 0.15s, background 0.15s;
}
.midi-drop:hover { border-color: var(--amber); }
.midi-drop.on { border-style: solid; border-color: var(--amber); background: rgba(255, 200, 87, 0.08); color: var(--text); }
.midi-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.midi-drop b { color: var(--text); font-weight: 600; }
.midi-drop small { font-size: 13px; color: var(--dim); }
.midi-icon { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--bg-3); color: var(--amber); font-size: 20px; }

.row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.field select, .seed input {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 8px 10px;
  min-height: 40px;
}
.field select { max-width: 100%; }
label.field { margin-top: 10px; }
.seed { display: flex; gap: 8px; }
.seed input { width: 110px; }
.segmented { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line-2); }
.segmented button {
  border: 0;
  background: transparent;
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
}
.segmented button.on { background: var(--bg-3); color: var(--text); box-shadow: 0 0 0 1px var(--line-2) inset; }
.segmented button:disabled { cursor: default; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: var(--muted); font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--amber); }

button.ghost {
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
}
button.ghost:hover { border-color: var(--amber); }
button.link { border: 0; background: none; color: var(--amber); padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: 15px; }
button.primary {
  margin-top: 14px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 15px 20px;
  font-size: 18px;
  font-weight: 800;
  color: #1a1300;
  background: linear-gradient(180deg, var(--amber), var(--amber-2));
  box-shadow: 0 10px 30px rgba(255, 176, 32, 0.25);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
}
button.primary:hover { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(255, 176, 32, 0.32); }
button.primary:disabled { filter: grayscale(0.7) brightness(0.7); cursor: default; transform: none; box-shadow: none; }

.progress { margin-top: 14px; }
.bar { height: 12px; border-radius: 99px; background: var(--bg-3); overflow: hidden; border: 1px solid var(--line); }
.bar div { height: 100%; background: linear-gradient(90deg, var(--amber-2), var(--amber)); transition: width 0.25s; }
.progress-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--muted); font-size: 14px; }
.done { margin: 12px 0 0; color: var(--mint); font-size: 15px; }
.done b { color: var(--text); font-weight: 600; word-break: break-all; }
.error { color: var(--coral); font-size: 15px; margin: 10px 0 0; }
.notice { background: rgba(255, 107, 122, 0.08); border: 1px solid rgba(255, 107, 122, 0.3); border-radius: 12px; padding: 14px 16px; font-size: 15px; color: var(--muted); }
.notice p:last-of-type { margin-bottom: 12px; }
.share { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; }

/* Content bands on the home page */
.band { margin-top: 64px; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.steps li { counter-increment: s; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: var(--muted); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bg-3); color: var(--amber); font-weight: 800; margin-bottom: 12px; }
.steps b { color: var(--text); display: block; font-size: 18px; margin-bottom: 4px; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--amber); color: var(--text); transform: translateY(-2px); }
.card img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; background: #0b0e1f; }
.card b { display: block; font-size: 16px; line-height: 1.25; }
.card span { color: var(--dim); font-size: 13.5px; line-height: 1.35; display: block; margin-top: 3px; }

.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--amber); font-weight: 400; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--muted); margin: 10px 0 0; max-width: 820px; }

/* Article pages */
.article { max-width: 760px; margin: 0 auto; padding-top: 18px; }
.article .kicker { color: var(--amber); font-weight: 600; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; }
.article .lede { margin: 0 0 28px; max-width: none; }
.article h2 { margin-top: 1.6em; font-size: 26px; }
.article h3 { margin-top: 1.4em; }
.article p, .article li { color: #c9cde6; }
.article li { margin-bottom: 0.4em; }
.article code { background: var(--bg-3); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 0.92em; }
.article pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow-x: auto; }
.article pre code { background: none; border: 0; padding: 0; }
.article table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 15px; }
.article th, .article td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article th { color: var(--text); font-weight: 600; }
.cta {
  display: inline-block;
  margin: 6px 0 10px;
  padding: 13px 22px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--amber), var(--amber-2));
  color: #1a1300;
  font-weight: 800;
  text-decoration: none;
}
.cta:hover { color: #1a1300; filter: brightness(1.05); }
.scene-hero { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; margin-bottom: 8px; }
.scene-hero video, .scene-hero img { width: 100%; aspect-ratio: 9 / 16; border-radius: 16px; border: 1px solid var(--line-2); background: #0b0e1f; display: block; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 18px 0; }
.facts div { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.facts b { display: block; font-size: 20px; color: var(--text); }
.facts span { font-size: 13px; color: var(--dim); }
.crumbs { font-size: 14px; color: var(--dim); margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.list-plain { list-style: none; padding: 0; }
.guide-list { display: grid; gap: 12px; padding: 0; list-style: none; }
.guide-list a { display: block; padding: 16px 18px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.guide-list a:hover { border-color: var(--amber); }
.guide-list b { display: block; font-size: 18px; }
.guide-list span { display: block; color: var(--dim); font-size: 15px; margin-top: 3px; }

@media (max-width: 1020px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .maker { grid-template-columns: 1fr; padding: 14px; gap: 22px; border-radius: 18px; }
  .stage { position: static; max-width: 340px; width: 100%; margin: 0 auto; }
  .scene-hero { grid-template-columns: 1fr; }
  .scene-hero video, .scene-hero img { max-width: 280px; margin: 0 auto; }
  .top { flex-direction: column; gap: 8px; padding-bottom: 6px; }
  .top nav { gap: 16px; justify-content: center; }
  .band { margin-top: 48px; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .scene-tile { flex-direction: column; text-align: center; gap: 6px; padding: 6px 6px 8px; }
  .scene-tile img { width: 100%; height: auto; aspect-ratio: 1 / 1; }
  .scene-name { font-size: 12.5px; }
}
@media (max-width: 420px) {
  main { padding: 0 14px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: 0.01ms !important; }
}

/* Ad slots: collapse when AdSense has nothing to show. */
.ad-slot { max-width: var(--wrap); margin: 40px auto 0; }
.ad-slot.in-article { max-width: 760px; margin: 28px auto; }
.ad-slot ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
