@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrains_Mono/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Baloo 2";
  src: url("fonts/Baloo_2/Baloo2-ExtraBold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --highlight-color: #1d4ed8;
  --highlight-color-dark: #8fb4ff;
  --radius: 12px;
  --bg: #eef5ff;
  --text: #0f172a;
  --code-bg: #f1f7ff;
  --code-text: #0f172a;
  --notice-bg: #fff8e8;
  --notice-text: #a16207;
  --notice-border: rgba(234, 179, 8, 0.24);
  --panel-bg: rgba(255, 255, 255, 0.70);
  --panel-border: rgba(147, 197, 253, 0.64);
  --panel-shadow: 0 8px 18px rgba(30, 64, 175, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  --button-bg: rgba(255, 255, 255, 0.74);
  --button-border: rgba(147, 197, 253, 0.54);
  --button-shadow: 0 4px 10px rgba(37, 99, 235, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  --copy-size: 40px;
  --copy-radius: 13px;
  --copy-icon-size: 18px;
  --copy-bg: #f9fbff;
  --copy-border: #d6dceb;
  --copy-color: #5f6c84;
  --copy-hover-bg: #f7faff;
  --copy-hover-border: #8faaf1;
  --copy-hover-color: #2f5ed9;
  --copy-success-bg: #f2fbf5;
  --copy-success-border: #9bcfb0;
  --copy-success-color: #218b4f;
  --copy-error-bg: #fff4f4;
  --copy-error-border: #e7bbbb;
  --copy-error-color: #cf5e5e;
  --motion-fast: 0.16s;
  --motion-normal: 0.28s;
  --ease-emphasized: cubic-bezier(0.22, 1, 0.36, 1);
}


[data-theme="dark"] {
  --highlight-color: var(--highlight-color-dark);
  --bg: #0b1220;
  --text: #e5edf9;
  --code-bg: #0f172a;
  --code-text: #f8fafc;
  --notice-bg: rgba(113, 63, 18, 0.20);
  --notice-text: #fde68a;
  --notice-border: rgba(250, 204, 21, 0.34);
  --panel-bg: rgba(17, 24, 39, 0.88);
  --panel-border: rgba(96, 165, 250, 0.30);
  --panel-shadow: 0 10px 24px rgba(2, 6, 23, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --button-bg: rgba(15, 23, 42, 0.92);
  --button-border: rgba(147, 197, 253, 0.34);
  --button-shadow: 0 4px 10px rgba(2, 6, 23, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --copy-bg: rgba(15, 23, 42, 0.96);
  --copy-border: rgba(148, 163, 184, 0.32);
  --copy-color: #cbd5e1;
  --copy-hover-bg: #243247;
  --copy-hover-border: rgba(96, 165, 250, 0.76);
  --copy-hover-color: #93c5fd;
  --copy-success-bg: #183527;
  --copy-success-border: rgba(74, 222, 128, 0.58);
  --copy-success-color: #86efac;
  --copy-error-bg: #3a1e29;
  --copy-error-border: rgba(251, 113, 133, 0.58);
  --copy-error-color: #fda4af;
}

* {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: 'Noto Sans SC', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.5;
  background: radial-gradient(circle at 18% 0%, rgba(219, 234, 254, 0.62), transparent 34%), linear-gradient(180deg, #f7fbff 0%, #eef5ff 48%, #edf4ff 100%);
}

html.theme-transition-lock *,
html.theme-transition-lock *::before,
html.theme-transition-lock *::after {
  transition: none;
  animation: none;
}

[data-theme="dark"] body {
  background: radial-gradient(circle at 50% -12%, rgba(37, 99, 235, 0.10), transparent 32%), linear-gradient(180deg, #0b1220 0%, #101827 48%, #0b1220 100%);
}

html,
body {
  overflow-x: clip;
}

@supports not (overflow: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}

a {
  color: var(--highlight-color);
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1000px, calc(100% - 36px));
  margin: 20px auto;
  padding: 28px;
}

.domain-notice[hidden],
.pagination[hidden] {
  display: none;
}

.domain-notice:not([hidden]) + .container {
  margin-top: 0;
  padding-top: 12px;
}

.domain-notice {
  position: sticky;
  top: 0;
  z-index: 999;
  color: var(--text);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.domain-notice__inner {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.domain-notice__icon,
.domain-notice__close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.domain-notice__icon {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  color: var(--highlight-color);
  background: rgba(37, 99, 235, 0.10);
  font-weight: 700;
}

.domain-notice__text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  line-height: 2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.domain-notice__text strong {
  color: var(--text);
  font-weight: 700;
}

.domain-notice__close {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 10px;
  color: rgba(17, 24, 39, 0.75);
  background: rgba(255, 255, 255, 0.60);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.domain-notice__close:hover {
  background: rgba(255, 255, 255, 0.92);
}

.header {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  min-height: 64px;
  margin: 0 0 18px;
  padding: 12px 22px;
  position: relative;
  overflow: visible;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 18px rgba(30, 64, 175, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
}

[data-theme="dark"] .header {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(96, 165, 250, 0.30);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
  gap: 10px;
}

.prompt-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  color: var(--highlight-color);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.08em;
}

.header h1,
.header .site-title {
  position: relative;
  margin: 0;
  color: var(--highlight-color);
  font-family: 'Baloo 2', 'Noto Sans SC', system-ui, sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
}

.site-title-link {
  display: inline-block;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.site-title-link:hover {
  text-decoration: none;
}

.brand-y {
  position: absolute;
  top: -9px;
  right: -17px;
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(147, 197, 253, 0.72);
  border-radius: 999px;
  color: color-mix(in srgb, var(--highlight-color) 82%, #60a5fa 18%);
  background: rgba(219, 234, 254, 0.74);
  font-family: 'Baloo 2', 'Noto Sans SC', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.08);
  pointer-events: none;
}
.brand-y-letter {
  display: block;
  line-height: 1;
  transform: translate(-0.6px, 1px);
}

[data-theme="dark"] .brand-y {
  color: #93c5fd;
  background: rgba(30, 41, 59, 0.88);
  border-color: rgba(147, 197, 253, 0.32);
}

.header .nav-links {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex: 1 1 auto;
  min-width: 0;
  margin-left: clamp(28px, 5vw, 56px);
  margin-right: 12px;
  gap: 22px;
  white-space: nowrap;
}

.header .nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 34px;
  padding: 3px 2px 7px;
  color: color-mix(in srgb, var(--highlight-color) 88%, #0f172a 12%);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.95;
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

.header .nav-links a:hover,
.header .nav-links a:focus-visible {
  color: var(--highlight-color);
  opacity: 1;
}

.nav-link__icon,
.ui-icon,
.search-icon svg,
.theme-icon svg {
  display: block;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.header-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 10px;
  margin-left: auto;
  position: relative;
  isolation: isolate;
}

.search-container,
.theme-toggle {
  inline-size: 40px;
  min-inline-size: 40px;
  block-size: 40px;
  padding: 0;
  border: 1px solid var(--button-border);
  border-radius: 14px;
  color: var(--highlight-color);
  background: var(--button-bg);
  box-shadow: var(--button-shadow);
}

.search-container {
  --search-button-size: 40px;
  --search-expand-width: clamp(136px, 15vw, 172px);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  overflow: hidden;
  cursor: text;
  transform: translateY(0) scale(1);
  will-change: inline-size;
  transition:
    inline-size var(--motion-normal) var(--ease-emphasized),
    transform var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    background-color var(--motion-fast) ease,
    border-color var(--motion-fast) ease;
}

.search-container:hover,
.search-container.is-expanded,
.search-container:focus-within,
.theme-toggle:hover {
  border-color: rgba(96, 165, 250, 0.82);
  background: rgba(248, 251, 255, 0.94);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

[data-theme="dark"] .search-container:hover,
[data-theme="dark"] .search-container.is-expanded,
[data-theme="dark"] .search-container:focus-within,
[data-theme="dark"] .theme-toggle:hover {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.98);
  border-color: rgba(96, 165, 250, 0.48);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.34);
}

.search-container:not(.is-expanded):not(:focus-within):hover {
  transform: translateY(-1px) scale(1.04);
}

.search-container.is-expanded,
.search-container:focus-within {
  inline-size: var(--search-expand-width);
  transform: none;
}

.search-icon {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--search-button-size);
  height: var(--search-button-size);
  flex: 0 0 var(--search-button-size);
  color: currentColor;
  pointer-events: none;
}

#search-input {
  inline-size: 0;
  min-inline-size: 0;
  block-size: var(--search-button-size);
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition:
    inline-size 0.24s var(--ease-emphasized),
    opacity 0.18s ease;
}

.search-container.is-expanded #search-input,
.search-container:focus-within #search-input {
  inline-size: calc(100% - var(--search-button-size));
  flex: 1 1 auto;
  padding: 0 12px 0 0;
  opacity: 1;
  pointer-events: auto;
}

#search-input::placeholder {
  color: color-mix(in srgb, var(--text) 48%, transparent);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0;
  line-height: 0;
  transition:
    transform var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    background-color var(--motion-fast) ease,
    border-color var(--motion-fast) ease;
}

.theme-toggle:hover {
  transform: translateY(-1px) scale(1.04);
}

.theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  color: currentColor;
}

.theme-toggle .ui-icon-moon {
  transform-box: fill-box;
  transform-origin: center;
  transform: translate(0.5px, -0.45px);
}

.theme-toggle[data-icon="sun"] .theme-icon svg {
  width: 20px;
  height: 20px;
}

.notice {
  display: block;
  min-height: 0;
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid var(--notice-border);
  border-left: 4px solid color-mix(in srgb, var(--notice-text) 38%, transparent);
  border-radius: var(--radius);
  color: var(--notice-text);
  background: color-mix(in srgb, var(--notice-bg) 68%, var(--bg) 32%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.65;
}

.notice strong,
.notice em {
  font-weight: 700;
}

.notice span,
.notice em {
  color: color-mix(in srgb, var(--notice-text) 90%, var(--text) 10%);
}

.notice em {
  font-style: normal;
}

.step {
  margin-bottom: 24px;
}

.no-results {
  display: none;
  width: fit-content;
  margin: 28px auto 0px;

  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 14px 22px;
  color: #6b7280;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed #bcd7ff;
  border-radius: 14px;
}

.load-error {
  width: fit-content;
  margin: 28px auto;
  padding: 14px 22px;
  color: var(--copy-error-color);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  background: var(--copy-error-bg);
  border: 1px solid var(--copy-error-border);
  border-radius: 14px;
}

#scripts-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 20px;
}

.script-block {
  --script-category-color: #047857;
  --script-category-bg: #ecfdf5;
  --script-category-border: rgba(4, 120, 87, 0.28);
  --script-category-hover-border: rgba(4, 120, 87, 0.64);
  display: none;
  min-width: 0;
  margin: 0;
  opacity: 0;
}

.script-block[data-category="software"] {
  --script-category-color: #1d4ed8;
  --script-category-bg: #eff6ff;
  --script-category-border: rgba(29, 78, 216, 0.28);
  --script-category-hover-border: rgba(29, 78, 216, 0.64);
}

.script-block[data-category="system"] {
  --script-category-color: #6d28d9;
  --script-category-bg: #f5f3ff;
  --script-category-border: rgba(109, 40, 217, 0.28);
  --script-category-hover-border: rgba(109, 40, 217, 0.64);
}

.script-block[data-category="tool"] {
  --script-category-color: #047857;
  --script-category-bg: #ecfdf5;
  --script-category-border: rgba(4, 120, 87, 0.28);
  --script-category-hover-border: rgba(4, 120, 87, 0.64);
}

[data-theme="dark"] .script-block[data-category="software"] {
  --script-category-color: #93c5fd;
  --script-category-bg: rgba(37, 99, 235, 0.10);
  --script-category-border: rgba(96, 165, 250, 0.24);
  --script-category-hover-border: rgba(147, 197, 253, 0.54);
}

[data-theme="dark"] .script-block[data-category="system"] {
  --script-category-color: #c4b5fd;
  --script-category-bg: rgba(124, 58, 237, 0.11);
  --script-category-border: rgba(167, 139, 250, 0.25);
  --script-category-hover-border: rgba(196, 181, 253, 0.54);
}

[data-theme="dark"] .script-block[data-category="tool"] {
  --script-category-color: #6ee7b7;
  --script-category-bg: rgba(5, 150, 105, 0.10);
  --script-category-border: rgba(52, 211, 153, 0.25);
  --script-category-hover-border: rgba(110, 231, 183, 0.54);
}

[data-theme="dark"] .script-card__icon--software,
[data-theme="dark"] .script-card__category--software,
[data-theme="dark"] .script-detail-popover__icon.script-card__icon--software {
  --script-category-color: #93c5fd;
  --script-category-bg: rgba(37, 99, 235, 0.10);
  --script-category-border: rgba(96, 165, 250, 0.24);
}

[data-theme="dark"] .script-card__icon--system,
[data-theme="dark"] .script-card__category--system,
[data-theme="dark"] .script-detail-popover__icon.script-card__icon--system {
  --script-category-color: #c4b5fd;
  --script-category-bg: rgba(124, 58, 237, 0.11);
  --script-category-border: rgba(167, 139, 250, 0.25);
}

[data-theme="dark"] .script-card__icon--tool,
[data-theme="dark"] .script-card__category--tool,
[data-theme="dark"] .script-detail-popover__icon.script-card__icon--tool {
  --script-category-color: #6ee7b7;
  --script-category-bg: rgba(5, 150, 105, 0.10);
  --script-category-border: rgba(52, 211, 153, 0.25);
}

.script-block.show {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  color: var(--text);
  background: var(--panel-bg);
  box-shadow: var(--panel-shadow);
  opacity: 1;
  transform: none;
  transition:
    border-color var(--motion-fast) ease,
    transform var(--motion-fast) ease;
}

.script-block.show:hover {
  border-color: var(--script-category-hover-border);
  box-shadow: var(--panel-shadow);
  transform: translateY(-1px);
}

[data-theme="dark"] .script-block.show:hover {
  border-color: var(--script-category-hover-border);
  box-shadow: var(--panel-shadow);
}

.script-card__header {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.script-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 1px solid var(--script-category-border, rgba(191, 219, 254, 0.78));
  border-radius: 16px;
  color: var(--script-category-color, #2563eb);
  background: var(--script-category-bg, #f8fbff);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

[data-theme="dark"] .script-card__icon {
  color: var(--script-category-color, #93c5fd);
  background: color-mix(in srgb, var(--script-category-bg, rgba(37, 99, 235, 0.10)) 72%, rgba(15, 23, 42, 0.92) 28%);
  border-color: var(--script-category-border, rgba(147, 197, 253, 0.24));
}

.script-card__icon img {
  display: block;
  width: 40px;
  height: 40px;
  color: currentColor;
}

.script-card__title-group {
  min-width: 0;
  padding-top: 2px;
  overflow: hidden;
}

.script-card__title-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.script-block h2.script-title__text {
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: #1d4ed8;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
}

[data-theme="dark"] .script-block h2.script-title__text {
  color: #93c5fd;
}

.tag {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  position: relative;
  vertical-align: middle;
}

.tag > * {
  grid-area: 1 / 1;
}

.tag img {
  display: block;
  width: auto;
  height: 17px;
}

.tag__label {
  color: #fff;
  font-family: Arial, 'Helvetica Neue', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  transform: translateY(0.45px);
  pointer-events: none;
  user-select: none;
}

.script-block .code-comment {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  margin-top: 4px;
  overflow: hidden;
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
  white-space: nowrap;
}

[data-theme="dark"] .script-block .code-comment {
  color: #a8b5c7;
}

.code-comment__preview {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
}

.code-comment__ellipsis {
  flex: 0 0 auto;
  margin-left: 1px;
}

.code-comment__more {
  flex: 0 0 auto;
  margin-left: 4px;
  padding: 0;
  border: 0;
  color: var(--highlight-color);
  background: transparent;
  font: inherit;
  font-weight: 700;
  line-height: inherit;
  cursor: pointer;
  text-decoration: none;
}

.code-comment__more:hover,
.code-comment__more:focus-visible {
  color: color-mix(in srgb, var(--highlight-color) 86%, #0f172a 14%);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.script-card__category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 28px;
  padding: 0 12px;
  box-sizing: border-box;
  border: 1px solid var(--script-category-color, #047857);
  border-radius: 999px;
  color: #fff;
  background: var(--script-category-color, #047857);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.script-card__icon--software,
.script-card__category--software,
.script-detail-popover__icon.script-card__icon--software {
  --script-category-color: #2563eb;
  --script-category-bg: #eff6ff;
  --script-category-border: rgba(147, 197, 253, 0.60);
}

.script-card__icon--system,
.script-card__category--system,
.script-detail-popover__icon.script-card__icon--system {
  --script-category-color: #7c3aed;
  --script-category-bg: #f5f3ff;
  --script-category-border: rgba(196, 181, 253, 0.62);
}

.script-card__icon--tool,
.script-card__category--tool,
.script-detail-popover__icon.script-card__icon--tool {
  --script-category-color: #047857;
  --script-category-bg: #ecfdf5;
  --script-category-border: rgba(110, 231, 183, 0.62);
}

[data-theme="dark"] .script-card__category {
  color: var(--script-category-color, #bfdbfe);
  background: var(--script-category-bg, rgba(37, 99, 235, 0.12));
  border-color: var(--script-category-border, rgba(96, 165, 250, 0.26));
  box-shadow: none;
}

.script-block .code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  margin: 8px 0 0;
  padding: 10px 14px 10px 16px;
  border: 1px solid rgba(96, 165, 250, 0.46);
  border-radius: 16px;
  color: var(--code-text);
  background: var(--code-bg);
  box-shadow: none;
  transition: none;
}

[data-theme="dark"] .script-block .code-row {
  border-color: rgba(96, 165, 250, 0.26);
}

.script-block .code-block {
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0 0 2px;
  overflow-x: auto;
  overflow-y: hidden;
  color: var(--code-text);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  white-space: nowrap;
  text-overflow: clip;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
  overscroll-behavior-inline: contain;
}

.code-block::-webkit-scrollbar {
  height: 6px;
}

.code-block::-webkit-scrollbar-track {
  background: transparent;
}

.code-block::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--highlight-color) 28%, transparent);
}

.copy-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 var(--copy-size);
  align-self: center;
  margin: 0 0 0 2px;
  overflow: visible;
}

.copy-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.copy-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--copy-size);
  height: var(--copy-size);
  padding: 0;
  border: 1px solid var(--copy-border);
  border-radius: var(--copy-radius);
  color: var(--copy-color);
  background: var(--copy-bg);
  box-shadow: 0 1px 2px rgba(31, 45, 93, 0.08);
  cursor: pointer;
  transform: translateY(0) scale(1);
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 180ms cubic-bezier(0.22, 1, 0.36, 1), background-color 180ms cubic-bezier(0.22, 1, 0.36, 1), border-color 180ms cubic-bezier(0.22, 1, 0.36, 1), color 180ms cubic-bezier(0.22, 1, 0.36, 1), opacity 180ms cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-tap-highlight-color: transparent;
}

.copy-btn:not(.is-success):not(.is-error):not(.is-pending):hover {
  color: var(--copy-hover-color);
  background: var(--copy-hover-bg);
  border-color: var(--copy-hover-border);
  box-shadow: 0 3px 8px rgba(47, 95, 225, 0.10);
  transform: translateY(-0.5px) scale(1.012);
}

.copy-btn:not(.is-success):not(.is-error):not(.is-pending):active {
  transform: translateY(0.5px) scale(0.985);
}

.copy-btn.is-pending {
  color: var(--copy-hover-color);
  background: var(--copy-hover-bg);
  border-color: var(--copy-hover-border);
}

.copy-btn.is-success {
  color: var(--copy-success-color);
  background: var(--copy-success-bg);
  border-color: var(--copy-success-border);
}

.copy-btn.is-error {
  color: var(--copy-error-color);
  background: var(--copy-error-bg);
  border-color: var(--copy-error-border);
}

.copy-btn__icon {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--copy-icon-size);
  height: var(--copy-icon-size);
  margin: auto;
  transition: transform 140ms cubic-bezier(0.22, 1, 0.36, 1), opacity 140ms cubic-bezier(0.22, 1, 0.36, 1);
}

.copy-btn__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.05;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.copy-btn__icon--copy {
  opacity: 1;
  transform: scale(1);
}

.copy-btn__icon--success,
.copy-btn__icon--error {
  opacity: 0;
  transform: scale(0.86);
}

.copy-btn.is-success .copy-btn__icon--copy,
.copy-btn.is-success .copy-btn__icon--error,
.copy-btn.is-error .copy-btn__icon--copy,
.copy-btn.is-error .copy-btn__icon--success {
  opacity: 0;
  transform: scale(0.86);
}

.copy-btn.is-success .copy-btn__icon--success,
.copy-btn.is-error .copy-btn__icon--error {
  opacity: 1;
  transform: scale(1);
}

.copy-btn__status-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #22a55b;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.72);
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1), opacity 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .copy-btn__status-dot {
  border-color: #0b1220;
}

.copy-btn__status-dot svg {
  width: 8px;
  height: 8px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.copy-btn.is-success .copy-btn__status-dot {
  opacity: 1;
  transform: scale(1);
}

.copy-btn__error-tip {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 20;
  max-width: min(260px, calc(100vw - 24px));
  padding: 6px 10px;
  border: 1px solid rgba(239, 192, 192, 1);
  border-radius: 10px;
  color: #c65252;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  white-space: normal;
  transform: translateY(6px) scale(0.96);
  transform-origin: right bottom;
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1), opacity 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.copy-btn__error-arrow {
  position: absolute;
  right: calc(var(--copy-size) / 2 - 4px);
  top: 100%;
  width: 8px;
  height: 8px;
  border-right: 1px solid rgba(239, 192, 192, 1);
  border-bottom: 1px solid rgba(239, 192, 192, 1);
  background: inherit;
  transform: translateY(-50%) rotate(45deg);
}

.copy-action.is-error .copy-btn__error-tip {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toolbar-row {
  display: flex;
  justify-content: center;
  margin: 22px 0 0;
}

.toolbar-row--bottom {
  margin-top: 6px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(148, 163, 184, 0.48);
  border-radius: 11px;
  color: #1d4ed8;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 8px 16px rgba(30, 64, 175, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.page-btn svg {
  width: 14px;
  height: 14px;
  display: block;
  margin: 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-btn:hover:not(.disabled):not(.active) {
  color: var(--highlight-color);
  background: #fff;
  border-color: rgba(37, 99, 235, 0.38);
  box-shadow: 0 11px 22px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.page-btn.active {
  color: #fff;
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
  cursor: default;
}

.page-btn.disabled {
  color: color-mix(in srgb, #1d4ed8 54%, transparent);
  background: color-mix(in srgb, #dbeafe 54%, var(--bg) 46%);
  border-color: transparent;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.4;
}

[data-theme="dark"] .page-btn {
  color: #bfdbfe;
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(96, 165, 250, 0.24);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.26);
}

[data-theme="dark"] .page-btn:hover:not(.disabled):not(.active) {
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.98);
  border-color: rgba(96, 165, 250, 0.44);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.32);
}

[data-theme="dark"] .page-btn.active {
  color: #fff;
  background: #2563eb;
  border-color: #3b82f6;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.26);
}

[data-theme="dark"] .page-btn.disabled {
  color: rgba(191, 219, 254, 0.36);
  background: rgba(15, 23, 42, 0.48);
  border-color: rgba(96, 165, 250, 0.14);
  box-shadow: none;
}

.changelog {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid rgba(147, 197, 253, 0.54);
  border-radius: 24px;
  background: var(--panel-bg);
  box-shadow: 0 12px 28px rgba(30, 64, 175, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

[data-theme="dark"] .changelog {
  box-shadow: var(--panel-shadow);
}

.changelog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(147, 197, 253, 0.36);
}

.changelog h2 {
  margin: 0;
  color: #1d4ed8;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
}

[data-theme="dark"] .changelog h2 {
  color: #93c5fd;
}

.changelog__list {
  position: relative;
  display: grid;
  gap: 20px;
}

.changelog__list::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 14px;
  bottom: 12px;
  width: 1px;
  background: rgba(147, 197, 253, 0.72);
}

[data-theme="dark"] .changelog__list::before {
  background: rgba(96, 165, 250, 0.30);
}

.changelog__entry {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.changelog__meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.changelog__meta-main {
  display: flex;
  align-items: center;
}

.changelog__dot {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  margin: 4px 0 0 5px;
  border-radius: 999px;
  background: #94a3b8;
  box-shadow: 0 0 0 7px #eef6ff;
}

.changelog__entry.is-primary .changelog__dot {
  background: #2563eb;
  box-shadow: 0 0 0 7px #dbeafe;
}

[data-theme="dark"] .changelog__dot {
  box-shadow: 0 0 0 7px rgba(30, 41, 59, 0.96);
}

[data-theme="dark"] .changelog__entry.is-primary .changelog__dot {
  background: #60a5fa;
  box-shadow: 0 0 0 7px rgba(37, 99, 235, 0.18);
}

.changelog__date {
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

[data-theme="dark"] .changelog__date {
  color: #e5edf9;
}

.changelog__content {
  display: grid;
  gap: 10px;
  min-height: 56px;
  min-width: 0;
  padding: 14px 18px;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 18px;
  color: #475569;
  background: rgba(255, 255, 255, 0.80);
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.06);
  font-size: 14px;
  line-height: 1.75;
}

[data-theme="dark"] .changelog__content {
  color: #dbe4f0;
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.26);
}

.changelog__line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.changelog__line-mark {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #60a5fa;
}

.changelog__line-text {
  min-width: 0;
  flex: 0 1 auto;
}

.changelog__action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 28px;
  margin-left: 4px;
  padding: 0 10px;
  border: 1px solid rgba(96, 165, 250, 0.32);
  border-radius: 999px;
  color: #3b82f6;
  background: rgba(239, 246, 255, 0.92);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, color 0.22s ease, opacity 0.22s ease;
}

.changelog__action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.changelog__action:hover {
  color: #2563eb;
  background: #eaf4ff;
  border-color: rgba(59, 130, 246, 0.44);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.10);
  transform: translateY(-1px);
  text-decoration: none;
}

.changelog__action .ui-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  stroke-width: 1.95;
}

[data-theme="dark"] .changelog__action {
  color: #93c5fd;
  background: rgba(30, 41, 59, 0.92);
  border-color: rgba(96, 165, 250, 0.22);
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.20);
}

[data-theme="dark"] .changelog__action:hover {
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.16);
  border-color: rgba(147, 197, 253, 0.34);
}

.script-detail-popover {
  --script-detail-arrow-left: 50%;
  position: fixed;
  z-index: 1200;
  padding: 16px 16px 17px;
  border: 1px solid rgba(95, 156, 255, 0.26);
  border-radius: 18px;
  color: var(--text);
  background: #fff;
  box-shadow: 0 14px 34px rgba(31, 45, 93, 0.14);
  opacity: 0;
  transform: translateY(4px) scale(0.985);
  transform-origin: var(--script-detail-arrow-left) top;
  transition: opacity 0.16s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: top, opacity, transform;
  backface-visibility: hidden;
}

[data-theme="dark"] .script-detail-popover {
  background: #111827;
  border-color: rgba(96, 165, 250, 0.30);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.38), 0 4px 14px rgba(2, 6, 23, 0.24);
}

.script-detail-popover.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.script-detail-popover::before,
.script-detail-popover::after {
  content: "";
  position: absolute;
  left: var(--script-detail-arrow-left);
  width: 14px;
  height: 14px;
  border-radius: 3px 0 0 0;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}

.script-detail-popover::before {
  z-index: -1;
  box-shadow: -3px -3px 8px rgba(31, 45, 93, 0.04);
}

.script-detail-popover.is-below::before,
.script-detail-popover.is-below::after {
  top: -7px;
  border-left: 1px solid rgba(95, 156, 255, 0.26);
  border-top: 1px solid rgba(95, 156, 255, 0.26);
}

.script-detail-popover.is-above {
  transform-origin: var(--script-detail-arrow-left) bottom;
}

.script-detail-popover.is-above::before,
.script-detail-popover.is-above::after {
  bottom: -7px;
  border-right: 1px solid rgba(95, 156, 255, 0.26);
  border-bottom: 1px solid rgba(95, 156, 255, 0.26);
}

.script-detail-popover__header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.script-detail-popover__icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--script-category-border, rgba(147, 197, 253, 0.44));
  border-radius: 11px;
  color: var(--script-category-color, var(--highlight-color));
  background: var(--script-category-bg, rgba(239, 246, 255, 0.88));
  font-size: 16px;
  font-weight: 700;
}

