/* Likeness marketplace. Built on the theme's tokens in site.css: forest green, ink, Manrope,
   flat bands with fine lines, 6px controls and 4px choice rows. */
.lk-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Intro */
.market-intro {
  padding-block: 58px 46px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.market-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 72px;
  align-items: end;
}
.market-intro h1 {
  font-size: 46px;
  line-height: 1.12;
  max-width: 17ch;
  margin-bottom: 18px;
}
.market-lead {
  color: var(--muted);
  max-width: 60ch;
}
.market-preview {
  display: flex;
  gap: 12px;
  padding: 18px 20px;
  background: var(--rose);
  border-radius: var(--radius);
  color: #593d36;
}
.market-preview p {
  font-size: 14px;
  line-height: 1.65;
}
.market-preview svg {
  margin-top: 2px;
}

/* Filters and results */
.market-browse {
  padding-block: 40px 92px;
}
.market-browse-grid {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 52px;
  align-items: start;
}
.market-filters {
  position: sticky;
  top: 24px;
}
.market-filter-panel > summary {
  display: none;
}
.market-search {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}
.market-search-field {
  position: relative;
  display: block;
}
.market-search-field svg {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.market-search-field input {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px 11px 40px;
  border: 1px solid #c9d9d0;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
}
.market-search-field input::placeholder {
  color: #66726c;
}
.market-search-field input:focus-visible {
  outline-offset: 2px;
}
.market-facet {
  border: 0;
  padding: 0;
  margin: 28px 0 0;
  min-width: 0;
}
.market-facet legend {
  padding: 0;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}
.market-option {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 38px;
  padding: 7px 9px;
  margin-inline: -9px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}
.market-option:hover {
  background: var(--soft);
}
.market-option input {
  accent-color: var(--green);
  width: 17px;
  height: 17px;
  margin: 0;
  flex-shrink: 0;
}
.market-option input:focus-visible {
  outline-offset: 2px;
}
.option-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.market-filter-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 20px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.market-apply {
  border: 0;
}
.js .market-apply {
  display: none;
}
.market-clear {
  font-size: 14px;
  font-weight: 600;
}

.market-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.market-count {
  font-size: 16px;
  line-height: 1.5;
}
.market-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.market-sort {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: var(--muted);
}
.market-sort select {
  min-height: 42px;
  padding: 8px 34px 8px 11px;
  border: 1px solid #c9d9d0;
  border-radius: var(--radius);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23202725' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  appearance: none;
  cursor: pointer;
}
.market-shortlist-open,
.profile-shortlist-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid #c9d9d0;
  border-radius: var(--radius);
  background: var(--white);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.18s ease-out, border-color 0.18s ease-out;
}
.market-shortlist-open:hover,
.profile-shortlist-open:hover {
  background: var(--soft);
  border-color: #72998a;
}
.market-shortlist-open svg {
  width: 18px;
  height: 18px;
}
.shortlist-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: var(--green);
  color: var(--white);
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Profile tiles: a portrait and the facts that matter, no card chrome. */
.market-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.tile-media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--soft);
}
.tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.tile:hover .tile-media img {
  transform: scale(1.03);
}
.tile-initials {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 56px;
  font-weight: 600;
  color: var(--green);
}
.tile-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.94);
  color: #37443d;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.tile-save {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(32, 39, 37, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  transition: background 0.18s ease-out, color 0.18s ease-out;
}
.tile-save:hover {
  color: var(--green);
}
.tile-save:focus-visible {
  outline-offset: 2px;
}
.save-off,
[aria-pressed="true"] .save-on {
  display: inline-flex;
}
.save-on,
[aria-pressed="true"] .save-off {
  display: none;
}
.tile-save[aria-pressed="true"] {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.tile-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  padding-top: 16px;
}
.tile-name {
  font-size: 19px;
  line-height: 1.35;
}
.tile-name a {
  text-decoration: none;
}
.tile-name a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.tile:hover .tile-name a {
  color: var(--green);
  text-decoration: underline;
}
.tile-name a:focus-visible {
  outline: 0;
}
.tile-name a:focus-visible::after {
  outline: 3px solid #397466;
  outline-offset: 5px;
}
.tile-meta {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.tile-headline {
  font-size: 15px;
  line-height: 1.55;
}
.tile-best {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.tile-decision {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--green);
}
.tile-decision[data-decision="review"] {
  color: #755000;
}
.tile-decision svg {
  width: 16px;
  height: 16px;
}
.market-empty {
  padding: 46px 0;
}
.market-empty h3 {
  margin-bottom: 8px;
}
.market-empty p {
  color: var(--muted);
}
.market-empty.is-launch {
  padding-block: 64px;
  max-width: 640px;
}
.market-empty.is-launch h2 {
  font-size: 34px;
  margin-bottom: 14px;
}

/* Platform rules and the creator invitation */
.market-rules {
  padding-block: 76px;
  background: var(--soft);
}
.market-rules-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 76px;
}
.market-rules h2 {
  font-size: 34px;
  max-width: 17ch;
  margin-bottom: 18px;
}
.market-rules-grid > div > p {
  color: var(--muted);
  max-width: 50ch;
}
.market-rule-list {
  columns: 2;
  column-gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.market-rule-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  break-inside: avoid;
}
.market-rule-list svg {
  width: 16px;
  height: 16px;
  color: #9a382b;
}
.market-rules .market-rule-note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}
.market-close {
  padding-block: 66px;
  background: var(--rose);
}
.market-close-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 76px;
  align-items: center;
}
.market-close h2 {
  font-size: 34px;
  max-width: 20ch;
  color: #593d36;
  margin-bottom: 14px;
}
.market-close p {
  max-width: 54ch;
  color: #614c46;
}
.market-close-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 26px;
}
.market-close .text-link {
  color: #593d36;
}

