:root {
  color-scheme: dark;
  --bg: #000;
  --surface: rgba(8, 8, 9, 0.92);
  --surface-soft: rgba(8, 8, 9, 0.64);
  --surface-glass: rgba(8, 8, 9, 0.72);
  --surface-raised: rgba(12, 12, 13, 0.86);
  --surface-solid: #09090a;
  --surface-strong: #0d0d0f;
  --checker-base: #070708;
  --checker-mark: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f7f6f2;
  --muted: rgba(247, 246, 242, 0.68);
  --soft: rgba(247, 246, 242, 0.42);
  --accent: #9bd8ff;
  --accent-2: #f1e7a6;
  --gap: clamp(12px, 1.7vw, 32px);
  --radius: var(--radius-md);
  --page-pad: clamp(14px, 2.8vw, 64px);
  --content-max: 1480px;
  --toolbar-gap: clamp(18px, 2.4vw, 28px);
  --toolbar-release-desktop: 130px;
  --toolbar-release-mobile: 74px;
  --toolbar-mask-bottom: 12px;
  --toolbar-pinned-mask-bottom: var(--gallery-top-clearance);
  --card-frame-inset: 10px;
  --gallery-visual-gap: 4px;
  --gallery-hover-clearance: 12px;
  --gallery-top-clearance: calc(var(--toolbar-mask-bottom) + var(--card-frame-inset) + var(--gallery-visual-gap));
  --scroll-rail-width: 28px;
  --scroll-rail-right: max(4px, calc(var(--page-pad) * 0.35 - var(--scroll-rail-width) * 0.5));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  background: var(--bg);
  scroll-behavior: smooth;
}

@media (max-width: 680px), (pointer: coarse) {
  html {
    scroll-behavior: auto;
  }
}

html.editor-open,
html.editor-open body {
  overflow: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  font-size: 0.875rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(180, 180, 180, 0.3) rgba(0, 0, 0, 0.48);
}

*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.48);
}

*::-webkit-scrollbar-thumb {
  min-height: 42px;
  border: 2px solid rgba(0, 0, 0, 0.58);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(190, 190, 190, 0.34), rgba(120, 120, 120, 0.28));
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(220, 220, 220, 0.42), rgba(145, 145, 145, 0.36));
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

*::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

html,
body {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.09;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 76%);
}

button,
input,
select {
  font: inherit;
}

.site-main {
  position: relative;
  z-index: 1;
}

.page {
  --page-right-pad: var(--page-pad);
  position: relative;
  z-index: 1;
  width: min(calc(100% - (var(--page-pad) * 2)), var(--content-max));
  max-width: var(--content-max);
  margin: 0;
  margin-inline: auto;
  padding: var(--page-pad) 0;
}

.modal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--soft);
  font-size: 0.75rem;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.modal-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 22px rgba(155, 216, 255, 0.62);
}

.toolbar {
  position: relative;
  z-index: 70;
  isolation: isolate;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(14px, 1.4vw, 22px);
  margin: var(--toolbar-gap) 0 0;
  transform: translate3d(0, var(--toolbar-pin-y, 0px), 0);
  will-change: transform;
}

.toolbar::before {
  content: "";
  position: absolute;
  left: min(0px, calc((100% - 100vw) / 2));
  right: min(0px, calc((100% - 100vw) / 2));
  top: calc(-1 * var(--toolbar-gap));
  bottom: calc(-1 * var(--toolbar-mask-bottom));
  z-index: -1;
  background: rgba(0, 0, 0, 0.82);
  -webkit-backdrop-filter: blur(20px) saturate(116%);
  backdrop-filter: blur(20px) saturate(116%);
  pointer-events: none;
}

.toolbar.is-pinned::before {
  top: calc(-1 * var(--toolbar-mask-top, var(--toolbar-gap)));
  bottom: calc(-1 * var(--toolbar-pinned-mask-bottom));
}

.toolbar > * {
  position: relative;
  z-index: 1;
}