[data-theme="dark"] .script-detail-popover__icon {
  color: var(--script-category-color, #93c5fd);
  background: color-mix(in srgb, var(--script-category-bg, rgba(37, 99, 235, 0.10)) 72%, rgba(15, 23, 42, 0.92) 28%);
  border-color: var(--script-category-border, rgba(96, 165, 250, 0.22));
}

.script-detail-popover__icon img {
  width: 32px;
  height: 32px;
  color: currentColor;
}

.script-detail-popover__title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.script-detail-popover__title {
  min-width: 0;
  overflow: hidden;
  color: color-mix(in srgb, var(--highlight-color) 92%, var(--text) 8%);
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.script-detail-popover__close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 10px;
  color: color-mix(in srgb, var(--text) 56%, transparent);
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.script-detail-popover__close:hover,
.script-detail-popover__close:focus-visible {
  color: var(--text);
  background: rgba(148, 163, 184, 0.12);
}

.script-detail-popover__label {
  margin-top: 16px;
  color: color-mix(in srgb, var(--text) 84%, var(--highlight-color) 16%);
  font-size: 13px;
  font-weight: 700;
}

.script-detail-popover__body {
  margin: 8px 0 0;
  color: color-mix(in srgb, var(--text) 88%, transparent);
  font-size: 14px;
  line-height: 1.72;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.script-detail-popover__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.script-detail-popover__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(96, 165, 250, 0.32);
  border-radius: 999px;
  color: #3b82f6;
  background: rgba(239, 246, 255, 0.92);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, color 0.22s ease, opacity 0.22s ease;
}

.script-detail-popover__link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.script-detail-popover__link .ui-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  stroke-width: 1.95;
}

.script-detail-popover__link:hover,
.script-detail-popover__link:focus-visible {
  color: #2563eb;
  background: #eaf4ff;
  border-color: rgba(59, 130, 246, 0.44);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.10);
  transform: translateY(-1px);
  text-decoration: none;
}

