.ll-api-docs {
  --ll-api-page-bg: #f7f4fb;
  --ll-api-surface: #ffffff;
  --ll-api-surface-soft: #faf8fc;
  --ll-api-surface-muted: #f2ecf8;
  --ll-api-border: rgba(73, 40, 94, 0.14);
  --ll-api-border-strong: rgba(105, 50, 160, 0.24);
  --ll-api-text: #281b31;
  --ll-api-muted: #6f6078;
  --ll-api-primary: #6d28d9;
  --ll-api-primary-dark: #5420aa;
  --ll-api-primary-soft: #f1e8fc;
  --ll-api-code: #15111b;
  --ll-api-code-text: #f3edf8;
  --ll-api-success: #137647;
  --ll-api-success-bg: #eaf8f0;
  --ll-api-warning: #8a5700;
  --ll-api-warning-bg: #fff7df;
  --ll-api-shadow: 0 16px 40px rgba(48, 28, 63, 0.08);
  width: 100%;
  max-width: 1400px;
  min-width: 0;
  margin: 0 auto;
  color: var(--ll-api-text);
  font-family: Inter, "Noto Sans Thai", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.ll-api-docs *,
.ll-api-docs *::before,
.ll-api-docs *::after {
  box-sizing: border-box;
}

body.ll-blog-api-docs-page {
  background: var(--ll-api-page-bg, #f7f4fb) !important;
}

body.ll-blog-api-docs-page .ll-blog-main--api-docs {
  min-width: 0;
  background: var(--ll-api-page-bg, #f7f4fb);
}

.ll-blog-api-docs-container {
  width: 100%;
  max-width: 1500px;
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2.25rem) clamp(0.75rem, 2.5vw, 2rem) clamp(3rem, 6vw, 5rem);
}

.ll-api-public-container {
  max-width: 1500px;
}

.ll-api-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(270px, 0.72fr);
  gap: clamp(1.25rem, 3vw, 2.4rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 28px;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 111, 159, 0.20), transparent 31%),
    radial-gradient(circle at 87% 12%, rgba(177, 145, 255, 0.28), transparent 34%),
    linear-gradient(135deg, #32106f 0%, #5620bd 52%, #7d38e9 100%);
  color: #fff;
  box-shadow: 0 22px 52px rgba(53, 20, 102, 0.22);
  overflow: hidden;
}

.ll-api-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 300px;
  height: 300px;
  right: -105px;
  bottom: -170px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
  pointer-events: none;
}

.ll-api-hero__content,
.ll-api-summary {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.ll-api-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
}

.ll-api-hero h1 {
  max-width: 760px;
  margin: 0.65rem 0 0.75rem;
  color: #fff;
  font-size: clamp(1.95rem, 4vw, 2.65rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.ll-api-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.90);
  font-size: clamp(0.94rem, 1.5vw, 1rem);
  line-height: 1.75;
}

.ll-api-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.3rem;
}

.ll-api-button,
.ll-api-tabs button,
.ll-api-copy {
  min-height: 44px;
  border: 1px solid var(--ll-api-border);
  border-radius: 12px;
  background: var(--ll-api-surface);
  color: var(--ll-api-text);
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.ll-api-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1rem;
  text-decoration: none !important;
}

.ll-api-hero .ll-api-button {
  border-color: rgba(255, 255, 255, 0.88);
  background: #fff;
  color: #4d1b9d;
}

.ll-api-hero .ll-api-button--primary {
  border-color: #fff;
  background: #fff;
  color: #4d1b9d;
  box-shadow: 0 10px 24px rgba(31, 10, 74, 0.18);
}

.ll-api-button:hover,
.ll-api-tabs button:hover,
.ll-api-copy:hover {
  transform: translateY(-1px);
  border-color: var(--ll-api-border-strong);
  box-shadow: 0 8px 20px rgba(45, 25, 58, 0.12);
}

.ll-api-hero .ll-api-button:hover,
.ll-api-hero .ll-api-button:focus {
  border-color: #fff;
  background: #f7f0ff;
  color: #3f157f;
}

