/* ============================================================
   Code Way Academy · Project studio
   Black and white first. Accents stay small.
   ============================================================ */

/* The editor follows the theme. Code samples reuse the dark values below. */
:root,
.code-sample {
  --code-bg: #08080a;
  --code-bg-2: #0b0b0e;
  --code-text: #e7e7ec;
  --code-gutter: #4f4f5a;
  --code-tag: #38bdf8;
  --code-attr: #e879f9;
  --code-str: #fbbf24;
  --code-punct: #8b8b9a;
  --code-com: #7b7b8a;
  --code-prop: #3b82f6;
  --code-val: var(--code-str);
  --code-sel: #a78bfa;
  --caret: #ffffff;
  --code-sel-bg: rgba(255, 255, 255, 0.2);
  --pe-bg: linear-gradient(145deg, #101014, #0a0a0d);
}

[data-theme="light"] {
  --code-bg: #f4f5f7;
  --code-bg-2: #eef0f3;
  --code-text: #17171c;
  --code-gutter: #9a9aa4;
  --code-tag: #0369a1;
  --code-attr: #a21caf;
  --code-str: #92400e;
  --code-punct: #52525b;
  --code-com: #71717a;
  --code-prop: #1d4ed8;
  --code-sel: #6d28d9;
  --caret: #0b0b0d;
  --code-sel-bg: rgba(11, 11, 13, 0.16);
  --pe-bg: linear-gradient(145deg, #ffffff, #eef1f4);
}

body.studio {
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 50% at 50% -20%, rgba(255, 255, 255, 0.045), transparent 70%),
    var(--bg-deep);
}

[data-theme="light"] body.studio {
  background:
    radial-gradient(ellipse 70% 50% at 50% -20%, rgba(29, 78, 216, 0.09), transparent 70%),
    var(--bg-deep);
}

body.studio.stage-open {
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.1;
  will-change: transform;
  animation: studio-drift 30s ease-in-out infinite;
}

.b1 {
  top: -24%;
  left: 2%;
  width: 48vw;
  height: 48vw;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.34), transparent 66%);
}

.b2 {
  right: -10%;
  bottom: -32%;
  width: 46vw;
  height: 46vw;
  background: radial-gradient(circle, rgba(232, 121, 249, 0.24), transparent 66%);
  animation-delay: -10s;
  animation-duration: 37s;
}

.b3 {
  top: 28%;
  right: 18%;
  width: 26vw;
  height: 26vw;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%);
  animation-delay: -17s;
  animation-duration: 42s;
}

.b4 {
  bottom: 8%;
  left: 26%;
  width: 22vw;
  height: 22vw;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
  animation-delay: -23s;
  animation-duration: 34s;
}

[data-theme="light"] .blob {
  opacity: 0.2;
}

@keyframes studio-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-3%, 4%, 0) scale(1.1);
  }
}

.app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100vh;
  padding: 0 8px 8px;
}

/* ---------- top bar ---------- */

.topbar {
  position: relative;
  z-index: 50;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  height: 34px;
  margin: 0 -8px;
  padding: 0 12px;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.06), transparent 42%),
    var(--glass);
  animation: topbar-in 0.7s var(--ease) both;
}

[data-theme="light"] .topbar {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.7), transparent 52%),
    var(--glass);
}

@keyframes topbar-in {
  from {
    opacity: 0.65;
  }
  to {
    opacity: 1;
  }
}

.brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-width: 150px;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  background: linear-gradient(145deg, #1c1c22, #09090b 74%);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 7px 18px rgba(0, 0, 0, 0.3);
}

.brand-mark svg {
  width: 14px;
  height: 14px;
}

.brand-spark {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 8px var(--sky);
  animation: pulse-soft 3s ease-in-out infinite;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-copy strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.brand-copy strong b {
  color: var(--muted);
  font-weight: 500;
}

.brand-copy > span {
  display: block;
  margin-top: 1px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar-center {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}

.chip-level {
  color: var(--sky);
}

.rank {
  color: var(--faint);
  font-weight: 500;
}

.topbar-title {
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.progress {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  white-space: nowrap;
}

.progress-track {
  display: block;
  width: 76px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.progress-fill {
  display: block;
  width: 2.5%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--text), var(--sky));
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
  transition: width 0.45s var(--ease);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  transition:
    transform 0.2s var(--ease),
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: var(--surface-solid);
  color: var(--text);
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

.topbar .icon-btn {
  width: 25px;
  height: 25px;
  border-radius: 8px;
}

.topbar .icon-btn svg {
  width: 13px;
  height: 13px;
}

.skill-dock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  transition:
    transform 0.2s var(--ease),
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.skill-dock:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: var(--surface-solid);
  color: var(--text);
}

.skill-dock svg {
  width: 11px;
  height: 11px;
  color: var(--sky);
}

.skill-dock.has-new {
  border-color: var(--line-strong);
  color: var(--text);
  animation: dock-pop 0.8s var(--ease);
}

@keyframes dock-pop {
  0% {
    box-shadow: 0 0 0 0 var(--sky-soft);
  }
  100% {
    box-shadow: 0 0 0 12px transparent;
  }
}

.studio-theme {
  height: 25px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 9px;
}

/* ---------- skill locker ---------- */

.skills-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  width: 344px;
  max-height: min(64vh, 560px);
  overflow: auto;
  padding: 16px;
  border-radius: 20px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.06), transparent 46%),
    var(--glass-strong);
  animation: panel-in 0.35s var(--ease);
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.skills-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.skills-panel-head div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.skills-panel-head strong {
  font-size: 14px;
  font-weight: 620;
}

