:root {
  --paper: #f3efe6;
  --surface: #fffdf7;
  --soft: #e3e7df;
  --ink: #171914;
  --muted: #69706a;
  --line: #c8cdc5;
  --green: #008875;
  --lime: #b7ff29;
  --blue: #6c72f5;
  --coral: #ff6855;
  --yellow: #ffd76a;
  --shadow: 8px 8px 0 rgba(23, 25, 20, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 0 0, rgba(108, 114, 245, 0.09), transparent 28rem),
    radial-gradient(circle at 100% 8rem, rgba(255, 104, 85, 0.08), transparent 26rem),
    var(--paper);
  font-family: "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
}

button, select, a { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

button { color: inherit; }

button:focus-visible,
a:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 4px solid #1d5cff;
  outline-offset: 4px;
}

[hidden] { display: none !important; }

.page {
  width: min(1600px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 80px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  min-height: 250px;
  padding: 10px 18px 28px;
}

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

.eyebrow,
.panel-label,
.lesson-kicker,
.lab-heading p,
.reference-heading p,
.listen-panel header p,
.comparison-label,
.current-code p,
.command-heading p {
  margin: 0;
  color: var(--green);
  font: 800 12px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.14em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.eyebrow i {
  position: relative;
  width: 19px;
  height: 19px;
  border: 2px solid var(--blue);
  border-radius: 6px;
}

.eyebrow i::after {
  position: absolute;
  inset: 5px -7px -7px 5px;
  z-index: -1;
  border-radius: 6px;
  background: var(--lime);
  content: "";
}

h1 {
  margin: 0;
  font-size: min(6.65vw, 104px);
  line-height: 0.98;
  letter-spacing: 0;
  white-space: nowrap;
}

.lead {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.7vw, 25px);
  font-weight: 700;
}

.lead strong { color: var(--ink); }

.hero-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.hero-actions button,
.hero-actions a {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.hero-actions a {
  display: inline-flex;
  align-items: center;
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.hero-actions a.next-tool-link {
  border-color: #9fd5c7;
  background: #e4fff7;
  color: var(--green);
}

.time-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid #b9dbd3;
  border-radius: 14px;
  background: #e5fff7;
  color: var(--green);
  font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.time-badge b { font-size: 22px; }

.lab,
.skip-section,
.reference-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 18px 55px rgba(23, 25, 20, 0.07);
}

.lab-heading,
.reference-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 104px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
}

.section-number {
  display: grid;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  background: var(--coral);
  color: white;
  font: 900 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.section-number.blue { background: var(--blue); }

.lab-heading h2,
.reference-heading h2 {
  margin: 3px 0 0;
  font-size: clamp(23px, 2.2vw, 34px);
  line-height: 1.08;
  letter-spacing: 0;
}

.progress-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.progress-status span {
  padding: 10px 13px;
  border-radius: 999px;
  background: #eef0eb;
  color: var(--muted);
}

.progress-status b {
  min-width: 54px;
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--lime);
  text-align: center;
}

.step-nav {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 15px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: #f7f5ef;
}

.step-nav > i {
  height: 2px;
  background: #d4d7d0;
}

.step-nav button {
  display: grid;
  grid-template-columns: 32px auto;
  grid-template-rows: auto auto;
  gap: 0 9px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.step-nav button > span {
  display: grid;
  grid-row: 1 / 3;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--muted);
  font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.step-nav b { font-size: 14px; }

.step-nav small {
  margin-top: 2px;
  color: #929891;
  font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
}

.step-nav button[aria-current="step"] > span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--lime);
}

