@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600&display=swap');
:root{--bg:#f7f3eb;--surface:#fffdf9;--surface2:#f0e9dd;--text:#25211b;--muted:#746d62;--gold:#c9a665;--gold2:#e1c58e;--border:rgba(85,67,38,.17);--shadow:0 14px 42px rgba(54,39,19,.08);--green:#56a66f;--yellow:#d1aa48;--red:#c86469}[data-theme=dark]{--bg:#0c0d0f;--surface:#151619;--surface2:#1d1e22;--text:#eeeae2;--muted:#aaa299;--border:rgba(225,199,146,.15);--shadow:0 18px 55px rgba(0,0,0,.28)}*{box-sizing:border-box}html{background:var(--bg);scroll-behavior:smooth}body{margin:0;background:radial-gradient(circle at 50% -15%,rgba(201,166,101,.10),transparent 36%),var(--bg);color:var(--text);font:14px/1.55 Montserrat,sans-serif;min-height:100vh;transition:.25s}body.no-scroll{overflow:hidden}h1,h2,h3{font-family:bianca,Montserrat,sans-serif;color:var(--gold);font-weight:400}h1{font-size:clamp(42px,7vw,68px);margin:.2em 0}h2{font-size:31px;margin:.25em 0}h3{font-size:25px}.admin-shell,.gallery-shell{max-width:1380px;margin:auto;padding:24px 18px 70px}.brand{display:inline-flex;align-items:center;gap:13px;color:var(--gold);text-decoration:none}.brand img{width:58px;height:58px;border-radius:50%;object-fit:cover}.brand span{font-family:bianca,Montserrat,sans-serif;font-size:28px;color:var(--gold)}.panel{background:var(--surface);border:1px solid var(--border);border-radius:20px;padding:21px;margin:16px 0;box-shadow:var(--shadow)}.panel.compact{padding:18px}.narrow{max-width:520px;margin:8vh auto}.admin-head,.gallery-top,.toolbar{display:flex;justify-content:space-between;gap:18px;align-items:center;flex-wrap:wrap}.grid-form,.settings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:end;margin:12px 0}.settings .checks{grid-column:1/-1;display:flex;gap:14px;flex-wrap:wrap}.settings .wide{grid-column:span 2}.editor-form{display:grid;gap:11px}.editor-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}.editor-card{margin:0}.editor-card img{width:100%;max-height:260px;object-fit:contain;border-radius:12px;background:var(--surface2)}.inline-actions,.quick-actions,.reset-actions{display:flex;gap:8px;flex-wrap:wrap}.price-preview{font-size:1.5rem;color:var(--gold)}input,select,textarea,button,.button{font:inherit;border-radius:11px;border:1px solid var(--border);padding:10px 12px;background:var(--surface2);color:var(--text)}input[type=checkbox]{accent-color:var(--gold)}button,.button{background:var(--gold);color:#17130d;border-color:transparent;cursor:pointer;text-decoration:none;font-weight:600}.ghost{background:transparent!important;color:var(--text)!important;border:1px solid var(--border)!important}.notice{padding:12px 16px;border-radius:12px;margin:12px 0}.ok{background:rgba(85,184,122,.16)}.bad{background:rgba(217,110,114,.16)}label{display:grid;gap:5px}.notification{display:flex;justify-content:space-between;gap:15px;padding:10px 0;border-bottom:1px solid var(--border)}.notification small{display:block;color:var(--muted);margin-top:4px}.admin-actions{display:flex;gap:.7rem;flex-wrap:wrap}.admin-nav{display:flex;gap:.55rem;flex-wrap:wrap;margin:1rem 0 1.3rem}.admin-nav a{padding:.68rem .95rem;border:1px solid var(--border);border-radius:999px;text-decoration:none;color:var(--text);background:var(--surface)}.admin-nav a.active{background:var(--gold);color:#111;border-color:var(--gold)}.dashboard-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.9rem;margin-bottom:.8rem}.dash-card{text-decoration:none;color:var(--text);display:flex;flex-direction:column;gap:.2rem}.dash-card strong{font-size:2rem;color:var(--gold)}.danger{background:#8d2f36!important;color:#fff!important;border-color:#8d2f36!important}.small{padding:.45rem .65rem!important}.gallery-admin-card{padding:0;overflow:hidden}.gallery-admin-card summary{list-style:none;cursor:pointer;padding:18px 20px;display:flex;align-items:center;justify-content:space-between;gap:14px;background:var(--surface)}.gallery-admin-card summary::-webkit-details-marker{display:none}.gallery-admin-card summary:after{content:'＋';font-size:20px;color:var(--gold)}.gallery-admin-card[open] summary:after{content:'−'}.gallery-admin-card summary strong{font-family:bianca,Montserrat,sans-serif;font-size:30px;color:var(--gold);font-weight:400}.gallery-admin-card summary small{display:block;color:var(--muted)}.summary-status{font-size:12px;border:1px solid var(--border);border-radius:999px;padding:5px 9px}.gallery-admin-body{padding:0 20px 20px}.upload-compact{display:flex;align-items:center;gap:9px;background:var(--surface2);border-radius:13px;padding:10px 12px;margin:12px 0}.upload-compact input{flex:1;min-width:180px;background:transparent;padding:5px;border:0}.selection-row{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:15px}.export-form{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.export-form label{display:flex;gap:4px;align-items:center;font-size:12px}.filterbar{display:flex;gap:7px;flex-wrap:wrap}.filterbar button{background:transparent;color:var(--text);border:1px solid var(--border);padding:8px 11px}.filterbar button.active{background:var(--gold);color:#17130d;border-color:var(--gold);box-shadow:0 3px 14px rgba(201,166,101,.17)}.admin-image-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:.8rem;margin-top:1rem}.admin-image{border:1px solid var(--border);border-radius:14px;padding:.65rem;background:var(--surface2);display:flex;flex-direction:column;gap:.45rem}.admin-image img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:10px;display:block;background:var(--surface)}.admin-preview{padding:0;background:transparent;border:0}.admin-image strong,.admin-image small{display:block;overflow-wrap:anywhere}.comment-link{padding:0;background:transparent!important;border:0!important;color:var(--gold)!important;text-align:left;font-weight:500}.danger-row{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-top:1rem}.modal{position:fixed;inset:0;background:rgba(5,5,6,.82);z-index:10000;display:none;place-items:center;padding:18px}.modal.open{display:grid}.modal-card{position:relative;max-width:min(1000px,94vw);max-height:90vh;overflow:auto;background:var(--surface);border:1px solid var(--border);border-radius:18px;padding:18px;box-shadow:0 30px 90px rgba(0,0,0,.35)}.modal-card img{max-width:100%;max-height:72vh;display:block;margin:auto;object-fit:contain}.modal-close{position:absolute;right:10px;top:10px;z-index:2;background:rgba(20,20,20,.7)!important;color:#fff!important}.customer-nav{position:sticky;top:0;z-index:1000;background:color-mix(in srgb,var(--bg) 90%,transparent);backdrop-filter:blur(14px);border-bottom:1px solid var(--border)}.customer-nav-inner{max-width:1380px;margin:auto;padding:10px 18px;display:flex;align-items:center;gap:16px}.customer-links{display:flex;gap:15px;align-items:center;margin-left:auto}.customer-links a{color:var(--text);text-decoration:none;font-size:11px;letter-spacing:.8px;text-transform:uppercase}.customer-links a.active,.customer-links a:hover{color:var(--gold)}.gallery-instructions{display:flex;justify-content:space-between;align-items:center;gap:20px}.gallery-instructions h1{margin-bottom:2px}.attempt-hint{color:var(--muted);max-width:760px}.submit-box{display:grid;gap:10px;min-width:250px}.stats{display:flex;gap:10px;flex-wrap:wrap;color:var(--muted)}.print-link{text-align:right;margin:8px 0}.toolbar{margin:14px 0}.download-select{display:flex;grid-template-columns:auto auto;align-items:center;gap:8px}.gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(185px,1fr));gap:10px;margin-top:12px}.photo{position:relative;border-radius:14px;overflow:hidden;background:var(--surface);border:3px solid transparent;aspect-ratio:4/3}.photo img{width:100%;height:100%;object-fit:cover;display:block;cursor:zoom-in}.photo[data-rating=green]{border-color:var(--green)}.photo[data-rating=yellow]{border-color:var(--yellow)}.photo[data-rating=red]{border-color:var(--red)}.photo-actions{position:absolute;inset:auto 5px 5px;display:flex;gap:4px;justify-content:center}.rate{width:27px;height:27px;border-radius:50%;padding:0;border:2px solid rgba(255,255,255,.9);box-shadow:0 2px 8px rgba(0,0,0,.2)}.rate.green{background:var(--green)}.rate.yellow{background:var(--yellow)}.rate.red{background:var(--red)}.has-comment{position:absolute;top:6px;right:7px;background:rgba(0,0,0,.65);border-radius:999px;padding:3px 6px;font-size:11px}.lightbox{position:fixed;inset:0;background:rgba(5,5,6,.96);z-index:9000;display:none;align-items:center;justify-content:center;color:#fff}.lightbox.open{display:flex}.lb-stage{width:min(1000px,90vw);height:84vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}.lb-pan{width:100%;flex:1;min-height:0;overflow:hidden;display:grid;place-items:center;touch-action:none;cursor:zoom-in}.lb-pan.zoomed{cursor:grab}.lb-pan img{max-width:100%;max-height:100%;object-fit:contain;transform-origin:center;transition:transform .12s ease;user-select:none;-webkit-user-drag:none}.lb-close,.lb-prev,.lb-next{position:absolute;background:rgba(20,20,20,.72)!important;color:white!important;border:1px solid rgba(255,255,255,.15)!important}.lb-close{right:18px;top:18px}.lb-prev{left:18px}.lb-next{right:18px}.lb-meta{position:absolute;bottom:12px;left:18px;display:flex;gap:8px}.lb-ratings{display:flex;gap:6px}.choice{border-radius:999px;padding:7px 12px;background:rgba(255,255,255,.09)!important;color:#fff!important;border:1px solid rgba(255,255,255,.18)!important}.choice.yes.active{background:var(--green)!important}.choice.maybe.active{background:var(--yellow)!important;color:#17130d!important}.choice.no.active{background:var(--red)!important}.lb-caption{font-size:12px;color:#ccc}.comment-editor{width:min(620px,90%);display:grid;grid-template-columns:1fr auto;gap:7px}.comment-editor textarea{min-height:56px;background:rgba(255,255,255,.08);color:#fff;border-color:rgba(255,255,255,.15)}.locked-ratings .choice,#submitSelection:disabled{opacity:.45;pointer-events:none}.code-input{text-transform:uppercase;text-align:center;letter-spacing:.35em;font-size:22px}.remember{display:flex;grid-template-columns:auto 1fr;align-items:center}.login-form{display:grid;gap:12px}textarea{width:100%;resize:vertical}.theme-btn{white-space:nowrap}
@media(max-width:900px){.customer-nav-inner{flex-wrap:wrap}.customer-links{order:3;width:100%;justify-content:center;flex-wrap:wrap;margin:0}.gallery-instructions{align-items:flex-start;flex-direction:column}.submit-box{width:100%;min-width:0}.grid-form,.settings{grid-template-columns:1fr 1fr}.settings .wide{grid-column:1/-1}}
@media(max-width:650px){.grid-form,.settings{grid-template-columns:1fr}.admin-shell,.gallery-shell{padding:14px 10px 55px}.panel{padding:14px}.gallery-admin-body{padding:0 12px 14px}.gallery-admin-card summary{padding:14px}.gallery-admin-card summary strong{font-size:25px}.gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.photo-actions{inset:auto 3px 3px}.rate{width:24px;height:24px}.lb-stage{height:88vh;width:94vw}.lb-prev,.lb-next{top:auto;bottom:100px}.lb-meta{left:50%;transform:translateX(-50%);bottom:8px}.comment-editor{grid-template-columns:1fr}.customer-nav-inner .brand span{display:none}.brand span{font-size:22px}.brand img{width:48px;height:48px}.admin-nav{display:grid;grid-template-columns:1fr 1fr}.admin-nav a{text-align:center}.dashboard-grid{grid-template-columns:1fr}.upload-compact{align-items:stretch;flex-direction:column}.danger-row{flex-direction:column}.selection-row{align-items:flex-start}.export-form{padding-top:8px}.gallery-instructions h1{font-size:48px}.customer-links a{font-size:10px}}/* V5 refinements */
.editor-cards{grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),420px));justify-content:start;align-items:start}.editor-card{width:100%}.editor-card img{max-height:220px}.print-link{display:flex;justify-content:flex-end}.print-link .button{display:inline-flex;align-items:center;gap:8px;background:color-mix(in srgb,var(--gold) 16%,var(--surface))!important;color:var(--text)!important;border:1px solid color-mix(in srgb,var(--gold) 48%,var(--border))!important;box-shadow:0 4px 18px rgba(201,166,101,.08)}.print-link .button:before{content:'🖨';font-size:15px}.customer-menu-toggle{display:none;background:var(--surface)!important;color:var(--text)!important;border:1px solid var(--border)!important;width:42px;height:42px;padding:0;border-radius:999px;font-size:19px}.lightbox{padding:18px}.lb-stage{width:min(1180px,92vw);height:min(90vh,900px);display:grid;grid-template-rows:minmax(0,1fr) auto auto auto;align-items:center;justify-items:center;gap:9px}.lb-pan{width:100%;min-height:0;overflow:hidden;display:grid;place-items:center;border-radius:12px;background:#09090a}.lb-pan img{max-width:100%;max-height:68vh;width:auto;height:auto;object-fit:contain}.lb-ratings{display:flex;gap:7px;justify-content:center}.choice{opacity:.38;transform:scale(.96);transition:opacity .16s ease,transform .16s ease,box-shadow .16s ease,background .16s ease}.choice:hover{opacity:.72}.choice.active{opacity:1;transform:scale(1.04);box-shadow:0 0 0 2px rgba(255,255,255,.72),0 5px 18px rgba(0,0,0,.28)}.comment-editor{width:min(680px,94%);grid-template-columns:minmax(0,1fr) auto;align-items:stretch}.comment-editor textarea{min-height:64px;resize:vertical}.comment-status{font-size:12px;color:#d8d2c8;min-height:18px;text-align:center}.lb-caption{font-size:12px;color:#c9c5be;max-width:80vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lb-meta{bottom:14px}.gallery-grid .rate{opacity:.62}.gallery-grid .photo[data-rating=green] .rate.green,.gallery-grid .photo[data-rating=yellow] .rate.yellow,.gallery-grid .photo[data-rating=red] .rate.red{opacity:1;box-shadow:0 0 0 2px rgba(255,255,255,.9),0 2px 10px rgba(0,0,0,.25)}
@media(max-width:860px){.customer-nav-inner{flex-wrap:nowrap;position:relative}.customer-menu-toggle{display:inline-grid;place-items:center;margin-left:auto}.customer-links{display:none;position:absolute;left:12px;right:12px;top:calc(100% + 8px);margin:0;background:var(--surface);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow);padding:8px;flex-direction:column;align-items:stretch;z-index:20}.customer-links.open{display:flex}.customer-links a{padding:11px 12px;border-radius:9px}.customer-links a.active,.customer-links a:hover{background:var(--surface2)}.brand span{font-size:22px}.brand img{width:48px;height:48px}.theme-btn{padding:9px 10px}.lb-stage{width:96vw;height:92vh}.lb-pan img{max-height:60vh}.lb-prev,.lb-next{top:42%;padding:9px 12px}.comment-editor{grid-template-columns:1fr}.comment-editor button{width:100%}.lb-meta{position:static;display:flex;justify-content:center;flex-wrap:wrap}.editor-cards{grid-template-columns:1fr}}
@media(max-width:560px){.gallery-shell{padding-left:10px;padding-right:10px}.gallery-instructions{align-items:stretch}.submit-box{min-width:0;width:100%}.lightbox{padding:8px}.lb-stage{width:100%;height:95vh;gap:6px}.lb-pan{border-radius:8px}.lb-pan img{max-height:55vh}.choice{padding:7px 10px;font-size:13px}.brand span{font-size:19px}.customer-nav-inner{gap:8px;padding:8px 10px}.theme-btn{font-size:0;width:40px;height:40px}.theme-btn:before{content:'◐';font-size:16px}}