.skill-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-item {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.skill-item.is-locked {
  opacity: 0.46;
}

.skill-item.is-on {
  border-color: var(--line-strong);
}

.skill-glyph {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--sky-soft);
  color: var(--sky);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
}

.tone-magenta {
  background: var(--magenta-soft);
  color: var(--magenta);
}

.tone-red {
  background: var(--red-soft);
  color: var(--red);
}

.tone-sky {
  background: var(--sky-soft);
  color: var(--sky);
}

.tone-blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.skill-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.skill-copy strong {
  font-size: 11.5px;
  font-weight: 600;
}

.skill-copy span {
  margin-top: 2px;
  overflow: hidden;
  color: var(--faint);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skill-state {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.skill-item.is-on .skill-state {
  color: var(--sky);
}

/* ---------- workspace ---------- */

.workspace {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 37fr) minmax(0, 63fr);
  gap: 8px;
  min-height: 0;
}

.left-stack {
  display: grid;
  grid-template-rows: minmax(0, 53fr) minmax(0, 47fr);
  gap: 8px;
  min-width: 0;
  min-height: 0;
}

.pane {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 20px;
  background:
    linear-gradient(170deg, rgba(255, 255, 255, 0.035), transparent 34%),
    var(--surface);
  box-shadow: var(--shadow);
  animation: pane-in 0.8s var(--ease) both;
}

[data-theme="light"] .pane {
  background:
    linear-gradient(170deg, rgba(255, 255, 255, 0.72), transparent 42%),
    var(--surface);
}

.left-stack .editor-pane {
  animation-delay: 90ms;
}

@keyframes pane-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.994);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- lesson ---------- */

