.album-module {
  min-width: 0;
  max-width: 1500px;
  margin: auto;
}

.album-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0 28px;
  gap: 20px;
}
.album-heading h2 {
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -1.2px;
  margin: 8px 0;
}
.album-heading p,
.album-upload p,
.album-drive p {
  color: var(--muted);
  line-height: 1.7;
  margin: 7px 0;
}
.album-count {
  font-size: 34px;
  font-weight: 800;
  text-align: center;
  background: var(--soft);
  color: var(--accent);
  border-radius: 22px;
  padding: 18px 25px;
}
.album-count small {
  display: block;
  font-size: 12px;
  font-weight: 500;
}
.album-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: center;
  padding: 26px;
  border: 1px dashed var(--accent);
  border-radius: 24px;
  background: linear-gradient(120deg, var(--soft), var(--surface));
  margin-bottom: 24px;
}
.album-upload-symbol {
  height: 70px;
  width: 70px;
  display: grid;
  place-items: center;
  font-size: 45px;
  color: var(--accent);
  background: var(--surface);
  border-radius: 22px;
}
.album-upload h3,
.album-drive h3 {
  margin: 0;
  font-size: 20px;
}
.album-upload small {
  color: var(--muted);
}
.album-upload-button {
  margin-inline-start: auto;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.album-upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}
.album-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  margin-top: 16px;
}
.album-consent input {
  accent-color: var(--accent);
  width: auto;
  margin-top: 3px;
}
.album-upload-progress {
  width: 100%;
  margin: 0 !important;
  overflow-wrap: anywhere;
}
.album-upload-progress:empty {
  display: none;
}
.album-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 24px 0 18px;
}
.album-filters .active {
  background: var(--soft);
  color: var(--accent);
}
.album-filters small {
  margin-inline-start: auto;
  color: var(--muted);
}
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 255px), 1fr));
  gap: 20px;
}
.album-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 5px 22px #17264905;
}
.album-preview {
  aspect-ratio: 4/3;
  position: relative;
  background: var(--soft);
  overflow: hidden;
}
.album-preview img,
.album-preview video {
  height: 100%;
  width: 100%;
  object-fit: cover;
  display: block;
}
.album-preview video {
  object-fit: contain;
  background: #17162a;
}
.album-kind {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  background: #fffe;
  border-radius: 20px;
  font-size: 12px;
  color: #27213e;
  pointer-events: none;
}
.album-card-body {
  padding: 18px;
  display: flex;
  flex: 1;
  flex-direction: column;
}
.album-card-body h3 {
  font-size: 15px;
  overflow-wrap: anywhere;
  line-height: 1.6;
  margin: 0 0 10px;
}
.album-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  justify-content: space-between;
}
.album-card-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 15px;
}
.album-card-actions .btn {
  font-size: 12px;
  padding: 8px 10px;
}
.album-sync {
  color: var(--accent);
  font-size: 12px;
  margin: 10px 0;
}
.album-sync small {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.album-sync.has-error {
  color: #b54449;
}
.album-hidden .album-preview {
  opacity: 0.5;
}
.album-drive {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 25px;
}
.album-drive > div:first-child {
  flex: 1 1 220px;
  min-width: 0;
}
.album-drive-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 530px;
}
.album-drive a,
.album-drive-link {
  color: var(--accent);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.album-drive-link {
  display: block;
  margin-top: 12px;
}
.album-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 60px 20px;
  border: 1px dashed var(--line);
  border-radius: 24px;
  color: var(--muted);
}
.album-empty > span {
  font-size: 45px;
  color: var(--accent);
}
.album-empty h3 {
  color: var(--ink);
}
.album-error {
  padding: 22px;
  background: var(--soft);
  border-radius: 20px;
}
@media (max-width: 600px) {
  .album-heading {
    align-items: flex-start;
  }
  .album-count {
    padding: 15px;
    font-size: 25px;
  }
  .album-upload {
    padding: 20px;
    gap: 14px;
  }
  .album-upload-symbol {
    display: none;
  }
  .album-upload-button {
    width: 100%;
    justify-content: center;
  }
  .album-grid {
    grid-template-columns: 1fr;
  }
  .album-filters small {
    width: 100%;
    margin-top: 8px;
  }
  .album-drive {
    padding: 20px;
  }
}

/* Responsive module controls and content bounds. */
.album-heading > div,
.album-upload > div,
.album-drive-actions {
  min-width: 0;
}
.album-module .btn {
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
  line-height: 1.5;
}
.album-upload-symbol,
.album-count {
  flex-shrink: 0;
}
.album-upload-button:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.album-consent input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}
.album-consent {
  line-height: 1.7;
}
.album-meta > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.album-drive-actions .btn {
  flex: 1 1 auto;
}
@media (max-width: 600px) {
  .album-heading h2 {
    font-size: 30px;
    line-height: 1.3;
  }
  .album-card-actions .btn {
    flex: 1 1 auto;
  }
  .album-drive-actions {
    width: 100%;
  }
}
