:root {
  --bg: #070707;
  --panel: rgba(18, 18, 18, 0.46);
  --panel-solid: rgba(14, 14, 14, 0.58);
  --line: rgba(244, 241, 232, 0.16);
  --line-soft: rgba(244, 241, 232, 0.08);
  --text: #f4f1e8;
  --muted: rgba(244, 241, 232, 0.56);
  --accent: #f4f1e8;
  --accent-2: rgba(244, 241, 232, 0.76);
  --danger: #d8d3c7;
  --shadow: 0 32px 120px rgba(0, 0, 0, 0.42);
  --glow: 0 0 42px rgba(244, 241, 232, 0.1);
  --font-label: 11px;
  --font-button: 13px;
  --font-body: 15px;
  --font-section-title: 13px;
  --font-content-title: 19px;
  --font-panel-title: clamp(28px, 2.6vw, 40px);
  --tracking-label: 0.22em;
  --tracking-body: 0.045em;
  --leading-body: 2;
  --leading-compact: 1.72;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  overflow: hidden;
  overflow-x: hidden;
  color: var(--text);
  font-family:
    Inter, "Noto Sans TC", "Noto Sans SC", "Microsoft JhengHei", system-ui, sans-serif;
  font-weight: 330;
  letter-spacing: var(--tracking-body);
  background:
    radial-gradient(circle at 76% 10%, rgba(244, 241, 232, 0.105), transparent 25rem),
    radial-gradient(circle at 18% 82%, rgba(190, 199, 210, 0.07), transparent 26rem),
    linear-gradient(145deg, #111 0%, #090909 55%, #020202 100%);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(244, 241, 232, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 241, 232, 0.035) 1px, transparent 1px);
  background-size: 5px 5px;
  mask-image: radial-gradient(circle at 50% 44%, #000 0 48%, transparent 82%);
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(460px, 1fr) minmax(400px, 480px);
  gap: 20px;
  width: 100%;
  height: 100vh;
  padding: 20px;
  overflow-x: hidden;
}

.stage {
  position: relative;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 38%, rgba(244, 241, 232, 0.06), transparent 24rem),
    linear-gradient(rgba(244, 241, 232, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 241, 232, 0.025) 1px, transparent 1px),
    rgba(4, 4, 4, 0.46);
  background-size: 100% 100%, 48px 48px, 48px 48px, auto;
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(244, 241, 232, 0.12),
    inset 0 -1px 0 rgba(244, 241, 232, 0.035);
  backdrop-filter: blur(18px) saturate(116%);
}

.panel-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: var(--font-label);
  font-weight: 520;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

h2,
p {
  margin: 0;
}

#functionName,
#functionAxis,
#functionDescription {
  transition:
    opacity 520ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

#modelCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#modelCanvas:active {
  cursor: grabbing;
}

.function-quick-nav button {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(18, 18, 18, 0.34);
  font-size: var(--font-button);
  backdrop-filter: blur(10px);
}

.function-quick-nav {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
  top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: auto;
}