.lesson-pane {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.lesson-head {
  flex: 0 0 auto;
  padding: 5px 16px 0;
}

.lesson-head .eyebrow {
  display: block;
  line-height: 1.1;
}

.eyebrow {
  color: var(--sky);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.slide-title {
  margin: 2px 0 2px;
  font-family: var(--serif);
  font-size: clamp(21px, 1.85vw, 28px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}

.slide-lede {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.slide-rail {
  display: flex;
  gap: 4px;
  margin-top: 5px;
}

.rail-seg {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.rail-seg i {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--line);
  transition: background 0.3s ease;
}

.rail-seg b {
  overflow: hidden;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.rail-seg.is-done i {
  background: var(--line-strong);
}

.rail-seg.is-active i {
  background: linear-gradient(90deg, var(--text), var(--sky));
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

.rail-seg.is-active b {
  color: var(--text);
}

.lesson-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 6px 16px 10px;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.lesson-body[data-dir="forward"] .slide-inner {
  animation: slide-forward 0.42s var(--ease);
}

.lesson-body[data-dir="back"] .slide-inner {
  animation: slide-back 0.42s var(--ease);
}

@keyframes slide-forward {
  from {
    opacity: 0;
    transform: translateX(16px);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

@keyframes slide-back {
  from {
    opacity: 0;
    transform: translateX(-16px);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

.lesson-body p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.52;
}

.lesson-body p:last-child {
  margin-bottom: 0;
}

.lesson-body strong {
  color: var(--text);
  font-weight: 600;
}

.lesson-body code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 10.5px;
}

.slide-list {
  margin: 0 0 8px;
  padding-left: 15px;
}

.slide-list li {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.slide-list li::marker {
  color: var(--sky);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}

.slide-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
}

.note {
  margin: 7px 0 0;
  padding: 8px 10px;
  border-left: 2px solid var(--sky);
  border-radius: 0 9px 9px 0;
  background: var(--sky-soft);
}

.note.tip {
  border-left-color: var(--magenta);
  background: var(--magenta-soft);
}

.note.good {
  border-left-color: var(--sky);
  background: var(--sky-soft);
}

.note-title {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.note p {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
}

.lesson-nav {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: auto 1fr auto;
  gap: 6px;
  align-items: center;
  padding: 4px 8px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.slide-meta {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.5px;
  text-align: center;
}

.lesson-nav .btn {
  height: 28px;
  min-width: 68px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  transition:
    transform 0.22s var(--ease),
    background 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    opacity 0.22s ease,
    box-shadow 0.22s ease;
}

.btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-solid);
  color: var(--text);
}

.btn-ghost:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-primary {
  min-width: 84px;
  border: 0;
  background: var(--action-bg);
  color: var(--action-ink);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

[data-theme="light"] .btn-primary {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.btn-primary:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  box-shadow: none;
}

/* ---------- code samples ---------- */

.code-sample {
  margin: 7px 0 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: var(--code-bg);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.code-sample-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 24px;
  padding: 0 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: #7d7d88;
  font-family: var(--mono);
  font-size: 8.5px;
}

.code-sample-dots {
  display: flex;
  gap: 4px;
}

.code-sample-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fb7185;
}

.code-sample-dots span:nth-child(2) {
  background: #ffca78;
}

.code-sample-dots span:nth-child(3) {
  background: #38bdf8;
}

.code-sample pre {
  margin: 0;
  padding: 8px 10px;
  overflow: auto;
  color: var(--code-text);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.code-sample code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

.tok-tag {
  color: var(--code-tag);
}

.tok-attr {
  color: var(--code-attr);
}

.tok-str {
  color: var(--code-str);
}

.tok-punct {
  color: var(--code-punct);
}

.tok-com {
  color: var(--code-com);
  font-style: italic;
}

.tok-prop {
  color: var(--code-prop);
}

.tok-val {
  color: var(--code-val);
}

.tok-sel {
  color: var(--code-sel);
}

/* ---------- lesson visuals ---------- */

.visual-caption {
  margin: 4px 0 0;
  color: var(--faint);
  font-size: 9px;
  text-align: center;
}

.cover-art {
  position: relative;
  display: grid;
  place-items: center;
  height: 128px;
  margin-top: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 55%, var(--sky-soft), transparent 62%),
    var(--surface-2);
}

.cover-ring {
  position: absolute;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  animation: spin-slow 34s linear infinite;
}

.cover-ring.r1 {
  width: 104px;
  height: 104px;
}

.cover-ring.r2 {
  width: 146px;
  height: 146px;
  border-style: dashed;
  opacity: 0.5;
  animation-duration: 48s;
  animation-direction: reverse;
}

.cover-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: var(--action-bg);
  color: var(--action-ink);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.cover-chip {
  position: absolute;
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.cover-chip.c1 {
  top: 14px;
  left: 14px;
  color: var(--sky);
}

.cover-chip.c2 {
  right: 14px;
  bottom: 16px;
  color: var(--magenta);
}

.cover-chip.c3 {
  bottom: 12px;
  left: 16px;
  color: var(--red);
}

.mini-browser {
  margin-top: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
}

.mini-browser-bar {
  display: flex;
  gap: 4px;
  height: 18px;
  padding: 6px 8px;
  background: #0b0b0d;
}

.mini-browser-bar span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fb7185;
}

.mini-browser-bar span:nth-child(2) {
  background: #ffca78;
}

.mini-browser-bar span:nth-child(3) {
  background: #38bdf8;
}

.mini-site {
  position: relative;
  min-height: 168px;
  padding: 14px;
  overflow: hidden;
  background: #0b0b0d;
  color: #f5f5f7;
}

.mini-site::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("assets/backdrop-bridge.jpg");
  background-position: center;
  background-size: cover;
  filter: grayscale(1) brightness(0.58) contrast(1.06);
  opacity: 0.95;
}

.mini-site::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 8, 10, 0.1), rgba(8, 8, 10, 0.86));
}

.mini-site.is-bare {
  min-height: 176px;
  padding: 8px 12px;
  background: #ffffff;
  color: #111114;
  font-family: "Times New Roman", Times, serif;
}

.mini-site.is-bare::before,
.mini-site.is-bare::after {
  display: none;
}

.mini-card {
  position: relative;
  z-index: 1;
  max-width: 230px;
  margin: 0 auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 15px;
  background: rgba(8, 8, 10, 0.62);
  backdrop-filter: blur(10px);
}

.mini-site.is-bare .mini-card {
  max-width: none;
  padding: 0;
  border: 0;
  background: none;
  backdrop-filter: none;
}

.mini-avatar {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  background: #ffffff;
  color: #0b0b0d;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 800;
}

.mini-site.is-bare .mini-avatar {
  display: none;
}

.mini-card h3 {
  margin: 6px 0 3px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}

.mini-site.is-bare .mini-card h3 {
  margin: 0 0 3px;
  font-family: inherit;
  font-size: 18px;
}

.mini-card p {
  margin: 0 0 6px;
  color: #c8c8d0;
  font-size: 9px;
  line-height: 1.4;
}

.mini-site.is-bare .mini-card p {
  color: #111114;
  font-size: 10.5px;
}

.mini-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
}

.mini-site.is-bare .mini-card ul {
  display: block;
  padding-left: 18px;
  list-style: disc;
}

.mini-card li {
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #eeeeF2;
  font-family: var(--font);
  font-size: 8px;
  font-weight: 600;
}

.mini-site.is-bare .mini-card li {
  padding: 0;
  border: 0;
  background: none;
  color: #111114;
  font-family: inherit;
  font-size: 10px;
  font-weight: 400;
}

.mini-card a {
  color: var(--magenta);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
}

.mini-site.is-bare .mini-card a {
  color: #0000ee;
  font-family: inherit;
  font-size: 10px;
  font-weight: 400;
  text-decoration: underline;
}

.roadmap-grid {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.roadmap-card {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.roadmap-num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--bg-3);
  color: var(--sky);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
}

.roadmap-card:nth-child(2) .roadmap-num {
  color: var(--magenta);
}

.roadmap-card:nth-child(3) .roadmap-num {
  color: var(--red);
}

.roadmap-copy {
  display: flex;
  flex-direction: column;
}

.roadmap-copy strong {
  font-size: 11.5px;
  font-weight: 600;
}

.roadmap-copy span {
  margin-top: 2px;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.35;
}

.pane-map {
  margin-top: 4px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.map-screen {
  display: grid;
  grid-template-columns: 1fr 1.9fr;
  grid-template-rows: 1fr 1fr;
  gap: 5px;
  height: 130px;
}

.map-box {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 7px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.map-box b {
  position: relative;
  z-index: 1;
}

.map-lesson {
  grid-column: 1;
  grid-row: 1;
  background: linear-gradient(145deg, var(--sky-soft), transparent);
  color: var(--sky);
}

.map-code {
  grid-column: 1;
  grid-row: 2;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent);
  color: var(--muted);
}

.map-preview {
  grid-column: 2;
  grid-row: 1 / 3;
  background: linear-gradient(145deg, var(--magenta-soft), transparent);
  color: var(--magenta);
}

.map-pin {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--surface-solid);
  color: var(--text);
  font-size: 7px;
}

.map-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 6px 0;
  color: var(--faint);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-arrow::before,
.map-arrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.tour-key {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.tour-key li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 6px;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.4;
}

.tour-key b {
  color: var(--text);
}

.tour-key i {
  color: var(--sky);
  font-style: normal;
  font-weight: 700;
}

.permission-card {
  display: grid;
  gap: 6px;
  margin-top: 4px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--surface-2);
}

.permission-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.permission-check {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--sky-soft);
  color: var(--sky);
  font-size: 8px;
  font-weight: 800;
}

.part-art {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 102px;
  margin-top: 4px;
  padding: 0 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: radial-gradient(circle at 82% 50%, var(--magenta-soft), transparent 60%);
}

.part-number {
  color: transparent;
  font-family: var(--serif);
  font-size: 76px;
  font-weight: 500;
  line-height: 1;
  -webkit-text-stroke: 1px var(--line-strong);
}

.part-line {
  width: 1px;
  height: 46px;
  background: var(--line-strong);
}

.part-caption {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.tag-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 4px;
}

.tag-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
}

