.tower-page {
  --tower-cyan: #54d8ff;
  --tower-cyan-soft: rgba(84, 216, 255, 0.16);
  --tower-gold: #d4af37;
  --tower-panel: rgba(10, 16, 27, 0.88);
  --tower-border: rgba(123, 207, 239, 0.2);
  --tower-muted: #a6b6c9;
  background: var(--obsidian, #05070a);
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 3000;
  padding: 0.75rem 1rem;
  transform: translateY(-160%);
  border-radius: 0.5rem;
  background: #f8fafc;
  color: #07111e;
  font-weight: 700;
}
.skip-link:focus { transform: translateY(0); }

.tower-main { padding-top: 82px; }
.tower-container {
  position: relative;
  width: min(1680px, 100%);
  min-height: calc(100vh - 82px);
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2.8rem);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 44%, rgba(28, 108, 144, 0.17), transparent 47%),
    linear-gradient(180deg, #060a11 0%, #09111d 54%, #060a11 100%);
}
.tower-container::before,
.tower-container::after {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  content: "";
}
.tower-container::before {
  inset: 0;
  opacity: 0.22;
  background-image: linear-gradient(rgba(113, 188, 221, 0.09) 1px, transparent 1px), linear-gradient(90deg, rgba(113, 188, 221, 0.09) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%);
}
.tower-container::after {
  top: 14rem;
  left: 50%;
  width: min(70vw, 1100px);
  height: min(70vw, 1100px);
  transform: translateX(-50%);
  border: 1px solid rgba(84, 216, 255, 0.045);
  border-radius: 50%;
  box-shadow: 0 0 0 68px rgba(84, 216, 255, 0.018), 0 0 0 136px rgba(84, 216, 255, 0.012);
}
.tower-intro, .tower-workspace, .tower-control-row { position: relative; z-index: 1; }
.tower-intro { max-width: 860px; margin: 0 auto 1.8rem; text-align: center; }
.tower-eyebrow, .panel-kicker {
  color: var(--tower-cyan);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.tower-intro h1 {
  margin: 0.35rem 0 0.55rem;
  color: #f4f9ff;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: 0.015em;
  text-shadow: 0 0 36px rgba(84, 216, 255, 0.18);
}
.tower-intro-copy { max-width: 720px; margin: 0 auto; color: var(--tower-muted); font-size: 1rem; }

.tower-workspace {
  display: grid;
  grid-template-columns: minmax(210px, 245px) minmax(380px, 1fr) minmax(270px, 320px);
  gap: 1rem;
  align-items: stretch;
  max-width: 1560px;
  margin: 0 auto;
}
.tower-entry-rail, .tower-detail-panel {
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid var(--tower-border);
  border-radius: 14px;
  background: var(--tower-panel);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28), inset 0 1px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(16px);
}
.panel-heading h2, .tower-detail-panel h2, .tower-detail-panel h3 {
  margin: 0.35rem 0 0.5rem;
  color: #f2f7fc;
  font-size: 1.15rem;
}
.panel-heading p { margin: 0 0 1rem; color: var(--tower-muted); font-size: 0.85rem; }
.feature-list { display: grid; gap: 0.42rem; }
.feature-entry {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 0.42rem 0.48rem;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  color: #dce9f4;
  text-align: left;
  cursor: pointer;
  transition: background-color 180ms ease-out, border-color 180ms ease-out, transform 180ms ease-out;
}
.feature-entry:hover, .feature-entry[aria-pressed="true"] {
  border-color: rgba(84, 216, 255, 0.38);
  background: rgba(84, 216, 255, 0.1);
}
.feature-entry[aria-pressed="true"] { color: #fff; }
.feature-icon {
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  border: 1px solid rgba(84, 216, 255, 0.28);
  border-radius: 7px;
  background: rgba(84, 216, 255, 0.08);
  color: var(--tower-cyan);
  font-size: 1rem;
  font-weight: 800;
}
.feature-floor-tag { color: #88a6b9; font-size: 0.65rem; font-weight: 700; letter-spacing: 0.06em; }

.tower-stage {
  position: relative;
  min-width: 0;
  min-height: 660px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(84, 216, 255, 0.24);
  border-radius: 16px;
  background: radial-gradient(ellipse at 50% 48%, rgba(34, 126, 160, 0.2), transparent 42%), linear-gradient(180deg, rgba(7, 12, 22, 0.72), rgba(4, 9, 17, 0.94));
  box-shadow: inset 0 0 80px rgba(23, 141, 184, 0.08), 0 22px 70px rgba(0, 0, 0, 0.25);
}
.tower-stage::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.4;
  background-image: radial-gradient(circle, rgba(143, 225, 255, 0.65) 1px, transparent 1.8px);
  background-size: 83px 83px;
  mask-image: radial-gradient(ellipse at center, #000 10%, transparent 74%);
}
#tower-canvas { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; outline: none; }
.stage-topline {
  position: absolute;
  z-index: 4;
  top: 1rem;
  right: 1rem;
  left: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  color: #c9d9e7;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  pointer-events: none;
}
.scene-status { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; }
.status-dot { width: 0.45rem; height: 0.45rem; flex: 0 0 auto; border-radius: 50%; background: #76f3c1; box-shadow: 0 0 12px #58f0c1; }
.scene-counter { color: #91a9bc; white-space: nowrap; }
.stage-orbit-glow { position: absolute; z-index: 0; top: 43%; left: 50%; width: 24rem; height: 24rem; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(34, 177, 224, 0.08); filter: blur(70px); }
.tower-fallback { position: absolute; z-index: 2; inset: 4rem 0 9.5rem; display: grid; place-items: center; pointer-events: none; }
.tower-stage.webgl-ready .tower-fallback { display: none; }
.fallback-building { position: relative; width: 230px; height: 370px; transform: perspective(700px) rotateX(7deg) rotateY(-18deg); transform-style: preserve-3d; }
.fallback-floor { position: absolute; left: 50%; width: 188px; height: 39px; border: 1px solid rgba(84, 216, 255, 0.68); border-radius: 8px; transform: translateX(-50%) skewY(-7deg); background: linear-gradient(90deg, rgba(10, 33, 53, 0.84), rgba(41, 141, 173, 0.38), rgba(10, 33, 53, 0.84)); box-shadow: 0 0 16px rgba(84, 216, 255, 0.25), inset 0 0 20px rgba(84, 216, 255, 0.1); }
.fallback-fl01 { bottom: 20px; width: 220px; }
.fallback-fl02 { bottom: 72px; width: 210px; }
.fallback-fl03 { bottom: 124px; width: 198px; }
.fallback-fl04 { bottom: 176px; width: 188px; border-color: rgba(255, 190, 98, 0.85); box-shadow: 0 0 18px rgba(255, 170, 75, 0.22); }
.fallback-fl05 { bottom: 228px; width: 178px; }
.fallback-fl06 { bottom: 280px; width: 168px; }
.fallback-crystal { position: absolute; bottom: 337px; left: 50%; width: 38px; height: 38px; transform: translateX(-50%) rotate(45deg); border: 1px solid rgba(117, 255, 233, 0.9); background: rgba(43, 218, 210, 0.25); box-shadow: 0 0 32px rgba(75, 245, 229, 0.7); }
.fallback-base { position: absolute; bottom: 0; left: 50%; width: 240px; height: 22px; transform: translateX(-50%) skewY(-7deg); border: 1px solid rgba(212, 175, 55, 0.75); border-radius: 50%; background: rgba(11, 22, 34, 0.9); box-shadow: 0 0 24px rgba(212, 175, 55, 0.2); }
.floor-selector {
  position: absolute;
  z-index: 5;
  right: 1rem;
  bottom: 2.35rem;
  left: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
}
.floor-select-button {
  display: flex;
  min-width: 0;
  min-height: 42px;
  flex-direction: column;
  justify-content: center;
  gap: 0.05rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid rgba(119, 170, 197, 0.24);
  border-radius: 8px;
  background: rgba(5, 12, 22, 0.84);
  color: #c1d1de;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease-out, background-color 180ms ease-out, color 180ms ease-out;
  backdrop-filter: blur(8px);
}
.floor-select-button span:first-child { color: #6fa9c3; font-size: 0.58rem; font-weight: 800; letter-spacing: 0.08em; }
.floor-select-button span:last-child { overflow: hidden; font-size: 0.74rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.floor-select-button:hover, .floor-select-button[aria-pressed="true"] { border-color: var(--tower-cyan); background: rgba(28, 115, 149, 0.36); color: #fff; }
.floor-select-button:focus-visible, .feature-entry:focus-visible, .tower-control-btn:focus-visible, .tower-control-cta:focus-visible, .detail-more-button:focus-visible, .language-select:focus-visible, .floor-modal-close:focus-visible, .floor-modal-link:focus-visible {
  outline: 3px solid #f5cf68;
  outline-offset: 3px;
}
.scene-hint { position: absolute; z-index: 4; right: 1rem; bottom: 0.65rem; left: 1rem; margin: 0; color: #7894a9; font-size: 0.67rem; text-align: center; pointer-events: none; }

.tower-detail-panel { display: flex; flex-direction: column; }
.detail-block h2 { font-size: 1.35rem; }
.detail-copy, .floor-detail-copy, .floor-visual-note { color: #b9c9d8; font-size: 0.9rem; line-height: 1.7; }
.detail-points { display: grid; gap: 0.42rem; margin: 0.9rem 0 0; padding: 0; list-style: none; }
.detail-points li { position: relative; padding-left: 1.1rem; color: #9fb3c4; font-size: 0.82rem; }
.detail-points li::before { position: absolute; left: 0; color: var(--tower-cyan); content: "›"; }
.detail-divider { height: 1px; margin: 1.15rem 0; background: linear-gradient(90deg, rgba(84, 216, 255, 0.45), transparent); }
.floor-detail-block h3 { font-size: 1.05rem; line-height: 1.45; }
.floor-detail-copy { margin-bottom: 0.45rem; color: #e0edf7; }
.floor-visual-note { color: #92a9ba; font-size: 0.82rem; }
.floor-entry-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.85rem 0; }
.floor-entry-tag { padding: 0.2rem 0.48rem; border: 1px solid rgba(84, 216, 255, 0.23); border-radius: 999px; background: rgba(84, 216, 255, 0.06); color: #bfe7f5; font-size: 0.68rem; }
.detail-more-button { align-self: flex-start; min-height: 42px; margin-top: auto; padding: 0.55rem 0.8rem; border: 1px solid rgba(84, 216, 255, 0.38); border-radius: 8px; background: transparent; color: var(--tower-cyan); font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; transition: background-color 180ms ease-out; }
.detail-more-button:hover { background: rgba(84, 216, 255, 0.1); }
.demo-disclaimer { margin: 1rem 0 0; padding-top: 0.75rem; border-top: 1px solid rgba(255, 255, 255, 0.08); color: #8196a8; font-size: 0.7rem; line-height: 1.55; }

.tower-control-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; max-width: 1560px; margin: 1rem auto 0; }
.tower-controls { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.tower-control-btn, .tower-control-cta {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(123, 207, 239, 0.3);
  border-radius: 8px;
  background: rgba(9, 17, 29, 0.86);
  color: #e5f2fa;
  font: inherit;
  font-size: 0.83rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease-out, border-color 180ms ease-out, transform 180ms ease-out;
}
.tower-control-btn:hover { border-color: var(--tower-cyan); background: rgba(84, 216, 255, 0.11); }
.tower-control-cta { border-color: rgba(212, 175, 55, 0.55); background: linear-gradient(115deg, rgba(212, 175, 55, 0.18), rgba(84, 216, 255, 0.12)); color: #f1d98d; }
.tower-control-cta:hover { border-color: var(--tower-gold); background: rgba(212, 175, 55, 0.2); }
.control-hint { color: #8298aa; font-size: 0.75rem; }
.nav-actions { display: flex; align-items: center; gap: 0.55rem; }
.language-label { color: #91a7b8; font-size: 0.68rem; }
.language-select { min-height: 38px; padding: 0.3rem 1.6rem 0.3rem 0.55rem; border: 1px solid rgba(123, 207, 239, 0.28); border-radius: 7px; background: #0d1520; color: #d9e9f3; font: inherit; font-size: 0.75rem; }

.floor-modal { position: fixed; z-index: 2500; inset: 0; display: none; align-items: center; justify-content: center; padding: 1rem; background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(14px); }
.floor-modal.active { display: flex; }
.floor-modal-content { position: relative; width: min(600px, 100%); max-height: min(85vh, 720px); overflow: auto; padding: clamp(1.4rem, 4vw, 2.4rem); border: 1px solid rgba(84, 216, 255, 0.4); border-radius: 16px; background: linear-gradient(145deg, #101a27, #080d15); box-shadow: 0 25px 90px rgba(0, 0, 0, 0.55); }
.floor-modal-close { position: absolute; top: 0.75rem; right: 0.75rem; display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 50%; background: rgba(255, 255, 255, 0.06); color: #fff; font-size: 1.5rem; cursor: pointer; }
.floor-modal-title { margin: 0.5rem 2rem 0.8rem 0; color: #f4faff; font-size: clamp(1.5rem, 4vw, 2rem); }
.floor-modal-desc, .floor-modal-visual { margin: 0 0 0.9rem; color: #c1d1df; font-size: 0.98rem; line-height: 1.75; }
.floor-modal-visual { color: #8fa8b9; font-size: 0.88rem; }
.floor-modal-link { display: inline-flex; min-height: 44px; align-items: center; margin-top: 0.35rem; padding: 0.65rem 1rem; border-radius: 8px; background: linear-gradient(115deg, #147d9f, #2d96ae); color: #fff; font-weight: 700; text-decoration: none; }
.floor-modal-link[hidden] { display: none; }
body.modal-open { overflow: hidden; }

.tower-cases { max-width: 1500px; margin: 0 auto; padding: 4rem clamp(1.25rem, 3vw, 2.8rem); }
.tower-cases .card { border: 1px solid rgba(123, 207, 239, 0.16); background: rgba(10, 16, 27, 0.76); }
.tower-cases .card-description { overflow-wrap: anywhere; }
.footer { margin-top: 0; }
.line-float-btn { min-width: 48px; min-height: 48px; }

@media (hover: hover) and (pointer: fine) {
  .feature-entry:hover { transform: translateX(2px); }
  .tower-control-cta:hover { transform: translateY(-1px); }
}

@media (max-width: 1220px) {
  .tower-workspace { grid-template-columns: minmax(190px, 220px) minmax(340px, 1fr); }
  .tower-detail-panel { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: start; }
  .tower-detail-panel .detail-divider { width: 1px; height: 100%; min-height: 130px; margin: 0; background: linear-gradient(180deg, rgba(84, 216, 255, 0.45), transparent); }
  .demo-disclaimer { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .tower-main { padding-top: 76px; }
  .tower-container { min-height: 0; padding: 1.1rem 0.8rem 1.7rem; }
  .tower-intro { margin-bottom: 1rem; padding: 0 0.45rem; }
  .tower-intro-copy { font-size: 0.9rem; }
  .nav-main { padding: 0.55rem 0.7rem; }
  .nav-container { gap: 0.5rem; }
  .nav-logo { gap: 0.4rem; }
  .nav-logo-img { width: 32px; height: 32px; }
  .nav-logo-text { font-size: 0.75rem; letter-spacing: 0.08em; }
  .nav-actions { gap: 0.35rem; }
  .language-label { display: none; }
  .language-select { min-height: 36px; max-width: 110px; font-size: 0.68rem; }
  .nav-cta { display: none; }
  .tower-workspace { grid-template-columns: 1fr; gap: 0.75rem; }
  .tower-entry-rail { padding: 0.85rem; }
  .panel-heading { display: grid; grid-template-columns: 1fr; }
  .panel-heading h2 { margin-bottom: 0.25rem; }
  .panel-heading p { margin-bottom: 0.7rem; }
  .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem; }
  .feature-entry { grid-template-columns: 1.65rem minmax(0, 1fr); min-height: 44px; gap: 0.4rem; padding: 0.35rem; font-size: 0.76rem; }
  .feature-icon { width: 1.55rem; height: 1.55rem; }
  .feature-floor-tag { display: none; }
  .tower-stage { min-height: 560px; }
  .tower-fallback { inset: 3.8rem 0 10.5rem; }
  .floor-selector { right: 0.55rem; bottom: 2.3rem; left: 0.55rem; gap: 0.3rem; }
  .floor-select-button { min-height: 42px; padding: 0.25rem 0.3rem; }
  .floor-select-button span:last-child { font-size: 0.64rem; }
  .stage-topline { top: 0.75rem; right: 0.7rem; left: 0.7rem; font-size: 0.62rem; }
  .scene-counter { font-size: 0.56rem; }
  .scene-hint { font-size: 0.61rem; }
  .tower-detail-panel { grid-column: auto; display: flex; gap: 0; padding: 1rem; }
  .tower-detail-panel .detail-divider { width: auto; height: 1px; min-height: 0; margin: 1rem 0; background: linear-gradient(90deg, rgba(84, 216, 255, 0.45), transparent); }
  .tower-control-row { align-items: flex-start; flex-direction: column; padding: 0 0.2rem; }
  .tower-controls { width: 100%; }
  .tower-control-btn, .tower-control-cta { flex: 1 1 auto; min-height: 46px; padding-inline: 0.7rem; font-size: 0.74rem; }
  .control-hint { margin: 0; }
  .tower-cases { padding: 2.5rem 1rem; }
}

@media (max-width: 390px) {
  .tower-stage { min-height: 525px; }
  .floor-selector { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-entry { font-size: 0.71rem; }
  .scene-counter { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tower-page *, .tower-page *::before, .tower-page *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .feature-entry:hover, .tower-control-cta:hover { transform: none; }
}
