:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #efece4;
  --ink: #17161a;
  --ink-2: #5d5a63;
  --ink-3: #9a96a0;
  --line: #e3dfd5;
  --accent: #ff5a1f;
  --accent-ink: #ffffff;
  --accent-soft: #ffe6dc;
  --wave: #bdb7ab;
  --ok: #1f9d55;
  --no: #d64045;
  --shadow: 0 1px 2px rgba(20, 18, 14, .05), 0 8px 24px -12px rgba(20, 18, 14, .12);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111014;
    --surface: #1a191e;
    --surface-2: #232228;
    --ink: #f2f0ec;
    --ink-2: #b0adb6;
    --ink-3: #75727c;
    --line: #2c2b31;
    --accent: #ff6a33;
    --accent-ink: #160a05;
    --accent-soft: #3a1d12;
    --wave: #5a5762;
    --ok: #4cc47f;
    --no: #ff6b6f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
  }
}

:root[data-theme="dark"] {
  --bg: #111014;
  --surface: #1a191e;
  --surface-2: #232228;
  --ink: #f2f0ec;
  --ink-2: #b0adb6;
  --ink-3: #75727c;
  --line: #2c2b31;
  --accent: #ff6a33;
  --accent-ink: #160a05;
  --accent-soft: #3a1d12;
  --wave: #5a5762;
  --ok: #4cc47f;
  --no: #ff6b6f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 "IBM Plex Sans Thai", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

kbd {
  font: 500 12px/1 "IBM Plex Mono", monospace;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  color: var(--ink-3);
  background: var(--surface);
}

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.top-inner { display: flex; align-items: center; gap: 16px; height: 64px; }

.brand { display: flex; align-items: center; flex: none; color: var(--ink); }
.brand .logo { display: block; height: 36px; width: auto; }

.search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 420px;
  height: 42px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-3);
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: 15px; }
.search input::placeholder { color: var(--ink-3); }

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 56px 0 40px;
}

.eyebrow { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--accent); }