.tag-card code {
  padding: 0;
  background: none;
  color: var(--sky);
  font-size: 11px;
  font-weight: 700;
}

.tag-card span {
  color: var(--faint);
  font-size: 8.5px;
}

.tag-card:nth-child(2) code {
  color: var(--magenta);
}

.tag-card:nth-child(3) code {
  color: var(--red);
}

.tag-anatomy {
  display: grid;
  grid-template-columns: auto auto auto;
  justify-content: center;
  align-items: start;
  gap: 10px;
  margin-top: 6px;
  padding: 13px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.anatomy-part {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.anatomy-part code {
  padding: 4px 6px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1;
}

.anatomy-part:first-child code {
  background: var(--sky-soft);
  color: var(--sky);
}

.anatomy-part.content code {
  background: var(--magenta-soft);
  color: var(--magenta);
}

.anatomy-part:last-child code {
  background: var(--red-soft);
  color: var(--red);
}

.anatomy-label {
  position: relative;
  max-width: 82px;
  padding-top: 8px;
  color: var(--faint);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.anatomy-label::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 5px;
  background: var(--line-strong);
}

.css-anatomy {
  margin-top: 4px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  background: #08080a;
  color: #e7e7ec;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.6;
}

.css-anatomy .indent {
  padding-left: 14px;
}

.css-key {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.css-key span {
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: #a9a9b3;
  font-family: var(--font);
  font-size: 8px;
}

.css-key b {
  color: #e7e7ec;
}

.palette-grid {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.palette-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
}

.palette-card strong {
  display: block;
  font-size: 10px;
}

.palette-card span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 7.5px;
}

.swatches {
  display: flex;
  gap: 3px;
}

.swatch {
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.type-specimen {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.type-specimen .type-aa {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.type-specimen .type-lines {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.type-specimen .type-lines span {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
}

.type-specimen .type-lines span:nth-child(2) {
  width: 82%;
}

.type-specimen .type-lines span:nth-child(3) {
  width: 62%;
}

.box-model {
  margin-top: 4px;
  padding: 12px;
  border: 1px dashed var(--magenta);
  border-radius: 14px;
  background: var(--magenta-soft);
  color: var(--magenta);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.box-padding {
  padding: 12px;
  border: 1px solid var(--sky);
  border-radius: 9px;
  background: var(--sky-soft);
  color: var(--sky);
}

.box-content {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 6px;
  background: var(--surface-solid);
  color: var(--text);
  font-size: 9px;
  letter-spacing: 0;
  text-transform: none;
}

.avatar-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 4px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.avatar-before,
.avatar-after {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.avatar-before span:first-child {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--muted);
  font-size: 14px;
}

.avatar-after span:first-child {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--action-bg);
  color: var(--action-ink);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.avatar-demo .avatar-arrow {
  color: var(--faint);
  font-size: 15px;
}

.backdrop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 4px;
}

.backdrop-card {
  position: relative;
  height: 76px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
}

.backdrop-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.7);
  opacity: 0.86;
}

.backdrop-card span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: 4px;
  overflow: hidden;
  color: #ffffff;
  font-size: 7px;
  font-weight: 700;
  text-overflow: ellipsis;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}

.responsive-demo {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.device {
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--bg-3);
}

.device-screen {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 7px;
  border-radius: 4px;
  background: var(--surface-solid);
}

.device-screen i {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: var(--line-strong);
}

.device-screen i:first-child {
  width: 26px;
  height: 6px;
  background: var(--sky);
}

.device.laptop .device-screen {
  width: 116px;
  height: 62px;
}

.device.phone .device-screen {
  width: 45px;
  height: 62px;
}

.device.phone i:first-child {
  width: 18px;
}

.device span {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 6.5px;
  text-align: center;
  text-transform: uppercase;
}

.browser-tab {
  margin-top: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}

.tab-strip {
  display: flex;
  align-items: flex-end;
  height: 34px;
  padding: 6px 8px 0;
  background: #0b0b0d;
}

.tab-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 7px 7px 0 0;
  background: #17171c;
  color: #f5f5f7;
  font-size: 8px;
  font-weight: 600;
}

.tab-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sky);
}

