/*
 * qr.studio "print shop" (owner-approved mockups, 2026-11-11), on top of QRcdr + Bootstrap 5.2.
 * Layout: headline + form on the left, the QR on a white proof card with crop marks on the right.
 * Shape rule: type chips, format switch and Download are pills; inputs/tiles 12-14px; cards 20px; stage 28px.
 * Light theme only (owner, 2026-10-13).
 * Colour: paper ground, near-black ink, one signal orange (#FF4F1A, always with ink text: 5.53:1)
 * for the active type, the Download button and small marks; burnt orange #C93A0E for emphasis text.
 */

@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/Bricolage-Grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Arabic glyphs for headings: Bricolage has none, so IBM Plex Sans Arabic Bold (OFL) joins the family for Arabic code points only */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/IBMPlexSansArabic-Bold.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200D, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  color-scheme: light;
  --s-bg: #f5f3ee;
  --s-card: #ffffff;
  --s-tint: #ece8df;
  --s-line: #e2ded4;
  --s-ink: #16141f;
  --s-muted: #5d5a66;
  --s-hot: #c93a0e;
  --s-cta: #16141f;
  --s-cta-ink: #ffffff;
  --s-cta-hover: #2e2b38;
  --s-signal: #ff4f1a;
  --s-signal-ink: #16141f;
  --s-signal-hover: #ff7a50;
  --s-good: #1f7a4d;
  --s-focus: 0 0 0 3px rgba(255, 79, 26, 0.45);
  --s-lift: 0 10px 24px -18px rgba(22, 20, 31, 0.35);
  --s-glass: #ece8df;
  --s-r: 14px;
  --s-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --f-body: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", sans-serif;
  --f-display: "Bricolage Grotesque", "Geist", system-ui, "Noto Sans Arabic", sans-serif;

  --bs-body-bg: var(--s-bg);
  --bs-body-color: var(--s-ink);
  --bs-border-color: var(--s-line);
  --bs-link-color: var(--s-ink);
  --bs-link-hover-color: var(--s-cta-hover);
  --bs-font-sans-serif: var(--f-body);
}



/* ---------- Base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
/* phones: focused fields stay above the fixed download bar */
@media (max-width: 991.98px) { html { scroll-padding-bottom: 104px; } }
body.qrcdr, body {
  background: var(--s-bg);
  color: var(--s-ink);
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { color: var(--s-ink); letter-spacing: -0.01em; }
a { color: var(--s-ink); }
:focus-visible { outline: 2px solid transparent; box-shadow: var(--s-focus) !important; } /* transparent outline shows in forced-colors mode */
button, [role="tab"], label.btn, .btn { cursor: pointer; }
a, button, input, select, textarea, label, [role="tab"] { touch-action: manipulation; }
html { -webkit-tap-highlight-color: rgba(255, 79, 26, 0.15); }
.studio-pane-title { color: var(--s-ink); }

/* skip link: hidden until focused */
.studio-skip {
  position: absolute; inset-inline-start: 16px; top: 12px; z-index: 50;
  padding: 10px 16px; border-radius: 999px; background: var(--s-cta); color: var(--s-cta-ink);
  font-weight: 600; text-decoration: none; transform: translateY(-160%);
  transition: transform 0.2s var(--s-ease);
}
.studio-skip:focus { transform: none; color: var(--s-cta-ink); }
#studio-tool { scroll-margin-top: 16px; }
.form-select { background-color: var(--s-bg); color: var(--s-ink); }

/* ---------- Top bar ---------- */
.studio-bar { background: transparent; }
.studio-bar__inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.studio-brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--s-ink); text-decoration: none;
  font-family: var(--f-display); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.035em;
}
.studio-brand:hover { color: var(--s-ink); }
.studio-brand__mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  background: conic-gradient(from 210deg, #ff5a36, #ffb020, #6c5cff, #ff5a36); /* brand mark = favicon, unchanged */
  color: #ffffff; font-size: 17px;
}
.studio-brand__dot { color: var(--s-hot); }
.studio-bar__nav .navbar-nav { flex-direction: row; }
.studio-bar__nav .nav-link {
  color: var(--s-muted); padding: 8px 12px; border-radius: 999px; min-height: 44px;
  display: inline-flex; align-items: center; gap: 6px;
}
.studio-bar__nav .nav-link:hover { color: var(--s-ink); background: var(--s-tint); }
.dropdown-menu {
  --bs-dropdown-bg: var(--s-card); --bs-dropdown-color: var(--s-ink);
  --bs-dropdown-link-color: var(--s-ink); --bs-dropdown-link-hover-bg: var(--s-tint);
  --bs-dropdown-link-hover-color: var(--s-ink); --bs-dropdown-link-active-bg: var(--s-ink);
  --bs-dropdown-link-active-color: var(--s-bg); --bs-dropdown-border-color: var(--s-line);
  border-radius: var(--s-r); box-shadow: var(--s-lift); padding: 6px;
}
.dropdown-item { border-radius: 10px; }

