:root {
  --bg: #f3eee7;
  --bg-soft: #faf7f2;
  --ink: #1f1e1a;
  --muted: #5a544d;
  --line: rgba(90, 37, 35, 0.12);
  --accent: #8f2328;
  --accent-soft: #b86d63;
  --panel: rgba(252, 248, 244, 0.94);
  --shadow: 0 24px 60px rgba(59, 21, 19, 0.08);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  opacity: 0.75;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(184, 109, 99, 0.1), transparent 22rem),
    radial-gradient(circle at 85% 15%, rgba(143, 35, 40, 0.06), transparent 20rem),
    linear-gradient(180deg, #faf7f2 0%, #f3eee7 56%, #ebe3d7 100%);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 80%);
}

.site-shell {
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
  padding-bottom: 3rem;
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  top: 1rem;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0 2rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  backdrop-filter: blur(18px);
  background: rgba(252, 248, 244, 0.9);
  box-shadow: 0 10px 30px rgba(74, 21, 19, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: inherit;
  text-decoration: none;
}

.brand strong,
.site-nav a,
.button,
.panel-title,
.contact-form button {
  letter-spacing: 0.02em;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #b74a44 100%);
  color: #fff;
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-weight: 700;
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
body[data-page="home"] .site-nav a[href="./index.html"],
body[data-page="catalogue"] .site-nav a[href="../catalogue/index.html"],
body[data-page="expertization"] .site-nav a[href="../expertization/index.html"],
body[data-page="about"] .site-nav a[href="../about/index.html"],
body[data-page="contact"] .site-nav a[href="../contact/index.html"] {
  color: var(--ink);
  background: rgba(143, 35, 40, 0.05);
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: #fff4;
  color: var(--ink);
}

.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 4vw, 4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(252, 248, 244, 0.98) 0%, rgba(243, 235, 229, 0.95) 100%);
  box-shadow: var(--shadow);
}

.page-hero,
.issue-data-card {
  width: 100%;
  max-width: none;
}

.page-hero + .page-hero,
.page-hero + .section {
  margin-top: 2rem;
}

.issue-data-card {
  padding: clamp(2rem, 4vw, 4rem);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.95fr);
  gap: 1.5rem;
}

.hero::after,
.page-hero::after {
  position: absolute;
  right: -2rem;
  top: -2rem;
  width: 14rem;
  height: 14rem;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 35, 40, 0.1), transparent 68%);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  line-height: 1.05;
  font-weight: 700;
}

h1 {
  max-width: 15ch;
  font-size: clamp(2.7rem, 7vw, 5.3rem);
}

.page-hero h1 {
  width: max-content;
  max-width: 100%;
}

.title-zh {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  line-height: 1.2;
  width: auto;
}

