:root {
  --bg: #f2f0eb;
  --paper: #fffdf8;
  --ink: #1d1d1b;
  --muted: #6d6a63;
  --line: rgba(0,0,0,.15);
  --accent: #bf9b45;
  --accent-2: #7b1f25;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(circle at top, #ffffff 0%, var(--bg) 54%, #ddd7ca 100%);
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.45;
}

a { color: inherit; }

.site-header {
  padding: 26px 24px 16px;
  text-align: center;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.2rem);
  letter-spacing: .08em;
  font-weight: 400;
  text-transform: uppercase;
}

.site-header .subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: clamp(.75rem, 1.3vw, .95rem);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 10px auto 20px;
  padding: 0 20px;
}

.button,
.toolbar button {
  border: 1px solid rgba(0,0,0,.24);
  background: #111;
  color: #fff;
  padding: 9px 14px;
  border-radius: 999px;
  font-family: Arial, sans-serif;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.button.secondary,
.toolbar button.secondary {
  background: #fffdf8;
  color: #222;
}

main {
  width: min(96vw, 1480px);
  margin: 0 auto 48px;
}

.panel-wrap {
  position: relative;
  width: 100%;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 42px rgba(0,0,0,.18);
}

.panel-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.hotspot {
  position: absolute;
  display: block;
  border: 2px solid rgba(255, 223, 126, 0);
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.hotspot::after {
  content: attr(data-no);
  position: absolute;
  top: 7px;
  left: 7px;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-family: Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #111;
  background: rgba(255, 229, 146, .92);
  box-shadow: 0 1px 8px rgba(0,0,0,.24);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity .18s ease, transform .18s ease;
}

.hotspot:hover,
.hotspot:focus-visible,
.panel-wrap.show-hotspots .hotspot {
  border-color: rgba(255, 223, 126, .96);
  background: rgba(255, 223, 126, .10);
  box-shadow: inset 0 0 0 999px rgba(255, 223, 126, .05), 0 0 0 2px rgba(0,0,0,.22);
  outline: none;
}

.hotspot:hover::after,
.hotspot:focus-visible::after,
.panel-wrap.show-hotspots .hotspot::after {
  opacity: 1;
  transform: translateY(0);
}

.legend {
  margin: 24px auto 0;
  background: rgba(255, 253, 248, .94);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.legend h2,
.instrument-page h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: .03em;
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend-grid a {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 7px 8px;
  border-radius: 10px;
  text-decoration: none;
  font-family: Arial, sans-serif;
}

.legend-grid a:hover,
.legend-grid a:focus-visible {
  background: rgba(191,155,69,.16);
  outline: none;
}

.no {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}

.instrument-page {
  background: rgba(255, 253, 248, .95);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(16px, 3vw, 28px);
  box-shadow: 0 18px 42px rgba(0,0,0,.14);
}

.instrument-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}

.instrument-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1.1;
  font-weight: 400;
}

.instrument-header .en {
  margin: 6px 0 0;
  color: var(--muted);
  font-family: Arial, sans-serif;
}

.figure-box {
  display: grid;
  place-items: center;
  min-height: 300px;
  background: linear-gradient(180deg, #fff 0%, #eee8dc 100%);
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.12);
  padding: clamp(12px, 2vw, 24px);
}

.figure-box img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.small-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  font-family: Arial, sans-serif;
  font-size: 13px;
}

.small-nav a {
  padding: 5px 9px;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 999px;
  text-decoration: none;
  background: #fff;
}

.reference {
  margin-top: 18px;
  font-family: Arial, sans-serif;
  color: var(--muted);
  font-size: 14px;
}

.reference summary {
  cursor: pointer;
  color: var(--ink);
  margin-bottom: 10px;
}

.reference img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
}

footer {
  text-align: center;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 13px;
  padding: 0 20px 28px;
}

@media (max-width: 720px) {
  main { width: 100%; padding: 0 10px; }
  .site-header { padding-top: 18px; }
  .panel-wrap { border-radius: 10px; }
  .legend { border-radius: 14px; }
  .instrument-header { display: block; }
  .instrument-header .button { display: inline-block; margin-top: 12px; }
}