/* ---------- Headline (top of the left column) ---------- */
.studio-intro { padding: 8px 0 22px; }
.studio-intro__title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(2.3rem, 1.4rem + 3.2vw, 3.9rem);
  line-height: 1;
  letter-spacing: -0.045em;
  margin: 0 0 16px;
  max-width: 13ch;
  text-wrap: balance;
}
.studio-intro__title em { font-style: normal; color: var(--s-hot); }
.studio-intro__lead { color: var(--s-muted); font-size: 1.1rem; max-width: 44ch; margin: 0; }
[dir="rtl"] .studio-intro__title, :lang(zh) .studio-intro__title { letter-spacing: 0; line-height: 1.2; }

/* ---------- Type picker ---------- */
.qrcdr-form .nav-pills { gap: 8px; flex-wrap: wrap; margin: 0 0 4px; padding: 0; }
.qrcdr-form .nav-pills .nav-item { flex: 0 0 auto; }
.qrcdr-form .nav-pills .nav-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px;
  border: 1px solid var(--s-line); border-radius: 999px; background: var(--s-card); color: var(--s-ink);
  font-size: 0.95rem; font-weight: 500; white-space: nowrap;
  transition: background-color 0.16s var(--s-ease), border-color 0.16s var(--s-ease), transform 0.16s var(--s-ease);
}
.qrcdr-form .nav-pills .nav-link i { color: var(--s-muted); width: 1em; text-align: center; }
.qrcdr-form .nav-pills .nav-link:hover { border-color: var(--s-ink); }
.qrcdr-form .nav-pills .nav-link:active { transform: scale(0.97); }
.qrcdr-form .nav-pills .nav-link.active,
.qrcdr-form .nav-pills .show > .nav-link {
  background: var(--s-signal) !important; border-color: var(--s-signal); color: var(--s-signal-ink) !important; font-weight: 600;
}
.qrcdr-form .nav-pills .nav-link.active i { color: inherit; }
@media (max-width: 767.98px) {
  .qrcdr-form .nav-pills {
    flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 2px 2px 6px;
  }
  .qrcdr-form .nav-pills::-webkit-scrollbar { display: none; }
  .qrcdr-form .nav-pills .nav-item { scroll-snap-align: start; }
}

/* ---------- Content card ---------- */
.qrcdr-form .tab-content {
  background: var(--s-card);
  border: 1px solid var(--s-line);
  border-radius: 20px;
  box-shadow: var(--s-lift);
  padding: 20px 20px 8px;
  margin: 16px 0 20px !important;
}
.qrcdr-form .tab-content .studio-pane-title {
  font-family: var(--f-display); font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px;
}
.qrcdr-form .tab-content small { color: var(--s-muted); }
.qrcdr-form label { font-weight: 500; font-size: 0.95rem; margin-bottom: 6px; color: var(--s-ink); }

.form-control, .form-select, .input-group-text {
  border-radius: 12px !important; border-color: var(--s-line); background-color: var(--s-bg);
  color: var(--s-ink); min-height: 48px; font-size: 1rem;
}
.input-group > .form-control:not(:last-child), .input-group > .input-group-text:not(:last-child) {
  border-start-end-radius: 0 !important; border-end-end-radius: 0 !important;
}
.input-group > :not(:first-child) { border-start-start-radius: 0 !important; border-end-start-radius: 0 !important; }
.input-group-text { background: var(--s-tint); color: var(--s-muted) !important; }
.form-control::placeholder { color: var(--s-muted); opacity: 0.8; }
.form-control:focus, .form-select:focus {
  border-color: var(--s-signal); background-color: var(--s-card); color: var(--s-ink); box-shadow: var(--s-focus);
}
.form-check-input:checked { background-color: var(--s-ink); border-color: var(--s-ink); }
.form-check-input:focus { box-shadow: var(--s-focus); border-color: var(--s-ink); }
.form-range::-webkit-slider-thumb { background: var(--s-ink); }
.form-range::-moz-range-thumb { background: var(--s-ink); }