.ll-api-button:focus-visible,
.ll-api-tabs button:focus-visible,
.ll-api-copy:focus-visible,
.ll-api-select:focus-visible,
.ll-api-toc a:focus-visible {
  outline: 3px solid rgba(139, 78, 225, 0.36);
  outline-offset: 2px;
}

.ll-api-summary {
  display: grid;
  gap: 0.7rem;
  align-content: start;
  margin: 0;
}

.ll-api-summary > div {
  min-width: 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(34, 12, 76, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ll-api-summary dt {
  margin-bottom: 0.2rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  line-height: 1.4;
  text-transform: uppercase;
}

.ll-api-summary dd {
  margin: 0;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.55;
}

.ll-api-summary code {
  color: #fff;
  background: rgba(0, 0, 0, 0.20);
}

.ll-api-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
  align-items: start;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.ll-api-toc {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 0.28rem;
  min-width: 0;
  max-width: 100%;
  padding: 1rem;
  border: 1px solid var(--ll-api-border);
  border-radius: 18px;
  background: var(--ll-api-surface);
  box-shadow: var(--ll-api-shadow);
}

.ll-api-toc strong {
  padding: 0.3rem 0.55rem 0.7rem;
  color: var(--ll-api-text);
  font-size: 0.92rem;
}

.ll-api-toc a {
  padding: 0.62rem 0.7rem;
  border-radius: 10px;
  color: var(--ll-api-muted);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
}

.ll-api-toc a:hover,
.ll-api-toc a.is-active {
  background: var(--ll-api-primary-soft);
  color: var(--ll-api-primary-dark);
}

.ll-api-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  min-width: 0;
  max-width: 100%;
}

.ll-api-card {
  scroll-margin-top: 100px;
  min-width: 0;
  padding: clamp(1rem, 2.6vw, 1.65rem);
  border: 1px solid var(--ll-api-border);
  border-radius: 22px;
  background: var(--ll-api-surface);
  box-shadow: var(--ll-api-shadow);
}

.ll-api-card__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  min-width: 0;
  margin-bottom: 1rem;
}

.ll-api-card__heading > div {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  min-width: 0;
}

.ll-api-section-number {
  display: inline-grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--ll-api-primary-soft);
  color: var(--ll-api-primary-dark);
  font-size: 0.88rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.ll-api-card h2 {
  min-width: 0;
  margin: 0;
  color: var(--ll-api-text);
  font-size: clamp(1.18rem, 2.4vw, 1.45rem);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ll-api-card h3 {
  margin: 1.3rem 0 0.65rem;
  color: var(--ll-api-text);
  font-size: clamp(0.98rem, 1.7vw, 1.06rem);
  font-weight: 700;
  line-height: 1.45;
}

.ll-api-card p,
.ll-api-card li,
.ll-api-table-wrap th,
.ll-api-table-wrap td {
  font-size: 0.94rem;
}

.ll-api-card p {
  color: var(--ll-api-muted);
  line-height: 1.75;
}

.ll-api-method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0.25rem 0.65rem;
  border: 1px solid rgba(19, 118, 71, 0.15);
  border-radius: 999px;
  background: var(--ll-api-success-bg);
  color: var(--ll-api-success);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.3;
}

.ll-api-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  min-width: 0;
  padding: 1rem;
  margin: 1rem 0;
  border: 1px solid var(--ll-api-border);
  border-radius: 14px;
  background: var(--ll-api-surface-soft);
}

.ll-api-callout > i {
  flex: 0 0 auto;
  margin-top: 0.2rem;
  color: var(--ll-api-primary);
}

.ll-api-callout > div {
  min-width: 0;
}

.ll-api-callout strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--ll-api-text);
}

.ll-api-callout p {
  margin: 0;
}

.ll-api-callout--warning {
  border-color: rgba(173, 111, 0, 0.24);
  background: var(--ll-api-warning-bg);
}

.ll-api-callout--warning > i,
.ll-api-callout--warning strong {
  color: var(--ll-api-warning);
}

.ll-api-grid {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.ll-api-grid > * {
  min-width: 0;
}

.ll-api-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ll-api-info {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--ll-api-border);
  border-radius: 14px;
  background: var(--ll-api-surface-soft);
}

.ll-api-info p {
  margin: 0.35rem 0 0;
}

