:root {
  --black: #0c0b0a;
  --panel: #171412;
  --paper: #f4f1e9;
  --orange: #f36a27;
  --muted: #b6b1a7;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--paper);
  background-color: var(--black);
  background-image:
    radial-gradient(ellipse at 5% 43%, rgba(137, 65, 29, .38), transparent 39%),
    radial-gradient(ellipse at 91% 10%, rgba(255, 255, 255, .045), transparent 34%),
    repeating-linear-gradient(105deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 4px);
  font-family: "Inter", Arial, sans-serif;
}

body::before {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  left: 0;
  height: 8px;
  background: var(--orange);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .22);
  content: "";
}

.page-shell {
  width: min(100% - 40px, 560px);
  margin: 0 auto;
  padding: 54px 0 72px;
}

.festival-logo {
  display: block;
  width: clamp(124px, 31vw, 155px);
  margin: 0 0 clamp(58px, 12vw, 82px);
}

.festival-logo img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, .5));
}

.upload-panel {
  position: relative;
  overflow: visible;
  border: 1px solid rgba(244, 241, 233, .38);
  border-radius: 18px;
  padding: clamp(22px, 5vw, 30px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .05), transparent 42%),
    rgba(23, 20, 18, .94);
  box-shadow: 0 20px 45px rgba(0, 0, 0, .42);
}

.upload-panel::before {
  position: absolute;
  z-index: 1;
  top: -13px;
  left: 21px;
  width: 95px;
  height: 24px;
  border-radius: 2px;
  background: repeating-linear-gradient(105deg, #b8bab6 0 5px, #969895 5px 7px);
  content: "";
  opacity: .88;
  transform: rotate(-4deg);
}

.panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 21px;
  border-bottom: 1px solid rgba(244, 241, 233, .58);
  padding-bottom: 12px;
}

.panel-heading p {
  margin: 0;
  color: var(--orange);
  font: 500 .67rem "DM Mono", monospace;
  letter-spacing: .08em;
}

h1 {
  margin: 0;
  color: var(--paper);
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 2.15rem;
  font-weight: 400;
  letter-spacing: .025em;
  line-height: .8;
}

.drop-zone {
  display: flex;
  min-height: 154px;
  align-items: center;
  gap: 16px;
  border: 1px dashed rgba(244, 241, 233, .72);
  border-radius: 13px;
  padding: 22px;
  background: rgba(0, 0, 0, .27);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.drop-zone:hover,
.drop-zone:focus,
.drop-zone.is-dragging {
  border-color: var(--orange);
  outline: none;
  background: rgba(243, 106, 39, .1);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .2);
  transform: translateY(-2px);
}

.drop-zone.has-file {
  min-height: 68px;
  border-style: solid;
  padding: 14px 16px;
  background: rgba(0, 0, 0, .14);
}
.drop-zone.has-file .plus { width: 30px; height: 30px; }
.drop-zone.has-file .plus::before,
.drop-zone.has-file .plus::after { width: 13px; }
.drop-zone.has-file .drop-copy small,
.drop-zone.has-file .format-note { display: none; }

.plus {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: transparent;
  background: var(--orange);
  font-size: 0;
}

.plus::before,
.plus::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: var(--black);
  content: "";
  transform: translate(-50%, -50%);
}

.plus::after { transform: translate(-50%, -50%) rotate(90deg); }

.drop-copy { display: grid; gap: 5px; }
.drop-copy strong { color: var(--paper); font-size: .98rem; }
.drop-copy small,
.format-note { color: var(--muted); font-size: .7rem; line-height: 1.45; }
.format-note { margin-left: auto; font-family: "DM Mono", monospace; text-align: right; }

.file-details {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  border-bottom: 1px solid rgba(244, 241, 233, .35);
  padding: 12px 0;
}

.file-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: var(--black);
  background: var(--orange);
  font-size: .65rem;
}

.file-details div { display: grid; gap: 2px; min-width: 0; }
.file-details strong { overflow: hidden; color: var(--paper); text-overflow: ellipsis; white-space: nowrap; }
.file-details span:not(.file-mark) { color: var(--muted); font: .7rem "DM Mono", monospace; }
.remove-file { margin-left: auto; border: 0; padding: 0 5px; color: var(--paper); background: none; cursor: pointer; font-size: 1.65rem; line-height: 1; }

