@font-face {
  font-family: "Roboto";
  src: url("assets/fonts/roboto/roboto-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url("assets/fonts/roboto/roboto-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Font Awesome 6 Free";
  src: url("assets/fonts/webfonts/fa-solid-900.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Font Awesome 6 Brands";
  src: url("assets/fonts/webfonts/fa-brands-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

.fa-solid {
  display: inline-block;
  font-family: "Font Awesome 6 Free";
  font-style: normal;
  font-variant: normal;
  font-weight: 900;
  line-height: 1;
  text-rendering: auto;
}

.fa-brands {
  display: inline-block;
  font-family: "Font Awesome 6 Brands";
  font-style: normal;
  font-variant: normal;
  font-weight: 400;
  line-height: 1;
  text-rendering: auto;
}

.fa-pen::before {
  content: "\f304";
}

.fa-trash::before {
  content: "\f1f8";
}

.fa-gear::before {
  content: "\f013";
}

.fa-rotate-left::before {
  content: "\f2ea";
}

.fa-chevron-left::before {
  content: "\f053";
}

.fa-chevron-right::before {
  content: "\f054";
}

.fa-arrow-left::before {
  content: "\f060";
}

.fa-arrow-right::before {
  content: "\f061";
}

.fa-grip-lines-vertical::before {
  content: "\f7a5";
}

.fa-bars::before {
  content: "\f0c9";
}

.fa-share-nodes::before {
  content: "\f1e0";
}

.fa-upload::before {
  content: "\f093";
}

.fa-instagram::before {
  content: "\f16d";
}

.fa-facebook-f::before {
  content: "\f39e";
}

.fa-youtube::before {
  content: "\f167";
}

.fa-linkedin-in::before {
  content: "\f0e1";
}

.fa-twitter::before {
  content: "\f099";
}

.fa-x-twitter::before {
  content: "\e61b";
}

.fa-pinterest-p::before {
  content: "\f231";
}

.fa-tiktok::before {
  content: "\e07b";
}

.fa-github::before {
  content: "\f09b";
}

.fa-usb::before {
  content: "\f287";
}

.fa-file-lines::before {
  content: "\f15c";
}

:root {
  --bg: #f6f7f9;
  --bg-grad-start: #f6f7f9;
  --bg-grad-end: #f5f6f8;
  --brand-glow-alpha: .03;
  --modal-grad-top: #fffaf6;
  --modal-grad-mid: #fff1e6;
  --modal-grad-bottom: #f4f6f8;
  --modal-glow-a: rgba(255,188,112,.24);
  --modal-glow-b: rgba(255,255,255,.26);
  --scrollbar-track: rgba(39,50,63,.08);
  --scrollbar-thumb: rgba(226,83,3,.52);
  --scrollbar-thumb-hover: rgba(226,83,3,.68);
  --panel: #ffffff;
  --text: #27323f;
  --muted: #6f7a86;
  --brand: #e25303;
  --line: #d7dbe0;
  --radius: 12px;
  --theme-transition: .46s;
  --theme-ease: cubic-bezier(.16, .84, .22, 1);
}

* { box-sizing: border-box; }

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

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

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border: 0;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

html,
body,
button,
input,
select,
textarea {
  font-family: "Roboto", Arial, sans-serif;
}

body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-grad-start) 0%, var(--bg-grad-end) 100%);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  transition:
    background var(--theme-transition) var(--theme-ease),
    color var(--theme-transition) var(--theme-ease);
}

body,
.card,
.filters-panel,
.gallery-panel,
.preview-modal,
.modal-info-panel,
.modal-svg-wrap,
input,
textarea,
button {
  transition:
    background-color var(--theme-transition) var(--theme-ease),
    color var(--theme-transition) var(--theme-ease),
    border-color var(--theme-transition) var(--theme-ease),
    box-shadow var(--theme-transition) var(--theme-ease);
}

code {
  color: #7a2f00;
  background: rgba(226,83,3,.12);
  border: 1px solid rgba(226,83,3,.22);
  border-radius: 6px;
  padding: .1rem .34rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .92em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top right, rgba(226,83,3,var(--brand-glow-alpha)), transparent 35%);
  transition: background var(--theme-transition) var(--theme-ease);
}

.topbar {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: .2rem 1.5rem .15rem;
}

.topbar-actions {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.topbar-action-btn,
.theme-toggle {
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-grid;
  place-items: center;
  color: var(--text);
  background: rgba(255,255,255,.86);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
}

.topbar-action-btn {
  font-size: 1rem;
}

.topbar-publish-btn {
  border: 1px solid rgba(226,83,3,.36);
  border-radius: 999px;
  min-height: 2.5rem;
  padding: 0 .8rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .92rem;
  font-weight: 700;
  color: #7a2f00;
  background: rgba(255,246,240,.92);
  cursor: pointer;
}

.topbar-publish-btn .fa-solid {
  font-size: .9rem;
}

.topbar-publish-btn[hidden] {
  display: none !important;
}

.topbar-publish-btn:hover,
.topbar-publish-btn:focus-visible {
  border-color: rgba(226,83,3,.55);
  box-shadow: 0 8px 16px rgba(17,24,39,.08);
}

.topbar-publish-btn:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.theme-toggle {
  position: static;
  transform: none;
}

.topbar-action-btn:hover,
.topbar-action-btn:focus-visible,
.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: rgba(226,83,3,.38);
  box-shadow: 0 8px 16px rgba(17,24,39,.08);
}

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

.theme-toggle-icon {
  position: relative;
  width: 1.2rem;
  height: 1.2rem;
  transform: rotate(0deg);
  transition: transform .24s cubic-bezier(.22,.78,.3,1);
}

.theme-sun,
.theme-moon {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transition: transform .24s cubic-bezier(.22,.78,.3,1), opacity .24s ease, box-shadow .24s ease;
  will-change: transform, opacity;
}

.theme-sun {
  background: #f7aa1a;
  box-shadow:
    0 0 0 .1rem rgba(247,170,26,.25),
    0 0 0 .35rem rgba(247,170,26,.12);
  transform: scale(.82) rotate(0deg);
}

.theme-sun::before {
  content: "";
  position: absolute;
  inset: -.3rem;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(247,170,26,.72) 0deg 8deg,
    transparent 8deg 30deg
  );
  -webkit-mask: radial-gradient(circle, transparent 48%, #000 50% 68%, transparent 70%);
  mask: radial-gradient(circle, transparent 48%, #000 50% 68%, transparent 70%);
}

.theme-moon {
  background: #d8e1f0;
  transform: scale(.25) rotate(-120deg);
  opacity: 0;
  overflow: hidden;
}

.theme-moon::before {
  content: "";
  position: absolute;
  width: .95rem;
  height: .95rem;
  border-radius: 50%;
  top: -.1rem;
  left: .33rem;
  background: var(--panel);
}

.theme-moon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  clip-path: ellipse(52% 60% at 36% 52%);
  background:
    radial-gradient(circle at 26% 32%, rgba(157,170,183,.42) 0 11%, transparent 12%),
    radial-gradient(circle at 52% 58%, rgba(157,170,183,.36) 0 9%, transparent 10%),
    radial-gradient(circle at 38% 76%, rgba(157,170,183,.3) 0 7%, transparent 8%);
}

.theme-star {
  position: absolute;
  width: .28rem;
  height: .28rem;
  top: .06rem;
  right: .04rem;
  border-radius: 50%;
  background: #fff4c7;
  opacity: 0;
  transform: scale(.2) rotate(0deg);
  box-shadow: 0 0 0 .06rem rgba(255,244,199,.45);
  transition: opacity .22s ease, transform .22s ease;
}

.theme-star::before,
.theme-star::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: .54rem;
  height: .07rem;
  border-radius: 999px;
  background: rgba(255,244,199,.95);
  transform: translate(-50%, -50%);
}

.theme-star::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

body.theme-dark .theme-sun {
  transform: scale(.25) rotate(120deg);
  opacity: 0;
}