.function-quick-nav button {
  min-width: 48px;
  color: var(--function-color, var(--text));
  border-color: color-mix(in srgb, var(--function-color, var(--line)) 36%, var(--line));
  box-shadow:
    inset 0 1px 0 rgba(244, 241, 232, 0.1),
    0 12px 28px rgba(0, 0, 0, 0.18);
  font-weight: 720;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition:
    opacity 180ms ease,
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.function-quick-nav.has-selection button {
  opacity: 0.05;
}

.function-quick-nav button:hover,
.function-quick-nav button.is-active {
  opacity: 1;
  color: #111;
  background: var(--function-color, var(--accent));
  border-color: transparent;
  box-shadow: 0 0 30px color-mix(in srgb, var(--function-color, transparent) 24%, transparent);
  transform: translateY(-2px);
}

.function-quick-nav button[data-rank="1"] {
  transform: scale(1.12);
}

.function-quick-nav button[data-rank="2"] {
  transform: scale(1.04);
}

.function-quick-nav button[data-rank="3"] {
  transform: scale(0.96);
}

.function-quick-nav button[data-rank="4"] {
  transform: scale(0.9);
}

.function-quick-nav button[data-rank="1"]:hover,
.function-quick-nav button[data-rank="1"].is-active {
  transform: translateY(-2px) scale(1.12);
}

.function-quick-nav button[data-rank="2"]:hover,
.function-quick-nav button[data-rank="2"].is-active {
  transform: translateY(-2px) scale(1.04);
}

.function-quick-nav button[data-rank="3"]:hover,
.function-quick-nav button[data-rank="3"].is-active {
  transform: translateY(-2px) scale(0.96);
}

.function-quick-nav button[data-rank="4"]:hover,
.function-quick-nav button[data-rank="4"].is-active {
  transform: translateY(-2px) scale(0.9);
}

.info-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
  max-width: 100%;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 8%, rgba(244, 241, 232, 0.075), transparent 18rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018) 38%, transparent 74%),
    var(--panel);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(244, 241, 232, 0.13),
    inset 0 -1px 0 rgba(244, 241, 232, 0.035);
  backdrop-filter: blur(28px) saturate(118%);
  overflow: auto;
}

.info-panel h2 {
  margin-bottom: 10px;
  font-size: var(--font-panel-title);
  font-family: Georgia, "Times New Roman", "Noto Serif TC", serif;
  font-weight: 460;
  letter-spacing: 0.1em;
  line-height: 1.12;
}

#functionName {
  margin: 0 0 10px;
  font-family: inherit;
  font-size: var(--font-content-title);
  font-weight: 560;
  letter-spacing: 0.08em;
  line-height: var(--leading-compact);
}

.info-panel::-webkit-scrollbar,
.perspective-overlay .perspective-text::-webkit-scrollbar {
  width: 8px;
}

.info-panel::-webkit-scrollbar-thumb,
.perspective-overlay .perspective-text::-webkit-scrollbar-thumb {
  border: 2px solid rgba(8, 8, 8, 0.72);
  border-radius: 999px;
  background: rgba(244, 241, 232, 0.22);
}

.info-panel::-webkit-scrollbar-track,
.perspective-overlay .perspective-text::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.025);
}

