:root {
  --navy: #071633;
  --navy-2: #12254d;
  --blue: #2b5cff;
  --blue-2: #486bf4;
  --aqua: #53bcc3;
  --violet: #8a44ea;
  --orange: #ff9e36;
  --ink: #12223f;
  --muted: #61708c;
  --line: #dfe6f2;
  --soft-blue: #f2f6ff;
  --soft-aqua: #effbfb;
  --soft-violet: #f7f1ff;
  --white: #ffffff;
  --success: #14a47a;
  --danger: #bd3447;
  --shadow-sm: 0 8px 24px rgba(24, 52, 108, 0.08);
  --shadow-lg: 0 24px 70px rgba(20, 46, 102, 0.14);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --page: min(1220px, calc(100% - 48px));
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 83% 10%, rgba(83, 188, 195, 0.11), transparent 27rem),
    linear-gradient(180deg, #ffffff 0, #fbfcff 48rem, #ffffff 100%);
  color: var(--ink);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

button:not(:disabled),
a {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
model-viewer:focus-visible {
  outline: 3px solid rgba(43, 92, 255, 0.38);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--white);
  font-weight: 800;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.section-shell {
  width: var(--page);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid rgba(212, 222, 240, 0.85);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 7px 25px rgba(25, 48, 95, 0.035);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  width: var(--page);
  min-height: 92px;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  width: 184px;
  height: 69px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

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

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3vw, 40px);
}

.main-nav a {
  position: relative;
  color: var(--ink);
  font-size: 0.93rem;
  font-weight: 750;
  text-decoration: none;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  content: "";
  transform: scaleX(0);
  transition: transform 160ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
}

.activity-chip {
  display: grid;
  min-width: 142px;
  padding: 10px 16px;
  border: 1px solid #d8e2f4;
  border-radius: 13px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  line-height: 1.2;
}

.activity-chip span {
  color: var(--blue);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.activity-chip strong {
  margin-top: 3px;
  color: var(--navy);
  font-size: 0.91rem;
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.user-menu {
  position: relative;
  width: fit-content;
}

.user-chip {
  display: flex;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  box-shadow: 0 0 0 0 rgba(43, 92, 255, 0);
  transition: box-shadow 150ms ease;
}

.user-chip:hover,
.user-menu.open .user-chip {
  box-shadow: 0 0 0 3px rgba(43, 92, 255, 0.2);
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.user-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
  font-size: 15px;
  background: linear-gradient(135deg, var(--blue), var(--violet));
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 290px;
  padding: 8px;
  border: 1px solid rgba(218, 226, 241, 0.9);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  z-index: 60;
}

.user-menu.open .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 22px 16px 18px;
  text-align: center;
}

.user-avatar-lg {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 10px;
}

.user-avatar-lg-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
  font-size: 26px;
  background: linear-gradient(135deg, var(--blue), var(--violet));
}

.user-dropdown-header strong {
  font-size: 1rem;
  color: var(--navy);
}

.user-dropdown-header span {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown-divider {
  height: 1px;
  margin: 4px 6px;
  background: var(--line);
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}

.user-dropdown-item:hover {
  background: var(--soft-blue);
}

.user-dropdown-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  color: var(--muted);
  font-size: 15px;
}

.user-dropdown-danger {
  color: var(--danger);
}

.user-dropdown-danger .user-dropdown-icon {
  color: var(--danger);
}

[hidden] {
  display: none !important;
}

.hero {
  display: grid;
  padding-block: clamp(52px, 7vw, 94px) 58px;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  align-items: center;
  gap: clamp(38px, 7vw, 90px);
}

.hero-copy {
  position: relative;
}

.hero-copy::before {
  position: absolute;
  z-index: -1;
  top: -38px;
  left: -42px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(43, 92, 255, 0.12);
  border-radius: 50%;
  content: "";
  box-shadow: inset 0 0 0 26px rgba(83, 188, 195, 0.035);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 0.77rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow span {
  color: var(--aqua);
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--navy);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero h1 {
  max-width: 760px;
  margin-bottom: 23px;
  font-size: clamp(3rem, 6vw, 5.9rem);
  letter-spacing: -0.06em;
}

.hero h1 span {
  background: linear-gradient(102deg, var(--blue) 6%, #4c69ef 48%, var(--aqua) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 690px;
  margin: 0;
  color: #3d4f6e;
  font-size: clamp(1rem, 1.4vw, 1.16rem);
}

.topic-tags {
  display: flex;
  margin-top: 28px;
  flex-wrap: wrap;
  gap: 9px;
}

.topic-tags span {
  padding: 8px 12px;
  border: 1px solid #dde5f5;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #41526e;
  font-size: 0.79rem;
  font-weight: 750;
}

.mission-card {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border: 1px solid rgba(210, 222, 241, 0.92);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 255, 0.96));
  box-shadow: var(--shadow-lg);
}

.mission-card::after {
  position: absolute;
  top: -52px;
  right: -54px;
  width: 145px;
  height: 145px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(43, 92, 255, 0.15), rgba(138, 68, 234, 0.08));
  content: "";
}

