/* Space Mono ----------------------------------------------------------- */
@font-face {
  font-family: "Space Mono";
  src: url("/assets/fonts/SpaceMono-Regular-webfont.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Mono";
  src: url("/assets/fonts/SpaceMono-Italic-webfont.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Space Mono";
  src: url("/assets/fonts/SpaceMono-Bold-webfont.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Mono";
  src: url("/assets/fonts/SpaceMono-BoldItalic-webfont.woff") format("woff");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --vault-background: #020817;
  --vault-background-soft: #071126;
  --vault-surface: rgba(7, 18, 42, 0.82);
  --vault-surface-solid: #09152d;
  --vault-surface-light: #0d1b38;

  --vault-border: rgba(73, 111, 190, 0.28);
  --vault-border-bright: rgba(64, 116, 255, 0.65);

  --vault-blue: #316bff;
  --vault-blue-light: #5688ff;
  --vault-electric-blue: #1c5cff;
  --vault-cyan: #18d5ff;
  --vault-purple: #7548ff;
  --vault-purple-light: #9b6cff;

  --vault-green: #28c98b;
  --vault-orange: #ff823a;
  --vault-gold: #ffc247;

  --vault-text: #f4f7ff;
  --vault-muted: #8996b3;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--vault-text);
  background:
    radial-gradient(
      circle at 15% 15%,
      rgba(139, 92, 246, 0.13),
      transparent 30%
    ),
    radial-gradient(
      circle at 85% 25%,
      rgba(34, 211, 238, 0.08),
      transparent 30%
    ),
    var(--vault-background);
  font-family: "Space Mono", monospace;
}

button,
input,
select,
textarea,
.btn,
.navbar,
.form-control,
.form-select {
  font-family: "Space Mono", monospace;
}

a {
  text-decoration: none;
}

.vault-navbar {
  min-height: 76px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(6, 7, 19, 0.72);
  backdrop-filter: blur(20px);
}

.vault-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(182, 108, 255, 0.5);
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--vault-purple), var(--vault-pink));
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.35);
}

.vault-navbar .nav-link {
  padding: 10px 14px !important;
  color: var(--vault-muted);
  font-weight: 600;
}

.vault-navbar .nav-link:hover {
  color: white;
}

.vault-nav-button {
  border: 1px solid rgba(182, 108, 255, 0.38);
  border-radius: 12px;
  color: white;
  background: linear-gradient(
    135deg,
    rgba(139, 92, 246, 0.92),
    rgba(236, 72, 153, 0.86)
  );
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.22);
}

.vault-nav-button:hover {
  color: white;
  transform: translateY(-1px);
}

.landing-section {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

#three-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#three-scene canvas {
  width: 100%;
  height: 100%;
}

.landing-background {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(6, 7, 19, 0.98) 5%,
    rgba(6, 7, 19, 0.73) 52%,
    rgba(6, 7, 19, 0.44) 100%
  );
  pointer-events: none;
}

.landing-container {
  position: relative;
  z-index: 2;
}

.landing-copy {
  padding-top: 120px;
  padding-bottom: 70px;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
  padding: 8px 15px;
  border: 1px solid rgba(182, 108, 255, 0.25);
  border-radius: 999px;
  color: #d7c5ff;
  background: rgba(139, 92, 246, 0.09);
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vault-cyan);
  box-shadow: 0 0 12px var(--vault-cyan);
}

.landing-copy h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(3.2rem, 7vw, 6.3rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.landing-copy h1 span {
  display: block;
  color: transparent;
  background: linear-gradient(90deg, #c77dff, #ff71ce, #70e7ff);
  -webkit-background-clip: text;
  background-clip: text;
}

.landing-description {
  max-width: 690px;
  color: var(--vault-muted);
  font-size: 1.1rem;
  line-height: 1.8;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.primary-vault-button,
.secondary-vault-button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 750;
}

.primary-vault-button {
  color: white;
  background: linear-gradient(135deg, var(--vault-purple), var(--vault-pink));
  box-shadow: 0 14px 40px rgba(139, 92, 246, 0.32);
}

.primary-vault-button:hover {
  color: white;
  transform: translateY(-2px);
}

.secondary-vault-button {
  border: 1px solid var(--vault-border);
  color: white;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
}

.secondary-vault-button:hover {
  border-color: rgba(34, 211, 238, 0.35);
  color: white;
  background: rgba(34, 211, 238, 0.08);
}

.landing-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  margin-top: 45px;
}

.landing-highlights div {
  display: flex;
  flex-direction: column;
}

.landing-highlights strong {
  font-size: 1.5rem;
}

.landing-highlights span {
  color: var(--vault-muted);
  font-size: 0.83rem;
}

.media-orbit-card {
  position: relative;
  min-height: 390px;
  margin-top: 95px;
  border: 1px solid var(--vault-border);
  border-radius: 32px;
  background: linear-gradient(
    145deg,
    rgba(23, 27, 59, 0.66),
    rgba(11, 13, 32, 0.32)
  );
  box-shadow:
    0 30px 100px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
}

.orbit-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(139, 92, 246, 0.42),
    transparent 68%
  );
  filter: blur(8px);
  transform: translate(-50%, -50%);
}

.orbit-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.orbit-label {
  color: var(--vault-muted);
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.orbit-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  font-size: 1.5rem;
  font-weight: 800;
}

.orbit-categories {
  display: grid;
  width: 80%;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 42px;
}

.orbit-categories span {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid var(--vault-border);
  border-radius: 14px;
  color: #deddf3;
  background: rgba(255, 255, 255, 0.035);
}

.dashboard-preview-section {
  padding: 110px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 42px;
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(2.1rem, 4vw, 3.8rem);
  font-weight: 850;
  letter-spacing: -0.05em;
}

.section-heading p {
  max-width: 480px;
  margin: 0;
  color: var(--vault-muted);
  line-height: 1.75;
}

.section-eyebrow {
  color: var(--vault-cyan);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.preview-shell {
  display: flex;
  min-height: 630px;
  overflow: hidden;
  border: 1px solid var(--vault-border);
  border-radius: 30px;
  background: rgba(12, 14, 33, 0.86);
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.42);
}

.preview-sidebar {
  display: flex;
  width: 78px;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 25px 0;
  border-right: 1px solid var(--vault-border);
  background: rgba(8, 9, 24, 0.92);
}

.preview-sidebar span,
.preview-logo {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: var(--vault-muted);
}

.preview-logo {
  margin-bottom: 18px;
  color: white;
  background: linear-gradient(135deg, var(--vault-purple), var(--vault-pink));
}

.preview-sidebar .active {
  color: white;
  background: rgba(139, 92, 246, 0.2);
}

.preview-main {
  flex: 1;
  padding: 32px;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-header span {
  color: var(--vault-muted);
  font-size: 0.85rem;
}

.preview-header h3 {
  margin-top: 4px;
  font-size: 1.7rem;
  font-weight: 800;
}

.preview-header button {
  padding: 11px 17px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--vault-purple), var(--vault-pink));
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 30px;
}

.summary-card {
  display: flex;
  min-height: 115px;
  align-items: center;
  gap: 15px;
  padding: 20px;
  border: 1px solid var(--vault-border);
  border-radius: 18px;
}

.summary-card > i {
  font-size: 1.7rem;
}

.summary-card div {
  display: flex;
  flex-direction: column;
}

.summary-card strong {
  font-size: 1.5rem;
}

.summary-card span {
  color: var(--vault-muted);
  font-size: 0.85rem;
}

.purple-card {
  background: rgba(139, 92, 246, 0.13);
}

.cyan-card {
  background: rgba(34, 211, 238, 0.1);
}

.pink-card {
  background: rgba(236, 72, 153, 0.1);
}

.gold-card {
  background: rgba(247, 185, 85, 0.1);
}

.preview-library {
  margin-top: 35px;
}

.library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.library-heading h4 {
  font-weight: 750;
}

.library-heading span {
  color: var(--vault-purple-light);
}

.media-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.media-preview-card {
  position: relative;
  min-height: 245px;
  overflow: hidden;
  border: 1px solid var(--vault-border);
  border-radius: 19px;
  background-size: cover;
}

.media-one {
  background:
    linear-gradient(145deg, rgba(58, 20, 99, 0.2), rgba(4, 8, 22, 0.3)),
    radial-gradient(circle at 70% 30%, #ec4899, #23104d 48%, #080916 75%);
}

.media-two {
  background:
    linear-gradient(145deg, rgba(20, 85, 99, 0.12), rgba(4, 8, 22, 0.4)),
    radial-gradient(circle at 50% 25%, #22d3ee, #16245e 48%, #080916 75%);
}

.media-three {
  background:
    linear-gradient(145deg, rgba(90, 31, 118, 0.1), rgba(4, 8, 22, 0.4)),
    radial-gradient(circle at 60% 28%, #a855f7, #291059 48%, #080916 75%);
}

.media-card-overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 45px 18px 18px;
  background: linear-gradient(transparent, rgba(4, 5, 16, 0.95));
}

.media-card-overlay span {
  color: var(--vault-cyan);
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
}

.media-card-overlay h5 {
  margin: 5px 0;
  font-weight: 750;
}

.media-card-overlay small {
  color: var(--vault-muted);
}

.category-section {
  padding: 40px 0 110px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.category-grid article {
  padding: 28px;
  border: 1px solid var(--vault-border);
  border-radius: 20px;
  background: var(--vault-surface);
  transition:
    opacity 450ms ease,
    visibility 450ms ease;
}

.vault-transition {
  will-change: opacity;
}

.vault-door-scene canvas {
  will-change: transform;
}

.category-grid article:hover {
  border-color: rgba(182, 108, 255, 0.5);
  transform: translateY(-5px);
}

.category-grid i {
  color: var(--vault-purple-light);
  font-size: 1.8rem;
}

.category-grid h3 {
  margin: 20px 0 10px;
  font-size: 1.18rem;
}

.category-grid p {
  margin: 0;
  color: var(--vault-muted);
  line-height: 1.65;
}

.vault-footer {
  padding: 45px 0;
  border-top: 1px solid var(--vault-border);
  background: #050610;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: white;
  font-weight: 750;
}

.footer-content p {
  margin: 0;
  color: var(--vault-muted);
  font-size: 0.88rem;
}

@media (max-width: 991px) {
  .media-orbit-card {
    min-height: 300px;
    margin-top: 0;
    margin-bottom: 70px;
  }

  .landing-background {
    background: rgba(6, 7, 19, 0.74);
  }

  .summary-grid,
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 767px) {
  .landing-copy h1 {
    font-size: 3.5rem;
  }

  .landing-highlights {
    gap: 22px;
  }

  .preview-sidebar {
    display: none;
  }

  .preview-main {
    padding: 22px;
  }

  .summary-grid,
  .media-preview-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .preview-header,
  .footer-content {
    align-items: flex-start;
    flex-direction: column;
  }

  .preview-shell {
    min-height: auto;
  }
}

.auth-section {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 130px 0 70px;
}

.auth-card {
  width: min(100%, 540px);
  margin: 0 auto;
  padding: 38px;
  border: 1px solid var(--vault-border);
  border-radius: 24px;

  background: linear-gradient(
    145deg,
    rgba(10, 24, 53, 0.96),
    rgba(4, 12, 30, 0.96)
  );

  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.45),
    0 0 35px rgba(49, 107, 255, 0.08);
}

.auth-heading {
  margin-bottom: 30px;
}

.auth-heading > span {
  color: var(--vault-cyan);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-heading h1 {
  margin: 8px 0 12px;
  font-size: 2.5rem;
  font-weight: 400;
}

.auth-heading p {
  margin: 0;
  color: var(--vault-muted);
  line-height: 1.7;
}

.auth-card .form-label {
  color: var(--vault-text);
  font-size: 0.85rem;
}

.auth-card .form-control {
  min-height: 50px;
  border: 1px solid var(--vault-border);
  border-radius: 12px;
  color: var(--vault-text);
  background: rgba(2, 8, 23, 0.72);
}

.auth-card .form-control:focus {
  border-color: var(--vault-blue-light);
  color: var(--vault-text);
  background: rgba(2, 8, 23, 0.92);

  box-shadow: 0 0 0 0.2rem rgba(49, 107, 255, 0.15);
}

.auth-switch {
  margin: 24px 0 0;
  color: var(--vault-muted);
  text-align: center;
}

.auth-switch a {
  color: var(--vault-cyan);
}

.user-greeting {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--vault-cyan) !important;
}

.logout-form {
  margin: 0;
}

.logout-button {
  border: 1px solid var(--vault-border);
  border-radius: 11px;
  color: var(--vault-text);
  background: rgba(255, 255, 255, 0.04);
}

.logout-button:hover {
  border-color: rgba(255, 92, 122, 0.55);
  color: #ff8ca2;
  background: rgba(255, 92, 122, 0.08);
}

.media-page-section {
  min-height: 100vh;
  padding: 135px 0 90px;
}

.media-form-card {
  max-width: 920px;
  margin: 0 auto;
  padding: 38px;
  border: 1px solid var(--vault-border);
  border-radius: 25px;
  background: linear-gradient(
    145deg,
    rgba(10, 24, 53, 0.96),
    rgba(4, 12, 30, 0.97)
  );
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.media-page-heading,
.library-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 35px;
}

.media-page-heading h1,
.library-page-header h1 {
  margin: 8px 0 10px;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 400;
}

.media-page-heading p,
.library-page-header p {
  max-width: 650px;
  margin: 0;
  color: var(--vault-muted);
  line-height: 1.7;
}

.media-form-card .form-label {
  color: var(--vault-text);
  font-size: 0.82rem;
}

.media-form-card .form-control,
.media-form-card .form-select {
  min-height: 50px;
  border: 1px solid var(--vault-border);
  border-radius: 12px;
  color: var(--vault-text);
  background-color: rgba(2, 8, 23, 0.78);
}

.media-form-card textarea.form-control {
  min-height: 130px;
}

.media-form-card .form-control:focus,
.media-form-card .form-select:focus {
  border-color: var(--vault-blue-light);
  color: var(--vault-text);
  background-color: rgba(2, 8, 23, 0.95);
  box-shadow: 0 0 0 0.2rem rgba(49, 107, 255, 0.14);
}

.media-form-card .form-select option {
  color: white;
  background: var(--vault-surface-solid);
}

.vault-checkbox {
  padding: 18px 18px 18px 45px;
  border: 1px solid var(--vault-border);
  border-radius: 12px;
  background: rgba(2, 8, 23, 0.48);
}

.media-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}

.library-card {
  overflow: hidden;
  border: 1px solid var(--vault-border);
  border-radius: 20px;
  background: linear-gradient(
    145deg,
    rgba(10, 24, 53, 0.92),
    rgba(4, 12, 30, 0.96)
  );
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.library-card:hover {
  border-color: var(--vault-border-bright);
  transform: translateY(-5px);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.35),
    0 0 24px rgba(49, 107, 255, 0.12);
}

.library-card-cover {
  position: relative;
  height: 290px;
  overflow: hidden;
  background: radial-gradient(
    circle at 50% 25%,
    rgba(49, 107, 255, 0.45),
    rgba(4, 12, 30, 0.95) 70%
  );
}

.library-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--vault-blue-light);
  font-size: 4rem;
}

