/* Photoalbumz — User pages collage */
.up { padding: 22px 0 70px; }
.up-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.up-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.up-tab small { font: 600 13px/1 Inter, sans-serif; opacity: .65; margin-left: 8px; }
.up-del { color: #b3261e; border-color: rgba(179,38,30,.4); }

.up-tab { display: inline-flex; align-items: center; min-height: 54px; padding: 0 26px; border-radius: 16px; border: 1.5px solid var(--line);
  font: 600 clamp(18px, 2vw, 22px)/1 'Playfair Display', Georgia, serif; color: var(--ink); text-decoration: none; background: var(--card); transition: transform .18s, box-shadow .18s; }
.up-tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 14px 30px -14px rgba(194,87,58,.75); }
.up-tab:hover { transform: translateY(-2px); }
.up-acts { display: flex; align-items: center; gap: 10px; }
.up-btn { height: 46px; }
.up-btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(1); }
.up-count { font-weight: 600; color: var(--muted); font-size: 14px; }

/* Rows of one height: each photo grows by its shape, so nothing is cropped. */
.up-collage { display: grid; gap: 14px; }
.up-row { display: flex; gap: 14px; opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.up-row.in { opacity: 1; transform: none; }
.up-pic { position: relative; flex: var(--ar) 1 0; aspect-ratio: var(--ar); margin: 0; border-radius: 14px; overflow: hidden; background: var(--bg-alt);
  box-shadow: 0 18px 40px -26px rgba(30,20,10,.6); transition: transform .45s cubic-bezier(.16,1,.3,1), box-shadow .45s; will-change: transform; cursor: zoom-in; }
/* edge photos grow inward, so they stay on screen */
.up-pic:first-child { transform-origin: left center; }
.up-pic:last-child { transform-origin: right center; }
.up-pic:only-child { transform-origin: center; }
.up-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Hover / focus: the photo comes forward (~30%) over its neighbours. */
.up-pic:hover, .up-pic:focus-visible { transform: scale(1.3); z-index: 5; box-shadow: 0 40px 80px -24px rgba(0,0,0,.65); outline: none; }
.up-row:first-child .up-pic:hover, .up-row:first-child .up-pic:focus-visible { transform: scale(1.3) translateY(10%); }
.up-pic:focus-visible { box-shadow: 0 0 0 3px var(--gold), 0 40px 80px -24px rgba(0,0,0,.65); }

/* Select mode (founder) */
.up-tick { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; display: none; place-items: center;
  background: rgba(255,255,255,.85); color: transparent; font-weight: 700; border: 2px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.selecting .up-pic { cursor: pointer; }
.selecting .up-tick { display: grid; }
.up-pic.picked .up-tick { background: var(--accent); color: #fff; }
.selecting .up-pic.picked { box-shadow: 0 0 0 4px var(--accent), 0 18px 40px -26px rgba(30,20,10,.6); }

@media (max-width: 760px) {
  .up-row { flex-wrap: wrap; gap: 10px; max-width: none !important; }
  .up-collage { gap: 10px; }
  .up-pic { flex-basis: calc(50% - 5px); }
  .up-pic.land { flex-basis: 100%; }
  .up-pic:hover, .up-pic:focus-visible, .up-row:first-child .up-pic:hover { transform: scale(1.06); }
  .up-tab { min-height: 46px; padding: 0 18px; }
}
@media (prefers-reduced-motion: reduce) { .up-row { opacity: 1; transform: none; transition: none; } .up-pic, .up-tab { transition: none; } .up-pic:hover, .up-pic:focus-visible { transform: none; } }

/* Big view of one photo */
.up-view { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(12,10,8,.9); color: #fff; overflow: hidden; }
.up-view::backdrop { background: rgba(12,10,8,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.up-view[open] { display: grid; grid-template-rows: auto 1fr; animation: upFade .25s ease; }
@keyframes upFade { from { opacity: 0; } }
.up-view-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
.up-view-info { font: 500 14px/1.3 Inter, sans-serif; opacity: .85; }
.up-view-acts { display: flex; gap: 8px; margin-left: auto; }
.up-vbtn { height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.1); color: #fff; font: 600 14px Inter, sans-serif; cursor: pointer; transition: background .15s, transform .15s; }
.up-vbtn:hover { background: rgba(255,255,255,.22); transform: translateY(-1px); }
.up-vbtn.del:hover { background: #b3261e; border-color: #b3261e; }
.up-vbtn.close { width: 42px; padding: 0; font-size: 18px; }
.up-vbtn:focus-visible, .up-arrow:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.up-view-stage { position: relative; min-height: 0; margin: 0 72px 20px; }
.up-view-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 24px 40px rgba(0,0,0,.6)); }
.up-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 54px; height: 54px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.12); color: #fff; font-size: 34px; line-height: 1; cursor: pointer; transition: background .15s, transform .15s; }
.up-arrow:hover { background: rgba(255,255,255,.25); transform: translateY(-50%) scale(1.08); }
.up-arrow.prev { left: 12px; } .up-arrow.next { right: 12px; }
@media (max-width: 760px) {
  .up-view-stage { margin: 0 6px 76px; }
  .up-arrow { top: auto; bottom: 12px; transform: none; width: 48px; height: 48px; }
  .up-arrow:hover { transform: none; }
  .up-vbtn { height: 40px; padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) { .up-view[open] { animation: none; } }
