:root {
  color-scheme: light;
  --paper: #f2ebdd;
  --paper-strong: #fffaf0;
  --ink: #24364b;
  --charcoal: #2f353a;
  --muted: #687078;
  --line: #c9bda8;
  --brass: #c49a52;
  --vermilion: #c95d4b;
  --moss: #607b62;
  --shadow: 0 8px 24px rgb(36 54 75 / 10%);
  font-family: "Noto Sans JP Variable", system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--charcoal);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 300px;
}

a {
  color: var(--ink);
  text-underline-offset: 0.2em;
}

a:hover {
  color: #122238;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
.button {
  align-items: center;
  background: var(--paper-strong);
  border: 1px solid var(--ink);
  border-radius: 0.35rem;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 700;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.65rem 0.9rem;
  text-decoration: none;
}

button:hover,
.button:hover {
  background: #e9dfce;
}

button[aria-pressed="true"],
.button.primary {
  background: var(--ink);
  color: white;
}

.button[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.skip-link {
  background: white;
  left: 1rem;
  padding: 0.65rem;
  position: fixed;
  top: -5rem;
  z-index: 20;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  align-items: center;
  background: rgb(242 235 221 / 94%);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-height: 4rem;
  padding: 0.7rem max(1rem, calc((100vw - 1180px) / 2));
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  display: flex;
  font-weight: 800;
  gap: 0.55rem;
  text-decoration: none;
}

.brand-mark {
  background: var(--ink);
  border: 2px solid var(--brass);
  border-radius: 0.25rem;
  display: grid;
  gap: 0.18rem;
  grid-template-columns: repeat(2, 0.45rem);
  padding: 0.35rem;
}

.brand-mark i {
  background: var(--paper);
  display: block;
  height: 1.15rem;
}

.site-nav {
  display: flex;
  font-size: 0.84rem;
  gap: 0.85rem;
}

.site-nav a {
  text-decoration: none;
}

main,
.site-footer {
  margin-inline: auto;
  max-width: 1180px;
  padding-inline: 1rem;
}

main {
  padding-bottom: 5rem;
  padding-top: 1.4rem;
}

.eyebrow {
  color: var(--vermilion);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
}

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

h1 {
  color: var(--ink);
  font-size: clamp(1.7rem, 3.4vw, 2.15rem);
  letter-spacing: 0.02em;
  line-height: 1.32;
  margin-bottom: 0.75rem;
}

h2 {
  color: var(--ink);
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  line-height: 1.45;
}

h3 {
  font-size: 1rem;
  line-height: 1.5;
}

.lead {
  color: #50575d;
  font-size: 0.98rem;
  line-height: 1.85;
  max-width: 44rem;
}

.bench-intro {
  align-items: start;
  display: grid;
  gap: 1.4rem;
  grid-template-columns: minmax(0, 0.82fr) minmax(19rem, 1.18fr);
  margin-bottom: 1.6rem;
}

.nameplate {
  background: var(--brass);
  border: 1px solid #9a753a;
  border-radius: 0.25rem;
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 20%);
  color: #201b14;
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  margin-bottom: 0.7rem;
  padding: 0.4rem 0.7rem;
}

.composer {
  background: #2d3338;
  border: 5px solid #463a2c;
  border-radius: 0.55rem;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.composer label {
  color: var(--paper);
  display: block;
  font-size: 0.8rem;
  font-weight: 750;
  margin-bottom: 0.5rem;
}

.composer input {
  background: var(--paper-strong);
  border: 2px solid var(--brass);
  border-radius: 0.25rem;
  font-size: 1rem;
  min-height: 3.1rem;
  padding: 0.65rem 0.8rem;
  width: 100%;
}

.composer small {
  color: #d6cebf;
  display: block;
  line-height: 1.6;
  margin-top: 0.55rem;
}

.filter-rail {
  align-items: end;
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr 1fr auto;
  margin-bottom: 1rem;
  padding: 0.8rem;
}

.filter-rail label {
  color: var(--muted);
  display: grid;
  font-size: 0.74rem;
  font-weight: 750;
  gap: 0.3rem;
}

.filter-rail select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  min-height: 2.55rem;
  padding: 0.5rem;
}

.rack-heading {
  align-items: baseline;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-top: 1.7rem;
}

.rack-heading p {
  color: var(--muted);
  font-size: 0.8rem;
}

.specimen-rack {
  background: #3a3026;
  border: 6px solid #4b3b2b;
  border-radius: 0.45rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0.7rem;
}

.specimen-card {
  background: var(--paper-strong);
  border: 1px solid #aa9a82;
  border-radius: 0.22rem;
  display: flex;
  flex-direction: column;
  min-height: 23rem;
  overflow: hidden;
  position: relative;
}

.specimen-card::before {
  background: var(--brass);
  border: 1px solid #8b6b37;
  content: "";
  height: 0.55rem;
  left: calc(50% - 1.5rem);
  position: absolute;
  top: 0;
  width: 3rem;
}

.specimen-meta {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
  padding: 1.1rem 0.8rem 0.65rem;
}

.specimen-meta h3 {
  margin: 0;
}

.kind-tab {
  background: #e6ddcd;
  border: 1px solid var(--line);
  border-radius: 2rem;
  color: #50575d;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
}

.proof-strip {
  align-items: center;
  border-bottom: 1px dashed #cfc4b3;
  display: flex;
  flex: 1;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  line-height: 1.75;
  min-height: 10rem;
  overflow-wrap: anywhere;
  padding: 1.15rem 0.9rem;
}

.specimen-notes {
  color: #5d6368;
  font-size: 0.78rem;
  line-height: 1.65;
  padding: 0.75rem 0.8rem;
}

.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.role-tags span {
  border: 1px solid var(--line);
  border-radius: 0.2rem;
  padding: 0.18rem 0.35rem;
}

.specimen-actions {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: 1fr 1fr;
  padding: 0 0.8rem 0.8rem;
}

.specimen-actions .button,
.specimen-actions button {
  min-height: 2.35rem;
  padding: 0.45rem;
}

.font-noto-sans-jp {
  font-family: "Noto Sans JP Variable", sans-serif;
}

.font-noto-serif-jp {
  font-family: "Noto Serif JP Variable", serif;
}

.font-biz-udpgothic {
  font-family: "BIZ UDPGothic", sans-serif;
}

.font-dela-gothic-one {
  font-family: "Dela Gothic One", sans-serif;
}

.font-zen-kurenaido {
  font-family: "Zen Kurenaido", cursive;
}

.font-kaisei-decol {
  font-family: "Kaisei Decol", serif;
}

.comparison-dock {
  align-items: center;
  background: var(--ink);
  border: 1px solid #101c2c;
  border-radius: 0.4rem 0.4rem 0 0;
  bottom: 0;
  box-shadow: 0 -4px 18px rgb(36 54 75 / 20%);
  color: white;
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
  left: 50%;
  max-width: 46rem;
  padding: 0.6rem 0.8rem;
  position: fixed;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  z-index: 8;
}

.comparison-dock span {
  font-size: 0.78rem;
}

.comparison-dock .button {
  min-height: 2.2rem;
}

.detail-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: minmax(0, 1.35fr) minmax(17rem, 0.65fr);
}