.media-type-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 10px;
  border: 1px solid rgba(86, 136, 255, 0.45);
  border-radius: 8px;
  color: white;
  background: rgba(28, 92, 255, 0.82);
  font-size: 0.68rem;
}

.library-card-body {
  padding: 20px;
}

.library-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.library-card-heading h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 400;
}

.rating {
  flex-shrink: 0;
  color: var(--vault-gold);
  font-size: 0.78rem;
}

.library-card-details {
  min-height: 21px;
  margin: 8px 0 13px;
  color: var(--vault-muted);
  font-size: 0.72rem;
}

.status-badge {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid rgba(24, 213, 255, 0.25);
  border-radius: 999px;
  color: var(--vault-cyan);
  background: rgba(24, 213, 255, 0.07);
  font-size: 0.68rem;
}

.library-card-notes {
  display: -webkit-box;
  min-height: 64px;
  margin: 12px 0 0;
  overflow: hidden;

  color: var(--vault-muted);
  font-size: 0.67rem;
  line-height: 1.55;

  white-space: normal;
  overflow-wrap: anywhere;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.library-card-actions {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
  margin-top: 12px;
}

.delete-media-form {
  display: flex;
  width: 42px;
  height: 40px;
  margin: 0;
}

.card-action-button,
.card-delete-button {
  height: 40px;

  border: 1px solid var(--vault-border);
  border-radius: 8px;

  color: var(--vault-text);
  background: rgba(255, 255, 255, 0.035);
}

.card-action-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 7px;

  padding: 0 12px;

  font-size: 0.68rem;
}

.card-delete-button {
  display: grid;
  width: 42px;
  min-width: 42px;
  height: 40px;
  place-items: center;

  padding: 0;

  color: #ff7896;
}

.card-action-button:hover {
  border-color: var(--vault-blue-light);
  color: white;
  background: rgba(49, 107, 255, 0.12);
}

.card-delete-button:hover {
  border-color: rgba(255, 99, 132, 0.45);
  color: #ff9aae;
  background: rgba(255, 99, 132, 0.1);
}

.empty-library {
  max-width: 700px;
  margin: 70px auto;
  padding: 70px 30px;
  border: 1px dashed var(--vault-border-bright);
  border-radius: 24px;
  text-align: center;
  background: rgba(7, 18, 42, 0.55);
}

.empty-library-icon {
  display: grid;
  width: 80px;
  height: 80px;
  margin: 0 auto 22px;
  place-items: center;
  border-radius: 24px;
  color: var(--vault-cyan);
  background: rgba(49, 107, 255, 0.12);
  font-size: 2rem;
}

.empty-library h2 {
  font-weight: 400;
}

.empty-library p {
  margin-bottom: 26px;
  color: var(--vault-muted);
}

@media (max-width: 767px) {
  .media-page-heading,
  .library-page-header {
    flex-direction: column;
  }

  .media-form-card {
    padding: 25px 20px;
  }

  .media-form-actions {
    flex-direction: column-reverse;
  }

  .media-form-actions .btn {
    width: 100%;
  }
}

.public-library-section {
  background:
    radial-gradient(
      circle at 80% 12%,
      rgba(49, 107, 255, 0.11),
      transparent 28%
    ),
    radial-gradient(
      circle at 10% 70%,
      rgba(117, 72, 255, 0.07),
      transparent 30%
    );
}

.public-library-card {
  position: relative;
}

.shared-by {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--vault-border);
  color: var(--vault-muted);
  font-size: 0.7rem;
}

.shared-by i {
  color: var(--vault-cyan);
  font-size: 1rem;
}
.vault-dashboard {
  min-height: 100vh;
  padding-top: 76px;
  background:
    radial-gradient(
      circle at 78% 8%,
      rgba(49, 107, 255, 0.11),
      transparent 28%
    ),
    linear-gradient(145deg, #020817, #040b1c 55%, #020714);
}

.dashboard-layout {
  display: flex;
  min-height: calc(100vh - 76px);
}

.dashboard-sidebar {
  position: sticky;
  top: 76px;
  display: flex;
  width: 82px;
  height: calc(100vh - 76px);
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
  border-right: 1px solid var(--vault-border);
  background: rgba(2, 8, 23, 0.94);
  backdrop-filter: blur(20px);
}

.dashboard-sidebar-logo {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(86, 136, 255, 0.65);
  border-radius: 13px;
  color: white;
  background: linear-gradient(
    145deg,
    var(--vault-electric-blue),
    var(--vault-purple)
  );
  box-shadow: 0 0 24px rgba(49, 107, 255, 0.3);
}

.dashboard-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 44px;
}

.dashboard-nav-link {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--vault-muted);
  background: transparent;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.dashboard-nav-link:hover,
.dashboard-nav-link.active {
  border-color: rgba(86, 136, 255, 0.35);
  color: white;
  background: rgba(49, 107, 255, 0.14);
}

.dashboard-sidebar-bottom {
  margin-top: auto;
}

.dashboard-content {
  width: calc(100% - 82px);
  padding: 42px clamp(22px, 4vw, 65px) 90px;
}

.dashboard-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 35px;
}

.dashboard-welcome {
  color: var(--vault-cyan);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-topbar h1 {
  margin: 9px 0 10px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 400;
}

.dashboard-topbar p {
  max-width: 690px;
  margin: 0;
  color: var(--vault-muted);
  line-height: 1.7;
}

.dashboard-add-button {
  display: inline-flex;
  min-height: 50px;
  flex-shrink: 0;
  align-items: center;
  gap: 9px;
  padding: 0 20px;
  border: 1px solid rgba(86, 136, 255, 0.65);
  border-radius: 12px;
  color: white;
  background: linear-gradient(
    135deg,
    var(--vault-electric-blue),
    var(--vault-purple)
  );
  box-shadow: 0 12px 30px rgba(28, 92, 255, 0.25);
}

.dashboard-add-button:hover {
  color: white;
  transform: translateY(-2px);
}

.dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 42px;
}

.dashboard-summary-card {
  display: flex;
  min-height: 120px;
  align-items: center;
  gap: 17px;
  padding: 22px;
  border: 1px solid var(--vault-border);
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(9, 21, 45, 0.96),
    rgba(4, 12, 30, 0.96)
  );
}

.summary-icon {
  display: grid;
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 14px;
  font-size: 1.4rem;
}

.dashboard-summary-card div:last-child {
  display: flex;
  flex-direction: column;
}

.dashboard-summary-card strong {
  font-size: 1.55rem;
  font-weight: 400;
}

.dashboard-summary-card span {
  color: var(--vault-muted);
  font-size: 0.75rem;
}

.movie-summary .summary-icon {
  color: var(--vault-blue-light);
  background: rgba(49, 107, 255, 0.12);
}

.show-summary .summary-icon {
  color: var(--vault-purple-light);
  background: rgba(117, 72, 255, 0.12);
}

.book-summary .summary-icon {
  color: var(--vault-green);
  background: rgba(40, 201, 139, 0.11);
}

.game-summary .summary-icon {
  color: var(--vault-orange);
  background: rgba(255, 130, 58, 0.11);
}

.dashboard-section {
  margin-top: 55px;
}

.dashboard-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 22px;
}

.dashboard-section-heading span {
  color: var(--vault-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.dashboard-section-heading h2 {
  margin: 6px 0 0;
  font-size: 1.55rem;
  font-weight: 400;
}

.dashboard-section-heading > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--vault-blue-light);
  font-size: 0.78rem;
}

.recent-media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.recent-media-card {
  overflow: hidden;
  border: 1px solid var(--vault-border);
  border-radius: 18px;
  background: linear-gradient(
    145deg,
    rgba(9, 21, 45, 0.96),
    rgba(4, 12, 30, 0.98)
  );
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.recent-media-card:hover {
  border-color: var(--vault-border-bright);
  transform: translateY(-5px);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.35),
    0 0 22px rgba(49, 107, 255, 0.12);
}

.recent-media-cover {
  position: relative;
  height: 230px;
  overflow: hidden;
  background: radial-gradient(
    circle at 50% 25%,
    rgba(49, 107, 255, 0.4),
    rgba(4, 12, 30, 0.95) 72%
  );
}

.recent-media-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recent-cover-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--vault-blue-light);
  font-size: 4rem;
}

.recent-type-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 10px;
  border: 1px solid rgba(86, 136, 255, 0.4);
  border-radius: 8px;
  color: white;
  background: rgba(28, 92, 255, 0.82);
  font-size: 0.67rem;
}

.recent-media-body {
  padding: 19px;
}

.recent-media-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.recent-media-title h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
}

.recent-media-title > span {
  color: var(--vault-gold);
  font-size: 0.73rem;
}

.recent-media-body > p {
  min-height: 20px;
  margin: 8px 0 15px;
  color: var(--vault-muted);
  font-size: 0.7rem;
}

.recent-media-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.recent-media-footer > a {
  color: var(--vault-blue-light);
  font-size: 0.72rem;
}

.book-item .recent-cover-placeholder,
.book-item .cover-placeholder {
  color: var(--vault-green);
}

.game-item .recent-cover-placeholder,
.game-item .cover-placeholder {
  color: var(--vault-orange);
}

.show-item .recent-cover-placeholder,
.show-item .cover-placeholder {
  color: var(--vault-purple-light);
}

.dashboard-empty-library {
  margin-top: 70px;
}

@media (max-width: 1100px) {
  .dashboard-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .recent-media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .dashboard-sidebar {
    display: none;
  }

  .dashboard-content {
    width: 100%;
    padding: 35px 20px 70px;
  }

  .dashboard-topbar,
  .dashboard-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-summary-grid,
  .recent-media-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-add-button {
    width: 100%;
    justify-content: center;
  }
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1050;

  display: flex;
  width: 84px;
  height: 100vh;
  flex-direction: column;
  align-items: center;

  padding: 24px 0;

  border-right: 1px solid var(--vault-border);

  background: linear-gradient(
    180deg,
    rgba(4, 13, 32, 0.98),
    rgba(2, 8, 23, 0.99)
  );

  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(20px);
}

.app-sidebar-logo {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;

  border: 1px solid rgba(86, 136, 255, 0.65);
  border-radius: 13px;

  color: white;

  background: linear-gradient(
    145deg,
    var(--vault-electric-blue),
    var(--vault-purple)
  );

  box-shadow:
    0 0 18px rgba(49, 107, 255, 0.45),
    0 0 35px rgba(49, 107, 255, 0.15);
}

.app-sidebar-navigation {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 45px;
}

.app-sidebar-link,
.app-sidebar-user,
.sidebar-logout-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;

  padding: 0;

  border: 1px solid transparent;
  border-radius: 12px;

  color: var(--vault-muted);
  background: transparent;

  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.app-sidebar-link:hover {
  border-color: rgba(86, 136, 255, 0.35);
  color: white;
  background: rgba(49, 107, 255, 0.14);
  transform: translateY(-2px);
}

.app-sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.app-sidebar-user {
  color: var(--vault-cyan);
  background: rgba(24, 213, 255, 0.07);
}

.sidebar-logout-form {
  margin: 0;
}

.sidebar-logout-button {
  cursor: pointer;
}

.sidebar-logout-button:hover {
  border-color: rgba(255, 99, 132, 0.4);
  color: #ff7896;
  background: rgba(255, 99, 132, 0.08);
}

.authenticated-content {
  min-height: 100vh;
  margin-left: 84px;
}

.vault-dashboard {
  min-height: 100vh;
  padding-top: 0;
}

.dashboard-content {
  width: 100%;
  padding: 42px clamp(22px, 4vw, 65px) 90px;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));

  gap: 30px 18px;
}

.library-card {
  overflow: visible;

  border: 0;
  border-radius: 0;

  background: transparent;
  box-shadow: none;
}

.library-card:hover {
  border-color: transparent;
  transform: none;
  box-shadow: none;
}

.library-card-cover {
  position: relative;

  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;

  overflow: hidden;

  border: 1px solid rgba(73, 111, 190, 0.34);
  border-radius: 7px;

  background: radial-gradient(
    circle at 50% 25%,
    rgba(49, 107, 255, 0.4),
    rgba(4, 12, 30, 0.98) 72%
  );

  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);

  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.library-card:hover .library-card-cover {
  border-color: var(--vault-blue-light);

  transform: translateY(-5px);

  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.42),
    0 0 18px rgba(49, 107, 255, 0.22);
}

.library-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.library-card-body {
  padding: 11px 2px 0;
}

.library-card-heading h2 {
  overflow: hidden;
  margin: 0;

  font-size: 0.87rem;
  font-weight: 400;
  line-height: 1.45;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-card-details {
  min-height: 18px;
  margin: 5px 0 8px;

  overflow: hidden;

  color: var(--vault-muted);
  font-size: 0.66rem;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-card-notes {
  display: none;
}

.media-type-badge {
  top: 10px;
  left: 10px;

  padding: 5px 8px;

  border-radius: 6px;
  font-size: 0.58rem;
}

.status-badge {
  padding: 5px 8px;
  font-size: 0.6rem;
}

.recent-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));

  gap: 26px 18px;
}

.recent-media-card {
  overflow: visible;

  border: 0;
  border-radius: 0;

  background: transparent;
  box-shadow: none;
}

.recent-media-card:hover {
  border-color: transparent;
  transform: none;
  box-shadow: none;
}

.recent-media-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;

  border: 1px solid var(--vault-border);
  border-radius: 7px;

  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);

  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.recent-media-card:hover .recent-media-cover {
  border-color: var(--vault-blue-light);

  transform: translateY(-5px);

  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.42),
    0 0 18px rgba(49, 107, 255, 0.22);
}

.recent-media-body {
  padding: 11px 2px 0;
}

.recent-media-title h3 {
  overflow: hidden;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .app-sidebar {
    inset: auto 0 0 0;

    width: 100%;
    height: 70px;
    flex-direction: row;

    padding: 0 18px;

    border-top: 1px solid var(--vault-border);
    border-right: 0;
  }

  .app-sidebar-logo {
    width: 40px;
    height: 40px;
  }

  .app-sidebar-navigation {
    flex-direction: row;
    gap: 8px;
    margin: 0 auto;
  }

  .app-sidebar-bottom {
    flex-direction: row;
    gap: 7px;
    margin-top: 0;
  }

  @media (max-width: 767px) {
    .sidebar-profile {
      width: auto;
    }

    .sidebar-profile-name {
      display: none;
    }

    .sidebar-avatar {
      width: 40px;
      height: 40px;
    }
  }

  .authenticated-content {
    margin-left: 0;
    padding-bottom: 70px;
  }

  .library-grid,
  .recent-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Allow poster-card information to display properly */

.library-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.library-card-body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 12px 2px 0;
}

