:root {
  --bg: #eef0ff;
  --bg-soft: #f7f6ff;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --line: rgba(18, 26, 58, 0.08);
  --text: #121a3a;
  --muted: #6a708f;
  --accent: #6a5bff;
  --accent-2: #8a7bff;
  --accent-3: #b4b0ff;
  --accent-soft: rgba(106, 91, 255, 0.08);
  --ink: #0c102a;
  --gold: #7b6bff;
  --shadow: 0 24px 70px rgba(16, 23, 45, 0.12);
  --shadow-strong: 0 30px 120px rgba(16, 23, 45, 0.18);
  --radius-xl: 34px;
  --radius-lg: 28px;
  --radius-md: 22px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 8%, rgba(120, 108, 255, 0.2), transparent 28%),
    radial-gradient(circle at 90% 12%, rgba(170, 150, 255, 0.18), transparent 24%),
    linear-gradient(180deg, #f7f6ff 0%, #eef0ff 100%);
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.32), transparent 70%);
}

.glow {
  position: fixed;
  border-radius: 999px;
  filter: blur(70px);
  pointer-events: none;
  z-index: -3;
}

.glow-a {
  width: 300px;
  height: 300px;
  left: -80px;
  top: 90px;
  background: rgba(118, 108, 255, 0.28);
}

.glow-b {
  width: 360px;
  height: 360px;
  right: -130px;
  top: 120px;
  background: rgba(170, 150, 255, 0.22);
}

img,
video,
iframe {
  display: block;
  width: 100%;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font: inherit;
}

.app-shell {
  width: min(1460px, calc(100% - 32px));
  margin: 16px auto 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: calc(100vh - 36px);
}

.app-shell.is-splash {
  width: 100vw;
  height: 100vh;
  margin: 0;
  gap: 0;
}

.app-shell.is-home {
  width: 100vw;
  height: 100vh;
  margin: 0;
  gap: 0;
}

.app-shell.is-splash .app-header,
.app-shell.is-splash .tabbar,
.app-shell.is-home .app-header,
.app-shell.is-home .tabbar {
  display: none;
}

.app-shell.is-splash .content-frame {
  flex: 1 1 auto;
  height: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.app-shell.is-home .content-frame {
  flex: 1 1 auto;
  height: 100%;
  padding: 28px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.app-shell.is-splash .panel[data-panel="splash"],
.app-shell.is-home .panel[data-panel="home"] {
  height: 100%;
}

.app-header,
.content-frame,
.tabbar,
.card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.app-header {
  border-radius: 30px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-home {
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
  background: linear-gradient(135deg, #7a6bff, #5c5be8 55%, #a6b2ff);
  box-shadow: 0 16px 34px rgba(92, 91, 232, 0.24);
}

.brand-copy {
  min-width: 0;
}

.brand-kicker {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(106, 91, 255, 0.1);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand h1 {
  margin: 6px 0 0;
  font-size: 1.2rem;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.header-note {
  max-width: 420px;
  padding: 12px 16px;
  border-radius: 20px;
  background: rgba(255, 252, 246, 0.9);
  border: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.92rem;
}

.tool-btn,
.mini-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  transition: 0.22s;
}

.tool-btn:hover,
.mini-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(106, 91, 255, 0.1);
}

.content-frame {
  border-radius: 38px;
  padding: 18px;
  height: 100%;
  overflow: hidden;
}

.panel {
  display: none;
  height: 100%;
  overflow: auto;
  padding-right: 6px;
}

.panel.is-active {
  display: block;
}

.panel::-webkit-scrollbar {
  width: 10px;
}

.panel::-webkit-scrollbar-thumb {
  background: rgba(106, 91, 255, 0.22);
  border-radius: 999px;
}

.panel::-webkit-scrollbar-track {
  background: transparent;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(106, 91, 255, 0.1);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow.small {
  font-size: 0.72rem;
  padding: 6px 10px;
}

.panel-head h2 {
  margin: 10px 0 8px;
  font-size: 2.26rem;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
  line-height: 1.72;
}

.panel-note {
  padding: 11px 14px;
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.card {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-title,
.section-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.section-head {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.92rem;
}

.splash-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #06101d;
}

.splash-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(4, 9, 18, 0.04), rgba(4, 9, 18, 0.12)),
    radial-gradient(circle at center, transparent 44%, rgba(4, 9, 18, 0.06) 100%);
  pointer-events: none;
}

.splash-visual {
  position: absolute;
  inset: 0;
  animation: splashVisualFloat 12s ease-in-out 1.8s infinite alternate;
}

.splash-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 16, 31, 0.08), rgba(7, 16, 31, 0.14)),
    url("./Main_enter.png") center center / cover no-repeat;
  filter: blur(18px) brightness(0.92);
  transform: scale(1.05);
  opacity: 0.9;
}

.splash-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: clamp(10px, 2vw, 20px);
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transform: scale(1.08);
  filter: brightness(1.14) contrast(1.12) saturate(1.04);
  animation: splashImageReveal 1.8s cubic-bezier(0.2, 0.7, 0.15, 1) forwards;
}

