:root {
  --paper:#f5f5ef;
  --white:#fffefa;
  --ink:#253b39;
  --muted:#6f7d75;
  --line:#dbdfd3;
  --green:#3d6657;
  --light-green:#e6ece1;
  --red:#ca503c;
  --gold:#c49b54;
  --serif:"Songti SC","STSong","Noto Serif CJK SC",serif;
  --sans:"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  --organ:#6b9fbb;
  font-family:var(--sans);
  color:var(--ink);
  background:var(--paper);
  font-synthesis:none
}

* {
  box-sizing:border-box
}

body {
  margin:0
}

button,a,input {
  -webkit-tap-highlight-color:transparent
}

button,input {
  font:inherit
}

button {
  cursor:pointer;
  color:inherit
}

button {
  border:0;
  background:none
}

a {
  color:inherit
}

button:focus-visible,a:focus-visible,input:focus-visible,#canvas-host:focus-visible {
  outline:3px solid #557969;
  outline-offset:5px
}

button:disabled {
  cursor:not-allowed;
  opacity:.5
}

button {
  touch-action:manipulation
}

button:hover {
  color:var(--green)
}

.svg-library {
  position:absolute;
  width:0;
  height:0;
  overflow:hidden
}

.icon {
  width:21px;
  height:21px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.5;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex-shrink:0
}

.masthead {
  margin-top: 60px;
  height:83px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
  padding:0 3.3%;
  gap:24px
}

.brand {
  font-weight:650;
  letter-spacing:2px;
  font-size:18px;
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  white-space:nowrap
}

.brand-mark {
  height:35px;
  width:39px;
  color:var(--red);
  display:grid;
  place-items:center
}

.brand-mark svg {
  width:35px;
  height:35px;
  fill:currentColor
}

.brand-en {
  font-family:Georgia,serif;
  font-size:9px;
  letter-spacing:1.5px;
  font-weight:400;
  color:var(--muted);
  max-width:70px;
  line-height:1.6;
  margin-left:3px;
  white-space:normal
}

.header-note {
  font-size:12px;
  letter-spacing:2px;
  color:var(--muted);
  display:flex;
  align-items:center;
  gap:9px
}

.status-dot {
  width:5px;
  height:5px;
  background:#7b9479;
  border-radius:50%
}

.text-button {
  font-size:12px;
  padding:12px 0
}

.text-button span {
  margin-left:13px;
  font-size:17px
}

main {
  max-width:1600px;
  margin:auto;
  padding:0 3.3%
}

.intro {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:32px 0 29px;
  gap:20px
}

.eyebrow {
  font-size:10px;
  letter-spacing:2px;
  color:var(--muted);
  font-weight:500
}

.intro .eyebrow {
  margin-bottom:11px
}

h1 {
  font-family:var(--serif);
  font-size:43px;
  line-height:1.25;
  margin:0;
  font-weight:600;
  letter-spacing:2px
}

.title-dot {
  color:var(--red)
}

.intro-copy {
  font-size:12px;
  color:var(--muted);
  margin:11px 0 0;
  letter-spacing:.7px
}

.mode-switch {
  display:flex;
  border:1px solid var(--line);
  border-radius:9px;
  padding:5px;
  gap:3px;
  background:#eceee5;
  align-self:flex-end;
  margin-bottom:1px
}

.mode-switch button {
  padding:11px 19px;
  font-size:12px;
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
  border-radius:6px;
  color:#788176;
  transition:background .2s,color .2s
}

.mode-switch button[aria-pressed=true] {
  background:var(--green);
  color:#fffef7;
  box-shadow:0 2px 4px #25443213
}

.mode-icon {
  font-size:17px;
  line-height:16px
}

.explorer {
  display:grid;
  grid-template-columns:minmax(0,1fr) 306px;
  min-height:570px;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
  background:var(--white)
}