.progress-area {
  margin-top: 22px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .38s ease, transform .38s ease;
}
.progress-area.is-complete .progress-label { color: #b9ff9a; }
.progress-area.is-complete .progress-track span { background: #8fe36c; animation: confirmation-pulse .7s ease 2; }
.progress-area.is-leaving { opacity: 0; transform: translateY(-7px); }

@keyframes confirmation-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.7); }
}

@keyframes success-reveal {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.progress-label { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--paper); font: .68rem "DM Mono", monospace; }
.progress-track { height: 8px; overflow: hidden; border-radius: 20px; background: #4b4641; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--orange); transition: width .16s linear; }

.message {
  min-height: 1.3rem;
  margin: 12px 0 0;
  color: var(--paper);
  font-size: .8rem;
  line-height: 1.4;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .38s ease, transform .38s ease;
}
.message.is-leaving { opacity: 0; transform: translateY(-5px); }
.message.error { color: #ff8f66; }
.message.success { color: #b9ff9a; animation: success-reveal .35s ease both; }

.submit-button {
  width: 100%;
  min-height: 54px;
  margin-top: 9px;
  border: 0;
  border-radius: 10px;
  padding: 16px 20px;
  color: var(--black);
  background: var(--orange);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 5px 12px rgba(0, 0, 0, .23);
  cursor: pointer;
  font: 700 .78rem "Inter", Arial, sans-serif;
  letter-spacing: .08em;
  transition: color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.submit-button span { margin-left: 13px; font-size: 1.15em; }
.submit-button:hover:not(:disabled) { color: var(--paper); background: #d84c15; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 8px 16px rgba(0, 0, 0, .3); transform: translateY(-1px); }
.submit-button:disabled { color: #716c64; background: #55504b; box-shadow: none; cursor: not-allowed; }

@media (max-width: 460px) {
  body::before { height: 6px; }
  .page-shell {
    width: min(100% - 28px, 560px);
    padding: max(30px, env(safe-area-inset-top)) 0 max(34px, env(safe-area-inset-bottom));
  }
  .festival-logo { width: 128px; margin-bottom: 46px; }
  .upload-panel { border-radius: 16px; padding: 20px 17px; }
  .panel-heading { margin-bottom: 18px; }
  h1 { font-size: 1.95rem; }
  .drop-zone {
    display: grid;
    min-height: 158px;
    grid-template-columns: 38px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 14px;
    row-gap: 9px;
    padding: 18px;
  }
  .plus { grid-row: 1 / span 2; }
  .format-note { width: auto; grid-column: 2; margin-left: 0; text-align: left; }
}
.festival-footer {
  position: relative;
  margin-top: clamp(88px, 15vw, 140px);
  border-top: 1px solid rgba(244, 241, 233, .45);
  padding: 42px 0 10px;
}

.festival-footer::before {
  position: absolute;
  top: -13px;
  right: 20px;
  width: 82px;
  height: 22px;
  border-radius: 2px;
  background: repeating-linear-gradient(105deg, #b8bab6 0 5px, #969895 5px 7px);
  content: "";
  opacity: .84;
  transform: rotate(4deg);
}

.footer-intro p {
  margin: 0 0 8px;
  color: var(--orange);
  font: 500 .67rem "DM Mono", monospace;
  letter-spacing: .08em;
}

.footer-intro h2 {
  margin: 0;
  color: var(--paper);
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(2.5rem, 9vw, 3.7rem);
  font-weight: 400;
  letter-spacing: .02em;
  line-height: .75;
}

.footer-social {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 30px;
}

.footer-social a {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(244, 241, 233, .5);
  border-radius: 11px;
  padding: 10px;
  color: var(--paper);
  background: rgba(255, 255, 255, .035);
  font-size: .72rem;
  font-weight: 700;
  text-decoration: none;
  transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}

.footer-social a:hover {
  border-color: var(--orange);
  color: var(--black);
  background: var(--orange);
  transform: translateY(-2px);
}

.footer-social span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: var(--black);
  background: var(--orange);
  font: 500 .55rem "DM Mono", monospace;
}

.footer-social a:hover span { background: var(--black); color: var(--orange); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
  border-top: 1px solid rgba(244, 241, 233, .24);
  padding-top: 18px;
  color: var(--muted);
  font: .62rem "DM Mono", monospace;
  letter-spacing: .03em;
}

.footer-bottom div { display: flex; flex-wrap: wrap; gap: 13px; }
.footer-bottom a { color: inherit; text-decoration: none; }
.footer-bottom a:hover { color: var(--orange); }

@media (max-width: 460px) {
  .festival-footer { margin-top: 72px; padding-top: 35px; }
  .footer-social { grid-template-columns: 1fr; gap: 8px; margin-top: 26px; }
  .footer-social a { justify-content: flex-start; padding-left: 16px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 14px; margin-top: 28px; }
}
.drop-zone.is-locked {
  cursor: progress;
  opacity: .66;
  transform: none;
}

.drop-zone.is-locked:hover { border-color: rgba(244, 241, 233, .72); background: rgba(0, 0, 0, .27); box-shadow: none; }

.file-details {
  display: grid;
  gap: 11px;
}

.queue-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 2px;
}

.queue-overview strong { font-size: .78rem; }
.queue-overview span { flex: 0 0 auto; }

.file-list {
  display: grid !important;
  max-height: 218px;
  gap: 8px;
  overflow: auto;
  padding-right: 3px;
}

.file-list::-webkit-scrollbar { width: 5px; }
.file-list::-webkit-scrollbar-thumb { border-radius: 99px; background: rgba(244, 241, 233, .32); }

.queue-item {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(244, 241, 233, .22);
  border-radius: 9px;
  padding: 9px 10px;
  background: rgba(0, 0, 0, .18);
  transition: border-color .18s ease, background .18s ease, opacity .18s ease;
}

.queue-item.is-uploading { border-color: var(--orange); background: rgba(243, 106, 39, .1); }
.queue-item.has-error { border-color: #ff8f66; }
.queue-item-info { display: grid; min-width: 0; gap: 2px; }
.queue-item-info strong { font-size: .8rem; }
.queue-state { color: var(--muted); font: .6rem "DM Mono", monospace; white-space: nowrap; }
.queue-item.is-uploading .queue-state { color: var(--orange); }
.queue-item.has-error .queue-state { color: #ff8f66; }

.queue-remove {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  color: var(--paper);
  background: transparent;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  transition: color .16s ease, background .16s ease;
}

.queue-remove:hover:not(:disabled) { color: var(--black); background: var(--orange); }
.queue-remove:disabled { cursor: not-allowed; opacity: .38; }
.submit-button > span { margin-left: 0; }
.submit-button .arrow { margin-left: 13px; font-size: 1.15em; }

@media (max-width: 460px) {
  .file-list { max-height: 184px; }
  .queue-overview { align-items: flex-start; flex-direction: column; gap: 3px; }
  .queue-item { gap: 8px; padding: 9px; }
  .queue-state { display: none; }
}
.footer-social .social-icon svg {
  display: block;
  width: 15px;
  height: 15px;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.success-modal {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 4, 3, .76);
  backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity .22s ease;
}

.success-modal.is-visible { opacity: 1; }

.success-modal-card {
  position: relative;
  width: min(100%, 410px);
  overflow: hidden;
  border: 1px solid rgba(244, 241, 233, .55);
  border-radius: 18px;
  padding: 45px 30px 30px;
  color: var(--paper);
  background: linear-gradient(135deg, rgba(255, 255, 255, .08), transparent 50%), var(--panel);
  box-shadow: 0 24px 65px rgba(0, 0, 0, .58);
  text-align: center;
  transform: translateY(14px) scale(.97);
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}

.success-modal-card::before {
  position: absolute;
  top: -9px;
  left: 50%;
  width: 92px;
  height: 20px;
  border-radius: 2px;
  background: repeating-linear-gradient(105deg, #b8bab6 0 5px, #969895 5px 7px);
  content: "";
  opacity: .88;
  transform: translateX(-50%) rotate(-3deg);
}

.success-modal.is-visible .success-modal-card { transform: translateY(0) scale(1); }

.success-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(244, 241, 233, .35);
  border-radius: 50%;
  padding: 0;
  color: var(--paper);
  background: transparent;
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1;
}

.success-close:hover { border-color: var(--orange); color: var(--black); background: var(--orange); }

.success-check {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 21px;
  place-items: center;
  border-radius: 50%;
  color: var(--black);
  background: #8fe36c;
  box-shadow: 0 0 0 8px rgba(143, 227, 108, .1);
  font-size: 1.8rem;
  font-weight: 700;
}

.success-modal-card > p {
  margin: 0 0 10px;
  color: var(--orange);
  font: 500 .67rem "DM Mono", monospace;
  letter-spacing: .08em;
}

.success-modal-card h2 {
  margin: 0;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 2.3rem;
  font-weight: 400;
  letter-spacing: .025em;
  line-height: .88;
}

.success-modal-card > span:not(.success-check) {
  display: block;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
}

.success-confirm {
  width: 100%;
  min-height: 48px;
  margin-top: 25px;
  border: 0;
  border-radius: 10px;
  color: var(--black);
  background: var(--orange);
  cursor: pointer;
  font: 700 .75rem "Inter", Arial, sans-serif;
  letter-spacing: .08em;
}

.success-confirm:hover { color: var(--paper); background: #d84c15; }

/* Bildergalerie */
.page-shell { width: min(100% - 40px, 1080px); }

.gallery-panel {
  position: relative;
  border: 1px solid rgba(244, 241, 233, .38);
  border-radius: 18px;
  padding: clamp(22px, 4vw, 30px);
  background: linear-gradient(135deg, rgba(255, 255, 255, .05), transparent 42%), rgba(23, 20, 18, .94);
  box-shadow: 0 20px 45px rgba(0, 0, 0, .42);
}

.gallery-panel::before {
  position: absolute;
  z-index: 1;
  top: -13px;
  left: 21px;
  width: 95px;
  height: 24px;
  border-radius: 2px;
  background: repeating-linear-gradient(105deg, #b8bab6 0 5px, #969895 5px 7px);
  content: "";
  opacity: .88;
  transform: rotate(-4deg);
}

.gallery-panel .panel-heading { margin-bottom: 20px; }
.gallery-panel h1 { text-align: left; }

.folder-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  border-bottom: 1px solid rgba(244, 241, 233, .22);
  padding: 0 0 18px;
}

.folder-tab {
  min-width: 88px;
  border: 1px solid rgba(244, 241, 233, .48);
  border-radius: 999px;
  padding: 11px 16px;
  color: var(--paper);
  background: rgba(0, 0, 0, .32);
  cursor: pointer;
  font: 600 .74rem "DM Mono", monospace;
  letter-spacing: .04em;
  transition: border-color .16s ease, color .16s ease, background-color .16s ease, transform .16s ease;
}

.folder-tab:hover,
.folder-tab:focus-visible { border-color: var(--orange); outline: none; transform: translateY(-1px); }
.folder-tab.is-active { border-color: var(--orange); color: var(--black); background: var(--orange); box-shadow: 0 4px 12px rgba(243, 106, 39, .2); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.selection-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: -5px 0 15px;
}

.selection-download,
.selection-close {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(244, 241, 233, .4);
  border-radius: 50%;
  padding: 0;
  color: var(--paper);
  background: transparent;
  cursor: pointer;
}
.selection-download { border-color: var(--orange); color: var(--black); background: var(--orange); }
.selection-download svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.selection-download:hover,
.selection-download:focus-visible { color: var(--paper); background: #d84c15; outline: none; }
.selection-close { font-size: 1.45rem; line-height: 1; }
.selection-close:hover,
.selection-close:focus-visible { border-color: var(--orange); color: var(--black); background: var(--orange); outline: none; }

.gallery-status {
  min-height: 1.2rem;
  margin: 0 0 15px;
  color: var(--muted);
  font: .7rem "DM Mono", monospace;
}
.gallery-status.error { color: #ff8f66; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 13px;
}

.gallery-card {
  position: relative;
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(244, 241, 233, .28);
  border-radius: 11px;
  padding: 0;
  color: var(--paper);
  background: #24201d;
  cursor: zoom-in;
  -webkit-touch-callout: none;
  user-select: none;
  transition: border-color .17s ease, transform .17s ease, box-shadow .17s ease;
}

.gallery-card::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(150deg, rgba(243, 106, 39, .16), transparent 48%);
  content: "";
  opacity: .5;
  pointer-events: none;
}

.gallery-card:hover,
.gallery-card:focus-visible {
  z-index: 1;
  border-color: var(--orange);
  outline: none;
  box-shadow: 0 10px 21px rgba(0, 0, 0, .35);
  transform: translateY(-3px);
}
.gallery-grid.is-selecting .gallery-card { cursor: pointer; }
.gallery-card.is-selected { border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange), 0 10px 21px rgba(0, 0, 0, .35); }
.gallery-card.is-selected::after {
  position: absolute;
  z-index: 2;
  top: 9px;
  right: 9px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  color: var(--black);
  background: var(--orange);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .38);
  content: "✓";
  font-weight: 700;
}

.gallery-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(0, 0, 0, .26));
  filter: saturate(.78);
  transition: filter .22s ease;
}
.gallery-card:hover .gallery-image,
.gallery-card:focus-visible .gallery-image { filter: saturate(1.08); }
.gallery-sentinel { height: 1px; }

.image-modal {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 4, 3, .83);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .18s ease;
}
.image-modal.is-visible { opacity: 1; }

.image-modal-card {
  display: grid;
  width: min(100%, 1200px);
  max-height: min(92vh, 950px);
  overflow: hidden;
  border: 1px solid rgba(244, 241, 233, .55);
  border-radius: 15px;
  background: var(--panel);
  box-shadow: 0 24px 65px rgba(0, 0, 0, .58);
  transform: translateY(10px) scale(.985);
  transition: transform .2s ease;
}
.image-modal.is-visible .image-modal-card { transform: translateY(0) scale(1); }

.modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 14px 13px 18px;
  border-bottom: 1px solid rgba(244, 241, 233, .22);
}
.modal-toolbar p {
  overflow: hidden;
  margin: 0;
  color: var(--paper);
  font: 500 .67rem "DM Mono", monospace;
  letter-spacing: .08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal-actions { display: flex; align-items: center; gap: 7px; }

.modal-icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(244, 241, 233, .36);
  border-radius: 50%;
  padding: 0;
  color: var(--paper);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.modal-icon-button svg { display: block; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.modal-icon-button:hover,
.modal-icon-button:focus-visible { border-color: var(--orange); outline: none; color: var(--black); background: var(--orange); }
.modal-icon-button.is-accent { border-color: var(--orange); color: var(--black); background: var(--orange); }
.modal-icon-button.is-accent:hover,
.modal-icon-button.is-accent:focus-visible { color: var(--paper); background: #d84c15; }

.modal-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(244, 241, 233, .36);
  border-radius: 50%;
  padding: 0;
  color: var(--paper);
  background: transparent;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
}
.modal-close:hover,
.modal-close:focus-visible { border-color: var(--orange); outline: none; color: var(--black); background: var(--orange); }
.modal-image-wrap { position: relative; display: grid; min-height: 0; place-items: center; background: #090807; }
.modal-image-wrap img { position: relative; z-index: 1; display: block; max-width: 100%; max-height: calc(min(92vh, 950px) - 62px); object-fit: contain; opacity: 1; transition: opacity .2s ease; }
.modal-image-wrap.is-loading img { opacity: 0; }
.modal-loader {
  position: absolute;
  z-index: 0;
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 3px solid rgba(244, 241, 233, .18);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: image-loader-spin .82s linear infinite;
}
.modal-loader::after {
  width: 37px;
  height: 37px;
  border: 3px solid transparent;
  border-right-color: var(--paper);
  border-radius: 50%;
  content: "";
  animation: image-loader-spin .58s linear infinite reverse;
}
@keyframes image-loader-spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  .page-shell { width: min(100% - 28px, 1080px); }
  .gallery-panel { border-radius: 16px; padding: 20px 17px; }
  .folder-tabs { gap: 7px; margin-bottom: 15px; padding-bottom: 15px; }
  .folder-tab { min-width: 0; padding: 10px 14px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .image-modal { padding: 10px; }
  .modal-toolbar { align-items: flex-start; padding: 11px; }
  .modal-toolbar p { padding-top: 9px; font-size: .58rem; }
  .modal-download { padding: 10px; font-size: .56rem; }
}
