@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Libre+Caslon+Display&display=swap');
.unifrakturcook-bold {
            font-family: "UnifrakturCook", cursive;
            font-weight: 700;
            font-style: normal;
        }

:root {
  font-family: 'DM Sans',sans-serif;
  color: #283127;
  background: #f4f2eb;
  --green: #007a71;
  --red: #c72d32;
  --line: #d5d7ca;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

button,input {
  font: inherit;
}

button {
  cursor: pointer;
  color: inherit;
}

button:focus-visible,input:focus-visible,[tabindex]:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

button {
  touch-action: manipulation;
}

a {
  color: inherit;
}

[hidden] {
  display: none!important;
}

.header {
  padding: 24px 4%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 10px;
  font-weight: 600;
}

.brand h1 {
  font: 40px 'UnifrakturCook',Georgia,serif;
  letter-spacing: -1px;
  margin: 7px 0 0;
}

.brand em {
  color: var(--green);
}

.floor-toggle {
  display: flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  gap: 4px;
}

.floor-toggle button {
  border: 0;
  background: transparent;
  padding: 13px 24px;
  border-radius: 3px;
  font-size: 13px;
}

.floor-toggle button[aria-pressed=true] {
  background: var(--green);
  color: white;
}

main {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 4%;
  background: #fff;
}

.map-caption {
  display: flex;
  justify-content: space-between;
  padding: 20px 0 12px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #70766a;
}

#viewport {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  position: relative;
}

#canvas {
  position: relative;
  margin: 0 auto;
  max-width: none;
}

#plan {
  display: block;
  width: 100%;
  height: 100%;
}

#pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pin {
  pointer-events: auto;
  position: absolute;
  transform: translate(-50%,-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid white;
  background: var(--green);
  color: white;
  box-shadow: 0 0 0 1px var(--green);
  font-size: 11px;
  font-weight: 700;
  padding: 0;
  z-index: 1;
}

.pin:hover {
  box-shadow: 0 0 0 5px #30493622;
  z-index: 3;
}

.pin[aria-pressed=true] {
  background: var(--red);
  box-shadow: 0 0 0 5px #c72d3226;
  border-color: white;
  z-index: 2;
}

.zoom {
  position: absolute;
  left: 5%;
  bottom: 57px;
  display: flex;
  background: #f4f2eb;
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: 0 3px 12px #0000000a;
  z-index: 4;
}

.zoom button {
  min-width: 44px;
  height: 44px;
  background: none;
  border: 0;
  font-size: 18px;
}

.zoom #reset {
  font-size: 12px;
  border-inline: 1px solid var(--line);
}

#status {
  font-size: 12px;
  line-height: 1.5;
  min-height: 18px;
  margin: 12px 0;
  color: #64705f;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 4%;
  border-top: 1px solid var(--line);
  padding-bottom: max(15px,env(safe-area-inset-bottom));
}

.footer>div {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.legend-dot {
  background: var(--green);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.footer.has-selection .legend-dot {
  background: var(--red);
}

#open-artists {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  padding: 15px 22px;
  background: var(--green);
  color: #fff;
  border: 0;
  border-radius: 3px;
  font-size: 14px;
}

dialog {
  border: 1px solid var(--line);
  background: #f4f2eb;
  color: #283127;
  border-radius: 12px;
  box-shadow: 0 20px 100px #0003;
  padding: 30px;
  width: min(520px,calc(100% - 28px));
  max-height: 85dvh;
  overflow: auto;
}

dialog::backdrop {
  background: #17201766;
  backdrop-filter: blur(3px);
}

.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.close {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 26px;
}

.dialog-heading h2,dialog>h2 {
  font: 43px 'Libre Caslon Display',Georgia,serif;
  line-height: 1.05;
  margin: 12px 0 20px;
}

#search {
  width: 100%;
  padding: 15px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
  margin-top: 12px;
}

.muted {
  color: #687260;
  font-size: 12px;
  line-height: 1.6;
}

.artist-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.artist-row[aria-pressed=true] {
  color: var(--red);
}

.artist-row .number {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 11px;
}

.artist-row strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.artist-row small {
  display: block;
  font-size: 11px;
  color: #687260;
  margin-top: 5px;
}

.artist-row .arrow {
  margin-left: auto;
}

#piece-title {
  font-family: Georgia,serif;
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  margin: 24px 0 12px;
}

#piece-info {
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-line;
}

.credit {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 22px;
}