.specimen-stage {
  height:100%;
  min-height:588px;
  position:relative;
  overflow:hidden;
  background:radial-gradient(ellipse at 53% 45%,#fffefa 5%,#f1f2e8 95%)
}

.specimen-stage:before {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background-image:radial-gradient(#546b4925 .6px,transparent .6px);
  background-size:19px 19px;
  opacity:.48
}

.specimen-stage:after {
  content:"";
  position:absolute;
  left:16%;
  right:12%;
  bottom:27%;
  height:9%;
  border-radius:50%;
  background:radial-gradient(ellipse,#77795114,transparent 65%);
  filter:blur(12px);
  pointer-events:none
}

.specimen-label {
  position:absolute;
  top:28px;
  left:29px;
  z-index:2;
  pointer-events:none
}

.specimen-number {
  font-family:Georgia,serif;
  color:#849080;
  font-size:8px;
  letter-spacing:1.8px
}

.specimen-label h2 {
  font-family:var(--serif);
  font-weight:500;
  font-size:23px;
  margin:9px 0 5px;
  letter-spacing:1px
}

.specimen-label i {
  font-family:Georgia,serif;
  font-size:11px;
  letter-spacing:.4px;
  color:var(--muted)
}

.view-label {
  position:absolute;
  right:24px;
  top:29px;
  display:flex;
  gap:7px;
  align-items:center;
  z-index:2;
  font-size:10px;
  color:var(--muted);
  letter-spacing:1px
}

.view-label>span:first-child {
  height:5px;
  width:5px;
  background:#74917a;
  border-radius:50%
}

#canvas-host {
  position:absolute;
  inset:0;
  z-index:1;
  outline-offset:-4px;
  cursor:grab
}

#canvas-host:active {
  cursor:grabbing
}

#canvas-host canvas {
  display:block;
  width:100%;
  height:100%;
  touch-action:none
}

#leader-lines {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  z-index:2;
  pointer-events:none
}

#leader-lines path {
  stroke:#85927c;
  stroke-width:1;
  fill:none;
  opacity:.57
}

#leader-lines circle {
  fill:var(--white);
  stroke:#74896d;
  stroke-width:1.3
}

#leader-lines .selected-line {
  stroke:var(--green);
  opacity:.8
}

#organ-labels {
  position:absolute;
  inset:0;
  z-index:3;
  pointer-events:none
}

.organ-label {
  position:absolute;
  pointer-events:auto;
  display:flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  padding:8px 10px;
  border:1px solid #d9dfcfb8;
  background:#fffffacf;
  border-radius:6px;
  white-space:nowrap;
  transform:translate(-50%,-50%);
  backdrop-filter:blur(4px);
  transition:background .2s,border-color .2s
}

.organ-label i {
  height:5px;
  width:5px;
  border-radius:50%;
  background:var(--label-color)
}

.organ-label[aria-pressed=true] {
  border-color:#75907a;
  background:#e9f0e6;
  color:#355c48;
  box-shadow:0 2px 12px #3652380b
}

.organ-label[hidden] {
  display:none
}

.stage-hint {
  position:absolute;
  z-index:2;
  bottom:82px;
  left:26px;
  display:flex;
  align-items:center;
  gap:8px;
  font-size:10px;
  color:#7d887b
}

.stage-hint svg {
  width:16px;
  height:16px
}

.stage-tools {
  position:absolute;
  right:23px;
  bottom:73px;
  display:flex;
  gap:5px;
  z-index:3
}

.tool-button {
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fffefaaf;
  color:#708070
}

.tool-button .icon {
  height:17px;
  width:17px
}

.tool-button[aria-pressed=true] {
  background:#e6eddf;
  border-color:#aabda5;
  color:var(--green)
}

.transparency-control {
  position:absolute;
  bottom:20px;
  left:26px;
  right:24px;
  border-top:1px solid var(--line);
  padding-top:19px;
  display:flex;
  align-items:center;
  gap:19px;
  z-index:3;
  color:#64715f;
  font-size:10px
}

.transparency-control label {
  white-space:nowrap
}

.transparency-control input {
  min-width:0;
  width:100%;
  height:4px;
  accent-color:#52705b;
  cursor:pointer
}

.transparency-control output {
  font-variant-numeric:tabular-nums;
  width:37px;
  font-family:Georgia,serif
}

.transparency-control.disabled {
  opacity:.45
}