.search {
  position: relative;
  flex: 0 0 clamp(460px, 34vw, 640px);
  display: flex;
  align-items: center;
  width: auto;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  box-shadow: none;
  -webkit-backdrop-filter: blur(12px) saturate(112%);
  backdrop-filter: blur(12px) saturate(112%);
  transition: background-color 260ms var(--ease), border-color 260ms var(--ease);
}

.search:focus-within {
  border-color: rgba(155, 216, 255, 0.48);
  background: var(--surface-strong);
  box-shadow: none;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 1.7px solid rgba(255, 255, 255, 0.56);
  border-radius: 50%;
  transform: translateY(-58%);
  pointer-events: none;
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 7px;
  height: 1.7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  transform: rotate(45deg);
  transform-origin: left center;
}

.search input {
  width: 100%;
  height: 100%;
  appearance: none;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--text);
  outline: none;
  padding: 0 112px 0 44px;
  font-size: 0.8125rem;
  font-weight: 620;
  line-height: 1;
}

.search input:focus-visible {
  box-shadow: none;
}

.search input::placeholder {
  color: rgba(255, 255, 255, 0.58);
  opacity: 1;
}

.search-count {
  position: absolute;
  right: 14px;
  top: 50%;
  max-width: 62px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.625rem;
  font-weight: 760;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
  pointer-events: none;
  transform: translateY(-50%);
}

.search-clear {
  appearance: none;
  position: absolute;
  right: 82px;
  top: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 180ms var(--ease), color 180ms var(--ease), background-color 180ms var(--ease);
}

.search.has-value .search-clear {
  opacity: 1;
  pointer-events: auto;
}

.search-clear:hover,
.search-clear:focus-visible {
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.78);
  box-shadow: none;
  outline: 0;
}

.search-clear span {
  position: relative;
  width: 11px;
  height: 11px;
}

.search-clear span::before,
.search-clear span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}

.search-clear span::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.search-clear span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.style-filter-pills {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  max-width: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px 8px 14px;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-x;
  user-select: none;
  -webkit-user-select: none;
}

.style-filter-pills::-webkit-scrollbar {
  display: none;
}

.style-filter-pills.is-dragging {
  cursor: grabbing;
}

.style-filter-pill {
  appearance: none;
  position: relative;
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
  color: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 680;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  transition:
    border-color 260ms var(--ease),
    background-color 260ms var(--ease),
    color 260ms var(--ease);
}

.style-filter-pills.is-dragging .style-filter-pill {
  cursor: grabbing;
}

.style-filter-pill::before,
.style-filter-pill::after {
  content: none;
}

.style-filter-pill:hover,
.style-filter-pill:focus-visible {
  border-color: rgba(155, 216, 255, 0.3);
  background: rgba(155, 216, 255, 0.075);
  color: rgba(255, 255, 255, 0.82);
  box-shadow: none;
  outline: 0;
}

.style-filter-pill.is-active {
  border-color: rgba(155, 216, 255, 0.42);
  background: rgba(155, 216, 255, 0.105);
  color: rgba(255, 255, 255, 0.94);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  padding-top: var(--gallery-top-clearance);
  padding-bottom: clamp(18px, 2.4vw, 34px);
}

.styles-pricing-break {
  position: relative;
  z-index: 4;
  height: clamp(10px, 2.2vh, 32px);
  background: #000;
}

.gallery-message {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.gallery-empty {
  grid-column: 1 / -1;
  display: none;
  place-items: center;
  gap: 12px;
  min-height: clamp(220px, 32vh, 360px);
  padding: clamp(28px, 4vw, 56px);
  color: rgba(255, 255, 255, 0.46);
  text-align: center;
}

.gallery-empty.is-visible {
  display: grid;
}

.gallery-empty__title {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 1.4vw, 1.3125rem);
  font-weight: 650;
  line-height: 1.2;
}

.gallery-empty__copy {
  max-width: 360px;
  margin: -4px 0 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  font-weight: 520;
  line-height: 1.5;
}

.gallery-empty__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.gallery-empty__action {
  appearance: none;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 680;
  line-height: 1;
  transition: border-color 240ms var(--ease), background-color 240ms var(--ease), color 240ms var(--ease);
}

