.album-images {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.album-images__state {
  text-align: center;
  color: rgba(226, 232, 240, 0.65);
}
.search {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.search-header {
  display: grid;
  gap: 1rem;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.search-form input[type="search"] {
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.55);
  color: var(--fg);
}

.search-form input[type="search"]::placeholder {
  color: rgba(148, 163, 184, 0.75);
}

.search-status {
  font-size: 0.9rem;
  color: rgba(148, 163, 184, 0.85);
}

.search-results {
  display: grid;
  gap: clamp(1rem, 3vw, 1.5rem);
}

.search-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1.1rem;
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 20px 36px rgba(15, 23, 42, 0.45);
}

.search-item .search-thumb {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 1rem;
  background: rgba(30, 41, 59, 0.5);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.search-item .meta {
  display: grid;
  gap: 0.5rem;
}

.search-item .meta h2 {
  margin: 0;
  font-size: 1.1rem;
}

.search-item .meta span {
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.8);
}

.search-item .meta button {
  justify-self: flex-start;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.45);
  background: rgba(56, 189, 248, 0.18);
  color: rgba(191, 219, 254, 0.95);
  cursor: pointer;
}
:root {
  --bg: #0f172a;
  --fg: #e2e8f0;
  --accent: #38bdf8;
  --card-bg: rgba(15, 23, 42, 0.55);
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  display: flex;
}

main {
  flex: 1;
  padding: clamp(1rem, 4vw, 3rem);
  max-width: 1100px;
  width: min(100%, 1100px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.install-callout {
  display: grid;
  gap: 1rem;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.25),
    rgba(14, 165, 233, 0.12)
  );
  border-radius: 1.5rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid rgba(94, 234, 212, 0.3);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.4);
  align-items: center;
}

.install-callout.hidden {
  display: none;
}

.install-copy {
  display: grid;
  gap: 0.5rem;
}

.install-copy h2 {
  font-size: 1.35rem;
}

.install-copy p {
  margin: 0;
  color: rgba(15, 23, 42, 0.85);
}

.install-copy .install-hint {
  font-size: 0.85rem;
  color: rgba(15, 23, 42, 0.7);
}

.install-copy em {
  font-style: normal;
  font-weight: 600;
}

.install-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.install-actions button {
  background: rgba(15, 23, 42, 0.85);
  border: none;
  color: var(--fg);
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: opacity 0.2s ease;
}

.install-actions #dismiss-install {
  background: rgba(15, 23, 42, 0.55);
  color: rgba(226, 232, 240, 0.85);
}

.install-actions button:hover {
  opacity: 0.85;
}

.install-instructions {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 1rem;
  color: rgba(226, 232, 240, 0.9);
  font-size: 0.9rem;
  line-height: 1.5;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
}

.albums {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.albums header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.album-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: rgba(226, 232, 240, 0.7);
  font-size: 0.9rem;
}

