:root {
  --white: #ffffff;
  --ink: #161b18;
  --ink-muted: #5f6963;
  --ink-subtle: #8b958e;
  --border: rgba(22, 27, 24, 0.1);
  --border-strong: rgba(22, 27, 24, 0.22);
  --surface-soft: #f6f8f6;
  --meadow-accent: #2c7a4b;
  --danger: #c63e37;
  --radius-xl: 20px;
  --radius-md: 13px;
  --shadow-card: 0 18px 48px rgba(15, 28, 18, 0.22), 0 2px 8px rgba(15, 28, 18, 0.08);
  --shadow-pill: 0 8px 28px rgba(15, 28, 18, 0.16), 0 1px 3px rgba(15, 28, 18, 0.08);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-sans);
  color: var(--ink);
  background: #84c960;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

#world-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  touch-action: none;
  cursor: grab;
}

[hidden] {
  display: none !important;
}

/* ---------------- Roblox & Minecraft Inspired Precision Top HUD ---------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cam-controls.hud-top-bar {
  position: fixed;
  top: max(10px, env(safe-area-inset-top, 10px));
  left: max(12px, env(safe-area-inset-left, 12px));
  right: max(12px, env(safe-area-inset-right, 12px));
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.hud-zone {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-shrink: 0;
  pointer-events: none;
}

.hud-top-left {
  justify-content: flex-start;
}

.hud-top-center {
  justify-content: center;
}

.hud-top-right {
  justify-content: flex-end;
}

/* Shared Dark Translucent Obsidian Button Surface (Roblox / Minecraft Bedrock style) */
.hud-icon-btn,
.hud-pill-btn {
  pointer-events: auto;
  position: relative;
  appearance: none;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 19, 24, 0.74);
  color: #f8fafc;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 620;
  letter-spacing: -0.01em;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.18s ease;
}

.hud-icon-btn {
  width: 36px;
  min-width: 36px;
  padding: 0;
}

.hud-pill-btn {
  padding: 0 11px;
  max-width: 170px;
}