.gallery-empty__action:hover,
.gallery-empty__action:focus-visible {
  border-color: rgba(155, 216, 255, 0.36);
  background: rgba(155, 216, 255, 0.09);
  color: rgba(255, 255, 255, 0.92);
  outline: 0;
}

.preview-card {
  position: relative;
  min-width: 0;
}

.preview-card::before,
.preview-card::after {
  content: none;
}

.preview-card:hover > .editor-frame-overlay--card,
.preview-card:focus-within > .editor-frame-overlay--card {
  visibility: visible;
  filter: brightness(1);
}

.preview-card.is-editor-armed > .editor-frame-overlay--card {
  --editor-frame: rgba(255, 255, 255, 0.92);
  --editor-frame-border: rgba(255, 255, 255, 0.34);
  --editor-frame-handle: rgba(255, 255, 255, 0.72);
  --editor-frame-handle-fill: rgba(255, 255, 255, 0.96);
  visibility: visible;
  filter: brightness(0.82);
}

.preview-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: clamp(var(--radius-sm), 0.45vw, var(--radius-md));
  background: var(--surface-solid);
  overflow: hidden;
  box-shadow: none;
  isolation: isolate;
}

.media-shell {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--checker-base);
  background-image:
    linear-gradient(45deg, var(--checker-mark) 25%, transparent 25%, transparent 75%, var(--checker-mark) 75%),
    linear-gradient(45deg, var(--checker-mark) 25%, transparent 25%, transparent 75%, var(--checker-mark) 75%);
  background-size: clamp(17px, 2vw, 28px) clamp(17px, 2vw, 28px);
  background-position: 0 0, clamp(8.5px, 1vw, 14px) clamp(8.5px, 1vw, 14px);
  isolation: isolate;
}

.preview-card.has-live-editor .media-shell {
  cursor: pointer;
}

.media-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.54);
  opacity: 0;
  transition: opacity 320ms var(--ease);
}

.preview-card.is-editor-armed .media-shell::after {
  opacity: 1;
}

.poster-canvas,
.animated-preview {
  position: absolute;
  left: clamp(10px, 1.45vw, 18px);
  top: clamp(10px, 1.45vw, 18px);
  width: calc(100% - (clamp(10px, 1.45vw, 18px) * 2));
  height: calc(100% - (clamp(10px, 1.45vw, 18px) * 2));
  display: block;
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
}

.poster-canvas {
  opacity: 0;
  transition: opacity 360ms var(--ease);
}

.preview-card.has-poster .poster-canvas {
  opacity: 1;
}

.preview-card.is-playing .poster-canvas {
  opacity: 0;
}

.animated-preview {
  opacity: 0;
  pointer-events: none;
  transition: opacity 360ms var(--ease);
}

.preview-card.is-playing .animated-preview {
  opacity: 1;
}

.preview-live-editor {
  appearance: none;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  max-width: calc(100% - 28px);
  padding: 0 22px;
  border: 0;
  border-radius: 2px;
  background: rgba(8, 8, 9, 0.58);
  color: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 0 0 1px var(--tc-editor-inner);
  -webkit-backdrop-filter: blur(14px) saturate(112%);
  backdrop-filter: blur(14px) saturate(112%);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 760;
  line-height: 1;
  letter-spacing: 0;
  overflow: visible;
  pointer-events: none;
  visibility: hidden;
  white-space: nowrap;
  transform: translate(-50%, -44%) scale(0.96);
  transition:
    transform 360ms var(--ease),
    background-color 220ms var(--ease),
    border-color 220ms var(--ease);
}

.preview-live-editor::before {
  content: none;
}

.preview-live-editor::after {
  content: none;
}

.preview-live-editor .editor-frame-overlay {
  inset: -10px;
  z-index: 0;
  visibility: inherit;
  filter: brightness(0.92);
}