.ll-api-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 0.65rem;
}

.ll-api-tabs button {
  min-height: 42px;
  padding: 0.55rem 0.85rem;
  background: var(--ll-api-surface-soft);
  color: var(--ll-api-muted);
}

.ll-api-tabs button.is-active {
  border-color: var(--ll-api-primary);
  background: var(--ll-api-primary);
  color: #fff;
}

.ll-api-code-panel {
  position: relative;
  min-width: 0;
  max-width: 100%;
  margin: 0.65rem 0 1rem;
}

.ll-api-code-panel[hidden] {
  display: none !important;
}

.ll-api-code-panel pre {
  max-width: 100%;
  max-height: 520px;
  margin: 0;
  padding: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: var(--ll-api-code);
  color: var(--ll-api-code-text);
  overflow: auto;
  font-size: 0.84rem;
  line-height: 1.65;
  white-space: pre;
  tab-size: 2;
  -webkit-overflow-scrolling: touch;
}

.ll-api-code-panel code {
  padding: 0;
  background: transparent;
  color: inherit;
  white-space: inherit;
}

.ll-api-copy {
  position: absolute;
  z-index: 2;
  top: 0.65rem;
  right: 0.65rem;
  min-height: 36px;
  padding: 0.4rem 0.7rem;
  border-color: rgba(255, 255, 255, 0.16);
  background: #30273a;
  color: #fff;
  font-size: 0.76rem;
}

.ll-api-copy:hover,
.ll-api-copy:focus {
  border-color: rgba(255, 255, 255, 0.28);
  background: #45374f;
  color: #fff;
}

.ll-api-copy.is-copied {
  background: #176b45;
}

.ll-api-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--ll-api-border);
  border-radius: 14px;
  background: var(--ll-api-surface);
  -webkit-overflow-scrolling: touch;
}

.ll-api-table-wrap table {
  width: 100%;
  min-width: 620px;
  margin: 0;
  border-collapse: collapse;
  background: var(--ll-api-surface);
  color: var(--ll-api-text);
}

.ll-api-table-wrap th,
.ll-api-table-wrap td {
  padding: 0.75rem 0.88rem;
  border-bottom: 1px solid var(--ll-api-border);
  color: var(--ll-api-text);
  line-height: 1.55;
  text-align: left;
  vertical-align: top;
}

.ll-api-table-wrap tbody td {
  color: var(--ll-api-muted);
}

.ll-api-table-wrap tbody th {
  font-weight: 700;
}

.ll-api-table-wrap tr:last-child th,
.ll-api-table-wrap tr:last-child td {
  border-bottom: 0;
}

.ll-api-table-wrap thead th {
  background: var(--ll-api-surface-muted);
  color: #493654;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.ll-api-docs code {
  max-width: 100%;
  padding: 0.12rem 0.35rem;
  border-radius: 6px;
  background: var(--ll-api-primary-soft);
  color: #4d1d91;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.ll-api-field-label {
  display: block;
  margin: 1.3rem 0 0.45rem;
  color: var(--ll-api-text);
  font-size: 0.94rem;
  font-weight: 700;
}

.ll-api-select {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 2.6rem 0.65rem 0.85rem;
  border: 1px solid var(--ll-api-border);
  border-radius: 12px;
  background: var(--ll-api-surface);
  color: var(--ll-api-text);
  font: inherit;
}

.ll-api-select:hover {
  border-color: var(--ll-api-border-strong);
}

.ll-api-service-type {
  min-width: 0;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--ll-api-border);
  border-radius: 16px;
  background: var(--ll-api-surface-soft);
}

.ll-api-service-type[hidden] {
  display: none !important;
}

.ll-api-service-type h3 {
  margin-top: 0;
}

.ll-api-checklist {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ll-api-checklist li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--ll-api-muted);
  line-height: 1.65;
}

.ll-api-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.08rem;
  display: grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--ll-api-success-bg);
  color: var(--ll-api-success);
  font-size: 0.78rem;
  font-weight: 800;
}