.tab-body {
  padding: 10px;
}

.tab-body strong {
  display: block;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}

.tab-body span {
  display: block;
  margin-top: 3px;
  color: var(--faint);
  font-size: 8.5px;
  line-height: 1.4;
}

.skill-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 600;
}

.skill-chip b {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: var(--sky-soft);
  color: var(--sky);
  font-family: var(--mono);
  font-size: 6.5px;
}

.skill-chip.is-off {
  opacity: 0.36;
}

.final-art {
  position: relative;
  margin-top: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #0b0b0d;
}

.final-art img {
  display: block;
  width: 100%;
  height: 92px;
  object-fit: cover;
  filter: grayscale(1) brightness(0.6);
}

.final-art-copy {
  position: absolute;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

.final-art-copy .mini-avatar {
  width: 31px;
  height: 31px;
  font-size: 9px;
}

.final-art-copy strong {
  display: block;
  color: #ffffff;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

.final-art-copy span {
  display: block;
  margin-top: 2px;
  color: #c2c2ca;
  font-size: 7.5px;
}

/* ---------- checkpoints ---------- */

.checkpoint {
  margin-top: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.checkpoint.is-passed {
  border-color: var(--line-strong);
  background: var(--surface);
  box-shadow: inset 0 1px 0 var(--edge);
}

.checkpoint.just-passed {
  animation: gate-pulse 1s var(--ease);
}

@keyframes gate-pulse {
  0% {
    box-shadow: 0 0 0 0 var(--sky-soft);
  }
  100% {
    box-shadow: 0 0 0 18px transparent;
  }
}

.checkpoint-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.checkpoint-label {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--faint);
  font-size: 8px;
  font-weight: 600;
}

.skill-pill.is-on {
  border-color: var(--line-strong);
  color: var(--sky);
}

.task-box {
  padding: 8px 9px;
  border-left: 2px solid var(--magenta);
  border-radius: 0 8px 8px 0;
  background: var(--magenta-soft);
}

.task-label {
  display: block;
  margin-bottom: 3px;
  color: var(--magenta);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.task-box p {
  margin: 0;
  color: var(--text);
  font-size: 10.5px;
  line-height: 1.5;
}

.task-box code {
  background: var(--surface-2);
  color: var(--magenta);
}

.checkpoint-hint {
  margin: 7px 0 0;
  color: var(--faint);
  font-size: 8.5px;
  line-height: 1.45;
}

.check-list {
  display: grid;
  gap: 4px;
  margin: 9px 0;
  padding: 0;
  list-style: none;
}

.check-row {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 6px;
  align-items: start;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.4;
}

.check-icon {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--sky);
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
}

.check-row[data-state="pass"] .check-icon {
  border-color: var(--sky);
  background: var(--sky-soft);
}

.check-row[data-state="fail"] .check-icon {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--red);
}

.check-row[data-state="fail"] .check-label {
  color: var(--text);
}

.check-note {
  display: block;
  margin-top: 1px;
  color: var(--red);
  font-size: 8.5px;
  line-height: 1.35;
}

.checkpoint-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.checkpoint-actions .btn {
  height: 32px;
  font-size: 9.5px;
}

.btn-check {
  flex: 1;
  min-width: 102px;
  height: 33px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--action-bg);
  color: var(--action-ink);
  font-size: 9.5px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.btn-check:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-check:disabled {
  opacity: 0.55;
  cursor: wait;
}

.skill-award {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 9px;
  padding: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 var(--edge);
}

.skill-award-glyph {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: var(--sky-soft);
  color: var(--sky);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
}

.skill-award strong {
  display: block;
  font-size: 10.5px;
}

.skill-award span {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 8.5px;
}

/* ---------- editor ---------- */

.editor-pane {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 22%),
    #0b0b0e;
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .editor-pane {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), transparent 24%),
    #f4f5f7;
  border-color: var(--line);
}

.editor-bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  height: 30px;
  padding: 0 8px 0 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.022);
}

[data-theme="light"] .editor-bar {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.file-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--code-text);
  font-family: var(--mono);
  font-size: 8.5px;
}