.splash-enter-button {
  position: absolute;
  left: 50%;
  bottom: clamp(44px, 10vh, 92px);
  z-index: 2;
  min-width: 180px;
  padding: 14px 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  transform: translate(-50%, 32px);
  opacity: 0;
  backdrop-filter: blur(14px);
  box-shadow: 0 22px 46px rgba(5, 12, 24, 0.26);
  transition:
    opacity 1s ease,
    transform 1.1s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
  pointer-events: none;
}

.splash-screen.is-ready .splash-enter-button {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
  animation: splashButtonGlow 3.2s ease-in-out infinite;
}

.splash-enter-button:hover {
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 26px 56px rgba(5, 12, 24, 0.34);
}

.splash-enter-button:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: 4px;
}

.home-shell {
  display: grid;
  height: 100%;
}

.home-feature-grid {
  display: grid;
  height: 100%;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.home-feature-card {
  grid-column: span 4;
  position: relative;
  border: 0;
  padding: 22px;
  display: grid;
  gap: 14px;
  align-content: space-between;
  min-height: 0;
  height: 100%;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  overflow: hidden;
  transition: 0.24s ease;
}

.home-feature-card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -42px;
  top: -46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
  filter: blur(8px);
  opacity: 0.8;
}

.home-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

.home-feature-card.is-wide {
  grid-column: span 6;
}

.home-feature-card--activity {
  background: linear-gradient(135deg, rgba(237, 242, 255, 0.98), rgba(205, 224, 255, 0.92));
}

.home-feature-card--database {
  background: linear-gradient(135deg, rgba(231, 245, 241, 0.98), rgba(192, 233, 222, 0.92));
}

.home-feature-card--video {
  background: linear-gradient(135deg, rgba(255, 239, 229, 0.98), rgba(255, 214, 190, 0.92));
}

.home-feature-card--game {
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.98), rgba(210, 220, 255, 0.92));
}

.home-feature-card--shop {
  background: linear-gradient(135deg, rgba(246, 239, 230, 0.98), rgba(231, 214, 194, 0.94));
}

.home-feature-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-feature-index {
  font-family: "Source Han Serif SC", "Noto Serif SC", "STSong", serif;
  font-size: 2rem;
  line-height: 1;
  color: rgba(12, 16, 42, 0.34);
}

.home-feature-tag {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.34);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-feature-card h3 {
  margin: 0;
  font-family: "Source Han Serif SC", "Noto Serif SC", "STSong", serif;
  font-size: 1.56rem;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.home-feature-card p {
  margin: 0;
  color: rgba(18, 26, 58, 0.78);
  line-height: 1.78;
}

.home-feature-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
}

@keyframes splashImageReveal {
  0% {
    opacity: 0;
    transform: scale(1.1);
    filter: blur(16px);
  }

  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

@keyframes splashVisualFloat {
  0% {
    transform: scale(1) translate3d(0, 0, 0);
  }

  100% {
    transform: scale(1.035) translate3d(0, -12px, 0);
  }
}

@keyframes splashButtonGlow {
  0%,
  100% {
    box-shadow: 0 22px 46px rgba(5, 12, 24, 0.26);
  }

  50% {
    box-shadow: 0 28px 60px rgba(112, 129, 255, 0.32);
  }
}

.activity-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) 360px;
  gap: 18px;
  align-items: start;
}

