.file-storage-stage {
  padding: 0.75rem 0;
}

body.site-shell .file-storage-stage {
  --page-background-overlay: rgba(255, 255, 255, 0.55);
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto, cover;
}

.file-storage-container {
  display: flex;
  width: 100%;
  height: 100%;
  max-width: 96rem;
  flex-direction: column;
}

.network-status {
  position: relative;
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  outline: none;
  background: transparent;
  cursor: help;
}

.network-status-dot {
  width: 0.62rem;
  height: 0.62rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #32f574;
  box-shadow: 0 0 4px rgba(50, 245, 116, 0.95),
    0 0 11px rgba(50, 245, 116, 0.72),
    0 0 18px rgba(50, 245, 116, 0.35);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.network-status [data-network-status-label] {
  position: absolute;
  z-index: 20;
  min-width: max-content;
  padding: 0.38rem 0.55rem;
  top: calc(100% + 0.42rem);
  left: 50%;
  border-radius: 6px;
  visibility: hidden;
  background: #263b47;
  box-shadow: 0 5px 14px rgba(30, 49, 60, 0.2);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -0.2rem);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
  white-space: nowrap;
}

.network-status:hover [data-network-status-label],
.network-status:focus-visible [data-network-status-label] {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, 0);
}

.network-status:focus-visible .network-status-dot {
  outline: 2px solid #275268;
  outline-offset: 4px;
}

.network-status[data-network-state="offline"] .network-status-dot {
  background: #ff3f56;
  box-shadow: 0 0 4px rgba(255, 63, 86, 0.95),
    0 0 11px rgba(255, 63, 86, 0.72),
    0 0 18px rgba(255, 63, 86, 0.35);
}

.header-admin-button {
  min-height: 2.2rem;
  padding: 0.38rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
}

.loading-screen {
  position: fixed;
  z-index: 2000;
  display: grid;
  padding: 1rem;
  inset: 0;
  place-items: center;
  background: rgba(232, 238, 242, 0.68);
  backdrop-filter: blur(2px);
}

.loading-dialog {
  display: flex;
  width: min(24rem, calc(100vw - 2rem));
  min-height: 9rem;
  padding: 1.4rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid rgba(65, 87, 101, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 50px rgba(27, 42, 52, 0.24);
  color: #2f4858;
  text-align: center;
}

.directory-loading-screen {
  position: absolute;
  z-index: 5;
  display: grid;
  padding: 1rem;
  inset: 0;
  place-items: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(1px);
}

.directory-loading-dialog {
  width: min(19rem, calc(100% - 1rem));
  min-height: 7rem;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 12px 34px rgba(27, 42, 52, 0.18);
}

.directory-loading-dialog .loading-spinner {
  width: 1.9rem;
  height: 1.9rem;
  border-width: 3px;
}

.loading-spinner {
  width: 2.35rem;
  height: 2.35rem;
  border: 4px solid #d8e3e9;
  border-top-color: #3f667f;
  border-radius: 50%;
  animation: loading-spin 750ms linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .loading-spinner {
    animation: none;
  }
}

.storage-card,
.folder-dialog {
  padding: clamp(1rem, 2.5vw, 1.35rem);
  border: 1px solid #dfe5e9;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(35, 48, 57, 0.1);
}

.auth-panel {
  display: grid;
  width: min(100%, 32rem);
  margin: auto;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}

.auth-copy {
  width: min(100%, 25rem);
  margin: 0 auto;
  text-align: center;
}

.auth-panel-status {
  min-height: 0;
  margin: 0;
  grid-column: 1 / -1;
  color: #42515c;
  font-weight: 700;
}

.auth-panel-status:empty {
  display: none;
}

.auth-panel-status.is-error {
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: #fae9e9;
  color: #8b2f2f;
}

.auth-panel-status.is-success {
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: #e4f2e9;
  color: #226340;
}

.storage-card h2 {
  margin: 0 0 0.85rem;
  color: #263c49;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
}

.storage-kicker {
  margin: 0;
  color: #597184;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.storage-notification {
  position: fixed;
  z-index: 1500;
  display: grid;
  width: min(28rem, calc(100vw - 2rem));
  padding: 0.8rem 0.85rem;
  top: 4.75rem;
  right: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
  border: 1px solid #cbd7de;
  border-radius: 10px;
  background: #e9eff3;
  box-shadow: 0 12px 32px rgba(35, 48, 57, 0.22);
  color: #42515c;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 250ms ease, transform 250ms ease;
}

.storage-notification[hidden] {
  display: none;
}

.storage-notification.is-error {
  border-color: #e2bcbc;
  background: #fae9e9;
  color: #8b2f2f;
}

.storage-notification.is-success {
  border-color: #bfdac9;
  background: #e4f2e9;
  color: #226340;
}

.storage-notification.is-fading {
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
}

.storage-status {
  margin: 0;
  color: inherit;
  font-weight: 700;
}

.notification-close {
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: currentColor;
  font-size: 1.4rem;
  line-height: 1;
}

.notification-close:hover {
  background: rgba(35, 48, 57, 0.09);
}

.verification-panel {
  display: grid;
  max-width: 58rem;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 25rem);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.access-denied-panel {
  display: grid;
  width: min(100%, 48rem);
  margin: auto;
  grid-template-columns: minmax(12rem, 0.8fr) minmax(18rem, 1.2fr);
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: center;
}

.crying-duck-doodle {
  display: block;
  width: min(100%, 18rem);
  margin: auto;
  overflow: visible;
}

.duck-fill {
  fill: #fffdf4;
}

.duck-line,
.duck-ground {
  fill: none;
  stroke: #263c49;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.duck-beak {
  fill: #f4b62f;
  stroke: #263c49;
  stroke-linejoin: round;
  stroke-width: 4;
}

.duck-eye {
  fill: #263c49;
}

.duck-tear {
  fill: #8bc8e8;
  stroke: #3f667f;
  stroke-width: 2;
}

.duck-ground {
  stroke: #a8b6be;
  stroke-width: 3;
}

.access-denied-copy h2 {
  margin: 0.35rem 0 0.75rem;
  color: #263c49;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

.access-denied-copy p:not(.storage-kicker) {
  margin: 0 0 1rem;
  color: #526775;
  line-height: 1.55;
}

.access-denied-copy .storage-button {
  margin: 0.25rem 0.5rem 0.25rem 0;
}

.auth-panel[hidden],
.verification-panel[hidden],
.access-denied-panel[hidden],
.storage-workspace[hidden],
.selected-folder[hidden],
.upload-progress[hidden],
[hidden] {
  display: none !important;
}

.auth-actions,
.verification-actions {
  display: grid;
  gap: 0.8rem;
}

.auth-panel .auth-actions {
  width: min(100%, 24rem);
  margin: 0 auto;
}

.auth-panel > .auth-panel-status {
  width: min(100%, 24rem);
  margin: 0 auto;
}

.google-button svg {
  width: 1.35rem;
  height: 1.35rem;
}

.email-auth-disclosure summary {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.8rem;
  color: #647580;
  cursor: pointer;
  font-size: 0.78rem;
  list-style: none;
  text-transform: uppercase;
}

.email-auth-disclosure summary::-webkit-details-marker {
  display: none;
}

.email-auth-disclosure summary::before,
.email-auth-disclosure summary::after {
  content: "";
  height: 1px;
  background: #dde3e7;
}

.email-auth-summary-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.email-auth-summary-label::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-top: -0.2rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 120ms ease;
}

.email-auth-disclosure[open] .email-auth-summary-label::after {
  margin-top: 0.2rem;
  transform: rotate(225deg);
}

.email-auth-disclosure form {
  margin-top: 0.9rem;
}

.email-auth-disclosure:not([open]) form {
  display: none;
}

.auth-button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.6rem;
}