body.theme-dark .theme-moon {
  transform: scale(1) rotate(0deg);
  opacity: 1;
  box-shadow: 0 0 0 .16rem rgba(216,225,240,.16);
}

body.theme-dark .theme-star {
  opacity: 1;
  transform: scale(1) rotate(18deg);
  animation: themeStarTwinkle 1.35s ease-in-out infinite alternate;
}

body.theme-dark .theme-toggle-icon {
  transform: rotate(14deg);
}

@keyframes themeStarTwinkle {
  0% {
    filter: drop-shadow(0 0 0 rgba(255,244,199,0));
    transform: scale(.86) rotate(12deg);
  }

  55% {
    filter: drop-shadow(0 0 6px rgba(255,244,199,.8));
    transform: scale(1.08) rotate(18deg);
  }

  100% {
    filter: drop-shadow(0 0 3px rgba(255,244,199,.5));
    transform: scale(.95) rotate(22deg);
  }
}

.brand-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-items: center;
  gap: .2rem;
  width: min(100%, 720px);
  text-align: center;
}

.brand-logo {
  height: 38px;
  width: auto;
  display: block;
}

.topbar h1,
.brand-header h1 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  letter-spacing: .2px;
  line-height: 1.05;
}

.layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1rem;
  height: 100%;
  min-height: 0;
  padding: .15rem 1rem .8rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(17,24,39,.05);
}

.panel { padding: 1rem; }
.welcome h2 { font-size: 1.25rem; margin: 0 0 .5rem; text-transform: uppercase; }
.filters-panel,
.gallery-panel {
  min-height: 0;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.82);
  box-shadow: 0 8px 20px rgba(17,24,39,.05);
}

.filters-panel { display: flex; flex-direction: column; gap: .75rem; align-self: stretch; overflow: hidden; }
.filters-panel > .card { box-shadow: none; }
.filters-card { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.filters-scroll-wrap {
  overflow-y: auto;
  min-height: 0;
  scrollbar-gutter: stable;
}
.filters-toolbar { display: flex; gap: .55rem; align-items: center; margin-bottom: .7rem; }
.filters-sort {
  padding-bottom: .65rem;
  margin-bottom: .75rem;
  border-bottom: 1px solid rgba(215,219,224,.75);
}

.sort-filters-group {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}

input[type="search"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .55rem .7rem;
  font-size: .9rem;
}

.reset-filters {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  white-space: nowrap;
  font-size: .95rem;
}
section h3 { margin: .35rem 0; font-size: .9rem; }

.filters-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .2rem .8rem;
  margin-bottom: .7rem;
}

label.filter-opt { display: flex; gap: .35rem; align-items: center; color: var(--text); font-size: .75rem; }
label.filter-opt input[type="radio"] { accent-color: var(--brand); }
.gallery-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  overflow: hidden;
}
.results-head { padding: .35rem .25rem; color: var(--muted); }
.results-head p { margin: 0; }

.design-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: .9rem;
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding-bottom: .35rem;
}

.design-card { overflow: hidden; position: relative; transition: transform .2s ease, box-shadow .2s ease; }
.design-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(17,24,39,.12); }
.design-preview-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
.design-preview-trigger:focus-visible { outline: 3px solid rgba(226,83,3,.45); outline-offset: -3px; }
.design-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fff;
  display: block;
  transition: opacity .2s ease, filter .2s ease;
}

.design-thumb.is-loading {
  background:
    linear-gradient(120deg, rgba(230,234,239,.45) 15%, rgba(243,246,250,.88) 40%, rgba(230,234,239,.45) 65%),
    #f8fafc;
  background-size: 200% 100%;
  animation: thumb-shimmer 1.1s linear infinite;
  filter: saturate(.9);
}

.design-thumb.is-loaded {
  animation: none;
  filter: none;
}

.design-thumb.is-error {
  object-fit: cover;
  animation: none;
  background: #f1f4f8;
  filter: grayscale(.12);
}

@keyframes thumb-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.card-body { min-height: 2.75rem; padding: .75rem; display: flex; flex-direction: column; }
.name-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-width: 0; }
.name-row h4 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 1rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meta { font-size: .82rem; color: var(--muted); margin: .4rem 0 0; line-height: 1.35; }
.card-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; margin-top: .7rem; }

.btn {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #ff944d, var(--brand));
  border-radius: 999px;
  padding: .42rem .72rem;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 8px 16px rgba(226,83,3,.16),
    inset 0 1px 0 rgba(255,255,255,.36);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.btn:hover {
  color: #fff;
  filter: saturate(1.05) brightness(1.02);
  transform: translateY(-1px);
  box-shadow:
    0 12px 22px rgba(226,83,3,.22),
    inset 0 1px 0 rgba(255,255,255,.45);
}
.btn:disabled {
  color: #8c97a5;
  background: #f2f4f7;
  box-shadow: none;
  transform: none;
  opacity: .75;
  cursor: not-allowed;
}

.preview-modal {
  border: none;
  border-radius: 18px;
  width: min(1440px, 96vw);
  height: min(820px, 92vh);
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 95% at 10% 0%, var(--modal-glow-a), transparent 58%),
    radial-gradient(130% 110% at 100% 100%, var(--modal-glow-b), transparent 60%),
    linear-gradient(165deg, var(--modal-grad-top) 0%, var(--modal-grad-mid) 54%, var(--modal-grad-bottom) 100%);
  opacity: 0;
  transform: translateY(10px) scale(.985);
  transition:
    opacity .18s ease,
    transform .18s ease,
    background var(--theme-transition) var(--theme-ease);
}

.preview-modal.is-open { opacity: 1; transform: translateY(0) scale(1); }
.preview-modal::backdrop { background: rgba(15, 23, 42, 0); transition: background .18s ease; }
.preview-modal.is-open::backdrop { background: rgba(15, 23, 42, .66); }

.social-links-modal {
  width: min(560px, 92vw);
  height: auto;
  max-height: min(560px, 90vh);
}

.social-links-layout {
  display: grid;
  gap: .9rem;
  padding: 1.25rem 1.35rem 1.4rem;
}

.social-links-layout h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.7rem;
}

.social-section-title {
  margin: .1rem 0 0;
  color: var(--text);
  font-size: 1.15rem;
}

.social-links-layout p {
  margin: 0;
  color: var(--muted);
}

.social-hashtag-prompt {
  font-size: .86rem;
}

.social-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .65rem;
}

.social-link-chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem .7rem;
  border: 1px solid rgba(226,83,3,.18);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255,255,255,.78);
}

.social-link-chip i {
  color: var(--brand);
  font-size: 1.12rem;
}

.social-secondary-row {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.social-favicon-link {
  width: fit-content;
}

.social-favicon-mark {
  width: 18px;
  height: 18px;
  background: var(--brand);
  -webkit-mask-image: url("assets/svg/favicon.svg");
  mask-image: url("assets/svg/favicon.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.social-footer-note {
  margin-top: .35rem;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: none;
  text-align: center;
}

.social-link-chip:hover,
.social-link-chip:focus-visible {
  border-color: rgba(226,83,3,.45);
  box-shadow: 0 8px 16px rgba(226,83,3,.12);
  transform: translateY(-1px);
}

.modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: clamp(1rem, 2vw, 2rem);
  height: 100%;
  padding: clamp(1rem, 2vw, 1.5rem);
  overflow: hidden;
}

.modal-preview-pane {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 1rem;
}

.modal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

#modalTitle {
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: .95;
  font-weight: 700;
  min-width: 0;
}

.modal-recommended-logos {
  display: flex;
  flex: 0 0 auto;
  flex-direction: row-reverse;
  align-items: center;
  gap: .45rem;
  padding: .35rem .5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.82);
}

.modal-recommended-logos[hidden] { display: none; }

.modal-recommended-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-recommended-logo {
  display: block;
  width: clamp(32px, 3.75vw, 48px);
  height: clamp(32px, 3.75vw, 48px);
  object-fit: contain;
}

