html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
body {
  font-family: "Yu Gothic", Meiryo, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  min-height: 44px;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus, #ef573b);
  outline-offset: 4px;
}
button:hover {
  filter: brightness(1.08);
}
img {
  max-width: 100%;
  display: block;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
button {
  border: 1px solid currentColor;
  background: transparent;
  padding: 9px 18px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 4vw;
  border-bottom: 1px solid currentColor;
}
header .brand {
  font:
    900 25px Arial,
    sans-serif;
  letter-spacing: -1px;
}
header nav {
  display: flex;
  gap: 28px;
  font-size: 12px;
}
.skip {
  position: fixed;
  left: 10px;
  top: -100px;
  background: white;
  color: #111;
  padding: 12px;
  z-index: 99;
}
.skip:focus {
  top: 10px;
}
.micro {
  font-size: 11px;
  letter-spacing: 1px;
}
.button-fill {
  background: var(--ink);
  color: var(--bg);
}
.status {
  font-size: 12px;
  line-height: 1.75;
}
footer {
  padding: 30px 4vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  border-top: 1px solid currentColor;
}
footer p {
  font-size: 12px;
  max-width: 650px;
  margin: 0;
}
footer strong {
  font:
    900 20px Arial,
    sans-serif;
}
dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: 85dvh;
  overflow: auto;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid currentColor;
  padding: 25px;
}
dialog::backdrop {
  background: #141821c9;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.dialog-head button {
  font-size: 28px;
  border: 0;
  width: 44px;
  padding: 0;
}
dialog h2 {
  font:
    32px Georgia,
    "Yu Mincho",
    serif;
}
dialog p {
  font-size: 14px;
}
.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
input[type="range"] {
  accent-color: var(--ink);
  min-height: 44px;
  max-width: 100%;
  cursor: pointer;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
@media (max-width: 700px) {
  header {
    padding: 17px 20px;
    gap: 10px;
  }
  header .brand {
    font-size: 20px;
  }
  header nav {
    gap: 14px;
    font-size: 11px;
  }
  footer {
    padding: 25px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 13px;
  }
  footer p {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
:root {
  --bg: #e6ebc5;
  --ink: #284c39;
  --focus: #a74042;
}
.specimen-stage {
  position: relative;
  height: 760px;
  overflow: hidden;
  background: repeating-linear-gradient(
    0deg,
    transparent 0 39px,
    #456b4b0a 40px 41px
  );
}
.specimen-stage h1 {
  position: absolute;
  writing-mode: vertical-rl;
  left: 3vw;
  top: 45px;
  font:
    500 clamp(45px, 5vw, 76px)/1.2 "Yu Mincho",
    Georgia,
    serif;
  letter-spacing: 8px;
  margin: 0;
  z-index: 4;
}
.stage-number {
  position: absolute;
  left: 15vw;
  top: 37px;
  display: flex;
  flex-direction: column;
  z-index: 4;
}
.stage-number span {
  font-size: 11px;
}
.stage-number strong {
  font: 40px Georgia;
}
.specimen-sheet {
  width: 340px;
  height: 530px;
  position: absolute;
  top: 140px;
  left: calc(47% - 170px);
  background: #f5f3db;
  border: 1px solid #a0b293;
  transform: rotate(-4deg);
  z-index: 3;
  box-shadow: 10px 20px 0 #284c3918;
  padding: 15px 22px;
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #a0b293;
  padding-bottom: 9px;
}
.sheet-head > span:first-child {
  font: italic 25px Georgia;
}
.sheet-head > span:last-child {
  font-size: 11px;
}
.specimen-sheet > img {
  width: 100%;
  height: 350px;
  object-fit: contain;
  filter: drop-shadow(3px 5px 2px #284c3922);
}
.sheet-caption h2 {
  font:
    24px "Yu Mincho",
    serif;
  margin: 0 0 7px;
}
.sheet-caption > span {
  font-size: 11px;
}
.sheet-caption p {
  font-size: 12px;
  line-height: 1.6;
  margin: 10px 0;
}
.sheet-stamp {
  position: absolute;
  right: 20px;
  bottom: 25px;
  border: 2px solid #a74042;
  color: #a74042;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font:
    12px/1.4 "Yu Mincho",
    serif;
  text-align: center;
  padding-top: 5px;
  transform: rotate(8deg);
}
.back-sheet {
  position: absolute;
  width: 275px;
  height: 440px;
  background: #f1efd4;
  border: 1px solid #a0b293;
  box-shadow: 5px 10px 0 #284c3910;
  padding: 22px;
}
.back-sheet img {
  width: 100%;
  height: 340px;
  object-fit: contain;
}
.back-sheet > span {
  font-size: 11px;
}
.sheet-one {
  top: 190px;
  left: calc(47% - 330px);
  transform: rotate(-17deg);
}
.sheet-two {
  top: 195px;
  left: calc(47% + 80px);
  transform: rotate(15deg);
}
.specimen-controls {
  position: absolute;
  top: 105px;
  right: 4vw;
  width: 230px;
  z-index: 5;
}
.specimen-controls > button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 15px 12px;
  border: 0;
  border-top: 1px solid #8caa84;
  position: relative;
}
.specimen-controls > button:first-of-type {
  margin-top: 18px;
}
.specimen-controls > button[aria-pressed="true"] {
  background: #284c39;
  color: #e6ebc5;
}
.specimen-controls button small {
  font-size: 11px;
  display: block;
}
.specimen-controls button strong {
  font:
    21px "Yu Mincho",
    serif;
  display: block;
  margin-top: 7px;
}
.specimen-controls button > span {
  position: absolute;
  right: 15px;
  top: 30px;
}
.light-control {
  margin: 24px 0;
}
.light-control label {
  font-size: 12px;
  display: flex;
  justify-content: space-between;
}
.light-control input {
  width: 100%;
}
.light-control p {
  font-size: 12px;
  line-height: 1.8;
}
.specimen-controls > #enlarge {
  text-align: center;
  border: 1px solid #284c39;
  font-size: 12px;
}
.stage-scale {
  position: absolute;
  bottom: 30px;
  left: 35%;
  font-size: 11px;
}
.observation-table {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 70px;
  padding: 65px 7vw;
  border-top: 1px solid #92ac85;
  background: #d8e0b6;
}
.observation-table h2 {
  font:
    34px/1.5 "Yu Mincho",
    serif;
  margin: 15px 0;
}
.observation-table dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px 45px;
  margin: 0;
}
.observation-table dl > div {
  border-bottom: 1px solid #8caa84;
  padding: 12px 0 20px;
}
.observation-table dt {
  font-size: 11px;
}
.observation-table dd {
  font:
    28px/1.6 Georgia,
    "Yu Mincho",
    serif;
  margin: 10px 0 0;
}
.observation-table small {
  font: 11px Arial;
}
.lab-note {
  padding: 70px 8vw;
  display: grid;
  grid-template-columns: 130px 1fr 1fr;
  gap: 60px;
}
.lab-note > span {
  font-size: 11px;
}
.lab-note p {
  font:
    16px/2 "Yu Mincho",
    serif;
  max-width: 400px;
}
.lab-note strong {
  font:
    35px/1.5 "Yu Mincho",
    serif;
}
.enlarged-leaf {
  max-height: 54dvh;
  object-fit: contain;
  margin: 0 auto;
  max-width: 100%;
}
@media (max-width: 1050px) {
  .specimen-controls {
    right: 3vw;
    width: 205px;
  }
  .specimen-sheet {
    left: calc(42% - 170px);
  }
  .sheet-one {
    left: calc(42% - 285px);
  }
  .sheet-two {
    left: calc(42% + 30px);
  }
  .specimen-stage h1 {
    font-size: 52px;
    left: 2vw;
  }
  .stage-number {
    left: 13vw;
  }
  .specimen-sheet {
    width: 300px;
    height: 510px;
  }
  .specimen-sheet > img {
    height: 325px;
  }
  .back-sheet {
    width: 225px;
  }
  .lab-note {
    gap: 30px;
    padding: 50px 5vw;
    grid-template-columns: 100px 1fr 1fr;
  }
  .lab-note strong {
    font-size: 28px;
  }
}
@media (max-width: 700px) {
  header .brand {
    font-size: 16px;
  }
  header nav {
    gap: 10px;
    font-size: 11px;
  }
  .specimen-stage {
    height: 1170px;
  }
  .specimen-stage h1 {
    writing-mode: horizontal-tb;
    left: 22px;
    top: 35px;
    font-size: 41px;
    letter-spacing: 1px;
  }
  .stage-number {
    left: 25px;
    top: 105px;
  }
  .stage-number strong {
    font-size: 30px;
  }
  .stage-number span:last-child {
    display: none;
  }
  .specimen-sheet {
    width: 270px;
    height: 460px;
    left: calc(50% - 135px);
    top: 215px;
    padding: 15px 18px;
  }
  .specimen-sheet > img {
    height: 280px;
  }
  .sheet-caption h2 {
    font-size: 23px;
  }
  .sheet-caption p {
    max-width: 190px;
    font-size: 12px;
  }
  .sheet-stamp {
    right: 14px;
    bottom: 24px;
    width: 40px;
    height: 40px;
    font-size: 11px;
    padding-top: 3px;
  }
  .back-sheet {
    width: 200px;
    height: 370px;
    top: 260px;
  }
  .back-sheet img {
    height: 290px;
  }
  .sheet-one {
    left: calc(50% - 230px);
  }
  .sheet-two {
    left: calc(50% + 20px);
  }
  .specimen-controls {
    left: 25px;
    right: 25px;
    top: 735px;
    width: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
  }
  .specimen-controls > .micro {
    grid-column: 1/-1;
  }
  .specimen-controls > button {
    padding: 12px 8px;
    border: 1px solid #8caa84;
  }
  .specimen-controls > button:first-of-type {
    margin: 0;
  }
  .specimen-controls button strong {
    font-size: 14px;
  }
  .specimen-controls button small {
    font-size: 11px;
  }
  .specimen-controls button > span {
    display: none;
  }
  .light-control {
    grid-column: 1/-1;
    margin: 20px 0 8px;
  }
  .light-control p {
    margin-bottom: 0;
  }
  .specimen-controls > #enlarge {
    grid-column: 1/-1;
  }
  .stage-scale {
    top: 695px;
    bottom: auto;
    left: 25px;
  }
  .observation-table {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 40px 25px;
  }
  .observation-table h2 {
    font-size: 30px;
  }
  .observation-table dl {
    gap: 15px 25px;
  }
  .observation-table dd {
    font-size: 23px;
  }
  .lab-note {
    grid-template-columns: 1fr;
    padding: 45px 25px;
    gap: 15px;
  }
  .lab-note p {
    font-size: 16px;
  }
  .lab-note strong {
    font-size: 32px;
  }
}
