:root {
  color-scheme: dark;
  --bg: #050505;
  --text: #f6f1e8;
  --muted: rgba(246, 241, 232, 0.7);
  --panel: rgba(10, 10, 10, 0.58);
  --line: rgba(255, 255, 255, 0.18);
  --accent: #d8b36a;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.lucide {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  pointer-events: none;
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

button[data-icon][aria-pressed="true"] {
  border-color: var(--accent);
  background: rgba(216, 179, 106, 0.22);
}

.gallery-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(circle at 50% 50%, rgba(216, 179, 106, 0.08), transparent 46%),
    #050505;
}

.stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.slide,
.slide-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.slide {
  object-fit: contain;
  transform: translate(var(--focus-offset-x, 0%), var(--focus-offset-y, 0%)) scale(var(--focus-scale, 1));
  transform-origin: 50% 50%;
  transition:
    opacity 1400ms ease,
    transform var(--focus-duration, 3000ms) cubic-bezier(0.42, 0, 0.58, 1);
  background: transparent;
}

.slide-backdrop {
  object-fit: cover;
  transform: scale(1.08);
  transition: opacity 1400ms ease;
  filter: blur(32px) saturate(0.82) brightness(0.45);
}

.loading-preview {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  filter: blur(16px) saturate(0.9) brightness(0.72);
  transform: scale(1.035);
  transition: opacity 160ms ease;
  pointer-events: none;
}

.slide.is-visible,
.slide-backdrop.is-visible {
  opacity: 1;
}

.soft-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.35), transparent 18%, transparent 78%, rgba(0, 0, 0, 0.42)),
    linear-gradient(to right, rgba(0, 0, 0, 0.38), transparent 16%, transparent 84%, rgba(0, 0, 0, 0.38));
}

.stage::before,
.stage::after {
  content: "";
  position: absolute;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
}

.stage::before {
  inset: 0;
  background: rgba(0, 0, 0, 0.16);
}

.stage::after {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: photo-loading-spin 850ms linear infinite;
}

.gallery-shell.is-loading-photo .loading-preview,
.gallery-shell.is-loading-photo .stage::before,
.gallery-shell.is-loading-photo .stage::after {
  opacity: 1;
}

@keyframes photo-loading-spin {
  to { transform: rotate(360deg); }
}

.top-bar {
  position: fixed;
  top: 24px;
  left: 24px;
  right: 24px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  opacity: 0;
  transition: opacity 240ms ease;
  pointer-events: none;
}

.gallery-shell.controls-visible .top-bar,
.gallery-shell.controls-visible .controls,
.gallery-shell.controls-visible .settings-panel,
.gallery-shell.has-empty-state .top-bar,
.gallery-shell.has-empty-state .controls,
.gallery-shell.has-empty-state .settings-panel {
  opacity: 1;
  pointer-events: auto;
}

.brand,
.status,
.controls,
.settings-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 14px;
  letter-spacing: 0;
}

.brand-mark {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 22px rgba(216, 179, 106, 0.9);
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  max-width: min(52vw, 560px);
  padding: 11px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
}

.status-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 999px;
  color: var(--text);
  opacity: 0.78;
}

.status-action-icon .lucide {
  width: 15px;
  height: 15px;
}

.controls {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(4, 48px);
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 240ms ease;
}

.controls button,
.primary-action,
.secondary-action {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.controls button {
  width: 48px;
  height: 44px;
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
}

.controls button:hover,
.primary-action:hover,
.secondary-action:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.32);
}

.controls button:active,
.primary-action:active,
.secondary-action:active {
  transform: scale(0.98);
}

.settings-panel {
  position: fixed;
  right: 24px;
  bottom: 34px;
  z-index: 7;
  width: min(290px, calc(100vw - 48px));
  padding: 14px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 240ms ease;
}

.settings-panel label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.interval-row {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 12px;
  align-items: center;
}

.interval-row input {
  width: 100%;
  accent-color: var(--accent);
}

.interval-row output {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.progress {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--accent);
}

.empty-state {
  z-index: 4;
  width: min(680px, calc(100vw - 36px));
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 9, 9, 0.72);
  text-align: center;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.empty-state.is-hidden {
  display: none;
}

.kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.empty-state h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: 0;
}

.empty-state p {
  margin: 14px auto 0;
  max-width: 48ch;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.empty-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.album-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.album-list:empty {
  display: none;
}

.album-button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.album-button span:first-of-type {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-button span:last-child {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.primary-action,
.secondary-action {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 6px;
}

.primary-action {
  border-color: rgba(216, 179, 106, 0.5);
  background: rgba(216, 179, 106, 0.22);
}

.admin-panel {
  position: fixed;
  inset: 8px;
  z-index: 20;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 5, 5, 0.94);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
}

.admin-panel.is-hidden {
  display: none;
}

.upload-panel {
  position: fixed;
  inset: 0;
  z-index: 24;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.68);
}

.upload-panel.is-hidden {
  display: none;
}

.upload-dialog {
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 8, 8, 0.96);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
}

.upload-form {
  display: grid;
  gap: 12px;
}

