html:has(.style-atlas) {
  scrollbar-gutter: auto;
}

html:has(.style-atlas),body:has(.style-atlas) {
  margin: 0;
  padding: 0;
  background: #f5f2eb;
  color: #24251f;
  color-scheme: light;
}

.style-atlas {
  font-family: Inter,ui-sans-serif,system-ui,sans-serif;
}

.style-atlas * {
  box-sizing: border-box;
}

.sa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2px;
  background: #f5f2eb;
  width: 100%;
}

.sa-tile {
  position: relative;
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #ded9ce;
  color: white;
  text-align: left;
  border-radius: 0;
}

.sa-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.sa-tile:hover img {
  transform: scale(1.045);
}

.sa-label {
  position: absolute;
  inset: 45% 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 18px;
  background: linear-gradient(transparent,rgba(0,0,0,.7));
}

.sa-label small {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  opacity: .75;
  margin-bottom: 3px;
}

.sa-label strong {
  font-size: clamp(12px,1.35vw,21px);
  font-weight: 500;
}

.sa-plus {
  font-size: 23px;
  opacity: .8;
}

.style-atlas :focus-visible {
  outline: 3px solid #e99435;
  outline-offset: 3px;
}

.sa-tile:focus-visible {
  outline-offset: -4px;
  z-index: 1;
}

.sa-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #f5f2eb;
  color: #24251f;
  width: min(1000px,92vw);
  max-width: none;
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 30px 100px #0005;
}

.sa-dialog::backdrop {
  background: #171b19b8;
  backdrop-filter: blur(6px);
}

.sa-modal-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.sa-preview {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
}

.sa-details {
  padding: 42px 32px 25px;
}

.sa-details h2 {
  font-family: Georgia,serif;
  font-size: 40px;
  line-height: 1.12;
  margin: 0 0 10px;
  letter-spacing: -1px;
  font-weight: 400;
}

.sa-description {
  font-size: 14px;
  color: #726e61;
  margin: 0 0 30px;
}

.sa-close {
  display: grid;
  place-items: center;
  padding: 0;
  position: absolute;
  right: 10px;
  top: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #d4d0c6;
  background: #f5f2eb;
  color: #34362b;
  cursor: pointer;
  z-index: 1;
}

.sa-prompt-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.sa-prompt-bar label {
  font-size: 9px;
  letter-spacing: 1.5px;
  font-weight: 600;
  color: #726e61;
}

.sa-copy {
  border: 0;
  background: #364738;
  color: #fff;
  border-radius: 4px;
  padding: 11px 13px;
  font-size: 12px;
  cursor: pointer;
  min-height: 44px;
}

.sa-copy span {
  padding-left: 10px;
}

.sa-copy:hover {
  background: #253427;
}

.sa-copy:disabled {
  opacity: .6;
}

.sa-prompt {
  display: block;
  resize: vertical;
  width: 100%;
  min-height: 230px;
  background: #eae7df;
  border: 1px solid #dcd7cb;
  border-radius: 4px;
  padding: 17px;
  font: 14px/1.7 ui-sans-serif,system-ui,sans-serif;
  color: #414339;
}

.sa-help {
  font-size: 11px;
  line-height: 1.5;
  color: #777469;
  margin: 12px 0 0;
}

.sa-status {
  font-size: 12px;
  min-height: 36px;
  color: #36533a;
  margin: 10px 0 0;
}

.sa-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #dbd7cd;
  padding-top: 12px;
  font-size: 11px;
  color: #777469;
}

.sa-navigation button {
  background: transparent;
  border: 0;
  color: #42493a;
  padding: 8px 0;
  min-height: 44px;
  cursor: pointer;
  font-size: 12px;
}