/* Shortlist dialog */
.market-shortlist {
  width: min(540px, calc(100% - 32px));
  max-height: min(680px, calc(100% - 48px));
  padding: 0;
  border: 1px solid #c9d9d0;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}
.market-shortlist::backdrop {
  background: rgba(32, 46, 41, 0.45);
}
.market-shortlist[open] {
  animation: lk-dialog-in 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes lk-dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.shortlist-inner {
  padding: 26px 28px 28px;
}
.shortlist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}
.shortlist-head h2 {
  font-size: 26px;
  line-height: 1.3;
}
.shortlist-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: none;
}
.shortlist-note {
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--muted);
}
.shortlist-items {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.shortlist-items:empty {
  display: none;
}
.shortlist-items li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.shortlist-items img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--soft);
}
.shortlist-items a {
  font-weight: 600;
  text-decoration: none;
}
.shortlist-items a:hover {
  color: var(--green);
  text-decoration: underline;
}
.shortlist-items small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.shortlist-remove {
  margin-left: auto;
  min-height: 40px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.shortlist-remove:hover {
  color: var(--ink);
}
.shortlist-empty {
  padding: 4px 0 6px;
  font-size: 14px;
  color: var(--muted);
}
.shortlist-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
}
.shortlist-actions .button[aria-disabled="true"] {
  background: #9fb3aa;
  pointer-events: none;
}
.shortlist-clear {
  min-height: 40px;
  border: 0;
  background: none;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* Profile page */
.profile-crumbs {
  padding-top: 22px;
}
.profile-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
}
.profile-crumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: #8a968f;
}
.profile-hero {
  padding-block: 26px 76px;
}
.profile-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 72px;
  align-items: start;
}
.profile-portrait {
  margin: 0;
}
.profile-portrait img,
.profile-portrait .tile-initials {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--soft);
}
.profile-portrait figcaption {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.profile-intro h1 {
  font-size: 46px;
  line-height: 1.12;
  margin-bottom: 14px;
}
.profile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-bottom: 22px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.profile-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.profile-meta svg {
  width: 16px;
  height: 16px;
}
.profile-badge {
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--rose);
  color: #593d36;
  font-size: 12px;
  font-weight: 600;
}
.profile-badge.is-verified {
  background: var(--soft);
  color: var(--green);
}
.profile-headline {
  max-width: 26ch;
  margin-bottom: 26px;
  font-size: 23px;
  line-height: 1.4;
  font-weight: 600;
}
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
}
.profile-save {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 49px;
  padding: 12px 16px;
  border: 1px solid #c9d9d0;
  border-radius: var(--radius);
  background: var(--white);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.18s ease-out, border-color 0.18s ease-out;
}
.profile-save:hover {
  background: var(--soft);
}
.profile-save[aria-pressed="true"] {
  border-color: #72998a;
  background: var(--soft);
  color: var(--green);
}
.profile-shortlist-open {
  min-height: 49px;
}
.profile-request-note {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}
.profile-save-status {
  min-height: 22px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--green);
}
.profile-facts {
  margin: 20px 0 0;
  border-top: 1px solid var(--line);
}
.profile-facts div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.profile-facts dt {
  font-size: 14px;
  color: var(--muted);
}
.profile-facts dd {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.profile-facts dd svg {
  width: 16px;
  height: 16px;
  color: var(--green);
}
.profile-facts dd[data-decision="review"] svg {
  color: #755000;
}
.profile-check .permission-copy h2 {
  max-width: 18ch;
}
.permission-result[data-tone="allowed"] h3 {
  color: var(--green);
}
.profile-detail {
  padding-block: 76px;
}
.profile-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 52px;
}
.profile-detail h2,
.profile-about h2,
.profile-related h2 {
  margin-bottom: 16px;
  font-size: 26px;
  line-height: 1.3;
}
.profile-detail-grid p {
  font-size: 15px;
  color: var(--muted);
}
.profile-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.profile-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.profile-list svg {
  width: 16px;
  height: 16px;
  color: #9a382b;
}
.profile-detail-grid .profile-note {
  margin-top: 12px;
  font-size: 13px;
}
.profile-script blockquote {
  margin: 0;
}
.profile-script blockquote p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
}
.profile-about {
  padding-bottom: 76px;
}
.profile-about-inner {
  max-width: 720px;
}
.profile-prose p {
  margin-bottom: 14px;
  color: var(--muted);
}
.profile-related {
  padding-block: 76px 100px;
  border-top: 1px solid var(--line);
}
.profile-related-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.profile-related-head h2 {
  margin-bottom: 0;
}

