:root {
  color-scheme: light;

  --ink: #082a47;
  --muted: #5a7287;
  --deep: #052b50;
  --blue: #009de0;
  --blue-dark: #0069b8;
  --page: #eaf3f8;
  --panel: rgba(255, 255, 255, 0.94);
  --border: rgba(99, 145, 176, 0.24);
  --shadow: 0 28px 90px rgba(6, 42, 72, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
}

body {
  margin: 0;
  min-width: 320px;

  color: var(--ink);

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  background:
    radial-gradient(
      circle at 12% 4%,
      rgba(0, 168, 232, 0.16),
      transparent 31rem
    ),
    radial-gradient(
      circle at 88% 22%,
      rgba(73, 159, 215, 0.10),
      transparent 27rem
    ),
    linear-gradient(
      180deg,
      #f8fcfe,
      #e7f1f6 62%,
      #dce9f0
    );
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
select {
  font: inherit;
}

.museum-bar {
  position: sticky;
  z-index: 30;
  top: 0;

  min-height: 78px;
  padding:
    12px
    clamp(16px, 4vw, 58px);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;

  color: #ffffff;

  background:
    linear-gradient(
      120deg,
      rgba(25, 175, 230, 0.16),
      transparent 46%
    ),
    linear-gradient(
      135deg,
      #052746,
      #073f70 60%,
      #086391
    );

  border-bottom:
    1px solid
    rgba(255, 255, 255, 0.12);

  box-shadow:
    0 8px 28px
    rgba(4, 35, 62, 0.24);

  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;

  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  aspect-ratio: 1;

  display: grid;
  place-items: center;

  border:
    1px solid
    rgba(255, 255, 255, 0.62);

  border-radius:
    16px 16px 16px 5px;

  background:
    rgba(255, 255, 255, 0.11);

  box-shadow:
    inset 0 1px 0
    rgba(255, 255, 255, 0.25);

  font-size: 1.45rem;
  font-weight: 950;
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-copy strong {
  letter-spacing: -0.02em;
}

.brand-copy small {
  margin-top: 3px;

  color:
    rgba(255, 255, 255, 0.68);

  font-size: 0.72rem;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.control-button {
  min-height: 42px;
  padding: 0 15px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  border:
    1px solid
    rgba(255, 255, 255, 0.22);

  border-radius: 999px;

  color:
    rgba(255, 255, 255, 0.84);

  background:
    rgba(3, 26, 48, 0.26);

  cursor: pointer;

  font-size: 0.78rem;
  font-weight: 850;

  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.control-button:hover,
.control-button:focus-visible {
  transform: translateY(-1px);

  border-color:
    rgba(255, 255, 255, 0.52);

  color: #ffffff;

  background:
    rgba(255, 255, 255, 0.12);

  outline: none;
}

.control-button.is-active {
  color: #ffffff;

  border-color:
    rgba(96, 220, 255, 0.64);

  background:
    rgba(0, 159, 220, 0.22);
}

.control-dot {
  width: 8px;
  aspect-ratio: 1;

  border-radius: 50%;

  background: #69f0ae;

  box-shadow:
    0 0 0 5px
      rgba(105, 240, 174, 0.12),
    0 0 12px
      rgba(105, 240, 174, 0.74);

  animation:
    livePulse
    1.8s
    ease-in-out
    infinite;
}

.stage {
  min-height:
    calc(100vh - 78px);

  padding:
    clamp(22px, 4vw, 54px)
    16px
    clamp(50px, 7vw, 88px);
}

.exhibit {
  width: min(1100px, 100%);
  margin: 0 auto;
}

.exhibit-heading {
  margin: 0 auto 22px;

  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow {
  margin: 0 0 7px;

  color: #0784bd;

  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.17em;
}

.exhibit-heading h1 {
  margin: 0;

  font-size:
    clamp(2.1rem, 5vw, 4.8rem);

  line-height: 0.95;
  letter-spacing: -0.055em;
}

.verification {
  min-width: 220px;
  padding: 13px 15px;

  display: grid;
  gap: 2px;

  border:
    1px solid
    rgba(100, 151, 184, 0.22);

  border-radius: 16px;

  background:
    rgba(255, 255, 255, 0.76);

  box-shadow:
    0 13px 30px
    rgba(18, 69, 101, 0.10);

  text-align: right;
}

.verification span {
  color: var(--muted);

  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.verification strong {
  color: #063760;

  font-size: 1.16rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.verification small {
  color: #7690a3;
  font-size: 0.69rem;
}

.timezone-picker {
  margin-bottom: 4px;

  display: grid;
  gap: 5px;
}

.timezone-picker span {
  text-align: left;
}

.timezone-picker select {
  width: 100%;
  min-height: 34px;

  padding:
    5px 34px 5px 10px;

  border:
    1px solid
    rgba(80, 139, 177, 0.30);

  border-radius: 10px;

  color: #08385f;

  background:
    linear-gradient(
      45deg,
      transparent 50%,
      #4f7792 50%
    )
    calc(100% - 15px)
    14px / 5px 5px
    no-repeat,

    linear-gradient(
      135deg,
      #4f7792 50%,
      transparent 50%
    )
    calc(100% - 10px)
    14px / 5px 5px
    no-repeat,

    rgba(247, 252, 255, 0.94);

  appearance: none;
  cursor: pointer;

  font-size: 0.78rem;
  font-weight: 800;
  text-align: left;
}

.timezone-picker select:hover,
.timezone-picker select:focus-visible {
  border-color:
    rgba(0, 139, 205, 0.62);

  outline: none;

  box-shadow:
    0 0 0 3px
    rgba(0, 157, 224, 0.11);
}

.clock-frame-wrap {
  overflow: hidden;

  border:
    1px solid
    rgba(97, 140, 169, 0.22);

  border-radius: 30px;

  background:
    rgba(255, 255, 255, 0.83);

  box-shadow: var(--shadow);
}

.water-clock {
  width: 100%;
  height: auto;
  display: block;

  background:
    radial-gradient(
      circle at 50% 20%,
      rgba(255, 255, 255, 0.92),
      transparent 33%
    ),
    linear-gradient(
      90deg,
      rgba(35, 166, 227, 0.10),
      transparent 12%,
      transparent 88%,
      rgba(35, 166, 227, 0.10)
    ),
    linear-gradient(
      180deg,
      #f5fafc,
      #ecf6fa 62%,
      #f6fafc
    );
}

.outer-shadow {
  fill: rgba(7, 31, 49, 0.18);
  filter: url(#softShadow);
}

.outer-frame {
  fill: url(#frameMetal);
  stroke: #84939d;
  stroke-width: 4;
}

.inner-frame {
  fill: #b7c4cc;
  stroke: #74838e;
  stroke-width: 2;
}

.glass-panel {
  fill:
    rgba(244, 250, 253, 0.76);

  stroke:
    rgba(101, 137, 158, 0.34);

  stroke-width: 3;
}

.edge-lighting rect {
  fill: #18baff;
  filter: url(#blueGlow);
  opacity: 0.66;
}

.title-plate text:first-child {
  fill: #0c476f;

  font-size: 20px;
  font-weight: 950;
  letter-spacing: 0.13em;
}

.title-plate text:last-child {
  fill: #6a8ba1;

  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.glass-vessel,
.scoop-glass,
.collector-glass,
.reservoir-glass {
  fill: url(#glassFill);

  stroke:
    rgba(78, 133, 167, 0.68);

  stroke-width: 5;

  filter: url(#glassShadow);
}

.glass-highlight {
  fill: none;

  stroke:
    rgba(255, 255, 255, 0.88);

  stroke-width: 5;
  stroke-linecap: round;
  opacity: 0.82;
}

.liquid-body {
  fill: url(#liquidFill);
  filter: url(#blueGlow);
}

.liquid-surface {
  fill: none;

  stroke: #7ae6ff;
  stroke-width: 5;
  stroke-linecap: round;

  filter: url(#blueGlow);
}

.liquid-surface-fill {
  fill: #62ddff;
  opacity: 0.96;

  filter: url(#blueGlow);
}

.glass-tubes path,
.siphon-glass path,
.transfer-glass {
  fill: none;

  stroke:
    rgba(99, 156, 190, 0.56);

  stroke-width: 13;
  stroke-linecap: round;
  stroke-linejoin: round;

  filter: url(#glassShadow);
}

.tube-liquid,
.siphon-liquids path,
.transfer-liquid {
  fill: none;

  stroke: url(#liquidFill);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;

  filter: url(#blueGlow);
}

.pulse-liquid {
  stroke-dasharray: 16 28;
}

.droplets circle {
  fill: #32d6ff;
  filter: url(#blueGlow);
}

.pendulum-assembly {
  pointer-events: none;
}

.pivot-halo {
  fill:
    rgba(20, 190, 255, 0.16);

  stroke:
    rgba(58, 207, 255, 0.28);

  stroke-width: 4;

  filter: url(#blueGlow);
}

.pivot-ring {
  fill:
    rgba(222, 246, 255, 0.92);

  stroke: #0875ad;
  stroke-width: 6;

  filter: url(#glassShadow);
}

.pivot-core {
  fill: #043b66;

  stroke: #78e5ff;
  stroke-width: 3;

  filter: url(#blueGlow);
}

.pendulum-shadow {
  stroke:
    rgba(2, 38, 66, 0.48);

  stroke-width: 15;
  stroke-linecap: round;

  filter: blur(3px);
}

.pendulum-rod {
  stroke: #dff8ff;
  stroke-width: 9;
  stroke-linecap: round;

  filter: url(#blueGlow);
}

.scoop-glass {
  fill:
    rgba(230, 249, 255, 0.58);

  stroke:
    rgba(55, 133, 178, 0.92);

  stroke-width: 6;

  filter: url(#glassShadow);
  transform-origin: center;
}

.pendulum-bob-glow {
  fill:
    rgba(0, 170, 235, 0.12);

  stroke:
    rgba(34, 205, 255, 0.22);

  stroke-width: 5;

  filter: url(#blueGlow);
}

#pendulumGroup .collector-glass {
  fill: url(#glassFill);

  stroke:
    rgba(61, 138, 181, 0.94);

  stroke-width: 6;

  filter: url(#glassShadow);
}

#pendulumGroup .glass-highlight {
  stroke-width: 6;
}

.component-markers circle {
  fill: #0a639b;

  stroke: #b9efff;
  stroke-width: 2;
}

.component-markers text {
  fill: #ffffff;

  font-size: 14px;
  font-weight: 950;
  text-anchor: middle;
}

.scale-labels text {
  fill: #1584bd;

  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.hour-glass,
.minute-glass {
  fill: url(#globeGlass);

  stroke:
    rgba(91, 151, 185, 0.67);

  stroke-width: 3.2;

  filter: url(#glassShadow);
}

.hour-highlight,
.minute-highlight {
  fill: none;

  stroke:
    rgba(255, 255, 255, 0.88);

  stroke-width: 3;
  stroke-linecap: round;
}

.hour-label,
.minute-label {
  fill: #0f7db7;

  font-size: 16px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.minute-label {
  font-size: 12px;
}

.chamber-liquid {
  fill: url(#liquidFill);
  filter: url(#blueGlow);
}

.chamber-surface {
  fill: #52dcff;
  opacity: 0.95;

  filter: url(#blueGlow);
}

.active-chamber .hour-glass,
.active-chamber .minute-glass {
  stroke: #21c9ff;
  filter: url(#blueGlow);
}

.reservoir-bubbles circle {
  fill: none;

  stroke:
    rgba(210, 249, 255, 0.85);

  stroke-width: 2.2;
}

.museum-scale line {
  stroke: #1297d1;
  stroke-width: 2;
  opacity: 0.66;
}

.exhibit-status {
  min-height: 70px;
  padding: 16px 22px;

  display: grid;
  grid-template-columns:
    auto 1fr auto;

  align-items: center;
  gap: 12px;

  border-top:
    1px solid
    rgba(100, 145, 173, 0.18);

  color: var(--muted);

  background:
    rgba(250, 253, 255, 0.92);

  font-size: 0.82rem;
}

.exhibit-status strong {
  color: #123c5d;
}

.exhibit-status > span:last-child {
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-light {
  width: 10px;
  aspect-ratio: 1;

  border-radius: 50%;

  background: #18c683;

  box-shadow:
    0 0 0 5px
      rgba(24, 198, 131, 0.12),
    0 0 13px
      rgba(24, 198, 131, 0.66);

  animation:
    livePulse
    1.9s
    ease-in-out
    infinite;
}

.backdrop {
  position: fixed;
  z-index: 39;
  inset: 0;

  background:
    rgba(2, 19, 34, 0.48);

  backdrop-filter: blur(5px);
}

.info-panel {
  position: fixed;
  z-index: 40;
  top: 0;
  right: 0;

  width:
    min(480px, calc(100% - 22px));

  height: 100dvh;
  overflow: auto;

  transform: translateX(104%);

  border-left:
    1px solid
    rgba(124, 169, 197, 0.30);

  background:
    rgba(249, 253, 255, 0.98);

  box-shadow:
    -24px 0 70px
    rgba(3, 35, 61, 0.24);

  transition:
    transform 230ms ease;
}

.info-panel.is-open {
  transform: translateX(0);
}

.info-panel-header {
  position: sticky;
  z-index: 2;
  top: 0;

  padding:
    24px 22px 18px;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;

  border-bottom:
    1px solid
    rgba(104, 149, 178, 0.18);

  background:
    rgba(249, 253, 255, 0.96);

  backdrop-filter: blur(12px);
}

.info-panel-header h2 {
  margin: 0;

  font-size: 1.65rem;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.icon-button {
  width: 42px;
  aspect-ratio: 1;
  flex: 0 0 auto;

  display: grid;
  place-items: center;

  border:
    1px solid #c7dce8;

  border-radius: 50%;

  color: #27536f;
  background: #ffffff;

  cursor: pointer;

  font-size: 1.6rem;
  line-height: 1;
}

.info-panel-body {
  padding: 22px;

  color: var(--muted);
  line-height: 1.65;
}

.info-panel-body > p:first-child {
  margin-top: 0;
  font-size: 1.02rem;
}

.mechanism-steps {
  margin: 24px 0;
  padding: 0;

  display: grid;
  gap: 12px;

  list-style: none;
  counter-reset: steps;
}

.mechanism-steps li {
  position: relative;

  min-height: 64px;
  padding:
    13px 13px 13px 52px;

  border:
    1px solid
    rgba(104, 151, 179, 0.18);

  border-radius: 15px;

  background: #ffffff;

  counter-increment: steps;
}

.mechanism-steps li::before {
  content: counter(steps);

  position: absolute;
  top: 14px;
  left: 14px;

  width: 26px;
  aspect-ratio: 1;

  display: grid;
  place-items: center;

  border-radius: 50%;

  color: #ffffff;

  background:
    linear-gradient(
      135deg,
      #0874ad,
      #08a0d3
    );

  font-size: 0.75rem;
  font-weight: 950;
}

.mechanism-steps strong,
.mechanism-steps span {
  display: block;
}

.mechanism-steps strong {
  color: #123d5d;
}

.mechanism-steps span {
  margin-top: 2px;
  font-size: 0.88rem;
}

.info-card {
  margin-top: 14px;
  padding: 16px;

  border:
    1px solid
    rgba(99, 150, 181, 0.20);

  border-radius: 15px;

  background:
    linear-gradient(
      135deg,
      #f9fdff,
      #eef8fc
    );
}

.info-card > span,
.info-card > strong {
  display: block;
}

.info-card > span {
  color: #187aa9;

  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.info-card > strong {
  margin-top: 3px;
  color: #0b3e61;
}

.info-card p {
  margin: 8px 0 0;
  font-size: 0.87rem;
}

.preview-controls {
  margin-top: 18px;

  display: grid;
  gap: 9px;
}

.preview-controls button {
  min-height: 48px;
  padding: 10px 14px;

  border:
    1px solid #b8d7e7;

  border-radius: 12px;

  color: #0c527b;
  background: #ffffff;

  cursor: pointer;
  font-weight: 850;

  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.preview-controls button:hover,
.preview-controls button:focus-visible {
  transform: translateY(-1px);

  border-color: #5eafd3;
  background: #f1faff;

  outline: none;
}

body.panel-open {
  overflow: hidden;
}

@keyframes livePulse {
  50% {
    transform: scale(0.82);
    opacity: 0.68;
  }
}

@media (max-width: 780px) {
  .museum-bar {
    position: relative;

    align-items: flex-start;
    flex-direction: column;
  }

  .controls {
    width: 100%;

    justify-content: flex-start;

    overflow-x: auto;
    padding-bottom: 2px;
  }

  .control-button {
    flex: 0 0 auto;
  }

  .exhibit-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .verification {
    width: 100%;
    min-width: 0;

    text-align: left;
  }

  .clock-frame-wrap {
    border-radius: 20px;
  }

  .exhibit-status {
    grid-template-columns:
      auto 1fr;
  }

  .exhibit-status > span:last-child {
    grid-column: 2;
  }
}

@media (max-width: 500px) {
  .stage {
    padding-right: 7px;
    padding-left: 7px;
  }

  .brand-copy small {
    display: none;
  }

  .control-button {
    padding: 0 12px;
    font-size: 0.72rem;
  }

  .exhibit-status {
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}