@charset "UTF-8";

:root {
  font-family: "Noto Sans Thai", Tahoma, system-ui, sans-serif;
  color: #243e43;
  background: #fcfcfa;
  font-synthesis: none;
  line-height: 1.7;
  --ink: #243e43;
  --muted: #647174;
  --line: #dce2df;
  --accent: #214c56;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
}
button {
  font: inherit;
}
img {
  display: block;
  max-width: 100%;
}
img[hidden] {
  display: none;
}
h1,
h2,
p {
  margin: 0;
}
h1,
h2 {
  line-height: 1.4;
}
:focus-visible {
  outline: 3px solid #ba7542;
  outline-offset: 5px;
}
.skip-link {
  position: fixed;
  z-index: 5;
  top: -100px;
  left: 1rem;
  padding: 0.6rem 1rem;
  background: white;
}
.skip-link:focus {
  top: 1rem;
}
.site-header,
.site-footer {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem clamp(1.25rem, 5vw, 5rem);
}
.site-header {
  min-height: 88px;
  border-bottom: 1px solid var(--line);
}
.platform-brand {
  text-decoration: none;
  font-family: Georgia, serif;
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  line-height: 1;
}
.platform-brand span {
  display: block;
  font:
    0.625rem system-ui,
    sans-serif;
  letter-spacing: 0.44em;
  padding-top: 0.35rem;
}
.demo-label {
  color: var(--muted);
  font-size: 0.875rem;
  border-left: 1px solid var(--line);
  padding-left: 1.5rem;
}
.header-link {
  margin-left: auto;
  font-size: 0.9375rem;
  text-underline-offset: 5px;
}
.language-switcher {
  display: flex;
  align-items: center;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  line-height: 1;
}
.header-link + .language-switcher {
  margin-left: 0;
}
.language-switcher > a,
.language-switcher > span {
  display: inline-flex;
  align-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
}
.language-switcher > a {
  color: var(--muted);
}
.language-switcher > a:hover {
  color: var(--ink);
}
.language-switcher > [aria-current] {
  background: var(--accent);
  color: white;
}
/* Steps from creating a store to its first publication. */
.store-timeline ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}
.timeline-step {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 0 0.5rem;
}
/* Connector to the previous step, drawn behind the markers. */
.timeline-step + .timeline-step::before {
  content: "";
  position: absolute;
  top: 1rem;
  right: 50%;
  width: 100%;
  border-top: 2px solid var(--line);
}
.timeline-step[data-state="done"] + .timeline-step::before {
  border-top-color: var(--accent);
}
.timeline-marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-weight: 650;
}
.timeline-step[data-state="done"] .timeline-marker {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.timeline-step[data-state="current"] .timeline-marker {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent);
}
.timeline-text {
  display: grid;
  gap: 0.25rem;
}
.timeline-body {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}
.timeline-step[data-state="todo"] .timeline-title {
  color: var(--muted);
}
.timeline-action {
  font-size: 0.875rem;
  font-weight: 600;
}
@media (max-width: 760px) {
  .store-timeline ol {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .timeline-step {
    grid-template-columns: 2rem 1fr;
    justify-items: start;
    text-align: start;
    gap: 0.75rem;
    padding: 0;
  }
  .timeline-step + .timeline-step::before {
    top: auto;
    bottom: calc(100% - 0.1rem);
    right: auto;
    left: calc(1rem - 1px);
    width: 0;
    height: 1.1rem;
    border-top: 0;
    border-left: 2px solid var(--line);
  }
  .timeline-step[data-state="done"] + .timeline-step::before {
    border-left-color: var(--accent);
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.eyebrow {
  font-size: 0.875rem;
  color: var(--muted);
  letter-spacing: 0.07em;
}
.entrance {
  padding: 0 clamp(1.25rem, 5vw, 5rem);
}
.welcome {
  text-align: center;
  max-width: 960px;
  margin: auto;
  padding: 4.25rem 0 3.25rem;
}
.store-logo {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.75rem, 6.9vw, 6rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  margin: 0.6rem 0 0.9rem;
  line-height: 1.1;
}
.welcome-description {
  color: var(--muted);
  font-size: 1.0625rem;
  text-wrap: balance;
}
.mode-choices {
  display: flex;
  justify-content: center;
  gap: 0.875rem;
  margin-top: 2.25rem;
}
.button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.75rem;
  min-height: 56px;
  border: 1px solid var(--accent);
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
  border-radius: 3px;
  transition: background-color 150ms ease;
}
.mode-choices .button {
  width: 258px;
}
.button span {
  display: block;
  font-weight: 400;
  font-size: 0.875rem;
  margin-top: 0.15rem;
}
.button-primary {
  color: #fff;
  background: var(--accent);
}
.button-primary:hover {
  background: #173b44;
}
.button-secondary {
  background: transparent;
}
.button-secondary:hover {
  background: #eef3f0;
}
.gallery-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: clamp(1.25rem, 5vw, 5rem);
  max-width: 1060px;
  margin: 0 auto 4rem;
  padding: 2.5rem clamp(1rem, 4vw, 4rem);
  background: #f0f3ef;
}
.preview-artwork {
  display: block;
  padding: 0.45rem;
  background: #fcfcfa;
  border: 1px solid #d4d4cc;
  box-shadow: 5px 9px 15px #233b3b15;
}
.preview-artwork:first-child {
  transform: rotate(-3deg);
}
.preview-artwork:last-child {
  transform: rotate(3deg);
}
.preview-artwork img {
  width: 100%;
  height: auto;
}
.store-info {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 2rem;
  max-width: 1060px;
  margin: 0 auto 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: 2rem;
}
.store-info h2 {
  font-family: Georgia, serif;
  font-size: 1.75rem;
  font-weight: 400;
  margin-top: 0.4rem;
}
.store-details {
  margin: 0;
  display: grid;
  align-content: start;
  gap: 1rem;
}
.store-details dt {
  color: var(--muted);
  font-size: 0.9375rem;
}
.store-details dd {
  margin: 0.25rem 0 0;
  overflow-wrap: anywhere;
}
.store-details a {
  display: inline-block;
  padding-block: 0.35rem;
  text-decoration: underline;
}
.subtle {
  color: var(--muted);
  font-size: 0.9375rem;
}
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  justify-content: space-between;
  font-size: 0.875rem;
}
body:has(.account-page) {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
.account-page {
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(2rem, 8vh, 6rem) 1.25rem;
}
.account-page {
  background: #f6f5f0;
}
.account-panel {
  display: grid;
  grid-template-columns: 0.92fr 1fr;
  width: min(100%, 52rem);
  min-width: 0;
  overflow: hidden;
  border: 1px solid #ddd9ce;
  border-radius: 6px;
  background: #fffefb;
  box-shadow: 0 16px 44px -32px #433c34;
}
.account-art {
  display: grid;
  place-items: center;
  min-height: 21rem;
  background: linear-gradient(120deg, #ebe4d6, #dcd3c2);
}
.account-art img {
  width: 9.75rem;
  height: auto;
  padding: 0.55rem;
  border: 3px solid #655545;
  background: #fffaf1;
  box-shadow: 4px 8px 12px #51443233;
}
.account-form {
  display: grid;
  align-content: center;
  gap: 1.75rem;
  padding: clamp(1.6rem, 4vw, 3.25rem);
  min-width: 0;
  overflow-wrap: anywhere;
}
.account-form h1 {
  font:
    500 clamp(2rem, 3.3vw, 3rem) / 1.3 Georgia,
    "Noto Serif Thai",
    serif;
}
.account-panel .button {
  width: 100%;
  min-height: 50px;
  padding: 0.65rem 1rem;
  font-size: 1rem;
  cursor: pointer;
}
@media (max-width: 620px) {
  .account-panel {
    grid-template-columns: 1fr;
    max-width: 26rem;
  }
  .account-art {
    min-height: 10.5rem;
  }
  .account-art img {
    width: 5.75rem;
    padding: 0.3rem;
  }
  .account-form {
    gap: 1.2rem;
  }
}
.content-page {
  max-width: 1440px;
  margin: auto;
  min-height: calc(100dvh - 157px);
  padding: 1.75rem clamp(1.25rem, 5vw, 5rem) 4.5rem;
}
.breadcrumb {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--muted);
}
.breadcrumb a {
  text-underline-offset: 4px;
}
.page-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 3rem 0 2.5rem;
}
.page-intro h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 500;
  margin-top: 0.4rem;
}
.artwork-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
}
.artwork-link {
  display: block;
  text-decoration: none;
}
.artwork-frame {
  aspect-ratio: 4 / 5;
  background: #f0f3ef;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  display: grid;
  place-items: center;
}
.artwork-frame img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  box-shadow: 4px 6px 12px #233b3b14;
}
.artwork-link:hover .artwork-frame {
  background: #e7eee8;
}
.artwork-caption {
  padding: 1.25rem 0;
}
.artwork-caption h2 {
  font-size: 1.25rem;
  font-weight: 500;
}
.artwork-caption p {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.4rem;
}
.artwork-caption .price {
  font-size: 1rem;
  color: var(--ink);
  margin-top: 0.8rem;
}
.artwork-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 6vw, 6rem);
  margin-top: 2rem;
  align-items: start;
}
.detail-image-area {
  min-width: 0;
}
.image-button {
  cursor: zoom-in;
  background: #f0f3ef;
  width: 100%;
  border: 0;
  padding: clamp(1.5rem, 4vw, 3rem);
  display: grid;
  place-items: center;
}
.image-button img {
  width: auto;
  max-height: 62dvh;
  object-fit: contain;
  height: auto;
  box-shadow: 4px 6px 15px #233b3b14;
}
.image-hint {
  color: var(--muted);
  text-align: center;
  font-size: 0.875rem;
  margin-top: 0.75rem;
}
.detail-copy {
  padding-top: 1rem;
}
.detail-copy h1 {
  font-size: clamp(1.875rem, 3vw, 2.5rem);
  font-weight: 500;
  margin-top: 0.5rem;
}
.artist-name {
  color: var(--muted);
  margin-top: 0.5rem;
}
.detail-price {
  font-size: 1.5rem;
  margin-top: 1.75rem;
}
.artwork-facts {
  margin: 1.75rem 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.artwork-facts div {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.5rem;
  padding: 0.3rem 0;
}
.artwork-facts dt {
  color: var(--muted);
}
.artwork-facts dd {
  margin: 0;
}
.artwork-story h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.artwork-story p {
  color: var(--muted);
}
.detail-copy > .subtle {
  margin: 1.5rem 0;
}
.text-link {
  text-underline-offset: 6px;
}
/* A store's 2D pages put the 3D walk-through at the top, centred. */
.visit-3d {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}
.empty-state {
  text-align: center;
  padding: 5rem 1rem;
  max-width: 760px;
  margin: auto;
}
.empty-state h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 500;
}
.empty-state p {
  color: var(--muted);
  margin: 1rem 0 2rem;
}
.empty-state .eyebrow {
  margin-bottom: 1rem;
}
.visit-state {
  padding-top: 6rem;
}
dialog {
  border: 0;
  border-radius: 4px;
  padding: 1.25rem;
  max-width: calc(100vw - 2rem);
  max-height: calc(100dvh - 2rem);
  width: min(960px, calc(100vw - 2rem));
  color: var(--ink);
  background: #fcfcfa;
}
dialog::backdrop {
  background: #15252ee0;
}
.image-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.image-dialog-header h2 {
  font-size: 1rem;
  font-weight: 500;
}
.close-button {
  padding: 0.5rem 1rem;
  min-height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.full-image {
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 10rem);
  object-fit: contain;
}

