:root {
  --bg: #f6f4ef;
  --fg: #1c1b19;
  --muted: #5f5b53;
  --card: #ffffff;
  --line: #d9d4c8;
  --accent: #1877f2;
  --accent-fg: #ffffff;
  --error: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15161a;
    --fg: #ecebe7;
    --muted: #a3a09a;
    --card: #1f2126;
    --line: #34363d;
    --accent: #4a94f7;
    --accent-fg: #0b0c0f;
    --error: #f2b8b5;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 48px 16px 32px;
  flex: 1;
}
h1 {
  font-size: clamp(1.7rem, 6vw, 2.4rem);
  line-height: 1.15;
  margin: 0 0 12px;
  text-wrap: balance;
}
.lede { color: var(--muted); margin: 0 0 28px; }
label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 11px 12px;
  font: inherit;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
}
button, .button {
  display: inline-block;
  padding: 11px 18px;
  font: inherit;
  font-weight: 600;
  color: var(--accent-fg);
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .button:hover { filter: brightness(1.08); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.hint { color: var(--muted); font-size: 0.85rem; margin: 8px 0 0; }
.error { color: var(--error); font-size: 0.9rem; margin: 8px 0 0; }
#result {
  margin-top: 28px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.actions { display: flex; gap: 20px; flex-wrap: wrap; margin: 14px 0 0; font-size: 0.95rem; }
a { color: var(--accent); }
.steps { margin: 0 0 24px; padding-left: 1.4em; }
.steps li { opacity: 0; animation: step 0.4s ease-out forwards; }
.steps li:nth-child(1) { animation-delay: 0.3s; }
.steps li:nth-child(2) { animation-delay: 1.1s; }
.steps li:nth-child(3) { animation-delay: 1.9s; }
.cta { margin: 0 0 28px; opacity: 0; animation: step 0.4s ease-out 2.6s forwards; }
.cta .button { font-size: 1.1rem; padding: 14px 24px; }
@keyframes step { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .steps li, .cta { animation: none; opacity: 1; }
}
.embed iframe {
  display: block;
  width: 100%;
  height: 560px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
code { font-size: 0.9em; overflow-wrap: anywhere; }
footer {
  padding: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}
footer p { margin: 0; }
