:root {
  color-scheme: light;
  --ink: #293241;
  --muted: #667085;
  --sun: #f7c85f;
  --coral: #ee7b62;
  --leaf: #65a878;
  --sky: #76b7d6;
  --blue: #366e9d;
  --plum: #70577f;
  --line: rgba(41, 50, 65, 0.16);
  --shadow: 0 16px 30px rgba(68, 53, 31, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(247, 200, 95, 0.26), transparent 28%),
    linear-gradient(180deg, #fff4dc 0%, #f2f8f8 48%, #fff9ed 100%);
  font-family:
    ui-rounded,
    "Hiragino Maru Gothic ProN",
    "PingFang TC",
    "Microsoft JhengHei",
    system-ui,
    sans-serif;
}

body.is-using-3d-control {
  overflow: hidden;
  overscroll-behavior: none;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 5vw, 56px);
  background: rgba(255, 249, 237, 0.86);
  border-bottom: 1px solid rgba(41, 50, 65, 0.08);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  overflow: hidden;
  place-items: center;
  color: #ffffff;
  background: var(--blue);
  border: 2px solid rgba(41, 50, 65, 0.12);
  border-radius: 8px;
  box-shadow: 4px 5px 0 #e6c45f;
  font-weight: 900;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a,
.filter-button,
.text-button {
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--ink);
}

.nav-links a:hover,
.filter-button:hover,
.text-button:hover {
  background: rgba(54, 110, 157, 0.1);
}

.hero-band,
.tool-band,
.exhibit-band,
.library-band,
.studio-band {
  padding-inline: clamp(18px, 5vw, 56px);
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  align-items: center;
  gap: clamp(28px, 6vw, 72px);
  min-height: min(760px, calc(100vh - 73px));
  padding-block: clamp(44px, 8vw, 88px) 46px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.stage-kicker {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(3.1rem, 9vw, 7.5rem);
  line-height: 0.95;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.tagline {
  margin-bottom: 14px;
  color: #9a4a39;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 900;
}

.subtitle {
  max-width: 660px;
  color: #46515f;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.75;
}

.hero-object {
  min-height: 390px;
  perspective: 900px;
}

.tool-band {
  padding-block: 18px 28px;
}

.tool-row {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1180px;
  margin-inline: auto;
}

.search-box {
  display: flex;
  flex: 1 1 260px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(54, 110, 157, 0.08);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.filter-button.is-active {
  color: #ffffff;
  background: var(--blue);
}

.exhibit-band,
.library-band,
.studio-band {
  padding-block: clamp(44px, 7vw, 86px);
}

.section-heading {
  max-width: 860px;
  margin: 0 auto 26px;
  text-align: center;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.exhibit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 24px;
  max-width: 1180px;
  margin-inline: auto;
  align-items: stretch;
}

.exhibit-stage,
.story-page,
.draft-form,
.draft-list,
.content-card,
.empty-state {
  border: 1px solid rgba(41, 50, 65, 0.13);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.exhibit-stage {
  overflow: hidden;
  min-height: 600px;
  padding: clamp(18px, 3vw, 28px);
  background:
    linear-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28) 1px, transparent 1px),
    #f4dcae;
  background-size: 28px 28px;
}

.stage-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.icon-button {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #ffffff;
  background: var(--coral);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 7px 0 #b84f3e;
  font-size: 1.8rem;
}

.icon-button:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 #b84f3e;
}

.toilet-model {
  position: relative;
  min-height: 430px;
  margin-top: 20px;
  transform-style: preserve-3d;
}

.tank,
.bowl,
.trapway,
.floor-shadow {
  position: absolute;
}

.tank {
  top: 20px;
  left: clamp(20px, 8vw, 92px);
  width: min(46%, 305px);
  height: 190px;
  overflow: hidden;
  background: #fffaf0;
  border: 4px solid #293241;
  border-radius: 8px;
  transform: rotate(-1deg);
  box-shadow: 10px 12px 0 rgba(54, 110, 157, 0.22);
}

.tank-water {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 15px;
  height: 122px;
  background: linear-gradient(180deg, rgba(118, 183, 214, 0.74), #438fbd);
  border-radius: 7px;
  transition: height 520ms ease;
}

.handle {
  position: absolute;
  top: 23px;
  right: 24px;
  width: 54px;
  height: 18px;
  background: var(--sun);
  border: 3px solid #293241;
  border-radius: 999px;
}

.flapper {
  position: absolute;
  left: 45%;
  bottom: 10px;
  width: 58px;
  height: 24px;
  background: var(--coral);
  border: 3px solid #293241;
  border-radius: 999px;
  transform-origin: left center;
  transition: transform 420ms ease;
}

.fill-valve {
  position: absolute;
  left: 26px;
  top: 30px;
  width: 16px;
  height: 126px;
  background: var(--leaf);
  border: 3px solid #293241;
  border-radius: 999px;
}

.float-ball {
  position: absolute;
  left: 54px;
  top: 66px;
  width: 45px;
  aspect-ratio: 1;
  background: var(--sun);
  border: 3px solid #293241;
  border-radius: 50%;
  transition: transform 520ms ease;
}

.bowl {
  right: clamp(18px, 9vw, 92px);
  bottom: 78px;
  width: min(46%, 330px);
  height: 235px;
  overflow: hidden;
  background: #fffaf0;
  border: 4px solid #293241;
  border-radius: 48% 52% 44% 46% / 34% 34% 66% 66%;
  box-shadow: 11px 13px 0 rgba(101, 168, 120, 0.2);
}

.bowl::before {
  position: absolute;
  inset: 32px 44px 58px;
  background: #f1efe6;
  border: 3px solid #293241;
  border-radius: 50%;
  content: "";
}

.bowl-water {
  position: absolute;
  left: 72px;
  right: 72px;
  bottom: 72px;
  height: 58px;
  background: linear-gradient(180deg, #89c9e4, #438fbd);
  border-radius: 50%;
  transition: transform 520ms ease, height 520ms ease;
}

.water-swoosh {
  position: absolute;
  inset: 60px 76px 78px;
  border: 12px solid rgba(54, 110, 157, 0.72);
  border-left-color: transparent;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 260ms ease;
}

.trapway {
  right: clamp(36px, 11vw, 132px);
  bottom: 28px;
  width: 215px;
  height: 126px;
  border-right: 24px solid #293241;
  border-bottom: 24px solid #293241;
  border-radius: 0 0 76px 0;
}

.flow-dot {
  position: absolute;
  width: 18px;
  aspect-ratio: 1;
  background: var(--sky);
  border: 3px solid #293241;
  border-radius: 50%;
  opacity: 0;
}

.dot-one {
  top: 20px;
  right: 8px;
}

.dot-two {
  right: 34px;
  bottom: 8px;
}

.dot-three {
  left: 18px;
  bottom: 8px;
}

.floor-shadow {
  right: 8%;
  bottom: 18px;
  left: 9%;
  height: 35px;
  background: rgba(41, 50, 65, 0.1);
  border-radius: 50%;
}

.label {
  position: absolute;
  z-index: 2;
  padding: 5px 8px;
  background: #ffffff;
  border: 2px solid #293241;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
}

.label-tank {
  left: 16px;
  bottom: 12px;
}

.label-bowl {
  right: 18px;
  bottom: 22px;
}

.toilet-model[data-state="release"] .tank-water,
.toilet-model[data-state="siphon"] .tank-water {
  height: 42px;
}

.toilet-model[data-state="release"] .flapper,
.toilet-model[data-state="siphon"] .flapper {
  transform: rotate(-34deg);
}

.toilet-model[data-state="release"] .bowl-water {
  height: 92px;
  transform: translateY(-10px);
}

.toilet-model[data-state="siphon"] .bowl-water {
  height: 38px;
  transform: translateY(20px);
}

.toilet-model[data-state="siphon"] .water-swoosh {
  opacity: 1;
  animation: spin 1.1s linear infinite;
}

.toilet-model[data-state="siphon"] .flow-dot {
  opacity: 1;
  animation: pulse 860ms ease-in-out infinite alternate;
}

.toilet-model[data-state="refill"] .tank-water {
  height: 122px;
}

.toilet-model[data-state="refill"] .float-ball {
  transform: translateY(-26px);
}

.toilet-model[data-state="refill"] .bowl-water {
  height: 58px;
}

.step-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.step-button {
  width: 44px;
  height: 44px;
  color: var(--ink);
  background: #ffffff;
  border: 2px solid #293241;
  border-radius: 50%;
  font-weight: 900;
}

.step-button.is-active {
  color: #ffffff;
  background: var(--blue);
}

.story-panel {
  display: flex;
}

.story-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: clamp(22px, 4vw, 34px);
  background: #fffaf0;
}

.page-number {
  margin-bottom: auto;
  color: rgba(41, 50, 65, 0.2);
  font-size: clamp(3.6rem, 8vw, 6.8rem);
  font-weight: 900;
  line-height: 0.9;
}

.story-page h3 {
  margin-top: 60px;
  font-size: clamp(1.6rem, 3vw, 2.7rem);
  line-height: 1.12;
}

.story-page p:not(.page-number) {
  color: #4b5664;
  font-size: 1.08rem;
  line-height: 1.8;
}

.vocab-row,
.tag-row,
.meta-row,
.content-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vocab-row span,
.tag-row span,
.meta-row span,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  background: rgba(247, 200, 95, 0.28);
  border: 1px solid rgba(41, 50, 65, 0.13);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
}

.library-band {
  background: rgba(255, 255, 255, 0.42);
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: 1180px;
  margin-inline: auto;
}

.content-card {
  min-height: 288px;
  padding: 20px;
  background: #ffffff;
}

.content-card-top {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.content-card h3 {
  font-size: 1.35rem;
}

.content-card p {
  color: #526070;
  line-height: 1.65;
}

.english-title {
  margin-bottom: 10px;
  color: var(--blue);
  font-weight: 900;
}

.meta-row {
  margin-top: 18px;
}

.tag-row {
  margin-top: 12px;
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  max-width: 1050px;
  margin-inline: auto;
}

.draft-form,
.draft-list {
  padding: 22px;
  background: rgba(255, 255, 255, 0.84);
}

.draft-form {
  display: grid;
  gap: 14px;
}

.draft-form label {
  display: grid;
  gap: 7px;
  color: #526070;
  font-weight: 800;
}

.draft-form input,
.draft-form select,
.draft-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #fffaf0;
  outline-color: var(--sky);
}

.primary-button {
  min-height: 46px;
  color: #ffffff;
  background: var(--leaf);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 5px 0 #467c57;
  font-weight: 900;
}

.draft-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.draft-list-head h3 {
  margin-bottom: 0;
}

.text-button {
  border: 1px solid var(--line);
  background: transparent;
}

.draft-item {
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.draft-item span {
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 900;
}

.draft-item h4 {
  margin: 6px 0;
  font-size: 1.08rem;
}

.draft-item p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 20px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  color: var(--ink);
  font-size: 1.1rem;
}

.empty-state.small {
  min-height: 132px;
  box-shadow: none;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 5vw, 56px);
  color: #ffffff;
  background: #293241;
}