@media (max-width: 760px) {
  .site-header {
    min-height: 76px;
    gap: 0.75rem;
  }
  .demo-label {
    padding-left: 0.75rem;
  }
  .header-link {
    font-size: 0.875rem;
  }
  .welcome {
    padding-top: 3.25rem;
  }
  .store-logo {
    font-size: clamp(2.5rem, 11vw, 4rem);
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
  }
  .welcome-description {
    font-size: 1rem;
  }
  .mode-choices {
    gap: 0.75rem;
  }
  .mode-choices .button {
    padding: 0.9rem 0.6rem;
    font-size: 1rem;
    width: 50%;
  }
  .mode-choices .button span {
    font-size: 0.875rem;
  }
  .gallery-preview {
    gap: 1rem;
    padding: 1.5rem 1rem;
    margin-bottom: 2.5rem;
  }
  .preview-artwork {
    padding: 0.2rem;
  }
  .store-info {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2.5rem;
  }
  .artwork-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
  .artwork-frame {
    padding: 1rem;
  }
  .artwork-caption h2 {
    font-size: 1.0625rem;
  }
  .page-intro {
    align-items: start;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 2rem;
  }
  .artwork-detail {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .detail-copy {
    padding-top: 0;
  }
  .image-button img {
    max-height: 58dvh;
  }
}

@media (max-width: 420px) {
  .mode-choices {
    flex-direction: column;
  }
  .mode-choices .button {
    width: 100%;
  }
  .artwork-grid {
    grid-template-columns: 1fr;
  }
  .artwork-frame {
    padding: 2rem;
  }
  .site-footer {
    align-items: start;
    gap: 0.75rem;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none;
    scroll-behavior: auto;
  }
}

.merchant {
  max-width: 70rem;
  min-height: 65vh;
  margin: auto;
  padding: 2rem clamp(1rem, 5vw, 4rem) 5rem;
}
.merchant h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
  margin: 1rem 0;
}
.merchant-nav {
  display: flex;
  align-items: start;
  gap: 1rem;
  justify-content: space-between;
}
.merchant summary {
  cursor: pointer;
}
.merchant section,
.merchant article,
.merchant-tile {
  background: white;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: clamp(1rem, 3vw, 2rem);
  margin-bottom: 1rem;
}
.merchant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.merchant form,
.merchant label {
  display: grid;
  gap: 0.5rem;
}
.merchant form {
  max-width: 34rem;
  gap: 1rem;
}
.merchant :is(input, select, textarea) {
  font: inherit;
  padding: 0.5rem;
  border: 1px solid var(--muted);
  border-radius: 0.4rem;
  width: 100%;
}
.merchant .button {
  justify-self: start;
  margin-top: 0.75rem;
}
.merchant-tile {
  font-weight: 650;
  text-decoration: none;
}
.gallery-swatch {
  height: 5rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #eceae5 55%, #dcd6ca 55%);
}
.swatch-1 {
  background: linear-gradient(135deg, #30353c 55%, #151c25 55%);
}
.swatch-2 {
  background: linear-gradient(135deg, #ccbba7 55%, #a18569 55%);
}

.package-review {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
.package-review :is(td, th) {
  padding: 0.5rem;
  text-align: start;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

/* ---- /idea: platform home prototype (not a confirmed design) ---- */
.idea-banner {
  background: #f3ead9;
  color: #6b4a1f;
  text-align: center;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}
.idea {
  --panel-radius: 1.25rem;
  --frame-radius: 0.65rem;
  overflow-wrap: anywhere;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 5rem) 3rem;
}
.idea-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 4rem) 0;
}
.idea-hero h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0.5rem 0 1rem;
}
.idea-lead {
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 1.75rem;
}
.idea-tabs {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 0.6rem;
}
.idea-tabs a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
.idea-tabs a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  border-color: var(--accent);
}
.idea-search {
  display: flex;
  max-width: 34rem;
  background: white;
  border: 1px solid #b9c3c0;
  border-radius: var(--frame-radius);
  overflow: hidden;
}
.idea-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0.8rem 1rem;
  font: inherit;
}
.idea-search button {
  border: 0;
  background: var(--accent);
  color: white;
  padding: 0 1.4rem;
  cursor: pointer;
}
.idea-feature {
  border-radius: var(--panel-radius);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 2rem);
  background: linear-gradient(135deg, #dfe7e3, #c9d6d1 55%, #b7c7c1);
  text-decoration: none;
}
.idea-feature img {
  border-radius: var(--frame-radius);
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: clamp(12rem, 22vw, 20rem);
  object-fit: contain;
  border: 6px solid #3a3226;
  box-shadow: 4px 6px 14px rgb(30 40 40 / 24%);
}
.idea-feature span {
  text-align: center;
  border-radius: 999px;
  background: #fcfcfa;
  padding: 0.35rem 0.9rem;
  font-size: 0.875rem;
}
.idea-section {
  padding: 2.25rem 0;
  border-top: 1px solid var(--line);
}
.idea-section-head {
  flex-wrap: wrap;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.idea-section h2,
.idea-owner h2 {
  font-size: 1.6rem;
}
.idea-meta {
  color: var(--muted);
  font-size: 0.9rem;
}
.idea-stores {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1.5rem;
}
.idea-store {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--panel-radius);
  border: 1px solid var(--line);
  background: white;
}
/* Owner-only shortcut to the store dashboard, top-right of the card. */
.idea-store-edit,
.edit-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.15);
}
.idea-store-edit:hover,
.idea-store-edit:focus-visible,
.edit-badge:hover,
.edit-badge:focus-visible {
  background: var(--ink);
  color: white;
}
.idea-store-edit svg,
.edit-badge svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.idea-store-cover {
  border-radius: var(--panel-radius) var(--panel-radius) 0 0;
  --facade: #ddd5c6;
  --trim: #574a39;
  --wall: #dfd2bc;
  --light: #fff9e9;
  background: var(--facade);
  color: var(--trim);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.65rem;
  padding: 1rem clamp(0.85rem, 4%, 1.25rem) 1.1rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.idea-store-cover[data-gallery="midnight-atelier"] {
  --facade: #262d34;
  --trim: #c8ba9d;
  --wall: #35383d;
  --light: #82786b;
}
.idea-store-sign {
  text-align: center;
  font:
    1.05rem Georgia,
    serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.idea-store-window {
  display: flex;
  justify-content: center;
  align-items: center;
  height: clamp(215px, 23vw, 275px);
  padding: 18px;
  border: 1px solid var(--trim);
  border-radius: var(--frame-radius);
  background: radial-gradient(ellipse at top, var(--light), var(--wall) 85%);
}
.idea-store-window img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 7px;
  border: 2px solid #504537;
  border-radius: 0.45rem;
  background: #faf7ee;
  box-shadow: 1px 3px 5px #0003;
}
/* The store's logo (DEC-120) stands on the wall without a picture frame. */
.idea-store-window img.idea-store-logo {
  width: 72%;
  height: 72%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  filter: drop-shadow(0 6px 14px rgb(36 62 67 / 0.22));
}
.idea-store-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.1rem 1.25rem 1.35rem;
}
.idea-store-body h3 {
  margin: 0;
  font-size: 1.25rem;
}
.idea-store-body h3 a {
  text-decoration: none;
}
.idea-store-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.6rem;
}
.idea-store-body .idea-store-actions {
  margin-top: auto;
  padding-top: 0.6rem;
}
.idea-store-actions .button {
  min-height: 44px;
  border-radius: var(--frame-radius);
  padding: 0.55rem 1.1rem;
}
/* Four columns (two on narrow screens) so 8 home and 24 browse artworks fill whole rows. */
.idea-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem 1.5rem;
}
@media (max-width: 900px) {
  .idea-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1rem;
  }
}
/* Cards that may carry an edit badge in their corner. */
.idea-art,
.public-work-item {
  position: relative;
}
/* On the artwork page the badge sits beside the title, not over the image. */
.public-artwork-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}
.public-artwork-title .edit-badge {
  position: static;
  flex: none;
}
.idea-art-link {
  display: block;
  text-decoration: none;
}
.idea-mat {
  border-radius: var(--panel-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 230px;
  background: #efece5;
}
.idea-art:nth-child(3n + 2) .idea-mat {
  background: #e3eae7;
}
.idea-art:nth-child(3n) .idea-mat {
  background: #ebe8ea;
}
.idea-mat img {
  width: 78%;
  height: 82%;
  min-height: 0;
  object-fit: contain;
  filter: drop-shadow(3px 5px 8px rgb(30 40 40 / 18%));
}
.idea-art strong {
  display: block;
  font-size: 1.1rem;
  margin-top: 0.6rem;
}
.idea-price {
  font-weight: 600;
}
.idea-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.idea-chips li {
  border: 1px solid #b9c3c0;
  border-radius: 999px;
  padding: 0.35rem 1rem;
  color: var(--muted);
}
.idea-empty {
  color: var(--muted);
}
.idea-owner {
  border-radius: var(--panel-radius);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  margin: 2rem 0;
  padding: clamp(1.75rem, 4vw, 3rem);
  background: #e7eeeb;
}
.idea-owner > div {
  display: grid;
  gap: 0.75rem;
}
.idea-steps {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding-left: 1.4rem;
}
.idea-steps li strong {
  display: block;
}
.idea-steps li span {
  color: var(--muted);
  font-size: 0.925rem;
}
.idea-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}
@media (max-width: 820px) {
  .idea-hero,
  .idea-owner {
    grid-template-columns: minmax(0, 1fr);
  }
}
.idea-search-head {
  display: grid;
  gap: 0.6rem;
  padding: clamp(1.5rem, 4vw, 2.5rem) 0 1.5rem;
}
.idea-search-title {
  font-size: 1.6rem;
  font-weight: 600;
}
.idea-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin-top: 2.5rem;
}
.idea-page {
  min-width: 2.5rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
}
a.idea-page:hover {
  border-color: var(--accent);
}
.idea-page[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  font-weight: 700;
}
.idea-page-off {
  color: #a3acab;
}
.idea-pager-gap {
  border-color: transparent;
}

/* ---- Shared error reporting (errors.ts) ---- */
.error-state .button {
  margin-top: 0.5rem;
}
.error-reference {
  color: var(--muted);
  font-size: 0.875rem;
}
.error-reference code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.05em;
}
.form-notice,
.form-alert {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
}
.form-notice {
  border: 1px solid #a9cdb8;
  border-left: 4px solid #2f7a52;
  background: #edf7f1;
  color: #1f5a3b;
}
.form-alert {
  border: 1px solid #e0b4a8;
  border-left: 4px solid #a8432c;
  background: #fbefeb;
  color: #7a2e1d;
}

