:root {
  color-scheme: light;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-subtle: #f7f8fb;
  --surface-blue: #eef3ff;
  --ink: #101828;
  --ink-soft: #344054;
  --muted: #667085;
  --line: #e1e6ef;
  --line-strong: #ccd4e1;
  --brand: #315bed;
  --brand-strong: #2448d8;
  --brand-soft: #e9efff;
  --success: #087a5b;
  --success-soft: #e9f8f2;
  --warning: #a15c00;
  --danger: #c43232;
  --danger-soft: #fff0f0;
  --focus: #7393ff;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-panel: 0 2px 8px rgba(16, 24, 40, 0.07);
  --shadow-sticky: 0 8px 18px rgba(16, 24, 40, 0.08);
  --z-sticky: 20;
  --z-consent: 80;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

/* Arabic locale: preserve the component system while mirroring reading flow. */
html[dir="rtl"] {
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
}

html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select,
html[dir="rtl"] button {
  font-family: inherit;
}

html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="number"],
html[dir="rtl"] input[data-bidi="technical"],
html[dir="rtl"] code,
html[dir="rtl"] .technical-details dd,
html[dir="rtl"] .print-result-value {
  direction: ltr;
  text-align: left;
  unicode-bidi: plaintext;
}

html[dir="rtl"] .blog-card:nth-child(3n + 2),
html[dir="rtl"] .blog-card:nth-child(3n + 3) {
  border-right: 1px solid var(--line);
  border-left: 0;
}

html[dir="rtl"] .blog-prose blockquote,
html[dir="rtl"] .editorial-note,
html[dir="rtl"] .privacy-section,
html[dir="rtl"] .browser-privacy {
  border-right-color: var(--brand);
  border-left-color: transparent;
}

html[dir="rtl"] .content-toc,
html[dir="rtl"] .blog-toc {
  text-align: right;
}

html[dir="rtl"] .breadcrumbs ol,
html[dir="rtl"] .blog-byline,
html[dir="rtl"] .footer-bottom {
  direction: rtl;
}

html[dir="rtl"] .option-scroll-button .asset-icon,
html[dir="rtl"] .palette-scroll-button .asset-icon,
html[dir="rtl"] .download-menu-trigger .asset-icon {
  transform: scaleX(-1);
}

/* Guide library and long-form editorial pages. */
.guide-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-top: 52px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.guide-preview h2 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.guide-preview p {
  max-width: 72ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.guide-preview > a,
.blog-method a,
.related-guides header a {
  color: var(--brand-strong);
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.blog-index-page,
.blog-page {
  background: var(--surface);
}

.blog-index-hero {
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
}

.blog-index-hero > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 48px;
  padding-block: 72px 64px;
}

.blog-index-hero > div > div {
  max-width: 850px;
}

.blog-index-hero span,
.blog-category,
.blog-card-category {
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 780;
}

.blog-index-hero h1 {
  max-width: 780px;
  margin: 12px 0 18px;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.blog-index-hero p {
  max-width: 68ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.7;
}

.blog-index-hero > div > a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 11px 17px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
}

.guide-library {
  padding-block: 72px 84px;
}

.guide-library > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.guide-library > header h2 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.guide-library > header p,
.guide-library > header > span {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.blog-card {
  grid-column: span 4;
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

.blog-card:nth-child(3n + 2),
.blog-card:nth-child(3n + 3) {
  border-left: 1px solid var(--line);
}

.blog-card-featured {
  grid-column: span 8;
}

.blog-card:nth-child(5),
.blog-card:nth-child(9) {
  grid-column: span 8;
}

.blog-card > a {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 32px;
  color: inherit;
  text-decoration: none;
  transition:
    background-color 180ms ease-out,
    color 180ms ease-out;
}

.blog-card > a:hover {
  background: var(--surface-blue);
}

.blog-card h2 {
  max-width: 23ch;
  margin: 10px 0 12px;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.blog-card-featured h2 {
  max-width: 19ch;
  font-size: 34px;
}

.blog-card p {
  max-width: 60ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.blog-card-meta {
  margin-top: auto;
  padding-top: 26px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.blog-method {
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: #fff;
}

.blog-method > div {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
  gap: 64px;
  padding-block: 56px;
}

.blog-method h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.blog-method p {
  max-width: 72ch;
  margin: 0;
  color: #d6dce7;
  font-size: 16px;
  line-height: 1.75;
}

.blog-method > div > div {
  grid-column: 2;
  display: flex;
  gap: 24px;
}

.blog-method a {
  color: #aebfff;
}

.blog-breadcrumbs {
  padding-top: 24px;
}

.blog-hero {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
}

.blog-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  align-items: end;
  gap: 72px;
  padding-block: 68px 62px;
}

.blog-hero-copy h1 {
  max-width: 900px;
  margin: 12px 0 18px;
  font-size: clamp(40px, 5vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.blog-hero-copy > p {
  max-width: 69ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.7;
  text-wrap: pretty;
}

.blog-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.blog-takeaways {
  padding: 22px 0 4px;
  border-top: 2px solid var(--brand);
}

.blog-takeaways > strong {
  font-size: 13px;
}

.blog-takeaways ul {
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.blog-takeaways li {
  position: relative;
  padding: 9px 0 9px 22px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 14px;
}

.blog-takeaways li::before {
  position: absolute;
  top: 13px;
  left: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  content: "";
}

.blog-article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 760px);
  align-items: start;
  justify-content: center;
  gap: 80px;
  padding-block: 64px 90px;
}

.blog-toc {
  position: sticky;
  top: 92px;
}

.blog-toc > strong {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
}

.blog-toc nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.blog-toc nav a {
  padding: 5px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-decoration: none;
}

.blog-toc nav a:hover {
  color: var(--brand-strong);
}

.blog-tool-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  padding: 9px 13px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
}

.blog-article-body {
  min-width: 0;
}

.blog-opening {
  margin-bottom: 46px;
  padding-bottom: 38px;
  border-bottom: 1px solid var(--line);
}

.blog-opening p:first-child {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.65;
}

.blog-article-body section {
  scroll-margin-top: 92px;
}

.blog-article-body section + section {
  margin-top: 50px;
  padding-top: 46px;
  border-top: 1px solid var(--line);
}

.blog-article-body h2 {
  margin: 0 0 18px;
  font-size: 27px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.blog-article-body h3 {
  margin: 28px 0 10px;
  font-size: 19px;
}

.blog-article-body p,
.blog-article-body li {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.78;
}

.blog-article-body p {
  margin: 0;
}

.blog-article-body p + p {
  margin-top: 17px;
}

.blog-article-body ul,
.blog-article-body ol {
  margin: 22px 0;
  padding-left: 24px;
}

.blog-article-body li + li {
  margin-top: 9px;
}

.blog-article-body code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--surface-subtle);
  color: var(--ink);
  font-size: 0.9em;
}

.blog-article-body a {
  color: var(--brand-strong);
  font-weight: 680;
  text-underline-offset: 3px;
}

.article-callout {
  margin: 30px 0;
  padding: 20px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-subtle);
}

.article-callout > strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 14px;
}

.article-callout p {
  font-size: 15px;
}

.article-steps {
  padding: 0 !important;
  counter-reset: guide-step;
  list-style: none;
}

.article-steps li {
  position: relative;
  min-height: 44px;
  padding-left: 58px;
  counter-increment: guide-step;
}

.article-steps li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  content: counter(guide-step);
  font-size: 13px;
  font-weight: 800;
}

.article-checklist {
  padding: 0 !important;
  list-style: none;
}

.article-checklist li {
  position: relative;
  padding: 10px 0 10px 30px;
  border-bottom: 1px solid var(--line);
}

.article-checklist li::before {
  position: absolute;
  top: 15px;
  left: 3px;
  width: 12px;
  height: 7px;
  border-bottom: 2px solid var(--success);
  border-left: 2px solid var(--success);
  content: "";
  transform: rotate(-45deg);
}

.article-table-wrap {
  overflow-x: auto;
  margin: 24px 0;
}

.blog-article-body table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.blog-article-body th,
.blog-article-body td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
  text-align: left;
  vertical-align: top;
}

.blog-article-body th {
  background: var(--surface-subtle);
  color: var(--ink);
}

.article-tool-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  margin-top: 60px;
  padding: 28px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
}

.article-tool-cta h2 {
  margin: 0 0 5px;
  color: #fff;
  font-size: 21px;
}

.article-tool-cta p {
  color: #d6dce7;
  font-size: 14px;
  line-height: 1.6;
}

.article-tool-cta a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border-radius: 9px;
  background: #fff;
  color: #1739bd;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.editorial-note {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.editorial-note > strong {
  font-size: 13px;
}

.editorial-note p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.related-guides {
  border-top: 1px solid var(--line);
  background: var(--surface-subtle);
}

.related-guides > div {
  padding-block: 54px 68px;
}

.related-guides header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 18px;
}

.related-guides header h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.025em;
}

.related-guides > div > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.related-guides .blog-card {
  grid-column: auto;
}

.related-guides .blog-card + .blog-card {
  border-left: 1px solid var(--line);
}

/* Article layouts share the reading system but use different page composition. */
.blog-layout-blueprint .blog-hero {
  border-color: #23345e;
  background: #101b38;
  color: #fff;
}

.blog-layout-blueprint .blog-category,
.blog-layout-blueprint .blog-byline {
  color: #aebfff;
}

.blog-layout-blueprint .blog-hero-copy > p,
.blog-layout-blueprint .blog-takeaways li {
  color: #d7def0;
}

.blog-layout-blueprint .blog-takeaways {
  border-top-color: #7f9cff;
}

.blog-layout-blueprint .blog-takeaways li {
  border-color: #33436b;
}

.blog-layout-blueprint .blog-takeaways li::before {
  background: #7f9cff;
}

.blog-layout-editorial .blog-hero-inner {
  display: block;
  max-width: 940px;
  text-align: center;
}

.blog-layout-editorial .blog-hero-copy h1,
.blog-layout-editorial .blog-hero-copy > p {
  margin-inline: auto;
}

.blog-layout-editorial .blog-byline {
  justify-content: center;
}

.blog-layout-editorial .blog-takeaways {
  margin-top: 38px;
  padding-top: 18px;
}

.blog-layout-editorial .blog-takeaways ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blog-layout-editorial .blog-takeaways li {
  padding-inline: 24px;
  border-top: 0;
  border-left: 1px solid var(--line);
}

.blog-layout-editorial .blog-takeaways li:first-child {
  border-left: 0;
}

.blog-layout-editorial .blog-takeaways li::before {
  display: none;
}

.blog-layout-compare .blog-hero {
  background: var(--brand-soft);
}

.blog-layout-compare .blog-byline {
  color: var(--ink-soft);
}

.blog-layout-compare .blog-takeaways {
  padding: 24px;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
}

.blog-layout-workshop .blog-hero {
  border-color: #18575b;
  background: #0b3f43;
  color: #fff;
}

.blog-layout-workshop .blog-category,
.blog-layout-workshop .blog-byline {
  color: #91e0dd;
}

.blog-layout-workshop .blog-hero-copy > p,
.blog-layout-workshop .blog-takeaways li {
  color: #d4efed;
}

.blog-layout-workshop .blog-takeaways {
  border-top-color: #77d4d0;
}

.blog-layout-workshop .blog-takeaways li {
  border-color: #2b6669;
}

.blog-layout-workshop .blog-takeaways li::before {
  background: #77d4d0;
}

@media (max-width: 920px) {
  .guide-preview,
  .blog-index-hero > div,
  .blog-method > div,
  .blog-hero-inner,
  .blog-article-layout {
    grid-template-columns: 1fr;
  }

  .guide-preview {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .blog-index-hero > div {
    align-items: start;
  }

  .blog-index-hero > div > a {
    justify-self: start;
  }

  .blog-card,
  .blog-card-featured,
  .blog-card:nth-child(5),
  .blog-card:nth-child(9) {
    grid-column: span 6;
  }

  .blog-card:nth-child(odd),
  .blog-card:nth-child(even) {
    border-left: 0;
  }

  .blog-card:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .blog-method > div > div {
    grid-column: 1;
  }

  .blog-hero-inner {
    gap: 38px;
  }

  .blog-article-layout {
    gap: 32px;
    padding-top: 38px;
  }

  .blog-toc {
    position: static;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--line);
  }

  .blog-toc nav {
    flex-flow: row wrap;
    gap: 4px 16px;
  }
}

@media (max-width: 640px) {
  .blog-index-hero > div,
  .guide-library,
  .blog-hero-inner {
    padding-block: 48px;
  }

  .blog-index-hero h1,
  .blog-hero-copy h1 {
    font-size: 38px;
  }

  .guide-library > header,
  .related-guides header {
    align-items: flex-start;
    flex-direction: column;
  }

  .blog-grid {
    display: block;
  }

  .blog-card > a {
    padding: 28px 0;
  }

  .blog-card,
  .blog-card:nth-child(even) {
    border-left: 0;
  }

  .blog-card-featured h2 {
    font-size: 27px;
  }

  .blog-method > div {
    gap: 22px;
  }

  .blog-method > div > div {
    flex-direction: column;
    gap: 12px;
  }

  .blog-byline {
    flex-direction: column;
  }

  .blog-layout-editorial .blog-takeaways ul {
    grid-template-columns: 1fr;
  }

  .blog-layout-editorial .blog-takeaways li,
  .blog-layout-editorial .blog-takeaways li:first-child {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .blog-article-body h2 {
    font-size: 24px;
  }

  .blog-opening p:first-child {
    font-size: 18px;
  }

  .article-tool-cta {
    grid-template-columns: 1fr;
    padding: 24px 20px;
  }

  .article-tool-cta a {
    justify-self: start;
  }

  .related-guides > div > div {
    grid-template-columns: 1fr;
  }

  .related-guides .blog-card + .blog-card {
    border-left: 0;
  }
}

/* Image-led journal experience. */
.blog-index-page main {
  overflow: clip;
}

.blog-index-page .blog-index-hero {
  border-bottom: 0;
  background: color-mix(in srgb, var(--brand-soft) 42%, var(--surface));
}

.blog-index-page .blog-index-hero > div {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding-block: clamp(68px, 8vw, 112px);
}

.blog-index-page .blog-index-hero > div > div:first-child {
  max-width: 940px;
}

.blog-index-page .blog-index-hero h1 {
  max-width: 18ch;
  margin-top: 16px;
  font-size: clamp(44px, 5.2vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.blog-index-page .blog-index-hero p {
  max-width: 62ch;
  font-size: 19px;
}

.blog-hero-actions {
  display: flex;
  min-width: 210px;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.blog-index-page .blog-index-hero .blog-primary-action,
.blog-index-page .blog-index-hero .blog-secondary-action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 11px 17px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
}

.blog-index-page .blog-index-hero .blog-primary-action {
  background: var(--brand);
  color: #fff;
}

.blog-index-page .blog-index-hero .blog-secondary-action {
  outline: 1px solid var(--line-strong);
  outline-offset: -1px;
  background: var(--surface);
  color: var(--ink);
}

.blog-index-page .guide-library {
  padding-block: clamp(46px, 6vw, 82px) clamp(76px, 8vw, 118px);
}

.blog-featured-story {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  min-height: 520px;
  overflow: hidden;
  margin-bottom: clamp(66px, 8vw, 108px);
  border-radius: 16px;
  background: #101b38;
  color: #fff;
}

.blog-featured-media-link,
.blog-featured-media,
.blog-card-media,
.blog-hero-media {
  display: block;
  overflow: hidden;
}

.blog-featured-media-link,
.blog-featured-media,
.blog-featured-media img {
  width: 100%;
  height: 100%;
}

.blog-featured-media img,
.blog-card-media img,
.blog-hero-media img {
  display: block;
  width: 100%;
  object-fit: cover;
}

.blog-card-media img,
.blog-hero-media img {
  height: auto;
}

.blog-featured-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 5vw, 64px);
}

.blog-featured-copy .blog-card-category {
  color: #aebfff;
}

.blog-featured-copy h2 {
  max-width: 15ch;
  margin: 15px 0 18px;
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.blog-featured-copy h2 a,
.blog-featured-copy .blog-card-meta a {
  color: inherit;
  text-decoration: none;
}

.blog-featured-copy > p {
  max-width: 50ch;
  margin: 0;
  color: #d7def0;
  font-size: 16px;
  line-height: 1.7;
}

.blog-featured-copy .blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #33436b;
  color: #aebfff;
}

.blog-featured-copy .blog-card-meta a {
  color: #fff;
  font-weight: 760;
}

.blog-index-page .guide-library > header {
  align-items: center;
  padding-bottom: 22px;
}

.blog-index-page .guide-library > header > a {
  color: var(--brand-strong);
  font-size: 14px;
  font-weight: 740;
  text-decoration: none;
}

.blog-index-page .blog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 52px 28px;
  padding-top: 32px;
}

.blog-index-page .blog-card,
.blog-index-page .blog-card:nth-child(n) {
  grid-column: auto;
  border: 0;
}

.blog-index-page .blog-card > a,
.related-guides .blog-card > a {
  padding: 0;
  background: transparent;
}

.blog-card-media {
  margin-bottom: 20px;
  border-radius: 12px;
  background: var(--surface-subtle);
}

.blog-card-media img {
  aspect-ratio: 3 / 2;
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card > a:hover .blog-card-media img {
  transform: scale(1.025);
}

.blog-index-page .blog-card h2,
.related-guides .blog-card h2 {
  max-width: 24ch;
  margin: 9px 0 11px;
  font-size: 23px;
}

.blog-index-page .blog-card p,
.related-guides .blog-card p {
  font-size: 14px;
  line-height: 1.65;
}

.blog-index-page .blog-card-meta,
.related-guides .blog-card-meta {
  padding-top: 18px;
  color: var(--brand-strong);
}

.blog-index-page .blog-featured-copy .blog-card-meta {
  color: #aebfff;
}

.blog-index-page .blog-method {
  border-top: 0;
  background: #0b1225;
}

.blog-index-page .blog-method > div {
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  align-items: start;
  padding-block: clamp(58px, 7vw, 92px);
}

.blog-index-page .blog-method > div > div {
  grid-column: auto;
  display: block;
}

.blog-index-page .blog-method span {
  color: #91a8ff;
  font-size: 13px;
  font-weight: 760;
}

.blog-index-page .blog-method h2 {
  margin-top: 12px;
  font-size: clamp(30px, 3vw, 44px);
}

.blog-index-page .blog-method nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  margin-top: 24px;
}

.blog-index-page .blog-method a {
  color: #b8c5ff;
}

.blog-page .blog-hero-inner {
  align-items: start;
  padding-block: clamp(48px, 6vw, 76px) 42px;
}

.blog-hero-figure {
  margin-top: 0;
  margin-bottom: clamp(42px, 6vw, 72px);
}

.blog-hero-media {
  border-radius: 14px;
  background: var(--surface-subtle);
}

.blog-hero-media img {
  aspect-ratio: 16 / 7;
}

.blog-hero-figure figcaption {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 12px;
}

.blog-layout-blueprint .blog-hero-figure figcaption,
.blog-layout-workshop .blog-hero-figure figcaption {
  color: #bdc9e0;
}

