/* Sıfırdan Çince — stil dosyası. Büyük yazılar, canlı renkler, mobil öncelikli. */
:root {
  --t1: #e53935; --t2: #1e9e4a; --t3: #1565e0; --t4: #8e24aa; --t5: #6b7280;
  --accent: #e0393e;
  --ink: #1f2937; --muted: #4b5563; --card: #ffffff; --line: #e5e7eb;
  --bg1: #fff7ed; --bg2: #eef6ff;
  --radius: 22px;
  --shadow: 0 6px 20px rgba(31, 41, 55, .10);
  --shadow-lg: 0 14px 34px rgba(31, 41, 55, .16);
  --font: system-ui, -apple-system, "Segoe UI", "Noto Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-hanzi: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", "WenQuanYi Micro Hei", sans-serif;
  --ok: #15803d; --warn: #c2410c; --bad: #b91c1c;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 19px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); line-height: 1.65; font-size: 1rem;
  background: linear-gradient(160deg, var(--bg1) 0%, var(--bg2) 100%) fixed; min-height: 100vh;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
img, svg { max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.25; margin: 1.2em 0 .5em; }
h1 { font-size: 2.2rem; } h2 { font-size: 1.7rem; } h3 { font-size: 1.35rem; } h4 { font-size: 1.05rem; }
p { margin: .6em 0 1em; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; left: 10px; top: 10px; width: auto; height: auto; clip: auto; background: #fff; padding: 10px 16px; z-index: 100; border-radius: 10px; }
small, .small { font-size: .9rem; }
[lang="zh-CN"], .hz, .hz-line, .hanzi-inline, .card-hanzi, .rad-hanzi { font-family: var(--font-hanzi); }

/* Ton renkleri (her yerde aynı) */
.tone-1 { color: var(--t1); } .tone-2 { color: var(--t2); } .tone-3 { color: var(--t3); }
.tone-4 { color: var(--t4); } .tone-5 { color: var(--t5); }
.syl { display: inline-block; font-weight: 700; }
.py-line { display: inline; }
.hz-line { display: inline-block; letter-spacing: .02em; }
.hz { display: inline-block; font-weight: 500; }

/* ---------- Üst menü ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 4px solid var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.15rem; }
.brand-hz { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--accent); color: #fff; font-size: 1.7rem; line-height: 1; font-family: var(--font-hanzi); }
.nav-toggle { display: none; margin-left: auto; min-height: 48px; padding: 8px 18px; font: inherit; font-weight: 700; border: 2px solid var(--accent); background: #fff; color: var(--accent); border-radius: 14px; cursor: pointer; }
.main-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.main-nav a { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 700; background: #f3f4f6; border: 2px solid transparent; }
.main-nav a:hover { background: #fff; border-color: var(--accent); }
.main-nav a.active { background: var(--accent); color: #fff; }
.main-nav a.done::after { content: "✓"; color: var(--ok); font-weight: 900; margin-left: 2px; }
.main-nav a.active.done::after { color: #fff; }
.nav-title { display: none; }
.nav-home { background: transparent !important; }

@media (max-width: 1050px) {
  .nav-toggle { display: inline-block; }
  .main-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; margin-left: 0; padding-bottom: 8px; }
  .main-nav.open { display: flex; }
  .main-nav a { border-radius: 16px; padding: 10px 16px; justify-content: flex-start; background: #f9fafb; }
  .nav-title { display: inline; }
}

/* ---------- Genel yerleşim ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 18px 16px 60px; }
.site-footer { text-align: center; padding: 28px 16px 40px; background: #1f2937; color: #f3f4f6; }
.site-footer p { margin: .4em auto; max-width: 800px; }

.lesson-hero { position: relative; margin: 8px 0 22px; padding: 26px 22px; border-radius: 28px; color: #fff; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #1f2937)); box-shadow: var(--shadow-lg); overflow: hidden; }
.lesson-hero h1 { margin: .1em 0; font-size: 2.3rem; }
.lesson-hero .kicker { margin: 0; font-weight: 800; letter-spacing: .04em; opacity: .95; }
.lesson-hero .sub { margin: .2em 0 0; font-size: 1.25rem; }
.hero-emoji { position: absolute; right: 18px; top: 8px; font-size: 4.6rem; opacity: .35; line-height: 1; }

/* ---------- Anlatım metni ---------- */
.prose { max-width: 900px; margin: 0 auto 28px; font-size: 1.05rem; background: var(--card); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow); }
.prose h2 { font-size: 1.6rem; padding-left: 14px; border-left: 8px solid var(--accent); margin-top: 1.4em; }
.prose h2:first-child { margin-top: .2em; }
.prose h3 { color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .4em 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 1rem; }
.prose th { background: var(--accent); color: #fff; text-align: left; padding: 10px 12px; }
.prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.prose tbody tr:nth-child(even) { background: #f9fafb; }
.hz-cell { font-family: var(--font-hanzi); font-size: 2.2rem; line-height: 1.1; }
.prose .rules li { padding: 6px 4px; }
@media (max-width: 700px) {
  .prose { padding: 16px 14px; border-radius: 18px; }
  .prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .lesson-hero h1 { font-size: 1.8rem; }
  .hero-emoji { font-size: 3.4rem; }
}
.hanzi-inline { display: inline-block; font-size: 1.8em; line-height: 1.2; vertical-align: middle; font-weight: 500; }
.py { font-weight: 700; }
.pytone { font-weight: 700; }
.say { cursor: pointer; border-bottom: 3px dotted var(--accent); border-radius: 6px; }
.say:hover { background: color-mix(in srgb, var(--accent) 12%, #fff); }
.mount-title, .count-note { max-width: 900px; margin-left: auto; margin-right: auto; }
.count-note { font-weight: 700; color: var(--muted); text-align: center; }

.callout { border-radius: 18px; padding: 14px 18px; margin: 1.1em 0; border-left: 10px solid #3a86ff; background: #eef5ff; }
.callout p:first-child, .callout h3:first-child { margin-top: .1em; }
.callout p:last-child { margin-bottom: .1em; }
.callout.tip { border-color: #15a34a; background: #ecfdf3; }
.callout.warn { border-color: #f59e0b; background: #fff7e6; }
.callout.info { border-color: #3a86ff; background: #eef5ff; }
.callout h3 { margin: .1em 0 .3em; font-size: 1.2rem; color: var(--ink); }
.callout small { font-size: .95rem; font-weight: 600; margin-left: 6px; }

.grid-2, .grid-3 { display: grid; gap: 14px; margin: 1em 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 800px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.grid-2 .callout, .grid-3 .callout { margin: 0; }
.big-example { text-align: center; background: linear-gradient(180deg, #fff, #fff7ed); border: 3px solid color-mix(in srgb, var(--accent) 30%, #fff); border-radius: 22px; padding: 14px 10px; }
.big-example .hanzi-inline { font-size: 4.6rem; line-height: 1.15; }
.big-example div { margin: 2px 0; }

/* ---------- Düğmeler ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 22px; border-radius: 16px; border: 3px solid var(--accent); background: #fff; color: var(--accent); font: inherit; font-weight: 800; font-size: 1rem; text-decoration: none; cursor: pointer; transition: transform .12s, box-shadow .12s; line-height: 1.2; text-align: center; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { background: #fff; color: var(--accent); }
.btn-ok { border-color: #15803d; background: #15803d; color: #fff; }
.btn-ok.is-on { background: #fff; color: #15803d; }
.btn-warn { border-color: #c2410c; background: #c2410c; color: #fff; }
.btn-done { border-color: #15803d; background: #fff; color: #15803d; }
.btn-done.is-done { background: #15803d; color: #fff; }
.btn-icon { min-width: 52px; padding: 10px 14px; font-size: 1.3rem; }
.btn-big { min-height: 60px; font-size: 1.15rem; padding: 12px 30px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.lesson-nav { margin-top: 34px; }
.lesson-nav-inner { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: stretch; }
@media (max-width: 700px) { .lesson-nav-inner .btn { width: 100%; } }

/* ---------- Ton bileşenleri ---------- */
.tone-legend { display: flex; flex-wrap: wrap; gap: 10px; margin: 1em 0; }
.tone-chip { display: inline-block; padding: 8px 16px; border-radius: 999px; color: #fff; font-weight: 800; font-size: 1rem; }
.tone-chip.t1 { background: var(--t1); } .tone-chip.t2 { background: var(--t2); } .tone-chip.t3 { background: var(--t3); }
.tone-chip.t4 { background: var(--t4); } .tone-chip.t5 { background: var(--t5); }
.tone-practice { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 1em 0; }
.tp-item { text-align: center; background: #fff; border: 3px solid var(--line); border-radius: 20px; padding: 12px 8px; box-shadow: var(--shadow); }
.tp-hz { font-size: 4rem; line-height: 1.1; }
.tp-py { font-size: 1.5rem; } .tp-tr { font-weight: 700; margin-bottom: 4px; }
.contour { width: 110px; height: 64px; display: block; margin: 4px auto 8px; }

/* ---------- Karakter kartları ---------- */
.group-title { display: inline-block; margin: 1.6em 0 .6em; padding: 8px 20px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 1.2rem; }
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); gap: 18px; }
.char-card { background: var(--card); border-radius: var(--radius); padding: 18px 18px 20px; box-shadow: var(--shadow); border-top: 10px solid var(--accent); border-left: 3px solid transparent; border-right: 3px solid transparent; border-bottom: 3px solid transparent; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.char-card.is-known { border-color: #15803d; background: #f2fcf5; }
.badge { align-self: flex-start; display: inline-block; padding: 4px 14px; border-radius: 999px; color: #fff; font-weight: 800; font-size: .95rem; background: #6b7280; }
.badge-pict { background: #c2610c; } .badge-ideo { background: #2563d9; } .badge-comp { background: #0b7f75; }
.badge-phon { background: #7c3aed; } .badge-other { background: #6b7280; }
.card-hanzi { display: block; text-align: center; font-size: 7.4rem; line-height: 1.15; margin: 4px 0; word-break: keep-all; }
.card-hanzi .hz { font-weight: 500; }
.card-py { text-align: center; font-size: 2rem; line-height: 1.2; }
.card-tr { text-align: center; font-size: 1.3rem; font-weight: 800; margin: 4px 0 8px; overflow-wrap: anywhere; }
.card-tr.big { font-size: 2.2rem; }
.card-section { margin-top: 8px; }
.card-section h4 { margin: 0 0 2px; color: var(--accent); font-size: 1.05rem; }
.card-section p { margin: 0 0 6px; }
.comp-list, .example-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.comp-chip, .ex-chip { display: inline-flex; flex-direction: column; align-items: center; gap: 0; padding: 6px 12px; border-radius: 16px; border: 2px solid var(--line); background: #fafafa; font: inherit; color: var(--ink); cursor: pointer; transition: transform .12s, border-color .12s; min-width: 84px; max-width: 100%; }
.comp-chip:hover, .ex-chip:hover { transform: translateY(-2px); border-color: var(--accent); background: #fff; }
.comp-chip .hz-wrap, .ex-chip .hz-wrap { font-size: 2rem; line-height: 1.2; }
.comp-chip .py, .ex-chip .py { font-size: 1rem; }
.comp-chip .tr, .ex-chip .tr { font-size: .95rem; text-align: center; color: var(--muted); }
.formula { text-align: center; font-size: 1.7rem; font-weight: 700; margin: 8px 0 2px; background: #fff7ed; border-radius: 14px; padding: 6px; font-family: var(--font-hanzi); }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.card-actions .btn { flex: 1 1 140px; }
.writer-holder { display: none; }
.writer-holder.open { display: block; margin-top: 12px; }
.writer-box { text-align: center; background: #f8fafc; border-radius: 18px; padding: 12px; border: 2px dashed var(--line); }
.writer-target { margin: 0 auto; border-radius: 16px; border: 3px solid var(--line); max-width: 100%; background-color: #fff;
  background-image: linear-gradient(to right, transparent calc(50% - 1px), #fecaca calc(50% - 1px), #fecaca calc(50% + 1px), transparent calc(50% + 1px)), linear-gradient(to bottom, transparent calc(50% - 1px), #fecaca calc(50% - 1px), #fecaca calc(50% + 1px), transparent calc(50% + 1px)); }
.writer-target svg { max-width: 100%; height: auto; display: block; touch-action: none; }
.writer-msg { min-height: 1.7em; margin: 10px 0; font-weight: 700; }
.writer-msg.ok { color: var(--ok); } .writer-msg.warn { color: var(--warn); } .writer-msg.err { color: var(--bad); }
.writer-controls { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.writer-controls .btn { min-height: 48px; padding: 8px 16px; }

/* ---------- Kökler ---------- */
.radical-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 18px; }
.radical-card { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); border-top: 10px solid #0b7f75; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rad-hanzi { text-align: center; font-size: 6rem; line-height: 1.15; color: #0b7f75; }
.rad-name { text-align: center; font-size: 1.3rem; font-weight: 800; }
.rad-meta { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.meta-chip { display: inline-block; padding: 3px 12px; border-radius: 999px; background: #e6f6f4; font-weight: 700; font-size: .95rem; }
.rad-note { margin: 4px 0; }
.radical-card h4 { margin: 6px 0 2px; color: #0b7f75; }

/* ---------- Çizgiler ---------- */
.stroke-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; margin: 20px 0; }
.stroke-card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); border-top: 10px solid var(--sc, var(--accent)); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stroke-svg { width: 150px; height: 150px; display: block; margin: 0 auto; background: #fffaf0; border-radius: 20px; border: 3px solid var(--line); }
.stroke-name { text-align: center; font-size: 1.4rem; }
.stroke-hz { font-family: var(--font-hanzi); font-size: 2.4rem; font-weight: 700; color: var(--sc, var(--accent)); }
.stroke-tr { text-align: center; font-weight: 800; font-size: 1.15rem; }
.stroke-dir { align-self: center; padding: 3px 14px; border-radius: 999px; background: #f3f4f6; font-weight: 700; font-size: .95rem; }
.stroke-how { margin: 4px 0; }
.stroke-example { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: center; }
.stroke-example .btn { flex: 1 1 100%; }

/* ---------- Cümleler ---------- */
.sentence-list { display: flex; flex-direction: column; gap: 20px; }
.sentence-card { background: var(--card); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); border-left: 12px solid var(--accent); }
.sentence-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.sentence-num { display: inline-block; padding: 4px 16px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 800; }
.sent-ruby { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 14px; margin: 14px 0 8px; }
.ruby-word { display: inline-flex; flex-direction: column; align-items: center; }
.ruby-unit { display: inline-flex; align-items: flex-end; flex-wrap: nowrap; }
.ruby-unit .rw-punct { margin-left: 2px; }
.group-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; justify-content: center; }
.group-jump .chip { text-decoration: none; display: inline-flex; align-items: center; }
.group-title { scroll-margin-top: 90px; }
.rw-py { font-size: 1.15rem; line-height: 1.3; }
.rw-hz { font-size: 3.4rem; line-height: 1.15; }
.rw-punct { font-size: 3.4rem; line-height: 1.15; color: var(--muted); font-family: var(--font-hanzi); }
.sentence-card h4 { margin: 10px 0 6px; color: var(--accent); }
.word-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.word-chip { display: inline-flex; flex-direction: column; align-items: center; padding: 6px 12px; border-radius: 16px; border: 2px solid var(--line); background: #fafafa; font: inherit; color: var(--ink); cursor: pointer; min-width: 88px; max-width: 100%; }
.word-chip:hover { border-color: var(--accent); background: #fff; }
.wc-hz { font-size: 1.9rem; line-height: 1.2; }
.wc-py { font-size: 1rem; }
.wc-tr { font-size: .95rem; color: var(--muted); text-align: center; }
.sent-tr { font-size: 1.45rem; font-weight: 800; margin: 12px 0 4px; }
.sent-note { background: #fff7e6; border-radius: 14px; padding: 10px 14px; margin: 8px 0 0; }
@media (max-width: 600px) { .rw-hz, .rw-punct { font-size: 2.7rem; } .sentence-card { padding: 14px; } }

/* ---------- Çizim sırası demosu ---------- */
.so-demo { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 1em 0; }
.so-item { text-align: center; background: #f8fafc; border: 2px solid var(--line); border-radius: 20px; padding: 10px; }
.so-caption { font-weight: 800; color: var(--accent); margin-bottom: 6px; }
.so-target { width: 160px; height: 160px; margin: 0 auto 8px; background: #fff; border: 3px solid var(--line); border-radius: 14px; }
.so-target svg { display: block; }

/* ---------- Ana sayfa ---------- */
.hero { text-align: center; margin: 10px 0 26px; padding: 34px 18px 38px; border-radius: 30px; background: linear-gradient(135deg, #ffe4e6 0%, #fff4cc 45%, #d7f3ee 100%); box-shadow: var(--shadow-lg); }
.hero-chars { display: flex; justify-content: center; gap: 10px; font-family: var(--font-hanzi); font-size: 6.5rem; line-height: 1.1; font-weight: 700; }
.hero-chars span { display: inline-block; animation: bob 3.4s ease-in-out infinite; }
.hero-chars span:nth-child(2) { animation-delay: .5s; } .hero-chars span:nth-child(3) { animation-delay: 1s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.hero h1 { font-size: 2.6rem; margin: .3em 0; }
.hero-sub { max-width: 760px; margin: .3em auto 1.2em; font-size: 1.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); position: relative; }
.step:nth-child(1) { border-top: 10px solid #e0393e; } .step:nth-child(2) { border-top: 10px solid #2563d9; } .step:nth-child(3) { border-top: 10px solid #0b7f75; }
.step-num { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #1f2937; color: #fff; font-size: 1.5rem; font-weight: 900; }
.step h3 { margin: .4em 0 .2em; } .step p { margin: 0; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } .hero h1 { font-size: 2rem; } .hero-chars { font-size: 4.8rem; } }
.progress-overall { background: var(--card); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.progress-overall p { margin: 0 0 8px; font-weight: 700; }
.progress-bar, .bar { height: 18px; border-radius: 999px; background: #e5e7eb; overflow: hidden; }
.fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ff6b6b, #ff9f1c, #2ec4b6); transition: width .4s; }
.lesson-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.lesson-card { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 18px 16px 18px 22px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); border-left: 14px solid var(--lc, var(--accent)); transition: transform .15s, box-shadow .15s; }
.lesson-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.lc-emoji { font-size: 2.6rem; line-height: 1.1; }
.lc-num { font-weight: 800; color: var(--lc, var(--accent)); }
.lc-title { font-size: 1.25rem; font-weight: 800; line-height: 1.25; }
.lc-sub { color: var(--muted); }
.lc-check { position: absolute; right: 12px; top: 12px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #15803d; color: #fff; font-weight: 900; font-size: 1.2rem; }
.lesson-card.done { background: #f2fcf5; }

/* ---------- Pratik ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 18px; justify-content: center; }
.tab { min-height: 52px; padding: 10px 24px; border-radius: 999px; border: 3px solid var(--accent); background: #fff; color: var(--accent); font: inherit; font-weight: 800; cursor: pointer; }
.tab.is-active { background: var(--accent); color: #fff; }
.tab-panel { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.tab-panel > h3:first-child { margin-top: 0; }
.deck-chips, .toggle-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.chip { min-height: 48px; padding: 8px 18px; border-radius: 999px; border: 3px solid #d1d5db; background: #fff; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.chip.is-active { border-color: var(--accent); background: var(--accent); color: #fff; }
.flash-stage { margin-top: 16px; text-align: center; }
.fc-counter { font-weight: 800; color: var(--muted); margin: 6px 0; }
.flashcard { perspective: 1200px; max-width: 520px; margin: 8px auto 14px; min-height: 370px; cursor: pointer; border-radius: 28px; }
.fc-inner { position: relative; width: 100%; min-height: 370px; transition: transform .5s; transform-style: preserve-3d; }
.flashcard.is-flipped .fc-inner { transform: rotateY(180deg); }
.fc-front, .fc-back { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 16px; border-radius: 28px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: var(--shadow-lg); overflow: auto; }
.fc-front { background: linear-gradient(160deg, #fff, #fff4cc); border: 4px solid #f4c20d; }
.fc-back { background: linear-gradient(160deg, #fff, #d7f3ee); border: 4px solid #2ec4b6; transform: rotateY(180deg); }
.flashcard .card-hanzi { font-size: 8.5rem; }
.fc-hint, .fc-tip { color: var(--muted); font-size: 1rem; margin: 6px 0 0; }
.fc-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 10px 0; }
.fc-actions .btn { flex: 1 1 200px; max-width: 260px; }
.score-box { text-align: center; padding: 20px; border-radius: 22px; background: linear-gradient(135deg, #fff4cc, #ffe4e6); }
.score-num { font-size: 3.4rem; font-weight: 900; margin: 0; color: var(--accent); }
.quiz-q { text-align: center; }
.quiz-label { font-size: 1.35rem; font-weight: 800; margin: 6px 0; }
.quiz-hanzi { font-size: 6.4rem; line-height: 1.15; }
.quiz-pinyin { font-size: 3rem; }
.quiz-meaning { font-weight: 700; color: var(--muted); }
.quiz-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 14px 0; }
@media (max-width: 600px) { .quiz-options { grid-template-columns: 1fr; } }
.quiz-opt { min-height: 72px; padding: 10px 14px; border-radius: 18px; border: 3px solid #d1d5db; background: #fff; font: inherit; font-size: 1.15rem; font-weight: 700; color: var(--ink); cursor: pointer; }
.quiz-opt:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-2px); }
.quiz-opt.correct { background: #dcfce7; border-color: #15803d; }
.quiz-opt.wrong { background: #fee2e2; border-color: #b91c1c; }
.quiz-opt-hz { font-size: 3rem; line-height: 1.2; } .quiz-opt-py { font-size: 1.8rem; }
.quiz-feedback { text-align: center; font-weight: 800; font-size: 1.2rem; min-height: 1.6em; }
.quiz-feedback.ok { color: var(--ok); } .quiz-feedback.bad { color: var(--bad); }
.quiz > .btn, .quiz-q ~ .btn { display: flex; margin: 10px auto; }
.progress-rows { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 18px; }
.pr-row { display: grid; grid-template-columns: minmax(150px, 1.4fr) 2fr auto; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); }
.pr-row.lesson-row { grid-template-columns: 1fr auto; padding: 10px 14px; border-radius: 16px; background: #f9fafb; border-left: 8px solid #d1d5db; }
.pr-row.lesson-row.done { background: #f2fcf5; border-left-color: #15803d; }
.pr-label { font-weight: 700; } .pr-count { font-weight: 800; white-space: nowrap; }
.pr-row.total .pr-label { color: var(--accent); }
@media (max-width: 600px) { .pr-row { grid-template-columns: 1fr auto; } .pr-row .bar { grid-column: 1 / -1; order: 3; } }
.danger-zone { margin-top: 16px; padding-top: 16px; border-top: 2px dashed var(--line); }

/* ---------- Modal ve bildirim ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(17, 24, 39, .6); display: flex; align-items: flex-start; justify-content: center; padding: 18px 12px; overflow-y: auto; }
.modal { position: relative; width: 100%; max-width: 520px; background: #fff; border-radius: 26px; padding: 18px; box-shadow: var(--shadow-lg); margin: auto; }
.modal-close { position: sticky; top: 0; display: flex; margin-left: auto; margin-bottom: 8px; min-height: 48px; z-index: 2; }
.mini-card { display: flex; flex-direction: column; gap: 4px; }
.mini-card .badge { margin-bottom: 4px; }
.toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 120; width: min(94vw, 640px); display: flex; gap: 12px; align-items: center; justify-content: space-between; background: #1f2937; color: #fff; padding: 14px 18px; border-radius: 18px; box-shadow: var(--shadow-lg); font-weight: 600; }
.toast .btn { min-height: 44px; padding: 6px 16px; flex: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