.file-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 0 3px var(--sky-soft);
}

.editor-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.save-state {
  color: var(--code-gutter);
  font-size: 7px;
  font-weight: 500;
}

.icon-btn-dark {
  width: 22px;
  height: 22px;
  border-color: rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--code-gutter);
}

[data-theme="light"] .icon-btn-dark {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
}

.icon-btn-dark:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--code-text);
}

[data-theme="light"] .icon-btn-dark:hover {
  background: #ffffff;
  color: var(--text);
}

.icon-btn-dark svg {
  width: 11px;
  height: 11px;
}

.editor-wrap {
  display: grid;
  flex: 1;
  grid-template-columns: 38px 1fr;
  min-height: 0;
  background: linear-gradient(180deg, var(--code-bg), var(--code-bg-2));
}

.gutter {
  overflow: hidden;
  padding-top: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.055);
}

[data-theme="light"] .gutter {
  border-right-color: var(--line);
}

.gutter-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-right: 8px;
  will-change: transform;
}

.gutter-inner span {
  color: var(--code-gutter);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  tab-size: 2;
}

.code-stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.code-stage pre,
.code-stage textarea {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  tab-size: 2;
  white-space: pre;
  word-wrap: normal;
}

.code-stage pre {
  overflow: hidden;
  color: var(--code-text);
  pointer-events: none;
  will-change: transform;
}

.code-stage textarea {
  z-index: 2;
  overflow: auto;
  border: 0;
  outline: 0;
  background: transparent;
  color: transparent;
  caret-color: var(--caret);
  resize: none;
}

.code-stage textarea::selection {
  background: var(--code-sel-bg);
}

.code-stage textarea::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.code-stage textarea::-webkit-scrollbar-track {
  background: transparent;
}

.code-stage textarea::-webkit-scrollbar-thumb {
  border: 2px solid var(--code-bg);
  border-radius: 999px;
  background: var(--line-strong);
}

.editor-empty {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px;
  color: var(--code-gutter);
  pointer-events: none;
  text-align: center;
  animation: empty-float 5.5s ease-in-out infinite;
}

@keyframes empty-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.editor-empty-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 3px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--sky);
  font-family: var(--mono);
  font-size: 9px;
}

.editor-empty strong {
  color: var(--code-text);
  font-size: 10.5px;
  font-weight: 600;
}

.editor-empty span:last-child {
  max-width: 220px;
  font-size: 8.5px;
  line-height: 1.45;
}

.editor-foot {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 30px;
  padding: 0 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.022);
}

[data-theme="light"] .editor-foot {
  border-top-color: var(--line);
  background: rgba(255, 255, 255, 0.5);
}

.check-hint {
  overflow: hidden;
  color: var(--code-gutter);
  font-size: 7.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-foot .btn-check {
  flex: 0 0 auto;
  min-width: 88px;
  height: 22px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 8px;
}

/* ---------- preview ---------- */

.preview-pane {
  background:
    linear-gradient(170deg, rgba(255, 255, 255, 0.03), transparent 30%),
    var(--surface);
  animation-delay: 160ms;
}

.preview-bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.traffic {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.traffic span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}

.traffic span:first-child {
  background: var(--red);
}

.traffic span:nth-child(2) {
  background: #ffca78;
}

.traffic span:nth-child(3) {
  background: var(--sky);
}

.address {
  flex: 1;
  max-width: 260px;
  margin: 0 auto;
  padding: 4px 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-tag {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  color: var(--sky);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 0 2px var(--sky-soft);
  animation: breathe 2.8s ease-in-out infinite;
}

.live-tag.is-loading .live-dot {
  animation: breathe 0.55s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.preview-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 7px;
  background: var(--bg-2);
}

[data-theme="light"] .preview-wrap {
  background: #e7ebef;
}

.preview-wrap::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  left: 7px;
  z-index: 4;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--sky), transparent);
  opacity: 0;
  pointer-events: none;
}

.preview-pane.is-loading .preview-wrap::after {
  animation: preview-scan 0.8s var(--ease);
}

@keyframes preview-scan {
  0% {
    opacity: 0;
    top: 7px;
  }
  20% {
    opacity: 0.75;
  }
  100% {
    opacity: 0;
    top: calc(100% - 9px);
  }
}

.preview-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
}

.preview-empty {
  position: absolute;
  inset: 7px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--pe-bg);
  color: var(--text);
  text-align: center;
}

.preview-empty-art {
  position: relative;
  width: 186px;
  height: 96px;
  margin-bottom: 10px;
  padding: 22px 14px 12px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
}

.pe-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #0b0b0d;
  border-radius: 9px 9px 0 0;
}

.pe-line {
  display: block;
  width: 64%;
  height: 5px;
  margin-bottom: 6px;
  border-radius: 999px;
  background: var(--line-strong);
  animation: skeleton 2.2s ease-in-out infinite;
}

.pe-line.widest {
  width: 86%;
  height: 8px;
  background: linear-gradient(90deg, var(--text), var(--sky));
  opacity: 0.55;
}

.pe-line.short {
  width: 40%;
}

@keyframes skeleton {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.85;
  }
}