.activity-main {
  display: grid;
  gap: 18px;
  min-height: 0;
}

.side-stack {
  display: grid;
  gap: 18px;
}

.carousel-card,
.summary-card,
.preview-card,
.insight-card,
.resource-card,
.asset-card,
.pattern-card,
.info-card,
.showcase-copy,
.showcase-visual,
.showcase-gallery,
.video-card {
  padding: 20px;
}

.carousel-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.carousel-view {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  min-height: 430px;
  background: #e2e4ff;
}

.carousel-view img {
  height: 100%;
  min-height: 430px;
  object-fit: cover;
}

.carousel-overlay {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(8, 18, 36, 0.18), rgba(8, 18, 36, 0.74));
  color: #fff;
  box-shadow: 0 20px 50px rgba(8, 18, 36, 0.18);
}

.overlay-tag {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.carousel-overlay h3 {
  margin: 0 0 6px;
  font-size: 1.58rem;
}

.carousel-overlay p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  max-width: 580px;
  line-height: 1.72;
}

.carousel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px 0;
}

.carousel-dots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  background: rgba(106, 91, 255, 0.18);
  cursor: pointer;
  padding: 0;
}

.carousel-dots button.is-active {
  width: 28px;
  background: linear-gradient(90deg, #6a5bff, #8a7bff);
}

.activity-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.step-card {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 253, 247, 0.92);
  border: 1px solid var(--line);
  display: grid;
  gap: 6px;
}

.step-card strong {
  font-size: 0.82rem;
  color: var(--gold);
  letter-spacing: 0.08em;
}

.step-card span {
  font-weight: 800;
}

.step-card small {
  color: var(--muted);
  line-height: 1.65;
}

.activity-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.activity-only-card {
  padding: 20px;
  min-height: 100%;
}

.activity-preview-card {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.92);
  border-radius: 22px;
  padding: 0;
  overflow: hidden;
  text-align: left;
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
}

.activity-preview-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(106, 91, 255, 0.12);
}

.activity-preview-card.is-wide {
  grid-column: 1 / -1;
}

.activity-preview-media {
  position: relative;
  height: 300px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.activity-preview-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.activity-preview-media.is-placeholder {
  background: #ffffff;
}

.activity-preview-empty {
  min-height: 300px;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
}

.activity-preview-empty strong {
  font-size: 1.08rem;
}

.activity-preview-empty span {
  color: var(--muted);
}

.activity-preview-overlay {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(12, 16, 42, 0.72);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.activity-preview-copy {
  padding: 16px;
  display: grid;
  gap: 10px;
}

.activity-preview-copy strong {
  font-size: 1rem;
}

.activity-preview-meta {
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.88rem;
}

.activity-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.activity-card-dots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.activity-card-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(106, 91, 255, 0.18);
  cursor: pointer;
}

.activity-card-dots button.is-active {
  width: 28px;
  background: linear-gradient(90deg, #6a5bff, #8a7bff);
}

.activity-card-dots.is-static {
  min-height: 10px;
}

.activity-card-link {
  width: auto;
}

.activity-card-link.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.insight-card p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.72;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-list span {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(106, 91, 255, 0.08);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.86rem;
}

.link-list {
  display: grid;
  gap: 10px;
}

.link-list a,
.link-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid var(--line);
  font-size: 0.92rem;
  transition: 0.2s;
  text-align: left;
  color: var(--text);
}

.link-list button {
  cursor: pointer;
}

.link-list a:hover,
.link-list button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(106, 91, 255, 0.08);
}

.link-list a span:first-child,
.link-list button span:first-child,
.card-bar span {
  min-width: 0;
}

.link-list a span:last-child,
.link-list button span:last-child {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.link-list.compact a,
.link-list.compact button {
  padding: 10px 12px;
  font-size: 0.88rem;
}

.database-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.database-layout .info-card {
  grid-column: auto;
}

.iframe-card {
  padding: 14px;
}

.card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
  padding: 4px 4px 12px;
}