.modal-svg-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 2vw, 2rem) clamp(3.25rem, 6vw, 5rem);
  box-shadow: 0 5px 14px rgba(17,24,39,.12);
}

.modal-svg-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto;
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
  will-change: opacity, filter, transform;
  transition:
    filter .24s ease,
    opacity .24s ease,
    transform .24s ease;
}

.modal-svg-wrap img.is-switching {
  opacity: .38;
  transform: scale(.99);
  filter: blur(8px);
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 58px;
  height: 58px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.9);
  color: var(--text);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  display: grid;
  place-items: center;
  padding: 0 0 .1rem;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(17,24,39,.12);
}

.modal-nav:hover { background: var(--brand); color: #fff; }
.modal-nav:disabled { opacity: .35; cursor: not-allowed; background: rgba(255,255,255,.75); color: #8c97a5; }
#modalPrevView { left: 14px; }
#modalNextView { right: 14px; }

.modal-thumbnails {
  display: flex;
  gap: .65rem;
  overflow-x: auto;
  padding: .15rem .1rem .35rem;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .24s ease, transform .24s ease;
}

.modal-thumbnails.is-updating {
  opacity: 0;
  transform: translateY(8px);
}

.modal-thumb-btn {
  flex: 0 0 74px;
  width: 74px;
  height: 58px;
  position: relative;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff;
  padding: .25rem;
  cursor: pointer;
  opacity: .78;
  transform: translateY(0) scale(1);
  box-shadow: 0 3px 8px rgba(17,24,39,.12);
  display: block;
  overflow: hidden;
  transition:
    border-color .22s ease,
    box-shadow .22s ease,
    opacity .22s ease,
    transform .22s ease;
}

.modal-thumb-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8px;
  right: 8px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  opacity: .88;
  z-index: 2;
}

.modal-thumb-btn:hover,
.modal-thumb-btn:focus-visible {
  opacity: 1;
  transform: translateY(-2px) scale(1.02);
}
.modal-thumb-btn.is-active {
  border-color: var(--brand);
  opacity: 1;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 7px 16px rgba(226,83,3,.2);
}

.modal-thumb-thumbnail.is-active {
  border-color: rgba(255,149,71,1);
  box-shadow: 0 7px 16px rgba(255,149,71,.3);
}

.modal-thumb-design-element.is-active {
  border-color: rgba(74,164,232,1);
  box-shadow: 0 7px 16px rgba(74,164,232,.32);
}
.modal-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  position: relative;
  z-index: 1;
  transition: opacity .22s ease, transform .22s ease;
}
.modal-thumb-btn:hover img,
.modal-thumb-btn.is-active img { transform: scale(1.04); }

.modal-thumb-thumbnail::before {
  background: rgba(255,149,71,.9);
}

.modal-thumb-design-element::before {
  background: rgba(74,164,232,.9);
}

.modal-info-panel {
  align-self: stretch;
  min-height: 0;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 5px 14px rgba(17,24,39,.12);
  overflow-y: auto;
}

.modal-info-header,
.modal-download-row,
.info-accordion {
  border-bottom: 1px solid var(--line);
}

.modal-info-header { padding: 2rem 2rem 1.75rem; }
.modal-info-header h3 { margin: 0; font-size: 1.35rem; }
.modal-download-row { padding: 1.35rem 2rem; }
.modal-download { width: 100%; border-radius: 8px; padding: 1rem; font-size: 1.25rem; font-weight: 700; }

@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
}

.info-accordion { padding: 0; }
.info-accordion::details-content {
  block-size: 0;
  overflow: hidden;
  transition:
    block-size .28s ease,
    content-visibility .28s ease allow-discrete;
}
.info-accordion[open]::details-content { block-size: auto; }
.info-accordion summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
  padding: 1.5rem 2rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
}

.info-accordion summary::-webkit-details-marker { display: none; }
.info-accordion summary::after {
  content: "+";
  margin-left: auto;
  color: var(--muted);
  font-size: 1.4rem;
}
.info-accordion[open] summary::after { content: "−"; }

.info-icon {
  width: 38px;
  height: 38px;
  border: 3px solid #313941;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  font-style: normal;
  flex: 0 0 auto;
}

.info-accordion p,
.info-accordion ul {
  margin: 0 2rem 1.45rem;
  padding-top: .15rem;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.45;
  opacity: 0;
  transition: opacity .22s ease;
}
.info-accordion[open] p,
.info-accordion[open] ul { opacity: 1; }

.close-modal {
  border: none;
  background: rgba(255,255,255,.95);
  font-size: 2rem;
  position: absolute;
  right: 1rem;
  top: .8rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 3px 12px rgba(17,24,39,.18);
}

.pagination { display: flex; flex: 0 0 auto; justify-content: center; align-items: center; gap: .35rem; padding: .75rem 0 .1rem; }
.page-btn.is-active { background: var(--brand); color: #fff; }
.page-gap { color: var(--muted); font-weight: 700; padding: 0 .2rem; }

@media (min-width: 1600px) {
  .design-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (min-width: 2100px) {
  .design-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

@media (min-width: 2500px) {
  .design-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

@media (max-width: 1250px) {
  .design-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .modal-layout { grid-template-columns: minmax(0, 1fr) minmax(290px, 360px); }
}

@media (max-width: 980px) {
  body { display: block; overflow: auto; height: auto; }
  .layout { grid-template-columns: 1fr; height: auto; }
  .filters-panel, .gallery-panel, .filters-scroll-wrap, .design-grid { overflow: visible; }
  .gallery-panel { display: block; }
  .design-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-layout { grid-template-columns: 1fr; overflow-y: auto; }
  .modal-info-panel { min-height: auto; height: auto; }
}

@media (max-width: 640px) {
  .topbar { padding-inline: 1rem; }
  .brand-logo { height: 36px; }
  .topbar-actions {
    top: .45rem;
    right: .55rem;
    transform: none;
  }
  .topbar-action-btn,
  .theme-toggle {
    width: 2.2rem;
    height: 2.2rem;
  }
  .topbar-publish-btn {
    min-height: 2.2rem;
    padding-inline: .62rem;
    font-size: .82rem;
    gap: .34rem;
  }
  .modal-layout { padding: .75rem; }
  .modal-title-row { align-items: flex-start; padding-right: 3.25rem; }
  .modal-recommended-logos { gap: .35rem; padding: .3rem .4rem; }
  .modal-recommended-logo { width: 34px; height: 34px; }
  .modal-svg-wrap { height: 280px; padding-inline: 3rem; }
  .modal-nav { width: 44px; height: 44px; font-size: 1.45rem; }
  .modal-info-header,
  .modal-download-row,
  .info-accordion summary { padding-inline: 1rem; }
  .info-accordion p,
  .info-accordion ul { margin-left: 1rem; margin-right: 1rem; }
}

@media (max-width: 480px) {
  .filters-toolbar { align-items: stretch; flex-direction: column; }
  .design-grid { grid-template-columns: 1fr; }
  .reset-filters {
    width: 100%;
    min-width: 0;
  }
}

body.local-upload-mode .design-grid {
  padding-top: .55rem;
  padding-right: .4rem;
  padding-left: clamp(.4rem, 1.4vw, 1.25rem);
}

body.local-upload-mode .welcome {
  display: none;
}

@media (max-height: 860px) and (min-width: 981px) {
  body.local-upload-mode .design-grid {
    gap: .65rem;
    padding-top: .45rem;
  }

  body.local-upload-mode .is-editor-card .design-thumb {
    aspect-ratio: 16 / 9;
  }

  body.local-upload-mode .is-editor-card .card-body {
    padding: .48rem .55rem .5rem;
  }

  body.local-upload-mode .is-editor-card .name-row h4 {
    font-size: .93rem;
  }

  body.local-upload-mode .is-editor-card .meta {
    margin-top: .28rem;
    font-size: .75rem;
    line-height: 1.25;
    display: -webkit-box;
    line-clamp: 1;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

body.local-upload-mode .gallery-panel::before {
  content: "Local-only uploader enabled";
  position: absolute;
  top: .7rem;
  right: .75rem;
  z-index: 2;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: rgba(255,246,240,.94);
  color: var(--brand);
  font-size: .75rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(226,83,3,.12);
}

.upload-template-card {
  min-height: 100%;
  border: 2px dashed rgba(226,83,3,.5);
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,246,240,.96));
}

.new-design-template {
  width: 100%;
  height: 100%;
  min-height: 206px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: .5rem;
  border: 0;
  padding: 1rem;
  color: var(--brand);
  background: transparent;
  cursor: pointer;
  text-align: center;
}

.new-design-template strong {
  color: var(--text);
  font-size: 1.05rem;
}

.new-design-template span:last-child {
  max-width: 18ch;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.35;
}

.template-plus {
  width: 58px;
  height: 58px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--brand);
  background: #fff;
  color: var(--brand);
  font-size: 2.35rem;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(226,83,3,.16);
}

.is-editor-card .card-body {
  min-height: 0;
  padding: .58rem .65rem;
}

.is-editor-card .card-actions {
  position: absolute;
  top: .45rem;
  right: .45rem;
  z-index: 2;
  justify-content: flex-end;
  gap: .35rem;
  margin-top: 0;
}

.edit-design,
.delete-design {
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: .78rem;
  line-height: 1;
}

.edit-filter-options {
  min-width: 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: .95rem;
}

.design-editor-modal {
  width: min(1500px, calc(100vw - 2rem));
}

.editor-layout {
  grid-template-columns: minmax(0, 1fr) minmax(520px, 680px);
  gap: clamp(.75rem, 1.2vw, 1.25rem);
  padding: clamp(1rem, 1.4vw, 1.25rem) .75rem clamp(1rem, 1.4vw, 1.25rem) clamp(1rem, 1.4vw, 1.25rem);
}

.design-editor-modal .modal-preview-pane {
  grid-template-rows: auto minmax(0, 1fr);
}

.editor-title-row {
  display: grid;
  gap: .35rem;
}

.editor-eyebrow,
.editor-help {
  margin: 0;
  color: var(--muted);
}

.editor-eyebrow {
  color: var(--brand);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

#editorModalTitle {
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
}

.editor-preview-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  min-height: 0;
}

.editor-preview-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 260px;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(17,24,39,.1);
}

.editor-preview-card > span {
  margin-bottom: .75rem;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
}

.editor-preview-image-wrap {
  position: relative;
  display: grid;
  min-height: 180px;
  min-width: 0;
}

.editor-preview-card img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  border: 1px solid #eef0f3;
  border-radius: 8px;
  background: #fff;
  transition: opacity .18s ease, filter .18s ease;
}