.library-card-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.library-card-heading h2 {
  display: -webkit-box;
  min-height: 42px;
  margin: 0;
  overflow: hidden;

  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.45;

  white-space: normal;
  overflow-wrap: anywhere;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rating {
  flex-shrink: 0;
  padding-top: 2px;
}

/* Genre and platform */

.library-card-details {
  display: -webkit-box;
  min-height: 36px;
  margin: 7px 0 10px;
  overflow: hidden;

  color: var(--vault-muted);
  font-size: 0.67rem;
  line-height: 1.55;

  white-space: normal;
  overflow-wrap: anywhere;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* Show a short preview of the user's notes */

.library-card-notes {
  display: -webkit-box;
  min-height: 38px;
  margin: 12px 0 0;
  overflow: hidden;

  color: var(--vault-muted);
  font-size: 0.67rem;
  line-height: 1.55;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* Keep action buttons aligned at the bottom */

.library-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}

.recent-media-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.recent-media-body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 12px 2px 0;
}

.recent-media-title {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.recent-media-title h3 {
  display: -webkit-box;
  min-height: 42px;
  margin: 0;
  overflow: hidden;

  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.45;

  white-space: normal;
  overflow-wrap: anywhere;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recent-media-title > span {
  flex-shrink: 0;
  padding-top: 2px;
}

.recent-media-body > p {
  display: -webkit-box;
  min-height: 36px;
  margin: 7px 0 12px;
  overflow: hidden;

  color: var(--vault-muted);
  font-size: 0.67rem;
  line-height: 1.55;

  white-space: normal;
  overflow-wrap: anywhere;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recent-media-footer {
  margin-top: auto;
}
.status-badge {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-self: flex-start;
  align-items: center;

  padding: 5px 9px;
  border-radius: 999px;

  white-space: nowrap;
}

.library-card .library-card-notes {
  display: block !important;

  width: 100%;
  height: auto !important;
  min-height: 0;
  max-height: none !important;

  margin: 14px 0 0;

  overflow: visible !important;
  text-overflow: clip !important;

  color: var(--vault-muted);
  font-size: 0.67rem;
  line-height: 1.7;

  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;

  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
}

.media-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  margin: 36px 0 10px;
  padding: 16px 18px;

  border: 1px solid var(--vault-border);
  border-radius: 15px;

  background: linear-gradient(
    145deg,
    rgba(9, 21, 45, 0.86),
    rgba(4, 12, 30, 0.9)
  );
}

.media-filter-heading {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 9px;

  color: var(--vault-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.media-filter-heading i {
  color: var(--vault-cyan);
}

.media-filter-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.media-filter-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;

  padding: 0 12px;

  border: 1px solid var(--vault-border);
  border-radius: 999px;

  color: var(--vault-muted);
  background: rgba(255, 255, 255, 0.025);

  font-size: 0.67rem;

  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.media-filter-link > span {
  display: grid;
  min-width: 21px;
  height: 21px;
  place-items: center;

  border-radius: 999px;

  color: var(--vault-text);
  background: rgba(255, 255, 255, 0.07);

  font-size: 0.59rem;
}

.media-filter-link:hover {
  border-color: var(--vault-blue-light);
  color: white;
  background: rgba(49, 107, 255, 0.1);
  transform: translateY(-1px);
}

.media-filter-link.active {
  border-color: rgba(86, 136, 255, 0.65);
  color: white;
  background: rgba(49, 107, 255, 0.18);

  box-shadow: 0 0 18px rgba(49, 107, 255, 0.12);
}

.movie-filter i {
  color: var(--vault-blue-light);
}

.show-filter i {
  color: var(--vault-purple-light);
}

.book-filter i {
  color: var(--vault-green);
}

.game-filter i {
  color: var(--vault-orange);
}

.public-filter-bar {
  margin-bottom: 32px;
}

@media (max-width: 850px) {
  .media-filter-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .media-filter-options {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .media-filter-link {
    flex: 1;
    justify-content: center;
  }
}
.delete-modal-content {
  overflow: hidden;
  border: 1px solid var(--vault-border);
  border-radius: 20px;
  color: var(--vault-text);

  background: linear-gradient(
    145deg,
    rgba(10, 24, 53, 0.98),
    rgba(3, 9, 24, 0.99)
  );

  box-shadow:
    0 30px 100px rgba(0, 0, 0, 0.65),
    0 0 35px rgba(255, 75, 110, 0.08);
}

.delete-modal-header {
  align-items: flex-start;
  padding: 24px 26px;
  border-bottom: 1px solid var(--vault-border);
}

.delete-modal-eyebrow {
  color: #ff7896;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.delete-modal-header .modal-title {
  margin-top: 7px;
  font-size: 1.35rem;
  font-weight: 400;
}

.delete-modal-body {
  padding: 32px 26px;
  text-align: center;
}

.delete-modal-icon {
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto 22px;
  place-items: center;

  border: 1px solid rgba(255, 99, 132, 0.3);
  border-radius: 20px;

  color: #ff7896;
  background: rgba(255, 99, 132, 0.09);

  font-size: 1.7rem;
}

.delete-modal-body p {
  margin-bottom: 8px;
  color: var(--vault-text);
  line-height: 1.7;
}

.delete-modal-body strong {
  color: #ff9aae;
  font-weight: 400;
}

.delete-modal-body small {
  color: var(--vault-muted);
}

.delete-modal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  padding: 18px 26px 24px;
  border-top: 1px solid var(--vault-border);
}

.delete-modal-footer form {
  display: flex;
  margin: 0;
}

.delete-modal-footer form {
  margin: 0;
}

.confirm-delete-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 0 18px;

  border: 1px solid rgba(255, 99, 132, 0.45);
  border-radius: 12px;

  color: white;
  background: linear-gradient(135deg, #e43d61, #b51f44);
}

.confirm-delete-button:hover {
  border-color: #ff7896;
  color: white;
  transform: translateY(-1px);

  box-shadow: 0 10px 25px rgba(228, 61, 97, 0.24);
}

.delete-modal-footer .secondary-vault-button,
.delete-modal-footer .confirm-delete-button {
  min-width: 150px;
  min-height: 46px;
}

@media (max-width: 480px) {
  .delete-modal-footer {
    flex-direction: column-reverse;
  }

  .delete-modal-footer form,
  .delete-modal-footer .secondary-vault-button,
  .delete-modal-footer .confirm-delete-button {
    width: 100%;
  }
}

.vault-transition {
  position: fixed;
  inset: 0;
  z-index: 4000;

  overflow: hidden;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  background: radial-gradient(
    circle at 50% 45%,
    rgba(28, 92, 255, 0.18),
    rgba(2, 8, 23, 0.98) 48%,
    #01040d 100%
  );

  transition:
    opacity 220ms ease,
    visibility 220ms ease;
}

.vault-transition.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.vault-door-scene {
  position: absolute;
  inset: 0;
}

.vault-door-scene canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.vault-transition-message {
  position: absolute;
  left: 50%;
  bottom: 8vh;

  z-index: 2;

  width: min(440px, calc(100% - 40px));

  transform: translateX(-50%);
  text-align: center;
}

.vault-transition-eyebrow {
  display: block;
  margin-bottom: 10px;

  color: var(--vault-cyan);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.vault-transition-message h2 {
  margin: 0;

  color: var(--vault-text);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 400;
}

.vault-loading-line {
  width: 220px;
  height: 3px;
  margin: 18px auto 0;

  overflow: hidden;

  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.vault-loading-line span {
  display: block;
  width: 45%;
  height: 100%;

  border-radius: inherit;

  background: linear-gradient(
    90deg,
    var(--vault-blue),
    var(--vault-cyan),
    var(--vault-purple)
  );

  animation: vault-loading-movement 1.5s ease-in-out infinite alternate;
}

.vault-transition-active {
  overflow: hidden;
}

@keyframes vault-loading-movement {
  from {
    transform: translateX(-15%);
  }

  to {
    transform: translateX(135%);
  }
}

@media (max-width: 600px) {
  .vault-transition-message {
    bottom: 10vh;
  }
}

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

.media-carousel-section {
  margin-top: 48px;
}

.media-carousel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 22px;
}

.media-carousel-heading h2 {
  margin: 7px 0 0;
  color: var(--vault-text);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 400;
}

.media-carousel-heading p {
  max-width: 460px;
  margin: 0;
  color: var(--vault-muted);
  font-size: 0.72rem;
  line-height: 1.7;
}

.media-carousel-shell {
  position: relative;
  min-height: 590px;
  overflow: hidden;

  border: 1px solid var(--vault-border);
  border-radius: 24px;

  background: radial-gradient(
    circle at 50% 38%,
    rgba(49, 107, 255, 0.19),
    rgba(7, 17, 38, 0.9) 48%,
    rgba(2, 8, 23, 0.98) 100%
  );

  box-shadow:
    0 30px 75px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.media-carousel-shell::before {
  position: absolute;
  right: 8%;
  bottom: 105px;
  left: 8%;

  height: 70px;

  content: "";

  border-radius: 50%;

  background: radial-gradient(
    ellipse,
    rgba(49, 107, 255, 0.19),
    transparent 68%
  );

  filter: blur(18px);
  pointer-events: none;
}

.media-carousel-scene {
  position: absolute;
  inset: 0 0 105px;
  min-height: 475px;
}

.media-carousel-scene canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.carousel-navigation-button {
  position: absolute;
  top: 44%;
  z-index: 5;

  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;

  padding: 0;

  border: 1px solid rgba(86, 136, 255, 0.42);
  border-radius: 50%;

  color: white;
  background: rgba(3, 10, 27, 0.78);

  font-size: 1rem;

  backdrop-filter: blur(15px);

  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.carousel-previous-button {
  left: 24px;
}

.carousel-next-button {
  right: 24px;
}

.carousel-navigation-button:hover {
  border-color: var(--vault-cyan);
  background: rgba(49, 107, 255, 0.22);
  transform: scale(1.06);
}

.carousel-navigation-button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

.media-carousel-details {
  position: absolute;
  right: 24px;
  bottom: 22px;
  left: 24px;
  z-index: 4;

  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) auto auto;
  align-items: center;
  gap: 12px 20px;

  padding: 17px 19px;

  border: 1px solid var(--vault-border);
  border-radius: 15px;

  background: rgba(3, 10, 27, 0.82);
  backdrop-filter: blur(18px);
}

.carousel-category-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;

  padding: 6px 10px;

  border: 1px solid rgba(86, 136, 255, 0.4);
  border-radius: 999px;

  color: var(--vault-blue-light);
  background: rgba(49, 107, 255, 0.12);

  font-size: 0.6rem;
  white-space: nowrap;
}

.carousel-category-label[data-category="TV Show"] {
  border-color: rgba(155, 108, 255, 0.45);
  color: var(--vault-purple-light);
  background: rgba(117, 72, 255, 0.12);
}

.carousel-category-label[data-category="Book"] {
  border-color: rgba(40, 201, 139, 0.42);
  color: var(--vault-green);
  background: rgba(40, 201, 139, 0.1);
}

.carousel-category-label[data-category="Video Game"] {
  border-color: rgba(255, 130, 58, 0.44);
  color: var(--vault-orange);
  background: rgba(255, 130, 58, 0.1);
}

.media-carousel-details h3 {
  margin: 0;
  overflow-wrap: anywhere;

  color: var(--vault-text);
  font-size: 0.88rem;
  font-weight: 400;
}

.media-carousel-details p {
  margin: 0;

  color: var(--vault-muted);
  font-size: 0.65rem;
  line-height: 1.6;
}

.carousel-edit-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 7px;

  padding: 0 13px;

  border: 1px solid rgba(86, 136, 255, 0.45);
  border-radius: 9px;

  color: white;
  background: rgba(49, 107, 255, 0.14);

  font-size: 0.65rem;
  white-space: nowrap;

  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.carousel-edit-link:hover {
  border-color: var(--vault-cyan);
  color: white;
  background: rgba(49, 107, 255, 0.24);
  transform: translateY(-1px);
}

.carousel-drag-message {
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: 4;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 12px;

  border: 1px solid var(--vault-border);
  border-radius: 999px;

  color: var(--vault-muted);
  background: rgba(3, 10, 27, 0.58);

  font-size: 0.61rem;

  transform: translateX(-50%);
  pointer-events: none;
  backdrop-filter: blur(12px);
}

@media (max-width: 850px) {
  .media-carousel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .media-carousel-shell {
    min-height: 625px;
  }

  .media-carousel-scene {
    inset-bottom: 160px;
  }

  .media-carousel-details {
    grid-template-columns: 1fr auto;
  }

  .media-carousel-details h3 {
    grid-column: 1 / -1;
  }

  .media-carousel-details p {
    grid-column: 1;
  }

  .carousel-edit-link {
    grid-column: 2;
    grid-row: 2 / 4;
  }
}

@media (max-width: 560px) {
  .media-carousel-shell {
    min-height: 660px;
    border-radius: 18px;
  }

  .media-carousel-scene {
    inset: 0 0 220px;
  }

  .carousel-navigation-button {
    top: 35%;
    width: 42px;
    height: 42px;
  }

  .carousel-previous-button {
    left: 12px;
  }

  .carousel-next-button {
    right: 12px;
  }

  .media-carousel-details {
    right: 14px;
    bottom: 14px;
    left: 14px;

    display: flex;
    align-items: flex-start;
    flex-direction: column;
  }

  .carousel-edit-link {
    width: 100%;
  }

  .carousel-drag-message {
    top: 14px;
  }
}

@media (max-width: 850px) {
  .media-carousel-scene {
    top: 0;
    right: 0;
    bottom: 160px;
    left: 0;
  }
}

.vault-logo-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-sidebar-logo {
  width: 56px;
  height: 56px;
  padding: 0;
  overflow: visible;

  border: 0;
  border-radius: 50%;
  background: transparent;
}

.brand-icon {
  display: inline-flex;
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;

  padding: 0;
  overflow: visible;

  border-radius: 50%;
  background: transparent;
}

.footer-brand-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  margin-right: 9px;

  overflow: visible;
  border-radius: 50%;
}

.sidebar-profile {
  display: flex;
  width: 76px;
  align-items: center;
  flex-direction: column;
  gap: 7px;

  text-align: center;
}

.sidebar-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;

  border: 1px solid rgba(86, 136, 255, 0.65);
  border-radius: 50%;

  color: white;

  background: linear-gradient(
    145deg,
    var(--vault-electric-blue),
    var(--vault-purple)
  );

  box-shadow:
    0 0 16px rgba(49, 107, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);

  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.sidebar-profile-name {
  display: block;
  width: 100%;
  overflow: hidden;

  color: var(--vault-muted);
  font-size: 0.57rem;
  line-height: 1.3;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-profile:hover .sidebar-avatar {
  border-color: var(--vault-cyan);

  box-shadow:
    0 0 20px rgba(24, 213, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.sidebar-profile:hover .sidebar-profile-name {
  color: var(--vault-text);
}

.app-sidebar-bottom {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
}

.password-input-group {
  position: relative;
  display: flex;
  width: 100%;
}

.password-input-group .password-input {
  padding-right: 52px;
}

.password-toggle-button {
  position: absolute;
  top: 50%;
  right: 8px;

  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;

  padding: 0;

  border: 0;
  border-radius: 9px;

  color: var(--vault-muted);
  background: transparent;

  transform: translateY(-50%);
  cursor: pointer;

  transition:
    color 180ms ease,
    background 180ms ease;
}

.password-toggle-button:hover {
  color: var(--vault-cyan);
  background: rgba(49, 107, 255, 0.1);
}

.password-toggle-button:focus-visible {
  outline: 2px solid var(--vault-blue-light);
  outline-offset: 2px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
  color: var(--vault-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--vault-border);
}

.github-auth-button {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: white;
  background: #161b22;
  font-weight: 700;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.github-auth-button:hover {
  border-color: rgba(86, 136, 255, 0.7);
  color: white;
  background: #212830;
  transform: translateY(-1px);
}

.github-auth-button i {
  font-size: 1.2rem;
}

/* ==================================================
   AUTHENTICATED MOBILE NAVIGATION
   ================================================== */

@media (max-width: 767px) {
  /*
   * Keep the bottom navigation compact enough
   * to display the profile and logout controls.
   */
  .app-sidebar {
    gap: 2px;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  }

  .app-sidebar-logo {
    width: 44px;
    height: 44px;
    min-width: 44px;
    flex: 0 0 44px;
  }

  .app-sidebar-navigation {
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: center;
    justify-content: space-evenly;
    gap: 0;
  }

  .app-sidebar-link {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  /*
   * The profile and logout controls must sit
   * beside one another in the bottom bar.
   */
  .app-sidebar-bottom {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin: 0;
  }

  .app-sidebar-user {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  /*
   * Hide the profile name on mobile so there
   * is enough space for the logout button.
   */
  .app-sidebar-user span,
  .app-sidebar-user-name,
  .sidebar-user-name {
    display: none !important;
  }

  .sidebar-logout-form {
    display: block !important;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
  }

  .sidebar-logout-button {
    display: grid !important;
    width: 40px;
    height: 40px;
    min-width: 40px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: #a9b9dc;
    background: rgba(7, 17, 40, 0.84);
    font-size: 1.05rem;
    cursor: pointer;
  }

  .sidebar-logout-button:hover,
  .sidebar-logout-button:focus-visible {
    border-color: rgba(86, 136, 255, 0.7);
    color: white;
    background: rgba(49, 107, 255, 0.18);
  }

  /*
   * Prevent page content from sitting underneath
   * the fixed bottom navigation.
   */
  .authenticated-content {
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }
}


/* Media Vault V2 --------------------------------------------------------- */
.vault-pulse {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.025);
}

.vault-pulse-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.vault-pulse-heading h2 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.vault-pulse-heading p {
  margin: 0;
  max-width: 32rem;
  opacity: 0.66;
}

.vault-pulse-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.vault-pulse-card {
  min-height: 118px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 17px;
  background: rgba(7, 9, 18, 0.38);
}

.vault-pulse-card > span,
.vault-pulse-card small {
  display: block;
  opacity: 0.62;
}

.vault-pulse-card strong {
  display: block;
  margin: 0.25rem 0 0.1rem;
  font-size: 1.8rem;
  line-height: 1.1;
}

.status-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: -0.35rem 0 1.35rem;
}

.status-filter-label {
  margin-right: 0.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.5;
}

.status-filter-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  font-size: 0.82rem;
  opacity: 0.72;
  transition: 160ms ease;
}

.status-filter-link:hover,
.status-filter-link.active {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
}

.status-filter-link span {
  opacity: 0.62;
}

.library-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.8rem;
}

.library-card-tags span {
  padding: 0.28rem 0.48rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.72rem;
  opacity: 0.72;
}

.library-card-state-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.favorite-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
}

.card-favorite-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.45rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: inherit;
}

.card-favorite-button.active {
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 991.98px) {
  .vault-pulse-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .vault-pulse-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .vault-pulse-grid {
    grid-template-columns: 1fr 1fr;
  }

  .vault-pulse-card {
    min-height: 104px;
  }
}


.insights-page {
  min-height: 100vh;
}

.insights-heading {
  margin-bottom: 1.5rem;
}

.insights-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.insights-overview-grid article,
.insights-panel {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
}

.insights-overview-grid article {
  padding: 1rem;
}

.insights-overview-grid span,
.insights-overview-grid small {
  display: block;
  opacity: 0.62;
}

.insights-overview-grid strong {
  display: block;
  margin: 0.25rem 0 0.1rem;
  font-size: 1.9rem;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.insights-panel {
  padding: 1.2rem;
}

.insights-panel-heading {
  margin-bottom: 1rem;
}

.insights-panel-heading h2 {
  margin: 0.2rem 0 0;
  font-size: 1.25rem;
}

.insights-rank-list {
  display: grid;
  gap: 0.55rem;
}

.insights-rank-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.68rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.insights-rank-list > div:last-child {
  border-bottom: 0;
}

.insights-rank-list strong {
  font-size: 0.83rem;
  opacity: 0.62;
}

.insights-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.insights-tag-cloud > span {
  padding: 0.52rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.insights-tag-cloud small {
  margin-left: 0.3rem;
  opacity: 0.55;
}

.insights-empty,
.saintflick-bridge-card p {
  margin: 0;
  opacity: 0.65;
  line-height: 1.7;
}

.insights-json-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
  color: inherit;
  text-decoration: none;
}

.insights-json-link:hover {
  text-decoration: underline;
}

@media (max-width: 991.98px) {
  .insights-overview-grid,
  .insights-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .insights-overview-grid,
  .insights-grid {
    grid-template-columns: 1fr;
  }
}


/* Search, sort, and smart collections ----------------------------------- */
.smart-collections {
  margin: 1.4rem 0 1rem;
}

.smart-collections-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.smart-collections-heading h2 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.smart-clear-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: inherit;
  text-decoration: none;
  font-size: 0.82rem;
  opacity: 0.68;
}

.smart-clear-link:hover {
  opacity: 1;
}

.smart-collection-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.smart-collection-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  color: inherit;
  background: rgba(255, 255, 255, 0.025);
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.smart-collection-card:hover,
.smart-collection-card.active {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.smart-collection-card > i {
  flex: 0 0 auto;
  font-size: 1rem;
}

.smart-collection-card > div {
  min-width: 0;
}

.smart-collection-card strong,
.smart-collection-card span {
  display: block;
}

.smart-collection-card strong {
  overflow: hidden;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-collection-card span {
  margin-top: 0.18rem;
  font-size: 0.7rem;
  opacity: 0.58;
}

.saintflick-collection {
  border-style: dashed;
}

.library-command-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 0.7rem;
  margin: 1rem 0;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(4, 10, 25, 0.62);
}

.library-search-field {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.library-search-field i {
  opacity: 0.5;
}

.library-search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
}

.library-search-field input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.library-sort-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.library-sort-field > span {
  font-size: 0.76rem;
  opacity: 0.56;
}

.library-sort-field select {
  min-height: 44px;
  padding: 0 2.2rem 0 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: inherit;
  background: rgba(255, 255, 255, 0.035);
}

.library-sort-field select option {
  color: #111;
}

.library-apply-button {
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: inherit;
  background: rgba(255, 255, 255, 0.07);
}

.library-apply-button:hover {
  background: rgba(255, 255, 255, 0.11);
}

.filtered-empty-state {
  display: grid;
  min-height: 250px;
  place-items: center;
  align-content: center;
  gap: 0.55rem;
  padding: 2rem;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.018);
}

.filtered-empty-state > i {
  font-size: 1.4rem;
  opacity: 0.45;
}

.filtered-empty-state h3,
.filtered-empty-state p {
  margin: 0;
}

.filtered-empty-state p {
  max-width: 34rem;
  opacity: 0.62;
}

@media (max-width: 1100px) {
  .smart-collection-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .smart-collections-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .smart-collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-command-bar {
    grid-template-columns: 1fr;
  }

  .library-sort-field {
    justify-content: space-between;
  }

  .library-sort-field select {
    flex: 1;
  }
}

@media (max-width: 460px) {
  .smart-collection-grid {
    grid-template-columns: 1fr;
  }
}


/* SaintFlick origin ------------------------------------------------------ */
.media-origin-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  max-width: calc(100% - 24px);
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.55rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(2, 8, 23, 0.78);
  backdrop-filter: blur(10px);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-origin-panel {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
  padding: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.media-origin-panel-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.media-origin-panel h2 {
  margin: 0.2rem 0 0.35rem;
  font-size: 1rem;
}

.media-origin-panel p {
  margin: 0;
  opacity: 0.66;
  line-height: 1.6;
}


/* Connections ----------------------------------------------------------- */
.connections-heading {
  margin-bottom: 1.5rem;
}

.connection-card {
  position: relative;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background:
    radial-gradient(
      circle at 90% 10%,
      rgba(49, 107, 255, 0.1),
      transparent 30%
    ),
    rgba(255, 255, 255, 0.025);
}

.connection-card-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding-right: 9rem;
}

.connection-card-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 1.15rem;
}

.connection-card-brand h2 {
  margin: 0.2rem 0 0.4rem;
  font-size: 1.35rem;
}

.connection-card-brand p {
  max-width: 42rem;
  margin: 0;
  opacity: 0.66;
  line-height: 1.65;
}

.connection-status {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  font-size: 0.75rem;
  opacity: 0.75;
}

.connection-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.connection-status.connected {
  opacity: 1;
}

.connection-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.connection-detail-grid > div,
.connection-permissions {
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
}

.connection-detail-grid span,
.connection-detail-grid strong {
  display: block;
}

.connection-detail-grid span {
  margin-bottom: 0.25rem;
  font-size: 0.72rem;
  opacity: 0.55;
}

.connection-detail-grid strong {
  font-size: 0.82rem;
  font-weight: 500;
}

.connection-permissions {
  margin: 1.25rem 0;
}

.connection-permissions h3 {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
}

.connection-permissions > div {
  display: grid;
  gap: 0.55rem;
}

.connection-permissions span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.72;
}

.connection-code-panel {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.025);
}

.connection-code {
  margin: 0.55rem 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.3rem, 4vw, 2rem);
  letter-spacing: 0.08em;
  user-select: all;
}

.connection-code-panel p,
.connection-config-note {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.6;
  opacity: 0.64;
}

.connection-config-note {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.connection-danger-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: inherit;
  background: transparent;
}

.connection-danger-button:hover {
  border-color: rgba(255, 255, 255, 0.24);
  color: inherit;
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 767.98px) {
  .connection-card-brand {
    padding-right: 0;
  }

  .connection-status {
    position: static;
    margin-top: 1rem;
  }

  .connection-detail-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   Media Vault V2 — professional application shell
   ========================================================================== */

.authenticated-content,
.app-sidebar {
  --app-bg: #080b12;
  --app-surface: #0f131c;
  --app-surface-raised: #141923;
  --app-surface-hover: #191f2b;
  --app-border: rgba(255, 255, 255, 0.08);
  --app-border-strong: rgba(255, 255, 255, 0.14);
  --app-text: #f4f6fa;
  --app-muted: #8d96a8;
  --app-subtle: #636d80;
  --app-accent: #6d7cff;
  --app-accent-soft: rgba(109, 124, 255, 0.12);
  --app-success: #6fcf97;
  --app-warning: #e5b567;
  --app-danger: #e47b83;

  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.authenticated-content button,
.authenticated-content input,
.authenticated-content select,
.authenticated-content textarea,
.authenticated-content .btn,
.app-sidebar button {
  font-family: inherit;
}

.authenticated-content {
  min-height: 100vh;
  margin-left: 216px;
  color: var(--app-text);
  background:
    radial-gradient(circle at 82% -15%, rgba(109, 124, 255, 0.08), transparent 31rem),
    var(--app-bg);
}

/* Sidebar ---------------------------------------------------------------- */

.app-sidebar {
  width: 216px;
  align-items: stretch;
  padding: 22px 14px 18px;
  border-right: 1px solid var(--app-border);
  background: rgba(10, 13, 20, 0.96);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.app-sidebar-logo {
  display: flex;
  width: auto;
  height: 46px;
  align-items: center;
  gap: 11px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}

.app-sidebar-logo:hover {
  background: rgba(255, 255, 255, 0.035);
}

.app-sidebar-logo .vault-logo-image {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}

.app-sidebar-brand-text {
  color: var(--app-text);
  font-size: 0.91rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.app-sidebar-navigation {
  gap: 4px;
  margin-top: 28px;
}

.app-sidebar-link,
.sidebar-logout-button {
  display: flex;
  width: 100%;
  height: 42px;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--app-muted);
  background: transparent;
  font-size: 0.81rem;
  font-weight: 500;
  transition:
    color 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}

.app-sidebar-link i,
.sidebar-logout-button i {
  width: 18px;
  flex: 0 0 auto;
  font-size: 0.98rem;
  text-align: center;
}

.app-sidebar-link:hover {
  border-color: transparent;
  color: var(--app-text);
  background: rgba(255, 255, 255, 0.055);
  transform: none;
}

.app-sidebar-bottom {
  gap: 6px;
}

.sidebar-profile {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
}

.sidebar-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--app-border);
  border-radius: 9px;
  color: var(--app-text);
  background: var(--app-surface-raised);
  font-size: 0.68rem;
  font-weight: 650;
}

.sidebar-profile-name {
  overflow: hidden;
  color: var(--app-muted);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-logout-form {
  width: 100%;
}

.sidebar-logout-button {
  cursor: pointer;
}

.sidebar-logout-button:hover {
  border-color: transparent;
  color: var(--app-danger);
  background: rgba(228, 123, 131, 0.08);
}

/* Main library ----------------------------------------------------------- */

.library-shell,
.explore-shell {
  min-height: 100vh;
  padding: 42px 32px 80px;
}

.library-container {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.library-header,
.explore-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
}

.library-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--app-subtle);
  font-family: "Space Mono", monospace;
  font-size: 0.67rem;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.library-header h1,
.explore-header h1 {
  margin: 0;
  color: var(--app-text);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 670;
  letter-spacing: -0.045em;
  line-height: 1;
}

.library-header p,
.explore-header p {
  max-width: 560px;
  margin: 10px 0 0;
  color: var(--app-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.library-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.library-primary-action,
.library-secondary-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.79rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.library-primary-action {
  border: 1px solid rgba(109, 124, 255, 0.45);
  color: white;
  background: var(--app-accent);
}

.library-primary-action:hover {
  color: white;
  background: #7a87ff;
  transform: translateY(-1px);
}

.library-secondary-action {
  border: 1px solid var(--app-border);
  color: var(--app-muted);
  background: var(--app-surface);
}

.library-secondary-action:hover {
  border-color: var(--app-border-strong);
  color: var(--app-text);
  background: var(--app-surface-raised);
}

.library-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  background: var(--app-surface);
}

.library-summary article {
  min-width: 0;
  padding: 18px 20px;
  border-right: 1px solid var(--app-border);
}

.library-summary article:last-child {
  border-right: 0;
}

.library-summary span {
  display: block;
  margin-bottom: 7px;
  color: var(--app-muted);
  font-size: 0.72rem;
}

.library-summary strong {
  color: var(--app-text);
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.035em;
}

.library-summary small {
  margin-left: 4px;
  color: var(--app-subtle);
  font-size: 0.68rem;
}

.library-workspace {
  margin-bottom: 32px;
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 162px 154px 172px auto;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  background: var(--app-surface);
}

.library-toolbar-search {
  display: flex;
  min-width: 0;
  height: 40px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
}

.library-toolbar-search:focus-within {
  border-color: rgba(109, 124, 255, 0.42);
  background: rgba(109, 124, 255, 0.055);
}

.library-toolbar-search i {
  color: var(--app-subtle);
  font-size: 0.85rem;
}

.library-toolbar-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--app-text);
  background: transparent;
  font-size: 0.79rem;
}

.library-toolbar-search input::placeholder {
  color: #616a79;
}

.library-toolbar-select select {
  width: 100%;
  height: 40px;
  padding: 0 34px 0 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  outline: 0;
  color: var(--app-muted);
  background-color: rgba(255, 255, 255, 0.035);
  font-size: 0.75rem;
}

.library-toolbar-select select:hover,
.library-toolbar-select select:focus {
  border-color: var(--app-border-strong);
  color: var(--app-text);
}

.library-toolbar-select option {
  color: #151820;
  background: white;
}

.library-filter-submit {
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--app-border);
  border-radius: 9px;
  color: var(--app-text);
  background: var(--app-surface-raised);
  font-size: 0.75rem;
  font-weight: 600;
}