.related-guides > div > div {
  gap: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.related-guides .blog-card,
.related-guides .blog-card + .blog-card {
  border: 0;
}

@media (max-width: 980px) {
  .blog-index-page .blog-index-hero > div,
  .blog-featured-story,
  .blog-index-page .blog-method > div {
    grid-template-columns: 1fr;
  }

  .blog-hero-actions {
    width: min(100%, 360px);
    min-width: 0;
    flex-direction: row;
  }

  .blog-hero-actions > a {
    flex: 1;
  }

  .blog-featured-story {
    min-height: 0;
  }

  .blog-featured-media img {
    aspect-ratio: 16 / 9;
  }

  .blog-featured-copy h2 {
    max-width: 20ch;
  }

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

  .blog-hero-media img {
    aspect-ratio: 3 / 2;
  }
}

@media (max-width: 640px) {
  .blog-index-page .blog-index-hero h1 {
    font-size: 40px;
  }

  .blog-hero-actions {
    flex-direction: column;
  }

  .blog-featured-story {
    border-radius: 12px;
  }

  .blog-featured-copy {
    padding: 30px 24px 34px;
  }

  .blog-featured-copy .blog-card-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .blog-index-page .guide-library > header {
    align-items: flex-start;
  }

  .blog-index-page .blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .blog-index-page .blog-card > a,
  .related-guides .blog-card > a {
    padding: 0;
  }

  .blog-index-page .blog-method > div {
    gap: 28px;
  }

  .blog-hero-media {
    border-radius: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-card-media img {
    transition: none;
  }

  .blog-card > a:hover .blog-card-media img {
    transform: none;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button,
a,
input,
textarea,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 52%, transparent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--surface);
  text-decoration: none;
  transform: translateY(-160%);
}

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

.studio-shell {
  width: min(1440px, calc(100% - 40px));
  margin-inline: auto;
}

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

.header-inner {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand strong {
  color: var(--brand-strong);
}

.brand-mark {
  display: inline-flex;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.primary-nav a,
.footer-inner nav a {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"],
.footer-inner nav a:hover {
  color: var(--ink);
}

.header-actions {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 12px;
}

.runtime-note,
.autosave-note,
.verified-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.icon-button,
.quiet-button,
.secondary-button,
.primary-button,
.text-button,
.template-filters button {
  border: 0;
  cursor: pointer;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-subtle);
}

@font-face {
  font-family: "Toolzy Flaticon UIcons";
  src: url("icons/flaticon-uicons/uicons-regular-rounded.woff2") format("woff2");
  font-display: block;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Toolzy Flaticon Brands";
  src: url("icons/flaticon-uicons/uicons-brands.woff2") format("woff2");
  font-display: block;
  font-style: normal;
  font-weight: 400;
}

.asset-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  place-items: center;
  color: currentColor;
  container-type: inline-size;
  font-family: "Toolzy Flaticon UIcons";
  font-style: normal;
  font-synthesis: none;
  line-height: 1;
  speak: never;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.asset-icon::before {
  content: var(--glyph);
  display: block;
  font-size: 100cqi;
  line-height: 1;
}

.icon-back {
  --glyph: "\f19d";
}
.icon-undo {
  --glyph: "\fe6b";
}
.icon-redo {
  --glyph: "\fb29";
}
.icon-refresh {
  --glyph: "\fb34";
}
.icon-bag,
.icon-shop {
  --glyph: "\fbf7";
}
.icon-home {
  --glyph: "\f7b8";
}
.icon-info {
  --glyph: "\f80b";
}
.icon-help {
  --glyph: "\faf3";
}
.icon-mail {
  --glyph: "\f5de";
}
.icon-chat,
.icon-message {
  --glyph: "\f4b4";
}
.icon-medical,
.icon-shapes {
  --glyph: "\fdeb";
}
.icon-menu {
  --glyph: "\f925";
}
.icon-navigation,
.icon-social,
.icon-share {
  --glyph: "\fbd5";
}
.icon-play {
  --glyph: "\fa9e";
}
.icon-profile,
.icon-user,
.icon-contact {
  --glyph: "\f11b";
}
.icon-search {
  --glyph: "\fbba";
}
.icon-setting {
  --glyph: "\fbd2";
}
.icon-copy {
  --glyph: "\f4dd";
}
.icon-trash {
  --glyph: "\fe17";
}
.icon-web,
.icon-link {
  --glyph: "\f8ba";
}
.icon-file-text {
  --glyph: "\f57a";
}
.icon-wifi {
  --glyph: "\ff08";
}
.icon-phone {
  --glyph: "\fa61";
}
.icon-clock,
.icon-calendar {
  --glyph: "\f327";
}
.icon-location {
  --glyph: "\f8fd";
}
.icon-whatsapp {
  --glyph: "\f1d2";
  font-family: "Toolzy Flaticon Brands";
}
.icon-download {
  --glyph: "\f591";
}
.icon-upload {
  --glyph: "\fe75";
}
.icon-restaurant {
  --glyph: "\fea8";
}
.icon-video {
  --glyph: "\febe";
}
.icon-card {
  --glyph: "\f4ee";
}
.icon-apps {
  --glyph: "\f16c";
}
.icon-target,
.icon-focus,
.icon-scan {
  --glyph: "\faef";
}
.icon-money,
.icon-bitcoin {
  --glyph: "\f254";
}
.icon-payment,
.icon-wallet {
  --glyph: "\fedc";
}
.icon-check {
  --glyph: "\f1eb";
}
.icon-more {
  --glyph: "\f927";
}
.icon-qr {
  --glyph: "\faf1";
}
.icon-template {
  --glyph: "\fd70";
}
.icon-palette {
  --glyph: "\f9ed";
}
.icon-image {
  --glyph: "\fa78";
}
.icon-sliders {
  --glyph: "\fbd1";
}
.icon-library {
  --glyph: "\f38e";
}
.icon-star {
  --glyph: "\fce9";
}
.icon-save {
  --glyph: "\f56a";
}
.icon-file-json {
  --glyph: "\f65b";
}
.icon-file-down {
  --glyph: "\f65d";
}
.icon-file-up {
  --glyph: "\f670";
}
.icon-layers {
  --glyph: "\f87c";
}
.icon-shield {
  --glyph: "\fbdb";
}

.studio-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding-block: 26px 20px;
}

.product-label {
  display: inline-flex;
  margin: 0 0 10px;
  align-items: center;
  gap: 8px;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 750;
}

.product-label .asset-icon {
  width: 14px;
  height: 14px;
}

.studio-intro h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.studio-intro > div > p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  text-wrap: pretty;
}

.intro-trust {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.intro-trust li {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.intro-trust .asset-icon {
  width: 13px;
  height: 13px;
  color: var(--success);
}

.studio {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.studio-commandbar {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.workflow-switch {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workflow-step {
  display: grid;
  min-width: 0;
  grid-template-columns: 28px auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

button.workflow-step {
  cursor: pointer;
}

.workflow-step > span:first-child {
  display: grid;
  width: 28px;
  height: 28px;
  grid-row: 1 / 3;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.workflow-step strong {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.15;
}

.workflow-step small {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.1;
}

.workflow-step.is-active > span:first-child {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.workflow-step.is-active strong {
  color: var(--brand-strong);
}

.workflow-step.is-passive {
  pointer-events: none;
}

.workflow-connector {
  width: 24px;
  height: 1px;
  background: var(--line-strong);
}

.studio-commandbar > div:first-child,
.panel-title-block,
.design-portability > div:first-child,
.feature-layout li,
.privacy-section > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.command-icon,
.panel-icon {
  width: 38px;
  height: 38px;
  padding: 10px;
  border-radius: 10px;
  background-color: var(--brand-soft);
  color: var(--brand-strong);
  -webkit-mask-size: 18px;
  mask-size: 18px;
}

.studio-commandbar h2,
.panel-heading h2,
.design-heading h2,
.preview-heading h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.studio-commandbar p,
.panel-heading p,
.design-heading p,
.preview-heading span {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.quiet-button,
.secondary-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.quiet-button:hover:not(:disabled),
.secondary-button:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.quiet-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.quiet-button .asset-icon,
.secondary-button .asset-icon {
  width: 14px;
  height: 14px;
}

.type-scroller {
  display: grid;
  overflow: hidden;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  scrollbar-width: thin;
}

.type-choice {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  min-height: 64px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 5px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.type-choice .asset-icon {
  width: 19px;
  height: 19px;
}

.type-choice:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.type-choice.is-selected {
  box-shadow: inset 0 0 0 1.5px var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.workspace {
  display: grid;
  grid-template-areas:
    "types preview"
    "editor preview";
  grid-template-columns: minmax(0, 1fr) 390px;
  align-items: start;
  background: var(--surface);
}

.type-sidebar {
  grid-area: types;
  min-width: 0;
  padding: 16px 18px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.type-sidebar-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 10px;
}

.type-sidebar-heading strong {
  font-size: 12px;
}

.type-sidebar-heading span {
  color: var(--muted);
  font-size: 10px;
}

.editor-column {
  grid-area: editor;
  min-width: 0;
  padding: 0;
  border-right: 1px solid var(--line);
}

.work-panel {
  border: 0;
  border-radius: 0;
  background: var(--surface);
}

.content-panel {
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.builder-accordion-trigger {
  display: grid;
  width: 100%;
  min-height: 62px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.content-panel > .builder-accordion-trigger {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.builder-accordion-trigger:hover {
  background: var(--surface-subtle);
}

.builder-accordion-trigger.is-open {
  background: color-mix(in srgb, var(--brand-soft) 44%, var(--surface));
  color: var(--brand-strong);
}

.builder-accordion-trigger > .asset-icon {
  width: 18px;
  height: 18px;
  margin-inline: 4px;
  color: var(--brand-strong);
}

.accordion-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.accordion-copy strong {
  font-size: 13px;
}

.accordion-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accordion-chevron {
  width: 8px;
  height: 8px;
  margin-right: 3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.builder-accordion-trigger.is-open .accordion-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.builder-accordion-panel {
  padding: 16px 18px 18px;
  background: var(--surface);
}

.panel-heading,
.design-heading,
.preview-heading,
.section-title,
.template-toolbar,
.export-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.payload-badge,
.design-count,
.verified-chip {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 11px;
  font-weight: 800;
}

.section-step-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.section-step-heading h2,
.section-step-heading p {
  margin: 0;
}

.section-step-heading p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.content-context {
  margin: 13px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
}

.dynamic-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.dynamic-fields > label,
.field-grid > label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.dynamic-fields > label > span,
.field-grid > label > span,
.color-field > span:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.dynamic-fields > label > span small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.dynamic-fields .field-wide,
.inline-check.field-wide {
  grid-column: 1 / -1;
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
textarea,
select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}

textarea {
  min-height: 104px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 88%, var(--ink));
  opacity: 1;
}

input:hover,
textarea:hover,
select:hover {
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line-strong));
}

.inline-check,
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
}

.inline-check {
  min-height: 42px;
  justify-content: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.form-message {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
  font-weight: 650;
}

.content-actions {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
}

.continue-button {
  min-height: 42px;
}

.primary-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.primary-button:hover {
  background: var(--brand-strong);
}

.primary-button .asset-icon {
  width: 14px;
  height: 14px;
}

.design-panel {
  overflow: hidden;
}

.design-heading {
  min-height: 64px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
}

.design-panel-body {
  min-height: 0;
}

.design-tabpanel {
  border-bottom: 1px solid var(--line);
}

.design-tabpanel.is-active {
  animation: panel-in 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

.frame-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin: 12px 0;
}

.frame-filter-bar {
  display: flex;
  gap: 8px;
  margin: 14px 0 4px;
  padding-bottom: 3px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.frame-filter-bar button {
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

.frame-filter-bar button:hover {
  border-color: var(--line-strong);
  background: var(--surface-subtle);
}

.frame-filter-bar button.is-selected {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
  color: var(--brand-strong);
}

.frame-choice-grid button {
  display: grid;
  min-width: 0;
  min-height: 132px;
  place-items: center;
  gap: 8px;
  padding: 10px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.frame-choice-grid button:hover {
  border-color: var(--line-strong);
  background: var(--surface-subtle);
  transform: translateY(-1px);
}

.frame-choice-grid button.is-selected {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
  color: var(--brand-strong);
}

.frame-choice-grid button > span {
  display: grid;
  width: 94px;
  height: 94px;
  place-items: center;
}

.frame-choice-grid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.frame-choice-grid small {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frame-library-note {
  margin: 0 0 16px;
}

.frame-paint-fieldset {
  margin-top: 16px;
}

.frame-color-grid {
  margin-top: 14px;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.template-toolbar {
  align-items: flex-end;
  margin-bottom: 14px;
}

.template-toolbar > div:first-child,
.section-title > div:first-child {
  display: flex;
  flex-direction: column;
}

.template-toolbar strong,
.section-title strong {
  font-size: 13px;
}

.template-toolbar span,
.section-title span,
.design-portability span {
  color: var(--muted);
  font-size: 11px;
}

.template-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.template-filters button {
  padding: 6px 9px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.template-filters button:hover,
.template-filters button.is-selected {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

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

.template-card {
  display: grid;
  min-width: 0;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.template-card:hover {
  border-color: var(--line-strong);
  background: var(--surface-subtle);
}

.template-card.is-selected {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.template-preview {
  display: grid;
  overflow: hidden;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 8px;
  background: #eef1f6;
}

.template-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.template-placeholder {
  width: 32px;
  height: 32px;
  border: 7px dotted #344054;
  border-radius: 3px;
}

.template-card > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.template-card strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-card small {
  color: var(--muted);
  font-size: 10px;
}

.choice-fieldset,
.segmented-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-fieldset + .two-fieldsets,
.two-fieldsets + .range-field,
.segmented-fieldset + .color-grid,
.section-title + .segmented-fieldset,
.section-title + .field-grid,
.section-title + .built-in-logo-grid {
  margin-top: 18px;
}

legend {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
}

.visual-choices {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.visual-choices.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.visual-choices label {
  position: relative;
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}

.visual-choices input,
.segmented-control input {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.visual-choices label:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.visual-choices small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.shape-sample,
.eye-sample,
.ball-sample {
  display: block;
  width: 26px;
  height: 26px;
  color: currentColor;
}

.shape-sample {
  background:
    linear-gradient(currentColor 0 0) 0 0 / 7px 7px no-repeat,
    linear-gradient(currentColor 0 0) 10px 0 / 7px 7px no-repeat,
    linear-gradient(currentColor 0 0) 20px 0 / 6px 7px no-repeat,
    linear-gradient(currentColor 0 0) 0 10px / 7px 7px no-repeat,
    linear-gradient(currentColor 0 0) 10px 10px / 7px 7px no-repeat,
    linear-gradient(currentColor 0 0) 20px 10px / 6px 7px no-repeat,
    linear-gradient(currentColor 0 0) 0 20px / 7px 6px no-repeat,
    linear-gradient(currentColor 0 0) 10px 20px / 7px 6px no-repeat,
    linear-gradient(currentColor 0 0) 20px 20px / 6px 6px no-repeat;
}

.modules-rounded {
  border-radius: 3px;
}
.modules-rounded,
.modules-soft {
  border-radius: 5px;
}
.modules-dots {
  border-radius: 50%;
}
.modules-diamond {
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.modules-pill {
  border-radius: 999px;
}
.modules-vertical {
  transform: scaleX(0.76);
  border-radius: 3px;
}
.modules-horizontal {
  transform: scaleY(0.76);
  border-radius: 3px;
}
.modules-hexagon {
  clip-path: polygon(20% 0, 80% 0, 100% 50%, 80% 100%, 20% 100%, 0 50%);
}
.modules-octagon,
.eye-octagon,
.ball-octagon {
  clip-path: polygon(
    28% 0,
    72% 0,
    100% 28%,
    100% 72%,
    72% 100%,
    28% 100%,
    0 72%,
    0 28%
  );
}
.modules-leaf,
.eye-leaf,
.ball-leaf {
  border-radius: 50% 14% 50% 14%;
}
.modules-squircle,
.eye-squircle,
.ball-squircle {
  border-radius: 36%;
}
.modules-gem,
.eye-gem,
.ball-gem {
  transform: rotate(45deg) scale(0.72);
  border-radius: 24%;
}
.modules-shield,
.eye-shield,
.ball-shield {
  clip-path: polygon(
    17% 0,
    83% 0,
    100% 17%,
    100% 55%,
    80% 90%,
    50% 100%,
    20% 90%,
    0 55%,
    0 17%
  );
}
.modules-flower,
.eye-flower,
.ball-flower {
  clip-path: polygon(
    50% 0,
    68% 20%,
    100% 50%,
    80% 68%,
    50% 100%,
    32% 80%,
    0 50%,
    20% 32%
  );
}
.modules-cross,
.ball-cross {
  clip-path: polygon(
    18% 0,
    82% 0,
    82% 18%,
    100% 18%,
    100% 82%,
    82% 82%,
    82% 100%,
    18% 100%,
    18% 82%,
    0 82%,
    0 18%,
    18% 18%
  );
}

.eye-sample {
  border: 5px solid currentColor;
}

.eye-rounded {
  border-radius: 7px;
}
.eye-soft {
  border-radius: 11px;
}
.eye-circle {
  border-radius: 50%;
}
.eye-diamond {
  transform: rotate(45deg) scale(0.72);
}
.eye-double {
  clip-path: polygon(
    10% 0,
    90% 0,
    100% 10%,
    100% 90%,
    90% 100%,
    10% 100%,
    0 90%,
    0 10%
  );
}

.ball-sample {
  background: currentColor;
}
.ball-rounded {
  border-radius: 7px;
}
.ball-soft {
  border-radius: 11px;
}
.ball-circle {
  border-radius: 50%;
}
.ball-diamond {
  transform: rotate(45deg) scale(0.72);
}

.two-fieldsets,
.control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.range-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}

.range-field > span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 12px;
}

.range-field output {
  color: var(--brand-strong);
  font-weight: 750;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
}

.segmented-control {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 3px;
  border-radius: 9px;
  background: var(--surface-subtle);
}

.segmented-control label {
  position: relative;
  cursor: pointer;
  text-align: center;
}

.segmented-control span {
  display: block;
  padding: 7px 8px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.segmented-control input:checked + span {
  background: var(--surface);
  color: var(--brand-strong);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}

.section-title {
  align-items: flex-start;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.color-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.color-field > span:last-child {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 6px;
}

input[type="color"] {
  width: 42px;
  height: 42px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.color-grid + .range-field,
.range-field + .switch-row,
.control-grid + .segmented-fieldset,
.segmented-fieldset + .switch-row,
.smart-protection-control + .field-grid,
.field-grid + .control-grid,
.field-grid + .design-portability {
  margin-top: 18px;
}

.switch-row {
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.switch-row input {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
}

.switch-row > span {
  display: flex;
  flex-direction: column;
}

.switch-row strong {
  font-size: 12px;
}

.switch-row small {
  color: var(--muted);
  font-size: 10px;
}

.built-in-logo-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 7px;
}

.built-in-logo {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
}

.built-in-logo:hover,
.built-in-logo.is-selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.built-in-logo .asset-icon {
  width: 22px;
  height: 22px;
}

.built-in-logo small {
  overflow: hidden;
  max-width: 100%;
  padding-inline: 3px;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logo-import-button {
  position: relative;
  display: grid;
  min-height: 62px;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--brand);
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 160ms var(--studio-ease),
    background-color 160ms var(--studio-ease);
}

.logo-import-button:hover {
  background: color-mix(in srgb, var(--brand-soft) 72%, var(--surface));
}

.logo-import-button:focus-within {
  outline: 3px solid color-mix(in srgb, var(--brand) 24%, transparent);
  outline-offset: 2px;
}

.logo-import-button > .asset-icon {
  width: 24px;
  height: 24px;
}

.logo-import-button input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.logo-import-copy,
.logo-selection-copy,
.design-portability > div:first-child > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.logo-import-copy strong,
.logo-selection-copy strong,
.design-portability strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logo-import-copy small,
.logo-selection-copy small {
  color: var(--muted);
  font-size: 12px;
}

.logo-import-cta {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 750;
}

.logo-controls {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.logo-file-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-subtle);
}

.logo-file-row[hidden] {
  display: none;
}

.logo-file-row img {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.logo-selection-copy strong {
  color: var(--ink);
}

.logo-remove-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--danger) 55%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--danger) 9%, var(--surface));
  color: var(--danger);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
}

.logo-remove-button:hover {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 15%, var(--surface));
}

.logo-remove-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--danger) 24%, transparent);
  outline-offset: 2px;
}

.logo-remove-button .asset-icon {
  width: 16px;
  height: 16px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px;
  background: transparent;
  font-size: 11px;
  font-weight: 750;
}

.text-button .asset-icon {
  width: 13px;
  height: 13px;
}

.danger-text {
  color: var(--danger);
}

.control-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.control-note .asset-icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: var(--brand-strong);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.design-portability {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-subtle);
}

.design-portability > div:last-child {
  display: flex;
  gap: 7px;
}

.design-portability > div:first-child > .asset-icon {
  width: 22px;
  height: 22px;
  color: var(--brand-strong);
}

.file-button {
  position: relative;
  cursor: pointer;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.preview-column {
  grid-area: preview;
  min-width: 0;
  padding: 16px;
}

.preview-card {
  position: sticky;
  top: 82px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--surface-raised);
}

.copy-button {
  width: 34px;
  height: 34px;
}

#preview-title,
#content-title {
  scroll-margin-top: 82px;
}

.copy-button .asset-icon {
  width: 14px;
  height: 14px;
}

.preview-stage {
  display: grid;
  min-height: 280px;
  place-items: center;
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius);
  background: #edf1f7;
}

#qr-preview {
  width: min(100%, 250px);
  line-height: 0;
}

#qr-preview svg {
  display: block;
  width: 100%;
  height: auto;
}

.validation-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.validation-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 800;
}

.validation-chip.is-ready {
  border-color: color-mix(in srgb, var(--success) 35%, transparent);
  background: var(--success-soft);
  color: var(--success);
}

.validation-chip.is-blocked {
  border-color: color-mix(in srgb, var(--danger) 35%, transparent);
  background: var(--danger-soft);
  color: var(--danger);
}

.validation-chip.is-review .status-dot {
  background: var(--warning);
}

.validation-chip.is-blocked .status-dot {
  background: var(--danger);
}

.smart-adjustment {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--success-soft);
  color: var(--success);
}

.smart-adjustment[hidden] {
  display: none;
}

.smart-adjustment .asset-icon {
  width: 17px;
  height: 17px;
  margin-inline: auto;
}

.smart-adjustment div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.smart-adjustment strong {
  font-size: 14px;
}

.smart-adjustment span:last-child {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.quality-panel {
  margin-top: 12px;
  padding: 2px 2px 0;
}

.quality-panel > div:first-child {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.quality-panel > div:first-child strong {
  color: var(--ink);
}

.quality-track {
  overflow: hidden;
  height: 5px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--line);
}

.quality-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

#quality-findings {
  display: grid;
  gap: 5px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

#quality-findings li {
  color: var(--muted);
  font-size: 10px;
}

#quality-findings li::first-letter {
  color: var(--success);
}

.preview-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 12px 0 0;
  border-block: 1px solid var(--line);
}

.preview-facts div {
  padding: 10px 8px;
  text-align: center;
}

.preview-facts div + div {
  border-left: 1px solid var(--line);
}

.preview-facts dt {
  color: var(--muted);
  font-size: 9px;
}

.preview-facts dd {
  margin: 1px 0 0;
  font-size: 11px;
  font-weight: 800;
}

.export-heading > div {
  display: flex;
  flex-direction: column;
}

.export-heading strong {
  font-size: 12px;
}
.export-heading span {
  color: var(--muted);
  font-size: 10px;
}
.verified-chip {
  background: var(--success-soft);
  color: var(--success) !important;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.download-button {
  display: grid;
  min-width: 0;
  min-height: 54px;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.download-button.primary-download {
  min-height: 58px;
  grid-column: 1 / -1;
  border-color: #2448d8;
  background: #2448d8;
  color: #fff;
}

.download-button.primary-download:hover:not(:disabled) {
  border-color: #1936b5;
  background: #1936b5;
}

.download-button.primary-download .file-format {
  background: #1936b5;
  color: #fff;
}

.download-button.primary-download small {
  color: #fff;
}

.download-button.primary-download:disabled {
  border-color: var(--line);
  background: var(--surface-subtle);
  color: var(--muted);
}

.download-button.primary-download:disabled .file-format {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.download-button.primary-download:disabled small {
  color: var(--muted);
}

.download-button:hover:not(:disabled) {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.download-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.file-format {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 8px;
  font-weight: 850;
}

.download-button > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.download-button strong {
  font-size: 11px;
}
.download-button small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-details {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.scan-details summary {
  padding: 11px 2px 4px;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.scan-details summary:hover {
  color: var(--ink);
}

.privacy-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.privacy-line .asset-icon {
  width: 12px;
  height: 12px;
  color: var(--success);
}

.feature-band {
  margin-top: 48px;
  padding-block: 48px;
  background: #14213d;
  color: #fff;
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  align-items: start;
  gap: 72px;
}

.feature-layout > div > .asset-icon {
  width: 30px;
  height: 30px;
  color: #9ab0ff;
}

.feature-layout h2,
.privacy-section h2 {
  max-width: 560px;
  margin: 14px 0 8px;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.feature-layout > div p {
  max-width: 520px;
  margin: 0;
  color: #c6d0e2;
}

.feature-layout ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  background: #34425f;
  list-style: none;
}

.feature-layout li {
  min-height: 112px;
  align-items: flex-start;
  padding: 18px;
  background: #14213d;
}

.feature-layout li > .asset-icon {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: #9ab0ff;
}

.feature-layout li div {
  display: flex;
  flex-direction: column;
}

.feature-layout li strong {
  font-size: 13px;
}
.feature-layout li span {
  color: #c6d0e2;
  font-size: 11px;
}

.privacy-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 70px;
  padding-block: 64px;
}

.privacy-section h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 36px);
}

.privacy-mark {
  width: 30px;
  height: 30px;
  color: var(--brand-strong);
}

.privacy-section > p {
  max-width: 680px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-subtle) 78%, var(--surface));
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: 72px;
  padding-block: 52px 42px;
}

.footer-intro > p {
  max-width: 38ch;
  margin: 18px 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-local-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

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

.footer-links > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.footer-links h2 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.footer-links a,
.footer-bottom a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
  text-decoration: none;
}

.footer-links a:hover,
.footer-bottom a:hover {
  color: var(--brand-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding-block: 18px 24px;
  border-top: 1px solid var(--line);
}

.footer-bottom p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.footer-bottom .trademark {
  max-width: 760px;
  justify-self: center;
  text-align: center;
}

.seo-content {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.seo-shell {
  padding-block: 76px 84px;
}

.seo-lead {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: 72px;
  padding-bottom: 42px;
  border-bottom: 1px solid var(--line);
}

.seo-lead h2,
.how-to-heading h2,
.faq-section > header h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.seo-lead p,
.how-to-heading p,
.faq-section > header p {
  max-width: 68ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.7;
  text-wrap: pretty;
}

.seo-topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 64px;
  row-gap: 0;
}

.seo-topic-grid article {
  padding-block: 32px;
  border-bottom: 1px solid var(--line);
}

.seo-topic-grid h3,
.how-to-steps h3,
.seo-guidance h2 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.seo-topic-grid p,
.how-to-steps p,
.seo-guidance p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.72;
}

.how-to-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: 64px;
  padding-block: 64px;
}

.how-to-heading p {
  margin-top: 12px;
  font-size: 15px;
}

.how-to-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.how-to-steps li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 16px;
  padding: 0 0 24px;
}

.how-to-steps li + li {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.how-to-steps li > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 14px;
  font-weight: 800;
}

.seo-guidance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.seo-guidance section {
  padding: 28px;
  background: var(--surface-subtle);
}

.seo-guidance a,
.policy-article a {
  color: var(--brand-strong);
  font-weight: 650;
  text-underline-offset: 3px;
}

.faq-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: 64px;
  padding-top: 72px;
}

.faq-section > header p {
  margin-top: 12px;
  font-size: 15px;
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list details:first-child {
  border-top: 1px solid var(--line);
}

.faq-list summary {
  position: relative;
  padding: 18px 38px 18px 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 720;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  position: absolute;
  top: 17px;
  right: 4px;
  content: "+";
  color: var(--brand-strong);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  max-width: 70ch;
  margin: -4px 0 20px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.public-header .header-inner {
  justify-content: space-between;
}

.public-header .primary-nav {
  display: flex;
  margin-left: auto;
}

.header-creator-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
}

.header-creator-link:hover {
  background: var(--brand-strong);
}

.content-page {
  min-height: 70vh;
  background: var(--surface);
}

.content-page-shell {
  padding-block: 28px 80px;
}

.breadcrumbs ol {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
}

.breadcrumbs li + li::before {
  margin-right: 8px;
  color: var(--line-strong);
  content: "/";
}

.breadcrumbs a {
  color: var(--brand-strong);
  text-decoration: none;
}

.content-hero {
  max-width: 820px;
  padding-block: 58px 52px;
}

.content-hero h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1.12;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.content-hero p {
  max-width: 70ch;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.7;
  text-wrap: pretty;
}

.content-hero > span {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.content-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 760px);
  gap: 72px;
  align-items: start;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.content-toc {
  position: sticky;
  top: 92px;
}

.content-toc > strong {
  display: block;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 13px;
}

.content-toc nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.content-toc a {
  padding-block: 5px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.content-toc a:hover {
  color: var(--brand-strong);
}

.policy-article section {
  scroll-margin-top: 96px;
}

.policy-article section + section {
  margin-top: 42px;
  padding-top: 42px;
  border-top: 1px solid var(--line);
}

.policy-article h2 {
  margin: 0 0 14px;
  font-size: 23px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.policy-article p,
.policy-article li {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.75;
}

.policy-article p {
  margin: 0;
}

.policy-article p + p {
  margin-top: 14px;
}

.policy-article ul {
  margin: 0;
  padding-left: 22px;
}

.policy-article li + li {
  margin-top: 8px;
}

.policy-table-wrap {
  overflow-x: auto;
}

.policy-article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.policy-article th,
.policy-article td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.policy-article th {
  background: var(--surface-subtle);
  color: var(--ink);
}

.sitemap-links a {
  font-size: 16px;
}

.not-found-page {
  min-height: 66vh;
  padding-block: 88px;
}

.not-found-code {
  display: block;
  color: var(--brand-strong);
  font-size: 14px;
  font-weight: 800;
}

.not-found-page h1 {
  max-width: 700px;
  margin: 12px 0;
  font-size: 44px;
  letter-spacing: -0.035em;
}

.not-found-page > p {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 17px;
}

.not-found-page > div {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 350px;
  }
  .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .built-in-logo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .studio-shell {
    width: min(100% - 28px, 760px);
  }
  .primary-nav {
    display: none;
  }
  .studio-intro {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .intro-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
  }
  .workspace {
    grid-template-areas:
      "types"
      "editor"
      "preview";
    grid-template-columns: 1fr;
  }
  .type-sidebar {
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .editor-column {
    border-right: 0;
  }
  .type-sidebar-heading {
    padding-bottom: 8px;
  }
  .type-scroller {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .type-choice {
    justify-content: center;
  }
  .preview-column {
    padding: 18px;
  }
  .preview-card {
    position: static;
  }
  .preview-stage {
    min-height: 320px;
  }
  .feature-layout,
  .privacy-section {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-block: 28px;
  }
  .footer-inner nav {
    order: 2;
  }
  .trademark {
    order: 3;
    justify-self: start;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .studio-shell {
    width: min(100% - 20px, 560px);
  }
  .header-inner {
    min-height: 58px;
  }
  .runtime-note {
    display: none;
  }
  .brand {
    font-size: 14px;
  }
  .brand-mark {
    width: 28px;
    height: 28px;
  }
  .studio-intro {
    padding-block: 26px 18px;
  }
  .studio-intro h1 {
    font-size: 30px;
  }
  .studio-intro > div > p {
    font-size: 14px;
  }
  .studio-commandbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .workflow-switch {
    width: 100%;
    justify-content: space-between;
    gap: 4px;
  }
  .workflow-step {
    grid-template-columns: 26px auto;
  }
  .workflow-step > span:first-child {
    width: 26px;
    height: 26px;
  }
  .workflow-step small {
    display: none;
  }
  .workflow-connector {
    width: 12px;
  }
  .history-actions {
    width: 100%;
  }
  .quiet-button {
    flex: 1;
  }
  .type-scroller {
    display: grid;
    overflow: hidden;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .type-choice {
    width: 100%;
    min-width: 0;
    min-height: 58px;
  }
  .editor-column {
    padding: 10px;
  }
  .content-panel {
    padding: 0;
  }
  .builder-accordion-trigger {
    padding-inline: 14px;
  }
  .builder-accordion-panel {
    padding: 14px;
  }
  .content-panel > .builder-accordion-trigger {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .content-panel > .builder-accordion-trigger .payload-badge {
    display: none;
  }
  .panel-heading {
    align-items: flex-start;
  }
  .panel-title-block {
    align-items: flex-start;
  }
  .command-icon,
  .panel-icon {
    width: 34px;
    height: 34px;
  }
  .dynamic-fields,
  .color-grid,
  .two-fieldsets,
  .control-grid,
  .field-grid,
  .field-grid.three-columns {
    grid-template-columns: 1fr;
  }
  .content-actions {
    align-items: flex-start;
    flex-direction: column;
  }
  .content-actions .primary-button,
  .content-actions .secondary-button {
    width: 100%;
    justify-content: center;
  }
  .design-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .design-count {
    display: none;
  }
  .design-tablist {
    display: flex;
    overflow-x: auto;
    padding-inline: 6px;
  }
  .design-tab {
    min-width: max-content;
    padding-inline: 10px;
  }
  .design-tabpanel {
    padding: 14px;
  }
  .template-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .template-filters {
    justify-content: flex-start;
  }
  .template-grid {
    grid-template-columns: 1fr;
  }
  .frame-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .visual-choices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .visual-choices.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .built-in-logo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }
  .design-portability {
    align-items: flex-start;
    flex-direction: column;
  }
  .design-portability > div:last-child {
    width: 100%;
  }
  .design-portability .secondary-button {
    flex: 1;
  }
  .preview-column {
    padding: 14px;
  }
  .preview-card {
    padding: 14px;
  }
  .preview-stage {
    min-height: 285px;
    padding: 14px;
  }
  #qr-preview {
    width: min(100%, 290px);
  }
  .feature-band {
    margin-top: 34px;
    padding-block: 38px;
  }
  .feature-layout ul {
    grid-template-columns: 1fr;
  }
  .feature-layout li {
    min-height: auto;
  }
  .privacy-section {
    padding-block: 46px;
  }
  .privacy-section > div {
    align-items: flex-start;
  }
  .footer-inner nav {
    flex-wrap: wrap;
  }
}

/* Professional depth controls */
.compact-select {
  display: grid;
  max-width: 240px;
  gap: 6px;
  margin: 12px 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

.range-field > small,
#module-gap-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.per-eye-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.per-eye-controls fieldset {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-subtle);
}

.per-eye-controls legend {
  padding: 0 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.per-eye-controls .field-grid {
  grid-template-columns: 1fr;
  gap: 10px;
}

.unit-input {
  position: relative;
  display: block;
}

.unit-input input {
  padding-right: 42px;
}

.unit-input em {
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  transform: translateY(-50%);
  pointer-events: none;
}

.print-calculator {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.print-calculator > div {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-subtle);
}

.print-calculator span {
  color: var(--muted);
  font-size: 14px;
}

.print-calculator strong {
  color: var(--ink);
  font-size: 14px;
}

.saved-palettes {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-subtle);
}

.saved-palettes > div:first-child {
  display: grid;
  gap: 2px;
  margin-right: auto;
}

.saved-palettes strong,
.saved-palettes span {
  font-size: 14px;
}

.saved-palettes > div:first-child span {
  color: var(--muted);
}

#saved-palette-list {
  display: flex;
  gap: 6px;
}

.saved-palette {
  display: grid;
  width: 40px;
  height: 40px;
  grid-template-columns: repeat(2, 1fr);
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
}

.saved-palette span {
  display: block;
}

.randomize-button {
  width: fit-content;
  margin-top: 8px;
}

.contrast-suggestion {
  margin: 10px 0 4px;
}

.visual-choices label > span,
.visual-choices label > small,
.segmented-control label > span {
  pointer-events: none;
}

.template-filters {
  max-height: 84px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.template-filters button,
.frame-choice-grid small {
  font-size: 14px;
}

.preview-stage[data-canvas="portrait"],
.preview-stage[data-canvas="story"] {
  min-height: 410px;
}

.preview-stage[data-canvas="landscape"] {
  min-height: 250px;
}

.preview-stage[data-canvas="custom"] {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 20px 20px;
}

.preview-stage[data-mockup]:not([data-mockup="none"]) {
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--line-strong) 80%, var(--ink));
  box-shadow: inset 0 0 0 8px var(--surface-subtle);
}

.preview-stage[data-mockup]:not([data-mockup="none"])::before {
  position: absolute;
  top: 16px;
  left: 18px;
  color: var(--muted);
  content: "Preview mockup";
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.preview-stage[data-mockup="business-card"] {
  min-height: 270px;
  border-radius: 18px;
}

.preview-stage[data-mockup="table-tent"] {
  min-height: 430px;
  clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%);
}

.preview-stage[data-mockup="poster"] {
  min-height: 440px;
  border-radius: 2px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.15);
}

.preview-stage[data-mockup="ticket"] {
  min-height: 260px;
  border-radius: 20px;
  background-image:
    radial-gradient(circle at 0 50%, transparent 12px, var(--surface) 13px),
    radial-gradient(circle at 100% 50%, transparent 12px, var(--surface) 13px);
}

.preview-stage[data-mockup="product-label"] {
  min-height: 350px;
  border-radius: 34px;
}

.preview-stage[data-mockup="phone"] {
  width: min(100%, 260px);
  min-height: 440px;
  margin-inline: auto;
  border: 8px solid #111827;
  border-radius: 32px;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.2);
}

.preview-stage[data-mockup="business-card"]::before {
  content: "BUSINESS CARD";
}
.preview-stage[data-mockup="table-tent"]::before {
  content: "TABLE TENT";
}
.preview-stage[data-mockup="poster"]::before {
  content: "POSTER";
}
.preview-stage[data-mockup="ticket"]::before {
  content: "EVENT TICKET";
}
.preview-stage[data-mockup="product-label"]::before {
  content: "PRODUCT LABEL";
}
.preview-stage[data-mockup="phone"]::before {
  content: "PHONE PREVIEW";
}

.preview-stage[data-mockup]:not([data-mockup="none"]) #qr-preview {
  position: relative;
  z-index: 1;
  width: min(68%, 250px);
}

@media (max-width: 720px) {
  .per-eye-controls,
  .print-calculator {
    grid-template-columns: 1fr;
  }

  .template-filters {
    width: 100%;
    max-height: none;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
  }

  .template-filters button {
    flex: 0 0 auto;
  }

  .saved-palettes {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .saved-palettes > div:first-child {
    width: 100%;
  }
}

@media (max-width: 390px) {
  .brand > span:last-child {
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .header-actions {
    gap: 6px;
  }
  .visual-choices.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .built-in-logo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .download-grid {
    grid-template-columns: 1fr;
  }
  .download-button.primary-download {
    grid-column: auto;
  }
}

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

/* Professional studio workflow */
:root {
  --surface-soft: var(--surface-subtle);
}

body {
  font-size: 16px;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

.studio-intro {
  padding-block: 26px 18px;
}

.studio-intro h1 {
  font-size: clamp(28px, 3vw, 38px);
}

.studio-intro > div > p,
.intro-trust,
.runtime-note {
  font-size: 14px;
}

.studio {
  overflow: clip;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(16, 24, 40, 0.07);
  background: var(--surface);
}

.workspace {
  grid-template-areas:
    "types preview"
    "editor preview";
  grid-template-columns: minmax(0, 1.48fr) minmax(370px, 0.92fr);
}

.type-sidebar {
  padding: 14px 16px;
}

.type-scroller {
  grid-template-columns: repeat(9, minmax(0, 1fr));
  border-radius: 12px;
}

.type-choice {
  min-height: 58px;
  border-bottom: 0;
  font-size: 14px;
}

.type-choice:last-child {
  border-right: 0;
}

.type-choice .asset-icon {
  width: 20px;
  height: 20px;
}

.type-choice.is-selected,
.more-types-button.is-selected {
  position: relative;
  z-index: 1;
  box-shadow: inset 0 0 0 2px var(--brand);
}

.type-dialog {
  width: min(600px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(16, 24, 40, 0.24);
  background: var(--surface);
  color: var(--ink);
}

.type-dialog[open] {
  animation: type-dialog-enter 160ms ease-out;
}

.type-dialog::backdrop {
  background: rgba(11, 18, 32, 0.54);
  backdrop-filter: blur(3px);
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 17px;
  border-bottom: 1px solid var(--line);
}

.dialog-heading > div {
  min-width: 0;
}

.dialog-heading form {
  flex: 0 0 auto;
}

.dialog-heading h2,
.dialog-heading p {
  margin: 0;
}

.dialog-heading h2 {
  font-size: 20px;
  line-height: 1.25;
}

.dialog-heading p {
  max-width: 46ch;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.dialog-heading .icon-button {
  display: inline-grid;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

.dialog-heading .icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-subtle);
  color: var(--ink);
}

.type-dialog-body {
  max-height: calc(100dvh - 143px);
  padding: 16px 22px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.type-search {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-subtle);
}

.type-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.type-search .asset-icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.type-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

.more-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.more-type-choice {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.3;
  text-align: start;
}

.more-type-choice:hover,
.more-type-choice.is-selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.more-type-choice .asset-icon {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
}

.more-type-choice:focus-visible,
.dialog-heading .icon-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 28%, transparent);
  outline-offset: 2px;
}

@keyframes type-dialog-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

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

.type-empty {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.builder-accordion-trigger {
  min-height: 58px;
}

.accordion-copy strong,
.section-step-heading h2,
.preview-heading h2,
.template-toolbar strong,
.section-title strong,
.export-heading strong,
.download-button strong,
.quality-panel > div:first-child,
.scan-details summary,
.smart-adjustment strong {
  font-size: 14px;
}

.accordion-copy small,
.section-step-heading p,
.template-toolbar span,
.section-title span,
.export-heading span,
.download-button small,
.smart-adjustment span:last-child,
.privacy-line,
.control-note {
  font-size: 14px;
}

.dynamic-fields input,
.dynamic-fields textarea,
.dynamic-fields select,
.field-grid input,
.field-grid select,
.color-field input[type="text"] {
  min-height: 46px;
  font-size: 16px;
}

.design-panel-body {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#design-tab-templates,
#design-tab-pattern,
#design-tab-colors,
#design-tab-logo,
#design-tab-frame {
  grid-row: 1;
  min-height: 64px;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

#design-tab-templates {
  grid-column: 1;
}

#design-tab-pattern {
  grid-column: 2;
}

#design-tab-colors {
  grid-column: 3;
}

#design-tab-logo {
  grid-column: 4;
}

#design-tab-frame {
  grid-column: 5;
  border-right: 0;
}

#design-tab-templates .accordion-copy,
#design-tab-pattern .accordion-copy,
#design-tab-colors .accordion-copy,
#design-tab-logo .accordion-copy,
#design-tab-frame .accordion-copy {
  align-items: center;
}

#design-tab-templates .accordion-copy small,
#design-tab-pattern .accordion-copy small,
#design-tab-colors .accordion-copy small,
#design-tab-logo .accordion-copy small,
#design-tab-frame .accordion-copy small,
#design-tab-templates .accordion-chevron,
#design-tab-pattern .accordion-chevron,
#design-tab-colors .accordion-chevron,
#design-tab-logo .accordion-chevron,
#design-tab-frame .accordion-chevron {
  display: none;
}

#design-tab-templates.is-open,
#design-tab-pattern.is-open,
#design-tab-colors.is-open,
#design-tab-logo.is-open,
#design-tab-frame.is-open {
  box-shadow: inset 0 -2px 0 var(--brand);
  background: var(--surface);
  color: var(--brand-strong);
}

.design-tabpanel {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  border-bottom: 0;
}

.advanced-trigger {
  grid-column: 1 / -1;
  grid-row: 3;
  border-top: 1px solid var(--line);
}

#design-panel-export {
  grid-row: 4;
}

.preview-column {
  padding: 18px;
  background: var(--surface-subtle);
}

.preview-card {
  top: 84px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sticky);
}

.preview-stage {
  min-height: 330px;
  border: 1px solid var(--line);
  background: var(--surface);
}

#qr-preview {
  width: min(100%, 300px);
}

.download-split {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  margin-top: 10px;
}

.download-split .primary-download {
  grid-column: 1;
  min-height: 58px;
  grid-template-columns: 24px minmax(0, 1fr);
  border-radius: 10px 0 0 10px;
}

.download-split .primary-download .asset-icon {
  width: 20px;
  height: 20px;
}

.format-menu {
  position: static;
}

.format-menu > summary {
  display: grid;
  min-height: 58px;
  place-items: center;
  border: 1px solid #2448d8;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0 10px 10px 0;
  background: #2448d8;
  color: #fff;
  cursor: pointer;
  list-style: none;
}

.format-menu > summary::-webkit-details-marker {
  display: none;
}

.format-menu[open] > summary .accordion-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.format-options {
  position: absolute;
  z-index: 12;
  right: 0;
  bottom: calc(100% + 8px);
  display: grid;
  width: min(330px, 100%);
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(16, 24, 40, 0.18);
  background: var(--surface);
}

.format-options .download-button {
  min-height: 52px;
}

.mobile-download-bar {
  display: none;
}

@media (max-width: 920px) {
  body {
    padding-bottom: 74px;
  }

  .studio {
    overflow: visible;
  }

  .workspace {
    grid-template-areas:
      "types"
      "content"
      "preview"
      "design";
    grid-template-columns: minmax(0, 1fr);
  }

  .editor-column {
    display: contents;
  }

  .content-panel {
    grid-area: content;
  }

  .design-panel {
    grid-area: design;
    border-top: 1px solid var(--line);
  }

  .preview-column {
    grid-area: preview;
    padding: 14px;
  }

  .type-scroller {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .type-choice {
    min-width: 78px;
    flex: 0 0 78px;
    scroll-snap-align: start;
    border-bottom: 0;
  }

  .preview-card {
    padding: 14px;
    box-shadow: none;
  }

  .preview-stage {
    min-height: 270px;
  }

  #qr-preview {
    width: min(100%, 250px);
  }

  .design-panel-body {
    display: block;
  }

  #design-tab-templates,
  #design-tab-pattern,
  #design-tab-colors,
  #design-tab-logo,
  #design-tab-frame {
    display: grid;
    min-height: 58px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 12px 16px;
    border-right: 0;
    text-align: left;
  }

  #design-tab-templates .accordion-copy,
  #design-tab-pattern .accordion-copy,
  #design-tab-colors .accordion-copy,
  #design-tab-logo .accordion-copy,
  #design-tab-frame .accordion-copy {
    align-items: flex-start;
  }

  #design-tab-templates .accordion-copy small,
  #design-tab-pattern .accordion-copy small,
  #design-tab-colors .accordion-copy small,
  #design-tab-logo .accordion-copy small,
  #design-tab-frame .accordion-copy small,
  #design-tab-templates .accordion-chevron,
  #design-tab-pattern .accordion-chevron,
  #design-tab-colors .accordion-chevron,
  #design-tab-logo .accordion-chevron,
  #design-tab-frame .accordion-chevron {
    display: block;
  }

  .mobile-download-bar {
    position: fixed;
    z-index: 45;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    min-height: 66px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 9px max(14px, env(safe-area-inset-right))
      calc(9px + env(safe-area-inset-bottom))
      max(14px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 30px rgba(16, 24, 40, 0.1);
    background: var(--surface);
  }

  .mobile-download-bar > span {
    display: flex;
    flex-direction: column;
    font-size: 14px;
  }

  .mobile-download-bar small {
    color: var(--muted);
  }

  .mobile-download-bar button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--brand);
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
  }

  .mobile-download-bar button:disabled {
    border-color: var(--line);
    background: var(--surface-subtle);
    color: var(--muted);
  }

  .mobile-download-bar .asset-icon {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 640px) {
  .studio-shell {
    width: min(100% - 16px, 560px);
  }

  .studio-intro {
    padding-block: 18px 12px;
  }

  .studio-intro h1 {
    font-size: 26px;
  }

  .intro-trust {
    display: none;
  }

  .more-type-grid {
    grid-template-columns: 1fr;
  }

  .type-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
  }

  .dialog-heading {
    align-items: flex-start;
    padding: 17px 16px 15px;
  }

  .dialog-heading h2 {
    font-size: 18px;
  }

  .dialog-heading .icon-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .type-dialog-body {
    max-height: calc(100dvh - 129px);
    padding: 14px 16px 18px;
  }

  .more-type-choice {
    min-height: 54px;
  }

  .validation-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .design-heading {
    gap: 12px;
  }

  .history-actions {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .type-dialog[open] {
    animation: none;
  }
}