/* ---------- Options as tiles; the open panel spans the row below ---------- */
#collapseSettings {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
#collapseSettings .accordion-item { display: contents !important; } /* beats Bootstrap .d-grid !important */
#collapseSettings .accordion-item > .btn {
  order: 0;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 14px;
  width: 100%; margin: 0 !important; padding: 14px; min-height: 92px;
  border: 1px solid var(--s-line); border-radius: var(--s-r);
  background: var(--s-card); color: var(--s-ink);
  font-size: 0.95rem; font-weight: 600; text-align: start; white-space: normal;
  transition: border-color 0.16s var(--s-ease), transform 0.16s var(--s-ease), background-color 0.16s var(--s-ease);
}
#collapseSettings .accordion-item > .btn i,
#collapseSettings .accordion-item > .btn svg { font-size: 1.3rem; color: var(--s-ink); fill: var(--s-ink); width: 1.3rem; height: 1.3rem; }
#collapseSettings .accordion-item > .btn:hover { border-color: var(--s-ink); background: var(--s-card); color: var(--s-ink); transform: translateY(-1px); }
#collapseSettings .accordion-item > .btn[aria-expanded="true"] { background: var(--s-ink); border-color: var(--s-ink); color: var(--s-bg); }
#collapseSettings .accordion-item > .btn[aria-expanded="true"] i,
#collapseSettings .accordion-item > .btn[aria-expanded="true"] svg { color: var(--s-bg); fill: var(--s-bg); }
#collapseSettings .accordion-item > .collapse,
#collapseSettings .accordion-item > .collapsing {
  order: 1;
  grid-column: 1 / -1;
  background: var(--s-card);
  border: 1px solid var(--s-line);
  border-radius: 20px;
  box-shadow: var(--s-lift);
  padding: 16px 16px 6px;
}
#collapseSettings .btn-light { background: var(--s-tint); border-color: var(--s-line); border-radius: 12px; }
#collapseSettings .btn-check:checked + .btn-light,
#collapseSettings .btn-check:checked + label {
  border-color: var(--s-ink) !important; box-shadow: 0 0 0 2px var(--s-ink) inset; background: var(--s-card);
}
@media (max-width: 575.98px) {
  #collapseSettings { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  #collapseSettings .accordion-item > .btn { grid-column: span 2; min-height: 84px; }
  #collapseSettings .accordion-item:nth-child(n+4) > .btn { grid-column: span 3; }
}

/* ---------- Stage (preview column) ---------- */
.studio-stage-col { padding-top: 8px; }
.studio-preview.navbar { display: block; padding: 0; top: 16px; z-index: 5; }
.studio-preview .placeresult {
  position: relative;
  /* proof card: crop marks in the four corners over a faint dot grid */
  --crop: var(--s-ink);
  background:
    linear-gradient(var(--crop), var(--crop)) 14px 14px / 18px 1.5px no-repeat,
    linear-gradient(var(--crop), var(--crop)) 14px 14px / 1.5px 18px no-repeat,
    linear-gradient(var(--crop), var(--crop)) right 14px top 14px / 18px 1.5px no-repeat,
    linear-gradient(var(--crop), var(--crop)) right 14px top 14px / 1.5px 18px no-repeat,
    linear-gradient(var(--crop), var(--crop)) left 14px bottom 14px / 18px 1.5px no-repeat,
    linear-gradient(var(--crop), var(--crop)) left 14px bottom 14px / 1.5px 18px no-repeat,
    linear-gradient(var(--crop), var(--crop)) right 14px bottom 14px / 18px 1.5px no-repeat,
    linear-gradient(var(--crop), var(--crop)) right 14px bottom 14px / 1.5px 18px no-repeat,
    radial-gradient(circle, rgba(22, 20, 31, 0.09) 1px, transparent 1.5px) 0 0 / 14px 14px,
    var(--s-card) !important;
  border-radius: 20px;
  padding: clamp(28px, 3.4vw, 44px);
  gap: 16px;
  border: 1px solid var(--s-line);
  box-shadow: var(--s-lift);
}
.studio-preview .wrapresult { margin: 0; }
.studio-preview .resultholder {
  background: #ffffff; /* QR needs a light quiet zone in both themes */
  border-radius: 22px;
  padding: 16px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 1px var(--s-line), 0 18px 36px -26px rgba(22, 20, 31, 0.45);
  max-width: 340px;
  margin-inline: auto;
  width: 100%;
}
.studio-preview .resultholder img,
.studio-preview .resultholder > svg { width: 100%; height: auto; max-width: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .studio-preview .resultholder img,
  .studio-preview .resultholder > svg { animation: studio-in 0.4s var(--s-ease); }
}
@keyframes studio-in { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
.studio-preview .preloader { border-radius: 28px; }

/* vendor Save button and links: visible only if studio.js did not load */
.btn-primary, .studio-preview .generate_qrcode {
  --bs-btn-color: var(--s-cta-ink); --bs-btn-bg: var(--s-cta); --bs-btn-border-color: var(--s-cta);
  --bs-btn-hover-color: var(--s-cta-ink); --bs-btn-hover-bg: var(--s-cta-hover); --bs-btn-hover-border-color: var(--s-cta-hover);
  --bs-btn-active-color: var(--s-cta-ink); --bs-btn-active-bg: var(--s-cta-hover); --bs-btn-active-border-color: var(--s-cta-hover);
  --bs-btn-disabled-color: var(--s-cta-ink); --bs-btn-disabled-bg: var(--s-cta); --bs-btn-disabled-border-color: var(--s-cta);
}
.studio-preview .generate_qrcode { border-radius: var(--s-r) !important; min-height: 50px; font-weight: 600; }
.studio-js .studio-preview .generate_qrcode,
.studio-js .studio-preview .linksholder {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}

/* ---------- Download bar: format switch + one button ---------- */
.studio-dl { display: grid; gap: 10px; max-width: 340px; width: 100%; margin-inline: auto; }
.studio-fmt {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px;
  background: var(--s-tint); border-radius: 999px;
}
.studio-fmt button {
  border: 0; background: transparent; color: var(--s-ink); border-radius: 999px; min-height: 44px;
  font: 600 0.95rem var(--f-body); letter-spacing: 0.02em;
  transition: background-color 0.16s var(--s-ease);
}
.studio-fmt button:hover { background: rgba(255, 255, 255, 0.6); }
.studio-fmt button[aria-checked="true"] { background: var(--s-card); box-shadow: 0 0 0 1px var(--s-ink); }
.studio-dl__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; border: 0; border-radius: 999px;
  background: var(--s-signal); color: var(--s-signal-ink);
  font: 700 1.1rem var(--f-body);
  transition: transform 0.16s var(--s-ease), background-color 0.16s var(--s-ease), opacity 0.16s;
}
.studio-dl__btn:hover:not(:disabled) { background: var(--s-signal-hover); }
.studio-dl__btn:active:not(:disabled) { transform: translateY(1px) scale(0.99); }
.studio-dl__btn:disabled { opacity: 0.4; cursor: not-allowed; }
@media (prefers-reduced-motion: no-preference) {
  .studio-dl__btn[aria-busy="true"] i { animation: studio-bob 0.8s ease-in-out infinite; }
}
@keyframes studio-bob { 50% { transform: translateY(3px); } }