.proof-sheet,
.license-drawer,
.guide-card,
.empty-state {
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.proof-sheet .proof-strip {
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  margin: 1rem 0;
  min-height: 14rem;
}

.alphabet-line {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.license-drawer {
  border-top: 0.7rem solid var(--brass);
}

.license-seal {
  align-items: center;
  border: 2px solid var(--vermilion);
  border-radius: 50%;
  color: var(--vermilion);
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 900;
  height: 4rem;
  justify-content: center;
  letter-spacing: 0.04em;
  margin-bottom: 0.8rem;
  text-align: center;
  width: 4rem;
}

.fact-list {
  display: grid;
  gap: 0.7rem;
  margin: 0 0 1rem;
}

.fact-list div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.6rem;
}

.fact-list dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.fact-list dd {
  margin: 0;
}

.source-links {
  display: grid;
  gap: 0.5rem;
}

.comparison-tray {
  background: var(--ink);
  border: 5px solid #172536;
  border-radius: 0.55rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0.8rem;
}

.comparison-slip {
  background: var(--paper-strong);
  border: 1px solid var(--brass);
  border-radius: 0.2rem;
  min-height: 18rem;
  padding: 0.9rem;
}

.comparison-slip .proof-strip {
  border: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  padding: 0.6rem 0;
}

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

.guide-card {
  box-shadow: none;
}

.guide-card .symbol {
  align-items: center;
  background: var(--ink);
  border: 2px solid var(--brass);
  border-radius: 0.3rem;
  color: white;
  display: flex;
  font-size: 0.82rem;
  font-weight: 900;
  height: 2.4rem;
  justify-content: center;
  margin-bottom: 0.8rem;
  width: 2.4rem;
}

.guide-card p,
.prose p,
.prose li {
  line-height: 1.85;
}

.prose {
  max-width: 48rem;
}

.notice {
  background: #ebe4d5;
  border-left: 4px solid var(--vermilion);
  font-size: 0.84rem;
  line-height: 1.7;
  padding: 0.75rem;
}

.empty-state {
  text-align: center;
}

.fallen-slips {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.fallen-slips i {
  background: white;
  border: 1px solid var(--line);
  display: block;
  height: 4.6rem;
  transform: rotate(-6deg);
  width: 1.8rem;
}

.fallen-slips i:nth-child(2) {
  transform: rotate(8deg);
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 0.75rem;
  gap: 1rem;
  justify-content: space-between;
  padding-bottom: 2rem;
  padding-top: 1rem;
}

@media (max-width: 860px) {
  .bench-intro,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

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

  .site-nav {
    overflow-x: auto;
    padding-bottom: 0.2rem;
    width: 100%;
  }

  .filter-rail,
  .specimen-rack,
  .guide-grid,
  .comparison-tray {
    grid-template-columns: 1fr;
  }

  .specimen-card {
    min-height: 20rem;
  }

  .site-footer {
    flex-direction: column;
  }
}

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

@media print {
  .site-header,
  .site-footer,
  .comparison-dock,
  .composer,
  .filter-rail,
  button,
  .button {
    display: none !important;
  }

  body,
  main {
    background: white;
    color: black;
    padding: 0;
  }

  .specimen-rack,
  .comparison-tray,
  .proof-sheet {
    border: 0;
    box-shadow: none;
  }
}