/* ---- Store owner terms on the create-store page (DEC-144/145) ---- */
.merchant .store-terms {
  display: grid;
  gap: 0.6rem;
  margin: 1.25rem 0;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f6;
}
.store-terms h2 {
  font-size: 1.2rem;
}
.store-terms h3 {
  margin: 0.4rem 0 0;
  font-size: 1rem;
}
.store-terms-rules {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.store-terms-code {
  display: inline-block;
  min-width: 3.2rem;
}
.merchant .store-terms-accept {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-top: 0.6rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-weight: 600;
}
.merchant .store-terms-accept input {
  margin-top: 0.35rem;
  width: auto;
}

/* Radio and checkbox rows: control beside its label, not stretched full width. */
.merchant fieldset {
  display: grid;
  gap: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1.1rem 1.1rem;
}
.merchant fieldset label {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: baseline;
}
.merchant :is(input[type="radio"], input[type="checkbox"]) {
  width: auto;
  padding: 0;
}

/* ---- Store and package status (DEC-142), payment confirmation ---- */
.store-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.5rem;
  margin: 0 0 0.75rem;
}
.store-statuses dt {
  color: var(--muted);
  font-size: 0.875rem;
}
.store-statuses dd {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}
.next-step {
  padding: 0.6rem 0.9rem;
  border-left: 3px solid var(--accent);
  background: #f1f5f4;
}
.merchant .payment-row {
  display: grid;
  grid-template-columns: 1fr minmax(16rem, 22rem);
  gap: 1.5rem;
  align-items: end;
}
.payment-row h2 {
  font-size: 1.2rem;
}
@media (max-width: 720px) {
  .merchant .payment-row {
    grid-template-columns: 1fr;
  }
}
/* DEC-154: PromptPay QR and transfer slips. */
.payment-promptpay {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem 2rem;
  align-items: start;
  margin-top: 1rem;
}
.payment-qr {
  margin: 0;
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  text-align: center;
}
.promptpay-qr {
  width: 14rem;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.payment-qr figcaption {
  display: grid;
  gap: 0.15rem;
  color: var(--muted);
}
.payment-amount {
  color: var(--ink);
  font-size: 1.5rem;
}
.payment-steps {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.4rem;
}
.payment-slip-form {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}
.payment-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 1rem;
}
.payment-status p {
  margin: 0.35rem 0 0;
}
.payment-slip {
  margin-top: 0.75rem;
}
.payment-slip-thumb {
  display: block;
  max-width: 12rem;
  max-height: 16rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.payment-reject {
  margin-top: 0.75rem;
}
@media (max-width: 720px) {
  .payment-promptpay {
    grid-template-columns: 1fr;
  }
}
button[disabled] {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ---- Store review (DEC-118) ---- */
.merchant .review-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.review-row h2 {
  font-size: 1.2rem;
}
.review-snapshot {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.75rem 1.5rem;
  margin: 1rem 0;
}
.review-snapshot dt {
  color: var(--muted);
  font-size: 0.875rem;
}
.review-snapshot dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.merchant .review-reject {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.review-rejection p {
  margin: 0.4rem 0 0;
  white-space: pre-line;
}

/* ---- DEC-146: delete an unpaid store ---- */
.merchant .danger-zone {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid #e0b4a8;
  border-radius: 8px;
}
.danger-zone summary {
  cursor: pointer;
  color: #7a2e1d;
  font-weight: 600;
}
.danger-zone form {
  margin-top: 0.75rem;
}

/* ---- DEC-147: sample stores ---- */
.sample-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.sample-card {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.sample-card h2 {
  font-size: 1.4rem;
}
.sample-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}
.sample-card .sample-facts {
  display: grid;
}

.artwork-selected-preview {
  max-width: 100%;
  max-height: 20rem;
  object-fit: contain;
  justify-self: start;
}
.draft-artwork-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: 1.5rem;
  list-style: none;
  padding: 0;
}
.draft-artwork-grid img {
  display: block;
  width: 100%;
  height: 12rem;
  object-fit: contain;
  background: #f5f5f2;
  margin-bottom: 0.5rem;
}

/* ---- Store dashboard overview: status pills, readiness, charts ---- */
.store-summary .store-statuses {
  gap: 1rem 2.5rem;
  margin-bottom: 1rem;
}
.store-summary .store-url {
  font-size: 1rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.1rem 0.75rem;
  border-radius: 999px;
  font-size: 1rem;
  border: 1px solid var(--line);
  background: #f4f6f5;
}
a.status-pill {
  color: inherit;
  text-decoration: none;
}
a.status-pill:hover,
a.status-pill:focus-visible {
  border-color: currentColor;
  text-decoration: underline;
}
.status-pill::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--muted);
}
.status-published::before,
.status-paid::before {
  background: #0aac23;
}
.status-pending::before {
  background: #fbb315;
}
.status-unpaid::before {
  background: #f18a59;
}
.status-due::before {
  background: #fbb315;
}
.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 48rem) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
}
.merchant .overview-card {
  display: grid;
  align-content: start;
  gap: 1rem;
  margin: 0;
}
.overview-figure {
  margin: 0;
  color: var(--muted);
}
.overview-figure strong {
  color: var(--ink);
  font-size: 2rem;
  margin-right: 0.25rem;
}
.overview-card h2,
.readiness h2 {
  font-size: 1.1rem;
}
.donut-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}
.donut {
  margin: 0;
  width: 9rem;
  flex: none;
}
.donut svg {
  display: block;
  width: 100%;
}
.donut-value {
  font-size: 22px;
  font-weight: 700;
  fill: var(--ink);
}
.chart-legend,
.quota-head {
  font-variant-numeric: tabular-nums;
}
.chart-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  flex: 1;
  min-width: 11rem;
}
.chart-legend li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
}
.chart-legend-inline {
  font-size: 0.875rem;
  color: var(--muted);
}
.swatch {
  width: 0.75rem;
  height: 0.75rem;
}
.quota {
  display: grid;
  gap: 0.35rem;
}
.quota-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.meter {
  display: block;
  width: 100%;
  height: 8px;
}
.quota-warn .subtle {
  color: #8a5a00;
  font-weight: 600;
}
.merchant .readiness {
  display: grid;
  gap: 0.75rem;
}
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}
.checklist li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
}
.checklist li:last-child {
  border-bottom: 0;
}
.checklist small {
  color: var(--muted);
}
.checklist .is-done span:not(.check) {
  color: var(--muted);
}
.check {
  display: grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  border: 2px solid var(--line);
  font-size: 0.8rem;
  font-weight: 700;
}
.check-done {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

/* ---- Admin overview: work-queue tiles and charts ---- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.merchant .kpi {
  display: grid;
  gap: 0.15rem;
  padding: 1rem 1.25rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 1rem;
  text-decoration: none;
}
.merchant .kpi span,
.merchant .kpi small {
  color: var(--muted);
}
.merchant .kpi strong {
  font-size: 2.25rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
a.kpi:hover {
  border-color: var(--accent);
}
.merchant .kpi-attention {
  border-color: #fbb315;
  border-left-width: 4px;
}
.merchant .kpi-attention small {
  color: #8a5a00;
  font-weight: 600;
}
.overview-wide {
  grid-column: 1 / -1;
}
.overview-card h3 {
  font-size: 1rem;
  margin: 0;
}
.merchant .chart-legend small {
  color: var(--muted);
  font-weight: 400;
}
.columns {
  display: block;
  width: 100%;
  max-height: 16rem;
}
.col-value {
  font-size: 11px;
  font-weight: 700;
  fill: var(--ink);
}
.col-label {
  font-size: 10px;
  fill: var(--muted);
}
.hbars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.hbars li {
  display: grid;
  grid-template-columns: 5.5rem 1fr 2.5rem;
  align-items: center;
  gap: 0.75rem;
}
.hbars svg {
  display: block;
  width: 100%;
  height: 8px;
}
.merchant .hbars strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---- Artist profiles (store dashboard) ---- */
.artist-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 2rem;
  align-items: start;
}
.artist-form fieldset,
.artwork-form fieldset {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0.75rem 1rem 1rem;
  border: 1px solid #dde3e3;
  border-radius: 0.5rem;
}
.artist-form legend,
.artwork-form legend {
  font-weight: 600;
  padding: 0 0.35rem;
}
.artist-form textarea,
.artwork-form textarea {
  width: 100%;
  resize: vertical;
}
.artist-portrait-preview {
  width: 8rem;
  height: 8rem;
  object-fit: cover;
  border-radius: 50%;
  background: #f5f5f2;
}
.inline-check {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.artist-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}
.artist-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.9rem;
  border: 1px solid #dde3e3;
  border-radius: 0.6rem;
  background: #fff;
}
.artist-card > img,
.artist-initial {
  flex: none;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  background: #eef1f0;
}
.artist-initial {
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 600;
  color: #36636c;
}
.artist-card p {
  margin: 0.3rem 0 0;
}
.artist-name {
  display: block;
  font-weight: 600;
  font-size: 1.05rem;
}

/* ---- Edit 3D gallery page ---- */
.merchant .gallery-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: center;
}
.gallery-hero-body {
  display: grid;
  gap: 0.75rem;
}
.gallery-hero h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}
/* A <progress> element: the CSP (style-src 'self') drops inline widths. */
.gallery-progress {
  appearance: none;
  display: block;
  width: 100%;
  height: 0.6rem;
  border: 0;
  border-radius: 999px;
  background: #eef1f0;
  color: var(--accent);
  overflow: hidden;
}
.gallery-progress::-webkit-progress-bar {
  background: #eef1f0;
  border-radius: 999px;
}
.gallery-progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 999px;
}
.gallery-progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 999px;
}
.gallery-progress-text {
  font-weight: 600;
}
.gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.merchant .gallery-actions .button {
  margin-top: 0;
}
.gallery-device {
  font-size: 0.875rem;
}
@media (max-width: 720px) {
  .merchant .gallery-hero {
    grid-template-columns: 1fr;
  }
}

.gallery-notes {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  gap: 0.5rem;
}
.gallery-note {
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  background: #f3f6f5;
  border-inline-start: 0.3rem solid var(--muted);
}
.gallery-note-warn {
  background: #fff1ed;
  color: #892f22;
  border-color: #c0392b;
}

.merchant .gallery-template-form {
  max-width: none;
  margin-top: 1rem;
}
.merchant .template-picker {
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
}
.merchant .template-picker .template-option {
  display: grid;
  align-items: start;
  position: relative;
  gap: 0.4rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}
.merchant .template-option:hover {
  border-color: var(--muted);
}
.template-option:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}
.template-option:has(input:focus-visible) {
  outline: 3px solid #ba7542;
  outline-offset: 3px;
}
.merchant .template-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.template-name {
  font-weight: 650;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.template-name .status-pill {
  font-size: 0.8rem;
  font-weight: 500;
}
.merchant .inline-check {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.merchant .inline-check input {
  width: auto;
}

/* ---- My stores ---- */
.stores-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.merchant .stores-head .button {
  margin-top: 0;
}
.store-cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: 1.25rem;
}
.store-card {
  display: grid;
  grid-template-rows: auto 1fr;
  background: white;
  border: 1px solid var(--line);
  border-radius: 1rem;
  overflow: hidden;
  transition:
    box-shadow 150ms ease,
    transform 150ms ease;
}
.store-card:hover {
  box-shadow: 0 0.6rem 1.5rem #243e4314;
  transform: translateY(-2px);
}
/* Blank "add a store" card: dashed outline, a plus, and a tooltip on hover/focus. */
.store-card-new {
  position: relative;
  overflow: visible;
  grid-template-rows: 1fr;
  min-height: 16rem;
  background: transparent;
  border: 2px dashed var(--line);
}
.store-card-new-link {
  display: grid;
  place-items: center;
  border-radius: inherit;
  color: var(--muted);
  text-decoration: none;
}
.store-card-new:hover,
.store-card-new:focus-within {
  border-color: var(--accent);
  background: white;
}
.store-card-new-link:hover,
.store-card-new-link:focus-visible {
  color: var(--accent);
}
.store-card-plus {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  border: 2px solid currentColor;
}
.store-card-plus svg {
  width: 2rem;
  height: 2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.store-card-tip {
  position: absolute;
  left: 50%;
  top: calc(50% + 2.75rem);
  transform: translateX(-50%);
  padding: 0.35rem 0.7rem;
  border-radius: 0.4rem;
  background: var(--ink);
  color: white;
  font-size: 0.875rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease;
}
.store-card-new-link:hover .store-card-tip,
.store-card-new-link:focus-visible .store-card-tip {
  opacity: 1;
}
@media (hover: none) {
  /* Touch screens have no hover, so the label stays visible. */
  .store-card-tip {
    opacity: 1;
  }
}
.store-card-art .template-photo {
  border-radius: 0;
  aspect-ratio: 16 / 8;
}
.store-card-logo {
  position: relative;
  display: block;
  aspect-ratio: 16 / 8;
  background: var(--line);
}
.store-card-logo img {
  position: absolute;
  inset: 12.5% 20%;
  width: 60%;
  height: 75%;
  object-fit: contain;
}
.store-card-body {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  padding: 1.1rem 1.25rem 1.25rem;
}
.store-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.store-card-pills .status-pill {
  font-size: 0.8rem;
}
.store-card h2 {
  font-size: 1.35rem;
}
.store-card h2 a {
  text-decoration: none;
}
.store-card h2 a:hover {
  text-decoration: underline;
}
.store-card-url {
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}
.merchant .store-card-stats {
  display: flex;
  gap: 1.75rem;
  margin: 0.25rem 0;
}
.store-card-stats div {
  display: grid;
}
.store-card-stats dt {
  font-size: 0.8rem;
  color: var(--muted);
}
.store-card-stats dd {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 650;
  line-height: 1.2;
}
.store-card-alerts {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.store-card-alert {
  padding: 0.5rem 0.75rem;
  border-left: 3px solid #fbb315;
  border-radius: 0.4rem;
  background: #fff8e6;
  font-size: 0.9rem;
}
.store-card-alert-danger {
  border-left-color: #c2410c;
  background: #fdf0ea;
}
.store-card-alert a {
  color: inherit;
  font-weight: 600;
}
.store-card-next {
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  background: #f3f6f5;
  font-size: 0.95rem;
}
.store-card-next a {
  font-weight: 600;
}
/* Buttons share the row in equal widths, or stack when they don't fit. */
.store-card-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.6rem;
  margin-top: 0.25rem;
}
.merchant .store-card-actions .button {
  margin-top: 0;
  width: 100%;
  justify-content: center;
  text-align: center;
  min-height: 46px;
  padding: 0.6rem 0.5rem;
  white-space: nowrap;
  font-size: 0.95rem;
}
.merchant .stores-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: center;
}
.stores-steps {
  counter-reset: step;
  list-style: none;
  margin: 1rem 0 0.5rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.stores-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2rem 1fr;
  column-gap: 0.75rem;
}
.stores-steps li::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 650;
}
@media (max-width: 720px) {
  .merchant .stores-empty {
    grid-template-columns: 1fr;
  }
}

/* ---- Artwork form (DEC-117, DEC-124) ---- */
.merchant .artwork-form {
  max-width: 40rem;
}
.field-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 0.75rem;
}
.artwork-price {
  font-weight: 650;
}