.pe-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--action-bg);
  color: var(--action-ink);
  font-size: 8px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.preview-empty strong {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.preview-empty > span:last-child {
  max-width: 340px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.preview-foot {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  height: 32px;
  padding: 0 10px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 9px;
}

.link-btn {
  padding: 3px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 9.5px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.link-btn:hover {
  color: var(--sky);
  text-decoration-color: var(--sky);
}

/* ---------- full page stage ---------- */

body.stage-open .app {
  filter: blur(2px) brightness(0.72);
  transform: scale(0.992);
  transition: filter 0.4s ease, transform 0.4s var(--ease);
}

.stage-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 22px;
}

.stage-scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 6, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: scrim-in 0.3s ease both;
}

@keyframes scrim-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.stage-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1500px, 96vw);
  height: min(92vh, 980px);
  overflow: hidden;
  border-radius: 24px;
  background: var(--glass-strong);
  animation: stage-in 0.5s var(--ease) both;
}

@keyframes stage-in {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.stage-bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}

.stage-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.stage-kicker {
  color: var(--sky);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.stage-heading strong {
  font-size: 13px;
  font-weight: 620;
  letter-spacing: -0.015em;
}

.stage-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.stage-seg {
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
}

.stage-seg button {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--faint);
  font-size: 8px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.stage-seg button.is-on {
  background: var(--text);
  color: var(--bg);
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 9px;
}

.stage-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease, transform 0.25s var(--ease);
}

.stage-close:hover {
  transform: rotate(90deg);
  background: var(--surface-solid);
  color: var(--text);
}

.open-fallback {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 9px 15px;
  border-bottom: 1px solid rgba(251, 113, 133, 0.22);
  background: var(--red-soft);
  color: var(--text);
  font-size: 9.5px;
  animation: fallback-in 0.3s var(--ease);
}

@keyframes fallback-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.open-fallback a,
.open-fallback button {
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 8.5px;
  font-weight: 600;
  text-decoration: none;
}

.open-fallback a:hover,
.open-fallback button:hover {
  border-color: var(--text);
}

.stage-body {
  display: flex;
  flex: 1;
  justify-content: center;
  min-height: 0;
  padding: 14px;
  overflow: auto;
  background: var(--bg-deep);
}

.stage-body iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  transition: width 0.45s var(--ease), border-radius 0.45s var(--ease);
}

.stage-body.is-phone iframe {
  width: 390px;
  max-width: 100%;
  border-radius: 22px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.stage-foot {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 15px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 7.5px;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  z-index: 150;
  max-width: min(90vw, 520px);
  padding: 10px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--glass-strong);
  color: var(--text);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4), inset 0 1px 0 var(--edge);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 0.24s ease, transform 0.3s var(--ease);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.warn {
  border-color: rgba(251, 113, 133, 0.28);
}

/* ---------- skill unlock ---------- */

.skill-unlock {
  position: absolute;
  right: 14px;
  bottom: 60px;
  left: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  overflow: visible;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background:
    radial-gradient(circle at 12% 50%, var(--sky-soft), transparent 46%),
    var(--glass-strong);
  color: var(--text);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.44), inset 0 1px 0 var(--edge);
  animation: unlock-in 0.45s var(--ease-spring);
}

.skill-unlock.is-out {
  animation: unlock-out 0.4s ease-in forwards;
}

.skill-unlock-glyph {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 11px;
  background: var(--sky-soft);
  color: var(--sky);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
}

.skill-unlock-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.skill-unlock-kicker {
  color: var(--sky);
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.skill-unlock strong {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 620;
}

.skill-unlock-copy > span:last-child {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unlock-spark {
  position: absolute;
  top: 50%;
  left: 30px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sky);
  pointer-events: none;
  animation: spark-fly 0.95s var(--ease) forwards;
  animation-delay: var(--delay, 0ms);
}

.unlock-spark:nth-child(3n) {
  background: var(--magenta);
}

.unlock-spark:nth-child(3n + 1) {
  background: var(--red);
}

@keyframes spark-fly {
  0% {
    opacity: 1;
    transform: rotate(var(--angle)) translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: rotate(var(--angle)) translateX(var(--distance)) scale(0.2);
  }
}

@keyframes unlock-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes unlock-out {
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}

/* ---------- scrollbars ---------- */

.lesson-body::-webkit-scrollbar,
.skills-panel::-webkit-scrollbar {
  width: 7px;
}

.lesson-body::-webkit-scrollbar-thumb,
.skills-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--line-strong);
}

.lesson-body::-webkit-scrollbar-track,
.skills-panel::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- responsive ---------- */

@media (max-width: 1240px) {
  .topbar-title {
    display: none;
  }

  .progress-track {
    width: 72px;
  }
}

@media (max-width: 1080px) {
  .studio-theme {
    width: 30px;
    padding: 0;
  }

  .studio-theme .theme-label {
    display: none;
  }
}