.library-filter-submit:hover {
  border-color: var(--app-border-strong);
  background: var(--app-surface-hover);
}

.library-shortcuts-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}

.library-shortcuts {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px;
}

.library-shortcut {
  display: inline-flex;
  height: 32px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  color: var(--app-muted);
  background: transparent;
  font-size: 0.7rem;
  font-weight: 520;
}

.library-shortcut span {
  color: var(--app-subtle);
}

.library-shortcut:hover,
.library-shortcut.active {
  border-color: rgba(109, 124, 255, 0.28);
  color: var(--app-text);
  background: var(--app-accent-soft);
}

.library-shortcut.active span {
  color: #9da6ff;
}

.library-clear-filters {
  flex: 0 0 auto;
  color: var(--app-subtle);
  font-size: 0.7rem;
}

.library-clear-filters:hover {
  color: var(--app-text);
}

.library-results {
  margin-top: 8px;
}

.library-results-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.library-results-count {
  display: block;
  margin-bottom: 4px;
  color: var(--app-subtle);
  font-size: 0.69rem;
}

.library-results-header h2 {
  margin: 0;
  color: var(--app-text);
  font-size: 1.12rem;
  font-weight: 630;
  letter-spacing: -0.025em;
}

.library-view-switcher {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--app-border);
  border-radius: 9px;
  background: var(--app-surface);
}