[data-theme="dark"] .script-detail-popover__link {
  color: #93c5fd;
  background: rgba(30, 41, 59, 0.92);
  border-color: rgba(96, 165, 250, 0.22);
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.20);
}

[data-theme="dark"] .script-detail-popover__link:hover,
[data-theme="dark"] .script-detail-popover__link:focus-visible {
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.16);
  border-color: rgba(147, 197, 253, 0.34);
}


.domain-notice__close:focus-visible,
.copy-btn:focus-visible,
.page-btn:focus-visible,
.nav-links a:focus-visible,
.site-title-link:focus-visible,
.theme-toggle:focus-visible,
.code-comment__more:focus-visible {
  outline: 2px solid var(--highlight-color);
  outline-offset: 2px;
}

#search-input:focus-visible {
  outline: none;
}

body.script-detail-open .script-block.show:hover {
  box-shadow: var(--panel-shadow);
  transform: none;
}

body.script-detail-open .copy-btn:not(.is-success):not(.is-error):not(.is-pending):hover,
body.script-detail-open .search-container:not(.is-expanded):not(:focus-within):hover,
body.script-detail-open .theme-toggle:hover,
body.script-detail-open .page-btn:hover:not(.disabled):not(.active) {
  transform: none;
}

@media (min-width: 641px) {
  .container {
    width: min(1000px, calc(100% - 44px));
    margin: 13px auto 24px;
    padding: 13px 24px 24px;
  }

  .notice {
    margin-bottom: 28px;
  }

  #scripts-container {
    gap: 22px 24px;
  }

  .changelog {
    padding: 24px 28px;
  }

  .changelog__entry {
    grid-template-columns: 138px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
  }

  .changelog__meta {
    align-items: center;
    gap: 12px;
    padding-top: 0;
  }

  .changelog__dot {
    margin: 0 0 0 5px;
  }

  .changelog__content {
    margin-left: 0;
  }
}