/* V6 reliability and mobile brand refinements */
.customer-nav .brand span{display:inline!important;font-family:bianca,Montserrat,sans-serif;color:var(--gold);font-size:24px;white-space:nowrap}
.print-link .button:before{content:none!important}.print-link .button span{font-size:15px}
@media(max-width:650px){.customer-nav .brand span{display:inline!important;font-size:18px;max-width:155px;overflow:hidden;text-overflow:ellipsis}.customer-nav-inner .brand img{width:42px;height:42px}.customer-nav-inner{gap:7px}.customer-menu-toggle{width:40px;height:40px;flex:0 0 40px}.theme-btn{font-size:0!important;width:42px!important;height:42px!important;min-width:42px;padding:0!important;display:inline-grid!important;place-items:center!important}.theme-btn:before{content:'◐';font-size:21px!important;line-height:1}.customer-nav .button.ghost{padding:9px 10px;font-size:11px}}
@media(max-width:440px){.customer-nav .brand span{font-size:16px;max-width:118px}.customer-nav-inner .brand img{width:38px;height:38px}.customer-menu-toggle,.theme-btn{width:38px!important;height:38px!important;min-width:38px}}

/* V6 final admin/customer reliability polish */
.quick-actions{align-items:center}.quick-actions .quick-delete{margin-left:auto}.quick-actions .quick-delete button{white-space:nowrap}
@media(max-width:650px){.quick-actions .quick-delete{margin-left:0;width:100%}.quick-actions .quick-delete button{width:100%}}

.customer-footer{text-align:center;color:var(--muted);padding:34px 18px 42px}.customer-footer a{color:var(--muted)}