.storage-button {
  display: inline-flex;
  min-height: 2.7rem;
  padding: 0.58rem 1rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.storage-button:hover:not(:disabled) {
  box-shadow: 0 5px 12px rgba(35, 48, 57, 0.12);
  text-decoration: none;
  transform: translateY(-1px);
}

.storage-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.storage-button-primary {
  background: #3f667f;
  color: #fff;
}

.storage-button-primary:hover:not(:disabled) {
  background: #345b74;
  color: #fff;
}

.storage-button-secondary,
.google-button {
  border-color: #587286;
  background: #fff;
  color: #314d61;
}

.storage-text-button {
  width: max-content;
  padding: 0.3rem 0.2rem;
  border: 0;
  border-bottom: 2px solid rgba(0, 105, 217, 0.25);
  background: transparent;
  color: #0069d9;
  font-weight: 700;
}

.storage-text-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.danger-text {
  border-bottom-color: rgba(143, 42, 42, 0.25);
  color: #8f2a2a;
}

.storage-button:focus-visible,
.storage-text-button:focus-visible,
.folder-button:focus-visible,
.folder-section-title-button:focus-visible,
.directory-view-button:focus-visible,
.email-auth-disclosure summary:focus-visible,
.dialog-close:focus-visible,
.notification-close:focus-visible,
.inspector-edit-button:focus-visible,
.inspector-delete-button:focus-visible,
.pane-resizer:focus-visible,
.form-control:focus-visible {
  outline: 3px solid #0069d9;
  outline-offset: 2px;
}

.form-control {
  min-height: 2.7rem;
  border-color: #7d8e98;
  border-radius: 10px;
}

.storage-field {
  margin-bottom: 0.85rem;
}

.storage-field label {
  margin-bottom: 0.3rem;
  color: #334957;
  font-size: 0.87rem;
  font-weight: 700;
}

.storage-workspace {
  min-height: 0;
  flex: 1;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.storage-layout {
  --folders-pane-width: 256px;
  --information-pane-width: 320px;
  display: grid;
  height: 100%;
  min-height: 32rem;
  grid-template-columns:
    var(--folders-pane-width) 0.4rem minmax(24rem, 1fr) 0.4rem
    var(--information-pane-width);
  overflow: hidden;
  border: 1px solid #e4e7eb;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(60, 64, 67, 0.1);
}

.manager-sidebar,
.manager-content,
.manager-inspector {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}

.manager-sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

.manager-content {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.98);
}

.manager-inspector {
  background: #fff;
}

.pane-resizer {
  position: relative;
  z-index: 3;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
}

.pane-resizer::before {
  position: absolute;
  width: 1px;
  content: "";
  inset: 0 auto 0 50%;
  background: #dce3e7;
  transform: translateX(-50%);
  transition: width 120ms ease, background 120ms ease;
}

.pane-resizer:hover::before,
.pane-resizer:focus-visible::before,
.pane-resizer.is-dragging::before {
  width: 3px;
  background: #718895;
}

body.is-resizing-panes {
  cursor: col-resize;
  user-select: none;
}

.sidebar-heading,
.manager-section,
.sidebar-account,
.inspector-section {
  padding: 0.9rem 1rem;
}

.sidebar-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  border-bottom: 1px solid #edf0f2;
}

.sidebar-heading strong {
  display: block;
  margin-top: 0.12rem;
  color: #263c49;
  font-size: 1.05rem;
}

.sidebar-heading > span {
  flex: 0 0 auto;
  color: #687984;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.manager-section {
  border-bottom: 1px solid #edf0f2;
}

.manager-sidebar > .folder-browser {
  display: flex;
  min-height: 0;
  flex: 1 1 0;
  flex-direction: column;
}

.folder-section-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.manager-section h2,
.inspector-section h2 {
  margin: 0 0 0.65rem;
  color: #324b5a;
  font-size: 0.9rem;
}

.folder-section-title-button {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.folder-section-title-button:hover,
.folder-section-title-button.is-active {
  background: #e8f0fe;
  color: #1967d2;
  text-decoration: none;
}

.sidebar-account {
  margin-top: auto;
  border-top: 1px solid #dce3e7;
}

.sidebar-account span,
.sidebar-account strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-account span {
  color: #6a7881;
  font-size: 0.72rem;
}

.sidebar-account strong {
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

.sidebar-account .sign-out-button {
  width: 100%;
  min-height: 2.3rem;
  padding: 0.42rem 0.7rem;
  font-size: 0.8rem;
}

.folder-list {
  display: grid;
  gap: 0.2rem;
}

#owned-folder-list {
  margin: 0;
}

.folder-button {
  position: relative;
  display: grid;
  width: 100%;
  padding: 0.55rem 0.6rem;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #273b48;
  text-align: left;
}

.sidebar-folder-button {
  min-height: 2.4rem;
  gap: 0.5rem;
}

.folder-button::before,
.empty-folder-icon {
  content: "";
  width: 1.35rem;
  height: 1.05rem;
  border: 0;
  border-radius: 0;
  background: url("resources/photo-album-icon.svg") center / contain no-repeat;
  clip-path: none;
}

.folder-button:hover,
.folder-button.is-active {
  background: #f1f3f4;
}

.folder-button.is-active {
  background: #e8f0fe;
  box-shadow: none;
  color: #1967d2;
}

.sidebar-folder-button::before {
  width: 1.55rem;
  height: 1.2rem;
  background: url("resources/photo-album-icon.svg") center / contain no-repeat;
}

.folder-button > strong,
.folder-button > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-button > span {
  grid-column: 2;
  color: #647580;
  font-size: 0.76rem;
}

.empty-copy,
.file-empty {
  margin: 0.75rem 0 0;
  color: #647580;
  font-size: 0.86rem;
}

.empty-folder-icon {
  display: block;
  width: 3.8rem;
  height: 2.8rem;
  margin: 0 auto 1rem;
  color: inherit;
  background: url("resources/photo-album-icon.svg") center / contain no-repeat;
}

.selected-folder {
  display: flex;
  min-height: 0;
  flex: 1;
}

.inline-album-workspace {
  width: 100%;
  min-height: 0;
  padding: 1rem 1.5rem 1.6rem;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  background: #f7f6f1;
}

.inline-album-workspace:focus {
  outline: none;
}

.inline-album-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: clamp(9rem, 20vw, 13rem);
  margin-bottom: 1rem;
  align-items: end;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 55%),
    #405864;
  box-shadow: 0 10px 28px rgba(42, 55, 62, 0.18);
}

.inline-album-hero::after {
  position: absolute;
  z-index: 1;
  content: "";
  pointer-events: none;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(14, 23, 28, 0.86),
    rgba(14, 23, 28, 0.34) 56%,
    rgba(14, 23, 28, 0.05)
  );
}

.inline-album-hero-cover {
  position: absolute;
  z-index: 0;
  display: grid;
  overflow: hidden;
  place-items: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.74rem;
  inset: 0;
}

.inline-album-hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inline-album-cover-control {
  position: absolute;
  z-index: 3;
  display: grid;
  max-width: min(15rem, calc(100% - 2rem));
  padding: 0.45rem 0.55rem;
  top: 0.8rem;
  right: 0.8rem;
  gap: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 10px;
  background: rgba(20, 34, 42, 0.72);
  color: #fff;
  backdrop-filter: blur(8px);
}

.inline-album-cover-control > span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.62rem;
  font-weight: 800;
}

.inline-album-cover-control select {
  width: 100%;
  min-width: 8rem;
  min-height: 2rem;
  padding: 0.3rem 1.65rem 0.3rem 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.94);
  color: #263c49;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.inline-album-cover-control select:focus-visible {
  outline: 3px solid #8bc8e8;
  outline-offset: 2px;
}

.inline-album-cover-control select:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.inline-album-hero-copy {
  position: relative;
  z-index: 2;
  padding: clamp(1rem, 2.8vw, 1.6rem);
  color: #fff;
}

.inline-album-hero-copy .storage-kicker {
  color: rgba(255, 255, 255, 0.7);
}

.inline-album-hero-title,
.inline-album-hero-description {
  box-sizing: border-box;
  display: block;
  width: min(100%, 42rem);
  border: 1px solid transparent;
  background: transparent;
  color: #fff;
  transition: background 120ms ease, border-color 120ms ease;
}

.inline-album-hero-title {
  margin: 0.22rem 0 0;
  padding: 0.08rem 0.25rem;
  border-radius: 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.05;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.inline-album-hero-description {
  max-width: 42rem;
  min-height: 2.6rem;
  max-height: 6rem;
  margin: 0.3rem 0 0;
  padding: 0.28rem;
  overflow: hidden;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.84rem;
  line-height: 1.4;
  resize: vertical;
}

.inline-album-hero-title::placeholder,
.inline-album-hero-description::placeholder {
  color: rgba(255, 255, 255, 0.68);
  opacity: 1;
}

.inline-album-hero-title:hover:not(:disabled),
.inline-album-hero-description:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(14, 23, 28, 0.24);
}