/* Accessibility floor: editor labels and helper copy never drop below 14px. */
.studio small,
.studio .visual-choices small,
.studio .frame-choice-grid small,
.studio .template-filters button {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.35;
}

/* Exact studio interface: aligned to the approved desktop reference. */
body {
  background: var(--bg);
  color: var(--ink);
}

.studio-shell {
  width: min(calc(100% - 40px), 1380px);
  max-width: 1380px;
  padding-inline: 0;
}

.site-header {
  position: sticky;
  min-height: 68px;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 68px;
  gap: 20px;
}

.brand {
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.brand strong {
  color: inherit;
}

.brand-mark {
  width: 36px;
  height: 36px;
}

.primary-nav,
.runtime-note {
  display: none;
}

.header-actions {
  gap: 24px;
}

.header-blog,
.header-settings {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 7px 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.header-blog:hover,
.header-settings:hover {
  color: var(--brand-strong);
}

.header-blog .asset-icon,
.header-settings .asset-icon {
  width: 22px;
  height: 22px;
}

.header-settings {
  width: 42px;
  padding-inline: 0;
  border-radius: 10px;
  transition:
    background-color 160ms var(--studio-ease),
    color 160ms var(--studio-ease);
}

.header-settings.is-active,
.header-settings[aria-pressed="true"] {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.studio {
  overflow: visible;
  margin: 0 auto;
  padding-block: 22px 40px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.workspace {
  display: grid;
  grid-template-areas:
    "types types"
    "editor preview";
  grid-template-columns: minmax(0, 1.36fr) minmax(420px, 0.94fr);
  gap: 18px;
  border: 0;
  background: transparent;
}

.type-sidebar {
  grid-area: types;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.36fr);
  align-items: stretch;
  gap: 18px;
  padding: 0;
  border: 0;
  background: transparent;
}

.type-scroller {
  display: grid;
  overflow: hidden;
  grid-template-columns: repeat(8, minmax(92px, 1fr));
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.type-choice {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 10px;
  padding: 8px 11px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.type-choice:last-child {
  border-right: 0;
}

.type-choice .asset-icon {
  width: 23px;
  height: 23px;
}

.type-choice.is-selected,
.more-types-button.is-selected {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1.5px var(--brand);
  background: color-mix(in srgb, var(--brand-soft) 42%, var(--surface));
  color: var(--brand-strong);
}

.type-rail-search {
  display: grid;
  min-width: 0;
  min-height: 52px;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding-inline: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
}

.type-rail-search .asset-icon {
  width: 20px;
  height: 20px;
}

.type-rail-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

.type-rail-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}

.editor-column {
  grid-area: editor;
  overflow: hidden;
  min-width: 0;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.studio-toolbar {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 22px;
  border-bottom: 1px solid var(--line);
}

.studio-toolbar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.studio-toolbar .history-actions {
  display: flex;
  width: auto;
  gap: 10px;
}

.studio-toolbar .quiet-button {
  min-height: 38px;
  gap: 7px;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.studio-toolbar .quiet-button:hover:not(:disabled) {
  background: var(--surface-subtle);
}

.studio-toolbar .quiet-button:disabled {
  color: #98a2b3;
  cursor: default;
}

.studio-toolbar .quiet-button .asset-icon {
  width: 18px;
  height: 18px;
}

.work-panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.content-panel {
  border-bottom: 1px solid var(--line);
}

.builder-accordion-trigger {
  min-height: 56px;
  padding: 12px 22px;
  border: 0;
  background: transparent;
}

.content-panel > .builder-accordion-trigger {
  pointer-events: none;
  background: var(--surface);
}

.content-panel .accordion-copy,
.design-heading .section-step-heading > div {
  gap: 0;
}

.content-panel .accordion-copy small,
.content-panel .payload-badge,
.content-panel .accordion-chevron,
.design-heading p {
  display: none;
}

.accordion-copy strong,
.section-step-heading h2 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
}

.builder-accordion-panel {
  padding: 0 22px 20px;
}

.dynamic-fields {
  gap: 14px;
}

.dynamic-fields > label > span:first-child {
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.dynamic-fields > label > span:first-child small {
  display: none;
}

.field-input-shell {
  display: grid;
  min-height: 52px;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
}

.field-input-shell:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 11%, transparent);
}

.field-input-shell .asset-icon {
  width: 21px;
  height: 21px;
  color: var(--muted);
}

.dynamic-fields .field-input-shell input {
  min-height: 50px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
}

.field-guidance {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 8px;
  color: var(--muted);
}

.field-guidance small {
  color: inherit;
  font-size: 14px;
  font-weight: 400;
}

.content-actions {
  display: none;
}

.design-heading {
  min-height: 56px;
  padding: 12px 22px;
  border: 0;
}

.design-panel-body {
  display: grid;
  grid-template-columns: 22px repeat(5, minmax(0, 1fr)) 22px;
  padding-bottom: 22px;
}

#design-tab-templates,
#design-tab-pattern,
#design-tab-colors,
#design-tab-logo,
#design-tab-frame {
  grid-row: 1;
  min-height: 44px;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  text-align: center;
}

#design-tab-templates {
  grid-column: 2;
  border-left: 1px solid var(--line);
  border-radius: 8px 0 0 8px;
}

#design-tab-pattern {
  grid-column: 3;
}

#design-tab-colors {
  grid-column: 4;
}

