:root {
  --paper: #ece5d5;
  --paper-soft: rgba(236, 229, 213, 0.66);
  --paper-faint: rgba(236, 229, 213, 0.38);
  --brass: #b79a66;
  --brass-soft: rgba(183, 154, 102, 0.65);
  --line: rgba(220, 209, 184, 0.17);
  --line-strong: rgba(220, 209, 184, 0.3);
  --panel: rgba(7, 18, 19, 0.74);
  --panel-deep: rgba(5, 14, 15, 0.92);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Hiragino Sans GB", sans-serif;
  --latin: "Georgia", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

html {
  background: #071315;
  -webkit-text-size-adjust: 100%;
}

body {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 36%, #143134 0%, #091a1c 44%, #040a0b 100%);
  color: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  user-select: none;
  overscroll-behavior: none;
}

button {
  appearance: none;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

button:focus-visible {
  outline: 1px solid var(--brass);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
  z-index: 1;
}

#scene:active {
  cursor: grabbing;
}

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 46%, rgba(0, 0, 0, 0) 34%, rgba(1, 6, 7, 0.32) 74%, rgba(0, 3, 4, 0.74) 100%),
    linear-gradient(to bottom, rgba(0, 4, 5, 0.28), transparent 22%, transparent 72%, rgba(0, 5, 6, 0.38));
}

.grain {
  position: absolute;
  inset: -20%;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(2) infinite;
}

@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-1.5%, 1%); }
  50% { transform: translate(1%, -1.5%); }
  75% { transform: translate(-1%, -0.5%); }
  100% { transform: translate(0.5%, 1.5%); }
}

/* ------------------------------------------------------------------ */
/* Masthead                                                            */
/* ------------------------------------------------------------------ */

.masthead {
  position: fixed;
  z-index: 5;
  top: clamp(22px, 4.2vh, 46px);
  left: clamp(20px, 4vw, 58px);
  display: flex;
  align-items: flex-start;
  gap: 18px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1.2s ease 0.15s, transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s;
}

body.is-ready .masthead {
  opacity: 1;
  transform: translateY(0);
}

.seal {
  width: 42px;
  height: 62px;
  margin-top: 3px;
  border: 1px solid var(--brass-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--brass);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 3px rgba(183, 154, 102, 0.04);
  position: relative;
}

.seal::before,
.seal::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 1px;
  background: var(--brass-soft);
  left: 50%;
  transform: translateX(-50%);
}

.seal::before { top: -4px; }
.seal::after { bottom: -4px; }

.brand-copy {
  padding-top: 1px;
}

.kicker {
  margin: 0 0 9px;
  font-family: var(--latin);
  font-size: 9px;
  letter-spacing: 0.32em;
  color: var(--brass);
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.kicker span {
  width: 22px;
  height: 1px;
  background: var(--brass-soft);
  display: inline-block;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(27px, 3.1vw, 42px);
  font-weight: 400;
  line-height: 1.13;
  letter-spacing: 0.12em;
  color: rgba(240, 235, 223, 0.96);
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

h1 .dot {
  color: var(--brass);
  margin: 0 0.06em;
  font-size: 0.72em;
  vertical-align: 0.08em;
}

.subtitle {
  margin: 10px 0 0;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--paper-faint);
}

/* ------------------------------------------------------------------ */
/* Top actions                                                         */
/* ------------------------------------------------------------------ */

.top-actions {
  position: fixed;
  z-index: 6;
  top: clamp(24px, 4.4vh, 50px);
  right: clamp(20px, 4vw, 58px);
  display: flex;
  align-items: center;
  gap: clamp(13px, 1.8vw, 27px);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.9s ease 0.5s, transform 0.9s ease 0.5s;
}

body.is-ready .top-actions {
  opacity: 1;
  transform: translateY(0);
}

.text-action {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 0;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(236, 229, 213, 0.82);
  transition: color 0.3s ease;
}

.text-action .action-index {
  font-family: var(--latin);
  font-size: 8px;
  letter-spacing: 0.06em;
  color: var(--brass-soft);
  transition: color 0.3s ease;
}

.text-action::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.text-action:hover,
.text-action[aria-pressed="true"],
.text-action[aria-expanded="true"] {
  color: var(--paper);
}

.text-action:hover::after,
.text-action[aria-pressed="true"]::after,
.text-action[aria-expanded="true"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.text-action[aria-pressed="true"] .action-index,
.text-action[aria-expanded="true"] .action-index {
  color: var(--brass);
}

.icon-action {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--paper-soft);
  transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.icon-action:hover {
  color: var(--paper);
  border-color: var(--line-strong);
  transform: scale(1.05);
}

.icon-action svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
}

/* ------------------------------------------------------------------ */
/* Material palette                                                    */
/* ------------------------------------------------------------------ */

.palette {
  position: fixed;
  z-index: 5;
  left: clamp(20px, 4vw, 58px);
  bottom: clamp(68px, 10vh, 100px);
  width: 190px;
  padding: 17px 18px 15px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(7, 18, 19, 0.58), rgba(7, 18, 19, 0.2));
  backdrop-filter: blur(13px);
  -webkit-backdrop-filter: blur(13px);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease 0.75s, transform 1s ease 0.75s;
}

