/* ============================================================
   Client delivery — /delivery
   Builds on site.css (tokens, type, buttons, glass). Mobile first.
   ============================================================ */

.dl { min-height: 100svh; display: flex; flex-direction: column; }
.dl main { flex: 1; position: relative; isolation: isolate; }
/* the same soft light that falls into every section of the site */
.dl main::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: min(900px, 100vh);
  background: radial-gradient(ellipse 60% 62% at 50% 0%, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.025) 48%, transparent 76%);
  pointer-events: none;
}

/* ---------- top bar ---------- */
.dl-bar { position: sticky; top: 0; z-index: 40; padding-top: env(safe-area-inset-top); }
.dl-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(11, 11, 11, 0.92), rgba(11, 11, 11, 0.6) 70%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-mask: linear-gradient(180deg, #000 60%, transparent);
  mask: linear-gradient(180deg, #000 60%, transparent);
}
.dl-bar__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.dl-bar__brand { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.03em; }
.dl-bar__end { display: flex; gap: 8px; }

/* ---------- headline ---------- */
.dl-title {
  font-size: clamp(2.7rem, 10.5vw, 6.4rem);
  font-weight: 560;
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-wrap: balance;
}
.dl-title .g {
  background-image: linear-gradient(180deg, #ffffff 25%, #b4b2ad 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-block: 0.06em 0.12em;
}
.dl-title .thin { padding-right: 0.06em; }
.dl-title--gallery { font-size: clamp(2.3rem, 8vw, 5rem); overflow-wrap: anywhere; }

/* ---------- code entry ---------- */
.dl-gate { padding-block: clamp(40px, 9vw, 140px) clamp(72px, 12vw, 180px); }
.dl-gate__grid { display: grid; gap: clamp(36px, 6vw, 80px); align-items: end; }
.dl-gate__copy { display: grid; gap: 22px; justify-items: start; }
.dl-gate__lead { max-width: 30rem; }
@media (min-width: 960px) {
  .dl-gate { display: flex; align-items: center; min-height: calc(100svh - 160px); }
  .dl-gate__grid { grid-template-columns: 1.25fr minmax(360px, 0.9fr); width: min(100% - var(--gutter) * 2, var(--container)); }
}

.dl-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-lg);
  background: var(--glass);
  box-shadow: var(--glass-edge), var(--glass-drop);
  overflow: hidden;
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}
.dl-card::before {
  content: '';
  position: absolute;
  inset: -40% -10% auto;
  height: 80%;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(255, 255, 255, 0.08), transparent 70%);
  pointer-events: none;
}
.dl-card > * { position: relative; }
.dl-card__label { font-family: var(--font-mono); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); }
.dl-code {
  width: 100%;
  height: 68px;
  padding: 0 0 0 20px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
  color: var(--text);
  font-family: var(--font-mono);
  /* typed code and placeholder share one size, so the caret matches the text */
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  caret-color: var(--accent);
  transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
}
.dl-code::placeholder { color: var(--text-dim); font-family: var(--font); font-size: 1.15rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
.dl-code:focus { outline: none; border-color: rgba(255, 255, 255, 0.45); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05), 0 0 28px rgba(255, 255, 255, 0.07); }
.dl-card.is-error .dl-code { border-color: rgba(255, 138, 120, 0.7); }
.dl-card.is-error .dl-code { animation: dl-shake 0.42s var(--ease-out); }
@keyframes dl-shake { 20% { transform: translateX(-7px); } 45% { transform: translateX(6px); } 70% { transform: translateX(-3px); } }
.dl-card__hint { font-size: 0.88rem; color: var(--text-dim); }
.dl-card__hint b { font-family: var(--font-mono); font-weight: 500; color: var(--text-muted); letter-spacing: 0.08em; }
.dl-card__msg { min-height: 1.4em; font-size: 0.92rem; line-height: 1.45; color: #ff9d8e; }
.dl-card__msg:empty { min-height: 0; }
.dl-card__btn { justify-self: stretch; margin-top: 4px; }
.dl-card__btn .btn__inner { width: 100%; justify-content: center; }
.dl-card__btn[disabled] { cursor: progress; }
.dl-card__btn[disabled] .btn__bg { opacity: 0.7; }
.dl-card.is-busy [data-submit-text]::after { content: ''; display: inline-block; width: 1.1em; text-align: left; animation: dl-dots 1.2s steps(4) infinite; }
@keyframes dl-dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }

/* gentle entrance */
.dl-rise { animation: dl-rise 1s var(--ease-out) both; }
.dl-rise:nth-child(2) { animation-delay: 0.08s; }
.dl-rise:nth-child(3) { animation-delay: 0.16s; }
.dl-card.dl-rise { animation-delay: 0.22s; }
@keyframes dl-rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- loading ---------- */
.dl-loading {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  align-content: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.dl-loading span { width: 64px; height: 1px; background: linear-gradient(90deg, transparent, #fff, transparent); background-size: 200% 100%; animation: dl-scan 1.4s linear infinite; box-shadow: 0 0 8px var(--glow-soft); }
@keyframes dl-scan { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.dl[data-state='loading'] .dl-loading { display: grid; }
.dl[data-state='loading'] .dl-gate { visibility: hidden; }

/* ---------- gallery ---------- */
.dl-gallery { padding-block: clamp(28px, 6vw, 72px) clamp(72px, 10vw, 140px); }
.dl-gallery.is-in { animation: dl-rise 0.9s var(--ease-out) both; }
.dl-head { display: grid; gap: 28px; margin-bottom: clamp(32px, 5vw, 64px); }
.dl-head__copy { display: grid; gap: 18px; justify-items: start; min-width: 0; }
.dl-head__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.dl-head__meta span { display: inline-flex; align-items: center; gap: 18px; }
.dl-head__meta span + span::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--text-dim); }
.dl-head__actions { display: grid; gap: 10px; justify-items: start; }
.dl-head__note { font-size: 0.84rem; color: var(--text-dim); max-width: 22rem; }
.dl-head__tip { display: flex; align-items: flex-start; gap: 10px; max-width: 34rem; font-size: 0.9rem; line-height: 1.5; color: var(--text-muted); }
.dl-head__tip svg { flex: none; width: 15px; height: 15px; margin-top: 0.2em; fill: none; stroke: var(--text); stroke-width: 1.4; filter: drop-shadow(0 0 6px var(--glow-soft)); }
.dl-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 2px;
  font-size: 0.86rem;
  color: var(--text-muted);
  transition: color 0.25s;
}
.dl-share svg { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.dl-share span { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.2); text-underline-offset: 4px; transition: text-decoration-color 0.25s; }
.dl-share:hover { color: var(--text); }
.dl-share:hover span { text-decoration-color: currentColor; }
@media (min-width: 900px) {
  .dl-head { grid-template-columns: 1fr auto; align-items: end; gap: 48px; }
  .dl-head__actions { justify-items: end; text-align: right; }
}
@media (max-width: 599px) {
  .dl-head__actions .btn { width: 100%; }
  .dl-head__actions .btn__inner { width: 100%; justify-content: center; }
}

.dl-notice {
  margin-bottom: 28px;
  padding: 14px 18px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-sm);
  background: var(--glass);
  font-size: 0.92rem;
  color: var(--text-soft);
}

/* folder tabs: one row that scrolls sideways on small screens */
.dl-tabs {
  display: flex;
  gap: 8px;
  margin: 0 calc(var(--gutter) * -1) 28px;
  padding: 2px var(--gutter) 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.dl-tabs::-webkit-scrollbar { display: none; }
.dl-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-xs);
  background: var(--glass);
  box-shadow: var(--glass-edge);
  font-size: 0.92rem;
  color: var(--text-muted);
  scroll-snap-align: start;
  transition: color 0.25s, border-color 0.25s, background-color 0.25s, box-shadow 0.4s;
}
.dl-tab b { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; color: var(--text-dim); letter-spacing: 0.08em; }
.dl-tab:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }
.dl-tab[aria-selected='true'] { color: var(--bg); background: var(--text); border-color: var(--text); box-shadow: 0 0 22px var(--glow-soft); }
.dl-tab[aria-selected='true'] b { color: rgba(11, 11, 11, 0.55); }
.dl-tab--fav i { display: grid; width: 13px; height: 13px; }
.dl-tab--fav svg { width: 100%; height: 100%; fill: currentColor; stroke: none; }
@media (min-width: 900px) { .dl-tabs { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; } }