.library-view-switcher a {
  display: grid;
  width: 31px;
  height: 29px;
  place-items: center;
  border-radius: 6px;
  color: var(--app-subtle);
}

.library-view-switcher a:hover,
.library-view-switcher a.active {
  color: var(--app-text);
  background: rgba(255, 255, 255, 0.07);
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 26px 16px;
}

.library-item {
  min-width: 0;
}

.library-item-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: var(--app-surface);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.library-item:hover .library-item-cover {
  border-color: var(--app-border-strong);
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.library-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.library-item-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--app-subtle);
  background:
    linear-gradient(145deg, rgba(109, 124, 255, 0.08), transparent 62%),
    var(--app-surface-raised);
  font-size: 2rem;
}

.library-item-type {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(8, 11, 18, 0.72);
  backdrop-filter: blur(8px);
  font-size: 0.58rem;
  font-weight: 600;
}

.library-item-origin {
  position: absolute;
  right: 9px;
  bottom: 9px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #a8b0ff;
  background: rgba(8, 11, 18, 0.76);
  backdrop-filter: blur(8px);
  font-size: 0.68rem;
}

.library-item-favorite-form {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
}

.library-item-favorite {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(8, 11, 18, 0.72);
  backdrop-filter: blur(8px);
  font-size: 0.72rem;
}

.library-item-favorite:hover,
.library-item-favorite.active {
  color: #ff94a1;
  background: rgba(8, 11, 18, 0.86);
}

.library-item-content {
  padding: 10px 2px 0;
}

.library-item-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.library-item-heading > div {
  min-width: 0;
}

.library-item-heading h3 {
  overflow: hidden;
  margin: 0;
  color: var(--app-text);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-item-heading p {
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--app-subtle);
  font-size: 0.66rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-item-heading p span {
  margin: 0 2px;
}

.library-item-rating {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  color: #d8b56a;
  font-size: 0.66rem;
  font-weight: 600;
}

.library-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
}

.library-status {
  overflow: hidden;
  color: var(--app-muted);
  font-size: 0.63rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 150ms ease;
}

.library-item:hover .library-item-actions,
.library-item:focus-within .library-item-actions {
  opacity: 1;
}

.library-item-actions a,
.library-item-actions button {
  display: inline-flex;
  height: 27px;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  border: 0;
  border-radius: 6px;
  color: var(--app-subtle);
  background: transparent;
  font-size: 0.62rem;
}

.library-item-actions a:hover,
.library-item-actions button:hover {
  color: var(--app-text);
  background: rgba(255, 255, 255, 0.055);
}

/* List view */

.library-grid--list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  background: var(--app-border);
}

.library-grid--list .library-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  background: var(--app-surface);
}

.library-grid--list .library-item:hover {
  background: var(--app-surface-raised);
}

.library-grid--list .library-item-cover {
  width: 54px;
  height: 72px;
  aspect-ratio: auto;
  border-radius: 7px;
  box-shadow: none;
}

.library-grid--list .library-item:hover .library-item-cover {
  transform: none;
  box-shadow: none;
}

.library-grid--list .library-item-type,
.library-grid--list .library-item-origin,
.library-grid--list .library-item-favorite-form {
  display: none;
}

.library-grid--list .library-item-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 0;
}

.library-grid--list .library-item-heading h3 {
  font-size: 0.86rem;
}

.library-grid--list .library-item-actions {
  opacity: 1;
}

/* Secondary / empty states ------------------------------------------------ */

.library-explore-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 54px;
  padding: 20px 22px;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  background: linear-gradient(100deg, var(--app-surface), rgba(109, 124, 255, 0.055));
}

.library-explore-callout h2 {
  margin: 0;
  color: var(--app-text);
  font-size: 1rem;
  font-weight: 620;
}

.library-explore-callout p {
  margin: 6px 0 0;
  color: var(--app-muted);
  font-size: 0.76rem;
}

.library-explore-callout > a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: #a9b1ff;
  font-size: 0.75rem;
  font-weight: 600;
}

.library-empty-state,
.library-empty-filter {
  display: grid;
  min-height: 280px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 32px;
  border: 1px dashed var(--app-border-strong);
  border-radius: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.015);
}

.library-empty-state-icon,
.library-empty-filter-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 5px;
  place-items: center;
  border-radius: 11px;
  color: var(--app-muted);
  background: var(--app-surface-raised);
}

.library-empty-state h2,
.library-empty-filter h3 {
  margin: 0;
  color: var(--app-text);
  font-size: 1rem;
  font-weight: 620;
}

.library-empty-state p,
.library-empty-filter p {
  max-width: 460px;
  margin: 0 0 5px;
  color: var(--app-muted);
  font-size: 0.77rem;
  line-height: 1.55;
}

.library-empty-filter > a {
  color: #a9b1ff;
  font-size: 0.75rem;
}

.explore-carousel-section {
  margin-top: 8px;
}

.explore-carousel-section.media-carousel-section {
  padding-top: 0;
}

.explore-carousel-section .media-carousel-heading h2 {
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 620;
}

.explore-carousel-section .media-carousel-heading p {
  color: var(--app-muted);
  font-family: inherit;
  font-size: 0.75rem;
}

/* Authenticated forms/pages inherit calmer spacing ---------------------- */

.authenticated-content .media-page-section {
  padding-top: 42px;
  background: transparent;
}

.authenticated-content .media-form-card,
.authenticated-content .insights-panel,
.authenticated-content .connection-card {
  border-color: var(--app-border);
  background: var(--app-surface);
  box-shadow: none;
}

.authenticated-content .media-page-heading h1 {
  color: var(--app-text);
  font-family: inherit;
  font-weight: 660;
  letter-spacing: -0.035em;
}

.authenticated-content .media-page-heading p,
.authenticated-content .insights-empty,
.authenticated-content .saintflick-bridge-card p {
  color: var(--app-muted);
  font-family: inherit;
}

.authenticated-content .section-eyebrow {
  color: var(--app-subtle);
  font-family: "Space Mono", monospace;
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 1180px) {
  .app-sidebar {
    width: 76px;
    align-items: center;
    padding-inline: 10px;
  }

  .app-sidebar-logo {
    width: 46px;
    justify-content: center;
    padding: 0;
  }

  .app-sidebar-brand-text,
  .app-sidebar-link span,
  .sidebar-logout-button span,
  .sidebar-profile-name {
    display: none;
  }

  .app-sidebar-navigation,
  .app-sidebar-bottom {
    width: 100%;
  }

  .app-sidebar-link,
  .sidebar-logout-button {
    justify-content: center;
    padding: 0;
  }

  .sidebar-profile {
    justify-content: center;
    padding-inline: 0;
  }

  .authenticated-content {
    margin-left: 76px;
  }

  .library-toolbar {
    grid-template-columns: minmax(220px, 1fr) 150px 146px;
  }

  .library-sort-control {
    grid-column: 1 / span 2;
  }

  .library-filter-submit {
    grid-column: 3;
  }
}

@media (max-width: 820px) {
  .library-shell,
  .explore-shell {
    padding: 30px 20px 70px;
  }

  .library-header,
  .explore-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .library-header-actions {
    width: 100%;
  }

  .library-header-actions > a {
    flex: 1;
  }

  .library-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-summary article:nth-child(2) {
    border-right: 0;
  }

  .library-summary article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--app-border);
  }

  .library-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .library-toolbar-search {
    grid-column: 1 / -1;
  }

  .library-sort-control {
    grid-column: 1;
  }

  .library-filter-submit {
    grid-column: 2;
  }

  .library-shortcuts-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 767px) {
  .app-sidebar {
    display: none;
  }

  .authenticated-content {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .library-shell,
  .explore-shell {
    padding: 24px 14px 56px;
  }

  .library-header h1,
  .explore-header h1 {
    font-size: 2rem;
  }

  .library-header-actions {
    flex-direction: column-reverse;
  }

  .library-header-actions > a,
  .explore-header > a {
    width: 100%;
  }

  .library-summary article {
    padding: 15px;
  }

  .library-toolbar {
    grid-template-columns: 1fr;
  }

  .library-toolbar-search,
  .library-sort-control,
  .library-filter-submit {
    grid-column: auto;
  }

  .library-shortcuts {
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .library-shortcuts::-webkit-scrollbar {
    display: none;
  }

  .library-shortcut {
    flex: 0 0 auto;
  }

  .library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 11px;
  }

  .library-item-actions {
    opacity: 1;
  }

  .library-item-actions a span {
    display: none;
  }

  .library-explore-callout {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Mobile authenticated navigation dock --------------------------------- */
@media (max-width: 767px) {
  .app-sidebar {
    inset: auto 0 0 0;
    z-index: 1080;
    display: flex;
    width: 100%;
    height: 62px;
    align-items: center;
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--app-border);
    border-right: 0;
    background: rgba(10, 13, 20, 0.96);
    backdrop-filter: blur(18px);
  }

  .app-sidebar-logo,
  .app-sidebar-bottom {
    display: none;
  }

  .app-sidebar-navigation {
    display: grid;
    width: 100%;
    height: 100%;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2px;
    margin: 0;
  }

  .app-sidebar-link {
    width: 100%;
    height: 46px;
    justify-content: center;
    padding: 0;
    border-radius: 9px;
  }

  .app-sidebar-link span {
    display: none;
  }

  .app-sidebar-link i {
    font-size: 1rem;
  }

  .authenticated-content {
    margin-left: 0;
    padding-bottom: calc(62px + env(safe-area-inset-bottom));
  }
}


/* Screenshot refinement pass ------------------------------------------- */
.app-sidebar-link.active {
  position: relative;
  color: var(--app-text);
  background: rgba(109, 124, 255, 0.10);
}

.app-sidebar-link.active::before {
  position: absolute;
  left: -4px;
  width: 3px;
  height: 20px;
  border-radius: 999px;
  background: var(--app-accent);
  content: "";
}

.app-sidebar-link.active i {
  color: #aab2ff;
}

.app-sidebar-bottom {
  padding-top: 12px;
  border-top: 1px solid var(--app-border);
}

.library-summary article {
  padding-top: 16px;
  padding-bottom: 16px;
}

.library-summary span {
  color: #9aa4b7;
}

.library-toolbar {
  padding: 8px;
}

.library-shortcuts-row {
  margin-top: 10px;
}

.library-item-content {
  min-height: 82px;
}

.library-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.60rem;
  font-weight: 550;
}

.library-status.status-completed {
  color: #83d8a8;
  background: rgba(111, 207, 151, 0.08);
}

.library-status.status-progress,
.library-status.status-rewatching {
  color: #aab2ff;
  background: rgba(109, 124, 255, 0.10);
}

.library-status.status-planned {
  color: #a7b0c1;
  background: rgba(255, 255, 255, 0.045);
}

.library-status.status-paused {
  color: #e6bd78;
  background: rgba(229, 181, 103, 0.08);
}

.library-status.status-dropped {
  color: #e8979d;
  background: rgba(228, 123, 131, 0.08);
}

.library-item-actions {
  min-height: 27px;
}

.library-grid--grid .library-item-heading {
  min-height: 42px;
}

@media (max-width: 1180px) {
  .app-sidebar-link.active::before {
    left: -2px;
  }
}

@media (max-width: 767px) {
  .app-sidebar-link.active::before {
    inset: auto auto -5px 50%;
    width: 18px;
    height: 3px;
    transform: translateX(-50%);
  }
}


/* Sidebar control + Space Mono primary typography ----------------------- */

.authenticated-content,
.app-sidebar,
.authenticated-content button,
.authenticated-content input,
.authenticated-content select,
.authenticated-content textarea,
.authenticated-content .btn,
.app-sidebar button {
  font-family: "Space Mono", monospace;
}

.app-sidebar,
.authenticated-content {
  transition:
    width 180ms ease,
    margin-left 180ms ease;
}

.app-sidebar-header {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.app-sidebar-toggle {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  color: var(--app-subtle);
  background: transparent;
  cursor: pointer;
  font-size: 0.72rem;
  transition:
    color 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    transform 180ms ease;
}

.app-sidebar-toggle:hover {
  border-color: var(--app-border-strong);
  color: var(--app-text);
  background: rgba(255, 255, 255, 0.055);
}

/*
 * Explicit user-controlled desktop state.
 * These rules intentionally override the earlier breakpoint-driven
 * collapse so the user's preference remains authoritative.
 */
@media (min-width: 768px) {
  .app-sidebar {
    width: 216px;
    align-items: stretch;
    padding: 22px 14px 18px;
  }

  .app-sidebar-logo {
    display: flex;
    width: auto;
    height: 46px;
    justify-content: flex-start;
    padding: 0 10px;
  }

  .app-sidebar-brand-text,
  .app-sidebar-link span,
  .sidebar-logout-button span,
  .sidebar-profile-name {
    display: inline;
  }

  .app-sidebar-navigation,
  .app-sidebar-bottom {
    width: auto;
  }

  .app-sidebar-link,
  .sidebar-logout-button {
    justify-content: flex-start;
    padding: 0 11px;
  }

  .sidebar-profile {
    justify-content: flex-start;
    padding-inline: 10px;
  }

  .authenticated-content {
    margin-left: 216px;
  }

  html.sidebar-collapsed .app-sidebar {
    width: 84px;
    align-items: center;
    padding-inline: 10px;
  }

  html.sidebar-collapsed .authenticated-content {
    margin-left: 84px;
  }

  html.sidebar-collapsed .app-sidebar-header {
    justify-content: center;
    gap: 4px;
  }

  html.sidebar-collapsed .app-sidebar-logo {
    width: 30px;
    height: 40px;
    justify-content: center;
    padding: 0;
  }

  html.sidebar-collapsed .app-sidebar-logo .vault-logo-image {
    width: 27px;
    height: 27px;
  }

  html.sidebar-collapsed .app-sidebar-brand-text,
  html.sidebar-collapsed .app-sidebar-link span,
  html.sidebar-collapsed .sidebar-logout-button span,
  html.sidebar-collapsed .sidebar-profile-name {
    display: none;
  }

  html.sidebar-collapsed .app-sidebar-navigation,
  html.sidebar-collapsed .app-sidebar-bottom {
    width: 100%;
  }

  html.sidebar-collapsed .app-sidebar-link,
  html.sidebar-collapsed .sidebar-logout-button {
    justify-content: center;
    padding: 0;
  }

  html.sidebar-collapsed .sidebar-profile {
    justify-content: center;
    padding-inline: 0;
  }

  html.sidebar-collapsed .app-sidebar-toggle {
    width: 28px;
    height: 28px;
  }

  html.sidebar-collapsed .app-sidebar-link[data-sidebar-label] {
    position: relative;
  }

  html.sidebar-collapsed
    .app-sidebar-link[data-sidebar-label]:hover::after {
    position: absolute;
    z-index: 1200;
    top: 50%;
    left: calc(100% + 12px);
    padding: 6px 9px;
    border: 1px solid var(--app-border);
    border-radius: 7px;
    color: var(--app-text);
    background: #141923;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    content: attr(data-sidebar-label);
    font-size: 0.66rem;
    line-height: 1;
    white-space: nowrap;
    transform: translateY(-50%);
    pointer-events: none;
  }
}

@media (max-width: 767px) {
  .app-sidebar-toggle {
    display: none;
  }

  html.sidebar-collapsed .authenticated-content,
  .authenticated-content {
    margin-left: 0;
  }
}


/* Insights V2 ----------------------------------------------------------- */
.insights-shell {
  min-height: 100vh;
  padding: 42px 32px 80px;
}

.insights-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
}

.insights-header h1 {
  margin: 0;
  color: var(--app-text);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.insights-header p {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--app-muted);
  font-size: 0.82rem;
  line-height: 1.65;
}

.insights-header-actions {
  display: flex;
  gap: 8px;
}

.insights-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  background: var(--app-surface);
}