#design-tab-logo {
  grid-column: 5;
}

#design-tab-frame {
  grid-column: 6;
  border-radius: 0 8px 8px 0;
}

#design-tab-templates > .asset-icon,
#design-tab-pattern > .asset-icon,
#design-tab-colors > .asset-icon,
#design-tab-logo > .asset-icon,
#design-tab-frame > .asset-icon,
#design-tab-templates .accordion-copy small,
#design-tab-pattern .accordion-copy small,
#design-tab-colors .accordion-copy small,
#design-tab-logo .accordion-copy small,
#design-tab-frame .accordion-copy small,
#design-tab-templates .accordion-chevron,
#design-tab-pattern .accordion-chevron,
#design-tab-colors .accordion-chevron,
#design-tab-logo .accordion-chevron,
#design-tab-frame .accordion-chevron {
  display: none;
}

#design-tab-templates .accordion-copy,
#design-tab-pattern .accordion-copy,
#design-tab-colors .accordion-copy,
#design-tab-logo .accordion-copy,
#design-tab-frame .accordion-copy {
  align-items: center;
}

#design-tab-templates.is-open,
#design-tab-pattern.is-open,
#design-tab-colors.is-open,
#design-tab-logo.is-open,
#design-tab-frame.is-open {
  box-shadow: inset 0 -2px 0 var(--brand);
  background: var(--surface);
  color: var(--brand-strong);
}

.design-tabpanel {
  grid-row: 2;
  grid-column: 2 / 8;
  min-width: 0;
  margin-top: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 8px 8px 8px;
  background: var(--surface);
}

.advanced-trigger {
  grid-row: 3;
  grid-column: 2 / 8;
  min-height: 54px;
  margin-top: 16px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.advanced-trigger .accordion-copy {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 24px;
}

.advanced-trigger .accordion-copy small {
  color: var(--muted);
  font-size: 14px;
}

#design-panel-export {
  grid-row: 4;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  border-radius: 8px;
}

.choice-fieldset legend {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.shape-section-tabs,
.frame-mode-tabs {
  display: grid;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-subtle);
}

.shape-section-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.frame-mode-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.shape-section-tabs button,
.frame-mode-tabs button {
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.shape-section-tabs button:hover,
.frame-mode-tabs button:hover {
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  color: var(--ink);
}

.shape-section-tabs button.is-selected,
.frame-mode-tabs button.is-selected {
  background: var(--surface);
  color: var(--brand-strong);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}

.shape-section-tabs .asset-icon,
.frame-mode-tabs .asset-icon {
  width: 18px;
  height: 18px;
}

.shape-section-tabs .asset-icon {
  display: none;
}

.shape-section-tabs button > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.shape-section-tabs small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.shape-panels,
.frame-mode-panel {
  margin-top: 16px;
}

.frame-custom-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.frame-custom-tabs button {
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.frame-custom-tabs button:hover {
  color: var(--ink);
}

.frame-custom-tabs button.is-selected {
  border-bottom-color: var(--brand);
  color: var(--brand-strong);
}

.shape-panel[hidden],
.frame-mode-panel[hidden],
.frame-custom-panel[hidden] {
  display: none;
}

.shape-panel,
.frame-mode-panel,
.frame-custom-panel {
  animation: panel-in 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.frame-custom-panel .frame-paint-fieldset {
  margin-top: 0;
}

.visual-choices,
.visual-choices.compact {
  display: grid;
  overflow: visible;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 10px;
  padding: 0;
}

.visual-choices label {
  display: flex;
  min-width: 0;
  min-height: 92px;
  gap: 6px;
  padding: 7px 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.visual-choices label:has(input:checked) {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
  background: color-mix(in srgb, var(--brand-soft) 35%, var(--surface));
  color: var(--brand-strong);
}

.visual-choices label > .shape-sample {
  display: grid;
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background-color: transparent;
}

.visual-choices label:has(input:checked) > .shape-sample {
  border-color: transparent;
  box-shadow: none;
  background-color: transparent;
}

.shape-sample:has(img) {
  background: var(--surface) !important;
  clip-path: none;
  transform: none;
}

.shape-sample img {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.visual-choices.compact .eye-sample:has(svg),
.visual-choices.compact .ball-sample:has(svg) {
  border: 0;
  background: transparent;
  clip-path: none;
  transform: none;
}

.eye-sample svg,
.ball-sample svg {
  display: block;
  width: 100%;
  height: 100%;
}

.visual-choices.compact label {
  min-width: 0;
  min-height: 84px;
  padding: 8px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.visual-choices.compact label > .eye-sample,
.visual-choices.compact label > .ball-sample {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.visual-choices.compact label:has(input:checked) {
  border: 1px solid var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
  background: color-mix(in srgb, var(--brand-soft) 35%, var(--surface));
}

.visual-choices.compact .eye-sample {
  border: 5px solid currentColor;
  background: transparent;
}

.visual-choices.compact .ball-sample {
  background: currentColor;
}

.visual-choices small {
  overflow: visible;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  text-overflow: clip;
  white-space: normal;
}

.frame-filter-bar {
  flex-wrap: wrap;
  margin-top: 0;
  overflow: visible;
}

.frame-choice-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}

.frame-choice-grid button {
  min-height: 112px;
  gap: 5px;
  padding: 8px 5px;
  border-radius: 10px;
}

.frame-choice-grid button > span {
  width: 76px;
  height: 76px;
}

.frame-library-note {
  margin-bottom: 0;
}

.two-fieldsets {
  gap: 24px;
  margin-top: 8px;
}

.two-fieldsets .choice-fieldset + .choice-fieldset {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.preview-column {
  grid-area: preview;
  min-width: 0;
  align-self: stretch;
  padding: 0;
  background: transparent;
}

.preview-card {
  position: sticky;
  top: 96px;
  min-height: 0;
  padding: 18px 22px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: none;
  background: var(--surface);
}

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

.preview-stage {
  width: min(100%, 410px);
  min-height: 0;
  margin: 2px auto 0;
  padding: 10px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
}

#qr-preview {
  width: min(100%, 340px);
  margin-inline: auto;
}

.validation-row,
.smart-adjustment,
.download-split,
.share-button,
.scan-details {
  width: min(100%, 410px);
  margin-inline: auto;
}

.validation-row {
  min-height: 34px;
  margin-top: 2px;
  gap: 10px;
  font-size: 14px;
}

.validation-chip {
  min-height: 28px;
  padding: 4px 10px;
  border: 0;
  font-size: 13px;
}

.validation-chip.is-ready {
  border-color: #047a75;
  background: #047a75;
  color: #fff;
}

.validation-chip.is-ready .status-dot {
  display: inline-grid;
  width: 14px;
  height: 14px;
  place-items: center;
  background: transparent;
  font-family: "Toolzy Flaticon UIcons";
  line-height: 1;
}

.validation-chip.is-ready .status-dot::before {
  content: "\f1eb";
  font-size: 14px;
}

.export-heading,
.privacy-line {
  display: none;
}

.download-split {
  margin-top: 16px;
}

.download-split .primary-download,
.format-menu > summary {
  min-height: 52px;
  border-color: var(--brand);
  background: var(--brand);
}

.download-split .primary-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.download-split .primary-download > span:last-child {
  display: block;
}

.download-split .primary-download small {
  display: none;
}

.download-split .primary-download strong {
  font-size: 16px;
}

.share-button {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  font-weight: 750;
}

.share-button:hover {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.share-button .asset-icon {
  width: 19px;
  height: 19px;
}

.scan-details {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.scan-details summary {
  min-height: 50px;
  padding: 11px 18px 11px 48px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}

.scan-details summary::before {
  left: 18px;
}

.mobile-download-bar {
  display: none;
}

@media (max-width: 1120px) {
  .studio-shell {
    width: calc(100% - 32px);
    padding-inline: 0;
  }

  .workspace {
    grid-template-columns: minmax(0, 1.28fr) minmax(390px, 0.92fr);
    gap: 22px 18px;
  }

  .type-sidebar {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 12px;
  }

  .type-choice {
    gap: 7px;
    padding-inline: 8px;
  }

  .type-choice .asset-icon {
    width: 20px;
    height: 20px;
  }

  .design-panel-body {
    grid-template-columns: 18px repeat(5, minmax(0, 1fr)) 18px;
  }

  .preview-card {
    padding-inline: 20px;
  }

  .frame-choice-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  body {
    padding-bottom: 74px;
  }

  .site-header,
  .header-inner {
    min-height: 60px;
  }

  .site-header {
    pointer-events: none;
  }

  .brand,
  .header-actions {
    pointer-events: auto;
  }

  .studio-shell {
    width: 100%;
    padding-inline: 14px;
  }

  .studio {
    padding-block: 14px 28px;
  }

  .workspace {
    grid-template-areas:
      "types"
      "toolbar"
      "content"
      "preview"
      "design";
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .type-sidebar {
    display: block;
  }

  .type-scroller {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .type-choice {
    min-width: 104px;
    flex: 0 0 104px;
    scroll-snap-align: start;
  }

  .type-rail-search {
    display: none;
  }

  .editor-column {
    display: contents;
  }

  .studio-toolbar {
    grid-area: toolbar;
    min-height: 58px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
  }

  .content-panel {
    grid-area: content;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
  }

  .design-panel {
    grid-area: design;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
  }

  .preview-column {
    grid-area: preview;
  }

  .preview-card {
    position: static;
    min-height: 0;
    padding: 18px 14px;
    border-radius: 10px;
  }

  .preview-stage {
    width: min(100%, 330px);
    margin-top: 0;
    padding: 10px;
  }

  #qr-preview {
    width: min(100%, 250px);
  }

  .visual-choices,
  .visual-choices.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .design-panel-body {
    display: block;
    padding: 0 0 16px;
  }

  #design-tab-templates,
  #design-tab-pattern,
  #design-tab-colors,
  #design-tab-logo,
  #design-tab-frame {
    display: grid;
    min-height: 58px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 12px 16px;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    text-align: left;
  }

  #design-tab-templates > .asset-icon,
  #design-tab-pattern > .asset-icon,
  #design-tab-colors > .asset-icon,
  #design-tab-logo > .asset-icon,
  #design-tab-frame > .asset-icon,
  #design-tab-templates .accordion-copy small,
  #design-tab-pattern .accordion-copy small,
  #design-tab-colors .accordion-copy small,
  #design-tab-logo .accordion-copy small,
  #design-tab-frame .accordion-copy small,
  #design-tab-templates .accordion-chevron,
  #design-tab-pattern .accordion-chevron,
  #design-tab-colors .accordion-chevron,
  #design-tab-logo .accordion-chevron,
  #design-tab-frame .accordion-chevron {
    display: block;
  }

  #design-tab-templates .accordion-copy,
  #design-tab-pattern .accordion-copy,
  #design-tab-colors .accordion-copy,
  #design-tab-logo .accordion-copy,
  #design-tab-frame .accordion-copy {
    align-items: flex-start;
  }

  .design-tabpanel {
    margin: 0;
    padding: 18px 16px;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
  }

  .advanced-trigger {
    margin: 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
  }

  .advanced-trigger .accordion-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  #design-panel-export {
    margin: 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
  }

  .mobile-download-bar {
    display: flex;
    pointer-events: none;
  }

  .mobile-download-bar button {
    pointer-events: auto;
  }
}

@media (max-width: 640px) {
  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .header-actions {
    gap: 8px;
  }

  .header-blog span:last-child {
    display: none;
  }

  .header-blog,
  .header-settings {
    width: 38px;
    padding-inline: 0;
  }

  .studio-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .studio-toolbar .history-actions {
    width: 100%;
    justify-content: space-between;
  }

  .builder-accordion-trigger,
  .design-heading {
    padding-inline: 16px;
  }

  .builder-accordion-panel {
    padding-inline: 16px;
  }

  .shape-section-tabs button {
    min-height: 52px;
    gap: 6px;
    padding-inline: 7px;
  }

  .shape-section-tabs button > span {
    align-items: center;
  }

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

  .field-guidance {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .two-fieldsets {
    grid-template-columns: 1fr;
  }

  .two-fieldsets .choice-fieldset + .choice-fieldset {
    padding-top: 16px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 420px) {
  .visual-choices,
  .visual-choices.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .visual-choices label > .shape-sample {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
  }

  .shape-sample img {
    width: 52px;
    height: 52px;
  }
}

@media (max-width: 350px) {
  .visual-choices,
  .visual-choices.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

#download-png .asset-icon,
#mobile-download .asset-icon {
  transform: none;
}

#redo-design .asset-icon {
  transform: none;
}

/* Template-led contained studio — selected visual direction. */
:root {
  --studio-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --studio-shadow: 0 22px 56px rgba(18, 31, 58, 0.09);
}

.site-header {
  min-height: 70px;
}

.header-inner {
  min-height: 70px;
}

.header-actions {
  gap: 16px;
}

.header-save-status {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.header-save-status .status-dot {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: "Toolzy Flaticon UIcons";
  line-height: 1;
}

.header-save-status .status-dot::before {
  content: "\f1eb";
  font-size: 18px;
}

.header-history {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-history .quiet-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  transition:
    color 160ms var(--studio-ease),
    background-color 160ms var(--studio-ease),
    transform 160ms var(--studio-ease);
}

.header-history .quiet-button:hover:not(:disabled) {
  background: var(--surface-subtle);
  color: var(--brand-strong);
}

.header-history .quiet-button:active:not(:disabled) {
  transform: translateY(1px);
}

.header-history .quiet-button:disabled {
  color: color-mix(in srgb, var(--muted) 56%, transparent);
  cursor: default;
}

.header-history .asset-icon {
  width: 18px;
  height: 18px;
}

.studio {
  width: min(calc(100% - 40px), 1320px);
  max-width: 1320px;
  margin: 24px auto 48px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--studio-shadow);
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
}

.workspace {
  grid-template-areas:
    "types types"
    "editor preview";
  grid-template-columns: minmax(0, 1.46fr) minmax(380px, 0.78fr);
  gap: 18px 28px;
}

.type-sidebar {
  display: block;
}

.type-rail-search {
  display: none;
}

.type-scroller {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  border-color: transparent;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.type-choice {
  position: relative;
  min-height: 54px;
  border-right: 0;
  background: transparent;
  color: var(--ink-soft);
  transition:
    color 170ms var(--studio-ease),
    background-color 170ms var(--studio-ease),
    transform 170ms var(--studio-ease);
}

.type-choice::after {
  position: absolute;
  right: 16%;
  bottom: -1px;
  left: 16%;
  height: 2px;
  border-radius: 999px 999px 0 0;
  background: var(--brand);
  content: "";
  opacity: 0;
  transform: scaleX(0.35);
  transition:
    opacity 170ms var(--studio-ease),
    transform 170ms var(--studio-ease);
}

.type-choice:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.type-choice.is-selected,
.more-types-button.is-selected {
  box-shadow: none;
  background: color-mix(in srgb, var(--brand-soft) 34%, transparent);
  color: var(--brand-strong);
}

.type-choice.is-selected::after,
.more-types-button.is-selected::after {
  opacity: 1;
  transform: scaleX(1);
}

.editor-column {
  position: relative;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.studio-heading {
  position: absolute;
  z-index: 1;
  top: 7px;
  left: 4px;
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.content-panel {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.content-panel > .builder-accordion-trigger {
  min-height: 38px;
  padding: 0 4px 8px 112px;
  background: transparent;
}

.content-panel .accordion-copy strong {
  font-size: 14px;
}

.content-panel .builder-accordion-panel {
  padding: 0 4px;
}

.content-panel .field-input-shell {
  min-height: 48px;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.02);
}

.design-panel {
  padding-top: 18px;
}

.design-panel-body {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  grid-template-rows: auto auto auto repeat(5, auto);
  align-items: start;
  padding: 0;
}

.template-start-heading {
  grid-row: 1;
  grid-column: 1 / 3;
  min-height: 44px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  padding: 0 4px 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

#design-tab-templates.template-start-heading {
  grid-row: 1;
  grid-column: 1 / 3;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#design-tab-templates.template-start-heading .accordion-copy {
  align-items: flex-start;
}

#design-tab-templates.template-start-heading .accordion-copy strong {
  font-size: 16px;
  font-weight: 780;
}

#design-tab-templates.template-start-heading .accordion-copy small {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.template-browse-label {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 750;
}

.template-start-heading .accordion-chevron {
  display: block;
  transition: transform 180ms var(--studio-ease);
}

.template-start-heading.is-open .accordion-chevron {
  transform: rotate(180deg);
}

.template-start-panel {
  grid-row: 2;
  grid-column: 1 / 3;
  margin: 0;
  padding: 0 4px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.template-start-panel .template-toolbar {
  display: none;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-subtle);
}

.template-start-panel.is-catalog-open .template-toolbar {
  display: flex;
  animation: studio-panel-in 180ms var(--studio-ease) both;
}

.template-start-panel .template-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.template-start-panel.is-catalog-open .template-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.template-start-panel .template-card {
  display: flex;
  min-height: 156px;
  align-items: stretch;
  justify-content: flex-start;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
  transition:
    border-color 180ms var(--studio-ease),
    box-shadow 180ms var(--studio-ease),
    transform 180ms var(--studio-ease),
    background-color 180ms var(--studio-ease);
}

.template-start-panel .template-card:hover {
  border-color: color-mix(in srgb, var(--brand) 48%, var(--line));
  box-shadow: 0 8px 20px rgba(26, 46, 90, 0.08);
  background: var(--surface);
  transform: translateY(-2px);
}

.template-start-panel .template-card:active {
  transform: translateY(0) scale(0.99);
}

.template-start-panel .template-preview {
  width: 100%;
  height: 108px;
  border-radius: 9px;
}

.template-start-panel .template-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.template-start-panel .template-card > span:last-child {
  display: grid;
  gap: 1px;
}

.template-start-panel .template-card strong {
  font-size: 14px;
}

.template-start-panel:not(.is-catalog-open) .template-card small {
  display: none;
}

.design-heading {
  grid-row: 3;
  grid-column: 1 / 3;
  min-height: 64px;
  padding: 18px 4px 12px;
  border: 0;
}

.design-heading p {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.design-heading .section-step-heading {
  align-items: center;
}

#design-tab-pattern,
#design-tab-colors,
#design-tab-logo,
#design-tab-frame,
#design-tab-export {
  grid-column: 1;
  min-height: 56px;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 13px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ink-soft);
  text-align: left;
  transition:
    color 170ms var(--studio-ease),
    border-color 170ms var(--studio-ease),
    background-color 170ms var(--studio-ease);
}

#design-tab-pattern {
  grid-row: 4;
}

#design-tab-colors {
  grid-row: 5;
}

#design-tab-logo {
  grid-row: 6;
}

#design-tab-frame {
  grid-row: 7;
}

#design-tab-export {
  grid-row: 8;
}

#design-tab-pattern > .asset-icon,
#design-tab-colors > .asset-icon,
#design-tab-logo > .asset-icon,
#design-tab-frame > .asset-icon,
#design-tab-export > .asset-icon {
  display: block;
  width: 21px;
  height: 21px;
}

