@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Manrope:wght@700;800&display=swap");

html:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --card-soft: #f8fafc;
  --text: #10223b;
  --muted: #68778b;
  --brand: #082b5c;
  --brand-2: #0e4d92;
  --accent: #e31837;
  --accent-soft: #fff0f2;
  --yellow: #ffc857;
  --green: #16a36a;
  --line: #dce4ee;
  --shadow: 0 18px 55px rgba(8, 43, 92, 0.11);
  --shadow-soft: 0 8px 24px rgba(8, 43, 92, 0.08);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 105px;
}

body.bylish-ready {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 5% 15%, rgba(14, 77, 146, 0.08), transparent 27rem),
    radial-gradient(circle at 95% 55%, rgba(227, 24, 55, 0.06), transparent 24rem),
    var(--bg);
  color: var(--text);
  font-family: "DM Sans", Arial, sans-serif;
  line-height: 1.7;
}

body.bylish-ready.dark {
  --bg: #07111f;
  --card: #0e1b2d;
  --card-soft: #122237;
  --text: #ecf4ff;
  --muted: #9fb0c6;
  --brand: #4b9fff;
  --brand-2: #76b5ff;
  --accent: #ff5b72;
  --accent-soft: rgba(227, 24, 55, 0.13);
  --line: #233a55;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.2);
}

body.bylish-ready * {
  box-sizing: border-box;
}

body.bylish-ready button,
body.bylish-ready input,
body.bylish-ready select,
body.bylish-ready textarea {
  font: inherit;
}

body.bylish-ready button,
body.bylish-ready .btn {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  padding: 10px 16px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.bylish-ready button:hover,
body.bylish-ready .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 22px rgba(8, 43, 92, 0.2);
}

body.bylish-ready button:focus-visible,
body.bylish-ready a:focus-visible,
body.bylish-ready input:focus-visible,
body.bylish-ready select:focus-visible,
body.bylish-ready textarea:focus-visible,
body.bylish-ready summary:focus-visible {
  outline: 3px solid rgba(255, 200, 87, 0.8);
  outline-offset: 3px;
}

body.bylish-ready button.secondary {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
}

body.bylish-ready button.accent-button,
body.bylish-ready .accent-button {
  background: var(--accent);
  color: #fff;
}

body.bylish-ready header {
  position: relative;
  overflow: hidden;
  padding: 74px 22px 64px;
  background:
    linear-gradient(115deg, rgba(8, 43, 92, 0.98), rgba(8, 43, 92, 0.91)),
    url("assets/bylish-logo.jpeg") center / cover;
  color: #fff;
}

body.bylish-ready header::before,
body.bylish-ready header::after {
  position: absolute;
  content: "";
  border-radius: 999px;
  pointer-events: none;
}

body.bylish-ready header::before {
  width: 420px;
  height: 420px;
  top: -250px;
  right: -100px;
  border: 72px solid rgba(227, 24, 55, 0.42);
}

body.bylish-ready header::after {
  width: 270px;
  height: 270px;
  bottom: -210px;
  left: 12%;
  border: 55px solid rgba(255, 255, 255, 0.07);
}

.bylish-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.7fr);
  align-items: center;
  gap: 42px;
  max-width: 1180px;
  margin: auto;
}

.brand-lockup,
.nav-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-logo {
  width: 66px;
  height: 66px;
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
}

.brand-eyebrow {
  color: #dcecff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.brand-name {
  margin-top: -2px;
  font-family: "Manrope", sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
}

body.bylish-ready h1 {
  max-width: 800px;
  margin: 24px 0 18px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2.7rem, 6vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-accent {
  color: #ff6078;
}

.bylish-hero .subtitle {
  max-width: 720px;
  margin: 0;
  color: #dcecff;
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.hero-actions,
.section-actions,
.quiz-actions,
.practice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 25px;
}

.hero-actions .primary-action {
  background: var(--accent);
}

.hero-actions .ghost-action {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(10px);
}

.hero-mini-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 30px;
}

