/* OSO Inspired, on the OSO desk system (v0.2): cool canvas, glass cards, pill controls, crisp edges.
   Two accents only, violet for the full stop and coral for the one action, so the packs carry the colour. */
:root {
  --ink: #150A35;
  --muted: #5E5888;
  --muted-d: #A9A2CF;
  --canvas: #E6E8F0;
  --panel: #F1F2F7;
  --card: #FBFBFE;
  --glass: rgba(255, 255, 255, .74);
  --well: rgba(255, 255, 255, .45);
  --hair: rgba(21, 10, 53, .07);
  --line: rgba(21, 10, 53, .08);
  --line-2: rgba(21, 10, 53, .2);
  --hover: rgba(123, 77, 255, .07);
  --violet: #7B4DFF;
  --coral: #FF6B4A;
  --coral-h: #FF8A6E;
  --coral-ink: #C43A1E;
  --frame: #0B0620;
  --ghost: #F5F7FC;
  --photo: #DADCE6;
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
  --pill: 999px;
  /* crisp glass edge instead of a soft drop shadow: hairline, top highlight, 2px hard base */
  --lift: 0 0 0 1px rgba(21, 10, 53, .07), 0 1px 0 rgba(255, 255, 255, .95) inset, 0 2px 0 rgba(21, 10, 53, .05);
  --float: 0 0 0 1px rgba(21, 10, 53, .09), 0 1px 0 #fff inset, 0 3px 0 rgba(21, 10, 53, .07);
  --disp: "Schibsted Grotesk", "Manrope", system-ui, sans-serif;
  --sans: "Manrope", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --out: cubic-bezier(.16, 1, .3, 1);
  --wipe: cubic-bezier(.77, 0, .18, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--canvas); }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 500 15px/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  padding-block: env(safe-area-inset-top, 0px) env(safe-area-inset-bottom, 0px);
}
body.locked { overflow: hidden; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
p { margin: 0; }
[hidden] { display: none !important; }
.wrap {
  padding-left: max(28px, env(safe-area-inset-left, 0px));
  padding-right: max(28px, env(safe-area-inset-right, 0px));
}
.num { font-variant-numeric: tabular-nums; }
.mute { color: var(--muted); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.eyebrow { font: 600 10px/1.5 var(--mono); letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin: 0; }

/* Buttons: pills. White with a crisp edge by default, coral for the one action, a quiet well for the rest. */
.btn {
  appearance: none;
  border: 0;
  border-radius: var(--pill);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--lift);
  font: 600 14px/1.4 var(--sans);
  padding: 11px 19px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.btn svg { width: 14px; height: 14px; flex: none; }
.btn.primary { background: var(--coral); box-shadow: none; }
.btn.ghost { background: var(--well); box-shadow: none; }
.btn:disabled { opacity: .45; cursor: default; }
@media (hover: hover) {
  .btn:hover { background: #fff; box-shadow: var(--float); }
  .btn.primary:hover { background: var(--coral-h); box-shadow: none; }
  .btn.ghost:hover { background: var(--card); box-shadow: var(--lift); }
  .btn:disabled:hover { background: var(--card); box-shadow: var(--lift); }
  .btn.primary:disabled:hover { background: var(--coral); box-shadow: none; }
}
.btn:active { transform: translateY(1px); }

/* Top bar: mark, hairline divider, mono label */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 18px; }
.mark { display: block; color: var(--ink); }
.mark svg, .foot svg, .up-top svg { display: block; height: 26px; width: auto; fill: currentColor; }
.brand-name { font: 600 12px/1 var(--mono); letter-spacing: .14em; padding-left: 18px; border-left: 1px solid var(--line-2); min-height: 24px; display: flex; align-items: center; }

/* Hero: a white card; the word is a window onto the newest packs */
.hero { padding-block: 24px 4px; }
.hero-card { background: #fff; border-radius: var(--r-lg); box-shadow: var(--lift); padding: 20px 24px 18px; }
.hero-top { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; margin-bottom: 14px; }
.hero-top #stat { color: var(--ink); }
.hero-box { position: relative; isolation: isolate; overflow: hidden; background: #fff; touch-action: pan-y; cursor: grab; user-select: none; }
.hero-box.dragging { cursor: grabbing; }
.hero-strip { position: absolute; inset: 0; display: flex; will-change: transform; }
.hero-strip img { height: 100%; width: auto; aspect-ratio: 1; object-fit: cover; flex: none; }
.hero-word {
  position: relative;
  margin: 0;
  background: #fff;
  color: #000;
  mix-blend-mode: screen;
  font-family: var(--disp);
  font-weight: 900;
  font-size: 23vw;
  line-height: .96;
  letter-spacing: -.035em;
  padding-bottom: .02em;
  white-space: nowrap;
}
.hero-word span { display: inline-block; }
.hero-word.play span { animation: rise .9s var(--out) both; animation-delay: calc(var(--i) * 45ms); }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
.hero-foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 16px; line-height: 1.5; }

/* Phone segment rail: chips, like the project filters */
.rail { display: none; position: sticky; top: 0; z-index: 20; background: rgba(230, 232, 240, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.rail-in { display: flex; align-items: center; gap: 8px; padding-block: 10px; }
.rail-all { flex: none; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: var(--pill); background: var(--card); box-shadow: var(--lift); color: var(--ink); font: 600 13px/1.3 var(--sans); padding: 9px 14px; cursor: pointer; }
.rail-all svg { width: 14px; height: 14px; }
.rail-list { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-right: calc(-1 * max(12px, env(safe-area-inset-right, 0px))); padding: 2px max(12px, env(safe-area-inset-right, 0px)) 3px 0; }
.rail-list::-webkit-scrollbar { display: none; }
.rail-list button { flex: none; scroll-snap-align: start; border: 0; border-radius: var(--pill); background: var(--well); color: var(--muted); font: 500 13px/1.3 var(--sans); padding: 9px 14px; cursor: pointer; white-space: nowrap; }
.rail-list button i { font: 500 11px/1 var(--mono); font-style: normal; color: var(--muted); margin-left: 6px; }
.rail-list button[aria-current="true"] { background: var(--card); color: var(--ink); box-shadow: var(--lift); }

/* Layout: index card on the left, the wall on the canvas */
.layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 28px; align-items: start; padding-block: 20px 64px; }
.index { position: sticky; top: max(16px, env(safe-area-inset-top, 0px)); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--glass); border-radius: var(--r-md); box-shadow: var(--lift); padding: 10px 8px 14px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.index h3, .sheet-body h3 { margin: 16px 10px 6px; font: 600 10px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.seg { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; border: 0; background: none; text-align: left; font: 500 14px/1.35 var(--sans); color: var(--ink); padding: 7px 10px; border-radius: 10px; cursor: pointer; }
.seg i { font: 500 11px/1.35 var(--mono); font-style: normal; color: var(--muted); }
.seg.newest { font-weight: 700; }
@media (hover: hover) { .seg:hover { background: var(--hover); } }
.seg[aria-current="true"] { background: var(--ink); color: var(--ghost); }
.seg[aria-current="true"] i { color: var(--muted-d); }

/* Wall */
.wall { min-width: 0; }
.wall-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.wall-title { margin: 0; font: 700 clamp(40px, 5.4vw, 80px)/1 var(--disp); letter-spacing: -.035em; overflow-wrap: anywhere; text-wrap: balance; overflow: hidden; padding-bottom: .08em; }
.wall-title span { display: inline-block; white-space: pre; }
.wall-title .dot { color: var(--violet); }
.wall-title.play span { animation: rise .9s var(--out) both; animation-delay: calc(var(--i) * 35ms); }
.wall-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.density { display: flex; gap: 2px; padding: 4px; background: var(--well); border-radius: var(--pill); }
.density button { border: 0; background: none; border-radius: var(--pill); font: 600 12px/1.3 var(--sans); color: var(--muted); padding: 8px 14px; cursor: pointer; }
.density button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--lift); }
.wall-body.play { animation: wipe .5s var(--wipe) both; }
/* Negative side insets so the wipe never trims a tile's edge */
@keyframes wipe { from { clip-path: inset(0 -50vw 100% -50vw); } to { clip-path: inset(0 -50vw 0 -50vw); } }
.year { margin-bottom: 28px; }
.year + .year .year-head { border-top: 1px solid var(--line); padding-top: 18px; }
.year-head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 2px 12px; }
.year-head b { font: 700 22px/1 var(--disp); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.year-head span { font: 500 11px/1 var(--mono); letter-spacing: .04em; color: var(--muted); }

/* Default: a tight grid of squares. Brand and date ride on a pill that flips in on hover; the lightbox carries them on phones. */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 10px; }
.tile { position: relative; appearance: none; border: 0; padding: 0; background: none; text-align: left; cursor: zoom-in; display: block; min-width: 0; border-radius: var(--r-sm); }
/* height: auto lets the square ratio win over the img's width/height attributes */
.tile img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); background: var(--photo); box-shadow: 0 0 0 1px var(--hair); }
.cap { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; background: rgba(251, 251, 254, .95); color: var(--ink); border-radius: var(--pill); box-shadow: var(--lift); padding: 6px 10px; font: 600 12px/1.25 var(--sans); visibility: hidden; }
.cap i { display: none; }
.cap b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cap span { font: 500 10px/1.25 var(--mono); color: var(--muted); white-space: nowrap; flex: none; }
.tile:focus-visible .cap { visibility: visible; }
@media (hover: hover) { .tile:hover .cap { visibility: visible; } }
/* Large: project-style cards with the caption underneath */
.wall[data-d="large"] .grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.wall[data-d="large"] .tile { display: flex; flex-direction: column; gap: 10px; padding: 10px 10px 14px; background: var(--glass); border-radius: var(--r-md); box-shadow: var(--lift); }
.wall[data-d="large"] .tile img { border-radius: 10px; box-shadow: none; }
.wall[data-d="large"] .cap { position: static; visibility: visible; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; background: none; box-shadow: none; border-radius: 0; padding: 0 4px; }
.wall[data-d="large"] .cap i { display: block; font: 500 10px/1.4 var(--mono); font-style: normal; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.wall[data-d="large"] .cap b { font: 700 16px/1.25 var(--disp); letter-spacing: -.01em; max-width: 100%; }
.wall[data-d="large"] .cap span { font-size: 11px; }
@media (hover: hover) { .wall[data-d="large"] .tile:hover { background: var(--card); box-shadow: var(--float); } }
.ghost-tile { aspect-ratio: 1; border-radius: var(--r-sm); background: var(--photo); }
.empty { background: var(--glass); border-radius: var(--r-md); box-shadow: var(--lift); padding: 22px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; font-size: 16px; max-width: 52ch; }

/* Footer */
.foot { display: flex; align-items: center; gap: 20px; border-top: 1px solid var(--line); padding-block: 24px 40px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.foot svg { height: 22px; color: var(--ink); }
.foot p { flex: 1 1 320px; max-width: 64ch; }
.foot a { color: var(--ink); font: 500 12px/1 var(--mono); letter-spacing: .04em; }

/* Sheets: all segments, lightbox */
.sheet, .lb { position: fixed; inset: 0; z-index: 50; background: var(--canvas); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.sheet-top, .lb-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 68px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.sheet-top h2 { margin: 0; font: 700 28px/1 var(--disp); letter-spacing: -.03em; }
.sheet-top h2 .dot { color: var(--violet); }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding-block: 14px 40px; }
.sheet-body .cols { columns: 3 260px; column-gap: 14px; }
.sheet-body section { break-inside: avoid; background: var(--glass); border-radius: var(--r-md); box-shadow: var(--lift); padding: 6px 8px 10px; margin-bottom: 14px; }
.sheet-body section:first-child { padding-top: 8px; }
.sheet-body h3 { margin-top: 10px; }
.sheet-body .seg { font-size: 16px; padding: 10px; }
.lb-top p { font: 600 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 18px; touch-action: pan-y pinch-zoom; }
.lb-stage img { max-width: 100%; max-height: 100%; aspect-ratio: 1; object-fit: contain; border-radius: var(--r-md); background: var(--photo); box-shadow: var(--lift); }
.lb-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 14px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.lb-info p:first-child { font: 700 20px/1.2 var(--disp); letter-spacing: -.02em; }
.lb-info p.mute { font: 500 12px/1.5 var(--mono); }
.lb-nav { display: flex; align-items: center; gap: 8px; }
.lb-nav .num { margin: 0 8px; font: 500 12px/1 var(--mono); }
.confirm { position: absolute; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--card); border-radius: var(--r-lg); box-shadow: var(--float); display: flex; align-items: center; gap: 10px; padding: 14px 16px; flex-wrap: wrap; }
.confirm p { flex: 1 1 200px; font-weight: 600; }

/* Uploader: the same desk, one card per job */
.up {
  position: fixed; inset: 0; z-index: 60; background: var(--canvas); color: var(--ink);
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.up-top { display: flex; align-items: center; gap: 16px; min-height: 68px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.up-top .brand { margin-right: auto; }
.up-top p#upCount { font: 600 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.up-drop { flex: 1; display: flex; flex-direction: column; gap: 12px; padding-block: 20px; min-height: 0; }
.cam-go { flex: none; width: 100%; min-height: 56px; font-size: 17px; }
/* The camera shortcut is for phones and tablets; the drop target is for computers. */
@media not all and (hover: none) and (pointer: coarse) { .cam-only { display: none !important; } }
@media (hover: none) and (pointer: coarse) { .no-cam { display: none !important; } }
.drop { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; background: #fff; border-radius: var(--r-lg); box-shadow: var(--lift); padding: 28px; cursor: pointer; min-height: 0; }
.drop-word { font: 700 clamp(56px, 11vw, 168px)/.9 var(--disp); letter-spacing: -.04em; }
.drop-word::after { content: "."; color: var(--violet); }
.drop-sub { color: var(--muted); max-width: 48ch; font-size: 16px; }
.drop:hover, .drop.over { box-shadow: 0 0 0 2px var(--violet), var(--lift); }
.up-edit { flex: 1; min-height: 0; display: grid; grid-template-columns: 104px minmax(0, 1fr) 360px; gap: 16px; padding: 16px max(28px, env(safe-area-inset-right, 0px)) 16px max(28px, env(safe-area-inset-left, 0px)); }
.up-queue { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px; }
.q { position: relative; border: 0; padding: 0; background: var(--photo); cursor: pointer; flex: none; width: 100%; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; box-shadow: 0 0 0 1px var(--hair); }
.q img { width: 100%; height: 100%; object-fit: cover; }
.q[aria-current="true"] { outline: 2px solid var(--violet); outline-offset: 2px; }
.q b { position: absolute; left: 5px; top: 5px; background: var(--card); color: var(--ink); font: 500 10px/1 var(--mono); padding: 4px 6px; border-radius: var(--pill); }
.q[data-s="done"]::after, .q[data-s="fail"]::after, .q[data-s="busy"]::after { position: absolute; left: 5px; right: 5px; bottom: 5px; font: 500 10px/1 var(--mono); text-align: center; padding: 5px 4px; border-radius: var(--pill); background: var(--card); color: var(--ink); }
.q[data-s="done"]::after { content: "Published"; }
.q[data-s="busy"]::after { content: "Uploading"; }
.q[data-s="fail"]::after { content: "Failed"; color: var(--coral-ink); }
.up-crop { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.crop-box { flex: 1; min-height: 0; background: var(--frame); border-radius: var(--r-md); overflow: hidden; }
.crop-box img { max-width: 100%; display: block; }
.crop-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crop-tools .num { margin-left: auto; font: 500 11px/1 var(--mono); }
.up-form { background: #fff; border-radius: var(--r-lg); box-shadow: var(--lift); overflow-y: auto; padding: 18px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font: 600 10px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field input, .field select { width: 100%; min-height: 46px; border: 0; border-radius: 14px; background: var(--panel); color: var(--ink); box-shadow: 0 0 0 1px var(--hair) inset; padding: 10px 14px; font: 500 16px/1.3 var(--sans); }
.field input:focus, .field select:focus { outline: none; box-shadow: 0 0 0 2px var(--violet) inset; }
.field input::placeholder { color: var(--muted); }
.hint { font-style: normal; color: var(--violet); margin-left: 6px; letter-spacing: .1em; }
.hint.low { color: var(--coral-ink); }
.linkbtn { align-self: flex-start; margin-top: -6px; border: 0; background: none; padding: 2px 0; font: 600 13px/1.3 var(--sans); color: var(--violet); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
/* A photo whose segment still needs a look carries a coral dot */
.q[data-check="true"]::before { content: ""; position: absolute; right: 6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 2px #fff; z-index: 1; }
.newseg { display: flex; flex-direction: column; gap: 14px; padding: 12px; border-radius: var(--r-md); background: var(--hover); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--violet); margin: 1px 0 0; flex: none; }
.up-msg { min-height: 1.4em; font-size: 14px; font-weight: 600; }
.up-msg.err { color: var(--coral-ink); }
.up-actions { display: flex; gap: 8px; margin-top: auto; }
.up-actions .btn { flex: 1; }
/* On white surfaces the quiet buttons take the crisp white pill so they still read as buttons */
.up-form .btn.ghost { background: var(--card); box-shadow: var(--lift); }
.btn.primary { min-height: 48px; font-size: 15px; }
.up-done { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 24px; padding-block: 24px 32px; }
.done-word { font: 700 clamp(44px, 9vw, 140px)/.92 var(--disp); letter-spacing: -.04em; }
.done-word::after { content: "."; color: var(--violet); }
.up-done .up-actions { max-width: 520px; }

/* Cropper, restyled */
.cropper-view-box { outline: 2px solid #fff; outline-color: #fff; }
.cropper-line, .cropper-point { background-color: #fff; }
.cropper-point { width: 10px; height: 10px; opacity: 1; border-radius: 50%; }
.cropper-modal { background-color: var(--frame); opacity: .62; }
.cropper-dashed { border-color: rgba(255, 255, 255, .5); }

/* Phones and small tablets */
@media (max-width: 899px) {
  .wrap { padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  .top { min-height: 60px; }
  .brand { gap: 14px; }
  .brand-name { padding-left: 14px; font-size: 11px; }
  .mark svg, .foot svg, .up-top svg { height: 22px; }
  .btn { padding: 10px 16px; min-height: 40px; }
  .hero { padding-block: 12px 0; }
  .hero-card { border-radius: var(--r-md); padding: 14px 14px 14px; }
  .hero-top { margin-bottom: 10px; }
  .hero-word { font-size: 24.5vw; }
  .hero-foot { font-size: 14px; margin-top: 10px; padding-top: 10px; }
  .rail { display: block; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-block: 16px 48px; }
  .index { display: none; }
  .wall-head { margin-bottom: 14px; }
  .wall-title { font-size: clamp(38px, 12vw, 80px); }
  .wall-meta { font-size: 13px; }
  /* Three across, edge to edge: on a phone the photos are the content, so they take the full width.
     Square corners here, since rounded tiles on hairline gaps read as a mistake; the chrome around them stays rounded. */
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; margin-left: calc(-1 * max(12px, env(safe-area-inset-left, 0px))); margin-right: calc(-1 * max(12px, env(safe-area-inset-right, 0px))); }
  .tile, .tile img, .ghost-tile { border-radius: 0; }
  .tile img { box-shadow: none; }
  .wall[data-d="large"] .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-left: 0; margin-right: 0; }
  .wall[data-d="large"] .tile { padding: 8px 8px 12px; border-radius: 16px; gap: 8px; }
  .wall[data-d="large"] .tile img { border-radius: 9px; }
  .wall[data-d="large"] .cap b { font-size: 14px; }
  .year { margin-bottom: 22px; }
  .year-head b { font-size: 20px; }
  .lb-stage { padding: 12px; }
  .lb-bottom { padding-block: 10px 12px; }
  .lb-nav { width: 100%; justify-content: flex-end; }
  .lb-nav .num { margin-right: auto; margin-left: 0; }
  .sheet-body .cols { columns: auto; }

  .up-edit { display: flex; flex-direction: column; overflow-y: auto; gap: 12px; padding: 12px; }
  .up-queue { order: 2; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 4px; flex: none; }
  .q { width: 64px; }
  .up-crop { order: 1; flex: none; }
  .crop-box { flex: none; height: min(calc(100vw - 24px), 60vh); }
  .crop-tools .btn { min-height: 38px; padding: 8px 12px; font-size: 13px; }
  .up-form { order: 3; overflow: visible; padding: 16px; }
  .up-form { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  /* Camera, Add more and Publish stay under the thumb on every scroll position. */
  .up-form .up-actions { position: fixed; z-index: 2; left: 0; right: 0; bottom: 0; margin: 0; background: rgba(251, 251, 254, .96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    padding: 10px max(12px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
  .up-form .up-actions .btn { flex: 1 1 auto; padding-inline: 10px; }
  .up-form .up-actions #pubBtn { flex-grow: 2; }
  .drop { padding: 20px; border-radius: var(--r-md); }
}

/* The narrowest phones: Publish gets its own row above Camera and Add more. */
@media (max-width: 359px) {
  .up-form { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
  .up-form .up-actions { flex-wrap: wrap; gap: 8px; }
  .up-form .up-actions #pubBtn { flex-basis: 100%; order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-word.play span, .wall-title.play span, .wall-body.play { animation: none; }
}
