/* glance-upload-theme.css: the website's dark tokens for Glance's own upload.css (copied below this block,
   unchanged, by glance_upload_fix.py), plus the menu item. Only the token values are the site's.
   Luca 26 Nov ~13:50: no floating button; the camera is an item of the user-icon menu, Glance mode, phones only. */
.up-scrim, .up-sheet, .up-pill {
  --font-ui: "Space Grotesk", system-ui, sans-serif;
  --ink: #F4F1EE; --ink-2: #D9D5D0; --ink-3: #B4B4B4;
  --glass-strong: rgba(244,241,238,.07); --glass-card: rgba(12,12,16,.94);
  --hairline: rgba(244,241,238,.16); --focus: #3a5cc0; --bg-recede: rgba(244,241,238,.08);
  --glance-error: #ff8f74; --shadow-card: 0 10px 60px rgba(0,0,0,.6);
}
.up-scrim { background: rgba(0,0,0,.45); }
.up-sub, .up-note, .up-err, .up-check span, .up-tile-why { font-family: "Space Grotesk", system-ui, sans-serif !important; }
.up-check input { accent-color: #727ce0; }

/* the menu item: first row of the member's menu, with a camera glyph drawn like the header's line icons */
.cm-sheet li.gu-item a { display: grid !important; grid-template-columns: 34px 1fr; column-gap: 12px; align-items: center; }
.cm-sheet li.gu-item a b, .cm-sheet li.gu-item a span { grid-column: 2; }
.cm-sheet li.gu-item .gu-ic { grid-row: 1 / span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(114,124,224,.75); color: #F4F1EE; }
.cm-sheet li.gu-item .gu-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.gu-waiting .cm-sheet li.gu-item a span { color: #727ce0; }

/* the sheet */
.gu-kicker { font: 400 9.5px/1.3 "Space Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: #727ce0; margin: 0 40px 8px 0; }
.up-tile.gu-cam.is-primary { background: #F4F1EE; color: #0A0A0A; border-color: #F4F1EE; }
.up-tile.gu-cam.is-primary .up-tile-why { color: #3a3a3a; }
.gu-more { display: flex; gap: 8px; margin: 10px 0 4px; }
.gu-more .up-btn { flex: 1; min-height: 44px; font-size: 13px; padding: 10px 12px; }
.up-consent.gu-agreed { padding: 10px 12px; }
.up-consent.gu-agreed .up-note { margin: 0; }
.gu-pill, .up-pill.gu-pill { bottom: calc(var(--m, 14px) + var(--safe-b, 0px) + 58px) !important; right: 14px !important; }
body.gu-sheet-open .cm-btn { display: none !important; }

/* ---- Glance's own upload.css, unchanged ---- */
/* upload.css -- contributor upload. Uses glance.css tokens only; no new brand values.
 *
 * Rules copied rather than imported: .up-select mirrors write.css's .ev-select and the
 * .up-grid family mirrors curate.css's .curate-grid. Both of those stylesheets are
 * injected by editor.js for ALLOWLISTED EDITORS ONLY, and upload is for every invited
 * contributor, so depending on them would leave a non-editor with unstyled controls. */

/* ---- entry point: bottom-RIGHT (the Select FAB owns bottom-left) ------------- */
/* z-index 19, deliberately BELOW the card scrim (20) and the card itself (21).
   It was 24, which put a floating "Add photos" button on top of the open metadata
   card -- on a phone the card is a full bottom sheet, so the FAB landed in the middle
   of the record you were reading. Under the scrim it simply dims away with the rest
   of the field, which is what a modal is for. Affects the archive too, not just
   review; the card has always been openable with the FAB up. */
.up-fab {
  position: fixed; right: max(14px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom)); z-index: 19;
  font-family: var(--font-ui); font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--ink-2); background: var(--glass-strong);
  border: 1px solid var(--hairline); border-radius: 9999px; padding: 10px 18px;
  cursor: pointer; box-shadow: 0 8px 30px rgba(20,18,16,0.16);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.up-fab:hover { color: var(--ink); }
.up-fab:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.up-fab[hidden] { display: none; }

/* Minimised progress pill. Desktop bottom-right above the FAB; on mobile it must clear
   the editor publish pill, which moves to bottom:76px there (write.css). */
.up-pill {
  position: fixed; right: max(14px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom)); z-index: 26;
  font-family: var(--font-ui); font-size: 12px;
  color: #fff; background: rgba(20,18,16,0.86);
  border: 1px solid var(--hairline); border-radius: 9999px; padding: 8px 14px;
  cursor: pointer; font-variant-numeric: tabular-nums;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.up-pill:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.up-pill[hidden] { display: none; }
.up-pill.is-done { background: rgba(22,64,34,0.90); }
.up-pill.is-error { background: rgba(96,34,26,0.90); }

/* ---- sheet: same geometry as .card (glance.css), deliberately no drag ---------
   A drag-to-dismiss gesture on a surface that must NOT be dismissible mid-upload is a
   contradiction, so this reuses the look and the motion but not card.js's snap logic. */
.up-scrim {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(20,18,16,0.14);
  -webkit-backdrop-filter: saturate(1.05) blur(1px); backdrop-filter: saturate(1.05) blur(1px);
}
.up-scrim[hidden] { display: none; }

.up-sheet {
  position: fixed; z-index: 31;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 92vw);
  display: flex; flex-direction: column;
  background: var(--glass-card, rgba(255,255,255,0.86));
  -webkit-backdrop-filter: saturate(1.3) blur(24px); backdrop-filter: saturate(1.3) blur(24px);
  border-left: 1px solid var(--hairline);
  box-shadow: var(--shadow-card, 0 10px 60px rgba(20,18,16,0.20));
  transform: translateX(100%);
  transition: transform 500ms cubic-bezier(0.2, 0, 0, 1);
  padding-top: env(safe-area-inset-top);
}
.up-sheet.open { transform: translateX(0); }
.up-sheet[hidden] { display: none; }

/* The TAP target stays 44px (touch guideline); the drawn circle is 30px inside it. A 44px
   drawn circle plus its focus ring (the sheet focuses it on open) overlapped the subtitle
   on a phone (founder, 2026-10-12). */
.up-close {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 44px; height: 44px; min-width: 44px; padding: 0;
  display: grid; place-items: center;
  font-family: var(--font-ui); font-size: 16px; line-height: 1;
  color: var(--ink-2); background: none; border: 0; cursor: pointer;
}
.up-close::before {
  content: ""; position: absolute; inset: 7px; z-index: -1;
  background: var(--glass-strong); border: 1px solid var(--hairline); border-radius: 9999px;
}
.up-close:hover { color: var(--ink); }
.up-close:focus-visible { outline: none; }
.up-close:focus-visible::before { outline: 2px solid var(--focus); outline-offset: 1px; }
/* the sheet's first heading and subtitle never run under the close button */
.up-scroll > .up-h, .up-scroll > .up-sub { padding-right: 40px; }

.up-scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 20px 20px max(24px, env(safe-area-inset-bottom));
}

/* ---- type ------------------------------------------------------------------- */
.up-h {
  font-family: var(--font-ui); font-size: 15px; font-weight: 700;
  letter-spacing: 0.02em; color: var(--ink); margin: 0 0 6px;
}
.up-sub {
  font-family: "Glacial Indifference", Inter, system-ui, sans-serif;
  font-size: 13px; line-height: 1.5; color: var(--ink-2); margin: 0 0 16px;
}
.up-label {
  display: block; font-family: var(--font-ui); font-size: 12px;
  color: var(--ink-3); letter-spacing: 0.02em; margin: 14px 0 5px;
}
/* `display: block` above beats the UA's [hidden] rule, so a picker hid its <select>
   and left the label standing ("Which artwork or moment?" with nothing under it).
   Measured live 2026-11-09 on the locked Perfectl00p invite link. */
.up-label[hidden], .up-select[hidden] { display: none; }
.up-note {
  font-family: "Glacial Indifference", Inter, system-ui, sans-serif;
  font-size: 12px; line-height: 1.5; color: var(--ink-3); margin: 8px 0 0;
}
.up-err {
  font-family: "Glacial Indifference", Inter, system-ui, sans-serif;
  font-size: 12.5px; line-height: 1.5; color: var(--glance-error, #B0492E);
  margin: 6px 0 0;
}
.up-err[hidden] { display: none; }

/* ---- controls --------------------------------------------------------------- */
.up-select, .up-input {
  width: 100%; box-sizing: border-box; max-width: 100%;
  font-family: var(--font-ui); font-size: 15px; color: var(--ink);
  background: var(--glass-strong); border: 1px solid var(--hairline);
  border-radius: 8px; padding: 8px 10px; line-height: 1.25;
}
.up-select { -webkit-appearance: menulist; appearance: menulist; text-overflow: ellipsis; }
.up-select:focus-visible, .up-input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

.up-btn {
  font-family: var(--font-ui); font-size: 14px; font-weight: 700; color: #fff;
  background: var(--focus); border: 0; border-radius: 10px; padding: 12px 18px;
  cursor: pointer; letter-spacing: 0.03em; transition: filter 140ms ease;
}
.up-btn:hover { filter: brightness(1.06); }
.up-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.up-btn.is-quiet {
  color: var(--ink-2); background: var(--glass-strong);
  border: 1px solid var(--hairline); font-weight: 400;
}
.up-btn.is-quiet:hover { color: var(--ink); filter: none; }
.up-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }

/* ---- source tiles ----------------------------------------------------------- */
.up-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.up-tile {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  font-family: var(--font-ui); font-size: 13.5px; color: var(--ink);
  background: var(--glass-strong); border: 1px solid var(--hairline);
  border-radius: 12px; padding: 14px; cursor: pointer; min-height: 44px;
}
.up-tile:hover { border-color: var(--ink-3); }
.up-tile:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.up-tile-why {
  font-family: "Glacial Indifference", Inter, system-ui, sans-serif;
  font-size: 11.5px; line-height: 1.45; color: var(--ink-3);
}
/* Shown, not hidden: a contributor whose media is on OneDrive deserves to know why it
   is missing rather than wonder whether they missed the button. */
.up-tile[disabled] { opacity: 0.55; cursor: default; }
.up-tile[disabled]:hover { border-color: var(--hairline); }

/* ---- review grid (mirrors curate.css) --------------------------------------- */
.up-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.up-cell {
  position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden;
  background: var(--bg-recede, #E7E2DC);
}
.up-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-chip {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 4px;
  font-family: var(--font-ui); font-size: 9.5px; color: var(--ink-2);
  text-align: center; overflow-wrap: anywhere;
}
.up-drop {
  position: absolute; top: 3px; right: 3px; width: 22px; height: 22px;
  display: grid; place-items: center; font-size: 15px; line-height: 1;
  color: #fff; background: rgba(20,18,16,0.62); border: 0; border-radius: 9999px;
  cursor: pointer; opacity: 1;   /* never hover-only: there is no hover on touch */
}
.up-drop:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.up-more {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px;
  font-family: var(--font-ui); font-size: 12px; color: var(--ink-3);
  background: var(--bg-recede, #E7E2DC); font-variant-numeric: tabular-nums;
}

/* ---- consent ---------------------------------------------------------------- */
.up-consent {
  margin-top: 16px; padding: 14px; border-radius: 10px;
  border: 1px solid var(--hairline); background: var(--glass-strong);
}
.up-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.up-check input { width: 18px; height: 18px; margin: 1px 0 0; flex: 0 0 auto; cursor: pointer; }
.up-check span {
  font-family: "Glacial Indifference", Inter, system-ui, sans-serif;
  font-size: 12.5px; line-height: 1.5; color: var(--ink);
}
.up-check input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---- progress --------------------------------------------------------------- */
.up-agg { font-family: var(--font-ui); font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.up-track { height: 6px; border-radius: 9999px; background: var(--bg-recede, #E7E2DC); overflow: hidden; margin: 8px 0 16px; }
/* scaleX, never width: width animates layout, transform does not */
.up-fill { height: 100%; background: var(--focus); transform-origin: left; transform: scaleX(0); transition: transform 160ms linear; }

.up-group { margin-top: 14px; }
.up-group-h {
  font-family: var(--font-ui); font-size: 11.5px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px;
}
.up-row {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--hairline);
}
.up-row-name {
  font-family: var(--font-ui); font-size: 12px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.up-row-why { font-family: var(--font-ui); font-size: 11px; color: var(--glance-error, #B0492E); }
.up-row-track { grid-column: 1 / -1; height: 3px; border-radius: 9999px; background: var(--bg-recede, #E7E2DC); overflow: hidden; }
.up-row-fill { height: 100%; background: var(--focus); transform-origin: left; transform: scaleX(0); transition: transform 160ms linear; }
.up-retry {
  font-family: var(--font-ui); font-size: 11.5px; color: var(--ink-2);
  background: none; border: 1px solid var(--hairline); border-radius: 9999px;
  padding: 4px 10px; cursor: pointer;
}
.up-retry:hover { color: var(--ink); }
.up-retry:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

@media (max-width: 640px) {
  .up-sheet {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%;
    max-height: 88vh; max-height: 86dvh;
    border-left: 0; border-top: 1px solid var(--hairline);
    border-radius: 18px 18px 0 0;
    transform: translateY(100%);
    padding-top: 0;
  }
  .up-sheet.open { transform: translateY(0); }
  .up-close { top: max(6px, env(safe-area-inset-top)); right: 6px; }
  .up-scroll { padding: 18px 16px max(24px, env(safe-area-inset-bottom)); }
  /* 16px stops iOS zooming the viewport when a field takes focus */
  .up-select, .up-input { font-size: 16px; padding: 10px 12px; }
  .up-tiles { grid-template-columns: 1fr; }
  .up-grid { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }
  .up-btn { min-height: 44px; }
  /* clear the editor publish pill, which sits at bottom:76px on mobile */
  .up-pill { bottom: 132px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .up-sheet { transition: none; }
  .up-fill, .up-row-fill { transition: none; }
}

.up-scrim { z-index: 40; } .up-sheet { z-index: 41; } .up-pill { z-index: 39; }

/* fix-v74-notes, note 5np8tlowjhu0: the desk drop target */
.gu-veil { position: fixed; inset: 14px; z-index: 90; display: grid; place-content: center; gap: 8px; text-align: center;
  border: 1.5px dashed rgba(244,241,238,.55); border-radius: 22px; background: rgba(10,10,14,.62); color: #F4F1EE;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .18s ease; }
.gu-veil.on { opacity: 1; }
.gu-veil b { font-size: 22px; font-weight: 500; letter-spacing: .01em; }
.gu-veil span { font-size: 14px; color: #B9B6C2; }
@media (prefers-reduced-motion: reduce) { .gu-veil { transition: none; } }