.side-tabs {
  position: static;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: -12px -26px 0;
  padding: 16px 26px;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.side-panel {
  padding-top: 16px;
}

.side-tabs button {
  min-width: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: rgba(244, 241, 232, 0.62);
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-size: var(--font-button);
  font-weight: 620;
  letter-spacing: 0.12em;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    color 360ms ease,
    background 420ms ease,
    box-shadow 420ms ease,
    border-color 420ms ease,
    opacity 420ms ease;
}

.side-tabs button:hover,
.side-tabs button.is-active {
  color: #111;
  background: rgba(244, 241, 232, 0.92);
  border-color: rgba(244, 241, 232, 0.22);
  box-shadow: 0 0 18px rgba(244, 241, 232, 0.08);
  transform: translateY(-1px);
}

button.is-ui-press {
  animation: ui-button-press 560ms cubic-bezier(0.2, 1.18, 0.28, 1) both;
}

button.is-ui-retract {
  animation: ui-button-retract 480ms cubic-bezier(0.24, 0.86, 0.28, 1) both;
}

.ui-button-echo {
  position: fixed;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid;
  pointer-events: none;
  opacity: 0.52;
  box-shadow: 0 0 26px rgba(244, 241, 232, 0.16);
  backdrop-filter: blur(16px) saturate(112%);
  will-change: opacity, transform, filter;
}

.ui-button-echo.is-press {
  animation: ui-button-echo-press 580ms cubic-bezier(0.2, 1.05, 0.28, 1) both;
}

.ui-button-echo.is-retract {
  animation: ui-button-echo-retract 520ms cubic-bezier(0.24, 0.86, 0.28, 1) both;
}

@keyframes ui-button-press {
  0% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }

  28% {
    transform: translateY(1px) scale(0.965);
    filter: brightness(1.18);
  }

  64% {
    transform: translateY(-2px) scale(1.035);
    filter: brightness(1.08);
  }

  100% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes ui-button-retract {
  0% {
    transform: translateY(0) scale(1);
    filter: brightness(1.08);
  }

  34% {
    transform: translateY(1px) scale(0.94);
    filter: brightness(0.88);
  }

  72% {
    transform: translateY(-1px) scale(1.018);
    filter: brightness(1.04);
  }

  100% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes ui-button-echo-press {
  0% {
    opacity: 0.46;
    transform: scale(0.98);
    filter: blur(0);
  }

  100% {
    opacity: 0;
    transform: scale(1.12);
    filter: blur(10px);
  }
}

@keyframes ui-button-echo-retract {
  0% {
    opacity: 0.46;
    transform: scale(1.04);
    filter: blur(0);
  }

  100% {
    opacity: 0;
    transform: scale(0.82);
    filter: blur(8px);
  }
}

.side-panel[hidden] {
  display: none;
}

.function-panel[hidden] {
  display: none;
}

.perspective-panel[hidden] {
  display: none;
}

.is-pre-reveal {
  opacity: 0;
}

.is-revealing {
  animation: panel-flow-in 1180ms cubic-bezier(0.25, 0.92, 0.34, 1) both;
  will-change: opacity, transform, filter, clip-path;
}

.is-hiding {
  pointer-events: none;
  animation: panel-flow-out 620ms cubic-bezier(0.33, 0, 0.67, 0.18) both;
  will-change: opacity, transform, filter, clip-path;
}

@keyframes panel-flow-in {
  0% {
    opacity: 0;
    transform: translateY(34px);
    filter: blur(16px);
    clip-path: inset(24% 0 0 0 round 14px);
  }

  38% {
    opacity: 0.62;
    transform: translateY(18px);
    filter: blur(8px);
    clip-path: inset(10% 0 0 0 round 14px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    clip-path: inset(0 0 0 0 round 14px);
  }
}

@keyframes panel-flow-out {
  0% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    clip-path: inset(0 0 0 0 round 14px);
  }

  100% {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(12px);
    clip-path: inset(0 0 28% 0 round 14px);
  }
}

.axis {
  margin-bottom: 18px;
  color: var(--accent-2);
  font-weight: 560;
  letter-spacing: 0.08em;
  line-height: var(--leading-compact);
}

#functionDescription {
  color: var(--muted);
  font-size: var(--font-body);
  line-height: var(--leading-body);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.function-details {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.function-details div {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.function-details span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: var(--font-label);
  font-weight: 560;
  letter-spacing: var(--tracking-label);
}

.function-details strong {
  display: block;
  color: var(--text);
  font-size: var(--font-body);
  font-weight: 380;
  line-height: var(--leading-compact);
}

.theory-panel,
.type-paths,
.function-panel {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.theory-panel,
.perspective-panel {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.type-paths {
  margin-top: 0;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.perspective-panel {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  scroll-margin-block: 16vh;
}

.perspective-wrap {
  display: flex;
  gap: 12px;
  align-items: center;
}

#perspectiveSvg {
  width: 100%;
  height: 210px;
  background:
    radial-gradient(circle at 48% 42%, rgba(244, 241, 232, 0.075), transparent 13rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.015));
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(244, 241, 232, 0.09);
  backdrop-filter: blur(18px) saturate(112%);
}

.perspective-text {
  color: var(--muted);
  font-size: var(--font-body);
  line-height: var(--leading-body);
  max-width: 220px;
}

.perspective-overlay {
  position: sticky;
  top: 18px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 12px;
  pointer-events: auto;
}
.perspective-overlay svg {
  width: 100%;
  height: 210px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 48% 42%, rgba(244, 241, 232, 0.075), transparent 13rem),
    linear-gradient(145deg, rgba(255,255,255,0.065), rgba(255,255,255,0.015));
  box-shadow: inset 0 1px 0 rgba(244, 241, 232, 0.09);
  backdrop-filter: blur(18px) saturate(112%);
}
.perspective-overlay .perspective-text {
  max-width: 100%;
  max-height: 132px;
  overflow-y: auto;
  color: var(--muted);
  font-size: var(--font-body);
  line-height: var(--leading-body);
  padding-right: 6px;
}

.theory-panel h3,
.perspective-panel h3,
.type-paths h3 {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: var(--font-section-title);
  font-weight: 620;
  letter-spacing: 0.24em;
  line-height: 1.5;
}

.theory-grid,
.type-grid {
  display: grid;
  gap: 8px;
}

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

.theory-grid {
  grid-template-columns: 1fr;
  gap: 0;
}

.theory-section-title {
  margin: 22px 0 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--accent);
  font-size: var(--font-section-title);
  font-weight: 620;
  letter-spacing: 0.24em;
  line-height: 1.5;
}

.theory-section-title:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.theory-panel h3 + .theory-grid {
  margin-top: 10px;
}

.theory-grid .theory-note:first-child {
  border-top-color: var(--line-soft);
}

.type-grid button {
  min-width: 0;
  --type-tone: rgba(244, 241, 232, 0.62);
  --type-tone-soft: rgba(244, 241, 232, 0.08);
  padding: 11px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--type-tone);
  background:
    linear-gradient(180deg, var(--type-tone-soft), rgba(255, 255, 255, 0.012)),
    rgba(8, 8, 8, 0.28);
  font: inherit;
  font-size: var(--font-button);
  font-weight: 620;
  letter-spacing: 0.1em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(244, 241, 232, 0.09),
    0 12px 28px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(16px) saturate(112%);
  transition:
    color 320ms ease,
    background 360ms ease,
    border-color 360ms ease,
    box-shadow 420ms ease,
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.type-grid button[data-tone="N"] {
  --type-tone: rgba(143, 211, 255, 0.78);
  --type-tone-soft: rgba(143, 211, 255, 0.1);
}

.type-grid button[data-tone="T"] {
  --type-tone: rgba(183, 140, 255, 0.78);
  --type-tone-soft: rgba(183, 140, 255, 0.1);
}

.type-grid button[data-tone="F"] {
  --type-tone: rgba(112, 217, 139, 0.78);
  --type-tone-soft: rgba(112, 217, 139, 0.1);
}

.type-grid button[data-tone="S"] {
  --type-tone: rgba(255, 213, 74, 0.78);
  --type-tone-soft: rgba(255, 213, 74, 0.1);
}

.type-grid button:hover {
  color: #111;
  background: color-mix(in srgb, var(--type-tone) 72%, var(--accent));
  transform: translateY(-2px);
}

.type-grid button.is-active {
  color: #111;
  background: color-mix(in srgb, var(--type-tone) 72%, var(--accent));
  border-color: transparent;
  box-shadow: 0 0 34px var(--type-tone-soft);
  transform: translateY(-2px);
}

.theory-note {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.theory-note h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  color: var(--accent);
  font-size: var(--font-section-title);
  font-weight: 560;
  letter-spacing: 0.12em;
}

.theory-note p {
  color: var(--muted);
  font-size: var(--font-body);
  line-height: var(--leading-body);
  white-space: pre-line;
}

#typePathText {
  margin-top: 12px;
  color: var(--muted);
  font-size: var(--font-body);
  line-height: var(--leading-body);
  white-space: pre-line;
}

#typePathText {
  padding: 0;
  border: 0;
  background: transparent;
}