.editor-preview-card img.is-switching {
  opacity: .3;
  filter: blur(4px);
}

.editor-preview-card img[hidden] {
  display: block;
  opacity: 0;
}


.asset-file-list {
  position: relative;
  z-index: 5;
  display: grid;
  gap: .35rem;
  max-height: 108px;
  overflow-y: auto;
  margin-top: .65rem;
  padding: .45rem;
  border: 1px solid rgba(226,83,3,.16);
  border-radius: 14px;
  background: rgba(255,255,255,.72);
}

.asset-insertion-indicator {
  position: absolute;
  left: .55rem;
  right: .55rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(226,83,3,.75), rgba(226,83,3,.35));
  box-shadow: 0 0 0 1px rgba(226,83,3,.18), 0 0 12px rgba(226,83,3,.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-1px) scaleX(.92);
  transform-origin: center;
  transition: opacity .12s ease, transform .14s ease;
}

.asset-insertion-indicator.is-visible {
  opacity: 1;
  transform: translateY(-1px) scaleX(1);
}

.asset-insertion-indicator.is-at-start {
  background: linear-gradient(90deg, rgba(21,128,61,.8), rgba(34,197,94,.5));
  box-shadow: 0 0 0 1px rgba(21,128,61,.2), 0 0 12px rgba(34,197,94,.24);
}

.asset-insertion-indicator.is-at-end {
  background: linear-gradient(90deg, rgba(30,64,175,.78), rgba(59,130,246,.48));
  box-shadow: 0 0 0 1px rgba(30,64,175,.2), 0 0 12px rgba(59,130,246,.24);
}

.asset-file-list p {
  margin: 0;
  padding: .35rem;
  text-align: center;
  color: var(--muted);
  font-size: .78rem;
}

.asset-file-pill {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto auto;
  align-items: center;
  gap: .45rem;
  min-width: 0;
  padding: .38rem .45rem .38rem .6rem;
  border: 1px solid rgba(226,83,3,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  color: var(--text);
  font-size: .78rem;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.asset-file-pill:hover,
.asset-file-pill:focus-visible {
  cursor: grab;
}

.asset-file-pill.is-dragging {
  cursor: grabbing;
  opacity: .72;
}

.asset-file-pill.is-dragging * {
  cursor: grabbing;
}

.asset-file-pill.is-drop-target {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(226,83,3,.35);
}

.asset-file-drag-handle {
  color: var(--brand);
  cursor: grab;
  display: inline-block;
  width: 1.05rem;
  font-size: .78rem;
  text-align: center;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .16s ease, transform .16s ease;
  user-select: none;
}

.asset-file-pill:hover .asset-file-drag-handle,
.asset-file-pill:focus-visible .asset-file-drag-handle,
.asset-file-pill.is-dragging .asset-file-drag-handle {
  opacity: 1;
  transform: translateX(0);
}

.asset-file-pill.is-active {
  border-color: rgba(226,83,3,.55);
  background: rgba(226,83,3,.08);
}

.asset-file-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-file-name-input {
  display: none;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(226,83,3,.35);
  border-radius: 7px;
  padding: .2rem .4rem;
  color: #1f2937;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .01em;
  -webkit-text-fill-color: #1f2937;
  caret-color: #111827;
  background: #ffffff;
  opacity: 1;
  text-shadow: 0 0 0 transparent;
}

.asset-file-name-input::placeholder {
  color: #6b7280;
  opacity: 1;
}

.asset-file-name-input:focus {
  outline: 2px solid rgba(226,83,3,.3);
  outline-offset: 1px;
}

.asset-file-pill.is-editing {
  cursor: default;
}

.asset-file-pill.is-editing .asset-file-label,
.asset-file-pill.is-editing .asset-file-drag-handle,
.asset-file-pill.is-editing .asset-file-edit,
.asset-file-pill.is-editing small,
.asset-file-pill.is-editing .asset-file-remove {
  display: none;
}

.asset-file-pill.is-editing .asset-file-name-input {
  display: block;
}

.asset-file-edit,
.asset-file-save {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(226,83,3,.22);
  color: var(--brand);
  background: rgba(226,83,3,.08);
  cursor: pointer;
}

.asset-file-save {
  display: none;
  min-width: 48px;
  padding: 0 .45rem;
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
  font-size: .72rem;
  font-weight: 700;
}

.asset-file-pill.is-editing .asset-file-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.asset-file-pill small {
  color: var(--muted);
  white-space: nowrap;
}

.asset-file-remove {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  cursor: pointer;
  line-height: 1;
  font-size: .7rem;
}
.editor-fields {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  padding-bottom: 0;
}

.editor-fields-header {
  position: relative;
  padding: 1.25rem 4.5rem 1.15rem 1.5rem;
}

.editor-fields-header h3 {
  font-size: 1.55rem;
  line-height: 1.1;
}

.editor-fields-scroll {
  display: grid;
  align-content: start;
  gap: 1rem;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem 0 1.25rem;
}

.editor-fields label {
  display: grid;
  gap: .35rem;
  padding: 0 1.25rem;
  color: var(--text);
  font-size: .95rem;
  font-weight: 700;
}

.editor-fields input,
.editor-fields textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: .65rem .75rem;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 400;
}

.editor-fields textarea {
  resize: vertical;
}

.field-help {
  color: var(--muted);
  font-size: .84rem;
  font-weight: 500;
  line-height: 1.35;
}

.file-field input {
  padding: .55rem;
  background: #fff;
}

.editor-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .65rem;
  padding: .25rem 1.25rem 0;
}

