:root {
  color-scheme: dark;
  --bg-1: #07111f;
  --bg-2: #17305a;
  --bg-3: #f38f57;
  --panel: rgba(10, 17, 32, 0.66);
  --panel-strong: rgba(15, 24, 44, 0.9);
  --panel-soft: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f5f7fb;
  --muted: rgba(233, 239, 250, 0.72);
  --accent: #ffd166;
  --accent-2: #91f2c3;
  --shadow: 0 32px 60px rgba(0, 0, 0, 0.35);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --app-width: 1380px;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(145, 242, 195, 0.18), transparent 35%),
    radial-gradient(circle at 85% 12%, rgba(255, 209, 102, 0.24), transparent 28%),
    linear-gradient(140deg, var(--bg-1), var(--bg-2) 45%, #321d29 85%, var(--bg-3) 125%);
  color: var(--text);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  filter: blur(24px);
  opacity: 0.46;
}

body::before {
  top: 12%;
  left: 4%;
  width: 18rem;
  height: 18rem;
  background: rgba(122, 199, 255, 0.22);
  border-radius: 50%;
}

body::after {
  right: 7%;
  bottom: 6%;
  width: 24rem;
  height: 24rem;
  background: rgba(243, 143, 87, 0.18);
  border-radius: 44% 56% 57% 43% / 40% 49% 51% 60%;
}

.app-shell {
  width: min(calc(100vw - 32px), var(--app-width));
  margin: 0 auto;
  padding: 28px 0 40px;
}

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

