/* SVG Studio — Favicon Generator & Favicon Checker pages.
   Theme via the global app.css variables (dark / light). */

.pub-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
}

/* ============ header ============ */

.pub-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  position: sticky;
  top: 0;
  z-index: 50;
}
.pub-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .2px;
}
.pub-brand svg { width: 22px; height: 22px; color: var(--accent); }
.pub-brand em { color: var(--accent); font-style: normal; }

.pub-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}
.pub-nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.pub-nav-link:hover { color: var(--text); background: var(--accent-soft); }
.pub-nav-link.active { color: var(--accent); background: var(--accent-soft); }

.pub-theme {
  margin-left: 8px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.pub-theme:hover { color: var(--text); border-color: var(--accent); }
.pub-theme svg { width: 17px; height: 17px; }
[data-theme="dark"] .pub-theme .ico-sun { display: block; }
[data-theme="dark"] .pub-theme .ico-moon { display: none; }
[data-theme="light"] .pub-theme .ico-sun { display: none; }
[data-theme="light"] .pub-theme .ico-moon { display: block; }

/* ============ layout ============ */

.pub-main {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 22px 60px;
}

.pub-hero { max-width: 820px; margin-bottom: 26px; }
.pub-hero h1 { font-size: 30px; margin: 0 0 10px; letter-spacing: -.4px; }
.pub-hero p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.pub-hero strong { color: var(--text); }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}
.card-title { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.muted { color: var(--muted); }

/* ============ tool grid ============ */

.fav-grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

/* tabs */
.fav-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}
.fav-tabs [role="tab"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
}
.fav-tabs [role="tab"] svg { width: 14px; height: 14px; }
.fav-tabs [role="tab"]:hover { color: var(--text); }
.fav-tabs [role="tab"].active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* fields */
.fav-panel, .fav-shared { display: flex; flex-direction: column; gap: 13px; margin-bottom: 16px; }
.fld {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  flex: 1;
}
.fld input[type="text"], .fld input[type="search"], .fld select {
  background: var(--input, rgba(127, 127, 127, .08));
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  width: 100%;
}
.fld input:focus, .fld select:focus { border-color: var(--accent); }
.fld-row { display: flex; gap: 12px; }
.fld output { float: right; font-weight: 600; color: var(--text); }

input[type="range"] { width: 100%; accent-color: var(--accent); }
input[type="color"] {
  width: 42px; height: 34px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.colorline { display: flex; gap: 8px; align-items: center; }
.colorline input[type="text"] {
  flex: 1;
  background: var(--input, rgba(127, 127, 127, .08));
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  text-transform: lowercase;
}
.chk {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  padding-top: 18px;
}
.chk input { accent-color: var(--accent); width: 16px; height: 16px; }
.fav-note { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); }