.file-drop {
  display: grid;
  gap: 8px;
  padding: 22px;
  border: 1px dashed rgba(216, 179, 106, 0.55);
  border-radius: 8px;
  background: rgba(216, 179, 106, 0.08);
  cursor: pointer;
}

.file-drop span {
  font-size: 20px;
}

.file-drop small,
.upload-form p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.upload-form input {
  color: var(--muted);
}

.my-uploads {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.my-uploads h3 {
  margin: 0;
  font-size: 18px;
}

.my-upload-list {
  display: grid;
  gap: 8px;
}

.my-upload-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.my-upload-card img {
  width: 62px;
  height: 46px;
  object-fit: cover;
  border-radius: 5px;
  background: #111;
}

.my-upload-card strong,
.my-upload-card small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-upload-card small {
  color: var(--muted);
}

.my-upload-card button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-header h2 {
  margin: 0;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.08;
  letter-spacing: 0;
}

.icon-action {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
}

.admin-body {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(286px, 340px);
  gap: 10px;
}

.review-stage {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #020202;
}

.review-stage.is-adding-face {
  cursor: crosshair;
  touch-action: none;
}

.review-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.face-overlay {
  position: absolute;
  inset: 0;
}

.face-box {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.face-box::after {
  content: attr(data-index);
  position: absolute;
  top: -26px;
  left: -2px;
  min-width: 24px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
}

.face-box.is-selected {
  border-color: var(--accent);
  background: rgba(216, 179, 106, 0.18);
}

.face-box.is-selected::after {
  background: var(--accent);
  color: #1b1407;
}

.face-box.is-manual {
  border-style: dashed;
}

.manual-draft-box {
  position: absolute;
  border: 2px dashed var(--accent);
  border-radius: 6px;
  background: rgba(216, 179, 106, 0.16);
  pointer-events: none;
}

.review-sidebar {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.review-sidebar p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.review-sidebar h3 {
  margin: 6px 0 10px;
  font-size: 20px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.review-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.review-actions button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
}

.review-actions button:last-child {
  grid-column: 1 / -1;
  border-color: rgba(216, 179, 106, 0.5);
  background: rgba(216, 179, 106, 0.22);
}

@media (max-width: 720px) {
  .top-bar {
    top: max(10px, env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
  }

  .brand {
    display: none;
  }

  .status {
    max-width: none;
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    font-size: 13px;
  }

  .controls {
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    transform: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
  }

  .controls button {
    min-width: 0;
    width: 100%;
    height: 40px;
  }

  .settings-panel {
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(max(10px, env(safe-area-inset-bottom)) + 66px);
    width: auto;
    padding: 10px 12px;
  }
  .settings-panel label { margin-bottom: 8px; font-size: 12px; }
  .top-bar { flex-wrap: wrap; }

  .admin-panel {
    inset: 10px;
  }

  .admin-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(120px, 1fr) minmax(0, 220px);
  }

  .review-sidebar {
    min-height: 0;
  }
}


.empty-state {
  max-height: calc(100vh - 230px);
  overflow-y: auto;
}

.face-box-surface {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.face-box.is-editing { z-index: 2; border-style: solid; }
.face-box-tools {
  position: absolute;
  top: 6px;
  display: flex;
  width: max-content;
  z-index: 3;
  background: #171717;
  border: 1px solid var(--accent);
  border-radius: 6px;
}
.face-box-tools button {
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 21px;
  cursor: pointer;
}
.face-box-tools button:hover { background: #51432b; }
.box-resize-handle {
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border: 2px solid #161616;
  border-radius: 4px;
  z-index: 4;
  touch-action: none;
}
.box-resize-handle.nw { left: -9px; top: -9px; cursor: nwse-resize; }
.box-resize-handle.ne { right: -9px; top: -9px; cursor: nesw-resize; }
.box-resize-handle.sw { left: -9px; bottom: -9px; cursor: nesw-resize; }
.box-resize-handle.se { right: -9px; bottom: -9px; cursor: nwse-resize; }
.review-stage.is-adding-face .face-box { pointer-events: none; }

.face-box.label-inside::after { top: 4px; left: 4px; pointer-events: none; }

/* Playback chrome follows activity, not the pointer merely resting on stage. */
.gallery-shell:not(.has-empty-state):not(.controls-visible):not(.keyboard-controls) {
  cursor: none;
}
.controls,
.settings-panel {
  pointer-events: none;
}
.gallery-shell:not(.has-empty-state):not(.controls-visible):not(.keyboard-controls) .controls,
.settings-panel {
  pointer-events: none;
}
.gallery-shell.keyboard-controls .controls,
.gallery-shell.keyboard-controls .settings-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.top-actions { display: flex; gap: 8px; flex-shrink: 0; }
.top-action {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(10, 10, 10, 0.82);
  cursor: pointer;
  font-size: 14px;
}
.top-action:hover { background: #343027; }
.gallery-shell.keyboard-controls .top-bar {
  opacity: 1;
  pointer-events: auto;
}

.album-tools { display: flex; align-items: center; gap: 8px; min-width: 0; }
#shuffleButton {
  white-space: nowrap;
  color: var(--muted);
  border-color: var(--line);
  background: rgba(10, 10, 10, 0.82);
  box-shadow: none;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
#shuffleButton:hover { background: #343027; }
#shuffleButton:disabled { opacity: 0.55; cursor: wait; }
@media (max-width: 720px) {
  .top-actions { gap: 8px; }
  .top-action {
    min-height: 40px;
    padding: 0 14px;
  }
  .top-action[data-icon] { width: 40px; }
  .album-tools {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 40px minmax(0, 1fr);
    width: 100%;
    gap: 8px;
  }
  .album-tools .status { width: auto; flex: 1; }
  #shuffleButton { min-width: 40px; min-height: 40px; }
}

@media (max-width: 720px) and (orientation: portrait) {
  .top-bar {
    grid-template-columns: auto 40px minmax(0, 1fr);
    align-items: center;
  }

  .top-actions {
    grid-column: 1;
  }

  .album-tools {
    display: contents;
  }

  #shuffleButton {
    grid-column: 2;
  }

  .album-tools .status {
    grid-column: 3;
    width: 100%;
    min-width: 0;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .top-bar {
    top: max(8px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
  }

  .top-actions,
  .album-tools {
    gap: 6px;
  }

  .top-action,
  .top-action[data-icon],
  #shuffleButton,
  .status {
    min-height: 36px;
  }

  .top-action {
    padding: 0 12px;
    font-size: 13px;
  }

  .top-action[data-icon],
  #shuffleButton {
    width: 36px;
    min-width: 36px;
  }

  .status {
    width: auto;
    max-width: min(34vw, 230px);
    padding: 8px 12px;
    font-size: 12px;
  }

  .album-tools {
    width: auto;
    min-width: 0;
    margin-left: auto;
  }

  .controls {
    left: 50%;
    right: auto;
    bottom: max(8px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: min(300px, 38vw);
    grid-template-columns: repeat(4, minmax(42px, 1fr));
    padding: 6px;
    gap: 6px;
  }

  .controls button {
    height: 38px;
  }

  .settings-panel {
    left: auto;
    right: max(10px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    width: min(330px, 32vw);
    min-width: 250px;
    padding: 9px 12px;
  }

  .settings-panel label {
    margin-bottom: 6px;
    font-size: 12px;
  }

  .interval-row {
    grid-template-columns: minmax(120px, 1fr) 42px;
    gap: 10px;
  }
}

@media (max-width: 820px) and (max-height: 520px) and (orientation: landscape) {
  .controls {
    left: max(10px, env(safe-area-inset-left));
    transform: none;
    width: min(250px, 40vw);
  }

  .settings-panel {
    width: min(250px, 36vw);
    min-width: 210px;
  }
}

.top-action[data-icon] { width: 44px; padding: 0; position: relative; }
@media (max-width: 720px) {
  .top-action[data-icon] {
    width: 40px;
    min-width: 40px;
  }
}
@media (max-height: 520px) and (orientation: landscape) {
  .top-action[data-icon],
  #shuffleButton {
    width: 36px;
    min-width: 36px;
  }
}
#shuffleButton[aria-pressed="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(216, 179, 106, 0.28);
  box-shadow: inset 0 0 12px rgba(216, 179, 106, 0.14), 0 0 16px rgba(216, 179, 106, 0.25);
}
#shuffleButton[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(216, 179, 106, 0.65);
}

#shuffleButton[aria-pressed="true"] .lucide {
  stroke-width: 2.5;
  filter: drop-shadow(0 0 4px rgba(216, 179, 106, 0.55));
}
#shuffleButton[aria-pressed="false"] .lucide {
  stroke-width: 2;
  filter: none;
}


@media (min-width: 721px) and (max-width: 950px) {
  .settings-panel { bottom: 108px; }
}

.admin-panel, .upload-panel { cursor: auto; }

.button-tooltip {
  position: fixed;
  z-index: 100;
  max-width: min(280px, calc(100vw - 16px));
  padding: 9px 12px;
  border: 1px solid rgba(216, 179, 106, 0.45);
  border-radius: 7px;
  background: #201c16;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.button-tooltip[hidden] { display: none; }

.album-picker-button { cursor: pointer; text-align: left; }
.album-picker-button:hover { border-color: var(--accent); color: var(--text); }
.gallery-shell.has-empty-state .slide,
.gallery-shell.has-empty-state .slide-backdrop { visibility: hidden; }

/* Album selection exposes only actions that are usable before opening photos. */
.gallery-shell.has-empty-state .top-bar,
.gallery-shell.has-empty-state #settingsButton,
.gallery-shell.has-empty-state .album-tools,
.gallery-shell.has-empty-state .controls,
.gallery-shell.has-empty-state .settings-panel,
.gallery-shell.has-empty-state .progress {
  display: none;
}

#albumPasswordInput {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: #161616;
  min-width: 0;
  -webkit-text-security: disc;
}
#albumPasswordInput:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
#albumPasswordPanel { cursor: auto; }
#unlockAlbumButton:disabled { opacity: 0.55; cursor: wait; }
