:root {
  --black: #010101;
  --ink: #161823;
  --muted: #4e515a;
  --line: #e8e8ea;
  --paper: #ffffff;
  --wash: #f8f8f8;
  --pink: #fe2c55;
  --pink-btn: #e11d48;
  --pink-dark: #be123c;
  --cyan: #25f4ee;
  --shadow: 0 16px 40px rgba(1, 1, 1, 0.12);
  --header: 68px;
  --font: "Segoe UI", "Leelawadee UI", "Noto Sans Thai", "Noto Sans Arabic", "Malgun Gothic", "Yu Gothic", Meiryo, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input { font: inherit; }
h1, h2, h3, p { overflow-wrap: anywhere; }

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}
.narrow { width: min(760px, 100%); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: var(--header);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 18px;
}
.nav { margin-inline-start: auto; }
.header-tools { order: 3; }
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.25rem;
  color: var(--black);
}
.logo-mark {
  width: 32px;
  height: 32px;
  filter: drop-shadow(-1.5px 0 0 var(--cyan)) drop-shadow(1.5px 0 0 var(--pink));
}
.logo-accent { color: var(--pink); }
.header-tools { display: flex; align-items: center; gap: 8px; }

.lang { position: relative; }
.lang-btn, .nav-toggle {
  min-height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0 14px;
  cursor: pointer;
  color: var(--ink);
}
.lang-btn[aria-expanded="true"], .nav-toggle[aria-expanded="true"] {
  border-color: var(--black);
}
.lang-menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  width: min(280px, 80vw);
  max-height: 320px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
}
.lang-menu.open { display: block; }
.lang-menu a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
}
.lang-menu a:hover, .lang-menu a[aria-current="page"] { background: #f3f3f4; }
.lang-menu a[aria-current="page"] { font-weight: 700; }
.lang-code { color: var(--muted); font-size: 0.8rem; }

.nav-toggle { display: none; }
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
}
.nav a:hover { background: #f3f3f4; }

.hero {
  position: relative;
  background:
    radial-gradient(520px 280px at 0% 0%, rgba(37, 244, 238, 0.28), transparent 70%),
    radial-gradient(480px 280px at 100% 100%, rgba(254, 44, 85, 0.32), transparent 72%),
    var(--black);
  color: #fff;
  padding: 48px 0 56px;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 {
  margin: 0 auto 12px;
  max-width: 18em;
  text-align: center;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}
.hero-lede {
  max-width: 640px;
  margin: 0 auto 20px;
  text-align: center;
  color: #e7e7ea;
  font-size: 1.08rem;
}
.chips {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.chips li {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.88rem;
  font-weight: 650;
}

.downloader { width: min(760px, 100%); margin: 0 auto; }
.composer {
  display: flex;
  gap: 10px;
  align-items: stretch;
  position: sticky;
  top: calc(var(--header) + 8px);
  z-index: 25;
  scroll-margin-top: calc(var(--header) + 8px);
  padding: 8px;
  border-radius: 22px;
  background: rgba(1, 1, 1, 0.94);
  box-shadow: 0 12px 28px rgba(1, 1, 1, 0.22);
}
.field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  background: #fff;
  border-radius: 16px;
  padding: 6px 6px 6px 16px;
  box-shadow: 0 0 0 2px transparent, 0 10px 30px rgba(37, 244, 238, 0.08);
}
.field:focus-within { box-shadow: 0 0 0 2px var(--black); }
.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--black);
  min-height: 48px;
  font-size: 1rem;
}
.field input::placeholder { color: #5c5f68; }
.paste, .download, .text-btn, .result-btn {
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  font-weight: 750;
  text-decoration: none;
  text-align: center;
}
.paste {
  background: #f3f3f4;
  color: var(--ink);
  min-height: 44px;
  padding: 0 14px;
}
.paste:hover { background: #e7e7ea; }
.download {
  background: var(--pink-btn);
  color: #fff;
  min-width: 148px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 16px;
  box-shadow: -3px 0 0 var(--cyan);
}
.download:hover:not(:disabled) { background: var(--pink-dark); }
.download:disabled { opacity: 0.7; cursor: progress; }
.privacy, .form-error, .form-note {
  text-align: center;
  margin: 14px auto 0;
  max-width: 640px;
}
.privacy, .form-note { color: #bdbdc2; font-size: 0.92rem; }
.form-error { color: #ffd0da; min-height: 1.2em; }
.form-error:empty { display: none; }

.results {
  margin-top: 22px;
  background: #fff;
  color: var(--ink);
  border-radius: 20px;
  padding: 16px;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  text-align: start;
}
.results[hidden] { display: none; }
.thumb {
  background: #111;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.82rem;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.result-title { margin: 0 0 4px; font-size: 1.05rem; letter-spacing: -0.02em; }
.result-author { margin: 0 0 12px; color: var(--muted); }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.result-btn {
  background: var(--pink-btn);
  color: #fff;
  min-height: 44px;
  padding: 10px 14px;
}
.result-btn.alt { background: var(--black); }
.result-btn:hover { filter: brightness(1.05); }
.text-btn {
  margin-top: 12px;
  background: transparent;
  color: var(--pink-btn);
  padding: 0;
}

.section { padding: 72px 0; }
.section-wash { background: var(--wash); }
.section-dark { background: var(--black); color: #fff; }
.section h2 {
  margin: 0 0 16px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
  line-height: 1.15;
}
.lede { font-size: 1.08rem; color: var(--muted); margin-top: 0; }
.section-dark .lede { color: #d0d0d4; }
.prose p { margin: 0 0 14px; }
.prose p:last-child { margin-bottom: 0; }

.steps { display: grid; gap: 28px; margin-top: 28px; }
.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(1, 1, 1, 0.04);
}
.step-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--black);
  background: var(--cyan);
  box-shadow: 3px 0 0 var(--pink);
  font-size: 0.95rem;
}
.step h3 { margin: 0; font-size: 1.35rem; letter-spacing: -0.03em; }
.step p { margin: 8px 0 16px; color: var(--muted); }
.step img {
  width: 100%;
  border-radius: 16px;
  background: #f3f3f4;
}
.note {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border-inline-start: 4px solid var(--pink);
}

.cards, .feature-grid, .device-grid {
  display: grid;
  gap: 14px;
}
.feature-grid { grid-template-columns: repeat(3, 1fr); margin-top: 8px; }
.device-grid { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 18px 16px;
}
.card h3 { margin: 0 0 8px; letter-spacing: -0.03em; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); }
.card .mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  font-weight: 800;
  background: var(--black);
  color: #fff;
  box-shadow: -2px 0 0 var(--cyan), 2px 0 0 var(--pink);
}
.figure {
  margin: 28px auto 0;
  width: min(860px, 100%);
}
.figure img { border-radius: 20px; margin-inline: auto; }

.check-list, .why-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.check-list li, .why-list li {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
}
.section-dark .check-list li::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-inline-end: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 4px 0 0 var(--pink);
}
.why-list { margin-top: 8px; }
.why-list li {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}
.why-list strong { display: block; letter-spacing: -0.02em; }

.faq { display: grid; gap: 10px; }
.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 4px 16px;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 14px 0;
  letter-spacing: -0.02em;
}
.faq details p { margin: 0 0 14px; color: var(--muted); }
.faq details[open] { border-color: var(--black); box-shadow: inset 3px 0 0 var(--pink); }