.issue-title {
  max-width: 22ch;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

h3 {
  font-size: 1.2rem;
}

.lead,
.section-heading p,
.hero-copy p,
.info-card p,
.stamp-meta p,
.site-footer,
.contact-form label,
.plain-list li,
.metric-list span {
  color: var(--muted);
  line-height: 1.65;
}

.eyebrow {
  margin-bottom: 0.8rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #8d5133 100%);
  color: #fff;
  box-shadow: 0 18px 30px rgba(90, 37, 35, 0.1);
}

.button-secondary {
  border-color: rgba(143, 35, 40, 0.14);
  color: var(--ink);
  background: rgba(250, 244, 239, 0.84);
}

.panel-title {
  margin-bottom: 0.65rem;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-panel,
.info-card,
.stamp-card,
.region-card,
.contact-form {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  box-shadow: 0 14px 35px rgba(48, 35, 18, 0.06);
}

.hero-panel,
.info-card,
.contact-form,
.stamp-card {
  padding: 1.2rem;
}

.metric-list,
.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.metric-list li,
.plain-list li {
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
}

.metric-list li:first-child,
.plain-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.metric-list strong {
  display: block;
  margin-bottom: 0.25rem;
}

.section {
  margin-top: 2rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  border-radius: var(--radius-lg);
}

.section-heading {
  max-width: 52rem;
  margin-bottom: 1.4rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}


.breadcrumb span[aria-hidden="true"] {
  color: rgba(90, 84, 77, 0.55);
}

.region-grid,
.stamp-grid,
.three-up,
.section-grid {
  display: grid;
  gap: 1rem;
}

.region-grid {
  grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
}

.region-subsection {
  margin-top: 2.5rem;
}

.region-subsection + .region-subsection {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.region-subsection-heading {
  margin-bottom: 1rem;
}

.region-subsection-heading h3 {
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
}

.region-authority {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  margin: 0 0 1rem;
}

.region-pending-note {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

.section-grid {
  grid-template-columns: 1fr;
}

.region-card {
  display: block;
  padding: 1.2rem;
  text-decoration: none;
  color: inherit;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.region-card h3 {
  font-size: 1rem;
  line-height: 1.3;
}

.region-card:hover,
.region-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(109, 45, 30, 0.22);
  box-shadow: 0 18px 40px rgba(58, 39, 21, 0.1);
}

.region-card-static:hover {
  transform: none;
}

.issue-preview-card {
  position: relative;
  overflow: hidden;
}

.issue-preview-card .card-inner {
  transition: opacity 320ms ease;
}

.issue-preview-card .card-stamp-preview {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--panel);
  opacity: 0;
  transition: opacity 320ms ease;
  pointer-events: none;
}

.issue-preview-card .card-stamp-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 2px;
}

.issue-preview-card:hover .card-inner,
.issue-preview-card:focus-visible .card-inner {
  opacity: 0;
}

.issue-preview-card:hover .card-stamp-preview,
.issue-preview-card:focus-visible .card-stamp-preview {
  opacity: 1;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.hero-subtitle {
  margin: 0.6rem 0 0;
  color: var(--accent);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
}

.issue-official-title {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.45;
}

.expert-marker {
  color: #c0392b;
  font-style: normal;
}

.expert-footnote {
  color: var(--muted);
}

.notes-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0.9rem 0;
}

.primary-source-citation {
  font-size: 0.9rem;
}

.issue-notes-card {
  margin-top: 1.5rem;
}

.issue-meta-line,
.issue-issuing-line,
.issue-summary-line {
  max-width: 72rem;
}

.issue-issuing-line {
  margin-top: 0.55rem;
}

.issue-summary-line {
  margin-top: 0.75rem;
}

.admin-review-actions {
  margin-top: 1.2rem;
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.7rem 1.05rem;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, white 72%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, white 90%);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.button-primary:hover,
.button-primary:focus-visible {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--accent) 14%, white 86%);
  border-color: color-mix(in srgb, var(--accent) 36%, white 64%);
}

.button-primary:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.7rem 1.05rem;
  border: 1px solid rgba(109, 45, 30, 0.18);
  border-radius: 999px;
  background: rgba(255, 249, 245, 0.96);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.button-secondary:hover,
.button-secondary:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(109, 45, 30, 0.3);
  box-shadow: 0 12px 30px rgba(48, 35, 18, 0.08);
}

.button-secondary:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.admin-action-note,
.admin-success,
.admin-error {
  margin: 0.7rem 0 0;
  color: var(--muted);
}

.admin-success {
  color: color-mix(in srgb, var(--accent) 55%, #1b4d31 45%);
}

.admin-error {
  color: #9f2f2f;
}

.period-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
}

.period-card {
  padding: 1.2rem;
}

.period-card h3 {
  margin-top: 0.2rem;
}

.chapter-link {
  margin-top: 1rem;
}

.section-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.section-card-link:hover,
.section-card-link:focus-visible {
  transform: translateY(-4px);
}

.section-grid .period-card {
  max-width: 54rem;
}

.period-meta {
  margin: 0.5rem 0 1rem;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
}

.source-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
}

.source-list a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.source-list a:hover,
.source-list a:focus-visible {
  color: var(--accent);
  border-color: rgba(143, 35, 40, 0.28);
}