.dl-set__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-bottom: 18px; }
.dl-set__name { font-size: var(--fs-h3); font-weight: 560; letter-spacing: -0.03em; line-height: 1.15; overflow-wrap: anywhere; }
.dl-set__meta { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.dl-set__zip { margin-left: auto; align-self: center; }
@media (max-width: 599px) { .dl-set__zip { margin-left: 0; width: 100%; } .dl-set__zip .btn__inner { width: 100%; justify-content: center; } }

/* the open folder's banner: full width behind the title and the folder tabs,
   darkened where the text sits and fading into the page below the tabs */
.dl-hero { position: relative; }
.dl-banner {
  position: absolute;
  z-index: -1;
  top: calc(-1 * (clamp(28px, 6vw, 72px) + 76px + env(safe-area-inset-top)));
  bottom: calc(-1 * clamp(40px, 7vw, 110px));
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  overflow: hidden;
  pointer-events: none;
}
.dl-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1s var(--ease-out), transform 2.6s var(--ease-out);
}
.dl-banner img.is-loaded { opacity: 0.78; transform: none; }
.dl-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 11, 11, 0.82) 0%, rgba(11, 11, 11, 0.5) 45%, rgba(11, 11, 11, 0.3) 100%),
    linear-gradient(180deg, rgba(11, 11, 11, 0.6) 0%, rgba(11, 11, 11, 0.2) 30%, rgba(11, 11, 11, 0.5) 64%, var(--bg) 100%);
}
@media (max-width: 899px) {
  .dl-banner::after {
    background: linear-gradient(180deg, rgba(11, 11, 11, 0.72) 0%, rgba(11, 11, 11, 0.62) 35%, rgba(11, 11, 11, 0.78) 72%, var(--bg) 100%);
  }
}
/* text over a photo: a soft shadow keeps it readable on bright spots */
.dl-gallery.has-banner .dl-head__copy, .dl-gallery.has-banner .dl-head__note { text-shadow: 0 1px 18px rgba(0, 0, 0, 0.55); }
.dl-gallery.has-banner .dl-head__meta, .dl-gallery.has-banner .dl-head__tip, .dl-gallery.has-banner .dl-head__note { color: var(--text-soft); }
.dl-gallery.has-banner .dl-tab:not([aria-selected='true']) { background: rgba(11, 11, 11, 0.45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* masonry: columns of photos, each keeping its own shape; the next photo goes
   into the shortest column, so the order still reads left to right */
.dl-grid { --gap: 6px; display: flex; align-items: flex-start; gap: var(--gap); }
.dl-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
@media (min-width: 600px) { .dl-grid { --gap: 8px; } }
@media (min-width: 1100px) { .dl-grid { --gap: 10px; } }
.dl-grid > .dl-empty { flex: 1; }
.dl-tile {
  position: relative;
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: var(--surface);
  opacity: 0;
  animation: dl-tile 0.8s var(--ease-out) forwards;
  animation-delay: calc(min(var(--i, 0), 18) * 40ms);
}
@keyframes dl-tile { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.dl-tile__open { display: block; width: 100%; cursor: zoom-in; }
.dl-tile__open i { display: block; padding-bottom: calc(100% / var(--r, 1.5)); }
.dl-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out), transform 1.2s var(--ease-out);
}
.dl-tile img.is-loaded { opacity: 1; }
.dl-tile::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.12); pointer-events: none; }
.dl-tile__missing {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-align: center;
  overflow-wrap: anywhere;
}
.dl-tile__bar {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 28px 10px 10px 14px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
  font-size: 0.8rem;
  color: var(--text-soft);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s var(--ease-out), transform 0.5s var(--ease-out);
  pointer-events: none;
}
.dl-tile__bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-tile__dl {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-xs);
  background: rgba(11, 11, 11, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text);
  pointer-events: auto;
  transition: background-color 0.25s, border-color 0.25s;
}
.dl-tile__dl svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.dl-tile__dl:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
@media (hover: hover) and (pointer: fine) {
  .dl-tile:hover img { transform: scale(1.03); }
  .dl-tile:hover .dl-tile__bar, .dl-tile:focus-within .dl-tile__bar { opacity: 1; transform: none; }
}
@media (hover: none) { .dl-tile__bar { display: none; } }