.orientation {
  position:absolute;
  bottom:129px;
  right:24px;
  z-index:2;
  font-size:8px;
  color:#99a28f;
  line-height:2;
  display:flex;
  flex-direction:column;
  pointer-events:none
}

.loading {
  position:absolute;
  inset:0;
  z-index:4;
  background:var(--paper);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  text-align:center;
  font-size:13px;
  color:var(--muted)
}

.loading[hidden] {
  display:none
}

.loading-fish {
  font-family:var(--serif);
  font-size:40px;
  color:var(--red)
}

.loading p {
  line-height:1.8
}

.organ-panel {
  padding:28px 26px 0;
  border-left:1px solid var(--line);
  display:flex;
  flex-direction:column;
  background:#fffefa;
  --organ:#6b9fbb;
  overflow:hidden
}

.panel-topline {
  display:flex;
  justify-content:space-between;
  align-items:center
}

.panel-topline .eyebrow {
  font-size:9px;
  letter-spacing:1.6px
}

.organ-counter {
  font-family:Georgia,serif;
  font-size:10px;
  color:#8a9686;
  font-variant-numeric:tabular-nums
}

.organ-title-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:28px 0 21px
}

.system-tag {
  font-size:9px;
  color:var(--green);
  border:1px solid var(--line);
  padding:3px 6px;
  border-radius:3px
}

.organ-title-row h2 {
  font-family:var(--serif);
  font-size:36px;
  font-weight:600;
  letter-spacing:3px;
  margin:12px 0 5px;
  line-height:1.15
}

.organ-english {
  font-family:Georgia,serif;
  text-transform:uppercase;
  font-size:9px;
  letter-spacing:1.5px;
  color:#899582
}

.organ-illustration {
  width:97px;
  height:86px;
  display:grid;
  place-items:center;
  background:radial-gradient(circle,#f0f1e8 0,transparent 70%);
  color:var(--organ)
}

.organ-illustration svg {
  width:87px;
  height:74px
}

.organ-panel h3 {
  font-size:15px;
  line-height:1.7;
  font-weight:550;
  margin:0 0 10px;
  letter-spacing:.4px
}

#organ-description {
  font-size:12px;
  line-height:1.95;
  color:#6e796b;
  margin:0;
  min-height:91px
}

.journey {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:4px;
  margin:18px 0 22px;
  color:#57725b;
  font-size:9px;
  line-height:1.6;
  text-align:center
}

.journey span {
  background:#f0f2e9;
  border-radius:4px;
  padding:6px 7px;
  flex:1
}

.journey b {
  font-weight:400;
  font-size:11px;
  color:#9ca78f
}

.discovery {
  padding:16px 15px;
  background:#f4f2e3;
  border-radius:8px
}

.discovery-heading {
  font-size:10px;
  display:flex;
  gap:6px;
  align-items:center;
  color:#82713f;
  letter-spacing:.6px
}

.discovery-heading .icon {
  height:14px;
  width:14px
}

.discovery p {
  font-size:11px;
  line-height:1.9;
  color:#7e775e;
  margin:8px 0 0
}

.listen-button {
  border:1px solid #dce1d3;
  background:#fbfcf7;
  border-radius:6px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:11px 12px;
  margin:20px 0 19px;
  font-size:11px;
  min-height:40px
}

.listen-button .icon {
  width:17px;
  height:17px
}

.listen-wave {
  margin-left:auto;
  letter-spacing:2px;
  color:#8a9f7e;
  font-size:14px
}

.listen-button.speaking {
  background:#e7eddf
}

.panel-navigation {
  margin-top:auto;
  border-top:1px solid var(--line);
  height:50px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-shrink:0
}

.panel-navigation button {
  width:34px;
  height:36px;
  display:grid;
  place-items:center
}

.panel-navigation .icon {
  width:15px;
  height:15px
}

.panel-navigation span {
  font-size:9px;
  color:#89917e
}

.flip {
  transform:rotate(180deg)
}

.organ-directory {
  padding-top:24px
}

.directory-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:15px
}

.directory-heading>div {
  display:flex;
  align-items:center;
  gap:15px
}