#design-tab-pattern .accordion-copy,
#design-tab-colors .accordion-copy,
#design-tab-logo .accordion-copy,
#design-tab-frame .accordion-copy,
#design-tab-export .accordion-copy {
  align-items: flex-start;
}

#design-tab-pattern .accordion-copy small,
#design-tab-colors .accordion-copy small,
#design-tab-logo .accordion-copy small,
#design-tab-frame .accordion-copy small,
#design-tab-export .accordion-copy small,
#design-tab-pattern .accordion-chevron,
#design-tab-colors .accordion-chevron,
#design-tab-logo .accordion-chevron,
#design-tab-frame .accordion-chevron,
#design-tab-export .accordion-chevron {
  display: none;
}

#design-tab-pattern:hover,
#design-tab-colors:hover,
#design-tab-logo:hover,
#design-tab-frame:hover,
#design-tab-export:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

#design-tab-pattern.is-open,
#design-tab-colors.is-open,
#design-tab-logo.is-open,
#design-tab-frame.is-open,
#design-tab-export.is-open {
  border-left-color: var(--brand);
  box-shadow: none;
  background: color-mix(in srgb, var(--brand-soft) 38%, transparent);
  color: var(--brand-strong);
}

#design-panel-pattern,
#design-panel-colors,
#design-panel-logo,
#design-panel-frame,
#design-panel-export {
  grid-row: 4 / span 5;
  grid-column: 2;
  min-width: 0;
  min-height: 280px;
  margin: 0;
  padding: 14px 18px 18px 22px;
  border: 1px solid var(--line);
  border-radius: 0 12px 12px 0;
  background: var(--surface);
}

#design-panel-pattern.is-active,
#design-panel-colors.is-active,
#design-panel-logo.is-active,
#design-panel-frame.is-active,
#design-panel-export.is-active {
  animation: studio-panel-in 180ms var(--studio-ease) both;
}

.shape-section-tabs {
  padding: 3px;
}

.shape-section-tabs button {
  min-height: 44px;
}

.shape-section-tabs small {
  font-size: 12px;
}

.quick-module-spacing {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.quick-module-spacing small {
  display: block;
  margin-top: 5px;
}

#shape-panel-body:not(.show-all-shapes) #module-styles label:nth-child(n + 5) {
  display: none;
}

.shape-library-toggle {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 7px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: var(--surface-subtle);
  color: var(--brand-strong);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.shape-library-toggle .asset-icon {
  width: 17px;
  height: 17px;
}

.shape-library-toggle:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.preview-column {
  border-left: 1px solid var(--line);
  padding-left: 28px;
}

.preview-card {
  top: 94px;
  padding: 22px 24px 24px;
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(18, 31, 58, 0.09);
}

.preview-heading {
  position: relative;
  display: flex;
  width: min(100%, 390px);
  height: auto;
  align-items: flex-start;
  justify-content: center;
  margin: 0 auto 8px;
  overflow: visible;
  clip: auto;
  text-align: center;
  white-space: normal;
}

.preview-kicker {
  display: block;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

.preview-note {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.preview-heading .copy-button {
  position: absolute;
  top: -6px;
  right: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.preview-stage {
  width: min(100%, 390px);
  padding: 8px;
}

#qr-preview {
  width: min(100%, 330px);
  transform-origin: center;
}

#qr-preview.preview-refresh {
  animation: preview-refresh 160ms var(--studio-ease) both;
}

.design-summary {
  display: flex;
  width: min(100%, 360px);
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 10px auto 0;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-subtle);
  color: var(--ink-soft);
  font-size: 14px;
  text-align: center;
}

.download-split,
.share-button,
.scan-details {
  width: min(100%, 390px);
}

.download-split {
  margin-top: 18px;
}

.download-split .primary-download,
.format-menu > summary {
  min-height: 54px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
}

.download-split .primary-download,
.share-button {
  transition:
    box-shadow 180ms var(--studio-ease),
    transform 180ms var(--studio-ease),
    background-color 180ms var(--studio-ease),
    border-color 180ms var(--studio-ease);
}

.download-split .primary-download:hover:not(:disabled) {
  box-shadow: 0 10px 22px color-mix(in srgb, var(--brand) 26%, transparent);
  transform: translateY(-1px);
}

.download-split .primary-download:active:not(:disabled),
.share-button:active {
  transform: translateY(1px);
}

.share-button {
  border-color: var(--line-strong);
  border-radius: 10px;
}

.scan-details {
  margin-top: 14px;
  border-radius: 10px;
}

@keyframes studio-panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes preview-refresh {
  from {
    opacity: 0.78;
    transform: scale(0.992);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 1180px) {
  .header-save-status,
  .header-history .reset-button {
    display: none;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr) minmax(350px, 0.72fr);
    gap: 18px;
  }

  .preview-column {
    padding-left: 18px;
  }

  .design-panel-body {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .template-start-panel .template-grid {
    gap: 10px;
  }

  .template-start-panel .template-preview {
    height: 94px;
  }
}

@media (max-width: 980px) {
  body {
    padding-bottom: 78px;
  }

  .site-header {
    pointer-events: auto;
  }

  .studio {
    width: min(calc(100% - 28px), 760px);
    margin-top: 14px;
    padding: 14px;
    border-radius: 18px;
  }

  .workspace {
    grid-template-areas:
      "types"
      "toolbar"
      "content"
      "preview"
      "design";
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .type-scroller {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .type-choice {
    min-width: 104px;
    flex: 0 0 104px;
  }

  .editor-column {
    display: contents;
  }

  .studio-heading {
    position: static;
    grid-area: toolbar;
    padding: 0 2px;
  }

  .content-panel {
    grid-area: content;
    overflow: hidden;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
  }

  .content-panel > .builder-accordion-trigger,
  .content-panel .builder-accordion-panel {
    padding-right: 0;
    padding-left: 0;
  }

  .content-panel > .builder-accordion-trigger {
    padding-left: 0;
  }

  .preview-column {
    grid-area: preview;
    border-left: 0;
    padding-left: 0;
  }

  .preview-card {
    position: static;
    padding: 18px 14px;
  }

  .preview-stage {
    width: min(100%, 330px);
  }

  #qr-preview {
    width: min(100%, 250px);
  }

  .design-panel {
    grid-area: design;
    overflow: hidden;
    padding-top: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
  }

  .design-panel-body {
    display: block;
    padding: 0;
  }

  .template-start-heading {
    display: grid;
    min-height: 62px;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
  }

  .template-browse-label {
    display: none;
  }

  .template-start-panel {
    padding: 14px;
    border-bottom: 1px solid var(--line);
  }

  .template-start-panel .template-grid,
  .template-start-panel.is-catalog-open .template-grid {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 1px 1px 8px;
    scroll-snap-type: x proximity;
  }

  .template-start-panel .template-card {
    min-width: 130px;
    min-height: 142px;
    flex: 0 0 130px;
    scroll-snap-align: start;
  }

  .template-start-panel .template-preview {
    position: relative;
    height: 92px;
  }

  .template-start-panel .template-preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .template-start-panel.is-catalog-open .template-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .template-filters {
    justify-content: flex-start;
  }

  .design-heading {
    min-height: 64px;
    padding: 16px 14px 12px;
  }

  #design-tab-pattern,
  #design-tab-colors,
  #design-tab-logo,
  #design-tab-frame,
  #design-tab-export {
    display: grid;
    min-height: 58px;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    padding: 11px 14px;
    border-top: 1px solid var(--line);
    border-left: 0;
    text-align: left;
  }

  #design-tab-pattern .accordion-copy small,
  #design-tab-colors .accordion-copy small,
  #design-tab-logo .accordion-copy small,
  #design-tab-frame .accordion-copy small,
  #design-tab-export .accordion-copy small,
  #design-tab-pattern .accordion-chevron,
  #design-tab-colors .accordion-chevron,
  #design-tab-logo .accordion-chevron,
  #design-tab-frame .accordion-chevron,
  #design-tab-export .accordion-chevron {
    display: block;
  }

  #design-tab-pattern.is-open,
  #design-tab-colors.is-open,
  #design-tab-logo.is-open,
  #design-tab-frame.is-open,
  #design-tab-export.is-open {
    border-left: 0;
    background: var(--surface-blue);
  }

  #design-tab-pattern.is-open .accordion-chevron,
  #design-tab-colors.is-open .accordion-chevron,
  #design-tab-logo.is-open .accordion-chevron,
  #design-tab-frame.is-open .accordion-chevron,
  #design-tab-export.is-open .accordion-chevron {
    transform: rotate(180deg);
  }

  #design-panel-pattern,
  #design-panel-colors,
  #design-panel-logo,
  #design-panel-frame,
  #design-panel-export {
    min-height: 0;
    margin: 0;
    padding: 16px 14px 18px;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
  }

  .mobile-download-bar {
    display: flex;
  }
}

@media (max-width: 700px) {
  .header-inner {
    gap: 10px;
  }

  .brand {
    font-size: 18px;
  }

  .header-history {
    display: none;
  }

  .header-actions {
    gap: 6px;
  }

  .studio {
    width: calc(100% - 20px);
    margin-top: 10px;
    padding: 10px;
    border-radius: 16px;
  }

  #design-tab-templates.template-start-heading .accordion-copy small,
  .design-heading p {
    display: none;
  }

  .visual-choices,
  .visual-choices.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .site-header:not(.public-header) .brand > span:last-child {
    display: none;
  }
}

@media (min-width: 351px) and (max-width: 700px) {
  .visual-choices,
  .visual-choices.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .brand span:last-child {
    max-width: 175px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-settings {
    display: none;
  }

  .studio {
    width: calc(100% - 12px);
    padding: 8px;
  }

  .content-panel {
    padding: 12px;
  }

  .template-start-heading,
  .template-start-panel,
  .design-heading,
  #design-tab-pattern,
  #design-tab-colors,
  #design-tab-logo,
  #design-tab-frame,
  #design-tab-export,
  #design-panel-pattern,
  #design-panel-colors,
  #design-panel-logo,
  #design-panel-frame,
  #design-panel-export {
    padding-right: 12px;
    padding-left: 12px;
  }

  .visual-choices,
  .visual-choices.compact {
    grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* Alignment correction: one grid, one rhythm, one surface vocabulary. */
@media (min-width: 981px) {
  .studio {
    width: min(calc(100% - 48px), 1260px);
    max-width: 1260px;
    margin: 24px auto 48px;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .workspace {
    display: grid;
    overflow: visible;
    grid-template-areas:
      "types types"
      "editor preview";
    grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.82fr);
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
  }

  .type-sidebar {
    grid-area: types;
    padding: 0 20px;
    border-bottom: 1px solid var(--line);
  }

  .type-scroller {
    border: 0;
  }

  .type-choice {
    min-height: 58px;
  }

  .editor-column {
    grid-area: editor;
    min-width: 0;
    padding: 24px;
    border-right: 1px solid var(--line);
  }

  .studio-heading,
  .content-panel > .builder-accordion-trigger {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .content-panel {
    padding: 0 0 28px;
    border-bottom: 1px solid var(--line);
  }

  .content-panel .builder-accordion-panel {
    padding: 0;
  }

  .content-panel .field-group {
    gap: 8px;
  }

  .content-panel .field-input-shell {
    min-height: 50px;
  }

  .design-panel {
    padding-top: 24px;
  }

  .design-panel-body {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    grid-template-rows: auto auto auto repeat(5, auto);
    align-items: stretch;
    padding: 0;
  }

  #design-tab-templates.template-start-heading {
    min-height: 40px;
    align-items: center;
    grid-row: 1;
    grid-column: 1 / 3;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 10px;
    padding: 0 0 12px;
  }

  #design-tab-templates.template-start-heading .accordion-copy small {
    display: none;
  }

  .template-browse-label {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border: 0;
    background: transparent;
  }

  .template-start-panel {
    grid-row: 2;
    grid-column: 1 / 3;
    padding: 0 0 28px;
  }

  .template-start-panel .template-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
  }

  .template-start-panel .template-card {
    min-height: 150px;
    gap: 8px;
    padding: 8px;
    border-radius: 10px;
    box-shadow: none;
  }

  .template-start-panel .template-card:hover {
    box-shadow: none;
    transform: translateY(-1px);
  }

  .template-start-panel .template-preview {
    height: 104px;
  }

  .design-heading {
    min-height: 0;
    grid-row: 3;
    grid-column: 1 / 3;
    padding: 24px 0 14px;
  }

  .design-heading p {
    display: none;
  }

  #design-tab-pattern,
  #design-tab-colors,
  #design-tab-logo,
  #design-tab-frame,
  #design-tab-export {
    min-height: 56px;
    margin: 0;
    padding: 10px 14px;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    background: var(--surface-subtle);
  }

  #design-tab-pattern {
    border-top: 1px solid var(--line);
    border-radius: 10px 0 0 0;
  }

  #design-tab-export {
    border-bottom: 1px solid var(--line);
    border-radius: 0 0 0 10px;
  }

  #design-tab-pattern.is-open,
  #design-tab-colors.is-open,
  #design-tab-logo.is-open,
  #design-tab-frame.is-open,
  #design-tab-export.is-open {
    border-left-color: var(--line);
    background: color-mix(in srgb, var(--brand-soft) 58%, var(--surface));
    color: var(--brand-strong);
  }

  #design-panel-pattern,
  #design-panel-colors,
  #design-panel-logo,
  #design-panel-frame,
  #design-panel-export {
    min-height: 280px;
    grid-row: 4 / span 5;
    grid-column: 2;
    margin: 0;
    padding: 16px 18px 20px;
    border: 1px solid var(--line);
    border-radius: 0 10px 10px 0;
  }

  .preview-column {
    grid-area: preview;
    padding: 24px;
    border-left: 0;
    background: var(--surface-subtle);
    border-radius: 0 0 16px 0;
  }

  .preview-card {
    top: 88px;
    padding: 20px;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(18, 31, 58, 0.08);
    background: var(--surface);
  }

  .preview-heading {
    margin-bottom: 12px;
  }

  .preview-stage {
    width: min(100%, 360px);
  }

  #qr-preview {
    width: min(100%, 300px);
  }

  .design-summary,
  .download-split,
  .share-button,
  .scan-details {
    width: min(100%, 360px);
  }
}

@media (max-width: 1180px) and (min-width: 981px) {
  .studio {
    width: min(calc(100% - 32px), 1120px);
  }

  .workspace {
    grid-template-columns: minmax(0, 1.42fr) minmax(340px, 0.78fr);
  }

  .editor-column,
  .preview-column {
    padding: 20px;
  }

  .design-panel-body {
    grid-template-columns: 136px minmax(0, 1fr);
  }

  .template-start-panel .template-grid {
    gap: 8px;
  }

  .template-start-panel .template-preview {
    height: 90px;
  }
}

@media (max-width: 980px) {
  .studio {
    width: min(calc(100% - 24px), 760px);
    margin: 16px auto 36px;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .workspace {
    gap: 12px;
  }

  .type-sidebar,
  .content-panel,
  .design-panel,
  .preview-card {
    border-radius: 12px;
  }

  .type-sidebar {
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface);
  }

  .studio-heading,
  .content-panel > .builder-accordion-trigger {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .content-panel {
    padding: 16px;
  }

  .design-panel {
    padding-top: 0;
  }

  .template-start-heading {
    min-height: 60px;
    padding: 12px 14px;
  }

  #design-tab-templates.template-start-heading .accordion-copy small {
    display: none;
  }

  .template-browse-label {
    display: none;
  }

  .template-start-panel {
    padding: 14px;
  }

  .design-heading {
    min-height: 58px;
    padding: 16px 14px 12px;
  }

  .design-heading p {
    display: none;
  }

  .preview-card {
    border: 0;
    box-shadow: 0 6px 20px rgba(18, 31, 58, 0.07);
  }

  #design-tab-pattern.is-open,
  #design-tab-colors.is-open,
  #design-tab-logo.is-open,
  #design-tab-frame.is-open,
  #design-tab-export.is-open {
    border-left: 0;
    background: color-mix(in srgb, var(--brand-soft) 58%, var(--surface));
  }
}

@media (max-width: 430px) {
  .studio {
    width: calc(100% - 16px);
  }

  .content-panel {
    padding: 14px;
  }
}

@media (forced-colors: active) {
  .asset-icon,
  .status-dot,
  .quality-track span {
    forced-color-adjust: none;
  }
  .template-card.is-selected,
  .type-choice.is-selected,
  .design-tab.is-selected {
    outline: 2px solid CanvasText;
  }
}

/* Templates are a first-class customization category. */
@media (min-width: 981px) {
  .design-panel-body {
    grid-template-rows: auto repeat(6, auto);
  }

  .design-heading {
    grid-row: 1;
    grid-column: 1 / 3;
    padding: 0 0 14px;
  }

  #design-tab-templates,
  #design-tab-pattern,
  #design-tab-colors,
  #design-tab-logo,
  #design-tab-frame,
  #design-tab-export {
    grid-column: 1;
    min-height: 56px;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 14px;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    background: var(--surface-subtle);
    color: var(--ink-soft);
    text-align: left;
  }

  #design-tab-templates {
    grid-row: 2;
    border-top: 1px solid var(--line);
    border-radius: 10px 0 0 0;
  }

  #design-tab-pattern {
    grid-row: 3;
    border-top: 0;
    border-radius: 0;
  }

  #design-tab-colors {
    grid-row: 4;
  }

  #design-tab-logo {
    grid-row: 5;
  }

  #design-tab-frame {
    grid-row: 6;
  }

  #design-tab-export {
    grid-row: 7;
  }

  #design-tab-templates > .asset-icon,
  #design-tab-pattern > .asset-icon,
  #design-tab-colors > .asset-icon,
  #design-tab-logo > .asset-icon,
  #design-tab-frame > .asset-icon,
  #design-tab-export > .asset-icon {
    display: block;
    width: 21px;
    height: 21px;
  }

  #design-tab-templates .accordion-copy,
  #design-tab-pattern .accordion-copy,
  #design-tab-colors .accordion-copy,
  #design-tab-logo .accordion-copy,
  #design-tab-frame .accordion-copy,
  #design-tab-export .accordion-copy {
    align-items: flex-start;
  }

  #design-tab-templates .accordion-copy small,
  #design-tab-templates .accordion-chevron {
    display: none;
  }

  #design-tab-templates:hover {
    background: var(--surface-subtle);
    color: var(--ink);
  }

  #design-tab-templates.is-open {
    border-left-color: var(--line);
    background: color-mix(in srgb, var(--brand-soft) 58%, var(--surface));
    color: var(--brand-strong);
  }

  #design-panel-templates,
  #design-panel-pattern,
  #design-panel-colors,
  #design-panel-logo,
  #design-panel-frame,
  #design-panel-export {
    min-width: 0;
    min-height: 336px;
    grid-row: 2 / span 6;
    grid-column: 2;
    margin: 0;
    padding: 16px 18px 20px;
    border: 1px solid var(--line);
    border-radius: 0 10px 10px 0;
    background: var(--surface);
  }

  .template-start-panel .template-toolbar {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .template-start-panel .template-toolbar > div:first-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2px 12px;
  }

  .template-start-panel .template-toolbar > div:first-child > span {
    color: var(--muted);
    font-size: 13px;
  }

  .template-start-panel .randomize-button {
    grid-row: 1 / 3;
    grid-column: 2;
  }

  .template-start-panel .template-filters {
    display: flex;
    overflow: visible;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
    padding: 1px 0 3px;
  }

  .template-start-panel .template-filters button {
    flex: 0 0 auto;
  }

  .template-start-panel .template-grid {
    display: grid;
    max-height: 466px;
    overflow-x: hidden;
    overflow-y: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding-right: 4px;
  }

  .template-start-panel .template-card {
    min-width: 0;
    min-height: 138px;
  }

  .template-start-panel .template-preview {
    height: 92px;
  }
}

@media (max-width: 980px) {
  #design-tab-templates,
  #design-tab-pattern,
  #design-tab-colors,
  #design-tab-logo,
  #design-tab-frame,
  #design-tab-export {
    display: grid;
    min-height: 58px;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-top: 1px solid var(--line);
    border-left: 0;
    text-align: left;
  }

  #design-tab-templates .accordion-copy small,
  #design-tab-templates .accordion-chevron {
    display: block;
  }

  #design-tab-templates.is-open {
    border-left: 0;
    background: color-mix(in srgb, var(--brand-soft) 58%, var(--surface));
    color: var(--brand-strong);
  }

  #design-tab-templates.is-open .accordion-chevron {
    transform: rotate(180deg);
  }

  #design-panel-templates {
    min-height: 0;
    margin: 0;
    padding: 16px 14px 18px;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
  }

  .template-start-panel .template-toolbar {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .template-start-panel .template-toolbar > div:first-child {
    display: grid;
    gap: 4px;
  }

  .template-start-panel .randomize-button {
    justify-self: start;
    margin-top: 6px;
  }

  .template-start-panel .template-filters {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    padding-bottom: 3px;
  }

  .template-start-panel .template-filters button {
    flex: 0 0 auto;
  }

  .template-start-panel .template-grid,
  .template-start-panel.is-catalog-open .template-grid {
    display: grid;
    max-height: 430px;
    overflow-x: hidden;
    overflow-y: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 1px 2px 6px;
  }

  .template-start-panel .template-card {
    min-width: 0;
    min-height: 138px;
    flex: none;
  }

  .template-start-panel .template-preview {
    position: relative;
  }

  .template-start-panel .template-preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }
}

.template-start-panel .template-preview {
  position: relative;
}

.template-start-panel .template-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Compact combined shape picker, matched to the selected visual reference. */
.shape-overview {
  display: grid;
  gap: 20px;
}