@media (max-width: 1199px) {
  .market-browse-grid {
    grid-template-columns: 222px minmax(0, 1fr);
    gap: 38px;
  }
  .market-grid {
    gap: 36px 22px;
  }
  .market-intro-grid,
  .market-rules-grid,
  .market-close-grid,
  .profile-hero-grid {
    gap: 48px;
  }
  .profile-detail-grid {
    gap: 36px;
  }
}
@media (min-width: 900px) {
  .market-grid.is-related > li:nth-child(4) {
    display: none;
  }
}
@media (max-width: 899px) {
  /* 16px stops iOS Safari zooming the page when these are tapped. */
  .market-search-field input,
  .market-sort select {
    font-size: 16px;
  }
  .market-intro {
    padding-block: 40px 32px;
  }
  .market-intro-grid,
  .market-rules-grid,
  .market-close-grid,
  .profile-hero-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .market-intro h1,
  .profile-intro h1 {
    font-size: 40px;
  }
  .market-browse {
    padding-block: 28px 64px;
  }
  .market-browse-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .market-filters {
    position: static;
  }
  .market-filter-panel {
    border: 1px solid #c9d9d0;
    border-radius: var(--radius);
    background: var(--white);
  }
  .market-filter-panel > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 600;
    list-style: none;
  }
  .market-filter-panel > summary::-webkit-details-marker {
    display: none;
  }
  .market-filter-panel > summary svg:last-child {
    margin-left: auto;
    transition: transform 0.18s ease-out;
  }
  .market-filter-panel[open] > summary svg:last-child {
    transform: rotate(180deg);
  }
  .filter-active {
    color: var(--green);
  }
  .market-filter-body {
    padding: 6px 15px 20px;
    border-top: 1px solid var(--line);
  }
  .market-filter-body .market-search {
    margin-top: 14px;
  }
  .market-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .market-rules,
  .market-close,
  .profile-detail,
  .profile-related {
    padding-block: 60px;
  }
  .profile-portrait {
    max-width: 520px;
  }
  .profile-detail-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 599px) {
  .market-intro h1,
  .profile-intro h1 {
    font-size: 34px;
  }
  .market-toolbar {
    flex-wrap: wrap;
    gap: 12px;
  }
  .market-toolbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .market-sort {
    flex: 1 1 140px;
    min-width: 0;
  }
  .market-sort select {
    width: 100%;
    min-width: 0;
  }
  .market-sort > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .market-grid {
    gap: 30px 14px;
  }
  .tile-name {
    font-size: 16px;
  }
  .tile-headline,
  .tile-best {
    display: none;
  }
  .tile-decision {
    font-size: 12px;
  }
  .tile-save {
    width: 38px;
    height: 38px;
    right: 8px;
    top: 8px;
  }
  .tile-badge {
    left: 8px;
    top: 8px;
  }
  .market-rules,
  .market-close,
  .profile-detail,
  .profile-related {
    padding-block: 50px;
  }
  .market-rules h2,
  .market-close h2,
  .market-empty.is-launch h2 {
    font-size: 29px;
  }
  .market-rule-list {
    columns: 1;
  }
  .profile-headline {
    font-size: 20px;
  }
  .profile-facts div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .profile-related-head {
    flex-direction: column;
    gap: 4px;
  }
  .shortlist-inner {
    padding: 22px 20px 24px;
  }
}
@media (max-width: 359px) {
  .market-grid {
    grid-template-columns: 1fr;
  }
  .tile-headline {
    display: block;
  }
}