body.is-ready .palette {
  opacity: 1;
  transform: translateY(0);
}

.palette-title {
  margin: 0 0 12px;
  color: var(--brass);
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.24em;
  white-space: nowrap;
}

.palette ul {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.palette li {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 9px;
  min-height: 14px;
}

.palette i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 12px color-mix(in srgb, var(--swatch) 55%, transparent);
}

.palette span {
  color: var(--paper-soft);
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.palette em {
  font-family: var(--latin);
  font-style: normal;
  font-size: 7px;
  letter-spacing: 0.14em;
  color: rgba(236, 229, 213, 0.27);
}

/* ------------------------------------------------------------------ */
/* Side controls                                                       */
/* ------------------------------------------------------------------ */

.edge-controls {
  position: fixed;
  z-index: 6;
  right: clamp(72px, 6.5vw, 96px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 11px;
  opacity: 0;
  transition: opacity 0.9s ease 0.9s;
}

body.is-ready .edge-controls {
  opacity: 1;
}

.round-control {
  position: relative;
  width: 39px;
  height: 39px;
  border: 1px solid rgba(220, 209, 184, 0.26);
  border-radius: 50%;
  background: rgba(7, 18, 19, 0.56);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  color: var(--paper-soft);
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.round-control svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.round-control span {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(3px);
  padding: 4px 7px;
  background: rgba(5, 14, 15, 0.84);
  border: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--paper-soft);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.round-control:hover span {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.round-control:hover {
  color: var(--paper);
  border-color: var(--line-strong);
}

.round-control.is-on {
  color: var(--brass);
  border-color: rgba(183, 154, 102, 0.5);
  background: rgba(183, 154, 102, 0.08);
}

/* ------------------------------------------------------------------ */
/* Hint and view dock                                                  */
/* ------------------------------------------------------------------ */

.hint {
  position: fixed;
  z-index: 5;
  left: clamp(20px, 4vw, 58px);
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(236, 229, 213, 0.48);
  font-size: 9px;
  letter-spacing: 0.16em;
  opacity: 0;
  transition: opacity 1s ease 1.15s;
}

body.is-ready .hint {
  opacity: 1;
}

.hint b {
  color: rgba(183, 154, 102, 0.42);
  font-weight: 400;
  margin: 0 1px;
}

.hint-line {
  width: 22px;
  height: 1px;
  background: var(--line-strong);
}

.view-dock {
  position: fixed;
  z-index: 6;
  left: 50%;
  bottom: clamp(18px, 3.3vh, 34px);
  transform: translateX(-50%) translateY(12px);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: rgba(7, 18, 19, 0.58);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.16);
  opacity: 0;
  transition: opacity 1s ease 0.65s, transform 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.65s;
}

body.is-ready .view-dock {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.dock-label {
  padding: 0 12px 0 7px;
  color: var(--brass-soft);
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: 0.18em;
  border-right: 1px solid var(--line);
  margin-right: 3px;
  white-space: nowrap;
}

.view-btn {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 15px;
  color: rgba(236, 229, 213, 0.52);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.14em;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.view-btn i {
  font-family: var(--latin);
  font-style: normal;
  font-size: 7px;
  letter-spacing: 0.04em;
  color: rgba(183, 154, 102, 0.42);
  transition: color 0.3s ease;
}

.view-btn::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 2px;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.view-btn:hover {
  color: var(--paper-soft);
}

.view-btn.is-active {
  color: var(--paper);
}

.view-btn.is-active i {
  color: var(--brass);
}

.view-btn.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ------------------------------------------------------------------ */
/* Hotspots                                                            */
/* ------------------------------------------------------------------ */

.hotspots {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.55s ease;
}

.hotspots.is-visible {
  opacity: 1;
}

.hotspot {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  opacity: 0;
  transition: opacity 0.35s ease;
  will-change: transform;
}

.hotspot.is-on {
  opacity: 1;
}

.hotspot.is-out {
  opacity: 0 !important;
}

.hotspot-dot {
  position: relative;
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 3px rgba(183, 154, 102, 0.14), 0 0 14px rgba(183, 154, 102, 0.5);
}

.hotspot-dot::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(183, 154, 102, 0.22);
  border-radius: 50%;
  animation: hotspot-pulse 3.2s ease-out infinite;
}

.hotspot:nth-child(2) .hotspot-dot::before { animation-delay: 0.8s; }
.hotspot:nth-child(3) .hotspot-dot::before { animation-delay: 1.6s; }
.hotspot:nth-child(4) .hotspot-dot::before { animation-delay: 2.4s; }

@keyframes hotspot-pulse {
  0% { transform: scale(0.55); opacity: 0; }
  20% { opacity: 0.8; }
  70% { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}

.hotspot-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 7px 10px 7px 11px;
  border-left: 1px solid rgba(183, 154, 102, 0.45);
  background: linear-gradient(90deg, rgba(5, 14, 15, 0.72), rgba(5, 14, 15, 0));
  transform: translateY(-1px);
}

.hotspot-copy b {
  color: rgba(236, 229, 213, 0.86);
  font-family: var(--serif);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.hotspot[data-hotspot="lattice"] {
  flex-direction: row-reverse;
}

.hotspot[data-hotspot="lattice"] .hotspot-copy {
  border-left: 0;
  border-right: 1px solid rgba(183, 154, 102, 0.45);
  background: linear-gradient(270deg, rgba(5, 14, 15, 0.72), rgba(5, 14, 15, 0));
  text-align: right;
}

.hotspot-copy em {
  color: rgba(236, 229, 213, 0.35);
  font-family: var(--sans);
  font-style: normal;
  font-size: 8px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Info panel                                                          */
/* ------------------------------------------------------------------ */

.panel-scrim {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(2, 8, 9, 0.46);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.panel-scrim.is-open {
  opacity: 1;
}

.info-panel {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  width: min(432px, 94vw);
  height: 100%;
  padding: clamp(38px, 6vh, 70px) clamp(28px, 4vw, 50px) 40px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 100% 0%, rgba(66, 92, 87, 0.28), transparent 38%),
    linear-gradient(160deg, rgba(12, 26, 27, 0.97), rgba(5, 13, 14, 0.985));
  border-left: 1px solid rgba(220, 209, 184, 0.16);
  box-shadow: -30px 0 90px rgba(0, 0, 0, 0.28);
  transform: translateX(102%);
  transition: transform 0.65s cubic-bezier(0.22, 0.82, 0.2, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(183, 154, 102, 0.35) transparent;
}

.info-panel.is-open {
  transform: translateX(0);
}

.info-close {
  position: absolute;
  top: 20px;
  right: 22px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--paper-soft);
  font-family: var(--latin);
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.info-close:hover {
  color: var(--paper);
  border-color: var(--line-strong);
}

.panel-kicker {
  margin: 0 0 26px;
  color: var(--brass);
  font-family: var(--latin);
  font-size: 9px;
  letter-spacing: 0.28em;
}

.info-panel h2 {
  margin: 0 0 26px;
  color: rgba(242, 237, 225, 0.95);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 2.6vw, 36px);
  line-height: 1.45;
  letter-spacing: 0.07em;
}

.panel-lede {
  margin: 0 0 32px;
  color: rgba(236, 229, 213, 0.56);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 2.05;
  letter-spacing: 0.045em;
}

.spec-list {
  margin: 0;
  border-top: 1px solid var(--line);
}

.spec-list > div {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.spec-list dt {
  color: var(--brass-soft);
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.spec-list dd {
  margin: 0;
  color: rgba(236, 229, 213, 0.65);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.06em;
}

.panel-note {
  margin: 28px 0 20px;
  color: rgba(236, 229, 213, 0.38);
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.95;
  letter-spacing: 0.04em;
}

.panel-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: rgba(236, 229, 213, 0.32);
  font-size: 9px;
  letter-spacing: 0.1em;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  margin: 0 1px;
  border: 1px solid var(--line);
  font-family: var(--latin);
  font-size: 8px;
  color: var(--paper-faint);
}

.panel-credit {
  margin: 48px 0 0;
  color: rgba(183, 154, 102, 0.34);
  font-family: var(--latin);
  font-size: 7px;
  letter-spacing: 0.2em;
}

/* ------------------------------------------------------------------ */
/* Loading / fallback                                                  */
/* ------------------------------------------------------------------ */

.loading {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 42%, #123134 0%, #071718 46%, #030a0b 100%);
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), visibility 1s;
}

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

.loading-inner {
  width: min(420px, 86vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.loading-seal {
  width: 42px;
  height: 70px;
  border: 1px solid rgba(183, 154, 102, 0.5);
  color: var(--brass);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.5;
  display: grid;
  place-items: center;
  margin-bottom: 26px;
  opacity: 0;
  animation: loading-reveal 1.1s ease 0.1s forwards;
}

.loading-kicker {
  margin: 0 0 14px;
  color: var(--brass);
  font-family: var(--latin);
  font-size: 8px;
  letter-spacing: 0.32em;
  opacity: 0;
  animation: loading-reveal 1.1s ease 0.3s forwards;
}

.loading h2 {
  margin: 0;
  color: rgba(241, 235, 222, 0.94);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: 0.14em;
  opacity: 0;
  animation: loading-reveal 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s forwards;
}

.loading-sub {
  margin: 17px 0 34px;
  color: rgba(236, 229, 213, 0.4);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.22em;
  opacity: 0;
  animation: loading-reveal 1.1s ease 0.62s forwards;
}

.loading-track {
  width: min(260px, 70vw);
  height: 1px;
  background: rgba(220, 209, 184, 0.16);
  overflow: hidden;
}

.loading-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(183, 154, 102, 0.4), var(--brass));
  transition: width 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.loading-status {
  margin: 13px 0 0;
  min-height: 14px;
  color: rgba(183, 154, 102, 0.5);
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: 0.22em;
}

@keyframes loading-reveal {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.webgl-error {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-content: center;
  gap: 12px;
  padding: 28px;
  text-align: center;
  background: #061113;
}

.webgl-error h2 {
  margin: 8px 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: 0.08em;
}

.webgl-error p {
  margin: 0 auto;
  max-width: 420px;
  color: var(--paper-soft);
  font-size: 12px;
  line-height: 1.9;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 900px) {
  .masthead {
    gap: 13px;
    top: 20px;
    left: 17px;
  }

  .seal {
    width: 34px;
    height: 51px;
    font-size: 12px;
  }

  .kicker {
    font-size: 7px;
    letter-spacing: 0.22em;
    margin-bottom: 6px;
  }

  h1 {
    font-size: clamp(23px, 5.6vw, 31px);
  }

  .subtitle {
    margin-top: 7px;
    font-size: 9px;
    letter-spacing: 0.2em;
  }

  .top-actions {
    top: 22px;
    right: 16px;
    gap: 13px;
  }

  .text-action {
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .text-action .action-index {
    display: none;
  }

  .palette {
    display: none;
  }

  .hint {
    display: none;
  }

  .edge-controls {
    top: auto;
    right: 14px;
    bottom: 82px;
    transform: none;
    flex-direction: row;
    gap: 8px;
  }

  .round-control {
    width: 36px;
    height: 36px;
  }

  .round-control span {
    display: none;
  }

  .view-dock {
    bottom: 16px;
    width: calc(100% - 28px);
    max-width: 430px;
    justify-content: center;
    padding: 5px 6px;
  }

  .dock-label {
    display: none;
  }

  .view-btn {
    flex: 1;
    justify-content: center;
    padding: 9px 5px;
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .view-btn::after {
    left: 8px;
    right: 8px;
  }

  .hotspot-copy {
    padding: 6px 8px;
  }

  .hotspot-copy b {
    font-size: 9px;
  }

  .hotspot-copy em {
    display: none;
  }

  .info-panel {
    width: min(100%, 440px);
    padding-top: 64px;
  }
}

@media (max-width: 700px) {
  #detail-toggle {
    display: none;
  }
}

@media (max-width: 520px) {
  .kicker {
    max-width: 230px;
    white-space: normal;
    line-height: 1.5;
  }

  h1 {
    font-size: 23px;
    letter-spacing: 0.08em;
  }

  .subtitle {
    display: none;
  }

  .top-actions {
    gap: 12px;
  }

  .icon-action {
    width: 27px;
    height: 27px;
  }

  .edge-controls {
    bottom: 78px;
  }

  .view-dock {
    max-width: none;
    width: calc(100% - 20px);
    bottom: 10px;
  }

  .view-btn {
    gap: 4px;
    font-size: 9.5px;
  }

  .view-btn i {
    font-size: 6px;
  }

  .hotspots {
    display: none;
  }
}

@media (max-height: 680px) and (min-width: 901px) {
  .palette {
    bottom: 58px;
    padding: 13px 15px;
  }

  .palette ul {
    gap: 6px;
  }

  .subtitle {
    margin-top: 6px;
  }

  .hint {
    bottom: 22px;
  }

  .view-dock {
    bottom: 18px;
  }
}

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

  .grain {
    animation: none;
  }
}