.hero-mini-stats div {
  padding-right: 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.19);
}

.hero-mini-stats div:last-child {
  border-right: 0;
}

.hero-mini-stats strong {
  display: block;
  font-size: 1.3rem;
}

.hero-mini-stats span {
  color: #c9d9ec;
  font-size: 0.84rem;
}

.mascot-stage {
  position: relative;
  align-self: end;
  min-height: 420px;
}

.mascot-stage::before {
  position: absolute;
  inset: 55px 5% 10px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50% 45% 43% 52%;
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(8px);
}

.hero-mascot {
  position: absolute;
  z-index: 1;
  right: -12px;
  bottom: -55px;
  width: min(410px, 105%);
  filter: drop-shadow(0 30px 28px rgba(0, 0, 0, 0.28));
  animation: mascot-float 4.5s ease-in-out infinite;
}

.mascot-intro {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: -20px;
  max-width: 210px;
  padding: 16px 18px;
  border-radius: 18px 18px 4px 18px;
  background: #fff;
  color: #10223b;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
  font-weight: 700;
}

.mascot-intro small {
  display: block;
  margin-top: 4px;
  color: #68778b;
  font-weight: 500;
}

@keyframes mascot-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

body.bylish-ready nav {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(220, 228, 238, 0.75);
  background: color-mix(in srgb, var(--card) 90%, transparent);
  backdrop-filter: blur(18px);
}

body.bylish-ready .navin {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  max-width: 1180px;
  margin: auto;
  padding: 11px 18px;
}

.nav-brand {
  flex: 0 0 auto;
  margin-right: 12px;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  text-decoration: none;
}

.nav-brand img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 3px;
}

.nav-links a {
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-links a:hover {
  background: var(--card-soft);
  color: var(--brand);
}

.nav-search {
  position: relative;
  flex: 1;
  min-width: 160px;
  margin-left: auto;
}

.nav-search input {
  width: 100%;
  padding: 10px 42px 10px 42px;
}

.nav-search input::-webkit-search-cancel-button,
.nav-search input::-webkit-search-decoration {
  appearance: none;
}

.search-icon {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 14px;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 1.8;
  pointer-events: none;
}

.search-clear {
  position: absolute;
  z-index: 2;
  top: 7px;
  right: 7px;
  min-width: 31px !important;
  min-height: 31px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 1.35rem;
  line-height: 1;
  box-shadow: none !important;
  transform: none !important;
}

.search-clear:hover {
  background: var(--card-soft) !important;
  color: var(--text) !important;
}

.search-results {
  position: absolute;
  z-index: 40;
  top: calc(100% + 10px);
  right: 0;
  width: min(470px, calc(100vw - 28px));
  max-height: min(520px, 70vh);
  overflow: auto;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.search-status {
  padding: 7px 10px 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.search-result-item {
  display: block;
  width: 100%;
  min-height: 0 !important;
  margin: 0 0 5px;
  padding: 12px !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: var(--text) !important;
  text-align: left;
  box-shadow: none !important;
}

.search-result-item:hover,
.search-result-item:focus-visible {
  border-color: var(--line) !important;
  background: var(--card-soft) !important;
  transform: none !important;
}

.search-result-item strong,
.search-result-item span {
  display: block;
}

.search-result-item strong {
  margin-bottom: 3px;
  color: var(--brand);
}

.search-result-item span {
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 500;
  line-height: 1.45;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.icon-button {
  min-width: 44px;
  padding: 8px !important;
  border: 1px solid var(--line) !important;
  background: var(--card) !important;
  color: var(--text) !important;
}

body.bylish-ready main {
  max-width: 1180px;
  margin: 34px auto 0;
  padding: 0 18px;
}

body.bylish-ready section {
  margin: 0 0 72px;
}

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

.section-heading h2,
body.bylish-ready section > h2 {
  margin: 0 0 5px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.55rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.85fr 0.85fr;
  gap: 16px;
}

.panel,
body.bylish-ready .card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: 23px;
}

.progress-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, var(--brand), #104b8d);
  color: #fff;
}

.progress-panel::after {
  position: absolute;
  right: -58px;
  bottom: -90px;
  width: 210px;
  height: 210px;
  content: "";
  border: 38px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
}

.progress-panel .muted {
  color: #c9d9ec;
}

.progress-value {
  position: relative;
  z-index: 1;
  margin: 15px 0 2px;
  font-family: "Manrope", sans-serif;
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1;
}

.progress-track {
  position: relative;
  z-index: 1;
  height: 10px;
  margin: 20px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow), #ff7c91);
  transition: width 0.6s ease;
}

.metric-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 800;
}

