/* Phone & tablet fixes (loaded last) */
@media (max-width: 960px) {
  .feat-grid { grid-template-columns: 1fr !important; }
  .feat-card:nth-child(n) { grid-column: 1 !important; }
  .story-buki { display: none; }
  .hamburger { min-width: 46px; min-height: 46px; align-items: center; justify-content: center; padding: 10px; }
  .nav-links.open { padding: 1rem 6% 1.4rem !important; gap: 0 !important; }
  .nav-links.open a { display: block; padding: .8rem 0; font-size: 1.05rem; }
  .nav-links.open li { border-bottom: 2px dashed var(--line); }
  .nav-links.open li:last-child { border: 0; padding-top: .8rem; }
  .nav-links.open .nav-btn { display: inline-block; padding: .7rem 1.6rem !important; }
}
@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
  section { padding: 76px 5% 64px !important; }
  #hero { padding-top: 104px !important; min-height: 0 !important; }
  .hero-inner { gap: 1.6rem !important; }
  .hero-title { font-size: clamp(2.3rem, 11vw, 3rem) !important; }
  .hero-sub { font-size: 1.02rem !important; }
  .hero-btns { flex-direction: column; align-items: stretch; }
  .hero-btns a { justify-content: center; text-align: center; }
  .starburst { align-self: flex-start; }
  .hero-visual > .buki-hero { min-height: 340px; }

  /* tap targets */
  .subj-dots { gap: 8px; }
  .subj-dots button { width: 30px !important; height: 30px !important; }
  .subj-switch { padding: 6px 10px !important; }
  .btn-dark, .btn-white, .btn-line, .f-submit, .trial-btn { min-height: 48px; }
  .st-sound { width: 46px; height: 46px; }
  .story-thumbs .th { width: 60px; height: 60px; }
  .ft-col a { padding: .45rem 0; display: block; }
  .wa-float { width: 60px; height: 60px; right: 1rem; bottom: 1rem; }

  /* readable text */
  .s-kicker, .hero-kicker { font-size: .78rem !important; }
  .s-chip, .lv-no, .ci-l, .md-kicker, .card-badge, .card-score-lbl, .card-meta-item, .card-extra, .card-img-hint { font-size: .78rem !important; }
  .feat-card p, .v-card p, .ik-card p, .lev-card p, .s-body p, .info-card p { font-size: .95rem !important; }
  .s-sub, .hero-sub { font-size: 1rem !important; }

  /* mascot: smaller, out of the way */
  .buki-follow { width: 108px !important; height: 114px !important; }

  /* section layouts */
  .buki-say { align-items: flex-start; }
  .buki-say > img { width: 78px; }
  .bubble { font-size: 1rem; max-width: 100%; }
  .step { padding: 1rem 1.1rem 1rem .9rem !important; }
  .s-body { padding-right: 1.9rem; }
  .step::before { right: 10px; top: 8px; font-size: 1.4rem; }
  .math-display { border-width: 9px !important; padding: 1.6rem 1.2rem 2.2rem !important; }
  .md-eq { font-size: 1.9rem !important; }
  .sysvid { margin-top: 3rem; }
  .sysvid-player, .sysvid-frame { border-width: 4px; border-radius: 22px; }
  .chat { transform: none; }
  .chat-wrap { position: static; }
  .lev-grid { grid-template-columns: 1fr !important; }
  #deneme .cta-box { transform: none; padding: 2.4rem 1.4rem 2rem; }
  #deneme .cta-price { font-size: 3.6rem; }
  .stamp { width: 78px; height: 78px; font-size: .8rem; right: 10px; }
  .c-form { transform: none; padding: 1.8rem 1.2rem 1.5rem; }
  .f-row { grid-template-columns: 1fr !important; }
  .f-submit { align-self: stretch; }
  .contact-wrap .c-item { border-radius: 26px !important; padding: .8rem 1rem !important; }
  .ik-quote { padding: 2rem 1.4rem !important; }
  .ik-quote-inner p { font-size: 1.08rem !important; }
  .ik-cta { padding: 1.8rem 1.4rem !important; flex-direction: column; align-items: stretch !important; text-align: center; }
  .ik-cta .btn-dark { justify-content: center; }
  .ik-card { grid-template-columns: 1fr !important; }
  .ik-card .ik-card-icon { grid-row: auto; margin-bottom: .6rem; }
  .ik-card h3, .ik-card p { grid-column: 1; }
  .ft-grid { gap: 1.6rem; }
  footer { padding: 4.5rem 6% 6rem !important; }
  .stats-bar { gap: .9rem !important; padding: 1.6rem 5% !important; }
  .stats-bar .stat-item { padding: .8rem 1.1rem !important; }
  .vid-section { padding: 3rem 5% .5rem; }
  .cards-grid { grid-template-columns: 1fr 1fr !important; gap: .8rem !important; }
  .student-card .card-body { padding: 1rem .9rem 1.1rem; }
  .page-hero { padding: 112px 5% 48px !important; }
  .page-hero .hero-title { font-size: clamp(2.1rem, 10vw, 2.8rem) !important; }
  .marquee-chip { font-size: .9rem; }
}
@media (max-width: 380px) {
  .hero-visual { gap: .8rem; }
  .cards-grid { grid-template-columns: 1fr !important; }
  .story-chips span { font-size: .85rem; }
}

/* ── round 2 ── */
@media (max-width: 640px) {
  nav { padding: 0 12px 0 14px !important; gap: 6px; }
  .nav-logo { display: flex !important; align-items: center; gap: .4rem !important; min-width: 0; flex-shrink: 1; }
  .nav-logo .brand { font-size: .98rem !important; letter-spacing: .01em !important; white-space: nowrap; }
  .nav-logo .tag { font-size: .5rem !important; letter-spacing: .1em !important; white-space: nowrap; }
  .nav-buki { width: 30px !important; height: 30px !important; flex-shrink: 0; }
  nav > div { flex-shrink: 0; gap: .35rem !important; }
  .subj-switch { padding: 5px 8px !important; }
  .veli-cards { margin-top: 2.6rem !important; }
  .veli-wrap .btn-dark { margin-bottom: .4rem; }
  .sysvid { margin-top: 5rem !important; }
  .trial-card { flex-direction: column; align-items: flex-start !important; }
  .trial-btn { align-self: stretch; text-align: center; }
  .hero-visual > .info-card p { font-size: .95rem !important; }
}
@media (max-width: 360px) {
  .nav-logo .brand { font-size: .88rem !important; }
  .nav-logo .tag { display: none; }
  .subj-dots button { width: 26px !important; height: 26px !important; }
}

/* ── round 3: beat the page's inline styles ── */
@media (max-width: 640px) {
  .nav-logo > span { white-space: nowrap !important; display: block; }
  .nav-logo .brand { display: block !important; font-size: .9rem !important; }
  .nav-logo .tag { display: block !important; }
  .nav-logo { flex: 0 1 auto !important; }
  nav { justify-content: space-between !important; }
  .subj-dots button { width: 28px !important; height: 28px !important; }
  .trial-card { flex-direction: column !important; align-items: stretch !important; gap: .9rem !important; }
  .trial-card .trial-btn { text-align: center; }
}