.design-editor-modal .close-modal {
  top: .35rem;
  right: .45rem;
}

.editor-output {
  min-height: 0;
  overflow: auto;
  padding: .85rem 1rem;
  border: 1px solid rgba(226,83,3,.22);
  border-radius: 10px;
  color: var(--text);
  background: rgba(226,83,3,.08);
}

.editor-output.is-success {
  color: #1f5a33;
  border-color: rgba(46,160,67,.28);
  background: rgba(46,160,67,.12);
}

.editor-output.is-error {
  color: #842029;
  border-color: rgba(220,53,69,.32);
  background: rgba(220,53,69,.12);
}

.editor-output strong {
  color: inherit;
}

.editor-output:empty {
  display: none;
}

.editor-output p {
  margin: .45rem 0;
  line-height: 1.4;
}

.editor-output pre {
  max-height: 180px;
  overflow: auto;
  margin: .75rem 0 0;
  padding: .75rem;
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 8px;
  background: rgba(255,255,255,.8);
  color: var(--text);
  font-size: .78rem;
}

@media (max-width: 980px) {
  .editor-layout,
  .editor-preview-stack {
    grid-template-columns: 1fr;
  }

  .editor-layout {
    overflow-y: auto;
    padding: clamp(1rem, 2vw, 1.5rem);
  }

  .editor-fields {
    min-height: min(680px, 80vh);
  }
}

@media (max-width: 640px) {
  .editor-actions {
    grid-template-columns: 1fr;
  }
}

.local-repo-panel {
  display: grid;
  gap: .45rem;
}

.local-repo-panel[hidden] {
  display: none;
}

.repo-eyebrow,
.repo-help {
  margin: 0;
}

.repo-eyebrow {
  color: var(--brand);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.local-repo-panel h2 {
  margin: 0;
  font-size: 1.15rem;
}

.repo-help {
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.35;
}

.repo-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .55rem;
  align-items: center;
  margin-top: .25rem;
}

.repo-folder-status {
  min-width: 0;
  color: #31513a;
  font-size: .82rem;
  overflow-wrap: anywhere;
}

.repo-folder-status.is-error {
  color: #a12622;
}

.delete-design {
  border-color: #b42318;
  color: #b42318;
}

.delete-design:hover {
  background: #b42318;
  color: #fff;
}

@media (max-width: 480px) {
  .repo-actions {
    grid-template-columns: 1fr;
  }
}

.tag-editor {
  display: grid;
  gap: .5rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  min-height: 2rem;
}

.editor-tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid rgba(226,83,3,.35);
  border-radius: 999px;
  padding: .32rem .55rem;
  color: var(--brand);
  background: rgba(226,83,3,.08);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
}

.editor-tag:hover,
.editor-tag:focus-visible {
  color: #fff;
  background: var(--brand);
}

.tag-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .45rem;
}

.tag-add {
  align-self: stretch;
  min-width: 58px;
  border-radius: 9px;
  font-weight: 700;
}

@media (max-width: 480px) {
  .tag-input-row {
    grid-template-columns: 1fr;
  }
}

.edit-filter-options[hidden] {
  display: none;
}

.filter-options-modal {
  width: min(900px, 94vw);
  height: min(760px, 90vh);
}

.filter-options-layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr) auto auto;
  gap: 1rem;
  height: 100%;
  padding: clamp(1rem, 2vw, 1.5rem);
  overflow-y: auto;
}

.filter-options-header h2,
.filter-options-header p {
  margin: 0;
}

.filter-options-header {
  display: grid;
  gap: .4rem;
}

.filter-options-header h2 {
  color: var(--text);
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1;
}

.filter-options-header p:not(.editor-eyebrow) {
  color: var(--muted);
  line-height: 1.4;
}

.filter-option-section {
  display: grid;
  align-content: start;
  gap: .7rem;
  min-height: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(17,24,39,.08);
}

.filter-option-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
}

.option-tag-list {
  align-content: start;
  max-height: 180px;
  overflow-y: auto;
  padding: .1rem;
}

.filter-options-actions {
  padding: 0;
}

.tag-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  max-height: 96px;
  overflow-y: auto;
  padding: .15rem .05rem;
}

.tag-suggestion {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .28rem .52rem;
  color: var(--text);
  background: #fff;
  font-size: .78rem;
  cursor: pointer;
}

.tag-suggestion:hover,
.tag-suggestion:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(226,83,3,.08);
}

.tag-suggestions:empty {
  display: none;
}

.upload-drop-zone {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226,83,3,.18);
  background:
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,246,240,.82)),
    radial-gradient(circle at 20% 0%, rgba(226,83,3,.16), transparent 32%);
  transition:
    border-color .22s ease,
    box-shadow .22s ease,
    transform .22s ease,
    background .22s ease;
}

.upload-drop-zone::before {
  content: "";
  position: absolute;
  inset: -40% -25% auto;
  height: 72%;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.7), rgba(255,255,255,0) 60%);
  transform: rotate(-8deg);
  z-index: 1;
}

.editor-preview-image-wrap.is-dragging .upload-overlay {
  border-color: var(--brand);
  box-shadow:
    0 0 0 4px rgba(226,83,3,.18),
    inset 0 0 0 1px rgba(226,83,3,.18);
}

.upload-drop-zone.is-loading,
.upload-drop-zone.is-loaded {
  border-color: rgba(226,83,3,.58);
}

.editor-preview-image-wrap.is-error .upload-overlay {
  border-color: #c0392b;
  box-shadow: 0 0 0 4px rgba(192,57,43,.16);
}

.upload-drop-zone img {
  position: relative;
  z-index: 2;
}

.upload-drop-zone.has-file .upload-overlay {
  opacity: 0;
  transform: translateY(8px) scale(.98);
}

.upload-drop-zone.has-file .editor-preview-image-wrap:hover .upload-overlay,
.upload-drop-zone.has-file .editor-preview-image-wrap:focus-within .upload-overlay,
.editor-preview-image-wrap.is-dragging .upload-overlay {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.preview-file-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: .35rem;
  border: 1px dashed rgba(226,83,3,.45);
  border-radius: 14px;
  color: var(--brand);
  background: rgba(255,255,255,.76);
  backdrop-filter: blur(8px);
  cursor: pointer;
  text-align: center;
  transition:
    opacity .22s ease,
    transform .22s ease,
    border-color .22s ease,
    background .22s ease,
    box-shadow .22s ease;
}

.upload-overlay:hover,
.editor-preview-image-wrap.is-dragging .upload-overlay {
  border-color: var(--brand);
  background: rgba(255,246,240,.9);
  box-shadow: inset 0 0 0 1px rgba(226,83,3,.18);
}

.upload-overlay strong {
  color: var(--text);
  font-size: 1rem;
}

.upload-overlay small {
  color: var(--muted);
  font-size: .78rem;
}

.upload-plus {
  width: 64px;
  height: 64px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #ff8a3d, var(--brand));
  font-size: 2.5rem;
  line-height: 1;
  box-shadow:
    0 12px 24px rgba(226,83,3,.28),
    inset 0 1px 0 rgba(255,255,255,.55);
}

.upload-progress {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: .8rem;
  z-index: 4;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(226,83,3,.12);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease;
}

.upload-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffb07a, var(--brand));
  box-shadow: 0 0 12px rgba(226,83,3,.4);
}

.upload-drop-zone.is-loading .upload-progress,
.upload-drop-zone.is-loaded .upload-progress {
  opacity: 1;
  transform: translateY(0);
}

.upload-drop-zone.is-loading .upload-progress span {
  animation: uploadProgress .52s ease forwards;
}

.upload-drop-zone.is-loaded .upload-progress span {
  width: 100%;
}