.iframe-card iframe {
  height: 520px;
  border: 0;
  border-radius: 22px;
  background: #f7f6ff;
}

.database-layout .iframe-card iframe {
  height: 700px;
}

.map-intro {
  margin: 0 4px 12px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(106, 91, 255, 0.08);
  color: var(--muted);
  line-height: 1.68;
  font-size: 0.9rem;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-box {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 253, 247, 0.94);
  border: 1px solid var(--line);
}

.metric-box strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 6px;
}

.metric-box span {
  color: var(--muted);
  font-size: 0.9rem;
}

.resource-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.resource-columns h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.video-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) 360px;
  gap: 18px;
  align-items: start;
}

.video-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.video-player-head h3 {
  margin: 10px 0 6px;
  font-size: 1.45rem;
  line-height: 1.15;
}

.video-card video {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 24px;
  background: #060b16;
}

.video-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding-top: 2px;
  flex-wrap: wrap;
}

.video-actions button {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  background: linear-gradient(135deg, #6a5bff, #8a7bff);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.video-caption {
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(106, 91, 255, 0.08);
  border: 1px solid rgba(106, 91, 255, 0.1);
}

.video-caption-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.video-caption strong {
  font-size: 0.94rem;
  color: var(--accent);
}

.video-caption-head span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.video-caption p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.video-detail-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.video-detail-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(106, 91, 255, 0.12);
}

.video-detail-card h4 {
  margin: 0 0 10px;
  font-size: 0.96rem;
  color: var(--text);
}

.video-detail-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 8px;
  line-height: 1.65;
  font-size: 0.9rem;
}

.video-list-card {
  padding: 20px;
}

.video-playlist {
  display: grid;
  gap: 12px;
}

.video-playlist-item {
  width: 100%;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: start;
  text-align: left;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  padding: 12px;
  cursor: pointer;
  transition: 0.22s;
}

.video-playlist-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(106, 91, 255, 0.12);
}

.video-playlist-item.is-active {
  border-color: rgba(106, 91, 255, 0.45);
  background: rgba(247, 246, 255, 0.96);
  box-shadow: 0 14px 28px rgba(106, 91, 255, 0.16);
}

.video-playlist-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #6a5bff, #8a7bff);
  box-shadow: 0 10px 20px rgba(106, 91, 255, 0.18);
}

.video-playlist-copy strong {
  display: block;
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.video-playlist-copy small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-empty {
  padding: 14px;
  border-radius: 16px;
  background: rgba(106, 91, 255, 0.08);
  color: var(--muted);
  text-align: center;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.asset-grid img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  background: #eef0ff;
}

.game-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.game-layout .iframe-card iframe {
  height: 920px;
}

.shop-board {
  display: grid;
  gap: 18px;
}

.showcase-tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.showcase-tab {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
  transition: 0.22s;
}

.showcase-tab.is-active {
  background: linear-gradient(135deg, #6a5bff, #8a7bff);
  color: #fff;
  box-shadow: 0 12px 24px rgba(106, 91, 255, 0.2);
}

.shop-view[hidden] {
  display: none !important;
}

.shop-landing-layout {
  display: grid;
  gap: 18px;
}

.shop-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.shop-detail-head .showcase-tab-row {
  flex: 1 1 320px;
}

.shop-back-button {
  flex: 0 0 auto;
}

.shop-board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.showcase-gallery-grid-card {
  padding: 16px;
}

.showcase-gallery-l-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 240, 255, 0.94)),
    radial-gradient(circle at top left, rgba(170, 150, 255, 0.18), transparent 40%);
}

.shop-showcase-layout {
  display: grid;
  gap: 14px;
}

.shop-landing-hero,
.shop-showcase-top {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(260px, 0.58fr);
  gap: 14px;
  align-items: stretch;
}

.shop-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.shop-entry-card {
  appearance: none;
  width: 100%;
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: 0.2s ease;
}

.shop-entry-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(16, 23, 45, 0.08);
}

