body:has(.gallery-main) { background: #000; }
.gallery-main { background: #000; position: relative; isolation: isolate; min-height: 100vh; }
.gallery-main::before {
  content: ''; position: fixed; inset: 65px 0 0 238px; pointer-events: none; z-index: -1;
  background: url('/static/home-ribbon-v2.png') right 180px / min(70vw,950px) auto no-repeat;
  opacity: .65;
}
.gallery-main .topbar { background: #14101499; backdrop-filter: blur(22px); }
.gallery-main .my-gallery { padding: 20px; border: 1px solid #ffffff25;
  border-top-color: #ffffff4a; border-radius: 24px; background: #1410144a;
  backdrop-filter: none; -webkit-backdrop-filter: none; }
.gallery-main .gallery-tabs { border-color: #ffffff24; }
.gallery-main .gallery-story { border: 1px solid #ffffff22; background: #15151580; }
.gallery-main .gallery-story:hover { box-shadow: 0 0 0 2px #e33232,0 10px 28px #0005; }
.gallery-delete { border-color: #e3323270; color: #ff9090 !important; }
.gallery-delete-confirm { border: 1px solid #e3323270; border-radius: 12px; padding: 14px; background: #210d0db3; }
.gallery-delete-confirm p { margin-top: 0; color: #fafafa; }
.gallery-delete-confirm .btn { margin: 4px; }
.gallery-file-error { padding: 24px; color: #ccc; }
@media(max-width:800px) { .gallery-main::before { inset-inline-start: 0; background-size: 700px auto; background-position: 45% 230px; opacity: .5; } }
@media(max-width:600px) { .gallery-main .my-gallery { padding: 12px; border-radius: 18px; } }
@media(prefers-reduced-motion:no-preference) {
  html { scroll-behavior: auto; }
  .btn, .nav button, .dash-shortcuts>button {
    transition: background-color .15s ease, border-color .15s ease;
  }
  .btn:active { transform: translateY(1px); }
  dialog[open] { animation: dialog-arrive .2s ease-out; }
  @keyframes dialog-arrive { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
}
/* Avoid per-card blur and scaling while scrolling large media grids. */
.gallery-story, .tool-card.editorial-module, .tool-card.editorial-module:hover {
  transform: none; transition: border-color .15s ease;
}
.editorial-cat-badge { backdrop-filter: none; background: #171717ed; }
@media(prefers-reduced-motion:no-preference) {
  .gallery-media-kind, .thumb-play { transition: opacity .18s ease, transform .18s ease; }
  .gallery-story:hover .gallery-media-kind, .dash-creation:hover .thumb-play { transform: translateY(-2px); }
  .gallery-story:focus-visible, .dash-creation:focus-visible { outline: 2px solid #e33232; outline-offset: 3px; }
  .gallery-story:hover { border-color: #ff6262; }
  .gallery-story img, .creation-thumb img { transition: opacity .2s ease; }
  .gallery-story:hover img, .dash-creation:hover img { opacity: .92; }
}
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