.credit p {
  font-size: 14px;
  margin: 10px 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.noscript {
  font-size: 13px;
}

@media(max-width:650px) {
  .header {
    padding: 18px 5% 14px;
    flex-direction: column;
    gap: 17px;
    align-items: stretch;
  }
  .brand {
    text-align: center;
  }
  .brand h1 {
    font-size: 34px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .floor-toggle {
    align-self: center;
  }
  .floor-toggle button {
    padding: 11px 28px;
  }
  .map-caption {
    padding-top: 16px;
    letter-spacing: .7px;
    font-size: 9px;
  }
  .footer {
    padding: 12px 5%;
    gap: 12px;
  }
  .footer>div {
    font-size: 11px;
    line-height: 1.4;
    max-width: 52%;
  }
  #open-artists {
    padding: 14px 20px;
    gap: 25px;
  }
  #status {
    font-size: 11px;
    margin: 9px 0;
  }
  .zoom {
    bottom: 58px;
  }
  .pin {
    width: 27px;
    height: 27px;
    font-size: 10px;
  }
  dialog {
    padding: 24px;
  }
  #artists-dialog {
    margin: auto auto 12px;
    max-height: 80dvh;
  }
  .dialog-heading h2,dialog>h2 {
    font-size: 38px;
  }
}

@media(prefers-reduced-motion:no-preference) {
  button {
    transition: background .15s,box-shadow .15s;
  }
  dialog[open] {
    animation: appear .15s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Compact dots keep nearby works distinct; artist numbers remain in the list. */

.pin {
  width: 14px;
  height: 14px;
  font-size: 0;
  border-width: 2px;
  box-shadow: 0 0 0 1px #30493655;
}

.pin[aria-pressed=true] {
  box-shadow: 0 0 0 3px #c72d3226;
}

.pin:focus-visible {
  outline-offset: 4px;
}

#editor-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#editor-controls button,#edit-form button {
  padding: 11px 14px;
  background: var(--green);
  color: white;
  border: 0;
  border-radius: 4px;
  font-size: 12px;
}

#editor-controls button:disabled {
  opacity: .45;
  cursor: default;
}

#edit-toggle[aria-pressed=true] {
  background: #a22a30;
}

.editing .pin {
  cursor: grab;
  touch-action: none;
  width: 20px;
  height: 20px;
}

.editing .pin:active {
  cursor: grabbing;
}

#edit-form {
  display: grid;
  gap: 18px;
}

#edit-form label {
  display: grid;
  gap: 8px;
  font-size: 13px;
}

#edit-form input,#edit-form textarea,#edit-form select {
  font: inherit;
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 4px;
}

@media(max-width:650px) {
  #editor-controls {
    justify-content: center;
  }
  .editing .header {
    gap: 10px;
  }
}

.footer .footer-actions {
  display: flex;
  gap: 10px;
  max-width: none;
  flex-shrink: 0;
}

#open-curators {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  padding: 15px 22px;
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: 3px;
  font-size: 14px;
}

#curator-search {
  width: 100%;
  padding: 15px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
  margin-top: 12px;
}

#curator-list small {
  line-height: 1.6;
}

@media(max-width:650px) {
  .footer {
    flex-wrap: wrap;
  }
  .footer>div:first-child {
    max-width: 100%;
    width: 100%;
  }
  .footer .footer-actions {
    width: 100%;
  }
  .footer-actions button {
    flex: 1;
  }
  #open-artists,#open-curators {
    padding: 12px 18px;
    gap: 20px;
  }
  #curators-dialog {
    margin: auto auto 12px;
    max-height: 80dvh;
  }
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 20px;
}

.profile-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--green);
  text-decoration: none;
}

.profile-links svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-links a:hover {
  background: #e5e9df;
}

.profile-links a:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

#edit-form fieldset {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  min-width: 0;
}

#edit-form legend {
  font-size: 12px;
  padding: 0 6px;
}

#add-dot-form {
  display: grid;
  gap: 14px;
}

#dot-artist {
  font: inherit;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
}

.add-dot-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.add-dot-actions button {
  padding: 13px 16px;
  border: 1px solid var(--green);
  border-radius: 4px;
  background: var(--green);
  color: white;
  font-size: 13px;
}

#add-at-center {
  background: transparent;
  color: var(--green);
}

.placing-dot #canvas {
  cursor: crosshair;
}

.placing-dot #viewport {
  outline: 2px dashed var(--green);
  outline-offset: -3px;
}

.placing-dot .pin {
  cursor: default;
}