/* favorites: a heart on every tile */
.dl-heart svg { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; transition: fill 0.25s, transform 0.4s var(--ease-out); }
.dl-heart.is-on svg { fill: currentColor; }
.dl-heart.is-on:not(:hover) svg { animation: dl-pop 0.45s var(--ease-out); }
@keyframes dl-pop { 40% { transform: scale(1.28); } }
.dl-tile__fav {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  background: rgba(11, 11, 11, 0.32);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: opacity 0.3s, background-color 0.25s, color 0.25s;
}
.dl-tile__fav svg { width: 17px; height: 17px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)); }
.dl-tile__fav.is-on { background: rgba(11, 11, 11, 0.5); box-shadow: 0 0 18px var(--glow-soft); }
@media (max-width: 599px) { .dl-tile__fav { top: 2px; right: 2px; width: 36px; height: 36px; background: rgba(11, 11, 11, 0.22); } .dl-tile__fav svg { width: 15px; height: 15px; } }
@media (hover: hover) and (pointer: fine) {
  .dl-tile__fav:not(.is-on) { opacity: 0; }
  .dl-tile:hover .dl-tile__fav, .dl-tile:focus-within .dl-tile__fav { opacity: 1; }
  .dl-tile__fav:hover { background: rgba(11, 11, 11, 0.6); }
}

/* videos: a play mark and the running time */
.dl-tile__play {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px 0 8px;
  border-radius: 13px;
  background: rgba(11, 11, 11, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  pointer-events: none;
  transition: opacity 0.3s;
}
.dl-tile__play svg { width: 10px; height: 10px; fill: currentColor; }
.dl-tile__play b { font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.06em; }
@media (hover: hover) and (pointer: fine) { .dl-tile:hover .dl-tile__play { opacity: 0; } }
.dl-tile--video .dl-tile__open { cursor: pointer; }

/* the favorites bar: always in reach once something is picked */
.dl-favbar {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 6px 6px 8px;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(30, 30, 30, 0.9), rgba(14, 14, 14, 0.9));
  box-shadow: var(--glass-edge), 0 24px 60px -24px rgba(0, 0, 0, 0.9), 0 0 30px rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
  animation: dl-toast 0.5s var(--ease-out);
}
.dl-favbar__show { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px 0 10px; border-radius: 999px; font-size: 0.9rem; white-space: nowrap; transition: background-color 0.25s; }
.dl-favbar__show:hover { background: rgba(255, 255, 255, 0.06); }
.dl-favbar__show svg { flex: none; width: 15px; height: 15px; fill: currentColor; filter: drop-shadow(0 0 6px var(--glow-soft)); }
.dl-favbar__dl { border-radius: 999px; }
.dl-favbar__dl .btn__bg { border-radius: 999px; }
body.has-favbar .dl-toast { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 66px); }
body.has-favbar .dl-gallery { padding-bottom: calc(clamp(72px, 10vw, 140px) + 60px); }

.dl-empty { padding: 48px 0; color: var(--text-muted); }

