/* Tokens: Adventure */
.stx[data-stx="adventure"] {
  --stx-page-bg: linear-gradient(#aedcf8 0, #b9e5a0 420px);
  --stx-card: #fff;
  --stx-card-alpha: .86;
  --stx-card-border: rgba(255,255,255,.65);
  --stx-card-shadow: 0 4px 14px rgba(40,70,60,.10);
  --stx-ink: #13284b;
  --stx-muted: #46576c;
  --stx-line: #e6ebf0;
  --stx-primary: #0b6a61;
  --stx-primary-strong: #0f8479;
  --stx-on-primary: #fff;
  --stx-primary-edge: #0b6a61;
  --stx-accent: #fdd75b;
  --stx-on-accent: #13284b;
  --stx-success: #0b6a61;
  --stx-success-bg: #e2f5ee;
  --stx-warning: #9a5b00;
  --stx-warning-bg: #fff0cc;
  --stx-danger: #b42318;
  --stx-danger-bg: #fde8e8;
  --stx-tint-1: #e2f5ee;
  --stx-tint-2: #e3f0fb;
  --stx-tint-3: #ece4fb;
  --stx-tint-4: #fff0cc;
  --stx-tint-5: #ffe9d6;
  --stx-bar-track: #e6ebf0;
  --stx-bar-fill: #0b6a61;
  --stx-level-track: #dfe7ee;
  --stx-focus: #0b6a61;
  --stx-overlay: rgba(19,40,75,.72);
  --stx-reader: #fff;
  --stx-reader-ink: #13284b;
  --stx-radius-card: 16px;
  --stx-radius-btn: 11px;
  --stx-font-heading: "Nunito",system-ui,sans-serif;
  --stx-font-body: "Nunito",system-ui,sans-serif;
}

/* Tokens: Space */
.stx[data-stx="space"] {
  --stx-page-bg: linear-gradient(160deg,#0b1026 0%,#1b1446 100%);
  --stx-card: #151b3b;
  --stx-card-alpha: 1;
  --stx-card-border: #2c356b;
  --stx-card-shadow: 0 6px 20px rgba(0,0,0,.35);
  --stx-ink: #eaf0ff;
  --stx-muted: #9aa6d6;
  --stx-line: #2c356b;
  --stx-primary: #4de1ff;
  --stx-primary-strong: #4de1ff;
  --stx-on-primary: #0b1026;
  --stx-primary-edge: #1fa9c9;
  --stx-accent: #ffc94d;
  --stx-on-accent: #0b1026;
  --stx-success: #4ade9c;
  --stx-success-bg: rgba(74,222,156,.14);
  --stx-warning: #ffc94d;
  --stx-warning-bg: rgba(255,201,77,.14);
  --stx-danger: #ff7a8a;
  --stx-danger-bg: rgba(255,122,138,.14);
  --stx-tint-1: rgba(77,225,255,.14);
  --stx-tint-2: rgba(139,108,255,.18);
  --stx-tint-3: rgba(255,201,77,.14);
  --stx-tint-4: rgba(74,222,156,.14);
  --stx-tint-5: rgba(255,122,138,.14);
  --stx-bar-track: #2c356b;
  --stx-bar-fill: #4de1ff;
  --stx-level-track: #2c356b;
  --stx-focus: #ffc94d;
  --stx-overlay: rgba(5,8,24,.84);
  --stx-reader: #fff;
  --stx-reader-ink: #13284b;
  --stx-radius-card: 18px;
  --stx-radius-btn: 999px;
  --stx-font-heading: "Sora",system-ui,sans-serif;
  --stx-font-body: "Nunito",system-ui,sans-serif;
}

/* Tokens: Playground */
.stx[data-stx="playground"] {
  --stx-page-bg:
    linear-gradient(to right, #e9e3d3 1px, transparent 1px),
    linear-gradient(to bottom, #e9e3d3 1px, transparent 1px),
    #fdfaf2;
  --stx-card: #ffffff;
  --stx-card-alpha: 1;
  --stx-card-border: #ede8dc;
  --stx-card-shadow: 0 4px 14px rgba(31,41,55,.06);
  --stx-ink: #1f2937;
  --stx-muted: #5b6472;
  --stx-line: #ede8dc;
  --stx-primary: #f5c518;
  --stx-primary-strong: #e5b50f;
  --stx-on-primary: #1b4d3e;
  --stx-primary-edge: #d4a307;
  --stx-accent: #1b4d3e;
  --stx-on-accent: #ffffff;
  --stx-success: #1b4d3e;
  --stx-success-bg: #d1fae5;
  --stx-warning: #b45309;
  --stx-warning-bg: #fef3c7;
  --stx-danger: #dc2626;
  --stx-danger-bg: #fee2e2;
  --stx-tint-1: #fed7aa;
  --stx-tint-2: #bfdbfe;
  --stx-tint-3: #fbcfe8;
  --stx-tint-4: #a7f3d0;
  --stx-tint-5: #fef08a;
  --stx-bar-track: #ede8dc;
  --stx-bar-fill: #1b4d3e;
  --stx-level-track: #ede8dc;
  --stx-focus: #1b4d3e;
  --stx-overlay: rgba(27,77,62,.6);
  --stx-reader: #ffffff;
  --stx-reader-ink: #1f2937;
  --stx-radius-card: 20px;
  --stx-radius-btn: 14px;
  --stx-font-heading: "Nunito",system-ui,sans-serif;
  --stx-font-body: "Nunito",system-ui,sans-serif;
  background-size: 24px 24px;
}

/* Tokens: Ocean Explorer */
.stx[data-stx="ocean"] {
  --stx-page-bg: #033649 url('/assets/ocean-sub-bg.jpg?v=1') no-repeat center top / cover;
  --stx-card: #ffffff;
  --stx-card-alpha: 1;
  --stx-card-border: rgba(255, 255, 255, 0.85);
  --stx-card-shadow: 0 10px 28px rgba(3, 40, 60, 0.14);
  --stx-ink: #063b59;
  --stx-muted: #52748a;
  --stx-line: #e0f2f5;
  --stx-primary: #18c7d4;
  --stx-primary-strong: #087fa5;
  --stx-on-primary: #ffffff;
  --stx-primary-edge: #087fa5;
  --stx-accent: #ff7185;
  --stx-on-accent: #ffffff;
  --stx-success: #16a68a;
  --stx-success-bg: #e6faf6;
  --stx-warning: #f59e0b;
  --stx-warning-bg: #fef9c3;
  --stx-danger: #ff7185;
  --stx-danger-bg: #ffe4e6;
  --stx-tint-1: #cbf5f3;
  --stx-tint-2: #ede9fe;
  --stx-tint-3: #fef3c7;
  --stx-tint-4: #d1fae5;
  --stx-tint-5: #ffe4e6;
  --stx-bar-track: #e0f2f5;
  --stx-bar-fill: #18c7d4;
  --stx-level-track: #e0f7f6;
  --stx-focus: #18c7d4;
  --stx-overlay: rgba(3, 40, 60, 0.75);
  --stx-reader: #ffffff;
  --stx-reader-ink: #063b59;
  --stx-radius-card: 22px;
  --stx-radius-btn: 999px;
  --stx-font-heading: "Nunito", system-ui, sans-serif;
  --stx-font-body: "Nunito", system-ui, sans-serif;
  background: #033649 url('/assets/ocean-sub-bg.jpg?v=1') no-repeat center top / cover;
}

.stx[data-stx="ocean"][data-stx-page="home"] {
  --stx-page-bg: #033649 url('/assets/ocean-bg.jpg?v=1') no-repeat center top / cover;
  background: #033649 url('/assets/ocean-bg.jpg?v=1') no-repeat center top / cover;
}

/* Tokens: Dino Discovery */
.stx[data-stx="dino"] {
  --stx-page-bg: #143a1e url('/assets/dino-sub-bg.jpg?v=1') no-repeat center top / cover;
  --stx-card: #ffffff;
  --stx-card-alpha: 1;
  --stx-card-border: rgba(255, 255, 255, 0.9);
  --stx-card-shadow: 0 10px 28px rgba(19, 56, 30, 0.12);
  --stx-ink: #13381e;
  --stx-muted: #4b6b52;
  --stx-line: #e3eedc;
  --stx-primary: #598218;
  --stx-primary-strong: #3f6212;
  --stx-on-primary: #ffffff;
  --stx-primary-edge: #3f6212;
  --stx-accent: #f59e0b;
  --stx-on-accent: #ffffff;
  --stx-success: #15803d;
  --stx-success-bg: #dcfce7;
  --stx-warning: #d97706;
  --stx-warning-bg: #fef3c7;
  --stx-danger: #dc2626;
  --stx-danger-bg: #fee2e2;
  --stx-tint-1: #dcfce7;
  --stx-tint-2: #fef3c7;
  --stx-tint-3: #ffedd5;
  --stx-tint-4: #d1fae5;
  --stx-tint-5: #fee2e2;
  --stx-bar-track: #e5f0dc;
  --stx-bar-fill: #598218;
  --stx-level-track: #e5f0dc;
  --stx-focus: #598218;
  --stx-overlay: rgba(19, 56, 30, 0.75);
  --stx-reader: #ffffff;
  --stx-reader-ink: #13381e;
  --stx-radius-card: 22px;
  --stx-radius-btn: 999px;
  --stx-font-heading: "Nunito", system-ui, sans-serif;
  --stx-font-body: "Nunito", system-ui, sans-serif;
  background: #143a1e url('/assets/dino-sub-bg.jpg?v=1') no-repeat center top / cover;
}

.stx[data-stx="dino"][data-stx-page="home"] {
  --stx-page-bg: #143a1e url('/assets/dino-bg.jpg?v=1') no-repeat center -45px / cover;
  background: #143a1e url('/assets/dino-bg.jpg?v=1') no-repeat center -45px / cover;
  background-position-y: -45px;
}

/* Frame */
.stx {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--stx-ink);
  background: var(--stx-page-bg);
  font-family: var(--stx-font-body);
  position: relative;
  isolation: isolate;
}

.stx.stx-classic-picker-scope {
  width: auto;
  height: auto;
  min-height: 0;
  display: inline-block;
  overflow: visible;
  color: var(--ink);
  background: transparent;
  font-family: var(--font-ui);
  position: relative;
  isolation: auto;
}

.stx[data-stx="space"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%,#fff 0 1px,transparent 2px),
    radial-gradient(circle at 70% 10%,#fff 0 1px,transparent 2px),
    radial-gradient(circle at 38% 54%,#9aa6d6 0 1px,transparent 2px),
    radial-gradient(circle at 90% 70%,#fff 0 1px,transparent 2px),
    radial-gradient(circle at 10% 90%,#9aa6d6 0 1px,transparent 2px);
  background-size:
    220px 220px,
    310px 310px,
    270px 270px,
    360px 360px,
    290px 290px;
}

.stx[data-stx="space"][data-stx-page="home"]::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  right: auto;
  left: 310px;
  top: 218px;
  z-index: -1;
  pointer-events: none;
  opacity: .45;
  background: radial-gradient(circle at 35% 30%,#5864a8,#252b61 65%);
  box-shadow: 0 0 0 10px rgba(77,225,255,.1),0 0 0 13px rgba(77,225,255,.22);
  transform: rotate(-18deg) scaleY(.55);
}

.stx[data-stx="ocean"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url('/assets/ocean-sub-bg.jpg?v=1');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.stx[data-stx="ocean"][data-stx-page="home"]::before {
  background-image: url('/assets/ocean-bg.jpg?v=1');
}

.stx[data-stx="ocean"] .stx-ocean-topbar,
.stx[data-stx="ocean"] .stx-topbar {
  position: relative;
  z-index: 100;
}

.stx[data-stx="ocean"] .stx-body {
  position: relative;
  z-index: 1;
}

.stx[data-stx="ocean"] .stx-account,
.stx[data-stx="ocean"] .stx-ocean-bell-wrapper {
  position: relative;
  z-index: 1000;
}

.stx[data-stx="ocean"] .stx-account-panel,
.stx[data-stx="ocean"] .stx-ocean-bell-wrapper [style*="position: absolute"] {
  z-index: 9999;
}

.stx[data-stx="dino"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url('/assets/dino-sub-bg.jpg?v=1');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.stx[data-stx="dino"][data-stx-page="home"]::before {
  background-image: url('/assets/dino-bg.jpg?v=1');
  background-position: center -45px;
  background-position-y: -45px;
}

.stx[data-stx="dino"] .stx-dino-topbar,
.stx[data-stx="dino"] .stx-topbar {
  position: relative;
  z-index: 100;
}

.stx[data-stx="dino"] .stx-body {
  position: relative;
  z-index: 1;
}

.stx[data-stx="dino"] .stx-account,
.stx[data-stx="dino"] .stx-dino-bell-wrapper {
  position: relative;
  z-index: 1000;
}

.stx[data-stx="dino"] .stx-account-panel,
.stx[data-stx="dino"] .stx-dino-bell-wrapper [style*="position: absolute"] {
  z-index: 9999;
}

.stx-body {
  flex: 1;
  min-height: 0;
  padding-bottom: 0;
  overflow: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  position: relative;
}

/* Top bar */
.stx-topbar {
  min-height: 72px;
  padding: 10px clamp(16px,3vw,48px);
  background: var(--stx-card);
  border-bottom: 1px solid var(--stx-line);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 20;
}

.stx-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stx-brand > b {
  font: 800 24px/1 var(--stx-font-heading);
}

.stx-brand-tile {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--stx-on-primary);
  background: var(--stx-primary-strong);
}

.stx-account {
  margin-left: auto;
  position: relative;
}

.stx-account-trigger {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--stx-line);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--stx-ink);
  background: transparent;
  cursor: pointer;
}

.stx-account-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(320px,calc(100vw - 24px));
  max-height: calc(100vh - 80px);
  padding: 16px;
  border: 1px solid var(--stx-line);
  border-radius: 16px;
  overflow: auto;
  color: var(--stx-ink);
  background: var(--stx-card);
  box-shadow: 0 16px 48px rgba(0,0,0,.24);
  z-index: 1000;
}

.stx-account-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stx-account-user > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stx-account-user b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stx-account-user small {
  color: var(--stx-muted);
}

.stx-account-stats {
  padding: 14px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stx-account-notifications {
  min-height: 48px;
  padding: 8px 0;
  border-top: 1px solid var(--stx-line);
  border-bottom: 1px solid var(--stx-line);
  font-weight: 800;
}

.stx-account-notifications > span {
  display: block;
  margin-bottom: 6px;
}

.stx-account-notifications > div {
  width: 100%;
  position: static!important;
}

.stx-account-notifications > div > div {
  position: static!important;
  width: 100%!important;
  max-height: 300px!important;
  margin-top: 8px;
}

.stx-account-themes {
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stx-account-themes > b {
  margin-bottom: 4px;
  color: var(--stx-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.stx-account-themes > button {
  width: 100%;
  min-height: 44px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 64px 1fr 20px;
  align-items: center;
  gap: 8px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.stx-account-themes > button:hover {
  background: var(--stx-tint-1);
}

.stx-account-signout {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--stx-danger);
  border-radius: 11px;
  color: var(--stx-danger);
  background: var(--stx-danger-bg);
  font: 800 14px/1 var(--stx-font-body);
  cursor: pointer;
}

/* Atoms */
.stx-card {
  background: var(--stx-card);
  border: 1px solid var(--stx-card-border);
  border-radius: var(--stx-radius-card);
  box-shadow: var(--stx-card-shadow);
  padding: 24px;
  min-width: 0;
}

.stx[data-stx="adventure"] .stx-card {
  background: rgba(255,255,255,var(--stx-card-alpha));
  border-color: rgba(255,255,255,.65);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  backdrop-filter: blur(8px) saturate(1.1);
}

.stx-level,
.stx-attendance {
  padding: 24px;
  border: 1px solid var(--stx-card-border);
  border-radius: var(--stx-radius-card);
  background: var(--stx-card);
  box-shadow: var(--stx-card-shadow);
}

.stx[data-stx="adventure"] .stx-level,
.stx[data-stx="adventure"] .stx-attendance {
  background: rgba(255,255,255,var(--stx-card-alpha));
}

@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  .stx[data-stx="adventure"] .stx-card {
    background: #fff;
  }
}

@media(prefers-reduced-transparency:reduce) {
  .stx[data-stx="adventure"] .stx-card {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.stx-card h2 {
  font: 800 20px/1.25 var(--stx-font-heading);
  margin: 0 0 18px;
  color: var(--stx-ink);
}

.stx-card h2 small {
  color: var(--stx-muted);
  font: 600 14px/1 var(--stx-font-body);
}

.stx-btn {
  min-height: 44px;
  border-radius: var(--stx-radius-btn);
  padding: 9px 18px;
  border: 1px solid transparent;
  font: 800 15px/1 var(--stx-font-body);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform .15s,filter .15s;
}

.stx-btn-primary {
  color: var(--stx-on-primary);
  background: var(--stx-primary-strong);
  box-shadow: 0 3px 0 var(--stx-primary-edge);
}

.stx-btn-secondary {
  color: var(--stx-ink);
  background: transparent;
  border-color: var(--stx-line);
}

.stx-btn-ghost {
  color: var(--stx-ink);
  background: transparent;
}

.stx-btn:hover,
.stx-theme-trigger:hover,
.stx-nav button:hover,
.stx-quick button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.stx-btn:active,
.stx-theme-trigger:active,
.stx-nav button:active,
.stx-quick button:active {
  transform: translateY(1px);
}

.stx button:focus-visible,
.stx a:focus-visible,
.stx-theme-picker-classic button:focus-visible {
  outline: 3px solid var(--stx-focus,#0b6a61);
  outline-offset: 3px;
}

.stx-disabled {
  opacity: .55;
  cursor: not-allowed;
}

.stx-chip,
.stx-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.stx-chip {
  background: var(--stx-tint-1);
  color: var(--stx-ink);
}

.stx-pill-success {
  background: var(--stx-success-bg);
  color: var(--stx-success);
}

.stx-pill-warning {
  background: var(--stx-warning-bg);
  color: var(--stx-warning);
}

.stx-pill-danger {
  background: var(--stx-danger-bg);
  color: var(--stx-danger);
}

.stx-icon-tile {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: var(--stx-primary);
  flex: 0 0 auto;
}

.stx-tint-1 {
  background: var(--stx-tint-1);
}

.stx-tint-2 {
  background: var(--stx-tint-2);
}

.stx-tint-3 {
  background: var(--stx-tint-3);
}

.stx-tint-4 {
  background: var(--stx-tint-4);
}

.stx-tint-5 {
  background: var(--stx-tint-5);
}

.stx-progress {
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--stx-bar-track);
  flex: 1;
}

.stx-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--stx-bar-fill);
}

.stx[data-stx="space"] .stx-progress i {
  box-shadow: 0 0 12px rgba(77,225,255,.6);
}

.stx-page-title {
  margin: 0;
  color: var(--stx-ink);
  font: 900 clamp(26px,3vw,34px)/1.15 var(--stx-font-heading);
  letter-spacing: 0;
}

.stx[data-stx="space"] .stx-page-title {
  font-weight: 700;
  letter-spacing: 0;
}

.stx-empty {
  color: var(--stx-muted);
  padding: 16px 0;
  font-size: 14px;
}

.stx-skeleton {
  display: inline-block;
  min-width: 90px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(90deg,var(--stx-line),var(--stx-card),var(--stx-line));
  background-size: 200% 100%;
  animation: stx-shimmer 1.4s infinite;
}

.stx-chip-skeleton {
  width: 110px;
}

@keyframes stx-shimmer {
  to {
    background-position: -200% 0;
  }
}

.stx .stx-theme-picker {
  position: relative;
  font-family: var(--stx-font-body,"Nunito",system-ui,sans-serif);
  color: var(--stx-ink,#13284b);
}

.stx .stx-theme-trigger {
  min-height: 44px;
  border: 1px solid var(--stx-line,#d9e0e8);
  border-radius: var(--stx-radius-btn,11px);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: inherit;
  background: transparent;
  font: 700 13px/1 inherit;
  cursor: pointer;
}

.stx .stx-theme-picker-classic .stx-theme-trigger {
  min-height: 34px;
  border-color: var(--rule);
  color: var(--ink);
  font-family: var(--font-ui);
}

.stx .stx-theme-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(320px,calc(100vw - 24px));
  padding: 8px;
  border: 1px solid var(--stx-line,#d9e0e8);
  border-radius: 16px;
  background: var(--stx-card,#fff);
  box-shadow: 0 16px 48px rgba(0,0,0,.24);
  z-index: 1000;
}

.stx .stx-theme-option {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 11px;
  padding: 9px;
  display: grid;
  grid-template-columns: 52px 1fr 20px;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.stx .stx-theme-option:hover,
.stx .stx-theme-option:focus-visible {
  background: var(--stx-tint-1,#edf7f5);
}

.stx .stx-theme-option span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stx .stx-theme-option small {
  color: var(--stx-muted,#5f6f86);
  font-size: 11px;
}

.stx .stx-theme-swatches {
  display: flex;
}

.stx .stx-theme-swatches i {
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 50%;
  margin-left: -8px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.15);
}

.stx .stx-theme-swatches i:first-child {
  margin-left: 0;
}

/* Home */
.stx-page {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(16px,3vw,48px) 120px;
  position: relative;
  z-index: 1;
}

.stx-page:not(.stx-home),
.stx-courses,
.stx-progress-page {
  padding-top: clamp(24px, 3vw, 36px);
}

.stx-home {
  position: relative;
}

.stx-hero {
  min-height: 360px;
  margin: 0 calc(clamp(16px,3vw,48px) * -1) 0;
  padding: 20px clamp(16px,3vw,48px) 24px;
  display: grid;
  grid-template-columns: minmax(280px,.9fr) minmax(420px,1.1fr);
  grid-template-rows: auto auto;
  gap: 20px 42px;
  align-content: start;
  position: relative;
}

.stx[data-stx="adventure"] .stx-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url('/assets/adventure-bg.jpg?v=1');
  background-position: center clamp(-90px,calc((1440px - 100vw) * .29 - 90px),50px);
  background-size: 100% auto;
  background-repeat: no-repeat;
}

.stx[data-stx="adventure"] .stx-level,
.stx[data-stx="adventure"] .stx-hero-stats {
  width: calc(100% - 120px);
}

.stx[data-stx="adventure"] .stx-hero-stats {
  gap: 10px;
}

.stx[data-stx="adventure"] .stx-hero-stats .stx-card {
  padding: 10px 8px;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 2px 6px;
}

.stx[data-stx="adventure"] .stx-hero-stats .stx-icon-tile {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.stx[data-stx="adventure"] .stx-hero-stats b,
.stx[data-stx="playground"] .stx-hero-stats b {
  font-size: clamp(16px, 1.6vw, 22px);
  text-overflow: clip;
  overflow: visible;
}

.stx-hero-greeting {
  grid-row: 1/3;
  align-self: start;
  position: relative;
}

.stx-level {
  align-self: start;
  position: relative;
  z-index: 1;
}

.stx-level h2 {
  font-size: 30px;
}

.stx-level-line {
  display: flex;
  align-items: center;
  gap: 18px;
}

.stx-level-line > b {
  white-space: nowrap;
  font-size: 17px;
}

.stx-level .stx-progress {
  background: var(--stx-level-track);
}

.stx[data-stx="adventure"] .stx-level .stx-progress {
  box-shadow: inset 0 0 0 1px rgba(19,155,143,.28);
}

.stx[data-stx="space"] .stx-level .stx-progress {
  box-shadow: inset 0 0 0 1px rgba(77,225,255,.18);
}

.stx-hero-stats {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 16px;
  position: relative;
  z-index: 1;
}

.stx-hero-stats .stx-card {
  padding: 14px;
  display: grid;
  grid-template-columns: 44px minmax(0,1fr);
  grid-template-rows: auto auto;
  gap: 4px 12px;
  align-items: center;
  overflow: hidden;
}

.stx-hero-stats .stx-icon-tile {
  grid-row: 1/3;
  width: 44px;
  height: 44px;
  border-radius: 13px;
}

.stx-hero-stats b {
  min-width: 0;
  overflow: hidden;
  font-size: clamp(22px,2.2vw,30px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stx-hero-stats span:last-child {
  min-width: 0;
  overflow: hidden;
  color: var(--stx-muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stx-astronaut {
  position: absolute;
  top: 112px;
  left: 80px;
  width: 180px;
  height: 198px;
  margin: 0;
  display: block;
  filter: drop-shadow(0 12px 24px rgba(77,225,255,.2));
}

.stx-home-top {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 18px;
  margin-top: 0;
  align-items: stretch;
}

.stx-home-top > .stx-card {
  height: 100%;
}

.stx-home-top > .stx-card:last-child {
  display: flex;
  flex-direction: column;
}

.stx-class-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.stx-class-info {
  flex: 1;
  min-width: 0;
}

.stx-class-info h3 {
  margin: 0 0 4px;
  font: 800 23px/1.2 var(--stx-font-heading);
  text-wrap: balance;
}

.stx-class-info h3 > span:first-child {
  display: inline;
}

.stx-class-info h3 .stx-chip {
  margin: 4px 0 0 8px;
  vertical-align: middle;
}

.stx-class-info p {
  margin: 2px 0;
  color: var(--stx-muted);
  font-size: 14px;
}

.stx-class-info .stx-chip {
  margin-top: 6px;
}

.stx-class-action {
  width: 150px;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  text-align: center;
}

.stx-class-action small {
  color: var(--stx-muted);
  font-size: 11px;
  line-height: 1.25;
}

.stx-btn.stx-disabled,
.stx-btn.stx-disabled:hover {
  border-color: var(--stx-line);
  color: var(--stx-muted);
  background: var(--stx-bar-track);
  box-shadow: none;
  cursor: not-allowed;
  filter: none;
  transform: none;
}

.stx-quick {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 8px;
  align-items: center;
}

.stx-quick button {
  min-width: 0;
  min-height: 112px;
  border: 0;
  background: transparent;
  color: var(--stx-ink);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  font: 700 14px/1 var(--stx-font-body);
  transition: transform .15s,filter .15s;
}

.stx-home-lower {
  display: grid;
  grid-template-columns: 1.15fr 1.05fr .95fr;
  gap: 18px;
  margin-top: 18px;
  align-items: stretch;
}

.stx-attendance {
  width: 100%;
  overflow: hidden;
}

.stx-home-lower > .stx-card {
  height: 100%;
}

.stx-attendance-summary {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stx-attendance-summary > div {
  min-width: 0;
  flex: 1;
}

.stx-donut {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--stx-bar-fill) var(--stx-donut),var(--stx-bar-track) 0);
  position: relative;
  flex: 0 0 auto;
}

.stx-donut::after {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: var(--stx-card);
}

.stx-donut span {
  position: relative;
  z-index: 1;
  font: 900 22px/1 var(--stx-font-heading);
}

.stx-attendance-record {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  white-space: nowrap;
}

.stx-attendance-record .stx-pill {
  font-size: 11.5px;
  padding: 2px 8px;
  min-height: 24px;
  gap: 4px;
}

.stx-status-icon {
  width: 15px;
  height: 15px;
  display: inline-grid;
  place-items: center;
}

.stx-attendance > p {
  color: var(--stx-muted);
  font-weight: 700;
  margin: 22px 0 0;
}

.stx-leaderboard {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stx-batch-chip {
  margin: -10px 0 12px;
  color: var(--stx-muted);
}

.stx-leaderboard > div {
  min-height: 48px;
  padding: 5px 9px;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 24px 34px 1fr auto;
  gap: 9px;
  align-items: center;
}

.stx-leaderboard > div > span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--stx-line);
  font-weight: 900;
}

.stx-leaderboard > div:nth-child(1) > span {
  background: var(--stx-accent);
  color: var(--stx-on-accent);
}

.stx-leaderboard .stx-you {
  background: var(--stx-tint-1);
}

.stx-leaderboard small {
  color: var(--stx-muted);
}

.stx-leaderboard strong {
  font-size: 14px;
}

.stx-my-stats {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 12px;
  align-items: start;
}

.stx-my-stats > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.stx-my-stats b {
  font: 900 28px/1 var(--stx-font-heading);
}

.stx-my-stats span:last-child {
  color: var(--stx-muted);
  font-size: 13px;
}

/* Dock */
.stx-nav-top {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.stx-nav-top button {
  min-height: 48px;
  padding: 4px 8px;
  border: 0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--stx-muted);
  background: transparent;
  font-family: var(--stx-font-body);
  cursor: pointer;
}

.stx-nav-top button > span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.stx-nav-top button > b {
  font-size: 12px;
  white-space: nowrap;
}

.stx-nav-top .stx-nav-active {
  color: var(--stx-ink);
}

.stx-nav-top .stx-nav-active > span {
  color: var(--stx-on-accent);
  background: var(--stx-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb,var(--stx-accent) 26%,transparent);
}

.stx-nav-dock {
  display: none;
  position: fixed;
  left: clamp(12px,3vw,48px);
  right: clamp(12px,3vw,48px);
  bottom: 14px;
  min-height: 92px;
  padding: 8px 82px 8px 24px;
  border: 1px solid var(--stx-card-border);
  border-radius: 28px;
  box-shadow: 0 10px 35px rgba(0,0,0,.18);
  background: var(--stx-card);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: space-around;
  z-index: 900;
}

.stx-nav-dock button {
  min-width: 72px;
  min-height: 68px;
  border: 0;
  background: transparent;
  color: var(--stx-muted);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  font-family: var(--stx-font-body);
  transition: transform .15s,filter .15s;
}

.stx-nav-dock button > span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.stx-nav-dock button > b {
  font-size: 13px;
}

.stx-nav-dock .stx-nav-active {
  color: var(--stx-ink);
}

.stx-nav-dock .stx-nav-active > span {
  background: var(--stx-accent);
  color: var(--stx-on-accent);
  box-shadow: 0 0 0 5px color-mix(in srgb,var(--stx-accent) 26%,transparent);
}

/* Playground Sidebar Shell */
.stxpg-shell {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stxpg-topbar {
  min-height: 60px;
  padding: 8px clamp(16px, 2.5vw, 36px);
  background: var(--stx-card);
  border-bottom: 1px solid var(--stx-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 20;
}

.stxpg-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stxpg-topbar-stats {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stxpg-stat-chip {
  font-weight: 700;
  font-size: 13px;
  gap: 6px;
}

.stxpg-bell-wrapper {
  display: flex;
  align-items: center;
}

.stxpg-account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--stx-radius-btn);
  color: var(--stx-ink);
  font-family: var(--stx-font-body);
  font-weight: 700;
  transition: background .12s;
}

.stxpg-account-trigger:hover {
  background: var(--stx-line);
}

.stxpg-account-trigger:focus-visible {
  outline: 2px solid var(--stx-focus);
  outline-offset: 2px;
}

.stxpg-account-name {
  font-size: 14px;
}

.stxpg-account-chevron {
  font-size: 12px;
  color: var(--stx-muted);
}

.stxpg-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.stxpg-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--stx-card);
  border-right: 1px solid var(--stx-line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 12px;
  overflow-y: auto;
  z-index: 10;
}

.stxpg-sidebar-nav {
  display: flex;
  flex-direction: column;
}

.stxpg-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stxpg-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 0;
  border-radius: var(--stx-radius-btn);
  background: transparent;
  color: var(--stx-ink);
  font-family: var(--stx-font-body);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: background .12s, color .12s;
}

.stxpg-nav-item:hover {
  background: color-mix(in srgb, var(--stx-primary) 18%, transparent);
}

.stxpg-nav-item.stxpg-nav-active {
  background: var(--stx-primary) !important;
  color: var(--stx-on-primary) !important;
  font-weight: 800;
}

.stxpg-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.stxpg-nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stxpg-nav-item:focus-visible {
  outline: 2px solid var(--stx-focus);
  outline-offset: 2px;
}

.stxpg-sidebar-footer {
  padding-top: 12px;
  border-top: 1px solid var(--stx-line);
}

.stxpg-sidebar-profile-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 0;
  border-radius: var(--stx-radius-btn);
  background: transparent;
  color: var(--stx-muted);
  font-family: var(--stx-font-body);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: background .12s, color .12s;
  margin-bottom: 4px;
}

.stxpg-sidebar-profile-btn:hover {
  background: color-mix(in srgb, var(--stx-primary) 18%, transparent);
  color: var(--stx-ink);
}

.stxpg-sidebar-profile-btn.stxpg-nav-active {
  background: var(--stx-primary) !important;
  color: var(--stx-on-primary) !important;
}

.stxpg-sidebar-profile-btn:focus-visible {
  outline: 2px solid var(--stx-focus);
  outline-offset: 2px;
}

.stxpg-sidebar-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 0;
  border-radius: var(--stx-radius-btn);
  background: transparent;
  color: var(--stx-muted);
  font-family: var(--stx-font-body);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: background .12s, color .12s;
}

.stxpg-sidebar-logout:hover {
  color: var(--stx-danger);
  background: var(--stx-danger-bg);
}

.stxpg-sidebar-logout:focus-visible {
  outline: 2px solid var(--stx-danger);
  outline-offset: 2px;
}

/* Account Panel Actions */
.stx-account-user-action {
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  padding: 6px;
  border-radius: 12px;
  transition: background .15s ease;
}

.stx-account-user-action:hover {
  background: var(--stx-line);
}

.stx-account-profile-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--stx-line);
  border-radius: 12px;
  background: transparent;
  color: var(--stx-ink);
  font-family: var(--stx-font-ui);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
  margin-top: 6px;
  margin-bottom: 6px;
}

.stx-account-profile-btn:hover {
  background: var(--stx-line);
  border-color: var(--stx-muted);
}

/* Playground Hero & Greeting Layout */
.stx[data-stx="playground"] .stx-hero {
  min-height: auto;
  margin: clamp(20px, 2.5vw, 32px) 0 24px 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  grid-template-rows: auto auto;
  gap: 18px;
  align-items: stretch;
}

.stx[data-stx="playground"] .stx-hero-greeting {
  background: var(--stx-accent);
  border-radius: var(--stx-radius-card);
  box-shadow: 0 8px 24px rgba(27, 77, 62, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  padding: 0;
  display: flex;
  align-items: stretch;
}

.stxpg-greeting-card {
  width: 100%;
  padding: 24px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
}

.stxpg-greeting-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.stxpg-greeting-badge {
  display: inline-block;
  font-family: var(--stx-font-ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--stx-accent);
  background: var(--stx-primary);
  padding: 3px 10px;
  border-radius: 999px;
  width: fit-content;
}

.stx[data-stx="playground"] .stxpg-greeting-title {
  color: var(--stx-on-accent) !important;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.15;
  margin: 4px 0 0 0;
}

.stxpg-greeting-sub {
  margin: 4px 0 0 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

.stxpg-greeting-mascot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stxpg-robot {
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.stxpg-stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  scrollbar-gutter: stable;
}

/* Playground responsive adaptations */
@media(max-width:820px) {
  .stx[data-stx="playground"] .stxpg-sidebar {
    display: none;
  }

  .stx[data-stx="playground"] .stxpg-stage {
    padding-bottom: 116px;
  }

  .stx[data-stx="playground"] .stxpg-topbar {
    padding: 8px 12px;
    min-height: 56px;
  }

  .stxpg-chip-text {
    display: none;
  }

  .stxpg-account-name,
  .stxpg-account-chevron {
    display: none;
  }
}

@media(max-width:360px) {
  .stx[data-stx="playground"] .stxpg-topbar {
    padding: 6px 8px;
    gap: 6px;
  }

  .stxpg-topbar-actions {
    gap: 6px;
  }
}

/* Ocean Explorer Theme Styles */
.stx[data-stx="ocean"] .stx-ocean-topbar {
  margin: 14px clamp(16px, 3vw, 40px) 0;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 32px rgba(2, 44, 68, 0.18);
  min-height: 60px;
  padding: 6px 20px;
  justify-content: space-between;
}

.stx[data-stx="ocean"] .stx-ocean-brand-tile {
  background: linear-gradient(135deg, #18c7d4 0%, #087fa5 100%);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(24, 199, 212, 0.35);
}

.stx[data-stx="ocean"] .stx-brand > b {
  color: #063b59;
  font-size: 21px;
}

.stx[data-stx="ocean"] .stx-ocean-chip {
  background: #e6fafa;
  color: #087fa5;
  font-weight: 800;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 9999px;
  letter-spacing: 0.05em;
}

.stx[data-stx="ocean"] .stx-ocean-topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stx[data-stx="ocean"] .stx-ocean-bell-wrapper {
  display: flex;
  align-items: center;
}

.stx[data-stx="ocean"] .stx-ocean-topbar .stx-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
}

.stx[data-stx="ocean"] .stx-ocean-topbar .stx-nav button {
  border-radius: 9999px;
  padding: 6px 14px;
  color: #0b2b3e;
  font-weight: 600;
  font-size: 14px;
  background: transparent;
  border: none;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stx[data-stx="ocean"] .stx-ocean-topbar .stx-nav button:hover {
  background: #e6fafa;
  color: #087fa5;
}

.stx[data-stx="ocean"] .stx-ocean-topbar .stx-nav button.stx-nav-active {
  background: linear-gradient(135deg, #18c7d4 0%, #0891b2 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(24, 199, 212, 0.4);
  padding: 6px 16px 6px 8px;
}

.stx[data-stx="ocean"] .stx-ocean-topbar .stx-nav button.stx-nav-active span {
  background: #ff7185;
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(255, 113, 133, 0.4);
}

.stx[data-stx="ocean"] .stx-ocean-topbar .stx-nav button.stx-nav-active span svg {
  stroke: #ffffff;
  width: 16px;
  height: 16px;
}

.stx[data-stx="ocean"] .stxpg-account-trigger {
  border-radius: 9999px;
  padding: 4px;
  gap: 4px;
}

.stx[data-stx="ocean"] .stxpg-account-name {
  display: none;
}

.stx[data-stx="ocean"] .stx-hero {
  min-height: auto;
  padding-top: 10px;
  padding-bottom: 12px;
  grid-template-columns: minmax(360px, 1.25fr) minmax(380px, 0.95fr);
  gap: 16px 36px;
  align-items: start;
}

.stx[data-stx="ocean"] .stx-hero-greeting {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  padding: 6px 0 0 2px;
  max-width: 440px;
}

.stx[data-stx="ocean"] .stx-ocean-greeting {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.stx[data-stx="ocean"] .stx-ocean-greeting-content {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
  width: fit-content;
  padding: 10px 18px 12px 14px;
  border-radius: 20px;
  background: radial-gradient(ellipse 120% 120% at 30% 40%, rgba(2, 38, 58, 0.42) 0%, rgba(3, 44, 66, 0.22) 70%, transparent 100%);
  backdrop-filter: blur(2px);
}

.stx[data-stx="ocean"] .stx-ocean-greeting-title {
  color: #ffffff;
  font-size: clamp(34px, 3.4vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  text-shadow:
    0 2px 4px rgba(1, 22, 35, 0.95),
    0 4px 14px rgba(1, 22, 35, 0.85),
    0 1px 2px rgba(1, 22, 35, 1),
    0 0 22px rgba(3, 50, 75, 0.65);
  margin: 0;
  letter-spacing: -0.01em;
}

.stx[data-stx="ocean"] .stx-ocean-greeting-sub {
  color: #e0faff;
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 800;
  letter-spacing: 0.03em;
  margin: 0;
  text-shadow:
    0 1px 3px rgba(1, 22, 35, 0.95),
    0 3px 10px rgba(1, 22, 35, 0.85);
}

.stx[data-stx="ocean"] .stx-ocean-mascot-group {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  position: relative;
  margin-top: 6px;
}

.stx[data-stx="ocean"] .stx-ocean-fish-wrap {
  animation: stxOceanFishSwim 4s ease-in-out infinite alternate;
  flex-shrink: 0;
}

.stx[data-stx="ocean"] .stx-ocean-turtle-wrap {
  animation: stxOceanTurtleFloat 5.5s ease-in-out infinite alternate;
  flex-shrink: 0;
}

.stx[data-stx="ocean"] .stx-level {
  margin-top: 28px;
  border-radius: 22px;
  background: #ffffff;
  padding: 18px 24px;
  box-shadow: 0 10px 28px rgba(3, 40, 60, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.stx[data-stx="ocean"] .stx-level h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #063b59;
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 14px 0;
}

.stx[data-stx="ocean"] .stx-ocean-coral-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stx[data-stx="ocean"] .stx-level .stx-progress {
  height: 14px;
  border-radius: 9999px;
  background: #e0f7f6;
}

.stx[data-stx="ocean"] .stx-level .stx-progress i {
  border-radius: 9999px;
  background: linear-gradient(90deg, #18c7d4 0%, #36d6c0 100%);
  box-shadow: 0 2px 8px rgba(24, 199, 212, 0.4);
}

.stx[data-stx="ocean"] .stx-level-line > b {
  color: #063b59;
  font-weight: 800;
  font-size: 15px;
}

.stx[data-stx="ocean"] .stx-hero-stats .stx-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 12px 18px;
  box-shadow: 0 8px 22px rgba(3, 40, 60, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.stx[data-stx="ocean"] .stx-hero-stats b {
  color: #063b59;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 800;
}

.stx[data-stx="ocean"] .stx-hero-stats span:last-child {
  color: #52748a;
  font-size: 13px;
  font-weight: 600;
}

.stx[data-stx="ocean"] .stx-page {
  padding-bottom: 40px;
}

.stx[data-stx="ocean"] .stx-home-top {
  margin-top: clamp(52px, 4.8vw, 72px);
}

.stx[data-stx="ocean"] .stx-home-top .stx-card {
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(3, 40, 60, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.85);
  padding: 22px 26px;
}

.stx[data-stx="ocean"] .stx-home-top .stx-card h2 {
  color: #063b59;
  font-size: 21px;
  font-weight: 800;
  margin: 0 0 16px 0;
}

.stx[data-stx="ocean"] .stx-home-lower .stx-card {
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(3, 40, 60, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.85);
  padding: 22px 26px;
}

.stx[data-stx="ocean"] .stx-home-lower .stx-card h2 {
  color: #063b59;
  font-size: 21px;
  font-weight: 800;
  margin: 0 0 16px 0;
}

.stx[data-stx="ocean"] .stx-class-row .stx-icon-tile {
  background: #d5f7f6;
  color: #087fa5;
  border-radius: 16px;
  width: 50px;
  height: 50px;
}

.stx[data-stx="ocean"] .stx-class-info h3 span {
  color: #063b59;
  font-weight: 800;
  font-size: 18px;
}

.stx[data-stx="ocean"] .stx-class-info h3 .stx-chip {
  background: #d9f5f5;
  color: #087fa5;
  font-weight: 700;
  border-radius: 9999px;
}

.stx[data-stx="ocean"] .stx-class-info p {
  color: #557086;
  font-size: 14px;
  margin: 2px 0;
}

.stx[data-stx="ocean"] .stx-class-info .stx-chip {
  background: #ffe4e6;
  color: #e11d48;
  font-weight: 700;
  border-radius: 9999px;
}

.stx[data-stx="ocean"] .stx-class-row .stx-btn-primary {
  background: #ff7185;
  color: #ffffff;
  border-radius: 9999px;
  font-weight: 700;
  padding: 10px 26px;
  border: none;
  box-shadow: 0 4px 14px rgba(255, 113, 133, 0.35);
  transition: all 0.15s ease;
}

.stx[data-stx="ocean"] .stx-class-row .stx-btn-primary:hover {
  background: #fa526c;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 113, 133, 0.45);
}

.stx[data-stx="ocean"] .stx-quick button {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px;
  border-radius: 16px;
  transition: transform 0.15s ease;
}

.stx[data-stx="ocean"] .stx-quick button:hover {
  transform: translateY(-2px);
}

.stx[data-stx="ocean"] .stx-quick button b {
  color: #063b59;
  font-weight: 700;
  font-size: 13px;
}

.stx[data-stx="ocean"] .stx-quick button .stx-icon-tile {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
}

.stx[data-stx="ocean"] .stx-quick button:nth-child(1) .stx-icon-tile {
  background: #cbf5f3;
  color: #087fa5;
}

.stx[data-stx="ocean"] .stx-quick button:nth-child(2) .stx-icon-tile {
  background: #ede9fe;
  color: #7c3aed;
}

.stx[data-stx="ocean"] .stx-quick button:nth-child(3) .stx-icon-tile {
  background: #fef3c7;
  color: #d97706;
}

.stx[data-stx="ocean"] .stx-quick button:nth-child(4) .stx-icon-tile {
  background: #d1fae5;
  color: #059669;
}

/* Courses & Progress Subpages Styling */
.stx[data-stx="ocean"] .stx-page-title {
  color: #ffffff;
  font-weight: 800;
  text-shadow: 0 3px 14px rgba(3, 40, 60, 0.45);
}

.stx[data-stx="ocean"] .stx-page-subtitle {
  color: #cffafe;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(3, 40, 60, 0.4);
}

.stx[data-stx="ocean"] .stx-card .stx-page-title,
.stx[data-stx="ocean"] .stx-course-header .stx-page-title,
.stx[data-stx="ocean"] .stx-courses .stx-page-title {
  color: #063b59;
  font-weight: 800;
  text-shadow: none;
}

.stx[data-stx="ocean"] .stx-card .stx-page-subtitle,
.stx[data-stx="ocean"] .stx-course-header .stx-page-subtitle,
.stx[data-stx="ocean"] .stx-courses .stx-page-subtitle {
  color: #4b6b80;
  font-weight: 600;
  text-shadow: none;
}

.stx[data-stx="ocean"] .stx-course-card,
.stx[data-stx="ocean"] .stx-unit-card,
.stx[data-stx="ocean"] .stx-courses .stx-card,
.stx[data-stx="ocean"] .stx-progress-page .stx-card,
.stx[data-stx="ocean"] .stx-xp-card {
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(3, 40, 60, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.85);
  color: #063b59;
}

.stx[data-stx="ocean"] .stx-progress-unit {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e0f2f5;
  padding: 16px;
}

/* Ambient Underwater Decorations */
.stx[data-stx="ocean"] .stx-ocean-decorations {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.stx[data-stx="ocean"] .stx-ocean-bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 32%, rgba(255, 255, 255, 0.85) 0%, rgba(56, 220, 245, 0.45) 35%, rgba(6, 182, 212, 0.15) 70%, transparent 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.6), 0 0 6px rgba(56, 220, 245, 0.3);
  pointer-events: none;
  animation: stxOceanBubbleRise linear infinite;
}

.stx[data-stx="ocean"] .stx-bubble-1 { width: 14px; height: 14px; left: 8%; bottom: -20px; animation-duration: 9s; animation-delay: 0s; }
.stx[data-stx="ocean"] .stx-bubble-2 { width: 22px; height: 22px; left: 20%; bottom: -30px; animation-duration: 12s; animation-delay: 2s; }
.stx[data-stx="ocean"] .stx-bubble-3 { width: 10px; height: 10px; left: 32%; bottom: -15px; animation-duration: 8s; animation-delay: 4s; }
.stx[data-stx="ocean"] .stx-bubble-4 { width: 26px; height: 26px; left: 45%; bottom: -35px; animation-duration: 14s; animation-delay: 1s; }
.stx[data-stx="ocean"] .stx-bubble-5 { width: 16px; height: 16px; left: 58%; bottom: -25px; animation-duration: 11s; animation-delay: 3s; }
.stx[data-stx="ocean"] .stx-bubble-6 { width: 12px; height: 12px; left: 70%; bottom: -18px; animation-duration: 10s; animation-delay: 5s; }
.stx[data-stx="ocean"] .stx-bubble-7 { width: 20px; height: 20px; left: 82%; bottom: -30px; animation-duration: 13s; animation-delay: 2.5s; }
.stx[data-stx="ocean"] .stx-bubble-8 { width: 8px; height: 8px; left: 91%; bottom: -12px; animation-duration: 7s; animation-delay: 1.5s; }
.stx[data-stx="ocean"] .stx-bubble-9 { width: 18px; height: 18px; left: 14%; bottom: -25px; animation-duration: 10.5s; animation-delay: 6s; }
.stx[data-stx="ocean"] .stx-bubble-10 { width: 24px; height: 24px; left: 40%; bottom: -32px; animation-duration: 13.5s; animation-delay: 7s; }

@keyframes stxOceanFishSwim {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-3deg); }
  100% { transform: translateY(4px) rotate(2deg); }
}

@keyframes stxOceanTurtleFloat {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
  100% { transform: translateY(6px) rotate(-2deg); }
}

@keyframes stxOceanBubbleRise {
  0% { transform: translateY(100vh) scale(0.8); opacity: 0; }
  15% { opacity: 0.7; }
  85% { opacity: 0.7; }
  100% { transform: translateY(-60px) scale(1.1); opacity: 0; }
}

@media(max-width:960px) {
  .stx[data-stx="ocean"] .stx-hero {
    grid-template-columns: 1fr;
  }
}

@media(max-width:820px) {
  .stx[data-stx="ocean"] .stx-ocean-topbar {
    margin: 8px 12px 0;
    padding: 6px 14px;
  }
  .stx[data-stx="ocean"] .stx-ocean-topbar .stx-nav {
    display: none;
  }
  .stx[data-stx="ocean"] .stx-ocean-greeting {
    flex-direction: column;
    align-items: flex-start;
  }
  .stx[data-stx="ocean"] .stx-ocean-mascot-group {
    justify-content: center;
    width: 100%;
  }
}

@media(max-width:480px) {
  .stx[data-stx="ocean"] .stx-ocean-turtle {
    width: 190px;
    height: 155px;
  }
  .stx[data-stx="ocean"] .stx-ocean-fish {
    width: 80px;
    height: 55px;
  }
}

/* Dino Discovery Theme Styles */
.stx[data-stx="dino"] .stx-dino-topbar {
  margin: 14px clamp(16px, 3vw, 40px) 0;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 32px rgba(19, 56, 30, 0.15);
  min-height: 60px;
  padding: 6px 20px;
  justify-content: space-between;
}

.stx[data-stx="dino"] .stx-dino-brand-tile {
  background: linear-gradient(135deg, #84cc16 0%, #4d7c0f 100%);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(101, 163, 13, 0.35);
}

.stx[data-stx="dino"] .stx-brand > b {
  color: #13381e;
  font-size: 21px;
}

.stx[data-stx="dino"] .stx-dino-chip {
  background: #eef8ea;
  color: #4d7c0f;
  font-weight: 800;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 9999px;
  letter-spacing: 0.05em;
}

.stx[data-stx="dino"] .stx-dino-topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stx[data-stx="dino"] .stx-dino-bell-wrapper {
  display: flex;
  align-items: center;
}

.stx[data-stx="dino"] .stx-dino-topbar .stx-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
}

.stx[data-stx="dino"] .stx-dino-topbar .stx-nav button {
  border-radius: 9999px;
  padding: 6px 14px;
  color: #1f4927;
  font-weight: 600;
  font-size: 14px;
  background: transparent;
  border: none;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stx[data-stx="dino"] .stx-dino-topbar .stx-nav button:hover {
  background: #eef8ea;
  color: #3f6212;
}

.stx[data-stx="dino"] .stx-dino-topbar .stx-nav button.stx-nav-active {
  background: linear-gradient(135deg, #65a30d 0%, #3f6212 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(101, 163, 13, 0.35);
  padding: 6px 16px 6px 8px;
}

.stx[data-stx="dino"] .stx-dino-topbar .stx-nav button.stx-nav-active span {
  background: #f59e0b;
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

.stx[data-stx="dino"] .stx-dino-topbar .stx-nav button.stx-nav-active span svg {
  stroke: #ffffff;
  width: 16px;
  height: 16px;
}

.stx[data-stx="dino"] .stxpg-account-trigger {
  border-radius: 9999px;
  padding: 4px;
  gap: 4px;
}

.stx[data-stx="dino"] .stxpg-account-name {
  display: none;
}

.stx[data-stx="dino"] .stx-hero {
  min-height: auto;
  padding-top: 10px;
  padding-bottom: 12px;
  grid-template-columns: minmax(360px, 1.25fr) minmax(380px, 0.95fr);
  gap: 16px 36px;
  align-items: start;
}

.stx[data-stx="dino"] .stx-hero-greeting {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  padding: 6px 0 0 2px;
  max-width: 440px;
}

.stx[data-stx="dino"] .stx-dino-greeting {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.stx[data-stx="dino"] .stx-dino-greeting-content {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
  width: fit-content;
  padding: 10px 18px 12px 14px;
  border-radius: 20px;
  background: radial-gradient(ellipse 120% 120% at 30% 40%, rgba(20, 58, 30, 0.35) 0%, rgba(20, 58, 30, 0.15) 70%, transparent 100%);
  backdrop-filter: blur(2px);
}

.stx[data-stx="dino"] .stx-dino-greeting-title {
  color: #ffffff;
  font-size: clamp(34px, 3.4vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  text-shadow:
    0 2px 4px rgba(10, 35, 15, 0.95),
    0 4px 14px rgba(10, 35, 15, 0.85),
    0 1px 2px rgba(10, 35, 15, 1),
    0 0 22px rgba(19, 56, 30, 0.65);
  margin: 0;
  letter-spacing: -0.01em;
}

.stx[data-stx="dino"] .stx-dino-greeting-sub {
  color: #e2fbd6;
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 800;
  letter-spacing: 0.03em;
  margin: 0;
  text-shadow:
    0 1px 3px rgba(10, 35, 15, 0.95),
    0 3px 10px rgba(10, 35, 15, 0.85);
}

.stx[data-stx="dino"] .stx-level {
  margin-top: 28px;
  border-radius: 22px;
  background: #ffffff;
  padding: 18px 24px;
  box-shadow: 0 10px 28px rgba(19, 56, 30, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.stx[data-stx="dino"] .stx-level h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #13381e;
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 14px 0;
}

.stx[data-stx="dino"] .stx-dino-claw-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stx[data-stx="dino"] .stx-level .stx-progress {
  height: 14px;
  border-radius: 9999px;
  background: #e5f0dc;
}

.stx[data-stx="dino"] .stx-level .stx-progress i {
  border-radius: 9999px;
  background: linear-gradient(90deg, #84cc16 0%, #4d7c0f 100%);
  box-shadow: 0 2px 8px rgba(101, 163, 13, 0.4);
}

.stx[data-stx="dino"] .stx-level-line > b {
  color: #13381e;
  font-weight: 800;
  font-size: 15px;
}

.stx[data-stx="dino"] .stx-hero-stats .stx-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 12px 18px;
  box-shadow: 0 8px 22px rgba(19, 56, 30, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.stx[data-stx="dino"] .stx-hero-stats b {
  color: #13381e;
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 800;
}

.stx[data-stx="dino"] .stx-hero-stats span:last-child {
  color: #4b6b52;
  font-size: 13px;
  font-weight: 600;
}

.stx[data-stx="dino"] .stx-page {
  padding-bottom: 40px;
}

.stx[data-stx="dino"] .stx-home-top {
  margin-top: clamp(52px, 4.8vw, 72px);
}

.stx[data-stx="dino"] .stx-home-top .stx-card {
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(19, 56, 30, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.9);
  padding: 22px 26px;
}

.stx[data-stx="dino"] .stx-home-top .stx-card h2 {
  color: #13381e;
  font-size: 21px;
  font-weight: 800;
  margin: 0 0 16px 0;
}

.stx[data-stx="dino"] .stx-home-lower .stx-card {
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(19, 56, 30, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.9);
  padding: 22px 26px;
}

.stx[data-stx="dino"] .stx-home-lower .stx-card h2 {
  color: #13381e;
  font-size: 21px;
  font-weight: 800;
  margin: 0 0 16px 0;
}

.stx[data-stx="dino"] .stx-class-row .stx-icon-tile {
  background: #eef8ea;
  color: #4d7c0f;
  border-radius: 16px;
  width: 50px;
  height: 50px;
}

.stx[data-stx="dino"] .stx-class-info h3 span {
  color: #13381e;
  font-weight: 800;
  font-size: 18px;
}

.stx[data-stx="dino"] .stx-class-info h3 .stx-chip {
  background: #eef8ea;
  color: #4d7c0f;
  font-weight: 700;
  border-radius: 9999px;
}

.stx[data-stx="dino"] .stx-class-info p {
  color: #4b6b52;
  font-size: 14px;
  margin: 2px 0;
}

.stx[data-stx="dino"] .stx-class-info .stx-chip {
  background: #fee2e2;
  color: #dc2626;
  font-weight: 700;
  border-radius: 9999px;
}

.stx[data-stx="dino"] .stx-class-row .stx-btn-primary {
  background: #65a30d;
  color: #ffffff;
  border-radius: 9999px;
  font-weight: 700;
  padding: 10px 26px;
  border: none;
  box-shadow: 0 4px 14px rgba(101, 163, 13, 0.35);
  transition: all 0.15s ease;
}

.stx[data-stx="dino"] .stx-class-row .stx-btn-primary:hover {
  background: #4d7c0f;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(77, 124, 15, 0.45);
}

.stx[data-stx="dino"] .stx-quick button {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px;
  border-radius: 16px;
  transition: transform 0.15s ease;
}

.stx[data-stx="dino"] .stx-quick button:hover {
  transform: translateY(-2px);
}

.stx[data-stx="dino"] .stx-quick button b {
  color: #13381e;
  font-weight: 700;
  font-size: 13px;
}

.stx[data-stx="dino"] .stx-quick button .stx-icon-tile {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
}

.stx[data-stx="dino"] .stx-quick button:nth-child(1) .stx-icon-tile {
  background: #dcfce7;
  color: #15803d;
}

.stx[data-stx="dino"] .stx-quick button:nth-child(2) .stx-icon-tile {
  background: #ede9fe;
  color: #7c3aed;
}

.stx[data-stx="dino"] .stx-quick button:nth-child(3) .stx-icon-tile {
  background: #fef3c7;
  color: #d97706;
}

.stx[data-stx="dino"] .stx-quick button:nth-child(4) .stx-icon-tile {
  background: #d1fae5;
  color: #059669;
}

/* Courses & Progress Subpages Styling */
.stx[data-stx="dino"] .stx-page-title {
  color: #13381e;
  font-weight: 800;
  text-shadow: none;
}

.stx[data-stx="dino"] .stx-page-subtitle {
  color: #3b5e44;
  font-weight: 600;
  text-shadow: none;
}

.stx[data-stx="dino"] .stx-card .stx-page-title,
.stx[data-stx="dino"] .stx-course-header .stx-page-title,
.stx[data-stx="dino"] .stx-courses .stx-page-title {
  color: #13381e;
  font-weight: 800;
  text-shadow: none;
}

.stx[data-stx="dino"] .stx-card .stx-page-subtitle,
.stx[data-stx="dino"] .stx-course-header .stx-page-subtitle,
.stx[data-stx="dino"] .stx-courses .stx-page-subtitle {
  color: #3b5e44;
  font-weight: 600;
  text-shadow: none;
}

.stx[data-stx="dino"] .stx-progress-page > div:first-child {
  display: inline-flex;
  flex-direction: column;
  width: fit-content;
  padding: 8px 18px 10px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 20px rgba(19, 56, 30, 0.08);
}

.stx[data-stx="dino"] .stx-progress-page .stx-page-title {
  color: #13381e;
  font-weight: 800;
  text-shadow: none;
}

.stx[data-stx="dino"] .stx-progress-page .stx-page-subtitle {
  color: #244b2e;
  font-weight: 700;
  text-shadow: none;
}

.stx[data-stx="dino"] .stx-course-card,
.stx[data-stx="dino"] .stx-unit-card,
.stx[data-stx="dino"] .stx-courses .stx-card,
.stx[data-stx="dino"] .stx-progress-page .stx-card,
.stx[data-stx="dino"] .stx-xp-card {
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(19, 56, 30, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.9);
  color: #13381e;
}

.stx[data-stx="dino"] .stx-progress-unit {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e3eedc;
  padding: 16px;
}

/* Ambient Jungle Leaf Decorations */
.stx[data-stx="dino"] .stx-dino-decorations {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.stx[data-stx="dino"] .stx-dino-leaf {
  position: absolute;
  pointer-events: none;
  animation: stxDinoLeafDrift linear infinite;
}

.stx[data-stx="dino"] .stx-leaf-1 { width: 22px; height: 22px; left: 10%; top: -30px; animation-duration: 14s; animation-delay: 0s; }
.stx[data-stx="dino"] .stx-leaf-2 { width: 18px; height: 18px; left: 30%; top: -30px; animation-duration: 18s; animation-delay: 3s; }
.stx[data-stx="dino"] .stx-leaf-3 { width: 26px; height: 26px; left: 55%; top: -30px; animation-duration: 16s; animation-delay: 1.5s; }
.stx[data-stx="dino"] .stx-leaf-4 { width: 20px; height: 20px; left: 75%; top: -30px; animation-duration: 20s; animation-delay: 5s; }
.stx[data-stx="dino"] .stx-leaf-5 { width: 24px; height: 24px; left: 90%; top: -30px; animation-duration: 15s; animation-delay: 2s; }

@keyframes stxDinoLeafDrift {
  0% { transform: translateY(0) rotate(0deg) translateX(0); opacity: 0; }
  10% { opacity: 0.6; }
  50% { transform: translateY(50vh) rotate(180deg) translateX(30px); opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(105vh) rotate(360deg) translateX(-20px); opacity: 0; }
}

@media(max-width:960px) {
  .stx[data-stx="dino"] .stx-hero {
    grid-template-columns: 1fr;
  }
}

@media(max-width:820px) {
  .stx[data-stx="dino"] .stx-dino-topbar {
    margin: 8px 12px 0;
    padding: 6px 14px;
  }
  .stx[data-stx="dino"] .stx-dino-topbar .stx-nav {
    display: none;
  }
  .stx[data-stx="dino"] .stx-dino-greeting {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Frame hooks */
html[data-stx-active="1"] .cl-appnav {
  display: none!important;
}

.stx-page-subtitle {
  margin: 4px 0 0;
  color: var(--stx-muted);
  font-size: 16px;
  line-height: 1.4;
}

/* Courses */

.stx-courses {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stx-course-header {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 20px 24px;
  align-items: center;
}

.stx-course-heading {
  min-width: 0;
}

.stx-course-progress {
  grid-column: 1/-1;
}

.stx-course-summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--stx-muted);
  font-size: 13.5px;
  font-weight: 600;
}

.stx-course-summary strong {
  color: var(--stx-ink);
  font-size: 16px;
  font-weight: 800;
}

.stx-course-shortcuts {
  display: flex;
  gap: 10px;
  align-items: center;
}

.stx-course-shortcuts .stx-btn {
  height: 42px;
  min-height: 42px;
  border: 1.5px solid var(--stx-primary);
  background: transparent;
  color: var(--stx-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: var(--stx-radius-btn);
  font-size: 13.5px;
  font-weight: 800;
  transition: all .15s ease;
}

.stx-course-shortcuts .stx-btn:hover {
  background: var(--stx-tint-1);
  transform: translateY(-1px);
}

.stx-course-layout {
  display: grid;
  grid-template-columns: minmax(260px,340px) minmax(0,1fr);
  gap: 18px;
  align-items: start;
}

.stx-unit-list,
.stx-unit-detail {
  min-width: 0;
}

.stx-unit-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stx-unit-buttons > button {
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid var(--stx-line);
  border-radius: 12px;
  background: var(--stx-card);
  color: var(--stx-ink);
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 8px 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.stx-unit-buttons > button:hover {
  border-color: var(--stx-primary);
  transform: translateX(2px);
}

.stx-unit-buttons > button.stx-unit-active {
  border-color: var(--stx-primary);
  background: var(--stx-tint-1);
  box-shadow: inset 4px 0 0 var(--stx-primary);
}

.stx[data-stx="space"] .stx-unit-buttons > button {
  background: rgba(11, 16, 38, 0.45);
}

.stx[data-stx="adventure"] .stx-unit-buttons > button {
  background: rgba(255, 255, 255, 0.92);
}

.stx-unit-buttons span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stx-unit-buttons strong,
.stx-unit-buttons small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stx-unit-buttons small {
  color: var(--stx-muted);
}

.stx-unit-buttons b {
  color: var(--stx-primary);
  font-size: 13px;
}

.stx-unit-buttons .stx-progress {
  grid-column: 1/-1;
  height: 7px;
}

.stx-unit-heading {
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.stx-unit-heading h2 {
  margin: 0;
}

.stx-unit-heading p {
  margin: 4px 0 0;
  color: var(--stx-muted);
  font-size: 13px;
}

.stx-unit-nav {
  display: flex;
  gap: 8px;
}

.stx-unit-nav .stx-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stx-unit-nav .stx-btn:disabled {
  opacity: .45;
  cursor: default;
}

.stx-lesson-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stx-lesson-row {
  min-width: 0;
  padding: 13px 16px;
  border: 1px solid var(--stx-line);
  border-radius: 14px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto auto;
  gap: 14px;
  align-items: center;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.stx-lesson-row:hover {
  border-color: var(--stx-primary);
  transform: translateY(-1px);
}

.stx[data-stx="space"] .stx-lesson-row {
  background: rgba(11, 16, 38, 0.42);
}

.stx[data-stx="space"] .stx-lesson-row:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}

.stx[data-stx="adventure"] .stx-lesson-row {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0,0,0,0.06);
}

.stx[data-stx="adventure"] .stx-lesson-row:hover {
  box-shadow: 0 4px 14px rgba(40,70,60,.08);
}

.stx-lesson-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stx-lesson-copy strong {
  overflow-wrap: anywhere;
}

.stx-lesson-copy span {
  color: var(--stx-muted);
  font-size: 12px;
  text-transform: capitalize;
}

.stx-lesson-icon {
  position: relative;
}

.stx-lesson-icon > span:last-child:not(.stx-icon-tile) {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 22px;
  height: 22px;
  border: 2px solid var(--stx-card);
  border-radius: 50%;
  background: var(--stx-success);
  color: var(--stx-on-primary);
  display: grid;
  place-items: center;
}

.stx-lesson-done {
  min-width: 108px;
  height: 40px;
  min-height: 40px;
  border: 1.5px solid var(--stx-primary);
  border-radius: var(--stx-radius-btn);
  background: transparent;
  color: var(--stx-primary);
  font-size: 13px;
  font-weight: 700;
  transition: all .15s ease;
}

.stx-lesson-done:hover {
  background: var(--stx-tint-1);
}

.stx-lesson-status {
  min-height: 40px;
  color: var(--stx-success);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  padding: 0 6px;
  white-space: nowrap;
}

.stx-lesson-open {
  min-width: 88px;
  height: 40px;
  min-height: 40px;
  font-size: 13.5px;
  font-weight: 800;
}

.stx-reader-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding: 24px;
  background: var(--stx-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stx-reader-surface,
.stx-video-surface {
  width: min(860px,94vw);
  max-height: 90vh;
  border-radius: 16px;
  overflow: hidden;
  background: var(--stx-reader);
  color: var(--stx-reader-ink);
  box-shadow: var(--stx-card-shadow);
  display: flex;
  flex-direction: column;
}

.stx-reader-surface > header,
.stx-video-surface > header {
  min-height: 52px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--stx-line);
  display: flex;
  align-items: center;
  gap: 12px;
}

.stx-reader-surface > header strong,
.stx-video-surface > header strong {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stx-reader-surface > header button,
.stx-video-surface > header button {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: currentColor;
  font-size: 24px;
  cursor: pointer;
}

.stx-reader-content {
  min-height: 0;
  padding: 24px;
  overflow: auto;
}

/* Progress */
.stx-progress-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stx-progress-top {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 18px;
  align-items: stretch;
}

.stx-progress-top > .stx-card,
.stx-progress-lower > .stx-card {
  height: 100%;
}

.stx-completion-card,
.stx-progress-attendance {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.stx-progress-top > .stx-card {
  justify-content: flex-start;
}

.stx-completion-card h2,
.stx-progress-attendance h2 {
  align-self: stretch;
  text-align: left;
}

.stx-completion-card .stx-btn {
  min-height: 44px;
}

.stx-xp-card {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: 22px;
  align-items: start;
}

.stx-level-badge {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 3px solid var(--stx-accent);
  background: var(--stx-tint-2);
  color: var(--stx-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stx-level-badge span {
  margin-top: 3px;
  color: var(--stx-muted);
  font-size: 11px;
}

.stx-level-badge strong {
  color: var(--stx-ink);
  font-size: 30px;
}

.stx-xp-copy {
  min-width: 0;
}

.stx-xp-copy h2 {
  margin-top: 0;
}

.stx-xp-copy > div {
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--stx-muted);
  font-size: 13px;
}

.stx-xp-copy > div strong {
  color: var(--stx-ink);
}

.stx-attendance-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.stx-attendance-chips .stx-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.stx-attendance-empty {
  margin: 0;
  color: var(--stx-muted);
  font-size: 14px;
}

.stx-progress-lower {
  display: grid;
  grid-template-columns: minmax(0,1.35fr) minmax(280px,.65fr);
  gap: 18px;
  align-items: stretch;
}

.stx-progress-units,
.stx-certificate-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stx-progress-unit > div {
  margin-bottom: 7px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.stx-progress-unit span {
  color: var(--stx-muted);
  font-size: 12px;
}

.stx-certificate-list article {
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--stx-line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.stx-certificate-list article > div:nth-child(2) {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stx-certificate-action {
  min-width: 44px;
  min-height: 44px;
  margin-left: auto;
  border: 1px solid var(--stx-primary);
  border-radius: var(--stx-radius-btn);
  color: var(--stx-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.stx-certificate-list strong,
.stx-certificate-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stx-certificate-list span {
  color: var(--stx-muted);
  font-size: 12px;
}

/* Responsive */
@media(max-width:1099px) and (min-width:821px) {
  .stx-brand .stx-chip {
    display: none;
  }

  .stx-nav-top button:not(.stx-nav-active) > b {
    display: none;
  }

  .stx-hero-stats .stx-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  .stx-hero-stats .stx-icon-tile {
    flex: 0 0 44px;
  }

}

@media(max-width:820px) {
  .stx[data-stx="space"]::after {
    display: none;
  }

  .stx-nav-top {
    display: none;
  }

  .stx-nav-dock {
    display: flex;
  }

  .stx-body {
    padding-bottom: 116px;
  }

  .stx-brand .stx-chip {
    display: none;
  }

  .stx-hero-stats .stx-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }

  .stx-hero-stats .stx-icon-tile {
    flex: 0 0 44px;
  }

  .stx-hero {
    min-height: 330px;
    grid-template-columns: .8fr 1.2fr;
  }

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

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

  .stx-home-lower > :first-child {
    grid-column: 1/-1;
  }

  .stx-quick {
    grid-template-columns: repeat(5,1fr);
  }
}

@media(max-width:680px) {
  html[data-stx-active="1"] .cl-chatbot-trigger {
    bottom: 84px;
  }

  .stx-topbar {
    min-height: 62px;
    padding: 8px 12px;
  }

  .stx-brand > b {
    font-size: 19px;
  }

  .stx-page {
    padding: 0 12px 120px;
  }

  .stx-hero {
    min-height: 0;
    margin: 0 -12px;
    padding: 34px 18px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .stx[data-stx="adventure"] .stx-hero::before {
    background-size: auto 75%;
    background-position: right top;
  }

  .stx[data-stx="adventure"] .stx-level,
  .stx[data-stx="adventure"] .stx-hero-stats {
    width: 100%;
  }

  .stx-hero-greeting {
    max-width: 200px;
    align-self: stretch;
  }

  .stx-page-title {
    font-size: clamp(26px,3vw,34px);
  }

  .stx-level {
    width: auto;
    margin-top: 150px;
    align-self: stretch;
  }

  .stx[data-stx="space"] .stx-level {
    margin-top: 150px;
  }

  .stx-astronaut {
    position: absolute;
    left: auto;
    right: 18px;
    top: 92px;
    width: 135px;
    margin: 0;
  }

  .stx-hero-stats {
    grid-template-columns: repeat(3,1fr);
    gap: 8px;
  }

  .stx-hero-stats .stx-card {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }

  .stx-hero-stats .stx-icon-tile {
    width: 44px;
    height: 44px;
  }

  .stx-hero-stats b {
    font-size: 21px;
  }

  .stx-home-top,
  .stx-home-lower {
    grid-template-columns: 1fr;
  }

  .stx-home-lower > :first-child {
    grid-column: auto;
  }

  .stx-card {
    padding: 18px;
  }

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

  .stx-class-row {
    flex-wrap: wrap;
  }

  .stx-class-info {
    min-width: calc(100% - 76px);
  }

  .stx-nav-dock {
    left: 8px;
    right: 8px;
    bottom: 8px;
    min-height: 74px;
    padding: 5px 58px 5px 8px;
    border-radius: 22px;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .stx-nav-dock button {
    min-width: 62px;
    min-height: 60px;
  }

  .stx-nav-dock button > span {
    width: 34px;
    height: 34px;
  }

  .stx-nav-dock button > b {
    font-size: 11px;
  }
}

@media(max-width:400px) {
  .stx-brand-tile {
    width: 36px;
    height: 36px;
  }

  .stx-theme-trigger span:last-child {
    display: none;
  }

  .stx-page-title {
    font-size: clamp(26px,3vw,34px);
  }

  .stx-level-line {
    flex-wrap: wrap;
  }

  .stx-level-line > b {
    font-size: 14px;
  }

  .stx-hero-stats span:last-child {
    font-size: 11px;
  }

  .stx-quick {
    grid-template-columns: repeat(2,1fr);
  }

  .stx-my-stats {
    grid-template-columns: repeat(2,1fr);
  }

  .stx-attendance-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .stx-leaderboard > div {
    grid-template-columns: 22px 30px 1fr;
  }

  .stx-leaderboard strong {
    grid-column: 3;
  }

  .stx-nav-dock button {
    min-width: 58px;
  }
}

@media(max-width:480px) {
  .stx-account {
    position: static;
  }

  .stx-account-panel {
    top: 100%;
    right: 0;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 62px);
    border-right: 0;
    border-left: 0;
    border-radius: 0 0 16px 16px;
    padding-bottom: 116px;
  }
}

@media(max-width:360px) {
  .stx-topbar {
    padding: 7px 9px;
  }

  .stx-brand {
    gap: 7px;
  }

  .stx-brand > b {
    font-size: 17px;
  }

  .stx-page {
    padding-right: 9px;
    padding-left: 9px;
  }

  .stx-hero {
    margin-right: -9px;
    margin-left: -9px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .stx-page-title {
    font-size: clamp(26px,3vw,34px);
  }

  .stx-hero-stats,
  .stx-quick,
  .stx-my-stats {
    grid-template-columns: 1fr;
  }

  .stx-card {
    padding: 14px;
  }

  .stx-nav-dock button {
    min-width: 54px;
  }
}

@media(max-width:820px) {
  .stx-course-header,
  .stx-course-layout,
  .stx-progress-lower {
    grid-template-columns: 1fr;
  }

  .stx-course-header {
    align-items: start;
  }

  .stx-course-shortcuts {
    flex-wrap: wrap;
  }

  .stx-lesson-row {
    grid-template-columns: auto minmax(0,1fr);
  }

  .stx-lesson-status,
  .stx-lesson-done,
  .stx-lesson-open {
    grid-column: 2;
  }

  .stx-progress-top {
    grid-template-columns: 1fr 1fr;
  }

  .stx-progress-attendance {
    grid-column: 1/-1;
  }
}

@media(max-width:680px) {
  .stx-progress-top {
    grid-template-columns: 1fr;
  }

  .stx-progress-attendance {
    grid-column: auto;
  }

  .stx-xp-card {
    grid-template-columns: 1fr;
  }

  .stx-level-badge {
    margin: 0 auto;
  }

  .stx-lesson-open {
    width: 100%;
  }
}

@media(max-width:400px) {
  .stx-course-shortcuts,
  .stx-unit-heading,
  .stx-xp-copy > div,
  .stx-progress-unit > div {
    align-items: stretch;
    flex-direction: column;
  }

  .stx-course-shortcuts .stx-btn,
  .stx-unit-nav .stx-btn {
    flex: 1;
  }

  .stx-unit-heading {
    align-items: flex-start;
  }

  .stx-lesson-row {
    grid-template-columns: auto minmax(0,1fr);
  }

  .stx-lesson-done {
    grid-column: 1/-1;
    width: 100%;
  }

  .stx-lesson-open {
    grid-column: 1/-1;
    width: 100%;
  }

  .stx-reader-backdrop {
    padding: 10px;
  }

  .stx-reader-content {
    padding: 16px;
  }
}

/* Reduced motion */
@media(prefers-reduced-motion:reduce) {
  .stx *,
  .stx *::before,
  .stx *::after {
    animation: none!important;
    transition: none!important;
    scroll-behavior: auto!important;
  }
}
