:root {
  --paper: #f8f8f7;
  --ink: #222323;
  --muted: #777977;
  --line: #e1e2df;
  --accent: #65735b;
  --light: #eeefed;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px var(--sans);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 13px;
}
button:hover {
  background: var(--light);
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
button.primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
button.primary:hover {
  background: #49553f;
}
button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--light);
  border-color: var(--muted);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
input,
textarea,
select {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
}
input,
textarea {
  width: 100%;
}
textarea {
  resize: vertical;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2 {
  font-family: var(--sans);
  font-weight: 600;
}
h1 {
  font-size: 24px;
  letter-spacing: -0.6px;
}
h2 {
  font-size: 22px;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 15px;
  font-weight: 600;
}
p {
  line-height: 1.65;
}
.muted {
  color: var(--muted);
}
.tiny {
  font-size: 11px;
}
.small {
  font-size: 12px;
}
.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}
.quiet {
  border: 0 !important;
  background: transparent !important;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.spread {
  justify-content: space-between;
}
.wrap {
  flex-wrap: wrap;
}
[hidden] {
  display: none !important;
}
header {
  height: 54px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 36px;
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}
.wordmark {
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.wordmark .brand-name {
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -1.3px;
}
.wordmark .brand-domain {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: -0.3px;
}
nav {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 22px;
}
nav button {
  border: 0;
  border-radius: 0;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
}
nav button:hover {
  color: var(--ink);
  background: transparent;
}
nav button[aria-pressed="true"] {
  color: var(--ink);
  background: transparent;
  box-shadow: inset 0 -2px var(--ink);
}
.account-nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
  align-items: center;
  font-size: 12px;
}
.account-nav button {
  padding: 6px 11px;
}
main {
  padding: 12px 20px 32px;
  max-width: 1920px;
  margin: auto;
  min-height: calc(100vh - 110px);
}
.heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 25px;
}
.heading .muted {
  font-size: 12px;
}
.library-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  position: relative;
  z-index: 4;
}
.search-field {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  height: 38px;
}
.search-field:focus-within {
  border-color: var(--muted);
}
.search-field input {
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 8px 12px;
  font-size: 13px;
  outline-offset: 0;
}
.search-field button.icon-button {
  border: 0;
  min-width: 38px;
  height: 36px;
  color: var(--muted);
}
.search-field .ui-icon {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}
.filter-menu {
  position: relative;
}
.filter-menu summary {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 13px;
  height: 38px;
  font-size: 12px;
}
.filter-menu summary::-webkit-details-marker {
  display: none;
}
.filter-menu summary:hover,
.filter-menu[open] summary {
  background: var(--light);
}
.filter-menu summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
#filterCount {
  font-size: 11px;
  border-radius: 3px;
  background: var(--ink);
  color: white;
  padding: 1px 5px;
}
.filter-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 330px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 24px #00000014;
}
.filter-panel label {
  display: grid;
  gap: 5px;
  min-width: 0;
  font-size: 12px;
}
.filter-panel select {
  width: 100%;
  padding: 8px;
  font-size: 12px;
  background: white;
}
.filter-panel button {
  font-size: 12px;
}
.layout-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
  padding: 3px;
  background: var(--light);
  border-radius: 5px;
  height: 38px;
}
.layout-toggle button {
  font-size: 12px;
  padding: 6px 12px;
  border: 0;
  color: var(--muted);
}
.layout-toggle button[aria-pressed="true"] {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 3px #00000012;
}
.resultbar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  margin: -4px 0 10px;
}
.resultbar button {
  font-size: 12px;
  padding: 0;
  text-decoration: underline;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 10px;
}
.tile {
  min-width: 0;
}
.tile-visual {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  background: #171c18;
}
.tile-open {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
}
.tile-open img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.2s;
}
.tile-open:hover img {
  opacity: 0.85;
}
.tile-actions {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  gap: 5px;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.tile-visual:hover .tile-actions,
.tile-visual:focus-within .tile-actions {
  opacity: 1;
  pointer-events: auto;
}
.tile-actions button {
  font-size: 10px;
  padding: 5px 8px;
  background: var(--paper);
  border-color: var(--paper);
}
.tile-actions button:last-child {
  margin-left: auto;
}
.tile-title {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.4;
  color: #646663;
  font-weight: 500;
}
.tile-title .small {
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
}
.tile-label {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
  line-height: 1.5;
}
.swatches {
  display: flex;
  gap: 3px;
  align-items: center;
}
.swatch {
  width: 18px;
  height: 18px;
  display: inline-block;
  border: 1px solid #00000012;
  border-radius: 50%;
  padding: 0;
}
.swatch:hover {
  transform: scale(1.15);
}
.more {
  display: block;
  margin: 38px auto 0;
  min-width: 160px;
}
.empty {
  padding: 65px 0;
  max-width: 500px;
}
.empty h2 {
  margin-bottom: 18px;
}
.empty button {
  margin-top: 18px;
}
.loading {
  padding: 50px 0;
  color: var(--muted);
}
.error {
  color: #9b3e30;
  font-size: 13px;
  line-height: 1.5;
}
.board-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.board-card {
  border: 0;
  padding: 0;
  text-align: left;
  background: transparent;
}
.board-cover {
  aspect-ratio: 4/3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  background: var(--light);
  border-radius: 4px;
  overflow: hidden;
}
.board-cover img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  min-height: 0;
}
.board-cover .blank {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: span 2;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 24px;
}
.board-card h3 {
  margin-top: 13px;
}
.board-card p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.board-notes {
  max-width: 650px;
  font-size: 13px;
  color: var(--muted);
  margin: -10px 0 22px;
}
.saved-note {
  font-size: 12px;
  margin-top: 7px;
  line-height: 1.5;
}
.note-button {
  border: 0;
  padding: 4px 0;
  font-size: 11px;
  color: var(--muted);
}
footer {
  padding: 20px 3%;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}
