:root {
  color-scheme: light;
  --clay: #c98968;
  --khaki: #d8d4b8;
  --ink: #332c25;
  --ink-soft: #65594c;
  --line: rgba(51, 44, 37, 0.24);
  --paper: #ede4d2;
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "DM Sans", sans-serif;
  --mono: "DM Mono", monospace;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background-color: var(--clay);
  background-image: repeating-linear-gradient(113deg, transparent 0, transparent 18px, rgba(89, 53, 38, 0.035) 19px, transparent 20px), repeating-linear-gradient(23deg, transparent 0, transparent 33px, rgba(255, 244, 222, 0.055) 34px, transparent 35px);
}
button, input { font: inherit; }
a { color: inherit; }

.page-shell { width: min(100% - 40px, 1060px); margin: 0 auto; }
.search-intro {
  width: min(100%, 610px);
  margin: 0 auto;
  padding: clamp(72px, 12vw, 132px) 0 74px;
  text-align: center;
  animation: rise-in 600ms ease both;
}
.search-form {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 6px;
  border: 1px solid rgba(51, 44, 37, 0.56);
  background: rgba(242, 232, 211, 0.42);
  box-shadow: 5px 5px 0 rgba(75, 47, 33, 0.13);
  text-align: left;
}
.input-prefix { padding: 0 13px; color: var(--ink-soft); border-right: 1px solid var(--line); font-family: var(--mono); font-size: 11px; }
.search-form input {
  min-width: 0;
  height: 100%;
  flex: 1;
  padding: 0 16px;
  color: var(--ink);
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 17px;
  text-transform: uppercase;
}
.search-form input::placeholder { color: rgba(51, 44, 37, 0.52); }
.search-form:focus-within { outline: 2px solid var(--ink); outline-offset: 3px; }
.search-button {
  width: 50px;
  min-width: 50px;
  height: 50px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  color: var(--paper);
  border: 0;
  background: var(--ink);
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease;
}
.search-button:hover { background: #4a3e32; transform: translateY(-1px); }
.search-button:disabled { cursor: wait; opacity: 0.7; }
.search-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.search-hint { margin: 13px 0 0; font-family: var(--mono); font-size: 10px; color: rgba(51, 44, 37, 0.72); }

.feedback { width: min(100%, 610px); margin: -39px auto 56px; padding: 15px 18px; border-left: 3px solid var(--ink); background: rgba(242, 232, 211, 0.42); font-size: 14px; animation: rise-in 240ms ease both; }
.feedback[hidden], .result[hidden] { display: none; }
.feedback.is-error, .feedback.is-not-found { border-left-color: #712e27; }
.is-loading::after { content: ""; width: 9px; height: 9px; display: inline-block; margin-left: 10px; border: 1px solid var(--ink); border-right-color: transparent; border-radius: 50%; animation: spin 650ms linear infinite; }

.result { margin: 0 auto 80px; padding-top: 2px; animation: rise-in 420ms ease both; scroll-margin-top: 26px; }
.result-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; padding: 0 0 22px; border-bottom: 1px solid var(--line); }
.result-title { max-width: 650px; margin: 7px 0 0; font-family: var(--serif); font-size: clamp(30px, 5vw, 45px); font-weight: 400; line-height: 1.12; }
.location-label { flex: none; margin: 0 0 5px; font-family: var(--mono); font-size: 11px; }
.image-pair { display: grid; grid-template-columns: 1fr 0.72fr; align-items: start; gap: clamp(20px, 4vw, 52px); padding: 27px 0 37px; }
.image-figure { min-width: 0; margin: 0; }
.image-frame { min-height: 245px; display: grid; place-items: center; overflow: hidden; background-color: rgba(239, 229, 210, 0.72); }
.layout-figure .image-frame { min-height: 315px; background-color: rgba(229, 216, 193, 0.72); }
.image-frame img { width: 100%; height: 100%; max-height: 500px; display: block; object-fit: contain; }
.tile-figure .image-frame img { max-height: 410px; }
.image-missing { padding: 25px; color: var(--ink-soft); font-family: var(--mono); font-size: 11px; }
.image-caption { display: flex; justify-content: space-between; padding-top: 11px; font-family: var(--mono); font-size: 10px; }
.image-label { letter-spacing: 0.09em; }

.glaze-summary { padding-top: 23px; border-top: 1px solid var(--line); }
.glaze-list { display: grid; gap: 8px; margin: 13px 0 0; padding-left: 25px; font-family: var(--mono); font-size: 15px; }
.glaze-list li { padding-left: 5px; }
.glaze-list li::marker { font-size: 12px; }

.site-footer { display: flex; justify-content: flex-start; padding: 18px 0 24px; border-top: 1px solid var(--line); color: rgba(51, 44, 37, 0.72); font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; }
.site-footer { align-items: flex-end; justify-content: space-between; }
.footer-stamp { width: 56px; height: 56px; object-fit: contain; mix-blend-mode: multiply; }
.instagram-link { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-family: var(--mono); font-size: 12px; }
.instagram-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.instagram-icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.instagram-dot { fill: currentColor; stroke: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 680px) {
  .page-shell { width: min(100% - 36px, 1060px); }
  .search-intro { padding: 66px 0 67px; }
  .search-form { height: 59px; }
  .search-button { width: 45px; min-width: 45px; height: 45px; }
  .input-prefix { padding-inline: 10px; }
  .search-form input { padding-inline: 12px; }
  .feedback { margin-top: -33px; }
  .result-heading { display: block; }
  .location-label { margin-top: 13px; }
  .image-pair { grid-template-columns: 1fr; gap: 23px; padding-top: 20px; }
  .image-frame, .layout-figure .image-frame, .tile-figure .image-frame { min-height: 0; aspect-ratio: 1.22; }
  .image-frame img, .tile-figure .image-frame img { max-height: 100%; }
  .glaze-list { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
