: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;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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);
  -webkit-backdrop-filter: blur(16px);
  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;
}

.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);
  -webkit-backdrop-filter: blur(7px);
  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;
  }
}

/* Versión 3: superficie de trabajo compacta */
.compact-layout {
  background: linear-gradient(180deg, #fff 0, #f7f9ff 760px, #fff 100%);
}

.compact-header .header-inner {
  grid-template-columns: auto 1fr;
}

.compact-header .main-nav {
  justify-self: end;
}

.nav-teacher-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #d8e1f2;
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 850;
  box-shadow: var(--shadow-sm);
}

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

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

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

.user-avatar {
  width: 40px;
  height: 40px;
  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(112deg, var(--blue), var(--blue-2) 60%, var(--violet));
}

/* El atributo "hidden" no alcanza a ocultar estos elementos porque las
   reglas de arriba fijan "display" explícito (una regla de autor siempre
   gana sobre el "display:none" que el navegador aplica por defecto a
   [hidden]) — sin esto, la imagen y la inicial se ven superpuestas. */
.user-avatar[hidden],
.user-avatar-fallback[hidden],
.user-avatar-lg[hidden],
.user-avatar-lg-fallback[hidden] {
  display: none;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 290px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  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;
  text-align: center;
  gap: 3px;
  padding: 22px 16px 18px;
}

.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(112deg, var(--blue), var(--blue-2) 60%, var(--violet));
}

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

.user-dropdown-header span {
  font-size: 13px;
  color: var(--muted);
}

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

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

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

.user-dropdown-icon {
  display: inline-flex;
  width: 18px;
  justify-content: center;
}

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

.compact-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  padding: 34px 0 26px;
}

.compact-hero h1 {
  margin: 3px 0 7px;
  color: var(--navy);
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.compact-hero h1 span { color: var(--blue); }
.compact-hero > div > p:last-child { margin: 0; color: var(--muted); font-size: 15px; }

.compact-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid #dce5f6;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  list-style: none;
}

.compact-steps li { display: flex; align-items: center; gap: 7px; color: #8a97af; font-size: 13px; }
.compact-steps li span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #eaf0ff; color: var(--blue); font-weight: 900; }
.compact-steps li strong { color: var(--navy-2); }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: stretch;
  gap: 16px;
}

.compact-viewer { min-width: 0; }
.compact-viewer .viewer-stage { min-height: 610px; }

.response-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 18px;
  border-radius: 22px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 22px 55px rgba(7,22,51,.18);
}

.response-topline,
.angle-navigator > div:first-child,
.navigator-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.response-panel .model-status {
  padding: 0;
  border: 0;
  background: transparent;
  color: #dbe5fa;
  font-size: 11px;
}

.points-label {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: #dce5f8;
  font-size: 10px;
  font-weight: 850;
}