@media (max-width: 920px) and (min-width: 641px) {
  #scripts-container {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 600px;
    margin-inline: auto;
  }

  .script-block {
    width: 100%;
  }
}

@media (max-width: 640px) {
  body {
    padding: 0;
  }

  .container {
    width: min(100% - 16px, 100%);
    margin: 8px auto;
    padding: 16px;
  }

  .domain-notice {
    overflow-x: clip;
  }

  .domain-notice__inner {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 10px;
  }

  .domain-notice__text {
    white-space: normal;
  }

  .domain-notice__text span {
    display: block;
  }

  .domain-notice__close {
    margin-left: -30px;
  }

  .header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand tools" "nav nav";
    align-items: center;
    column-gap: 12px;
    row-gap: 8px;
    min-height: 0;
    margin-bottom: 14px;
    padding: 12px 14px 13px;
    border-radius: 16px;
  }

  .brand-lockup {
    grid-area: brand;
    max-width: 100%;
    gap: 6px;
  }

  .prompt-mark {
    height: 28px;
    font-size: 22px;
  }

  .header h1,
  .header .site-title {
    min-width: 0;
    font-size: 21px;
  }

  .brand-y {
    top: -7px;
    right: -14px;
    width: 15px;
    height: 15px;
    font-size: 12px;
  }

  .header-tools {
    grid-area: tools;
    justify-self: end;
    width: 84px;
    min-width: 84px;
    height: 38px;
    gap: 8px;
    margin-left: 0;
    overflow: visible;
    z-index: 30;
  }

  .search-container,
  .theme-toggle {
    width: 38px;
    min-width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 13px;
  }

  .search-container {
    --search-button-size: 38px;
    --search-expand-width: clamp(112px, 32vw, 136px);
  }

  .search-container.is-expanded,
  .search-container:focus-within {
    position: absolute;
    top: 0;
    right: 46px;
    width: var(--search-expand-width);
    min-width: 112px;
    max-width: calc(100vw - 220px);
    z-index: 40;
  }

  #search-input {
    height: 38px;
    overflow: hidden;
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .search-container.is-expanded #search-input,
  .search-container:focus-within #search-input {
    width: calc(100% - 38px);
    padding-right: 8px;
  }

  .header .nav-links {
    grid-area: nav;
    width: auto;
    max-width: 100%;
    margin: 2px 0 0;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .header .nav-links::-webkit-scrollbar {
    display: none;
  }

  .header .nav-links a {
    min-height: 28px;
    padding: 0;
    font-size: 15px;
  }

  .nav-link__icon,
  .ui-icon,
  .search-icon svg,
  .theme-icon svg {
    width: 18px;
    height: 18px;
  }

  .notice {
    margin-bottom: 16px;
    padding: 11px 13px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.65;
  }

  #scripts-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .script-block.show {
    min-height: 0;
    padding: 14px;
    border-radius: 18px;
    gap: 10px;
  }

  .script-card__header {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .script-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .script-card__icon img {
    width: 36px;
    height: 36px;
  }

  .script-block h2.script-title__text {
    font-size: 16px;
  }

  .script-block .code-comment {
    font-size: 13px;
  }

  .script-card__category {
    min-width: 38px;
    height: 28px;
    padding: 0 10px;
    font-size: 11px;
  }

  .script-block .code-row {
    min-height: 54px;
    padding: 10px 10px 10px 13px;
    border-radius: 15px;
  }

  .script-block .code-block {
    font-size: 13px;
  }

  .copy-action {
    --copy-size: 38px;
    --copy-radius: 12px;
    --copy-icon-size: 18px;
  }

  .pagination {
    gap: 8px;
  }

  .page-btn {
    width: 34px;
    min-width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 13px;
  }

  .changelog {
    padding: 16px 14px;
    border-radius: 18px;
  }

  .changelog__header {
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
  }

  .changelog h2 {
    font-size: 19px;
  }

  .changelog__list {
    gap: 16px;
  }

  .changelog__list::before {
    left: 7px;
  }

  .changelog__entry {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .changelog__meta {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    column-gap: 8px;
    align-items: center;
    padding-top: 0;
  }

  .changelog__dot {
    grid-column: 1;
    justify-self: center;
    width: 14px;
    height: 14px;
    flex-basis: 14px;
    margin: 0;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--highlight-color) 12%, transparent);
  }

  .changelog__date {
    grid-column: 2;
    line-height: 1.25;
  }

  .changelog__content {
    min-height: 0;
    padding: 12px;
    border-radius: 15px;
    font-size: 13px;
  }

  .changelog__line {
    display: grid;
    grid-template-columns: 7px minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
    row-gap: 0;
    width: 100%;
  }

  .changelog__line-mark {
    width: 6px;
    height: 6px;
  }

  .changelog__line-text {
    min-width: 0;
    line-height: 1.65;
  }

  .changelog__action {
    justify-self: end;
    min-height: 24px;
    margin: 0;
    padding: 0 8px;
  }

  .script-detail-popover {
    padding: 14px 14px 15px;
    border-radius: 16px;
  }

  .script-detail-popover__title {
    font-size: 16px;
  }

  .script-detail-popover__body {
    font-size: 13px;
  }
}