.preview-card.is-editor-armed .preview-live-editor {
  pointer-events: auto;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.preview-live-editor:hover,
.preview-live-editor:focus-visible {
  background: rgba(155, 216, 255, 0.045);
  box-shadow: none;
  outline: 0;
}

.preview-live-editor:hover .editor-frame-overlay,
.preview-live-editor:focus-visible .editor-frame-overlay {
  filter: brightness(1.12);
}

.preview-live-editor .action-icon {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  color: #9bd8ff;
  opacity: 1;
}

.preview-live-editor .action-label {
  position: relative;
  z-index: 1;
  max-width: none;
  margin-left: 0;
  opacity: 1;
  transform: none;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(7px, 1vw, 14px);
  padding: clamp(10px, 1.35vw, 16px);
  border-top: 1px solid var(--line-soft);
}

.card-title {
  min-width: 0;
  margin: 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.875rem;
  font-weight: 660;
  line-height: 1.18;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 1.6vw, 24px);
  min-height: 36px;
  transition: opacity 220ms var(--ease), visibility 220ms var(--ease);
}

.preview-card.is-editor-armed .card-actions {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.action-link {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 34px;
  min-height: 34px;
  padding: 8px;
  margin: -4px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  transition: color 320ms var(--ease), background-color 320ms var(--ease);
}

.action-link:hover,
.action-link:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.96);
  outline: 0;
}

.action-icon {
  flex: 0 0 auto;
  width: clamp(15px, 1.15vw, 18px);
  height: clamp(15px, 1.15vw, 18px);
  stroke-width: 1.95;
  opacity: 0.78;
}

.action-label {
  display: inline-block;
  max-width: 0;
  margin-left: 0;
  opacity: 0;
  transform: translateX(-6px);
  overflow: hidden;
  white-space: nowrap;
  color: currentColor;
  transition:
    max-width 420ms var(--ease),
    margin-left 420ms var(--ease),
    opacity 260ms var(--ease),
    transform 420ms var(--ease);
}

@media (hover: hover) and (pointer: fine) and (min-width: 981px) {
  .action-link:hover .action-label,
  .action-link:focus-visible .action-label {
    max-width: 8rem;
    margin-left: 0.4375rem;
    opacity: 1;
    transform: translateX(0);
  }

  .preview-card:hover .action-open-editor,
  .preview-card:focus-within .action-open-editor {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.96);
  }

  .preview-card:hover .action-open-editor .action-label,
  .preview-card:focus-within .action-open-editor .action-label {
    max-width: 8rem;
    margin-left: 0.4375rem;
    opacity: 1;
    transform: translateX(0);
  }

  .card-actions:has(.action-download:hover) .action-open-editor .action-label,
  .card-actions:has(.action-download:focus-visible) .action-open-editor .action-label {
    max-width: 0;
    margin-left: 0;
    opacity: 0;
    transform: translateX(-6px);
  }
}

@media (hover: none), (pointer: coarse), (max-width: 1100px) {
  .preview-card.is-touch-preview .action-open-editor {
    min-width: 7.75rem;
    padding-inline: 0.75rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.96);
    font-weight: 520;
  }

  .preview-card.is-touch-preview .action-open-editor .action-label {
    display: inline-block;
    max-width: 7rem;
    margin-left: 0.4375rem;
    font-weight: 520;
    opacity: 1;
    transform: translateX(0);
  }
}