.inline-album-hero-title:focus,
.inline-album-hero-description:focus {
  border-color: rgba(255, 255, 255, 0.72);
  outline: 3px solid rgba(139, 200, 232, 0.6);
  background: rgba(14, 23, 28, 0.42);
}

.inline-album-hero-title:disabled,
.inline-album-hero-description:disabled {
  opacity: 1;
}

.inline-album-hero-copy > span {
  display: block;
  margin-top: 0.45rem;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.72rem;
}

.inline-album-preview {
  width: 100%;
}

.inline-album-preview-items {
  display: grid;
  gap: 0.65rem;
}

.inline-album-preview.is-simple .inline-album-preview-items {
  max-width: 48rem;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.inline-album-preview.is-tile .inline-album-preview-items {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  grid-auto-rows: clamp(6rem, 10vw, 9rem);
  gap: 0.35rem;
}

.inline-album-preview.is-album .inline-album-preview-items {
  gap: 1.1rem;
}

.inline-album-photo {
  position: relative;
  display: grid;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  grid-template-rows: minmax(0, 1fr) auto;
  border: 2px solid transparent;
  border-radius: 8px;
  outline: none;
  background: #fff;
  box-shadow: 0 6px 18px rgba(42, 55, 62, 0.13);
  cursor: pointer;
}

.inline-album-photo:not(.inline-album-text-card) {
  grid-template-rows: minmax(0, 1fr);
}

.inline-album-photo:hover,
.inline-album-photo:focus-visible {
  border-color: rgba(72, 105, 124, 0.56);
}

.inline-album-photo.is-selected {
  border-color: #47758f;
  box-shadow:
    0 0 0 3px rgba(71, 117, 143, 0.18),
    0 8px 22px rgba(42, 55, 62, 0.18);
}

.inline-album-photo-preview {
  display: grid;
  width: 100%;
  min-height: 7rem;
  place-items: center;
  overflow: hidden;
  background: #e6ebed;
  color: #71808a;
  font-size: 0.68rem;
  font-weight: 800;
}

.inline-album-photo-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inline-album-text-card-label {
  min-width: 0;
  padding: 0.5rem 0.62rem;
  overflow: hidden;
  color: #405460;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-album-text-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(248, 242, 229, 0.98));
  cursor: default;
}

.inline-album-text-card textarea {
  width: 100%;
  min-height: 9rem;
  padding: clamp(1rem, 3vw, 2rem);
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #3e4549;
  font: 500 clamp(1rem, 2.3vw, 1.55rem) / 1.55 Georgia, "Times New Roman", serif;
  text-align: center;
}

.inline-album-text-card textarea::placeholder {
  color: #8a8175;
}

.inline-album-text-card textarea:focus {
  box-shadow: inset 0 0 0 3px rgba(71, 117, 143, 0.22);
}

.inline-album-text-card textarea[readonly] {
  cursor: default;
}

.inline-album-photo[draggable="true"] {
  cursor: grab;
}

.inline-album-photo.is-dragging {
  opacity: 0.42;
  cursor: grabbing;
  transform: scale(0.98);
}

.inline-album-photo.is-drop-before::after,
.inline-album-photo.is-drop-after::after {
  position: absolute;
  z-index: 5;
  height: 0.28rem;
  content: "";
  right: 0.25rem;
  left: 0.25rem;
  border-radius: 999px;
  background: #2684ff;
  box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(38, 132, 255, 0.45);
  pointer-events: none;
}

.inline-album-photo.is-drop-before::after {
  top: 0.18rem;
}

.inline-album-photo.is-drop-after::after {
  bottom: 0.18rem;
}

.inline-album-drag-handle {
  position: absolute;
  z-index: 2;
  display: grid;
  min-width: 1.75rem;
  height: 1.75rem;
  top: 0.35rem;
  left: 0.35rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 50%;
  background: rgba(27, 44, 53, 0.84);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: -0.2rem;
  opacity: 0;
  cursor: grab;
  transition: opacity 120ms ease;
}

.inline-album-photo:hover .inline-album-drag-handle,
.inline-album-photo:focus-within .inline-album-drag-handle,
.inline-album-photo.is-selected .inline-album-drag-handle,
.inline-album-photo.is-dragging .inline-album-drag-handle {
  opacity: 1;
}

.inline-album-photo-actions {
  position: absolute;
  z-index: 2;
  display: flex;
  padding: 0.35rem;
  top: 0;
  right: 0;
  gap: 0.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.inline-album-photo:hover .inline-album-photo-actions,
.inline-album-photo:focus-within .inline-album-photo-actions,
.inline-album-photo.is-selected .inline-album-photo-actions {
  opacity: 1;
  pointer-events: auto;
}

.inline-album-photo-arrange-actions {
  position: absolute;
  z-index: 2;
  display: flex;
  padding: 0.35rem;
  right: 0;
  bottom: 2.25rem;
  gap: 0.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.inline-album-photo:hover .inline-album-photo-arrange-actions,
.inline-album-photo:focus-within .inline-album-photo-arrange-actions,
.inline-album-photo.is-selected .inline-album-photo-arrange-actions {
  opacity: 1;
  pointer-events: auto;
}

.inline-album-photo-action {
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 50%;
  background: rgba(27, 44, 53, 0.84);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  text-decoration: none;
}

.inline-album-photo-action:disabled {
  cursor: default;
  opacity: 0.42;
}

.inline-album-photo-edit-action {
  display: grid;
}

.inline-album-photo-edit-action:hover,
.inline-album-photo-edit-action:focus-visible {
  border-color: #fff;
  background: #315c75;
  color: #fff;
  text-decoration: none;
}

.inline-album-photo-action svg {
  width: 1rem;
  height: 1rem;
  pointer-events: none;
}

.inline-album-photo-action.is-destructive:hover,
.inline-album-photo-action.is-destructive:focus-visible {
  border-color: #fff;
  background: #a72f2f;
}

.inline-album-preview.is-simple .inline-album-photo-preview {
  min-height: 15rem;
}

.inline-album-preview.is-simple .inline-album-text-card textarea {
  min-height: 15rem;
}

.inline-album-preview.is-simple .inline-album-photo-preview img {
  height: auto;
  max-height: 64dvh;
  object-fit: contain;
}

.inline-album-preview.is-tile .inline-album-photo {
  border-radius: 4px;
  grid-row: span 2;
}

.inline-album-preview.is-tile .inline-album-photo-preview img {
  object-fit: contain;
  object-position: center;
}

.inline-album-preview.is-tile .inline-album-photo:nth-child(5n + 1) {
  grid-column: span 2;
  grid-row: span 3;
}

.inline-album-preview.is-tile .inline-album-photo:nth-child(5n + 3) {
  grid-row: span 3;
}

.inline-album-preview.is-tile .inline-album-text-card textarea {
  min-height: 100%;
  padding: clamp(0.75rem, 2vw, 1.4rem);
  font-size: clamp(0.85rem, 1.8vw, 1.2rem);
}

.inline-album-preview.is-tile .inline-album-text-card-label {
  display: none;
}

.inline-album-page {
  display: grid;
  aspect-ratio: 16 / 10;
  padding: clamp(0.7rem, 2vw, 1.35rem);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.7rem;
  border: 1px solid #d5c8b3;
  border-radius: 4px 12px 12px 4px;
  background:
    linear-gradient(90deg, rgba(83, 62, 42, 0.14), transparent 4%),
    #f3ecdf;
  box-shadow: 0 14px 34px rgba(49, 41, 33, 0.18);
}

.inline-album-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.inline-album-page-heading strong {
  color: #6a5d4e;
  font: 700 0.74rem Georgia, "Times New Roman", serif;
}

.inline-album-page-layouts {
  display: flex;
  gap: 0.25rem;
}

.inline-album-page-layouts button {
  min-width: 1.75rem;
  min-height: 1.6rem;
  padding: 0.18rem 0.42rem;
  border: 1px solid #bda98c;
  border-radius: 999px;
  background: #fffaf1;
  color: #735f43;
  font-size: 0.66rem;
  font-weight: 800;
}

.inline-album-page-layouts button.is-active {
  border-color: #735f43;
  background: #735f43;
  color: #fff;
}

.inline-album-page-photos {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.inline-album-page.has-1-photos .inline-album-page-photos {
  grid-template-columns: minmax(0, 1fr);
}

.inline-album-page.has-3-photos .inline-album-page-photos {
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.inline-album-page.has-3-photos .inline-album-photo:first-child {
  grid-row: 1 / span 2;
}

.inline-album-page .inline-album-photo {
  min-height: 0;
  border: 0.28rem solid #fff;
  border-radius: 3px;
}

.inline-album-page .inline-album-photo-preview {
  min-height: 0;
  background: #e8e3da;
}

.inline-album-page .inline-album-text-card textarea {
  height: 100%;
  min-height: 0;
  padding: clamp(0.6rem, 2vw, 1.4rem);
  font-size: clamp(0.78rem, 1.7vw, 1.25rem);
}

.inline-album-page .inline-album-photo-preview img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.inline-album-empty {
  padding: 2rem;
  border: 1px dashed #c8d1d5;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.inline-album-editor-panel {
  display: grid;
  gap: 0.85rem;
}

.inline-album-editor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.inline-album-editor-heading .storage-kicker {
  margin-bottom: 0.18rem;
}

.inline-album-editor-heading strong {
  color: #324b5a;
  font-size: 0.92rem;
}

.inline-album-save-state {
  display: inline-flex;
  min-height: 1.45rem;
  padding: 0.2rem 0.48rem;
  align-items: center;
  border-radius: 999px;
  background: #e6f4ea;
  color: #176b36;
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
}

.inline-album-save-state.is-dirty {
  background: #fff2d5;
  color: #805500;
}

.inline-album-save-state.is-saving {
  background: #e8f0fe;
  color: #1967d2;
}

.inline-album-editor-help {
  margin: 0;
  color: #667985;
  font-size: 0.7rem;
  line-height: 1.45;
}

.toolbar-album-save-actions {
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.45rem;
}

.toolbar-album-save-actions[hidden] {
  display: none;
}

.toolbar-album-save-actions .storage-button {
  width: auto;
  min-width: 0;
  min-height: 2.35rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.72rem;
  white-space: nowrap;
}

.toolbar-album-save-actions a[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.55;
}

.content-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  flex: 0 0 auto;
  padding: 0.85rem 1.1rem 0.75rem;
  grid-template-columns: minmax(9.5rem, 13rem) minmax(0, 1fr);
  align-items: start;
  gap: 0.9rem;
  border-bottom: 1px solid #edf1f3;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 5px 16px rgba(38, 57, 68, 0.035);
}

.current-directory-copy {
  min-width: 0;
  padding-top: 0.12rem;
}

.current-directory-name {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  color: #202124;
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  font-weight: 650;
  line-height: 1.15;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.current-directory-meta {
  display: flex;
  min-height: 1.1rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem;
}

.directory-result-summary {
  min-height: 0;
  margin: 0;
  color: #6b7c87;
  font-size: 0.72rem;
  line-height: 1.3;
}

.photo-library-publish-status:not([hidden]) +
  .directory-result-summary:not(:empty)::before {
  margin-right: 0.28rem;
  color: #9aa7ae;
  content: "·";
}

.toolbar-actions {
  display: flex;
  min-width: 0;
  width: 100%;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
}

.toolbar-browse-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}

.toolbar-browse-actions:not(:has(> :not([hidden]))),
.toolbar-edit-actions:not(:has(> :not([hidden]))) {
  display: none;
}

.toolbar-edit-actions {
  display: grid;
  min-width: 0;
  width: 100%;
  grid-template-columns:
    minmax(10.5rem, 0.8fr)
    max-content
    minmax(15rem, 2fr);
  align-items: center;
  gap: 0.55rem;
}

.toolbar-upload-area {
  display: flex;
  min-width: 0;
  width: 100%;
  padding-top: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  border-top: 1px solid #edf1f3;
}

.directory-tool-control {
  display: flex;
  min-width: 0;
  margin: 0;
  flex: 0 0 auto;
  align-items: center;
  gap: 0;
}

.directory-tool-toggle {
  position: relative;
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #b9c8d0;
  border-radius: 8px;
  background: #fff;
  color: #617783;
}

.directory-tool-toggle:hover,
.directory-tool-control.is-expanded .directory-tool-toggle {
  border-color: #78909d;
  background: #edf3f6;
  color: #314f62;
}

.directory-tool-control.is-expanded .directory-tool-toggle {
  border-right-color: transparent;
  border-radius: 8px 0 0 8px;
}

.directory-tool-toggle:focus-visible {
  outline: 3px solid rgba(92, 126, 146, 0.2);
  outline-offset: 1px;
}

.directory-tool-toggle.has-value::after {
  position: absolute;
  width: 0.4rem;
  height: 0.4rem;
  content: "";
  top: 0.2rem;
  right: 0.2rem;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #3f667f;
}

.directory-tool-panel {
  min-width: 0;
  margin-left: -1px;
  animation: directory-tool-reveal 140ms ease-out;
}

@keyframes directory-tool-reveal {
  from {
    opacity: 0;
    transform: scaleX(0.88);
  }

  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

.directory-sort-panel {
  width: 10rem;
}

.directory-sort-panel select {
  width: 100%;
  min-height: 2.35rem;
  border: 1px solid #b9c8d0;
  border-radius: 0 8px 8px 0;
  outline: none;
  background-color: #fff;
  color: #263c49;
  font: inherit;
  font-size: 0.82rem;
}

.directory-sort-icon {
  display: grid;
  width: 1rem;
  height: 1rem;
  place-items: center;
  pointer-events: none;
}

.directory-sort-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.directory-sort-panel select {
  padding: 0.4rem 1.8rem 0.4rem 0.7rem;
  cursor: pointer;
}

.directory-sort-panel select:hover {
  border-color: #8fa5b1;
}

.directory-sort-panel select:focus-visible {
  border-color: #5c7e92;
  box-shadow: 0 0 0 3px rgba(92, 126, 146, 0.16);
}

.toolbar-upload-form {
  margin: 0;
  flex: 0 0 auto;
}

.toolbar-action-button {
  min-height: 2.35rem;
  padding: 0.45rem 0.85rem;
}

.visually-hidden-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  white-space: nowrap;
}

.toolbar-upload-progress {
  position: fixed;
  z-index: 1400;
  width: min(22rem, calc(100vw - 2rem));
  padding: 0.9rem 1rem;
  right: 1rem;
  bottom: 1rem;
  flex-basis: auto;
  border: 1px solid #ccd7dd;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 32px rgba(35, 48, 57, 0.24);
}

.directory-view-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 0.18rem;
  border: 1px solid #718895;
  border-radius: 9px;
  background: #edf1f3;
}

.directory-view-button {
  display: grid;
  width: 2.25rem;
  height: 2rem;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #536875;
}

.directory-view-button:hover {
  color: #2f4a5a;
}

.directory-view-button.is-active {
  background: #fff;
  box-shadow: 0 1px 4px rgba(38, 57, 68, 0.2);
  color: #263f4e;
}

.grid-view-icon {
  width: 0.34rem;
  height: 0.34rem;
  border: 2px solid currentColor;
  border-radius: 1px;
  box-shadow:
    0.58rem 0 0 -2px #fff,
    0.58rem 0 0 0 currentColor,
    0 0.58rem 0 -2px #fff,
    0 0.58rem 0 0 currentColor,
    0.58rem 0.58rem 0 -2px #fff,
    0.58rem 0.58rem 0 0 currentColor;
  transform: translate(-0.28rem, -0.28rem);
}

.list-view-icon {
  width: 1.15rem;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  box-shadow: 0 0.38rem currentColor, 0 0.76rem currentColor;
  transform: translateY(-0.38rem);
}

.directory-browser {
  --directory-list-columns: minmax(14rem, 1fr) 8rem 7rem 9rem;
  padding: 1rem 1.5rem 1.5rem;
  overflow: auto;
}

.manager-content > .directory-browser,
.selected-folder .directory-browser {
  min-height: 0;
  flex: 1;
}

.selected-folder .directory-browser {
  width: 100%;
}

.directory-item-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.75rem, 1fr));
  gap: 1rem 0.75rem;
}