.album-breadcrumb button {
  background: rgba(148, 163, 184, 0.12);
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.album-breadcrumb button:hover {
  background: rgba(148, 163, 184, 0.25);
}

.album-view {
  display: grid;
  gap: clamp(1rem, 3vw, 1.75rem);
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(1rem, 3vw, 1.75rem);
}

.album-node {
  position: relative;
  background: var(--card-bg);
  border-radius: 1.25rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.album-node:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 48px rgba(15, 23, 42, 0.4);
}

.album-thumb {
  width: 100%;
  border-radius: 1rem;
  background-size: cover;
  background-position: center;
  min-height: 160px;
  display: grid;
  place-items: center;
  color: rgba(226, 232, 240, 0.65);
  background-color: rgba(30, 41, 59, 0.65);
  position: relative;
  overflow: hidden;
}

.album-thumb.placeholder::after {
  content: "Album";
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.album-node header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.album-meta {
  font-size: 0.85rem;
  color: rgba(226, 232, 240, 0.65);
}

.album-images {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.album-image {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.album-image:hover {
  border-color: rgba(59, 130, 246, 0.7);
  transform: translateY(-2px);
}

.album-image-thumb {
  width: 70px;
  height: 70px;
  border-radius: 0.9rem;
  background: rgba(30, 41, 59, 0.5);
  background-size: cover;
  background-position: center;
}

.album-image-label {
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.85);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hint,
.empty-state {
  text-align: center;
  color: rgba(226, 232, 240, 0.65);
}

.faces {
  position: relative;
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.faces-detail {
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.faces-detail__header {
  display: grid;
  gap: 0.75rem;
}

.faces-detail__header h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.faces-detail__header p {
  margin: 0;
  color: rgba(226, 232, 240, 0.7);
}

.faces-detail__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.faces-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.55);
  color: rgba(226, 232, 240, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
}

.faces-detail__back:hover {
  border-color: rgba(96, 165, 250, 0.6);
  color: rgba(191, 219, 254, 0.95);
}

.faces-detail__people {
  display: grid;
  gap: clamp(0.75rem, 3vw, 1.25rem);
  background: rgba(15, 23, 42, 0.55);
  border-radius: 1.25rem;
  padding: clamp(1rem, 3vw, 1.5rem);
}

.faces-detail__person {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-radius: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.faces-detail__person-thumb {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.6);
  background-size: cover;
  background-position: center;
}

.faces-detail__person-info {
  display: grid;
  gap: 0.2rem;
}

.faces-detail__person-info strong {
  font-size: 1rem;
}

.faces-detail__person-info span {
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.85);
}

.faces-detail__assets {
  display: grid;
  gap: clamp(1rem, 3vw, 1.75rem);
}

.faces-detail__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(1rem, 3vw, 1.5rem);
}

.faces-detail__asset {
  display: grid;
  gap: 0.6rem;
  background: rgba(15, 23, 42, 0.55);
  border-radius: 1.1rem;
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.faces-detail__asset-thumb {
  width: 100%;
  border-radius: 0.9rem;
  background: rgba(30, 41, 59, 0.6);
  background-size: cover;
  background-position: center;
  aspect-ratio: 3 / 2;
}

.faces-detail__asset-meta {
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.85);
  display: flex;
  justify-content: space-between;
}

.faces-detail__view {
  background: rgba(96, 165, 250, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.4);
  color: rgba(191, 219, 254, 0.95);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.faces-detail__view:hover {
  background: rgba(96, 165, 250, 0.25);
}

.faces-grid {
  display: grid;
  gap: clamp(1rem, 3vw, 1.75rem);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.faces-person {
  position: relative;
  background: rgba(15, 23, 42, 0.55);
  border-radius: 1.25rem;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  display: grid;
  gap: 0.75rem;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.45);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.faces-person:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.5);
}

.faces-person--selected {
  border-color: rgba(59, 130, 246, 0.7);
  box-shadow: 0 24px 42px rgba(37, 99, 235, 0.35);
}

.faces-thumb {
  width: 100%;
  border-radius: 1rem;
  background: rgba(30, 41, 59, 0.6);
  background-size: cover;
  background-position: center;
  min-height: 180px;
  position: relative;
  overflow: hidden;
}

.faces-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0) 10%,
    rgba(15, 23, 42, 0.55)
  );
  opacity: 0;
  transition: opacity 0.2s ease;
}

.faces-person:hover .faces-thumb::after,
.faces-person--selected .faces-thumb::after {
  opacity: 1;
}

.faces-person header {
  display: grid;
  gap: 0.35rem;
}

.faces-person h3 {
  font-size: 1.1rem;
  color: rgba(248, 250, 252, 0.95);
}

.faces-count {
  font-size: 0.9rem;
  color: rgba(226, 232, 240, 0.7);
}

.faces-meta {
  display: flex;
  justify-content: flex-end;
}

.faces-select {
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.9);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.faces-person--selected .faces-select {
  color: rgba(96, 165, 250, 0.9);
}

.faces-confirm {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1.5rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(
    135deg,
    rgba(48, 195, 158, 0.9),
    rgba(59, 130, 246, 0.8)
  );
  border: none;
  color: var(--fg);
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 1200;
}

.faces-confirm[hidden] {
  display: none;
}

.faces-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 44px rgba(15, 23, 42, 0.6);
}

