html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* --- Artwork studio & viewer --- */
.artwork-card {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.artwork-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.artwork-thumb {
  height: 220px;
  object-fit: cover;
}

.artwork-viewer {
  width: 100%;
  height: 75vh;
  min-height: 420px;
  background: #1a1a1a;
  border-radius: 0.5rem;
}

/* --- Drag & drop upload --- */
.drop-zone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  border: 2px dashed #adb5bd;
  border-radius: 0.5rem;
  background: #f8f9fa;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.drop-zone--over {
  border-color: #0d6efd;
  background: #e7f1ff;
}

.drop-zone__input {
  display: none;
}

.drop-zone__icon {
  font-size: 2.5rem;
}

.drop-zone__preview {
  display: none;
  max-width: 100%;
  max-height: 300px;
  border-radius: 0.375rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.2);
}

/* --- Room hierarchy navigation --- */
.room-nav .room-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0.5rem;
  border-radius: 0.375rem;
  text-decoration: none;
  color: #212529;
}

.room-nav .room-link:hover {
  background: #f1f3f5;
}

.room-nav .room-link.active {
  background: #0d6efd;
  color: #fff;
}

.room-nav .room-link.active .badge {
  color: #212529;
}

/* Nested sub-rooms: indent and add a guide line. */
.room-tree {
  margin-left: 0.75rem;
  padding-left: 0.5rem;
  border-left: 1px solid #dee2e6;
}

/* --- "Find a work like this" image search --- */
.image-search-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  padding: 0.375rem 0.75rem;
  text-align: center;
  cursor: pointer;
  border: 2px dashed #adb5bd;
  border-radius: 0.375rem;
  background: #f8f9fa;
  color: #495057;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.image-search-zone:hover,
.image-search-zone:focus {
  border-color: #0d6efd;
  outline: none;
}

.image-search-zone--over {
  border-color: #0d6efd;
  background: #e7f1ff;
}

.image-search-zone--busy {
  opacity: 0.7;
  pointer-events: none;
}

.image-search-zone__label {
  font-size: 0.95rem;
  white-space: nowrap;
}

/* Studio sidebar — the current Curator as the root of the room tree. */
.room-curator {
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.room-curator::before {
  content: "\1F3DB"; /* 🏛 classical building */
  font-size: 1rem;
}

/* The studio heading doubles as a link back to the whole (unfiltered) studio. */
.room-curator--link {
  color: #212529;
  text-decoration: none;
  border-radius: 0.375rem;
}
.room-curator--link:hover {
  background: #f1f3f5;
}
.room-curator--link.active {
  color: #0d6efd;
}
.room-curator-children {
  margin-left: 0.5rem;
  padding-left: 0.5rem;
  border-left: 1px solid #dee2e6;
}

/* Curators landing — avatar initial on each curator card. */
.curator-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #0d6efd;
  color: #fff;
  font-weight: 600;
  font-size: 1.25rem;
}

/* --- Landing page: "Open Studio" hero over an artwork mosaic --- */
body {
  overflow-x: hidden; /* guard the full-bleed hero's 100vw breakout against a stray scrollbar */
  background: transparent; /* let the fixed faint mosaic (below) show through on every page */
}

/* Very faint full-page mosaic of the landing images, fixed behind all content. */
html {
  background: #fff;
}

.page-bg-mosaic {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 1fr;
  opacity: 0.06;
  pointer-events: none;
  overflow: hidden;
}

.page-bg-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 767.98px) {
  .page-bg-mosaic {
    grid-template-columns: repeat(4, 1fr);
  }
}

.landing-hero {
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: -1rem; /* absorb the navbar's mb-3 so the hero sits flush under it */
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Fallback when there is no artwork yet to build the mosaic from. */
  background: linear-gradient(135deg, #232526, #414345);
}

.landing-hero__mosaic {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 1fr;
  gap: 2px;
}

.landing-hero__mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.landing-hero__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.landing-hero__content {
  position: relative;
  text-align: center;
  color: #fff;
  padding: 2rem;
  max-width: 900px;
}

.landing-hero__title {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  font-size: clamp(3rem, 13vw, 9rem);
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.55);
}

.landing-hero__subtitle {
  margin: 1.25rem auto 2rem;
  max-width: 42ch;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.landing-hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .landing-hero__mosaic {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 767.98px) {
  .landing-hero__mosaic {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Studio open/closed toggle, styled like a hanging door sign. */
.studio-sign {
  border: none;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 1.1rem;
  border-radius: 0.5rem;
  line-height: 1.1;
  font-size: 1rem;
  cursor: pointer;
  /* Thin inset white rule for the classic double-border sign look, plus a soft drop shadow. */
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9), 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: filter 0.12s ease;
}

.studio-sign--open {
  background: #1b8f3a;
}

.studio-sign--closed {
  background: #cc2027;
}

.studio-sign:hover {
  filter: brightness(1.06);
}

.studio-sign:focus-visible {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}

/* Live password-strength checklist on the sign-up form. */
.password-rules li {
  padding-left: 1.25em;
  position: relative;
}
.password-rules li::before {
  position: absolute;
  left: 0;
  content: "\2022"; /* bullet, unmet */
}
.password-rules li.rule-unmet {
  color: #dc3545;
}
.password-rules li.rule-met {
  color: #198754;
}
.password-rules li.rule-met::before {
  content: "\2713"; /* check mark, met */
}

/* Admin thumbnails for the landing-page mosaic images. */
.landing-thumb {
  width: 150px;
}

.landing-thumb img {
  width: 150px;
  height: 105px;
  object-fit: cover;
  border-radius: 0.375rem;
  border: 1px solid #dee2e6;
  display: block;
}