/* ---- Manage storefront ---- */
.merchant .storefront-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.storefront-head > div {
  flex: 1 1 24rem;
  display: grid;
  gap: 0.35rem;
}
.merchant .storefront-head .button {
  margin-top: 0;
}
.storefront-checks {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.75rem;
}
.storefront-checks li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: white;
}
.storefront-checks li > span {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #eef1f0;
  color: var(--muted);
  font-weight: 700;
}
.storefront-checks li[data-done="true"] > span {
  background: #e4f4e8;
  color: #17723a;
}
.storefront-checks li div {
  display: grid;
}
.storefront-jump {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.6rem 0;
  margin-bottom: 0.5rem;
  background: #fcfcfa;
}
.storefront-jump a {
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  text-decoration: none;
  font-size: 0.95rem;
}
.storefront-jump a:hover {
  border-color: var(--accent);
}
.merchant section[id] {
  scroll-margin-top: 4rem;
}
.merchant .storefront-form {
  max-width: 44rem;
}
.storefront-form textarea {
  resize: vertical;
}
.logo-field {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}
.logo-field > div {
  flex: 1 1 18rem;
  display: grid;
  gap: 0.5rem;
}
.storefront-logo-preview {
  width: 7rem;
  height: 7rem;
  object-fit: contain;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: #f5f5f2;
  padding: 0.5rem;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  gap: 0.6rem;
}
.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}
.contact-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  align-items: center;
  min-width: 0;
}
.contact-main .status-pill {
  font-size: 0.8rem;
}
.contact-value {
  flex-basis: 100%;
  overflow-wrap: anywhere;
}
.contact-qr {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.merchant .inline-form {
  display: inline;
  max-width: none;
}
.merchant .contact-actions .button,
.merchant .closure-card .button {
  margin-top: 0;
  min-height: 38px;
  padding: 0.35rem 0.8rem;
  font-size: 0.9rem;
}
.merchant .icon-button {
  min-width: 38px;
}
.merchant .danger-button {
  color: #892f22;
  border-color: #d9a79d;
}
.contact-add {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
  background: #f6f8f7;
}
.contact-add h3 {
  margin: 0;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
}
.merchant .mode-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: 0.6rem;
  border: 0;
  padding: 0;
}
.merchant .mode-picker legend {
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.merchant .mode-picker .mode-option {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  cursor: pointer;
}
.mode-option:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  background: #f3f7f6;
}
.mode-option span {
  display: grid;
}
.hours-table-wrap {
  overflow-x: auto;
}
.hours-form:has(input[name="mode"]:not([value="scheduled"]):checked)
  .hours-table-wrap {
  opacity: 0.45;
}
.hours-table {
  border-collapse: collapse;
  width: 100%;
}
.hours-table caption {
  text-align: start;
  padding-bottom: 0.5rem;
  font-size: 0.9rem;
}
.hours-table th {
  text-align: start;
  padding: 0.45rem 1rem 0.45rem 0;
  white-space: nowrap;
  font-weight: 600;
}
.hours-table td {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}
.hours-slot {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.merchant .hours-slot input {
  width: 7.2rem;
  padding: 0.3rem;
}
.closure-card {
  display: grid;
  gap: 0.4rem;
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
  background: #fbf0d9;
  color: #6b4a1f;
  max-width: 44rem;
}
.closure-card[data-active="true"] {
  background: #fff1ed;
  color: #892f22;
}

/* Storefront entrance preview (DEC-120, DEC-123) */
.preview-banner {
  padding: 0.6rem 1rem;
  border-radius: 0.6rem;
  background: #f3ead9;
  color: #6b4a1f;
  margin-bottom: 1rem;
}
.merchant .entrance {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.9rem;
  padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 3rem);
}
.entrance-logo {
  width: clamp(8rem, 22vw, 12rem);
  height: clamp(8rem, 22vw, 12rem);
  object-fit: contain;
}
.entrance-logo-text {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
}
.merchant .entrance-name {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}
.entrance-intro {
  max-width: 36rem;
  color: var(--muted);
  white-space: pre-line;
}
.entrance-status {
  font-weight: 600;
}
.entrance-status[data-state="open"],
.entrance-status[data-state="always"] {
  color: #17723a;
}
.entrance-notice {
  max-width: 32rem;
  padding: 0.9rem 1.1rem;
  border-radius: 0.75rem;
  background: #fbf0d9;
  color: #6b4a1f;
}
.entrance-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}
.merchant .entrance-actions .button {
  margin-top: 0;
}
.entrance-contact {
  width: min(100%, 26rem);
}
.entrance-contact summary {
  list-style: none;
  margin: 0 auto;
}
.entrance-contact summary::-webkit-details-marker {
  display: none;
}
.entrance-contact ul {
  list-style: none;
  padding: 1rem;
  margin: 0.75rem 0 0;
  display: grid;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  text-align: center;
}
.entrance-contact li {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
}
.merchant .entrance-contact .button {
  margin-top: 0;
}
.entrance-qr {
  width: 11rem;
  height: 11rem;
  object-fit: contain;
}
.entrance-works {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
  gap: 1rem;
}
.entrance-works li {
  display: grid;
  gap: 0.25rem;
}
.entrance-works img,
.entrance-noimg {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #f5f5f2;
  border-radius: 0.5rem;
}
.entrance-room .template-photo {
  max-width: 28rem;
}

/* ---- Public store pages (published snapshot) ---- */
.public-works {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: 1.5rem 1.25rem;
}
.public-work {
  display: grid;
  gap: 0.3rem;
  text-decoration: none;
}
.public-work img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #f3f1ec;
  border-radius: 0.6rem;
  margin-bottom: 0.4rem;
  transition: transform 150ms ease;
}
.public-work:hover img {
  transform: translateY(-2px);
}
.public-work:hover strong {
  text-decoration: underline;
}
.public-price {
  font-weight: 650;
}
.merchant .public-artwork {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 1fr);
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: start;
}
.public-artwork figure {
  margin: 0;
  display: grid;
  place-items: center;
  background: #f3f1ec;
  border-radius: 0.75rem;
  padding: 1rem;
}
.public-artwork figure img {
  max-height: 75vh;
  object-fit: contain;
}
.public-artwork-info {
  display: grid;
  gap: 0.6rem;
  align-content: start;
}
.merchant .public-artwork-info h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0;
}
.public-artwork-info .public-price {
  font-size: 1.3rem;
  padding: 0.6rem 0;
  border-block: 1px solid var(--line);
}
.public-description {
  white-space: pre-line;
}
.public-artwork-info .artwork-facts {
  margin: 0.4rem 0;
  padding: 0.75rem 0;
}
.public-artwork-info .artwork-story h2 {
  margin: 0.4rem 0;
}
/* Artist profile under the artwork (DEC-148). */
.public-artist {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  max-width: 48rem;
  display: grid;
  gap: 0.75rem;
}
.public-artist h2 {
  font-size: 1.15rem;
  margin: 0;
}
.public-artist-head {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.public-artist-head p {
  margin: 0;
}
.public-artist-portrait {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.public-artist-name {
  font-weight: 600;
}
.public-artist-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.public-artwork-info .entrance-contact summary {
  margin: 0;
}
.public-artwork-info .entrance-contact ul {
  text-align: start;
}
.public-hours {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
  gap: 0.4rem 1.5rem;
  margin: 0;
}
.public-hours div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--line);
}
.public-hours dd {
  margin: 0;
}
@media (max-width: 760px) {
  .merchant .public-artwork {
    grid-template-columns: 1fr;
  }
}

/* ---- Public store: gallery look (entrance, works, hours) ---- */
.public-store {
  max-width: 72rem;
  padding-top: 1.5rem;
}
.public-store > section {
  background: none;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: clamp(2rem, 5vw, 3.25rem) 0;
}
.public-store > section + section:not(.entrance + section) {
  border-top: 1px solid var(--line);
}
.merchant > .entrance {
  gap: 1.1rem;
  padding: clamp(3rem, 8vw, 5.5rem) clamp(1.25rem, 5vw, 3rem);
  margin-bottom: 1rem;
  border-radius: 1.5rem;
  border: 1px solid #ebe7de;
  background:
    radial-gradient(ellipse 60% 70% at 50% 0%, #fffdf8 0%, transparent 70%),
    linear-gradient(180deg, #f7f4ee 0%, #efebe3 100%);
}
.merchant .entrance-logo {
  width: clamp(7.5rem, 18vw, 10rem);
  height: clamp(7.5rem, 18vw, 10rem);
  padding: 0.75rem;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow:
    0 1px 2px rgb(36 62 67 / 0.08),
    0 12px 32px -12px rgb(36 62 67 / 0.28);
}
.merchant .entrance-logo-text {
  padding: 0;
  border-radius: 50%;
  border: 6px solid #fff;
  background: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}
.merchant .entrance-name {
  margin: 0.4rem 0 0;
  font-family: Georgia, "Noto Serif Thai", "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.merchant .entrance-intro {
  font-size: 1.0625rem;
  max-width: 34rem;
}
.merchant .entrance-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.7);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}
.merchant .entrance-status::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}
.merchant .entrance-status[data-state="open"],
.merchant .entrance-status[data-state="always"] {
  color: #17723a;
  background: #eaf5ee;
  border-color: #cfe6d7;
}
.merchant .entrance-actions {
  width: 100%;
  margin-top: 0.6rem;
}
/* Every button in the entrance panel has the same size. */
.merchant .entrance-actions .button,
.entrance .entrance-contact summary.button {
  box-sizing: border-box;
  width: 13.5rem;
  max-width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font-size: 1.0625rem;
}
.entrance .entrance-contact {
  display: block;
  width: min(100%, 28rem);
  text-align: center;
}
.entrance .entrance-contact summary.button {
  display: inline-flex;
  flex-direction: row;
  gap: 0.5rem;
}
.entrance .entrance-contact summary.button::after {
  content: "▾";
  font-size: 0.8em;
}
.entrance .entrance-contact[open] summary.button::after {
  content: "▴";
}
.entrance .entrance-contact ul {
  width: 100%;
  background: #fff;
  box-shadow: 0 10px 30px -18px rgb(36 62 67 / 0.35);
}

/* Section headings */
.public-store .section-head {
  align-items: baseline;
  margin-bottom: 1.5rem;
}
.public-store > section h2 {
  font-family: Georgia, "Noto Serif Thai", "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  letter-spacing: -0.01em;
}
.public-store .section-head a {
  font-weight: 600;
  text-underline-offset: 0.3em;
}

/* Artworks hung like framed works on a wall */
.public-store .public-works {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 2.25rem 1.75rem;
}
.public-store .public-work {
  gap: 0.2rem;
}
.public-store .public-work img {
  padding: clamp(0.75rem, 2vw, 1.1rem);
  margin-bottom: 0.9rem;
  border-radius: 2px;
  background: #fff;
  border: 1px solid #ebe7de;
  box-shadow:
    0 1px 2px rgb(36 62 67 / 0.06),
    0 18px 30px -22px rgb(36 62 67 / 0.45);
  transition:
    transform 200ms ease,
    box-shadow 200ms ease;
}
.public-store .public-work:hover img {
  transform: translateY(-4px);
  box-shadow:
    0 1px 2px rgb(36 62 67 / 0.06),
    0 26px 36px -22px rgb(36 62 67 / 0.5);
}
.public-store .public-work strong {
  font-size: 1.0625rem;
  line-height: 1.4;
}
.public-store .public-work .public-price {
  margin-top: 0.15rem;
  font-size: 0.9375rem;
  color: var(--accent);
}

/* Opening hours */
.public-store #store-info > * {
  max-width: 44rem;
}
.public-store #store-info h2 {
  margin-bottom: 1rem;
}
.public-store .public-hours div {
  padding: 0.55rem 0;
}
.public-store .public-hours dt {
  color: var(--muted);
}
.public-store .public-hours dd {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .public-store .public-work img {
    transition: none;
  }
  .public-store .public-work:hover img {
    transform: none;
  }
}
.summary-actions form {
  display: contents;
}
.merchant .summary-actions {
  gap: 0.75rem;
  margin-top: 1.75rem;
}
/* Every button in the row has the same size. */
.merchant .summary-actions .button {
  box-sizing: border-box;
  width: 15rem;
  max-width: 100%;
  min-height: 52px;
  margin-top: 0;
  padding: 0.75rem 1.25rem;
  font-size: 1.0625rem;
}

/* Owner / admin shortcuts in the storefront panel's top-right corner */
.merchant > .entrance {
  position: relative;
}
.store-tools {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1.1rem);
  right: clamp(0.75rem, 2vw, 1.1rem);
  display: flex;
  gap: 0.5rem;
}
.store-tool {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgb(255 255 255 / 0.85);
  color: var(--accent);
  box-shadow: 0 4px 14px -8px rgb(36 62 67 / 0.4);
  transition:
    background-color 150ms ease,
    color 150ms ease;
}
.store-tool:hover {
  background: var(--accent);
  color: #fff;
}
.store-suspended {
  text-align: center;
}
/* Signed-in avatar: Google photo over a default person icon. */
.avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  overflow: hidden;
  background: #e6ecea;
  color: var(--accent);
  border: 1px solid var(--line);
}
.avatar .avatar-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-default {
  width: 70%;
  height: 70%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.header-account-menu {
  position: relative;
}
.header-account {
  display: inline-flex;
  border-radius: 50%;
  cursor: pointer;
  list-style: none;
}
.header-account::-webkit-details-marker {
  display: none;
}
.account-popup {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 13rem;
  padding: 0.5rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.12);
}
.account-popup-name {
  margin: 0;
  padding: 0.5rem 0.75rem 0.6rem;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.header-account-menu .account-popup a,
.header-account-menu .account-popup button {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: 0.5rem;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.header-account-menu .account-popup a:hover,
.header-account-menu .account-popup button:hover,
.header-account-menu .account-popup a:focus-visible,
.header-account-menu .account-popup button:focus-visible {
  background: var(--line);
}
.header-account:hover .avatar {
  border-color: var(--accent);
}
/* A photo that fails to load is drawn as the default avatar, not a broken-image icon. */
.avatar .avatar-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/avatar-default.svg") center / cover no-repeat;
}

/* ---- Public package page ---- */
.header-packages + .header-link {
  margin-left: 0;
}
.header-packages[aria-current="page"] {
  font-weight: 600;
}
.package-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.package-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.package-card h2 {
  font-size: 1.4rem;
}
.package-card-price {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}
.package-facts,
.package-included {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}
.package-note {
  margin: 0;
  padding: 0.6rem 0.75rem;
  border-left: 3px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
}
.package-card-actions {
  margin-top: auto;
  display: grid;
  gap: 0.5rem;
}
/* Both buttons span the card, so they are the same width. */
.package-card-actions .button {
  width: 100%;
}
.package-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}
.package-info h2 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}
.package-steps {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding-left: 1.25rem;
}
.package-steps span {
  display: block;
  color: var(--muted);
}
.template-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 396;
  object-fit: cover;
  border-radius: 0.6rem;
  background: var(--line);
}
.package-templates {
  margin-top: 2.5rem;
}
.package-templates h2 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}
.package-templates ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.25rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.package-template {
  display: grid;
  gap: 0.4rem;
  align-content: start;
}