.hud-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-icon-btn:hover,
.hud-pill-btn:hover {
  background: rgba(28, 34, 42, 0.88);
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.hud-icon-btn:active,
.hud-pill-btn:active {
  transform: scale(0.93);
}

.hud-menu-toggle.is-active {
  background: #ffffff;
  color: #0f1318;
  border-color: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

/* Camera View Segmented Bar (Top-Center, Compact Minecraft Bedrock Style) */
.cam-mode-group {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 3px;
  gap: 2px;
  border-radius: 10px;
  background: rgba(15, 19, 24, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.cam-sub-group {
  background: rgba(15, 19, 24, 0.74);
}

.cam-mode-btn {
  position: relative;
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(248, 250, 252, 0.72);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 620;
  letter-spacing: -0.01em;
  padding: 0 10px;
  height: 28px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  transition:
    background-color 0.18s ease,
    color 0.16s ease,
    transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cam-mode-btn:hover:not(.is-active) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.cam-mode-btn:active {
  transform: scale(0.94);
}

.cam-mode-btn.is-active {
  background: #ffffff;
  color: #0f1318;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.cam-mode-btn.is-demo-click {
  animation: cam-demo-press 0.52s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}

.cam-mode-btn.is-demo-click::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 9px;
  border: 2px solid #ffffff;
  pointer-events: none;
  animation: cam-demo-ripple 0.68s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cam-demo-press {
  0% { transform: scale(1); }
  26% { transform: scale(0.86); }
  62% { transform: scale(1.07); }
  100% { transform: scale(1); }
}

@keyframes cam-demo-ripple {
  0% { opacity: 0.85; transform: scale(0.94); }
  100% { opacity: 0; transform: scale(1.36); }
}

@media (prefers-reduced-motion: reduce) {
  .cam-mode-btn.is-demo-click,
  .cam-mode-btn.is-demo-click::after {
    animation: none;
  }
}

/* Online Count Pill */
.online-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(15, 19, 24, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  color: #f8fafc;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cam-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.cam-compass-svg {
  width: 18px;
  height: 18px;
}

/* Roblox / Minecraft Dark Translucent Menu Drawer */
.hud-menu-drawer {
  position: fixed;
  top: max(54px, calc(env(safe-area-inset-top, 10px) + 44px));
  right: max(12px, env(safe-area-inset-right, 12px));
  z-index: 25;
  width: min(304px, calc(100vw - 24px));
  padding: 12px;
  border-radius: 16px;
  background: rgba(15, 19, 24, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  transform-origin: top right;
  animation: hud-drawer-in 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes hud-drawer-in {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hud-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 10px;
}

.hud-menu-title {
  font-size: 0.74rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(248, 250, 252, 0.76);
}

.hud-menu-hint {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.66rem;
  font-weight: 700;
  color: rgba(248, 250, 252, 0.55);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
  padding: 2px 6px;
}

.hud-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hud-menu-tile {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font: inherit;
  padding: 10px;
  border-radius: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  transition:
    transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.16s ease,
    border-color 0.16s ease;
}

.hud-menu-tile:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.hud-menu-tile:active {
  transform: scale(0.95);
}

.hud-tile-icon {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
}

.hud-tile-label {
  font-size: 0.8rem;
  font-weight: 620;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-swatch-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4c82d4;
  border: 1.5px solid #0f1318;
  flex-shrink: 0;
}

/* Responsive HUD media queries are centralized in /responsive-hud.css */

/* ---------------- Mobile First-Person Walk Joystick ---------------- */
.walk-joystick {
  position: fixed;
  left: max(18px, calc(env(safe-area-inset-left, 0px) + 18px));
  bottom: max(22px, calc(env(safe-area-inset-bottom, 0px) + 22px));
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.44);
  border: 1.5px solid rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-pill);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 12;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: grab;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.walk-joystick.is-active {
  background: rgba(255, 255, 255, 0.56);
  border-color: rgba(255, 255, 255, 0.98);
  cursor: grabbing;
}

.walk-joystick-svg {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.walk-joy-chevron {
  stroke: #161b18;
  stroke-opacity: 0.42;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke-opacity 0.1s ease;
}

.walk-joy-chevron.is-lit {
  stroke-opacity: 0.92;
}

/* ---------------- Roblox / Minecraft Tactile Jump Control (Bottom-Right) ---------------- */
.walk-jump-wrap {
  position: fixed;
  right: max(22px, calc(env(safe-area-inset-right, 0px) + 22px));
  bottom: max(22px, calc(env(safe-area-inset-bottom, 0px) + 22px));
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.walk-jump-btn {
  position: relative;
  pointer-events: auto;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(15, 19, 24, 0.72);
  border: 2px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.34),
    inset 0 1px 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  padding: 0;
  appearance: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.2s ease;
}

.walk-jump-btn::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
  transition: transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease;
}

.walk-jump-btn:hover {
  background: rgba(26, 33, 42, 0.86);
  border-color: rgba(255, 255, 255, 0.65);
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.4),
    0 0 0 3px rgba(34, 197, 94, 0.2);
}

.walk-jump-btn:hover::before {
  transform: scale(1.06);
  border-color: rgba(255, 255, 255, 0.42);
}

.walk-jump-btn:active,
.walk-jump-btn.is-active {
  transform: scale(0.88) translateY(2px);
  background: rgba(34, 197, 94, 0.88);
  border-color: #ffffff;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.3),
    0 0 0 4px rgba(34, 197, 94, 0.32);
  transition-duration: 0.08s;
}

.walk-jump-btn.is-jumping {
  animation: jump-btn-spring 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.walk-jump-ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.9);
  opacity: 0;
  pointer-events: none;
}

.walk-jump-btn.is-jumping .walk-jump-ripple {
  animation: jump-shockwave 0.44s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.walk-jump-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  pointer-events: none;
  transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.walk-jump-btn:hover .walk-jump-inner {
  transform: translateY(-2px);
}

.walk-jump-btn.is-jumping .walk-jump-inner {
  animation: jump-icon-lift 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.walk-jump-svg {
  width: 28px;
  height: 28px;
  display: block;
  color: #ffffff;
}

.walk-jump-text {
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1;
}

.walk-jump-kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(15, 19, 24, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 2px 7px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}

@keyframes jump-btn-spring {
  0% { transform: scale(0.86) translateY(2px); }
  45% { transform: scale(1.07) translateY(-4px); }
  75% { transform: scale(0.98) translateY(0); }
  100% { transform: scale(1) translateY(0); }
}

@keyframes jump-icon-lift {
  0% { transform: translateY(2px); }
  45% { transform: translateY(-5px) scale(1.08); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes jump-shockwave {
  0% {
    opacity: 0.9;
    transform: scale(0.96);
    border-color: rgba(255, 255, 255, 0.95);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
    border-color: rgba(34, 197, 94, 0.45);
  }
}



/* ---------------- Bottom Dock & Pills ---------------- */
.bottom-dock {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom, 20px));
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body[data-walk-mobile="1"] .bottom-dock {
  left: 50%;
  right: auto;
  bottom: max(22px, calc(env(safe-area-inset-bottom, 0px) + 22px));
  transform: translateX(-50%);
  align-items: center;
}

body[data-walk-mobile="1"] .dock-pill {
  max-width: calc(100vw - 220px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dock-pill {
  pointer-events: auto;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.93rem;
  font-weight: 580;
  letter-spacing: -0.01em;
  padding: 11px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dock-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(15, 28, 18, 0.22);
}

.dock-pill:active {
  transform: translateY(0);
}

.dock-pill-pick {
  cursor: default;
  padding: 8px 10px 8px 18px;
  gap: 10px;
}

.dock-pill-pick:hover {
  transform: none;
}

.dock-pill-building {
  cursor: default;
  pointer-events: none;
  padding: 9px 20px 9px 16px;
  gap: 11px;
}

.building-pill-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.22;
  gap: 2px;
  min-width: 0;
}

.building-pill-title {
  font-size: 0.91rem;
  font-weight: 610;
  color: var(--ink);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.building-pill-sub {
  font-size: 0.74rem;
  font-weight: 560;
  letter-spacing: -0.005em;
  color: var(--meadow-accent);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dock-pill-ready {
  background: var(--ink);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.16);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3fb963;
  box-shadow: 0 0 0 3px rgba(63, 185, 99, 0.22);
  flex-shrink: 0;
}

.live-dot-pulse {
  animation: dot-pulse 1.5s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(63, 185, 99, 0.24);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(63, 185, 99, 0.42);
  }
}

.pill-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(22, 27, 24, 0.16);
  border-top-color: var(--meadow-accent);
  animation: pill-spin 0.78s linear infinite;
  flex-shrink: 0;
}

@keyframes pill-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------------- Compact Bottom Building Box ---------------- */
.bottom-builder {
  pointer-events: auto;
  width: min(92vw, 396px);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(22, 27, 24, 0.09);
  border-radius: var(--radius-xl);
  padding: 12px 14px 14px;
  box-shadow: var(--shadow-card);
  user-select: text;
}

.builder-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.spot-chip-btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
  font-size: 0.79rem;
  font-weight: 560;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.spot-chip-btn:hover {
  background: #edf1ed;
  border-color: var(--ink);
}

.icon-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(22, 27, 24, 0.1);
  background: var(--white);
  color: var(--ink-muted);
  font-size: 1.18rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.icon-close-btn:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.builder-row {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 9px;
  align-items: stretch;
}

.drop-tile {
  position: relative;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-height: 64px;
  overflow: hidden;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.drop-tile:hover,
.drop-tile.dragover {
  border-color: var(--ink);
  background: var(--surface-soft);
}

.drop-tile-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--ink-muted);
  font-size: 0.74rem;
  font-weight: 540;
}

.upload-icon {
  width: 20px;
  height: 20px;
  color: var(--ink-subtle);
}

.drop-preview-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#drop-preview-img {
  width: 100%;
  height: 64px;
  object-fit: cover;
  display: block;
}

.clear-img-btn {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

#prompt-input {
  width: 100%;
  resize: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
  padding: 9px 11px;
  outline: none;
  transition: border-color 0.15s ease;
}

#prompt-input::placeholder {
  color: var(--ink-subtle);
}

#prompt-input:focus {
  border-color: var(--ink);
}

.form-error {
  margin: 8px 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--danger);
}

.upload-disclaimer {
  margin: 8px 0 0;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--ink-muted);
}

.upload-disclaimer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.upload-disclaimer a:hover {
  color: var(--ink);
}

.primary-btn {
  margin-top: 9px;
  width: 100%;
  appearance: none;
  border: none;
  border-radius: 12px;
  background: var(--ink);
  color: var(--white);
  font: inherit;
  font-size: 0.91rem;
  font-weight: 590;
  letter-spacing: -0.01em;
  padding: 10px 16px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.primary-btn:hover:not(:disabled) {
  opacity: 0.9;
}

.primary-btn:disabled {
  opacity: 0.55;
  cursor: progress;
}

/* ---------------- Hover Card & Toast ---------------- */
.hover-card {
  position: fixed;
  z-index: 12;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 9px 13px;
  max-width: 280px;
  box-shadow: var(--shadow-pill);
  transform: translate(-50%, calc(-100% - 16px));
}

.hover-name {
  font-size: 0.86rem;
  font-weight: 620;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.hover-feed {
  margin-top: 3px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--meadow-accent);
}

.hover-status {
  margin-top: 2px;
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--ink-muted);
}

.weave-toast {
  position: fixed;
  top: max(62px, calc(env(safe-area-inset-top, 12px) + 52px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 14;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.82rem;
  color: var(--ink-muted);
  box-shadow: var(--shadow-pill);
  pointer-events: none;
  max-width: min(90vw, 520px);
  text-align: center;
}

/* ---------------- Contextual Interaction Prompt ---------------- */
.interact-prompt {
  position: fixed;
  left: 50%;
  bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 28;
  pointer-events: auto;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(22, 27, 24, 0.84);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--white);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 590;
  letter-spacing: -0.01em;
  border-radius: 999px;
  padding: 8px 15px 8px 10px;
  box-shadow: 0 10px 28px rgba(10, 18, 12, 0.28), 0 1px 3px rgba(10, 18, 12, 0.16);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  transition: transform 0.14s ease, bottom 0.18s ease, background-color 0.14s ease, box-shadow 0.14s ease;
}

body[data-in-interior="1"] .bottom-dock {
  display: none !important;
}

body[data-in-interior="1"] .interact-prompt {
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

.interact-prompt:hover {
  background: rgba(22, 27, 24, 0.92);
  transform: translateX(-50%) translateY(-1px);
  box-shadow: 0 14px 32px rgba(10, 18, 12, 0.34), 0 2px 5px rgba(10, 18, 12, 0.18);
}

.interact-prompt:active {
  transform: translateX(-50%) scale(0.97);
}

.interact-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.28);
  font-family: var(--font-sans);
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1;
  color: var(--white);
  flex-shrink: 0;
}

body[data-walk-mobile="1"] .interact-prompt {
  padding: 9px 16px;
}

body[data-walk-mobile="1"] .interact-key {
  display: none;
}

/* ---------------- Subtle First-Person Esc Exit Hint ---------------- */
.walk-esc-hint {
  position: fixed;
  top: max(16px, env(safe-area-inset-top, 16px));
  left: max(16px, env(safe-area-inset-left, 16px));
  z-index: 26;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(22, 27, 24, 0.48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 540;
  letter-spacing: -0.005em;
  padding: 5px 10px 5px 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 4px 14px rgba(10, 18, 12, 0.14);
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.walk-esc-hint[hidden] {
  display: none !important;
}

.walk-esc-hint:hover {
  background: rgba(22, 27, 24, 0.7);
}

.walk-esc-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 680;
  line-height: 1;
  color: #ffffff;
}

body[data-walk-mobile="1"] .walk-esc-hint {
  display: none !important;
}



/* ---------------- Character Customizer Modal ---------------- */
.avatar-dialog {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink, #161b18);
  max-width: min(94vw, 690px);
  width: min(94vw, 690px);
  max-height: min(92dvh, 560px);
  overflow: visible;
  font-family: var(--font-sans);
}

.avatar-dialog:not([open]) {
  display: none !important;
}

.avatar-dialog::backdrop {
  background: rgba(14, 22, 16, 0.38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cb-shell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(22, 27, 24, 0.1);
  border-radius: var(--radius-xl, 20px);
  box-shadow: var(--shadow-card, 0 18px 48px rgba(15, 28, 18, 0.24), 0 2px 8px rgba(15, 28, 18, 0.08));
  overflow: hidden;
  height: min(88dvh, 520px);
  user-select: none;
}

.cb-stage {
  position: relative;
  background: linear-gradient(180deg, #cfe8fa 0%, #e7f4fc 60%, #d4ecc8 100%);
  border-right: 1px solid rgba(22, 27, 24, 0.08);
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.cb-stage:active {
  cursor: grabbing;
}

.cb-preview-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.cb-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 14px 16px 14px;
  gap: 11px;
}

.cb-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cb-name-input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid var(--border-strong, rgba(22, 27, 24, 0.2));
  background: var(--surface-soft, #f6f8f6);
  color: var(--ink, #161b18);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 590;
  letter-spacing: -0.01em;
  outline: none;
  user-select: text;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.cb-name-input::placeholder {
  color: var(--ink-subtle, #8b958e);
  font-weight: 500;
}

.cb-name-input:focus {
  background: #ffffff;
  border-color: var(--ink, #161b18);
}

.cb-close-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(22, 27, 24, 0.12);
  background: #ffffff;
  color: var(--ink-muted, #5f6963);
  font-size: 1.22rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.cb-close-btn:hover {
  background: var(--surface-soft, #f6f8f6);
  color: var(--ink, #161b18);
}

.cb-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  border-radius: 12px;
  background: var(--surface-soft, #f6f8f6);
  border: 1px solid rgba(22, 27, 24, 0.08);
}

.cb-tab-btn {
  appearance: none;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-muted, #5f6963);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 6px 4px;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.cb-tab-btn:hover:not(.is-active) {
  color: var(--ink, #161b18);
}

.cb-tab-btn.is-active {
  background: var(--ink, #161b18);
  color: #ffffff;
}

.cb-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-right: 2px;
}

.cb-group-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 13px;
  background: var(--surface-soft, #f6f8f6);
  border: 1px solid rgba(22, 27, 24, 0.07);
}

.cb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cb-chip {
  appearance: none;
  border: 1px solid rgba(22, 27, 24, 0.14);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink, #161b18);
  font: inherit;
  font-size: 0.79rem;
  font-weight: 570;
  letter-spacing: -0.01em;
  padding: 5px 11px;
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease, color 0.12s ease, transform 0.1s ease;
}

.cb-chip:hover:not(.is-active) {
  border-color: var(--ink, #161b18);
}

.cb-chip:active {
  transform: scale(0.97);
}

.cb-chip.is-active {
  background: var(--ink, #161b18);
  border-color: var(--ink, #161b18);
  color: #ffffff;
}

.cb-swatches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  transition: opacity 0.15s ease;
}

.cb-swatches.is-dimmed {
  opacity: 0.36;
  pointer-events: none;
}

.cb-swatch-icon {
  width: 18px;
  height: 18px;
  color: var(--ink-muted, #5f6963);
  margin-right: 2px;
  flex-shrink: 0;
}

.cb-swatch {
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(22, 27, 24, 0.2);
  padding: 0;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.cb-swatch:hover {
  transform: scale(1.1);
}

.cb-swatch.is-active {
  transform: scale(1.08);
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--ink, #161b18);
}

.cb-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}

.cb-btn {
  appearance: none;
  height: 38px;
  border-radius: 11px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 0 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.12s ease, opacity 0.12s ease, background-color 0.12s ease;
}

.cb-btn:active {
  transform: scale(0.98);
}

.cb-btn-secondary {
  border: 1px solid var(--border-strong, rgba(22, 27, 24, 0.2));
  background: #ffffff;
  color: var(--ink, #161b18);
}

.cb-btn-secondary:hover {
  background: var(--surface-soft, #f6f8f6);
}

.cb-btn-primary {
  flex: 1;
  border: none;
  background: var(--ink, #161b18);
  color: #ffffff;
}

.cb-btn-primary:hover {
  opacity: 0.91;
}

.cb-btn-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

@media (max-width: 680px) {
  .avatar-dialog {
    width: min(95vw, 430px);
    max-width: min(95vw, 430px);
    max-height: 92dvh;
  }

  .cb-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 220px minmax(0, 1fr);
    height: min(90dvh, 640px);
  }

  .cb-stage {
    border-right: none;
    border-bottom: 1px solid rgba(22, 27, 24, 0.08);
  }

  .cb-panel {
    padding: 12px;
    gap: 9px;
  }
}

body[data-og-capture="1"] .cam-controls,
body[data-og-capture="1"] #avatar-btn,
body[data-og-capture="1"] #quiz-room-btn,
body[data-og-capture="1"] #online-pill,
body[data-og-capture="1"] #interact-prompt,
body[data-og-capture="1"] #walk-esc-hint,
body[data-og-capture="1"] .walk-esc-hint,
body[data-og-capture="1"] #avatar-dialog,
body[data-og-capture="1"] .avatar-dialog,
body[data-og-capture="1"] #quiz-dialog,
body[data-og-capture="1"] #quiz-teacher-panel,
body[data-og-capture="1"] #quiz-student-hud,
body[data-og-capture="1"] .walk-joystick,
body[data-og-capture="1"] .walk-jump-wrap,
body[data-og-capture="1"] .walk-jump-btn,
body[data-og-capture="1"] .hud-menu-drawer,
body[data-og-capture="1"] .bottom-dock,
body[data-og-capture="1"] .hover-card,
body[data-og-capture="1"] .weave-toast {
  display: none !important;
}

/* ---------------- Classroom Quiz: Top Button & In-Quiz Visibility ---------------- */
.cam-quiz-btn {
  padding: 6px 13px 6px 10px;
  gap: 6px;
  white-space: nowrap;
}

.cam-quiz-btn.is-in-room {
  background: var(--ink);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.22);
}



body[data-in-quiz="1"] .bottom-dock,
body[data-in-quiz="1"] .ke-adventure-hud {
  display: none !important;
}

body[data-in-quiz="1"] .interact-prompt {
  bottom: calc(210px + env(safe-area-inset-bottom, 0px));
}

/* ---------------- Classroom Quiz Setup / Join Dialog ---------------- */
.quiz-dialog {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  width: min(95vw, 720px);
  max-width: min(95vw, 720px);
  max-height: min(92dvh, 720px);
  overflow: visible;
  font-family: var(--font-sans);
}

.quiz-dialog:not([open]) {
  display: none !important;
}

.quiz-dialog::backdrop {
  background: rgba(14, 22, 16, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.qd-shell {
  display: flex;
  flex-direction: column;
  max-height: min(90dvh, 700px);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(22, 27, 24, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  user-select: text;
}

.qd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
}

.qd-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qd-title {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.qd-sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.qd-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 4px;
  margin: 12px 18px 0;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.qd-tab {
  appearance: none;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.qd-tab.is-active {
  background: var(--ink);
  color: var(--white);
}

.qd-body {
  padding: 14px 18px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qd-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qd-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.qd-grid-3 {
  display: grid;
  grid-template-columns: 1fr 110px 92px;
  gap: 8px;
}

@media (max-width: 600px) {
  .qd-grid-2,
  .qd-grid-3 {
    grid-template-columns: 1fr;
  }
}

.qd-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qd-label {
  font-size: 0.75rem;
  font-weight: 620;
  color: var(--ink-muted);
}

.qd-input,
.qd-select,
.qd-textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.14s ease;
}

.qd-input:focus,
.qd-select:focus,
.qd-textarea:focus {
  border-color: var(--ink);
}

.qd-code-input {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}

.qd-mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.qd-mode-card {
  appearance: none;
  text-align: left;
  border: 1.5px solid var(--border);
  background: var(--white);
  border-radius: 12px;
  padding: 9px 11px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font: inherit;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.qd-mode-card strong {
  font-size: 0.84rem;
  color: var(--ink);
}

.qd-mode-card span {
  font-size: 0.73rem;
  line-height: 1.32;
  color: var(--ink-muted);
}

.qd-mode-card.is-active {
  border-color: var(--ink);
  background: #edf5ef;
}

.qd-btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.qd-btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity 0.14s ease, background-color 0.14s ease;
}

.qd-btn:hover:not(:disabled) {
  background: #eef2ee;
}

.qd-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.qd-btn-primary {
  border: none;
  background: var(--ink);
  color: var(--white);
}

.qd-btn-primary:hover:not(:disabled) {
  background: #242b27;
}

.qd-btn-accent {
  border: none;
  background: var(--meadow-accent);
  color: var(--white);
}

.qd-btn-accent:hover:not(:disabled) {
  background: #23633c;
}

.qd-q-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qd-q-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.qd-q-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.qd-q-badge {
  font-size: 0.72rem;
  font-weight: 680;
  color: var(--meadow-accent);
  font-variant-numeric: tabular-nums;
}

.qd-q-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

@media (max-width: 560px) {
  .qd-q-opts {
    grid-template-columns: 1fr;
  }
}

.qd-opt-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.qd-opt-pick {
  appearance: none;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 7px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface-soft);
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.qd-opt-pick.is-correct {
  background: var(--meadow-accent);
  border-color: var(--meadow-accent);
  color: var(--white);
}

.qd-error {
  margin: 0;
  font-size: 0.8rem;
  color: var(--danger);
  font-weight: 560;
}

/* ---------------- Teacher Floating Control Panel ---------------- */
.quiz-teacher-panel {
  position: fixed;
  top: max(58px, calc(env(safe-area-inset-top, 10px) + 48px));
  left: max(14px, env(safe-area-inset-left, 14px));
  z-index: 16;
  width: min(92vw, 316px);
  max-height: calc(100dvh - 130px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(22, 27, 24, 0.1);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow-y: auto;
}

.qtp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.qtp-code-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qtp-kicker {
  font-size: 0.7rem;
  font-weight: 650;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.qtp-code {
  font-size: 1.25rem;
  font-weight: 780;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.qtp-status-pill {
  font-size: 0.72rem;
  font-weight: 650;
  padding: 4px 9px;
  border-radius: 999px;
  background: #edf5ef;
  color: var(--meadow-accent);
  white-space: nowrap;
}

.qtp-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.qtp-question-preview {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 8px 10px;
  font-size: 0.78rem;
  line-height: 1.38;
}

.qtp-board {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 220px;
  overflow-y: auto;
}

.qtp-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 9px;
  background: var(--surface-soft);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.qtp-row.is-top {
  background: #fdf6dc;
}

.qtp-rank {
  font-weight: 720;
  color: var(--ink-muted);
}

.qtp-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qtp-meta {
  font-size: 0.73rem;
  font-weight: 640;
  color: var(--meadow-accent);
}

/* ---------------- Student Bottom Stairway Quiz HUD ---------------- */
.quiz-student-hud {
  position: fixed;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom, 14px));
  transform: translateX(-50%);
  z-index: 15;
  width: min(94vw, 560px);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(22, 27, 24, 0.1);
  border-radius: 20px;
  padding: 12px 15px 14px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.qsh-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.qsh-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}

.qsh-stat {
  font-size: 0.75rem;
  font-weight: 660;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--ink);
  white-space: nowrap;
}

.qsh-stat.is-cp {
  background: #e6f7f5;
  border-color: rgba(45, 125, 116, 0.25);
  color: #1f615a;
}

.qsh-stat.is-timer {
  background: #fff3db;
  border-color: rgba(184, 130, 18, 0.3);
  color: #8f5c00;
}

.qsh-question {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.38;
  color: var(--ink);
}

.qsh-diff-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.73rem;
  color: var(--ink-muted);
}

.qsh-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}



.qsh-opt-btn {
  appearance: none;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--ink);
  border-radius: 12px;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.83rem;
  font-weight: 580;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.12s ease, border-color 0.12s ease, background-color 0.12s ease;
}

.qsh-opt-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: var(--ink);
  background: var(--surface-soft);
}

.qsh-opt-btn:disabled {
  cursor: default;
  opacity: 0.72;
}

.qsh-opt-btn.is-locked {
  border-color: var(--ink);
  background: #edf5ef;
}

.qsh-opt-key {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.qsh-opt-key.k-0 { background: #df5246; }
.qsh-opt-key.k-1 { background: #4c82d4; }
.qsh-opt-key.k-2 { background: #d69814; }
.qsh-opt-key.k-3 { background: #3fb963; }

.qsh-feedback {
  padding: 8px 10px;
  border-radius: 11px;
  font-size: 0.79rem;
  line-height: 1.36;
  font-weight: 560;
}

.qsh-feedback.is-ok {
  background: #e9f8ee;
  color: #1c5f34;
  border: 1px solid rgba(63, 185, 99, 0.35);
}

.qsh-feedback.is-bad {
  background: #fdeceb;
  color: #8f261f;
  border: 1px solid rgba(223, 82, 70, 0.35);
}

.qsh-podium {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body[data-walk-mobile="1"] .quiz-student-hud {
  left: auto;
  right: max(12px, env(safe-area-inset-right, 12px));
  transform: none;
  width: min(calc(100vw - 148px), 440px);
}

/* ---------------- Compact Top-Bar Audio Mute Toggle ---------------- */
.cam-audio-btn {
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  justify-content: center;
}

.cam-audio-btn .audio-icon-off {
  display: none;
}

.cam-audio-btn.is-muted {
  color: var(--ink-muted);
}

.cam-audio-btn.is-muted .audio-icon-on {
  display: none;
}

.cam-audio-btn.is-muted .audio-icon-off {
  display: block;
}

body[data-og-capture="1"] .cam-audio-btn,
body[data-og-capture="1"] .cam-island-btn,
body[data-og-capture="1"] .creative-hotbar {
  display: none !important;
}

/* ---------------- Top Toolbar Island Switcher ---------------- */
.cam-island-btn {
  gap: 6px;
}

.cam-island-btn.is-creative {
  background: #e9f6ee;
  border-color: rgba(45, 122, 74, 0.35);
  color: #195130;
}



/* ---------------- Slim Dark-Glass Minecraft / Roblox Creative Hotbar ---------------- */
body[data-creative-island="1"] .bottom-dock #add-btn {
  display: none !important;
}

.creative-hotbar {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom, 12px));
  transform: translateX(-50%);
  z-index: 16;
  max-width: min(94vw, 560px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.creative-hotbar[hidden] {
  display: none !important;
}

body[data-walk-mobile="1"] .creative-hotbar {
  max-width: calc(100vw - 220px);
  bottom: max(14px, env(safe-area-inset-bottom, 14px));
}

.ch-slim-shell {
  pointer-events: auto;
  width: 100%;
  padding: 6px 8px 7px;
  border-radius: 14px;
  background: rgba(15, 19, 24, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ch-collapsed-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 19, 24, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.ch-expand-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #f8fafc;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.15s ease;
}

.ch-expand-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.ch-top-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
}

.ch-cat-row {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ch-cat-row::-webkit-scrollbar {
  display: none;
}

.ch-cat-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(248, 250, 252, 0.65);
  font: inherit;
  font-size: 0.71rem;
  font-weight: 640;
  padding: 4px 8px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.ch-cat-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.ch-cat-btn.is-active {
  background: rgba(255, 255, 255, 0.94);
  color: #0f1318;
}

.ch-tools-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.ch-mode-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ch-mode-btn {
  appearance: none;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(248, 250, 252, 0.78);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 650;
  padding: 3px 7px;
  min-width: 26px;
  height: 24px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.14s ease, color 0.14s ease, transform 0.14s ease;
}

.ch-mode-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.ch-mode-btn.is-active {
  background: #22c55e;
  color: #052e16;
}

.ch-rot-btn {
  font-size: 0.68rem;
  padding: 3px 6px;
  font-variant-numeric: tabular-nums;
}

.ch-ai-btn {
  appearance: none;
  border: 1px solid rgba(167, 139, 250, 0.45);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.85) 0%, rgba(79, 70, 229, 0.85) 100%);
  color: #ffffff;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.15s ease;
}

.ch-ai-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.ch-ai-btn:active {
  transform: scale(0.94);
}

.ch-collapse-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(248, 250, 252, 0.82);
  width: 26px;
  height: 26px;
  border-radius: 7px;
  font-size: 0.78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.ch-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.ch-mats-row {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 1px;
}

.ch-mats-row::-webkit-scrollbar {
  display: none;
}

.ch-mat-btn {
  appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 52px;
  height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 2px 3px;
  border-radius: 9px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(248, 250, 252, 0.86);
  font: inherit;
  cursor: pointer;
  transition:
    transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1),
    border-color 0.14s ease,
    background-color 0.14s ease,
    box-shadow 0.16s ease;
}

.ch-mat-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.14);
}

.ch-mat-btn.is-active {
  border-color: #4ade80;
  background: rgba(34, 197, 94, 0.22);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.ch-mat-swatch {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
}

.ch-mat-icon {
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.ch-mat-name {
  font-size: 0.61rem;
  font-weight: 640;
  max-width: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1;
}

.ch-mat-key {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 0.56rem;
  font-weight: 700;
  color: rgba(248, 250, 252, 0.5);
  font-variant-numeric: tabular-nums;
}

.ch-mat-btn.is-active .ch-mat-key {
  color: #86efac;
}

/* Contextual Floating Photo Picker Mini-Pill (Only when Bingkai Foto active) */
.ch-photo-bar {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 6px;
  border-radius: 999px;
  background: rgba(15, 19, 24, 0.86);
  border: 1px solid rgba(251, 191, 36, 0.55);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ch-photo-pick-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f59e0b;
  color: #1c1917;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.ch-photo-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #fbbf24;
}

.ch-photo-tip {
  font-size: 0.7rem;
  font-weight: 600;
  color: #fef3c7;
  white-space: nowrap;
}

/* ---------------- Creative Islands Portal Dialog ---------------- */
.islands-dialog {
  margin: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  width: min(95vw, 760px);
  max-width: min(95vw, 760px);
  max-height: min(92dvh, 740px);
  overflow: visible;
  font-family: var(--font-sans);
}

.islands-dialog:not([open]) {
  display: none !important;
}

.islands-dialog::backdrop {
  background: rgba(14, 22, 16, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.isl-modal {
  display: flex;
  flex-direction: column;
  max-height: min(90dvh, 720px);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(22, 27, 24, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  user-select: text;
}

.isl-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px 12px;
  border-bottom: 1px solid var(--border);
}

.isl-modal-title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 690;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.isl-modal-sub {
  margin: 3px 0 0;
  font-size: 0.79rem;
  line-height: 1.38;
  color: var(--ink-muted);
}

.isl-close-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.isl-close-btn:hover {
  background: #e9eee9;
}

.isl-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 4px;
  margin: 12px 18px 0;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.isl-tab {
  appearance: none;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 620;
  padding: 8px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.isl-tab.is-active {
  background: var(--ink);
  color: var(--white);
}

.isl-error {
  margin: 10px 18px 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: #fdeceb;
  border: 1px solid rgba(223, 82, 70, 0.35);
  color: #8f261f;
  font-size: 0.81rem;
  font-weight: 580;
}

.isl-modal-body {
  padding: 14px 18px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.isl-invite-box,
.isl-teacher-auth {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.isl-invite-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.86rem;
}

.isl-invite-target {
  font-size: 0.77rem;
  font-weight: 620;
  color: var(--meadow-accent);
}

.isl-invite-fields {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 9px;
}

@media (max-width: 620px) {
  .isl-invite-fields {
    grid-template-columns: 1fr;
  }
}

.isl-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.isl-field span {
  font-size: 0.74rem;
  font-weight: 620;
  color: var(--ink-muted);
}

.isl-field input {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  padding: 8px 10px;
  outline: none;
}

.isl-field input:focus {
  border-color: var(--ink);
}

.isl-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 620px) {
  .isl-cards-grid {
    grid-template-columns: 1fr;
  }
}

.isl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.14s ease;
}

.isl-card.is-current {
  border-color: var(--ink);
  background: #f5faf6;
}

.isl-card-stripe {
  height: 4px;
  width: 100%;
  background: var(--isl-accent, var(--meadow-accent));
}

.isl-card-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 11px 13px 12px;
  flex: 1;
}

.isl-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.isl-card-head h3 {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
}

.isl-access-note {
  font-size: 0.72rem;
  font-weight: 640;
  color: var(--ink-muted);
  white-space: nowrap;
}

.isl-card-desc {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--ink-muted);
  flex: 1;
}

.isl-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.isl-stats {
  font-size: 0.74rem;
  font-weight: 580;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.isl-current-label {
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--meadow-accent);
}

.isl-teacher-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.isl-t-card {
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--isl-accent, var(--meadow-accent));
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.isl-t-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.isl-t-top strong {
  font-size: 0.95rem;
  color: var(--ink);
}

.isl-t-code-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.isl-t-code-label {
  font-size: 0.71rem;
  font-weight: 620;
  color: var(--ink-muted);
}

.isl-t-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.96rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.isl-t-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.isl-btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 620;
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s ease, opacity 0.14s ease;
}

.isl-btn:hover:not(:disabled) {
  background: #eef2ee;
}

.isl-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.isl-btn-primary {
  border: none;
  background: var(--ink);
  color: var(--white);
}

.isl-btn-primary:hover:not(:disabled) {
  background: #242b27;
}

.isl-btn-danger {
  border-color: rgba(217, 78, 67, 0.35);
  color: #9e271f;
}

.isl-btn-danger:hover:not(:disabled) {
  background: #fdeceb;
}

.isl-loading {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.isl-create-box {
  padding: 13px 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.isl-create-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.isl-create-foot {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.isl-color-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.isl-color-dot {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.isl-color-dot:hover {
  transform: scale(1.1);
}

.isl-color-dot.is-active {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px #ffffff inset;
}

.isl-empty-note {
  padding: 16px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink);
}

.isl-empty-note p {
  margin: 0;
}

/* ============================================================================
   STARCRAFT — OPENING SCREEN, AUTH, PROFILE STUDIO & REAL-TIME CHAT
   Typography: Outfit (Display) + Plus Jakarta Sans (Body), tabular-nums
   ============================================================================ */

.sc-num {
  font-variant-numeric: tabular-nums;
}

.cam-profile-btn.is-signed-in {
  background: #edf5ef;
  border-color: rgba(44, 122, 75, 0.34);
  color: #16472a;
}

.cam-chat-btn {
  position: relative;
}

.sc-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------------- StarCraft Opening / Welcome Screen ---------------- */
.sc-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top, 18px)) max(22px, env(safe-area-inset-right, 22px))
    max(18px, env(safe-area-inset-bottom, 18px)) max(22px, env(safe-area-inset-left, 22px));
  font-family: "Plus Jakarta Sans", var(--font-sans);
  color: #ffffff;
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.sc-intro-overlay[hidden] {
  display: none !important;
}

.sc-intro-overlay.is-dismissed {
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
}

.sc-intro-bg {
  position: absolute;
  inset: 0;
  background: url("/assets/aistudio/Gemini_Generated_Image_3t8trv3t8trv3t8t_2eaab1cc.jpg") center 42% / cover no-repeat;
  z-index: 0;
}

.sc-intro-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      180deg,
      rgba(10, 22, 34, 0.36) 0%,
      rgba(10, 22, 34, 0.04) 22%,
      rgba(10, 22, 34, 0.06) 66%,
      rgba(10, 22, 34, 0.44) 100%
    );
}

.sc-intro-top,
.sc-intro-center,
.sc-intro-foot {
  position: relative;
  z-index: 2;
}

.sc-intro-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.sc-intro-brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 10px;
  background: rgba(12, 24, 38, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.94);
}

.sc-intro-brand-name {
  font-family: "Outfit", var(--font-sans);
  font-weight: 800;
  color: #ffd54f;
  letter-spacing: 0.02em;
}

.sc-intro-brand-sep {
  opacity: 0.55;
}

.sc-intro-user {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(12, 24, 38, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sc-avatar-chip {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Outfit", var(--font-sans);
  font-weight: 800;
  font-size: 0.78rem;
  color: #ffffff;
  flex-shrink: 0;
}

.sc-intro-user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  padding-right: 4px;
}

.sc-intro-user-meta strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
}

.sc-intro-user-meta span {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.78);
  font-variant-numeric: tabular-nums;
}

.sc-intro-mini-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.12s ease;
}

.sc-intro-mini-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.sc-intro-mini-btn.is-accent {
  background: #2f9e44;
  border-color: #69db7c;
  color: #ffffff;
}

.sc-intro-mini-btn.is-subtle {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.84);
}

.sc-intro-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  gap: 14px;
  flex: 1 1 auto;
  padding: 0 0 clamp(14px, 4vh, 40px);
}

.sc-intro-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(100%, 640px);
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(11, 24, 38, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 18px 42px rgba(6, 14, 24, 0.42);
}

.sc-intro-primary-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.sc-intro-secondary-row {
  display: flex;
  justify-content: center;
  width: 100%;
}

.sc-voxel-btn {
  appearance: none;
  font-family: "Outfit", var(--font-sans);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  color: #ffffff;
  padding: 13px 20px;
  border-radius: 10px;
  border: 2px solid #0e1726;
  cursor: pointer;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  box-shadow: 0 4px 0 #0e1726, inset 0 2px 0 rgba(255, 255, 255, 0.34);
  transition: transform 0.12s ease, filter 0.14s ease, box-shadow 0.12s ease;
}

.sc-voxel-btn:hover {
  filter: brightness(1.07);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #0e1726, inset 0 2px 0 rgba(255, 255, 255, 0.42);
}

.sc-voxel-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #0e1726;
}

.sc-voxel-btn.is-green {
  background: linear-gradient(180deg, #52c41a 0%, #2f8f20 100%);
}

.sc-voxel-btn.is-hero {
  font-size: 1.18rem;
}

.sc-voxel-btn.is-blue {
  background: linear-gradient(180deg, #2b82e6 0%, #1956a8 100%);
}

.sc-voxel-btn.is-slate {
  background: linear-gradient(180deg, #4b617b 0%, #2e3e52 100%);
  min-width: 210px;
}

.sc-voxel-btn.is-red {
  background: linear-gradient(180deg, #df3b3b 0%, #a61e22 100%);
}

.sc-voxel-btn.is-sm {
  font-size: 0.84rem;
  padding: 9px 16px;
  min-width: auto;
}

.sc-intro-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sc-intro-foot-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 640px) {
  .sc-intro-primary-row {
    grid-template-columns: 1fr;
  }
  .sc-intro-title-block {
    padding: 12px 16px;
  }
  .sc-voxel-btn.is-slate {
    width: 100%;
  }
}

/* ---------------- StarCraft Dialogs (Auth + Profile Studio) ---------------- */
.sc-dialog {
  margin: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: #161b18;
  font-family: "Plus Jakarta Sans", var(--font-sans);
  overflow: visible;
}

.sc-dialog:not([open]) {
  display: none !important;
}

.sc-dialog::backdrop {
  background: rgba(12, 22, 26, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.sc-auth-dialog {
  width: min(94vw, 560px);
  max-width: min(94vw, 560px);
}

.sc-profile-dialog {
  width: min(96vw, 1020px);
  max-width: min(96vw, 1020px);
  max-height: min(92dvh, 820px);
}

.sc-auth-modal,
.sc-studio-modal {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid rgba(22, 27, 24, 0.12);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(10, 20, 24, 0.28);
  overflow: hidden;
  user-select: text;
}

.sc-auth-modal {
  max-height: min(90dvh, 720px);
  overflow-y: auto;
}

.sc-studio-modal {
  height: min(90dvh, 780px);
}

.sc-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 13px;
  border-bottom: 1px solid rgba(22, 27, 24, 0.09);
  background: #f8faf8;
}

.sc-modal-title {
  margin: 0;
  font-family: "Outfit", var(--font-sans);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #131c17;
}

.sc-modal-sub {
  margin: 3px 0 0;
  font-size: 0.81rem;
  color: #506058;
}

.sc-close-btn {
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(22, 27, 24, 0.14);
  background: #ffffff;
  color: #161b18;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sc-close-btn:hover {
  background: #eef2ee;
}

.sc-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 12px 20px 0;
}

.sc-tab {
  appearance: none;
  border: 1px solid rgba(22, 27, 24, 0.12);
  background: #f3f6f4;
  color: #3f4f47;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.sc-tab.is-active {
  background: #16241c;
  border-color: #16241c;
  color: #ffffff;
}

.sc-error {
  margin: 12px 20px 0;
  padding: 10px 13px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.82rem;
  font-weight: 600;
}

.sc-notice {
  margin: 0 0 12px;
  padding: 10px 13px;
  border-radius: 10px;
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 0.82rem;
  font-weight: 600;
}

.sc-studio-body .sc-error {
  margin: 0 0 12px;
}

.sc-form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px 20px;
}

.sc-panel-card.sc-form-stack,
.sc-panel-card .sc-form-stack {
  padding: 0;
}

.sc-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

.sc-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 620;
  color: #36453d;
}

.sc-field input,
.sc-field select,
.sc-field textarea,
.sc-inline-form input,
.sc-inline-form select,
.sc-toolbar-filters input,
.sc-toolbar-filters select,
.sc-chat-composer input,
.sc-subform-head select {
  font: inherit;
  font-size: 0.85rem;
  color: #161b18;
  background: #ffffff;
  border: 1px solid rgba(22, 27, 24, 0.2);
  border-radius: 9px;
  padding: 8px 11px;
  outline: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.sc-field input:focus,
.sc-field select:focus,
.sc-field textarea:focus,
.sc-inline-form input:focus,
.sc-chat-composer input:focus {
  border-color: #1e6b3d;
  box-shadow: 0 0 0 3px rgba(30, 107, 61, 0.14);
}

.sc-role-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sc-role-card {
  appearance: none;
  text-align: left;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1.5px solid rgba(22, 27, 24, 0.15);
  background: #f8faf8;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.sc-role-card strong {
  font-family: "Outfit", var(--font-sans);
  font-size: 0.94rem;
  color: #161b18;
}

.sc-role-card span {
  font-size: 0.75rem;
  line-height: 1.38;
  color: #506058;
}

.sc-role-card.is-active {
  border-color: #1e6b3d;
  background: #ecf7f0;
}

.sc-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 2px;
}

.sc-btn {
  appearance: none;
  border: 1px solid rgba(22, 27, 24, 0.2);
  background: #ffffff;
  color: #161b18;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s ease, opacity 0.14s ease;
}

.sc-btn:hover:not(:disabled) {
  background: #f0f4f1;
}

.sc-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.sc-btn-sm {
  font-size: 0.76rem;
  padding: 6px 10px;
}

.sc-btn-primary {
  background: #16241c;
  border-color: #16241c;
  color: #ffffff;
}

.sc-btn-primary:hover:not(:disabled) {
  background: #24392d;
}

.sc-btn-accent {
  background: #1e6b3d;
  border-color: #1e6b3d;
  color: #ffffff;
}

.sc-btn-accent:hover:not(:disabled) {
  background: #185832;
}

.sc-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: #4b5b52;
}

.sc-btn-danger {
  border-color: rgba(217, 78, 67, 0.35);
  color: #9e271f;
}

.sc-btn-danger:hover:not(:disabled) {
  background: #fdeceb;
}

/* ---------------- Profile Studio 2-Column Layout ---------------- */
.sc-studio-layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  flex: 1 1 auto;
  min-height: 0;
}

.sc-studio-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px;
  background: #f5f8f6;
  border-right: 1px solid rgba(22, 27, 24, 0.09);
  overflow-y: auto;
}

.sc-nav-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #36453d;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 620;
  text-align: left;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.sc-nav-btn:hover {
  background: rgba(22, 36, 28, 0.06);
  color: #131c17;
}

.sc-nav-btn.is-active {
  background: #16241c;
  color: #ffffff;
}

.sc-nav-btn.is-subtle {
  color: #506058;
}

.sc-nav-btn.is-danger {
  color: #9e271f;
}

.sc-nav-spacer {
  flex: 1 1 auto;
  min-height: 12px;
}

.sc-studio-body {
  padding: 18px 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.sc-hero-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #f5f8f6;
  border: 1px solid rgba(22, 27, 24, 0.09);
}

.sc-hero-avatar {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Outfit", var(--font-sans);
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
}

.sc-hero-info {
  flex: 1 1 auto;
  min-width: 0;
}

.sc-hero-top {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.sc-hero-top h3 {
  margin: 0;
  font-family: "Outfit", var(--font-sans);
  font-size: 1.16rem;
  font-weight: 700;
  color: #131c17;
}

.sc-meta-accent {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e6b3d;
}

.sc-meta-line {
  margin: 3px 0 0;
  font-size: 0.77rem;
  color: #55655c;
}

.sc-level-row {
  margin-top: 10px;
}

.sc-level-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  margin-bottom: 5px;
}

.sc-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(22, 27, 24, 0.1);
  overflow: hidden;
}

.sc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1e6b3d 0%, #3fb963 100%);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.sc-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex-shrink: 0;
}

.sc-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.sc-stat-tile {
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(22, 27, 24, 0.1);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sc-stat-tile span {
  font-size: 0.74rem;
  color: #55655c;
  font-weight: 600;
}

.sc-stat-tile strong {
  font-family: "Outfit", var(--font-sans);
  font-size: 1.38rem;
  font-weight: 700;
  color: #131c17;
}

.sc-panel-card {
  padding: 15px 16px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(22, 27, 24, 0.1);
}

.sc-subform {
  background: #f8faf8;
}

.sc-section-title {
  margin: 0 0 10px;
  font-family: "Outfit", var(--font-sans);
  font-size: 0.98rem;
  font-weight: 700;
  color: #131c17;
}

.sc-subform-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.sc-subform-head .sc-section-title {
  margin: 0;
}

.sc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.sc-toolbar-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 240px;
}

.sc-toolbar-filters input {
  flex: 1 1 auto;
  min-width: 140px;
}

.sc-inline-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.sc-inline-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.sc-inline-form input,
.sc-inline-form select {
  flex: 1 1 160px;
}

.sc-q-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sc-q-card {
  padding: 13px 15px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(22, 27, 24, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sc-q-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.sc-q-prompt {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
  color: #131c17;
  line-height: 1.42;
}

.sc-q-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.sc-q-opt {
  padding: 7px 10px;
  border-radius: 8px;
  background: #f5f7f6;
  border: 1px solid rgba(22, 27, 24, 0.08);
  font-size: 0.81rem;
  color: #2c3831;
}

.sc-q-opt.is-correct {
  background: #ecfdf3;
  border-color: rgba(30, 107, 61, 0.35);
  color: #14532d;
  font-weight: 650;
}

.sc-add-student-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(22, 27, 24, 0.09);
}

.sc-two-col-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sc-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 8px;
}

.sc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.81rem;
}

.sc-table th,
.sc-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(22, 27, 24, 0.08);
  vertical-align: middle;
}

.sc-table th {
  font-size: 0.74rem;
  font-weight: 700;
  color: #55655c;
  background: #f8faf8;
}

.sc-ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}

.sc-ach-item {
  padding: 12px 13px;
  border-radius: 12px;
  background: #f8faf8;
  border: 1px solid rgba(22, 27, 24, 0.09);
}

.sc-ach-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.86rem;
}

.sc-ach-item p {
  margin: 4px 0 0;
  font-size: 0.79rem;
  color: #36453d;
  line-height: 1.4;
}

.sc-empty-text {
  margin: 0;
  font-size: 0.84rem;
  color: #55655c;
  line-height: 1.5;
}

/* ---------------- Real-Time Chat Shell ---------------- */
.sc-chat-shell {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  height: min(64dvh, 560px);
  border-radius: 14px;
  border: 1px solid rgba(22, 27, 24, 0.12);
  overflow: hidden;
  background: #ffffff;
}

.sc-chat-sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(22, 27, 24, 0.1);
  background: #f7faf8;
  min-height: 0;
}

.sc-chat-side-head {
  padding: 11px 13px;
  font-size: 0.77rem;
  font-weight: 700;
  color: #46564d;
  border-bottom: 1px solid rgba(22, 27, 24, 0.08);
}

.sc-chat-ch-list {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sc-chat-ch-btn {
  appearance: none;
  border: none;
  border-bottom: 1px solid rgba(22, 27, 24, 0.06);
  background: transparent;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sc-chat-ch-btn:hover {
  background: rgba(22, 36, 28, 0.05);
}

.sc-chat-ch-btn.is-active {
  background: #e9f5ee;
}

.sc-chat-ch-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.sc-chat-ch-top strong {
  font-size: 0.83rem;
  color: #131c17;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-chat-ch-sub {
  font-size: 0.72rem;
  color: #1e6b3d;
  font-weight: 600;
}

.sc-chat-ch-preview {
  font-size: 0.74rem;
  color: #55655c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sc-chat-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.sc-chat-main-head {
  padding: 11px 15px;
  border-bottom: 1px solid rgba(22, 27, 24, 0.09);
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.sc-chat-main-head strong {
  font-family: "Outfit", var(--font-sans);
  font-size: 0.94rem;
  color: #131c17;
}

.sc-chat-feed {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f9fbfa;
}

.sc-chat-empty {
  margin: auto;
  max-width: 320px;
  text-align: center;
  font-size: 0.83rem;
  color: #55655c;
  line-height: 1.5;
}

.sc-chat-bubble {
  max-width: 82%;
  align-self: flex-start;
  padding: 9px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(22, 27, 24, 0.1);
}

.sc-chat-bubble.is-mine {
  align-self: flex-end;
  background: #16241c;
  border-color: #16241c;
  color: #ffffff;
}

.sc-chat-bubble-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.71rem;
  margin-bottom: 3px;
}

.sc-chat-bubble-meta span {
  opacity: 0.72;
}

.sc-chat-bubble p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.44;
  word-break: break-word;
}

.sc-chat-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(22, 27, 24, 0.09);
  background: #ffffff;
}

.sc-chat-composer input {
  flex: 1 1 auto;
}

.sc-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8faf8;
  border: 1px solid rgba(22, 27, 24, 0.09);
}

.sc-about-copy {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #24312a;
}

@media (max-width: 820px) {
  .sc-studio-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .sc-studio-nav {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid rgba(22, 27, 24, 0.09);
    padding: 8px 10px;
  }
  .sc-nav-spacer {
    display: none;
  }
  .sc-nav-btn {
    white-space: nowrap;
  }
  .sc-hero-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .sc-hero-actions {
    flex-direction: row;
  }
  .sc-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sc-two-col-cards,
  .sc-form-grid,
  .sc-form-grid-3,
  .sc-role-picker,
  .sc-q-opts,
  .isl-create-grid {
    grid-template-columns: 1fr;
  }
  .sc-chat-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 440px;
  }
  .sc-chat-sidebar {
    max-height: 165px;
    border-right: none;
    border-bottom: 1px solid rgba(22, 27, 24, 0.1);
  }
}