html.ll-api-theme-dark .ll-api-docs {
  --ll-api-page-bg: #100c16;
  --ll-api-surface: #1c1622;
  --ll-api-surface-soft: #241c2b;
  --ll-api-surface-muted: #2d2335;
  --ll-api-border: rgba(238, 221, 248, 0.14);
  --ll-api-border-strong: rgba(190, 139, 239, 0.34);
  --ll-api-text: #f5eef8;
  --ll-api-muted: #c4b6ca;
  --ll-api-primary: #aa7deb;
  --ll-api-primary-dark: #d3b2ff;
  --ll-api-primary-soft: rgba(151, 93, 220, 0.18);
  --ll-api-code: #0c0910;
  --ll-api-code-text: #f1eaf5;
  --ll-api-success: #73d4a2;
  --ll-api-success-bg: rgba(36, 141, 88, 0.18);
  --ll-api-warning: #ffd07a;
  --ll-api-warning-bg: rgba(161, 104, 10, 0.18);
  --ll-api-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
}

html.ll-api-theme-dark body.ll-blog-api-docs-page,
html.ll-api-theme-dark body.ll-blog-api-docs-page .ll-blog-main--api-docs {
  background: #100c16 !important;
}

html.ll-api-theme-dark .ll-api-hero {
  border-color: rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 94, 150, 0.16), transparent 31%),
    radial-gradient(circle at 87% 12%, rgba(177, 145, 255, 0.21), transparent 34%),
    linear-gradient(135deg, #24104b 0%, #47208d 54%, #6630b4 100%);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.30);
}

html.ll-api-theme-dark .ll-api-summary > div {
  background: rgba(12, 7, 22, 0.46);
}

html.ll-api-theme-dark .ll-api-table-wrap thead th {
  color: #e2d5e7;
}

html.ll-api-theme-dark .ll-api-docs code {
  color: #dabcfb;
}

html.ll-api-theme-dark .ll-api-select {
  color-scheme: dark;
}

html.ll-api-theme-dark .ll-api-select option {
  background: #1c1622;
  color: #f5eef8;
}

@media (max-width: 1199.98px) {
  .ll-api-layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }
}

@media (max-width: 991.98px) {
  .ll-api-hero {
    grid-template-columns: minmax(0, 1fr);
    border-radius: 24px;
  }

  .ll-api-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .ll-api-toc {
    position: static;
    display: flex;
    max-width: 100%;
    overflow-x: auto;
    padding: 0.65rem;
    white-space: nowrap;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .ll-api-toc strong {
    display: none;
  }

  .ll-api-toc a {
    flex: 0 0 auto;
  }
}

@media (max-width: 767.98px) {
  .ll-blog-api-docs-container {
    padding-top: 1rem;
    padding-right: max(0.75rem, env(safe-area-inset-right));
    padding-left: max(0.75rem, env(safe-area-inset-left));
  }

  .ll-api-hero {
    padding: 1.25rem;
    border-radius: 21px;
  }

  .ll-api-hero__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .ll-api-button {
    width: 100%;
  }

  .ll-api-grid--two {
    grid-template-columns: minmax(0, 1fr);
  }

  .ll-api-card__heading {
    align-items: flex-start;
  }

  .ll-api-card__heading > div {
    align-items: flex-start;
  }

  .ll-api-method {
    margin-top: 0.2rem;
  }

  .ll-api-callout {
    padding: 0.9rem;
  }

  .ll-api-table-wrap table {
    min-width: 560px;
  }

  .ll-api-code-panel pre {
    font-size: 0.78rem;
  }
}

@media (max-width: 575.98px) {
  .ll-api-card {
    padding: 1rem;
    border-radius: 18px;
  }

  .ll-api-card__heading {
    flex-wrap: wrap;
  }

  .ll-api-section-number {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
  }

  .ll-api-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ll-api-tabs button {
    min-width: 0;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
  }

  .ll-api-copy {
    position: static;
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .ll-api-table-wrap table {
    min-width: 520px;
  }
}

@media (max-width: 359.98px) {
  .ll-api-tabs {
    grid-template-columns: minmax(0, 1fr);
  }

  .ll-api-card,
  .ll-api-hero {
    padding-right: 0.85rem;
    padding-left: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ll-api-docs *,
  .ll-api-docs *::before,
  .ll-api-docs *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