.flush-action {
  min-width: 138px;
  min-height: 58px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--coral);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 7px 0 #b84f3e;
  font-weight: 900;
}

.flush-action:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 #b84f3e;
}

.flush-hint {
  max-width: 620px;
  margin: 8px 0 0;
  color: #5d4f3f;
  line-height: 1.55;
}

.mechanism-board {
  position: relative;
  min-height: 520px;
  margin-top: 22px;
  overflow: hidden;
}

.tank-cutaway,
.bowl-cutaway,
.trap-cutaway {
  position: absolute;
  border: 4px solid #293241;
  box-shadow: 10px 12px 0 rgba(54, 110, 157, 0.18);
}

.tank-cutaway {
  top: 18px;
  left: 20px;
  width: min(58%, 430px);
  height: 300px;
  overflow: hidden;
  background: rgba(255, 250, 240, 0.9);
  border-radius: 8px;
}

.tank-water-level {
  position: absolute;
  right: 16px;
  bottom: 18px;
  left: 16px;
  height: 205px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 28%),
    linear-gradient(180deg, #8ad2e8, #438fbd);
  border: 2px solid rgba(41, 50, 65, 0.22);
  border-radius: 8px;
  transition: height 760ms ease, opacity 420ms ease;
}

.waterline {
  position: absolute;
  top: 72px;
  right: 16px;
  left: 16px;
  padding-top: 3px;
  color: rgba(41, 50, 65, 0.56);
  border-top: 2px dashed rgba(41, 50, 65, 0.32);
  font-size: 0.8rem;
  font-weight: 900;
}

.inside-handle {
  position: absolute;
  top: 31px;
  left: 16px;
  width: 50px;
  height: 24px;
  background: var(--sun);
  border: 3px solid #293241;
  border-radius: 999px;
  transition: transform 220ms ease;
}

.trip-lever {
  position: absolute;
  top: 45px;
  left: 52px;
  width: 190px;
  height: 9px;
  background: #293241;
  border-radius: 999px;
  transform-origin: 0 center;
  transition: transform 260ms ease;
}

.trip-lever::after {
  position: absolute;
  top: -7px;
  right: -10px;
  width: 22px;
  aspect-ratio: 1;
  background: var(--sun);
  border: 3px solid #293241;
  border-radius: 50%;
  content: "";
}

.lift-chain {
  position: absolute;
  top: 50px;
  left: 235px;
  width: 6px;
  height: 153px;
  background: repeating-linear-gradient(
    180deg,
    #293241 0 8px,
    transparent 8px 14px
  );
  transform-origin: top center;
  transition: height 280ms ease, transform 280ms ease;
}

.overflow-tube {
  position: absolute;
  right: 122px;
  bottom: 39px;
  width: 44px;
  height: 190px;
  background: #f6e7cf;
  border: 4px solid #293241;
  border-radius: 999px 999px 8px 8px;
}

.overflow-tube::before {
  position: absolute;
  top: 16px;
  left: 6px;
  width: 24px;
  height: 10px;
  background: rgba(54, 110, 157, 0.28);
  border-radius: 999px;
  content: "";
}

.refill-tube {
  position: absolute;
  top: 52px;
  right: 116px;
  width: 126px;
  height: 64px;
  border-top: 9px solid #293241;
  border-right: 9px solid #293241;
  border-radius: 0 34px 0 0;
}

.fill-valve-body {
  position: absolute;
  top: 54px;
  right: 38px;
  width: 42px;
  height: 205px;
  background: var(--leaf);
  border: 4px solid #293241;
  border-radius: 999px 999px 8px 8px;
}

.fill-valve-body::before {
  position: absolute;
  top: -24px;
  left: -12px;
  width: 62px;
  height: 30px;
  background: #fffaf0;
  border: 4px solid #293241;
  border-radius: 999px;
  content: "";
}

.float-cup {
  position: absolute;
  right: 86px;
  bottom: 104px;
  width: 55px;
  height: 72px;
  background: var(--sun);
  border: 4px solid #293241;
  border-radius: 22px;
  transition: transform 760ms ease;
}

.float-cup::after {
  position: absolute;
  top: 30px;
  right: -40px;
  width: 40px;
  height: 5px;
  background: #293241;
  border-radius: 999px;
  content: "";
}

.flapper-seal {
  position: absolute;
  left: 203px;
  bottom: 47px;
  width: 84px;
  height: 31px;
  background: var(--coral);
  border: 4px solid #293241;
  border-radius: 999px 999px 12px 12px;
  transform-origin: left center;
  transition: transform 320ms ease;
  z-index: 3;
}

.flush-valve-seat {
  position: absolute;
  left: 214px;
  bottom: 24px;
  width: 82px;
  height: 46px;
  background: #f1efe6;
  border: 4px solid #293241;
  border-radius: 999px;
}