.metric-number {
  margin: 15px 0 0;
  font-family: "Manrope", sans-serif;
  font-size: 2rem;
  font-weight: 800;
}

.metric-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.today-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding: 20px 23px;
}

.today-card h3,
.panel h3 {
  margin: 0 0 5px;
}

.learning-path {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.path-card {
  position: relative;
  min-height: 205px;
  overflow: hidden;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.path-number {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
}

.path-card h3 {
  margin: 18px 0 7px;
}

.path-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.path-status {
  position: absolute;
  right: 18px;
  bottom: 18px;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 800;
}

body.bylish-ready .chapter {
  overflow: hidden;
  margin-bottom: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

body.bylish-ready .chapter:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  box-shadow: var(--shadow-soft);
}

body.bylish-ready .chapter[open] {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  box-shadow: var(--shadow-soft);
}

body.bylish-ready summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 19px 21px;
  list-style: none;
  cursor: pointer;
  font-size: 1.03rem;
  font-weight: 800;
}

body.bylish-ready summary::-webkit-details-marker {
  display: none;
}

body.bylish-ready summary::after {
  margin-left: auto;
  content: "+";
  color: var(--brand);
  font-size: 1.4rem;
}

body.bylish-ready details[open] summary::after {
  content: "−";
}

.chapter-index {
  display: inline-grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--card-soft);
  color: var(--brand);
  font-size: 0.78rem;
}

.chapter-complete-badge {
  margin-left: auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(22, 163, 106, 0.1);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 800;
}

.chapter-complete-badge + * {
  margin-left: 0;
}

body.bylish-ready .chapterbody {
  padding: 2px 23px 24px 67px;
}

.lesson-deep-dive {
  margin: 25px 0 10px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
}

.lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 17px;
}

.lesson-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--card-soft);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
}

.lesson-meta span:last-child {
  background: var(--accent-soft);
  color: var(--accent);
}

.lesson-block {
  margin: 0 0 22px;
}

.lesson-block > p:last-child {
  margin-bottom: 0;
}

.lesson-label {
  margin: 0 0 10px !important;
  color: var(--brand);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lesson-objectives {
  padding: 17px 18px;
  border-left: 4px solid var(--brand);
  border-radius: 0 15px 15px 0;
  background: var(--card-soft);
}

.lesson-objectives ul,
.mistake-block ul {
  margin: 0;
  padding-left: 20px;
}

.pattern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 10px;
}

.pattern-item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card-soft);
}

.pattern-item strong {
  color: var(--brand);
}

.pattern-item span {
  color: var(--muted);
  font-size: 0.84rem;
}

.pattern-item code {
  display: block;
  margin-top: auto;
  padding: 7px 8px;
  overflow-wrap: anywhere;
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand) 8%, var(--card));
  color: var(--text);
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 0.79rem;
}

.context-examples {
  display: grid;
  gap: 9px;
}

.context-examples article {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.context-examples strong,
.context-examples span,
.context-examples small {
  display: block;
}

.context-examples span {
  margin-top: 2px;
  color: var(--muted);
}

.context-examples small {
  margin-top: 4px;
  color: var(--brand);
}

.example-audio {
  display: grid;
  min-width: 34px !important;
  min-height: 34px !important;
  place-items: center;
  padding: 0 !important;
  border-radius: 10px !important;
  background: var(--brand) !important;
  font-size: 0.7rem;
}

.mistake-block {
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: 15px;
  background: var(--accent-soft);
}

.mistake-block li::marker {
  color: var(--accent);
}

.chapter-challenge {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 13px;
  padding: 17px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), #104b8d);
  color: #fff;
}