.mission-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.mission-icon {
  display: grid;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 11px 23px rgba(79, 73, 221, 0.28);
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 900;
  place-items: center;
}

.mission-heading p {
  margin: 0 0 2px;
  color: var(--violet);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.mission-heading h2 {
  margin: 0;
  font-size: 1.6rem;
}

.mission-steps {
  display: grid;
  margin: 26px 0 20px;
  padding: 0;
  list-style: none;
  gap: 15px;
}

.mission-steps li {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: start;
  gap: 12px;
}

.mission-steps li > span {
  display: grid;
  width: 34px;
  height: 34px;
  border: 1px solid #d6e0f1;
  border-radius: 10px;
  background: var(--white);
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 900;
  place-items: center;
}

.mission-steps p {
  margin: 4px 0 0;
  color: #40516e;
  font-size: 0.91rem;
}

.mission-steps strong {
  color: var(--navy);
}

.mission-note {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid var(--aqua);
  border-radius: 0 10px 10px 0;
  background: var(--soft-aqua);
  color: #376267;
  font-size: 0.8rem;
  font-weight: 700;
}

.experience {
  padding-block: 28px clamp(68px, 8vw, 106px);
}

.section-heading {
  display: flex;
  margin-bottom: 24px;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2,
.guide-intro h2,
.reflection h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.15rem);
}

.model-status {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid #dce4f1;
  border-radius: 999px;
  align-items: center;
  gap: 8px;
  background: var(--white);
  color: #53627b;
  font-size: 0.76rem;
  font-weight: 800;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 158, 54, 0.15);
}

.model-status.is-ready .status-dot {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(20, 164, 122, 0.15);
}

.model-status.is-error .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(189, 52, 71, 0.15);
}

.experience-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  align-items: stretch;
  gap: 22px;
}

.viewer-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d9e2f1;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.viewer-topbar {
  display: flex;
  min-height: 76px;
  padding: 13px 14px 13px 20px;
  border-bottom: 1px solid #e2e8f3;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.viewer-label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.viewer-label strong,
.viewer-label small {
  display: block;
}

.viewer-label strong {
  color: var(--navy);
  font-size: 0.94rem;
}

.viewer-label small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.73rem;
}

.cube-mark,
.button-cube {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  border: 2px solid currentColor;
  color: var(--blue);
  transform: rotate(30deg) skewY(-6deg) scale(0.74);
}

.cube-mark::before,
.cube-mark::after,
.button-cube::before,
.button-cube::after {
  position: absolute;
  background: currentColor;
  content: "";
}

.cube-mark::before,
.button-cube::before {
  top: 10px;
  left: -4px;
  width: 29px;
  height: 2px;
  transform: rotate(-30deg);
}

.cube-mark::after,
.button-cube::after {
  top: -3px;
  left: 11px;
  width: 2px;
  height: 30px;
  transform: rotate(30deg);
}