body[data-og-capture="1"] .sc-intro-overlay,
body[data-og-capture="1"] .cam-profile-btn,
body[data-og-capture="1"] .cam-chat-btn {
  display: none !important;
}

/* ---------------- Education Level Picker (Sign Up Step 1) ---------------- */
.sc-step-tag {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1d6b3b;
  margin-left: 6px;
}

.sc-edu-level-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.sc-edu-level-btn {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 9px 6px;
  border-radius: 11px;
  border: 1.5px solid rgba(22, 27, 24, 0.14);
  background: #f8faf8;
  color: #16241c;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease, transform 0.12s ease;
}

.sc-edu-level-btn:hover {
  border-color: rgba(22, 27, 24, 0.34);
  transform: translateY(-1px);
}

.sc-edu-level-btn strong {
  font-family: "Outfit", var(--font-sans);
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.sc-edu-level-btn span {
  font-size: 0.7rem;
  font-weight: 600;
  color: #55655c;
}

.sc-edu-level-btn.is-active {
  background: #e9f6ee;
  border-color: #2f9e44;
  box-shadow: 0 0 0 2px rgba(47, 158, 68, 0.18);
}

.sc-edu-level-btn.is-active strong {
  color: #14532d;
}

.sc-edu-level-btn.is-active span {
  color: #1e6b3d;
}

.sc-signup-hint {
  margin: 4px 0 0;
  font-size: 0.77rem;
  line-height: 1.45;
  color: #48584f;
}

.sc-signup-hint.is-teacher {
  padding: 9px 11px;
  border-radius: 10px;
  background: #fdf6e9;
  border: 1px solid rgba(180, 120, 40, 0.28);
  color: #6b4214;
}

/* ---------------- Interactive 16:9 Avatar Picker Stage Dialog ---------------- */
.sc-avatar-stage-dialog {
  width: min(96vw, 980px);
  max-width: min(96vw, 980px);
  max-height: 94dvh;
  padding: 0;
  border: none;
  background: transparent;
  overflow: visible;
}

.sc-avatar-stage-dialog::backdrop {
  background: rgba(7, 14, 24, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sc-avatar-stage-modal {
  display: flex;
  flex-direction: column;
  max-height: 94dvh;
  background: #0b1420;
  color: #f4f7fb;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.52);
  overflow: hidden;
  font-family: "Plus Jakarta Sans", var(--font-sans);
}

.sc-avatar-stage-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 13px 16px;
  background: #101c2d;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sc-avatar-stage-heading {
  min-width: 0;
  flex: 1 1 220px;
}

.sc-avatar-stage-title {
  margin: 0;
  font-family: "Outfit", var(--font-sans);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffd54f;
}

.sc-avatar-stage-sub {
  margin: 2px 0 0;
  font-size: 0.77rem;
  color: rgba(232, 241, 252, 0.78);
  line-height: 1.35;
}

.sc-stage-level-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sc-stage-level-tab {
  appearance: none;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(236, 243, 252, 0.78);
  font-family: "Outfit", var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.sc-stage-level-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.sc-stage-level-tab.is-active {
  background: #2f9e44;
  color: #ffffff;
}

.sc-stage-close-btn {
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sc-stage-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.sc-avatar-stage-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(180deg, #3a7bd5 0%, #63b3ed 55%, #3d7a36 100%);
  overflow: hidden;
  user-select: none;
}

.sc-avatar-stage-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.sc-avatar-hotspots {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.sc-avatar-hotspot {
  position: absolute;
  appearance: none;
  border: 3px solid transparent;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0);
  padding: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, transform 0.14s ease;
}

.sc-avatar-hotspot[data-slot="0"] {
  left: 8.5%;
  top: 29%;
  width: 18.5%;
  height: 57%;
}

.sc-avatar-hotspot[data-slot="1"] {
  left: 29.5%;
  top: 29%;
  width: 19.5%;
  height: 54%;
}

.sc-avatar-hotspot[data-slot="2"] {
  left: 54%;
  top: 29%;
  width: 19.5%;
  height: 54%;
}

.sc-avatar-hotspot[data-slot="3"] {
  left: 75.5%;
  top: 30%;
  width: 18.5%;
  height: 56%;
}

.sc-avatar-hotspot:hover {
  border-color: rgba(255, 213, 79, 0.85);
  background: rgba(255, 213, 79, 0.08);
  box-shadow: 0 0 0 3px rgba(10, 22, 36, 0.35);
}

.sc-avatar-hotspot:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

.sc-avatar-hotspot.is-selected {
  border-color: #ffd54f;
  background: rgba(105, 219, 124, 0.1);
  box-shadow:
    0 0 0 3px rgba(47, 158, 68, 0.9),
    0 0 26px rgba(255, 213, 79, 0.55);
}

.sc-hotspot-check {
  margin-top: -12px;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(11, 20, 32, 0.84);
  border: 2px solid rgba(255, 255, 255, 0.45);
  color: #ffffff;
  font-family: "Outfit", var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.36);
}

.sc-avatar-hotspot.is-selected .sc-hotspot-check {
  background: #2f9e44;
  border-color: #ffd54f;
  color: #ffffff;
  transform: scale(1.1);
}

.sc-hotspot-badge {
  margin-bottom: 6px;
  max-width: 96%;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(11, 20, 32, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.sc-avatar-hotspot:hover .sc-hotspot-badge,
.sc-avatar-hotspot.is-selected .sc-hotspot-badge {
  opacity: 1;
  transform: translateY(0);
}

.sc-avatar-hotspot.is-selected .sc-hotspot-badge {
  background: rgba(20, 83, 45, 0.94);
  border-color: #ffd54f;
  color: #fff9db;
}

.sc-stage-error {
  margin: 10px 16px 0;
}

.sc-avatar-stage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 13px 16px;
  background: #101c2d;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sc-stage-selection-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 260px;
}

.sc-stage-selection-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #69db7c;
}

.sc-stage-selection-info strong {
  font-family: "Outfit", var(--font-sans);
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
}

.sc-stage-selection-info p {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(226, 236, 248, 0.78);
  line-height: 1.35;
}

.sc-stage-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sc-stage-back-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #f4f7fb;
}

.sc-stage-back-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
}

.sc-stage-pilih-btn {
  min-width: 148px;
  padding: 11px 28px;
  font-size: 0.98rem;
  letter-spacing: 0.05em;
}

@media (max-width: 640px) {
  .sc-edu-level-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sc-avatar-stage-topbar {
    padding: 10px 12px;
  }
  .sc-stage-level-tab {
    padding: 5px 9px;
    font-size: 0.76rem;
  }
  .sc-hotspot-badge {
    font-size: 0.62rem;
    padding: 2px 5px;
  }
  .sc-hotspot-check {
    min-width: 22px;
    height: 22px;
    font-size: 0.7rem;
  }
  .sc-avatar-stage-footer {
    padding: 11px 12px;
  }
  .sc-stage-actions {
    width: 100%;
    justify-content: space-between;
  }
  .sc-stage-pilih-btn {
    flex: 1 1 auto;
  }
}

/* ==========================================================================
   Social Profile Photos, 6-Emote Bar, Encounter Card, Auto-Follow & WebRTC Voice
   ========================================================================== */

.sc-num {
  font-variant-numeric: tabular-nums;
}

/* Profile Dialog: Photo Upload & Follower Counts */
.sc-hero-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sc-hero-avatar.has-photo {
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 18px rgba(15, 28, 18, 0.16);
}

.sc-hero-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sc-photo-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sc-photo-upload-btn,
.sc-photo-remove-btn {
  appearance: none;
  border-radius: 999px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1;
  padding: 6px 10px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sc-photo-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #161b18;
  border: 1px solid rgba(22, 27, 24, 0.22);
}

.sc-photo-upload-btn:hover {
  background: #eef4ff;
  border-color: #136ce0;
  color: #136ce0;
}

.sc-photo-remove-btn {
  background: #fff5f5;
  color: #b42318;
  border: 1px solid rgba(180, 35, 24, 0.26);
}

.sc-photo-remove-btn:hover {
  background: #fee4e2;
  border-color: #b42318;
}

.sc-social-counts-line {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sc-social-counts-line strong {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sc-avatar-chip.has-photo {
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.sc-avatar-chip.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Shared Circular Social Avatar */
.sc-social-avatar {
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
  font-weight: 750;
  letter-spacing: -0.02em;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 3px 10px rgba(15, 28, 18, 0.16);
}

.sc-social-avatar.is-xs {
  width: 28px;
  height: 28px;
  font-size: 0.7rem;
}

.sc-social-avatar.is-sm {
  width: 36px;
  height: 36px;
  font-size: 0.82rem;
}

.sc-social-avatar.is-md {
  width: 44px;
  height: 44px;
  font-size: 0.94rem;
}

.sc-social-avatar.is-lg {
  width: 56px;
  height: 56px;
  font-size: 1.12rem;
}

.sc-social-avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Top Toolbar Emote Button & Popover (no backdrop-filter over WebGL) */
.cam-emote-btn.is-active {
  background: #161b18;
  color: #ffffff;
  border-color: #161b18;
}

.sc-emote-popover {
  position: fixed;
  top: max(62px, calc(env(safe-area-inset-top, 14px) + 48px));
  right: max(14px, env(safe-area-inset-right, 14px));
  z-index: 18;
  width: min(292px, calc(100vw - 28px));
  padding: 12px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(22, 27, 24, 0.14);
  box-shadow: 0 14px 34px rgba(15, 28, 18, 0.2), 0 2px 6px rgba(15, 28, 18, 0.08);
  color: var(--ink);
}

.sc-emote-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}

.sc-mini-close {
  appearance: none;
  border: 1px solid rgba(22, 27, 24, 0.12);
  background: #f3f5f4;
  color: var(--ink);
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.14s ease, color 0.14s ease;
}

.sc-mini-close:hover {
  background: #161b18;
  color: #ffffff;
  border-color: #161b18;
}

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

.sc-emote-btn {
  appearance: none;
  border: 1px solid rgba(22, 27, 24, 0.14);
  background: #f6f8f6;
  color: #161b18;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 9px 6px;
  border-radius: 11px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.12s ease;
}

.sc-emote-btn:hover {
  background: #eaf3ff;
  border-color: #136ce0;
  color: #0e4fa6;
}

.sc-emote-btn:active {
  transform: scale(0.97);
}

.sc-emote-btn.is-recent {
  background: #136ce0;
  border-color: #136ce0;
  color: #ffffff;
}

/* Top-Center Social Invite ("Ikuti Aku") & Active Auto-Follow Stack */
.sc-social-top-stack {
  position: fixed;
  top: max(66px, calc(env(safe-area-inset-top, 14px) + 52px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 19;
  width: min(500px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.sc-invite-card,
.sc-following-bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 15px;
  background: #ffffff;
  border: 1px solid rgba(22, 27, 24, 0.15);
  box-shadow: 0 12px 28px rgba(15, 28, 18, 0.18), 0 2px 6px rgba(15, 28, 18, 0.08);
  color: var(--ink);
}

.sc-invite-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sc-invite-copy strong {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-invite-copy span {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.sc-invite-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sc-following-bar {
  justify-content: space-between;
  background: #f0fdf4;
  border-color: rgba(31, 140, 77, 0.34);
  font-size: 0.8rem;
  color: #14532d;
}

.sc-following-bar > span {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.3;
}

/* WebRTC Voice Chat Status / Incoming Call Bar */
.sc-social-voice-stack {
  position: fixed;
  top: max(14px, env(safe-area-inset-top, 14px));
  left: max(14px, env(safe-area-inset-left, 14px));
  z-index: 20;
  width: min(390px, calc(100vw - 28px));
  pointer-events: none;
}

.sc-voice-card {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 15px;
  background: #ffffff;
  border: 1px solid rgba(22, 27, 24, 0.16);
  box-shadow: 0 14px 32px rgba(15, 28, 18, 0.2), 0 2px 6px rgba(15, 28, 18, 0.08);
  color: var(--ink);
}

.sc-voice-card.is-incoming {
  border-color: #1f8c4d;
  background: #f4fdf7;
}

.sc-voice-card.is-active {
  border-color: #136ce0;
  background: #ffffff;
}

.sc-voice-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sc-voice-copy strong {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-voice-copy span {
  font-size: 0.74rem;
  font-weight: 600;
  color: #1f6d42;
}

.sc-voice-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Encounter Profile Card (Bottom-Center above +Add dock, leaves 3D center open) */
.sc-encounter-hud {
  position: fixed;
  left: 50%;
  bottom: max(78px, calc(env(safe-area-inset-bottom, 16px) + 64px));
  transform: translateX(-50%);
  z-index: 17;
  width: min(468px, calc(100vw - 24px));
  pointer-events: none;
}

.sc-encounter-card {
  pointer-events: auto;
  position: relative;
  padding: 14px 15px 13px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(22, 27, 24, 0.15);
  box-shadow: 0 18px 44px rgba(15, 28, 18, 0.22), 0 2px 8px rgba(15, 28, 18, 0.08);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sc-encounter-close {
  position: absolute;
  top: 10px;
  right: 10px;
}

.sc-encounter-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 28px;
}

.sc-encounter-meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sc-encounter-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sc-encounter-name-row h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.015em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.sc-mutual-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e7f6ed;
  border: 1px solid rgba(31, 140, 77, 0.28);
  color: #166534;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.sc-encounter-sub {
  margin: 0;
  font-size: 0.76rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-encounter-counts {
  margin: 2px 0 0;
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.sc-encounter-counts strong {
  color: var(--ink);
  font-weight: 700;
}

.sc-encounter-bio {
  margin: 3px 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #36413b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sc-encounter-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.sc-enc-btn {
  appearance: none;
  border: 1px solid rgba(22, 27, 24, 0.16);
  background: #f5f7f6;
  color: #161b18;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 680;
  line-height: 1.1;
  padding: 8px 10px;
  min-height: 34px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.1s ease;
}

.sc-enc-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.sc-enc-btn:disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.sc-enc-btn.is-primary {
  background: #136ce0;
  border-color: #136ce0;
  color: #ffffff;
}

.sc-enc-btn.is-primary:hover:not(:disabled) {
  background: #0f58ba;
  border-color: #0f58ba;
}

.sc-enc-btn.is-secondary {
  background: #f4f6f5;
  border-color: rgba(22, 27, 24, 0.18);
  color: #161b18;
}

.sc-enc-btn.is-secondary:hover:not(:disabled) {
  background: #e9eeec;
}

.sc-enc-btn.is-following {
  background: #eef4ff;
  border-color: rgba(19, 108, 224, 0.35);
  color: #0f4fa8;
}

.sc-enc-btn.is-following:hover:not(:disabled) {
  background: #dfeaff;
}

.sc-enc-btn.is-mutual {
  background: #e7f6ed;
  border-color: rgba(31, 140, 77, 0.38);
  color: #14532d;
}

.sc-enc-btn.is-mutual:hover:not(:disabled) {
  background: #d7f0e1;
}

.sc-enc-btn.is-chat {
  background: #161b18;
  border-color: #161b18;
  color: #ffffff;
}

.sc-enc-btn.is-chat:hover:not(:disabled) {
  background: #2b342e;
}

.sc-enc-btn.is-voice {
  background: #1f8c4d;
  border-color: #1f8c4d;
  color: #ffffff;
}

.sc-enc-btn.is-voice:hover:not(:disabled) {
  background: #176f3c;
}

.sc-enc-btn.is-locked {
  background: #f2f4f3;
  border-color: rgba(22, 27, 24, 0.12);
  color: #6b766f;
}

.sc-enc-btn.is-locked:hover {
  background: #eaeeec;
  color: #46504a;
}

.sc-enc-btn.is-muted {
  background: #fef3c7;
  border-color: rgba(180, 83, 9, 0.35);
  color: #92400e;
}

.sc-enc-btn.is-danger {
  background: #c63e37;
  border-color: #c63e37;
  color: #ffffff;
}

.sc-enc-btn.is-danger:hover:not(:disabled) {
  background: #a52f29;
}

.sc-enc-btn.is-disabled {
  background: #f2f4f3;
  border-color: rgba(22, 27, 24, 0.1);
  color: #7c8680;
}

.sc-encounter-hint {
  margin: -2px 0 0;
  font-size: 0.74rem;
  color: #526058;
  background: #f5f7f6;
  border-radius: 9px;
  padding: 6px 9px;
}

.sc-encounter-emotes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  padding-top: 8px;
  border-top: 1px solid rgba(22, 27, 24, 0.08);
}

.sc-enc-emote-btn {
  appearance: none;
  border: 1px solid rgba(22, 27, 24, 0.12);
  background: #f8faf8;
  color: #1f2923;
  font: inherit;
  font-size: 0.71rem;
  font-weight: 640;
  padding: 6px 4px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.sc-enc-emote-btn:hover {
  background: #e8f1ff;
  border-color: #136ce0;
  color: #0e4fa6;
}

/* Quick Mutual DM Chat Drawer (Bottom-Right) */
.sc-quick-chat-hud {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 16px));
  bottom: max(18px, env(safe-area-inset-bottom, 18px));
  z-index: 22;
  width: min(336px, calc(100vw - 24px));
  pointer-events: none;
}

.sc-qchat-box {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  height: min(372px, 56vh);
  border-radius: 17px;
  background: #ffffff;
  border: 1px solid rgba(22, 27, 24, 0.16);
  box-shadow: 0 18px 46px rgba(15, 28, 18, 0.24), 0 2px 8px rgba(15, 28, 18, 0.08);
  overflow: hidden;
  color: var(--ink);
}

.sc-qchat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f7f9f8;
  border-bottom: 1px solid rgba(22, 27, 24, 0.1);
}

.sc-qchat-title {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sc-qchat-title strong {
  font-size: 0.86rem;
  font-weight: 720;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-qchat-title span {
  font-size: 0.71rem;
  font-weight: 600;
  color: #1f6d42;
}

.sc-qchat-feed {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #ffffff;
  user-select: text;
}

.sc-qchat-empty {
  margin: auto 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-muted);
  padding: 16px 8px;
}

.sc-qchat-bubble {
  max-width: 84%;
  align-self: flex-start;
  padding: 8px 11px;
  border-radius: 13px 13px 13px 4px;
  background: #f1f4f2;
  color: #161b18;
}

.sc-qchat-bubble.is-mine {
  align-self: flex-end;
  border-radius: 13px 13px 4px 13px;
  background: #136ce0;
  color: #ffffff;
}

.sc-qchat-bubble p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.38;
  word-break: break-word;
}

.sc-qchat-bubble time {
  display: block;
  margin-top: 3px;
  font-size: 0.65rem;
  opacity: 0.72;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sc-qchat-form {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  background: #f7f9f8;
  border-top: 1px solid rgba(22, 27, 24, 0.1);
}

.sc-qchat-form input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid rgba(22, 27, 24, 0.18);
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  padding: 8px 11px;
  border-radius: 10px;
  outline: none;
  user-select: text;
}

.sc-qchat-form input:focus {
  border-color: #136ce0;
  box-shadow: 0 0 0 2px rgba(19, 108, 224, 0.16);
}



/* ==========================================================================
   Featured Public Voxel Sculptures Gallery (.fg-*)
   Zero backdrop-filter over WebGL, zero static metadata pills, tabular nums
   ========================================================================== */

body[data-og-capture="1"] .cam-gallery-btn,
body[data-og-capture="1"] .cam-tour-btn,
body[data-og-capture="1"] .tour-overlay {
  display: none !important;
}

.fg-dialog {
  width: min(94vw, 960px);
  max-width: min(94vw, 960px);
  max-height: min(88dvh, 780px);
  padding: 0;
  border: none;
  background: transparent;
  overflow: visible;
  margin: auto;
}

.fg-dialog::backdrop {
  background: rgba(14, 22, 18, 0.56);
}

.fg-modal {
  display: flex;
  flex-direction: column;
  max-height: min(88dvh, 780px);
  background: #fcfdfb;
  color: #161b18;
  border-radius: 20px;
  border: 1px solid rgba(22, 27, 24, 0.14);
  box-shadow: 0 28px 64px rgba(10, 20, 14, 0.34), 0 4px 14px rgba(10, 20, 14, 0.12);
  overflow: hidden;
  font-family: "Plus Jakarta Sans", var(--font-sans);
}

.fg-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px 14px;
  background: #ffffff;
  border-bottom: 1px solid rgba(22, 27, 24, 0.09);
}

.fg-title {
  margin: 0;
  font-family: "Outfit", var(--font-sans);
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #131c17;
}

.fg-subtitle {
  margin: 3px 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: #53635a;
  font-variant-numeric: tabular-nums;
}

.fg-close-btn {
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(22, 27, 24, 0.14);
  background: #f4f7f5;
  color: #161b18;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.fg-close-btn:hover {
  background: #161b18;
  color: #ffffff;
  border-color: #161b18;
}

.fg-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 22px 10px;
  background: #f6f9f7;
  border-bottom: 1px solid rgba(22, 27, 24, 0.08);
}

.fg-search-wrap {
  position: relative;
  flex: 1 1 220px;
  min-width: 180px;
  display: flex;
  align-items: center;
}

.fg-search-icon {
  position: absolute;
  left: 11px;
  width: 15px;
  height: 15px;
  color: #63736a;
  pointer-events: none;
}

.fg-search-input {
  width: 100%;
  font: inherit;
  font-size: 0.84rem;
  color: #161b18;
  background: #ffffff;
  border: 1px solid rgba(22, 27, 24, 0.18);
  border-radius: 10px;
  padding: 8px 12px 8px 34px;
  outline: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.fg-search-input:focus {
  border-color: #2c7a4b;
  box-shadow: 0 0 0 3px rgba(44, 122, 75, 0.14);
}

.fg-seg-group {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 10px;
  background: #e9efeb;
  border: 1px solid rgba(22, 27, 24, 0.08);
  gap: 2px;
}

.fg-seg-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #3e4e45;
  font: inherit;
  font-size: 0.77rem;
  font-weight: 650;
  padding: 6px 11px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.fg-seg-btn:hover {
  color: #131c17;
}

.fg-seg-btn.is-active {
  background: #16241c;
  color: #ffffff;
}

.fg-cat-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 9px 22px;
  background: #ffffff;
  border-bottom: 1px solid rgba(22, 27, 24, 0.08);
}

.fg-cat-btn {
  appearance: none;
  border: 1px solid rgba(22, 27, 24, 0.14);
  background: #ffffff;
  color: #3a4a41;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 640;
  padding: 5px 11px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.fg-cat-btn:hover {
  border-color: rgba(22, 27, 24, 0.3);
  color: #131c17;
}

.fg-cat-btn.is-active {
  background: #e8f5ed;
  border-color: #2c7a4b;
  color: #14532d;
}

.fg-result-count {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 600;
  color: #617168;
  font-variant-numeric: tabular-nums;
}

.fg-body {
  flex: 1 1 auto;
  min-height: 220px;
  overflow-y: auto;
  padding: 18px 22px 22px;
  background: #f5f8f6;
}

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

.fg-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 15px;
  border: 1px solid rgba(22, 27, 24, 0.11);
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.fg-card:hover {
  border-color: rgba(44, 122, 75, 0.36);
  box-shadow: 0 12px 26px rgba(15, 28, 18, 0.1);
  transform: translateY(-2px);
}

.fg-preview-wrap {
  position: relative;
  height: 118px;
  background: linear-gradient(180deg, #eff5f1 0%, #e4eee7 100%);
  border-bottom: 1px solid rgba(22, 27, 24, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.fg-preview-svg {
  width: 140px;
  height: 100px;
  display: block;
}

.fg-swatch-strip {
  position: absolute;
  right: 10px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fg-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border: 1px solid rgba(22, 27, 24, 0.18);
}

.fg-card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 12px 13px 13px;
  gap: 5px;
}

.fg-card-title {
  margin: 0;
  font-family: "Outfit", var(--font-sans);
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.25;
  color: #131c17;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fg-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 0.73rem;
  font-weight: 600;
  color: #54645b;
  line-height: 1.3;
}

.fg-coords {
  font-variant-numeric: tabular-nums;
  color: #2c7a4b;
  font-weight: 680;
}

.fg-card-desc {
  margin: 2px 0 6px;
  font-size: 0.78rem;
  line-height: 1.42;
  color: #46544c;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.2em;
}

.fg-card-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(22, 27, 24, 0.08);
}

.fg-like-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 66px;
  padding: 7px 11px;
  border-radius: 10px;
  border: 1px solid rgba(22, 27, 24, 0.16);
  background: #f8faf8;
  color: #36453d;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.12s ease;
}

.fg-like-btn:hover {
  border-color: rgba(217, 78, 67, 0.45);
  background: #fff5f4;
  color: #b83329;
}

.fg-like-btn.is-liked {
  background: #fdeceb;
  border-color: #d94e43;
  color: #c2362b;
}

.fg-like-btn.is-pop {
  animation: fg-like-pop 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes fg-like-pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.13);
  }
  100% {
    transform: scale(1);
  }
}

.fg-heart-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.55;
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.fg-like-btn.is-liked .fg-heart-icon,
.fg-like-btn:hover .fg-heart-icon {
  opacity: 1;
}

.fg-tp-btn {
  appearance: none;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid #2c7a4b;
  background: #2c7a4b;
  color: #ffffff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s ease, border-color 0.14s ease, opacity 0.14s ease;
}

.fg-tp-btn:hover:not(:disabled) {
  background: #22603b;
  border-color: #22603b;
}

.fg-tp-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.fg-tp-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.fg-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 46px 20px;
  color: #46554d;
}

.fg-empty h3 {
  margin: 0;
  font-family: "Outfit", var(--font-sans);
  font-size: 1.05rem;
  color: #131c17;
}

.fg-empty p {
  margin: 0 0 6px;
  font-size: 0.84rem;
  max-width: 340px;
}

.fg-btn {
  appearance: none;
  border: 1px solid rgba(22, 27, 24, 0.2);
  background: #ffffff;
  color: #161b18;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 680;
  padding: 8px 15px;
  border-radius: 10px;
  cursor: pointer;
}

.fg-btn:hover {
  background: #eef3f0;
}

.fg-btn-primary {
  background: #2c7a4b;
  border-color: #2c7a4b;
  color: #ffffff;
}

.fg-btn-primary:hover {
  background: #22603b;
}

.fg-card-skeleton {
  pointer-events: none;
  padding-bottom: 14px;
}

.fg-skel-preview {
  height: 118px;
  background: #e7eeea;
}

.fg-skel-line {
  height: 12px;
  margin: 10px 14px 0;
  border-radius: 6px;
  background: #e7eeea;
}

.fg-skel-line.is-title {
  width: 64%;
  height: 15px;
}

.fg-skel-line.is-meta {
  width: 48%;
}

.fg-skel-line.is-desc {
  width: 86%;
}

@media (max-width: 860px) {
  .fg-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .fg-dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: 92dvh;
  }
  .fg-head,
  .fg-toolbar,
  .fg-cat-row,
  .fg-body {
    padding-left: 14px;
    padding-right: 14px;
  }
  .fg-grid {
    grid-template-columns: 1fr;
  }
  .fg-result-count {
    width: 100%;
    margin-left: 0;
  }
}

/* ==========================================================================
   Interactive Post-Intro Spotlight Onboarding Tour (.tour-*)
   Crisp SVG cutout spotlight + emerald focus ring + floating guide card
   ========================================================================== */

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: auto;
  font-family: "Plus Jakarta Sans", var(--font-sans);
}

.tour-overlay[hidden] {
  display: none !important;
}

.tour-mask-svg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: auto;
}