.insights-summary article {
  min-width: 0;
  padding: 16px 20px;
  border-right: 1px solid var(--app-border);
}

.insights-summary article:last-child {
  border-right: 0;
}

.insights-summary > article > span {
  display: block;
  margin-bottom: 7px;
  color: #9aa4b7;
  font-size: 0.68rem;
}

.insights-summary article > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.insights-summary strong {
  color: var(--app-text);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.insights-summary small {
  color: var(--app-subtle);
  font-size: 0.64rem;
}

.insights-primary-grid,
.insights-secondary-grid,
.insights-tertiary-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.insights-primary-grid {
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.85fr);
}

.insights-secondary-grid,
.insights-tertiary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.insight-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  background: var(--app-surface);
}

.insight-card--taste {
  min-height: 360px;
}

.insight-card--readiness {
  background:
    linear-gradient(145deg, rgba(109, 124, 255, 0.06), transparent 55%),
    var(--app-surface);
}

.insight-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.insight-card-heading h2 {
  margin: 0;
  color: var(--app-text);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.insight-card-note {
  flex: 0 0 auto;
  color: var(--app-subtle);
  font-size: 0.62rem;
}

.taste-bars {
  display: grid;
  gap: 18px;
}

.taste-bar-row {
  display: grid;
  gap: 7px;
}

.taste-bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.taste-bar-label span {
  overflow: hidden;
  color: var(--app-text);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taste-bar-label strong {
  color: var(--app-subtle);
  font-size: 0.64rem;
  font-weight: 500;
}

.taste-bar-track,
.coverage-track,
.rating-track,
.platform-track {
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}

.taste-bar-track {
  height: 7px;
}

.taste-bar-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6d7cff, #98a2ff);
}

.readiness-score {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0 22px;
}

.readiness-score strong {
  color: var(--app-text);
  font-size: 2.35rem;
  font-weight: 700;
  letter-spacing: -0.06em;
}

.readiness-score span {
  color: var(--app-muted);
  font-size: 0.68rem;
}

.coverage-list {
  display: grid;
  gap: 12px;
}

.coverage-list > div {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
}

.coverage-list > div > span,
.coverage-list > div > strong {
  font-size: 0.61rem;
}

.coverage-list > div > span {
  color: var(--app-muted);
}

.coverage-list > div > strong {
  color: var(--app-subtle);
  font-weight: 500;
  text-align: right;
}

.coverage-track {
  height: 5px;
}

.coverage-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #7c88ff;
}

.readiness-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--app-border);
}

.readiness-footer > i {
  color: #aab2ff;
  font-size: 0.9rem;
}

.readiness-footer p {
  margin: 8px 0 11px;
  color: var(--app-muted);
  font-size: 0.67rem;
  line-height: 1.6;
}

.readiness-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #aab2ff;
  font-size: 0.66rem;
  font-weight: 600;
}

.lifecycle-stack {
  display: flex;
  width: 100%;
  height: 12px;
  overflow: hidden;
  margin-bottom: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.lifecycle-segment {
  display: block;
  height: 100%;
  min-width: 2px;
}

.lifecycle-segment--completed,
.lifecycle-dot--completed {
  background: #6fcf97;
}

.lifecycle-segment--progress,
.lifecycle-dot--progress {
  background: #7c88ff;
}

.lifecycle-segment--planned,
.lifecycle-dot--planned {
  background: #778195;
}

.lifecycle-segment--paused,
.lifecycle-dot--paused {
  background: #e5b567;
}

.lifecycle-segment--rewatching,
.lifecycle-dot--rewatching {
  background: #a57cf2;
}

.lifecycle-segment--dropped,
.lifecycle-dot--dropped {
  background: #e47b83;
}

.lifecycle-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.lifecycle-legend > div {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.lifecycle-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.lifecycle-legend span:not(.lifecycle-dot) {
  overflow: hidden;
  color: var(--app-muted);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lifecycle-legend strong {
  color: var(--app-text);
  font-size: 0.64rem;
  font-weight: 600;
}

.lifecycle-legend small {
  color: var(--app-subtle);
  font-size: 0.59rem;
}

.rating-distribution {
  display: grid;
  gap: 15px;
}

.rating-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 9px;
}

.rating-row > span {
  color: var(--app-muted);
  font-size: 0.66rem;
}

.rating-row > strong {
  color: var(--app-text);
  font-size: 0.64rem;
  font-weight: 600;
  text-align: right;
}

.rating-track {
  height: 7px;
}

.rating-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #d8b56a;
}

.platform-list {
  display: grid;
  gap: 17px;
}

.platform-list > div {
  display: grid;
  gap: 6px;
}

.platform-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.platform-label span {
  overflow: hidden;
  color: var(--app-text);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-label strong {
  color: var(--app-muted);
  font-size: 0.64rem;
  font-weight: 500;
}

.platform-track {
  height: 6px;
}

.platform-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #6d7cff;
}

.platform-list small {
  color: var(--app-subtle);
  font-size: 0.58rem;
}

.insight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.insight-tags > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  color: var(--app-text);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.67rem;
}

.insight-tags small {
  color: var(--app-subtle);
  font-size: 0.58rem;
}

.insight-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 9px;
  color: var(--app-subtle);
  text-align: center;
}

.insight-empty--compact {
  min-height: 150px;
}

.insight-empty i {
  font-size: 1rem;
}

.insight-empty p {
  max-width: 420px;
  margin: 0;
  color: var(--app-muted);
  font-size: 0.67rem;
  line-height: 1.65;
}

.insight-empty a {
  color: #aab2ff;
  font-size: 0.64rem;
}

@media (max-width: 980px) {
  .insights-primary-grid {
    grid-template-columns: 1fr;
  }

  .insights-secondary-grid,
  .insights-tertiary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .insights-shell {
    padding: 30px 20px 70px;
  }

  .insights-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .insights-header-actions {
    width: 100%;
  }

  .insights-header-actions > a {
    flex: 1;
  }

  .insights-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .insights-summary article:nth-child(2) {
    border-right: 0;
  }

  .insights-summary article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--app-border);
  }
}

@media (max-width: 560px) {
  .insights-shell {
    padding: 24px 14px 56px;
  }

  .insights-header h1 {
    font-size: 2rem;
  }

  .insights-header-actions {
    flex-direction: column;
  }

  .insights-header-actions > a {
    width: 100%;
  }

  .insights-summary article {
    padding: 14px;
  }

  .insight-card {
    padding: 16px;
  }

  .lifecycle-legend {
    grid-template-columns: 1fr;
  }
}


/* Add Media V2 ---------------------------------------------------------- */
.add-media-shell {
  min-height: 100vh;
  padding: 42px 32px 80px;
}

.add-media-container {
  max-width: 1080px;
}

.add-media-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
}

.add-media-header h1 {
  margin: 0;
  color: var(--app-text);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.add-media-header p {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--app-muted);
  font-size: 0.79rem;
  line-height: 1.65;
}

.add-media-error {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 14px;
  padding: 11px 13px;
  border: 1px solid rgba(228, 123, 131, 0.22);
  border-radius: 10px;
  color: #efa2a8;
  background: rgba(228, 123, 131, 0.07);
  font-size: 0.68rem;
  line-height: 1.5;
}

.add-media-form {
  display: grid;
  gap: 14px;
}

.add-media-panel {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  background: var(--app-surface);
}

.add-media-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.add-media-section-heading h2 {
  margin: 0;
  color: var(--app-text);
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.add-media-required-note {
  color: var(--app-subtle);
  font-size: 0.61rem;
}

.add-media-field {
  min-width: 0;
}

.add-media-field > label,
.media-type-fieldset > legend {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-bottom: 7px;
  color: var(--app-text);
  font-size: 0.68rem;
  font-weight: 600;
}

.add-media-field > label > span,
.media-type-fieldset > legend > span {
  color: #aab2ff;
}

.add-media-field label small {
  color: var(--app-subtle);
  font-size: 0.58rem;
  font-weight: 400;
}

.add-media-field input,
.add-media-field select,
.add-media-field textarea,
.add-media-core-grid select {
  width: 100%;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  outline: 0;
  color: var(--app-text);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.72rem;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.add-media-field input,
.add-media-field select,
.add-media-core-grid select {
  height: 44px;
  padding: 0 12px;
}

.add-media-field textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
  line-height: 1.55;
}

.add-media-field input::placeholder,
.add-media-field textarea::placeholder {
  color: #535d6f;
}

.add-media-field input:focus,
.add-media-field select:focus,
.add-media-field textarea:focus,
.add-media-core-grid select:focus {
  border-color: rgba(109, 124, 255, 0.52);
  background: rgba(109, 124, 255, 0.035);
  box-shadow: 0 0 0 3px rgba(109, 124, 255, 0.07);
}

.add-media-title-field {
  margin-bottom: 18px;
}

.media-type-fieldset {
  min-width: 0;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.media-type-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.media-type-options > div {
  min-width: 0;
}

.media-type-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.media-type-options label {
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 11px;
  color: var(--app-muted);
  background: rgba(255, 255, 255, 0.018);
  cursor: pointer;
  transition:
    border-color 150ms ease,
    color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.media-type-options label i {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: var(--app-subtle);
  background: rgba(255, 255, 255, 0.045);
}

.media-type-options label span {
  overflow: hidden;
  font-size: 0.68rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-type-options label:hover {
  border-color: var(--app-border-strong);
  color: var(--app-text);
  background: rgba(255, 255, 255, 0.035);
}

.media-type-options input:focus-visible + label {
  border-color: rgba(109, 124, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(109, 124, 255, 0.08);
}

.media-type-options input:checked + label {
  border-color: rgba(109, 124, 255, 0.42);
  color: var(--app-text);
  background: var(--app-accent-soft);
}

.media-type-options input:checked + label i {
  color: #b5bcff;
  background: rgba(109, 124, 255, 0.14);
}

.add-media-core-grid,
.add-media-details-grid,
.preference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rating-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.rating-input-wrap:focus-within {
  border-color: rgba(109, 124, 255, 0.52);
  background: rgba(109, 124, 255, 0.035);
  box-shadow: 0 0 0 3px rgba(109, 124, 255, 0.07);
}

.rating-input-wrap input {
  border: 0;
  background: transparent;
  box-shadow: none !important;
}

.rating-input-wrap > span {
  padding-right: 12px;
  color: var(--app-subtle);
  font-size: 0.62rem;
}

/* Optional disclosure */

.add-media-optional {
  padding: 0;
  overflow: hidden;
}

.add-media-optional > summary {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.add-media-optional > summary::-webkit-details-marker {
  display: none;
}

.add-media-optional > summary strong,
.add-media-optional > summary small {
  display: block;
}

.add-media-optional > summary strong {
  margin-top: 1px;
  color: var(--app-text);
  font-size: 0.88rem;
  font-weight: 650;
}

.add-media-optional > summary small {
  margin-top: 5px;
  color: var(--app-subtle);
  font-size: 0.61rem;
}

.optional-summary-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  color: #aab2ff;
  font-size: 0.63rem;
}

.optional-summary-action i {
  transition: transform 160ms ease;
}

.add-media-optional[open] .optional-summary-action i {
  transform: rotate(180deg);
}

.add-media-optional-content {
  display: grid;
  gap: 18px;
  padding: 20px;
  border-top: 1px solid var(--app-border);
}

.add-media-date-grid:has([hidden]:first-child):has([hidden]:last-child) {
  display: none;
}

.add-media-cover-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px;
  align-items: end;
  gap: 14px;
}

.cover-preview {
  position: relative;
  width: 90px;
  height: 126px;
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
}

.cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-preview-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 10px;
  color: var(--app-subtle);
  text-align: center;
}

.cover-preview-placeholder i {
  font-size: 1rem;
}

.cover-preview-placeholder span {
  font-size: 0.54rem;
  line-height: 1.35;
}

.tag-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
  margin-top: 8px;
}

.tag-preview:empty {
  display: none;
}

.tag-preview span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  color: var(--app-muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.58rem;
}

/* Preferences */

.add-media-preferences {
  padding-bottom: 18px;
}

.preference-toggle {
  display: flex;
  min-width: 0;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--app-border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
  cursor: pointer;
}

.preference-toggle > div {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 10px;
}

.preference-toggle > div > i {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: var(--app-muted);
  background: rgba(255, 255, 255, 0.04);
}

.preference-toggle > div > span {
  min-width: 0;
}

.preference-toggle strong,
.preference-toggle small {
  display: block;
}

.preference-toggle strong {
  color: var(--app-text);
  font-size: 0.67rem;
  font-weight: 600;
}

.preference-toggle small {
  margin-top: 4px;
  color: var(--app-subtle);
  font-size: 0.56rem;
  line-height: 1.45;
}

.toggle-control {
  position: relative;
  display: block;
  width: 36px;
  height: 20px;
  flex: 0 0 auto;
}

.toggle-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle-control > span {
  position: absolute;
  inset: 0;
  border: 1px solid var(--app-border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  transition:
    border-color 150ms ease,
    background 150ms ease;
}

.toggle-control > span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #8d96a8;
  content: "";
  transition:
    transform 150ms ease,
    background 150ms ease;
}

.toggle-control input:checked + span {
  border-color: rgba(109, 124, 255, 0.45);
  background: rgba(109, 124, 255, 0.26);
}

.toggle-control input:checked + span::after {
  background: #c3c8ff;
  transform: translateX(16px);
}

.toggle-control input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(109, 124, 255, 0.09);
}

/* Footer actions */

.add-media-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 2px 0;
}

