/* Logo-Studio */
#library.lg-library { --lg-ink: #182c3a; --lg-teal: #1d5c55; --lg-gold: #d9b38c; --lg-line: #e1e7e4; --lg-muted: #66777d; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--lg-ink); }
#library.lg-library button { font: inherit; cursor: pointer; margin: 0; min-height: 0; box-shadow: none; text-transform: none; letter-spacing: 0; }
#library.lg-library h2, #library.lg-library h3, #library.lg-library p { margin: 0; }
#library.lg-library label { display: grid; gap: 6px; margin: 0; padding: 0; font-size: 12px; font-weight: 600; color: #4a5a61; }
#library.lg-library input:not([type=checkbox]):not([type=range]):not([type=color]), #library.lg-library select { height: 40px; padding: 0 11px; border: 1px solid #d6dde0; border-radius: 10px; background: #fff; color: var(--lg-ink); font: 400 14px system-ui, -apple-system, "Segoe UI", sans-serif; width: 100%; box-sizing: border-box; margin: 0; }
#library.lg-library input[type=range] { width: 100%; accent-color: var(--lg-teal); margin: 6px 0 0; }

.lg-head { padding-bottom: 14px; }
.lg-kicker { font-size: 10.5px; letter-spacing: .16em; font-weight: 700; color: #a27a4e; }
#library.lg-library .lg-head h2 { font-size: 21px; margin: 4px 0 6px; font-weight: 700; color: var(--lg-ink); }
.lg-head p { font-size: 13px; color: var(--lg-muted); line-height: 1.45; }

.lg-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: #eef2ef; border: 1px solid var(--lg-line); margin-bottom: 14px; }
#library.lg-library .lg-modes button { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; height: 34px; border-radius: 9px; border: 0; background: transparent; color: #4a5c62; font-size: 12.5px; font-weight: 700; }
#library.lg-library .lg-modes button[aria-selected=true] { background: #fff; color: var(--lg-ink); box-shadow: 0 2px 8px #18302e1c; }

/* Vorschau */
.lg-preview { display: grid; gap: 10px; margin-bottom: 16px; }
.lg-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lg-card { min-height: 112px; border-radius: 14px; display: grid; place-items: center; padding: 16px; box-sizing: border-box; overflow: hidden; }
.lg-light { background: #fff; border: 1px solid var(--lg-line); background-image: radial-gradient(circle at 20% 0%, #f6f8f5, #fff 60%); }
.lg-dark { background: linear-gradient(135deg, #182c3a, #0f1d26); }
.lg-card svg, .lg-card img { max-width: 100%; max-height: 88px; width: auto; height: auto; display: block; animation: lg-pop .35s ease; }
@keyframes lg-pop { from { opacity: .3; transform: scale(.97); } to { opacity: 1; transform: none; } }
.lg-empty { font-size: 12px; color: #8a979c; }
.lg-dark .lg-empty { color: #ffffff99; }
.lg-mock { border-radius: 12px; border: 1px solid var(--lg-line); overflow: hidden; background: #fff; }
.lg-tab { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; background: #e9eeeb; font-size: 11.5px; color: #42545b; }
.lg-tab b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.lg-tab i { font-style: normal; opacity: .5; }
.lg-fav { width: 16px; height: 16px; display: grid; place-items: center; flex: none; }
.lg-fav svg, .lg-fav img { width: 16px; height: 16px; object-fit: contain; }
.lg-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; min-height: 52px; }
.lg-nav-logo svg, .lg-nav-logo img { height: var(--lg-h, 32px); width: auto; max-width: 220px; display: block; }
.lg-nav-links { display: flex; gap: 8px; }
.lg-nav-links em { display: block; width: 26px; height: 5px; border-radius: 3px; background: #dfe5e2; }

/* Abschnitte */
.lg-sec { padding: 14px 0; border-top: 1px solid var(--lg-line); display: grid; gap: 10px; }
#library.lg-library .lg-sec h3 { font-size: 13px; font-weight: 700; color: var(--lg-ink); }
.lg-sec-head { display: flex; align-items: center; justify-content: space-between; }
#library.lg-library .lg-shuffle { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid #b9d0c7; background: #eef5f1; color: var(--lg-teal); font-size: 12px; font-weight: 700; }
#library.lg-library .lg-shuffle:hover { background: var(--lg-teal); color: #fff; }
.lg-sugg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#library.lg-library .lg-sugg-item { height: 84px; padding: 12px; border-radius: 12px; border: 1px solid var(--lg-line); background: #fff; display: grid; place-items: center; transition: border-color .15s, transform .15s, box-shadow .15s; }
#library.lg-library .lg-sugg-item:hover { border-color: var(--lg-teal); transform: translateY(-2px); box-shadow: 0 10px 22px #18302e14; }
.lg-sugg-item svg { max-width: 100%; max-height: 58px; width: auto; height: auto; }
.lg-wait { grid-column: 1 / -1; font-size: 12.5px; color: var(--lg-muted); padding: 14px; text-align: center; border: 1px dashed #c9d5cf; border-radius: 12px; }
.lg-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#library.lg-library .lg-check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; color: #34474e; }
.lg-check input { width: 17px; height: 17px; accent-color: var(--lg-teal); margin: 0; }
.lg-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
#library.lg-library .lg-icons button { aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--lg-line); background: #fff; color: #34474e; display: grid; place-items: center; padding: 0; }
.lg-icons svg { width: 22px; height: 22px; }
.lg-icons b { font-size: 13px; letter-spacing: .02em; }
#library.lg-library .lg-icons button:hover { border-color: #9fbdb2; }
#library.lg-library .lg-icons button[aria-pressed=true] { background: var(--lg-ink); border-color: var(--lg-ink); color: #fff; }
.lg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#library.lg-library .lg-chips button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--lg-line); background: #fff; color: #44565d; font-size: 12.5px; font-weight: 600; }
#library.lg-library .lg-chips button[aria-pressed=true] { background: var(--lg-ink); border-color: var(--lg-ink); color: #fff; }
#library.lg-library .lg-color { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; }
.lg-color input[type=color] { width: 40px; height: 32px; padding: 0; border: 1px solid #d6dde0; border-radius: 8px; background: #fff; cursor: pointer; }
#library.lg-library .lg-color button { height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--lg-line); background: #fff; color: #44565d; font-size: 12px; font-weight: 600; }
#library.lg-library .lg-sec output { float: right; font-weight: 700; color: var(--lg-teal); }

/* Hochladen */
#library.lg-library .lg-drop { display: grid; justify-items: center; gap: 6px; padding: 26px 16px; border: 2px dashed #c3d3cc; border-radius: 14px; background: #f7faf8; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.lg-drop span { font-size: 26px; color: var(--lg-teal); }
.lg-drop b { font-size: 14px; color: var(--lg-ink); }
.lg-drop small { font-size: 12px; color: var(--lg-muted); font-weight: 400; }
#library.lg-library .lg-drop:hover, #library.lg-library .lg-drop.lg-over, #library.lg-library .lg-drop:focus-visible { border-color: var(--lg-teal); background: #eef5f1; outline: none; }
.lg-note { font-size: 12.5px; color: #3d6b5c; background: #eef5f1; border-radius: 10px; padding: 10px 12px; line-height: 1.45; }

/* Aktionen */
.lg-actions { position: sticky; bottom: -28px; display: flex; gap: 6px; flex-wrap: wrap; padding: 14px 0 6px; background: linear-gradient(#fbfaf700, #fbfaf7 30%); }
#library.lg-library .lg-actions button { height: 40px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--lg-line); background: #fff; color: var(--lg-ink); font-size: 13px; font-weight: 700; }
#library.lg-library .lg-actions .lg-primary { flex: 1 1 auto; background: var(--lg-teal); border-color: var(--lg-teal); color: #fff; }
#library.lg-library .lg-actions .lg-primary:hover { background: #174b45; }
#library.lg-library .lg-actions .lg-ghost { color: #a23b31; }
@media (prefers-reduced-motion: reduce) { .lg-card svg, .lg-card img { animation: none; } }

/* Knopf „Alle Vorschläge“ */
#library.lg-library .lg-gallery-open { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 13px; border: 1px solid #1d5c55; background: linear-gradient(120deg, #182c3a, #1d4a4f); color: #fff; }
.lg-gallery-open span { grid-row: span 2; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #ffffff1c; color: #e7c9a2; font-size: 18px; }
.lg-gallery-open b { font-size: 14px; }
.lg-gallery-open small { font-size: 11.5px; opacity: .78; font-weight: 400; }
#library.lg-library .lg-gallery-open:hover { filter: brightness(1.08); }

/* Große Logo-Galerie */
#lgGalleryDialog { width: min(1320px, calc(100vw - 24px)); height: calc(100vh - 24px); max-height: none; padding: 0; border: 0; border-radius: 20px; background: #f6f5f0; box-shadow: 0 30px 90px #0b182045; overflow: hidden; flex-direction: column; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: #182c3a; }
#lgGalleryDialog[open] { display: flex; }
#lgGalleryDialog::backdrop { background: #0b1820b3; backdrop-filter: blur(4px); }
#lgGalleryDialog button { font: inherit; cursor: pointer; margin: 0; min-height: 0; box-shadow: none; }
.lgg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 18px 22px; background: linear-gradient(110deg, #182c3a, #1d4a4f); color: #fff; }
.lgg-head h2 { margin: 4px 0 2px; font-size: 21px; color: #fff; }
.lgg-head .lg-kicker { color: #e7c9a2; }
.lgg-count { margin: 0; font-size: 12.5px; opacity: .78; }
.lgg-head-actions { display: flex; gap: 8px; }
#lgGalleryDialog .lgg-shuffle { height: 38px; padding: 0 16px; border-radius: 11px; border: 0; background: #d9b38c; color: #182c3a; font-weight: 700; }
#lgGalleryDialog .lgg-close { width: 38px; height: 38px; border-radius: 11px; border: 1px solid #ffffff40; background: #ffffff1a; color: #fff; padding: 0; }
.lgg-filters { display: grid; gap: 8px; padding: 12px 22px; background: #fffefa; border-bottom: 1px solid #e1e7e4; }
.lgg-filters > div { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
.lgg-filters b { flex: none; width: 58px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: #8a6a43; }
#lgGalleryDialog .lgg-filters button { flex: none; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid #e1e7e4; background: #fff; color: #44565d; font-size: 12.5px; font-weight: 600; }
#lgGalleryDialog .lgg-filters button[aria-pressed=true] { background: #182c3a; border-color: #182c3a; color: #fff; }
.lgg-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 22px 30px; }
.lgg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
#lgGalleryDialog .lgg-item { position: relative; display: grid; grid-template-rows: 1fr auto; height: 150px; padding: 14px 14px 10px; border-radius: 14px; border: 1px solid #e1e7e4; background: #fff; text-align: left; overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s; animation: lgg-in .3s ease both; }
@keyframes lgg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#lgGalleryDialog .lgg-item:hover { transform: translateY(-3px); box-shadow: 0 16px 34px #18302e1f; border-color: #1d5c55; }
.lgg-logo { display: grid; place-items: center; min-height: 0; }
.lgg-logo svg { max-width: 100%; max-height: 92px; width: auto; height: auto; }
.lgg-meta { font-size: 11px; color: #8a979c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lgg-item em { position: absolute; right: 10px; bottom: 8px; font-style: normal; font-size: 11.5px; font-weight: 700; color: #fff; background: #1d5c55; padding: 4px 9px; border-radius: 999px; opacity: 0; transition: opacity .15s; }
.lgg-item:hover em, .lgg-item:focus-visible em { opacity: 1; }
.lgg-end { text-align: center; color: #66777d; font-size: 12.5px; margin: 18px 0 0; }
@media (max-width: 640px) { .lgg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } #lgGalleryDialog .lgg-item { height: 120px; } .lgg-head h2 { font-size: 17px; } }
@media (prefers-reduced-motion: reduce) { #lgGalleryDialog .lgg-item { animation: none; transition: none; } }

/* Schriftzug */
.lg-modes button { font-size: 12px !important; }
.lg-wpresets .lg-sugg-item { position: relative; padding-bottom: 20px !important; }
.lg-wpresets .lg-sugg-item small { position: absolute; left: 0; right: 0; bottom: 5px; font-size: 10.5px; color: #8a979c; font-weight: 600; text-align: center; }
.lg-format { display: flex; flex-wrap: wrap; gap: 6px; }
.lg-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: #eef2ef; border: 1px solid #e1e7e4; }
#library.lg-library .lg-format button { height: 32px; padding: 0 11px; border-radius: 8px; border: 1px solid #e1e7e4; background: #fff; color: #34474e; font-size: 13px; font-weight: 500; }
#library.lg-library .lg-seg button { border: 0; background: transparent; }
#library.lg-library .lg-format button[aria-pressed=true] { background: #182c3a; border-color: #182c3a; color: #fff; }
.lg-xb { font-weight: 900; -webkit-text-stroke: .4px currentColor; }
.lg-two em { font-style: normal; color: #c9963b; }
.lg-format button[aria-pressed=true] .lg-two em { color: #e7c9a2; }
.lg-colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
#library.lg-library .lg-colors label { display: grid; gap: 6px; font-size: 12px; }
.lg-colors input[type=color] { width: 100%; height: 36px; padding: 2px; border: 1px solid #d6dde0; border-radius: 9px; background: #fff; cursor: pointer; }
#library.lg-library .lg-mini { justify-self: start; height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid #e1e7e4; background: #fff; color: #44565d; font-size: 12px; font-weight: 600; }

/* Vorschau bleibt beim Scrollen sichtbar */
#library.lg-library .lg-preview { position: sticky; top: -18px; z-index: 6; margin: 0 -20px 10px; padding: 12px 20px 10px; background: linear-gradient(#fbfaf7 85%, #fbfaf700); }
.lg-mockbox { margin-bottom: 16px; }