.site-footer { background: var(--black); color: #fff; padding: 48px 0 20px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}
.site-footer h2 { font-size: 0.95rem; margin: 0 0 12px; }
.site-footer p { color: #c6c6cb; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 8px; }
.site-footer a { color: #e7e7ea; text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }
.footer-bar {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #a1a1aa;
  font-size: 0.9rem;
}
.page-hero { padding-bottom: 28px; }
.page-hero h1 { max-width: 20em; }
.cta-row { display: flex; justify-content: center; margin-top: 8px; }
.cta-row a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--pink-btn);
  color: #fff;
  text-decoration: none;
  font-weight: 750;
  box-shadow: -3px 0 0 var(--cyan);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--black);
  outline-offset: 2px;
}
.hero :focus-visible,
.section-dark :focus-visible,
.site-footer :focus-visible {
  outline-color: #fff;
}

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .device-grid, .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .header-tools { margin-inline-start: auto; }
  .nav { margin-inline-start: 0; }
  .nav {
    display: none;
    position: absolute;
    inset-inline: 16px;
    top: calc(var(--header) + 8px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 8px;
    flex-direction: column;
    align-items: stretch;
  }
  .nav.open { display: flex; }
  .header-inner { position: relative; }
}

@media (max-width: 720px) {
  .composer, .feature-grid, .device-grid, .footer-grid { grid-template-columns: 1fr; display: grid; }
  .results:not([hidden]) { grid-template-columns: 88px 1fr; align-items: start; }
  .thumb { max-height: 132px; aspect-ratio: 3 / 4; }
  .download { width: 100%; min-height: 52px; }
  .field { padding-inline: 12px 6px; }
  .hero { padding: 42px 0 48px; }
  .section { padding: 48px 0; }
}

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