.hero-copy {
  max-width: 740px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d2f3ff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.hero-title {
  margin: 14px 0 10px;
  font-family: "Iowan Old Style", "Palatino Linotype", serif;
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-subtitle {
  margin: 0;
  font-size: 1.03rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 62ch;
}

.hero-start-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  min-height: 64px;
  padding: 0 28px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #2f1e05;
  background: linear-gradient(180deg, #ffe7b8, #ffc447);
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.hero-start-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 22px 36px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  filter: saturate(1.04);
}

.topbar-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.glass-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.language-toggle,
.star-panel {
  padding: 14px;
}

.language-toggle {
  display: flex;
  gap: 10px;
}

.language-button,
.lesson-card,
.secondary-button,
.primary-button,
.mini-key {
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.language-button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
}

.language-button:hover,
.lesson-card:hover,
.secondary-button:hover,
.primary-button:hover,
.mini-key:hover {
  transform: translateY(-1px);
}

.language-button.is-active {
  background: rgba(145, 242, 195, 0.16);
  border-color: rgba(145, 242, 195, 0.55);
  box-shadow: inset 0 0 0 1px rgba(145, 242, 195, 0.12);
}

.star-panel {
  min-width: 220px;
}

.panel-label {
  display: block;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(223, 232, 246, 0.7);
  margin-bottom: 8px;
}

.star-total {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
}

.star-total .star {
  font-size: 1.9rem;
  filter: drop-shadow(0 0 14px rgba(255, 209, 102, 0.38));
}

.star-total small {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.content-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 22px;
}

.sidebar,
.stage-card {
  min-height: 720px;
}

.sidebar {
  padding: 18px;
}

.section-title {
  margin: 4px 0 6px;
  font-size: 1.2rem;
}

.section-copy {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.lesson-list {
  display: grid;
  gap: 14px;
}

.lesson-card {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 18px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(4, 9, 18, 0.32);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.lesson-card.is-locked {
  cursor: default;
  opacity: 0.6;
}

.lesson-card.is-active {
  border-color: rgba(255, 209, 102, 0.55);
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(255, 209, 102, 0.22);
}

.lesson-card.is-complete {
  border-color: rgba(145, 242, 195, 0.44);
}

.lesson-card-top,
.lesson-meta,
.stage-header,
.stage-actions,
.status-row,
.instruction-panel,
.helper-row,
.lesson-badge {
  display: flex;
  align-items: center;
}

.lesson-card-top,
.stage-header {
  justify-content: space-between;
  gap: 14px;
}

.lesson-emoji {
  width: 50px;
  height: 50px;
  display: inline-grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.45rem;
}

.lesson-name {
  margin: 14px 0 6px;
  font-size: 1.08rem;
}

.lesson-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  min-height: 3.1em;
}

.lesson-meta {
  justify-content: space-between;
  margin-top: 14px;
  color: rgba(223, 232, 246, 0.78);
  font-size: 0.92rem;
}

.lesson-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
}

.lesson-chip.is-earned {
  background: rgba(255, 209, 102, 0.14);
  color: #ffe2a6;
}

.stage-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stage-kicker {
  color: #d2f3ff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

.stage-title {
  margin: 6px 0 10px;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
}

.stage-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  max-width: 60ch;
}

.stage-actions {
  gap: 10px;
  flex-wrap: wrap;
}

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

.computer-wrapper {
  position: relative;
  padding: 18px;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(7, 13, 26, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.computer-wrapper::before {
  content: "";
  position: absolute;
  inset: 28px 22px auto auto;
  width: 130px;
  height: 130px;
  background: radial-gradient(circle, rgba(145, 242, 195, 0.18), transparent 72%);
  filter: blur(6px);
  pointer-events: none;
}

.laptop-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 28px 28px 24px 24px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.42)),
    linear-gradient(160deg, #8dc9ff 0%, #4b72d2 36%, #1a2343 70%, #f59562 140%);
  border: 12px solid #1f2431;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 24px 40px rgba(0, 0, 0, 0.28);
}

.screen-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 142px;
  height: 20px;
  background: #111622;
  border-radius: 0 0 16px 16px;
  z-index: 5;
}

.screen-ui {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
}

.laptop-base {
  margin: -2px auto 0;
  width: min(92%, 820px);
  background:
    linear-gradient(180deg, #d6d8dc, #a8abb0 36%, #8d8f95 100%);
  border-radius: 0 0 34px 34px;
  padding: 22px 24px 24px;
  box-shadow:
    inset 0 10px 12px rgba(255, 255, 255, 0.42),
    inset 0 -12px 16px rgba(0, 0, 0, 0.16),
    0 30px 50px rgba(0, 0, 0, 0.3);
}

.keyboard-grid {
  min-height: 124px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.keyboard-placeholder {
  grid-column: 1 / -1;
  align-self: center;
  justify-self: center;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(73, 78, 86, 0.28);
  color: rgba(37, 45, 60, 0.78);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.mini-key {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background:
    linear-gradient(180deg, #20242d, #11141b);
  color: #f8f9fb;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 2px 0 rgba(0, 0, 0, 0.4);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.mini-key[data-wide="2"] {
  grid-column: span 2;
}

.mini-key[data-wide="3"] {
  grid-column: span 3;
}

.mini-key.is-active {
  background:
    linear-gradient(180deg, #ffe2a6, #ffc14a);
  color: #3b2a09;
}

.mini-key.is-ghost {
  cursor: default;
  opacity: 0.72;
}

.trackpad-shell {
  margin: 0 auto;
  width: min(280px, 78%);
}

.trackpad {
  position: relative;
  aspect-ratio: 1.72 / 1;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.18)),
    #ced2d8;
  border: 1px solid rgba(82, 88, 100, 0.42);
  box-shadow:
    inset 0 12px 18px rgba(255, 255, 255, 0.45),
    inset 0 -10px 18px rgba(84, 90, 102, 0.18);
  cursor: grab;
  touch-action: none;
}

.trackpad:active {
  cursor: grabbing;
}

.trackpad-label {
  position: absolute;
  left: 14px;
  bottom: 10px;
  font-size: 0.82rem;
  color: rgba(37, 45, 60, 0.78);
}

.instruction-panel {
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  padding: 18px;
}

.helper-row {
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--muted);
}

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

.status-row {
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-row.is-done {
  background: rgba(145, 242, 195, 0.1);
  border-color: rgba(145, 242, 195, 0.34);
}

.status-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
  flex-shrink: 0;
}

.status-row.is-done .status-dot {
  background: rgba(145, 242, 195, 0.22);
  color: #b9ffd8;
}

.status-copy {
  display: grid;
  gap: 2px;
}

.status-copy strong {
  font-size: 0.96rem;
}

.status-copy span {
  color: rgba(223, 232, 246, 0.68);
  font-size: 0.9rem;
}

.lesson-badge {
  gap: 8px;
  padding: 11px 13px;
  border-radius: 16px;
  background: rgba(255, 209, 102, 0.12);
  color: #ffe7ad;
}

.secondary-button,
.primary-button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.primary-button {
  background: linear-gradient(180deg, #ffe2a6, #ffbf48);
  color: #302006;
  border-color: rgba(255, 209, 102, 0.45);
  font-weight: 700;
}

.desktop-scene,
.spotlight-scene {
  position: relative;
  width: 100%;
  height: 100%;
}

.menu-bar {
  height: 26px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(246, 249, 255, 0.92);
  background: rgba(9, 12, 20, 0.26);
  backdrop-filter: blur(14px);
}

.window-card {
  position: absolute;
  top: 54px;
  left: 50%;
  transform: translateX(-50%);
  width: min(76%, 560px);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(248, 250, 255, 0.9);
  color: #172033;
  box-shadow: 0 22px 36px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.window-card.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  background: rgba(236, 240, 247, 0.95);
  border-bottom: 1px solid rgba(20, 26, 40, 0.08);
}

.traffic-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.traffic-dot.red {
  background: #ff6157;
}

.traffic-dot.yellow {
  background: #ffbd2f;
}

.traffic-dot.green {
  background: #28c840;
}

.window-title {
  margin-left: 10px;
  font-size: 0.9rem;
  font-weight: 700;
}

.notes-shell {
  padding: 18px 20px 20px;
}

.scroll-frame {
  position: relative;
  height: 220px;
  overflow: hidden;
  border-radius: 18px;
  padding: 0 14px 0 0;
  background: linear-gradient(180deg, rgba(244, 247, 252, 0.92), rgba(234, 239, 248, 0.96));
  border: 1px solid rgba(20, 26, 40, 0.08);
}

.scroll-content {
  padding: 20px 18px 28px;
  min-height: 420px;
  line-height: 1.55;
  transform: translateY(0);
  transition: transform 90ms linear;
}

.scroll-content h4,
.spotlight-launch h4 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.scroll-content p,
.scroll-content li,
.spotlight-launch p {
  margin: 0 0 12px;
  color: #33415d;
}

.scroll-content ul {
  margin: 0 0 12px;
  padding-left: 18px;
}

.scroll-marker {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, #d6ffe6, #b6f5ca);
  color: #155a2f;
  font-weight: 700;
}

.scrollbar-track {
  position: absolute;
  top: 14px;
  right: 8px;
  width: 6px;
  height: calc(100% - 28px);
  border-radius: 999px;
  background: rgba(12, 22, 38, 0.08);
}

.scrollbar-thumb {
  position: absolute;
  right: 0;
  width: 100%;
  height: 64px;
  border-radius: 999px;
  background: rgba(26, 37, 58, 0.28);
  transform: translateY(0);
  transition: transform 90ms linear;
}

.dock {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 24px;
  background: rgba(16, 19, 29, 0.3);
  backdrop-filter: blur(14px);
}

.dock-icon,
.desktop-item,
.folder-item {
  position: relative;
  border: 0;
  background: none;
  color: inherit;
  cursor: default;
}

.dock-icon {
  width: 60px;
  display: grid;
  gap: 7px;
  justify-items: center;
  color: rgba(247, 250, 255, 0.92);
}

.app-tile,
.desktop-tile,
.folder-tile {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.app-tile {
  background: linear-gradient(180deg, #8bc0ff, #4d68d3);
}

.dock-safari-tile {
  background: linear-gradient(180deg, #96d2ff, #2f72d1);
}

.dock-photos-tile {
  background: linear-gradient(180deg, #ffd798, #ff9a57);
}

.dock-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.dock-indicator.is-active {
  background: #f8fbff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.42);
}

.dock-app-window {
  width: min(68%, 470px);
}

.dock-success {
  bottom: 102px;
}

.desktop-items {
  position: absolute;
  inset: 56px 24px 28px;
}

.desktop-item,
.folder-item {
  position: absolute;
  width: 92px;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: rgba(246, 249, 255, 0.95);
  text-align: center;
}

.desktop-item .desktop-tile {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(201, 219, 255, 0.82));
  color: #20415f;
}

.folder-item .folder-tile {
  background: linear-gradient(180deg, #ffd97e, #ffbb39);
  color: #5b3c04;
}

.folder-item.is-targeted .folder-tile {
  box-shadow:
    0 0 0 4px rgba(255, 209, 102, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.drag-ghost {
  position: absolute;
  width: 92px;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: rgba(246, 249, 255, 0.95);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.drag-shadow {
  position: absolute;
  width: 54px;
  height: 12px;
  border-radius: 999px;
  background: rgba(7, 12, 24, 0.28);
  filter: blur(10px);
}

.desktop-caption {
  font-size: 0.84rem;
}

.spotlight-scene {
  padding-top: 34px;
}

.spotlight-cloud {
  position: absolute;
  inset: 22px 22px auto auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 66%);
  filter: blur(10px);
}

.spotlight-panel {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  width: min(82%, 560px);
  border-radius: 28px;
  padding: 16px;
  background: rgba(20, 26, 40, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(28px);
  box-shadow: 0 24px 38px rgba(0, 0, 0, 0.25);
}

.spotlight-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 0 18px;
  border-radius: 20px;
  background: rgba(249, 250, 255, 0.92);
  color: #1e283e;
  font-size: 1.08rem;
  font-weight: 600;
}

.spotlight-hint {
  padding: 16px 4px 0;
  color: rgba(240, 244, 251, 0.76);
  font-size: 0.95rem;
}

.spotlight-launch {
  position: absolute;
  left: 50%;
  bottom: 54px;
  transform: translateX(-50%);
  width: min(62%, 420px);
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(249, 250, 255, 0.88);
  color: #172033;
  box-shadow: 0 22px 34px rgba(0, 0, 0, 0.26);
}

.virtual-cursor {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 4px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 0 2px rgba(18, 22, 30, 0.15),
    0 8px 18px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -50%) rotate(-20deg);
  z-index: 10;
  pointer-events: none;
}

.virtual-cursor::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: rgba(43, 63, 108, 0.14);
}

.completion-banner {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 209, 102, 0.18), rgba(145, 242, 195, 0.12));
  border: 1px solid rgba(255, 209, 102, 0.28);
  color: #f8ecb9;
  line-height: 1.6;
}

.clipboard-scene,
.browser-scene,
.typo-scene {
  position: relative;
  width: 100%;
  height: 100%;
}

.copy-board {
  position: absolute;
  inset: 62px 28px 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.copy-panel,
.site-card,
.typo-card {
  border-radius: 22px;
  background: rgba(249, 250, 255, 0.9);
  color: #172033;
  box-shadow: 0 22px 36px rgba(0, 0, 0, 0.22);
}

.copy-panel {
  padding: 20px;
  border: 2px solid transparent;
}

.copy-panel h4,
.site-card h3,
.typo-card h4 {
  margin: 0 0 12px;
}

.copy-panel.is-selected,
.copy-panel.is-focused,
.address-bar.is-focused,
.typo-card.is-focused {
  border-color: rgba(76, 126, 255, 0.55);
  box-shadow:
    0 22px 36px rgba(0, 0, 0, 0.22),
    0 0 0 4px rgba(76, 126, 255, 0.16);
}

.copy-snippet,
.paste-pad,
.typo-line {
  min-height: 84px;
  border-radius: 18px;
  padding: 18px;
  display: flex;
  align-items: center;
  font-size: 1.12rem;
  line-height: 1.5;
}

.copy-snippet {
  background: linear-gradient(180deg, #fff4d6, #ffe6a3);
  color: #5b4300;
  font-weight: 700;
}

.paste-pad,
.typo-line {
  background: linear-gradient(180deg, rgba(237, 242, 250, 0.9), rgba(226, 234, 247, 0.98));
  color: #66758f;
}

.paste-pad.has-text,
.typo-line.has-text {
  color: #172033;
  font-weight: 600;
}

.copy-success,
.typo-success {
  position: absolute;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  width: min(72%, 460px);
  padding: 18px 20px;
  border-radius: 24px;
  background: rgba(249, 250, 255, 0.88);
  color: #172033;
  box-shadow: 0 22px 34px rgba(0, 0, 0, 0.24);
}

.copy-success h4,
.typo-success h4 {
  margin: 0 0 8px;
}

.copy-success p,
.typo-success p,
.site-card p,
.typo-card p {
  margin: 0;
  color: #33415d;
  line-height: 1.55;
}

.browser-window {
  position: absolute;
  inset: 56px 28px 28px;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(249, 250, 255, 0.92);
  box-shadow: 0 22px 36px rgba(0, 0, 0, 0.24);
}

.browser-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: rgba(235, 240, 247, 0.95);
  border-bottom: 1px solid rgba(20, 26, 40, 0.08);
}

.browser-dots {
  display: flex;
  gap: 7px;
}

.address-bar {
  min-height: 46px;
  border-radius: 16px;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.94);
  color: #44506a;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-weight: 600;
}

.browser-body {
  padding: 26px;
}

.site-card {
  padding: 24px;
}

.site-card.is-muted {
  background: rgba(241, 245, 251, 0.9);
}

.typo-window {
  top: 82px;
  width: min(72%, 540px);
}

.typo-card {
  padding: 18px;
  border: 2px solid transparent;
}

.close-window-card {
  top: 82px;
  width: min(72%, 540px);
}

.close-window-card.is-maximized {
  top: 56px;
  width: min(90%, 760px);
}

.window-action-button {
  border: 0;
  padding: 0;
  cursor: pointer;
}

.close-success {
  bottom: 34px;
}

.dock-icon.is-bouncing {
  animation: dock-bounce 1.1s ease-in-out infinite;
}

@keyframes dock-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.home-shell {
  padding-top: 36px;
}

.home-course-card,
.lesson-stage-page {
  padding: 22px;
}

.course-grid,
.lesson-page-grid {
  display: grid;
  gap: 18px;
}

.course-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.course-card {
  position: relative;
  padding: 22px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)),
    rgba(4, 9, 18, 0.34);
  overflow: hidden;
}

.course-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: var(--card-accent);
}

.course-card-top,
.lesson-topbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.course-link,
.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.course-link {
  margin-top: 18px;
  padding: 12px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe2a6, #ffbf48);
  color: #302006;
  font-weight: 700;
}

.course-link:hover,
.nav-link:hover {
  transform: translateY(-1px);
}

.lesson-page-shell {
  padding-top: 24px;
}

.lesson-topbar {
  margin-bottom: 18px;
}

.compact-star-panel {
  min-width: 210px;
}

.lesson-stage-page {
  display: grid;
  gap: 18px;
}

.lesson-page-actions {
  justify-content: flex-start;
}

.lesson-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px !important;
  align-items: start;
  gap: 16px;
}

.lesson-page-grid > .computer-wrapper {
  grid-column: 1 !important;
}

.lesson-page-grid > .instruction-panel {
  grid-column: 2 !important;
}

.lesson-page-shell .instruction-panel {
  position: sticky;
  top: 16px;
  align-self: start;
}

@media (max-width: 1180px), (max-height: 900px) {
  .app-shell {
    width: min(calc(100vw - 24px), 1120px);
    padding: 20px 0 28px;
  }

  .topbar,
  .stage-header,
  .lesson-topbar {
    gap: 14px;
  }

  .hero-title {
    font-size: clamp(2.15rem, 5.5vw, 3.5rem);
  }

  .hero-subtitle,
  .stage-description {
    max-width: 56ch;
    line-height: 1.58;
  }

  .topbar-tools {
    justify-content: flex-start;
  }

  .home-course-card,
  .lesson-stage-page {
    padding: 18px;
  }

  .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .lesson-topbar,
  .stage-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .lesson-page-actions {
    width: 100%;
  }

  .lesson-page-actions .secondary-button,
  .lesson-page-actions .primary-button {
    flex: 1;
    justify-content: center;
  }

  .computer-wrapper {
    padding: 14px;
  }

  .laptop-screen {
    max-width: 820px;
    margin: 0 auto;
    border-width: 9px;
    padding: 16px;
  }

  .laptop-base {
    width: min(100%, 720px);
    padding: 18px 16px 18px;
  }

  .keyboard-grid {
    min-height: 102px;
    gap: 6px;
  }

  .mini-key {
    min-height: 44px;
    font-size: 0.86rem;
  }

  .trackpad-shell {
    width: min(230px, 68%);
  }

  .instruction-panel {
    padding: 16px;
    gap: 14px;
  }

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

@media (max-width: 1120px) {
  .content-grid,
  .stage-stack,
  .course-grid {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .stage-card {
    min-height: auto;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar-tools {
    justify-content: flex-start;
  }

  .lesson-topbar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (min-width: 761px) and (max-width: 1120px) {
  .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 700px) and (max-width: 1180px) {
  .status-list {
    grid-template-columns: 1fr;
  }

  .computer-wrapper {
    padding: 12px;
  }

  .laptop-screen {
    max-width: none;
  }

  .laptop-base {
    width: min(100%, 680px);
    padding: 16px 14px 16px;
  }

  .keyboard-grid {
    min-height: 96px;
  }

  .trackpad-shell {
    width: min(210px, 62%);
  }

}

@media (max-width: 760px) {
  .lesson-page-grid {
    grid-template-columns: 1fr !important;
  }

  .lesson-page-grid > .computer-wrapper,
  .lesson-page-grid > .instruction-panel {
    grid-column: auto;
  }

  .instruction-panel {
    position: static;
  }

  .app-shell {
    width: min(calc(100vw - 20px), var(--app-width));
    padding-top: 20px;
  }

  .hero-title {
    font-size: clamp(2.1rem, 10vw, 3.2rem);
  }

  .language-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .language-button {
    flex: 1;
  }

  .sidebar,
  .stage-card {
    padding: 16px;
  }

  .computer-wrapper {
    padding: 12px;
  }

  .laptop-screen {
    border-width: 8px;
    padding: 14px;
  }

  .laptop-base {
    width: 100%;
    padding: 18px 14px 18px;
  }

  .keyboard-grid {
    gap: 6px;
    min-height: 106px;
  }

  .mini-key {
    min-height: 42px;
    font-size: 0.84rem;
  }

  .stage-actions {
    width: 100%;
  }

  .stage-actions .primary-button,
  .stage-actions .secondary-button,
  .lesson-topbar .nav-link {
    flex: 1;
    justify-content: center;
  }

  .course-card {
    padding: 18px;
  }

  .status-list {
    grid-template-columns: 1fr;
  }

  .copy-board {
    grid-template-columns: 1fr;
    inset: 52px 16px 22px;
  }

  .browser-window {
    inset: 52px 16px 22px;
  }

  .typo-window {
    width: calc(100% - 32px);
    top: 64px;
  }

  .close-window-card {
    width: calc(100% - 32px);
    top: 64px;
  }
}