#typePathText:empty,
.perspective-text:empty {
  display: none;
}

#typePathText.is-result {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), transparent 54%),
    rgba(255, 255, 255, 0.026);
  box-shadow:
    inset 0 1px 0 rgba(244, 241, 232, 0.1),
    0 16px 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px) saturate(112%);
  transform-origin: 50% 0;
}

#typePathText strong,
#typePathText em,
#typePathText span {
  display: block;
}

#typePathText strong {
  color: var(--accent);
  font-size: calc(var(--font-body) + 1px);
  font-weight: 580;
  letter-spacing: 0.08em;
}

#typePathText em {
  margin-top: 5px;
  color: rgba(244, 241, 232, 0.36);
  font-size: calc(var(--font-body) - 1px);
  font-style: normal;
  font-weight: 420;
  letter-spacing: 0.08em;
}

#typePathText span {
  margin-top: 10px;
}

.type-stack-groups {
  display: none;
  gap: 12px;
  margin-top: 14px;
}

.type-stack-group {
  display: grid;
  gap: 7px;
}

.type-stack-group h4 {
  margin: 2px 0;
  color: var(--text);
  font-size: var(--font-section-title);
  font-weight: 560;
  letter-spacing: 0.1em;
}

.type-stack-group button {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), transparent 62%),
    rgba(255, 255, 255, 0.018);
  font: inherit;
  font-size: var(--font-button);
  letter-spacing: 0.04em;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(244, 241, 232, 0.08);
  backdrop-filter: blur(16px) saturate(112%);
}