footer button {
  border: 0;
  padding: 0;
  font-size: 11px;
}
dialog {
  background: var(--paper);
  border: 0;
  border-radius: 6px;
  padding: 0;
  width: 460px;
  max-width: 94vw;
  max-height: 92vh;
  color: var(--ink);
}
dialog::backdrop {
  background: #161b17c9;
}
dialog.gallery {
  width: 1500px;
  background: #141a16;
  color: #e8ebe3;
  max-height: 96vh;
}
dialog.comparison {
  width: 1500px;
  background: #141a16;
  color: #e8ebe3;
}
dialog.wide {
  width: 780px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  font-size: 26px;
}
.modal-head button {
  border: 0;
  padding: 5px;
  font-size: 12px;
  color: inherit;
}
.modal-content {
  padding: 25px;
}
.modal-content p {
  margin-bottom: 18px;
}
.modal-content form {
  display: grid;
  gap: 15px;
}
.field {
  display: grid;
  gap: 7px;
  font-size: 12px;
}
.form-footer {
  font-size: 12px;
  margin-top: 18px;
  text-align: center;
}
.form-footer button {
  border: 0;
  text-decoration: underline;
  padding: 0;
}
.form-message {
  font-size: 12px;
  line-height: 1.6;
}
.auth-switch {
  display: flex;
  gap: 6px;
  margin-bottom: 23px;
}
.auth-switch button {
  flex: 1;
}
.gallery .modal-head,
.comparison .modal-head {
  border-bottom: 1px solid #364038;
  padding: 15px 20px;
}
.gallery .modal-head h2 {
  font: 600 15px var(--sans);
  letter-spacing: 0;
}
.gallery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
}
.gallery-stage {
  min-width: 0;
  padding: 12px;
}
.image-stage {
  height: min(64vh, 750px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0c110d;
}
.image-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}
.gallery-side {
  padding: 24px 20px;
  border-left: 1px solid #364038;
  overflow: auto;
  max-height: 76vh;
}
.gallery-side h3 {
  font-size: 15px;
  line-height: 1.5;
  margin: 10px 0;
}
.gallery-side p {
  font-size: 12px;
  color: #adb6a9;
  line-height: 1.7;
}
.gallery-side .row {
  margin-top: 20px;
}
.gallery-side button {
  color: inherit;
  border-color: #586353;
  font-size: 12px;
}
.gallery-side button:hover,
.gallery-side button[aria-pressed="true"] {
  background: #303b2d;
  color: white;
}
.taglist {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 20px 0;
}
.taglist button {
  font-size: 10px;
  padding: 4px 7px;
}
.gallery-side details {
  font-size: 11px;
  margin-top: 24px;
  color: #aeb7a9;
  line-height: 1.7;
}
.gallery-side summary {
  cursor: pointer;
}
.gallery-side details a {
  display: block;
  margin-top: 6px;
}
.filmstrip {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 12px 0 0;
}
.filmstrip button {
  padding: 0;
  border: 2px solid transparent;
  flex: 0 0 96px;
  height: 61px;
  border-radius: 2px;
  background: #0c110d;
}
.filmstrip button[aria-pressed="true"] {
  border-color: #b5c5a4;
}
.filmstrip img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.gallery-bottom {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #aeb7a9;
  padding: 10px 0 0;
}
.gallery-bottom button {
  color: inherit;
  border-color: #46523f;
  font-size: 11px;
  padding: 5px 9px;
}
.gallery-bottom button:hover {
  background: #303b2d;
}
.price {
  font-family: var(--sans);
  font-size: 62px;
  letter-spacing: -2px;
  margin: 18px 0 0;
}
.price span {
  font: 13px var(--sans);
  letter-spacing: 0;
  margin-left: 12px;
  color: var(--muted);
}
.benefits {
  list-style: none;
  margin: 20px 0 24px;
  padding: 0;
  line-height: 2.2;
  font-size: 13px;
}
.plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}
.plan-grid > section {
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: 4px;
}
.plan-grid .price {
  font-size: 48px;
}
.board-list {
  display: grid;
  gap: 8px;
}
.board-list button {
  padding: 13px;
  text-align: left;
  display: flex;
  justify-content: space-between;
}
.board-list .muted {
  font-size: 11px;
}
.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 20px;
}
.compare-item img {
  width: 100%;
  height: 32vh;
  object-fit: contain;
  background: #0c110d;
}
.compare-item .tile-title {
  color: #e8ebe3;
}
.compare-item .tile-label {
  color: #b3bdad;
}
.compare-item .swatches {
  margin-top: 10px;
}
#compareTray {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 15px;
  background: var(--ink);
  color: white;
  border-radius: 6px;
  font-size: 12px;
  box-shadow: 0 4px 20px #0002;
}
#compareTray button {
  color: white;
  border-color: #737b6c;
  font-size: 11px;
  padding: 6px 10px;
}
#compareTray button:hover {
  background: #424d3b;
}
#toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 13px 22px;
  border-radius: 4px;
  z-index: 100;
  font-size: 13px;
  max-width: 90vw;
}
.about-copy p {
  font-size: 13px;
  line-height: 1.8;
}
.about-copy h3 {
  margin: 24px 0 10px;
}
.usage {
  margin: 15px 0 25px;
  padding: 15px;
  background: var(--light);
  border-radius: 4px;
  font-size: 13px;
}
.usage strong {
  font-size: 24px;
  font-weight: 500;
}
.account-actions {
  display: grid;
  gap: 8px;
}
.board-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.board-actions button {
  font-size: 12px;
}
.annotation {
  padding: 13px;
  background: var(--light);
  border-radius: 4px;
  font-size: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (min-width: 1700px) {
  .grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  header {
    gap: 30px;
  }
  .grid,
  .board-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .filters select {
    max-width: 160px;
  }
  .gallery-layout {
    grid-template-columns: minmax(0, 1fr) 240px;
  }
  .gallery-side {
    padding: 17px;
  }
  .image-stage {
    height: 60vh;
  }
}
@media (max-width: 760px) {
  header {
    height: 50px;
    padding: 0 12px;
    gap: 20px;
  }
  .wordmark .brand-name {
    font-size: 22px;
  }
  .wordmark .brand-domain {
    display: none;
  }
  nav {
    gap: 14px;
  }
  nav button {
    font-size: 12px;
  }
  .account-nav .quiet {
    display: none;
  }
  .account-nav button {
    padding: 5px 8px;
    font-size: 11px;
  }
  main {
    padding: 10px 12px 28px;
  }
  .library-toolbar {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
  }
  .search-field {
    flex-basis: calc(100% - 82px);
  }
  .search-field input {
    font-size: 16px;
  }
  .filter-menu {
    position: static;
  }
  .filter-menu summary {
    padding: 0 10px;
  }
  .filter-panel {
    top: 44px;
    width: min(330px, 100%);
  }
  .layout-toggle {
    margin: 0;
    height: 32px;
  }
  .layout-toggle button {
    padding: 4px 12px;
  }
  .grid,
  .board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 8px;
  }
  .tile-title {
    font-size: 11px;
  }
  .gallery-layout {
    grid-template-columns: 1fr;
  }
  .gallery-side {
    border-left: 0;
    border-top: 1px solid #364038;
    max-height: none;
    padding: 17px;
  }
  .gallery-side .taglist {
    margin: 12px 0;
  }
  .gallery-side .row {
    margin-top: 12px;
  }
  .gallery-side details {
    margin-top: 15px;
  }
  .image-stage {
    height: 42vh;
  }
  .gallery .modal-head {
    padding: 12px;
  }
  .gallery .modal-head h2 {
    font-size: 13px;
  }
  .gallery-bottom {
    flex-wrap: wrap;
  }
  .filmstrip button {
    flex-basis: 75px;
    height: 49px;
  }
  .gallery-side p {
    font-size: 11px;
  }
  .gallery-side h3 {
    font-size: 13px;
  }
  .plan-grid {
    grid-template-columns: 1fr;
  }
  .plan-grid > section {
    padding: 15px;
  }
  .compare-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }
  .compare-item img {
    height: auto;
    aspect-ratio: 16/9;
  }
  #compareTray {
    width: 90%;
    gap: 10px;
    justify-content: space-between;
    font-size: 11px;
  }
  .modal-head {
    padding: 18px;
  }
  .modal-content {
    padding: 20px;
  }
  footer {
    padding: 20px 5%;
  }
  .board-actions {
    max-width: 180px;
    justify-content: flex-end;
  }
  .board-actions button {
    padding: 5px 8px;
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Compact style collections: a linked name and three references. */
.style-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 20px;
}
.style-section {
  min-width: 0;
}
.style-heading {
  margin: 0 0 8px;
  font: 600 14px/1.4 var(--sans);
  letter-spacing: 0;
}
.style-link {
  text-decoration: none;
}
.style-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.style-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.style-grid .tile-title {
  font-size: 11px;
}
.style-grid .tile-actions {
  gap: 4px;
  left: 5px;
  right: 5px;
}
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 44px;
  padding: 0;
  border: 1px solid #ffffff40;
  border-radius: 4px;
  background: #141a16d9;
  color: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.gallery-arrow.previous {
  left: 8px;
}
.gallery-arrow.next {
  right: 8px;
}
.gallery-arrow img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  cursor: inherit;
}
.gallery-arrow:hover {
  background: #141a16;
}
.gallery-arrow:disabled {
  opacity: 0 !important;
  pointer-events: none !important;
}
.tile-visual:hover .gallery-arrow,
.tile-visual:focus-within .gallery-arrow,
.image-stage:hover .gallery-arrow,
.image-stage:focus-within .gallery-arrow {
  opacity: 1;
  pointer-events: auto;
}
.frame-count {
  position: absolute;
  top: 9px;
  right: 9px;
  background: #141a16d9;
  color: white;
  padding: 4px 6px;
  border-radius: 3px;
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
}
.tile-visual:hover .frame-count,
.tile-visual:focus-within .frame-count {
  opacity: 1;
}
.image-stage {
  position: relative;
}
.image-stage > .gallery-arrow {
  width: 42px;
  height: 54px;
}
@media (max-width: 1000px) {
  .style-sections {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}
@media (max-width: 760px) {
  .style-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .style-grid .tile:nth-child(3) {
    display: none;
  }
  .gallery-arrow {
    width: 30px;
    height: 36px;
  }
  .image-stage > .gallery-arrow {
    width: 38px;
    height: 48px;
  }
}
@media (hover: none), (pointer: coarse) {
  .gallery-arrow,
  .frame-count {
    opacity: 1;
    pointer-events: auto;
  }
  .frame-count {
    pointer-events: none;
  }
  .tile-visual .frame-count {
    display: none;
  }
}

/* Images always fit the available stage; only long details may scroll. */
dialog.gallery {
  height: min(900px, calc(100dvh - 36px));
  max-height: calc(100dvh - 36px);
  overflow: hidden;
}
.gallery #modalBody {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.gallery .modal-head {
  flex: 0 0 auto;
}
.gallery-layout {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.gallery-stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.gallery-stage .image-stage {
  flex: 1;
  min-height: 0;
  height: auto;
  overflow: hidden;
}
.image-stage #largeImage {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.gallery .filmstrip {
  flex: 0 0 auto;
  overflow: hidden;
  gap: 7px;
  min-width: 0;
}
.gallery .filmstrip button {
  flex: 1 1 0;
  min-width: 0;
  max-width: 110px;
  height: clamp(38px, 6vh, 62px);
}
.gallery-bottom {
  flex: 0 0 auto;
  min-height: 37px;
}
.gallery-side {
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #51604e transparent;
}
.gallery-side::-webkit-scrollbar {
  width: 4px;
}
.gallery-side::-webkit-scrollbar-thumb {
  background: #51604e;
  border-radius: 4px;
}
.gallery-side::-webkit-scrollbar-track {
  background: transparent;
}
.gallery.image-focus .gallery-layout {
  grid-template-columns: minmax(0, 1fr);
}
.gallery.image-focus .gallery-side,
.gallery.image-focus .filmstrip {
  display: none;
}
.gallery.image-focus #largeImage {
  cursor: zoom-out;
}
.ui-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  filter: brightness(0);
  display: block;
}
button.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  min-width: 34px;
  min-height: 34px;
  gap: 0;
}
.with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.primary .ui-icon,
.gallery .ui-icon,
.comparison .ui-icon {
  filter: none;
}
.gallery .modal-head .icon-button {
  color: inherit;
  border: 1px solid #ffffff20;
  border-radius: 4px;
  width: 34px;
  height: 34px;
  padding: 6px;
}
.gallery .modal-head .icon-button:hover {
  background: #2e382b;
}
.tile-actions {
  justify-content: flex-start;
  gap: 6px;
}
.tile-actions button.icon-button {
  width: 32px;
  height: 32px;
  padding: 6px;
  min-width: 32px;
  min-height: 32px;
  background: #f7f6f2ed;
  border: 0;
}
.tile-actions button:last-child {
  margin-left: 0;
}
.tile-actions button[aria-pressed="true"] {
  background: #cbd7bf;
  box-shadow: inset 0 0 0 1px #697b58;
}
.style-grid .tile-actions [data-compare],
.style-grid .tile-actions [data-similar] {
  display: inline-flex;
}
.gallery-side .row.wrap {
  gap: 6px;
}
.gallery-side .with-icon {
  font-size: 12px;
  padding: 8px;
}
.gallery-side .with-icon .ui-icon {
  width: 18px;
  height: 18px;
}
@media (max-width: 760px) {
  dialog.gallery {
    height: calc(100dvh - 20px);
    max-height: calc(100dvh - 20px);
    max-width: calc(100vw - 20px);
  }
  .gallery-layout {
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #51604e transparent;
  }
  .gallery-stage {
    height: clamp(300px, 57dvh, 600px);
  }
  .gallery-side {
    overflow: visible;
  }
  .gallery.image-focus .gallery-layout {
    display: flex;
  }
  .gallery.image-focus .gallery-stage {
    height: 100%;
    width: 100%;
  }
  .tile-visual .tile-actions {
    top: 6px;
    right: 6px;
    bottom: auto;
    left: auto;
    opacity: 1;
    pointer-events: auto;
  }
  .tile-actions button.icon-button {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
  }
  .tile-visual .tile-actions [data-compare],
  .tile-visual .tile-actions [data-similar] {
    display: none;
  }
  .gallery .filmstrip {
    gap: 4px;
  }
  .gallery .filmstrip button {
    height: 38px;
  }
  .searchbar .ui-icon {
    width: 18px;
    height: 18px;
  }
}
.seo-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: contain;
  background: #171c18;
}
.filmstrip img {
  display: block;
}
dialog {
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
dialog.comparison {
  scrollbar-color: #51604e transparent;
}

/* Shared collections retain the library's quiet, image-first treatment. */
.style-section-heading { display:flex; align-items:baseline; justify-content:space-between; gap:20px; }
.style-section-heading .style-heading { margin-bottom:16px; }
.style-section-heading > button { flex-shrink:0; }
.lookbook-intro { margin:10px 0 0; }
.lookbook-tabs { display:flex; gap:8px; margin:24px 0 32px; border-bottom:1px solid var(--line, #deded9); padding-bottom:12px; }
.lookbook-tabs button[aria-pressed="true"] { background:#252722; color:#fff; }
.lookbook-heading { align-items:flex-start; gap:24px; }
.lookbook-heading h1 { overflow-wrap:anywhere; }
.lookbook-heading .board-actions { flex-wrap:wrap; justify-content:flex-end; max-width:620px; }
.lookbook-heading .small { margin-top:12px; }
.sharing-section { border-top:1px solid #deded9; margin-top:28px; padding-top:24px; }
.sharing-section h3 { margin:0 0 12px; }
.sharing-section p { line-height:1.6; margin:12px 0; }
.share-link { margin-top:24px; }
.member-list { margin-top:16px; }
.member-list .row { justify-content:space-between; padding:10px 0; border-bottom:1px solid #eee; }
.upload-drop { padding:24px; background:#f4f4f0; border:1px dashed #a7aaa0; border-radius:8px; }
.upload-drop input { width:100%; margin-top:12px; }
.uploaded-stage { background:#181b18; display:flex; justify-content:center; }
.uploaded-stage img { max-width:100%; max-height:65vh; object-fit:contain; }
.copy-preview { width:100%; max-height:50vh; object-fit:contain; margin:16px 0 24px; background:#f5f4ef; }
.board-actions { gap:8px; }
#syncStatus { margin-left:auto; }
.tile-actions { flex-wrap:wrap; }
@media (max-width:760px) {
 .lookbook-heading { flex-direction:column; }
 .lookbook-heading .board-actions { justify-content:flex-start; }
 .style-section-heading { gap:8px; }
 .style-section-heading > button { font-size:11px; }
 #syncStatus { margin-left:0; }
 .lookbook-heading .board-actions button { padding:9px 12px; }
}

@media (max-width: 380px) {
  header { gap: 10px; }
  header nav { gap: 10px; }
  .account-nav button { white-space: nowrap; }
}