.viewer-tools {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.tool-button {
  display: inline-flex;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: #4d5d78;
  font-size: 0.76rem;
  font-weight: 800;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.tool-button > span:first-child {
  color: var(--blue);
  font-size: 1.2rem;
  line-height: 1;
}

.tool-button:hover {
  border-color: #d8e1f2;
  background: var(--soft-blue);
  color: var(--navy);
}

.tool-button:active {
  transform: translateY(1px);
}

.tool-button[aria-pressed="true"] {
  border-color: #cdd9ff;
  background: #edf2ff;
  color: var(--blue);
}

.viewer-stage {
  position: relative;
  min-height: clamp(430px, 52vw, 660px);
  overflow: hidden;
  background:
    linear-gradient(rgba(43, 92, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 92, 255, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 50% 46%, #ffffff 0, #f5f8ff 55%, #eaf0fb 100%);
  background-size: 34px 34px, 34px 34px, auto;
}

.viewer-stage::after {
  position: absolute;
  right: 30px;
  bottom: 28px;
  left: 30px;
  height: 32px;
  border-radius: 50%;
  background: rgba(39, 64, 111, 0.09);
  content: "";
  filter: blur(16px);
  pointer-events: none;
}

model-viewer {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  background: transparent;
  --poster-color: transparent;
  --progress-bar-color: var(--blue);
}

.viewer-card:fullscreen,
.viewer-card:-webkit-full-screen {
  display: grid;
  height: 100vh;
  border: 0;
  border-radius: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.viewer-card:fullscreen .viewer-stage,
.viewer-card:-webkit-full-screen .viewer-stage {
  min-height: 0;
  height: 100%;
}

.native-ar-button {
  display: none !important;
}

.loading-overlay,
.viewer-error {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: flex;
  padding: 28px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: linear-gradient(145deg, rgba(250, 252, 255, 0.97), rgba(238, 244, 255, 0.97));
  text-align: center;
  transition: opacity 220ms ease, visibility 220ms ease;
}

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

.loading-overlay strong {
  margin-top: 20px;
  color: var(--navy);
  font-size: 1rem;
}

.loading-overlay p {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 0.82rem;
}

.load-track {
  width: min(250px, 80%);
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #dbe5f6;
}

.load-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--aqua));
  transition: width 180ms ease;
}

.loader-cube {
  position: relative;
  width: 50px;
  height: 50px;
  border: 4px solid var(--blue);
  border-radius: 8px;
  transform: rotate(30deg) skewY(-6deg) scale(0.72);
  animation: loader-float 1.5s ease-in-out infinite;
}

.loader-cube::before,
.loader-cube::after,
.loader-cube span {
  position: absolute;
  background: var(--blue);
  content: "";
}

.loader-cube::before {
  top: 20px;
  left: -6px;
  width: 58px;
  height: 4px;
  transform: rotate(-30deg);
}

.loader-cube::after {
  top: -5px;
  left: 22px;
  width: 4px;
  height: 59px;
  transform: rotate(30deg);
}

.viewer-error[hidden] {
  display: none;
}

.viewer-error > span {
  display: grid;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fff0f2;
  color: var(--danger);
  font-size: 1.55rem;
  font-weight: 900;
  place-items: center;
}

.viewer-error h3 {
  margin: 17px 0 8px;
  font-size: 1.35rem;
}

.viewer-error p {
  max-width: 510px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

.gesture-hint {
  position: absolute;
  z-index: 4;
  bottom: 19px;
  left: 50%;
  display: inline-flex;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(215, 224, 241, 0.95);
  border-radius: 999px;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  color: #55657e;
  font-size: 0.75rem;
  font-weight: 750;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}

.gesture-hint.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.gesture-hint span {
  color: var(--blue);
  font-size: 1.05rem;
}

.action-panel {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 100%;
  padding: 31px 28px;
  border: 1px solid rgba(27, 54, 110, 0.6);
  border-radius: var(--radius-lg);
  flex-direction: column;
  background:
    radial-gradient(circle at 108% 8%, rgba(83, 188, 195, 0.34), transparent 38%),
    linear-gradient(160deg, #102653 0%, var(--navy) 58%, #07132c 100%);
  box-shadow: var(--shadow-lg);
  color: #d7e1f4;
}

.panel-number {
  position: absolute;
  top: 4px;
  right: 19px;
  color: rgba(255, 255, 255, 0.055);
  font-size: 6.2rem;
  font-weight: 950;
  letter-spacing: -0.1em;
  line-height: 1;
}

.panel-kicker {
  position: relative;
  margin: 0 0 10px;
  color: #70d2d7;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.action-panel h3 {
  position: relative;
  margin-bottom: 15px;
  color: var(--white);
  font-size: 1.85rem;
}

.action-panel > p:not(.panel-kicker):not(.availability) {
  margin: 0;
  color: #b6c4dc;
  font-size: 0.89rem;
}

.explore-tips {
  display: grid;
  margin: 24px 0 28px;
  padding: 0;
  list-style: none;
  gap: 13px;
}

.explore-tips li {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 8px;
  color: #d4dff0;
  font-size: 0.8rem;
}

.explore-tips span {
  display: grid;
  width: 20px;
  height: 20px;
  border-radius: 7px;
  background: rgba(83, 188, 195, 0.16);
  color: #77d3d8;
  font-size: 0.7rem;
  font-weight: 900;
  place-items: center;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 48px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  font-weight: 850;
  line-height: 1.2;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}

.primary-button {
  padding: 13px 16px;
  border: 0;
  background: linear-gradient(104deg, var(--blue) 4%, #5a53e8 52%, var(--violet) 100%);
  box-shadow: 0 14px 30px rgba(78, 72, 224, 0.36);
  color: var(--white);
}

.primary-button:hover:not(:disabled) {
  box-shadow: 0 17px 35px rgba(78, 72, 224, 0.46);
  transform: translateY(-2px);
}

.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled) {
  transform: translateY(1px);
}

.ar-action {
  width: 100%;
  min-height: 58px;
  margin-top: auto;
  gap: 10px;
  text-align: left;
}

.ar-action #arActionLabel {
  flex: 1 1 auto;
}

.button-cube {
  width: 20px;
  height: 20px;
  color: var(--white);
  transform: rotate(30deg) skewY(-6deg) scale(0.55);
}

.availability {
  margin: 12px 3px 0;
  color: #92a4c3;
  font-size: 0.7rem;
  text-align: center;
}

.environment-notice {
  display: grid;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 183, 76, 0.32);
  border-radius: 10px;
  background: rgba(255, 163, 52, 0.1);
  gap: 3px;
}

.environment-notice[hidden] {
  display: none;
}

.environment-notice strong {
  color: #ffcc85;
  font-size: 0.75rem;
}

.environment-notice span {
  color: #c4cde0;
  font-size: 0.69rem;
}

.angle-guide {
  position: relative;
  padding-block: clamp(65px, 8vw, 104px);
  overflow: hidden;
  border-block: 1px solid #e2e8f2;
  background: linear-gradient(180deg, #f7f9ff, #ffffff);
}

.angle-guide::before {
  position: absolute;
  top: -120px;
  right: -90px;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(83, 188, 195, 0.18);
  border-radius: 50%;
  content: "";
  box-shadow: inset 0 0 0 54px rgba(43, 92, 255, 0.025);
}

.guide-intro {
  position: relative;
  max-width: 680px;
}

.guide-intro h2 {
  margin-bottom: 14px;
}

.guide-intro > p:last-child {
  margin: 0;
  color: var(--muted);
}

.angle-cards {
  position: relative;
  display: grid;
  margin-top: 37px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.angle-card {
  display: grid;
  min-height: 142px;
  padding: 21px;
  border: 1px solid #dce4f2;
  border-radius: var(--radius-md);
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 15px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.angle-card:hover {
  border-color: #bdcbef;
  box-shadow: 0 18px 35px rgba(30, 61, 123, 0.11);
  transform: translateY(-3px);
}

.angle-card h3 {
  margin-bottom: 5px;
  font-size: 1.1rem;
}

.angle-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.angle-symbol {
  position: relative;
  display: block;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: var(--soft-blue);
}

.angle-symbol::before,
.angle-symbol::after {
  position: absolute;
  left: 14px;
  width: 30px;
  height: 3px;
  border-radius: 99px;
  background: var(--blue);
  content: "";
  transform-origin: left center;
}

.angle-symbol::before {
  bottom: 15px;
}

.angle-symbol::after {
  bottom: 15px;
  transform: rotate(-42deg);
}

.angle-symbol i {
  position: absolute;
  bottom: 16px;
  left: 16px;
  width: 18px;
  height: 18px;
  border-top: 2px solid var(--aqua);
  border-radius: 50% 0 0;
}

.right .angle-symbol {
  background: var(--soft-violet);
}

.right .angle-symbol::after {
  background: var(--violet);
  transform: rotate(-90deg);
}

.right .angle-symbol::before {
  background: var(--violet);
}

.right .angle-symbol i {
  width: 14px;
  height: 14px;
  border: 2px solid #ad76ee;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
}

.obtuse .angle-symbol {
  background: #fff5e9;
}

.obtuse .angle-symbol::before,
.obtuse .angle-symbol::after {
  background: var(--orange);
}

.obtuse .angle-symbol::after {
  transform: rotate(-122deg);
}

.obtuse .angle-symbol i {
  border-color: #f1b367;
  transform: rotate(-18deg);
}

.straight .angle-symbol {
  background: var(--soft-aqua);
}

.straight .angle-symbol::before,
.straight .angle-symbol::after {
  left: 12px;
  width: 31px;
  background: var(--aqua);
}

.straight .angle-symbol::after {
  transform: rotate(180deg);
}

.straight .angle-symbol i {
  bottom: 15px;
  left: 17px;
  width: 20px;
  height: 11px;
  border-color: #6dc9ce;
  border-radius: 50% 50% 0 0;
}

.reflection {
  display: grid;
  padding-block: clamp(62px, 8vw, 104px);
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 28px;
}

.reflection-icon {
  display: grid;
  width: 88px;
  height: 88px;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 20px 40px rgba(76, 72, 222, 0.25);
  color: var(--white);
  font-size: 2.1rem;
  font-weight: 950;
  place-items: center;
  transform: rotate(-4deg);
}

.reflection h2 {
  margin-bottom: 12px;
}

.reflection > div:last-child > p:last-child {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
}

.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: #b6c2d8;
}

.site-footer::before {
  display: block;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--aqua), var(--blue), var(--violet), #e455a6, var(--orange));
  content: "";
}

.footer-inner {
  display: flex;
  min-height: 146px;
  padding-block: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-inner strong {
  color: var(--white);
  font-size: 1.8rem;
  letter-spacing: -0.06em;
}

.footer-inner strong span {
  color: #5978ff;
}

.footer-inner p {
  margin: 4px 0 0;
  font-size: 0.76rem;
}

.modal {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  visibility: hidden;
  padding: 20px;
  opacity: 0;
  place-items: center;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.modal.is-open {
  visibility: visible;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 13, 38, 0.72);
  backdrop-filter: blur(7px);
}

.modal-dialog {
  position: relative;
  width: min(470px, 100%);
  max-height: calc(100vh - 40px);
  padding: 30px;
  overflow-y: auto;
  border: 1px solid rgba(218, 226, 241, 0.9);
  border-radius: 26px;
  background: var(--white);
  box-shadow: 0 34px 90px rgba(0, 14, 50, 0.34);
  transform: translateY(18px) scale(0.98);
  transition: transform 180ms ease;
}

.modal.is-open .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 42px;
  height: 42px;
  border: 1px solid #dfe5f0;
  border-radius: 50%;
  background: #f8faff;
  color: var(--navy);
  font-size: 1.65rem;
  line-height: 1;
  place-items: center;
  transition: background 150ms ease, transform 150ms ease;
}

.modal-close:hover {
  background: #edf2ff;
  transform: rotate(5deg);
}

.modal-heading {
  display: flex;
  padding-right: 45px;
  align-items: center;
  gap: 13px;
}

.modal-heading p {
  margin: 0 0 2px;
  color: var(--violet);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-heading h2 {
  margin: 0;
  font-size: 1.65rem;
}

.modal-icon {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  place-items: center;
}

.modal-icon::before,
.modal-icon::after,
.modal-icon i::before,
.modal-icon i::after {
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--white);
  border-style: solid;
  content: "";
}

.modal-icon::before {
  top: 12px;
  left: 12px;
  border-width: 2px 0 0 2px;
}

.modal-icon::after {
  top: 12px;
  right: 12px;
  border-width: 2px 2px 0 0;
}

.modal-icon i::before {
  bottom: 12px;
  left: 12px;
  border-width: 0 0 2px 2px;
}

.modal-icon i::after {
  right: 12px;
  bottom: 12px;
  border-width: 0 2px 2px 0;
}

.modal-dialog > #qrDescription {
  margin: 19px 0 20px;
  color: var(--muted);
  font-size: 0.88rem;
}

.qr-frame {
  position: relative;
  display: grid;
  width: min(290px, 84vw);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid #e1e7f2;
  border-radius: 20px;
  background: var(--white);
  box-shadow: inset 0 0 0 7px #f6f8fd;
  place-items: center;
}

#qrCode {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

#qrCode svg {
  display: block;
  width: 100%;
  height: 100%;
}

.qr-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--blue);
  border-style: solid;
}