.tour-scrim-full {
  position: fixed;
  inset: 0;
  background: rgba(14, 22, 18, 0.56);
  pointer-events: auto;
}

.tour-spotlight-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  border: 2.5px solid #48b873;
  box-shadow: 0 0 0 4px rgba(72, 184, 115, 0.24), 0 10px 28px rgba(0, 0, 0, 0.26);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), width 0.22s ease, height 0.22s ease;
}

.tour-spotlight-ring.is-circle {
  border-width: 3px;
  animation: tour-circle-pulse 1.9s ease-in-out infinite;
}

@keyframes tour-circle-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(72, 184, 115, 0.28), 0 10px 28px rgba(0, 0, 0, 0.26);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(72, 184, 115, 0.08), 0 10px 28px rgba(0, 0, 0, 0.26);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tour-spotlight-ring.is-circle {
    animation: none;
  }
}

.tour-card {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 62;
  background: #ffffff;
  color: #161b18;
  border-radius: 18px;
  border: 1px solid rgba(22, 27, 24, 0.14);
  box-shadow: 0 24px 56px rgba(10, 20, 14, 0.34), 0 4px 12px rgba(10, 20, 14, 0.14);
  padding: 16px 18px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.tour-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tour-step-counter {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2c7a4b;
  font-variant-numeric: tabular-nums;
}

.tour-skip-link {
  appearance: none;
  border: none;
  background: transparent;
  padding: 2px 4px;
  color: #5a6a61;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 620;
  cursor: pointer;
}

.tour-skip-link:hover {
  color: #161b18;
  text-decoration: underline;
}

.tour-card-title {
  margin: 0;
  font-family: "Outfit", var(--font-sans);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #131c17;
  line-height: 1.24;
}

.tour-card-body {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #36453d;
}

.tour-card-hint {
  margin: 2px 0 0;
  padding: 7px 10px;
  border-radius: 9px;
  background: #f3f7f4;
  border: 1px solid rgba(44, 122, 75, 0.16);
  font-size: 0.75rem;
  font-weight: 640;
  color: #1e5c37;
}

.tour-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(22, 27, 24, 0.08);
}