.response-panel .selected-angle {
  margin: 14px 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.response-panel .selected-angle span { color: #86a5ff; }
.response-panel .selected-angle h2 { margin: 3px 0 5px; color: #fff; font-size: 25px; line-height: 1.05; }
.response-panel .selected-angle p { margin: 0; color: #bac7df; font-size: 12px; }

.compact-student-data {
  grid-template-columns: 1.3fr .7fr;
  gap: 8px;
  margin: 8px 0 12px;
}

.compact-student-data label { color: #cbd6ea; font-size: 10px; text-transform: uppercase; }
.compact-student-data input { min-height: 38px; margin-top: 4px; padding: 8px 9px; border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.08); color: #fff; font-size: 12px; }
.compact-student-data input::placeholder { color: #8796b2; }

.active-answer-form {
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 15px;
  background: rgba(255,255,255,.06);
}

.active-answer-form label { color: #dbe5f7; font-size: 11px; font-weight: 800; }
.active-answer-form input,
.active-answer-form select {
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 9px;
  background: #fff;
  color: var(--navy);
  font: inherit;
}

.input-with-unit { position: relative; display: block; }
.input-with-unit > span { position: absolute; top: 16px; right: 10px; color: var(--muted); font-size: 14px; }
.check-active-button { grid-column: 1 / -1; min-height: 42px; padding: 10px 13px; }
.active-feedback { grid-column: 1 / -1; min-height: 30px; padding: 8px 10px; border-radius: 9px; background: rgba(255,255,255,.08); color: #d6e0f2; font-size: 11px; font-weight: 750; }
.active-feedback.is-correct { background: rgba(20,164,122,.2); color: #8cf1d2; }
.active-feedback.is-partial { background: rgba(255,158,54,.18); color: #ffd1a0; }
.active-feedback.is-wrong { background: rgba(189,52,71,.22); color: #ffc4cc; }

.data-reveal { margin: 14px 0; border: 1px solid rgba(255,255,255,.14); border-radius: 13px; background: rgba(255,255,255,.06); overflow: hidden; }
.data-reveal summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; color: #fff; font-size: 12px; font-weight: 800; }
.data-reveal summary::-webkit-details-marker { display: none; }
.data-reveal summary::after { content: "+"; color: #86a5ff; font-size: 16px; }
.data-reveal[open] summary::after { content: "\2013"; }
.data-reveal-body { padding: 0 14px 14px; }
.data-reveal-body dl { display: grid; grid-template-columns: auto auto; gap: 4px 10px; margin: 0 0 6px; }
.data-reveal-body dt { color: #9fb0cf; font-size: 11px; }
.data-reveal-body dd { margin: 0; color: #fff; font-size: 13px; font-weight: 800; }
.data-reveal-body p { margin: 0; color: #bac7df; font-size: 11px; }

.angle-navigator { margin-top: 13px; }
.angle-navigator > div:first-child strong { font-size: 12px; }
.angle-navigator > div:first-child span { color: #b6c4dd; font-size: 11px; }
.response-panel .progress-track { height: 7px; margin: 8px 0 10px; background: rgba(255,255,255,.14); }

.angle-dots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.angle-dot {
  display: grid;
  place-items: center;
  min-height: 31px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  color: #c9d5e9;
  font-size: 11px;
  font-weight: 900;
}

.angle-dot.is-current { border-color: #809cff; background: var(--blue); color: #fff; }
.angle-dot.is-complete { border-color: rgba(83,188,195,.6); color: #76e2d6; }
.angle-dot.is-correct { border-color: var(--success); background: rgba(20,164,122,.23); color: #8cf1d2; }

.navigator-buttons { margin-top: 8px; }
.navigator-buttons button { padding: 5px 0; border: 0; background: transparent; color: #9db3de; font-size: 11px; font-weight: 800; }
.response-panel .ar-action { width: 100%; min-height: 47px; margin-top: auto; padding: 10px 13px; }
.response-panel .availability { margin: 7px 0 0; color: #8fa0bf; font-size: 9px; text-align: center; }

.support-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.support-bar-single {
  grid-template-columns: 1fr;
}

.support-item {
  min-width: 0;
  border: 1px solid #dfe6f2;
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.support-item summary,
.worksheet-compact {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 72px;
  padding: 12px 15px;
}

.support-item summary { cursor: pointer; list-style: none; }
.support-item summary::-webkit-details-marker { display: none; }
.support-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #edf2ff; color: var(--blue); font-size: 18px; font-weight: 900; }
.support-item strong { display: block; color: var(--navy); font-size: 13px; }
.support-item small { display: block; color: var(--muted); font-size: 11px; }
.worksheet-compact > div { display: flex; gap: 7px; }
.worksheet-compact a { padding: 8px 10px; border-radius: 8px; background: #edf2ff; color: var(--blue); font-size: 11px; font-weight: 850; text-decoration: none; }
.worksheet-compact a:first-child { background: var(--blue); color: #fff; }

.compact-angle-guide { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; padding: 0 15px 15px 64px; }
.compact-angle-guide article { display: grid; grid-template-columns: 11px auto; gap: 2px 7px; padding: 8px; border-radius: 9px; background: #f7f9fd; }
.compact-angle-guide article i { grid-row: 1 / 3; align-self: center; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
.compact-angle-guide article:nth-child(2) i { background: var(--violet); }
.compact-angle-guide article:nth-child(3) i { background: var(--orange); }
.compact-angle-guide article:nth-child(4) i { background: var(--aqua); }
.compact-angle-guide article strong { font-size: 11px; }
.compact-angle-guide article span { color: var(--muted); font-size: 9px; }

.completion {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 20px 24px;
  border: 1px solid #dfe6f2;
  border-radius: 17px;
  background: #f7f9ff;
}

.completion h2 { margin: 2px 0 4px; color: var(--navy); font-size: 23px; }
.completion p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.completion-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.completion-actions button { min-height: 40px; padding: 8px 11px; font-size: 11px; }
.completion .final-feedback { grid-column: 1 / -1; margin: 0; }
.compact-footer { margin-top: 24px; }

.teacher-drawer {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  width: min(680px, 96vw);
  height: 100vh;
  margin: 0;
  padding: 28px;
  overflow-y: auto;
  border: 0;
  border-left: 1px solid #dbe3f1;
  border-radius: 0;
  background: #f8faff;
  box-shadow: -24px 0 60px rgba(7,22,51,.2);
}

.teacher-drawer-close { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #e9eef9; color: var(--navy); font-size: 25px; }

@media (max-width: 1040px) {
  .compact-header .main-nav { display: flex; }
  .workspace { grid-template-columns: minmax(0,1fr) 330px; }
  .compact-viewer .viewer-stage { min-height: 560px; }
  .compact-hero { align-items: flex-start; }
}

@media (max-width: 820px) {
  .compact-header .main-nav a:first-child { display: none; }
  .compact-hero { display: grid; gap: 16px; padding-top: 24px; }
  .compact-steps { justify-self: start; }
  .workspace { grid-template-columns: 1fr; }
  .compact-viewer .viewer-stage { min-height: 480px; }
  .response-panel { min-height: auto; }
  .response-panel .ar-action { margin-top: 16px; }
  .support-bar { grid-template-columns: 1fr; }
  .completion { grid-template-columns: 1fr; }
  .completion-actions { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .compact-header .header-inner { grid-template-columns: auto 1fr; }
  .compact-header .main-nav a { display: none; }
  .compact-hero h1 { font-size: 38px; }
  .compact-steps { width: 100%; justify-content: space-between; gap: 5px; }
  .compact-steps li { font-size: 11px; }
  .compact-viewer .viewer-stage { min-height: 390px; }
  .workspace { width: calc(100% - 20px); }
  .viewer-topbar { padding: 10px; }
  .response-panel { border-radius: 18px; }
  .compact-student-data, .active-answer-form { grid-template-columns: 1fr; }
  .check-active-button, .active-feedback { grid-column: 1; }
  .worksheet-compact { grid-template-columns: 38px 1fr; }
  .worksheet-compact > div { grid-column: 1 / -1; }
  .compact-angle-guide { grid-template-columns: 1fr; padding-left: 15px; }
}

@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;
  }
}

/* Actividad evaluable, marcadores y ficha imprimible */
.hotspot {
  display: none;
}

.hotspot:hover,
.hotspot:focus-visible,
.hotspot.is-selected {
  z-index: 5;
  background: var(--orange);
  transform: scale(1.2);
}

.measure-layer {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: none;
  cursor: crosshair;
  background: rgba(7, 22, 51, 0.04);
  touch-action: none;
}

.measure-layer.is-active {
  display: block;
}

.measure-layer svg {
  width: 100%;
  height: 100%;
}

#measureLines {
  fill: none;
  stroke: #ff7b24;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#measurePoints circle {
  fill: #fff;
  stroke: #ff7b24;
  stroke-width: 4;
}

.measure-help {
  position: absolute;
  top: 14px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(94%, 650px);
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(7, 22, 51, 0.94);
  color: #fff;
  box-shadow: var(--shadow-sm);
  transform: translateX(-50%);
}

.measure-help span {
  flex: 1;
  font-size: 12px;
  color: #d9e2f5;
}

.measure-help output {
  min-width: 62px;
  color: #75f2d0;
  font-size: 20px;
  font-weight: 900;
}

.measure-help button {
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-weight: 800;
}

.selected-angle {
  display: grid;
  gap: 3px;
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid #cdd9ff;
  border-radius: 14px;
  background: var(--soft-blue);
}

.selected-angle span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.selected-angle a {
  margin-top: 5px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.worksheet,
.assessment {
  margin-top: 58px;
}

.worksheet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: center;
  gap: 40px;
  padding: 34px;
  border: 1px solid #dbe5ff;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #f5f8ff, #effbfb);
  box-shadow: var(--shadow-sm);
}

.worksheet h2,
.assessment h2 {
  margin: 4px 0 10px;
  color: var(--navy);
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.1;
}

.worksheet-copy > p:last-of-type,
.assessment-heading > div > p:last-child {
  color: var(--muted);
}

.worksheet-actions,
.assessment-actions,
.teacher-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.worksheet-actions a {
  text-decoration: none;
}

.worksheet-preview {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 28px;
  border: 1px solid #d7e0f2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(18,37,77,.12);
  text-align: center;
  transform: rotate(2deg);
}

.worksheet-preview span {
  padding: 5px 9px;
  border-radius: 7px;
  background: #eaf0ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.worksheet-preview strong { font-size: 25px; }
.worksheet-preview small { color: var(--muted); }

.assessment {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.assessment-heading,
.teacher-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.teacher-toggle { flex: 0 0 auto; }

.student-data {
  display: grid;
  grid-template-columns: 1.4fr .8fr;
  gap: 16px;
  margin: 28px 0 18px;
}

.student-data label {
  color: var(--navy-2);
  font-size: 13px;
  font-weight: 800;
}

.student-data input,
.answer-table input,
.answer-table select {
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid #cfd9ea;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.student-data input:focus,
.answer-table input:focus,
.answer-table select:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(43,92,255,.12);
}

.progress-card {
  padding: 16px 18px;
  border-radius: 15px;
  background: var(--navy);
  color: #fff;
}

.progress-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.progress-card span { color: #dce5f8; }
.progress-track { height: 9px; margin-top: 12px; overflow: hidden; border-radius: 10px; background: rgba(255,255,255,.17); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--aqua), #75f2d0); transition: width 220ms ease; }

.answer-table-wrap,
.teacher-table-wrap {
  margin-top: 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.answer-table,
.teacher-table {
  width: 100%;
  border-collapse: collapse;
}

.answer-table th,
.answer-table td,
.teacher-table th,
.teacher-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.answer-table th,
.teacher-table th {
  background: #f2f5fb;
  color: var(--navy-2);
  font-size: 12px;
  text-transform: uppercase;
}

.answer-table tr:last-child td,
.teacher-table tr:last-child td { border-bottom: 0; }
.answer-table tr.is-active { background: #f5f8ff; box-shadow: inset 4px 0 var(--blue); }
.answer-table input { max-width: 120px; }
.answer-table select { min-width: 145px; }

.row-number-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #eaf0ff;
  color: var(--blue);
  font-weight: 900;
}

.feedback-pill {
  display: inline-flex;
  max-width: 260px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f2f5fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.feedback-pill.is-correct { background: #e9fbf4; color: #087657; }
.feedback-pill.is-partial { background: #fff5e7; color: #9a4b05; }
.feedback-pill.is-wrong { background: #fff0f2; color: var(--danger); }
.text-button { padding: 10px 12px; border: 0; background: transparent; color: var(--blue); font-weight: 800; }
.text-button.danger { color: var(--danger); }

.final-feedback {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #bde8d9;
  border-radius: 14px;
  background: #eefbf7;
  color: #08644b;
  font-weight: 800;
}

.teacher-panel {
  margin-top: 34px;
  padding: 24px;
  border: 1px solid #d9e1f1;
  border-radius: 18px;
  background: #f8faff;
}

.teacher-panel h3 { margin: 3px 0 0; font-size: 28px; }
.teacher-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.summary-stat { padding: 16px; border-radius: 13px; background: #fff; border: 1px solid var(--line); }
.summary-stat strong { display: block; color: var(--blue); font-size: 26px; }
.summary-stat span { color: var(--muted); font-size: 12px; font-weight: 800; }
.local-data-note { margin: 16px 0 0; color: var(--muted); font-size: 12px; }
.empty-results { color: var(--muted); text-align: center !important; padding: 26px !important; }

@media (max-width: 880px) {
  .worksheet { grid-template-columns: 1fr; }
  .worksheet-preview { display: none; }
  .assessment-heading, .teacher-panel-heading { display: grid; }
  .student-data { grid-template-columns: 1fr; }
  .teacher-summary { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .worksheet, .assessment { padding: 23px 18px; }
  .measure-help { align-items: flex-start; flex-wrap: wrap; }
  .measure-help span { flex-basis: 100%; order: 3; }
  .progress-card > div:first-child { display: grid; }
  .answer-table th, .answer-table td { padding: 9px; }
  .answer-table th:nth-child(4), .answer-table td:nth-child(4) { min-width: 180px; }
}
