:root {
  --bg-app: #121212;
  --bg-elevated: #181818;
  --bg-sidebar: #000000;
  --photo-color-1-rgb: 30, 30, 30;
  --photo-color-2-rgb: 18, 18, 18;
  --border-subtle: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-muted: #b3b3b3;
  --accent: #1db954;
  --accent-hover: #1ed760;
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-player: 0 -4px 32px rgba(0, 0, 0, 0.45);
  --font: "DM Sans", system-ui, sans-serif;
  --transition-fast: 180ms ease;
  --transition-image: 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font);
  background: var(--bg-app);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: 0;
  background: #000;
}

.app--in-home,
.app--in-album {
  padding-bottom: 56px;
}

.app--in-album {
  height: 100dvh;
  overflow: hidden;
}

.app--in-album .album-shell,
.app--in-album .album-main {
  overflow: hidden;
}

/* —— Home tab —— */
.home-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.home-card {
  width: min(760px, 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: linear-gradient(180deg, #141414 0%, #0a0a0a 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  padding: 28px 22px;
}

.home-card__eyebrow {
  margin: 0 0 8px;
  color: var(--text-muted);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-size: 0.74rem;
}

.home-card__title {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 4.5vw, 2.7rem);
  letter-spacing: -0.03em;
}

.home-card__intro {
  margin: 0;
  color: #d2d2d2;
  max-width: 64ch;
  line-height: 1.55;
}

.home-card__actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 40px;
  padding: 0 16px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.home-btn--primary {
  background: #fff;
  color: #000;
}

.home-btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: var(--border-subtle);
}

/* —— Library (start screen) —— */
.library-shell {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 12px 16px;
  -webkit-overflow-scrolling: touch;
}

.lib-top {
  padding: 8px 4px 12px;
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, #000 70%, transparent);
}