.tour-btn {
  appearance: none;
  border-radius: 10px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease, opacity 0.14s ease;
}

.tour-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.tour-btn-ghost {
  background: #f4f7f5;
  border: 1px solid rgba(22, 27, 24, 0.14);
  color: #24312a;
}

.tour-btn-ghost:hover:not(:disabled) {
  background: #e9efeb;
}

.tour-btn-primary {
  background: #2c7a4b;
  border: 1px solid #2c7a4b;
  color: #ffffff;
}

.tour-btn-primary:hover:not(:disabled) {
  background: #22603b;
  border-color: #22603b;
}

@media (max-height: 460px) {
  .tour-card {
    padding: 12px 14px 11px;
    gap: 5px;
    border-radius: 14px;
  }
  .tour-card-title {
    font-size: 0.98rem;
  }
  .tour-card-body {
    font-size: 0.78rem;
    line-height: 1.38;
  }
  .tour-card-hint {
    padding: 5px 8px;
    font-size: 0.7rem;
  }
  .tour-card-foot {
    margin-top: 2px;
    padding-top: 7px;
  }
  .tour-btn {
    padding: 6px 12px;
    font-size: 0.78rem;
  }
}

/* ==========================================================================
   Superadmin Console (.adm-*), Top HUD Admin Trigger & First-Run Claim Banner
   Crisp single-elevation governance console, tabular-nums, zero backdrop blur
   ========================================================================== */