.shape-overview .choice-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.shape-overview .choice-fieldset > legend {
  margin: 0 0 10px;
  padding: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.shape-body-section {
  padding-bottom: 20px !important;
  border-bottom: 1px solid var(--line) !important;
}

.shape-body-choices,
.shape-overview .visual-choices,
.shape-overview .visual-choices.compact {
  display: grid;
  overflow: visible;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.shape-body-choices {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

.shape-body-choices label {
  min-width: 0;
  min-height: 96px;
  gap: 5px;
  padding: 8px 4px 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.shape-body-choices label:hover,
.eye-choice-grid label:hover {
  border-color: var(--line-strong);
  background: var(--surface-subtle);
}

.shape-body-choices label:has(input:focus-visible),
.eye-choice-grid label:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--brand) 28%, transparent);
  outline-offset: 2px;
}

.shape-body-choices label:has(input:checked),
.eye-choice-grid label:has(input:checked) {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
  background: var(--surface);
  color: var(--brand-strong);
}

.shape-body-choices label > .shape-sample {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  overflow: hidden;
}

.shape-body-choices .shape-sample img {
  width: 50px;
  height: 50px;
  transform: scale(1.28);
}

.shape-body-choices small {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.15;
}

.shape-library-toggle.shape-library-tile {
  display: flex;
  min-width: 0;
  min-height: 96px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  order: 99;
  margin: 0;
  padding: 8px 4px 6px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.15;
  text-align: center;
}

.shape-library-toggle.shape-library-tile .asset-icon {
  width: 24px;
  height: 24px;
  background-color: var(--ink-soft);
}

.shape-library-toggle.shape-library-tile:hover {
  border-color: var(--brand);
  background: var(--surface-subtle);
  color: var(--brand-strong);
}

.eye-style-section {
  padding-bottom: 2px !important;
}

.eye-style-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  align-items: stretch;
  gap: 16px;
}

.eye-style-divider {
  width: 1px;
  min-height: 76px;
  background: var(--line);
}

.eye-style-group {
  min-width: 0;
}

.eye-group-heading {
  display: flex;
  min-height: 24px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.eye-group-heading strong {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.eye-group-heading button {
  min-height: 28px;
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--brand-strong);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.eye-group-heading button:hover {
  background: var(--brand-soft);
}

.eye-choice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.eye-choice-grid label {
  min-width: 0;
  min-height: 62px !important;
  gap: 0 !important;
  padding: 7px !important;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.eye-choice-grid label > .eye-sample,
.eye-choice-grid label > .ball-sample {
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 38px !important;
}

.eye-choice-grid label > small {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

#design-panel-pattern:not(.show-all-eye-frames)
  #eye-outer-styles
  label:nth-child(n + 4),
#design-panel-pattern:not(.show-all-eye-centers)
  #eye-inner-styles
  label:nth-child(n + 4) {
  display: none;
}

/* Keep the chosen library style visible when the compact picker is collapsed. */
#shape-panel-body:not(.show-all-shapes)
  #module-styles
  label:nth-child(4):has(~ label input:checked),
#design-panel-pattern:not(.show-all-eye-frames)
  #eye-outer-styles
  label:nth-child(3):has(~ label input:checked),
#design-panel-pattern:not(.show-all-eye-centers)
  #eye-inner-styles
  label:nth-child(3):has(~ label input:checked) {
  display: none;
}

#shape-panel-body:not(.show-all-shapes)
  #module-styles
  label:nth-child(n + 5):has(input:checked),
#design-panel-pattern:not(.show-all-eye-frames)
  #eye-outer-styles
  label:nth-child(n + 4):has(input:checked),
#design-panel-pattern:not(.show-all-eye-centers)
  #eye-inner-styles
  label:nth-child(n + 4):has(input:checked) {
  display: flex;
}

.quick-module-spacing {
  margin-top: 18px;
  padding-top: 16px;
}

@media (max-width: 1180px) and (min-width: 981px) {
  .shape-body-choices {
    gap: 8px;
  }

  .shape-body-choices label,
  .shape-library-toggle.shape-library-tile {
    min-height: 90px;
  }

  .eye-style-grid {
    gap: 12px;
  }

  .eye-choice-grid {
    gap: 7px !important;
  }
}

@media (max-width: 600px) {
  .shape-body-choices {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .shape-body-choices label,
  .shape-library-toggle.shape-library-tile {
    min-height: 88px;
  }

  .eye-style-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .eye-style-divider {
    width: 100%;
    min-height: 1px;
    height: 1px;
  }

  .eye-choice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* All shape libraries stay in compact, button-controlled horizontal rows. */
.shape-overview {
  gap: 14px;
}

.shape-body-section {
  padding-bottom: 16px !important;
}

.shape-row-section {
  padding-bottom: 12px !important;
}

#shape-panel-frame {
  border-bottom: 1px solid var(--line) !important;
}

#shape-panel-center {
  padding-bottom: 0 !important;
}

#design-panel-pattern .quick-module-spacing {
  margin-top: 14px;
  padding-top: 12px;
}

.shape-carousel {
  display: grid;
  min-width: 0;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
  container-type: inline-size;
}

.shape-scroll-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  transition:
    border-color 160ms var(--studio-ease),
    background-color 160ms var(--studio-ease),
    color 160ms var(--studio-ease),
    transform 160ms var(--studio-ease);
}

.shape-scroll-button:hover:not(:disabled) {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.shape-scroll-button:active:not(:disabled) {
  transform: scale(0.96);
}

.shape-scroll-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 28%, transparent);
  outline-offset: 2px;
}

.shape-scroll-button:disabled {
  opacity: 0.34;
  cursor: default;
}

.shape-scroll-button .asset-icon {
  width: 17px;
  height: 17px;
}

.shape-scroll-next .asset-icon {
  transform: rotate(180deg);
}

.shape-carousel [data-shape-scroller] {
  display: flex !important;
  min-width: 0;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  grid-template-columns: none !important;
  gap: 10px !important;
  padding: 2px !important;
  scroll-behavior: smooth;
  scroll-padding-inline: 2px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
}

.shape-carousel [data-shape-scroller]::-webkit-scrollbar {
  display: none;
}

.shape-carousel [data-shape-scroller] label {
  display: flex !important;
  scroll-snap-align: start;
}

.shape-carousel .shape-body-choices label {
  min-width: 0;
  flex: 0 0 calc((100% - 30px) / 4);
}

.shape-carousel .eye-choice-grid label {
  min-width: 0;
  flex: 0 0 calc((100% - 40px) / 5);
}

.shape-carousel [data-shape-scroller]:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand) 36%, transparent);
  outline-offset: 3px;
  border-radius: 9px;
}

@media (max-width: 600px) {
  .shape-carousel {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 6px;
  }
}

@container (max-width: 520px) {
  .shape-carousel .shape-body-choices label {
    flex-basis: calc((100% - 20px) / 3);
  }

  .shape-carousel .eye-choice-grid label {
    flex-basis: calc((100% - 30px) / 4);
  }
}

@container (max-width: 390px) {
  .shape-carousel .shape-body-choices label {
    flex-basis: calc((100% - 10px) / 2);
  }

  .shape-carousel .eye-choice-grid label {
    flex-basis: calc((100% - 20px) / 3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .shape-carousel [data-shape-scroller] {
    scroll-behavior: auto;
  }

  .shape-scroll-button {
    transition: none;
  }
}

/* Keep customization navigation stable while each category scrolls independently. */
@media (min-width: 981px) {
  .design-panel-body {
    --design-tab-row-height: 80px;
    --design-panel-height: 480px;
    grid-template-rows: auto repeat(6, var(--design-tab-row-height));
    align-items: stretch;
    isolation: isolate;
  }

  .design-panel-body::before {
    content: "";
    z-index: 0;
    grid-row: 2 / span 6;
    grid-column: 1;
    border: 1px solid var(--line);
    border-right: 0;
    border-radius: 12px 0 0 12px;
    background: var(--surface-subtle);
  }

  #design-tab-templates,
  #design-tab-pattern,
  #design-tab-colors,
  #design-tab-logo,
  #design-tab-frame,
  #design-tab-export {
    position: relative;
    z-index: 2;
    min-height: 0;
    height: auto;
    align-self: stretch;
    margin: 6px 8px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    color: var(--ink-soft);
    transition:
      border-color 160ms var(--studio-ease),
      background-color 160ms var(--studio-ease),
      box-shadow 160ms var(--studio-ease),
      color 160ms var(--studio-ease);
  }

  #design-tab-templates {
    grid-row: 2;
  }

  #design-tab-pattern {
    grid-row: 3;
  }

  #design-tab-colors {
    grid-row: 4;
  }

  #design-tab-logo {
    grid-row: 5;
  }

  #design-tab-frame {
    grid-row: 6;
  }

  #design-tab-export {
    grid-row: 7;
  }

  #design-tab-templates:hover:not(.is-open),
  #design-tab-pattern:hover:not(.is-open),
  #design-tab-colors:hover:not(.is-open),
  #design-tab-logo:hover:not(.is-open),
  #design-tab-frame:hover:not(.is-open),
  #design-tab-export:hover:not(.is-open) {
    border-color: color-mix(in srgb, var(--line-strong) 72%, transparent);
    background: color-mix(in srgb, var(--surface) 72%, transparent);
    color: var(--ink);
  }

  #design-tab-templates.is-open,
  #design-tab-pattern.is-open,
  #design-tab-colors.is-open,
  #design-tab-logo.is-open,
  #design-tab-frame.is-open,
  #design-tab-export.is-open {
    border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
    background: var(--surface);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 12%, transparent);
    color: var(--brand-strong);
  }

  #design-tab-templates:focus-visible,
  #design-tab-pattern:focus-visible,
  #design-tab-colors:focus-visible,
  #design-tab-logo:focus-visible,
  #design-tab-frame:focus-visible,
  #design-tab-export:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand) 28%, transparent);
    outline-offset: -1px;
  }

  #design-panel-templates,
  #design-panel-pattern,
  #design-panel-colors,
  #design-panel-logo,
  #design-panel-frame,
  #design-panel-export {
    z-index: 1;
    box-sizing: border-box;
    min-height: 0;
    height: var(--design-panel-height);
    max-height: var(--design-panel-height);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
    scrollbar-color: var(--line-strong) transparent;
    scrollbar-width: thin;
    overscroll-behavior: contain;
  }

  .template-start-panel .template-grid {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

/* Make the template and built-in logo libraries easier to scan at a glance. */
#design-panel-logo .built-in-logo-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

#design-panel-logo .built-in-logo {
  min-height: 76px;
  gap: 8px;
  padding: 8px 6px;
  border-radius: 11px;
  transition:
    border-color 160ms var(--studio-ease),
    background-color 160ms var(--studio-ease),
    box-shadow 160ms var(--studio-ease),
    transform 160ms var(--studio-ease);
}

#design-panel-logo .built-in-logo:hover {
  box-shadow: 0 7px 16px color-mix(in srgb, var(--brand) 11%, transparent);
  transform: translateY(-1px);
}

#design-panel-logo .built-in-logo:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 28%, transparent);
  outline-offset: 2px;
}

#design-panel-logo .built-in-logo .asset-icon {
  width: 28px;
  height: 28px;
}

#design-panel-logo .built-in-logo small {
  color: currentColor;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

@media (min-width: 981px) {
  .template-start-panel .template-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .template-start-panel .template-card {
    display: grid;
    min-height: 0;
    aspect-ratio: 1;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    overflow: hidden;
  }

  .template-start-panel .template-preview {
    width: 100%;
    height: auto;
    min-height: 0;
  }
}

@media (max-width: 980px) {
  .template-start-panel .template-card {
    display: grid;
    min-height: 0;
    aspect-ratio: 1;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch;
    overflow: hidden;
  }

  .template-start-panel .template-preview {
    width: 100%;
    height: auto;
    min-height: 0;
  }
}

@media (max-width: 430px) {
  #design-panel-logo .built-in-logo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Advanced settings live in a dedicated tray beneath the sticky header. */
.site-header {
  overflow: visible;
}

.header-settings-tray {
  position: absolute;
  inset: 100% 0 auto;
  max-height: calc(100vh - 70px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: color-mix(in srgb, var(--surface) 98%, transparent);
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.12);
  backdrop-filter: blur(14px);
  animation: settings-tray-in 180ms var(--studio-ease) both;
}

.settings-tray-inner {
  padding-block: 16px 18px;
}

.settings-tray-surface {
  min-width: 0;
}

.settings-tray-heading {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.settings-tray-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.settings-tray-title > .asset-icon {
  width: 22px;
  height: 22px;
  color: var(--brand-strong);
}

.settings-tray-title h2,
.settings-tray-title p {
  margin: 0;
}

.settings-tray-title h2 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 780;
  letter-spacing: -0.015em;
}

.settings-tray-title p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.settings-tray-close {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 10px;
}

.icon-close::before {
  content: "×";
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
}

.header-settings-tray #design-panel-export {
  position: static;
  z-index: auto;
  display: grid;
  box-sizing: border-box;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  max-height: none;
  grid-template-columns:
    minmax(220px, 0.82fr) minmax(250px, 1fr) minmax(300px, 1.18fr)
    minmax(220px, 0.82fr);
  grid-row: auto;
  grid-column: auto;
  gap: 0;
  margin: 0;
  padding: 16px 0 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  animation: none;
}

.advanced-settings-group {
  min-width: 0;
  padding: 2px 20px 0;
  border-right: 1px solid var(--line);
}

.advanced-settings-group:first-child {
  padding-left: 0;
}

.advanced-settings-group:last-child {
  padding-right: 0;
  border-right: 0;
}

.advanced-settings-group h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.35;
}

.header-settings-tray .advanced-eye-link {
  padding: 10px 0;
  background: transparent;
}

.header-settings-tray .advanced-qr-grid,
.header-settings-tray .advanced-print-grid {
  grid-template-columns: 1fr;
  gap: 10px;
  padding-top: 0;
  border-top: 0;
}

.header-settings-tray .advanced-qr-grid > label:last-child {
  grid-column: auto;
}

.header-settings-tray .print-calculator {
  margin-top: 12px;
}

.header-settings-tray .design-portability {
  align-items: stretch;
  flex-direction: column;
  gap: 12px;
  padding-top: 0;
  border-top: 0;
}

.header-settings-tray .design-portability > div:first-child {
  align-items: center;
}

.header-settings-tray .design-portability > div:last-child {
  align-items: stretch;
  flex-direction: column;
  gap: 8px;
}

.header-settings-tray .design-portability .secondary-button {
  width: 100%;
  justify-content: flex-start;
}

@keyframes settings-tray-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 981px) {
  .design-panel-body {
    --design-tab-row-height: 96px;
    grid-template-rows: auto repeat(5, var(--design-tab-row-height));
  }

  .design-panel-body::before {
    grid-row: 2 / span 5;
  }

  #design-panel-templates,
  #design-panel-pattern,
  #design-panel-colors,
  #design-panel-logo,
  #design-panel-frame {
    grid-row: 2 / span 5;
  }
}

@media (max-width: 1180px) {
  .header-settings-tray #design-panel-export {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
  }

  .advanced-settings-group,
  .advanced-settings-group:first-child,
  .advanced-settings-group:last-child {
    padding: 0;
    border-right: 0;
  }

  .advanced-settings-group:nth-child(n + 3) {
    padding-top: 18px;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 700px) {
  .settings-tray-inner {
    width: calc(100% - 28px);
    padding-block: 13px 16px;
  }

  .settings-tray-title p {
    display: none;
  }

  .header-settings-tray #design-panel-export {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 6px;
  }

  .advanced-settings-group,
  .advanced-settings-group:nth-child(n + 3) {
    padding: 14px 0;
    border-top: 1px solid var(--line);
  }

  .advanced-settings-group:first-child {
    border-top: 0;
  }
}

@media (max-width: 430px) {
  .header-settings {
    display: inline-flex;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header-settings-tray {
    animation: none;
  }
}

/* Advanced settings remain part of the customization workspace. */
.advanced-settings-panel {
  display: grid;
  gap: 14px;
}

.advanced-settings-panel > * {
  margin: 0;
}

.advanced-settings-panel .advanced-eye-link {
  padding: 11px 12px;
}

.advanced-settings-panel .advanced-qr-grid {
  gap: 10px;
}

.advanced-settings-panel .advanced-qr-grid > label:last-child {
  grid-column: 1 / -1;
}

.advanced-settings-panel .advanced-print-grid {
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.advanced-settings-panel .print-calculator {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.advanced-settings-panel .print-calculator > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.advanced-settings-panel .print-calculator > div:last-child {
  border-bottom: 0;
}

.advanced-settings-panel .print-calculator span,
.advanced-settings-panel .print-calculator strong {
  font-size: 13px;
  line-height: 1.35;
}

.advanced-settings-panel .print-calculator strong {
  text-align: right;
}

.advanced-settings-panel .design-portability {
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.advanced-settings-panel .design-portability > div:first-child {
  align-items: center;
  gap: 8px;
}

.advanced-settings-panel .field-grid.three-columns,
.advanced-settings-panel .field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.advanced-settings-panel .per-eye-controls .field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.advanced-settings-panel .design-portability {
  align-items: stretch;
  flex-direction: column;
}

.advanced-settings-panel .design-portability > div:last-child {
  justify-content: flex-start;
}

.logo-color-studio {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-subtle);
}

.logo-color-studio .switch-row {
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}

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

#logo-color-field {
  transition: opacity 160ms var(--studio-ease);
}

#logo-color-field.is-disabled {
  opacity: 0.5;
}

.logo-color-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 430px) {
  .advanced-settings-panel .field-grid.three-columns,
  .advanced-settings-panel .field-grid,
  .advanced-settings-panel .per-eye-controls .field-grid,
  .logo-color-grid {
    grid-template-columns: 1fr;
  }
}

/* Coordinated color palette tray */
.ready-palette-tray {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 14px 0;
  background: var(--surface-subtle);
}

.ready-palette-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ready-palette-heading > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.ready-palette-heading strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.ready-palette-heading span {
  color: var(--muted);
  font-size: 14px;
}

.ready-palette-toggle {
  display: inline-flex;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 8px 6px 8px 10px;
  border: 0;
  background: transparent;
  color: var(--brand-strong);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}

.ready-palette-toggle .accordion-chevron {
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
}

.ready-palette-toggle[aria-expanded="false"] .accordion-chevron {
  transform: rotate(-135deg);
}

.ready-palette-content {
  display: grid;
  gap: 10px;
}

.ready-palette-pager {
  display: grid;
  grid-template-columns: 44px 1fr auto 44px;
  align-items: center;
  gap: 8px;
}

.ready-palette-pager > [data-ready-palette-status] {
  justify-self: end;
  color: var(--ink-soft);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.ready-palette-arrow {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.ready-palette-arrow:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--surface-blue);
  color: var(--brand-strong);
}

.ready-palette-arrow:disabled {
  cursor: default;
  opacity: 0.38;
}

.ready-palette-arrow.is-next .asset-icon {
  transform: rotate(180deg);
}

.ready-palette-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ready-palette-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
}

.ready-palette-dots span.is-active {
  background: var(--brand);
}

.ready-palette-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(44px, 1fr));
  gap: 8px;
  justify-items: center;
}

.ready-palette-option {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.ready-palette-swatch {
  display: block;
  width: 36px;
  height: 36px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-strong);
  transition:
    box-shadow 160ms ease,
    transform 160ms ease;
}

.ready-palette-option:hover .ready-palette-swatch {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 48%, var(--line));
  transform: scale(1.06);
}

.ready-palette-option.is-selected .ready-palette-swatch {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 4px var(--brand);
}

.ready-palette-check {
  position: absolute;
  right: 0;
  bottom: 0;
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--brand);
}

.ready-palette-check::before {
  position: absolute;
  top: 3px;
  left: 5px;
  width: 4px;
  height: 7px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  content: "";
  transform: rotate(45deg);
}

.ready-palette-option.is-selected .ready-palette-check {
  display: block;
}

.ready-palette-tray-frame {
  margin-top: 0;
}

@media (max-width: 700px) {
  .ready-palette-tray {
    padding: 12px;
  }

  .ready-palette-heading {
    align-items: flex-start;
  }

  .ready-palette-heading > div {
    padding-top: 5px;
  }

  .ready-palette-toggle {
    padding-inline: 4px;
  }

  .ready-palette-grid {
    grid-template-columns: repeat(6, minmax(44px, 1fr));
    column-gap: 4px;
    row-gap: 7px;
  }
}

@media (max-width: 370px) {
  .ready-palette-heading {
    display: grid;
    gap: 4px;
  }

  .ready-palette-toggle {
    justify-self: start;
  }

  .ready-palette-grid {
    grid-template-columns: repeat(5, minmax(44px, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ready-palette-arrow,
  .ready-palette-swatch {
    transition: none;
  }
}

/* Two-step logo studio: discover a mark first, then fine-tune it. */
.logo-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-top: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-subtle);
}

.logo-mode-tabs button {
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  transition:
    background-color 160ms var(--studio-ease),
    color 160ms var(--studio-ease),
    box-shadow 160ms var(--studio-ease);
}

.logo-mode-tabs button:hover {
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  color: var(--ink);
}

.logo-mode-tabs button.is-selected {
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
  color: var(--brand-strong);
}

.logo-mode-tabs button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 28%, transparent);
  outline-offset: 1px;
}

.logo-mode-tabs .asset-icon {
  width: 18px;
  height: 18px;
}

.logo-mode-panel {
  margin-top: 14px;
}

.logo-search {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
}

.logo-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand-strong);
}

.logo-search .asset-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.logo-search input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.logo-search input::placeholder {
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  opacity: 1;
}

.logo-filter-bar {
  display: flex;
  overflow-x: auto;
  align-items: center;
  gap: 6px;
  margin: 10px 0 12px;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.logo-filter-bar::-webkit-scrollbar {
  display: none;
}

.logo-filter-bar button {
  min-height: 34px;
  flex: 0 0 auto;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.logo-filter-bar button:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.logo-filter-bar button.is-selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

#design-panel-logo .built-in-logo-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

#design-panel-logo .built-in-logo {
  min-height: 74px;
}

#design-panel-logo .built-in-logo[hidden] {
  display: none;
}

.logo-library-icon {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  opacity: 0.82;
}

.built-in-logo:hover .logo-library-icon,
.built-in-logo.is-selected .logo-library-icon {
  opacity: 1;
}

.logo-empty {
  margin: 18px 0 6px;
  padding: 16px;
  border-radius: 10px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.logo-customize-empty {
  display: grid;
  min-height: 210px;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 26px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--surface-subtle);
  color: var(--muted);
  text-align: center;
}

.logo-customize-empty[hidden] {
  display: none;
}

.logo-customize-empty > .asset-icon {
  width: 34px;
  height: 34px;
  color: var(--brand-strong);
}