.add-media-actions p {
  margin: 0;
  color: var(--app-subtle);
  font-size: 0.59rem;
}

.add-media-actions > div {
  display: flex;
  gap: 8px;
}

.add-media-actions button {
  cursor: pointer;
}

@media (max-width: 820px) {
  .add-media-shell {
    padding: 30px 20px 70px;
  }

  .add-media-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .media-type-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .add-media-core-grid,
  .add-media-details-grid,
  .preference-grid {
    grid-template-columns: 1fr;
  }

  .add-media-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .add-media-actions > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .add-media-shell {
    padding: 24px 14px 56px;
  }

  .add-media-header h1 {
    font-size: 2rem;
  }

  .add-media-header > a {
    width: 100%;
  }

  .add-media-panel {
    padding: 16px;
  }

  .add-media-optional {
    padding: 0;
  }

  .add-media-optional > summary,
  .add-media-optional-content {
    padding: 16px;
  }

  .media-type-options label {
    min-height: 62px;
    padding: 10px;
  }

  .add-media-cover-row {
    grid-template-columns: minmax(0, 1fr) 72px;
  }

  .cover-preview {
    width: 72px;
    height: 101px;
  }

  .add-media-actions > div {
    grid-template-columns: 1fr;
  }

  .add-media-actions > div > * {
    width: 100%;
  }
}


/* Add Media control refinement ----------------------------------------- */
.add-media-field input,
.add-media-field textarea,
.add-media-field select,
.rating-input-wrap,
.add-media-select-control {
  border-color: rgba(255, 255, 255, 0.105);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.032),
      rgba(255, 255, 255, 0.018)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 1px 0 rgba(0, 0, 0, 0.18);
}

.add-media-field input,
.add-media-field textarea,
.add-media-field select,
.add-media-select-control select,
.rating-input-wrap input {
  color: #f2f4f8;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.add-media-field input,
.add-media-field select {
  min-height: 46px;
}

.add-media-field textarea {
  min-height: 118px;
}

.add-media-field input:hover,
.add-media-field textarea:hover,
.add-media-field select:hover,
.rating-input-wrap:hover,
.add-media-select-control:hover {
  border-color: rgba(255, 255, 255, 0.17);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.045),
      rgba(255, 255, 255, 0.024)
    );
}

.add-media-field input:focus,
.add-media-field textarea:focus,
.add-media-field select:focus,
.rating-input-wrap:focus-within,
.add-media-select-control:focus-within {
  border-color: rgba(109, 124, 255, 0.72);
  background:
    linear-gradient(
      180deg,
      rgba(109, 124, 255, 0.07),
      rgba(109, 124, 255, 0.035)
    );
  box-shadow:
    0 0 0 3px rgba(109, 124, 255, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.add-media-field input::placeholder,
.add-media-field textarea::placeholder,
.rating-input-wrap input::placeholder {
  color: #6d7688;
  opacity: 1;
  font-weight: 400;
}

.add-media-title-field input {
  min-height: 50px;
  padding-inline: 14px;
  font-size: 0.86rem;
}

.add-media-select-control {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 30px;
  align-items: center;
  min-height: 46px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 10px;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.add-media-select-leading,
.add-media-select-chevron {
  display: grid;
  place-items: center;
  color: var(--app-subtle);
  pointer-events: none;
}

.add-media-select-leading {
  font-size: 0.72rem;
}

.add-media-select-chevron {
  font-size: 0.68rem;
  transition: color 150ms ease;
}

.add-media-select-control:focus-within .add-media-select-leading,
.add-media-select-control:focus-within .add-media-select-chevron {
  color: #aab2ff;
}

.add-media-select-control select {
  width: 100%;
  height: 46px;
  padding: 0 4px;
  border: 0 !important;
  border-radius: 0;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
}

.add-media-select-control select option {
  color: #f2f4f8;
  background: #111722;
  font-family: "Space Mono", monospace;
  font-size: 0.76rem;
}

.rating-input-wrap {
  min-height: 46px;
}

.rating-input-wrap input {
  height: 46px;
  padding-left: 12px;
}

.rating-input-wrap > span {
  padding-right: 13px;
  color: #8d96a8;
}

.add-media-field > label,
.media-type-fieldset > legend {
  margin-bottom: 8px;
  color: #dfe3ea;
}

.add-media-field label small {
  color: #7f899b;
}


/* Edit Media V2 --------------------------------------------------------- */
.edit-media-page-v2 {
  min-height: 100vh;
  padding: 42px 32px 80px;
  background: transparent;
}

.edit-media-page-v2 > .container {
  width: min(1080px, 100%);
  max-width: none;
  margin: 0 auto;
  padding: 0;
}

.edit-media-v2 {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.edit-media-v2 .media-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
  padding: 0 0 28px;
}

.edit-media-v2 .media-page-heading h1 {
  margin: 0;
  color: var(--app-text);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.edit-media-v2 .media-page-heading p {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--app-muted);
  font-size: 0.79rem;
  line-height: 1.65;
}

.edit-media-v2 .media-page-heading .secondary-vault-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  color: var(--app-muted);
  background: var(--app-surface);
  font-size: 0.72rem;
}

.edit-media-v2 .media-origin-panel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid rgba(109, 124, 255, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(100deg, rgba(109, 124, 255, 0.07), transparent 60%),
    var(--app-surface);
}

.edit-media-v2 .media-origin-panel-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(109, 124, 255, 0.2);
  border-radius: 9px;
  color: #aab2ff;
  background: rgba(109, 124, 255, 0.08);
}

.edit-media-v2 .media-origin-panel h2 {
  margin: 2px 0 4px;
  color: var(--app-text);
  font-size: 0.78rem;
  font-weight: 650;
}

.edit-media-v2 .media-origin-panel p {
  margin: 0;
  color: var(--app-muted);
  font-size: 0.62rem;
  line-height: 1.55;
}

.edit-media-form-v2 {
  padding: 20px;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  background: var(--app-surface);
}

.edit-media-form-v2 > .row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px 14px;
  margin: 0;
}

.edit-media-form-v2 > .row > * {
  width: auto;
  margin: 0 !important;
  padding: 0;
}

.edit-media-form-v2 > .row > .col-md-8 {
  grid-column: span 8;
}

.edit-media-form-v2 > .row > .col-md-4 {
  grid-column: span 4;
}

.edit-media-form-v2 > .row > .col-md-6 {
  grid-column: span 6;
}

.edit-media-form-v2 > .row > .col-12 {
  grid-column: 1 / -1;
}

.edit-media-form-v2 .form-label {
  margin: 0 0 8px;
  color: #dfe3ea;
  font-size: 0.68rem;
  font-weight: 600;
}

.edit-media-form-v2 .form-control,
.edit-media-form-v2 .form-select,
.edit-media-form-v2 .v2-select {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.105);
  border-radius: 10px;
  color: #f2f4f8;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.032),
      rgba(255, 255, 255, 0.018)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 1px 0 rgba(0, 0, 0, 0.18);
  font-family: "Space Mono", monospace;
  font-size: 0.75rem;
}

.edit-media-form-v2 .form-control {
  padding: 0 12px;
}

.edit-media-form-v2 textarea.form-control {
  min-height: 118px;
  padding: 12px;
  resize: vertical;
  line-height: 1.55;
}

.edit-media-form-v2 .form-control::placeholder {
  color: #697386;
  opacity: 1;
}

.edit-media-form-v2 .form-control:hover,
.edit-media-form-v2 .v2-select:hover {
  border-color: rgba(255, 255, 255, 0.17);
}

.edit-media-form-v2 .form-control:focus,
.edit-media-form-v2 .v2-select:focus-within {
  border-color: rgba(109, 124, 255, 0.72);
  background:
    linear-gradient(
      180deg,
      rgba(109, 124, 255, 0.07),
      rgba(109, 124, 255, 0.035)
    );
  box-shadow: 0 0 0 3px rgba(109, 124, 255, 0.1);
}

.edit-media-form-v2 .v2-select {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 30px;
  align-items: center;
  overflow: hidden;
}

.edit-media-form-v2 .v2-select-leading,
.edit-media-form-v2 .v2-select-chevron {
  display: grid;
  place-items: center;
  color: var(--app-subtle);
  pointer-events: none;
}

.edit-media-form-v2 .v2-select select {
  width: 100%;
  height: 44px;
  padding: 0 4px;
  border: 0;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  color: #f2f4f8;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  font-family: "Space Mono", monospace;
  font-size: 0.75rem;
}

.edit-media-form-v2 .v2-select select option {
  color: #f2f4f8;
  background: #111722;
}

.edit-media-form-v2 .form-text {
  margin-top: 6px;
  color: var(--app-subtle);
  font-size: 0.56rem;
}

.edit-cover-preview {
  display: grid;
  width: 76px;
  height: 106px;
  margin-top: 10px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.edit-cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.edit-cover-preview-empty {
  display: grid;
  place-items: center;
  gap: 5px;
  color: var(--app-subtle);
  font-size: 0.5rem;
  text-align: center;
}

.edit-tag-preview {
  margin-top: 8px;
}

.edit-media-form-v2 .edit-preference-toggle {
  display: flex;
  min-height: 74px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--app-border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
}

.edit-media-form-v2 .edit-preference-toggle .form-check-input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
  border: 1px solid var(--app-border-strong);
  accent-color: var(--app-accent);
}

.edit-media-form-v2 .edit-preference-toggle .form-check-label {
  color: var(--app-text);
  font-size: 0.67rem;
}

.edit-media-form-v2 .media-form-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid var(--app-border);
}

.edit-media-form-v2 .media-form-actions .btn {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.7rem;
}

.edit-media-form-v2 .primary-vault-button {
  border: 1px solid rgba(109, 124, 255, 0.45);
  background: var(--app-accent);
  box-shadow: none;
}

/* Connections V2 -------------------------------------------------------- */
.connections-page {
  min-height: 100vh;
  padding: 42px 32px 80px;
  background: transparent;
}

.connections-page > .container {
  width: min(1120px, 100%);
  max-width: none;
  margin: 0 auto;
  padding: 0;
}

.connections-page .connections-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
  padding: 0 0 28px;
}

.connections-page .connections-heading h1 {
  margin: 0;
  color: var(--app-text);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}

.connections-page .connections-heading p {
  max-width: 650px;
  margin: 10px 0 0;
  color: var(--app-muted);
  font-size: 0.79rem;
  line-height: 1.65;
}

.connections-page .connections-heading .secondary-vault-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  color: var(--app-muted);
  background: var(--app-surface);
  font-size: 0.72rem;
}

.connections-page .connection-card {
  position: relative;
  padding: 20px;
  border: 1px solid var(--app-border);
  border-radius: 14px;
  background:
    radial-gradient(
      circle at 95% 0%,
      rgba(109, 124, 255, 0.08),
      transparent 24rem
    ),
    var(--app-surface);
  box-shadow: none;
}

.connections-page .connection-card-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-right: 150px;
}

.connections-page .connection-card-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(109, 124, 255, 0.2);
  border-radius: 11px;
  color: #aab2ff;
  background: rgba(109, 124, 255, 0.08);
  font-size: 1rem;
}

.connections-page .connection-card-brand h2 {
  margin: 2px 0 6px;
  color: var(--app-text);
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.connections-page .connection-card-brand p {
  max-width: 650px;
  margin: 0;
  color: var(--app-muted);
  font-size: 0.7rem;
  line-height: 1.6;
}

.connections-page .connection-status {
  top: 20px;
  right: 20px;
  padding: 6px 9px;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  color: var(--app-muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.61rem;
}

.connections-page .connection-status.connected {
  color: #83d8a8;
  border-color: rgba(111, 207, 151, 0.2);
  background: rgba(111, 207, 151, 0.06);
}

.connections-page .connection-permissions {
  margin: 20px 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
}

.connections-page .connection-permissions h3 {
  margin: 0 0 10px;
  color: var(--app-subtle);
  font-size: 0.61rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.connections-page .connection-permissions > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.connections-page .connection-permissions span {
  min-height: 72px;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  color: var(--app-muted);
  background: rgba(255, 255, 255, 0.018);
  font-size: 0.62rem;
  line-height: 1.5;
}

.connections-page .connection-permissions span i {
  margin-top: 1px;
  color: #8f9aff;
}

.connections-page .connection-permissions span:last-child i {
  color: #e28b92;
}

.connections-page .primary-vault-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(109, 124, 255, 0.45);
  border-radius: 10px;
  background: var(--app-accent);
  box-shadow: none;
  font-size: 0.7rem;
}

.connections-page .connection-code-panel {
  position: relative;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(109, 124, 255, 0.2);
  border-radius: 12px;
  background: rgba(109, 124, 255, 0.05);
}

.connections-page .connection-code {
  margin: 8px 0 10px;
  color: var(--app-text);
  font-size: clamp(1.4rem, 4vw, 2.1rem);
  font-weight: 650;
  letter-spacing: 0.08em;
}

.connections-page .connection-code-panel p {
  max-width: 640px;
  margin: 0;
  color: var(--app-muted);
  font-size: 0.62rem;
  line-height: 1.6;
}

.connection-copy-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  padding: 0 10px;
  border: 1px solid var(--app-border-strong);
  border-radius: 8px;
  color: var(--app-text);
  background: var(--app-surface-raised);
  cursor: pointer;
  font-family: "Space Mono", monospace;
  font-size: 0.61rem;
}

.connections-page .connection-config-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
  padding: 12px 0 0;
  border-top: 1px solid var(--app-border);
  color: var(--app-subtle);
  font-size: 0.57rem;
  line-height: 1.55;
  opacity: 1;
}

.connections-page .connection-config-note code {
  color: #9fa8ff;
  background: transparent;
  font-family: "Space Mono", monospace;
  font-size: inherit;
}