.cam-admin-btn {
  background: #16241c;
  border-color: #16241c;
  color: #ffffff;
}

.cam-admin-btn:hover {
  background: #22352a;
  color: #ffffff;
}

body[data-og-capture="1"] .cam-admin-btn {
  display: none !important;
}

.sc-superadmin-banner {
  margin: 12px 20px 0;
  padding: 11px 14px;
  border-radius: 10px;
  background: #f2f8f4;
  border: 1px solid #c5decb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sc-superadmin-banner-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sc-superadmin-banner-copy strong {
  font-size: 0.84rem;
  font-weight: 700;
  color: #143622;
}

.sc-superadmin-banner-copy span {
  font-size: 0.76rem;
  color: #465d4f;
}

.adm-dialog {
  margin: auto;
  padding: 0;
  border: none;
  background: transparent;
  width: min(96vw, 1220px);
  max-width: min(96vw, 1220px);
  height: min(90dvh, 840px);
  max-height: min(90dvh, 840px);
  color: #111815;
  font-family: "Plus Jakarta Sans", var(--font-sans);
  overflow: visible;
}

.adm-dialog:not([open]) {
  display: none !important;
}

.adm-dialog::backdrop {
  background: rgba(11, 18, 15, 0.62);
}

.adm-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  width: 100%;
  height: 100%;
  background: #f8faf9;
  border: 1px solid #d5ded8;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(10, 18, 14, 0.34);
  overflow: hidden;
  user-select: text;
}

.adm-sidebar {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-right: 1px solid #e2e8e4;
  padding: 18px 14px 16px;
  min-height: 0;
}

.adm-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 8px 14px;
  border-bottom: 1px solid #e7ece9;
  margin-bottom: 12px;
}

.adm-brand strong {
  font-family: "Outfit", var(--font-sans);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #111815;
}

.adm-brand span {
  font-size: 0.74rem;
  font-weight: 600;
  color: #5b6b62;
}

.adm-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
}

.adm-nav-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #36453d;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 620;
  padding: 9px 11px;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.adm-nav-btn:hover {
  background: #f2f5f3;
  color: #111815;
}

.adm-nav-btn.is-active {
  background: #16241c;
  color: #ffffff;
}

.adm-nav-count {
  font-size: 0.75rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  opacity: 0.78;
}

.adm-sidebar-foot {
  margin-top: 12px;
  padding: 12px 8px 2px;
  border-top: 1px solid #e7ece9;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.adm-sidebar-foot strong {
  font-size: 0.83rem;
  font-weight: 700;
  color: #111815;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-sidebar-foot span {
  font-size: 0.73rem;
  color: #5b6b62;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.adm-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8e4;
  flex-shrink: 0;
}

.adm-breadcrumb {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.adm-crumb-root {
  font-size: 0.8rem;
  font-weight: 620;
  color: #627269;
  flex-shrink: 0;
}

.adm-crumb-cur {
  margin: 0;
  font-family: "Outfit", var(--font-sans);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #111815;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.adm-sync-time {
  font-size: 0.75rem;
  color: #627269;
}

.adm-close-btn {
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid #d5ded8;
  background: #ffffff;
  color: #161b18;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.adm-close-btn:hover {
  background: #f0f4f1;
}

.adm-banner {
  margin: 12px 22px 0;
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 620;
  flex-shrink: 0;
}

.adm-banner.is-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.adm-banner.is-ok {
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
  color: #14532d;
}

.adm-content {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.adm-num {
  font-variant-numeric: tabular-nums;
}

.adm-muted {
  color: #4f5f56;
}

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

.adm-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8e4;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.adm-kpi-label {
  font-size: 0.74rem;
  font-weight: 650;
  color: #5b6b62;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.adm-kpi-value {
  font-family: "Outfit", var(--font-sans);
  font-size: 1.72rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #111815;
  font-variant-numeric: tabular-nums;
}

.adm-kpi-sub {
  font-size: 0.75rem;
  color: #5b6b62;
  font-variant-numeric: tabular-nums;
}

.adm-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 14px;
}

.adm-panel {
  background: #ffffff;
  border: 1px solid #e2e8e4;
  border-radius: 12px;
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.adm-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.adm-panel-title {
  margin: 0;
  font-family: "Outfit", var(--font-sans);
  font-size: 0.96rem;
  font-weight: 700;
  color: #111815;
}

.adm-panel-meta {
  font-size: 0.76rem;
  font-weight: 600;
  color: #627269;
  font-variant-numeric: tabular-nums;
}

.adm-link-btn {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  color: #1e6b3d;
  cursor: pointer;
}

.adm-link-btn:hover {
  text-decoration: underline;
}

.adm-bars {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.adm-bar-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.adm-bar-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: #24312a;
}

.adm-bar-track {
  height: 8px;
  border-radius: 4px;
  background: #edf1ee;
  overflow: hidden;
}

.adm-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.25s ease;
}

.adm-audit-list {
  display: flex;
  flex-direction: column;
  max-height: 230px;
  overflow-y: auto;
}

.adm-audit-item {
  padding: 8px 0;
  border-bottom: 1px solid #eef2ef;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.adm-audit-item:first-child {
  padding-top: 0;
}

.adm-audit-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.adm-audit-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
}

.adm-audit-top strong {
  color: #111815;
  font-weight: 680;
}

.adm-audit-top span {
  font-size: 0.72rem;
  color: #627269;
  flex-shrink: 0;
}

.adm-audit-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 0.75rem;
  color: #53635a;
}

.adm-empty-inline {
  margin: 0;
  font-size: 0.82rem;
  color: #5b6b62;
  line-height: 1.5;
}

.adm-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.adm-search {
  flex: 1 1 240px;
  min-width: 180px;
  font: inherit;
  font-size: 0.84rem;
  color: #111815;
  background: #ffffff;
  border: 1px solid #cfd9d3;
  border-radius: 9px;
  padding: 8px 12px;
  outline: none;
}

.adm-search:focus,
.adm-select:focus,
.adm-inline-input:focus {
  border-color: #1e6b3d;
  box-shadow: 0 0 0 3px rgba(30, 107, 61, 0.14);
}

.adm-select {
  font: inherit;
  font-size: 0.81rem;
  font-weight: 600;
  color: #111815;
  background: #ffffff;
  border: 1px solid #cfd9d3;
  border-radius: 8px;
  padding: 6px 10px;
  outline: none;
}

.adm-select:disabled {
  opacity: 0.55;
  background: #f3f6f4;
  cursor: not-allowed;
}

.adm-seg {
  display: inline-flex;
  align-items: center;
  background: #eef2ef;
  border: 1px solid #dde5e0;
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}

.adm-seg-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #46564d;
  font: inherit;
  font-size: 0.77rem;
  font-weight: 640;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
}

.adm-seg-btn:hover {
  color: #111815;
}

.adm-seg-btn.is-active {
  background: #ffffff;
  color: #111815;
  box-shadow: 0 1px 2px rgba(15, 23, 19, 0.08);
}

.adm-table-wrap {
  width: 100%;
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid #e2e8e4;
  border-radius: 12px;
}

.adm-panel .adm-table-wrap {
  border: 1px solid #ebf0ed;
  border-radius: 10px;
}

.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.adm-table th,
.adm-table td {
  text-align: left;
  padding: 10px 13px;
  border-bottom: 1px solid #edf1ee;
  vertical-align: middle;
}

.adm-table tbody tr:last-child td {
  border-bottom: none;
}

.adm-table th {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5b6b62;
  background: #f6f9f7;
  white-space: nowrap;
}

.adm-table th.is-right,
.adm-table td.is-right {
  text-align: right;
}

.adm-table tr.is-row-muted td {
  background: #fafbfa;
}

.adm-cell-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.adm-cell-main strong {
  font-size: 0.84rem;
  font-weight: 700;
  color: #111815;
}

.adm-cell-main span {
  font-size: 0.75rem;
  color: #5b6b62;
}

.adm-sculp-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.adm-swatch-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.adm-swatch {
  width: 12px;
  height: 7px;
  border-radius: 2px;
  border: 1px solid rgba(17, 24, 21, 0.14);
}

.adm-role-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.adm-status {
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.adm-status.is-ok {
  color: #1a6b3c;
}

.adm-status.is-warn {
  color: #b45309;
}

.adm-status.is-danger {
  color: #b91c1c;
}

.adm-status-note {
  margin-top: 2px;
  font-size: 0.72rem;
  color: #7f1d1d;
  max-width: 190px;
}

.adm-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.adm-btn {
  appearance: none;
  border: 1px solid #cfd9d3;
  background: #ffffff;
  color: #161b18;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s ease, border-color 0.14s ease, opacity 0.14s ease;
}

.adm-btn:hover:not(:disabled) {
  background: #f0f4f1;
}

.adm-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.adm-btn-sm {
  font-size: 0.74rem;
  padding: 5px 9px;
}

.adm-btn-primary {
  background: #16241c;
  border-color: #16241c;
  color: #ffffff;
}

.adm-btn-primary:hover:not(:disabled) {
  background: #24392d;
}

.adm-btn-ok {
  border-color: #b4dec4;
  background: #f0faf4;
  color: #14532d;
}

.adm-btn-ok:hover:not(:disabled) {
  background: #def4e6;
}

.adm-btn-warn {
  border-color: #f3d49b;
  background: #fffbeb;
  color: #92400e;
}

.adm-btn-warn:hover:not(:disabled) {
  background: #fef3c7;
}

.adm-btn-danger {
  border-color: #b91c1c;
  background: #b91c1c;
  color: #ffffff;
}

.adm-btn-danger:hover:not(:disabled) {
  background: #991b1b;
}

.adm-btn-danger-ghost {
  border-color: #f2c2bf;
  background: #ffffff;
  color: #9e271f;
}

.adm-btn-danger-ghost:hover:not(:disabled) {
  background: #fef2f2;
}

.adm-inline-row td {
  background: #f6f9f7;
  padding: 10px 14px;
}

.adm-inline-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.adm-inline-label {
  font-size: 0.78rem;
  color: #36453d;
}

.adm-inline-input {
  flex: 1 1 200px;
  min-width: 160px;
  font: inherit;
  font-size: 0.81rem;
  color: #111815;
  background: #ffffff;
  border: 1px solid #cfd9d3;
  border-radius: 8px;
  padding: 6px 10px;
  outline: none;
}

.adm-empty {
  background: #ffffff;
  border: 1px solid #e2e8e4;
  border-radius: 12px;
  padding: 36px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.adm-empty h3 {
  margin: 0;
  font-family: "Outfit", var(--font-sans);
  font-size: 1rem;
  color: #111815;
}

.adm-empty p {
  margin: 0 0 6px;
  font-size: 0.82rem;
  color: #5b6b62;
}

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

.adm-skel-card {
  height: 92px;
  border-radius: 12px;
  background: #e9efeb;
}

@media (max-width: 900px) {
  .adm-dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    height: 92dvh;
    max-height: 92dvh;
  }
  .adm-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .adm-sidebar {
    border-right: none;
    border-bottom: 1px solid #e2e8e4;
    padding: 10px 14px;
    gap: 8px;
  }
  .adm-brand {
    padding: 0 0 8px;
    margin-bottom: 0;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }
  .adm-nav {
    flex-direction: row;
    overflow-x: auto;
  }
  .adm-nav-btn {
    white-space: nowrap;
  }
  .adm-sidebar-foot {
    display: none;
  }
  .adm-kpi-grid,
  .adm-skel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .adm-split-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .adm-topbar,
  .adm-content {
    padding-left: 14px;
    padding-right: 14px;
  }
  .adm-sync-time {
    display: none;
  }
  .adm-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.adm-live-btn {
  border-color: #cfd9d3;
  background: #f6f9f7;
  color: #4b5b52;
}

.adm-live-btn.is-on {
  border-color: #b4dec4;
  background: #f0faf4;
  color: #14532d;
}

.adm-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #c6d7cc;
  border-radius: 10px;
}

.adm-bulk-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1 1 280px;
  min-width: 0;
}

.adm-bulk-count {
  font-size: 0.81rem;
  font-weight: 700;
  color: #111815;
  white-space: nowrap;
}

.adm-bulk-input {
  flex: 1 1 220px;
  min-width: 180px;
  font: inherit;
  font-size: 0.81rem;
  color: #111815;
  background: #f8faf9;
  border: 1px solid #cfd9d3;
  border-radius: 8px;
  padding: 6px 10px;
  outline: none;
}

.adm-bulk-input:focus {
  background: #ffffff;
  border-color: #1e6b3d;
  box-shadow: 0 0 0 3px rgba(30, 107, 61, 0.14);
}

.adm-col-check {
  width: 34px;
  padding-right: 4px !important;
}

.adm-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #16241c;
  cursor: pointer;
  vertical-align: middle;
}

.adm-table tr.adm-row-selected td {
  background: #f1f7f3;
}

.adm-reason-note {
  margin-top: 2px;
  font-size: 0.72rem;
  color: #7c4a03;
  max-width: 220px;
  line-height: 1.35;
}

.adm-island-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.adm-island-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(17, 24, 21, 0.16);
}

.adm-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.adm-id-sub {
  font-size: 0.72rem;
  color: #5b6961;
  letter-spacing: 0.01em;
}

.adm-audit-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  color: #5b6961;
  padding: 0 2px;
}

.adm-audit-target {
  font-weight: 600;
  color: #111815;
  display: block;
  max-width: 220px;
  line-height: 1.35;
}

.adm-audit-detail {
  color: #36453d;
  display: block;
  max-width: 340px;
  line-height: 1.4;
}

.adm-bulk-bar.is-confirm {
  background: #f8faf9;
  border-color: #b4c8bc;
}

.adm-bulk-summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 280px;
  min-width: 0;
  font-size: 0.8rem;
  color: #111815;
  line-height: 1.4;
}

.adm-bulk-summary-sub {
  font-size: 0.75rem;
  color: #4b5b52;
}

/* ==================== KISI-KISI ADVENTURE & 3D EXAM ROOM UI ==================== */

.ke-num {
  font-variant-numeric: tabular-nums;
}

.ke-adventure-hud {
  position: fixed;
  top: max(60px, calc(env(safe-area-inset-top, 12px) + 48px));
  left: max(14px, env(safe-area-inset-left, 14px));
  z-index: 16;
  width: min(490px, calc(100vw - 28px));
  font-family: "Plus Jakarta Sans", var(--font-sans);
  color: #0f172a;
}

.ke-adventure-hud[hidden] {
  display: none !important;
}