.logo-customize-empty > div {
  display: grid;
  gap: 4px;
}

.logo-customize-empty strong {
  color: var(--ink);
  font-size: 15px;
}

.logo-customize-empty span {
  font-size: 14px;
}

#logo-customize-panel .logo-controls {
  animation: studio-panel-in 180ms var(--studio-ease) both;
}

@media (max-width: 980px) {
  #design-panel-logo .built-in-logo-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  #design-panel-logo .built-in-logo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .logo-mode-tabs button {
    min-height: 46px;
  }

  .logo-import-button {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .logo-import-cta {
    display: none;
  }

  .logo-file-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .logo-file-row img {
    width: 40px;
    height: 40px;
  }

  .logo-remove-button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-import-button {
    transition: none;
  }

  #logo-customize-panel .logo-controls {
    animation: none;
  }
}

/* Flagship polish: one calm, consistent interaction language across the studio. */
.workspace {
  box-shadow: var(--shadow-panel);
}

.type-scroller,
.template-start-panel .template-filters {
  scrollbar-width: none;
}

.type-scroller::-webkit-scrollbar,
.template-start-panel .template-filters::-webkit-scrollbar {
  display: none;
}

.template-start-panel .template-grid,
#design-panel-templates,
#design-panel-pattern,
#design-panel-colors,
#design-panel-logo,
#design-panel-frame,
#design-panel-export {
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.template-start-panel .template-grid::-webkit-scrollbar,
#design-panel-templates::-webkit-scrollbar,
#design-panel-pattern::-webkit-scrollbar,
#design-panel-colors::-webkit-scrollbar,
#design-panel-logo::-webkit-scrollbar,
#design-panel-frame::-webkit-scrollbar,
#design-panel-export::-webkit-scrollbar {
  width: 6px;
}

.template-start-panel .template-grid::-webkit-scrollbar-thumb,
#design-panel-templates::-webkit-scrollbar-thumb,
#design-panel-pattern::-webkit-scrollbar-thumb,
#design-panel-colors::-webkit-scrollbar-thumb,
#design-panel-logo::-webkit-scrollbar-thumb,
#design-panel-frame::-webkit-scrollbar-thumb,
#design-panel-export::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--line-strong);
}

.preview-column {
  background: color-mix(in srgb, var(--surface-subtle) 88%, var(--surface));
}

.preview-card {
  box-shadow: var(--shadow-panel);
}

.section-title strong {
  font-size: 15px;
  font-weight: 750;
}

.section-title span,
.template-toolbar span,
.preview-note,
.range-field small,
.switch-row small,
.control-note {
  font-size: 14px;
  line-height: 1.5;
}

.range-field strong,
.range-field output,
.field-grid label > span:first-child,
.compact-select > span:first-child,
.color-field > span:first-child,
.logo-filter-bar button,
.built-in-logo small,
.secondary-button {
  font-size: 14px;
}

.secondary-button {
  min-height: 40px;
  padding: 8px 12px;
  border-color: var(--line-strong);
  border-radius: 10px;
  transition:
    border-color 160ms var(--studio-ease),
    background-color 160ms var(--studio-ease),
    color 160ms var(--studio-ease),
    transform 160ms var(--studio-ease);
}

.secondary-button:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--brand) 48%, var(--line-strong));
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.secondary-button:active:not(:disabled) {
  transform: translateY(1px);
}

.color-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.color-actions .contrast-suggestion {
  margin: 0;
}

.template-card,
.built-in-logo,
.frame-choice-grid button,
.visual-choices label {
  transition:
    border-color 160ms var(--studio-ease),
    background-color 160ms var(--studio-ease),
    box-shadow 160ms var(--studio-ease),
    transform 160ms var(--studio-ease);
}

.template-card:hover,
.built-in-logo:hover,
.frame-choice-grid button:hover,
.visual-choices label:hover {
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line-strong));
  box-shadow: 0 2px 6px color-mix(in srgb, var(--brand) 10%, transparent);
  transform: translateY(-1px);
}

.template-card:active,
.built-in-logo:active,
.frame-choice-grid button:active,
.visual-choices label:active {
  transform: translateY(0);
}

.template-card.is-selected,
.built-in-logo.is-selected,
.frame-choice-grid button.is-selected,
.visual-choices label:has(input:checked) {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand-soft) 52%, var(--surface));
  box-shadow: inset 0 0 0 1px var(--brand);
}

#design-panel-logo .built-in-logo-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#design-panel-logo .built-in-logo {
  min-height: 82px;
  padding-inline: 8px;
}

#design-panel-logo .built-in-logo small {
  font-size: 14px;
  line-height: 1.25;
}

.logo-filter-bar button {
  min-height: 36px;
  padding: 7px 12px;
}

.download-split .primary-download,
.format-menu > summary,
.mobile-download-bar button {
  border-color: var(--brand);
  background: var(--brand);
}

.download-split .primary-download:hover:not(:disabled),
.mobile-download-bar button:hover:not(:disabled) {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
  box-shadow: 0 2px 6px color-mix(in srgb, var(--brand) 24%, transparent);
  transform: translateY(-1px);
}

.download-split .primary-download:active:not(:disabled),
.mobile-download-bar button:active:not(:disabled) {
  box-shadow: none;
  transform: translateY(0);
}

.share-button {
  border-color: var(--line-strong);
}

.share-button:hover {
  border-color: color-mix(in srgb, var(--brand) 48%, var(--line-strong));
}

#download-png .icon-download,
#mobile-download .icon-download {
  width: 19px;
  height: 19px;
  transform: none;
}

@media (max-width: 700px) {
  .header-inner {
    padding-inline: 14px;
  }

  .brand {
    gap: 10px;
    font-size: 16px;
    letter-spacing: -0.025em;
  }

  .brand > span:last-child {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }

  .type-scroller {
    scroll-padding-inline: 10px;
  }

  .preview-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 10px;
    padding: 16px 14px;
    box-shadow: var(--shadow-panel);
  }

  .preview-heading,
  .preview-stage,
  .design-summary,
  .export-block,
  .privacy-line {
    grid-column: 1 / -1;
  }

  .preview-heading {
    margin-bottom: 6px;
  }

  .preview-stage {
    width: min(100%, 286px);
    padding: 4px;
  }

  #qr-preview {
    width: min(100%, 250px);
  }

  .design-summary {
    margin-top: 10px;
  }

  .download-split {
    margin-top: 12px;
  }

  .share-button,
  .scan-details {
    width: 100%;
    margin-top: 10px;
  }

  .share-button,
  .scan-details summary {
    min-height: 46px;
    font-size: 14px;
  }

  .scan-details summary {
    padding: 10px 12px 10px 36px;
  }

  .scan-details summary::before {
    left: 13px;
  }

  .scan-details[open] {
    grid-column: 1 / -1;
  }

  .template-start-panel .template-grid,
  .template-start-panel.is-catalog-open .template-grid {
    max-height: 360px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 2px 2px 6px;
  }

  .template-start-panel .template-card {
    min-height: 104px;
    gap: 5px;
    padding: 7px;
  }

  .template-start-panel .template-card strong {
    font-size: 13px;
    line-height: 1.25;
  }

  .secondary-button,
  .logo-filter-bar button {
    min-height: 44px;
  }

  .section-title {
    align-items: flex-start;
  }

  .color-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 430px) {
  #design-panel-logo .built-in-logo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Individual finder controls expand below the full settings row. */
.header-settings-tray #per-eye-controls {
  grid-column: 1 / -1;
  gap: 14px;
  margin: 16px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  animation: per-eye-controls-in 180ms var(--studio-ease) both;
}

.per-eye-controls-heading h3,
.per-eye-controls-heading p {
  margin: 0;
}

.per-eye-controls-heading h3 {
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.35;
}

.per-eye-controls-heading p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.header-settings-tray .per-eye-control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.header-settings-tray #per-eye-controls fieldset {
  min-width: 0;
  margin: 0;
  padding: 13px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-subtle);
}

.header-settings-tray #per-eye-controls legend {
  padding: 0 5px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.35;
}

.header-settings-tray #per-eye-controls .field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.header-settings-tray #per-eye-controls label,
.header-settings-tray #per-eye-controls select {
  min-width: 0;
  width: 100%;
}

@keyframes per-eye-controls-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 430px) {
  .header-settings-tray #per-eye-controls .field-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header-settings-tray #per-eye-controls {
    animation: none;
  }
}

/* Shapes owns eye linking; Settings is a compact vertical utility drawer. */
.header-settings-tray {
  right: max(14px, calc((100vw - 1380px) / 2));
  left: auto;
  width: min(420px, calc(100vw - 28px));
  max-height: calc(100vh - 82px);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.header-settings-tray .settings-tray-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 10px 0 16px;
}

.header-settings-tray .settings-tray-surface {
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.14);
}

.header-settings-tray .settings-tray-heading {
  min-height: 62px;
  padding: 11px 14px;
}

.header-settings-tray .settings-tray-title p {
  max-width: 34ch;
}

.header-settings-tray #design-panel-export {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0 14px 12px;
}

.header-settings-tray .advanced-settings-group,
.header-settings-tray .advanced-settings-group:first-child,
.header-settings-tray .advanced-settings-group:last-child,
.header-settings-tray .advanced-settings-group:nth-child(n + 3) {
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-right: 0;
}

.header-settings-tray .advanced-settings-group:first-child {
  border-top: 0;
}

.header-settings-tray .advanced-settings-group h3 {
  margin-bottom: 11px;
}

.header-settings-tray .advanced-qr-grid,
.header-settings-tray .advanced-print-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.header-settings-tray .advanced-qr-grid > label:last-child {
  grid-column: 1 / -1;
}

.header-settings-tray .design-portability > div:last-child {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.eye-target-selector {
  min-width: 0;
  margin: 0;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.eye-target-selector > legend {
  margin: 0 0 10px;
  padding: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

.eye-target-options {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.eye-target-option {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  transition:
    border-color 160ms var(--studio-ease),
    background-color 160ms var(--studio-ease),
    color 160ms var(--studio-ease);
}

.eye-target-option input {
  flex: 0 0 auto;
  margin: 0;
}

.eye-target-option span {
  font-size: 14px;
  font-weight: 680;
  line-height: 1.25;
  white-space: nowrap;
}

.eye-target-option:hover:not(.is-disabled) {
  border-color: var(--line-strong);
  background: var(--surface-subtle);
}

.eye-target-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--brand) 58%, var(--line));
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.eye-target-option:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--brand) 28%, transparent);
  outline-offset: 2px;
}