#home-folder-list:not(.is-list-view) {
  grid-template-columns: repeat(auto-fill, minmax(min(13rem, 100%), 1fr));
  gap: 1.5rem 1rem;
}

.directory-item-group {
  display: contents;
}

.directory-folder-button {
  min-height: 7.5rem;
  padding: 0.65rem 0.45rem;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto;
  gap: 0.4rem;
  align-content: center;
  justify-items: center;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

#home-folder-list:not(.is-list-view) .directory-folder-button {
  min-height: 0;
  padding: 0;
  align-content: start;
  justify-items: stretch;
  border: 0;
  border-radius: 12px;
  text-align: left;
}

#home-folder-list:not(.is-list-view)
  .directory-folder-button > .directory-folder-identity {
  grid-template-rows: minmax(8.5rem, 10vw) auto;
  gap: 0.6rem;
  align-items: start;
  justify-items: stretch;
}

#home-folder-list:not(.is-list-view) .directory-folder-icon {
  width: 100%;
  height: 100%;
  min-height: 8.5rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, #dfe8fb, #c4d7f8);
  clip-path: none;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

#home-folder-list:not(.is-list-view) .directory-folder-button:nth-child(4n + 2)
  .directory-folder-icon {
  background: linear-gradient(145deg, #fbe1e7, #f6c6d2);
}

#home-folder-list:not(.is-list-view) .directory-folder-button:nth-child(4n + 3)
  .directory-folder-icon {
  background: linear-gradient(145deg, #e2f1e5, #c7e4cd);
}

#home-folder-list:not(.is-list-view) .directory-folder-button:nth-child(4n + 4)
  .directory-folder-icon {
  background: linear-gradient(145deg, #f8ebce, #f2d99f);
}

#home-folder-list:not(.is-list-view)
  .directory-folder-icon:not(.has-cover)::before {
  position: absolute;
  width: 4.8rem;
  height: 3.6rem;
  content: "";
  top: 50%;
  left: 50%;
  border: 0;
  background: url("resources/photo-album-icon.svg") center / contain no-repeat;
  clip-path: none;
  transform: translate(-50%, -50%);
}

#home-folder-list:not(.is-list-view) .directory-folder-button:hover,
#home-folder-list:not(.is-list-view) .directory-folder-button.is-active,
#home-folder-list:not(.is-list-view) .directory-folder-button.is-selected {
  background: transparent;
  box-shadow: none;
}

#home-folder-list:not(.is-list-view)
  .directory-folder-button:hover .directory-folder-icon,
#home-folder-list:not(.is-list-view)
  .directory-folder-button.is-selected .directory-folder-icon {
  box-shadow: 0 4px 14px rgba(60, 64, 67, 0.24);
  transform: translateY(-1px);
}

#home-folder-list:not(.is-list-view)
  .directory-folder-button.is-selected .directory-folder-icon {
  outline: 3px solid #1a73e8;
  outline-offset: 2px;
}

#home-folder-list:not(.is-list-view) .directory-folder-button strong {
  padding: 0 0.15rem;
  color: #202124;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
}

.directory-folder-button::before {
  display: none;
}

.directory-folder-button > .directory-folder-identity {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-column: 1;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 3.8rem auto;
  gap: 0.4rem;
  align-items: center;
  justify-items: center;
  overflow: visible;
  color: inherit;
  font-size: inherit;
  text-overflow: clip;
  white-space: normal;
}

.directory-folder-icon {
  position: relative;
  display: block;
  width: 3.4rem;
  height: 2.6rem;
  align-self: center;
  grid-column: 1;
  border: 0;
  border-radius: 0;
  background: url("resources/photo-album-icon.svg") center / contain no-repeat;
  box-shadow: none;
  clip-path: none;
}

.directory-folder-icon.has-cover {
  overflow: hidden;
  background: #eef1f3;
}

.directory-folder-icon.has-cover::before,
.directory-folder-icon.has-cover::after {
  display: none;
}

.directory-folder-icon.has-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.directory-folder-button strong {
  max-width: 100%;
  overflow: hidden;
  color: #273b48;
  font-size: 0.88rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-item-name.is-editing {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  min-width: 3rem;
  padding: 0.15rem 0.3rem;
  overflow: visible;
  border: 1px solid #658ba3;
  border-radius: 4px;
  outline: 2px solid rgba(63, 102, 127, 0.2);
  background: #fff;
  cursor: text;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
}

.directory-item-list:not(.is-list-view) .directory-item-name.is-editing {
  width: calc(100% - 0.5rem);
  justify-self: center;
  text-align: center;
}

.directory-item-list.is-list-view .directory-item-name.is-editing {
  justify-self: stretch;
  text-align: left;
}

.directory-folder-button > .directory-item-type,
.directory-folder-button > .directory-item-size,
.directory-folder-button > .directory-item-modified {
  display: none;
  color: #647580;
  font-size: 0.76rem;
}

.directory-folder-button:hover,
.directory-folder-button.is-active,
.directory-folder-button.is-selected {
  border-color: #c6d6df;
  background: #edf4f7;
}

.directory-folder-button.is-selected {
  box-shadow: inset 0 0 0 1px #8faebf;
}

.directory-list-heading {
  display: grid;
  min-width: 42rem;
  padding: 0.55rem 0.75rem;
  grid-template-columns: var(--directory-list-columns);
  gap: 1rem;
  border-bottom: 1px solid #dfe5e9;
  color: #647580;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.directory-list-heading span:nth-child(3) {
  text-align: right;
}

.directory-list-heading span:first-child {
  padding-left: 2.65rem;
}

.directory-item-list.is-list-view {
  min-width: 42rem;
  grid-template-columns: 1fr;
  gap: 0;
}

.directory-item-list.is-list-view .directory-folder-button {
  display: grid;
  min-height: 3.1rem;
  padding: 0.4rem 0.75rem;
  grid-template-columns: var(--directory-list-columns);
  grid-template-rows: auto;
  gap: 1rem;
  align-content: normal;
  align-items: center;
  justify-items: stretch;
  border: 0;
  border-bottom: 1px solid #e4e9ec;
  border-radius: 0;
  text-align: left;
}

.directory-item-list.is-list-view .directory-folder-identity {
  grid-template-columns: 2rem minmax(0, 1fr);
  grid-template-rows: auto;
  gap: 0.65rem;
  align-items: center;
  justify-items: stretch;
}

.directory-item-list.is-list-view .directory-folder-icon {
  width: 1.75rem;
  height: 1.35rem;
  justify-self: center;
  border: 0;
  border-radius: 0;
  background: url("resources/photo-album-icon.svg") center / contain no-repeat;
}

.directory-item-list.is-list-view .directory-folder-button strong {
  display: block;
  min-width: 0;
  padding-left: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-item-list.is-list-view .directory-folder-button .directory-item-type,
.directory-item-list.is-list-view .directory-folder-button .directory-item-size,
.directory-item-list.is-list-view .directory-folder-button .directory-item-modified {
  display: block;
  color: #647580;
  font-size: 0.76rem;
}

.directory-item-list.is-list-view .directory-folder-button .directory-item-type {
  grid-column: 2;
}

.directory-item-list.is-list-view .directory-folder-button .directory-item-size {
  grid-column: 3;
  text-align: right;
}

.directory-item-list.is-list-view .directory-folder-button .directory-item-modified {
  grid-column: 4;
}

.directory-empty {
  margin: 0.85rem 0 0;
  color: #647580;
  font-size: 0.86rem;
}

.folder-heading-actions,
.section-heading-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.folder-heading-actions {
  width: 100%;
  align-items: flex-start;
  flex-direction: column;
}

.folder-heading-actions .storage-button,
.folder-heading-actions .storage-text-button {
  width: 100%;
}

#delete-folder-wrapper {
  width: 100%;
  max-width: none;
}

.upload-progress {
  width: 100%;
  flex-basis: 100%;
}

.progress-copy {
  display: flex;
  margin-bottom: 0.35rem;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.84rem;
}

.progress-copy span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-progress progress {
  width: 100%;
  height: 0.75rem;
  accent-color: #3f667f;
}

.folder-access-control {
  display: grid;
  gap: 0.65rem;
}

.shared-access-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.folder-access-switch {
  position: relative;
  display: inline-flex;
  width: 100%;
  flex: 0 0 auto;
  align-items: center;
  cursor: pointer;
}

.folder-access-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.folder-access-track {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 2.35rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #d4dde2;
  border-radius: 0.55rem;
  background: #eef1f3;
  box-shadow: 0 1px 2px rgba(35, 48, 57, 0.08);
}

.folder-access-track::before {
  position: absolute;
  z-index: 0;
  width: calc(50% - 3px);
  content: "";
  inset: 2px auto 2px 2px;
  border-radius: 0.4rem;
  background: #3f667f;
  box-shadow: 0 2px 5px rgba(35, 63, 80, 0.22);
  transform: translateX(calc(100% + 2px));
  transition: transform 150ms ease;
}

.folder-access-option {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  padding: 0.55rem 0.45rem;
  place-items: center;
  color: #71808a;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  transition: color 150ms ease;
}

.folder-access-option-private {
  color: #fff;
}

.folder-access-switch input:checked + .folder-access-track::before {
  transform: translateX(0);
}

.folder-access-switch input:checked + .folder-access-track .folder-access-option-shared {
  color: #fff;
}

.folder-access-switch input:checked + .folder-access-track .folder-access-option-private {
  color: #647580;
}

.folder-access-switch input:focus-visible + .folder-access-track {
  outline: 3px solid #0069d9;
  outline-offset: 2px;
}

.folder-access-switch:hover .folder-access-track {
  border-color: #aebdc6;
}

.folder-access-state {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.folder-private-icon {
  position: relative;
  display: block;
  width: 0.9rem;
  height: 0.72rem;
  flex: 0 0 auto;
  border: 1.5px solid #597184;
  border-radius: 2px;
}

.folder-private-icon::before {
  position: absolute;
  width: 0.52rem;
  height: 0.48rem;
  content: "";
  bottom: 0.52rem;
  left: 0.1rem;
  border: 1.5px solid #597184;
  border-bottom: 0;
  border-radius: 0.3rem 0.3rem 0 0;
}

.shared-access-heading {
  margin: 0;
  font-size: 0.8rem;
}

.shared-access-content {
  position: relative;
  margin-top: 0.8rem;
  padding: 0.75rem;
  border: 1px solid #d9e2e6;
  border-radius: 9px;
  background: #fff;
  transition: background 140ms ease, border-color 140ms ease;
}

.shared-access-content.is-disabled {
  border-color: #e1e6e9;
  background: #f2f4f5;
}

.shared-access-content.is-disabled > :not(.shared-access-private-overlay) {
  opacity: 0.38;
}

.shared-access-private-overlay {
  position: absolute;
  z-index: 2;
  display: none;
  width: 2.7rem;
  height: 2.7rem;
  top: 50%;
  left: 50%;
  border: 1px solid #c5d0d6;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(38, 57, 68, 0.12);
  color: #597184;
  pointer-events: none;
  transform: translate(-50%, -50%);
  place-items: center;
}

.shared-access-content.is-disabled > .shared-access-private-overlay {
  display: grid;
}

.manage-access-button {
  width: auto;
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  border-radius: 7px;
  font-size: 0.7rem;
  white-space: nowrap;
}

.shared-access-content > .share-list {
  margin-top: 0.75rem;
}

.shared-access-content > .share-list:empty {
  display: none;
}

.toolbar-album-type-control {
  display: grid;
  min-width: 0;
  min-height: 2.35rem;
  flex: 0 1 14rem;
  grid-template-columns: auto minmax(7.5rem, 1fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #b9c8d0;
  border-radius: 8px;
  background: #fff;
}

.toolbar-album-type-control[hidden] {
  display: none;
}

.toolbar-album-type-control > span {
  display: flex;
  padding: 0.4rem 0.55rem;
  align-items: center;
  color: #526775;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.toolbar-album-type-control select {
  min-width: 0;
  padding: 0.4rem 1.8rem 0.4rem 0.55rem;
  border: 0;
  border-left: 1px solid #d3dde2;
  outline: none;
  background-color: #f8fafb;
  color: #263c49;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.toolbar-album-type-control:focus-within {
  border-color: #5c7e92;
  box-shadow: 0 0 0 3px rgba(92, 126, 146, 0.16);
}

.toolbar-album-type-control select:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.toolbar-publish-panel {
  display: grid;
  min-width: 0;
  width: 100%;
  grid-template-columns: auto minmax(10rem, 1fr);
  align-items: center;
  gap: 0.5rem;
}

.toolbar-publish-panel[hidden] {
  display: none;
}

.photo-library-publish-status {
  margin: 0;
  color: #5d707b;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.photo-library-publish-status[hidden] {
  display: none;
}

.photo-library-publish-status.is-published {
  color: #1f6b38;
}

.photo-library-publish-status.is-pending {
  color: #76530f;
}

.photo-library-publish-button {
  min-width: 5.8rem;
  min-height: 2rem;
  padding: 0.42rem 0.62rem;
  font-size: 0.66rem;
  letter-spacing: 0.035em;
}

.photo-library-publish-button.is-unpublish {
  border-color: #a44a4a;
  background: #fff;
  color: #8f2a2a;
}

.photo-library-publish-button.is-unpublish:hover:not(:disabled) {
  border-color: #8f2a2a;
  background: #fff4f4;
  color: #7c2020;
}

.toolbar-public-link {
  display: flex;
  min-width: 0;
  width: 100%;
  align-items: center;
  gap: 0.45rem;
}

.toolbar-public-link[hidden] {
  display: none;
}

.toolbar-public-url {
  display: block;
  width: 100%;
  min-width: 0;
  height: 2.35rem;
  padding: 0.45rem 0.55rem;
  flex: 1 1 12rem;
  overflow: hidden;
  border: 1px solid #cbd7dd;
  border-radius: 8px;
  background: #fff;
  color: #405867;
  font: inherit;
  font-size: 0.68rem;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.toolbar-public-url:hover {
  border-color: #8fa5b1;
  background: #f8fafb;
}

.toolbar-public-url:focus-visible {
  border-color: #52758b;
  outline: 3px solid rgba(0, 105, 217, 0.18);
}

.share-list-empty {
  margin: 0.85rem 0 0.1rem;
  color: #71808a;
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: center;
}

.share-email-help {
  display: block;
  margin-top: 0.3rem;
  color: #647580;
  font-size: 0.76rem;
}

.share-dialog-status {
  margin-top: 0.85rem;
}

.inspector-section {
  border-bottom: 1px solid #dfe5e9;
}

.folder-details {
  display: grid;
  margin: 0 0 0.8rem;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 0.35rem 0.7rem;
  font-size: 0.82rem;
  line-height: 1.35;
}

.inspector-section > .storage-kicker ~ .folder-details {
  margin-top: 1rem;
}

.folder-details dt {
  color: #647580;
  font-weight: 400;
}

.folder-details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.inspector-name {
  display: flex;
  min-width: 0;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-start;
}

.inspector-name strong {
  min-width: 0;
  flex: 0 1 auto;
  overflow-wrap: anywhere;
}

.inspector-edit-button {
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0.25rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #587286;
}

.inspector-edit-button:hover {
  border-color: #c8d4da;
  background: #e9f0f4;
  color: #314d61;
}

.inspector-edit-button svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: currentColor;
}

.inspector-delete-button {
  width: 100%;
  min-width: 0;
  min-height: 2.7rem;
  padding: 0.58rem 1rem;
  border: 1px solid #a83a3a;
  border-radius: 10px;
  background: transparent;
  color: #8f2a2a;
  font-weight: 700;
}

.inspector-delete-button:hover:not(:disabled) {
  background: rgba(168, 58, 58, 0.06);
}

.inspector-delete-wrapper {
  position: relative;
}

.inspector-delete-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.delete-folder-message {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.45rem);
  z-index: 4;
  width: max-content;
  max-width: 14rem;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  background: #344955;
  box-shadow: 0 4px 12px rgba(27, 48, 61, 0.18);
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.2rem);
  transition: opacity 120ms ease, transform 120ms ease;
}

.inspector-delete-wrapper.is-disabled:hover .delete-folder-message,
.inspector-delete-wrapper.is-disabled:focus-within .delete-folder-message {
  opacity: 1;
  transform: translateY(0);
}

.danger-kicker {
  color: #8f2a2a;
}

.delete-confirm-dialog {
  width: min(29rem, calc(100vw - 2rem));
}

.delete-confirm-message {
  margin: 0.8rem 0 1.2rem;
  color: #42515c;
  line-height: 1.5;
}

.dialog-actions {
  display: flex;
  gap: 0.7rem;
  justify-content: flex-end;
}

.confirm-delete-button {
  border-color: #982f2f;
  background: #982f2f;
  color: #fff;
}

.confirm-delete-button:hover:not(:disabled) {
  background: #7f2424;
  color: #fff;
}

.share-form {
  display: grid;
  margin-top: 0.75rem;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem 0.7rem;
  align-items: end;
}

.manage-access-dialog {
  width: min(calc(100% - 2rem), 40rem);
}

.manage-access-folder-summary {
  display: grid;
  margin: 0.1rem 0 1rem;
  padding: 0.75rem 0.85rem;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  border: 1px solid #d6e0e5;
  border-radius: 10px;
  background: #f3f7f9;
}

.manage-access-folder-icon {
  width: 2.2rem;
  height: 1.65rem;
  background: url("resources/photo-album-icon.svg") center / contain no-repeat;
}

.manage-access-folder-summary strong,
.manage-access-folder-summary span:not(.manage-access-folder-icon) {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manage-access-folder-summary strong {
  color: #263c49;
  font-size: 0.92rem;
}

.manage-access-folder-summary span:not(.manage-access-folder-icon) {
  margin-top: 0.12rem;
  color: #647580;
  font-size: 0.76rem;
}

.manage-access-section {
  overflow: hidden;
  border: 1px solid #d9e1e5;
  border-radius: 10px;
  background: #fff;
}

.manage-access-section-heading {
  display: flex;
  padding: 0.7rem 0.85rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid #e0e6e9;
  background: #f8fafb;
}

.manage-access-section-heading strong,
.manage-access-section-heading span {
  display: block;
}

.manage-access-section-heading strong {
  color: #324b5a;
  font-size: 0.88rem;
}

.manage-access-section-heading span {
  margin-top: 0.12rem;
  color: #647580;
  font-size: 0.74rem;
}

.manage-share-list.share-list {
  max-height: 16rem;
  margin: 0;
  overflow-y: auto;
}

.manage-share-empty {
  margin: 0;
  padding: 0.75rem 0.85rem 0.9rem 3.95rem;
  border-top: 1px solid #edf0f2;
}

.manage-add-section {
  margin-top: 1rem;
  padding: 0.85rem;
  border: 1px solid #d9e1e5;
  border-radius: 10px;
  background: #f8fafb;
}

.manage-add-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.share-form-title {
  color: #324b5a;
  font-size: 0.9rem;
}

.share-form .storage-field {
  margin: 0;
}

.manage-add-form > .share-email-help {
  margin: 0;
  grid-column: 1 / -1;
}

.share-list {
  display: grid;
  margin-top: 1rem;
}

.share-email-only {
  padding: 0.3rem 0;
  overflow: hidden;
  color: #657681;
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-email-only strong {
  font-weight: 400;
}

.share-row {
  display: grid;
  min-width: 0;
  padding: 0.72rem 0.85rem;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto auto;
  gap: 0.65rem;
  align-items: center;
  border-bottom: 1px solid #e3e8eb;
}

.share-row:last-child {
  border-bottom: 0;
}

.owner-access-row {
  background: #fbfcfd;
}

.access-avatar {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border-radius: 50%;
  background: #dce9ef;
  color: #314f62;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.owner-access-row .access-avatar {
  background: #3f667f;
  color: #fff;
}

.access-person {
  min-width: 0;
}

.access-person strong,
.access-person span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-person strong {
  color: #2e414d;
  font-size: 0.82rem;
}

.access-person span {
  margin-top: 0.08rem;
  color: #647580;
  font-size: 0.72rem;
}

.access-role-badge {
  display: inline-flex;
  min-height: 1.65rem;
  padding: 0.25rem 0.55rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #bdcbd2;
  border-radius: 999px;
  background: #fff;
  color: #536875;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.access-role-badge.is-owner {
  border-color: #adc4d0;
  background: #e9f1f5;
  color: #314f62;
}

.manage-remove-button {
  min-height: 2rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid #b76a6a;
  border-radius: 7px;
  background: #fff;
  color: #8f2a2a;
  font-size: 0.72rem;
  font-weight: 700;
}

.manage-remove-button:hover:not(:disabled) {
  border-color: #8f2a2a;
  background: #faeeee;
}

.manage-remove-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.manage-remove-button:focus-visible {
  outline: 3px solid #0069d9;
  outline-offset: 2px;
}

.manage-dialog-actions {
  display: flex;
  margin-top: 1rem;
  justify-content: flex-end;
}

.directory-file-item {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 7.5rem;
  padding: 0.65rem 0.45rem;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  justify-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  box-shadow: none;
}

#selected-directory-list:not(.is-list-view) {
  grid-template-columns: repeat(auto-fill, minmax(min(11rem, 100%), 1fr));
  gap: 1.25rem 0.5rem;
}

#selected-directory-list:not(.is-list-view) .directory-file-item {
  min-height: 0;
  padding: 0;
  align-content: start;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.directory-file-item:hover {
  border-color: #c6d6df;
  background: #edf4f7;
}

#selected-directory-list:not(.is-list-view) .directory-file-item:hover,
#selected-directory-list:not(.is-list-view) .directory-file-item.is-selected {
  background: transparent;
  box-shadow: none;
}

#selected-directory-list:not(.is-list-view)
  .directory-file-item:hover .directory-photo-preview {
  box-shadow: 0 3px 12px rgba(60, 64, 67, 0.22);
}

#selected-directory-list:not(.is-list-view)
  .directory-file-item.is-selected .directory-photo-preview {
  outline: 3px solid #1a73e8;
  outline-offset: 2px;
}

.directory-file-item.is-selected {
  border-color: #c6d6df;
  background: #edf4f7;
  box-shadow: inset 0 0 0 1px #8faebf;
}

.directory-file-item:focus-visible {
  outline: 3px solid #0069d9;
  outline-offset: 2px;
}

.file-identity {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 3.8rem auto;
  gap: 0.4rem;
  align-items: center;
  justify-items: center;
}

#selected-directory-list:not(.is-list-view) .file-identity {
  grid-template-rows: auto auto;
  gap: 0.55rem;
  align-items: start;
  justify-items: stretch;
}

.file-identity strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#selected-directory-list:not(.is-list-view) .file-identity strong {
  padding: 0 0.2rem;
  color: #202124;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
}