.directory-heading h2 {
  font-size:14px;
  font-weight:550;
  letter-spacing:.6px;
  margin:0
}

.directory-heading>div>span {
  font-size:10px;
  color:#8b9582
}

.explore-progress {
  display:flex;
  align-items:center;
  gap:10px;
  font-size:9px;
  color:#7e8b74
}

.progress-dots {
  display:flex;
  gap:3px
}

.progress-dots i {
  width:4px;
  height:12px;
  border-radius:2px;
  background:#dfe5d5
}

.progress-dots i.visited {
  background:#809873
}

.organ-grid {
  display:grid;
  grid-template-columns:repeat(12,1fr);
  gap:7px
}

.organ-chip {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:9px;
  padding:14px 3px 12px;
  border:1px solid var(--line);
  border-radius:8px;
  position:relative;
  min-height:84px;
  background:#fffefa73;
  transition:background .2s,transform .2s,border-color .2s
}

.organ-chip:hover {
  background:#fffefa;
  transform:translateY(-2px)
}

.organ-chip[aria-pressed=true] {
  border-color:#728c6e;
  background:#eaf0e3;
  color:#3c5f45
}

.chip-icon {
  width:34px;
  height:28px;
  display:grid;
  place-items:center;
  color:var(--chip-color)
}

.chip-icon svg {
  width:34px;
  height:28px
}

.organ-chip>span:last-child {
  font-size:11px;
  letter-spacing:.5px
}

.organ-chip.visited:after {
  position:absolute;
  content:"";
  top:7px;
  right:7px;
  width:3px;
  height:3px;
  background:#7e9970;
  border-radius:50%
}

footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:23px 0;
  color:#899380;
  font-size:9px;
  letter-spacing:.5px
}

footer button {
  font-size:9px;
  color:#7c8872;
  padding:8px 0
}

dialog {
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--white);
  color:var(--ink);
  padding:35px;
  max-width:570px;
  width:calc(100% - 32px);
  max-height:85vh
}

dialog::backdrop {
  background:#263b3359;
  backdrop-filter:blur(5px)
}

dialog h2 {
  font-family:var(--serif);
  font-size:28px;
  font-weight:500;
  margin-bottom:20px
}

dialog p {
  font-size:13px;
  line-height:1.9;
  color:var(--muted)
}

dialog h3 {
  font-size:14px;
  margin-top:26px
}

dialog li {
  font-size:12px;
  line-height:1.8;
  margin:10px 0;
  color:var(--green)
}

dialog ul {
  padding-left:18px
}

.dialog-close {
  position:absolute;
  right:18px;
  top:14px;
  font-size:26px;
  width:32px;
  height:32px
}

.dialog-note {
  border-top:1px solid var(--line);
  padding-top:17px
}

body[data-mode=exterior] #leader-lines,body[data-mode=exterior] #organ-labels {
  visibility:hidden
}

@media(min-width:1450px) {
  .specimen-stage {
    min-height:650px
  }
  .organ-panel {
    padding-top:33px
  }
  .organ-title-row {
    margin-top:34px;
    margin-bottom:28px
  }
  #organ-description {
    min-height:105px;
    font-size:13px
  }
  .discovery p {
    font-size:12px
  }
  .journey {
    margin:26px 0
  }
  .organ-panel h3 {
    font-size:16px
  }
  .explorer {
    grid-template-columns:minmax(0,1fr) 335px
  }
}

@media(max-width:1100px) {
  .header-note {
    display:none
  }
  .explorer {
    grid-template-columns:minmax(0,1fr) 285px
  }
  .organ-panel {
    padding-left:21px;
    padding-right:21px
  }
  .mode-switch button {
    padding:10px 13px
  }
  .organ-grid {
    grid-template-columns:repeat(6,1fr)
  }
  .organ-chip {
    flex-direction:row;
    justify-content:center;
    min-height:59px;
    padding:10px;
    gap:8px
  }
  .stage-hint {
    font-size:9px;
    bottom:111px
  }
  .specimen-label {
    left:20px
  }
  .stage-tools {
    right:18px
  }
  .transparency-control {
    left:20px;
    right:18px
  }
  .intro {
    padding-top:27px
  }
}