@media(max-width:700px) {
  .sa-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
  }

  .sa-label {
    padding: 12px;
  }

  .sa-label strong {
    font-size: 14px;
    line-height: 1.1;
    display: block;
    overflow-wrap: anywhere;
  }

  .sa-label small,.sa-plus {
    display: none;
  }

  .sa-intro {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 32px 24px;
  }

  .sa-guide {
    justify-self: start;
  }

  .sa-intro h1 {
    letter-spacing: -2px;
  }

  .sa-modal-layout {
    grid-template-columns: 1fr;
  }

  .sa-dialog {
    width: 92vw;
    max-height: 92dvh;
  }

  .sa-preview {
    height: 220px;
    min-height: 0;
    object-position: center;
  }

  .sa-details {
    padding: 25px 22px 18px;
  }

  .sa-details h2 {
    font-size: 34px;
  }

  .sa-description {
    margin-bottom: 22px;
  }

  .sa-prompt {
    min-height: 240px;
  }

  .sa-close {
    position: sticky;
    float: right;
    margin: 10px 10px -46px 0;
    top: 10px;
  }

}

@media(prefers-reduced-motion:reduce) {
  .sa-tile img {
    transition: none;
  }

  .sa-tile:hover img {
    transform: none;
  }

}

.sa-tile[hidden] {
  display: none;
}
.sa-browse {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 6vw;
  border-bottom: 1px solid #dbd7cd;
}
.sa-filter {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sa-filter label, .sa-count {
  font-size: 12px;
  color: #726e61;
  margin: 0;
}
.sa-filter select {
  max-width: 240px;
  min-height: 44px;
  padding: 8px 28px 8px 12px;
  border: 1px solid #c9c5b9;
  border-radius: 4px;
  background: #f5f2eb;
  color: #34362b;
  font-size: 13px;
}
@media (max-width: 700px) {
  .sa-browse { padding: 18px 24px; gap: 14px; }
  .sa-filter { width: 100%; justify-content: space-between; }
  .sa-filter label { max-width: 90px; }
  .sa-filter select { max-width: 210px; }
  .sa-count { width: 100%; }
}
.sa-open { display:block; width:100%; height:100%; border:0; padding:0; background:transparent; color:inherit; text-align:left; cursor:pointer; }
.sa-star { position:absolute; top:8px; right:8px; z-index:2; display:grid; place-items:center; width:38px; height:38px; border:1px solid #ffffff80; border-radius:50%; background:#17201988; color:white; cursor:pointer; backdrop-filter:blur(4px); }
.sa-star svg { fill:transparent; stroke:currentColor; stroke-width:1.6; }
.sa-star[aria-pressed="true"] { color:#ffd66b; background:#25251ddd; }
.sa-star[aria-pressed="true"] svg { fill:currentColor; }
.sa-favorites-filter { display:flex; gap:8px; align-items:center; font-size:13px; color:#42493a; cursor:pointer; min-height:44px; }
.sa-favorites-filter input { width:18px; height:18px; accent-color:#364738; }
.sa-empty { padding:64px 24px; margin:0; text-align:center; color:#726e61; }
.sa-empty[hidden] { display:none; }
.sa-favorite-status { margin:0; padding:0 6vw; font-size:12px; color:#526044; }
.sa-favorite-status:not(:empty) { padding-top:12px; }
.sa-modal-favorite { display:inline-block; min-height:40px; margin:0 0 16px; padding:8px 12px; border:1px solid #c9c5b9; border-radius:4px; background:transparent; color:#42493a; font-size:13px; cursor:pointer; }
.sa-modal-favorite[aria-pressed="true"] { background:#eee0b7; border-color:#d2b967; }
@media(max-width:700px) { .sa-star { top:5px; right:5px; width:34px; height:34px; } }


/* A quiet editorial frame for the collection. */
.style-atlas { width: min(1240px, calc(100% - 80px)); margin: 0 auto; padding-bottom: 0; }
.sa-masthead { display: flex; justify-content: space-between; align-items: center; padding: 32px 0 25px; border-bottom: 1px solid #d9d3c7; }
.sa-masthead a { color: #333d31; text-decoration: none; font-size: 11px; font-weight: 650; letter-spacing: 1.5px; }
.sa-masthead a span { margin-left: 7px; font-weight: 400; color: #807969; }
.sa-masthead > span { color: #807969; font-size: 9px; letter-spacing: 1.8px; }
.sa-intro { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 64px; align-items: center; padding: 58px 0 54px; }
.sa-eyebrow { color: #7a7264; font-size: 10px; font-weight: 600; letter-spacing: 1.8px; margin: 0 0 22px; }
.sa-eyebrow span { margin: 0 12px; color: #b9ae9d; }
.sa-intro h1 { font-family: Georgia, serif; font-size: clamp(44px, 5.2vw, 72px); font-weight: 400; letter-spacing: -2.8px; line-height: 1.08; margin: 0 0 25px; }
.sa-intro h1 em { color: #a65035; font-weight: 400; }
.sa-deck { max-width: 650px; font-size: 16px; line-height: 1.8; color: #6d685d; margin: 0; }
.sa-steps { list-style: none; margin: 28px 0 0; padding: 4px 0 4px 30px; border-left: 1px solid #d9d3c7; }
.sa-steps li { display: flex; gap: 16px; align-items: baseline; }
.sa-steps li + li { margin-top: 26px; }
.sa-steps li > span { color: #a65035; font-size: 10px; font-family: Georgia, serif; }
.sa-steps strong { font-size: 13px; font-weight: 550; color: #3e4437; }
.sa-steps p { font-size: 12px; line-height: 1.6; color: #807969; margin: 5px 0 0; }
.sa-browse { position: sticky; top: 0; z-index: 20; gap: 16px; padding: 16px 0; margin-bottom: 22px; border-top: 1px solid #d9d3c7; border-bottom: 1px solid #d9d3c7; background: #f5f2ebf5; backdrop-filter: blur(12px); }
.sa-filter { gap: 16px; }
.sa-filter label { font-size: 12px; color: #464b3d; }
.sa-filter select { background: #fcfaf5; border-color: #d7d1c5; }
.sa-favorites-filter { margin-left: auto; padding: 0 16px; border-left: 1px solid #d9d3c7; }
.sa-count { min-width: 118px; text-align: right; font-variant-numeric: tabular-nums; }
.sa-browse .sa-favorite-status { flex-basis: 100%; padding: 0; }
.sa-browse .sa-favorite-status:empty { display: none; }
.sa-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.sa-tile { border-radius: 4px; scroll-margin-top: 100px; }
.sa-label { padding: 16px; }
.sa-label strong { font-size: 15px; line-height: 1.3; }
.sa-label small { font-size: 9px; margin-bottom: 5px; }
.sa-plus { font-size: 18px; margin-left: 8px; }
.sa-open:focus-visible { outline-offset: -4px; }
.sa-kind { margin: 0 0 8px; color: #716b5e; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.sa-footer { padding: 58px 0 35px; margin-top: 40px; border-top: 1px solid #d9d3c7; text-align: center; }
.sa-footer > p { font-family: Georgia, serif; font-size: 25px; color: #545646; margin: 0 0 14px; }
.sa-footer > span { display: block; max-width: 620px; margin: 0 auto; font-size: 12px; line-height: 1.8; color: #807969; }
.sa-footer a { display: inline-block; margin-top: 22px; font-size: 11px; color: #6b705c; text-decoration: none; }
@media (max-width: 1100px) {
  .sa-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sa-intro { gap: 32px; grid-template-columns: minmax(0, 1fr) 255px; }
  .sa-steps { padding-left: 22px; }
}
@media (max-width: 800px) {
  .style-atlas { width: calc(100% - 48px); }
  .sa-intro { grid-template-columns: 1fr; gap: 28px; padding: 40px 0 32px; }
  .sa-steps { display: flex; gap: 24px; padding: 24px 0 0; margin: 0; border-left: 0; border-top: 1px solid #e0dace; }
  .sa-steps li { flex: 1; display: block; }
  .sa-steps li + li { margin-top: 0; }
  .sa-steps li > span { display: block; margin-bottom: 7px; }
  .sa-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .sa-masthead > span { display: none; }
  .sa-favorites-filter { margin-left: 0; padding: 0; border: 0; }
  .sa-filter { width: 100%; justify-content: space-between; }
  .sa-count { width: auto; margin-left: auto; }
  .sa-browse { gap: 6px 16px; padding: 12px 0; }
}
@media (max-width: 600px) {
  .style-atlas { width: calc(100% - 36px); }
  .sa-masthead { padding: 23px 0 20px; }
  .sa-intro h1 { font-size: clamp(38px, 10vw, 56px); letter-spacing: -1.7px; }
  .sa-eyebrow { font-size: 9px; letter-spacing: 1.3px; margin-bottom: 18px; }
  .sa-deck { font-size: 14px; line-height: 1.75; }
  .sa-steps { gap: 14px; }
  .sa-steps strong { font-size: 12px; }
  .sa-steps p { display: none; }
  .sa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sa-label { padding: 12px; }
  .sa-label strong { font-size: 13px; overflow-wrap: normal; }
  .sa-tile { scroll-margin-top: 140px; }
  .sa-footer { margin-top: 28px; padding: 35px 0; }
}

.sa-search { flex: 1; min-width: 190px; max-width: 300px; }
.sa-search label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sa-search input { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #d7d1c5; border-radius: 4px; background: #fcfaf5; color: #34362b; font: inherit; font-size: 13px; }
.sa-search input:focus-visible { outline: 2px solid #785b38; outline-offset: 3px; }
.sa-shuffle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid #d7d1c5; border-radius: 4px; background: #fcfaf5; color: #42493a; font-size: 13px; white-space: nowrap; cursor: pointer; }
.sa-shuffle:hover { background: #ebe5d9; border-color: #b6ac98; }
.sa-shuffle:focus-visible { outline: 2px solid #785b38; outline-offset: 3px; }
@media (max-width: 1100px) {
  .sa-browse { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "search category" "favorites shuffle" "count count"; gap: 16px; padding: 20px 0; }
  .sa-search { grid-area: search; min-width: 0; max-width: none; }
  .sa-search label { position: static; display: block; width: auto; height: auto; margin-bottom: 8px; overflow: visible; clip-path: none; font-size: 12px; color: #464b3d; }
  .sa-filter { grid-area: category; display: block; width: auto; }
  .sa-filter label { display: block; max-width: none; margin-bottom: 8px; }
  .sa-filter select { width: 100%; max-width: none; }
  .sa-favorites-filter { grid-area: favorites; margin: 0; padding: 0; border: 0; gap: 6px; }
  .sa-shuffle { grid-area: shuffle; justify-self: end; }
  .sa-count { grid-area: count; width: auto; margin: 0; padding-top: 16px; border-top: 1px solid #e0dace; text-align: left; }
  .sa-browse .sa-favorite-status { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .sa-browse { position: static; grid-template-areas: "search search" "category category" "favorites shuffle" "count count"; gap: 16px 10px; }
  .sa-search input, .sa-filter select { font-size: 16px; min-height: 48px; }
  .sa-shuffle { min-height: 48px; }
  .sa-tile { scroll-margin-top: 20px; }
}

/* Keep every tile searchable and accessible while skipping offscreen paint. */
.sa-tile { content-visibility: auto; contain-intrinsic-size: auto 240px; }
.style-atlas { line-height: 1.5; }
.style-atlas button, .style-atlas input, .style-atlas select { font-family: inherit; }

@media (max-width: 360px) {
  .sa-browse { grid-template-areas: "search search" "category category" "favorites favorites" "shuffle shuffle" "count count"; }
  .sa-shuffle { justify-self: stretch; }
}