.corner-a {
  top: -4px;
  left: -4px;
  border-width: 3px 0 0 3px;
  border-radius: 10px 0 0;
}

.corner-b {
  top: -4px;
  right: -4px;
  border-width: 3px 3px 0 0;
  border-radius: 0 10px 0 0;
}

.corner-c {
  right: -4px;
  bottom: -4px;
  border-width: 0 3px 3px 0;
  border-radius: 0 0 10px;
}

.corner-d {
  bottom: -4px;
  left: -4px;
  border-width: 0 0 3px 3px;
  border-radius: 0 0 0 10px;
}

.local-qr-message {
  margin: 2px 0 18px;
  padding: 20px;
  border: 1px solid #ffd3a0;
  border-radius: 15px;
  background: #fff8ee;
  color: #664b29;
  text-align: center;
}

.local-qr-message[hidden] {
  display: none;
}

.local-qr-message strong {
  display: block;
  color: #6b451b;
}

.local-qr-message p {
  margin: 7px 0 0;
  font-size: 0.8rem;
}

.qr-url {
  max-width: 100%;
  margin: 17px 0 0;
  overflow: hidden;
  color: #60708c;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qr-warning {
  margin: 11px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7e9;
  color: #72542d;
  font-size: 0.72rem;
  text-align: center;
}