.shop-entry-card:focus-visible {
  outline: 2px solid rgba(106, 91, 255, 0.42);
  outline-offset: 2px;
}

.shop-entry-card.is-active {
  border-color: rgba(106, 91, 255, 0.34);
  box-shadow: 0 14px 28px rgba(106, 91, 255, 0.12);
}

.shop-entry-image {
  padding: 12px;
  aspect-ratio: 4 / 3;
}

.shop-entry-meta {
  display: grid;
  gap: 6px;
}

.shop-entry-kicker {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.shop-entry-meta strong {
  font-size: 1.02rem;
  line-height: 1.28;
}

.shop-entry-note {
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.5;
}

.shop-entry-price {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
}

.shop-entry-text {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.shop-entry-link {
  margin-top: 6px;
  color: var(--text);
  font-weight: 700;
}

.shop-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: start;
  gap: 14px;
}

.shop-gallery-item {
  display: block;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: 0.2s ease;
}

.shop-gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(16, 23, 45, 0.08);
}

.shop-primary-card {
  height: 100%;
}

.shop-intro-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  min-height: 100%;
}

.shop-intro-card h3 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.shop-intro-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.shop-landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.shop-enter-button {
  box-shadow: none;
}

.shop-gallery-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 240, 255, 0.92)),
    radial-gradient(circle at top left, rgba(170, 150, 255, 0.16), transparent 40%);
  aspect-ratio: 1 / 1;
}

.shop-primary-image-wrap {
  aspect-ratio: 4 / 3;
  padding: 18px;
}

.shop-gallery-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feature-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.feature-list-compact {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.feature-list li + li {
  margin-top: 4px;
}

.shop-brief {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.material-head {
  margin-bottom: 12px;
}

.tabbar {
  border-radius: 28px;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.tab-btn {
  border: 0;
  cursor: pointer;
  border-radius: 20px;
  padding: 12px 10px;
  background: rgba(255, 253, 248, 0.86);
  color: var(--muted);
  display: grid;
  gap: 3px;
  text-align: center;
  transition: 0.22s;
}

.tab-btn span {
  font-weight: 800;
  color: var(--text);
}

.tab-btn small {
  font-size: 0.74rem;
}

.tab-btn.is-active {
  background: linear-gradient(135deg, #6a5bff, #8a7bff);
  box-shadow: 0 14px 24px rgba(106, 91, 255, 0.2);
}

.tab-btn.is-active span,
.tab-btn.is-active small {
  color: #fff;
}

.doc-viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.doc-viewer.is-open {
  display: flex;
}

.doc-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 18, 36, 0.32);
  backdrop-filter: blur(10px);
}

.doc-viewer-panel {
  position: relative;
  width: min(1180px, calc(100vw - 40px));
  height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 34px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-strong);
}

.doc-viewer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 246, 255, 0.92);
}

.doc-viewer-head h3 {
  margin: 10px 0 6px;
  font-size: 1.35rem;
  line-height: 1.1;
}

.doc-viewer-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.doc-viewer-close {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 11px 16px;
  background: linear-gradient(135deg, #6a5bff, #8a7bff);
  color: #fff;
  font-weight: 800;
}

.doc-viewer iframe {
  flex: 1;
  border: 0;
  background: #eef0ff;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.image-viewer.is-open {
  display: flex;
}

.image-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 18, 36, 0.42);
  backdrop-filter: blur(12px);
}

.image-viewer-panel {
  position: relative;
  width: min(1240px, calc(100vw - 40px));
  height: min(90vh, 960px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
  border-radius: 34px;
  background: rgba(248, 249, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-strong);
}

.image-viewer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 0;
}

.image-viewer-head h3 {
  margin: 10px 0 6px;
  font-size: 1.35rem;
  line-height: 1.1;
}

.image-viewer-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.image-viewer-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.image-viewer-counter {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(106, 91, 255, 0.1);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.image-viewer-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
  align-items: center;
  padding: 0 18px 18px;
}

.image-viewer-media {
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 240, 255, 0.94)),
    radial-gradient(circle at top left, rgba(170, 150, 255, 0.16), transparent 40%);
  border: 1px solid rgba(18, 26, 58, 0.08);
}