@media (max-width: 1100px) {
  body.studio {
    height: auto;
    overflow: auto;
  }

  .app {
    height: auto;
    min-height: 100vh;
    padding-right: max(8px, env(safe-area-inset-right));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    padding-left: max(8px, env(safe-area-inset-left));
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .left-stack {
    display: contents;
  }

  .lesson-pane {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 600px;
  }

  .editor-pane {
    grid-column: 1;
    grid-row: 2;
    min-height: 470px;
  }

  .preview-pane {
    grid-column: 2;
    grid-row: 2;
    min-height: 560px;
  }

  .lesson-head,
  .lesson-body,
  .lesson-nav {
    width: 100%;
    max-width: 760px;
    margin-right: auto;
    margin-left: auto;
  }

  .lesson-body {
    max-height: 450px;
  }

  .slide-title {
    font-size: 26px;
  }

  .topbar {
    position: sticky;
    top: 0;
    height: calc(34px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    padding-right: max(12px, env(safe-area-inset-right));
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .topbar .icon-btn {
    width: 30px;
    height: 30px;
  }

  .topbar .icon-btn svg {
    width: 15px;
    height: 15px;
  }

  .skill-dock,
  .studio-theme {
    height: 30px;
  }

  .lesson-nav {
    padding: 6px 8px;
    gap: 6px;
  }

  .lesson-nav .btn {
    height: 36px;
    font-size: 10.5px;
  }

  .slide-meta {
    font-size: 9px;
  }

  .editor-bar {
    height: 38px;
    padding: 0 8px 0 12px;
  }

  .file-tab {
    gap: 7px;
    font-size: 9.5px;
  }

  .file-dot {
    width: 6px;
    height: 6px;
  }

  .save-state {
    font-size: 8.5px;
  }

  .editor-bar .icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .editor-bar .icon-btn svg {
    width: 15px;
    height: 15px;
  }

  .editor-foot {
    height: 36px;
    padding: 0 10px;
  }

  .check-hint {
    font-size: 8.5px;
  }

  .editor-foot .btn-check {
    height: 30px;
    min-width: 94px;
    font-size: 9px;
  }

  .preview-wrap {
    padding: 5px;
  }

  .preview-wrap::after {
    top: 5px;
    right: 5px;
    left: 5px;
  }

  .preview-wrap iframe {
    border-radius: 7px;
  }

  .preview-empty {
    inset: 5px;
    border-radius: 7px;
  }

  .pane {
    border-radius: 16px;
  }

  .traffic {
    display: none;
  }
}

@media (max-width: 720px) {
  .app {
    gap: 6px;
    padding: 0 max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }

  .topbar {
    flex-wrap: wrap;
    gap: 7px;
    height: auto;
    padding: max(7px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 7px max(10px, env(safe-area-inset-left));
    border-radius: 0 0 14px 14px;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }

  .left-stack {
    display: grid;
    grid-template-rows: auto auto;
  }

  .lesson-pane,
  .editor-pane,
  .preview-pane {
    grid-column: auto;
    grid-row: auto;
  }

  .brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  .topbar-center {
    display: none;
  }

  .topbar-right {
    order: 2;
  }

  .progress {
    flex: 1;
  }

  .progress-track {
    flex: 1;
    width: auto;
  }

  .skills-panel {
    right: 0;
    width: min(344px, calc(100vw - 16px));
  }

  .lesson-head {
    padding: 6px 14px 0;
  }

  .lesson-body {
    padding: 6px 14px 10px;
  }

  .lesson-pane {
    min-height: 0;
  }

  .slide-title {
    font-size: 23px;
  }

  .stage-overlay {
    padding: 0;
  }

  .stage-panel {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .stage-bar {
    align-items: flex-start;
    padding: max(13px, env(safe-area-inset-top)) max(15px, env(safe-area-inset-right)) 13px max(15px, env(safe-area-inset-left));
  }

  .stage-tools {
    gap: 5px;
  }

  .stage-seg button {
    padding: 0 8px;
  }

  .btn-sm {
    padding: 0 9px;
  }

  .stage-body {
    padding: 8px max(8px, env(safe-area-inset-right)) 8px max(8px, env(safe-area-inset-left));
  }

  .stage-foot {
    padding-bottom: max(9px, env(safe-area-inset-bottom));
    font-size: 7px;
  }
}

@media (max-width: 600px) {
  .brand-copy strong {
    font-size: 14px;
  }

  .brand-copy > span {
    display: none;
  }

  .progress {
    display: none;
  }
}

@media (max-width: 520px) {
  .topbar-right {
    gap: 5px;
  }

  .stage-heading {
    display: none;
  }

  .stage-tools {
    width: 100%;
    justify-content: flex-end;
  }

  .stage-body.is-phone iframe {
    width: 100%;
    border-radius: 12px;
  }

  .stage-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
}

@media (max-width: 380px) {
  .lesson-nav {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "meta meta"
      "back next";
    row-gap: 6px;
  }

  .lesson-nav .btn-ghost {
    grid-area: back;
  }

  .lesson-nav .btn-primary {
    grid-area: next;
  }

  .slide-meta {
    grid-area: meta;
  }
}


/* ---------- studio project actions ---------- */

.preview-foot {
  height: auto;
  min-height: 32px;
  padding: 4px 10px;
  gap: 4px 12px;
  flex-wrap: wrap;
}

.preview-foot-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.preview-foot-actions .link-btn[hidden] {
  display: none;
}