/* buttons */
.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  padding: 11px 18px;
  cursor: pointer;
  text-decoration: none;
  transition: filter .15s, background .15s;
}
.btn-primary {
  background: var(--accent);
  color: #06281c;
  border: 1px solid transparent;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { opacity: .55; cursor: wait; }
.btn-primary svg { width: 16px; height: 16px; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }
.btn-primary.busy::after {
  content: "";
  width: 13px; height: 13px;
  border: 2px solid rgba(0,0,0,.25);
  border-top-color: #06281c;
  border-radius: 50%;
  animation: favspin .7s linear infinite;
}
@keyframes favspin { to { transform: rotate(360deg); } }

/* upload dropzone */
.fav-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 16px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.fav-drop svg { width: 30px; height: 30px; color: var(--accent); }
.fav-drop strong { color: var(--text); font-size: 14.5px; }
.fav-drop span { font-size: 12.5px; }
.fav-drop.over, .fav-drop:hover { border-color: var(--accent); background: var(--accent-soft); }

/* library picker */
.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  padding: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.lib-grid::-webkit-scrollbar { width: 8px; }
.lib-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.lib-loading { grid-column: 1 / -1; text-align: center; color: var(--muted); font-size: 13px; padding: 20px 0; }
.lib-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 7px 4px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  min-height: 44px;
}
.lib-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.lib-thumb { width: 26px; height: 26px; display: block; }
.lib-thumb svg { width: 100%; height: 100%; }
.lib-name {
  font-size: 9.5px;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============ previews ============ */

.fav-preview { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.prev-master { display: flex; flex-direction: column; align-items: center; gap: 14px; }
#pvMaster {
  width: 220px;
  height: 220px;
  border-radius: 18px;
  background:
    repeating-conic-gradient(rgba(127,127,127,.18) 0 25%, transparent 0 50%) 0 0 / 18px 18px;
  border: 1px solid var(--border);
}
.pv-sizes { display: flex; align-items: flex-end; gap: 18px; }
.pv-size {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  padding-bottom: 2px;
}
.pv-size canvas {
  background:
    repeating-conic-gradient(rgba(127,127,127,.18) 0 25%, transparent 0 50%) 0 0 / 8px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  image-rendering: pixelated;
}

.prev-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.prev-grid.devices { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.prev-cell { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.prev-cell[data-preview] { cursor: zoom-in; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.prev-cell[data-preview]:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .16);
}
.prev-cell[data-preview]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.prev-cell figcaption { font-size: 12px; font-weight: 600; color: var(--muted); }
.prev-cell canvas {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
}
/* portrait phone mock-ups — enlarged so the home screens (4 zoomed icons)
   really fill the card */
.prev-cell.portrait canvas {
  width: auto;
  max-width: 100%;
  max-height: 460px;
  margin: 0 auto;
}
.pv-hint { margin: 0; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pv-hint::before { content: "⤢"; font-size: 13px; color: var(--accent); }

/* ============ validator + checker ============ */

.fav-validator { margin-top: 20px; }
.fav-validator > .muted { margin: -4px 0 14px; font-size: 13.5px; }
.val-form, .chk-form { display: flex; gap: 10px; flex-wrap: wrap; }
.val-form input, .chk-form input {
  flex: 1;
  min-width: 220px;
  background: var(--input, rgba(127, 127, 127, .08));
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.val-form input:focus, .chk-form input:focus { border-color: var(--accent); }
.chk-note { font-size: 12.5px; margin: 10px 0 0; }
.chk-formcard { margin-bottom: 20px; }

.val-loading { color: var(--muted); font-size: 14px; padding: 14px 0; }
.val-error { color: var(--text); font-size: 14px; line-height: 1.6; }
.val-error strong { color: #f87171; }
.val-notice {
  font-size: 13.5px;
  line-height: 1.6;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.val-notice strong { color: var(--text); }

.val-head { font-size: 15px; margin: 16px 0 10px; }
.val-head .val-host { color: var(--accent); }

.val-icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.val-icon {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 6px;
  background: #fff;
}
.val-icon img { width: 40px; height: 40px; object-fit: contain; }
.val-icon figcaption { font-size: 10px; color: var(--muted); text-align: center; word-break: break-word; }

.check-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.check-list li {
  display: grid;
  grid-template-columns: 22px 220px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13.5px;
}
.check-list li:nth-child(odd) { background: rgba(127, 127, 127, .05); }
.ck-ico { font-weight: 800; text-align: center; }
.ck-yes .ck-ico { color: var(--accent); }
.ck-warn .ck-ico { color: #fbbf24; }
.ck-no .ck-ico { color: #f87171; }
.ck-label { font-weight: 600; }
.ck-detail { color: var(--muted); font-size: 12.5px; }

.val-cta { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); }
.val-cta p { margin: 0 0 10px; font-size: 13.5px; color: var(--muted); }
.val-cta.big p { font-size: 14.5px; }
.val-cta .btn-ghost { margin-left: 8px; }

/* checker */
.chk-initial { display: flex; justify-content: center; }
.chk-empty {
  text-align: center;
  max-width: 460px;
  padding: 40px 26px;
  color: var(--muted);
}
.chk-empty svg { width: 44px; height: 44px; color: var(--accent); margin-bottom: 8px; }
.chk-empty h2 { color: var(--text); font-size: 18px; margin: 6px 0; }
.chk-empty p { font-size: 13.5px; line-height: 1.6; margin: 0; }

.chk-summary { margin-bottom: 16px; }
.chk-host-row { display: flex; align-items: center; gap: 13px; }
.chk-favicon {
  width: 44px; height: 44px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 3px;
}
.chk-noicon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--muted);
  font-size: 18px;
}
.chk-host-row strong { display: block; font-size: 15px; }
.chk-host-row .muted { font-size: 12.5px; word-break: break-all; }

.chk-prev { margin-bottom: 16px; }
.chk-verdict { margin-top: 16px; }
.chk-verdict strong { font-size: 15px; }
.chk-verdict.ok strong { color: var(--accent); }
.chk-verdict.bad strong { color: #f87171; }
.chk-verdict p { color: var(--muted); font-size: 13.5px; margin: 8px 0 12px; }

/* ============ generate modal ============ */

.modal {
  position: fixed;
  inset: 0;
  /* neutralize the global app.css .modal (editor card) properties that
     would otherwise shrink/backdrop this overlay to a 410px card */
  width: auto;
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: rgba(4, 8, 12, .66);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 300;
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(640px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  scrollbar-width: thin;
}
/* Full-size preview modal — wide, canvas fits the viewport */
.modal-wide .modal-card { width: min(1240px, 96vw); }
.modal-wide .modal-body { padding: 12px 14px 16px; gap: 10px; }
.modal-canvas-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  max-height: 74vh;
  min-height: 180px;
  padding: 12px;
  border-radius: 12px;
  background:
    repeating-conic-gradient(rgba(127, 127, 127, .1) 0 25%, transparent 0 50%) 0 0 / 22px 22px,
    var(--input, rgba(127, 127, 127, .06));
  border: 1px solid var(--border);
  scrollbar-width: thin;
}
.modal-canvas-wrap canvas {
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 44px rgba(0, 0, 0, .38);
  display: block;
}
.modal-size { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--panel);
}
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-x {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
}
.modal-x:hover { color: var(--text); border-color: var(--accent); }
.modal-x svg { width: 15px; height: 15px; }
.modal-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 14px; }

.gen-files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.gen-file {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 10px;
}
.gen-file svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }
.gen-file .fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.gen-file .fs { color: var(--muted); font-size: 11px; }

.gen-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.links-title { margin: 4px 0 0; font-size: 13.5px; }
.links-title code { color: var(--accent); }
#genLinks {
  width: 100%;
  background: var(--input, rgba(127, 127, 127, .08));
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.7;
  resize: vertical;
  min-height: 150px;
}
.modal-body .btn-ghost { align-self: flex-start; }

/* ============ SEO content ============ */

.pub-seo {
  margin-top: 46px;
  display: flex;
  flex-direction: column;
  gap: 34px;
  max-width: 860px;
}
.pub-seo article h2 { font-size: 21px; margin: 0 0 12px; letter-spacing: -.3px; }
.pub-seo article h3 { font-size: 15px; margin: 18px 0 6px; }
.pub-seo article p, .pub-seo article li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}
.pub-seo article strong { color: var(--text); }
.pub-seo code {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 12.5px;
  font-family: 'JetBrains Mono', monospace;
}
.pub-seo a { color: var(--accent); text-decoration: none; font-weight: 600; }
.pub-seo a:hover { text-decoration: underline; }

.steps { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; margin: 0; }
.filelist { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; margin: 0; }
.pub-cross {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 16px 20px;
}
.pub-cross p { margin: 0; }

/* ============ footer ============ */

.pub-footer {
  border-top: 1px solid var(--border);
  background: var(--panel);
  margin-top: auto;
}
.pub-footer p {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 22px;
  color: var(--muted);
  font-size: 13px;
}
.pub-footer a { color: var(--accent); text-decoration: none; }
.pub-footer a:hover { text-decoration: underline; }

#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 400; }
.toast {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 13.5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
  max-width: 340px;
}
.toast.show { opacity: 1; transform: none; }
.toast.error { border-left-color: #f87171; }

/* ============ responsive ============ */

@media (max-width: 980px) {
  .fav-grid { grid-template-columns: 1fr; }
  .pub-header { flex-wrap: wrap; }
  .pub-nav { margin-left: 0; order: 3; width: 100%; }
  .prev-grid.devices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .pub-main { padding: 20px 14px 48px; }
  .pub-hero h1 { font-size: 24px; }
  .prev-grid { grid-template-columns: 1fr; }
  .prev-grid.devices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prev-cell.portrait canvas { max-height: 330px; }
  .fld-row { flex-direction: column; }
  .check-list li { grid-template-columns: 20px 1fr; }
  .check-list .ck-detail { grid-column: 2; }
  .val-form input, .chk-form input { min-width: 0; }
  .gen-files { grid-template-columns: 1fr; }
}

/* ===================== Logo Maker (/logo-maker) ===================== */
/* (appended by Task 31 — additive only, no existing rule is changed)  */

.lg-3d > .tool-grid-label { margin-bottom: 6px; }
.lg-3d-note { font-weight: 400; font-size: 11px; color: var(--muted); }
#lg3dRow { display: grid; gap: 12px; }
#lg3dRow[hidden] { display: none; }

.lg-stage { display: flex; justify-content: center; padding: 10px 0 4px; }
.lg-stage canvas {
  width: min(100%, 400px);
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .35);
  background:
    conic-gradient(#2a3140 0 25%, #232936 0 50%, #2a3140 0 75%, #232936 0) 0 0 / 20px 20px;
}

.lg-export { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.lg-export .btn-ghost { display: inline-flex; align-items: center; gap: 8px; }
.lg-export .btn-ghost svg { width: 16px; height: 16px; }
.lg-export-sep { width: 1px; height: 22px; background: var(--border); }
.lg-png-size { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.lg-png-size select {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 13px;
}

.lg-usage { margin-top: 18px; }
.lg-steps { margin: 10px 0 0 18px; display: grid; gap: 8px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.lg-steps strong { color: var(--text); }
.lg-links { margin-top: 14px; font-size: 14px; color: var(--muted); line-height: 1.6; }
.lg-links a { color: var(--accent); text-decoration: none; }
.lg-links a:hover { text-decoration: underline; }

/* library grid "Load more" (logo page) */
.lib-more {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 4px; padding: 9px 10px;
  background: var(--panel-2); color: var(--muted);
  border: 1px dashed var(--border-2); border-radius: 10px;
  font-size: 12.5px; cursor: pointer;
}
.lib-more:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 640px) {
  .lg-export { align-items: stretch; flex-direction: column; }
  .lg-export-sep { width: 100%; height: 1px; }
  .lg-png-size { justify-content: space-between; }
}

/* ============ sticky controls column (desktop) ============ */
@media (min-width: 981px) {
  .fav-grid .fav-controls {
    position: sticky;
    top: 16px;
    align-self: start;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .fav-grid .fav-controls::-webkit-scrollbar { width: 8px; }
  .fav-grid .fav-controls::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
}

/* ============ library icon color row ============ */
.fav-colorrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 2px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel-2);
}
.fav-color-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.fav-colorrow input[type="color"] {
  width: 34px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--border-2);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.fav-color-reset {
  margin-left: auto;
  padding: 5px 10px;
  font-size: 12px;
}