.step-nav button.is-complete > span {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.step-nav button[aria-current="step"] b { color: var(--green); }

.workbench {
  display: grid;
  grid-template-columns: 310px minmax(500px, 1fr) 285px;
  min-height: 650px;
}

.setup-panel,
.listen-panel { background: #f7f4ec; }

.setup-panel { border-right: 1px solid var(--line); }

.panel-block {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.panel-block h3 {
  margin: 7px 0 14px;
  font-size: 18px;
}

.os-switch {
  display: grid;
  gap: 7px;
}

.os-switch button {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.os-switch button span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  background: #e7e9e4;
  font-size: 12px;
}

.os-switch button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.os-switch button[aria-pressed="true"] span {
  background: var(--lime);
  color: var(--ink);
}

.detected-message {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.current-task { position: relative; padding-left: 76px; }

.task-number {
  position: absolute;
  top: 24px;
  left: 24px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: var(--coral);
  color: white;
  font: 900 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.current-task h3 { margin-top: 7px; }

.current-task > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.65;
}

.command-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.command-heading > span {
  color: var(--blue);
  font: 900 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.command-block dl { margin: 0; }

.command-block dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  border-top: 1px solid #dfe2db;
}

.command-block dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.command-block dd { margin: 0; }

kbd {
  display: inline-grid;
  min-width: 27px;
  min-height: 26px;
  padding: 4px 7px;
  place-items: center;
  border: 1px solid #aeb4ad;
  border-bottom-width: 3px;
  border-radius: 7px;
  background: white;
  font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  box-shadow: 0 1px 0 white inset;
}

.quiet-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border-bottom: 0;
}

.quiet-note > span {
  display: grid;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  font-weight: 900;
}

.quiet-note p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.quiet-note strong { display: block; color: var(--ink); font-size: 12px; }

.stage-panel { min-width: 0; background: #dfe4dc; }

.browser-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 20px;
  border-bottom: 1px solid #b9c0b8;
  background: #cfd5cd;
  color: #697069;
  font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.browser-bar p { display: flex; align-items: center; gap: 5px; margin: 0; }

.browser-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.browser-bar i:nth-child(2) { background: var(--yellow); }
.browser-bar i:nth-child(3) { margin-right: 7px; background: #55c995; }

.browser-bar > span {
  padding: 8px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--lime);
}

.stage-content {
  min-height: 602px;
  padding: 18px;
  background-color: #f9f7f1;
  background-image:
    linear-gradient(rgba(23, 25, 20, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 25, 20, 0.055) 1px, transparent 1px);
  background-size: 27px 27px;
}

.lesson {
  min-height: 566px;
  animation: lessonIn 280ms ease both;
}

@keyframes lessonIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.starter-card,
.finish-card {
  position: relative;
  display: flex;
  min-height: 566px;
  padding: 42px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sound-mark {
  position: absolute;
  top: 38px;
  right: 40px;
  display: flex;
  align-items: center;
  gap: 5px;
  width: 95px;
  height: 78px;
}

.sound-mark i,
.wave-icon i {
  width: 8px;
  border-radius: 999px;
  background: var(--blue);
  animation: soundWave 1.1s ease-in-out infinite alternate;
}

.sound-mark i:nth-child(1), .sound-mark i:nth-child(5) { height: 24px; }
.sound-mark i:nth-child(2), .sound-mark i:nth-child(4) { height: 50px; animation-delay: -0.4s; }
.sound-mark i:nth-child(3) { height: 74px; animation-delay: -0.7s; }

@keyframes soundWave { to { transform: scaleY(0.46); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

.starter-card h3,
.finish-card h3 {
  max-width: 600px;
  margin: 12px 0 14px;
  font-size: clamp(42px, 4.7vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
}

.starter-copy,
.finish-card > p:not(.lesson-kicker) {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.7;
}

.shortcut {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 10px;
}

.shortcut kbd {
  min-width: 74px;
  min-height: 62px;
  border: 2px solid var(--ink);
  border-bottom-width: 6px;
  border-radius: 13px;
  background: var(--lime);
  font-size: 24px;
}

.shortcut span { font-size: 18px; font-weight: 900; }

.shortcut.compact kbd { min-width: 62px; min-height: 50px; font-size: 20px; }

.fn-note { margin: 0 0 25px; color: var(--muted); font-size: 11px; font-weight: 700; }
.fn-note kbd { margin: 0 3px; }

.primary-action,
.secondary-action,
.focus-sample {
  min-height: 48px;
  padding: 0 18px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--ink);
  color: white;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 4px 4px 0 var(--lime);
  cursor: pointer;
}

.primary-action span { margin-left: 22px; color: var(--lime); }

.lesson-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  padding: 16px 20px;
  border: 2px solid var(--ink);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: var(--surface);
}

.lesson-intro h3 { margin: 4px 0 0; font-size: 24px; letter-spacing: 0; }

.lesson-intro > span {
  padding: 9px 11px;
  border-radius: 999px;
  background: var(--lime);
  font: 900 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.practice-area {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(180px, 0.75fr);
  min-height: 486px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 0 0 20px 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.book-card { display: grid; grid-template-columns: 0.9fr 1fr; min-width: 0; }

.book-visual {
  position: relative;
  display: grid;
  min-height: 100%;
  padding: 30px;
  place-items: center;
  overflow: hidden;
  border-right: 2px solid var(--ink);
  background: var(--yellow);
}

.book-visual::before {
  position: absolute;
  width: 220px;
  height: 220px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  content: "";
}

.book-visual svg { position: relative; z-index: 1; width: min(100%, 260px); filter: drop-shadow(8px 8px 0 rgba(23,25,20,.16)); }

.book-visual > span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  padding: 7px 9px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.book-copy {
  display: flex;
  padding: 34px;
  flex-direction: column;
  justify-content: center;
}

.book-copy > p:first-child {
  margin: 0;
  color: var(--green);
  font: 900 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.1em;
}

.book-copy h4 { margin: 10px 0 14px; font-size: clamp(30px, 3vw, 48px); line-height: 0.98; letter-spacing: 0; }
.book-copy > p:nth-of-type(2) { margin: 0; color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.6; }

.book-form {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 8px;
  margin-top: 28px;
}

.book-form label { align-self: center; font-size: 12px; font-weight: 800; }

.book-form select {
  min-height: 42px;
  padding: 0 10px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: white;
  font-weight: 800;
}

.book-form button {
  grid-column: 1 / -1;
  min-height: 50px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--coral);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.book-form button span { float: right; }

.route-card {
  display: flex;
  min-width: 0;
  padding: 28px 22px;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: #eef0eb;
}

.route-card > p { margin: 0 0 12px; color: var(--green); font: 900 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.route-card ol { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.route-card li { display: flex; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.route-card li > span { display: grid; flex: 0 0 auto; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--ink); color: var(--lime); font: 900 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.route-card b, .route-card small { display: block; }
.route-card b { font-size: 12px; }
.route-card small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.3; }
.route-card .secondary-action { width: 100%; margin-top: auto; box-shadow: none; background: var(--blue); }

.compare-intro { background: var(--ink); color: white; }
.compare-intro .lesson-kicker { color: var(--lime); }

.quality-switch {
  display: flex;
  padding: 4px;
  border: 1px solid #484b45;
  border-radius: 12px;
  background: #2b2e29;
}

.quality-switch button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #aaafa7;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.quality-switch button[aria-pressed="true"] { background: var(--lime); color: var(--ink); }

.compare-workspace {
  display: grid;
  grid-template-columns: 145px minmax(240px, 1fr) minmax(220px, 0.85fr);
  min-height: 486px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 0 0 20px 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.case-list { padding: 16px 10px; border-right: 1px solid var(--line); background: #eef0eb; }

.case-list button {
  display: flex;
  width: 100%;
  min-height: 64px;
  padding: 10px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.case-list button > span { display: grid; flex: 0 0 auto; width: 27px; height: 27px; place-items: center; border-radius: 8px; background: white; font: 900 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.case-list b, .case-list small { display: block; }
.case-list b { font-size: 12px; }
.case-list small { margin-top: 4px; color: var(--muted); font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.case-list button[aria-current="true"] { border-radius: 11px; background: var(--ink); color: white; }
.case-list button[aria-current="true"] span { background: var(--lime); color: var(--ink); }
.case-list button[aria-current="true"] small { color: #b7bcb4; }

.comparison-stage {
  display: flex;
  padding: 26px;
  flex-direction: column;
  justify-content: center;
  background-color: #faf8f2;
  background-image: radial-gradient(#d4d7d0 1px, transparent 1px);
  background-size: 16px 16px;
}

.comparison-label { margin-bottom: 12px; }

.sample-frame {
  display: grid;
  min-height: 230px;
  padding: 28px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--yellow);
}

.sample-frame .visual-heading,
.sample-frame h2 { margin: 0; font-size: clamp(28px, 3vw, 46px); font-weight: 900; line-height: 1; text-align: center; letter-spacing: 0; }

.sample-frame .sample-icon-button {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--coral);
  font-size: 28px;
  cursor: pointer;
}

.sample-frame .sample-image { width: 180px; height: 128px; border: 2px solid var(--ink); border-radius: 14px; object-fit: cover; }
.sample-frame .sample-bg { width: 180px; height: 128px; border: 2px solid var(--ink); border-radius: 14px; background: linear-gradient(135deg, var(--blue) 0 50%, var(--lime) 50%); }
.sample-frame .sample-form { display: grid; width: min(100%, 260px); gap: 8px; }
.sample-frame .sample-form label { font-size: 13px; font-weight: 900; }
.sample-frame .sample-form input { width: 100%; height: 48px; padding: 0 13px; border: 2px solid var(--ink); border-radius: 10px; background: white; font: 700 14px/1 inherit; }

.focus-sample { align-self: flex-start; min-height: 40px; margin-top: 14px; padding: 0 13px; box-shadow: none; background: var(--blue); font-size: 11px; }

.code-card {
  display: flex;
  min-width: 0;
  padding: 24px 20px;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: #20231f;
  color: white;
}

.code-card > div { display: flex; justify-content: space-between; gap: 8px; }
.code-card > div span, .code-card > div b { font: 900 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.code-card > div span { color: #929990; }
.code-card > div b { color: var(--coral); }
.code-card > div b.is-good { color: var(--lime); }
.code-card pre { margin: 38px 0 22px; white-space: pre-wrap; overflow-wrap: anywhere; }
.code-card code { color: var(--lime); font: 700 13px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.code-card > p { margin: auto 0 0; padding-top: 16px; border-top: 1px solid #3a3e38; color: #c0c5bd; font-size: 11px; font-weight: 600; line-height: 1.6; }

.finish-card { background: var(--blue); color: white; }
.finish-card .lesson-kicker { color: var(--lime); }
.finish-card > p:not(.lesson-kicker) { color: #eaebff; }
.finish-mark { position: absolute; top: 35px; right: 38px; display: grid; width: 74px; height: 74px; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--lime); color: var(--ink); font-size: 36px; font-weight: 900; }
.finish-summary { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; gap: 8px; margin: 20px 0 24px; }
.finish-summary p { display: flex; min-height: 62px; margin: 0; padding: 10px; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.35); border-radius: 11px; background: rgba(255,255,255,.1); font-size: 11px; font-weight: 800; line-height: 1.35; }
.finish-summary span { display: grid; flex: 0 0 auto; width: 28px; height: 28px; place-items: center; border-radius: 8px; background: white; color: var(--blue); font: 900 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.finish-card .replay { background: var(--ink); box-shadow: 4px 4px 0 var(--lime); }

.listen-panel { border-left: 1px solid var(--line); }

.listen-panel header {
  display: flex;
  min-height: 58px;
  padding: 16px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--ink);
}

.listen-panel header p { color: white; font-size: 10px; }

.listen-panel header span {
  padding: 7px 9px;
  border-radius: 999px;
  background: var(--lime);
  font: 900 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.listen-main,
.meaning-card,
.current-code,
.privacy-note { padding: 22px 20px; border-bottom: 1px solid var(--line); }

.wave-icon { display: flex; height: 34px; align-items: center; gap: 4px; margin-bottom: 14px; }
.wave-icon i { width: 5px; height: 18px; background: var(--coral); }
.wave-icon i:nth-child(2) { height: 34px; }
.wave-icon i:nth-child(3) { height: 25px; }
.wave-icon i:nth-child(4) { height: 12px; }

.listen-main > p,
.meaning-card > p { margin: 0; color: var(--muted); font-size: 11px; font-weight: 800; }
.listen-main blockquote { margin: 10px 0 13px; font-size: 22px; font-weight: 900; line-height: 1.25; }
.listen-main small { display: block; color: var(--muted); font-size: 10px; line-height: 1.45; }
.meaning-card strong { display: block; margin: 10px 0 7px; font-size: 16px; }
.meaning-card span { display: block; color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.55; }
.current-code p { margin-bottom: 10px; }
.current-code code { display: block; padding: 13px; border-radius: 10px; background: var(--ink); color: var(--lime); font: 800 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.privacy-note { display: flex; gap: 10px; border-bottom: 0; }
.privacy-note > span { display: grid; flex: 0 0 auto; width: 26px; height: 26px; place-items: center; border: 1px solid var(--green); border-radius: 50%; color: var(--green); font-weight: 900; }
.privacy-note p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.privacy-note strong { display: block; color: var(--ink); font-size: 11px; }

.lab-footer {
  display: flex;
  min-height: 68px;
  padding: 10px 28px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: #c3c8bf;
}

.lab-footer p { margin: 0; font-size: 11px; font-weight: 600; }
.lab-footer kbd { margin-right: 3px; color: var(--ink); }
.lab-footer > div { display: flex; gap: 8px; }
.lab-footer button { min-height: 40px; padding: 0 14px; border: 1px solid #50554d; border-radius: 10px; background: #292c27; color: white; font-size: 11px; font-weight: 900; cursor: pointer; }
.lab-footer button:last-child { border-color: var(--lime); background: var(--lime); color: var(--ink); }
.lab-footer button:disabled { opacity: .4; cursor: not-allowed; }

.skip-section,
.reference-section { margin-top: 22px; }
.reference-heading .reference-note { margin-left: auto; padding: 9px 12px; border-radius: 999px; background: #e5fff7; color: var(--green); font: 900 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }

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

.reference-card {
  min-width: 0;
  padding: 25px;
  border-right: 1px solid var(--line);
}

.reference-card:last-child { border-right: 0; }
.reference-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.reference-card header span { color: var(--green); font: 900 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.reference-card header b { padding: 7px 9px; border-radius: 999px; background: #eef0eb; font: 900 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.reference-card h3 { margin: 16px 0 20px; font-size: 25px; letter-spacing: 0; }
.reference-commands { display: grid; gap: 7px; }
.reference-command { display: flex; min-height: 42px; padding: 7px 10px; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: #f8f6f0; }
.reference-command span { color: var(--muted); font-size: 11px; font-weight: 700; }
.reference-command b { display: flex; gap: 3px; }

.sources { display: flex; min-height: 66px; padding: 12px 28px; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); background: #eef0eb; }
.sources p { margin: 0; color: var(--muted); font-size: 11px; }
.sources p strong { color: var(--ink); }
.sources div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.sources a { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 10px; font-weight: 800; text-decoration: none; }

@media (max-width: 1280px) {
  .workbench { grid-template-columns: 270px minmax(480px, 1fr); }
  .listen-panel { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1fr 1fr 1.2fr; border-top: 1px solid var(--line); border-left: 0; }
  .listen-panel header { grid-column: 1 / -1; }
  .listen-main, .meaning-card, .current-code, .privacy-note { border-right: 1px solid var(--line); border-bottom: 0; }
  .privacy-note { border-right: 0; }
}

@media (max-width: 960px) {
  .page { width: min(100% - 24px, 760px); padding-top: 20px; }
  .hero { min-height: 190px; padding-inline: 8px; flex-direction: column; align-items: flex-start; }
  h1 { font-size: min(8.5vw, 70px); }
  .hero-actions { width: 100%; }
  .workbench { grid-template-columns: 1fr; }
  .setup-panel { display: grid; grid-template-columns: 1fr 1fr; border-right: 0; border-bottom: 1px solid var(--line); }
  .panel-block { border-right: 1px solid var(--line); }
  .panel-block:nth-child(even) { border-right: 0; }
  .practice-area { grid-template-columns: 1fr; }
  .route-card { border-top: 1px solid var(--line); border-left: 0; }
  .route-card .secondary-action { margin-top: 18px; }
  .book-card { min-height: 430px; }
  .compare-workspace { grid-template-columns: 130px 1fr; }
  .code-card { grid-column: 1 / -1; min-height: 220px; border-top: 1px solid var(--line); border-left: 0; }
  .code-card pre { margin: 22px 0; }
  .listen-panel { grid-template-columns: 1fr 1fr; }
  .listen-main, .meaning-card { border-bottom: 1px solid var(--line); }
  .meaning-card { border-right: 0; }
  .reference-grid { grid-template-columns: 1fr; }
  .reference-card { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 660px) {
  .page { width: min(100% - 16px, 520px); padding-bottom: 40px; }
  .hero { min-height: 165px; gap: 18px; }
  h1 { font-size: 7.5vw; }
  .lead { margin-top: 12px; font-size: 14px; }
  .time-badge { display: none; }
  .hero-actions button, .hero-actions a { min-height: 42px; padding: 0 12px; font-size: 11px; }
  .hero-actions .next-tool-link { flex: 1 1 100%; justify-content: center; }
  .lab, .skip-section, .reference-section { border-radius: 18px; }
  .lab-heading, .reference-heading { min-height: 82px; padding: 14px; }
  .section-number { width: 42px; height: 42px; border-radius: 12px; }
  .lab-heading h2, .reference-heading h2 { font-size: 18px; }
  .lab-heading p, .reference-heading p { font-size: 10px; }
  .progress-status span { display: none; }
  .progress-status b { min-width: 46px; padding: 8px; }
  .step-nav { grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 10px; }
  .step-nav > i { display: none; }
  .step-nav button { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .step-nav button > span { grid-row: auto; }
  .step-nav b { margin-top: 5px; font-size: 10px; }
  .step-nav small { display: none; }
  .setup-panel { display: block; }
  .panel-block { border-right: 0; }
  .command-block, .quiet-note { display: none; }
  .stage-content { min-height: 0; padding: 10px; }
  .lesson { min-height: 520px; }
  .starter-card, .finish-card { min-height: 520px; padding: 26px 20px; }
  .sound-mark, .finish-mark { top: 24px; right: 20px; transform: scale(.72); transform-origin: top right; }
  .starter-card h3, .finish-card h3 { font-size: 40px; }
  .shortcut kbd { min-width: 58px; min-height: 50px; font-size: 18px; }
  .lesson-intro { padding: 14px; }
  .lesson-intro h3 { font-size: 18px; }
  .book-card { grid-template-columns: 1fr; }
  .book-visual { min-height: 220px; border-right: 0; border-bottom: 2px solid var(--ink); }
  .book-copy { padding: 24px; }
  .compare-intro { display: block; }
  .quality-switch { margin-top: 12px; }
  .compare-workspace { grid-template-columns: 1fr; }
  .case-list { display: grid; grid-template-columns: 1fr 1fr; border-right: 0; border-bottom: 1px solid var(--line); }
  .case-list button { min-height: 54px; }
  .comparison-stage { min-height: 330px; padding: 18px; }
  .finish-summary { grid-template-columns: 1fr; }
  .listen-panel { display: block; }
  .listen-main, .meaning-card, .current-code, .privacy-note { border-right: 0; border-bottom: 1px solid var(--line); }
  .lab-footer { padding: 12px; }
  .lab-footer p { display: none; }
  .lab-footer > div { width: 100%; }
  .lab-footer button { flex: 1; }
  .reference-heading .reference-note { display: none; }
  .sources { align-items: flex-start; flex-direction: column; }
  .sources div { justify-content: flex-start; }
}

.skip-workbench {
  display: grid;
  grid-template-columns: 290px minmax(520px, 1fr) 330px;
  min-height: 620px;
}

.skip-controls,
.skip-guide {
  min-width: 0;
  padding: 26px 24px;
  background: #f7f4ec;
}

.skip-controls { border-right: 1px solid var(--line); }
.skip-guide { border-left: 1px solid var(--line); background: var(--ink); color: white; }
.skip-controls h3 { margin: 7px 0 10px; font-size: 21px; letter-spacing: 0; }
.skip-intro { margin: 0; color: var(--muted); font-size: 12px; font-weight: 650; line-height: 1.7; }

.quality-switch.light {
  margin-top: 22px;
  border-color: var(--line);
  background: #e8ebe5;
}

.quality-switch.light button { flex: 1; color: var(--muted); }
.quality-switch.light button[aria-pressed="true"] { background: var(--blue); color: white; }

.skip-result {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.skip-result > span {
  display: inline-block;
  margin-bottom: 13px;
  padding: 7px 9px;
  border-radius: 999px;
  background: var(--coral);
  color: white;
  font: 900 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.skip-result.is-improved > span { background: var(--green); }
.skip-result strong { display: block; font-size: 15px; }
.skip-result p { margin: 7px 0 0; color: var(--muted); font-size: 11px; font-weight: 650; line-height: 1.55; }
.skip-start { width: 100%; margin-top: 18px; }
.skip-hint { margin: 13px 0 0; color: var(--muted); font-size: 11px; font-weight: 650; line-height: 1.55; }
.skip-hint kbd { margin-inline: 3px; }

.skip-preview {
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr) 56px;
  min-width: 0;
  background: #dfe4dc;
}

.skip-preview .browser-bar { grid-row: 1; }
.skip-preview iframe {
  display: block;
  width: 100%;
  height: 516px;
  border: 0;
  background: #fffdf7;
}

.skip-focus-status {
  display: flex;
  min-width: 0;
  padding: 0 18px;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #b9c0b8;
  background: #cfd5cd;
}

.skip-focus-status span {
  padding: 7px 9px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--lime);
  font: 900 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.skip-focus-status strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skip-guide > header,
.skip-code-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.skip-guide > header p,
.skip-code-heading p {
  margin: 0;
  color: var(--lime);
  font: 900 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .1em;
}

.skip-guide > header span { color: #9ba199; font: 800 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.skip-guide ol { display: grid; gap: 10px; margin: 22px 0; padding: 0; list-style: none; }
.skip-guide li { display: grid; grid-template-columns: 32px 1fr; gap: 11px; padding-bottom: 13px; border-bottom: 1px solid #393d37; }
.skip-guide li > span { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: var(--lime); color: var(--ink); font: 900 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.skip-guide li strong { display: block; font-size: 13px; line-height: 1.4; }
.skip-guide li p { margin: 5px 0 0; color: #aeb4ac; font-size: 10px; font-weight: 650; line-height: 1.55; }
.skip-guide code { color: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.skip-code-heading button { min-height: 32px; padding: 0 10px; border: 1px solid #555b52; border-radius: 8px; background: #2a2e28; color: white; font-size: 10px; font-weight: 850; cursor: pointer; }
.skip-code-heading button.is-copied { border-color: var(--lime); color: var(--lime); }
.skip-guide pre { max-height: 210px; margin: 12px 0 0; padding: 14px; overflow: auto; border: 1px solid #3a4038; border-radius: 12px; background: #0d0f0c; color: #d9ded6; font: 700 10px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }

.navigation-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.navigation-methods article {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 13px;
  padding: 22px 24px;
  border-right: 1px solid var(--line);
}

.navigation-methods article:last-child { border-right: 0; }
.navigation-methods article > span { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--blue); font: 900 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.navigation-methods p { margin: 0 0 5px; color: var(--green); font: 900 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; }
.navigation-methods h3 { margin: 0 0 6px; font-size: 15px; letter-spacing: 0; }
.navigation-methods small { display: block; color: var(--muted); font-size: 11px; font-weight: 650; line-height: 1.55; }

.skip-footer {
  display: flex;
  min-height: 68px;
  padding: 12px 28px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  background: #eef0eb;
}

.skip-footer p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.skip-footer p strong { display: block; color: var(--ink); font-size: 12px; }
.skip-footer div { display: flex; gap: 8px; }
.skip-footer a { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 10px; font-weight: 800; text-decoration: none; white-space: nowrap; }

@media (max-width: 1280px) {
  .skip-workbench { grid-template-columns: 280px minmax(500px, 1fr); }
  .skip-guide { grid-column: 1 / -1; border-top: 1px solid var(--line); border-left: 0; }
  .skip-guide ol { grid-template-columns: repeat(3, 1fr); }
  .skip-guide li { border-right: 1px solid #393d37; border-bottom: 0; padding: 0 14px 0 0; }
  .skip-guide li:last-child { border-right: 0; }
  .skip-guide pre { max-height: 180px; }
}

@media (max-width: 960px) {
  .skip-workbench { grid-template-columns: 1fr; }
  .skip-controls { border-right: 0; border-bottom: 1px solid var(--line); }
  .skip-preview iframe { height: 540px; }
  .skip-guide { grid-column: auto; }
  .navigation-methods { grid-template-columns: 1fr; }
  .navigation-methods article { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 660px) {
  .skip-controls, .skip-guide { padding: 20px 16px; }
  .skip-preview iframe { height: 590px; }
  .skip-guide ol { grid-template-columns: 1fr; }
  .skip-guide li { border-right: 0; border-bottom: 1px solid #393d37; padding: 0 0 13px; }
  .navigation-methods article { padding: 18px 16px; }
  .skip-footer { align-items: flex-start; flex-direction: column; padding: 16px; }
}

.series-nav {
  display: grid;
  grid-template-columns: auto repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.74);
}

.series-nav > p {
  display: flex;
  margin: 0;
  padding: 0 12px;
  align-items: center;
  color: var(--green);
  font: 900 10px/1.2 var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.series-nav a {
  display: grid;
  min-height: 48px;
  padding: 7px 12px 7px 46px;
  position: relative;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.series-nav a > span {
  display: grid;
  position: absolute;
  inset: 7px auto 7px 7px;
  width: 32px;
  place-items: center;
  border-radius: 9px;
  background: var(--soft);
  color: var(--green);
  font: 900 10px/1 var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
}

.series-nav a b { font-size: 12px; line-height: 1.2; }
.series-nav a small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.2; }
.series-nav a[aria-current="page"] { border-color: var(--ink); background: var(--ink); color: white; }
.series-nav a[aria-current="page"] > span { background: var(--lime); color: var(--ink); }
.series-nav a[aria-current="page"] small { color: #c9cec7; }

@media (max-width: 700px) {
  .series-nav {
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .series-nav > p {
    grid-column: 1 / -1;
    min-height: 22px;
    padding-inline: 4px;
  }
}