.secondary-button {
  padding: 11px 17px;
  border: 1px solid #d5deee;
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 7px 17px rgba(34, 58, 106, 0.07);
}

.secondary-button:hover:not(:disabled) {
  border-color: #b9c8e3;
  background: #f6f8ff;
  transform: translateY(-1px);
}

.copy-button {
  width: 100%;
  margin-top: 16px;
}

.toast {
  position: fixed;
  z-index: 700;
  right: 22px;
  bottom: 22px;
  visibility: hidden;
  max-width: min(360px, calc(100% - 44px));
  padding: 13px 17px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: var(--navy);
  box-shadow: var(--shadow-lg);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 750;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 170ms ease, transform 170ms ease, visibility 170ms ease;
}

.toast.is-visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.noscript-message {
  position: fixed;
  z-index: 1000;
  right: 18px;
  bottom: 18px;
  left: 18px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--danger);
  color: var(--white);
  font-weight: 800;
  text-align: center;
}

body.modal-open {
  overflow: hidden;
}

@keyframes loader-float {
  0%, 100% { transform: translateY(0) rotate(30deg) skewY(-6deg) scale(0.72); }
  50% { transform: translateY(-8px) rotate(30deg) skewY(-6deg) scale(0.72); }
}

@media (max-width: 1080px) {
  :root {
    --page: min(calc(100% - 36px), 1000px);
  }

  .hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    gap: 40px;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 7vw, 5.2rem);
  }

  .main-nav {
    gap: 19px;
  }

  .tool-label {
    display: none;
  }

  .tool-button {
    width: 42px;
    padding: 8px;
    justify-content: center;
  }

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