@keyframes uploadProgress {
  0% { width: 0; }
  55% { width: 72%; }
  100% { width: 100%; }
}

.close-modal:active,
.close-modal.is-clicked {
  color: var(--brand);
  box-shadow:
    0 0 0 4px rgba(226,83,3,.18),
    0 0 26px rgba(226,83,3,.55),
    0 3px 12px rgba(17,24,39,.18);
}

.upload-overlay {
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(255,248,244,.78));
}

.upload-overlay:hover,
.editor-preview-image-wrap.is-dragging .upload-overlay {
  background: linear-gradient(145deg, rgba(255,252,250,.94), rgba(255,239,230,.84));
}

.upload-plus {
  width: 82px;
  height: 82px;
  color: #9f3900;
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,.92), rgba(255,255,255,.25) 34%, transparent 35%),
    linear-gradient(135deg, #ffe2cc 0%, #ffc08f 48%, #ff9a57 100%);
  font-size: 3.15rem;
  box-shadow:
    0 16px 30px rgba(226,83,3,.18),
    inset 0 2px 0 rgba(255,255,255,.72),
    inset 0 -10px 20px rgba(226,83,3,.1);
}

.persist-settings-summary {
  display: grid;
  gap: .25rem;
  margin-top: .35rem;
  padding: .65rem .75rem;
  border: 1px solid rgba(226,83,3,.16);
  border-radius: 10px;
  color: #374151;
  background: rgba(255,246,240,.72);
  font-size: .82rem;
  overflow-wrap: anywhere;
}

.persist-settings-summary[hidden] {
  display: none;
}

.persist-settings-modal {
  width: min(720px, 94vw);
  height: auto;
  max-height: min(620px, 90vh);
}

.publish-modal {
  width: min(760px, 94vw);
  height: auto;
  max-height: min(700px, 92vh);
}

.publish-layout {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.5rem);
}

.publish-layout label {
  display: grid;
  gap: .35rem;
  color: #374151;
  font-size: .92rem;
  font-weight: 700;
}

.publish-layout input,
.publish-layout textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: .75rem .85rem;
  color: var(--text);
  font-size: .95rem;
  font-weight: 400;
}

.publish-layout textarea {
  resize: vertical;
}

.publish-help {
  color: var(--muted);
  line-height: 1.4;
}

.publish-actions {
  padding: 0;
}

.persist-settings-layout {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.5rem);
}

.persist-settings-layout label {
  display: grid;
  gap: .35rem;
  color: #374151;
  font-size: .9rem;
  font-weight: 700;
}

.persist-settings-layout input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: .75rem .85rem;
  color: var(--text);
  font-size: .95rem;
  font-weight: 400;
}

.upload-plus {
  width: 62px;
  height: 62px;
  color: #a8470d;
  background:
    radial-gradient(circle at 32% 24%, rgba(255,255,255,.95), rgba(255,255,255,.45) 34%, transparent 36%),
    linear-gradient(145deg, #fff1e5 0%, #ffd8ba 50%, #ffbd88 100%);
  font-size: 3.4rem;
  font-weight: 400;
  box-shadow:
    0 12px 24px rgba(226,83,3,.14),
    inset 0 2px 0 rgba(255,255,255,.78),
    inset 0 -8px 18px rgba(226,83,3,.08);
}

.local-repo-panel .btn,
.persist-settings-layout .btn {
  border: 0;
  border-radius: 12px;
  padding: .68rem .95rem;
  color: #fff;
  background: linear-gradient(135deg, #ff944d, var(--brand));
  font-weight: 700;
  box-shadow:
    0 9px 18px rgba(226,83,3,.18),
    inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.local-repo-panel .btn:hover,
.persist-settings-layout .btn:hover {
  color: #fff;
  filter: saturate(1.05) brightness(1.02);
  transform: translateY(-1px);
  box-shadow:
    0 13px 24px rgba(226,83,3,.24),
    inset 0 1px 0 rgba(255,255,255,.45);
}

.local-repo-panel .btn:disabled,
.persist-settings-layout .btn:disabled {
  color: #8c97a5;
  background: #f2f4f7;
  box-shadow: none;
  transform: none;
}

.persist-picker-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid rgba(226,83,3,.16);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,246,240,.78)),
    radial-gradient(circle at top right, rgba(226,83,3,.12), transparent 42%);
  box-shadow: 0 10px 24px rgba(17,24,39,.08);
}

.persist-picker-card p,
.persist-picker-card strong {
  margin: .2rem 0 0;
}

.persist-picker-card strong {
  display: block;
  color: var(--text);
  overflow-wrap: anywhere;
}

.persist-picker-card p {
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.35;
}