/* facts under the stage */
.studio-facts {
  list-style: none; margin: 18px 0 0; padding: 0 6px; display: grid; gap: 10px;
  color: var(--s-muted); font-size: 0.95rem;
}
.studio-facts li { display: flex; gap: 10px; align-items: baseline; }
.studio-facts i { color: var(--s-ink); width: 1.1em; text-align: center; flex: none; }

/* ---------- Mobile jump to the stage ---------- */
.studio-jump {
  position: fixed; inset-inline-start: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%); z-index: 20; border-radius: 999px !important;
  padding: 12px 20px; min-height: 50px; font-weight: 600;
  background: var(--s-cta) !important; color: var(--s-cta-ink) !important; border: 0 !important;
  box-shadow: 0 14px 30px -10px rgba(22, 20, 31, 0.55);
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
[dir="rtl"] .studio-jump { transform: translateX(50%); }
@media (min-width: 992px) { .studio-jump { display: none; } }
@media (max-width: 991.98px) {
  .studio-preview.navbar { position: static; }
  .studio-footer { padding-bottom: 92px; }
}

/* ---------- Footer ---------- */
.studio-footer { margin-top: 56px; border-top: 1px solid var(--s-line); color: var(--s-muted); font-size: 0.95rem; }
.studio-footer__inner { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding-block: 24px; }
.studio-footer .list-inline { margin: 0; }

/* ---------- Vendor surfaces in dark mode ---------- */


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