/* V9 customer gallery modal + submission feedback */
.submit-status{min-height:22px;font-size:12px;line-height:1.45;color:var(--muted);max-width:340px}
.submit-status.bad{color:#d85f67;background:rgba(216,95,103,.09);border:1px solid rgba(216,95,103,.25);border-radius:10px;padding:8px 10px}
.submit-status.good{color:#5fbf83;background:rgba(95,191,131,.08);border:1px solid rgba(95,191,131,.2);border-radius:10px;padding:8px 10px}

.lightbox{padding:18px;overflow:auto;align-items:center}
.lb-dialog{width:min(1080px,96vw);max-height:94vh;display:grid;grid-template-rows:minmax(0,1fr) auto;background:#0d0e10;border:1px solid rgba(255,255,255,.12);border-radius:20px;overflow:hidden;box-shadow:0 32px 100px rgba(0,0,0,.5);position:relative}
.lb-media{position:relative;min-height:0;height:min(68vh,720px);background:#070809;display:grid;place-items:center;overflow:hidden}
.lb-pan{width:100%;height:100%;min-height:0;overflow:hidden;display:grid;place-items:center;touch-action:none;cursor:zoom-in;background:#070809}
.lb-pan img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;transform-origin:center;transition:transform .12s ease;user-select:none;-webkit-user-drag:none}
.lb-controls{padding:13px 16px 15px;display:grid;gap:10px;background:#111216}
.lb-topline{display:flex;align-items:center;justify-content:space-between;gap:10px}
.lb-caption{font-size:13px;color:#d9d4cb;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lb-meta{position:static;display:flex;gap:6px}
.lb-meta .button,.lb-meta button{min-height:34px;padding:7px 11px;font-size:12px}
.lb-ratings{display:flex;align-items:center;justify-content:center;gap:7px}
.lb-question{font-size:12px;color:#9f9a92;margin-right:4px}
.choice{opacity:.26;transform:scale(.96);transition:opacity .16s ease,transform .16s ease,box-shadow .16s ease,filter .16s ease;background:rgba(255,255,255,.07)!important}
.lb-ratings.has-selection .choice:not(.active){opacity:.15;filter:saturate(.25)}
.choice.active{opacity:1;transform:scale(1.04);box-shadow:0 0 0 2px rgba(255,255,255,.82),0 5px 18px rgba(0,0,0,.35)}
.comment-editor{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.comment-editor textarea{min-height:64px;max-height:150px;background:#191a1e;color:#fff;border-color:rgba(255,255,255,.14)}
.comment-editor button{min-width:170px}
.comment-status{text-align:left;padding-left:2px}
.lb-close,.lb-prev,.lb-next{position:absolute;z-index:7;width:42px;height:42px;padding:0;border-radius:50%!important;display:grid;place-items:center;background:rgba(12,13,15,.72)!important;color:#fff!important;border:1px solid rgba(255,255,255,.22)!important;backdrop-filter:blur(8px)}
.lb-close{right:12px;top:12px}.lb-prev{left:12px;top:50%;transform:translateY(-50%)}.lb-next{right:12px;top:50%;transform:translateY(-50%)}

@media(max-width:650px){
  .lightbox{padding:0;align-items:flex-start}
  .lb-dialog{width:100%;max-height:none;min-height:100dvh;border-radius:0;border:0;grid-template-rows:auto auto}
  .lb-media{height:min(58dvh,560px);min-height:330px}
  .lb-controls{padding:12px 14px 22px;gap:11px}
  .lb-topline{align-items:flex-start}
  .lb-caption{font-size:12px;max-width:55vw}
  .lb-meta{gap:5px}
  .lb-meta .button,.lb-meta button{font-size:11px;padding:6px 9px;min-height:32px}
  .lb-ratings{justify-content:flex-start;flex-wrap:wrap}
  .lb-question{width:100%;margin-bottom:2px}
  .choice{padding:8px 12px;font-size:13px}
  .comment-editor{grid-template-columns:1fr}
  .comment-editor button{min-width:0;width:100%}
  .lb-close{position:fixed;right:10px;top:calc(env(safe-area-inset-top) + 10px)}
  .lb-prev,.lb-next{top:29dvh;width:38px;height:38px}
  .lb-prev{left:8px}.lb-next{right:8px}
}


/* ===== V10 Galerie ===== */
:root{--unrated:#8d73b7}
.theme-label{display:inline}
.summary-badges{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.summary-status.finalized{border-color:rgba(86,166,111,.45);color:var(--green)}
.reminder strong{color:#c08e34}

/* Vorschaubilder nie beschneiden */
.gallery-grid{align-items:start}
.photo{
  aspect-ratio:auto!important;
  min-height:0;
  background:var(--surface2);
  overflow:visible;
  border-width:2px;
}
.photo img{
  width:100%!important;height:auto!important;
  max-height:520px;
  object-fit:contain!important;
  display:block;border-radius:11px;
  background:var(--surface2);
}
.photo[data-rating=none]{border-color:transparent}
.rating-indicator{
  position:absolute;left:8px;top:8px;width:13px;height:13px;border-radius:50%;
  background:var(--unrated);border:2px solid rgba(255,255,255,.92);
  box-shadow:0 2px 8px rgba(0,0,0,.25);z-index:4;
}
.photo[data-rating=green] .rating-indicator{background:var(--green)}
.photo[data-rating=yellow] .rating-indicator{background:var(--yellow)}
.photo[data-rating=red] .rating-indicator{background:var(--red)}
.photo-actions{z-index:5;padding:5px;border-radius:999px;background:rgba(10,10,11,.48);backdrop-filter:blur(7px)}
.has-comment{z-index:6}
.photo[data-comment="1"]::before{
  content:attr(data-comment-text);position:absolute;left:8px;right:8px;top:34px;z-index:8;
  opacity:0;visibility:hidden;pointer-events:none;transform:translateY(-4px);
  background:rgba(15,15,17,.9);color:#fff;padding:8px 10px;border-radius:9px;
  font-size:11px;line-height:1.45;box-shadow:0 10px 30px rgba(0,0,0,.3);
  transition:.15s;white-space:normal;
}
@media (hover:hover) and (min-width:1025px){
  .photo-actions{opacity:0;transform:translateY(4px);transition:.15s;pointer-events:none}
  .photo:hover .photo-actions,.photo:focus-within .photo-actions{opacity:1;transform:none;pointer-events:auto}
  .photo[data-comment="1"]:hover::before{opacity:1;visibility:visible;transform:none}
}
@media (hover:none),(max-width:1024px){
  .photo-actions{opacity:1!important;pointer-events:auto!important}
}

/* Filter + Download */
.download-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.filterbar button.active{background:var(--gold)!important;color:#17130d!important;border-color:var(--gold)!important}

/* Großansicht – Firefox/Chrome/Safari stabil */
.lightbox{padding:14px!important;overflow:auto!important;align-items:center!important}
.lb-dialog{
  width:min(1180px,calc(100vw - 28px))!important;
  max-height:calc(100dvh - 28px)!important;
  min-height:0!important;
  grid-template-rows:minmax(280px,1fr) auto!important;
  overflow:hidden!important;
}
.lb-media{
  height:min(70dvh,760px)!important;min-height:280px!important;
  overflow:hidden!important;display:grid!important;place-items:center!important;
}
.lb-pan{
  width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;
  overflow:hidden!important;display:grid!important;place-items:center!important;
}
.lb-pan img{
  max-width:100%!important;max-height:100%!important;width:auto!important;height:auto!important;
  object-fit:contain!important;position:static!important;inset:auto!important;
}
.lb-pan.zoomed{cursor:grab}
.lb-controls{min-width:0!important}
.lb-topline{min-width:0}
.lb-meta{flex-wrap:wrap}
.comment-actions{display:flex;gap:7px}.comment-delete{color:#d8898f!important}
.comment-editor{align-items:stretch}
.comment-editor textarea{min-width:0}
.lb-ratings .choice{min-width:74px}
.lb-dialog:fullscreen{width:100vw!important;height:100vh!important;max-height:none!important;border:0!important;border-radius:0!important}
.lb-dialog:fullscreen .lb-media{height:calc(100vh - 190px)!important}

/* Firefox verhindert flex/grid overflow an Buttons */
@supports (-moz-appearance:none){
  .lb-dialog,.lb-media,.lb-controls,.lb-topline,.comment-editor{min-width:0}
  .lb-meta button,.lb-meta .button,.choice{max-width:100%;white-space:nowrap}
}

@media(max-width:650px){
  .theme-btn .theme-label{display:none}
  .lightbox{padding:0!important}
  .lb-dialog{width:100vw!important;max-height:none!important;min-height:100dvh!important;border-radius:0!important;grid-template-rows:minmax(320px,58dvh) auto!important}
  .lb-media{height:58dvh!important;min-height:320px!important}
  .lb-controls{padding:12px 12px calc(18px + env(safe-area-inset-bottom))!important}
  .lb-topline{display:grid!important;grid-template-columns:1fr;gap:8px!important}
  .lb-caption{max-width:100%!important}
  .lb-meta{justify-content:flex-start}
  .lb-ratings{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:7px!important}
  .lb-question{grid-column:1/-1!important}
  .lb-ratings .choice{width:100%;min-width:0;padding:9px 6px!important}
  .comment-actions{display:grid;grid-template-columns:1fr 1fr}
  .comment-editor{display:grid!important;grid-template-columns:1fr!important}
  .lb-prev,.lb-next{top:29dvh!important}
  .photo img{max-height:none}
}

/* ===== V11 Großansicht – vollständiges Bild ohne Beschnitt ===== */
.lightbox{padding:10px!important;overflow:hidden!important}
.lb-dialog{
  width:min(1240px,calc(100vw - 20px))!important;height:min(96dvh,920px)!important;max-height:96dvh!important;
  display:flex!important;flex-direction:column!important;overflow:hidden!important
}
.lb-media{flex:1 1 auto!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:hidden!important}
.lb-pan{position:relative!important;width:100%!important;height:100%!important;min-height:0!important;overflow:hidden!important}
.lb-pan img{
  position:absolute!important;inset:0!important;margin:auto!important;display:block!important;width:auto!important;height:auto!important;
  max-width:100%!important;max-height:100%!important;object-fit:scale-down!important;object-position:center!important
}
.lb-controls{flex:0 0 auto!important;max-height:38dvh!important;overflow-y:auto!important;scrollbar-width:thin}
.lb-dialog:fullscreen{height:100dvh!important;max-height:none!important}
.lb-dialog:fullscreen .lb-media{height:auto!important;flex:1 1 auto!important}

.comment-actions button,#saveComment,#deleteComment{
  color:#f5f1e9!important;background:#25262b!important;border:1px solid rgba(255,255,255,.22)!important;
  opacity:1!important;font-weight:600!important
}
#saveComment:hover{background:#33353b!important}
#deleteComment{color:#ffb7bc!important;background:rgba(133,38,48,.26)!important;border-color:rgba(220,91,104,.5)!important}
#deleteComment:hover{background:rgba(155,43,54,.42)!important}

.theme-btn{width:auto!important;min-width:72px!important;font-size:12px!important;padding:9px 10px!important}
.theme-btn .theme-label{display:inline!important}

@media(max-width:650px){
  .lightbox{padding:0!important;overflow:hidden!important}
  .lb-dialog{width:100vw!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important}
  .lb-media{flex:1 1 auto!important;min-height:260px!important}
  .lb-controls{flex:0 0 auto!important;max-height:46dvh!important;padding-bottom:calc(16px + env(safe-area-inset-bottom))!important}
  .lb-pan img{max-width:100%!important;max-height:100%!important}
}
@media(max-width:560px){
  .theme-btn{font-size:12px!important;width:auto!important;height:40px!important}
  .theme-btn:before{content:none!important}
}
@media(max-width:1024px),(hover:none){
  .photo-actions{opacity:1!important;visibility:visible!important;pointer-events:auto!important;transform:none!important}
}

/* ===== V12 Kundenbereich ===== */
.download-open{
  white-space:nowrap;min-height:46px;padding:10px 18px!important;
  background:transparent!important;color:var(--text)!important;
  border:1px solid color-mix(in srgb,var(--gold) 60%,var(--border))!important;
}
.download-open:hover{border-color:var(--gold)!important;color:var(--gold)!important}

/* Großansicht kompakter */
.lb-controls{padding:10px 14px 12px!important;gap:8px!important;max-height:28dvh!important}
.lb-topline{align-items:center!important}
.lb-meta{
  display:flex!important;gap:6px!important;flex-wrap:wrap!important;
  justify-content:flex-end!important;
}
.lb-action{
  color:#f5f1e9!important;background:#25262b!important;
  border:1px solid rgba(255,255,255,.25)!important;
  opacity:1!important;min-height:36px!important;padding:7px 11px!important;
  font-weight:600!important;white-space:nowrap!important;
}
.lb-action:hover{background:#34363b!important;border-color:rgba(255,255,255,.45)!important}
.lb-caption{color:#eee8df!important}
.lb-ratings{margin-top:1px!important}
.comment-status.compact{min-height:0!important;height:auto!important;font-size:11px!important}

/* Download- und Kommentar-Dialog */
.mini-modal{
  position:fixed;inset:0;z-index:1300;display:none;place-items:center;
  padding:18px;background:rgba(0,0,0,.58);backdrop-filter:blur(5px);
}
.mini-modal.open{display:grid}
.mini-modal-card{
  width:min(440px,calc(100vw - 28px));position:relative;
  background:var(--surface);color:var(--text);border:1px solid var(--border);
  border-radius:18px;padding:22px;box-shadow:0 24px 70px rgba(0,0,0,.34);
  display:grid;gap:14px;
}
.mini-modal-card h2{margin:0 36px 2px 0;font-size:22px;color:var(--gold)}
.mini-modal-card label{display:grid;gap:6px;font-size:13px}
.mini-modal-card select,.mini-modal-card textarea{
  width:100%;background:var(--surface2);color:var(--text);border:1px solid var(--border);
  border-radius:11px;padding:11px 12px;font:inherit
}
.mini-close{
  position:absolute;right:12px;top:10px;width:34px;height:34px;border-radius:50%!important;
  padding:0!important;display:grid;place-items:center;background:transparent!important;
  color:var(--text)!important;border:1px solid var(--border)!important;font-size:20px!important
}
.mini-modal-filename{margin:-5px 0 0;color:var(--muted);font-size:12px}
.comment-modal-actions{display:flex;gap:8px}
.comment-modal-actions button{flex:1;min-height:42px}
.danger-soft{color:#d85f67!important;border-color:rgba(216,95,103,.38)!important;background:rgba(216,95,103,.07)!important}

/* Theme-Menü */
.theme-control{position:relative;display:inline-flex}
.theme-menu{
  position:absolute;right:0;top:calc(100% + 8px);z-index:1500;display:none;
  min-width:165px;padding:6px;background:var(--surface);border:1px solid var(--border);
  border-radius:13px;box-shadow:0 14px 36px rgba(0,0,0,.22)
}
.theme-menu.open{display:grid;gap:3px}
.theme-menu button{
  width:100%;background:transparent!important;color:var(--text)!important;border:0!important;
  padding:9px 10px!important;text-align:left;border-radius:9px!important;font-size:12px!important
}
.theme-menu button.active,.theme-menu button:hover{background:color-mix(in srgb,var(--gold) 13%,transparent)!important}

/* Mobile: Aktionsbuttons sichtbar und passend */
@media(max-width:650px){
  .lb-controls{max-height:42dvh!important;padding:9px 10px calc(11px + env(safe-area-inset-bottom))!important}
  .lb-topline{display:grid!important;grid-template-columns:1fr!important;gap:7px!important}
  .lb-meta{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    width:100%!important;justify-content:stretch!important
  }
  .lb-action{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-width:0!important;font-size:11px!important;padding:8px 5px!important}
  .theme-btn{width:42px!important;min-width:42px!important;height:42px!important;padding:0!important;border-radius:50%!important}
  .theme-btn .theme-label{display:none!important}
  .theme-menu{position:fixed;right:10px;top:68px}
  .comment-modal-actions{display:grid;grid-template-columns:1fr 1fr}
}

/* ===== V13 Galerie & Mobile UX ===== */
@media(max-width:650px){
  .theme-btn{
    width:50px!important;min-width:50px!important;height:50px!important;
    border-radius:50%!important;padding:0!important;display:grid!important;place-items:center!important
  }
  .theme-btn .theme-icon{font-size:21px!important;line-height:1!important}
  .theme-btn .theme-label{display:none!important}
}

/* Galerie wie Portfolio: Masonry/Mosaik, kein Bildbeschnitt */
.gallery-grid{
  display:block!important;columns:4 250px!important;column-gap:14px!important;
}
.photo{
  display:inline-block!important;width:100%!important;break-inside:avoid!important;
  margin:0 0 14px!important;background:var(--surface)!important;
  border:1px solid var(--border)!important;border-radius:16px!important;
  overflow:hidden!important;box-shadow:var(--shadow)!important;vertical-align:top!important;
}
.photo-open{
  display:block!important;width:100%!important;padding:0!important;margin:0!important;
  border:0!important;background:transparent!important;cursor:zoom-in!important;border-radius:0!important;
}
.photo-open img{
  display:block!important;width:100%!important;height:auto!important;max-height:none!important;
  object-fit:contain!important;border-radius:0!important;
}
.photo-name{
  padding:9px 12px 11px!important;font-size:11px!important;color:var(--muted)!important;
  overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;background:var(--surface)!important;
}
.rating-indicator{top:8px!important;left:8px!important}
.photo-actions{bottom:38px!important;right:8px!important}
.has-comment{top:8px!important;right:8px!important}

@media(max-width:780px){
  .gallery-grid{columns:2 145px!important;column-gap:10px!important}
  .photo{margin-bottom:10px!important;border-radius:13px!important}
  .photo-name{font-size:10px!important;padding:7px 9px 9px!important}
}
@media(max-width:420px){.gallery-grid{columns:2 130px!important}}

/* Wiederfreigeben ≠ Löschen */
.unlock-selection{
  border-color:rgba(63,138,89,.45)!important;color:#3f8a59!important;background:rgba(63,138,89,.06)!important;
}
.unlock-selection:disabled{opacity:.42!important;cursor:not-allowed!important}

/* Großansicht: Aktionen und Auswahl gut lesbar */
.lb-controls{overflow-y:auto!important;overflow-x:hidden!important}
.lb-topline{width:100%!important;min-width:0!important}
.lb-meta{max-width:100%!important}
.lb-action{
  color:#f8f5ef!important;background:#27292e!important;border-color:rgba(255,255,255,.30)!important;
  opacity:1!important;font-weight:700!important;
}
.lb-ratings .choice{
  opacity:.68!important;color:#f5f1e9!important;background:#24262a!important;
  border:1px solid rgba(255,255,255,.22)!important;font-weight:700!important;
}
.lb-ratings.has-selection .choice:not(.active){opacity:.34!important;color:#d7d2ca!important}
.lb-ratings .choice.active{
  opacity:1!important;color:#14110d!important;border-color:#fff!important;
  box-shadow:0 0 0 2px rgba(255,255,255,.82)!important;
}
.lb-ratings .choice.yes.active{background:#5ebe82!important}
.lb-ratings .choice.maybe.active{background:#e0b643!important}
.lb-ratings .choice.no.active{background:#d95a66!important;color:#fff!important}

/* Zoom/Pan */
.lb-pan{touch-action:none!important;overscroll-behavior:contain!important}
.lb-pan.zoomed{cursor:grab!important}
.lb-pan.dragging{cursor:grabbing!important}
.lb-pan img{
  will-change:transform!important;transform-origin:center center!important;
  user-select:none!important;-webkit-user-drag:none!important;
}

/* Kommentar-Popup definitiv über dem Bild */
.mini-modal{z-index:20000!important}
.mini-modal-card{z-index:20001!important}
body.mini-modal-open{overflow:hidden!important}

@media(max-width:650px){
  .lb-dialog{width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important}
  .lb-media{flex:1 1 auto!important;min-height:0!important}
  .lb-controls{
    flex:0 0 auto!important;max-height:45dvh!important;width:100%!important;box-sizing:border-box!important;
    padding:9px 10px calc(14px + env(safe-area-inset-bottom))!important;
  }
  .lb-topline{display:block!important;width:100%!important}
  .lb-caption{
    display:block!important;width:100%!important;max-width:none!important;margin:0 0 8px!important;padding:0 2px!important;
  }
  .lb-meta{
    width:100%!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;margin:0!important;
  }
  .lb-action{
    width:100%!important;min-width:0!important;max-width:none!important;display:flex!important;
    align-items:center!important;justify-content:center!important;min-height:42px!important;
    padding:8px 6px!important;font-size:12px!important;overflow:visible!important;
  }
  .lb-ratings{
    width:100%!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;margin-top:9px!important;
  }
  .lb-question{grid-column:1/-1!important;margin:0!important;color:#c9c4bc!important}
  .lb-ratings .choice{
    width:100%!important;min-width:0!important;min-height:44px!important;padding:8px 4px!important;font-size:13px!important;
  }
  .lb-prev,.lb-next{width:42px!important;height:42px!important;top:42%!important}
  .mini-modal{padding:10px!important;align-items:center!important}
  .mini-modal-card{
    width:calc(100vw - 20px)!important;max-height:82dvh!important;overflow:auto!important;
    padding:18px!important;border-radius:16px!important;
  }
}

/* ===== V14 Feinschliff Mobilgalerie & Zoom ===== */

/* Alte Pseudo-Icons vollständig deaktivieren – nur das echte Theme-Symbol bleibt. */
.theme-btn:before,.theme-btn::before{content:none!important;display:none!important}
@media(max-width:650px){
  .theme-btn{
    width:54px!important;min-width:54px!important;height:54px!important;
    padding:0!important;border-radius:50%!important;
    display:grid!important;place-items:center!important;font-size:0!important;
  }
  .theme-btn .theme-icon{
    display:block!important;font-size:25px!important;line-height:1!important;
    min-width:0!important;margin:0!important;
  }
  .theme-btn .theme-label{display:none!important}
}

/* Bewertungsleiste auf kleinen Galeriekarten deutlich dezenter. */
@media(max-width:1024px){
  .photo-actions{
    position:absolute!important;
    left:auto!important;right:7px!important;bottom:34px!important;
    width:auto!important;
    padding:4px 5px!important;
    gap:4px!important;
    border-radius:999px!important;
    background:rgba(17,17,18,.56)!important;
    backdrop-filter:blur(7px)!important;
    box-shadow:0 4px 14px rgba(0,0,0,.15)!important;
  }
  .photo-actions .rate{
    width:21px!important;height:21px!important;
    border-width:2px!important;
    box-shadow:none!important;
  }
  .photo-actions .rate:not(:focus-visible){outline:none!important}
}
@media(max-width:430px){
  .photo-actions{
    right:6px!important;bottom:30px!important;
    padding:3px 4px!important;gap:3px!important;
  }
  .photo-actions .rate{width:19px!important;height:19px!important}
  .rating-indicator{width:11px!important;height:11px!important;border-width:1.5px!important}
}

/* Großansicht: Aktionen niemals mehr absolut/außerhalb positionieren. */
.lb-meta{
  position:static!important;
  inset:auto!important;
  left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
}
.lb-controls{
  position:relative!important;
  background:#111216!important;
  border-top:1px solid rgba(255,255,255,.08)!important;
}
.lb-action{
  text-shadow:none!important;
  color:#f6f2eb!important;
  background:#25272c!important;
  border:1px solid rgba(255,255,255,.22)!important;
}
.lb-action:hover{background:#303239!important}

/* Bild selbst ist die Zoomsteuerung. */
.lb-pan.can-zoom img{cursor:zoom-in!important}
.lb-pan.zoomed img{cursor:grab!important}
.lb-pan.dragging img{cursor:grabbing!important}
.lb-pan img{transition:none!important}

/* Mobile Großansicht wie eine hochwertige Viewer-App: Foto oben, schlanke Leiste unten. */
@media(max-width:650px){
  .lightbox{background:#08090b!important}
  .lb-dialog{
    display:flex!important;flex-direction:column!important;
    width:100vw!important;height:100dvh!important;
    max-width:none!important;max-height:none!important;
    border:0!important;border-radius:0!important;background:#08090b!important;
  }
  .lb-media{
    flex:1 1 auto!important;
    min-height:0!important;height:auto!important;
    background:#050607!important;
    border:0!important;
  }
  .lb-pan{width:100%!important;height:100%!important}
  .lb-pan img{
    max-width:100%!important;max-height:100%!important;
    width:auto!important;height:auto!important;
    object-fit:contain!important;
  }
  .lb-controls{
    flex:0 0 auto!important;
    width:100%!important;max-height:none!important;
    overflow:visible!important;
    padding:10px 12px calc(12px + env(safe-area-inset-bottom))!important;
    background:#121318!important;
    border-radius:18px 18px 0 0!important;
    box-shadow:0 -8px 28px rgba(0,0,0,.22)!important;
  }
  .lb-topline{
    display:block!important;width:100%!important;
    margin:0!important;padding:0!important;
  }
  .lb-caption{
    width:100%!important;max-width:none!important;
    margin:0 0 8px!important;padding:0 2px!important;
    font-size:12px!important;color:#cfc9c0!important;
  }
  .lb-meta{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    width:100%!important;gap:6px!important;
    margin:0!important;padding:0!important;
  }
  .lb-meta .lb-action{
    width:100%!important;min-width:0!important;
    min-height:38px!important;padding:7px 4px!important;
    border-radius:11px!important;font-size:11px!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
  }
  .lb-ratings{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    width:100%!important;gap:6px!important;
    margin:9px 0 0!important;padding:0!important;
  }
  .lb-question{
    grid-column:1/-1!important;
    font-size:11px!important;color:#aaa49c!important;
    margin:0 0 1px!important;
  }
  .lb-ratings .choice{
    width:100%!important;min-width:0!important;
    min-height:38px!important;padding:6px 3px!important;
    border-radius:12px!important;
    font-size:12px!important;font-weight:650!important;
    opacity:.78!important;color:#ddd8d0!important;
  }
  .lb-ratings.has-selection .choice:not(.active){
    opacity:.38!important;color:#aaa59d!important;
  }
  .lb-ratings .choice.active{
    opacity:1!important;transform:none!important;
    box-shadow:0 0 0 2px rgba(255,255,255,.76)!important;
  }
  .lb-prev,.lb-next{
    top:50%!important;transform:translateY(-50%)!important;
    width:40px!important;height:40px!important;
    background:rgba(12,13,15,.70)!important;
  }
  .lb-prev{left:8px!important}.lb-next{right:8px!important}
  .lb-close{
    position:fixed!important;
    right:10px!important;top:calc(env(safe-area-inset-top) + 10px)!important;
    width:42px!important;height:42px!important;
    z-index:21000!important;
  }
}

/* Falls kein Download erlaubt ist, passen zwei Aktionen automatisch sauber in die Zeile. */
@media(max-width:650px){
  .lb-meta:has(.lb-action:nth-child(2):last-child){grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* Kommentar-Dialog garantiert über dem Viewer – auch nach DOM-Umsortierung. */
.mini-modal{z-index:50000!important}
.mini-modal-card{z-index:50001!important}

/* ===== V15 minimalistische Großansicht ===== */

/* Der große feste Fußbereich verschwindet. Controls schweben über dem Bild. */
.lb-dialog{position:relative!important}
.lb-controls{
  position:absolute!important;
  inset:0!important;
  width:100%!important;height:100%!important;
  max-height:none!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  overflow:visible!important;
  pointer-events:none!important;
  z-index:12!important;
}
.lb-topline{
  position:absolute!important;
  inset:0!important;
  display:block!important;
  width:100%!important;height:100%!important;
  pointer-events:none!important;
}
.lb-caption{
  position:absolute!important;
  left:14px!important;top:14px!important;
  width:auto!important;max-width:55%!important;
  margin:0!important;padding:7px 10px!important;
  color:#f6f2eb!important;
  background:rgba(12,13,15,.62)!important;
  border:1px solid rgba(255,255,255,.12)!important;
  border-radius:9px!important;
  backdrop-filter:blur(7px)!important;
  font-size:11px!important;
  line-height:1.2!important;
  pointer-events:none!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

/* Aktionsbuttons schweben knapp über der Ampel. */
.lb-meta{
  position:absolute!important;
  left:50%!important;right:auto!important;
  bottom:64px!important;top:auto!important;
  transform:translateX(-50%)!important;
  width:auto!important;max-width:calc(100% - 24px)!important;
  display:flex!important;
  align-items:center!important;justify-content:center!important;
  gap:7px!important;
  margin:0!important;padding:0!important;
  pointer-events:auto!important;
  transition:opacity .22s ease,transform .22s ease!important;
}
.lightbox.actions-hidden .lb-meta{
  opacity:0!important;
  pointer-events:none!important;
  transform:translate(-50%,8px)!important;
}
.lb-action{
  min-height:38px!important;
  min-width:0!important;width:auto!important;
  padding:7px 12px!important;
  border-radius:11px!important;
  font-size:11px!important;font-weight:650!important;
  color:#f5f1e9!important;
  background:rgba(24,25,29,.80)!important;
  border:1px solid rgba(255,255,255,.20)!important;
  backdrop-filter:blur(8px)!important;
  box-shadow:0 5px 18px rgba(0,0,0,.20)!important;
  white-space:nowrap!important;
}

/* Die Ampel bleibt dauerhaft als schmale, gut bedienbare Leiste unten. */
.lb-ratings{
  position:absolute!important;
  left:50%!important;right:auto!important;
  bottom:12px!important;top:auto!important;
  transform:translateX(-50%)!important;
  display:flex!important;
  align-items:center!important;justify-content:center!important;
  gap:6px!important;
  width:auto!important;max-width:calc(100% - 20px)!important;
  margin:0!important;padding:5px!important;
  border-radius:14px!important;
  background:rgba(20,21,24,.74)!important;
  border:1px solid rgba(255,255,255,.12)!important;
  backdrop-filter:blur(9px)!important;
  box-shadow:0 6px 20px rgba(0,0,0,.20)!important;
  pointer-events:auto!important;
}
.lb-question{
  margin:0 4px!important;
  font-size:10px!important;
  color:#c5c0b8!important;
  white-space:nowrap!important;
}
.lb-ratings .choice{
  min-width:74px!important;
  min-height:36px!important;
  padding:6px 12px!important;
  border-radius:10px!important;
  font-size:11px!important;
  line-height:1!important;
}

/* Pfeile und Schließen bleiben dezent über dem Bild. */
.lb-close,.lb-prev,.lb-next{
  z-index:20!important;
  pointer-events:auto!important;
}

/* Das Bild füllt jetzt den kompletten Viewer aus. */
.lb-media{
  flex:1 1 auto!important;
  width:100%!important;height:100%!important;
  min-height:0!important;max-height:none!important;
  background:#050607!important;
}
.lb-pan{width:100%!important;height:100%!important}
.lb-pan img{
  max-width:100%!important;max-height:100%!important;
  width:auto!important;height:auto!important;
  object-fit:contain!important;
}

/* Cursor erklärt die direkte Zoomsteuerung. */
.lb-pan.can-zoom img{cursor:zoom-in!important}
.lb-pan.zoomed img{cursor:grab!important}
.lb-pan.dragging img{cursor:grabbing!important}

/* Mobile: wirklich nichts mehr seitlich abschneiden. */
@media(max-width:650px){
  .lb-dialog{
    width:100vw!important;height:100dvh!important;
    max-width:none!important;max-height:none!important;
    border:0!important;border-radius:0!important;
    overflow:hidden!important;
  }
  .lb-media{width:100vw!important;height:100dvh!important}
  .lb-caption{
    left:10px!important;top:calc(env(safe-area-inset-top) + 10px)!important;
    max-width:45%!important;
    padding:6px 8px!important;font-size:10px!important;
  }
  .lb-meta{
    bottom:64px!important;
    max-width:calc(100vw - 20px)!important;
    gap:5px!important;
  }
  .lb-action{
    min-height:36px!important;
    padding:6px 9px!important;
    font-size:10px!important;
    border-radius:10px!important;
  }
  .lb-ratings{
    bottom:calc(8px + env(safe-area-inset-bottom))!important;
    width:calc(100vw - 20px)!important;
    max-width:none!important;
    gap:5px!important;
    padding:5px!important;
    border-radius:13px!important;
  }
  .lb-question{display:none!important}
  .lb-ratings .choice{
    flex:1 1 0!important;
    min-width:0!important;width:auto!important;
    min-height:38px!important;
    padding:6px 3px!important;
    font-size:11px!important;
  }
  .lb-prev,.lb-next{
    width:38px!important;height:38px!important;
    top:50%!important;transform:translateY(-50%)!important;
  }
  .lb-prev{left:7px!important}.lb-next{right:7px!important}
  .lb-close{
    position:fixed!important;
    right:9px!important;
    top:calc(env(safe-area-inset-top) + 9px)!important;
    width:40px!important;height:40px!important;
  }
}

/* Sehr kleine Displays: Aktionslabels kompakter, aber vollständig sichtbar. */
@media(max-width:390px){
  .lb-meta{gap:4px!important}
  .lb-action{padding:6px 7px!important;font-size:9px!important}
  .lb-ratings{width:calc(100vw - 14px)!important}
}

/* ===== V16 Filter + Mobile Viewer ===== */

/* Wichtig: Masonry darf das hidden-Attribut nicht überschreiben. */
.photo[hidden]{display:none!important}

/* Mobile Aktionsbuttons als reine Icons. */
.lb-action-icon{display:inline-block;line-height:1}
.lb-action-label{display:inline}
@media(max-width:650px){
  .lb-meta{
    display:flex!important;
    width:auto!important;
    max-width:none!important;
    left:50%!important;
    transform:translateX(-50%)!important;
    gap:8px!important;
  }
  .lb-action{
    width:42px!important;
    min-width:42px!important;
    height:42px!important;
    min-height:42px!important;
    padding:0!important;
    border-radius:50%!important;
    display:grid!important;
    place-items:center!important;
  }
  .lb-action-icon{
    font-size:18px!important;
    line-height:1!important;
  }
  .lb-action-label{
    position:absolute!important;
    width:1px!important;height:1px!important;
    overflow:hidden!important;
    clip:rect(0 0 0 0)!important;
    white-space:nowrap!important;
  }
}

/* Desktop: linke Maustaste signalisiert Zoom/Pan. */
.lb-pan.can-zoom img{cursor:zoom-in!important}
.lb-pan.zoomed img{cursor:grab!important}
.lb-pan.dragging img{cursor:grabbing!important}

/* ===== V17 Filter + mobile Aktionsicons ===== */

/* Filter muss auch gegen ältere Masonry-Regeln gewinnen. */
.gallery-grid .photo[hidden],
.gallery-grid article.photo[hidden]{
  display:none!important;
  visibility:hidden!important;
}

/* Mobile Viewer-Aktionen immer waagerecht nebeneinander. */
@media(max-width:650px){
  .lb-meta{
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:center!important;
    flex-wrap:nowrap!important;
    width:auto!important;
    max-width:calc(100vw - 24px)!important;
    left:50%!important;
    right:auto!important;
    transform:translateX(-50%)!important;
    gap:8px!important;
  }
  .lb-action{
    flex:0 0 42px!important;
    width:42px!important;
    min-width:42px!important;
    max-width:42px!important;
    height:42px!important;
    min-height:42px!important;
    padding:0!important;
    border-radius:50%!important;
  }
}

/* Desktop-Zoom klar über Linksklick / Linkziehen. */
.lb-pan.can-zoom img{cursor:zoom-in!important}
.lb-pan.zoomed img{cursor:grab!important}
.lb-pan.dragging img{cursor:grabbing!important}

/* ===== V18 Galerie: Reihen statt Spalten-Masonry ===== */
.gallery-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
  columns:auto!important;
  column-gap:normal!important;
  align-items:start!important;
}
.gallery-grid .photo{
  display:block!important;
  width:100%!important;
  margin:0!important;
  break-inside:auto!important;
  min-width:0!important;
}
.gallery-grid .photo[hidden]{display:none!important}
.photo-open{
  width:100%!important;
  aspect-ratio:4/3!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  background:color-mix(in srgb,var(--surface2) 82%,#000 18%)!important;
}
.photo-open img{
  width:100%!important;height:100%!important;
  object-fit:contain!important;
}
.photo-name{min-height:34px!important}
@media(max-width:1100px){.gallery-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:720px){
  .gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
  .photo-name{display:none!important}
  .photo-open{aspect-ratio:1/1!important}
}
@media(max-width:390px){.gallery-grid{gap:7px!important}}

/* Filter „Mit Kommentar“ als klarer eigener Modus */
.filterbar button[data-filter="comment"]{border-style:dashed!important}
.filterbar button[data-filter="comment"].active{border-style:solid!important}

/* Hilfe / Änderungswunsch */
.toolbar-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.help-open{
  width:44px!important;height:44px!important;min-width:44px!important;
  padding:0!important;border-radius:50%!important;font-size:20px!important;font-weight:700!important;
}
.change-request-open{margin-top:10px!important}
.help-list{display:grid;grid-template-columns:1fr 1fr;gap:8px;font-size:13px}
.help-list span{padding:8px 10px;border:1px solid var(--border);border-radius:9px;background:var(--surface2)}
@media(max-width:500px){.help-list{grid-template-columns:1fr}}

/* Kommentarindikator in Großansicht */
.lb-caption-wrap{
  position:absolute!important;left:14px!important;top:14px!important;
  display:flex!important;align-items:center!important;gap:5px!important;
  pointer-events:auto!important;z-index:18!important;
}
.lb-caption-wrap .lb-caption{
  position:static!important;inset:auto!important;
  max-width:min(48vw,380px)!important;
}
.lb-comment-badge{
  width:34px!important;height:34px!important;padding:0!important;
  display:grid!important;place-items:center!important;
  border-radius:50%!important;
  color:#fff!important;background:rgba(24,25,29,.80)!important;
  border:1px solid rgba(255,255,255,.20)!important;
  backdrop-filter:blur(8px)!important;
}
.lb-comment-badge[hidden]{display:none!important}
@media(max-width:650px){
  .lb-caption-wrap{left:10px!important;top:calc(env(safe-area-inset-top) + 10px)!important}
  .lb-caption-wrap .lb-caption{max-width:38vw!important}
  .lb-comment-badge{width:32px!important;height:32px!important}
}

/* Löschen im Kommentarfenster klar lesbar */
.comment-modal-actions .danger-soft,#deleteComment{
  color:#8d202c!important;
  background:#f6dde0!important;
  border:1px solid #d88a93!important;
  opacity:1!important;
  font-weight:700!important;
}
[data-theme=dark] .comment-modal-actions .danger-soft,
[data-theme=dark] #deleteComment{
  color:#ffbdc3!important;background:#541c24!important;border-color:#a94d58!important;
}

/* Theme-Umschalter überall nur als Icon */
.theme-btn,.theme-toggle{
  width:46px!important;min-width:46px!important;height:46px!important;
  padding:0!important;border-radius:50%!important;
  display:grid!important;place-items:center!important;
}
.theme-btn .theme-label,.theme-toggle .theme-label{display:none!important}
.theme-btn .theme-icon,.theme-toggle .theme-icon{font-size:21px!important;line-height:1!important}
.theme-btn:before,.theme-btn::before,.theme-toggle:before,.theme-toggle::before{content:none!important;display:none!important}

/* Admin-Galeriestatistik */
.gallery-subtabs{
  display:flex;gap:7px;margin:0 0 14px;padding-bottom:10px;border-bottom:1px solid var(--border)
}
.gallery-subtabs button{background:transparent!important;color:var(--text)!important;border:1px solid var(--border)!important}
.gallery-subtabs button.active{background:var(--gold)!important;color:#17130d!important;border-color:var(--gold)!important}
.gallery-tab-panel{display:none}
.gallery-tab-panel.active{display:block}
.gallery-stats-cards{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px
}
.gallery-stats-cards>div{
  padding:15px;border:1px solid var(--border);border-radius:13px;background:var(--surface2);display:grid;gap:3px
}
.gallery-stats-cards strong{font-size:28px;color:var(--gold)}
.gallery-stats-cards span{font-size:11px;color:var(--muted)}
.stats-chart-card,.stats-recent{padding:15px;border:1px solid var(--border);border-radius:13px;margin-top:12px}
.stats-chart-card h3,.stats-recent h3{margin:0 0 14px}
.stats-chart{height:190px;display:grid;grid-template-columns:repeat(30,1fr);align-items:end;gap:3px;border-bottom:1px solid var(--border);padding-top:8px}
.stats-day{height:100%;display:flex;align-items:flex-end;justify-content:center;gap:1px}
.stats-day .bar{width:40%;min-height:1px;border-radius:3px 3px 0 0}
.stats-day .views{background:#5d956b}
.stats-day .opens{background:var(--gold)}
.stats-legend{display:flex;gap:18px;font-size:11px;color:var(--muted);margin-top:8px}
.stats-legend span:first-child{color:#5d956b}.stats-legend span:last-child{color:var(--gold)}
.stats-event{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-top:1px solid var(--border)}
.stats-event small{color:var(--muted);white-space:nowrap}
@media(max-width:700px){
  .gallery-stats-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stats-chart{height:135px;gap:2px}
  .stats-event{display:grid;gap:2px}
}

/* Kontakt-Nachrichten im Dashboard dürfen umbrechen */
.notification small{white-space:normal!important;line-height:1.45}

.fullscreen-hint{
  position:absolute;left:50%;top:18px;transform:translateX(-50%) translateY(-8px);
  z-index:60000;padding:8px 12px;border-radius:999px;
  background:rgba(12,13,15,.82);color:#fff;font-size:11px;
  opacity:0;pointer-events:none;transition:.2s;white-space:nowrap
}
.fullscreen-hint.show{opacity:1;transform:translateX(-50%) translateY(0)}
.lb-dialog:fullscreen .lb-action{z-index:60001!important}

/* ===== V19: dichtes, zeilenweises Justified-Mosaik =====
   Reihenfolge bleibt DOM-Reihenfolge: links -> rechts -> nächste Zeile.
   Das Seitenverhältnis jeder Aufnahme wird per JS als --photo-ratio gesetzt. */
.gallery-grid{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:flex-start!important;
  gap:5px!important;
  columns:auto!important;
  grid-template-columns:none!important;
}
.gallery-grid::after{
  content:"";
  flex:999 1 260px;
  height:0;
}
.gallery-grid .photo{
  --photo-ratio:1.45;
  position:relative!important;
  flex:var(--photo-ratio) 1 calc(var(--photo-ratio) * 210px)!important;
  width:auto!important;
  min-width:145px!important;
  max-width:100%!important;
  margin:0!important;
  border-radius:0!important;
  border:0!important;
  box-shadow:none!important;
  overflow:hidden!important;
  background:#111!important;
}
.gallery-grid .photo[hidden]{display:none!important}
.gallery-grid .photo-open{
  display:block!important;
  width:100%!important;
  aspect-ratio:var(--photo-ratio)!important;
  height:auto!important;
  overflow:hidden!important;
  background:#090909!important;
}
.gallery-grid .photo-open img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  background:#090909!important;
}
.gallery-grid .photo-name{
  position:absolute!important;
  left:0!important;right:0!important;bottom:0!important;
  min-height:0!important;
  padding:22px 9px 7px!important;
  color:#fff!important;
  background:linear-gradient(transparent,rgba(0,0,0,.66))!important;
  opacity:0!important;
  transform:translateY(3px)!important;
  transition:.18s ease!important;
  pointer-events:none!important;
  font-size:10px!important;
}
.gallery-grid .photo:hover .photo-name{opacity:1!important;transform:none!important}
.gallery-grid .rating-indicator{
  top:7px!important;left:7px!important;
  z-index:4!important;
}
.gallery-grid .has-comment{
  top:7px!important;right:7px!important;z-index:5!important;
}
.gallery-grid .photo-actions{
  bottom:7px!important;right:7px!important;z-index:5!important;
}

@media(max-width:900px){
  .gallery-grid{gap:4px!important}
  .gallery-grid .photo{
    flex-basis:calc(var(--photo-ratio) * 165px)!important;
    min-width:115px!important;
  }
  .gallery-grid::after{flex-basis:180px}
}
@media(max-width:600px){
  .gallery-grid{gap:3px!important}
  .gallery-grid .photo{
    flex-basis:calc(var(--photo-ratio) * 132px)!important;
    min-width:90px!important;
  }
  .gallery-grid::after{flex-basis:145px}
  .gallery-grid .photo-name{display:none!important}
}

/* V19: Änderungswünsche vollständig lesbar */
.notification-message{
  margin:8px 0 0!important;
  padding:9px 11px!important;
  max-width:760px!important;
  color:var(--text)!important;
  background:var(--surface2)!important;
  border:1px solid var(--border)!important;
  border-radius:9px!important;
  line-height:1.5!important;
  white-space:normal!important;
}
.stats-event.contact-event{
  align-items:flex-start!important;
  padding:12px!important;
  margin:6px 0!important;
  border:1px solid color-mix(in srgb,var(--gold) 38%,var(--border))!important;
  border-radius:10px!important;
  background:color-mix(in srgb,var(--gold) 5%,var(--surface))!important;
}
.stats-message{
  margin:7px 0 0!important;
  color:var(--text)!important;
  line-height:1.5!important;
  white-space:normal!important;
  max-width:760px!important;
}

/* ===== V21 Preisverwaltung ===== */
.price-admin-intro{display:grid;gap:14px}
.price-section-add{align-items:end}
.price-admin-sections{display:grid;gap:14px}
.price-admin-section>summary strong{font-size:18px}
.price-admin-section-body{padding-top:14px}
.price-section-settings{
  grid-template-columns:minmax(180px,1fr) 180px auto auto!important;
  align-items:end;
  margin-bottom:12px;
}
.inline-add{
  display:grid;
  grid-template-columns:minmax(220px,1fr) auto;
  gap:8px;
  align-items:end;
  margin:12px 0 18px;
}
.price-admin-subsection{
  border:1px solid var(--border);
  border-radius:14px;
  padding:13px;
  margin:12px 0;
  background:color-mix(in srgb,var(--surface2) 52%,transparent);
}
.subsection-head{
  display:grid;
  grid-template-columns:minmax(200px,1fr) auto auto;
  gap:8px;
  margin-bottom:12px;
}
.price-admin-items{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
  gap:10px;
}
.price-item-editor,.price-item-add{
  display:grid;
  gap:9px;
  padding:13px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface);
}
.price-item-add{margin-top:12px}
.price-item-add h4{margin:0;color:var(--gold);font-size:17px}
.price-item-editor .grid-form,
.price-item-add .grid-form{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.price-item-editor .wide,
.price-item-add .wide{grid-column:1/-1}
@media(max-width:760px){
  .price-section-settings,.subsection-head,.inline-add{
    grid-template-columns:1fr!important;
  }
  .price-admin-items{grid-template-columns:1fr}
  .price-item-editor .grid-form,.price-item-add .grid-form{grid-template-columns:1fr}
  .price-item-editor .wide,.price-item-add .wide{grid-column:auto}
}

/* ===== V22 Preisverwaltung: keine überlappenden Felder ===== */
.price-admin-items{
  grid-template-columns:1fr!important;
}
.price-item-editor,
.price-item-add{
  min-width:0!important;
  overflow:hidden!important;
}
.price-item-editor .grid-form,
.price-item-add .grid-form{
  display:grid!important;
  grid-template-columns:minmax(220px,2fr) minmax(120px,.8fr) minmax(130px,.8fr) minmax(230px,1.6fr)!important;
  gap:10px!important;
  align-items:end!important;
}
.price-item-editor .grid-form label,
.price-item-add .grid-form label{
  min-width:0!important;
}
.price-item-editor input,
.price-item-editor select,
.price-item-editor textarea,
.price-item-add input,
.price-item-add select,
.price-item-add textarea{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
.price-item-editor .wide,
.price-item-add .wide{
  grid-column:1/-1!important;
}
@media(max-width:1050px){
  .price-item-editor .grid-form,
  .price-item-add .grid-form{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:650px){
  .price-item-editor .grid-form,
  .price-item-add .grid-form{
    grid-template-columns:1fr!important;
  }
  .price-item-editor .wide,
  .price-item-add .wide{grid-column:auto!important}
}

/* ===== V23 Firefox / Admin / Kundengalerie ===== */

/* Firefox: Loginbox immer exakt mittig mit identischem Rand links/rechts */
.panel.narrow{
  width:min(520px,calc(100% - 36px))!important;
  max-width:520px!important;
  margin-left:auto!important;
  margin-right:auto!important;
  box-sizing:border-box!important;
}
@media(max-width:650px){
  .panel.narrow{width:calc(100% - 20px)!important}
}

/* Kundengalerie: Justified-Reihen bekommen saubere, identische Zeilenhöhen.
   Mobile behält den bisherigen kompakten Aufbau. */
@media(min-width:701px){
  .gallery-grid{
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:flex-start!important;
    gap:6px!important;
  }
  .gallery-grid .photo{
    margin:0!important;
    min-width:0!important;
    max-width:100%!important;
  }
  .gallery-grid .photo-open{
    aspect-ratio:auto!important;
  }
}
@media(min-width:701px) and (max-width:1050px){
  .gallery-grid{gap:5px!important}
}

/* Kein grauer Punkt für unbewertete Bilder. Bewertete Punkte filigraner. */
.photo[data-rating="none"] .rating-indicator{display:none!important}
.photo:not([data-rating="none"]) .rating-indicator{
  border:1px solid rgba(255,255,255,.92)!important;
  box-shadow:0 0 6px rgba(0,0,0,.75)!important;
}

/* Kein Treffer beim Filtern */
.filter-empty{
  margin:18px 0 6px;
  padding:18px;
  text-align:center;
  color:var(--muted);
  border:1px dashed var(--border);
  border-radius:14px;
  background:color-mix(in srgb,var(--surface) 88%,transparent);
}
.filter-empty[hidden]{display:none!important}

/* Filter Kommentar wieder als kombinierbarer Filter */
.filterbar button[data-filter="comment"]{border-style:solid!important}

/* Seitentexte nach Seiten unterteilt */
.texts-admin>.editor-form{gap:10px}
.text-page-section{
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface2);
  overflow:hidden;
}
.text-page-section>summary{
  cursor:pointer;
  padding:13px 15px;
  font-weight:600;
  font-size:15px;
  list-style:none;
}
.text-page-section>summary::-webkit-details-marker{display:none}
.text-page-section>summary:after{
  content:"＋";
  float:right;
  color:var(--gold);
}
.text-page-section[open]>summary:after{content:"−"}
.text-page-body{
  display:grid;
  gap:11px;
  padding:4px 15px 15px;
  border-top:1px solid var(--border);
}
.save-texts{
  position:sticky;
  bottom:12px;
  z-index:30;
  box-shadow:0 8px 25px rgba(0,0,0,.20);
}

/* Preisverwaltung: Hauptbereiche zu, Einträge kleiner und zwei nebeneinander */
.price-admin-items{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
}
.price-item-editor{
  padding:11px!important;
  gap:7px!important;
}
.price-item-editor .grid-form,
.price-item-add .grid-form{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
}
.price-item-editor textarea{min-height:76px}
.price-admin-section>summary{cursor:pointer}
@media(max-width:1050px){
  .price-admin-items{grid-template-columns:1fr!important}
}
@media(max-width:650px){
  .price-item-editor .grid-form,
  .price-item-add .grid-form{grid-template-columns:1fr!important}
}

/* Backup-Sperre klar von Freigabe und Löschen unterscheiden */
.lock-selection{
  color:#8a5d14!important;
  border-color:rgba(201,166,101,.6)!important;
  background:rgba(201,166,101,.09)!important;
}
.lock-selection:disabled{opacity:.42!important}

/* Nachrichtlicher Hinweis für Unterkategorien/Preise bleibt kompakt */
.price-admin-subsection{overflow:hidden!important}

/* ===== V24 Kundengalerie Bedienbarkeit ===== */
.toolbar,
.filterbar,
.toolbar-actions,
.gallery-grid,
.gallery-grid .photo,
.gallery-grid .photo-open,
.gallery-grid .photo-actions,
.gallery-grid .rate{
  pointer-events:auto!important;
}
.gallery-grid{position:relative!important;z-index:1!important}
.toolbar{position:relative!important;z-index:8!important}
.gallery-grid .photo-open{cursor:pointer!important}

/* Auf Tablet/Desktop bewusst größere Bilder, Mobil bleibt unverändert kompakt. */
@media(min-width:701px){
  .gallery-grid{gap:7px!important}
}
@media(min-width:701px) and (max-width:1050px){
  .gallery-grid{gap:6px!important}
}

/* ===== V25 Admin / Kundengalerie ===== */

/* Portfolioverwaltung auf großen Displays dreispaltig */
.editor-cards{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
  align-items:start!important;
}
.editor-card{
  min-width:0!important;
  width:auto!important;
}
.editor-card img{
  width:100%!important;
  height:190px!important;
  object-fit:contain!important;
  background:var(--surface2)!important;
}
@media(max-width:1150px){
  .editor-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:720px){
  .editor-cards{grid-template-columns:1fr!important}
}

/* Kundengalerie: keine künstliche Restfläche am Ende kompletter Reihen */
@media(min-width:701px){
  .gallery-grid::after{display:none!important}
}

/* Kunden-Footer ebenfalls kompakter */
.customer-footer{
  padding:18px 12px 22px!important;
  font-size:10px!important;
  line-height:1.45!important;
}

/* ===== V26 Filteranzahl und Viewer-Kommentar ===== */
.filterbar{
  align-items:center!important;
}
.filter-count{
  display:inline-flex;
  align-items:center;
  min-height:38px;
  padding:0 10px;
  color:var(--muted);
  font-size:11px;
  white-space:nowrap;
  border-right:1px solid var(--border);
  margin-right:2px;
}
.lb-comment-overlay{
  position:absolute;
  left:50%;
  bottom:110px;
  transform:translateX(-50%);
  max-height:32%;
  overflow:auto;
  z-index:15;
  padding:12px 15px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:12px;
  background:rgba(12,13,15,.54);
  color:#fff;
  font-size:12px;
  line-height:1.55;
  white-space:pre-wrap;
  backdrop-filter:blur(1px);
  box-shadow:0 10px 30px rgba(0,0,0,.24);
  pointer-events:auto;
}
.lb-comment-overlay[hidden]{display:none!important}
#toggleViewerComment.active{
  border-color:rgba(201,166,101,.8)!important;
  background:rgba(201,166,101,.22)!important;
}
#toggleViewerComment:disabled{
  opacity:.38!important;
  cursor:not-allowed!important;
}
@media(max-width:650px){
  .filter-count{
    width:100%;
    min-height:28px;
    padding:0 2px 4px;
    border-right:0;
    border-bottom:1px solid var(--border);
    margin:0 0 4px;
  }
  .lb-comment-overlay{
    bottom:62px;
    width:calc(100% - 28px);
    max-height:28%;
    padding:10px 12px;
    font-size:12px;
  }
}

/* V27: Portfolio Drag-and-drop */
.portfolio-order-form{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:14px 0;padding:13px 16px;background:var(--surface);border:1px solid var(--border);border-radius:15px}
.portfolio-order-form p{margin:0;color:var(--muted)}
.portfolio-sort-item{position:relative;transition:transform .16s ease,opacity .16s ease,box-shadow .16s ease}
.portfolio-sort-item.dragging{opacity:.45;transform:scale(.98);box-shadow:none}
.drag-handle{margin:-8px -8px 4px;padding:8px 10px;border-radius:10px;background:var(--surface2);color:var(--muted);font-size:12px;font-weight:600;letter-spacing:.4px;cursor:grab;user-select:none}
.drag-handle:active{cursor:grabbing}