.source-list li + li {
  margin-top: 0.35rem;
}

.region-subtitle {
  margin: 0.35rem 0 0.55rem;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.source-note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.three-up {
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.stamp-grid {
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}


.stamp-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 0.9rem;
  height: auto;
}

.stamp-card-head {
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.05;
  margin: 0;
}

.stamp-preview {
  display: grid;
  place-items: center;
  min-height: 10rem;
  padding: 0.75rem;
  border: 1px dashed rgba(109, 45, 30, 0.18);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.9), rgba(240, 231, 214, 0.6));
}

.stamp-meta {
  display: block;
  min-height: 0;
}

.stamp-image-caption {
  font-size: 0.75rem;
  color: var(--ink-muted, #666);
  margin: 0.25rem 0 0;
  line-height: 1.4;
}

.stamp-type-line {
  font-size: 0.6rem;
  font-style: italic;
  font-weight: normal;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.stamp-reconstructed-badge {
  font-size: 0.6rem;
  font-style: italic;
  font-weight: normal;
  color: var(--ink-muted, #666);
  letter-spacing: 0.03em;
}

.stamp-meta h3 {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.stamp-badge-stack {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.stamp-info {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: 1px solid rgba(34, 88, 168, 0.28);
  background: rgba(34, 88, 168, 0.14);
  color: #2258a8;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

#stamp-tooltip {
  position: fixed;
  display: none;
  width: max-content;
  max-width: min(16rem, calc(100vw - 16px));
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(109, 45, 30, 0.16);
  border-radius: 10px;
  background: rgba(252, 248, 244, 0.98);
  box-shadow: 0 12px 24px rgba(48, 35, 18, 0.12);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.45;
  white-space: normal;
  pointer-events: none;
  z-index: 9999;
}

.stamp-preview img {
  max-width: 100%;
  max-height: 12rem;
  width: auto;
  height: auto;
  box-shadow: 0 10px 26px rgba(26, 18, 10, 0.16);
}

.contact-form {
  display: grid;
  gap: 0.9rem;
}

.contact-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(78, 66, 49, 0.16);
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
}

.contact-form input[type="file"] {
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}

.contact-form .privacy-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.contact-form .privacy-label input[type="checkbox"] {
  width: auto;
  flex-shrink: 0;
  margin-top: 0.2rem;
  accent-color: var(--accent);
}

.field-hint {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 400;
}

.form-actions {
  margin-top: 0.25rem;
}


#recent-issues-grid .card-inner p:last-child {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.form-status {
  font-size: 0.9rem;
  padding: 0.6rem 0;
}

.form-status-ok {
  color: #3a6b3a;
}

.form-status-error {
  color: #9b3535;
}

.site-footer {
  margin-top: 2rem;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

[data-animate] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms ease, transform 500ms ease;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .topbar {
    border-radius: 28px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.5rem);
    display: none;
    flex-direction: column;
    padding: 0.5rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(250, 244, 233, 0.96);
    box-shadow: 0 16px 40px rgba(54, 39, 20, 0.12);
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero,
  .split-section {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: none;
  }

  .col-label-full  { display: none; }
  .col-label-short { display: inline; }

  .stamp-grid,
  .four-up {
    grid-template-columns: repeat(2, 1fr);
  }

  .overview-table th:nth-child(3),
  .overview-table td:nth-child(3),
  .overview-table th:nth-child(6),
  .overview-table td:nth-child(6),
  .overview-table th:nth-child(7),
  .overview-table td:nth-child(7) {
    display: none;
  }

  .lightbox-prev,
  .lightbox-next {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
.issue-summary {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.issue-data-card {
  max-width: 100%;
  padding: clamp(2rem, 4vw, 4rem);
}

.issue-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.85rem 1.2rem;
  margin: 0;
}

.issue-facts div {
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.issue-facts dt {
  margin: 0 0 0.18rem;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.issue-facts dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.inscription-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.85rem 1.2rem;
  margin: 0;
}

.inscription-list div {
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.inscription-list dt {
  margin: 0 0 0.18rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
}

.inscription-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.inscription-location {
  display: block;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--muted);
  opacity: 0.7;
}

.perf-symbol {
  display: inline-block;
  height: 0.85em;
  width: 0.85em;
  vertical-align: baseline;
  margin: 0 0.05em;
}

.fact-latin,
.fact-zh {
  display: block;
}

.fact-zh {
  margin-top: 0.08rem;
  color: color-mix(in srgb, var(--muted) 90%, white 10%);
}

.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(247, 242, 234, 0.9);
  box-shadow: 0 14px 35px rgba(48, 35, 18, 0.04);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

@media (min-width: 861px) {
  .data-table { min-width: 58rem; }
}

.overview-table-caption {
  display: none;
}

.overview-table-wrap {
  margin-top: 1.5rem;
}

.contribute-card p {
  margin: 0.5rem 0 0;
  font-size: 0.925rem;
  color: var(--ink-muted, #555);
}

.overview-heading-card {
  margin: 2rem 0 1rem;
  padding: clamp(1.5rem, 3vw, 2rem);
}

.variation-heading-card {
  margin: 2rem 0 1rem;
}

.overview-heading-card h2 {
  margin: 0;
  max-width: none;
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.overview-heading-card .eyebrow {
  margin: 0.8rem 0;
  color: var(--accent);
}

.data-table th,
.data-table td {
  padding: 0.95rem 1rem;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line);
}

.data-table thead th {
  border-top: 0;
  color: var(--ink);
  font-size: 0.83rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.price-header {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  white-space: nowrap;
}

.price-header img {
  width: 0.82rem;
  height: 0.82rem;
  display: block;
  opacity: 0.86;
  flex: 0 0 auto;
}

.data-table td:first-child {
  font-weight: 700;
  letter-spacing: 0.01em;
}

.data-table code {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(143, 35, 40, 0.015);
}

.data-table tbody tr {
  transition: background-color 160ms ease;
}

.data-table tbody tr:hover {
  background: rgba(143, 35, 40, 0.04);
}

.data-table .op-cell {
  white-space: nowrap;
  text-align: center;
}

.data-table .price-cell {
  white-space: nowrap;
  text-align: right;
}

.data-table .status-cell {
  white-space: nowrap;
}

.data-table .price-cell .price-na {
  color: var(--muted);
}


.data-table .set-total-row td {
  border-top: 2px solid var(--line);
  font-weight: 600;
  background: color-mix(in srgb, var(--bg) 95%, var(--accent) 5%);
}

.data-table .set-total-label {
  color: var(--muted);
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table td.table-footnote {
  font-weight: normal;
  color: var(--muted);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  border-top: 1px solid var(--line);
}

.listing-notes {
  margin-top: 0.75rem;
}

.listing-note {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

.listing-note + .listing-note {
  margin-top: 0.5rem;
}

.admin-field-checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.admin-field-checkbox input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.btn-add-gh {
  display: inline-block;
  margin-left: 0.4em;
  padding: 0 0.3em;
  font-size: 0.75em;
  line-height: 1.4;
  background: none;
  border: 1px solid var(--color-border, #ccc);
  border-radius: 3px;
  color: var(--color-muted, #888);
  cursor: pointer;
  vertical-align: middle;
  opacity: 0.5;
}
.btn-add-gh:hover {
  opacity: 1;
  color: var(--color-accent, #2563eb);
  border-color: var(--color-accent, #2563eb);
}

.badge-nc {
  display: inline-block;
  margin-left: 0.35em;
  padding: 0.1em 0.4em;
  font-size: 0.7em;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.03em;
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  vertical-align: middle;
  cursor: help;
}

.admin-yang-input {
  width: 100%;
  min-width: 6rem;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  margin: 0;
  outline: none;
  box-shadow: none;
}

.admin-yang-input::placeholder {
  color: var(--muted);
  opacity: 0.72;
}

.admin-yang-input:focus-visible {
  outline: 1px solid rgba(109, 45, 30, 0.32);
  outline-offset: 3px;
  border-radius: 4px;
}

.data-table tbody tr:not(.variation-row):not(.unissued-row):not(.group-header-row):not(.denomination-parent-row) td {
  font-weight: 500;
}

.data-table .unissued-row td,
.data-table .unissued-row td:first-child {
  color: color-mix(in srgb, var(--muted) 88%, white 12%);
  font-weight: 400;
}

.data-table tbody tr.item-group-end td {
  border-bottom: 2px solid var(--line);
}

.denomination-parent-row td {
  font-weight: 600;
  border-top: 2px solid var(--line);
  border-bottom: none;
  padding-bottom: 0.1rem;
}

@media (min-width: 861px) {
  .col-label-short { display: none; }
}
.matrix-mobile   { display: none; }

@media (max-width: 860px) {
  .matrix-desktop { display: none; }
  .matrix-mobile  { display: block; }
}

.paper-group-heading {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 1.5rem 0 0.5rem;
  padding: 0 0.65rem;
}

.paper-matrix-table th,
.paper-matrix-table td {
  padding: 0.55rem 0.65rem;
}

.paper-matrix-table .matrix-col-head,
.paper-matrix-table .matrix-cell {
  text-align: center;
}

.paper-matrix-table .matrix-hit {
  font-size: 1.1em;
  color: var(--ink);
}

.variation-row td {
  color: color-mix(in srgb, var(--muted) 88%, white 12%);
  font-weight: 400;
}

.variation-row td:first-child {
  padding-left: 1.8rem;
  font-weight: 400;
}

.group-header-row td,
.group-header-row td:first-child {
  background: rgba(143, 35, 40, 0.06);
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}

.group-header-tag {
  display: inline;
  background: var(--accent);
  color: #fff;
  font-weight: 400;
  font-size: inherit;
  padding: 0.1em 0.5em;
  border-radius: 3px;
}


.group-header-label {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 250, 243, 0.7);
  font-weight: 600;
  color: var(--muted);
  margin: 2rem 0 0.75rem;
}

.group-header-label:first-child {
  margin-top: 0;
}

.group-header-letter {
  color: var(--accent);
  font-weight: 700;
  margin-right: 0.25em;
}

.stamp-trigger {
  display: inline-grid;
  place-items: center;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.stamp-trigger:focus-visible {
  outline: 2px solid rgba(109, 45, 30, 0.45);
  outline-offset: 4px;
  border-radius: 6px;
}

.stamp-preview a,
.stamp-trigger {
  display: inline-grid;
  place-items: center;
  max-width: 100%;
  text-decoration: none;
}

.stamp-preview a img,
.stamp-trigger img {
  max-width: 100%;
  height: auto;
}

@media (min-width: 861px) {
  .four-up {
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  }
}

.compact-heading {
  margin-top: 1.4rem;
}

.main-issue-grid + .compact-heading {
  margin-top: 3rem;
}

.stamp-placeholder {
  min-height: 16rem;
  text-align: center;
}

.stamp-placeholder div {
  color: var(--muted);
}

.stamp-placeholder strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.four-up .stamp-card {
  width: 100%;
}

@media (min-width: 861px) {
  .main-issue-grid,
  .variation-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

.listing-rules {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-left: 4px solid rgba(143, 35, 40, 0.3);
  border-radius: 0 14px 14px 0;
  background: rgba(143, 35, 40, 0.015);
}

.listing-rules p {
  margin: 0.35rem 0;
  color: var(--muted);
  line-height: 1.6;
}

.stamp-preview {
  border: 1px dashed rgba(159, 92, 92, 0.28);
  background: linear-gradient(180deg, rgba(250, 246, 246, 0.96), rgba(243, 236, 236, 0.93));
}

.stamp-preview img {
  box-shadow: 0 10px 24px rgba(49, 58, 67, 0.18);
}

.stamp-preview--double {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.stamp-side {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.stamp-side-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stamp-preview--double .stamp-preview {
  height: 10rem;
  min-height: 10rem;
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.admin-field {
  display: grid;
  gap: 0.45rem;
  min-width: min(100%, 22rem);
}

.admin-field span {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-field select,
.price-input {
  width: 100%;
  border: 1px solid rgba(78, 66, 49, 0.16);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font: inherit;
}

.admin-status {
  min-height: 1.5rem;
  margin-bottom: 1rem;
  color: var(--muted);
}

.admin-status[data-tone="ok"] {
  color: #305f39;
}

.admin-status[data-tone="error"] {
  color: #8f2328;
}

.admin-status[data-tone="warn"] {
  color: #7a5a21;
}

.admin-summary {
  margin-bottom: 1rem;
}

.admin-summary h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(19, 24, 28, 0.72);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 1100px);
  max-height: 90vh;
  padding: 1rem;
  border: 1px solid rgba(202, 210, 218, 0.5);
  border-radius: 22px;
  background: linear-gradient(180deg, #faf7f2 0%, #f3eee7 56%, #ebe3d7 100%);
  box-shadow: 0 28px 70px rgba(14, 19, 23, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lightbox-close {
  position: absolute;
  top: 0.4rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.7rem;
  border: 0;
  border-radius: 999px;
  background: rgba(57, 67, 77, 0.14);
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  z-index: 2;
}

.lightbox-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: min(70vh, 800px);
}

.lightbox-image {
  display: block;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
}

.lightbox-label {
  margin: 0 0 0.55rem;
  padding: 0 3.5rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: rgba(90, 84, 77, 0.5);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 1.15rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 140ms;
  z-index: 2;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.32);
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
  gap: 1rem;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.admin-field-wide {
  grid-column: 1 / -1;
}

.admin-field input,
.admin-field textarea,
.admin-field select {
  width: 100%;
  border: 1px solid rgba(78, 66, 49, 0.16);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font: inherit;
}

.admin-field textarea {
  resize: vertical;
}

.admin-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
}

.draft-list {
  display: grid;
  gap: 0.75rem;
}

.draft-card {
  display: grid;
  gap: 0.15rem;
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(109, 45, 30, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  text-align: left;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.draft-card strong {
  font-size: 1rem;
}

.draft-card span,
.draft-card small,
.admin-empty {
  color: var(--muted);
}

.draft-card:hover,
.draft-card:focus-visible {
  border-color: rgba(109, 45, 30, 0.28);
  box-shadow: 0 10px 24px rgba(48, 35, 18, 0.08);
}

.paste-zone-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.55rem;
}

.paste-zone-wrap small {
  color: var(--accent);
  font-size: 0.82rem;
}

.compact-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.85rem 1rem;
}

.compact-facts div {
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.compact-facts dt {
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.compact-facts dd {
  margin: 0;
  color: var(--ink);
}

.review-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.review-image-card {
  padding: 1rem;
}

.review-image-frame {
  display: grid;
  place-items: center;
  min-height: 20rem;
  padding: 1rem;
  border: 1px dashed rgba(159, 92, 92, 0.28);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(250, 246, 246, 0.96), rgba(243, 236, 236, 0.93));
}

.review-image-frame img {
  display: block;
  max-width: 100%;
  max-height: 46rem;
  height: auto;
  box-shadow: 0 10px 24px rgba(49, 58, 67, 0.18);
}

.review-image-meta {
  margin-top: 0.8rem;
  color: var(--muted);
  word-break: break-word;
}

.review-image-empty {
  display: grid;
  place-items: center;
  min-height: 12rem;
  border: 1px dashed rgba(159, 92, 92, 0.28);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.4);
  text-align: center;
}

@media (max-width: 900px) {
  .admin-layout,
  .admin-form,
  .review-image-grid {
    grid-template-columns: 1fr;
  }

  .group-cluster,
  .group-stamp-grid .stamp-card {
    width: 100%;
    max-width: none;
  }

  .main-group-grid {
    grid-template-columns: 1fr;
  }

  .group-cluster {
    grid-column: span 1 !important;
  }

  .group-stamp-grid {
    grid-template-columns: 1fr;
  }
}