@media(max-width:760px) {
  .masthead {
    height:68px;
    padding:0 5%
  }
  .brand {
    font-size:16px;
    gap:7px;
    letter-spacing:1px
  }
  .brand-en {
    display:none
  }
  .text-button {
    font-size:10px
  }
  .text-button span {
    margin-left:5px
  }
  main {
    padding:0 4%
  }
  .intro {
    display:block;
    padding:26px 3px 20px
  }
  h1 {
    font-size:35px
  }
  .intro-copy {
    font-size:11px;
    margin-top:8px
  }
  .intro .eyebrow {
    font-size:9px
  }
  .mode-switch {
    margin-top:21px;
    width:100%;
    padding:4px;
    gap:2px
  }
  .mode-switch button {
    flex:1;
    justify-content:center;
    padding:11px 4px;
    font-size:11px;
    gap:5px
  }
  .explorer {
    display:flex;
    flex-direction:column;
    border-radius:12px
  }
  .specimen-stage {
    height:470px;
    min-height:0;
    width:100%
  }
  .specimen-label {
    top:20px;
    left:18px
  }
  .specimen-label h2 {
    font-size:20px;
    margin:6px 0 3px
  }
  .specimen-number {
    font-size:7px;
    letter-spacing:1px
  }
  .specimen-label i {
    font-size:10px
  }
  .view-label {
    top:23px;
    right:17px;
    font-size:8px
  }
  .stage-hint {
    left:17px;
    bottom:113px;
    font-size:8px
  }
  .stage-hint .icon {
    width:14px
  }
  .stage-tools {
    right:15px;
    bottom:66px
  }
  .tool-button {
    height:35px;
    width:35px
  }
  .transparency-control {
    left:17px;
    right:17px;
    font-size:9px;
    bottom:20px;
    padding-top:14px;
    gap:12px
  }
  .orientation {
    right:17px;
    bottom:115px;
    font-size:7px
  }
  .organ-label {
    font-size:9px;
    padding:7px 8px;
    gap:4px
  }
  .organ-label i {
    height:4px;
    width:4px
  }
  .organ-panel {
    border-left:0;
    border-top:1px solid var(--line);
    padding:24px 23px 0
  }
  .organ-title-row {
    margin:20px 0 15px
  }
  .organ-title-row h2 {
    font-size:32px
  }
  .organ-illustration {
    height:75px;
    width:92px
  }
  #organ-description {
    min-height:0;
    font-size:13px
  }
  .organ-panel h3 {
    font-size:16px
  }
  .journey {
    margin:19px 0;
    font-size:10px;
    justify-content:flex-start;
    gap:8px
  }
  .journey span {
    flex:initial;
    padding:7px 12px
  }
  .discovery {
    padding:15px
  }
  .discovery p {
    font-size:12px
  }
  .listen-button {
    margin:16px 0
  }
  .panel-navigation {
    height:51px
  }
  .directory-heading {
    align-items:flex-start;
    gap:8px
  }
  .directory-heading>div {
    display:block
  }
  .directory-heading h2 {
    font-size:14px;
    margin-bottom:6px
  }
  .directory-heading>div>span {
    font-size:9px
  }
  .explore-progress {
    margin-top:3px;
    gap:6px;
    font-size:8px
  }
  .progress-dots {
    gap:2px
  }
  .progress-dots i {
    width:3px;
    height:10px
  }
  .organ-grid {
    grid-template-columns:repeat(4,1fr);
    gap:6px
  }
  .organ-chip {
    flex-direction:column;
    min-height:75px;
    gap:6px;
    padding:10px 2px
  }
  .organ-chip>span:last-child {
    font-size:10px
  }
  footer {
    flex-direction:column;
    align-items:flex-start;
    gap:3px;
    padding:20px 2px;
    font-size:8px;
    line-height:1.8
  }
  footer button {
    font-size:8px
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    transition:none!important;
    scroll-behavior:auto!important
  }
}

@media (max-width: 34rem) {
  .masthead { margin-top: 0; }
  footer { padding-bottom: 85px; }
}