.ke-hud-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 13px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 10px 28px rgba(15, 28, 18, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.ke-hud-bar:hover {
  background: rgba(255, 255, 255, 0.92);
}

.ke-hud-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ke-hud-title {
  font-family: "Outfit", var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.ke-hud-sub {
  font-size: 0.75rem;
  color: #475569;
}

.ke-hud-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ke-grade-switch {
  display: inline-flex;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}

.ke-seg-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #334155;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 9px;
  cursor: pointer;
}

.ke-seg-btn:hover {
  background: #e2e8f0;
}

.ke-seg-btn.is-active {
  background: #0f172a;
  color: #ffffff;
}

.ke-mini-btn {
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 650;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.ke-mini-btn:hover {
  background: #f1f5f9;
}

.ke-mini-btn.is-accent {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.ke-mini-btn.is-accent:hover {
  background: #0369a1;
}

.ke-hud-drawer {
  margin-top: 8px;
  padding: 10px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  max-height: 270px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ke-map-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.ke-map-row.is-done {
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.ke-map-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ke-map-info strong {
  font-size: 0.8rem;
  color: #0f172a;
}

.ke-map-info span {
  font-size: 0.72rem;
  color: #475569;
}

.ke-map-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Dialogs */
.ke-dialog {
  margin: auto;
  padding: 0;
  border: none;
  background: transparent;
  max-width: min(95vw, 1080px);
  width: min(95vw, 1080px);
  color: #0f172a;
  font-family: "Plus Jakarta Sans", var(--font-sans);
}

.ke-challenge-dialog {
  max-width: min(94vw, 760px);
  width: min(94vw, 760px);
}

.ke-dialog:not([open]) {
  display: none !important;
}

.ke-dialog::backdrop {
  background: rgba(15, 23, 42, 0.62);
}

.ke-modal-shell {
  display: flex;
  flex-direction: column;
  max-height: 88dvh;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.34);
  overflow: hidden;
  user-select: text;
}

.ke-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.ke-kicker {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0369a1;
  margin-bottom: 3px;
}

.ke-kicker.is-danger {
  color: #be123c;
}

.ke-modal-title {
  margin: 0;
  font-family: "Outfit", var(--font-sans);
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.ke-close-btn {
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.ke-close-btn:hover {
  background: #f1f5f9;
}

.ke-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 20px 0;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.ke-tab {
  appearance: none;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #475569;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  padding: 9px 14px;
  cursor: pointer;
}

.ke-tab.is-active {
  color: #0f172a;
  border-bottom-color: #0284c7;
}

.ke-msg {
  margin: 12px 20px 0;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
}

.ke-msg.is-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.ke-msg.is-ok {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.ke-studio-body,
.ke-challenge-body {
  padding: 16px 20px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ke-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.ke-filter-group {
  display: inline-flex;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}

.ke-filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ke-split-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ke-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ke-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ke-card-title {
  margin: 0;
  font-family: "Outfit", var(--font-sans);
  font-size: 0.96rem;
  font-weight: 700;
  color: #0f172a;
}

.ke-card-desc {
  margin: 0;
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.45;
}

.ke-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 0;
}

.ke-field span {
  font-size: 0.74rem;
  font-weight: 650;
  color: #334155;
}

.ke-field input,
.ke-field select,
.ke-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.83rem;
  color: #0f172a;
  background: #ffffff;
}

.ke-form-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ke-row-inline {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.ke-btn {
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
}

.ke-btn:hover:not(:disabled) {
  background: #f1f5f9;
}

.ke-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ke-btn-sm {
  padding: 6px 10px;
  font-size: 0.76rem;
}

.ke-btn-full {
  width: 100%;
}

.ke-btn-primary {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.ke-btn-primary:hover:not(:disabled) {
  background: #0369a1;
}

.ke-btn-emerald {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}

.ke-btn-emerald:hover:not(:disabled) {
  background: #047857;
}

.ke-btn-danger {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.ke-btn-danger:hover:not(:disabled) {
  background: #ffe4e6;
}

.ke-btn-ghost {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

.ke-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ke-list-compact {
  max-height: 240px;
  overflow-y: auto;
}

.ke-item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.ke-item-row.is-inactive {
  opacity: 0.65;
}

.ke-item-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ke-item-main strong {
  font-size: 0.85rem;
  color: #0f172a;
}

.ke-item-sub {
  font-size: 0.74rem;
  color: #475569;
}

.ke-item-desc {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.4;
}

.ke-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.ke-check-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 140px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.ke-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #0f172a;
  cursor: pointer;
}

.ke-exam-pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  font: inherit;
}

.ke-exam-pick.is-active {
  border-color: #0284c7;
  background: #f0f9ff;
}

.ke-exam-pick strong {
  display: block;
  font-size: 0.83rem;
  color: #0f172a;
}

.ke-exam-pick span {
  font-size: 0.73rem;
  color: #475569;
}

.ke-status-txt {
  font-size: 0.74rem;
  font-weight: 700;
  color: #334155;
}

.ke-status-txt.is-running,
.ke-status-txt.is-in_progress {
  color: #047857;
}

.ke-status-txt.is-locked_submitted {
  color: #be123c;
}

.ke-proctor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ke-proctor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ke-code-inline {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.96rem;
  padding: 2px 7px;
  border-radius: 6px;
  background: #e0f2fe;
  color: #0369a1;
}

.ke-timer-readout {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  padding: 5px 10px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
}

.ke-alert-feed {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #881337;
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ke-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.ke-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.81rem;
}

.ke-table th,
.ke-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.ke-table th {
  background: #f8fafc;
  font-size: 0.74rem;
  font-weight: 700;
  color: #475569;
}

.ke-table td.is-warn {
  color: #b45309;
  font-weight: 700;
}

.ke-table td.is-danger {
  color: #be123c;
  font-weight: 800;
}

.ke-empty-cell,
.ke-empty-note {
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.45;
}

.ke-rules-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.81rem;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.45;
}

.ke-active-hint {
  margin: 4px 0 0;
  padding: 9px 11px;
  border-radius: 9px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  font-size: 0.8rem;
  color: #0c4a6e;
}

/* Challenge Modal */
.ke-concept-card {
  padding: 14px 16px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ke-concept-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  color: #0369a1;
}

.ke-concept-summary,
.ke-concept-indicator {
  margin: 0;
  font-size: 0.84rem;
  color: #1e293b;
  line-height: 1.5;
}

.ke-result-banner {
  padding: 10px 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.84rem;
}

.ke-result-banner.is-pass {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.ke-result-banner.is-retry {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.ke-mini-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ke-mini-card {
  padding: 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ke-mini-q {
  margin: 0;
  font-size: 0.88rem;
  color: #0f172a;
  line-height: 1.45;
}

.ke-opt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ke-opt-btn,
.ke-exam-opt {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}

.ke-opt-btn:hover:not(:disabled),
.ke-exam-opt:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.ke-opt-btn.is-selected,
.ke-exam-opt.is-selected {
  border-color: #0284c7;
  background: #e0f2fe;
}

.ke-opt-btn.is-correct {
  border-color: #059669;
  background: #d1fae5;
}

.ke-opt-btn.is-wrong {
  border-color: #e11d48;
  background: #ffe4e6;
}

.ke-opt-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.ke-opt-btn.is-selected .ke-opt-letter,
.ke-exam-opt.is-selected .ke-opt-letter {
  background: #0284c7;
  color: #ffffff;
}

.ke-mini-exp {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border-left: 3px solid #0284c7;
  font-size: 0.79rem;
  color: #334155;
}

.ke-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.ke-foot-right {
  display: flex;
  gap: 8px;
}

/* Student Waiting HUD */
.ke-waiting-hud {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 35;
  width: min(560px, calc(100vw - 32px));
  font-family: "Plus Jakarta Sans", var(--font-sans);
}

.ke-waiting-hud[hidden] {
  display: none !important;
}

.ke-waiting-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #334155;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
}

.ke-waiting-bar strong {
  display: block;
  font-size: 0.88rem;
}

.ke-waiting-bar span {
  font-size: 0.77rem;
  color: #cbd5e1;
}

/* Fullscreen Lockdown Exam Overlay */
.ke-lockdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #f1f5f9;
  color: #0f172a;
  font-family: "Plus Jakarta Sans", var(--font-sans);
  user-select: none;
  display: flex;
  flex-direction: column;
}

.ke-lockdown-overlay[hidden] {
  display: none !important;
}

.ke-lock-center {
  margin: auto;
  padding: 24px;
  width: min(540px, 100%);
}

.ke-summary-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
}

.ke-summary-card h2 {
  margin: 0;
  font-family: "Outfit", var(--font-sans);
  font-size: 1.35rem;
}

.ke-summary-score {
  margin: 6px 0;
  font-family: "Outfit", var(--font-sans);
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1;
  color: #0284c7;
}

.ke-summary-sub,
.ke-summary-note {
  margin: 0;
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.5;
}

.ke-lock-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.ke-lock-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 24px;
  background: #0f172a;
  color: #ffffff;
  border-bottom: 1px solid #1e293b;
}

.ke-lock-topbar strong {
  display: block;
  font-family: "Outfit", var(--font-sans);
  font-size: 1.02rem;
}

.ke-lock-topbar span {
  font-size: 0.78rem;
  color: #94a3b8;
}

.ke-lock-metrics {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ke-metric-item {
  font-size: 0.84rem;
  color: #e2e8f0;
}

.ke-metric-item b.is-warn {
  color: #fbbf24;
}

.ke-metric-clock {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 1.25rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 9px;
  background: #1e293b;
  color: #ffffff;
  border: 1px solid #334155;
}

.ke-metric-clock.is-urgent {
  background: #9f1239;
  border-color: #f43f5e;
}

.ke-lock-err {
  margin: 12px 24px 0;
}

.ke-lock-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  padding: 20px 24px;
  overflow-y: auto;
}

.ke-lock-main {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ke-q-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ke-q-kisi {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}

.ke-q-prompt {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 650;
  color: #0f172a;
  line-height: 1.55;
}

.ke-opt-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ke-q-nav-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ke-btn.is-flagged {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}

.ke-lock-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ke-rail-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ke-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
}

.ke-num-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.ke-num-btn {
  appearance: none;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.ke-num-btn.is-answered {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}

.ke-num-btn.is-flagged {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.ke-num-btn.is-current {
  outline: 2px solid #0284c7;
  outline-offset: 1px;
}

.ke-confirm-note {
  margin: 0;
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.45;
}

.ke-confirm-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ke-warn-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9200;
  background: rgba(15, 23, 42, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ke-warn-card {
  width: min(480px, 100%);
  background: #ffffff;
  border: 2px solid #e11d48;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.ke-warn-card h3 {
  margin: 0;
  font-family: "Outfit", var(--font-sans);
  font-size: 1.18rem;
  color: #9f1239;
}

.ke-warn-card p {
  margin: 0;
  font-size: 0.86rem;
  color: #334155;
  line-height: 1.5;
}

@media (max-width: 860px) {
  .ke-split-2,
  .ke-opt-grid,
  .ke-lock-grid {
    grid-template-columns: 1fr;
  }
}









/* ---------------- HUD Roblox / Minecraft Theme Specificity Guard ---------------- */
.hud-top-bar .cam-profile-btn.is-signed-in {
  background: rgba(16, 42, 28, 0.8);
  border-color: rgba(74, 222, 128, 0.35);
  color: #ecfdf5;
}

.hud-top-bar .cam-profile-btn.is-signed-in:hover {
  background: rgba(22, 58, 38, 0.92);
  border-color: rgba(74, 222, 128, 0.6);
}

.hud-top-bar .cam-island-btn.is-creative {
  background: rgba(16, 42, 28, 0.8);
  border-color: rgba(74, 222, 128, 0.35);
  color: #ecfdf5;
}

.hud-top-bar .cam-admin-btn {
  background: rgba(24, 34, 48, 0.82);
  border-color: rgba(96, 165, 250, 0.38);
  color: #dbeafe;
}

.hud-top-bar .cam-admin-btn:hover {
  background: rgba(34, 50, 72, 0.92);
  border-color: rgba(147, 197, 253, 0.65);
  color: #ffffff;
}

.hud-top-bar .cam-audio-btn {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  height: 36px;
}

.hud-top-bar .cam-audio-btn.is-muted {
  color: rgba(248, 250, 252, 0.45);
}

.hud-top-bar .cam-chat-btn .sc-unread-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  font-size: 10px;
  border: 1.5px solid #0f1318;
}

.hud-menu-drawer .hud-menu-tile {
  padding: 10px;
  gap: 9px;
  border-radius: 11px;
  min-height: 50px;
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hud-menu-drawer .hud-menu-tile:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

.hud-menu-drawer .hud-menu-tile.is-active,
.hud-menu-drawer .hud-menu-tile.is-in-room {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(74, 222, 128, 0.55);
  color: #ffffff;
}

.hud-menu-drawer .hud-menu-tile.is-active .hud-tile-icon,
.hud-menu-drawer .hud-menu-tile.is-in-room .hud-tile-icon {
  background: rgba(34, 197, 94, 0.35);
  color: #ffffff;
}

/* ---------------- Long-Press Radial Emote Wheel around Jump Button ---------------- */
.jump-emote-radial {
  position: absolute;
  bottom: 36px;
  right: 36px;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 22;
}

.jer-btn {
  position: absolute;
  pointer-events: auto;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  margin-top: -22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  background: rgba(15, 19, 24, 0.86);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 1.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: translate(0, 0) scale(0.3);
  opacity: 0;
  transition:
    transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.2s ease,
    background-color 0.16s ease,
    border-color 0.16s ease;
}

.jump-emote-radial.is-open .jer-btn {
  opacity: 1;
}

/* Ergonomic 6-button fan arc above & to the left of the jump button */
.jump-emote-radial.is-open .jer-1 { transform: translate(-96px, 8px) scale(1); transition-delay: 0ms; }
.jump-emote-radial.is-open .jer-2 { transform: translate(-92px, -40px) scale(1); transition-delay: 25ms; }
.jump-emote-radial.is-open .jer-3 { transform: translate(-66px, -80px) scale(1); transition-delay: 50ms; }
.jump-emote-radial.is-open .jer-4 { transform: translate(-22px, -98px) scale(1); transition-delay: 75ms; }
.jump-emote-radial.is-open .jer-5 { transform: translate(-138px, -18px) scale(1); transition-delay: 100ms; }
.jump-emote-radial.is-open .jer-6 { transform: translate(-114px, -90px) scale(1); transition-delay: 125ms; }

.jer-btn:hover {
  background: rgba(34, 197, 94, 0.88);
  border-color: #ffffff;
  z-index: 3;
}

/* ---------------- Underwater Vignette & Swimming Oxygen HUD ---------------- */
.underwater-tint {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  opacity: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(14, 116, 144, 0.12) 0%,
    rgba(8, 47, 73, 0.56) 100%
  );
  transition: opacity 0.3s ease;
}

.underwater-tint.is-submerged {
  opacity: 1;
}

.swim-oxygen-hud {
  position: fixed;
  left: 50%;
  bottom: max(84px, calc(env(safe-area-inset-bottom, 20px) + 64px));
  transform: translateX(-50%);
  z-index: 19;
  width: min(296px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(12, 22, 32, 0.84);
  border: 1px solid rgba(56, 189, 248, 0.36);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #f0f9ff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.swim-oxygen-hud.is-low {
  border-color: rgba(248, 113, 113, 0.85);
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.36);
  animation: swim-ox-pulse 0.7s ease-in-out infinite alternate;
}

@keyframes swim-ox-pulse {
  from { transform: translateX(-50%) scale(1); }
  to { transform: translateX(-50%) scale(1.03); }
}

.swim-ox-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
}

.swim-ox-pct {
  font-variant-numeric: tabular-nums;
  color: #7dd3fc;
}

.swim-oxygen-hud.is-low .swim-ox-pct {
  color: #fca5a5;
}

.swim-ox-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.swim-ox-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0ea5e9 0%, #38bdf8 100%);
  transition: width 0.12s linear, background 0.2s ease;
}

.swim-oxygen-hud.is-low .swim-ox-fill {
  background: linear-gradient(90deg, #ef4444 0%, #f97316 100%);
}

.swim-ox-hint {
  font-size: 0.68rem;
  color: rgba(224, 242, 254, 0.72);
  text-align: center;
}

/* ---------------- Kisi-Kisi Read / Unread Status Badges ---------------- */
.ke-read-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.ke-read-badge.is-unread {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.ke-read-badge.is-read {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.ke-read-badge.is-done {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #4ade80;
}


/* ---------------- Dedicated Dive Button (Above Jump Button when Swimming) ---------------- */
.swim-dive-btn {
  pointer-events: auto;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid rgba(56, 189, 248, 0.7);
  background: rgba(12, 34, 52, 0.8);
  color: #e0f2fe;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  margin-bottom: 4px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.16s ease, border-color 0.16s ease;
}

.swim-dive-btn:hover {
  background: rgba(14, 116, 144, 0.88);
  border-color: #7dd3fc;
  transform: scale(1.06);
}

.swim-dive-btn:active,
.swim-dive-btn.is-active {
  background: #0284c7;
  border-color: #ffffff;
  transform: scale(0.9);
}

.swim-dive-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.swim-dive-text {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* ---------------- SOS Help Button & Multiplayer Rescue Banner ---------------- */
.sos-help-btn {
  pointer-events: auto;
  appearance: none;
  border: 1px solid rgba(254, 202, 202, 0.85);
  background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
  color: #ffffff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  padding: 7px 12px;
  border-radius: 9px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.42);
  animation: sos-btn-pulse 0.85s ease-in-out infinite alternate;
}

.sos-help-btn:hover {
  filter: brightness(1.1);
}

@keyframes sos-btn-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.03); }
}

.sos-rescue-banner {
  position: fixed;
  top: max(56px, calc(env(safe-area-inset-top, 10px) + 46px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 28;
  width: min(460px, calc(100vw - 24px));
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(24, 16, 18, 0.92);
  border: 1.5px solid rgba(248, 113, 113, 0.78);
  box-shadow: 0 16px 38px rgba(220, 38, 38, 0.34);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff1f2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.sos-rb-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
}

.sos-rb-icon {
  font-size: 1.15rem;
}

.sos-rescue-btn {
  appearance: none;
  border: none;
  border-radius: 9px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 750;
  padding: 7px 12px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.38);
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.15s ease;
}

.sos-rescue-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.sos-rescue-btn:active {
  transform: scale(0.95);
}

/* ---------------- Paint Color Picker & Contextual Sign / Project Screen Inputs ---------------- */
.ch-paint-wrap {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ch-paint-wrap input[type="color"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.ch-paint-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.ch-mini-input,
.ch-mini-select {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font: inherit;
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 7px;
  outline: none;
  min-width: 120px;
}

.ch-mini-input::placeholder {
  color: rgba(248, 250, 252, 0.55);
}

.ch-mini-select option {
  background: #0f172a;
  color: #ffffff;
}

.ch-project-bar {
  flex-wrap: wrap;
  border-radius: 12px;
  padding: 6px 8px;
}

/* ---------------- Compact Right-Edge Zoom & Fly Rail ---------------- */
.hud-quick-rail {
  position: fixed;
  right: max(12px, env(safe-area-inset-right, 12px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hud-rail-btn {
  appearance: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 19, 24, 0.74);
  color: #f8fafc;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.15s ease, border-color 0.15s ease;
}

.hud-rail-btn:hover {
  background: rgba(30, 38, 48, 0.9);
  border-color: rgba(255, 255, 255, 0.38);
  transform: scale(1.06);
}

.hud-rail-btn.is-active {
  background: #0284c7;
  border-color: #7dd3fc;
  color: #ffffff;
}

/* ---------------- Minecraft-Style Survival HUD (Hearts & Hunger) ---------------- */
.survival-hud {
  position: fixed;
  left: max(12px, env(safe-area-inset-left, 12px));
  bottom: max(18px, env(safe-area-inset-bottom, 18px));
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 11px;
  border-radius: 12px;
  background: rgba(15, 19, 24, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #f8fafc;
}

body[data-walk-mobile="1"] .survival-hud {
  bottom: max(152px, calc(env(safe-area-inset-bottom, 0px) + 150px));
}

.surv-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.surv-icon {
  font-size: 0.9rem;
}

.surv-bar {
  width: 62px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.surv-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.2s ease;
}

.surv-fill.is-hp {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.surv-fill.is-food {
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

.surv-val {
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 22px;
}

.surv-eat-btn {
  appearance: none;
  border: 1px solid rgba(74, 222, 128, 0.45);
  background: rgba(22, 163, 74, 0.85);
  color: #ffffff;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 8px;
  cursor: pointer;
}

.surv-eat-btn:hover {
  filter: brightness(1.1);
}

/* ---------------- Digital Project Showcase & Public Exhibition Modal ---------------- */
.project-showcase-dialog {
  margin: auto;
  padding: 0;
  border: none;
  background: transparent;
  width: min(560px, calc(100vw - 24px));
  max-height: 86vh;
  overflow: visible;
}

.project-showcase-dialog::backdrop {
  background: rgba(8, 12, 18, 0.62);
  backdrop-filter: blur(6px);
}

.ps-shell {
  border-radius: 20px;
  background: rgba(15, 20, 28, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  color: #f8fafc;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 86vh;
}

.ps-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ps-kicker {
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: #38bdf8;
}

.ps-title {
  margin: 4px 0 2px;
  font-size: 1.22rem;
  font-weight: 760;
  color: #ffffff;
}

.ps-sub {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(248, 250, 252, 0.72);
}

.ps-close {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 1.25rem;
  cursor: pointer;
  flex-shrink: 0;
}

.ps-body {
  padding: 16px 20px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ps-link-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.42);
  color: #e0f2fe;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 650;
  word-break: break-all;
}

.ps-link-card:hover {
  background: rgba(56, 189, 248, 0.24);
}

.ps-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.ps-like-btn {
  appearance: none;
  border: 1px solid rgba(244, 114, 182, 0.45);
  background: rgba(244, 114, 182, 0.16);
  color: #fdf2f8;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.ps-like-btn.is-liked {
  background: #db2777;
  border-color: #f472b6;
}

.ps-score-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(74, 222, 128, 0.45);
  color: #bbf7d0;
  font-size: 0.8rem;
}

.ps-score-pill.is-pending {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(248, 250, 252, 0.65);
}

.ps-teacher-note {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.32);
  color: #fef9c3;
  font-size: 0.82rem;
}

.ps-grade-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ps-grade-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.8rem;
}

.ps-grade-box input[type="number"],
.ps-grade-box input[type="text"] {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 0.82rem;
}

.ps-grade-submit {
  appearance: none;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 9px 14px;
  cursor: pointer;
}

.ps-gal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ps-gal-card {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ps-gal-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(56, 189, 248, 0.48);
}

.ps-gal-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #7dd3fc;
}

.ps-gal-title {
  font-size: 0.94rem;
}

.ps-gal-author {
  font-size: 0.76rem;
  color: rgba(248, 250, 252, 0.65);
}

.ps-empty {
  margin: 0;
  font-size: 0.84rem;
  color: rgba(248, 250, 252, 0.72);
  line-height: 1.5;
}

/* ==================== Performance / Anti-Lag Compositor Relief ==================== */
body.perf-lite .hud-pill-btn,
body.perf-lite .hud-icon-btn,
body.perf-lite .hud-seg-group,
body.perf-lite .online-pill,
body.perf-lite .hud-menu-drawer,
body.perf-lite .creative-hotbar,
body.perf-lite .hud-rail-btn,
body.perf-lite .survival-hud,
body.perf-lite .kisi-quest-card,
body.perf-lite .interact-prompt,
body.perf-lite .walk-jump-btn,
body.perf-lite .swim-dive-btn,
body.perf-lite .swim-oxygen-hud,
body.perf-lite .weave-toast,
body.perf-lite .hover-card,
body.perf-lite .walk-esc-hint {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}



.webgl-recovery-overlay {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 14, 20, 0.72);
}

.webgl-recovery-overlay[hidden] {
  display: none;
}

.webgl-recovery-card {
  max-width: 340px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(15, 19, 24, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f8fafc;
  text-align: center;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
}

.webgl-recovery-card strong {
  font-size: 1rem;
}

.webgl-recovery-card span {
  font-size: 0.84rem;
  color: rgba(248, 250, 252, 0.76);
  line-height: 1.45;
}

.webgl-reload-btn {
  margin-top: 6px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: #0284c7;
  color: #ffffff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}


/* ==================== Exam Seat Lock & Creative Dock Non-Overlap ==================== */
body.exam-seat-locked .creative-dock,
body.exam-seat-locked .fp-jump-btn,
body.exam-seat-locked .fp-dive-btn,
body.exam-seat-locked .fp-jump-hint,
body.exam-seat-locked .quick-cam-rail,
body.exam-seat-locked .survival-hud-bar {
  display: none !important;
}

/* Lift [E] interact prompt above Creative Dock whenever dock is visible on Creative Islands */
body:has(.creative-dock:not([hidden])) .interact-prompt {
  bottom: 158px !important;
}

/* Identity Check-in & Proctored Exam Enhancements */
.ke-identity-card {
  max-width: 560px;
  width: min(94vw, 560px);
  text-align: left;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  padding: 26px 28px;
  color: #f8fafc;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.ke-identity-card h2 {
  margin: 6px 0 6px;
  font-size: 1.35rem;
  color: #f8fafc;
}
.ke-identity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}
.ke-identity-grid .ke-field-full {
  grid-column: 1 / -1;
}
.ke-rules-box {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 0;
  font-size: 0.84rem;
  color: #cbd5e1;
}
.ke-rules-box ul {
  margin: 6px 0 0 18px;
  padding: 0;
  line-height: 1.5;
}
.ke-agree-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 18px;
  font-size: 0.86rem;
  color: #e2e8f0;
  cursor: pointer;
}
.ke-agree-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #10b981;
}
.ke-proctor-instr-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.ke-proctor-instr-bar input {
  flex: 1;
  min-width: 0;
}
.ke-waiting-instr {
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #e0f2fe;
  font-size: 0.8rem;
}
@media (max-width: 640px) {
  .ke-identity-grid {
    grid-template-columns: 1fr;
  }
}


/* ==================== Pulau Utama Live Public Chat (.mpc-*) ==================== */
body[data-og-capture="1"] .mpc-wrap,
body.exam-seat-locked .mpc-wrap {
  display: none !important;
}
.mpc-wrap {
  position: fixed;
  left: 14px;
  bottom: 18px;
  z-index: 42;
  pointer-events: auto;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
}
.mpc-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.86);
  color: #f8fafc;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
}
.mpc-toggle-pill:hover {
  background: rgba(30, 41, 59, 0.94);
  transform: translateY(-1px);
}
.mpc-unread-badge {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #10b981;
  color: #052e16;
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mpc-panel {
  width: min(355px, calc(100vw - 28px));
  max-height: 360px;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.mpc-panel[hidden],
.mpc-wrap:not(.is-collapsed) .mpc-toggle-pill {
  display: none;
}
.mpc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: rgba(30, 41, 59, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.mpc-head-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
}
.mpc-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}
.mpc-icon-btn {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mpc-icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.mpc-feed {
  flex: 1;
  min-height: 150px;
  max-height: 235px;
  overflow-y: auto;
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  scrollbar-width: thin;
}
.mpc-empty {
  color: #94a3b8;
  font-size: 0.8rem;
  text-align: center;
  padding: 24px 8px;
}
.mpc-msg {
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 11px;
  padding: 7px 9px;
  font-size: 0.8rem;
  line-height: 1.4;
}
.mpc-msg.is-mine {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.35);
}
.mpc-msg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
}
.mpc-msg-author {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.mpc-msg-author strong {
  font-size: 0.78rem;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 145px;
}
.mpc-role-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.2);
  color: #bae6fd;
}
.mpc-role-tag.is-teacher {
  background: rgba(245, 158, 11, 0.25);
  color: #fde68a;
}
.mpc-msg-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.mpc-time {
  font-size: 0.68rem;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}
.mpc-reply-btn {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #bae6fd;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
}
.mpc-reply-btn:hover {
  background: rgba(56, 189, 248, 0.28);
  color: #fff;
}
.mpc-quote {
  font-size: 0.72rem;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.6);
  border-left: 2.5px solid #38bdf8;
  border-radius: 5px;
  padding: 3px 7px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mpc-msg-body {
  margin: 0;
  color: #e2e8f0;
  word-break: break-word;
}
.mpc-reply-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(14, 165, 233, 0.16);
  border-top: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 0.74rem;
  color: #e0f2fe;
}
.mpc-reply-text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mpc-composer {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.92);
}
.mpc-composer input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.9);
  color: #f8fafc;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 0.8rem;
  outline: none;
}
.mpc-composer input:focus {
  border-color: #38bdf8;
}
.mpc-send-btn {
  border: none;
  border-radius: 10px;
  padding: 7px 12px;
  background: #10b981;
  color: #052e16;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}
.mpc-send-btn:hover {
  background: #34d399;
}
.mpc-guest-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.95);
  font-size: 0.74rem;
  color: #cbd5e1;
}
.mpc-login-btn {
  border: none;
  border-radius: 8px;
  padding: 6px 11px;
  background: #38bdf8;
  color: #082f49;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}
.sc-chat-quote {
  font-size: 0.75rem;
  color: #94a3b8;
  border-left: 3px solid #38bdf8;
  padding: 3px 8px;
  margin-bottom: 5px;
  background: rgba(15, 23, 42, 0.15);
  border-radius: 4px;
}
@media (max-width: 720px) {
  .mpc-wrap {
    left: 10px;
    bottom: 84px;
  }
  .mpc-panel {
    width: min(320px, calc(100vw - 20px));
    max-height: 290px;
  }
}

.mpc-tabs {
  display: inline-flex;
  gap: 4px;
  background: rgba(15, 23, 42, 0.7);
  padding: 2px;
  border-radius: 8px;
}
.mpc-tab-btn {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.mpc-tab-btn.is-active {
  background: rgba(56, 189, 248, 0.22);
  color: #f8fafc;
}
.mpc-users-pane {
  flex: 1;
  min-height: 185px;
  max-height: 270px;
  overflow-y: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
}
.mpc-users-pane[hidden] {
  display: none;
}
.mpc-presence-group-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #94a3b8;
  margin: 4px 2px 2px;
}
.mpc-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 9px;
  background: rgba(30, 41, 59, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 0.78rem;
}
.mpc-user-row.is-offline {
  opacity: 0.68;
}
.mpc-user-left {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.mpc-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mpc-status-dot.is-online {
  background: #10b981;
  box-shadow: 0 0 7px #10b981;
}
.mpc-status-dot.is-offline {
  background: #64748b;
}
.mpc-user-name {
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.mpc-user-loc {
  font-size: 0.68rem;
  color: #bae6fd;
  flex-shrink: 0;
}
.mpc-user-row.is-offline .mpc-user-loc {
  color: #94a3b8;
}
.online-pill {
  cursor: pointer;
}

/* ==================== Interactive Island Chat: Quick Chips, Reactions & Themes ==================== */
.mpc-wrap[data-island="digiverse"] .mpc-live-dot { background: #10b981; box-shadow: 0 0 8px #10b981; }
.mpc-wrap[data-island="digistar"] .mpc-live-dot { background: #38bdf8; box-shadow: 0 0 8px #38bdf8; }
.mpc-wrap[data-island="digiqueens"] .mpc-live-dot { background: #c084fc; box-shadow: 0 0 8px #c084fc; }
.mpc-wrap[data-island="digiverse"] .mpc-panel { border-color: rgba(16, 185, 129, 0.35); }
.mpc-wrap[data-island="digistar"] .mpc-panel { border-color: rgba(56, 189, 248, 0.35); }
.mpc-wrap[data-island="digiqueens"] .mpc-panel { border-color: rgba(192, 132, 252, 0.38); }

.mpc-quick-chips {
  display: flex;
  gap: 5px;
  padding: 5px 8px;
  overflow-x: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.72);
  scrollbar-width: none;
}
.mpc-quick-chips::-webkit-scrollbar { display: none; }
.mpc-quick-chips[hidden] { display: none; }
.mpc-chip-btn {
  flex-shrink: 0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.mpc-chip-btn:hover {
  background: rgba(56, 189, 248, 0.24);
  border-color: rgba(56, 189, 248, 0.5);
  color: #fff;
}
.mpc-react-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
}
.mpc-react-pill {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
  font-size: 0.69rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.mpc-react-pill.is-reacted {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.55);
  color: #a7f3d0;
}
.mpc-react-add {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.72rem;
  padding: 1px 4px;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.75;
}
.mpc-react-add:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}
/* Lift chat cleanly above Creative Dock on narrow screens so building tools are never blocked */
@media (max-width: 1024px) {
  body:has(.creative-dock:not([hidden])) .mpc-wrap {
    bottom: 136px;
  }
}

/* ==================== Interactive Mic / Off-Mic & Live Speaker Indicator ==================== */
.hud-mic-btn {
  gap: 6px;
  font-weight: 700;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.hud-mic-btn.is-on {
  background: rgba(16, 185, 129, 0.24);
  border-color: rgba(16, 185, 129, 0.65);
  color: #a7f3d0;
}
.hud-mic-btn.is-speaking {
  background: rgba(16, 185, 129, 0.38);
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.35), 0 0 16px rgba(16, 185, 129, 0.55);
}
body.exam-seat-locked .hud-mic-btn,
body.exam-seat-locked .island-speaker-pill {
  display: none !important;
}
.island-speaker-pill {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 44;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(52, 211, 153, 0.55);
  color: #ecfdf5;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.island-speaker-pill[hidden] {
  display: none;
}
.isp-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: ispPulse 1s ease-in-out infinite;
}
@keyframes ispPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.65; }
}
.mpc-mic-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.24);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.45);
}
.mpc-mic-badge.is-speaking {
  background: #10b981;
  color: #052e16;
}

/* ==================== Teacher Live Mic Control Bar (.mpc-mic-ctrl-*) ==================== */
.mpc-mic-ctrl-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  margin-bottom: 6px;
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  font-size: 0.72rem;
  color: #e0f2fe;
}
.mpc-mic-ctrl-btn {
  border: none;
  border-radius: 7px;
  padding: 4px 8px;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  background: #ef4444;
  color: #fff;
}
.mpc-mic-ctrl-btn.is-allow {
  background: #10b981;
  color: #052e16;
}
.mpc-mic-stu-btn {
  border: none;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.66rem;
  font-weight: 800;
  cursor: pointer;
  margin-left: 4px;
}
.mpc-mic-stu-btn.is-allow {
  background: rgba(16, 185, 129, 0.28);
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.5);
}
.mpc-mic-stu-btn.is-mute {
  background: rgba(239, 68, 68, 0.25);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.45);
}