.directory-photo-preview {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: #f1f3f4;
  transition: box-shadow 150ms ease;
}

.directory-photo-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.directory-photo-preview.is-unavailable {
  background: #f5f5f5;
}

.file-kind {
  position: relative;
  display: grid;
  width: 2.85rem;
  height: 3.45rem;
  padding-top: 0.45rem;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  background: #e8eef2;
  clip-path: polygon(0 0, 72% 0, 100% 23%, 100% 100%, 0 100%);
  color: #466276;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.file-kind::after {
  position: absolute;
  width: 0.72rem;
  height: 0.72rem;
  content: "";
  top: -1px;
  right: -1px;
  border-bottom: 1px solid currentColor;
  border-left: 1px solid currentColor;
  background: rgba(255, 255, 255, 0.58);
}

.file-kind-image { background: #e7f2e8; color: #32623b; }
.file-kind-video,
.file-kind-audio { background: #eee9f8; color: #5c4480; }
.file-kind-pdf { background: #f9e8e8; color: #8b3434; }
.file-kind-document,
.file-kind-text { background: #e5eef8; color: #365c85; }
.file-kind-spreadsheet { background: #e4f2ea; color: #286344; }
.file-kind-presentation { background: #faebdf; color: #8a4d25; }
.file-kind-archive { background: #f3eedf; color: #705d27; }

.file-type-details,
.file-size-details,
.file-details {
  display: none;
  color: #647580;
  font-size: 0.8rem;
}

.directory-item-list.is-list-view .directory-file-item {
  min-height: 3.1rem;
  padding: 0.4rem 0.75rem;
  grid-template-columns: var(--directory-list-columns);
  gap: 1rem;
  align-content: normal;
  align-items: center;
  justify-items: stretch;
  border: 0;
  border-bottom: 1px solid #e4e9ec;
  border-radius: 0;
  box-shadow: none;
}

.directory-item-list.is-list-view .file-identity {
  grid-template-columns: 2rem minmax(0, 1fr);
  grid-template-rows: auto;
  gap: 0.75rem;
  justify-items: stretch;
}

.directory-item-list.is-list-view .directory-photo-preview {
  width: 2rem;
  height: 2rem;
  aspect-ratio: auto;
  justify-self: center;
  border-radius: 4px;
}

.directory-item-list.is-list-view .file-identity strong {
  min-width: 0;
  overflow: hidden;
  align-self: center;
  text-align: left;
  text-overflow: ellipsis;
}

.directory-item-list.is-list-view .file-kind {
  width: 1.55rem;
  height: 1.85rem;
  padding-top: 0.18rem;
  justify-self: center;
  border-width: 1.25px;
  font-size: 0.48rem;
}

.directory-item-list.is-list-view .file-kind::after {
  width: 0.44rem;
  height: 0.44rem;
}

.directory-item-list.is-list-view .file-type-details,
.directory-item-list.is-list-view .file-size-details,
.directory-item-list.is-list-view .file-details {
  display: block;
}

.directory-item-list.is-list-view .file-size-details {
  text-align: right;
}

.directory-item-list.is-list-view .directory-item-type,
.directory-item-list.is-list-view .directory-item-size,
.directory-item-list.is-list-view .directory-item-modified,
.directory-item-list.is-list-view .file-type-details,
.directory-item-list.is-list-view .file-size-details,
.directory-item-list.is-list-view .file-details {
  min-width: 0;
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-item-list.is-list-view .directory-folder-button.is-selected,
.directory-item-list.is-list-view .directory-file-item.is-selected {
  background: #e2edf3;
  box-shadow: inset 3px 0 #587d92;
}

.file-pagination {
  display: flex;
  margin-top: 1rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.folder-dialog {
  width: min(calc(100% - 2rem), 32rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
}

.dialog-location {
  margin: 0 0 0.85rem;
  color: #597184;
  font-size: 0.86rem;
  font-weight: 700;
}

.folder-dialog::backdrop {
  background: rgba(12, 19, 24, 0.72);
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.dialog-heading h2 {
  margin: 0.15rem 0 0.7rem;
  font-size: clamp(1.2rem, 4vw, 1.8rem);
}

.dialog-close {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #cfd8dd;
  border-radius: 50%;
  background: #fff;
  color: #253b49;
  font-size: 1.6rem;
  line-height: 1;
}

/* The album preview intentionally reuses directory selection behavior while
   keeping its photo-book layout independent from the legacy file grid. */
#selected-directory-list.inline-album-preview .inline-album-photo {
  display: grid;
  min-height: 0;
  padding: 0;
  align-content: normal;
  justify-items: stretch;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(42, 55, 62, 0.13);
}

#selected-directory-list.inline-album-preview .inline-album-photo:hover,
#selected-directory-list.inline-album-preview .inline-album-photo:focus-visible {
  border-color: rgba(72, 105, 124, 0.56);
  background: #fff;
  box-shadow: 0 8px 22px rgba(42, 55, 62, 0.18);
}

#selected-directory-list.inline-album-preview .inline-album-photo.is-selected {
  border-color: #47758f;
  background: #fff;
  box-shadow:
    0 0 0 3px rgba(71, 117, 143, 0.18),
    0 8px 22px rgba(42, 55, 62, 0.18);
}

#selected-directory-list.inline-album-preview .inline-album-text-card,
#selected-directory-list.inline-album-preview .inline-album-text-card:hover,
#selected-directory-list.inline-album-preview .inline-album-text-card:focus-within {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 242, 229, 0.98));
}

#selected-directory-list.inline-album-preview
  .inline-album-page .inline-album-photo {
  border: 0.28rem solid #fff;
  border-radius: 3px;
}

@media (max-width: 1199.98px) {
  .toolbar-actions {
    max-width: none;
  }

  .directory-browser {
    --directory-list-columns: minmax(12rem, 1fr) 7rem 6rem 8.5rem;
  }

  .storage-layout {
    grid-template-columns: minmax(13rem, 15rem) minmax(0, 1fr);
    grid-template-rows: minmax(28rem, 1fr) auto;
  }

  .pane-resizer {
    display: none;
  }

  .manager-sidebar {
    grid-row: 1 / 3;
    border-right: 1px solid #dce3e7;
  }

  .manager-inspector {
    max-height: 20rem;
    grid-column: 2;
    border-top: 1px solid #dce3e7;
    border-left: 0;
  }

}

@media (max-width: 991.98px) {
  .file-storage-container {
    height: auto;
  }

  .storage-workspace {
    flex: none;
  }

  .storage-layout {
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    overflow: visible;
  }

  .manager-sidebar,
  .manager-content,
  .manager-inspector {
    max-height: none;
    grid-column: auto;
    grid-row: auto;
    overflow: visible;
  }

  .manager-content,
  .selected-folder {
    display: block;
  }

  .manager-content > .directory-browser,
  .selected-folder .directory-browser {
    overflow-x: auto;
    overflow-y: visible;
  }

  .manager-sidebar > .folder-browser {
    flex: none;
  }

  .folder-section-scroll {
    overflow: visible;
  }

  .manager-sidebar,
  .manager-inspector {
    border: 0;
    border-bottom: 1px solid #dce3e7;
  }

  .sidebar-account {
    margin-top: 0;
  }

  .inline-album-workspace {
    max-height: none;
  }
}

@media (max-width: 767.98px) {
  .file-storage-stage {
    padding: 0.85rem 0 1.25rem;
  }

  .auth-panel,
  .verification-panel,
  .access-denied-panel,
  .share-form {
    grid-template-columns: 1fr;
  }

  .crying-duck-doodle {
    width: min(13rem, 70vw);
  }

  .section-heading-row {
    align-items: stretch;
    flex-direction: column;
  }

  .content-toolbar,
  .toolbar-upload-area {
    align-items: stretch;
  }

  .content-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .toolbar-edit-actions,
  .toolbar-publish-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .toolbar-upload-area {
    flex-direction: column;
  }

  .toolbar-actions,
  .directory-sort-control {
    width: 100%;
    max-width: none;
    flex-basis: auto;
  }

  .toolbar-publish-panel,
  .toolbar-public-link,
  .toolbar-album-type-control,
  .toolbar-album-save-actions {
    width: 100%;
    flex-basis: auto;
  }

  .toolbar-album-save-actions .storage-button {
    flex: 1 1 0;
  }

  .directory-tool-panel {
    width: auto;
    flex: 1 1 auto;
  }

  .toolbar-upload-progress {
    width: calc(100vw - 1.5rem);
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .auth-button-row {
    grid-template-columns: 1fr;
  }

  .storage-button {
    width: 100%;
  }

  .directory-view-button,
  .dialog-close {
    width: 2.75rem;
    height: 2.75rem;
  }

  .share-row {
    grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  }

  .share-row .manage-remove-button {
    width: max-content;
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .manage-add-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .shared-access-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .manage-access-button {
    width: 100%;
  }

  .inline-album-workspace {
    padding: 0.8rem;
  }

  .inline-album-preview.is-tile .inline-album-preview-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 6rem;
  }

  .inline-album-page {
    min-height: 28rem;
    aspect-ratio: auto;
  }

  .inline-album-page-photos {
    grid-template-columns: 1fr;
  }

  .inline-album-page.has-3-photos .inline-album-photo:first-child {
    grid-row: auto;
  }

}

@media (prefers-reduced-motion: reduce) {
  .storage-notification,
  .email-auth-summary-label::after,
  .storage-button,
  .pane-resizer::before,
  .folder-access-track,
  .folder-access-track::before,
  .shared-access-content,
  .delete-folder-message,
  .inline-album-photo-actions,
  .inline-album-photo-arrange-actions {
    transition: none;
  }

  .directory-tool-panel {
    animation: none;
  }

  .storage-button:hover:not(:disabled) {
    transform: none;
  }
}