.eye-target-option.is-disabled {
  border-color: var(--line);
  background: var(--surface-subtle);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.eye-target-link {
  padding-right: 14px;
}

.eye-target-divider {
  width: 1px;
  height: 30px;
  flex: 0 0 1px;
  margin: 0 2px;
  background: var(--line);
}

.eye-target-selector > small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

/* Invalid content never blocks visual editing, but cannot be exported or shared. */
.preview-note.is-design-preview {
  color: var(--warning);
  font-weight: 650;
}

.preview-stage[data-preview-state="design"] {
  background: color-mix(in srgb, var(--brand) 5%, var(--surface-subtle));
}

.copy-button:disabled,
.share-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.share-button:hover:disabled {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

@media (max-width: 700px) {
  .site-header.has-open-settings {
    position: relative;
  }

  .header-settings-tray {
    right: 8px;
    width: calc(100vw - 16px);
  }

  .header-settings-tray .settings-tray-inner {
    width: 100%;
    padding-top: 8px;
  }

  .header-settings-tray .settings-tray-title p {
    display: block;
  }

  .eye-target-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .eye-target-option {
    width: 100%;
  }

  .eye-target-link {
    grid-column: 1 / -1;
  }

  .eye-target-divider {
    display: none;
  }
}

@media (max-width: 430px) {
  .header-settings-tray .advanced-qr-grid,
  .header-settings-tray .advanced-print-grid,
  .header-settings-tray .design-portability > div:last-child {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .public-header .primary-nav {
    display: none;
  }

  .seo-lead,
  .how-to-section,
  .faq-section {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .seo-guidance {
    grid-template-columns: 1fr;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-intro > p {
    max-width: 58ch;
  }

  .footer-bottom {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .footer-bottom .trademark {
    justify-self: start;
    text-align: left;
  }

  .content-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .content-toc {
    position: static;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
  }

  .content-toc nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 16px;
  }
}

@media (max-width: 640px) {
  .seo-shell {
    padding-block: 54px 60px;
  }

  .seo-lead {
    gap: 18px;
    padding-bottom: 32px;
  }

  .seo-lead h2,
  .how-to-heading h2,
  .faq-section > header h2 {
    font-size: 25px;
  }

  .seo-topic-grid {
    grid-template-columns: 1fr;
  }

  .seo-topic-grid article {
    padding-block: 26px;
  }

  .how-to-section {
    padding-block: 48px;
  }

  .seo-guidance section {
    padding: 24px 20px;
  }

  .faq-section {
    padding-top: 52px;
  }

  .footer-main {
    padding-block: 40px 32px;
  }

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

  .footer-links > div:last-child {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    padding-block: 18px 24px;
  }

  .public-header .header-inner {
    gap: 12px;
  }

  .public-header .brand > span:last-child {
    display: none;
  }

  .header-creator-link {
    min-height: 40px;
    padding-inline: 12px;
    font-size: 13px;
  }

  .content-page-shell {
    padding-block: 18px 60px;
  }

  .content-hero {
    padding-block: 42px 38px;
  }

  .content-hero h1,
  .not-found-page h1 {
    font-size: 34px;
  }

  .content-hero p {
    font-size: 16px;
  }

  .content-layout {
    padding-top: 30px;
  }

  .policy-article section + section {
    margin-top: 34px;
    padding-top: 34px;
  }

  .policy-article h2 {
    font-size: 21px;
  }

  .policy-article p,
  .policy-article li {
    font-size: 15px;
  }

  .not-found-page {
    padding-block: 64px;
  }

  .not-found-page > div {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Responsive studio shell and single light interface. */
.site-header {
  background: var(--surface);
  backdrop-filter: none;
}

.header-inner {
  min-width: 0;
  gap: 16px;
}

.brand {
  min-width: 0;
}

.header-actions {
  min-width: 0;
  gap: 6px;
}

.header-blog,
.header-settings {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  transition:
    border-color 160ms var(--studio-ease),
    background-color 160ms var(--studio-ease),
    color 160ms var(--studio-ease);
}

.header-blog:hover,
.header-settings:hover {
  border-color: var(--line);
  background: var(--surface-subtle);
}

.copy-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  overflow: visible;
  color: var(--ink-soft);
  transition:
    border-color 160ms var(--studio-ease),
    background-color 160ms var(--studio-ease),
    color 160ms var(--studio-ease);
}

.copy-button.is-copied {
  border-color: color-mix(in srgb, var(--success) 42%, var(--line));
  background: var(--success-soft);
  color: var(--success);
}

.copy-button.is-copied .icon-copy::before {
  content: "\f1eb";
}

.dynamic-fields > label.inline-check {
  min-height: 48px;
  align-items: center;
  flex-direction: row;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 12px;
}

.dynamic-fields > label.inline-check input {
  order: -1;
}

.dynamic-fields > label.inline-check > span {
  margin: 0;
}

@media (max-width: 1180px) {
  .header-history .quiet-button {
    width: 40px;
    min-width: 40px;
    justify-content: center;
    padding-inline: 0;
  }

  .header-history .quiet-button > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (max-width: 980px) {
  .header-inner {
    min-height: 60px;
    padding-inline: 12px;
  }

  .site-header {
    min-height: 60px;
  }

  .studio-intro {
    padding-top: 28px;
    padding-bottom: 16px;
  }

  .type-scroller {
    scrollbar-width: none;
  }

  .type-scroller::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 700px) {
  .site-header:not(.public-header) .brand > span:last-child,
  .header-blog > span:last-child {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .header-blog,
  .header-settings {
    width: 44px;
    padding-inline: 0;
  }

  .studio-intro {
    padding-top: 24px;
    padding-bottom: 14px;
  }

  .studio-intro h1 {
    font-size: 25px;
    line-height: 1.18;
  }

  .studio-intro > div > p {
    max-width: 55ch;
    font-size: 15px;
    line-height: 1.55;
  }

  .intro-trust {
    display: none;
  }

  .type-choice {
    min-width: 96px;
    flex-basis: 96px;
  }

  .content-panel {
    padding: 14px;
  }

  .dynamic-fields {
    gap: 12px;
  }

  .dynamic-fields > label.inline-check {
    grid-column: 1 / -1;
  }
}

@media (max-width: 370px) {
  .header-inner {
    padding-inline: 8px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .header-blog,
  .header-settings {
    width: 42px;
    min-width: 42px;
  }

  .studio {
    width: calc(100% - 12px);
  }

  .type-choice {
    min-width: 90px;
    flex-basis: 90px;
  }
}

/* Keep the editor and preview together on short landscape displays. */
@media (min-width: 700px) and (max-width: 980px) and (max-height: 620px) and (orientation: landscape) {
  body {
    padding-bottom: 0;
  }

  .studio-intro {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .studio {
    width: calc(100% - 20px);
    max-width: none;
    margin: 10px auto 24px;
  }

  .workspace {
    grid-template-areas:
      "types types"
      "content preview"
      "design preview";
    grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
    align-items: start;
    gap: 12px;
  }

  .type-sidebar {
    grid-area: types;
  }

  .editor-column {
    display: contents;
  }

  .content-panel {
    grid-area: content;
  }

  .design-panel {
    grid-area: design;
  }

  .preview-column {
    grid-area: preview;
  }

  .preview-card {
    position: sticky;
    top: 70px;
    max-height: calc(100vh - 82px);
    overflow-y: auto;
    padding: 12px;
  }

  .preview-heading {
    margin-bottom: 2px;
  }

  .preview-note,
  .design-summary,
  .scan-details {
    display: none;
  }

  .preview-stage {
    width: min(100%, 220px);
    padding: 2px;
  }

  #qr-preview {
    width: min(100%, 190px);
  }

  .download-split {
    margin-top: 8px;
  }

  .share-button {
    margin-top: 8px;
  }

  .mobile-download-bar {
    display: none;
  }
}

/* Phone app shell: stable preview, in-flow bottom sheets, and a studio-bound dock. */
.mobile-app-layer {
  display: none;
}

@media (max-width: 700px) {
  body.mobile-app-mode {
    padding-bottom: 0;
    background: var(--surface-subtle);
  }

  body.mobile-app-mode .mobile-download-bar {
    display: none !important;
  }

  .mobile-app-ready.studio {
    width: 100%;
    min-height: calc(100svh - 60px);
    margin: 0;
    padding: 0 12px 18px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: var(--surface-subtle);
  }

  .mobile-app-ready .studio-intro {
    display: block;
    padding: 20px 4px 14px;
    text-align: center;
  }

  .mobile-app-ready .studio-intro h1 {
    max-width: 18ch;
    margin-inline: auto;
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: -0.025em;
    text-wrap: balance;
  }

  .mobile-app-ready .studio-intro > div > p {
    max-width: 38ch;
    margin: 8px auto 0;
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.5;
    text-wrap: pretty;
  }

  .mobile-app-ready .workspace {
    display: block;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .mobile-app-ready .workspace > .editor-column:empty {
    display: none;
  }

  .mobile-app-ready .preview-column {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .mobile-app-ready .preview-card {
    position: relative;
    top: auto;
    display: block;
    width: 100%;
    max-width: 430px;
    min-height: 0;
    max-height: none;
    margin-inline: auto;
    overflow: visible;
    padding: 12px 14px 14px;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(18, 31, 58, 0.09);
    background: var(--surface);
  }

  .mobile-app-ready .preview-heading {
    position: static;
    display: flex;
    width: min(100%, 300px);
    height: auto;
    min-height: 38px;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto 2px;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  .mobile-app-ready .preview-kicker {
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 700;
  }

  .mobile-app-ready .preview-note {
    display: none;
  }

  .mobile-app-ready .copy-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
  }

  .mobile-app-ready .preview-stage {
    width: min(100%, 270px);
    min-height: 0;
    margin: 0 auto;
    padding: 4px;
    border: 0;
    background: var(--surface);
  }

  .mobile-app-ready #qr-preview {
    width: min(100%, 224px);
    margin-inline: auto;
  }

  .mobile-app-ready .design-summary {
    width: min(100%, 300px);
    min-height: 38px;
    margin: 4px auto 0;
    padding: 8px 10px;
    border-color: var(--line);
    background: var(--surface-subtle);
    font-size: 13px;
    line-height: 1.35;
  }

  .mobile-app-layer {
    display: block;
    width: 100%;
    max-width: 430px;
    margin: 12px auto 0;
  }

  .mobile-app-sheet {
    position: relative;
    width: 100%;
    overflow: visible;
    border: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 8px rgba(18, 31, 58, 0.08);
    background: var(--surface);
    animation: mobile-sheet-enter 180ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .mobile-app-sheet[hidden] {
    display: none;
  }

  .mobile-app-sheet-header {
    position: relative;
    display: grid;
    min-height: 62px;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
    gap: 12px;
    padding: 15px 14px 9px 16px;
    border-bottom: 1px solid var(--line);
  }

  .mobile-sheet-handle {
    position: absolute;
    top: 7px;
    left: 50%;
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: var(--line-strong);
    transform: translateX(-50%);
  }

  .mobile-app-sheet-header h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.3;
    letter-spacing: -0.01em;
  }

  .mobile-sheet-close {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: var(--surface-subtle);
    color: var(--ink-soft);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
  }

  .mobile-sheet-close:active {
    background: var(--brand-soft);
    color: var(--brand-strong);
  }

  .mobile-sheet-segments {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin: 12px 14px 0;
    padding: 4px;
    border-radius: 10px;
    background: var(--surface-subtle);
  }

  .mobile-sheet-segments[hidden] {
    display: none;
  }

  .mobile-sheet-segments button {
    min-height: 42px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    font-size: 14px;
    font-weight: 750;
  }

  .mobile-sheet-segments button.is-selected {
    background: var(--surface);
    box-shadow: 0 2px 6px rgba(18, 31, 58, 0.1);
    color: var(--brand-strong);
  }

  .mobile-app-sheet-body {
    padding: 14px 14px calc(88px + env(safe-area-inset-bottom));
  }

  .mobile-sheet-host[hidden] {
    display: none;
  }

  .mobile-sheet-content-host .type-sidebar {
    display: block;
    margin: 0;
    padding: 0 0 12px;
    border: 0;
    background: transparent;
  }

  .mobile-sheet-content-host .type-scroller {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 1px 8px;
    border: 0;
    scroll-padding-inline: 1px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .mobile-sheet-content-host .type-scroller::-webkit-scrollbar {
    display: none;
  }

  .mobile-sheet-content-host .type-choice {
    min-width: 86px;
    min-height: 58px;
    flex: 0 0 86px;
    flex-direction: column;
    gap: 5px;
    padding: 8px 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    scroll-snap-align: start;
    font-size: 12px;
  }

  .mobile-sheet-content-host .type-choice.is-selected,
  .mobile-sheet-content-host .more-types-button.is-selected {
    border-color: var(--brand);
    box-shadow: inset 0 0 0 1px var(--brand);
    background: var(--brand-soft);
    color: var(--brand-strong);
  }

  .mobile-sheet-content-host .content-panel {
    display: block;
    margin: 0;
    overflow: visible;
    padding: 4px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .mobile-sheet-content-host .content-panel > .builder-accordion-trigger {
    display: none;
  }

  .mobile-sheet-content-host .content-panel .builder-accordion-panel {
    display: block;
    padding: 0;
  }

  .mobile-sheet-content-host .dynamic-fields {
    gap: 12px;
  }

  .mobile-sheet-content-host input,
  .mobile-sheet-content-host textarea,
  .mobile-sheet-content-host select {
    font-size: 16px;
  }

  .mobile-sheet-design-host .design-panel {
    display: block;
    margin: 0;
    overflow: visible;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .mobile-sheet-design-host .design-panel-body {
    --design-panel-height: auto;
    display: block;
    min-height: 0;
    padding: 0;
  }

  .mobile-sheet-design-host .design-panel-body::before,
  .mobile-sheet-design-host .design-heading,
  .mobile-sheet-design-host [data-design-tab] {
    display: none !important;
  }

  .mobile-sheet-design-host [data-design-panel] {
    width: 100%;
    min-height: 0;
    height: auto !important;
    max-height: none !important;
    margin: 0;
    overflow: visible !important;
    padding: 0;
    border: 0;
    border-radius: 0;
  }

  .mobile-sheet-design-host .template-toolbar {
    margin-bottom: 12px;
  }

  .mobile-sheet-design-host .template-toolbar > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  .mobile-sheet-design-host .template-toolbar span {
    display: none;
  }

  .mobile-sheet-design-host .randomize-button {
    margin: 0;
  }

  .mobile-sheet-design-host .template-start-panel .template-grid,
  .mobile-sheet-design-host
    .template-start-panel.is-catalog-open
    .template-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    overflow: visible;
    padding: 0;
  }

  .mobile-sheet-design-host .template-start-panel .template-card {
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 6px;
    border-radius: 10px;
  }

  .mobile-sheet-design-host .template-start-panel .template-preview {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  .mobile-sheet-design-host .template-card > span:last-child {
    min-height: 32px;
    justify-content: center;
  }

  .mobile-sheet-design-host .template-card strong {
    font-size: 12px;
    line-height: 1.25;
  }

  .mobile-sheet-export-host .export-block,
  .mobile-sheet-export-host .download-split,
  .mobile-sheet-export-host .share-button,
  .mobile-sheet-export-host .scan-details,
  .mobile-sheet-export-host .privacy-line {
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }

  .mobile-sheet-export-host .download-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 0;
  }

  .mobile-sheet-export-host .download-split .primary-download {
    width: 100%;
    border-radius: 10px;
  }

  .mobile-sheet-export-host .format-menu {
    position: static;
    width: 100%;
  }

  .mobile-sheet-export-host .format-menu > summary {
    display: none;
  }

  .mobile-sheet-export-host .format-options {
    position: static;
    inset: auto;
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .mobile-sheet-export-host .format-options .download-button {
    width: 100%;
    min-height: 62px;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
    margin: 0;
    padding: 9px 10px;
    border-radius: 10px;
    background: var(--surface);
  }

  .mobile-sheet-export-host
    .format-options
    .download-button:hover:not(:disabled) {
    background: var(--brand-soft);
  }

  .mobile-sheet-export-host .format-options .file-format {
    width: 36px;
    height: 36px;
    font-size: 9px;
  }

  .mobile-sheet-export-host .format-options .download-button strong {
    font-size: 13px;
    line-height: 1.2;
  }

  .mobile-sheet-export-host .format-options .download-button small {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.25;
  }

  .mobile-sheet-export-host .export-heading {
    margin: 0 0 10px;
  }

  .mobile-sheet-export-host .export-heading strong {
    display: none;
  }

  .mobile-sheet-export-host .export-heading {
    display: block;
    margin-bottom: 12px;
  }

  .mobile-sheet-export-host .export-heading strong {
    font-size: 15px;
  }

  .mobile-sheet-export-host .export-heading span {
    margin-top: 2px;
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.4;
  }

  .mobile-sheet-export-host .download-split {
    margin-top: 0;
  }

  .mobile-sheet-export-host .privacy-line {
    display: flex;
    margin-top: 14px;
    color: var(--ink-soft);
    font-size: 13px;
  }

  .mobile-app-nav {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    min-height: calc(68px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
    padding: 6px max(6px, env(safe-area-inset-right))
      max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 -4px 8px rgba(18, 31, 58, 0.08);
  }

  .mobile-app-nav[hidden] {
    display: none;
  }

  .mobile-app-nav button {
    display: flex;
    min-width: 0;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    padding: 5px 2px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
  }

  .mobile-app-nav button > span:last-child {
    display: block;
    width: 100%;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-app-nav button .asset-icon {
    width: 21px;
    height: 21px;
  }

  .mobile-app-nav button.is-selected {
    background: var(--brand-soft);
    color: var(--brand-strong);
  }

  .mobile-app-nav button:active {
    background: color-mix(in srgb, var(--brand-soft) 76%, var(--surface));
  }

  .mobile-app-nav button:focus-visible,
  .mobile-sheet-close:focus-visible,
  .mobile-sheet-segments button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand) 30%, transparent);
    outline-offset: 1px;
  }

  html[dir="rtl"] .mobile-app-sheet-header {
    padding-right: 16px;
    padding-left: 14px;
  }

  @keyframes mobile-sheet-enter {
    from {
      opacity: 0;
      transform: translateY(14px);
    }

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

@media (max-width: 700px) and (max-height: 700px) {
  .mobile-app-ready .studio-intro {
    padding-top: 12px;
    padding-bottom: 8px;
  }

  .mobile-app-ready .studio-intro h1 {
    font-size: 21px;
  }

  .mobile-app-ready .studio-intro > div > p {
    display: -webkit-box;
    margin-top: 5px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .mobile-app-ready .preview-card {
    padding-top: 8px;
    padding-bottom: 10px;
  }

  .mobile-app-ready .preview-heading {
    min-height: 34px;
  }

  .mobile-app-ready .preview-stage {
    width: min(100%, 220px);
  }

  .mobile-app-ready #qr-preview {
    width: min(100%, 178px);
  }

  .mobile-app-ready .design-summary {
    display: none;
  }
}

@media (max-width: 350px) {
  .mobile-app-ready.studio {
    padding-inline: 8px;
  }

  .mobile-app-sheet-body {
    padding-right: 10px;
    padding-left: 10px;
  }

  .mobile-sheet-design-host .template-start-panel .template-grid,
  .mobile-sheet-design-host
    .template-start-panel.is-catalog-open
    .template-grid {
    gap: 6px;
  }

  .mobile-app-nav button {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-app-sheet {
    animation: none;
  }
}

/* Mobile studio v2: a viewport-contained app stage with scroll-safe tab panels. */
@media (max-width: 700px) {
  body.mobile-app-mode {
    background: var(--surface);
  }

  body.mobile-app-mode .site-header {
    box-shadow: 0 1px 0 var(--line);
  }

  .mobile-app-ready.studio {
    position: relative;
    display: grid;
    width: 100%;
    height: calc(100svh - 60px);
    min-height: 0;
    grid-template-rows: auto auto minmax(0, 1fr);
    margin: 0;
    overflow: clip;
    overflow-anchor: none;
    padding: 0;
    background: color-mix(in srgb, var(--surface-subtle) 82%, var(--surface));
  }

  .mobile-app-ready .studio-intro {
    padding: 12px 16px 10px;
    background: var(--surface);
    text-align: left;
  }

  .mobile-app-ready .studio-intro h1 {
    max-width: none;
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -0.025em;
    text-align: left;
  }

  .mobile-app-ready .studio-intro > div > p {
    display: -webkit-box;
    max-width: 62ch;
    margin: 5px 0 0;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  html[dir="rtl"] .mobile-app-ready .studio-intro,
  html[dir="rtl"] .mobile-app-ready .studio-intro h1,
  html[dir="rtl"] .mobile-app-ready .studio-intro > div > p {
    text-align: right;
  }

  .mobile-app-ready .workspace {
    display: block;
    min-height: 0;
    overflow: visible;
    padding: 0 12px 10px;
    background: transparent;
  }

  .mobile-app-ready .preview-column {
    display: block;
    min-height: 0;
    padding: 0;
    background: transparent;
  }

  .mobile-app-ready .preview-card {
    position: relative;
    display: block;
    width: 100%;
    max-width: 430px;
    min-height: 0;
    max-height: none;
    margin-inline: auto;
    overflow: hidden;
    padding: 8px 12px 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: none;
    background: var(--surface);
  }

  .mobile-app-ready .preview-heading {
    position: static;
    display: flex;
    width: 100%;
    min-height: 34px;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  .mobile-app-ready .preview-heading > div {
    display: flex;
    align-items: baseline;
    gap: 7px;
  }

  .mobile-app-ready .preview-kicker {
    color: var(--ink);
    font-size: 14px;
    font-weight: 750;
  }

  .mobile-app-ready .copy-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
  }

  .mobile-app-ready .copy-button:active {
    background: var(--brand-soft);
  }

  .mobile-app-ready .preview-stage {
    width: min(100%, 196px);
    min-height: 0;
    margin: -2px auto 0;
    padding: 0;
    border: 0;
    background: var(--surface);
  }

  .mobile-app-ready #qr-preview {
    width: min(100%, 184px);
    margin-inline: auto;
  }

  .mobile-app-ready .design-summary {
    width: min(100%, 300px);
    min-height: 30px;
    margin: 3px auto 0;
    padding: 6px 10px;
    border: 0;
    background: var(--surface-subtle);
    font-size: 12px;
    line-height: 1.35;
  }

  .mobile-app-layer {
    display: grid;
    position: relative;
    width: 100%;
    max-width: none;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) auto;
    margin: 0;
    overflow: hidden;
    background: var(--surface);
  }

  .mobile-app-error {
    position: fixed;
    z-index: 70;
    right: 16px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: 16px;
    max-width: 430px;
    margin-inline: auto;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, #b42318 34%, var(--line));
    border-radius: 12px;
    background: color-mix(in srgb, #fef3f2 96%, var(--surface));
    box-shadow: 0 10px 26px rgba(16, 24, 40, 0.18);
    color: #8f1b13;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.45;
  }

  .mobile-app-error[hidden] {
    display: none;
  }

  .mobile-app-sheet {
    position: relative;
    display: grid;
    width: 100%;
    min-width: 0;
    min-height: 0;
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -3px 7px rgba(18, 31, 58, 0.08);
    background: var(--surface);
    animation: mobile-sheet-enter 180ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .mobile-app-sheet-header {
    position: relative;
    display: block;
    min-height: 48px;
    padding: 16px 16px 8px;
    border-bottom: 0;
    background: var(--surface);
  }

  .mobile-sheet-handle {
    top: 7px;
    width: 34px;
    height: 3px;
    background: var(--line-strong);
  }

  .mobile-app-sheet-header h2 {
    overflow: hidden;
    margin: 0;
    font-size: 16px;
    font-weight: 780;
    line-height: 1.35;
    letter-spacing: -0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-sheet-segments {
    margin: 0 14px 8px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-subtle);
  }

  .mobile-sheet-segments button {
    min-height: 38px;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 13px;
  }

  .mobile-sheet-segments button.is-selected {
    box-shadow: 0 1px 4px rgba(18, 31, 58, 0.1);
  }

  .mobile-app-sheet-body {
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overflow-anchor: none;
    padding: 10px 14px 22px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-app-sheet-body::-webkit-scrollbar {
    display: none;
  }

  .mobile-sheet-host {
    min-width: 0;
  }

  .mobile-sheet-content-host .type-sidebar {
    position: static;
    overflow: visible;
  }

  .mobile-sheet-content-host .type-scroller {
    margin-inline: -2px;
    padding: 2px 2px 9px;
  }

  .mobile-sheet-content-host .type-choice {
    min-width: 82px;
    min-height: 62px;
    flex-basis: 82px;
  }

  .mobile-sheet-content-host .content-panel,
  .mobile-sheet-design-host .design-panel,
  .mobile-sheet-design-host .design-panel-body,
  .mobile-sheet-design-host [data-design-panel],
  .mobile-sheet-design-host .template-start-panel {
    position: static !important;
    inset: auto !important;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto !important;
    max-height: none !important;
    margin: 0;
    overflow: visible !important;
    transform: none !important;
  }

  .mobile-sheet-design-host .design-panel,
  .mobile-sheet-design-host .design-panel-body,
  .mobile-sheet-design-host [data-design-panel] {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .mobile-sheet-design-host .template-toolbar {
    margin: 0 0 10px;
  }

  .mobile-sheet-design-host .template-toolbar > div {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .mobile-sheet-design-host .template-toolbar strong {
    align-self: center;
    font-size: 14px;
  }

  .mobile-sheet-design-host .randomize-button {
    min-height: 40px;
    padding: 7px 10px;
    font-size: 13px;
  }

  .mobile-sheet-design-host .template-start-panel .template-grid,
  .mobile-sheet-design-host
    .template-start-panel.is-catalog-open
    .template-grid {
    position: static !important;
    display: grid;
    width: 100%;
    min-width: 0;
    max-height: none !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow: visible !important;
    padding: 0 0 2px;
  }

  .mobile-sheet-design-host .template-start-panel .template-card {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 108px;
    height: auto !important;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 5px;
    overflow: hidden;
    padding: 6px;
    border-radius: 10px;
  }

  .mobile-sheet-design-host .template-start-panel .template-preview {
    width: 100%;
    min-height: 0;
    height: auto;
    aspect-ratio: 1.18;
    overflow: hidden;
  }

  .mobile-sheet-design-host .template-card > span:last-child {
    min-height: 29px;
  }

  .mobile-sheet-design-host .template-card strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.22;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .mobile-sheet-design-host .template-card small {
    display: none;
  }

  .mobile-sheet-export-host .export-block,
  .mobile-sheet-export-host .download-split,
  .mobile-sheet-export-host .share-button,
  .mobile-sheet-export-host .scan-details,
  .mobile-sheet-export-host .privacy-line {
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }

  .mobile-app-nav {
    position: relative;
    z-index: 2;
    right: auto;
    bottom: auto;
    left: auto;
    display: grid;
    width: 100%;
    min-height: calc(68px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
    padding: 5px max(6px, env(safe-area-inset-right))
      max(5px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: var(--surface);
    box-shadow: none;
  }

  .mobile-app-nav button {
    min-height: 58px;
    gap: 4px;
    padding: 5px 2px 4px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 720;
  }

  .mobile-app-nav button .asset-icon {
    width: 22px;
    height: 22px;
  }

  .mobile-app-nav button.is-selected {
    background: var(--brand-soft);
    color: var(--brand-strong);
  }

  .mobile-app-nav button:active {
    transform: scale(0.97);
  }

  .mobile-app-nav button:focus-visible,
  .mobile-sheet-segments button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand) 30%, transparent);
    outline-offset: 0;
  }
}

@media (max-width: 700px) and (max-height: 700px) {
  .mobile-app-ready .studio-intro {
    padding-top: 8px;
    padding-bottom: 7px;
  }

  .mobile-app-ready .studio-intro h1 {
    font-size: 20px;
  }

  .mobile-app-ready .studio-intro > div > p {
    display: -webkit-box;
    margin-top: 3px;
    font-size: 13px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  .mobile-app-ready .workspace {
    padding-bottom: 7px;
  }

  .mobile-app-ready .preview-card {
    padding-top: 5px;
    padding-bottom: 6px;
  }

  .mobile-app-ready .preview-heading {
    min-height: 30px;
  }

  .mobile-app-ready .preview-stage {
    width: min(100%, 136px);
  }

  .mobile-app-ready #qr-preview {
    width: min(100%, 128px);
  }

  .mobile-app-ready .design-summary {
    display: none;
  }

  .mobile-app-sheet-header {
    min-height: 44px;
    padding-top: 15px;
    padding-bottom: 6px;
  }
}

@media (max-width: 350px) {
  .mobile-app-ready .studio-intro,
  .mobile-app-ready .workspace {
    padding-right: 8px;
    padding-left: 8px;
  }

  .mobile-app-sheet-body {
    padding-right: 10px;
    padding-left: 10px;
  }

  .mobile-sheet-design-host .template-start-panel .template-grid,
  .mobile-sheet-design-host
    .template-start-panel.is-catalog-open
    .template-grid {
    gap: 6px;
  }

  .mobile-app-nav button {
    font-size: 10px;
  }
}

@media (max-width: 700px) and (max-height: 500px) and (orientation: landscape) {
  .mobile-app-ready.studio {
    grid-template-rows: minmax(0, 1fr);
    grid-template-columns: minmax(220px, 42%) minmax(0, 1fr);
  }

  .mobile-app-ready .studio-intro {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .mobile-app-ready .workspace {
    grid-row: 1;
    grid-column: 1;
    height: 100%;
    padding: 8px;
  }

  .mobile-app-ready .preview-column,
  .mobile-app-ready .preview-card {
    height: 100%;
  }

  .mobile-app-ready .preview-card {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    flex-direction: column;
    padding: 6px 10px 8px;
  }

  .mobile-app-ready .preview-stage {
    width: min(100%, 190px);
    margin-block: auto;
  }

  .mobile-app-ready #qr-preview {
    width: min(100%, 180px);
  }

  .mobile-app-layer {
    grid-row: 1;
    grid-column: 2;
    height: 100%;
    border-left: 1px solid var(--line);
  }

  html[dir="rtl"] .mobile-app-layer {
    border-right: 1px solid var(--line);
    border-left: 0;
  }

  .mobile-app-sheet {
    border-top: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .mobile-app-sheet-header {
    min-height: 42px;
    padding: 14px 12px 5px;
  }

  .mobile-sheet-segments {
    margin-right: 10px;
    margin-bottom: 6px;
    margin-left: 10px;
  }

  .mobile-app-sheet-body {
    padding: 8px 10px 16px;
  }
}

/* Shared privacy choices */
.cookie-consent-shell {
  position: fixed;
  z-index: var(--z-consent);
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 16px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.cookie-consent-shell[hidden] {
  display: none;
}

.cookie-consent-panel {
  display: grid;
  width: min(100%, 760px);
  max-height: calc(100dvh - 32px - env(safe-area-inset-bottom));
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 28px;
  padding: 22px;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.18);
  color: var(--ink);
  pointer-events: auto;
}

.cookie-consent-copy {
  min-width: 0;
}

.cookie-consent-copy h2 {
  margin: 0 0 6px;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.cookie-consent-copy p {
  max-width: 62ch;
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

.cookie-consent-copy a {
  color: var(--brand-strong);
  font-size: 14px;
  font-weight: 650;
  text-underline-offset: 3px;
}

.cookie-consent-actions,
.cookie-customize-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.cookie-consent-actions {
  align-self: center;
}

.cookie-button {
  min-height: 44px;
  padding: 9px 14px;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 160ms ease-out,
    color 160ms ease-out,
    box-shadow 160ms ease-out;
}

.cookie-button:focus-visible,
.cookie-settings-button:focus-visible,
.cookie-preference-row input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 70%, transparent);
  outline-offset: 2px;
}

.cookie-button-primary {
  background: var(--brand);
  color: #fff;
}

.cookie-button-primary:hover {
  background: var(--brand-strong);
}

.cookie-button-secondary {
  box-shadow: inset 0 0 0 1px var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.cookie-button-secondary:hover,
.cookie-button-quiet:hover {
  background: var(--surface-subtle);
}

.cookie-button-quiet {
  background: transparent;
  color: var(--ink-soft);
}

.cookie-customize-panel {
  grid-column: 1 / -1;
  padding-top: 4px;
}

.cookie-customize-panel[hidden] {
  display: none;
}

.cookie-preference-row {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.cookie-preference-row:has(input:disabled) {
  cursor: default;
}

.cookie-preference-row > span {
  display: grid;
  gap: 3px;
}

.cookie-preference-row strong {
  font-size: 14px;
}

.cookie-preference-row small {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.cookie-preference-row input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  accent-color: var(--brand);
}

.cookie-customize-actions {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.cookie-settings-button {
  min-height: 36px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.footer-utility-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  white-space: nowrap;
}

/* Shared contact form */
.contact-form-panel {
  max-width: 920px;
  margin: 0 auto 40px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.contact-form-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.contact-form-intro h2 {
  margin: 0 0 6px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.contact-form-intro p {
  max-width: 62ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

.contact-form-intro > a {
  flex: 0 0 auto;
  color: var(--brand-strong);
  font-size: 14px;
  font-weight: 700;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-top: 20px;
}

.contact-form > label:not(.contact-consent, .contact-honeypot) {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--brand);
  outline: 3px solid color-mix(in srgb, var(--focus) 28%, transparent);
  outline-offset: 0;
}

.contact-form-wide {
  grid-column: 1 / -1;
}

.contact-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}

.contact-consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
  accent-color: var(--brand);
}

.contact-consent a {
  color: var(--brand-strong);
  font-weight: 650;
}

.contact-form-actions {
  display: flex;
  justify-content: flex-end;
}

.contact-form-actions button {
  min-height: 46px;
  padding: 10px 20px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.contact-form-actions button:hover {
  background: var(--brand-strong);
}

.contact-form-actions button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 70%, transparent);
  outline-offset: 2px;
}

.contact-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

html[dir="rtl"] .contact-honeypot {
  right: -10000px;
  left: auto;
}

.contact-form-status {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--surface-subtle);
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}

.contact-form-status-sent {
  background: var(--success-soft);
  color: var(--success);
}

.contact-form-status-invalid,
.contact-form-status-rate,
.contact-form-status-error {
  background: var(--danger-soft);
  color: var(--danger);
}

@media (max-width: 700px) {
  .cookie-consent-shell {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 10px;
  }

  .cookie-consent-above-mobile-nav {
    bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .cookie-consent-panel {
    max-height: calc(100dvh - 20px - env(safe-area-inset-bottom));
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
  }

  .cookie-consent-above-mobile-nav .cookie-consent-panel {
    max-height: calc(100dvh - 88px - env(safe-area-inset-bottom));
  }

  .cookie-consent-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .cookie-consent-actions .cookie-button-primary {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .cookie-consent-copy h2 {
    font-size: 18px;
  }

  .contact-form-panel {
    margin-bottom: 28px;
    padding: 18px;
  }

  .contact-form-intro {
    align-items: stretch;
    flex-direction: column;
  }

  .footer-utility-links {
    justify-content: flex-start;
  }

  .contact-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-form-wide {
    grid-column: auto;
  }

  .contact-form-actions button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-button {
    transition: none;
  }
}