/* ---------- Mobile: simpler flow + always-visible download bar ---------- */
@media (max-width: 991.98px) {
  .studio-bar__inner { min-height: 60px; }
  .studio-intro { padding: 4px 0 16px; }
  .studio-intro__title { font-size: clamp(1.9rem, 1.4rem + 2.4vw, 2.4rem); margin-bottom: 8px; max-width: 16ch; }
  .studio-intro__lead { font-size: 1rem; }
  /* swipe hint on the type row */
  .qrcdr-form .nav-pills {
    -webkit-mask-image: linear-gradient(to right, #000 82%, transparent);
    mask-image: linear-gradient(to right, #000 82%, transparent);
  }
  [dir="rtl"] .qrcdr-form .nav-pills {
    -webkit-mask-image: linear-gradient(to left, #000 82%, transparent);
    mask-image: linear-gradient(to left, #000 82%, transparent);
  }
  .qrcdr-form .tab-content { padding: 16px 16px 4px; border-radius: 18px; }
  /* style options: wrapped pill buttons instead of tall tiles */
  #collapseSettings { display: flex; flex-wrap: wrap; gap: 8px; }
  #collapseSettings .accordion-item > .btn,
  #collapseSettings .accordion-item:nth-child(n+4) > .btn {
    flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px;
    width: auto; min-height: 44px; padding: 8px 14px; border-radius: 999px; font-size: 0.95rem;
  }
  #collapseSettings .accordion-item > .btn i,
  #collapseSettings .accordion-item > .btn svg { font-size: 1rem; width: 1rem; height: 1rem; }
  #collapseSettings .accordion-item > .collapse,
  #collapseSettings .accordion-item > .collapsing { flex: 1 1 100%; }
  .studio-js .studio-jump { display: none; }
  .studio-js .studio-footer { padding-bottom: 104px; }
}

.studio-mbar { display: none; }
@media (max-width: 991.98px) {
  .studio-js .studio-mbar {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid var(--s-line);
    box-shadow: 0 -12px 30px -18px rgba(22, 20, 31, 0.35);
  }
  .studio-mbar__thumb {
    width: 52px; height: 52px; padding: 4px; border-radius: 12px; border: 1px solid var(--s-line);
    background: #ffffff; display: grid; place-items: center;
  }
  .studio-mbar__thumb img { width: 100%; height: 100%; object-fit: contain; }
  .studio-mbar__fmt { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 3px; background: var(--s-tint); border-radius: 999px; }
  .studio-mbar__fmt button {
    border: 0; background: transparent; color: var(--s-muted); border-radius: 999px; min-height: 44px; min-width: 44px;
    font: 600 0.85rem var(--f-body);
  }
  .studio-mbar__fmt button[aria-checked="true"] { background: var(--s-card); color: var(--s-ink); box-shadow: 0 0 0 1px var(--s-ink); }
  .studio-mbar__dl {
    min-height: 48px; padding: 0 18px; border: 0; border-radius: 999px;
    background: var(--s-signal); color: var(--s-signal-ink); font: 700 1rem var(--f-body);
    display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  }
  .studio-mbar__dl:disabled { opacity: 0.4; }
}
@media (max-width: 359.98px) { .studio-mbar__dl span { display: none; } }

/* ---------- Logo upload: dashed drop box; native input covers it ---------- */
#collapseWatermark .custom-file { height: auto; margin-top: 6px; }
#collapseWatermark .custom-file-input {
  position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
#collapseWatermark .custom-file-label {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 64px; margin: 0; padding: 12px 16px;
  border: 1.5px dashed var(--s-line); border-radius: var(--s-r);
  background: var(--s-tint); color: var(--s-muted);
  font-size: 0.875rem; font-weight: 600; letter-spacing: 0.02em;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
#collapseWatermark .custom-file-label i { font-size: 1.25rem; color: var(--s-ink); }
#collapseWatermark label.custom-file-label::after { content: none !important; display: none; }
#collapseWatermark .custom-file:hover .custom-file-label { border-color: var(--s-ink); background: var(--s-card); color: var(--s-ink); }
#collapseWatermark .custom-file:focus-within .custom-file-label { border-color: var(--s-ink); box-shadow: var(--s-focus); }
#collapseWatermark .custom-file-input.is-invalid ~ .custom-file-label { border-color: #c0392b; }
/* slot for the uploaded logo stays hidden until something is uploaded */
.logoselecta .custom-watermark:has(.hold-custom-watermark:empty) { display: none; }
/* logo tiles: even grid, uploaded logo tile matches the rest */
.logoselecta .btn-group-toggle {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px;
}
.logoselecta .btn-group-toggle > .btn {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1; margin: 0; padding: 0; min-width: 0;
}
.logoselecta .custom-watermark img { margin: 0; height: auto; max-height: 2em; }
.logoselecta .hold-custom-watermark { display: flex; align-items: center; justify-content: center; }
#collapseSettings .logoselecta .custom-watermark:has(input:checked) {
  border-color: var(--s-ink) !important; box-shadow: 0 0 0 2px var(--s-ink) inset; background: var(--s-card);
}

/* ---------- SEO copy under the tool ---------- */
.studio-seo { display: grid; gap: 32px; padding-block: 40px 56px; color: var(--s-ink); }
@media (min-width: 992px) { .studio-seo { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.studio-seo__copy { max-width: 65ch; font-size: 1rem; line-height: 1.65; }
.studio-seo h2 { font-family: 'Bricolage Grotesque', var(--s-font, system-ui), sans-serif; font-size: 1.375rem; font-weight: 700; text-wrap: balance; margin: 0 0 12px; }
.studio-seo h3 { font-size: 1rem; font-weight: 700; margin: 20px 0 8px; }
.studio-seo p, .studio-seo li { color: var(--s-muted); }
.studio-seo ol, .studio-seo__copy ul { padding-inline-start: 1.25rem; display: grid; gap: 6px; }
.studio-seo code { color: var(--s-ink); background: var(--s-tint); padding: 1px 6px; border-radius: 6px; }
.studio-seo__types ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.studio-seo__types a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px;
  border: 1px solid var(--s-line); border-radius: 999px; background: var(--s-card);
  color: var(--s-ink); font-weight: 600; text-decoration: none; transition: border-color 0.15s, background 0.15s;
}
.studio-seo__types a:hover { border-color: var(--s-ink); background: var(--s-tint); }
.studio-seo__types a:focus-visible { outline: 2px solid transparent; box-shadow: var(--s-focus); }
@media (max-width: 991.98px) { .studio-seo { padding-bottom: 120px; } }

/* ---------- Footer links, legal pages, ad units ---------- */
.studio-footer__links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.studio-footer__links a { color: inherit; display: inline-flex; align-items: center; min-height: 44px; }
.studio-legal { max-width: 70ch; padding-block: 24px 64px; color: var(--s-ink); line-height: 1.65; }
.studio-legal h1 { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; margin-bottom: 4px; }
.studio-legal h1 + p { color: var(--s-muted); font-size: 0.875rem; }
.studio-legal h2 { font-size: 1.125rem; font-weight: 700; margin: 28px 0 8px; }
.studio-legal p { color: var(--s-muted); }
.studio-legal a { color: var(--s-ink); }
.studio-ad { padding: 24px 0; text-align: center; } /* no side gutter: a 320px phone keeps 300px for the unit */
.studio-ad__label { display: block; margin-bottom: 6px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--s-muted); }
.studio-ad__unit { width: 300px; height: 250px; }
@media (min-width: 992px) { .studio-ad__unit { width: 728px; height: 90px; } }

/* ---------- Partner promo (PostiPasti) on the menu page ---------- */
.studio-promo {
  margin-top: 32px; padding: 24px; border-radius: 20px;
  background: var(--s-card); border: 1px solid var(--s-line);
  box-shadow: var(--s-lift);
}
.studio-promo__kicker { margin: 0 0 4px; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--s-ink) !important; }
.studio-promo h2 { margin-bottom: 8px; }
.studio-promo p { color: var(--s-ink); }
.studio-promo__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 16px 0 0; }
.studio-promo__actions a { color: var(--s-ink); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.studio-promo__actions .studio-promo__cta {
  padding: 10px 22px; border-radius: 999px; background: var(--s-cta); color: var(--s-cta-ink); text-decoration: none;
  transition: background 0.15s;
}
.studio-promo__actions .studio-promo__cta:hover { background: var(--s-cta-hover); color: var(--s-cta-ink); }
.studio-promo a:focus-visible { outline: 2px solid var(--s-ink); outline-offset: 3px; border-radius: 999px; }
/* partner cards: always shown under the generator */
.studio-promos { display: grid; gap: 16px; padding-block: 24px 0; }
@media (min-width: 768px) { .studio-promos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.studio-promos .studio-promo { margin-top: 0; display: flex; flex-direction: column; }
.studio-promos .studio-promo__actions { margin-top: auto; padding-top: 16px; }
.studio-promos .studio-promo h2 { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-size: 1.25rem; font-weight: 700; text-wrap: balance; }
/* homepage link-in-bio band (include/bio-promo.php): copy + real mini bio page in a phone */
.studio-bio { padding-block: 32px 0; }
.studio-bio__inner {
  display: grid; gap: 32px; align-items: center; padding: 28px 24px 0; overflow: hidden;
  border-radius: 20px; background: var(--s-card); border: 1px solid var(--s-line); box-shadow: var(--s-lift);
}
.studio-bio__copy h2 { margin: 0 0 12px; font: 800 clamp(1.75rem, 4vw, 2.5rem)/1.1 'Bricolage Grotesque', system-ui, sans-serif; letter-spacing: -0.02em; text-wrap: balance; color: var(--s-ink); }
.studio-bio__copy h2 em { color: var(--s-hot); padding-bottom: 2px; }
.studio-bio__copy p { max-width: 48ch; color: var(--s-muted); font-size: 1.0625rem; }
.studio-bio a:focus-visible { outline: 2px solid var(--s-ink); outline-offset: 3px; border-radius: 999px; }
.studio-bio__demo { position: relative; justify-self: center; width: min(280px, 100%); }
.studio-bio__phone.bio {
  min-height: 0; height: 340px; padding: 32px 16px 20px; overflow: hidden;
  border: 8px solid var(--s-ink); border-bottom: 0; border-radius: 36px 36px 0 0; font-size: 15px;
}
.studio-bio__phone .bio-avatar { width: 64px; height: 64px; font-size: 1.5rem; }
.studio-bio__phone .bio-name { margin-top: 12px; font-size: 1.375rem; }
.studio-bio__phone .bio-links { margin-top: 20px; gap: 10px; }
.studio-bio__phone .bio-link { min-height: 46px; padding: 10px 16px; }
.studio-bio__qr {
  position: absolute; inset-block-end: 24px; inset-inline-end: -12px; width: 96px; height: 96px;
  padding: 6px; border-radius: 14px; background: #fff; box-shadow: var(--s-lift); rotate: 6deg;
}
@media (min-width: 768px) {
  .studio-bio__inner { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); padding: 40px 48px 0; }
  .studio-bio__copy { padding-bottom: 40px; }
  .studio-bio__qr { inset-inline-end: -36px; width: 112px; height: 112px; }
}
[dir="rtl"] .studio-bio__qr { rotate: -6deg; }
/* generator steps (include/generator.php) */
.studio-step {
  display: flex; align-items: center; gap: 10px; margin: 8px 0 12px;
  font: 700 1.125rem/1.3 var(--f-display); letter-spacing: -0.01em; color: var(--s-ink);
}
.studio-step__n {
  flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--s-hot); color: #fff; font-size: 0.875rem; font-weight: 800;
}
.tab-content + .studio-step, #dataTabs ~ .studio-step { margin-top: 28px; }
/* header: link-in-bio link + CTA beside the language menu */
.studio-bar__end { display: flex; align-items: center; gap: 8px; }
.studio-bar__link {
  display: none; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px;
  color: var(--s-muted); font-weight: 600; text-decoration: none;
}
.studio-bar__link:hover { color: var(--s-ink); background: var(--s-tint); }
.studio-bar__cta {
  display: none; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--s-cta); color: var(--s-cta-ink); font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background 0.15s;
}
.studio-bar__cta:hover { background: var(--s-cta-hover); color: var(--s-cta-ink); }
.studio-bar__end a:focus-visible { outline: 2px solid var(--s-ink); outline-offset: 3px; }
@media (min-width: 576px) { .studio-bar__cta { display: inline-flex; } }
@media (min-width: 768px) { .studio-bar__link { display: inline-flex; } }