/* ---------- viewer ---------- */
.dlv {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #050505;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
  touch-action: none;
}
.dlv.is-open { opacity: 1; }
.dlv__top, .dlv__bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: max(12px, env(safe-area-inset-top)) var(--gutter) 12px;
}
.dlv__bottom { padding: 12px var(--gutter) max(16px, env(safe-area-inset-bottom)); justify-content: space-between; }
.dlv__count { flex: none; font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.16em; color: var(--text-muted); }
.dlv__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; color: var(--text-soft); }
.dlv__close { flex: none; }
.dlv__stage { position: relative; min-height: 0; margin: 0 clamp(0px, 5vw, 96px); overflow: hidden; }
.dlv__pan { position: absolute; inset: 0; transform-origin: 50% 50%; will-change: transform; cursor: zoom-in; }
.dlv__pan.is-anim { transition: transform 0.38s var(--ease-out); }
.dlv.is-zoomed .dlv__pan { cursor: grab; }
.dlv.is-zoomed .dlv__stage.is-drag .dlv__pan { cursor: grabbing; }
.dlv.is-zoomed .dlv__stage { margin: 0; }
.dlv__stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.35s var(--ease-out), transform 0.45s var(--ease-out);
}
.dlv__low { filter: blur(0.5px); }
.dlv__img { opacity: 0; }
.dlv__img.is-loaded { opacity: 1; }
.dlv__stage.is-drag img { transition: none; }
.dlv__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; outline: none; }
/* a soft pulse while the full-resolution photo comes in */
.dlv.is-sharpening .dlv__count::after { content: ' · loading full size'; color: var(--text-dim); animation: dl-fade 1.2s ease-in-out infinite alternate; }
@keyframes dl-fade { from { opacity: 0.35; } }
.dlv__zoom { flex: none; width: 40px; padding: 0; justify-content: center; }
.dlv__zoom svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.dlv.is-zoomed .dlv__zoom [data-zoom-plus] { display: none; }
.dlv__fav {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  margin-left: auto;
  padding: 0 14px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-xs);
  font-size: 0.86rem;
  color: var(--text-soft);
  transition: color 0.25s, border-color 0.25s, background-color 0.25s;
}
.dlv__fav svg { flex: none; width: 15px; height: 15px; }
.dlv__fav:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.3); }
.dlv__fav.is-on { color: var(--text); border-color: rgba(255, 255, 255, 0.4); box-shadow: 0 0 20px var(--glow-soft); }
.dlv__info { min-width: 0; font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.1em; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlv__dl { flex: none; }
.dlv__prev { left: clamp(8px, 2vw, 28px); }
.dlv__next { right: clamp(8px, 2vw, 28px); }
.dlv .viewer__btn { z-index: 3; color: var(--text); }
@media (max-width: 599px) {
  .dlv__stage { margin: 0; }
  .dlv .viewer__btn { display: none; }
  .dlv__bottom { flex-wrap: wrap; }
  .dlv__info { flex: 1 1 100%; }
  .dlv__fav { margin-left: 0; height: 44px; }
  .dlv__dl { flex: 1; }
  .dlv__dl .btn__inner { width: 100%; justify-content: center; }
}

/* ---------- download status ---------- */
.dl-toast {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 120;
  width: min(100% - 32px, 440px);
  display: grid;
  gap: 10px;
  padding: 16px 16px 16px 20px;
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 30, 30, 0.94), rgba(14, 14, 14, 0.94));
  box-shadow: var(--glass-edge), 0 30px 80px -30px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
  animation: dl-toast 0.5s var(--ease-out);
}
@keyframes dl-toast { from { opacity: 0; transform: translate(-50%, 14px); } }
.dl-toast__row { display: flex; align-items: flex-start; gap: 12px; }
.dl-toast__text { flex: 1; font-size: 0.94rem; line-height: 1.45; }
.dl-toast__text a { text-decoration: underline; text-underline-offset: 3px; }
.dl-toast__act { display: flex; align-items: center; justify-content: center; width: 100%; height: 44px; margin-top: 12px; border-radius: var(--radius-xs); background: var(--text); color: var(--bg); font-weight: 500; box-shadow: 0 0 22px var(--glow-soft); }
.dl-toast__x { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin: -6px -4px 0 0; border-radius: var(--radius-xs); color: var(--text-muted); }
.dl-toast__x:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.dl-toast__x svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.dl-toast__bar { height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.dl-toast__bar i { display: block; height: 100%; width: var(--p, 0%); background: var(--accent); box-shadow: 0 0 10px var(--glow); transition: width 0.4s linear; }
.dl-toast__bar.is-busy i { width: 30%; animation: dl-busy 1.3s var(--ease-in-out) infinite; }
@keyframes dl-busy { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.dl-toast__sub { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-toast__sub:empty { display: none; }
.dl-toast.is-error { border-color: rgba(255, 138, 120, 0.35); }

@media (prefers-reduced-motion: reduce) {
  .dl *, .dl *::before, .dl *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
}

/* ---------- language ---------- */
/* Hungarian: hidden for the moment until its words are in (delivery/i18n.js) */
html.t-wait body { visibility: hidden; }
.dl-bar__end { align-items: center; }
.dl-bar .lang { margin-right: 4px; }
.dl-loading b { font-weight: inherit; }

/* ---------- a shared photo (/delivery/#A7K/<photo id>) ----------
   The grid dims, the photo stays lit with a ring, and the
   spotlight lifts at the visitor's first touch, click, key or scroll. */
.dl-tile { transition: filter 0.6s var(--ease-out); }
.dl-grid.has-shared .dl-tile:not(.is-shared) { filter: brightness(0.32) saturate(0.6); }
.dl-tile.is-shared {
  z-index: 1;
  outline: 2px solid #fff;
  outline-offset: 4px;
  box-shadow: 0 0 48px rgba(255, 255, 255, 0.22);
  /* the tile has already risen in: only the ring pulses now */
  opacity: 1;
  animation: dl-shared 1.5s var(--ease-out) 0.2s 3;
}
@keyframes dl-shared {
  0% { outline-offset: 4px; outline-color: #fff; }
  60% { outline-offset: 14px; outline-color: rgba(255, 255, 255, 0); }
  61% { outline-offset: 4px; outline-color: rgba(255, 255, 255, 0); }
  100% { outline-offset: 4px; outline-color: #fff; }
}
.dlv__share { flex: none; width: 40px; padding: 0; justify-content: center; }
.dlv__share svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; }
@media (prefers-reduced-motion: reduce) { .dl-tile.is-shared { animation: none; } }