.persist-field-label {
  color: var(--brand);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.persist-plus-button {
  width: 58px;
  height: 58px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #9f3900;
  background:
    radial-gradient(circle at 34% 24%, rgba(255,255,255,.96), rgba(255,255,255,.46) 34%, transparent 36%),
    linear-gradient(145deg, #fff3e8, #ffc99f);
  cursor: pointer;
  font-size: 2.9rem;
  line-height: 1;
  box-shadow:
    0 12px 22px rgba(226,83,3,.16),
    inset 0 2px 0 rgba(255,255,255,.75);
  transition: transform .18s ease, box-shadow .18s ease;
}

.persist-plus-button:hover,
.persist-plus-button:focus-visible {
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 16px 28px rgba(226,83,3,.22),
    0 0 0 4px rgba(226,83,3,.12),
    inset 0 2px 0 rgba(255,255,255,.82);
}

.persist-file-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .65rem;
  align-items: center;
}

.persist-file-actions span {
  color: var(--muted);
  font-size: .85rem;
  overflow-wrap: anywhere;
}

.upload-plus {
  width: 54px;
  height: 54px;
  color: #9a3d05;
  background:
    radial-gradient(circle at 34% 25%, rgba(255,255,255,.98), rgba(255,255,255,.58) 32%, transparent 35%),
    linear-gradient(145deg, #fff6ef 0%, #ffd9bd 55%, #ffbf8f 100%);
  font-size: 3.65rem;
  font-weight: 300;
  box-shadow:
    0 10px 20px rgba(226,83,3,.13),
    inset 0 2px 0 rgba(255,255,255,.82),
    inset 0 -7px 14px rgba(226,83,3,.07);
}

@media (max-width: 480px) {
  .persist-picker-card,
  .persist-file-actions {
    grid-template-columns: 1fr;
  }
}


.upload-plus {
  width: 48px;
  height: 48px;
  color: #9a3d05;
  background:
    radial-gradient(circle at 34% 25%, rgba(255,255,255,.98), rgba(255,255,255,.62) 32%, transparent 35%),
    linear-gradient(145deg, #fff8f2 0%, #ffdfc8 58%, #ffc79a 100%);
  font-size: 3.7rem;
  font-weight: 300;
  box-shadow:
    0 9px 18px rgba(226,83,3,.12),
    inset 0 2px 0 rgba(255,255,255,.86),
    inset 0 -6px 12px rgba(226,83,3,.06);
}

/* Latest local-mode UI refinements */
.persist-choice-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.persist-choice-panel[hidden],
.persist-settings-details[hidden] {
  display: none;
}

.persist-choice-button {
  min-height: 92px;
  border-radius: 18px;
  font-size: 1rem;
  letter-spacing: .01em;
}

.persist-settings-details {
  display: grid;
  gap: 1rem;
}

.upload-plus,
.persist-plus-button,
.template-plus {
  width: 58px;
  height: 58px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #9f3900;
  background:
    radial-gradient(circle at 34% 24%, rgba(255,255,255,.96), rgba(255,255,255,.46) 34%, transparent 36%),
    linear-gradient(145deg, #fff3e8, #ffc99f);
  cursor: pointer;
  font-size: 2.9rem;
  font-weight: 300;
  line-height: 1;
  box-shadow:
    0 12px 22px rgba(226,83,3,.16),
    inset 0 2px 0 rgba(255,255,255,.75);
  transition: transform .18s ease, box-shadow .18s ease;
}

.upload-plus:hover,
.upload-plus:focus-visible,
.persist-plus-button:hover,
.persist-plus-button:focus-visible,
.new-design-template:hover .template-plus,
.new-design-template:focus-visible .template-plus {
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 16px 28px rgba(226,83,3,.22),
    0 0 0 4px rgba(226,83,3,.12),
    inset 0 2px 0 rgba(255,255,255,.82);
}

.page-btn,
.edit-design,
.delete-design {
  border: 1px solid rgba(226,83,3,.36);
  color: var(--brand);
  background: rgba(255,255,255,.96);
  box-shadow: 0 4px 10px rgba(17,24,39,.06);
  filter: none;
}

.page-btn:hover,
.edit-design:hover {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 6px 14px rgba(226,83,3,.16);
  filter: none;
}

.page-btn.is-active {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 6px 14px rgba(226,83,3,.14);
}

.delete-design {
  border-color: rgba(180,35,24,.42);
  color: #b42318;
}

.delete-design:hover {
  color: #fff;
  background: #b42318;
  box-shadow: 0 6px 14px rgba(180,35,24,.16);
  filter: none;
}

@media (max-width: 560px) {
  .persist-choice-panel {
    grid-template-columns: 1fr;
  }
}

/* Compact settings navigation and snug gallery transitions */
.persist-choice-panel {
  align-items: stretch;
  gap: .65rem;
}

.persist-choice-button {
  min-height: auto;
  padding: .72rem .9rem;
  border-radius: 14px;
  font-size: .9rem;
}

.persist-settings-actions {
  gap: .5rem;
  justify-content: flex-end;
}

.persist-settings-actions .btn {
  min-width: 0;
  padding: .62rem .9rem;
  border-radius: 12px;
}

.persist-back-button {
  color: var(--brand);
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(226,83,3,.26);
  box-shadow: 0 5px 12px rgba(17,24,39,.06);
}

.persist-back-button:hover,
.persist-back-button:focus-visible {
  color: var(--brand);
  background: #fff7f1;
  box-shadow: 0 8px 18px rgba(226,83,3,.13);
}

.design-grid.is-transitioning .design-card {
  animation: snugCardIn .26s cubic-bezier(.2, .78, .28, 1) both;
  animation-delay: calc(var(--card-index, 0) * 24ms);
}

@keyframes snugCardIn {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(10px) scale(.985);
  }

  70% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(-1px) scale(1.003);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .design-grid.is-transitioning .design-card {
    animation: none;
  }
}

/* Settings detail navigation refinements */
.persist-settings-header {
  position: relative;
  padding-left: 3.4rem;
}

.persist-settings-header .persist-back-button {
  position: absolute;
  left: 0;
  top: 2.15rem;
}

.persist-back-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(226,83,3,.22);
  border-radius: 50%;
  padding: 0;
  color: var(--brand);
  background:
    radial-gradient(circle at 34% 24%, rgba(255,255,255,.96), rgba(255,255,255,.54) 34%, transparent 36%),
    linear-gradient(145deg, #fff7f0, #ffe0c8);
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  box-shadow:
    0 10px 20px rgba(226,83,3,.12),
    inset 0 2px 0 rgba(255,255,255,.8);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.persist-back-button:hover,
.persist-back-button:focus-visible {
  color: var(--brand);
  background:
    radial-gradient(circle at 34% 24%, rgba(255,255,255,.98), rgba(255,255,255,.58) 34%, transparent 36%),
    linear-gradient(145deg, #fff9f5, #ffd2ad);
  transform: translateX(-1px) scale(1.04);
  box-shadow:
    0 13px 24px rgba(226,83,3,.18),
    0 0 0 4px rgba(226,83,3,.1),
    inset 0 2px 0 rgba(255,255,255,.86);
}

.persist-settings-modal .persist-choice-panel,
.persist-settings-modal .persist-settings-details,
.persist-settings-modal .persist-settings-actions,
.persist-settings-modal .editor-output {
  animation: persistPanelIn .22s cubic-bezier(.2, .78, .28, 1) both;
}

.persist-settings-modal.is-details-view .persist-settings-details {
  animation-duration: .26s;
}

@keyframes persistPanelIn {
  from {
    opacity: 0;
    filter: blur(3px);
    transform: translateY(8px) scale(.992);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

.upload-overlay .persist-plus-button {
  pointer-events: none;
}

@media (max-width: 560px) {
  .persist-settings-header {
    padding-left: 0;
    padding-top: 3rem;
  }

  .persist-settings-header .persist-back-button {
    top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .persist-settings-modal .persist-choice-panel,
  .persist-settings-modal .persist-settings-details,
  .persist-settings-modal .persist-settings-actions,
  .persist-settings-modal .editor-output {
    animation: none;
  }
}

/* Final settings path/back placement polish */
.persist-settings-header {
  padding-left: 0;
}

.persist-settings-layout > .persist-back-button {
  position: static;
  justify-self: start;
  margin-top: -.35rem;
  margin-bottom: -.25rem;
}

.persist-settings-header .persist-back-button {
  position: static;
  left: auto;
  top: auto;
}

.persist-settings-modal .persist-choice-panel,
.persist-settings-modal .persist-settings-details,
.persist-settings-modal .persist-settings-actions,
.persist-settings-modal .editor-output {
  animation-duration: .3s;
  animation-timing-function: cubic-bezier(.18, .84, .26, 1);
}

.persist-settings-modal.is-details-view .persist-settings-details {
  animation-duration: .34s;
}

.persist-settings-layout input#persistRepoPath {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88rem;
}

/* Latest settings/upload/filter polish */
.upload-overlay .persist-plus-button {
  width: 58px;
  height: 58px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #9f3900;
  background:
    radial-gradient(circle at 34% 24%, rgba(255,255,255,.96), rgba(255,255,255,.46) 34%, transparent 36%),
    linear-gradient(145deg, #fff3e8, #ffc99f);
  font-size: 2.9rem;
  font-weight: 300;
  line-height: 1;
  box-shadow:
    0 12px 22px rgba(226,83,3,.16),
    inset 0 2px 0 rgba(255,255,255,.75);
}

.filter-options-modal .tag-input-row input {
  border-radius: 999px;
  padding-inline: .95rem;
  box-shadow: inset 0 1px 2px rgba(17,24,39,.04);
}

body.theme-dark {
  --bg: #0f1419;
  --bg-grad-start: #141b22;
  --bg-grad-end: #0d1218;
  --brand-glow-alpha: .18;
  --modal-grad-top: #222b37;
  --modal-grad-mid: #1b2430;
  --modal-grad-bottom: #131b24;
  --modal-glow-a: rgba(255,148,77,.3);
  --modal-glow-b: rgba(255,197,146,.16);
  --scrollbar-track: rgba(157,170,183,.16);
  --scrollbar-thumb: rgba(255,176,122,.62);
  --scrollbar-thumb-hover: rgba(255,176,122,.78);
  --panel: #172029;
  --text: #e6edf3;
  --muted: #9daab7;
  --line: #2f3a46;
}

body.theme-dark .brand-logo {
  filter: brightness(0) saturate(100%) invert(100%) contrast(120%);
}

body.theme-dark .filters-panel,
body.theme-dark .gallery-panel {
  background: rgba(17,24,31,.88);
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
}

body.theme-dark .card,
body.theme-dark .modal-info-panel,
body.theme-dark .modal-svg-wrap,
body.theme-dark .editor-preview-card,
body.theme-dark .filter-option-section,
body.theme-dark .persist-picker-card {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: 0 8px 22px rgba(0,0,0,.22);
}

body.theme-dark .preview-modal {
  background:
    radial-gradient(115% 90% at 8% -10%, var(--modal-glow-a), transparent 58%),
    radial-gradient(130% 100% at 96% 104%, var(--modal-glow-b), transparent 64%),
    linear-gradient(158deg, var(--modal-grad-top) 0%, var(--modal-grad-mid) 52%, var(--modal-grad-bottom) 100%);
}

body.theme-dark .design-preview-trigger,
body.theme-dark .design-thumb,
body.theme-dark .modal-thumb-btn,
body.theme-dark .tag-suggestion,
body.theme-dark .persist-back-button,
body.theme-dark .topbar-action-btn,
body.theme-dark .topbar-publish-btn,
body.theme-dark .theme-toggle,
body.theme-dark .asset-file-pill {
  background: #1d2731;
  border-color: var(--line);
  color: var(--text);
}

body.theme-dark .social-link-chip {
  border-color: rgba(173,187,201,.34);
  background: linear-gradient(165deg, rgba(18,27,37,.95), rgba(14,21,30,.9));
  color: var(--text);
}

body.theme-dark .social-link-chip:hover,
body.theme-dark .social-link-chip:focus-visible {
  border-color: rgba(226,83,3,.6);
  box-shadow: 0 10px 20px rgba(0,0,0,.32);
}

body.theme-dark .modal-thumb-btn::before {
  opacity: 1;
}

body.theme-dark .modal-thumb-thumbnail::before {
  background: rgba(255,149,71,1);
  box-shadow: 0 0 8px rgba(255,149,71,.5);
}

body.theme-dark .modal-thumb-design-element::before {
  background: rgba(100,188,255,1);
  box-shadow: 0 0 8px rgba(100,188,255,.45);
}

body.theme-dark .modal-thumb-thumbnail.is-active {
  border-color: rgba(255,169,108,1);
  box-shadow: 0 0 0 1px rgba(255,169,108,.42), 0 7px 16px rgba(255,149,71,.38);
}

body.theme-dark .modal-thumb-design-element.is-active {
  border-color: rgba(100,188,255,1);
  box-shadow: 0 0 0 1px rgba(100,188,255,.4), 0 7px 16px rgba(100,188,255,.36);
}

body.theme-dark .asset-file-pill.is-active {
  border-color: #ffb07a;
  background: linear-gradient(135deg, rgba(226,83,3,.36), rgba(226,83,3,.18));
  box-shadow:
    0 0 0 1px rgba(255,176,122,.55),
    0 0 0 4px rgba(226,83,3,.2),
    0 6px 14px rgba(0,0,0,.3);
  transform: translateX(1px);
}

body.theme-dark .asset-file-pill.is-active span,
body.theme-dark .asset-file-pill.is-active small {
  color: #fff3e8;
}

body.theme-dark .asset-file-pill.is-drop-target {
  border-color: #ffb07a;
  box-shadow:
    inset 0 0 0 1px rgba(255,176,122,.65),
    0 0 0 3px rgba(226,83,3,.18);
}

body.theme-dark #modalTitle,
body.theme-dark #editorModalTitle,
body.theme-dark .filter-options-header h2,
body.theme-dark .editor-fields label,
body.theme-dark label.filter-opt,
body.theme-dark .publish-layout label,
body.theme-dark .persist-settings-layout label,
body.theme-dark .persist-settings-summary {
  color: var(--text);
}

body.theme-dark .publish-header .editor-eyebrow,
body.theme-dark .publish-help {
  color: #d2dde8;
}

body.theme-dark .info-icon {
  border-color: #8ea0b2;
}

body.theme-dark .info-accordion p,
body.theme-dark .info-accordion ul,
body.theme-dark .persist-file-actions span,
body.theme-dark .asset-file-pill small,
body.theme-dark .new-design-template span:last-child,
body.theme-dark .repo-help,
body.theme-dark .results-head {
  color: var(--muted);
}

body.theme-dark .repo-folder-status {
  color: #9fd8ad;
}

body.theme-dark .editor-fields input,
body.theme-dark .editor-fields textarea,
body.theme-dark .persist-settings-layout input,
body.theme-dark .publish-layout input,
body.theme-dark .publish-layout textarea,
body.theme-dark input[type="search"],
body.theme-dark .filter-options-modal .tag-input-row input {
  background: #223141;
  color: var(--text);
  border-color: #5d6f82;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.03);
  caret-color: #ffd2ad;
}

body.theme-dark .editor-fields input::placeholder,
body.theme-dark .editor-fields textarea::placeholder,
body.theme-dark .persist-settings-layout input::placeholder,
body.theme-dark .publish-layout input::placeholder,
body.theme-dark .publish-layout textarea::placeholder,
body.theme-dark input[type="search"]::placeholder,
body.theme-dark .filter-options-modal .tag-input-row input::placeholder {
  color: #b8c4cf;
  opacity: 1;
}

body.theme-dark .editor-fields input:focus,
body.theme-dark .editor-fields textarea:focus,
body.theme-dark .persist-settings-layout input:focus,
body.theme-dark .publish-layout input:focus,
body.theme-dark .publish-layout textarea:focus,
body.theme-dark input[type="search"]:focus,
body.theme-dark .filter-options-modal .tag-input-row input:focus {
  outline: none;
  border-color: #ffb07a;
  box-shadow:
    0 0 0 3px rgba(226,83,3,.2),
    inset 0 1px 1px rgba(255,255,255,.05);
}

body.theme-dark .modal-nav {
  background: rgba(26,34,43,.95);
  color: var(--text);
}

body.theme-dark .modal-nav:hover {
  color: #fff;
  background: var(--brand);
}

body.theme-dark .upload-overlay,
body.theme-dark .asset-file-list,
body.theme-dark .persist-settings-summary,
body.theme-dark .modal-recommended-logos {
  background: rgba(18,25,32,.86);
  border-color: rgba(255,255,255,.12);
}

body.theme-dark .upload-drop-zone {
  border-color: rgba(226,83,3,.35);
  background:
    linear-gradient(145deg, rgba(24,33,42,.96), rgba(17,25,33,.92)),
    radial-gradient(circle at 20% 0%, rgba(226,83,3,.18), transparent 34%);
}

body.theme-dark .editor-preview-image-wrap {
  border-radius: 10px;
  background: linear-gradient(165deg, rgba(16,24,32,.92), rgba(12,18,24,.9));
}

body.theme-dark .editor-preview-card img {
  border-color: #3d4a58;
  background: #101821;
}

body.theme-dark .upload-drop-zone::before {
  background: linear-gradient(120deg, rgba(255,255,255,.12), rgba(255,255,255,0) 62%);
}

body.theme-dark .editor-output {
  color: var(--text);
  border-color: rgba(173,187,201,.36);
  background:
    linear-gradient(165deg, rgba(33,46,58,.92), rgba(22,31,40,.9));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 8px 18px rgba(0,0,0,.2);
}

body.theme-dark .editor-output.is-success {
  color: #e9fff0;
  border-color: rgba(111,206,138,.5);
  background:
    linear-gradient(165deg, rgba(39,109,62,.36), rgba(26,72,43,.32));
}

body.theme-dark .editor-output.is-error {
  color: #ffe9ec;
  border-color: rgba(255,138,154,.5);
  background:
    linear-gradient(165deg, rgba(147,47,63,.38), rgba(94,32,43,.34));
}

body.theme-dark .editor-output p {
  color: #d6e1ea;
}

body.theme-dark .editor-output strong {
  color: #f5fbff;
}

body.theme-dark .editor-output pre {
  border-color: rgba(173,187,201,.32);
  background: linear-gradient(165deg, rgba(12,18,24,.94), rgba(16,24,32,.9));
  color: #f0f6fc;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

body.theme-dark .editor-output code {
  color: #f7fbff;
  background: rgba(255,255,255,.16);
}

body.theme-dark .topbar,
body.theme-dark .modal-layout,
body.theme-dark .editor-layout,
body.theme-dark .filter-options-layout,
body.theme-dark .persist-settings-layout {
  color: var(--text);
}

body.theme-dark code {
  color: var(--text);
  background: rgba(255,255,255,.08);
  border-radius: 6px;
  padding: .1rem .32rem;
}
