:root {
  --bg: #f2ede5;
  --surface: #faf7f2;
  --surface-2: #e9e0d4;
  --text: #2c2823;
  --muted: #756c62;
  --line: #d8cfc3;
  --accent: #9a7855;
  --accent-hover: #826344;
  --accent-soft: #e8dccd;
  --accent-text: #fffaf4;
  --shadow: 0 18px 50px rgba(61, 50, 39, 0.08);
  --shadow-soft: 0 8px 26px rgba(61, 50, 39, 0.06);
  --radius: 22px;
  --max-width: 820px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(
      circle at top right,
      rgba(154, 120, 85, 0.11),
      transparent 30rem
    ),
    radial-gradient(
      circle at 8% 30%,
      rgba(214, 196, 176, 0.2),
      transparent 24rem
    ),
    var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.topbar {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #876747;
  border-radius: 10px;
  background: var(--accent);
  box-shadow: var(--shadow-soft);
  color: var(--accent-text);
  font-weight: 900;
}

.brand strong {
  color: var(--accent-hover);
}

.page-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 28px 0 70px;
}

.hero,
.museum-hero {
  padding: 56px 0 38px;
}

.eyebrow,
.section-label,
.card-kicker,
.exhibit-index {
  color: var(--accent-hover);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  color: #29241f;
  font-size: clamp(40px, 9vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

h2 {
  margin-bottom: 8px;
  color: #302a25;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.lead {
  max-width: 650px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: clamp(17px, 3vw, 20px);
}

.primary-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: var(--shadow-soft);
  color: var(--accent-text);
  font-weight: 800;
  text-decoration: none;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.primary-button:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.demo-grid {
  display: grid;
  gap: 18px;
}

.demo-card,
.audio-panel,
.qr-inline,
.description {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(250, 247, 242, 0.94);
  box-shadow: var(--shadow-soft);
}

.demo-card {
  padding: 24px;
}

.demo-card p,
.audio-panel p,
.qr-inline p {
  color: var(--muted);
}

.qr-wrap {
  display: flex;
  margin: 24px 0;
  justify-content: center;
}

.qr-image {
  display: block;
  width: min(220px, 70vw);
  padding: 12px;
  border: 1px solid #e5ded5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(61, 50, 39, 0.07);
}

.qr-small {
  width: 132px;
  flex: 0 0 auto;
}

.text-link,
.back-link {
  color: var(--accent-hover);
  font-weight: 750;
  text-decoration: none;
}

.text-link:hover,
.back-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.demo-note {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.audio-panel {
  display: grid;
  gap: 20px;
  margin: 18px 0 42px;
  padding: 24px;
}

.audio-panel.compact {
  margin: 22px 0;
}

.audio-player {
  width: 100%;
  min-width: 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: 30px;
}

.count-badge {
  display: grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  box-shadow: var(--shadow-soft);
}

.exhibit-list {
  display: grid;
  gap: 10px;
}

.exhibit-card {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(61, 50, 39, 0.035);
  text-decoration: none;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.exhibit-card:hover {
  transform: translateY(-2px);
  border-color: #bea98f;
  box-shadow: var(--shadow-soft);
}

.exhibit-number {
  color: var(--accent-hover);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.exhibit-copy {
  display: grid;
}

.exhibit-copy small {
  margin-top: 2px;
  color: var(--muted);
}

.arrow {
  color: var(--accent);
  font-size: 24px;
}

.qr-inline {
  display: flex;
  gap: 22px;
  align-items: center;
  justify-content: space-between;
  margin-top: 42px;
  padding: 22px;
}

.back-link {
  display: inline-block;
  margin: 8px 0 30px;
}

.exhibit-detail h1 {
  margin-top: 14px;
}

.image-placeholder {
  display: grid;
  min-height: 260px;
  margin: 18px 0 24px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(
      circle at 35% 25%,
      rgba(154, 120, 85, 0.18),
      transparent 17rem
    ),
    linear-gradient(145deg, #eee5da, #ddd0c0);
  box-shadow: var(--shadow);
}

.image-placeholder span {
  color: rgba(87, 68, 49, 0.13);
  font-size: 120px;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.hero-image {
  display: block;
  width: 100%;
  max-height: 520px;
  margin: 18px 0 24px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.description {
  padding: 24px;
}

.description p {
  margin: 10px 0 0;
  color: #463f38;
  font-size: 17px;
}

.footer {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

@media (min-width: 720px) {
  .demo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audio-panel {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
    align-items: center;
  }
}

@media (max-width: 560px) {
  .page-shell {
    padding-top: 8px;
  }

  .hero,
  .museum-hero {
    padding-top: 30px;
  }

  .qr-inline {
    align-items: flex-start;
    flex-direction: column;
  }

  .qr-small {
    width: min(180px, 65vw);
  }
}

/* -------------------------------------------------------------------------- */
/* Admin                                                                      */
/* -------------------------------------------------------------------------- */

.admin-header {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 38px 0 28px;
}

.compact-header {
  padding-top: 10px;
}

.admin-header h1 {
  margin-top: 7px;
}

.admin-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.admin-toolbar .back-link {
  margin: 0;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-row {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(61, 50, 39, 0.035);
  text-decoration: none;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.admin-row:hover {
  transform: translateY(-2px);
  border-color: #bea98f;
  box-shadow: var(--shadow-soft);
}

.admin-row > div {
  min-width: 0;
}

.admin-row strong,
.admin-row small {
  display: block;
}

.admin-row small {
  margin-top: 4px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.admin-row-main {
  display: flex;
  gap: 16px;
  align-items: center;
}

.admin-position {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 13px;
  font-weight: 800;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #b8afa5;
  vertical-align: 1px;
}

.status-dot.published {
  background: #6e8061;
}

.admin-form {
  display: grid;
  gap: 20px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(250, 247, 242, 0.96);
  box-shadow: var(--shadow-soft);
}

.admin-form label {
  display: grid;
  gap: 8px;
}

.admin-form label > span {
  color: #51483f;
  font-size: 13px;
  font-weight: 750;
}

.admin-form input:not([type="checkbox"]),
.admin-form textarea {
  width: 100%;
  border: 1px solid #d6cabd;
  border-radius: 14px;
  outline: none;
  background: #fffdf9;
  color: var(--text);
  font: inherit;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.admin-form input:not([type="checkbox"]) {
  min-height: 50px;
  padding: 0 14px;
}

.admin-form input[type="file"] {
  padding: 12px 14px;
}

.admin-form textarea {
  min-height: 120px;
  padding: 13px 14px;
  resize: vertical;
}

.admin-form input:focus,
.admin-form textarea:focus {
  border-color: #aa8b68;
  box-shadow: 0 0 0 4px rgba(154, 120, 85, 0.12);
}

.admin-form small {
  color: var(--muted);
  font-size: 12px;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.checkbox-row {
  display: flex !important;
  gap: 10px !important;
  align-items: center;
  width: fit-content;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 6px;
}

.button-reset {
  cursor: pointer;
  font: inherit;
}

.secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(250, 247, 242, 0.8);
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  transition:
    background 150ms ease,
    border-color 150ms ease;
}

.secondary-button:hover {
  border-color: #bea98f;
  background: #fffaf4;
}

.small-button {
  min-height: 44px;
  padding-inline: 17px;
  font-size: 14px;
}

.admin-section {
  margin-top: 48px;
}

.admin-section-heading {
  align-items: center;
}

.admin-qr {
  margin-top: 34px;
}

.mono-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  word-break: break-all;
}

.empty-state {
  padding: 32px;
  border: 1px dashed #cdbfab;
  border-radius: 18px;
  background: rgba(250, 247, 242, 0.55);
  text-align: center;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
}

@media (min-width: 720px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-section-heading {
    align-items: flex-start;
    gap: 16px;
    flex-direction: column;
  }

  .admin-form {
    padding: 20px;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions .primary-button,
  .form-actions .secondary-button {
    width: 100%;
  }
}

.success-banner {
  margin: 12px 0 18px;
  padding: 16px 18px;
  border: 1px solid #c9b798;
  border-radius: 16px;
  background: #f3eadc;
  color: #514535;
  box-shadow: var(--shadow-soft);
}

.success-banner strong {
  color: #6f5437;
}

.qr-actions {
  display: grid;
  gap: 12px;
  justify-items: center;
  flex: 0 0 auto;
}

.qr-actions small {
  max-width: 180px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 560px) {
  .qr-actions {
    width: 100%;
    justify-items: stretch;
  }

  .qr-actions .qr-image {
    justify-self: start;
  }

  .qr-actions .primary-button {
    width: 100%;
  }

  .qr-actions small {
    max-width: none;
    text-align: left;
  }
}

.admin-row {
  padding: 0;
  overflow: hidden;
}

.admin-row-link {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  color: inherit;
  text-decoration: none;
}

.qr-download-mini {
  display: inline-flex;
  min-height: 100%;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border-left: 1px solid var(--line);
  background: #f5eee5;
  color: var(--accent-hover);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background 150ms ease;
}

.qr-download-mini:hover {
  background: var(--accent-soft);
}

@media (max-width: 560px) {
  .admin-row {
    align-items: stretch;
    flex-direction: column;
  }

  .qr-download-mini {
    min-height: 44px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

/* -------------------------------------------------------------------------- */
/* Public landing sections                                                    */
/* -------------------------------------------------------------------------- */

.landing-section {
  margin-top: 78px;
}

.landing-section-heading {
  max-width: 650px;
  margin-bottom: 26px;
}

.landing-section-heading h2 {
  margin-top: 8px;
  margin-bottom: 12px;
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.landing-section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
}

.steps-grid {
  display: grid;
  gap: 14px;
}

.step-card {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(250, 247, 242, 0.82);
  box-shadow: var(--shadow-soft);
}

.step-number {
  display: inline-block;
  margin-bottom: 34px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.step-card h3 {
  margin: 0 0 8px;
  color: #302a25;
  font-size: 22px;
  letter-spacing: -0.025em;
}

.step-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
}

.value-section {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: #e8ded1;
  box-shadow: var(--shadow-soft);
}

.value-grid {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(121, 99, 75, 0.15);
  border-radius: 18px;
  background: rgba(121, 99, 75, 0.13);
}

.value-item {
  display: grid;
  gap: 5px;
  padding: 20px;
  background: rgba(250, 247, 242, 0.74);
}

.value-item strong {
  color: #3a3129;
  font-size: 15px;
}

.value-item span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.audience-strip {
  margin-top: 58px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.audience-strip p {
  max-width: 700px;
  margin: 10px 0 0;
  color: #51483f;
  font-size: 17px;
  line-height: 1.8;
}

.landing-cta {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  margin-top: 58px;
  padding: 34px;
  border: 1px solid #cdbca8;
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(
      circle at 85% 20%,
      rgba(154, 120, 85, 0.17),
      transparent 18rem
    ),
    #f7f1e9;
  box-shadow: var(--shadow);
}

.landing-cta h2 {
  margin-top: 7px;
  margin-bottom: 10px;
  font-size: clamp(28px, 5vw, 38px);
  letter-spacing: -0.035em;
}

.landing-cta p {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
}

.landing-cta .primary-button {
  flex: 0 0 auto;
}

@media (min-width: 720px) {
  .steps-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .value-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .landing-section {
    margin-top: 56px;
  }

  .value-section {
    padding: 24px 18px;
  }

  .landing-cta {
    align-items: flex-start;
    flex-direction: column;
    padding: 26px 22px;
  }

  .landing-cta .primary-button {
    width: 100%;
  }
}

/* -------------------------------------------------------------------------- */
/* Internal admin authentication                                              */
/* -------------------------------------------------------------------------- */

.login-shell {
  display: grid;
  min-height: calc(100vh - 210px);
  place-items: center;
  padding: 42px 0 70px;
}

.login-card {
  width: min(100%, 520px);
}

.login-card h1 {
  margin-top: 8px;
  font-size: clamp(42px, 8vw, 62px);
}

.login-form {
  margin-top: 26px;
}

.login-error {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid #c9a799;
  border-radius: 14px;
  background: #f4e4df;
  color: #70483d;
  font-size: 14px;
  font-weight: 700;
}

.admin-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-header-actions form {
  margin: 0;
}

@media (max-width: 620px) {
  .admin-header-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .admin-header-actions .primary-button,
  .admin-header-actions .secondary-button {
    width: 100%;
  }
}

/* -------------------------------------------------------------------------- */
/* Draft → publish workflow                                                   */
/* -------------------------------------------------------------------------- */

.draft-badge {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #cdbca8;
  border-radius: 999px;
  background: #eee5da;
  color: #735a40;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.error-banner {
  margin: 12px 0 18px;
  padding: 16px 18px;
  border: 1px solid #d4aaa0;
  border-radius: 16px;
  background: #f5e6e2;
  color: #70483d;
  box-shadow: var(--shadow-soft);
}

.error-banner strong {
  color: #60372f;
}

.draft-info {
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid #d6c4aa;
  border-radius: 14px;
  background: #f4ecdf;
  color: #685640;
  font-size: 14px;
}

.admin-section-copy {
  max-width: 540px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.admin-row-actions {
  display: flex;
  align-self: stretch;
  align-items: stretch;
  flex: 0 0 auto;
}

.admin-row-actions form {
  display: flex;
  margin: 0;
}

.admin-row-actions .qr-download-mini {
  border-left: 1px solid var(--line);
}

.danger-mini {
  min-width: 72px;
  border: 0;
  border-left: 1px solid #ddc8c1;
  background: #f6ebe8;
  color: #895448;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  transition: background 150ms ease;
}

.danger-mini:hover {
  background: #efd8d2;
}

.finalize-card,
.published-tools {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  margin-top: 48px;
  padding: 30px;
  border: 1px solid #cbb697;
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(
      circle at 90% 15%,
      rgba(154, 120, 85, 0.16),
      transparent 18rem
    ),
    #f7f0e6;
  box-shadow: var(--shadow);
}

.finalize-card h2,
.published-tools h2 {
  margin-top: 7px;
  margin-bottom: 10px;
  font-size: clamp(28px, 5vw, 38px);
  letter-spacing: -0.035em;
}

.finalize-card p,
.published-tools p {
  max-width: 560px;
  margin-bottom: 0;
  color: var(--muted);
}

.finalize-card form {
  flex: 0 0 auto;
  margin: 0;
}

.finalize-button {
  min-width: 260px;
}

.published-tools-copy {
  min-width: 0;
}

.published-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.record-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
}

.record-actions form {
  margin: 0;
}

.danger-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid #d9b7ae;
  border-radius: 999px;
  background: #f7e9e5;
  color: #875043;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
}

.danger-button:hover {
  background: #efd8d2;
}

@media (max-width: 680px) {
  .finalize-card,
  .published-tools {
    align-items: stretch;
    flex-direction: column;
    padding: 24px 20px;
  }

  .finalize-card form,
  .finalize-button,
  .published-actions .primary-button,
  .published-actions .secondary-button {
    width: 100%;
  }

  .published-actions {
    flex-direction: column;
  }

  .record-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .record-actions .secondary-button,
  .record-actions .danger-button {
    width: 100%;
  }

  .admin-row-actions {
    width: 100%;
    border-top: 1px solid var(--line);
  }

  .admin-row-actions .qr-download-mini,
  .admin-row-actions form,
  .admin-row-actions .danger-mini {
    flex: 1 1 0;
  }

  .admin-row-actions .qr-download-mini,
  .danger-mini {
    min-height: 44px;
    border-top: 0;
  }

  .admin-row-actions .qr-download-mini {
    border-left: 0;
  }
}

/* -------------------------------------------------------------------------- */
/* Complete object builder                                                    */
/* -------------------------------------------------------------------------- */

.admin-header-actions {
  flex-wrap: nowrap;
}

.admin-header-actions .primary-button,
.add-exhibit-button {
  white-space: nowrap;
}

.object-builder-heading {
  padding-bottom: 20px;
}

.object-builder-form {
  display: grid;
  gap: 44px;
}

.builder-section {
  display: grid;
  gap: 18px;
}

.builder-section-header {
  display: flex;
  gap: 22px;
  align-items: end;
  justify-content: space-between;
}

.builder-section-header h2 {
  margin: 6px 0 8px;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.builder-section-header p {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
}

.builder-card {
  margin: 0;
}

.builder-exhibits {
  display: grid;
  gap: 16px;
}

.builder-exhibit {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(250, 247, 242, 0.96);
  box-shadow: var(--shadow-soft);
}

.builder-exhibit-header {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #f3ebdf;
}

.builder-exhibit-title {
  display: flex;
  gap: 14px;
  align-items: center;
}

.builder-exhibit-title h3 {
  margin: 2px 0 0;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.builder-exhibit-fields {
  display: grid;
  gap: 20px;
  padding: 24px;
}

.builder-exhibit-fields label {
  display: grid;
  gap: 8px;
}

.builder-exhibit-fields label > span {
  color: #51483f;
  font-size: 13px;
  font-weight: 750;
}

.builder-exhibit-fields input,
.builder-exhibit-fields textarea {
  width: 100%;
  border: 1px solid #d6cabd;
  border-radius: 14px;
  outline: none;
  background: #fffdf9;
  color: var(--text);
  font: inherit;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.builder-exhibit-fields input {
  min-height: 50px;
  padding: 0 14px;
}

.builder-exhibit-fields input[type="file"] {
  padding: 12px 14px;
}

.builder-exhibit-fields textarea {
  min-height: 120px;
  padding: 13px 14px;
  resize: vertical;
}

.builder-exhibit-fields input:focus,
.builder-exhibit-fields textarea:focus {
  border-color: #aa8b68;
  box-shadow: 0 0 0 4px rgba(154, 120, 85, 0.12);
}

.remove-exhibit-button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #d8b8af;
  border-radius: 999px;
  background: #f8ece8;
  color: #875043;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.remove-exhibit-button:hover:not(:disabled) {
  background: #efd9d3;
}

.remove-exhibit-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.builder-final {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  padding: 32px;
  border: 1px solid #cbb697;
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(
      circle at 90% 15%,
      rgba(154, 120, 85, 0.16),
      transparent 18rem
    ),
    #f7f0e6;
  box-shadow: var(--shadow);
}

.builder-final h2 {
  margin: 7px 0 10px;
  font-size: clamp(30px, 5vw, 40px);
  letter-spacing: -0.04em;
}

.builder-final p {
  max-width: 570px;
  margin: 0;
  color: var(--muted);
}

.builder-final-actions {
  display: grid;
  gap: 10px;
  flex: 0 0 auto;
}

@media (max-width: 700px) {
  .builder-section-header,
  .builder-final {
    align-items: stretch;
    flex-direction: column;
  }

  .add-exhibit-button,
  .builder-final-actions,
  .builder-final-actions .primary-button,
  .builder-final-actions .secondary-button {
    width: 100%;
  }

  .builder-exhibit-header {
    align-items: flex-start;
  }
}

/* -------------------------------------------------------------------------- */
/* Dedicated exhibit editor screen                                            */
/* -------------------------------------------------------------------------- */

.builder-empty {
  margin: 0;
}

.builder-exhibit-list {
  display: grid;
  gap: 10px;
}

.draft-exhibit {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(61, 50, 39, 0.035);
  overflow: hidden;
}

.draft-exhibit-summary {
  width: 100%;
}

.draft-exhibit-open {
  display: grid;
  width: 100%;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 150ms ease;
}

.draft-exhibit-open:hover {
  background: #f6efe6;
}

.draft-exhibit-copy {
  display: grid;
  min-width: 0;
}

.draft-exhibit-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-exhibit-copy small {
  margin-top: 3px;
  color: var(--muted);
}

.exhibit-editor-screen {
  padding-top: 8px;
}

.exhibit-editor-screen .back-link {
  margin-bottom: 30px;
}

.back-button-reset {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

#exhibit-editor-host {
  display: grid;
}

#exhibit-editor-host .draft-exhibit-editor {
  display: block;
}

#exhibit-editor-host .admin-form {
  margin: 0;
}

.exhibit-editor-actions {
  margin-top: 22px;
}

.exhibit-editor-actions .primary-button {
  min-width: 180px;
}

.add-exhibit-button {
  flex: 0 0 auto;
}

@media (max-width: 700px) {
  .draft-exhibit-open {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    padding: 16px;
  }

  .exhibit-editor-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .exhibit-editor-actions .primary-button,
  .exhibit-editor-actions .danger-button {
    width: 100%;
  }
}

/* -------------------------------------------------------------------------- */
/* Exhibit edit screen                                                        */
/* -------------------------------------------------------------------------- */

.exhibit-toolbar {
  margin-bottom: 8px;
}

.exhibit-edit-header {
  padding-bottom: 20px;
}

.exhibit-edit-header h1 {
  margin-bottom: 12px;
}

.exhibit-edit-form {
  display: grid;
}

.exhibit-main-card {
  gap: 24px;
}

.position-field {
  max-width: 220px;
}

.current-media-grid {
  display: grid;
  gap: 14px;
  margin-top: 4px;
}

.media-status-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #f7f1e9;
}

.media-status-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.media-badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.media-badge.ready {
  background: #e2eadc;
  color: #536248;
}

.media-badge.demo {
  background: #eee1cc;
  color: #7e5d37;
}

.media-badge.missing {
  background: #f3ded8;
  color: #875043;
}

.media-badge.neutral {
  background: #eae3da;
  color: #71675d;
}

.admin-audio-player {
  width: 100%;
}

.media-helper {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.missing-copy {
  color: #875043;
}

.admin-media-preview {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
}

.admin-media-placeholder {
  display: grid;
  min-height: 120px;
  place-items: center;
  border: 1px dashed #cdbfac;
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
}

.media-replace-section {
  display: grid;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.media-replace-section h2 {
  margin: 5px 0 5px;
  font-size: 22px;
}

.media-replace-section p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.exhibit-form-footer {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.exhibit-primary-actions,
.exhibit-secondary-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.exhibit-primary-actions {
  padding-top: 0;
}

@media (min-width: 700px) {
  .current-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .exhibit-form-footer,
  .exhibit-primary-actions,
  .exhibit-secondary-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .exhibit-form-footer .primary-button,
  .exhibit-form-footer .secondary-button,
  .exhibit-form-footer .danger-button {
    width: 100%;
  }

  .position-field {
    max-width: none;
  }
}

/* -------------------------------------------------------------------------- */
/* Object edit media fields                                                   */
/* -------------------------------------------------------------------------- */

.object-upload-grid {
  align-items: stretch;
}

.object-upload-field {
  display: grid !important;
  grid-template-rows: auto auto 18px;
  align-content: start;
  min-width: 0;
}

.object-upload-field input[type="file"] {
  width: 100%;
}

.upload-status {
  display: block;
  min-height: 18px;
  margin-top: 0;
  line-height: 18px;
}

@media (max-width: 719px) {
  .object-upload-field {
    grid-template-rows: auto auto auto;
  }
}

.upload-hint {
  display: block;
  margin-top: 2px;
  color: #8a7f73 !important;
  font-size: 11px !important;
  line-height: 1.35;
}

/* -------------------------------------------------------------------------- */
/* Object media preview + exhibit thumbnails                                  */
/* -------------------------------------------------------------------------- */

.object-current-media {
  margin-top: 4px;
  margin-bottom: 2px;
}

.object-cover-preview {
  height: 150px;
}

.admin-row-thumb {
  display: block;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f6efe6;
}

.admin-row-thumb.placeholder {
  display: grid;
  place-items: center;
  padding: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.15;
  text-align: center;
}

.admin-row-copy {
  display: grid;
  min-width: 0;
}

.admin-row-copy strong,
.admin-row-copy small {
  min-width: 0;
}

.admin-row-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row-main {
  min-width: 0;
}

@media (max-width: 620px) {
  .admin-row-thumb {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .admin-row-main {
    gap: 10px;
  }

  .admin-row-copy small {
    line-height: 1.45;
  }
}

.media-preview-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  margin-top: 2px;
  color: var(--accent-hover);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.media-preview-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.media-preview-button {
  width: fit-content;
  margin-top: 2px;
}

.compact-placeholder {
  min-height: 46px;
}

/* Exhibit media cards use the same visual hierarchy as Object media cards. */
.current-media-grid .media-preview-button {
  align-self: start;
}

/* -------------------------------------------------------------------------- */
/* Public visitor experience                                                  */
/* -------------------------------------------------------------------------- */

.public-guide {
  display: grid;
  gap: 0;
}

.public-hero {
  padding: 42px 0 28px;
}

.public-hero h1,
.public-exhibit-header h1 {
  margin-top: 8px;
}

.public-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.public-meta span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(250, 247, 242, 0.68);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.public-cover,
.public-exhibit-image {
  margin: 0 0 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.public-cover img,
.public-exhibit-image img {
  display: block;
  width: 100%;
  max-height: 500px;
  object-fit: cover;
}

.public-audio-card {
  display: grid;
  gap: 22px;
  margin: 8px 0 48px;
  padding: 26px;
  border: 1px solid #cdbca8;
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(
      circle at 90% 5%,
      rgba(154, 120, 85, 0.11),
      transparent 17rem
    ),
    #f8f2e9;
  box-shadow: var(--shadow-soft);
}

.public-audio-copy h2 {
  margin: 7px 0 8px;
  font-size: clamp(25px, 4vw, 32px);
}

.public-audio-copy p {
  margin: 0;
  color: var(--muted);
}

.custom-audio-player {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px 14px;
  padding: 18px;
  border: 1px solid #d8cabc;
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.85);
}

.audio-main-row,
.audio-skip-row {
  display: contents;
}

.audio-progress-wrap {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  min-width: 0;
}

.audio-play-button {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
}

.audio-skip-row [data-audio-back] {
  grid-column: 1;
  grid-row: 2;
  justify-self: end;
  align-self: center;
}

.audio-skip-row [data-audio-forward] {
  grid-column: 3;
  grid-row: 2;
  justify-self: start;
  align-self: center;
}

.audio-play-button {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: var(--shadow-soft);
  color: var(--accent-text);
  cursor: pointer;
  font-size: 18px;
  transition:
    background 150ms ease,
    transform 150ms ease;
}

.audio-play-button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.audio-time-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.audio-progress {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.audio-skip-row button {
  min-width: 136px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.audio-skip-row button:hover {
  border-color: #bda68b;
  color: var(--text);
}

.public-exhibits-section {
  margin-top: 4px;
}

.public-section-heading {
  align-items: center;
}

.public-section-heading p {
  max-width: 560px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.public-exhibit-list {
  display: grid;
  gap: 10px;
}

.public-exhibit-card {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(250, 247, 242, 0.92);
  box-shadow: 0 5px 18px rgba(61, 50, 39, 0.035);
  text-decoration: none;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.public-exhibit-card:hover {
  transform: translateY(-2px);
  border-color: #bea98f;
  box-shadow: var(--shadow-soft);
}

.public-exhibit-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 13px;
  background: #eee4d8;
}

.public-exhibit-thumb.placeholder {
  display: grid;
  place-items: center;
  color: rgba(90, 70, 48, 0.36);
  font-size: 18px;
  font-weight: 900;
}

.public-exhibit-content {
  display: grid;
  min-width: 0;
}

.public-exhibit-number {
  margin-bottom: 2px;
  color: var(--accent-hover);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.public-exhibit-content strong {
  overflow: hidden;
  color: #302a25;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-exhibit-content small {
  margin-top: 3px;
  color: var(--muted);
}

.public-exhibit-arrow {
  padding-right: 7px;
  color: var(--accent);
  font-size: 24px;
}

.public-exhibit-topbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: flex-end;
  padding-top: 10px;
}

.public-back-link {
  margin: 0;
}

.public-position {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.public-exhibit-header {
  padding: 34px 0 24px;
}

.public-exhibit-image img {
  max-height: 560px;
}

.public-image-placeholder {
  margin-top: 0;
}

.exhibit-audio-card {
  margin-top: 0;
}

.public-description {
  margin: 0 0 34px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(250, 247, 242, 0.88);
  box-shadow: var(--shadow-soft);
}

.public-description p {
  margin: 12px 0 0;
  color: #463f38;
  font-size: 17px;
  line-height: 1.75;
  white-space: pre-line;
}

.public-exhibit-map-action {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.public-exhibit-navigation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.public-nav-card {
  display: grid;
  gap: 4px;
  min-height: 94px;
  align-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  text-decoration: none;
  transition:
    border-color 150ms ease,
    transform 150ms ease,
    opacity 150ms ease;
}

.public-nav-card:hover {
  transform: translateY(-1px);
  border-color: #bea98f;
}

.public-nav-card small {
  color: var(--accent-hover);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.public-nav-card strong {
  color: #302a25;
  font-size: 14px;
  line-height: 1.3;
}

.public-nav-card.previous {
  text-align: left;
}

.public-nav-card.next {
  text-align: right;
}

.public-nav-spacer {
  min-height: 1px;
}

.public-nav-card.is-disabled {
  opacity: 0.45;
  background: rgba(250, 247, 242, 0.6);
  color: var(--muted);
  pointer-events: none;
  cursor: default;
}

.public-nav-card.is-disabled small,
.public-nav-card.is-disabled strong {
  color: var(--muted);
}

.public-return-link {
  display: inline-flex;
  width: fit-content;
  margin: 20px auto 0;
  color: var(--accent-hover);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.public-return-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (min-width: 720px) {
  .public-audio-card {
    grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
    align-items: center;
  }
}

@media (max-width: 560px) {
  .public-hero {
    padding-top: 26px;
  }

  .public-exhibit-card {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 12px;
  }

  .public-exhibit-thumb {
    width: 58px;
    height: 58px;
  }

  .public-audio-card {
    padding: 20px;
  }

  .custom-audio-player {
    padding: 15px;
  }

  .audio-play-button {
    width: 58px;
    height: 58px;
  }

  .public-exhibit-navigation {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .public-nav-spacer {
    display: none;
  }

  .public-nav-card {
    min-height: 84px;
    padding: 14px;
  }

  .public-nav-card small {
    font-size: 10px;
    line-height: 1.2;
  }

  .public-nav-card strong {
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .public-nav-card.previous {
    text-align: left;
  }

  .public-nav-card.next {
    text-align: right;
  }

  .public-description {
    padding: 22px;
  }
}

/* -------------------------------------------------------------------------- */
/* Admin exhibit drag & drop ordering                                         */
/* -------------------------------------------------------------------------- */

.sortable-exhibits {
  position: relative;
}

.sortable-exhibit-row {
  position: relative;
  transition:
    transform 150ms ease,
    opacity 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.sortable-exhibit-row.is-dragging {
  opacity: 0.5;
  border-color: #b99d7e;
  box-shadow: var(--shadow);
}

.sortable-exhibit-row.drag-over-before::before,
.sortable-exhibit-row.drag-over-after::after {
  position: absolute;
  right: 10px;
  left: 10px;
  z-index: 4;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.sortable-exhibit-row.drag-over-before::before {
  top: -7px;
}

.sortable-exhibit-row.drag-over-after::after {
  bottom: -7px;
}

.exhibit-drag-handle {
  display: grid;
  width: 42px;
  min-width: 42px;
  align-self: stretch;
  place-items: center;
  border: 0;
  border-right: 1px solid var(--line);
  background: #f5eee5;
  color: #9a8066;
  cursor: grab;
  font: inherit;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.18em;
  user-select: none;
}

.exhibit-drag-handle:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.exhibit-drag-handle:active {
  cursor: grabbing;
}

.sort-save-status {
  display: block;
  min-height: 18px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.sort-save-status.is-saving {
  color: var(--accent-hover);
}

.sort-save-status.is-success {
  color: #627454;
}

.sort-save-status.is-error {
  color: #875043;
}

@media (max-width: 620px) {
  .exhibit-drag-handle {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    align-self: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    cursor: default;
  }
}

/* -------------------------------------------------------------------------- */
/* Object history                                                             */
/* -------------------------------------------------------------------------- */

.object-history-editor {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f7f1e9;
}

.object-history-editor h3 {
  margin: 5px 0 6px;
  font-size: 21px;
  letter-spacing: -0.025em;
}

.object-history-editor > div > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.history-audio-admin {
  display: grid;
  gap: 14px;
}

.history-audio-current {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.72);
}

.public-history-button {
  margin-top: 4px;
}

.history-page-header {
  padding: 34px 0 24px;
}

.history-page-content {
  margin-bottom: 28px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(250, 247, 242, 0.9);
  box-shadow: var(--shadow-soft);
}

.history-page-content p {
  margin: 0;
  color: #463f38;
  font-size: 17px;
  line-height: 1.85;
  white-space: pre-line;
}

/* -------------------------------------------------------------------------- */
/* Media deletion                                                             */
/* -------------------------------------------------------------------------- */

.media-delete-button {
  display: inline-flex;
  width: fit-content;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #d9b7ae;
  border-radius: 999px;
  background: #f7e9e5;
  color: #875043;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  transition:
    background 150ms ease,
    border-color 150ms ease;
}

.media-delete-button:hover {
  border-color: #c9978b;
  background: #efd8d2;
}

@media (max-width: 560px) {
  .media-delete-button {
    width: 100%;
  }
}

.public-home-button {
  width: fit-content;
  margin: 24px auto 0;
}

/* -------------------------------------------------------------------------- */
/* Elegant home scroll reveal                                                 */
/* -------------------------------------------------------------------------- */

.home-motion-ready .home-reveal {
  opacity: 0;
  transform: translate3d(0, var(--home-reveal-offset, 14px), 0);
  transition:
    opacity 520ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--home-reveal-delay, 0ms);
  will-change: opacity, transform;
}

.home-motion-ready .home-reveal[data-home-direction="up"] {
  --home-reveal-offset: -14px;
}

.home-motion-ready .home-reveal[data-home-direction="down"] {
  --home-reveal-offset: 14px;
}

.home-motion-ready .home-reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
  .home-motion-ready .home-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto;
  }
}

/* -------------------------------------------------------------------------- */
/* Home first viewport / balanced demo spacing                                */
/* -------------------------------------------------------------------------- */

.home-fold {
  display: block;
  min-height: auto;
}

.home-fold .hero {
  padding-bottom: 0;
}

.home-fold .demo-grid {
  margin-top: 48px;
  margin-bottom: 48px;
}

.home-fold .qr-image {
  aspect-ratio: 1 / 1;
}

.home-fold + .landing-section {
  margin-top: 0;
}

@media (max-width: 719px) {
  .home-fold .demo-grid {
    margin-top: 32px;
    margin-bottom: 40px;
  }

  .home-fold + .landing-section {
    margin-top: 0;
  }
}

/* -------------------------------------------------------------------------- */
/* Public visitor mobile width / centering fix                                */
/* -------------------------------------------------------------------------- */

.public-guide,
.public-guide > *,
.public-audio-card > *,
.public-section-heading > *,
.custom-audio-player,
.audio-progress-wrap {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 560px) {
  .public-guide {
    width: 100%;
    margin-inline: auto;
  }

  .public-hero h1,
  .public-exhibit-header h1 {
    max-width: 100%;
    font-size: clamp(36px, 10vw, 44px);
    overflow-wrap: anywhere;
  }

  .public-section-heading {
    gap: 12px;
  }

  .public-section-heading > div {
    min-width: 0;
    flex: 1 1 auto;
  }

  .count-badge {
    flex: 0 0 42px;
  }

  .audio-skip-row button {
    min-width: 0;
    width: 100%;
    max-width: 136px;
    padding-inline: 12px;
  }
}

/* Simplified exhibit navigation buttons */
.public-exhibit-navigation .public-nav-card {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  text-align: center;
}

.public-exhibit-navigation .public-nav-card strong {
  font-size: 14px;
  line-height: 1;
  text-align: center;
}

.public-exhibit-navigation .public-nav-card.previous,
.public-exhibit-navigation .public-nav-card.next {
  text-align: center;
}

@media (max-width: 560px) {
  .public-exhibit-navigation .public-nav-card {
    min-height: 56px;
    padding: 12px 14px;
  }

  .public-exhibit-navigation .public-nav-card strong {
    font-size: 13px;
  }
}

/* -------------------------------------------------------------------------- */
/* Visitor access gate                                                        */
/* -------------------------------------------------------------------------- */

.access-gate {
  display: grid;
  max-width: 680px;
  min-height: 58vh;
  margin: 0 auto;
  place-items: center;
}

.access-gate-card {
  width: 100%;
  padding: clamp(28px, 6vw, 52px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: rgba(250, 247, 242, 0.92);
  box-shadow: var(--shadow);
  text-align: center;
}

.access-gate-mark {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 24px;
  font-weight: 800;
}

.access-gate-card h1 {
  max-width: none;
  margin: 8px 0 16px;
  font-size: clamp(32px, 7vw, 48px);
  line-height: 1;
}

.access-gate-card p {
  max-width: 520px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.access-gate-card .access-gate-hint {
  margin-top: 18px;
  font-size: 13px;
  font-weight: 700;
}

/* Shared visitor error pages: the same visual language as access expiry. */
.access-gate-actions {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

.access-gate-actions .secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  text-decoration: none;
}

@media (max-width: 560px) {
  .access-gate-actions .secondary-button {
    width: 100%;
  }
}


/* -------------------------------------------------------------------------- */
/* Public media presentation                                                  */
/* Keep full exhibit imagery visible while preserving tidy thumbnails.        */
/* -------------------------------------------------------------------------- */

.public-exhibit-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(250, 247, 242, 0.92);
}

.public-exhibit-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 20px;
}

.public-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(250, 247, 242, 0.92);
}

.public-cover img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 68vh;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 20px;
}

.public-exhibit-thumb {
  object-fit: cover;
}

@media (max-width: 560px) {
  .public-exhibit-image,
  .public-cover {
    padding: 10px;
  }

  .public-exhibit-image img,
  .public-cover img {
    max-height: none;
    border-radius: 16px;
  }
}