.connections-page .connection-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0 16px;
}

.connections-page .connection-detail-grid > div {
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.connections-page .connection-detail-grid span {
  margin-bottom: 5px;
  color: var(--app-subtle);
  font-size: 0.57rem;
}

.connections-page .connection-detail-grid strong {
  color: var(--app-text);
  font-size: 0.65rem;
  font-weight: 600;
}

.connections-page .connection-danger-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(228, 123, 131, 0.2);
  border-radius: 9px;
  color: #e8979d;
  background: rgba(228, 123, 131, 0.05);
  font-size: 0.64rem;
}

@media (max-width: 820px) {
  .edit-media-page-v2,
  .connections-page {
    padding: 30px 20px 70px;
  }

  .edit-media-v2 .media-page-heading,
  .connections-page .connections-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .connections-page .connection-permissions > div,
  .connections-page .connection-detail-grid {
    grid-template-columns: 1fr;
  }

  .connections-page .connection-card-brand {
    padding-right: 0;
  }

  .connections-page .connection-status {
    position: static;
    margin-top: 16px;
  }
}

@media (max-width: 640px) {
  .edit-media-form-v2 > .row > .col-md-8,
  .edit-media-form-v2 > .row > .col-md-4,
  .edit-media-form-v2 > .row > .col-md-6 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .edit-media-page-v2,
  .connections-page {
    padding: 24px 14px 56px;
  }

  .edit-media-v2 .media-page-heading h1,
  .connections-page .connections-heading h1 {
    font-size: 2rem;
  }

  .edit-media-v2 .media-page-heading .secondary-vault-button,
  .connections-page .connections-heading .secondary-vault-button {
    width: 100%;
  }

  .edit-media-form-v2 {
    padding: 16px;
  }
}


/* Edit Media header alignment fix -------------------------------------- */
.edit-media-v2 .media-page-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 32px;
  padding-bottom: 28px;
}

.edit-media-v2 .media-page-heading > div:first-child {
  max-width: 760px;
}

.edit-media-v2 .media-page-heading .section-eyebrow {
  display: block;
  margin: 0 0 10px;
  color: var(--app-subtle);
  font-family: "Space Mono", monospace;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.10em;
  line-height: 1.2;
  text-transform: uppercase;
}

.edit-media-v2 .media-page-heading h1 {
  margin: 0;
  font-family: "Space Mono", monospace;
  font-size: clamp(2.25rem, 3.4vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.edit-media-v2 .media-page-heading p {
  max-width: 720px;
  margin: 12px 0 0;
  color: #98a3b7;
  font-family: "Space Mono", monospace;
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.7;
}

.edit-media-v2 .media-page-heading .secondary-vault-button {
  align-self: start;
  margin-top: 8px;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .edit-media-v2 .media-page-heading {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .edit-media-v2 .media-page-heading > div:first-child {
    max-width: 100%;
  }

  .edit-media-v2 .media-page-heading .secondary-vault-button {
    margin-top: 0;
  }
}


/* Edit Media header inner spacing -------------------------------------- */
.edit-media-v2 .media-page-heading {
  padding-left: 20px;
  padding-right: 20px;
}

@media (max-width: 560px) {
  .edit-media-v2 .media-page-heading {
    padding-left: 16px;
    padding-right: 16px;
  }
}


/* Edit Media header top inset ------------------------------------------ */
.edit-media-v2 .media-page-heading {
  padding-top: 22px;
}

@media (max-width: 560px) {
  .edit-media-v2 .media-page-heading {
    padding-top: 18px;
  }
}


/* Media metadata lookup ------------------------------------------------ */
.media-lookup-field {
  position: relative;
  z-index: 30;
}

.media-lookup-input-wrap {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  min-height: 50px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.115);
  border-radius: 11px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.038),
      rgba(255, 255, 255, 0.02)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 1px 0 rgba(0, 0, 0, 0.18);
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.media-lookup-input-wrap:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.media-lookup-input-wrap:focus-within {
  border-color: rgba(109, 124, 255, 0.72);
  background:
    linear-gradient(
      180deg,
      rgba(109, 124, 255, 0.07),
      rgba(109, 124, 255, 0.035)
    );
  box-shadow:
    0 0 0 3px rgba(109, 124, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.media-lookup-input-wrap > i {
  display: grid;
  place-items: center;
  color: #768196;
  font-size: 0.75rem;
  pointer-events: none;
}

.add-media-field .media-lookup-input-wrap > input {
  width: 100%;
  min-height: 48px;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  outline: 0;
  color: #f2f4f8;
  background: transparent;
  box-shadow: none !important;
  font-size: 0.82rem;
}

.add-media-field .media-lookup-input-wrap > input:hover,
.add-media-field .media-lookup-input-wrap > input:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.media-lookup-spinner {
  width: 14px;
  height: 14px;
  justify-self: center;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: #9da6ff;
  border-radius: 50%;
  animation: media-lookup-spin 700ms linear infinite;
}

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

.media-lookup-helper {
  margin-top: 7px;
  color: var(--app-subtle);
  font-size: 0.56rem;
  line-height: 1.5;
}

.media-lookup-results {
  position: absolute;
  z-index: 80;
  top: calc(100% + 7px);
  left: 0;
  width: 100%;
  max-height: 390px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--app-border-strong);
  border-radius: 12px;
  background: #101620;
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.media-search-result {
  display: grid;
  width: 100%;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 68px;
  padding: 7px 9px;
  border: 0;
  border-radius: 9px;
  color: var(--app-text);
  background: transparent;
  cursor: pointer;
  font-family: "Space Mono", monospace;
  text-align: left;
  transition:
    background 140ms ease,
    transform 140ms ease;
}

.media-search-result:hover,
.media-search-result:focus-visible {
  outline: 0;
  background: rgba(109, 124, 255, 0.09);
}

.media-search-result-poster {
  display: grid;
  width: 40px;
  height: 56px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--app-border);
  border-radius: 6px;
  color: var(--app-subtle);
  background: rgba(255, 255, 255, 0.035);
}

.media-search-result-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-search-result-poster i {
  font-size: 0.8rem;
}

.media-search-result-copy {
  display: block;
  min-width: 0;
}

.media-search-result-copy strong,
.media-search-result-copy > span {
  display: block;
}

.media-search-result-copy strong {
  overflow: hidden;
  color: #f4f5f8;
  font-size: 0.68rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-search-result-copy > span {
  overflow: hidden;
  margin-top: 5px;
  color: #8792a5;
  font-size: 0.56rem;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-search-result > small {
  align-self: start;
  margin-top: 5px;
  padding: 4px 6px;
  border: 1px solid var(--app-border);
  border-radius: 999px;
  color: #929cf0;
  background: rgba(109, 124, 255, 0.05);
  font-size: 0.48rem;
  white-space: nowrap;
}

.media-lookup-state {
  padding: 18px 14px;
  color: var(--app-muted);
  font-size: 0.61rem;
  line-height: 1.55;
  text-align: center;
}

.media-lookup-state--error {
  color: #e8979d;
}

.media-lookup-state--notice {
  color: #d4b071;
}

.media-lookup-selection {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  margin-top: 8px;
  padding: 5px 8px;
  border: 1px solid rgba(111, 207, 151, 0.16);
  border-radius: 8px;
  color: #a8dcbc;
  background: rgba(111, 207, 151, 0.045);
  font-size: 0.56rem;
}

.media-lookup-selection > i {
  flex: 0 0 auto;
  color: #6fcf97;
}

.media-lookup-selection > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-lookup-selection button {
  margin-left: auto;
  padding: 0;
  border: 0;
  color: #929cf0;
  background: transparent;
  cursor: pointer;
  font-family: "Space Mono", monospace;
  font-size: 0.52rem;
  white-space: nowrap;
}

.media-lookup-selection button:hover {
  color: #b6bdff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 560px) {
  .media-lookup-results {
    max-height: 330px;
  }

  .media-search-result {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .media-search-result > small {
    display: none;
  }

  .media-lookup-selection {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .media-lookup-selection button {
    width: 100%;
    margin-left: 22px;
    text-align: left;
  }
}


/* Mementiq brand mark -------------------------------------------------- */
.mementiq-mark {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 1px solid rgba(129, 143, 255, 0.32);
  border-radius: inherit;
  color: #f5f7ff;
  background:
    linear-gradient(
      145deg,
      rgba(82, 102, 255, 0.96),
      rgba(126, 86, 255, 0.9)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 18px rgba(84, 103, 255, 0.22);
  font-family: "Space Mono", monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 1;
}

.app-sidebar-logo .mementiq-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 0.86rem;
}

.brand-icon .mementiq-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 0.8rem;
}

.footer-brand-icon .mementiq-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 0.68rem;
}


/* Mementiq vector identity --------------------------------------------- */
.mementiq-mark-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-sidebar-logo .mementiq-mark-image {
  width: 42px;
  height: 42px;
}

.brand-icon .mementiq-mark-image {
  width: 38px;
  height: 38px;
}

.footer-brand-icon .mementiq-mark-image {
  width: 32px;
  height: 32px;
}


/* Global Mementiq identity -------------------------------------------- */
.vault-brand .brand-icon,
.footer-brand-icon {
  background: transparent;
  box-shadow: none;
}

.vault-brand .brand-icon {
  width: 40px;
  height: 40px;
}

.footer-brand-icon {
  width: 34px;
  height: 34px;
}

.preview-logo {
  overflow: hidden;
  padding: 0;
  background: transparent;
  box-shadow: 0 0 20px rgba(70, 119, 255, 0.16);
}

.preview-logo .mementiq-mark-image {
  width: 42px;
  height: 42px;
}

.mementiq-transition {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 50% 44%,
      rgba(63, 118, 255, 0.18),
      rgba(3, 10, 22, 0.985) 42%,
      #02060d 72%
    );
  transition:
    opacity 220ms ease,
    visibility 220ms ease;
}

.mementiq-transition.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mementiq-transition-visual {
  position: relative;
  display: grid;
  width: 190px;
  height: 190px;
  place-items: center;
  transform: translateY(-24px);
}

.mementiq-transition-mark {
  position: relative;
  z-index: 3;
  width: 92px;
  height: 92px;
  filter: drop-shadow(0 0 24px rgba(87, 153, 255, 0.26));
  animation: mementiq-mark-arrive 900ms cubic-bezier(.2,.8,.2,1) both;
}

.mementiq-transition-ring {
  position: absolute;
  border: 1px solid rgba(125, 185, 255, 0.19);
  border-radius: 50%;
  opacity: 0;
  animation: mementiq-ring-expand 1.25s ease-out infinite;
}

.mementiq-transition-ring.ring-one {
  width: 112px;
  height: 112px;
}

.mementiq-transition-ring.ring-two {
  width: 152px;
  height: 152px;
  animation-delay: 260ms;
}

.mementiq-transition-message {
  position: absolute;
  left: 50%;
  bottom: 11vh;
  z-index: 4;
  width: min(460px, calc(100% - 40px));
  transform: translateX(-50%);
  text-align: center;
}

.mementiq-transition-eyebrow {
  display: block;
  margin-bottom: 10px;
  color: #8edcff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.mementiq-transition-message h2 {
  margin: 0;
  color: #f4f7fb;
  font-size: clamp(0.95rem, 2.3vw, 1.25rem);
  font-weight: 400;
}

.mementiq-loading-line {
  width: 210px;
  height: 2px;
  margin: 18px auto 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.mementiq-loading-line span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    rgba(90, 140, 255, 0.2),
    #8edcff,
    #7c5cff
  );
  animation: mementiq-loading 1.1s ease-in-out infinite;
}

.mementiq-transition-active {
  overflow: hidden;
}

@keyframes mementiq-mark-arrive {
  from {
    opacity: 0;
    transform: scale(0.82) translateY(8px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes mementiq-ring-expand {
  0% {
    opacity: 0;
    transform: scale(0.72);
  }

  28% {
    opacity: 0.6;
  }

  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

@keyframes mementiq-loading {
  from {
    transform: translateX(-110%);
  }

  to {
    transform: translateX(240%);
  }
}

@media (max-width: 600px) {
  .mementiq-transition-visual {
    width: 150px;
    height: 150px;
  }

  .mementiq-transition-mark {
    width: 78px;
    height: 78px;
  }

  .mementiq-transition-message {
    bottom: 12vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mementiq-transition-mark,
  .mementiq-transition-ring,
  .mementiq-loading-line span {
    animation: none;
  }
}


/* Restore the original wide 3D Explore composition --------------------- */
.explore-shell .library-container {
  width: min(1500px, 100%);
}

.explore-carousel-section .media-carousel-shell {
  min-height: 590px;
}

@media (max-width: 1180px) {
  .explore-shell .library-container {
    width: 100%;
  }
}


/* Shared media lookup refinements --------------------------------------- */
.media-search-result.is-active {
  outline: 0;
  background: rgba(109, 124, 255, 0.12);
}

.edit-media-form-v2 .media-lookup-field {
  z-index: 40;
}

.edit-media-form-v2 .media-lookup-input-wrap > .form-control {
  min-height: 48px;
  padding: 0 4px;
  border: 0 !important;
  border-radius: 0;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
}

.edit-media-form-v2 .media-lookup-input-wrap > .form-control:hover,
.edit-media-form-v2 .media-lookup-input-wrap > .form-control:focus {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.edit-media-form-v2 .media-lookup-helper {
  margin-top: 7px;
}

.edit-media-form-v2 .media-lookup-selection {
  margin-bottom: 2px;
}


/* Mementiq error page --------------------------------------------------- */
.mementiq-error-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 110px 20px 70px;
}

.authenticated-content .mementiq-error-page {
  padding-top: 40px;
}

.mementiq-error-card {
  width: min(620px, 100%);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    radial-gradient(
      circle at 85% 10%,
      rgba(90, 140, 255, 0.08),
      transparent 16rem
    ),
    rgba(12, 17, 26, 0.94);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.mementiq-error-mark {
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
}

.mementiq-error-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.mementiq-error-kicker {
  display: block;
  margin-bottom: 9px;
  color: #8edcff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mementiq-error-card h1 {
  margin: 0;
  color: #f4f7fb;
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.045em;
}

.mementiq-error-card > p {
  max-width: 500px;
  margin: 13px 0 0;
  color: #8d98aa;
  font-size: 0.72rem;
  line-height: 1.7;
}

.mementiq-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.mementiq-error-actions button {
  cursor: pointer;
}

.mementiq-error-details {
  margin-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 17px;
}

.mementiq-error-details summary {
  color: #748298;
  cursor: pointer;
  font-size: 0.58rem;
}

.mementiq-error-details pre {
  max-height: 300px;
  margin: 12px 0 0;
  overflow: auto;
  padding: 12px;
  border-radius: 9px;
  color: #aeb9c8;
  background: #080d15;
  font-size: 0.53rem;
  white-space: pre-wrap;
}

@media (max-width: 560px) {
  .mementiq-error-card {
    padding: 24px 20px;
  }

  .mementiq-error-actions {
    flex-direction: column;
  }

  .mementiq-error-actions > * {
    width: 100%;
  }
}