.lib-top__row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.lib-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e07800;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lib-top__title {
  flex: 1;
  margin: 0;
  font-size: clamp(1.5rem, 5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.lib-top__actions {
  display: flex;
  gap: 4px;
}

.lib-icon-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lib-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.lib-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.lib-chips::-webkit-scrollbar {
  display: none;
}

.lib-chip {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.lib-chip--icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.lib-chip--active {
  background: #fff;
  color: #000;
}

.lib-list-head {
  display: flex;
  justify-content: flex-end;
  padding: 4px 4px 10px;
}

.lib-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.lib-sort:hover {
  color: var(--text-primary);
}

.lib-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lib-row {
  margin-bottom: 4px;
}

.lib-row__hit {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 6px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.lib-row__hit:hover {
  background: rgba(255, 255, 255, 0.06);
}

.lib-row__cover {
  width: 60px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  background: var(--bg-elevated);
}

.lib-row__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.lib-row__title {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lib-row__sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* —— Album shell —— */
.album-shell {
  flex: 1;
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: 1fr;
  min-height: 0;
  background: var(--bg-app);
}

.album-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(
    180deg,
    rgba(var(--photo-color-1-rgb), 0.42) 0%,
    rgba(var(--photo-color-2-rgb), 0.2) 30%,
    var(--bg-app) 58%
  );
  transition: background 300ms ease;
  padding: 24px 32px 140px;
}

/* —— Sidebar —— */
.sidebar {
  grid-area: sidebar;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 16px 12px 12px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  z-index: 2;
}

.nav-overlay {
  display: none;
}

@media (min-width: 961px) {
  .app--mini-sidebar .album-shell {
    grid-template-columns: 88px 1fr;
  }

  .app--mini-sidebar .sidebar__title {
    display: none;
  }

  .app--mini-sidebar .sidebar__brand {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }

  .app--mini-sidebar .sidebar__back {
    display: none;
  }

  .app--mini-sidebar .sidebar__label {
    display: none;
  }

  .app--mini-sidebar .sidebar__link {
    justify-content: center;
    padding: 10px 8px;
  }

  .app--mini-sidebar .sidebar__thumb {
    width: 44px;
    height: 44px;
  }
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sidebar__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: 4px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}

.sidebar__back:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.sidebar__logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #169c46);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.sidebar__title {
  font-size: 1.1rem;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.sidebar__link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.sidebar__link--active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.sidebar__thumb {
  width: 42px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-elevated);
}

.sidebar__label {
  font-size: 0.9rem;
  font-weight: 500;
}

.sidebar__collapse {
  margin-top: auto;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar__collapse:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.sidebar__collapse-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.main__header {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
}

.main__menu {
  display: none;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.main__menu:hover {
  background: rgba(255, 255, 255, 0.12);
}

.main__breadcrumb {
  flex: 1;
  min-width: 0;
}

.main__eyebrow {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.main__album-title {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.main__meta {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* —— Viewer —— */
.viewer {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.viewer__frame {
  position: relative;
  width: min(100%, 1100px);
  flex: 1;
  min-height: 0;
  max-height: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.viewer__media {
  position: relative;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewer__media img {
  display: block;
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  transition: opacity var(--transition-image);
  cursor: zoom-in;
}

/* Maximize preview: wide shots use width; tall shots use height */
.viewer__media--landscape img {
  width: 100%;
  height: auto;
  max-height: 100%;
}

.viewer__media--portrait img {
  height: 100%;
  width: auto;
  max-width: 100%;
}

.viewer__media--square img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

#currentImage:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.viewer__img--dim {
  opacity: 0;
}

.viewer__fade {
  display: none;
}

.viewer__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), transform var(--transition-fast);
  z-index: 2;
  backdrop-filter: blur(6px);
}

.viewer__arrow:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.65);
  transform: translateY(-50%) scale(1.05);
}

.viewer__arrow:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.viewer__arrow--prev {
  left: 12px;
}

.viewer__arrow--next {
  right: 12px;
}

.viewer__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 20px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  font-size: 0.9rem;
  color: #eee;
  z-index: 1;
}

/* —— Full-screen photo (pinch zoom) —— */
body.lightbox-open {
  overflow: hidden;
  touch-action: none;
}

/* [hidden] must win over display:flex or the overlay stays visible and blocks the whole app */
.photo-lightbox[hidden] {
  display: none !important;
}

.photo-lightbox:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.96);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

.photo-lightbox__close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 2;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.photo-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.photo-lightbox__close-x {
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 300;
}

.photo-lightbox__stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  min-height: 0;
}

.photo-lightbox__pan {
  transform-origin: center center;
  will-change: transform;
}

.photo-lightbox__pan img {
  max-width: min(100vw, 100%);
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.photo-lightbox__hint {
  flex-shrink: 0;
  margin: 0;
  padding: 10px 16px 16px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* —— Player (fixed above bottom nav) —— */
.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 56px;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(140px, 260px) minmax(200px, 1fr) minmax(100px, 160px);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 12px;
  background: linear-gradient(
    180deg,
    rgba(var(--photo-color-1-rgb), 0.5) 0%,
    rgba(var(--photo-color-2-rgb), 0.88) 100%
  );
  border-top: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-player);
  transition: background 300ms ease;
}

.player__now {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
}

.player__thumb {
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #000;
  flex-shrink: 0;
}

.player__track-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.player__track-title {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player__track-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player__controls {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.player__btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.player__btn:hover {
  color: var(--text-primary);
}

.player__btn--play {
  width: 48px;
  height: 48px;
  background: #fff;
  color: #000;
}

/* Hide play/pause until user opens an album (library uses #app without .app--in-album) */
#btnPlayPause {
  display: none !important;
}

.app--in-album #btnPlayPause {
  display: flex !important;
}

.player__btn--play:hover {
  transform: scale(1.06);
  color: #000;
}

.player__btn--muted {
  color: var(--accent);
}

.player__progress-wrap {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.player__time {
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  flex-shrink: 0;
}

.player__bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  touch-action: none;
}

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

.player__bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--text-muted);
  border-radius: 3px;
  pointer-events: none;
}

.player__bar:hover .player__bar-fill {
  background: var(--accent);
}

.player__volume {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.player__volume-slider {
  width: 96px;
  accent-color: var(--accent);
  cursor: pointer;
}

.player__meta-actions {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.player__btn--info {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  border-radius: 50%;
}

.player__btn--info:hover {
  transform: scale(1.04);
  background: rgba(255, 255, 255, 0.14);
}

/* —— Bottom nav (mobile-style dock) —— */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: none;
  justify-content: space-around;
  align-items: stretch;
  min-height: 56px;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(0, 0, 0, 0.97);
  border-top: 1px solid var(--border-subtle);
}

.app--in-home .bottom-nav,
.app--in-album .bottom-nav {
  display: flex;
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 120px;
  background: none;
  border: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 4px;
}

.bottom-nav__item svg {
  opacity: 0.85;
}

.bottom-nav__item--active {
  color: var(--text-primary);
}

.bottom-nav__item--active svg {
  opacity: 1;
}

.audio-hint {
  display: none;
  position: fixed;
  bottom: 152px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(90vw, 420px);
  padding: 10px 16px;
  background: rgba(30, 215, 96, 0.12);
  border: 1px solid rgba(30, 215, 96, 0.35);
  border-radius: var(--radius-md);
  color: #c8f7d8;
  font-size: 0.8rem;
  text-align: center;
  z-index: 7;
  transition: opacity 400ms ease, transform 400ms ease;
  pointer-events: none;
}

.app--in-album .audio-hint {
  display: block;
}

.album-end[hidden] {
  display: none !important;
}

.album-end:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 215;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  padding: 16px;
}

.album-end__card {
  width: min(420px, 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: #111;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.6);
  padding: 18px;
  text-align: center;
}

.album-end__eyebrow {
  margin: 0 0 4px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.album-end__title {
  margin: 0 0 16px;
  font-size: 1.35rem;
}

.album-end__next {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  text-align: left;
}

.album-end__cover {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.album-end__next-text {
  min-width: 0;
}

.album-end__label {
  margin: 0 0 2px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.album-end__next-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.album-end__actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.album-end__btn {
  border: none;
  border-radius: 999px;
  min-height: 38px;
  padding: 0 18px;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.album-end__btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.album-end__btn--primary {
  background: var(--accent);
  color: #000;
  font-weight: 700;
}

.album-end__library {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.album-end__library:hover {
  color: #fff;
}

.photo-info[hidden] {
  display: none !important;
}

.photo-info:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.66);
  padding: 16px;
}

.photo-info__card {
  width: min(540px, 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: #111;
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.6);
  padding: 14px;
}

.photo-info__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.photo-info__title {
  margin: 0;
  font-size: 1rem;
}

.photo-info__close {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.photo-info__photo-title {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.photo-info__label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.photo-info__input {
  width: 100%;
  resize: vertical;
  min-height: 90px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: #090909;
  color: #fff;
  font: inherit;
  padding: 10px;
}

.photo-info__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.photo-info__btn {
  border: none;
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}

.photo-info__btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.photo-info__btn--save {
  background: #fff;
  color: #000;
  font-weight: 700;
}

.audio-hint--gone {
  opacity: 0;
  transform: translate(-50%, 8px);
}

/* —— Responsive —— */
@media (max-width: 960px) {
  .home-shell {
    padding: 16px 12px;
  }

  .home-card {
    padding: 22px 16px;
  }

  .album-shell {
    display: block;
    position: relative;
  }

  .main__menu {
    display: inline-flex;
    align-items: center;
  }

  .nav-overlay:not([hidden]) {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 152px;
    z-index: 4;
    background: rgba(0, 0, 0, 0.55);
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 152px;
    width: min(86vw, 300px);
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.5);
    z-index: 5;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
  }

  .sidebar:not(.sidebar--collapsed) {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar.sidebar--collapsed {
    transform: translateX(-105%);
    opacity: 0;
    pointer-events: none;
  }

  .album-main {
    height: calc(100dvh - 56px);
    min-height: 0;
    padding: 16px 16px 160px;
  }

  .player {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }

  .player__controls {
    width: auto;
    order: 0;
    grid-column: 2;
    grid-row: 1;
    gap: 2px;
  }

  .player__now {
    order: 0;
    grid-column: 1;
    grid-row: 1;
  }

  .player__progress-wrap {
    display: none;
  }

  .player__volume {
    display: none;
  }

  .player__meta-actions {
    order: 0;
    width: auto;
    grid-column: 3;
    grid-row: 1;
    justify-content: flex-end;
  }

  .player__thumb {
    width: 42px;
    height: 42px;
  }

  .player__track-title {
    font-size: 0.95rem;
  }

  .player__track-sub {
    font-size: 0.75rem;
  }

  .player__btn--play {
    width: 38px;
    height: 38px;
  }

  .player__btn--skip {
    padding: 6px;
  }

  .player__btn--info {
    width: 34px;
    height: 34px;
    border-width: 1px;
    font-size: 0.95rem;
  }

  .sidebar__collapse {
    display: none;
  }
}