.editor-modal {
  width: min(1500px, calc(100vw - 16px));
  height: min(960px, calc(100dvh - 16px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: visible;
  overscroll-behavior: contain;
}

.editor-modal::backdrop {
  background: rgba(0, 0, 0, 0.74);
  -webkit-backdrop-filter: blur(18px) brightness(0.58);
  backdrop-filter: blur(18px) brightness(0.58);
}

.editor-modal-frame {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.editor-modal-header {
  flex: 0 0 auto;
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-xl);
  background: rgba(10, 10, 11, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.editor-modal-title-block {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.editor-modal-header .modal-eyebrow {
  font-size: 0.625rem;
}

.modal-style-field {
  display: block;
  width: min(340px, 44vw);
}

.modal-style-field .tc-select-button {
  width: fit-content;
  max-width: 100%;
  grid-template-columns: minmax(0, auto) 10px;
  gap: 8px;
  min-height: 34px;
  border-color: transparent;
  background: transparent;
  padding: 0;
  font-size: 0.9375rem;
  font-weight: 760;
  line-height: 1.1;
}

.modal-style-field .tc-select-button:focus-visible,
.modal-style-field .tc-select.is-open .tc-select-button {
  border-color: transparent;
  box-shadow: none;
}

.modal-style-field .tc-select-menu {
  min-width: min(340px, 78vw);
}

.editor-modal-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-aspect-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(46px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  background: #0e0e10;
}

.modal-aspect-toggle label {
  margin: 0;
}

.modal-aspect-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.modal-aspect-toggle span {
  display: block;
  padding: 8px 9px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1;
  text-align: center;
  cursor: pointer;
}

.modal-aspect-toggle input:checked + span {
  background: rgba(155, 216, 255, 0.16);
  color: var(--text);
}

.icon-button {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

#editor-frame {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  background: transparent;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.is-hidden {
  display: none;
}

.scroll-progress {
  --scroll-progress: 0;
  position: fixed;
  top: 50%;
  right: var(--scroll-rail-right);
  z-index: 920;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.62;
  pointer-events: auto;
  transform: translateY(-50%);
  transition: opacity 480ms var(--ease), visibility 480ms var(--ease);
}

.scroll-progress.is-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.scroll-progress.is-dragging {
  opacity: 0.9;
}

.scroll-top {
  display: grid;
  place-items: center;
  width: var(--scroll-rail-width);
  height: clamp(132px, 22vh, 210px);
  color: rgba(220, 220, 220, 0.42);
  text-decoration: none;
}

.scroll-top:hover,
.scroll-top:focus-visible {
  color: rgba(245, 245, 245, 0.72);
  outline: 0;
}

.scroll-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.scroll-line {
  position: relative;
  display: block;
  width: 2px;
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  cursor: grab;
  touch-action: none;
  overflow: visible;
}

.scroll-progress.is-dragging .scroll-line {
  cursor: grabbing;
}

.scroll-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: calc(var(--scroll-progress) * 100%);
  border-radius: inherit;
  background: rgba(235, 235, 235, 0.52);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.08);
}

.scroll-point {
  position: absolute;
  left: 50%;
  top: calc(var(--scroll-progress) * 100%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.18);
  cursor: grab;
  transform: translate(-50%, -50%);
}

.scroll-progress.is-dragging .scroll-point {
  cursor: grabbing;
}

.site-footer {
  position: relative;
  width: 100%;
  padding: clamp(24px, 4vh, 46px) 0 clamp(14px, 2vh, 22px);
  border-top: 0;
  background: var(--bg);
}

.footer-shell {
  width: min(calc(100vw - (var(--page-pad) * 2)), 1180px);
  margin: 0 auto;
}

.footer-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(0, 1.45fr);
  gap: clamp(34px, 5vw, 78px);
  align-items: start;
  padding: clamp(20px, 2.8vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(16px) saturate(112%);
  backdrop-filter: blur(16px) saturate(112%);
}

.footer-brand {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.footer-brand p {
  max-width: 420px;
  margin: 0;
  color: rgba(225, 225, 225, 0.54);
  font-size: clamp(0.8125rem, 1vw, 0.9375rem);
  font-weight: 430;
  line-height: 1.55;
  letter-spacing: 0;
}

.footer-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-stats span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: rgba(245, 245, 245, 0.68);
  font-size: 0.6875rem;
  font-weight: 610;
  line-height: 1;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 44px);
  justify-content: stretch;
}

.footer-links div {
  display: grid;
  gap: 10px;
  align-items: start;
}

.footer-links span:first-child {
  color: rgba(230, 230, 230, 0.34);
  font-size: 0.625rem;
  font-weight: 760;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.footer-links a,
.footer-link-static {
  position: relative;
  color: rgba(215, 215, 215, 0.48);
  font-size: 0.75rem;
  font-weight: 520;
  line-height: 1.25;
  text-decoration: none;
  transition:
    color 220ms var(--ease),
    transform 220ms var(--ease);
}

.footer-link-static {
  cursor: default;
}

.footer-links a::after {
  content: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: rgba(255, 255, 255, 0.9);
  outline: 0;
  transform: translateX(2px);
}

.footer-rule {
  display: none;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(16px, 2.4vh, 28px);
}

.footer-logo {
  width: max-content;
  color: rgba(245, 245, 245, 0.88);
  font-size: 0.9375rem;
  font-weight: 780;
  line-height: 1;
  text-decoration: none;
  transition: color 220ms var(--ease);
}

.footer-logo:hover,
.footer-logo:focus-visible {
  color: rgba(255, 255, 255, 0.96);
  outline: 0;
}

.footer-bottom p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
  color: rgba(210, 210, 210, 0.3);
  font-size: 0.6875rem;
  font-weight: 420;
  line-height: 1.4;
  text-align: right;
}

@media (max-width: 980px) {
  .modal-eyebrow {
    font-size: 0.6875rem;
  }

  .card-actions {
    gap: clamp(10px, 1.6vw, 16px);
  }

  .action-link {
    min-width: 2rem;
    min-height: 2rem;
    padding: 0.4375rem;
    margin: -0.25rem;
  }

  .card-actions .action-label {
    display: none;
  }

  .preview-card.is-touch-preview .action-open-editor {
    min-width: 7.25rem;
    padding-inline: 0.6875rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.96);
    font-weight: 520;
  }

  .preview-card.is-touch-preview .action-open-editor .action-label {
    display: inline-block;
    max-width: 7rem;
    margin-left: 0.4375rem;
    font-weight: 520;
    opacity: 1;
    transform: translateX(0);
  }

  .preview-live-editor {
    gap: 0.4375rem;
    min-height: 2.875rem;
    padding: 0 1.125rem;
    font-size: 0.8125rem;
  }

  .preview-live-editor .editor-frame-overlay {
    inset: -8px;
  }

  .preview-live-editor .action-icon {
    width: 1rem;
    height: 1rem;
  }

  .toolbar {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--toolbar-gap);
    margin: var(--toolbar-gap) 0 0;
  }

  .search {
    flex: 0 0 100%;
    width: 100%;
  }

  .style-filter-pills {
    flex: 0 0 100%;
    width: 100%;
    padding: 0 0 4px;
  }

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

  .footer-shell {
    width: 90vw;
  }

  .footer-panel {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-brand p {
    max-width: 560px;
  }

  .footer-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  :root {
    --gap: 8px;
    --page-pad: 10px;
    --toolbar-gap: 10px;
    --toolbar-mask-bottom: 8px;
    --card-frame-inset: 8px;
    --gallery-top-clearance: 14px;
    --toolbar-pinned-mask-bottom: 16px;
    --gallery-visual-gap: 0px;
    --gallery-hover-clearance: 10px;
    --scroll-rail-width: 18px;
    --scroll-rail-right: max(-6px, env(safe-area-inset-right));
  }

  .toolbar {
    gap: var(--toolbar-gap);
    margin: var(--toolbar-gap) 0 0;
  }

  .search {
    flex-basis: 100%;
    width: 100%;
  }

  .style-filter-pills {
    width: 100%;
    max-width: none;
    flex-wrap: nowrap;
    gap: 7px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    scrollbar-width: none;
  }

  .style-filter-pills::-webkit-scrollbar {
    display: none;
  }

  .style-filter-pill {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.65625rem;
  }

  .preview-card > .editor-frame-overlay--card {
    inset: -8px;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-bottom: 26px;
  }

  .styles-pricing-break {
    height: 8px;
  }

  .card-footer {
    padding: 0.5rem 0.5625rem;
    gap: 0.625rem;
  }

  .card-actions {
    gap: 1.125rem;
    min-height: 2rem;
  }

  .action-link {
    min-width: 2rem;
    min-height: 2rem;
    padding: 0.4375rem;
    margin: -0.1875rem;
  }

  .card-actions .action-icon {
    width: 0.875rem;
    height: 0.875rem;
    stroke-width: 1.85;
  }

  .card-title {
    font-size: 0.75rem;
  }

  .card-actions .action-label {
    display: none;
  }

  .preview-card.is-touch-preview .action-open-editor .action-label {
    display: inline-block;
    max-width: 6rem;
    margin-left: 0.375rem;
    font-weight: 520;
    opacity: 1;
    transform: translateX(0);
  }

  .scroll-progress {
    right: var(--scroll-rail-right);
    opacity: 0.44;
  }

  .scroll-top {
    width: 18px;
    height: 96px;
  }

  .scroll-line {
    width: 1px;
  }

  .scroll-point {
    width: 5px;
    height: 5px;
  }

  .editor-modal {
    width: calc(100vw - 4px);
    height: calc(100dvh - 4px);
    --editor-mobile-inset: 0.625rem;
  }

  .editor-modal-header {
    display: grid;
    grid-template-columns: minmax(8.75rem, 1fr) auto;
    align-items: center;
    gap: clamp(0.375rem, 1.8vw, 0.625rem);
    padding: 0.375rem var(--editor-mobile-inset) 0;
    margin-bottom: 0.5rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    box-shadow: none;
  }

  .editor-modal-header .modal-eyebrow {
    display: none;
  }

  .editor-modal-title-block {
    min-width: 0;
    gap: 0;
  }

  .modal-style-field {
    width: min(14rem, 46vw);
    margin-left: 0;
  }

  .modal-style-field .tc-select-button {
    width: 100%;
    min-height: 2.125rem;
    border: 1px solid rgba(255, 255, 255, 0.115);
    border-radius: var(--radius-sm);
    background: rgba(14, 14, 16, 0.82);
    box-shadow: none;
    padding: 0 0.6875rem;
    font-size: 0.8125rem;
  }

  .editor-modal-actions {
    min-width: max-content;
    gap: clamp(1.125rem, 4vw, 1.625rem);
  }

  .modal-aspect-toggle {
    display: grid;
    width: 6.375rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .modal-aspect-toggle span {
    min-height: 2.125rem;
    display: grid;
    place-items: center;
    padding: 0 0.5rem;
    background: rgba(14, 14, 16, 0.82);
    font-size: 0.625rem;
  }

  .modal-aspect-toggle label:first-child span {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  }

  .modal-aspect-toggle label:last-child span {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  }

  .icon-button {
    width: 2.375rem;
    height: 2.375rem;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: rgba(244, 244, 245, 0.72);
  }

  .icon-button:hover,
  .icon-button:focus-visible {
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    outline: 0;
  }

  .icon-button svg {
    width: 1.125rem;
    height: 1.125rem;
  }

  #editor-frame {
    margin-top: 0;
  }

  .preview-live-editor {
    min-height: 2.75rem;
    padding: 0 1rem;
    font-size: 0.8125rem;
  }

  .preview-live-editor .action-icon {
    width: 1rem;
    height: 1rem;
  }

  .site-footer {
    padding: 18px 0 12px;
  }

  .footer-shell {
    width: min(calc(100vw - 28px), 420px);
  }

  .footer-panel {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .footer-brand {
    gap: 11px;
  }

  .footer-brand p {
    max-width: none;
    font-size: 0.78125rem;
    line-height: 1.46;
  }

  .footer-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .footer-stats span {
    min-height: 26px;
    justify-content: center;
    padding: 0 7px;
    font-size: 0.625rem;
    text-align: center;
  }

  .footer-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .footer-links div {
    min-width: 0;
    gap: 7px;
  }

  .footer-links span:first-child {
    font-size: 0.5625rem;
  }

  .footer-links a,
  .footer-link-static {
    font-size: 0.625rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: 10px;
  }

  .footer-logo {
    font-size: 0.875rem;
  }

  .footer-bottom p {
    max-width: none;
    font-size: 0.625rem;
    justify-content: flex-start;
    text-align: left;
  }
}