h1 { margin: 0; font-size: clamp(30px, 4.4vw, 50px); line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
h1 span { color: var(--ink-2); }

.lede { max-width: 520px; margin: 18px 0 0; color: var(--ink-2); font-size: 17px; }

.pack {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.pack-wave {
  position: absolute;
  inset: 0 0 auto auto;
  width: 60%;
  height: 100%;
  opacity: .14;
  background: repeating-linear-gradient(90deg, var(--accent) 0 3px, transparent 3px 8px);
  -webkit-mask: radial-gradient(ellipse 70% 40% at 80% 30%, #000 30%, transparent 70%);
  mask: radial-gradient(ellipse 70% 40% at 80% 30%, #000 30%, transparent 70%);
}
.pack-label { position: relative; margin: 0; font-size: 13px; font-weight: 600; color: var(--accent); }
.pack h2 { position: relative; margin: 4px 0 12px; font-size: 24px; line-height: 1.3; }
.pack-meta { position: relative; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; }
.pack-meta li { padding: 3px 10px; border-radius: 99px; font-size: 13px; background: color-mix(in srgb, var(--bg) 12%, transparent); }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .1s, filter .15s;
}
.btn:active { transform: scale(.98); }
.btn-primary { width: 100%; height: auto; min-height: 46px; padding: 8px 16px; flex-wrap: wrap; column-gap: 8px; row-gap: 0; white-space: nowrap; background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn span { font-weight: 400; opacity: .75; }

/* ---------- categories ---------- */

.cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip small { color: var(--ink-3); font-size: 12px; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip[aria-pressed="true"] small { color: inherit; opacity: .6; }

/* Desktop: wrap so every category is visible (a mouse wheel can't scroll a sideways strip). */
@media (min-width: 761px) {
  .cats { flex-wrap: wrap; overflow: visible; margin: 0; padding: 4px 0 12px; }
}

.result-line { margin: 8px 0 12px; font-size: 14px; color: var(--ink-3); }

.after {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  margin-top: 24px;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.after p { flex-basis: 100%; margin: 0; color: var(--ink-2); }
.after .btn { height: 42px; }
.after .btn-ghost { background: var(--surface); }

/* ---------- sound grid ---------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }

.card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { box-shadow: var(--shadow); }
.card.playing { border-color: var(--accent); }

.play {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  transition: background .15s, color .15s, transform .1s;
}
.play:hover { background: var(--accent-soft); color: var(--accent); }
.play:active { transform: scale(.94); }
.play svg { fill: currentColor; stroke: none; }
.play .i-stop { display: none; }
.card.playing .play { background: var(--accent); color: var(--accent-ink); }
.card.playing .i-play { display: none; }
.card.playing .i-stop { display: block; }

.card-body { min-width: 0; }
.card-head { display: flex; align-items: baseline; gap: 8px; }
.name { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dur { margin-left: auto; font: 500 12px/1 "IBM Plex Mono", monospace; color: var(--ink-3); }
.name-en { margin: 0 0 6px; font-size: 13px; color: var(--ink-3); line-height: 1.3; }

.wave { display: block; width: 100%; height: 44px; cursor: pointer; }

.dl {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  transition: background .15s, color .15s;
}
.dl:hover { background: var(--surface-2); color: var(--accent); }

.empty { padding: 48px 0; text-align: center; color: var(--ink-3); }

.result-line a { color: var(--accent); font-weight: 500; text-decoration: none; }
.result-line a:hover { text-decoration: underline; }

.more-wrap { display: flex; justify-content: center; margin-top: 20px; }
.btn-more {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn-more:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- license ---------- */

.license {
  margin: 56px 0 24px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.license h2 { margin: 0 0 16px; font-size: 22px; }
.license-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.license h3 { margin: 0 0 6px; font-size: 15px; }
.license h3.ok { color: var(--ok); }
.license h3.no { color: var(--no); }
.license ul { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 15px; }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-top: 16px;
  padding-bottom: 40px;
  font-size: 13px;
  color: var(--ink-3);
}
.hint { display: flex; align-items: center; gap: 6px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- theme toggle ---------- */

.theme-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.theme-btn:hover { color: var(--accent); border-color: var(--accent); }
.theme-btn svg { width: 18px; height: 18px; }
/* show the icon of the mode you'd switch TO: moon in light, sun in dark */
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; }
}

/* ---------- header nav ---------- */

.nav { display: flex; gap: 4px; margin-left: auto; flex: none; }
.nav a {
  padding: 7px 12px;
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.nav a.nav-pro { color: var(--accent); }
.top-inner .search { margin-left: 0; }

/* ---------- pricing ---------- */

.price-hero { padding: 56px 0 32px; text-align: center; }
.price-hero .lede { margin-left: auto; margin-right: auto; max-width: 600px; }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 900px; margin: 0 auto; }
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.plan h2 { margin: 0; font-size: 24px; }
.plan h2 small { margin-left: 6px; font-size: 14px; font-weight: 500; color: var(--ink-3); }
.plan-sub { margin: 4px 0 16px; color: var(--ink-2); font-size: 15px; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; color: var(--ink-2); }
.price b { font-size: 48px; line-height: 1; color: var(--ink); letter-spacing: -.02em; }
.price s { font-size: 20px; color: var(--ink-3); }
.price span { margin-left: 4px; font-size: 13px; color: var(--ink-3); }
.plan .btn { width: 100%; }
.btn-ghost {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn:disabled { cursor: not-allowed; opacity: .55; }
.btn-ghost:disabled:hover { border-color: var(--line); color: var(--ink); }
button.btn-primary { border: 0; font: inherit; font-weight: 600; }

.feat { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 15px; }
.feat li { position: relative; padding-left: 28px; }
.feat li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface-2) no-repeat center / 11px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5 5 9l5-6' fill='none' stroke='%23ff5a1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.fine { margin: 18px 0 0; font-size: 12px; color: var(--ink-3); }

.plan-pro { border: 2px solid var(--accent); box-shadow: 0 20px 48px -28px var(--accent); }
.plan-pro .feat li::before { background-color: var(--accent-soft); }
.ribbon {
  position: absolute;
  top: -13px;
  left: 28px;
  padding: 3px 12px;
  border-radius: 99px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 600;
}

/* ---------- plugin showcase ---------- */

.plugin {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  margin: 72px 0 0;
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
}
.plugin h2 { margin: 0 0 16px; font-size: clamp(22px, 3vw, 30px); line-height: 1.3; }
.steps { margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 12px; color: var(--ink-2); font-size: 15px; }
.steps b { display: block; color: var(--ink); }
.apps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.app { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; font-weight: 500; }
.app i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: #00005b; color: #9999ff; font: 700 13px/1 system-ui, sans-serif; font-style: normal; }
.app.ae i { background: #00005b; color: #d291ff; }

.mock {
  padding: 10px;
  border-radius: 14px;
  background: #232323;
  color: #e6e6e6;
  font: 12px/1.4 "IBM Plex Sans Thai", system-ui, sans-serif;
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .5);
  transform: rotate(1.5deg);
}
.mock-bar { display: flex; align-items: center; gap: 5px; padding: 2px 4px 10px; color: #8c8c8c; font-size: 11px; }
.mock-bar i { width: 8px; height: 8px; border-radius: 50%; background: #444; }
.mock-bar span { margin-left: 6px; }
.mock-search { padding: 6px 10px; border: 1px solid #ff6a33; border-radius: 6px; background: #2f2f2f; color: #8c8c8c; }
.mock-search b { color: #e6e6e6; font-weight: 500; }
.mock-chips { display: flex; gap: 4px; margin: 8px 0; }
.mock-chips span { padding: 2px 9px; border: 1px solid #3b3b3b; border-radius: 99px; color: #a8a8a8; font-size: 11px; white-space: nowrap; }
.mock-chips .on { background: #e6e6e6; border-color: #e6e6e6; color: #232323; }
.mock-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 6px; border-radius: 6px; }
.mock-row.playing { background: #2f2f2f; box-shadow: inset 2px 0 0 #ff6a33; }
.mp { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #3b3b3b; font-size: 9px; }
.mock-row.playing .mp { background: #ff6a33; color: #160a05; }
.mock-row b { display: block; font-weight: 600; }
.mw {
  display: block;
  height: 12px;
  margin-top: 3px;
  background: repeating-linear-gradient(90deg, #5c5c5c 0 2px, transparent 2px 4px);
  -webkit-mask: linear-gradient(90deg, #000 0 0) center / 100% 30% no-repeat, radial-gradient(ellipse 50% 100% at 50% 50%, #000 40%, transparent 70%);
  mask: linear-gradient(90deg, #000 0 0) center / 100% 30% no-repeat, radial-gradient(ellipse 50% 100% at 50% 50%, #000 40%, transparent 70%);
}
.mock-row.playing .mw { background: linear-gradient(90deg, #ff6a33 calc(var(--p) * 100%), transparent 0), repeating-linear-gradient(90deg, #5c5c5c 0 2px, transparent 2px 4px); }
.mplus { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #3b3b3b; border-radius: 6px; color: #a8a8a8; }
.mock-status { margin-top: 8px; padding: 6px 4px 2px; border-top: 1px solid #363636; color: #4cc47f; font-size: 11px; }

/* ---------- compare + faq ---------- */

.compare, .faq { max-width: 900px; margin: 72px auto 0; }
.compare h2, .faq h2 { margin: 0 0 16px; font-size: 24px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 12px 16px; text-align: center; border-bottom: 1px solid var(--line); }
th:first-child, td:first-child { text-align: left; }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: 14px; color: var(--ink-2); }
th.pro, td:last-child { color: var(--accent); font-weight: 600; }
td:nth-child(2) { color: var(--ink-2); }
td:first-child { color: var(--ink); font-weight: 400; }

.faq details { border-bottom: 1px solid var(--line); }
.faq summary { padding: 16px 0; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--ink-2); }

.foot a { color: var(--ink-2); }

@media (max-width: 760px) {
  .plans, .plugin { grid-template-columns: 1fr; }
  .plugin { padding: 22px; gap: 28px; }
  .mock { transform: none; }
  .price-hero { padding: 32px 0 24px; }
  .nav a { padding: 6px 8px; font-size: 13px; }
  .nav-hide-sm { display: none; }
}

/* ---------- small screens ---------- */

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding: 32px 0 24px; gap: 24px; }
  .license-cols { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .search kbd, .hint { display: none; }
  .brand .logo { height: 30px; }
}