/* ---------- 2026-11-11 UX pass ---------- */
/* example code caption + "static, never expires" badge on the preview card */
.studio-sample { margin: 8px auto 0; max-width: 30ch; text-align: center; color: var(--s-muted); font-size: 0.9rem; }
.studio-badge {
  justify-self: center; margin: 4px 0 2px; padding: 6px 12px; border-radius: 999px;
  background: var(--s-tint); color: var(--s-ink); font-size: 0.85rem; font-weight: 600; text-align: center;
}
/* Download is never shown disabled (it points at the field to fill instead) */
.studio-dl__btn:disabled, .studio-mbar__dl:disabled { opacity: 1; cursor: pointer; }
/* "Link in bio" stays in the header on phones; compact */
.studio-bar__link { display: inline-flex; }
@media (max-width: 575.98px) { .studio-bar__link { padding: 0 8px; font-size: 0.9rem; } }
/* QR types on phones: wrapped chips, five most used + "More" */
.studio-types__more-item { display: none; }
@media (max-width: 575.98px) {
  .qrcdr-form .nav-pills { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  [dir="rtl"] .qrcdr-form .nav-pills { -webkit-mask-image: none; mask-image: none; }
  .studio-js .qrcdr-form .studio-types--folded > .nav-item:nth-child(n+6):not(:has(.nav-link.active)) { display: none; }
  .studio-types--folded > .studio-types__more-item { display: block; }
  .studio-types__more {
    display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px;
    border: 1px dashed var(--s-ink); border-radius: 999px; background: var(--s-card); color: var(--s-ink);
    font: 600 0.95rem var(--f-body); cursor: pointer;
  }
  .studio-types__more:focus-visible { outline: 2px solid var(--s-ink); outline-offset: 2px; }
}

/* ---------- Print shop: logo drop-zone in step 1 ---------- */
.studio-drop {
  display: flex; align-items: center; gap: 14px; width: 100%; margin: -4px 0 8px; padding: 14px 16px;
  border: 1.5px dashed var(--s-ink); border-radius: var(--s-r); background: var(--s-card);
  color: var(--s-ink); font-weight: 600; cursor: pointer;
  transition: background-color 0.15s var(--s-ease), border-color 0.15s var(--s-ease);
}
.studio-drop:hover, .studio-drop.is-over { background: var(--s-tint); border-color: var(--s-signal); }
.studio-drop__thumb {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px;
  background: var(--s-tint); color: var(--s-ink); overflow: hidden;
}
.studio-drop__thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.studio-drop.has-logo { border-style: solid; }
.studio-drop:focus-visible { outline: 2px solid transparent; box-shadow: var(--s-focus); }

/* ---------- Print shop: quick colour + dot shortcuts above the style tiles ---------- */
.studio-quick { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0 0 14px; }
.studio-quick__group { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.studio-quick__group legend {
  float: inline-start; width: auto; margin: 0; margin-inline-end: 6px; padding: 0;
  font-size: 0.9rem; font-weight: 600; color: var(--s-muted);
}
.studio-swatch, .studio-dot { position: relative; display: inline-grid; place-items: center; margin: 0; cursor: pointer; }
.studio-swatch input, .studio-dot input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.studio-swatch { width: 44px; height: 44px; }
.studio-swatch::before {
  content: ""; width: 30px; height: 30px; border-radius: 50%; background: var(--sw);
  box-shadow: 0 0 0 1px rgba(22, 20, 31, 0.15);
}
.studio-swatch:hover::before { box-shadow: 0 0 0 2px var(--s-bg), 0 0 0 4px var(--s-line); }
.studio-swatch:has(input:checked)::before { box-shadow: 0 0 0 2px var(--s-bg), 0 0 0 4px var(--s-ink); }
.studio-dot {
  width: 44px; height: 44px; border: 1px solid var(--s-line); border-radius: 12px; background: var(--s-card); color: var(--s-ink);
}
.studio-dot svg { fill: currentColor; }
.studio-dot:hover { border-color: var(--s-ink); }
.studio-dot:has(input:checked) { border-color: var(--s-ink); box-shadow: 0 0 0 1px var(--s-ink) inset; }
.studio-swatch:has(input:focus-visible), .studio-dot:has(input:focus-visible) { box-shadow: var(--s-focus); border-radius: 12px; }

/* ---------- Bulk panel under the stage (include/bulk-panel.php, js/bulk.js) ---------- */
.studio-bulk {
  clear: both; margin-top: 16px; padding: 16px 18px; border: 1px solid var(--s-line); border-radius: 20px; /* .placeresult floats (vendor css) */
  background: var(--s-card); box-shadow: var(--s-lift);
}
.studio-bulk__head {
  display: flex; align-items: center; gap: 10px; margin: 0; min-height: 44px;
  font: 700 1.05rem var(--f-display); color: var(--s-ink);
}
summary.studio-bulk__head { cursor: pointer; list-style: none; border-radius: 10px; }
summary.studio-bulk__head::-webkit-details-marker { display: none; }
summary.studio-bulk__head::after {
  content: ""; margin-inline-start: auto; width: 9px; height: 9px; flex: none;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; /* physical: points down/up in RTL too */
  transform: translateY(-2px) rotate(45deg); transition: transform 0.16s var(--s-ease);
}
.studio-bulk[open] > summary.studio-bulk__head::after { transform: translateY(2px) rotate(-135deg); }
.studio-bulk__body { display: grid; gap: 12px; padding-top: 8px; }
.studio-bulk__text { margin: 0; color: var(--s-muted); font-size: 0.95rem; }
.studio-bulk textarea.form-control { min-height: 120px; resize: vertical; font-size: 0.95rem; }
.studio-bulk__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.studio-bulk__csv {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; margin: 0;
  border: 1.5px dashed var(--s-ink); border-radius: 999px; font-weight: 600; cursor: pointer;
}
.studio-bulk__csv:hover { background: var(--s-tint); }
.studio-bulk__csv:focus-within { box-shadow: var(--s-focus); }
.studio-bulk__file {
  display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%;
  padding-inline-start: 12px; border-radius: 999px; background: var(--s-tint); font-size: 0.9rem;
}
.studio-bulk__file[hidden] { display: none; }
.studio-bulk__fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio-bulk__unfile {
  flex: none; width: 36px; height: 36px; border: 0; border-radius: 999px; background: transparent;
  color: var(--s-ink); font-size: 1.25rem; line-height: 1;
}
.studio-bulk__unfile:hover { background: rgba(255, 255, 255, 0.7); }
.studio-bulk__count { margin-left: auto; color: var(--s-muted); font-variant-numeric: tabular-nums; font-weight: 600; }
[dir="rtl"] .studio-bulk__count { margin-left: 0; margin-right: auto; } /* the count is dir=ltr ("2 / 20"): physical margins */
.studio-bulk__count.is-over { color: var(--s-hot); }
.studio-bulk__fmt {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; margin: 0;
  background: var(--s-tint); border: 0; border-radius: 999px;
}
.studio-bulk__fmt label { position: relative; margin: 0; }
.studio-bulk__fmt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.studio-bulk__fmt span {
  display: grid; place-items: center; min-height: 44px; border-radius: 999px;
  font: 600 0.95rem var(--f-body); letter-spacing: 0.02em; transition: background-color 0.16s var(--s-ease);
}
.studio-bulk__fmt input:hover + span { background: rgba(255, 255, 255, 0.6); }
.studio-bulk__fmt input:checked + span { background: var(--s-card); box-shadow: 0 0 0 1px var(--s-ink); }
.studio-bulk__fmt input:focus-visible + span { box-shadow: var(--s-focus); }
.studio-bulk__fmt input:disabled { cursor: not-allowed; }
.studio-bulk__fmt input:disabled + span { opacity: 0.4; text-decoration: line-through; }
.studio-bulk__note { margin: 0; color: var(--s-muted); font-size: 0.9rem; }
.studio-bulk__go {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px;
  border: 0; border-radius: 999px; background: var(--s-cta); color: var(--s-cta-ink); font: 700 1rem var(--f-body);
}
.studio-bulk__go:hover:not(:disabled) { background: var(--s-cta-hover); }
.studio-bulk__go:disabled { opacity: 0.6; cursor: progress; }
.studio-bulk__status { margin: 0; color: var(--s-muted); font-size: 0.95rem; }
.studio-bulk__errors:empty { display: none; } /* the status line stays rendered: a live region must exist before it changes */
.studio-bulk__errors {
  margin: 0; padding: 10px 14px; padding-inline-start: 30px; border-radius: 12px;
  background: #fdeee8; color: #8a2a0b; font-size: 0.95rem;
}
.studio-bulk--locked { background: var(--s-tint); box-shadow: none; display: grid; gap: 8px; }
.studio-bulk--locked .studio-bulk__head { min-height: 0; }
.studio-bulk__cta {
  justify-self: start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--s-cta); color: var(--s-cta-ink); font-weight: 600; text-decoration: none;
}
.studio-bulk__cta:hover { background: var(--s-cta-hover); color: var(--s-cta-ink); }
/* desktop: the stage is sticky; with the panel open it scrolls with the page, so Generate is never out of reach */
.studio-preview.navbar:has(.studio-bulk[open]) { position: static; }