.chapter-challenge span {
  padding: 5px 7px;
  border-radius: 7px;
  background: var(--yellow);
  color: #10223b;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.chapter-challenge p {
  margin: 0;
}

body.bylish-ready .exercise {
  margin: 18px 0;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-soft), var(--card-soft));
}

.chapter-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.chapter-note {
  width: 100%;
  min-height: 80px;
  resize: vertical;
}

.complete-button.done {
  background: var(--green);
}

body.bylish-ready input,
body.bylish-ready select,
body.bylish-ready textarea {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  color: var(--text);
  padding: 10px 13px;
}

body.bylish-ready input::placeholder,
body.bylish-ready textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 75%, transparent);
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.practice-card {
  display: flex;
  min-width: 0;
  min-height: 290px;
  flex-direction: column;
}

.practice-card .metric-icon {
  margin-bottom: 14px;
}

.practice-card h3 {
  margin: 0 0 7px;
}

.practice-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.practice-card textarea,
.practice-card input,
.practice-card select {
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.practice-result {
  min-height: 50px;
  margin-top: 13px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card-soft);
  color: var(--muted);
  font-size: 0.9rem;
}

.word-card {
  display: grid;
  min-height: 125px;
  place-items: center;
  padding: 18px;
  border: 1px dashed color-mix(in srgb, var(--brand) 40%, var(--line));
  border-radius: 16px;
  background: var(--card-soft);
  text-align: center;
}

.word-card strong {
  display: block;
  color: var(--brand);
  font-family: "Manrope", sans-serif;
  font-size: 1.65rem;
}

.word-answer {
  display: none;
  margin-top: 6px;
}

.word-card.revealed .word-answer {
  display: block;
}

.quiz-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 320px;
  gap: 18px;
}

.quiz-panel {
  min-height: 440px;
}

.quiz-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.quiz-counter {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.quiz-question {
  margin: 15px 0 20px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  line-height: 1.35;
}

.quiz-options {
  display: grid;
  gap: 10px;
}

.quiz-option {
  width: 100%;
  min-height: 52px !important;
  border: 1px solid var(--line) !important;
  background: var(--card) !important;
  color: var(--text) !important;
  text-align: left;
}

.quiz-option:hover {
  border-color: var(--brand) !important;
}

.quiz-option.selected {
  border-color: var(--brand) !important;
  background: color-mix(in srgb, var(--brand) 9%, var(--card)) !important;
}

.quiz-option.correct {
  border-color: var(--green) !important;
  background: rgba(22, 163, 106, 0.1) !important;
}

.quiz-option.wrong {
  border-color: var(--accent) !important;
  background: var(--accent-soft) !important;
}

.quiz-feedback {
  display: none;
  margin-top: 17px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--card-soft);
}

.quiz-feedback.show {
  display: block;
}

.quiz-side img {
  display: block;
  width: 190px;
  margin: -16px auto 0;
}

.score-ring {
  display: grid;
  width: 128px;
  height: 128px;
  margin: 10px auto 16px;
  place-items: center;
  border: 12px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  font-family: "Manrope", sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
}

body.bylish-ready .vocabtools {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 10px;
  margin: 16px 0;
}

body.bylish-ready .tablewrap {
  overflow: auto;
  max-height: 650px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

body.bylish-ready table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

body.bylish-ready th,
body.bylish-ready td {
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

body.bylish-ready th {
  position: sticky;
  z-index: 2;
  top: 0;
  background: var(--brand);
  color: #fff;
}

body.bylish-ready tbody tr:hover {
  background: var(--card-soft);
}

.speak-word {
  min-height: 32px !important;
  margin-top: 6px;
  padding: 5px 9px !important;
  border: 1px solid var(--line) !important;
  background: var(--card-soft) !important;
  color: var(--brand) !important;
  font-size: 0.75rem;
}

#quiz > .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

#quiz > .cards .card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 17px;
  box-shadow: none;
}

#quiz > .cards input {
  min-height: auto;
  margin-top: 5px;
  accent-color: var(--green);
}

