/* Infinite Photo */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  --bg: #050506;
  --glass: rgba(20, 20, 24, 0.66);
  --glass-strong: rgba(17, 17, 21, 0.92);
  --hover: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #f5f5f7;
  --muted: rgba(245, 245, 247, 0.66);
  --faint: rgba(245, 245, 247, 0.42);
  --accent: #ffcf70;
  --accent-ink: #231804;
  --danger: #ff8a80;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --fab: 0px; /* room the Share button takes beside the dock: its width and the gap */
  color-scheme: dark;
}

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--text);
}

body {
  font: 14px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

button { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i {
  display: block;
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------------------------------------------------------------ stage */
#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}
#stage { cursor: grab; }
#stage.panning { cursor: grabbing; }
body.idle, body.idle #stage { cursor: none; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  min-width: 40px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  transition: background-color .18s, border-color .18s, transform .12s, opacity .18s;
}
.btn:hover { background: rgba(46, 46, 52, 0.84); border-color: var(--line-strong); }
.btn:active { transform: scale(0.95); }
.btn:disabled { opacity: 0.32; pointer-events: none; }
.btn.icon { width: 40px; padding: 0; }
.btn.ghost {
  background: transparent;
  border-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.btn.ghost:hover { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.btn.primary:hover { background: #ffdb94; }
.btn.big { height: 50px; padding: 0 26px; font-size: 15px; }
.btn.big .i { width: 20px; height: 20px; }
.btn.small { height: 34px; padding: 0 14px; font-size: 13px; }

/* ------------------------------------------------------------ top bar */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + var(--safe-t)) calc(16px + var(--safe-r)) 30px calc(16px + var(--safe-l));
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  pointer-events: none;
  transition: opacity .4s ease, transform .4s ease;
}
.topbar .actions { display: flex; gap: 8px; pointer-events: auto; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}
.brand .i { width: 22px; height: 22px; color: var(--accent); }
body.is-empty .needs-photos { display: none; }
/* modes: this device's photos (local), a share link (body.viewing) or a wall (body.walled) */
body.viewing .own-only, body.viewing .local-only, body.walled .local-only { display: none !important; }
body:not(.viewing) .view-only { display: none !important; }
body:not(.walled) .wall-only { display: none !important; }
body:not(.wall-owner) .owner-only { display: none !important; }
.brand-sub { color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38vw; }
.brand-sub:empty { display: none; }
.brand-sub:not(:empty)::before { content: '·'; margin: 0 8px 0 0; color: var(--faint); }
body.is-empty .topbar { background: none; }
body.is-empty .brand { visibility: hidden; }

/* ------------------------------------------------------------ dock */
.dock {
  position: fixed;
  z-index: 10;
  left: calc(50% - var(--fab) / 2);
  bottom: calc(16px + var(--safe-b));
  width: min(380px, calc(100% - 24px - var(--safe-l) - var(--safe-r) - var(--fab)));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  box-shadow: var(--shadow);
  transition: opacity .4s ease, transform .4s ease, left .38s cubic-bezier(.2, .8, .2, 1), width .38s cubic-bezier(.2, .8, .2, 1);
}
body.is-empty .dock { display: none; }
body.playing #btnPlay { color: var(--accent); }

.dock .grow { flex: 1; }
.counter {
  min-width: 58px;
  padding: 0 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

/* the Share button: this device's photos get a share link; on a wall, its owner gets the invite link.
   It sits right of the dock, and the two are centred together. */
body:not(.walled):not(.viewing):not(.is-empty):not(.gated),
body.walled.wall-owner:not(.is-empty):not(.gated) { --fab: 100px; }
.fab {
  position: fixed;
  z-index: 10;
  left: calc(50% - var(--fab) / 2 + min(190px, (100% - 24px - var(--safe-l) - var(--safe-r) - var(--fab)) / 2) + 8px);
  bottom: calc(16px + var(--safe-b));
  display: none;
  width: 92px;
  height: 52px;
  padding: 0;
  font-size: 15px;
  box-shadow: var(--shadow);
  transition: background-color .18s, opacity .4s ease, transform .4s ease, left .38s cubic-bezier(.2, .8, .2, 1);
}
body:not(.walled):not(.viewing):not(.is-empty):not(.gated) .fab,
body.walled.wall-owner:not(.is-empty):not(.gated) .fab { display: inline-flex; }

/* auto-hide while just looking */
body.idle .topbar { opacity: 0; transform: translateY(-8px); }
body.idle .topbar .actions { pointer-events: none; }
body.idle .dock { opacity: 0; transform: translate(-50%, 10px); pointer-events: none; }
body.idle .fab { opacity: 0; transform: translateY(10px); pointer-events: none; }

/* ------------------------------------------------------------ range inputs */
input[type=range] {
  --p: 0;
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 40px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  touch-action: none;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right,
    var(--accent) 0,
    var(--accent) calc(8px + (100% - 16px) * var(--p)),
    rgba(255, 255, 255, 0.2) calc(8px + (100% - 16px) * var(--p)));
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.2); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
input[type=range]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}
input[type=range]:disabled { opacity: 0.4; cursor: default; }

/* ------------------------------------------------------------ order panel */
.panel {
  position: fixed;
  z-index: 20;
  top: calc(12px + var(--safe-t));
  right: calc(12px + var(--safe-r));
  bottom: calc(12px + var(--safe-b));
  width: min(392px, calc(100% - 24px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  backdrop-filter: blur(26px) saturate(160%);
  box-shadow: var(--shadow);
  transform: translateX(calc(100% + 32px));
  visibility: hidden;
  transition: transform .38s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .38s;
}
body.panel-open .panel {
  transform: none;
  visibility: visible;
  transition: transform .38s cubic-bezier(.2, .8, .2, 1);
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 12px 2px 20px; }
.panel h2 { margin: 0; font-size: 17px; font-weight: 650; }
.sub { margin: 2px 0 0; color: var(--faint); font-size: 13px; }
.panel-tip { margin: 6px 20px 12px; color: var(--muted); font-size: 13px; }
.panel-tip .i { display: inline-block; width: 15px; height: 15px; vertical-align: -3px; }
.panel-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 14px;
  border-bottom: 1px solid var(--line);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .15s, color .15s;
}
.chip .i { width: 15px; height: 15px; }
.chip:hover { background: rgba(255, 255, 255, 0.1); }
.chip.danger { color: var(--danger); }
.chip.danger.armed { background: var(--danger); border-color: transparent; color: #2a0b08; }

.list {
  flex: 1;
  margin: 0;
  padding: 10px 10px 16px;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
  padding: 6px 6px 6px 2px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}
.item.current { border-color: rgba(255, 207, 112, 0.5); background: rgba(255, 207, 112, 0.07); }
.list.sorting .item { transition: transform .18s ease; }
.list.sorting .item.dragging {
  z-index: 2;
  transition: none;
  border-color: var(--line-strong);
  background: #232329;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}
.grip {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--faint);
  cursor: grab;
  touch-action: none;
}
.grip:hover { color: var(--text); }
.list.sorting, .list.sorting .grip { cursor: grabbing; }
.num {
  flex: none;
  width: 20px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
}
.item.current .num { color: var(--accent); }
.item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 0 0;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  cursor: pointer;
}
.thumb {
  flex: none;
  width: 64px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  background: #1d1d22;
}
.meta { min-width: 0; display: flex; flex-direction: column; }
.name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dims { font-size: 12px; color: var(--faint); }
.item-actions { flex: none; display: flex; }
.mini {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  touch-action: manipulation;
}
.mini .i { width: 16px; height: 16px; }
.mini:hover { background: var(--hover); color: var(--text); }
.mini:disabled { opacity: 0.28; pointer-events: none; }
.mini[data-act=remove]:hover { color: var(--danger); }
.mini.custom { color: var(--accent); }

/* ------------------------------------------------------------ settings */
.popover {
  position: fixed;
  z-index: 25;
  top: calc(66px + var(--safe-t));
  right: calc(16px + var(--safe-r));
  width: min(340px, calc(100% - 32px));
  padding: 18px 18px 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  backdrop-filter: blur(26px) saturate(160%);
  box-shadow: var(--shadow);
  max-height: calc(100% - 82px - var(--safe-t) - var(--safe-b));
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  visibility: hidden;
  transition: opacity .18s, transform .18s, visibility 0s linear .18s;
}
body.settings-open .popover { opacity: 1; transform: none; visibility: visible; transition: opacity .18s, transform .18s; }
/* while sliding or fading out, a closed panel or popover lets taps through to what's underneath */
body:not(.panel-open) .panel, body:not(.settings-open) .popover { pointer-events: none; }
.popover h3 { margin: 0 0 4px; font-size: 15px; font-weight: 650; }
.field { padding: 10px 0; border-top: 1px solid var(--line); }
.popover h3 + .field { border-top: 0; }
.field-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-weight: 600; }
.field-top output { color: var(--accent); font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.field input[type=range] { height: 30px; }
.help { display: block; margin: 0; color: var(--faint); font-size: 12px; font-weight: 400; }

/* ------------------------------------------------------------ share sheet */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility 0s linear .2s;
}
.sheet {
  position: fixed;
  z-index: 31;
  left: 50%;
  top: 50%;
  width: min(460px, calc(100% - 24px));
  max-height: calc(100% - 24px - var(--safe-t) - var(--safe-b));
  overflow-y: auto;
  padding: 18px 20px 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  backdrop-filter: blur(26px) saturate(160%);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.98);
  visibility: hidden;
  transition: opacity .2s, transform .2s, visibility 0s linear .2s;
}
body.sheet-open .sheet-backdrop { opacity: 1; visibility: visible; transition: opacity .2s; }
.sheet.open { opacity: 1; transform: translate(-50%, -50%); visibility: visible; transition: opacity .2s, transform .2s; }
/* while fading out, a closed sheet and its backdrop let taps through to what's underneath */
.sheet-backdrop, .sheet:not(.open) { pointer-events: none; }
body.sheet-open .sheet-backdrop { pointer-events: auto; }
.sheet.wide { width: min(540px, calc(100% - 24px)); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin: 0 -8px 2px 0; }
.sheet h2 { margin: 0; font-size: 17px; font-weight: 650; }
.sheet .sub { margin: 4px 0 14px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.field-label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 600; }
.text {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  -webkit-user-select: text;
  user-select: text;
}
.text:focus { border-color: var(--accent); }
.text:disabled { opacity: 0.5; }
.share-progress { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.share-progress .bar { flex: none; width: 120px; height: 5px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, 0.15); }
.share-progress .bar i { display: block; width: 0; height: 100%; background: var(--accent); transition: width .25s; }
.share-link { display: flex; gap: 6px; margin: 14px 0 0; }
.share-link .text { flex: 1; min-width: 0; font-size: 13px; }
.sheet .help { margin: 10px 0 0; min-height: 1.2em; }
.sheet-actions { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.sheet-actions .grow { flex: 1; }
.btn.danger { color: var(--danger); }
.btn.danger.armed { background: var(--danger); border-color: transparent; color: #2a0b08; }

/* ------------------------------------------------------------ walls, people, sign-in */
.avatar {
  --hue: 220;
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: hsl(var(--hue) 45% 38%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  overflow: hidden;
}
.avatar.small { width: 22px; height: 22px; font-size: 10px; }
.avatar.big { width: 44px; height: 44px; font-size: 16px; }
.avatar-slot { display: inline-flex; }
#btnWalls .avatar { margin: 0 -2px 0 -5px; }

.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 22px 0 14px;
  border: 1px solid #dadce0;
  border-radius: 999px;
  background: #fff;
  color: #1f1f1f;
  font: 600 15px/1 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .15s, transform .12s;
}
.btn-google:hover { background: #f2f2f2; }
.btn-google:active { transform: scale(0.97); }
.btn-google .i { width: 20px; height: 20px; }

.section { margin-top: 18px; }
.section.first { margin-top: 6px; }
.section-title { margin: 0 0 8px; color: var(--faint); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.rows { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.rows:empty { display: none; }
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}
.row .meta { flex: 1; min-width: 0; }
.row .name, .row .dims { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-actions { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.row .chip { height: 30px; padding: 0 11px; text-decoration: none; color: inherit; }
.row .chip.danger { color: var(--danger); }
.row.wide { flex-wrap: wrap; }
.row .confirm-line { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 0 2px 48px; font-size: 13px; color: var(--muted); }
.results .row { padding: 7px 10px; font-size: 13px; }
.results .row .i { color: var(--accent); }
.results .ok .i { color: #8fe3a0; }

.wall-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  cursor: pointer;
}
.wall-item:hover { background: rgba(255, 255, 255, 0.08); }
.wall-item.current { border-color: rgba(255, 207, 112, 0.5); background: rgba(255, 207, 112, 0.07); }
.wall-item .thumb, .row .thumb { width: 56px; height: 42px; }
.cover-empty { flex: none; display: grid; place-items: center; width: 56px; height: 42px; border-radius: 8px; background: #1d1d22; color: var(--faint); }
.account { display: flex; align-items: center; gap: 12px; margin: 6px 0 4px; }
.account .meta { flex: 1; min-width: 0; }
.account .name { font-weight: 650; }
.account .dims { display: block; overflow: hidden; text-overflow: ellipsis; }
.inline-form { display: flex; gap: 8px; }
.inline-form .text { flex: 1; min-width: 0; }
.note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 207, 112, 0.28);
  border-radius: 12px;
  background: rgba(255, 207, 112, 0.07);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.5;
}
.sheet .note + .help { margin-top: 10px; }
.sheet .help a { color: var(--accent); }
.help .link-btn, .note .link-btn { display: inline; padding: 0; font-size: inherit; vertical-align: baseline; }
.share-link + .help { margin-top: 8px; }
.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}
.link-btn .i { width: 17px; height: 17px; }
.confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.confirm .lead { flex-basis: 100%; color: var(--text); }
.sheet-center { text-align: center; }
.sheet-center .btn-google { margin: 16px 0 6px; }

/* the wall's empty state and the gate shown to people who can't see a wall (yet) */
body.walled .local-card, body:not(.walled) .wall-card { display: none; }
.empty .walls-cta { margin: 22px 0 0; }
.empty .walls-cta .link-btn { margin: 0 auto; font-size: 14px; }
body.loading .empty-card { visibility: hidden; }
.empty.gate { z-index: 6; }
body:not(.gated) .empty.gate { display: none; }
body.gated .empty.gate { display: grid; }
body.gated .empty:not(.gate), body.gated .dock { display: none; }
body.gated .topbar { background: none; }
body.gated .topbar .actions > :not(#btnWalls) { display: none !important; }
.gate-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 22px; border-radius: 20px; background: rgba(255, 207, 112, 0.1); color: var(--accent); }
.gate-icon .i { width: 30px; height: 30px; }
.gate .empty-actions .btn-google { margin: 0; }
.gate .fine a, .gate .fine button { color: var(--accent); }

/* the photo list on a wall: only the owner rearranges */
.list.fixed-order .grip, .list.fixed-order .updown { display: none; }
.list.fixed-order .item { padding-left: 8px; }
.item.pending .thumb { opacity: 0.5; }
.item.failed .dims { color: var(--danger); }
.mini.gone { visibility: hidden; }


/* ------------------------------------------------------------ empty state */
.empty {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: none;
  place-items: center;
  padding: 24px;
  background: radial-gradient(1100px 680px at 50% 38%, #18181d 0%, var(--bg) 72%);
}
body.is-empty .empty { display: grid; }
.empty-card { max-width: 460px; text-align: center; }
.empty h1 { margin: 0 0 10px; font-size: clamp(30px, 6vw, 42px); font-weight: 700; letter-spacing: -0.02em; }
.empty p { margin: 0 auto 26px; max-width: 390px; color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.empty .fine { margin: 16px 0 0; color: var(--faint); font-size: 13px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.empty .tip {
  max-width: 340px;
  margin: 18px auto 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}
body:not(.ios) .ios-only, body.ios .no-ios, body:not(.can-folder) .folder-only, body.standalone .not-standalone { display: none; }
.empty .tip + .tip { margin-top: 10px; }

.tunnel {
  position: relative;
  width: 148px;
  height: 104px;
  margin: 0 auto 26px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #0d0d10;
}
.tunnel i {
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--accent);
  border-radius: 14px;
  opacity: 0;
  animation: tunnel 5s cubic-bezier(.6, 0, 1, .7) infinite;
}
.tunnel i:nth-child(2) { animation-delay: -1s; border-color: #8fd3ff; }
.tunnel i:nth-child(3) { animation-delay: -2s; border-color: #ff9fb6; }
.tunnel i:nth-child(4) { animation-delay: -3s; border-color: #a6f0b0; }
.tunnel i:nth-child(5) { animation-delay: -4s; border-color: #c9b2ff; }
@keyframes tunnel {
  0% { transform: scale(0.06); opacity: 0; }
  12% { opacity: 1; }
  80% { opacity: 0.9; }
  100% { transform: scale(1.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .tunnel i { animation-duration: 16s; }
}

/* ------------------------------------------------------------ drop, toasts, hint */
.dropzone {
  position: fixed;
  inset: calc(12px + var(--safe-t)) 12px calc(12px + var(--safe-b));
  z-index: 40;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(255, 207, 112, 0.75);
  border-radius: 26px;
  background: rgba(5, 5, 6, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s, visibility 0s linear .15s;
}
body.dropping .dropzone { opacity: 1; visibility: visible; transition: opacity .15s; }
.dropzone div { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 650; }
.dropzone .i { width: 24px; height: 24px; color: var(--accent); }

.toasts {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(82px + var(--safe-b));
  width: min(460px, calc(100% - 24px));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
body.is-empty .toasts { bottom: calc(24px + var(--safe-b)); }
.toast {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  font-size: 13.5px;
  pointer-events: auto;
  animation: toast-in .22s ease-out;
  transition: opacity .2s, transform .2s;
}
.toast.out { opacity: 0; transform: translateY(6px); }
.toast-text { flex: 1; }
.toast button {
  flex: none;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 650;
  cursor: pointer;
}
.toast .bar { flex: none; width: 90px; height: 4px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, 0.15); }
.toast .bar i { display: block; width: 0; height: 100%; background: var(--accent); transition: width .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.toast .spinner {
  flex: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hint {
  position: fixed;
  z-index: 9;
  left: 50%;
  bottom: calc(84px + var(--safe-b));
  max-width: calc(100% - 24px);
  transform: translateX(-50%);
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s;
}
body.show-hint .hint { opacity: 1; }

/* ------------------------------------------------------------ layout variants */
@media (min-width: 900px) {
  body.panel-open .dock { left: calc((100% - 416px - var(--fab)) / 2); width: min(380px, calc(100% - 440px - var(--fab))); }
  body.panel-open .fab { left: calc((100% - 416px - var(--fab)) / 2 + min(190px, (100% - 440px - var(--fab)) / 2) + 8px); }
  body.panel-open .hint, body.panel-open .toasts { left: calc((100% - 416px) / 2); }
}

@media (max-width: 640px) {
  .panel {
    top: auto;
    left: calc(8px + var(--safe-l));
    right: calc(8px + var(--safe-r));
    bottom: calc(8px + var(--safe-b));
    width: auto;
    height: 70vh;
    height: min(70dvh, 620px);
    transform: translateY(calc(100% + 24px));
  }
  body.panel-open .dock, body.panel-open .fab, body.panel-open .hint { opacity: 0; pointer-events: none; }
}

@media (max-width: 560px) {
  .topbar .btn .label, .brand-sub { display: none; }
  .brand span { display: none; }
  body.walled .brand .brand-sub:not(:empty) { display: block; max-width: calc(100vw - 300px); color: var(--text); font-weight: 650; }
  body.walled .brand-sub::before { display: none; }
  .topbar .btn { width: 40px; padding: 0; }
  .dock { padding: 4px; }
  .dock .btn.icon { width: 36px; min-width: 36px; height: 38px; }
  .fab { height: 48px; }
  #btnFull { display: none; }
  .counter { min-width: 46px; padding: 0 2px; font-size: 12px; }
  .hint { width: max-content; white-space: normal; text-wrap: balance; text-align: center; border-radius: 16px; }
}

@media (max-width: 420px) {
  .mini.updown { display: none; }
}