@media (max-width: 880px) {
  html {
    scroll-padding-top: 88px;
  }

  .header-inner {
    min-height: 78px;
  }

  .brand {
    width: 153px;
    height: 59px;
  }

  .main-nav {
    display: none;
  }

  .activity-chip {
    min-width: 132px;
    padding: 9px 13px;
  }

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

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

  .mission-card {
    display: grid;
    grid-template-columns: minmax(170px, 0.7fr) 1.3fr;
    align-items: center;
    gap: 24px;
  }

  .mission-steps {
    margin: 0;
  }

  .mission-note {
    grid-column: 1 / -1;
  }

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

  .action-panel {
    min-height: auto;
    padding: 28px;
  }

  .explore-tips {
    grid-template-columns: repeat(3, 1fr);
  }

  .ar-action {
    max-width: 540px;
    margin-top: 0;
    align-self: center;
  }

  .availability,
  .environment-notice {
    width: min(540px, 100%);
    align-self: center;
  }
}

@media (max-width: 640px) {
  :root {
    --page: calc(100% - 28px);
    --radius-lg: 21px;
  }

  html {
    scroll-padding-top: 77px;
  }

  .header-inner {
    min-height: 72px;
    gap: 12px;
  }

  .brand {
    width: 135px;
    height: 53px;
  }

  .activity-chip {
    min-width: 0;
    padding: 8px 10px;
  }

  .activity-chip span {
    font-size: 0.6rem;
  }

  .activity-chip strong {
    font-size: 0.76rem;
  }

  .hero {
    padding-block: 43px 42px;
    gap: 32px;
  }

  .hero h1 {
    margin-bottom: 18px;
    font-size: clamp(2.75rem, 14vw, 4.25rem);
  }

  .hero-lead {
    font-size: 0.96rem;
  }

  .topic-tags {
    margin-top: 22px;
  }

  .topic-tags span {
    font-size: 0.71rem;
  }

  .mission-card {
    display: block;
    padding: 23px;
  }

  .mission-steps {
    margin: 24px 0 18px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .section-heading h2,
  .guide-intro h2,
  .reflection h2 {
    font-size: 2.15rem;
  }

  .model-status {
    align-self: flex-start;
  }

  .viewer-topbar {
    min-height: 0;
    padding: 12px;
    align-items: flex-start;
    flex-direction: column;
  }

  .viewer-label {
    padding: 2px 3px;
  }

  .viewer-label small {
    max-width: 250px;
  }

  .viewer-tools {
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid #e6ebf4;
    justify-content: space-between;
  }

  .tool-button {
    width: auto;
    min-width: 44px;
    flex: 1 1 0;
  }

  .tool-label {
    display: inline;
    font-size: 0.64rem;
  }

  .viewer-stage {
    min-height: 380px;
  }

  .gesture-hint {
    bottom: 13px;
  }

  .action-panel {
    padding: 25px 22px;
  }

  .action-panel h3 {
    font-size: 1.65rem;
  }

  .explore-tips {
    grid-template-columns: 1fr;
  }

  .angle-cards {
    grid-template-columns: 1fr;
  }

  .angle-card {
    min-height: 112px;
  }

  .reflection {
    padding-block: 65px;
    grid-template-columns: 1fr;
    gap: 21px;
  }

  .reflection-icon {
    width: 70px;
    height: 70px;
    border-radius: 21px;
    font-size: 1.7rem;
  }

  .footer-inner {
    min-height: 150px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
  }

  .modal {
    padding: 10px;
  }

  .modal-dialog {
    max-height: calc(100vh - 20px);
    padding: 23px 20px;
    border-radius: 21px;
  }

  .modal-heading {
    padding-right: 42px;
  }

  .modal-heading h2 {
    font-size: 1.4rem;
  }

  .modal-close {
    top: 10px;
    right: 10px;
  }

  .qr-frame {
    width: min(250px, 78vw);
  }

  .toast {
    right: 14px;
    bottom: 14px;
    left: 14px;
    max-width: none;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .activity-chip span {
    display: none;
  }

  .activity-chip strong {
    margin: 0;
  }

  .tool-label {
    display: none;
  }

  .viewer-stage {
    min-height: 340px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .primary-button,
  .mission-icon,
  .reflection-icon {
    border: 2px solid ButtonText;
  }

  .status-dot {
    border: 1px solid ButtonText;
  }
}
