@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Noto+Serif+SC:wght@400;500;600&display=swap');

:root {
  color: #1c2625;
  background: #e9efed;
  font-family: "DM Mono", monospace;
}

* { box-sizing: border-box; }

body { margin: 0; overflow: hidden; }

.exhibition { min-height: 100svh; position: relative; isolation: isolate; overflow: hidden; }

#gallery { height: 100%; inset: 0; position: absolute; touch-action: none; width: 100%; z-index: -1; }

.hero { left: 38px; max-width: 600px; pointer-events: none; position: absolute; top: 8%; z-index: 1; }
h1 { font-family: "Noto Serif SC", serif; font-size: clamp(34px, 3.7vw, 62px); font-weight: 500; letter-spacing: 0; line-height: 1.2; margin: 0; white-space: nowrap; }
h1 em { color: #5aaba2; font-style: normal; }

.language-toggle {
  align-items: center;
  background: rgba(247, 249, 248, 0.84);
  border: 1px solid rgba(90, 171, 162, 0.42);
  color: #203432;
  display: flex;
  font: 500 14px/1 "DM Mono", "Noto Serif SC", monospace;
  height: 42px;
  justify-content: center;
  min-width: 58px;
  padding: 0 14px;
  position: absolute;
  right: 24px;
  top: 18px;
  z-index: 3;
  -webkit-user-select: none;
  user-select: none;
}

.motion-toggle {
  align-items: center;
  background: rgba(247, 249, 248, 0.84);
  border: 1px solid rgba(90, 171, 162, 0.42);
  color: #203432;
  display: none;
  font: 500 14px/1 "DM Mono", "Noto Serif SC", monospace;
  height: 42px;
  justify-content: center;
  left: 50%;
  min-width: 132px;
  padding: 0 18px;
  position: absolute;
  top: 18px;
  transform: translateX(-50%);
  z-index: 3;
}

.motion-toggle.is-active { background: rgba(90, 171, 162, 0.9); color: #ffffff; }

.motion-status {
  background: rgba(28, 38, 37, 0.62);
  color: rgba(255, 255, 255, 0.92);
  display: none;
  font: 500 12px/1.35 "Noto Serif SC", serif;
  left: 50%;
  margin: 0;
  max-width: min(300px, calc(100vw - 32px));
  padding: 7px 10px;
  position: absolute;
  text-align: center;
  top: 68px;
  transform: translateX(-50%);
  z-index: 3;
}

.motion-status.is-visible { display: block; }

.mobile-move {
  align-items: center;
  bottom: 24px;
  display: none;
  flex-wrap: wrap;
  gap: 12px;
  left: 50%;
  position: absolute;
  justify-content: center;
  transform: translateX(-50%);
  width: min(320px, calc(100vw - 32px));
  z-index: 3;
}

.move-hint {
  background: rgba(28, 38, 37, 0.62);
  color: rgba(255, 255, 255, 0.92);
  flex: 0 0 100%;
  font: 500 13px/1.35 "Noto Serif SC", serif;
  margin: 0;
  padding: 8px 12px;
  text-align: center;
}

.move-button {
  background: rgba(247, 249, 248, 0.84);
  border: 1px solid rgba(90, 171, 162, 0.42);
  color: #203432;
  font: 500 14px/1 "DM Mono", "Noto Serif SC", monospace;
  height: 48px;
  min-width: 82px;
  padding: 0 18px;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.move-button.is-pressed { background: rgba(90, 171, 162, 0.9); color: #ffffff; }

.loading-screen {
  align-items: center;
  background:
    radial-gradient(circle at 50% 28%, rgba(156, 226, 216, 0.3), transparent 34%),
    linear-gradient(180deg, rgba(234, 242, 240, 0.96), rgba(218, 232, 229, 0.96));
  display: flex;
  inset: 0;
  justify-content: center;
  position: absolute;
  transition: opacity 520ms ease, visibility 520ms ease;
  z-index: 4;
}

.loading-screen.is-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.compat-message {
  align-items: center;
  background: rgba(247, 249, 248, 0.94);
  color: #203432;
  display: none;
  font: 500 16px/1.5 "Noto Serif SC", serif;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: absolute;
  text-align: center;
  z-index: 5;
}

.compat-message.is-visible { display: flex; }

.loading-panel {
  color: #1f3733;
  max-width: min(420px, calc(100vw - 48px));
  text-align: center;
  width: 100%;
}

.loading-kicker {
  color: #5aaba2;
  font: 500 12px/1 "DM Mono", monospace;
  letter-spacing: 4px;
  margin: 0 0 18px;
}

.loading-panel h2 {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.18;
  margin: 0 0 26px;
}

.loading-track {
  background: rgba(122, 173, 166, 0.2);
  height: 4px;
  overflow: hidden;
  width: 100%;
}

.loading-fill {
  background: linear-gradient(90deg, #5aaba2, #a7dfd6);
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms ease;
  width: 100%;
}

.loading-percent {
  color: #46635f;
  font: 500 18px/1 "DM Mono", monospace;
  margin: 18px 0 0;
}

@media (max-width: 720px) {
  .hero { left: 20px; right: 20px; top: 14%; }
  h1 { font-size: clamp(28px, 8vw, 42px); white-space: normal; }
  .language-toggle { right: 18px; top: 18px; }
}

@media (pointer: coarse) {
  .motion-toggle { display: flex; }
  .mobile-move { display: flex; }
}