.tank-to-bowl-stream {
  position: absolute;
  left: 228px;
  bottom: -8px;
  width: 50px;
  height: 110px;
  background: linear-gradient(180deg, #8ad2e8, rgba(67, 143, 189, 0.18));
  border-radius: 999px;
  opacity: 0;
  transition: opacity 220ms ease;
  z-index: 2;
}

.fill-stream,
.refill-stream {
  position: absolute;
  background: linear-gradient(180deg, #ffffff, #76b7d6);
  border-radius: 999px;
  opacity: 0;
  transition: opacity 280ms ease;
}

.fill-stream {
  right: 53px;
  bottom: 34px;
  width: 12px;
  height: 130px;
}

.refill-stream {
  top: 65px;
  right: 144px;
  width: 10px;
  height: 78px;
  transform: rotate(34deg);
}

.bowl-cutaway {
  right: 18px;
  bottom: 105px;
  width: min(45%, 330px);
  height: 245px;
  overflow: hidden;
  background: #fffaf0;
  border-radius: 48% 52% 46% 46% / 34% 34% 66% 66%;
}

.bowl-cutaway::before {
  position: absolute;
  inset: 34px 48px 70px;
  background: #f1efe6;
  border: 4px solid #293241;
  border-radius: 50%;
  content: "";
}

.bowl-water-pool {
  position: absolute;
  left: 72px;
  right: 72px;
  bottom: 72px;
  height: 56px;
  background: linear-gradient(180deg, #8ad2e8, #438fbd);
  border-radius: 50%;
  transition: height 560ms ease, transform 560ms ease;
  z-index: 2;
}

.bowl-rim-flow {
  position: absolute;
  top: 62px;
  left: 60px;
  right: 60px;
  height: 24px;
  background: #76b7d6;
  border: 3px solid #293241;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 240ms ease;
}

.waste-piece {
  position: absolute;
  left: 45%;
  bottom: 108px;
  z-index: 3;
  display: grid;
  width: 58px;
  height: 36px;
  place-items: center;
  color: #ffffff;
  background: #8b6b55;
  border: 3px solid #293241;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  transition: transform 740ms ease, opacity 400ms ease;
}

.siphon-swirl {
  position: absolute;
  inset: 62px 78px 78px;
  z-index: 4;
  border: 11px solid rgba(54, 110, 157, 0.7);
  border-left-color: transparent;
  border-radius: 50%;
  opacity: 0;
}

.trap-cutaway {
  right: 62px;
  bottom: 38px;
  width: 230px;
  height: 140px;
  border-top: 0;
  border-left: 0;
  border-radius: 0 0 84px 0;
  box-shadow: none;
}

.siphon-dot {
  position: absolute;
  width: 18px;
  aspect-ratio: 1;
  background: var(--sky);
  border: 3px solid #293241;
  border-radius: 50%;
  opacity: 0;
}

.dot-a {
  top: 12px;
  right: 8px;
}

.dot-b {
  right: 38px;
  bottom: 10px;
}

.dot-c {
  left: 20px;
  bottom: 10px;
}

.part-chip {
  position: absolute;
  z-index: 8;
  min-height: 30px;
  padding: 5px 9px;
  color: var(--ink);
  background: #ffffff;
  border: 2px solid #293241;
  border-radius: 999px;
  box-shadow: 2px 3px 0 rgba(41, 50, 65, 0.16);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.part-chip.is-lit {
  background: #ffe08a;
  box-shadow: 0 0 0 4px rgba(247, 200, 95, 0.34), 2px 3px 0 rgba(41, 50, 65, 0.16);
}

.part-chip.is-selected {
  color: #ffffff;
  background: var(--blue);
}

.handle-chip {
  top: 7px;
  left: 10px;
}

.lever-chip {
  top: 57px;
  left: 82px;
}

.chain-chip {
  top: 106px;
  left: 205px;
}

.flapper-chip {
  left: 186px;
  bottom: 80px;
}

.valve-chip {
  left: 262px;
  bottom: 20px;
}

.overflow-chip {
  right: 102px;
  top: 102px;
}

.refill-chip {
  right: 166px;
  top: 38px;
}

.fill-chip {
  right: 18px;
  top: 84px;
}

.float-chip {
  right: 52px;
  bottom: 184px;
}

.trap-chip {
  right: 44px;
  bottom: 16px;
}

.phase-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.phase-button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 900;
  text-align: left;
}

.phase-button span {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #ffffff;
  background: var(--plum);
  border-radius: 50%;
  font-size: 0.78rem;
}

.phase-button.is-active {
  background: #fff3c7;
  border-color: rgba(41, 50, 65, 0.42);
}

.stage-actions {
  display: flex;
  justify-content: center;
  margin-top: 13px;
}

.secondary-button {
  min-height: 42px;
  padding: 0 15px;
  color: var(--ink);
  background: #ffffff;
  border: 2px solid #293241;
  border-radius: 8px;
  font-weight: 900;
}

.part-detail {
  margin-top: 22px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.part-detail span,
.part-detail strong {
  display: block;
}

.part-detail span {
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
}

.part-detail strong {
  margin: 5px 0 8px;
  font-size: 1.2rem;
}

.part-detail p {
  margin-bottom: 0;
}

.mechanism-board[data-phase="pressed"] .inside-handle,
.mechanism-board[data-phase="drain"] .inside-handle,
.mechanism-board[data-phase="siphon"] .inside-handle {
  transform: rotate(18deg) translateY(4px);
}

.mechanism-board[data-phase="pressed"] .trip-lever,
.mechanism-board[data-phase="drain"] .trip-lever,
.mechanism-board[data-phase="siphon"] .trip-lever {
  transform: rotate(-15deg);
}

.mechanism-board[data-phase="pressed"] .lift-chain,
.mechanism-board[data-phase="drain"] .lift-chain,
.mechanism-board[data-phase="siphon"] .lift-chain {
  height: 121px;
  transform: translateY(-16px);
}

.mechanism-board[data-phase="pressed"] .flapper-seal,
.mechanism-board[data-phase="drain"] .flapper-seal,
.mechanism-board[data-phase="siphon"] .flapper-seal {
  transform: rotate(-38deg) translateY(-4px);
}

.mechanism-board[data-phase="drain"] .tank-water-level,
.mechanism-board[data-phase="siphon"] .tank-water-level {
  height: 68px;
}

.mechanism-board[data-phase="refill"] .tank-water-level {
  height: 154px;
}

.mechanism-board[data-phase="drain"] .tank-to-bowl-stream,
.mechanism-board[data-phase="siphon"] .tank-to-bowl-stream {
  opacity: 1;
  animation: waterDrop 520ms linear infinite;
}

.mechanism-board[data-phase="drain"] .bowl-rim-flow,
.mechanism-board[data-phase="siphon"] .bowl-rim-flow {
  opacity: 1;
}

.mechanism-board[data-phase="drain"] .bowl-water-pool {
  height: 92px;
  transform: translateY(-14px);
}

.mechanism-board[data-phase="siphon"] .bowl-water-pool {
  height: 38px;
  transform: translateY(22px);
}

.mechanism-board[data-phase="siphon"] .siphon-swirl {
  opacity: 1;
  animation: spin 900ms linear infinite;
}

.mechanism-board[data-phase="drain"] .waste-piece {
  transform: translate(36px, 20px);
}

.mechanism-board[data-phase="siphon"] .waste-piece,
.mechanism-board[data-phase="refill"] .waste-piece,
.mechanism-board[data-phase="stop"] .waste-piece {
  opacity: 0;
  transform: translate(120px, 96px) scale(0.72);
}

.mechanism-board[data-phase="siphon"] .siphon-dot {
  opacity: 1;
  animation: pulse 760ms ease-in-out infinite alternate;
}

.mechanism-board[data-phase="drain"] .float-cup,
.mechanism-board[data-phase="siphon"] .float-cup,
.mechanism-board[data-phase="refill"] .float-cup {
  transform: translateY(62px);
}

.mechanism-board[data-phase="refill"] .fill-stream,
.mechanism-board[data-phase="refill"] .refill-stream {
  opacity: 1;
  animation: waterDrop 520ms linear infinite;
}

.mechanism-board[data-phase="refill"] .bowl-water-pool,
.mechanism-board[data-phase="stop"] .bowl-water-pool {
  height: 56px;
}

@keyframes waterDrop {
  50% {
    transform: translateY(8px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  to {
    transform: translateX(-16px);
  }
}

@media (max-width: 980px) {
  .hero-band,
  .exhibit-layout,
  .studio-layout {
    grid-template-columns: 1fr;
  }

  .hero-band {
    min-height: auto;
  }

  .hero-object {
    min-height: 330px;
  }

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

  .story-panel {
    min-height: 330px;
  }

  .mechanism-board {
    min-height: 610px;
  }

  .tank-cutaway {
    width: calc(100% - 24px);
    left: 12px;
  }

  .bowl-cutaway {
    right: 12px;
    bottom: 96px;
    width: min(58%, 330px);
  }

  .trap-cutaway {
    right: 58px;
  }
}

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

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .nav-links a {
    padding-inline: 8px;
  }

  .tool-row {
    align-items: stretch;
    flex-direction: column;
  }

  .exhibit-band,
  .library-band,
  .studio-band {
    padding-block: 42px;
  }

  .exhibit-stage {
    min-height: 720px;
  }

  .mechanism-board {
    min-height: 670px;
  }

  .tank-cutaway {
    height: 310px;
  }

  .bowl-cutaway {
    right: 8px;
    bottom: 112px;
    width: 74%;
    height: 220px;
  }

  .trap-cutaway {
    right: 26px;
    bottom: 50px;
    width: 185px;
  }

  .phase-controls {
    grid-template-columns: 1fr;
  }

  .part-chip {
    font-size: 0.72rem;
  }

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

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

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

/* Realistic museum exhibit theme */
:root {
  --ink: #1f2933;
  --muted: #5d6977;
  --sun: #f3b23f;
  --coral: #d9543f;
  --leaf: #3f8f66;
  --sky: #49a9d1;
  --blue: #1f6f9f;
  --plum: #51606f;
  --line: rgba(31, 41, 51, 0.18);
  --shadow: 0 18px 34px rgba(25, 38, 52, 0.14);
}

body {
  background:
    linear-gradient(180deg, rgba(238, 244, 248, 0.96), rgba(247, 250, 252, 0.98)),
    repeating-linear-gradient(90deg, rgba(31, 41, 51, 0.035) 0 1px, transparent 1px 72px);
}

.site-header {
  background: rgba(247, 250, 252, 0.9);
}

.brand-mark {
  background: #1f6f9f;
  box-shadow: none;
}

.hero-band {
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.8fr);
}

.eyebrow,
.stage-kicker {
  color: #1f6f9f;
}

.tagline {
  color: #1f2933;
}

.museum-cutaway {
  position: relative;
  width: min(100%, 500px);
  height: 420px;
  margin-inline: auto;
  border: 1px solid rgba(31, 41, 51, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(31, 111, 159, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(31, 111, 159, 0.08) 1px, transparent 1px),
    rgba(255, 255, 255, 0.72);
  background-size: 32px 32px;
  box-shadow: var(--shadow);
}

.museum-cutaway::before {
  position: absolute;
  top: 18px;
  left: 22px;
  color: rgba(31, 41, 51, 0.55);
  font-size: 0.78rem;
  font-weight: 900;
  content: "CUTAWAY EXHIBIT";
}

.tank-preview,
.bowl-preview,
.pipe-preview,
.water-preview,
.valve-preview {
  position: absolute;
  display: block;
  border: 4px solid #27333f;
}

.tank-preview {
  top: 82px;
  left: 52px;
  width: 220px;
  height: 152px;
  background: rgba(255, 255, 255, 0.74);
  border-radius: 8px;
}

.water-preview {
  top: 142px;
  left: 70px;
  width: 184px;
  height: 72px;
  background: linear-gradient(180deg, rgba(111, 198, 228, 0.88), rgba(31, 111, 159, 0.88));
  border: 0;
  border-radius: 6px;
}

.valve-preview {
  top: 116px;
  left: 220px;
  width: 22px;
  height: 98px;
  background: #3f8f66;
  border-radius: 999px;
}

.bowl-preview {
  right: 42px;
  bottom: 72px;
  width: 210px;
  height: 150px;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 48% 52% 50% 50% / 38% 38% 62% 62%;
}

.pipe-preview {
  right: 90px;
  bottom: 44px;
  width: 170px;
  height: 92px;
  border-top: 0;
  border-left: 0;
  border-radius: 0 0 68px 0;
  background: transparent;
}

.exhibit-stage {
  background:
    linear-gradient(90deg, rgba(31, 111, 159, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(31, 111, 159, 0.07) 1px, transparent 1px),
    #edf3f7;
  background-size: 34px 34px;
  box-shadow: 0 22px 44px rgba(25, 38, 52, 0.18);
}

.story-page,
.content-card,
.draft-form,
.draft-list,
.empty-state {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 30px rgba(25, 38, 52, 0.1);
}

.flush-action {
  background: #d9543f;
  box-shadow: 0 6px 0 #8f3428;
}

.flush-action:active {
  box-shadow: 0 2px 0 #8f3428;
}

.tank-cutaway,
.bowl-cutaway {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(239, 246, 250, 0.86));
  border-color: #27333f;
  box-shadow: 8px 10px 0 rgba(31, 111, 159, 0.1);
}

.tank-water-level,
.bowl-water-pool,
.tank-to-bowl-stream,
.fill-stream,
.refill-stream,
.bowl-rim-flow {
  filter: saturate(1.08);
}

.part-chip {
  background: rgba(255, 255, 255, 0.94);
  border-color: #27333f;
  box-shadow: 0 3px 8px rgba(25, 38, 52, 0.12);
}

.part-chip.is-lit {
  background: #dff2fb;
  box-shadow: 0 0 0 4px rgba(73, 169, 209, 0.22), 0 3px 8px rgba(25, 38, 52, 0.12);
}

.part-chip.is-selected {
  background: #1f6f9f;
}

.split-system-board {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 14px;
  min-height: auto;
  overflow: visible;
}

.system-card {
  position: relative;
  min-height: 265px;
  padding: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(31, 41, 51, 0.16);
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(25, 38, 52, 0.09);
}

.tank-system {
  grid-row: span 2;
  min-height: 544px;
}

.system-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.system-card-head span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  background: #1f6f9f;
  border-radius: 50%;
  font-weight: 900;
}

.system-card h4 {
  margin: 0;
  font-size: 1.1rem;
}

.system-card p {
  position: absolute;
  right: 14px;
  bottom: 12px;
  left: 14px;
  margin: 0;
  color: #4e5b68;
  font-size: 0.92rem;
  line-height: 1.5;
}

.tank-diagram,
.bowl-diagram,
.trap-diagram {
  position: relative;
}

.tank-diagram {
  height: 430px;
  margin-top: 6px;
  border: 3px solid #27333f;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(31, 111, 159, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(31, 111, 159, 0.08) 1px, transparent 1px),
    rgba(239, 246, 250, 0.82);
  background-size: 26px 26px;
}

.split-tank-water {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  height: 286px;
  background: linear-gradient(180deg, rgba(118, 204, 231, 0.68), rgba(31, 111, 159, 0.72));
  border: 1px solid rgba(31, 41, 51, 0.18);
  border-radius: 7px;
  transition: height 780ms ease;
}

.split-waterline {
  position: absolute;
  top: 92px;
  right: 18px;
  left: 18px;
  padding-top: 3px;
  color: rgba(31, 41, 51, 0.6);
  border-top: 2px dashed rgba(31, 41, 51, 0.38);
  font-size: 0.78rem;
  font-weight: 900;
}

.split-handle {
  position: absolute;
  top: 36px;
  left: 18px;
  width: 56px;
  height: 24px;
  background: #d9543f;
  border: 3px solid #27333f;
  border-radius: 999px;
  transition: transform 240ms ease;
}

.split-lever {
  position: absolute;
  top: 50px;
  left: 70px;
  width: 175px;
  height: 8px;
  background: #27333f;
  border-radius: 999px;
  transform-origin: 0 center;
  transition: transform 260ms ease;
}

.split-chain {
  position: absolute;
  top: 58px;
  left: 238px;
  width: 6px;
  height: 245px;
  background: repeating-linear-gradient(180deg, #27333f 0 8px, transparent 8px 14px);
  transform-origin: top center;
  transition: height 280ms ease, transform 280ms ease;
}

.split-flapper {
  position: absolute;
  left: 202px;
  bottom: 48px;
  width: 82px;
  height: 31px;
  z-index: 4;
  background: #d9543f;
  border: 4px solid #27333f;
  border-radius: 999px 999px 12px 12px;
  transform-origin: left center;
  transition: transform 320ms ease;
}

.split-flush-valve {
  position: absolute;
  left: 212px;
  bottom: 16px;
  width: 86px;
  height: 58px;
  background: #e8edf1;
  border: 4px solid #27333f;
  border-radius: 999px;
}

.split-overflow {
  position: absolute;
  right: 154px;
  bottom: 44px;
  width: 40px;
  height: 255px;
  background: #f7fafc;
  border: 4px solid #27333f;
  border-radius: 999px 999px 8px 8px;
}

.split-fill-valve {
  position: absolute;
  right: 44px;
  bottom: 42px;
  width: 42px;
  height: 292px;
  background: #3f8f66;
  border: 4px solid #27333f;
  border-radius: 999px 999px 8px 8px;
}

.valve-gate {
  position: absolute;
  top: -21px;
  left: -14px;
  width: 64px;
  height: 28px;
  background: #ffffff;
  border: 4px solid #27333f;
  border-radius: 999px;
}

.split-float {
  position: absolute;
  right: 100px;
  bottom: 190px;
  width: 58px;
  height: 74px;
  background: #f3b23f;
  border: 4px solid #27333f;
  border-radius: 22px;
  transition: transform 760ms ease;
}

.float-arm {
  position: absolute;
  right: 79px;
  bottom: 229px;
  width: 72px;
  height: 5px;
  background: #27333f;
  border-radius: 999px;
  transform-origin: right center;
  transition: transform 760ms ease;
}

.shutoff-note {
  position: absolute;
  top: 75px;
  right: 26px;
  width: 176px;
  padding: 8px;
  color: #24495f;
  background: rgba(224, 242, 251, 0.9);
  border: 1px solid rgba(31, 111, 159, 0.3);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.35;
}

.split-refill-tube {
  position: absolute;
  top: 77px;
  right: 176px;
  width: 130px;
  height: 54px;
  border-top: 8px solid #27333f;
  border-right: 8px solid #27333f;
  border-radius: 0 30px 0 0;
}

.split-fill-stream,
.split-drop-stream {
  position: absolute;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), #49a9d1);
  border-radius: 999px;
  opacity: 0;
}

.split-fill-stream {
  right: 59px;
  bottom: 70px;
  width: 12px;
  height: 190px;
}

.split-drop-stream {
  left: 232px;
  bottom: -4px;
  width: 42px;
  height: 104px;
}

.split-handle-chip {
  top: 12px;
  left: 12px;
}

.split-lever-chip {
  top: 62px;
  left: 95px;
}

.split-chain-chip {
  top: 151px;
  left: 210px;
}

.split-flapper-chip {
  left: 180px;
  bottom: 84px;
}

.split-valve-chip {
  left: 260px;
  bottom: 14px;
}

.split-overflow-chip {
  top: 164px;
  right: 127px;
}

.split-fill-chip {
  top: 168px;
  right: 18px;
}

.split-float-chip {
  right: 78px;
  bottom: 275px;
}

.split-refill-chip {
  top: 46px;
  right: 198px;
}

.bowl-diagram {
  height: 174px;
}

.seat-ring {
  position: absolute;
  top: 12px;
  left: 50%;
  width: 220px;
  height: 76px;
  border: 10px solid #27333f;
  border-bottom-width: 6px;
  border-radius: 50%;
  transform: translateX(-50%);
}

.seat-ring::after {
  position: absolute;
  inset: 16px 42px 8px;
  background: rgba(73, 169, 209, 0.15);
  border: 3px solid #27333f;
  border-radius: 50%;
  content: "";
}

.split-bowl-water {
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 120px;
  height: 42px;
  background: linear-gradient(180deg, #76cce7, #1f6f9f);
  border-radius: 50%;
  transform: translateX(-50%);
  transition: height 560ms ease, transform 560ms ease;
}

.rim-jets {
  position: absolute;
  top: 78px;
  left: 50%;
  width: 168px;
  height: 18px;
  background: repeating-linear-gradient(90deg, #49a9d1 0 9px, transparent 9px 18px);
  border-radius: 999px;
  opacity: 0;
  transform: translateX(-50%);
}

.bowl-system .waste-piece {
  left: calc(50% - 22px);
  bottom: 54px;
}

.bowl-flow-arrow {
  position: absolute;
  right: 8px;
  bottom: 34px;
  padding: 7px 9px;
  color: #24495f;
  background: #e0f2fb;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 900;
  opacity: 0;
}

.seat-chip {
  top: 4px;
  left: 8px;
}

.trap-diagram {
  height: 172px;
}

.trap-pipe-shape {
  position: absolute;
  top: 22px;
  left: 44px;
  width: 220px;
  height: 112px;
  border: 22px solid #27333f;
  border-top: 0;
  border-left-width: 18px;
  border-radius: 0 0 92px 92px;
}

.trap-pipe-shape::before {
  position: absolute;
  top: -28px;
  left: -20px;
  width: 44px;
  height: 72px;
  background: #27333f;
  border-radius: 999px 999px 0 0;
  content: "";
}

.trap-water {
  position: absolute;
  width: 22px;
  aspect-ratio: 1;
  background: #49a9d1;
  border: 3px solid #27333f;
  border-radius: 50%;
  opacity: 0;
}

.trap-one {
  left: 72px;
  top: 92px;
}

.trap-two {
  left: 148px;
  top: 116px;
}

.trap-three {
  right: 76px;
  top: 92px;
}

.split-trap-chip {
  top: 70px;
  left: 112px;
}

.trap-label {
  position: absolute;
  color: #5d6977;
  font-size: 0.78rem;
  font-weight: 900;
}

.trap-label.inlet {
  top: 6px;
  left: 20px;
}

.trap-label.outlet {
  top: 6px;
  right: 12px;
}

.split-system-board[data-phase="pressed"] .split-handle,
.split-system-board[data-phase="drain"] .split-handle,
.split-system-board[data-phase="siphon"] .split-handle {
  transform: rotate(18deg) translateY(4px);
}

.split-system-board[data-phase="pressed"] .split-lever,
.split-system-board[data-phase="drain"] .split-lever,
.split-system-board[data-phase="siphon"] .split-lever {
  transform: rotate(-14deg);
}

.split-system-board[data-phase="pressed"] .split-chain,
.split-system-board[data-phase="drain"] .split-chain,
.split-system-board[data-phase="siphon"] .split-chain {
  height: 204px;
  transform: translateY(-20px);
}

.split-system-board[data-phase="pressed"] .split-flapper,
.split-system-board[data-phase="drain"] .split-flapper,
.split-system-board[data-phase="siphon"] .split-flapper {
  transform: rotate(-40deg) translateY(-5px);
}

.split-system-board[data-phase="drain"] .split-tank-water,
.split-system-board[data-phase="siphon"] .split-tank-water {
  height: 78px;
}

.split-system-board[data-phase="refill"] .split-tank-water {
  height: 205px;
}

.split-system-board[data-phase="drain"] .split-drop-stream,
.split-system-board[data-phase="siphon"] .split-drop-stream,
.split-system-board[data-phase="refill"] .split-fill-stream {
  opacity: 1;
  animation: waterDrop 520ms linear infinite;
}

.split-system-board[data-phase="drain"] .rim-jets,
.split-system-board[data-phase="siphon"] .rim-jets,
.split-system-board[data-phase="drain"] .bowl-flow-arrow,
.split-system-board[data-phase="siphon"] .bowl-flow-arrow {
  opacity: 1;
}

.split-system-board[data-phase="drain"] .split-bowl-water {
  height: 70px;
  transform: translate(-50%, -14px);
}

.split-system-board[data-phase="siphon"] .split-bowl-water {
  height: 28px;
  transform: translate(-50%, 18px);
}

.split-system-board[data-phase="drain"] .bowl-system .waste-piece {
  transform: translate(36px, 24px);
}

.split-system-board[data-phase="siphon"] .bowl-system .waste-piece,
.split-system-board[data-phase="refill"] .bowl-system .waste-piece,
.split-system-board[data-phase="stop"] .bowl-system .waste-piece {
  opacity: 0;
  transform: translate(120px, 82px) scale(0.72);
}

.split-system-board[data-phase="siphon"] .trap-water {
  opacity: 1;
  animation: pulse 760ms ease-in-out infinite alternate;
}

.split-system-board[data-phase="drain"] .split-float,
.split-system-board[data-phase="siphon"] .split-float,
.split-system-board[data-phase="refill"] .split-float {
  transform: translateY(122px);
}

.split-system-board[data-phase="drain"] .float-arm,
.split-system-board[data-phase="siphon"] .float-arm,
.split-system-board[data-phase="refill"] .float-arm {
  transform: rotate(22deg);
}

.split-system-board[data-phase="refill"] .valve-gate {
  background: #dff2fb;
}

.split-system-board[data-phase="stop"] .valve-gate,
.split-system-board[data-phase="idle"] .valve-gate {
  background: #d9543f;
}

@media (max-width: 980px) {
  .split-system-board {
    grid-template-columns: 1fr;
  }

  .tank-system {
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .tank-diagram {
    height: 470px;
  }

  .split-float-chip {
    bottom: 304px;
  }

  .shutoff-note {
    top: 106px;
    left: 16px;
    right: auto;
  }
}

.phase-button {
  background: rgba(255, 255, 255, 0.9);
}

.phase-button span {
  background: #1f6f9f;
}

.phase-button.is-active {
  background: #e0f2fb;
}

/* Cleaner exhibit layer: the drawing stays quiet until a child explores a hotspot. */
.exhibit-stage {
  background:
    linear-gradient(90deg, rgba(31, 111, 159, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(31, 111, 159, 0.045) 1px, transparent 1px),
    #f5f9fc;
  background-size: 38px 38px;
}

.split-system-board {
  gap: 18px;
}

.system-card {
  overflow: visible;
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(31, 41, 51, 0.1);
  border-radius: 12px;
  box-shadow: 0 18px 36px rgba(25, 38, 52, 0.1);
}

.system-card p {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.system-card-head {
  margin-bottom: 12px;
}

.system-card-head span {
  width: 30px;
  height: 30px;
  background: #263746;
  font-size: 0.82rem;
}

.system-card h4 {
  color: #263746;
  font-size: 1.05rem;
}

.tank-diagram {
  height: 456px;
  border: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(235, 244, 249, 0.42)),
    radial-gradient(circle at 50% 100%, rgba(31, 111, 159, 0.08), transparent 42%);
}

.tank-diagram::before {
  position: absolute;
  inset: 36px 48px 20px 42px;
  border: 4px solid #263746;
  border-radius: 12px;
  content: "";
}

.split-tank-water {
  right: 52px;
  bottom: 24px;
  left: 46px;
  height: 294px;
  background: linear-gradient(180deg, rgba(124, 210, 236, 0.58), rgba(31, 111, 159, 0.7));
  border: 0;
  border-radius: 0 0 8px 8px;
}

.split-waterline {
  top: 100px;
  right: 54px;
  left: 48px;
  color: rgba(31, 41, 51, 0.42);
  font-size: 0;
}

.split-waterline::after {
  color: rgba(31, 41, 51, 0.48);
  font-size: 0.72rem;
  content: "設定水位";
}

.split-handle {
  top: 72px;
  left: 58px;
  width: 48px;
  height: 20px;
  border-width: 2px;
}

.split-lever {
  top: 85px;
  left: 100px;
  width: 174px;
  height: 6px;
}

.split-chain {
  top: 91px;
  left: 270px;
  height: 236px;
  opacity: 0.85;
}

.split-flapper {
  left: 236px;
  bottom: 58px;
  width: 76px;
  height: 28px;
  border-width: 3px;
}

.split-flush-valve {
  left: 246px;
  bottom: 30px;
  width: 82px;
  height: 50px;
  border-width: 3px;
}

.split-overflow {
  right: 168px;
  bottom: 55px;
  width: 36px;
  height: 256px;
  border-width: 3px;
  background: rgba(255, 255, 255, 0.82);
}

.split-fill-valve {
  right: 70px;
  bottom: 54px;
  width: 36px;
  height: 286px;
  border-width: 3px;
}

.valve-gate {
  top: -18px;
  left: -12px;
  width: 56px;
  height: 24px;
  border-width: 3px;
}

.split-float {
  right: 126px;
  bottom: 206px;
  width: 50px;
  height: 66px;
  border-width: 3px;
}

.float-arm {
  right: 101px;
  bottom: 242px;
  width: 70px;
  height: 4px;
}

.shutoff-note,
.bowl-flow-arrow,
.trap-label,
.waste-piece {
  font-size: 0;
}

.shutoff-note {
  display: none;
}

.split-refill-tube {
  top: 106px;
  right: 194px;
  width: 116px;
  height: 50px;
  border-top-width: 6px;
  border-right-width: 6px;
}

.split-fill-stream {
  right: 82px;
  bottom: 78px;
  width: 9px;
  height: 186px;
}

.split-drop-stream {
  left: 263px;
  width: 34px;
}

.bowl-diagram,
.trap-diagram {
  height: 190px;
}

.seat-ring {
  top: 20px;
  width: 230px;
  height: 78px;
  border-width: 8px;
}

.split-bowl-water {
  bottom: 34px;
  width: 128px;
  height: 38px;
}

.rim-jets {
  top: 92px;
  height: 12px;
}

.bowl-system .waste-piece {
  display: block;
  width: 34px;
  height: 24px;
  background: #8a6d59;
  border-radius: 999px 999px 80% 70%;
}

.trap-pipe-shape {
  top: 34px;
  left: 50px;
  width: 226px;
  height: 112px;
  border-width: 18px;
  border-top: 0;
  border-left-width: 15px;
}

.trap-pipe-shape::before {
  top: -26px;
  left: -18px;
  width: 38px;
  height: 66px;
}

.part-chip {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  color: transparent;
  background: #ffffff;
  border: 3px solid #1f6f9f;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(31, 111, 159, 0.12), 0 7px 14px rgba(25, 38, 52, 0.12);
  font-size: 0;
  line-height: 0;
  transform: translate(-50%, -50%);
}

.part-chip::before,
.part-chip::after {
  position: absolute;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.part-chip::before {
  bottom: 18px;
  width: 1px;
  height: 34px;
  border-left: 2px dashed rgba(31, 111, 159, 0.55);
  content: "";
}

.part-chip::after {
  bottom: 52px;
  min-width: max-content;
  max-width: 190px;
  padding: 8px 10px;
  color: #20303d;
  background: #ffffff;
  border: 1px solid rgba(31, 111, 159, 0.28);
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(25, 38, 52, 0.16);
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  transform: translate(-50%, 8px);
  content: attr(data-label);
}

.part-chip:hover,
.part-chip:focus-visible,
.part-chip.is-selected {
  background: #1f6f9f;
  border-color: #ffffff;
  outline: 0;
  box-shadow: 0 0 0 5px rgba(31, 111, 159, 0.22), 0 10px 22px rgba(25, 38, 52, 0.16);
}

.part-chip:hover::before,
.part-chip:hover::after,
.part-chip:focus::before,
.part-chip:focus::after,
.part-chip:focus-visible::before,
.part-chip:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.part-chip.is-lit {
  background: #ffffff;
  border-color: #d9543f;
  box-shadow: 0 0 0 5px rgba(217, 84, 63, 0.18), 0 8px 18px rgba(25, 38, 52, 0.14);
}

.part-chip.is-lit.is-selected {
  background: #d9543f;
  border-color: #ffffff;
}

.split-handle-chip {
  top: 82px;
  left: 84px;
}

.split-lever-chip {
  top: 85px;
  left: 190px;
}

.split-chain-chip {
  top: 192px;
  left: 273px;
}

.split-flapper-chip {
  left: 274px;
  bottom: 74px;
}

.split-valve-chip {
  left: 328px;
  bottom: 50px;
}

.split-overflow-chip {
  top: 205px;
  right: 186px;
}

.split-fill-chip {
  top: 198px;
  right: 85px;
}

.split-float-chip {
  right: 138px;
  bottom: 262px;
}

.split-refill-chip {
  top: 112px;
  right: 262px;
}

.seat-chip {
  top: 42px;
  left: 50%;
}

.split-trap-chip {
  top: 105px;
  left: 172px;
}

.phase-controls {
  margin-top: 20px;
}

.phase-button {
  min-height: 42px;
  padding: 7px 9px;
  font-size: 0.84rem;
}

@media (max-width: 720px) {
  .part-chip::after {
    max-width: 150px;
    white-space: normal;
  }
}

/* Object-sized hover zones, replacing the visible red/blue hotspot dots. */
.part-chip {
  min-width: 0;
  min-height: 0;
  color: transparent;
  background: transparent;
  border: 0;
  border-radius: 10px;
  box-shadow: none;
  cursor: help;
  transform: none;
}

.part-chip::before {
  bottom: calc(100% + 6px);
  height: 28px;
  border-left: 2px dashed rgba(31, 111, 159, 0.55);
}

.part-chip::after {
  bottom: calc(100% + 34px);
  width: 220px;
  min-width: 0;
  max-width: 220px;
  padding: 10px 12px;
  z-index: 3;
  white-space: pre-line;
  content: attr(data-label) "\A" attr(data-note);
}

.part-chip:hover,
.part-chip:focus-visible,
.part-chip.is-selected,
.part-chip.is-lit,
.part-chip.is-lit.is-selected {
  background: rgba(31, 111, 159, 0.08);
  border-color: transparent;
  box-shadow: inset 0 0 0 2px rgba(31, 111, 159, 0.18);
}

.part-chip.is-selected,
.part-chip.is-lit,
.part-chip.is-lit.is-selected {
  background: transparent;
  box-shadow: none;
}

.part-chip:hover,
.part-chip:focus-visible {
  background: rgba(31, 111, 159, 0.08);
  box-shadow: inset 0 0 0 2px rgba(31, 111, 159, 0.18);
}

.part-chip:focus-visible {
  outline: 2px solid rgba(31, 111, 159, 0.7);
  outline-offset: 3px;
}

.split-handle-chip {
  top: 62px;
  left: 48px;
  width: 72px;
  height: 44px;
}

.split-lever-chip {
  top: 66px;
  left: 94px;
  width: 198px;
  height: 46px;
}

.split-chain-chip {
  top: 96px;
  left: 254px;
  width: 42px;
  height: 230px;
}

.split-flapper-chip {
  left: 226px;
  bottom: 48px;
  width: 96px;
  height: 54px;
}

.split-valve-chip {
  left: 238px;
  bottom: 22px;
  width: 106px;
  height: 68px;
}

.split-overflow-chip {
  top: 144px;
  right: 158px;
  width: 58px;
  height: 210px;
}

.split-fill-chip {
  top: 122px;
  right: 56px;
  width: 72px;
  height: 240px;
}

.split-float-chip {
  top: 176px;
  right: 106px;
  width: 88px;
  height: 108px;
}

.split-refill-chip {
  top: 86px;
  right: 184px;
  width: 146px;
  height: 82px;
}

.seat-chip {
  top: 18px;
  left: calc(50% - 120px);
  width: 240px;
  height: 96px;
}

.split-trap-chip {
  top: 52px;
  left: 46px;
  width: 250px;
  height: 116px;
}

.seat-chip::after,
.split-trap-chip::after {
  bottom: calc(100% + 28px);
}

.split-waterline::after {
  content: "";
}

.split-handle,
.split-lever,
.split-chain,
.split-flapper,
.split-flush-valve,
.split-overflow,
.split-fill-valve,
.split-float,
.float-arm,
.split-refill-tube,
.seat-ring,
.trap-pipe-shape {
  transition-property: filter, box-shadow, transform, height, opacity;
}

.tank-diagram:has(.split-handle-chip:is(:hover, :focus, :focus-visible)) .split-handle,
.tank-diagram:has(.split-lever-chip:is(:hover, :focus, :focus-visible)) .split-lever,
.tank-diagram:has(.split-chain-chip:is(:hover, :focus, :focus-visible)) .split-chain,
.tank-diagram:has(.split-flapper-chip:is(:hover, :focus, :focus-visible)) .split-flapper,
.tank-diagram:has(.split-valve-chip:is(:hover, :focus, :focus-visible)) .split-flush-valve,
.tank-diagram:has(.split-overflow-chip:is(:hover, :focus, :focus-visible)) .split-overflow,
.tank-diagram:has(.split-fill-chip:is(:hover, :focus, :focus-visible)) .split-fill-valve,
.tank-diagram:has(.split-float-chip:is(:hover, :focus, :focus-visible)) .split-float,
.tank-diagram:has(.split-float-chip:is(:hover, :focus, :focus-visible)) .float-arm,
.tank-diagram:has(.split-refill-chip:is(:hover, :focus, :focus-visible)) .split-refill-tube,
.bowl-diagram:has(.seat-chip:is(:hover, :focus, :focus-visible)) .seat-ring,
.trap-diagram:has(.split-trap-chip:is(:hover, :focus, :focus-visible)) .trap-pipe-shape {
  filter: drop-shadow(0 0 9px rgba(31, 111, 159, 0.36));
}

.part-chip:hover,
.part-chip:focus,
.part-chip:focus-visible {
  background: rgba(31, 111, 159, 0.055);
  box-shadow: inset 0 0 0 2px rgba(31, 111, 159, 0.14);
}

@media (max-width: 720px) {
  .part-chip::after {
    width: 170px;
    max-width: 170px;
  }

  .split-float-chip {
    top: 190px;
    right: 94px;
  }
}

/* SVG exhibit artwork: CSS styles the provided vector drawings; it no longer draws the mechanism with boxes. */
.svg-system-board {
  position: relative;
}

.diagram-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  touch-action: manipulation;
}

.tank-svg {
  margin-top: 6px;
  transform: scale(1.08);
  transform-origin: 50% 44%;
}

.bowl-svg,
.trap-svg {
  min-height: 190px;
}

.diagram-svg text {
  user-select: none;
}

.part-object,
.flow-arrows {
  cursor: help;
  outline: none;
}

.part-object *,
.flow-arrows * {
  vector-effect: non-scaling-stroke;
  transition: opacity 260ms ease, stroke 260ms ease, fill 260ms ease, filter 260ms ease, transform 580ms ease;
}

.tank-shell,
.tank-body {
  fill: url("#ceramicGradient");
  stroke: #1e2b37;
  stroke-width: 5;
  filter: drop-shadow(0 9px 10px rgba(25, 38, 52, 0.16));
}

.tank-body {
  fill: rgba(255, 253, 247, 0.72);
}

.tank-shadow {
  fill: none;
  stroke: rgba(31, 41, 51, 0.14);
  stroke-width: 8;
  stroke-linecap: round;
}

.seat-outer,
.seat-hinge,
.trap-pipe-outer {
  fill: #fffdf7;
  stroke: #1e2b37;
  stroke-width: 5;
  filter: drop-shadow(0 9px 10px rgba(25, 38, 52, 0.16));
}

.tank-water {
  fill: url("#tankWaterGradient");
  opacity: 0.9;
}

.bowl-water-pool-svg,
.trap-water-fill {
  fill: #67c3e6;
  opacity: 0.9;
}

.waterline {
  fill: none;
  stroke: rgba(31, 111, 159, 0.62);
  stroke-width: 3;
  stroke-dasharray: 12 10;
}

.handle-base,
.handle-center,
.hinge-block {
  fill: #e7edf2;
  stroke: #1e2b37;
  stroke-width: 5;
}

.handle-grip {
  fill: #f6f8f9;
  stroke: #1e2b37;
  stroke-width: 5;
}

.trip-lever,
.float-arm-svg,
.refill-tube,
.chain-link,
.chain-link-light,
.flapper-hinge,
.flow-arrows path {
  fill: none;
  stroke: #1e2b37;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chain-link,
.chain-link-light {
  stroke-width: 5;
}

.chain-link-light {
  opacity: 0.58;
}

.joint {
  fill: #f0b342;
  stroke: #1e2b37;
  stroke-width: 4;
}

.overflow-tube,
.pipe-mouth,
.trap-pipe-inner {
  fill: rgba(255, 255, 255, 0.84);
  stroke: #1e2b37;
  stroke-width: 5;
}

.flapper,
.flapper-arm {
  fill: #e55d4b;
  stroke: #1e2b37;
  stroke-width: 5;
}

.flapper-arm,
.flapper-hinge {
  stroke: #1e2b37;
}

.flush-valve {
  fill: #f3f5f6;
  stroke: #1e2b37;
  stroke-width: 5;
}

.drop-stream,
.fill-stream {
  fill: none;
  stroke: #2f94c6;
  stroke-width: 12;
  stroke-linecap: round;
  opacity: 0;
}

.fill-valve-body,
.fill-valve-neck,
.fill-valve-top,
.fill-valve-side {
  fill: #3f5968;
  stroke: #1e2b37;
  stroke-width: 5;
}

.fill-valve-top,
.fill-valve-neck {
  fill: #45a86b;
}

.refill-tube {
  stroke: #c49133;
  stroke-width: 6;
}

.float-ball {
  fill: #f2a51f;
  stroke: #1e2b37;
  stroke-width: 5;
}

.float-shine {
  fill: none;
  stroke: rgba(255, 255, 255, 0.66);
  stroke-width: 4;
  stroke-linecap: round;
}

.seat-inner {
  fill: #f4f6f7;
  stroke: #1e2b37;
  stroke-width: 5;
  filter: drop-shadow(0 8px 8px rgba(25, 38, 52, 0.12));
}

.bowl-water-pool-svg {
  stroke: #1f6f9f;
  stroke-width: 3;
}

.trap-pipe-inner {
  stroke-width: 0;
  fill: #fffdf7;
}

.trap-water-fill {
  stroke: #2f94c6;
  stroke-width: 3;
}

.flow-arrows {
  opacity: 0;
}

.flow-arrows path {
  stroke: #238ec1;
  stroke-width: 7;
  stroke-dasharray: 10 10;
}

.part-object:hover *,
.part-object:focus *,
.part-object.is-selected *,
.flow-arrows:hover *,
.flow-arrows:focus *,
.flow-arrows.is-selected * {
  filter: drop-shadow(0 0 8px rgba(31, 111, 159, 0.48));
}

.part-object.is-lit *,
.flow-arrows.is-lit * {
  filter: drop-shadow(0 0 8px rgba(35, 142, 193, 0.35));
}

.part-object:hover .tank-water,
.part-object:focus .tank-water,
.part-object:hover .bowl-water-pool-svg,
.part-object:focus .bowl-water-pool-svg,
.part-object:hover .trap-water-fill,
.part-object:focus .trap-water-fill {
  opacity: 1;
}

.part-object:focus-visible,
.flow-arrows:focus-visible {
  outline: none;
}

.part-tooltip {
  position: absolute;
  z-index: 16;
  display: grid;
  gap: 4px;
  width: min(245px, calc(100vw - 56px));
  padding: 10px 12px;
  color: #20303d;
  background: #ffffff;
  border: 1px solid rgba(31, 111, 159, 0.3);
  border-radius: 8px;
  box-shadow: 0 14px 28px rgba(25, 38, 52, 0.18);
  font-size: 0.83rem;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -100%) translateY(-10px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.part-tooltip::before {
  position: absolute;
  left: 50%;
  bottom: -31px;
  width: 1px;
  height: 30px;
  border-left: 2px dashed rgba(31, 111, 159, 0.55);
  content: "";
}

.part-tooltip.is-below {
  transform: translate(-50%, 0) translateY(10px);
}

.part-tooltip.is-below::before {
  top: -31px;
  bottom: auto;
}

.part-tooltip.is-visible {
  opacity: 1;
  transform: translate(-50%, -100%) translateY(0);
}

.part-tooltip.is-below.is-visible {
  transform: translate(-50%, 0) translateY(0);
}

.part-tooltip strong,
.part-tooltip span {
  display: block;
}

.part-tooltip strong {
  color: #1e2b37;
}

.part-tooltip span {
  color: #536272;
}

.svg-system-board[data-phase="pressed"] .handle-grip,
.svg-system-board[data-phase="drain"] .handle-grip,
.svg-system-board[data-phase="siphon"] .handle-grip {
  transform: rotate(8deg) translateY(8px);
  transform-box: fill-box;
  transform-origin: 80% 50%;
}

.svg-system-board[data-phase="pressed"] .trip-lever,
.svg-system-board[data-phase="drain"] .trip-lever,
.svg-system-board[data-phase="siphon"] .trip-lever {
  transform: rotate(-12deg);
  transform-box: fill-box;
  transform-origin: 0 50%;
}

.svg-system-board[data-phase="pressed"] .chain-link,
.svg-system-board[data-phase="pressed"] .chain-link-light,
.svg-system-board[data-phase="drain"] .chain-link,
.svg-system-board[data-phase="drain"] .chain-link-light,
.svg-system-board[data-phase="siphon"] .chain-link,
.svg-system-board[data-phase="siphon"] .chain-link-light {
  transform: translateY(-28px);
}

.svg-system-board[data-phase="pressed"] .flapper-part,
.svg-system-board[data-phase="drain"] .flapper-part,
.svg-system-board[data-phase="siphon"] .flapper-part {
  transform: rotate(-18deg) translate(-8px, -16px);
  transform-box: fill-box;
  transform-origin: 0 50%;
}

.svg-system-board[data-phase="drain"] .tank-water-group,
.svg-system-board[data-phase="siphon"] .tank-water-group {
  transform: translateY(118px) scaleY(0.58);
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.svg-system-board[data-phase="refill"] .tank-water-group {
  transform: translateY(54px) scaleY(0.82);
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.svg-system-board[data-phase="drain"] .float-part,
.svg-system-board[data-phase="siphon"] .float-part,
.svg-system-board[data-phase="refill"] .float-part {
  transform: translateY(90px);
}

.svg-system-board[data-phase="drain"] .drop-stream,
.svg-system-board[data-phase="siphon"] .drop-stream {
  opacity: 0.9;
  animation: waterDash 620ms linear infinite;
}

.svg-system-board[data-phase="refill"] .fill-stream {
  opacity: 0.9;
  animation: waterDash 620ms linear infinite;
}

.svg-system-board[data-phase="drain"] .flow-arrows,
.svg-system-board[data-phase="siphon"] .flow-arrows {
  opacity: 1;
}

.svg-system-board[data-phase="siphon"] .trap-water-fill {
  animation: waterPulse 850ms ease-in-out infinite alternate;
}

@keyframes waterDash {
  to {
    stroke-dashoffset: -24;
  }
}

@keyframes waterPulse {
  from {
    opacity: 0.72;
  }

  to {
    opacity: 1;
  }
}

@media (max-width: 720px) {
  .tank-svg {
    min-height: 330px;
  }

  .part-tooltip {
    width: 190px;
  }
}

/* Three.js exhibit replaces the drawn diagram layer. */
.three-system-board {
  position: relative;
  min-height: clamp(430px, 58vw, 640px);
  margin-top: 18px;
  overflow: visible;
  border-radius: 10px;
  overscroll-behavior: contain;
  touch-action: none;
}

.three-viewport {
  position: relative;
  min-height: clamp(430px, 58vw, 640px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(31, 111, 159, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(31, 111, 159, 0.045) 1px, transparent 1px),
    #f5f9fc;
  background-size: 38px 38px;
  border: 1px solid rgba(31, 41, 51, 0.1);
  border-radius: 10px;
  overscroll-behavior: contain;
  touch-action: none;
}

#toilet3dCanvas {
  display: block;
  width: 100%;
  height: clamp(430px, 58vw, 640px);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: contain;
}

#toilet3dCanvas:active {
  cursor: grabbing;
}

.view-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  display: flex;
  gap: 6px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(31, 41, 51, 0.12);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.view-button {
  min-height: 32px;
  padding: 0 10px;
  color: #263746;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 900;
}

.view-button:hover,
.view-button.is-active {
  color: #ffffff;
  background: #1f6f9f;
}

.drag-hint {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 4;
  margin: 0;
  padding: 7px 10px;
  color: #536272;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(31, 41, 51, 0.1);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.three-system-board .part-tooltip {
  z-index: 8;
}

@media (max-width: 720px) {
  .three-system-board,
  .three-viewport,
  #toilet3dCanvas {
    min-height: 460px;
    height: 460px;
  }

  .view-controls {
    right: 10px;
    left: 10px;
    justify-content: center;
  }

  .drag-hint {
    right: 10px;
    text-align: center;
  }
}

/* Picture-book shell for the site; the 3D mechanism remains realistic. */
:root {
  --ink: #273344;
  --muted: #687489;
  --page: #fff6df;
  --paper: #fffdf5;
  --sun: #ffd568;
  --coral: #ef735f;
  --leaf: #72b779;
  --sky: #8fd3ec;
  --blue: #3d76a6;
  --plum: #80649a;
  --line: rgba(39, 51, 68, 0.18);
  --shadow: 0 12px 0 rgba(39, 51, 68, 0.08), 0 22px 34px rgba(93, 70, 33, 0.12);
}

body {
  background:
    linear-gradient(90deg, rgba(255, 213, 104, 0.18) 0 2px, transparent 2px 34px),
    linear-gradient(rgba(143, 211, 236, 0.16) 0 2px, transparent 2px 34px),
    linear-gradient(180deg, #fff0c7 0%, #f8fbf1 46%, #fff7e6 100%);
}

.site-header {
  background: rgba(255, 253, 245, 0.9);
  border-bottom: 3px solid rgba(39, 51, 68, 0.1);
  box-shadow: 0 6px 0 rgba(255, 213, 104, 0.34);
}

.brand-mark {
  background: #3d76a6;
  border: 2px solid #273344;
  border-radius: 8px;
  box-shadow: 4px 5px 0 #ffd568;
}

.nav-links a:hover,
.filter-button:hover,
.text-button:hover {
  background: rgba(255, 213, 104, 0.42);
}

.hero-band {
  min-height: min(700px, calc(100vh - 73px));
}

h1,
h2 {
  color: #273344;
  text-shadow: 3px 4px 0 rgba(255, 213, 104, 0.34);
}

.eyebrow,
.stage-kicker {
  color: #3d76a6;
}

.tagline {
  color: #b44d41;
}

.subtitle,
.section-heading p:not(.eyebrow) {
  color: #526070;
}

.search-box,
.exhibit-stage,
.story-page,
.content-card,
.draft-form,
.draft-list,
.empty-state,
.three-viewport,
.part-detail {
  border: 2px solid rgba(39, 51, 68, 0.16);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-box {
  background: rgba(255, 253, 245, 0.92);
}

.filter-button,
.phase-button,
.secondary-button,
.text-button {
  border: 2px solid rgba(39, 51, 68, 0.18);
  box-shadow: 0 4px 0 rgba(39, 51, 68, 0.08);
}

.filter-button {
  background: #fffdf5;
}

.filter-button.is-active,
.phase-button span {
  background: #3d76a6;
}

.museum-cutaway {
  background:
    linear-gradient(90deg, rgba(61, 118, 166, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(61, 118, 166, 0.08) 1px, transparent 1px),
    #fffdf5;
  border: 2px solid rgba(39, 51, 68, 0.16);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.museum-cutaway::before {
  color: #3d76a6;
  content: "LITTLE EXHIBIT";
}

.exhibit-stage {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.45) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.45) 1px, transparent 1px),
    #ffe2a7;
  background-size: 34px 34px;
}

.three-viewport {
  background:
    linear-gradient(90deg, rgba(61, 118, 166, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(61, 118, 166, 0.055) 1px, transparent 1px),
    #f7fbff;
}

.story-page,
.content-card,
.draft-form,
.draft-list,
.empty-state,
.part-detail {
  background: rgba(255, 253, 245, 0.96);
}

.page-number {
  color: rgba(128, 100, 154, 0.22);
  text-shadow: 2px 3px 0 rgba(255, 213, 104, 0.32);
}

.vocab-row span,
.tag-row span,
.meta-row span,
.status-pill {
  background: #fff0bd;
  border: 1px solid rgba(39, 51, 68, 0.16);
}

.flush-action,
.primary-button {
  border: 2px solid rgba(39, 51, 68, 0.18);
  border-radius: 8px;
}

.flush-action {
  background: #ef735f;
  box-shadow: 0 7px 0 #b84f3e;
}

.primary-button {
  background: #72b779;
  box-shadow: 0 6px 0 #4d8557;
}

.phase-button.is-active {
  background: #fff0bd;
  border-color: rgba(39, 51, 68, 0.32);
}

.library-band {
  background: rgba(143, 211, 236, 0.18);
}

.studio-band {
  background: rgba(255, 213, 104, 0.14);
}

.draft-form input,
.draft-form select,
.draft-form textarea {
  background: #fffdf5;
  border: 2px solid rgba(39, 51, 68, 0.14);
}

.drag-hint,
.part-tooltip {
  background: rgba(255, 253, 245, 0.92);
  border: 2px solid rgba(39, 51, 68, 0.14);
  box-shadow: 0 8px 0 rgba(39, 51, 68, 0.08);
}

.site-footer {
  color: #273344;
  background: #ffd568;
  border-top: 3px solid rgba(39, 51, 68, 0.12);
}

.picturebook-frame {
  position: relative;
  width: min(100%, 650px);
  margin-inline: auto;
  padding: clamp(14px, 2vw, 24px);
  background:
    radial-gradient(circle at 9% 18%, rgba(255, 255, 255, 0.98) 0 18%, transparent 19%),
    radial-gradient(circle at 23% 5%, rgba(255, 255, 255, 0.95) 0 16%, transparent 17%),
    radial-gradient(circle at 43% 8%, rgba(255, 255, 255, 0.98) 0 20%, transparent 21%),
    radial-gradient(circle at 64% 4%, rgba(255, 255, 255, 0.94) 0 17%, transparent 18%),
    radial-gradient(circle at 83% 14%, rgba(255, 255, 255, 0.98) 0 19%, transparent 20%),
    radial-gradient(circle at 96% 36%, rgba(255, 255, 255, 0.94) 0 16%, transparent 17%),
    radial-gradient(circle at 88% 88%, rgba(255, 255, 255, 0.97) 0 18%, transparent 19%),
    radial-gradient(circle at 67% 98%, rgba(255, 255, 255, 0.95) 0 15%, transparent 16%),
    radial-gradient(circle at 41% 96%, rgba(255, 255, 255, 0.98) 0 18%, transparent 19%),
    radial-gradient(circle at 16% 86%, rgba(255, 255, 255, 0.96) 0 17%, transparent 18%),
    radial-gradient(circle at 2% 54%, rgba(255, 255, 255, 0.96) 0 16%, transparent 17%),
    linear-gradient(135deg, #c9f0ff 0%, #fff6d8 45%, #ffd9c9 100%);
  border-radius: 34px;
  box-shadow: 0 14px 0 rgba(61, 118, 166, 0.12), 0 26px 42px rgba(93, 70, 33, 0.14);
}

.picturebook-frame::before {
  position: absolute;
  inset: 10px;
  z-index: 0;
  background: linear-gradient(135deg, rgba(143, 211, 236, 0.52), rgba(255, 213, 104, 0.42), rgba(239, 115, 95, 0.34));
  border-radius: 28px;
  filter: blur(10px);
  content: "";
}

.picturebook-frame img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 1672 / 941;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(39, 51, 68, 0.14);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.hero-image-band {
  display: block;
  min-height: auto;
  padding-block: clamp(22px, 4vw, 48px) clamp(18px, 3vw, 34px);
}

.hero-image-band .hero-object {
  min-height: 0;
  perspective: none;
}

.hero-image-band .picturebook-frame {
  width: min(100%, 1480px);
  padding: clamp(12px, 1.7vw, 22px);
}

.hero-image-band .picturebook-frame img {
  object-fit: contain;
}