.image-viewer-media img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(16, 23, 45, 0.12));
}

.image-viewer-nav {
  border: 0;
  cursor: pointer;
  min-width: 92px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 800;
  transition: 0.2s ease;
}

.image-viewer-nav:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(16, 23, 45, 0.08);
}

.image-viewer-nav:disabled {
  cursor: default;
  opacity: 0.45;
  box-shadow: none;
}

@media (max-width: 1240px) {
  .home-feature-card,
  .home-feature-card.is-wide {
    grid-column: span 6;
  }

  .activity-layout,
  .database-layout,
  .video-layout,
  .game-layout,
  .shop-board-grid {
    grid-template-columns: 1fr;
  }

  .database-layout .info-card {
    grid-column: auto;
  }

  .activity-steps,
  .resource-columns,
  .video-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .shop-landing-hero,
  .shop-showcase-top {
    grid-template-columns: minmax(0, 1.12fr) minmax(240px, 0.64fr);
  }

  .game-layout .iframe-card iframe {
    height: 760px;
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .app-shell {
    width: calc(100% - 18px);
    margin: 10px auto 16px;
    gap: 12px;
    height: auto;
  }

  .app-shell.is-home {
    width: 100%;
    height: 100vh;
    margin: 0;
  }

  .app-shell.is-splash {
    width: 100%;
    height: 100vh;
    margin: 0;
  }

  .app-shell.is-splash .content-frame {
    padding: 0;
  }

  .app-shell.is-home .content-frame {
    padding: 14px;
  }

  .app-header,
  .content-frame,
  .tabbar,
  .card {
    border-radius: 26px;
  }

  .app-header {
    padding: 16px 18px;
    flex-direction: column;
    align-items: flex-start;
  }

  .header-note {
    max-width: none;
    width: 100%;
  }

  .content-frame {
    order: 2;
    padding: 14px;
    height: auto;
    overflow: visible;
  }

  .panel {
    height: auto;
    overflow: visible;
    padding-right: 0;
  }

  .panel-head {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
  }

  .panel-head h2 {
    font-size: 1.95rem;
  }

  .panel-note {
    white-space: normal;
    max-width: 100%;
  }

  .home-feature-grid {
    grid-template-columns: 1fr;
  }

  .home-feature-card,
  .home-feature-card.is-wide {
    grid-column: auto;
    min-height: 0;
  }

  .activity-steps,
  .activity-preview-grid,
  .metric-row,
  .resource-columns,
  .asset-grid,
  .video-detail-grid {
    grid-template-columns: 1fr;
  }

  .showcase-tab-row {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .showcase-tab {
    flex: 0 0 auto;
  }

  .tabbar {
    order: 1;
    display: flex;
    gap: 8px;
    padding: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    position: sticky;
    top: 10px;
    z-index: 8;
  }

  .tabbar::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    flex: 0 0 156px;
    padding: 12px 14px;
  }

  .carousel-view,
  .carousel-view img {
    min-height: 340px;
  }

  .activity-preview-media,
  .activity-preview-empty {
    height: 260px;
    min-height: 260px;
  }

  .iframe-card iframe {
    height: min(52vh, 440px);
  }

  .database-layout .iframe-card iframe {
    height: min(56vh, 520px);
  }

  .game-layout .iframe-card iframe {
    height: min(70vh, 680px);
  }

  .doc-viewer {
    padding: 14px;
  }

  .doc-viewer-panel {
    width: 100%;
    height: min(90vh, 820px);
    border-radius: 28px;
  }

  .image-viewer {
    padding: 14px;
  }

  .image-viewer-panel {
    width: 100%;
    height: min(90vh, 820px);
    border-radius: 28px;
  }

  .image-viewer-stage {
    grid-template-columns: 1fr;
  }

  .image-viewer-media {
    min-height: min(60vh, 620px);
  }

  .image-viewer-nav {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: calc(100% - 12px);
    margin: 8px auto 14px;
  }

  .app-shell.is-splash .content-frame {
    padding: 0;
  }

  .app-shell.is-home .content-frame {
    padding: 10px;
  }

  .app-header,
  .content-frame,
  .tabbar,
  .card {
    border-radius: 22px;
  }

  .app-header {
    padding: 14px;
  }

  .brand {
    align-items: flex-start;
    gap: 12px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .brand h1 {
    font-size: 1rem;
  }

  .brand p {
    font-size: 0.84rem;
  }

  .panel-head h2 {
    font-size: 1.6rem;
  }

  .panel-head p {
    font-size: 0.92rem;
  }

  .eyebrow {
    font-size: 0.74rem;
    padding: 6px 10px;
  }

  .home-feature-card {
    padding: 18px;
  }

  .home-feature-card h3 {
    font-size: 1.34rem;
  }

  .splash-enter-button {
    min-width: 152px;
    padding: 12px 26px;
    font-size: 0.92rem;
    letter-spacing: 0.18em;
  }

  .carousel-card,
  .summary-card,
  .preview-card,
  .insight-card,
  .resource-card,
  .asset-card,
  .pattern-card,
  .info-card,
  .showcase-copy,
  .showcase-visual,
  .showcase-gallery-grid-card,
  .video-card {
    padding: 16px;
  }

  .carousel-view,
  .carousel-view img {
    min-height: 280px;
  }

  .carousel-view {
    border-radius: 20px;
  }

  .shop-landing-hero,
  .shop-showcase-top {
    grid-template-columns: 1fr;
  }

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

  .carousel-overlay {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 14px;
    border-radius: 20px;
  }

  .carousel-overlay h3 {
    font-size: 1.15rem;
  }

  .carousel-overlay p {
    font-size: 0.88rem;
  }

  .carousel-foot,
  .video-actions,
  .doc-viewer-head,
  .video-caption-head {
    flex-direction: column;
    align-items: stretch;
  }

  .video-actions button,
  .showcase-tab,
  .tool-btn,
  .mini-link {
    width: 100%;
  }

  .activity-card-actions {
    align-items: stretch;
  }

  .activity-card-link {
    width: 100%;
  }

  .activity-preview-media,
  .activity-preview-empty {
    height: 220px;
    min-height: 220px;
  }


  .link-list a,
  .link-list button {
    padding: 11px 12px;
    border-radius: 16px;
    align-items: flex-start;
  }

  .link-list a span:last-child,
  .link-list button span:last-child {
    white-space: normal;
    text-align: right;
  }

  .showcase-gallery {
    min-height: 320px;
  }

  .showcase-gallery img {
    min-height: 280px;
  }

  .showcase-copy h3 {
    font-size: 1.45rem;
  }

  .doc-viewer {
    padding: 10px;
  }

  .doc-viewer-panel {
    width: 100%;
    height: min(92vh, 920px);
    border-radius: 24px;
  }

  .doc-viewer-head {
    padding: 16px;
  }

  .doc-viewer-head h3 {
    font-size: 1.15rem;
  }

  .image-viewer {
    padding: 10px;
  }

  .image-viewer-panel {
    height: min(92vh, 920px);
    border-radius: 24px;
  }

  .image-viewer-head {
    flex-direction: column;
    padding: 16px 16px 0;
  }

  .image-viewer-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .image-viewer-stage {
    padding: 0 16px 16px;
  }

  .image-viewer-media {
    min-height: min(52vh, 440px);
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .splash-enter-button {
    width: calc(100% - 32px);
    max-width: 240px;
  }

  .home-feature-meta {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .home-feature-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .shop-gallery-grid {
    grid-template-columns: 1fr;
  }

  .shop-gallery-image-wrap,
  .shop-primary-image-wrap {
    aspect-ratio: 4 / 3;
  }

  .shop-entry-grid {
    grid-template-columns: 1fr;
  }

  .tab-btn {
    flex-basis: 132px;
  }

  .iframe-card iframe {
    height: min(48vh, 320px);
  }

  .database-layout .iframe-card iframe {
    height: min(50vh, 360px);
  }

  .game-layout .iframe-card iframe {
    height: min(62vh, 460px);
  }
}