@media (hover: none), (pointer: coarse), (max-width: 640px) {
  .script-block.show:hover,
  .copy-btn:not(.is-success):not(.is-error):not(.is-pending):hover,
  .search-container:hover,
  .theme-toggle:hover,
  .page-btn:hover:not(.disabled):not(.active),
  .changelog__action:hover {
    transform: none;
  }

  .script-block.show:hover {
    box-shadow: var(--panel-shadow);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.001ms;
    animation-duration: 0.001ms;
    animation-iteration-count: 1;
    scroll-behavior: auto;
  }
}


/* Accessibility and keyboard navigation helpers */
:root {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  padding: 10px 14px;
  border: 2px solid var(--highlight-color);
  border-radius: 999px;
  color: var(--highlight-color);
  background: var(--panel-bg);
  box-shadow: var(--panel-shadow);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transform: translateY(calc(-100% - 24px));
  transition: transform var(--motion-fast) ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

.main-content:focus {
  outline: none;
}

.no-results[hidden] {
  display: none !important;
}

.no-results:not([hidden]) {
  display: flex;
}

.page-btn--ellipsis {
  pointer-events: none;
}

.skip-link:focus-visible,
.script-detail-popover__close:focus-visible,
.script-detail-popover__link:focus-visible,
.changelog__action:focus-visible,
.code-block:focus-visible {
  outline: 2px solid var(--highlight-color);
  outline-offset: 2px;
}

.code-block:focus-visible {
  border-radius: 8px;
}