/* ---- Payment history (DEC-154) ---- */
.payment-history {
  overflow-x: auto;
}
.history-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1rem;
  font-size: 0.95rem;
}
.history-table :is(td, th) {
  padding: 0.55rem 0.5rem;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.history-table th {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.85rem;
}
.history-amount {
  white-space: nowrap;
}
.history-status {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.history-paid {
  background: #e3f3e8;
  color: #1d6b3a;
}
.history-pending {
  background: #fdf1d8;
  color: #7a5310;
}
.history-rejected {
  background: #fbe4e2;
  color: #8f2a22;
}

/* ---- Invoices and receipts (DEC-158) ---- */
.billing-document {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 1.25rem;
}
.billing-document.is-void .document-lines {
  opacity: 0.55;
}
.document-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ink, #1d2a2f);
}
.document-seller p,
.document-buyer p {
  margin: 0.25rem 0 0;
}
.document-title {
  text-align: end;
}
.document-title h2 {
  margin: 0 0 0.5rem;
}
.document-facts {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0.2rem 1rem;
  margin: 0;
  justify-content: end;
}
.document-facts dt {
  color: var(--muted);
}
.document-facts dd {
  margin: 0;
  text-align: end;
}
.document-buyer h3 {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}
.document-lines {
  width: 100%;
  border-collapse: collapse;
}
.document-lines :is(td, th) {
  padding: 0.6rem 0.5rem;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.document-lines :is(td, th):last-child {
  text-align: end;
  white-space: nowrap;
}
.document-lines thead th {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}
.document-lines tfoot th,
.document-lines tfoot td {
  font-weight: 700;
  border-bottom: 0;
}
.document-lines tfoot .document-words {
  text-align: end;
  font-weight: 400;
  color: var(--muted);
  padding-top: 0;
}
.document-void,
.document-paid {
  margin: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-weight: 600;
}
.document-void {
  background: #fbe4e2;
  color: #8f2a22;
}
.document-paid {
  background: #e3f3e8;
  color: #1d6b3a;
}
.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.invoice-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  margin-top: 1rem;
}
.bill-to form {
  display: grid;
  gap: 0.75rem;
  max-width: 36rem;
  margin-top: 0.75rem;
}
@media print {
  body:has(.billing-document)
    :is(
      .site-header,
      .site-footer,
      .skip-link,
      h1,
      .notice,
      .document-actions
    ) {
    display: none;
  }
  body:has(.billing-document) main {
    padding: 0;
    margin: 0;
  }
  .billing-document {
    border: 0;
    padding: 0;
    max-width: none;
  }
}

/* ---- Renewal and billing period (DEC-155) ---- */
.payment-due {
  border: 1px solid #f0d48a;
  background: #fdf6e3;
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  margin: 0.75rem 0;
}
.payment-due p {
  margin: 0.35rem 0 0;
}
.payment-overdue {
  border-color: #efb3ab;
  background: #fbeceb;
}
.payment-term {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.payment-renewal {
  margin: 0.5rem 0 0;
}
.period-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}
.period-option {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  text-decoration: none;
  color: inherit;
}
.period-option[aria-current="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
a.period-option:hover,
a.period-option:focus-visible {
  border-color: var(--accent);
}
/* Monthly and yearly price of a package card (DEC-013/155). */
.package-periods {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.package-periods div {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.5rem;
}
.package-periods dt {
  color: var(--muted);
}
.package-periods dd {
  margin: 0;
  font-weight: 600;
}
.package-periods dd span {
  display: block;
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---- Unpublished changes (DEC-151) ---- */
.unpublished-note {
  border: 1px solid #f0d48a;
  background: #fdf6e3;
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  margin: 0.75rem 0;
}
.unpublished-note p {
  margin: 0.35rem 0 0;
}

/* ---- Store entrance as a shopfront (a store's own home page) ----
   Built from CSS only (no images) so it works under the CSP. Sizes use
   container units, so the whole facade scales with its width. */
.merchant .entrance-shop {
  padding-top: clamp(1rem, 3vw, 2rem);
}
.shopfront {
  --shop-green: #1f3d35;
  --shop-green-2: #2a5045;
  --shop-gold: #e2c27d;
  --shop-wood: #7a4b2c;
  container-type: inline-size;
  position: relative;
  width: min(100%, 64rem);
  aspect-ratio: 16 / 8.6;
  border-radius: 1.25rem;
  overflow: hidden;
  background-color: #8c5a45;
  /* Brick courses: mortar lines across, and staggered joints. */
  background-image:
    linear-gradient(#0000 calc(100% - 2px), #5e3b2e 0),
    linear-gradient(90deg, #0000 calc(100% - 2px), #5e3b2e 0),
    linear-gradient(90deg, #0000 calc(100% - 2px), #5e3b2e 0),
    radial-gradient(ellipse at 85% 30%, #ffcf7a55, #0000 40%),
    linear-gradient(#0003, #0000 30%, #0002);
  background-size:
    2.6cqw 1.3cqw,
    5.2cqw 2.6cqw,
    5.2cqw 2.6cqw,
    100% 100%,
    100% 100%;
  background-position:
    0 0,
    0 0,
    2.6cqw 1.3cqw,
    0 0,
    0 0;
  box-shadow: 0 18px 40px -24px rgb(36 62 67 / 0.55);
}
.shopfront-building {
  position: absolute;
  left: 13%;
  right: 13%;
  top: 7%;
  bottom: 13%;
  display: grid;
  grid-template-rows: 9% 17% 1fr 15%;
}
.shopfront-cornice {
  margin: 0 -3%;
  background: linear-gradient(#55606a, #2f383f);
  clip-path: polygon(0 100%, 3% 0, 97% 0, 100% 100%);
  box-shadow: 0 0.6cqw 0.8cqw #0005;
}
.shopfront-fascia {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2cqw;
  padding: 0 4cqw;
  background: linear-gradient(var(--shop-green-2), var(--shop-green));
  border-top: 0.35cqw solid #16302a;
  border-bottom: 0.5cqw solid #16302a;
  box-shadow: inset 0 0 0 0.25cqw #ffffff14;
}
.shopfront .entrance-name {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--shop-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(1rem, 4.2cqw, 3rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 0.15cqw 0 #0008;
}
.shopfront-ornament {
  color: var(--shop-gold);
  font-size: 1.8cqw;
  opacity: 0.8;
}
.shopfront-face {
  display: grid;
  grid-template-columns: 1fr 17% 1fr;
  gap: 1.6cqw;
  padding: 1.6cqw 1.6cqw 0;
  background: var(--shop-green);
  box-shadow: inset 0 0 0 0.35cqw #16302a;
}
.shopfront-window {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7cqw;
  padding: 0.7cqw;
  background: var(--shop-wood);
  border-radius: 0.4cqw 0.4cqw 0 0;
}
.shopfront-window span {
  position: relative;
  border-radius: 50% 50% 0 0 / 22% 22% 0 0;
  background:
    radial-gradient(circle at 50% 18%, #fff6d8 0 0.5cqw, #0000 0.6cqw),
    radial-gradient(ellipse at 50% 30%, #fff1cc, #f2d49c 55%, #d9ae6c);
  box-shadow:
    inset 0 0 0 0.3cqw #5a361f,
    0 0 2.2cqw #ffd58a66;
}
/* Faint frames on the back wall: a gallery, but the works wait inside. */
.shopfront-window span::after {
  content: "";
  position: absolute;
  left: 24%;
  right: 24%;
  top: 40%;
  height: 26%;
  border: 0.3cqw solid #b98d52;
  background: #f7e6c2;
  opacity: 0.7;
}
.shopfront-door {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 0.8cqw;
  background: linear-gradient(90deg, #6a3f24, #8a5733 50%, #6a3f24);
  border-radius: 0.4cqw 0.4cqw 0 0;
  box-shadow: inset 0 0 0 0.3cqw #4a2b17;
  text-decoration: none;
  transition: filter 0.2s;
}
.shopfront-door:hover,
.shopfront-door:focus-visible {
  filter: brightness(1.12);
}
.shopfront-door:focus-visible {
  outline: 3px solid var(--shop-gold);
  outline-offset: 3px;
}
.shopfront-door-glass {
  border-radius: 0.3cqw;
  background:
    linear-gradient(90deg, #0000 47%, #4a2b17 47% 53%, #0000 53%),
    linear-gradient(
      #0000 31%,
      #4a2b17 31% 35%,
      #0000 35% 64%,
      #4a2b17 64% 68%,
      #0000 68%
    ),
    radial-gradient(ellipse at 50% 20%, #fff1cc, #e8c17f);
  box-shadow: 0 0 1.5cqw #ffd58a55;
}
.shopfront-door::after {
  content: "";
  position: absolute;
  right: 14%;
  top: 58%;
  width: 1cqw;
  height: 1cqw;
  border-radius: 50%;
  background: var(--shop-gold);
}
.shopfront-door-plate {
  margin-top: 0.6cqw;
  padding: 0.3cqw 0;
  border-radius: 0.3cqw;
  background: var(--shop-green);
  color: var(--shop-gold);
  font-size: clamp(0.6rem, 1.3cqw, 0.95rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
}
.shopfront-base {
  display: grid;
  grid-template-columns: 1fr 17% 1fr;
  gap: 1.6cqw;
  padding: 0 1.6cqw;
  background:
    linear-gradient(
      90deg,
      #0000 8%,
      #ffffff12 8% 9%,
      #0000 9% 91%,
      #ffffff12 91% 92%,
      #0000 92%
    ),
    linear-gradient(var(--shop-green-2), #18322b);
  border-top: 0.4cqw solid #16302a;
}
.shopfront-base .shopfront-planter:last-child {
  grid-column: 3;
}
/* Window boxes with flowers. */
.shopfront-planter {
  position: relative;
  align-self: start;
  height: 45%;
  margin: 0 4%;
  background: linear-gradient(#8a5a36, #6b4127);
  border-radius: 0 0 0.4cqw 0.4cqw;
}
.shopfront-planter::before {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: 85%;
  height: 2.6cqw;
  background:
    radial-gradient(circle, #f2b632 0 38%, #0000 40%) 0 0 / 2.4cqw 1.6cqw,
    radial-gradient(circle, #d9473b 0 36%, #0000 38%) 1.2cqw 0.6cqw / 2.4cqw
    1.6cqw,
    radial-gradient(circle, #fff3e6 0 34%, #0000 36%) 0.6cqw 1cqw / 2.4cqw
    1.6cqw,
    radial-gradient(ellipse at 50% 100%, #3f7a45, #2e5c35 70%, #0000 72%);
  border-radius: 50% 50% 0 0 / 80% 80% 0 0;
}
/* Hanging sign with the logo, on a bracket left of the shop. */
.shopfront-blade {
  position: absolute;
  left: 1.5%;
  top: 25%;
  width: 11%;
  display: grid;
  justify-items: center;
}
.shopfront-bracket {
  width: 100%;
  height: 0.6cqw;
  border-radius: 0.3cqw;
  background: #2b2b2b;
}
.shopfront-bracket::after {
  content: "";
  display: block;
  width: 0.25cqw;
  height: 1.6cqw;
  margin: 0.6cqw auto 0;
  background: #2b2b2b;
}
.shopfront-logo {
  width: 9.5cqw;
  height: 9.5cqw;
  margin-top: 0.2cqw;
  padding: 0.6cqw;
  border-radius: 50%;
  background: #fbf6ec;
  border: 0.35cqw solid var(--shop-gold);
  box-shadow: 0 0.8cqw 1.4cqw #0006;
  object-fit: contain;
}
.shopfront-logo-text {
  display: grid;
  place-items: center;
  background: var(--shop-green);
  color: var(--shop-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4.5cqw;
}
/* Wall lantern right of the shop. */
.shopfront-lamp {
  position: absolute;
  right: 6%;
  top: 22%;
  width: 3.2cqw;
  height: 5cqw;
  border-radius: 0.6cqw 0.6cqw 0.3cqw 0.3cqw;
  background: radial-gradient(
    ellipse at 50% 55%,
    #fff4c7,
    #ffcb62 60%,
    #c88a2c
  );
  box-shadow:
    0 0 0 0.3cqw #2b2b2b,
    0 0 4cqw 1.5cqw #ffd37a88;
}
.shopfront-lamp::before {
  content: "";
  position: absolute;
  left: -0.6cqw;
  right: -0.6cqw;
  top: -1.4cqw;
  height: 1.2cqw;
  background: #2b2b2b;
  clip-path: polygon(15% 100%, 50% 0, 85% 100%);
}
.shopfront-lamp::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 1.4cqw;
  width: 2.6cqw;
  height: 0.4cqw;
  background: #2b2b2b;
}
/* Chalkboard A-frame on the pavement with today's opening status. */
.merchant .shopfront-board.entrance-status,
.shopfront-board {
  position: absolute;
  left: 15%;
  bottom: 4%;
  z-index: 1;
  max-width: 20%;
  margin: 0;
  padding: 0.9cqw 1.2cqw;
  border: 0.5cqw solid #9a6b3f;
  border-radius: 0.3cqw;
  background: #2b3230;
  color: #f4efe2;
  font-family: "Comic Sans MS", "Chalkboard SE", cursive;
  font-size: clamp(0.65rem, 1.5cqw, 1rem);
  font-weight: 400;
  line-height: 1.3;
  box-shadow: 0 0.8cqw 1cqw #0006;
}
.merchant .shopfront-board.entrance-status[data-state="open"],
.merchant .shopfront-board.entrance-status[data-state="always"] {
  color: #c9f2d3;
  background: #2b3230;
  border-color: #9a6b3f;
}
.shopfront-street {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 13%;
  background-color: #5d5a55;
  background-image:
    radial-gradient(ellipse at 50% 40%, #7a766f 0 45%, #0000 48%),
    linear-gradient(#45423e 0 12%, #0000 12%);
  background-size:
    3cqw 1.8cqw,
    100% 100%;
  border-top: 0.6cqw solid #8a857c;
}
@container (max-width: 34rem) {
  .shopfront-window {
    grid-template-columns: repeat(2, 1fr);
  }
  .shopfront-window span:nth-child(3) {
    display: none;
  }
}
@media (max-width: 40rem) {
  .shopfront {
    aspect-ratio: 16 / 11;
  }
  .shopfront-building {
    left: 15%;
    right: 9%;
  }
  .shopfront-blade {
    width: 14%;
    left: 0.5%;
  }
  .shopfront-logo {
    width: 12cqw;
    height: 12cqw;
  }
  .shopfront-lamp {
    display: none;
  }
  .merchant .shopfront-board.entrance-status,
  .shopfront-board {
    max-width: 34%;
    left: 4%;
  }
}

/* Contact details below the shopfront (no dropdown). */
.store-contact h2 {
  margin-bottom: 1rem;
}
.store-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
}
.store-contact-list li {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 0.5rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fff;
}
.store-contact-list li.subtle {
  grid-column: 1 / -1;
  background: none;
  border-style: dashed;
}
.store-contact-list strong {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}
.store-contact-value {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.store-contact-list .button {
  margin-top: 0.25rem;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
}
.store-contact-list .entrance-qr {
  width: 9rem;
  height: 9rem;
}

/* ---- Closed shopfront: suspended (DEC-151) or paused for non-payment
   (DEC-155). Lights off, a plaque on the door; visitors are not told why. */
.shopfront-closed .shopfront-window span {
  background:
    linear-gradient(160deg, #ffffff1f 0 18%, #0000 18%),
    linear-gradient(#3a4448, #2a3134);
  box-shadow: inset 0 0 0 0.3cqw #3b2717;
}
.shopfront-closed .shopfront-window span::after {
  display: none;
}
.shopfront-closed .shopfront-door {
  filter: saturate(0.7) brightness(0.85);
}
.shopfront-closed .shopfront-door-glass {
  background:
    linear-gradient(90deg, #0000 47%, #4a2b17 47% 53%, #0000 53%),
    linear-gradient(
      #0000 31%,
      #4a2b17 31% 35%,
      #0000 35% 64%,
      #4a2b17 64% 68%,
      #0000 68%
    ),
    linear-gradient(#3a4448, #2a3134);
  box-shadow: none;
}
.shopfront-closed .shopfront-lamp {
  background: radial-gradient(ellipse at 50% 55%, #8d8a80, #5d5b55);
  box-shadow: 0 0 0 0.3cqw #2b2b2b;
}
.shopfront-closed-plaque {
  position: absolute;
  left: 50%;
  top: 30%;
  transform: translateX(-50%) rotate(-4deg);
  padding: 0.6cqw 1.1cqw;
  border: 0.3cqw solid #7a1f17;
  border-radius: 0.4cqw;
  background: #fbf3e4;
  color: #9b2a1f;
  font-size: clamp(0.6rem, 1.5cqw, 1rem);
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 0.5cqw 0.8cqw #0006;
}
/* The plaque hangs from a string. */
.shopfront-closed-plaque::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 3cqw;
  height: 1.8cqw;
  transform: translateX(-50%);
  border: 0.2cqw solid #4a2b17;
  border-bottom: 0;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.merchant .shopfront-closed .shopfront-board.entrance-status {
  color: #ffd2c9;
}
.store-suspended {
  display: grid;
  justify-items: center;
  gap: 1rem;
}
.store-closed-sign {
  width: min(100%, 34rem);
  padding: 1rem 1.25rem;
  border: 1px solid #efb3ab;
  border-radius: 0.9rem;
  background: #fbeceb;
  color: #7a1f17;
}
.store-closed-sign p {
  margin: 0.35rem 0 0;
  color: #8f3a30;
}
.store-closed-sign h1 {
  margin: 0;
  font-size: 1.15rem;
}
.shopfront-closed .entrance-name {
  font-size: clamp(0.9rem, 3.2cqw, 2.4rem);
  letter-spacing: 0.02em;
}

/* ---- Shopfront style: Minimal White (template) ----
   White render, thin black lettering on the wall, big plain glass. */
.shopfront[data-style="minimal"] {
  --shop-gold: #1f1f1f;
  background-color: #ecebe6;
  background-image:
    radial-gradient(ellipse at 80% 25%, #ffffff, #0000 45%),
    linear-gradient(#f5f4f0, #e2dfd8);
  background-size: 100% 100%;
  background-position: 0 0;
}
.shopfront[data-style="minimal"] .shopfront-cornice {
  margin: 0;
  clip-path: none;
  background: #fbfaf7;
  box-shadow: 0 0.3cqw 0.6cqw #0000001a;
}
.shopfront[data-style="minimal"] .shopfront-fascia {
  background: none;
  border: 0;
  box-shadow: none;
}
.shopfront[data-style="minimal"] .entrance-name {
  color: #1f1f1f;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  letter-spacing: 0.32em;
  text-shadow: none;
}
.shopfront[data-style="minimal"] .shopfront-ornament {
  display: none;
}
.shopfront[data-style="minimal"] .shopfront-face {
  gap: 1.2cqw;
  background: none;
  box-shadow: none;
  padding-top: 0.8cqw;
}
.shopfront[data-style="minimal"] .shopfront-window {
  gap: 0.35cqw;
  padding: 0.35cqw;
  border-radius: 0;
  background: #1f1f1f;
}
.shopfront[data-style="minimal"] .shopfront-window span {
  border-radius: 0;
  background:
    linear-gradient(115deg, #0000 0 55%, #ffffff99 55% 62%, #0000 62%),
    linear-gradient(#ffffff, #eef0ef);
  box-shadow: none;
}
.shopfront[data-style="minimal"] .shopfront-window span::after {
  border: 0.15cqw solid #c9c9c4;
  background: #fafaf8;
  opacity: 1;
  box-shadow: 0 0.3cqw 0.5cqw #0000001f;
}
.shopfront[data-style="minimal"] .shopfront-door {
  border-radius: 0;
  background: #1f1f1f;
  box-shadow: none;
}
.shopfront[data-style="minimal"] .shopfront-door-glass {
  border-radius: 0;
  background:
    linear-gradient(115deg, #0000 0 55%, #ffffff99 55% 62%, #0000 62%),
    linear-gradient(#ffffff, #eceeed);
  box-shadow: none;
}
.shopfront[data-style="minimal"] .shopfront-door::after {
  width: 0.4cqw;
  height: 3cqw;
  border-radius: 0.2cqw;
  background: #9a9a96;
}
.shopfront[data-style="minimal"] .shopfront-door-plate {
  border-radius: 0;
  background: #1f1f1f;
  color: #fff;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  letter-spacing: 0.2em;
}
.shopfront[data-style="minimal"] .shopfront-base {
  background: #e4e1da;
  border-top: 0.2cqw solid #cdc8be;
}
/* Concrete cubes with a clipped shrub. */
.shopfront[data-style="minimal"] .shopfront-planter {
  justify-self: center;
  width: 22%;
  height: 60%;
  border-radius: 0;
  background: linear-gradient(#cfcac0, #b9b3a7);
}
.shopfront[data-style="minimal"] .shopfront-planter::before {
  left: 5%;
  right: 5%;
  height: 4.5cqw;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #8db07a, #55784a 70%);
}
.shopfront[data-style="minimal"] .shopfront-bracket,
.shopfront[data-style="minimal"] .shopfront-bracket::after {
  background: #1f1f1f;
}
.shopfront[data-style="minimal"] .shopfront-logo {
  border: 0.2cqw solid #1f1f1f;
  background: #fff;
  box-shadow: 0 0.6cqw 1cqw #0000002e;
}
.shopfront[data-style="minimal"] .shopfront-logo-text {
  background: #fff;
  color: #1f1f1f;
}
/* A small black wall light washing the render. */
.shopfront[data-style="minimal"] .shopfront-lamp {
  width: 1.6cqw;
  height: 3cqw;
  border-radius: 0.3cqw;
  background: #1f1f1f;
  box-shadow: 0 2cqw 3cqw 0.5cqw #ffffffcc;
}
.shopfront[data-style="minimal"] .shopfront-lamp::before,
.shopfront[data-style="minimal"] .shopfront-lamp::after {
  display: none;
}
.merchant .shopfront[data-style="minimal"] .shopfront-board.entrance-status {
  border: 0.25cqw solid #1f1f1f;
  border-radius: 0;
  background: #fff;
  color: #1f1f1f;
  font-family: "Helvetica Neue", Arial, sans-serif;
  box-shadow: 0 0.5cqw 0.8cqw #00000026;
}
.shopfront[data-style="minimal"] .shopfront-street {
  background-color: #d6d3cc;
  background-image:
    linear-gradient(90deg, #0000 calc(100% - 1px), #bdb8ae 0),
    linear-gradient(#0000 calc(100% - 1px), #bdb8ae 0);
  background-size: 6cqw 6cqw;
  border-top: 0.4cqw solid #ebe8e2;
}
.shopfront-closed[data-style="minimal"] .shopfront-window span,
.shopfront-closed[data-style="minimal"] .shopfront-door-glass {
  background:
    linear-gradient(115deg, #0000 0 55%, #ffffff22 55% 62%, #0000 62%),
    linear-gradient(#4a4d4f, #36393b);
}
.merchant
  .shopfront-closed[data-style="minimal"]
  .shopfront-board.entrance-status {
  color: #9b2a1f;
}

/* ---- Shopfront style: Modern Dark (template) ----
   Charcoal cladding, a glowing sign, spotlit works behind dark glass. */
.shopfront[data-style="dark"] {
  --shop-gold: #ffd38a;
  background-color: #1f2226;
  background-image:
    radial-gradient(ellipse at 50% 20%, #ffb84d1f, #0000 55%),
    repeating-linear-gradient(90deg, #2a2e33 0 1.6cqw, #1a1d20 1.6cqw 1.85cqw);
  background-size: 100% 100%;
  background-position: 0 0;
}
.shopfront[data-style="dark"] .shopfront-cornice {
  margin: 0;
  clip-path: none;
  background: #0d0e10;
  box-shadow: 0 0.4cqw 0.8cqw #000a;
}
.shopfront[data-style="dark"] .shopfront-fascia {
  background: #0d0e10;
  border: 0;
  box-shadow: none;
}
.shopfront[data-style="dark"] .entrance-name {
  color: #ffe2ad;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-shadow:
    0 0 0.6cqw #ffb84d,
    0 0 2cqw #ff9a2e99;
}
.shopfront[data-style="dark"] .shopfront-ornament {
  display: none;
}
.shopfront[data-style="dark"] .shopfront-face {
  background: #0d0e10;
  box-shadow: none;
}
.shopfront[data-style="dark"] .shopfront-window {
  border-radius: 0;
  gap: 0.4cqw;
  padding: 0.4cqw;
  background: #050506;
}
.shopfront[data-style="dark"] .shopfront-window span {
  border-radius: 0;
  background:
    radial-gradient(ellipse at 50% 0, #ffdca066 0 10%, #0000 55%),
    linear-gradient(#34302b, #1b1a18);
  box-shadow:
    inset 0 0 0 0.15cqw #000,
    0 0 1.5cqw #ffb84d22;
}
.shopfront[data-style="dark"] .shopfront-window span::after {
  border: 0.2cqw solid #0b0b0b;
  background: linear-gradient(135deg, #c55a37, #e2ae4c 60%, #3f6d74);
  opacity: 0.75;
  box-shadow: 0 0 1.2cqw #ffcf8a55;
}
.shopfront[data-style="dark"] .shopfront-door {
  border-radius: 0;
  background: #050506;
  box-shadow: none;
}
.shopfront[data-style="dark"] .shopfront-door-glass {
  border-radius: 0;
  background:
    radial-gradient(ellipse at 50% 10%, #ffdca055, #0000 60%),
    linear-gradient(#2e2a26, #181716);
  box-shadow: none;
}
.shopfront[data-style="dark"] .shopfront-door::after {
  width: 0.4cqw;
  height: 3cqw;
  border-radius: 0.2cqw;
  background: #ffd38a;
}
.shopfront[data-style="dark"] .shopfront-door-plate {
  border-radius: 0;
  background: #000;
  color: #ffd38a;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
/* LED strip along the plinth. */
.shopfront[data-style="dark"] .shopfront-base {
  background: #121416;
  border-top: 0.3cqw solid #ffcf8a;
  box-shadow: 0 -0.3cqw 1.6cqw #ffb84d88;
}
.shopfront[data-style="dark"] .shopfront-planter {
  height: 55%;
  border-radius: 0;
  background: #050506;
}
.shopfront[data-style="dark"] .shopfront-planter::before {
  height: 3.4cqw;
  background:
    repeating-linear-gradient(80deg, #0000 0 0.8cqw, #3f6b4a 0.8cqw 1cqw),
    repeating-linear-gradient(100deg, #0000 0 0.9cqw, #2f5439 0.9cqw 1.1cqw);
  border-radius: 40% 40% 0 0 / 100% 100% 0 0;
}
.shopfront[data-style="dark"] .shopfront-bracket,
.shopfront[data-style="dark"] .shopfront-bracket::after {
  background: #0d0e10;
}
.shopfront[data-style="dark"] .shopfront-logo {
  border-color: #ffd38a;
  box-shadow:
    0 0 1.6cqw #ffb84d88,
    0 0.8cqw 1.4cqw #000a;
}
.shopfront[data-style="dark"] .shopfront-logo-text {
  background: #0d0e10;
}
/* A vertical light bar instead of a lantern. */
.shopfront[data-style="dark"] .shopfront-lamp {
  width: 0.9cqw;
  height: 9cqw;
  border-radius: 0.45cqw;
  background: #ffe2ad;
  box-shadow: 0 0 2.4cqw 0.6cqw #ffb84d99;
}
.shopfront[data-style="dark"] .shopfront-lamp::before,
.shopfront[data-style="dark"] .shopfront-lamp::after {
  display: none;
}
.merchant .shopfront[data-style="dark"] .shopfront-board.entrance-status {
  border: 0.2cqw solid #ffd38a;
  border-radius: 0.2cqw;
  background: #0d0e10;
  color: #ffe2ad;
  font-family: "Helvetica Neue", Arial, sans-serif;
  box-shadow: 0 0 1.2cqw #ffb84d55;
}
.shopfront[data-style="dark"] .shopfront-street {
  background-color: #16171a;
  background-image: radial-gradient(ellipse at 50% 0, #ffb84d33, #0000 60%);
  background-size: 100% 100%;
  border-top: 0.4cqw solid #2c2f33;
}
.shopfront-closed[data-style="dark"] .shopfront-window span,
.shopfront-closed[data-style="dark"] .shopfront-door-glass {
  background: linear-gradient(#222427, #141517);
  box-shadow: inset 0 0 0 0.15cqw #000;
}
.shopfront-closed[data-style="dark"] .entrance-name,
.shopfront-closed[data-style="dark"] .shopfront-lamp {
  color: #8d8a80;
  text-shadow: none;
  background: #5d5b55;
  box-shadow: none;
}
.shopfront-closed[data-style="dark"] .entrance-name {
  background: none;
}
.shopfront-closed[data-style="dark"] .shopfront-base {
  border-top-color: #3a3d40;
  box-shadow: none;
}
.shopfront-closed[data-style] .entrance-name {
  letter-spacing: 0.02em;
}

/* ---- Home: Charis Plaza walkway map ----
   A long path the visitor scrolls along; every open gallery is a little
   shop on alternating sides, in its template's style (data-style). The gate
   starts it; empty lots and a fountain end it. CSS only (no inline styles). */
.plaza {
  margin: 0;
  display: grid;
  gap: 0.6rem;
  min-width: 0;
}
.plaza-street {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  /* Matches .plaza-lots' side padding, so snapping to the gate rests at 0. */
  scroll-padding-inline: 1.25rem;
  border-radius: var(--panel-radius);
  background: #a9bf92;
  box-shadow: inset 0 0 0 1px #0000000d;
  scrollbar-width: thin;
  scrollbar-color: #7d9468 #0000;
}
.plaza-street:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.plaza-lots {
  --shop-h: 8.5rem;
  --path-h: 4.5rem;
  --pad: 1.9rem;
  position: relative;
  list-style: none;
  margin: 0;
  padding: var(--pad) 1.25rem;
  width: max-content;
  min-width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: var(--shop-h) var(--path-h) var(--shop-h);
  grid-auto-flow: column dense;
  grid-auto-columns: 9rem;
  column-gap: 1.4rem;
  row-gap: 0;
  /* Grass with a few darker tufts. */
  background:
    radial-gradient(circle at 30% 40%, #a1b88a 0 0.3rem, #0000 0.35rem) 0 0 /
    3.7rem 2.9rem,
    #a9bf92;
}
/* The stone walkway between the two rows of shops. */
.plaza-lots::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--pad) + var(--shop-h));
  height: var(--path-h);
  background:
    radial-gradient(ellipse at 50% 50%, #e3d8c4 0 40%, #0000 44%) 0 0 / 1.6rem
    1.1rem,
    radial-gradient(ellipse at 50% 50%, #e3d8c4 0 40%, #0000 44%) 0.8rem 0.55rem
    / 1.6rem 1.1rem,
    #cdbfa7;
  border-block: 0.3rem solid #b9aa8f;
}
/* Lamp posts along both edges of the path. */
.plaza-lots::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--pad) + var(--shop-h) - 0.55rem);
  height: calc(var(--path-h) + 1.1rem);
  pointer-events: none;
  background-image:
    radial-gradient(
      circle,
      #ffe7a8 0 0.28rem,
      #3b3b3b 0.3rem 0.45rem,
      #0000 0.5rem
    ),
    radial-gradient(
      circle,
      #ffe7a8 0 0.28rem,
      #3b3b3b 0.3rem 0.45rem,
      #0000 0.5rem
    );
  background-repeat: repeat-x;
  background-size: 10.4rem 1.1rem;
  /* Centred in the gaps between shop columns (pad + column + half gap). */
  background-position:
    5.75rem 0,
    5.75rem 100%;
}
.plaza-lots > li {
  position: relative;
  z-index: 1;
  scroll-snap-align: start;
}
.plaza-north {
  grid-row: 1;
}
.plaza-south {
  grid-row: 3;
}
/* Entrance gate: two posts and a sign across the walkway. */
.plaza-gate {
  grid-row: 1 / -1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.35rem;
}
.plaza-gate span {
  padding: 0.6rem 0.9rem;
  border: 2px solid #e2c27d;
  border-radius: 0.5rem;
  background: #1f3d35;
  color: #e2c27d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 6px 14px #0003;
}
.plaza-gate small {
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: #fcfcfa;
  color: var(--ink);
  font-size: 0.72rem;
}
.plaza-end {
  grid-row: 1 / -1;
  display: grid;
  place-items: center;
}
.plaza-fountain {
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #fdfcf7 0 6%,
    #c6e6ef 7% 30%,
    #94c7d8 31% 48%,
    #efe7d8 49% 58%,
    #b8ab94 59% 63%,
    #0000 64%
  );
  filter: drop-shadow(0 4px 6px #0003);
}
/* A shop. */
.plaza-shop > a {
  position: relative;
  display: grid;
  grid-template-rows: 16% 22% 1fr;
  height: 100%;
  color: inherit;
  text-decoration: none;
  filter: drop-shadow(0 5px 5px #0003);
  transition: transform 0.18s;
}
.plaza-shop > a:hover,
.plaza-shop > a:focus-visible {
  transform: translateY(-4px);
}
.plaza-shop > a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.plaza-roof {
  margin: 0 -6%;
  background: linear-gradient(#5b6670, #343d45);
  clip-path: polygon(0 100%, 6% 0, 94% 0, 100% 100%);
}
.plaza-sign {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0 6%;
  overflow: hidden;
  background: #1f3d35;
  color: #e2c27d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.plaza-front {
  display: grid;
  grid-template-columns: 1fr 24% 1fr;
  gap: 6%;
  padding: 7% 7% 0;
  background:
    linear-gradient(90deg, #0000 calc(100% - 1px), #6b4434 0) 0 0 / 0.9rem
    0.9rem,
    linear-gradient(#0000 calc(100% - 1px), #6b4434 0) 0 0 / 0.45rem 0.45rem,
    #8c5a45;
}
.plaza-win {
  border-radius: 40% 40% 0 0 / 25% 25% 0 0;
  background: radial-gradient(ellipse at 50% 30%, #fff1cc, #e7bf7a);
  box-shadow: inset 0 0 0 2px #5a361f;
}
.plaza-door {
  background: linear-gradient(90deg, #6a3f24, #8a5733, #6a3f24);
  border-radius: 2px 2px 0 0;
}
.plaza-logo {
  position: absolute;
  right: -0.6rem;
  top: -0.9rem;
  width: 2.6rem;
  height: 2.6rem;
  padding: 2px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #e2c27d;
  object-fit: contain;
}
.plaza-tip {
  position: absolute;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #fcfcfa;
  color: var(--ink);
  font-size: 0.75rem;
  white-space: nowrap;
  box-shadow: 0 4px 12px #0002;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
/* Tips open toward the outside edge, where there is room. */
.plaza-north .plaza-tip {
  bottom: calc(100% + 0.3rem);
}
.plaza-south .plaza-tip {
  top: calc(100% + 0.3rem);
}
.plaza-shop > a:hover .plaza-tip,
.plaza-shop > a:focus-visible .plaza-tip {
  opacity: 1;
}
/* Minimal White shops. */
.plaza-shop[data-style="minimal"] .plaza-roof {
  margin: 0;
  clip-path: none;
  background: #fbfaf7;
}
.plaza-shop[data-style="minimal"] .plaza-sign {
  background: #f4f2ed;
  color: #1f1f1f;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  letter-spacing: 0.18em;
}
.plaza-shop[data-style="minimal"] .plaza-front {
  background: #eeece6;
}
.plaza-shop[data-style="minimal"] .plaza-win {
  border-radius: 0;
  background:
    linear-gradient(115deg, #0000 55%, #ffffffaa 55% 62%, #0000 62%), #f7f8f7;
  box-shadow: inset 0 0 0 2px #1f1f1f;
}
.plaza-shop[data-style="minimal"] .plaza-door {
  border-radius: 0;
  background: #1f1f1f;
}
.plaza-shop[data-style="minimal"] .plaza-logo {
  border-color: #1f1f1f;
}
/* Modern Dark shops. */
.plaza-shop[data-style="dark"] .plaza-roof {
  margin: 0;
  clip-path: none;
  background: #0d0e10;
}
.plaza-shop[data-style="dark"] .plaza-sign {
  background: #0d0e10;
  color: #ffe2ad;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  text-shadow: 0 0 4px #ffb84d;
}
.plaza-shop[data-style="dark"] .plaza-front {
  background: repeating-linear-gradient(
    90deg,
    #2a2e33 0 0.55rem,
    #1a1d20 0.55rem 0.65rem
  );
  border-bottom: 2px solid #ffcf8a;
}
.plaza-shop[data-style="dark"] .plaza-win {
  border-radius: 0;
  background: radial-gradient(ellipse at 50% 0, #ffdca088, #0000 60%), #24211e;
  box-shadow: inset 0 0 0 1px #000;
}
.plaza-shop[data-style="dark"] .plaza-door {
  border-radius: 0;
  background: #050506;
}
.plaza-shop[data-style="dark"] .plaza-logo {
  border-color: #ffd38a;
}
/* Empty lot: an invitation to open a gallery. */
.plaza-empty > a {
  grid-template-rows: 1fr;
  place-items: center;
  filter: none;
  border: 2px dashed #8e8268;
  border-radius: 6px;
  background: #ffffff59;
}
.plaza-empty .plaza-sign {
  background: none;
  color: #5f5646;
  font-family: inherit;
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
  text-align: center;
}
.plaza-empty .plaza-front {
  display: none;
}
/* Navigation: arrows over the walkway's ends, a mini map of hotspots below.
   viewer.js adds .plaza-ready; without it the walkway keeps its scrollbar. */
.plaza-view {
  position: relative;
  min-width: 0;
}
.plaza-ready .plaza-street {
  scrollbar-width: none;
}
.plaza-ready .plaza-street::-webkit-scrollbar {
  display: none;
}
.plaza-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-top: -1.375rem;
  border: 0;
  border-radius: 50%;
  background: #fcfcfaee;
  color: var(--ink);
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 10px #0003;
  transition:
    opacity 0.15s,
    transform 0.15s;
}
.plaza-arrow span {
  margin-top: -0.2rem;
}
.plaza-arrow-prev {
  left: 0.6rem;
}
.plaza-arrow-next {
  right: 0.6rem;
}
.plaza-arrow:hover:not(:disabled) {
  transform: scale(1.08);
}
.plaza-arrow:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.plaza-arrow:disabled {
  opacity: 0;
  pointer-events: none;
}
.plaza-minimap {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  min-height: 1.6rem;
  margin-inline: 1rem;
}
.plaza-track {
  display: none;
}
.plaza-ready .plaza-minimap {
  display: block;
  height: 2.1rem;
}
.plaza-ready .plaza-track {
  position: absolute;
  inset: 0.8rem 0;
  display: block;
  border-radius: 999px;
  background: #cdbfa7;
}
.plaza-window {
  position: absolute;
  top: 0.15rem;
  bottom: 0.15rem;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  pointer-events: none;
  transition: left 0.12s linear;
}
.plaza-hotspot {
  position: relative;
  display: block;
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid #fcfcfa;
  border-radius: 50%;
  background: #8c6b4f;
  box-shadow: 0 1px 3px #0004;
  transition: transform 0.15s;
}
.plaza-ready .plaza-hotspot {
  position: absolute;
  top: 50%;
  left: var(--at, 50%);
  translate: -50% -50%;
}
.plaza-ready .plaza-hotspot.plaza-north {
  top: 22%;
}
.plaza-ready .plaza-hotspot.plaza-south {
  top: 78%;
}
/* A bigger invisible target around each dot for fingers. */
.plaza-hotspot::after {
  content: "";
  position: absolute;
  inset: -0.55rem;
}
.plaza-hotspot:hover,
.plaza-hotspot:focus-visible,
.plaza-hotspot[aria-current="true"] {
  transform: scale(1.45);
  z-index: 1;
}
.plaza-hotspot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.plaza-hotspot[data-style="minimal"] {
  background: #e9e7e0;
  border-color: #8a8a84;
}
.plaza-hotspot[data-style="dark"] {
  background: #2c2c33;
}
.plaza-hotspot[data-style="classic"] {
  background: #a5713f;
}
.plaza-hotspot-gate {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 0.25rem;
  background: #1f3d35;
  border-color: #e2c27d;
}
.plaza-hotspot-open {
  background: #fcfcfa;
  border: 2px dashed #8c7a5e;
}
.plaza-hotspot-end {
  background: #94c7d8;
}
/* The shop a hotspot or arrow just brought into view. */
.plaza-shop.plaza-flash > a {
  animation: plaza-flash 1.2s ease-out;
}
@keyframes plaza-flash {
  0%,
  40% {
    transform: translateY(-6px) scale(1.06);
    filter: drop-shadow(0 0 0.5rem #ffe7a8) drop-shadow(0 5px 5px #0003);
  }
  100% {
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .plaza-shop.plaza-flash > a {
    animation: none;
    outline: 3px solid #ffe7a8;
  }
}
@media (max-width: 40rem) {
  .plaza-arrow {
    width: 2.4rem;
    height: 2.4rem;
    margin-top: -1.2rem;
    font-size: 1.6rem;
  }
}
.plaza figcaption {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}
@media (max-width: 40rem) {
  .plaza-lots {
    --shop-h: 6.6rem;
    --path-h: 3.6rem;
    --pad: 1.6rem;
    grid-auto-columns: 7rem;
    column-gap: 1rem;
  }
  /* Lamps: one per column + gap (8rem), centred in the gaps. */
  .plaza-lots::after {
    background-size: 8rem 1.1rem;
    background-position:
      4.75rem 0,
      4.75rem 100%;
  }
  .plaza-sign {
    font-size: 0.62rem;
  }
  .plaza-logo {
    width: 2.1rem;
    height: 2.1rem;
  }
  .plaza-gate span {
    font-size: 0.78rem;
  }
}

/* ---- Admin package settings ---- */
.pkg-admin-lead {
  max-width: 46rem;
  margin: 0.5rem 0 0;
  color: var(--muted);
}
.pkg-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.merchant .pkg-admin-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
}
.pkg-admin-card header,
.pkg-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.pkg-admin-card h2,
.pkg-admin-head h2 {
  margin: 0;
  font-size: 1.5rem;
}
.pkg-admin-head small {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
}
.pkg-admin-card .status-pill,
.pkg-admin-head .status-pill {
  font-size: 0.875rem;
}
.pkg-admin-price {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border-radius: 0.6rem;
  background: color-mix(in srgb, var(--accent) 7%, white);
}
.pkg-admin-price strong {
  font-size: 1.4rem;
  line-height: 1.3;
  color: var(--accent);
}
.pkg-admin-price span {
  font-size: 0.9rem;
  color: var(--muted);
}
.pkg-admin-price.is-unset {
  background: #f7f3ea;
}
.pkg-admin-price.is-unset strong {
  font-size: 1.1rem;
  color: #6b4a1f;
}
.pkg-admin-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
}
.pkg-admin-stats div {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
}
.pkg-admin-stats dt {
  font-size: 0.8rem;
  color: var(--muted);
}
.pkg-admin-stats dd {
  margin: 0;
  font-weight: 650;
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}
.pkg-admin-branding {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.pkg-admin-card-actions {
  margin-top: auto;
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  font-size: 0.9rem;
}
.merchant .pkg-admin-card-actions .button {
  margin-top: 0;
  justify-self: stretch;
  width: 100%;
}

/* Edit: form beside the current version. */
.pkg-admin-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 20rem);
  gap: 1.5rem;
  align-items: start;
}
.merchant .pkg-admin-form,
.merchant .pkg-admin-current {
  margin: 0;
}
.merchant .pkg-admin-form form {
  max-width: none;
  gap: 1.25rem;
  margin-top: 1rem;
}
.pkg-admin-current {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 1rem;
  background: #f7f8f6;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.25rem;
}
.pkg-admin-current h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
}
.pkg-admin-current .pkg-admin-stats {
  grid-template-columns: 1fr;
}
.pkg-admin-current .pkg-admin-stats div {
  background: white;
}
.merchant .pkg-fieldset {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 1rem 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.merchant .pkg-fieldset label {
  display: grid;
  gap: 0.35rem;
  align-items: start;
}
.pkg-fieldset legend {
  padding: 0 0.5rem 0 0;
  font-weight: 650;
  font-size: 1.05rem;
}
.pkg-fieldset .subtle {
  margin: -0.25rem 0 0;
  font-size: 0.875rem;
}
.pkg-field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 1rem;
}
.pkg-input-unit,
.pkg-input-money {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--muted);
  border-radius: 0.4rem;
  background: white;
  overflow: hidden;
}
.pkg-input-unit:focus-within,
.pkg-input-money:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.merchant .pkg-input-unit input,
.merchant .pkg-input-money input {
  border: 0;
  border-radius: 0;
  min-width: 0;
  outline: none;
}
.pkg-input-unit > span,
.pkg-input-money > span {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  background: #f4f6f5;
  color: var(--muted);
  white-space: nowrap;
}
.pkg-input-money > span:first-child {
  border-right: 1px solid var(--line);
}
.pkg-input-suffix {
  border-left: 1px solid var(--line);
}
.pkg-segmented {
  display: inline-flex;
  justify-self: start;
  padding: 0.25rem;
  gap: 0.25rem;
  border-radius: 999px;
  background: #eef1ef;
}
.merchant .pkg-segmented label {
  display: block;
  cursor: pointer;
}
.pkg-segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.pkg-segmented span {
  display: block;
  padding: 0.3rem 1rem;
  border-radius: 999px;
  color: var(--muted);
}
.pkg-segmented input:checked + span {
  background: white;
  color: var(--accent);
  font-weight: 650;
  box-shadow: 0 1px 3px rgb(0 0 0 / 12%);
}
.pkg-segmented input:focus-visible + span {
  outline: 2px solid var(--accent);
}
/* The yearly price only applies to a monthly price; the suffix follows. */
.pkg-when-year,
.package-price-fields:has(input[value="year"]:checked) .pkg-when-month,
.package-price-fields:has(input[value="year"]:checked) .pkg-yearly-field {
  display: none;
}
.package-price-fields:has(input[value="year"]:checked) .pkg-when-year {
  display: inline;
}
.pkg-yearly-field {
  display: grid;
  gap: 0.75rem;
}
.pkg-admin-note {
  margin: 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, white);
  font-size: 0.9rem;
}

/* Review: changed rows stand out. */
.merchant .pkg-admin-review {
  display: grid;
  gap: 1rem;
  max-width: 46rem;
}
.pkg-review-scroll {
  overflow-x: auto;
}
.package-review thead th {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}
.package-review tbody tr:not(.is-changed) td {
  color: var(--muted);
}
.package-review tr.is-changed {
  background: color-mix(in srgb, var(--accent) 6%, white);
}
.package-review tr.is-changed td:last-child {
  font-weight: 650;
  color: var(--accent);
}
.pkg-changed-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
}
.merchant .pkg-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: none;
}
.merchant .pkg-admin-actions .button {
  margin-top: 0;
}

@media (max-width: 760px) {
  .pkg-admin-edit {
    grid-template-columns: 1fr;
  }
  .pkg-admin-current {
    position: static;
    order: -1;
  }
}

/* ---- Admin package version history ---- */
.pkg-history {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0 0 0 1.5rem;
  border-left: 2px solid var(--line);
  display: grid;
  gap: 1.25rem;
  max-width: 48rem;
}
.pkg-history-item {
  position: relative;
  background: white;
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1.1rem 1.25rem;
}
.pkg-history-item::before {
  content: "";
  position: absolute;
  left: calc(-1.5rem - 7px);
  top: 1.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--muted);
}
.pkg-history-item.is-active {
  border-color: var(--accent);
}
.pkg-history-item.is-active::before {
  background: var(--accent);
  border-color: var(--accent);
}
.pkg-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.pkg-history-head h2 {
  margin: 0;
  font-size: 1.2rem;
}
.pkg-history-item.is-active .status-pill {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.pkg-history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0.35rem 0 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.pkg-history-changes {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pkg-history-changes li {
  display: grid;
  grid-template-columns: minmax(8rem, 12rem) 1fr;
  gap: 0.75rem;
  padding: 0.4rem 0.6rem;
  border-radius: 0.4rem;
  background: #f7f8f6;
}
.pkg-history-field {
  color: var(--muted);
  font-size: 0.9rem;
}
.pkg-history-diff {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.pkg-history-diff del {
  color: var(--muted);
}
.pkg-history-diff ins {
  text-decoration: none;
  font-weight: 650;
  color: var(--accent);
}
.pkg-history-first {
  margin: 0 0 0.5rem;
  font-weight: 600;
}
.pkg-history-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.4rem;
  margin: 0;
}
.pkg-history-values dt {
  font-size: 0.8rem;
  color: var(--muted);
}
.pkg-history-values dd {
  margin: 0;
  font-weight: 600;
}
@media (max-width: 560px) {
  .pkg-history-changes li {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }
}

/* Platform Admin shortcut from /packages to the package settings. */
.package-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.5rem;
}
.package-card-head h2 {
  margin: 0;
}
.package-card-edit {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
}
.package-card-edit svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.package-card-edit:hover,
.package-card-edit:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---- Room names (DEC-104/157) ---- */
.room-names form {
  max-width: none;
}
.merchant .room-name {
  display: grid;
  gap: 0.5rem;
}
.room-name legend {
  font-weight: 650;
}
/* Names on the first row, notes on the second: Thai left, English right. */
.room-name-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (max-width: 600px) {
  .room-name-fields {
    grid-template-columns: 1fr;
  }
}
.merchant .room-name-fields label {
  display: grid;
  gap: 0.3rem;
}

/* Store card: template and contract (package, period, paid through). */
.store-card-facts {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  font-size: 0.9rem;
}
.store-card-facts div {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.5rem;
}
.store-card-facts dt {
  color: var(--muted);
}
.store-card-facts dd {
  margin: 0;
}