.faces-confirm-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.2);
  font-size: 1.1rem;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.75);
  padding: 2rem;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 1.5rem;
  max-width: min(900px, 90vw);
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-close {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 2rem;
  color: rgba(226, 232, 240, 0.8);
  cursor: pointer;
  padding: 1rem;
}

.modal-body {
  padding: 0 1.5rem 1.5rem;
  overflow-y: auto;
}

.asset-detail img,
.asset-detail video {
  width: 100%;
  border-radius: 1rem;
  margin-bottom: 1rem;
}

.app-actions {
  display: flex;
  gap: 0.75rem;
}

.app-actions button {
  background: rgba(56, 189, 248, 0.18);
  border: none;
  color: var(--fg);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.app-footer {
  margin-top: auto;
  font-size: 0.8rem;
  color: rgba(226, 232, 240, 0.5);
  text-align: center;
}

.fab-menu {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1.5rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  z-index: 1100;
}

.fab-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.85),
    rgba(14, 165, 233, 0.6)
  );
  color: var(--fg);
  font-size: 1.6rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.fab-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 36px rgba(15, 23, 42, 0.6);
}

.fab-toggle .fab-icon {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 999px;
  position: relative;
  transition: background 0.25s ease;
}

.fab-toggle .fab-icon::before,
.fab-toggle .fab-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.fab-toggle .fab-icon::before {
  transform: translateY(-6px);
}

.fab-toggle .fab-icon::after {
  transform: translateY(6px);
}

.fab-toggle[aria-expanded="true"] .fab-icon {
  background: transparent;
}

.fab-toggle[aria-expanded="true"] .fab-icon::before {
  transform: rotate(45deg);
}

.fab-toggle[aria-expanded="true"] .fab-icon::after {
  transform: rotate(-45deg);
}

.fab-actions {
  list-style: none;
  margin: 0;
  padding: 0.75rem;
  background: rgba(15, 23, 42, 0.92);
  border-radius: 1.25rem;
  display: grid;
  gap: 0.5rem;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.6);
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.fab-actions[hidden] {
  display: none !important;
}

.fab-menu--open .fab-actions {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.fab-link {
  display: block;
  padding: 0.55rem 0.9rem;
  border-radius: 0.9rem;
  color: rgba(226, 232, 240, 0.9);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.fab-link:hover {
  background: rgba(56, 189, 248, 0.18);
  transform: translateX(-2px);
}

.faces {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.faces-header {
  display: grid;
  gap: 0.5rem;
}

.faces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(1rem, 3vw, 1.5rem);
}

.faces-person {
  background: var(--card-bg);
  border-radius: 1.25rem;
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.45);
}

.faces-person:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 34px rgba(15, 23, 42, 0.55);
}

.faces-thumb {
  width: 100%;
  padding-top: 100%;
  border-radius: 1rem;
  background: rgba(30, 41, 59, 0.6);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.faces-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0) 55%,
    rgba(15, 23, 42, 0.45)
  );
}

.faces-person header {
  display: grid;
  gap: 0.35rem;
}

.faces-person h3 {
  margin: 0;
  font-size: 1rem;
}

.faces-person .faces-count {
  color: rgba(226, 232, 240, 0.65);
  font-size: 0.85rem;
}

.faces-album {
  background: rgba(15, 23, 42, 0.75);
  border-radius: 1.5rem;
  padding: clamp(1rem, 4vw, 1.5rem);
  display: grid;
  gap: clamp(1rem, 3vw, 1.5rem);
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.45);
}

.faces-album header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faces-back {
  background: transparent;
  border: none;
  color: rgba(226, 232, 240, 0.8);
  font-size: 0.9rem;
  cursor: pointer;
}

.faces-assets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1rem, 3vw, 1.5rem);
}

.faces-asset {
  display: grid;
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.55);
  border-radius: 1.25rem;
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.faces-asset-thumb {
  width: 100%;
  padding-top: 70%;
  border-radius: 1rem;
  background: rgba(30, 41, 59, 0.65);
  background-size: cover;
  background-position: center;
}

@media (max-width: 600px) {
  .album-image {
    padding: 0.6rem;
    gap: 0.6rem;
  }

  .album-image-thumb {
    width: 56px;
    height: 56px;
  }

  .album-image-label {
    font-size: 0.8rem;
  }
}