body.bylish-ready footer {
  margin-top: 30px;
  padding: 42px 22px;
  border-top: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  text-align: center;
}

.mascot-guide {
  position: fixed;
  z-index: 35;
  right: 22px;
  bottom: 20px;
  display: flex;
  align-items: end;
  gap: 8px;
}

.guide-bubble {
  display: none;
  width: min(320px, calc(100vw - 110px));
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 19px 19px 5px 19px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.guide-bubble.open {
  display: block;
  animation: bubble-in 0.2s ease;
}

.guide-bubble strong {
  display: block;
  margin-bottom: 4px;
}

.guide-bubble p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.guide-avatar {
  display: grid;
  width: 96px;
  height: 112px;
  overflow: hidden;
  place-items: center;
  padding: 4px !important;
  border: 3px solid #fff !important;
  border-radius: 28px !important;
  background: linear-gradient(145deg, var(--brand), var(--brand-2)) !important;
  box-shadow: var(--shadow);
}

.guide-avatar img {
  width: 88px;
  height: 102px;
  object-fit: contain;
  transform: none;
}

@keyframes bubble-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.toast {
  position: fixed;
  z-index: 60;
  top: 88px;
  left: 50%;
  padding: 11px 17px;
  border-radius: 12px;
  background: #10223b;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition: 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .bylish-hero {
    grid-template-columns: 1fr 310px;
  }

  .mascot-stage {
    min-height: 360px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .progress-panel {
    grid-column: 1 / -1;
  }

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

  .quiz-shell {
    grid-template-columns: 1fr;
  }

  .quiz-side {
    display: grid;
    grid-template-columns: 150px 1fr;
    align-items: center;
  }

  .practice-grid {
    grid-template-columns: 1fr 1fr;
  }

  .practice-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body.bylish-ready header {
    padding-top: 48px;
  }

  .bylish-hero {
    grid-template-columns: 1fr;
  }

  .mascot-stage {
    min-height: 310px;
  }

  .hero-mascot {
    right: 4%;
    width: 320px;
  }

  .mascot-intro {
    left: 3%;
  }

  .nav-links {
    display: none;
  }

  .search-results {
    position: fixed;
    top: 70px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .nav-brand span {
    display: none;
  }

  .dashboard-grid,
  .practice-grid,
  .learning-path {
    grid-template-columns: minmax(0, 1fr);
  }

  .practice-card:last-child {
    grid-column: auto;
  }

  .section-heading,
  .today-card {
    align-items: stretch;
    flex-direction: column;
  }

  .today-card {
    display: flex;
  }

  body.bylish-ready .vocabtools {
    grid-template-columns: 1fr;
  }

  body.bylish-ready .chapterbody {
    padding-left: 22px;
  }

  .chapter-tools {
    grid-template-columns: 1fr;
  }

  .quiz-side {
    display: block;
  }
}

@media (max-width: 520px) {
  body.bylish-ready h1 {
    font-size: 2.65rem;
  }

  .brand-logo {
    width: 54px;
    height: 54px;
  }

  .hero-mini-stats {
    gap: 12px;
  }

  .hero-mini-stats div {
    width: calc(50% - 6px);
    padding-right: 0;
    border: 0;
  }

  .mascot-stage {
    min-height: 275px;
  }

  .hero-mascot {
    bottom: -42px;
    width: 280px;
  }

  .mascot-intro {
    max-width: 165px;
    font-size: 0.84rem;
  }

  .nav-search {
    min-width: 0;
  }

  .nav-search input {
    font-size: 0.83rem;
  }

  .mascot-guide {
    right: 13px;
    bottom: 13px;
  }

  .guide-avatar {
    width: 76px;
    height: 90px;
  }

  .guide-avatar img {
    width: 69px;
    height: 82px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