.type-stack-group button:hover,
.type-stack-group button.is-active {
  color: #111;
  background: var(--accent);
}

.type-stack-group button span {
  color: inherit;
  font-weight: 620;
}

.type-stack-group button strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 420;
  line-height: var(--leading-compact);
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 26px;
}

.metric-grid div {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), transparent 48%),
    rgba(255, 255, 255, 0.022);
  box-shadow:
    inset 0 1px 0 rgba(244, 241, 232, 0.09),
    0 16px 34px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px) saturate(112%);
}

.metric-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: var(--font-label);
  font-weight: 520;
  letter-spacing: var(--tracking-label);
}

.metric-grid strong {
  font-size: calc(var(--font-body) + 2px);
  font-weight: 520;
  letter-spacing: 0.08em;
}

.sileus-signature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: auto;
  padding: 34px 0 10px;
  color: rgba(244, 241, 232, 0.36);
  font-family: Inter, "Noto Sans TC", "Noto Sans SC", "Microsoft JhengHei", system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 520;
  letter-spacing: 0.22em;
  line-height: 1;
  text-align: center;
  user-select: none;
}

.sileus-signature span {
  display: inline-block;
  animation: signature-letter-light 5.4s ease-in-out infinite;
}

.sileus-signature span:nth-child(1) {
  animation-delay: 0s;
}

.sileus-signature span:nth-child(2) {
  animation-delay: 0.34s;
}

.sileus-signature span:nth-child(3) {
  animation-delay: 0.68s;
}

.sileus-signature span:nth-child(4) {
  animation-delay: 1.02s;
}

.sileus-signature span:nth-child(5) {
  animation-delay: 1.36s;
}

.sileus-signature span:nth-child(6) {
  animation-delay: 1.7s;
}

.sileus-signature span:nth-child(7) {
  animation-delay: 2.04s;
}

@keyframes signature-letter-light {
  0%,
  64%,
  100% {
    color: rgba(244, 241, 232, 0.3);
    text-shadow: none;
  }

  16% {
    color: rgba(244, 241, 232, 0.92);
    text-shadow:
      0 0 10px rgba(244, 241, 232, 0.32),
      0 0 22px rgba(244, 241, 232, 0.16);
  }
}

@media (max-width: 980px) {
  body {
    overflow: auto;
    overflow-x: hidden;
  }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(520px, 68vh) auto;
    height: auto;
    min-height: 100vh;
    padding: 10px;
    gap: 18px;
  }

  .function-quick-nav {
    left: 14px;
    right: 14px;
    top: 14px;
  }

  .info-panel {
    min-height: 280px;
    padding: 22px;
  }
}

@media (max-width: 520px) {
  .app-shell {
    grid-template-rows: minmax(440px, 62vh) auto;
  }

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