/* =========================================================================================
 * Meister Kastor teması — standart renk sistemi
 *
 * KURAL 1 · Her anlamın tek rengi var, her rengin yalnızca İKİ tonu var:
 *   ana ton (yazı, ikon, çizgi, dolgu)  +  açık ton "-t" (yalnızca zemin)
 *     --blue   eylem: düğme, bağlantı, seçili öğe, soru ilerlemesi, aktif sekme
 *     --green  doğru: doğru cevap, ilerleme çubukları (doğru sayısı), tamamlanma
 *     --red    yanlış: yanlış cevap, sayaç rozeti, silme
 *     --amber  ödül: XP, seri, yıldız, taç, günlük hedef
 *   Nötrler: --ink (yazı) · --muted (ikincil yazı) · --gray (pasif/yeni) · --line · --soft · --card · --bg
 * KURAL 2 · Kehribar ASLA yazı rengi değildir (yalnızca ikon/çubuk). Yazılar: ink, muted, blue, green, red.
 * KURAL 3 · Modül renkleri (config.js) tek bir soğuk renk ailesinden, aynı parlaklıkta; yalnızca modül kimliğinde
 *   (ikon kutusu, modül başlık çubuğu, devam kartı) kullanılır. Yeşil/kırmızı/kehribarla karışmaz.
 * KURAL 4 · Rütbe metalleri (app.js › RANKS) yalnızca rütbe rozeti ve seviye çubuğunda.
 * Kontrast (WCAG AA): ana tonlar beyaz zeminde ≥ 4.5:1 (kehribar ≥ 3:1, yalnız grafik), modül renkleri beyaz yazıyla ≥ 4.7:1.
 * Eski değişken adları (--accent, --ok, --bad, --gold …) bu dört renge bağlıdır; yeni sabit renk kodu yazılmaz.
 * ========================================================================================= */
html.modern {
  --bg: #ffffff; --card: #ffffff; --ink: #1f2630; --muted: #5b6675; --gray: #c3c9d2; --line: #e1e5ea; --soft: #f2f5f9;
  --blue: #0076d3; --blue-t: #e2f6ff;
  --green: #1a872b; --green-t: #e2fce1;
  --red: #d53d37; --red-t: #ffece9;
  --amber: #d28300; --amber-t: #fff0c7;
  /* eski adlar → standart renkler */
  --accent: var(--blue); --accentt: var(--blue); --blue2: var(--blue);
  --ok: var(--green); --okt: var(--green); --okbg: var(--green-t);
  --bad: var(--red); --badt: var(--red); --badbg: var(--red-t);
  --gold: var(--amber); --gold2: var(--amber); --orange: var(--amber); --orange2: var(--amber); --warn: var(--amber);
  --goldt: var(--ink); --oranget: var(--ink);
  --c: var(--blue);
  --r: 18px;
  --sh1: 0 0 0 1.5px var(--line);
  --sh2: 0 0 0 1.5px var(--line), 0 6px 20px rgba(20, 30, 45, .08);
  --glass: rgba(255, 255, 255, .92);
}
@media (prefers-color-scheme: dark) {
  html.modern {
    --bg: #131f24; --card: #1a2a31; --ink: #eef4f8; --muted: #a6b3bd; --gray: #4b5d66; --line: #2e3f47; --soft: #22343c;
    --blue: #6ab3fd; --blue-t: #142f4b;
    --green: #75d079; --green-t: #18361a;
    --red: #f6857a; --red-t: #47211d;
    --amber: #fcb442; --amber-t: #442e09;
    --c: #0076d3;
    --sh2: 0 0 0 1.5px var(--line), 0 10px 30px rgba(0, 0, 0, .4);
    --glass: rgba(19, 31, 36, .92);
  }
}

/* ---------- tipografi ---------- */
html.modern body { font-family: "Lexend", -apple-system, "Segoe UI", Roboto, sans-serif; font-feature-settings: normal; letter-spacing: 0; font-weight: 400; }
@media (min-width: 520px) { html.modern body { background: var(--soft); } html.modern .shell { box-shadow: 0 0 0 1px var(--line), 0 20px 60px rgba(20, 30, 45, .10); } }
html.modern b, html.modern strong { font-weight: 600; }
html.modern h1, html.modern h2, html.modern .ab-title { font-weight: 700; letter-spacing: -.01em; }
html.modern .muted, html.modern .tr { color: var(--muted); }
html.modern .eyebrow, html.modern .sh-h, html.modern .fcap, html.modern .eg-l, html.modern .ab-mod, html.modern .stsub, html.modern .sec { text-transform: none; letter-spacing: 0; }
html.modern .eyebrow { font-size: .8rem; font-weight: 600; }
html.modern .eg-l, html.modern .fcap { font-size: .8rem; font-weight: 600; }
html.modern :focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 60%, transparent); outline-offset: 2px; }
html.modern .linkbtn, html.modern .oblv, html.modern .link-sec { color: var(--blue); }

/* ---------- üst çubuk ---------- */
html.modern .appbar { border-bottom: 1.5px solid var(--line); }
html.modern .ab-title { min-width: 0; font-size: 1.05rem; }
html.modern .ab-logo::before { content: none; }
html.modern .ab-logo { width: 44px; }
html.modern .ab-pill { border: 0; box-shadow: var(--sh1); color: var(--blue); font-weight: 600; }
html.modern .modbar .appbar { background: var(--c); border-bottom: 0; box-shadow: none; }
html.modern .modbar .ab-pill { background: rgba(255, 255, 255, .18); color: #fff; box-shadow: none; }
.homebar { gap: 4px; }
.homebar .ab-sp { flex: 1; width: auto; }
.kchip { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 8px; border: 0; border-radius: 12px; background: none; font: inherit; font-weight: 600; font-size: .95rem; color: var(--ink); text-decoration: none; cursor: pointer; }
.kchip:active { background: var(--soft); }
.kchip .ic { width: 20px; height: 20px; stroke-width: 2.2; }
.kchip.flame .ic { color: var(--gray); }
.kchip.flame.hot .ic, .kchip.xp .ic { color: var(--amber); fill: var(--amber-t); }
.kchip.lvl .ic { color: var(--rc); }
html.modern .ab-note i, html.modern .tabbar .badge { background: var(--red); color: #fff; }

/* ---------- maskot ---------- */
img.kastor { display: block; flex: none; height: auto; }
.khead { --s: 40px; flex: none; width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden; display: inline-block; background: var(--soft); box-shadow: 0 0 0 1.5px var(--line); }
.khead img { display: block; width: 100%; height: 100%; }
.k-happy { animation: khappy .5s ease-out; } .k-sad { animation: ksad .6s ease-out; transform: rotate(-6deg); }
.k-cheer { animation: khop 1.4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes khappy { 0% { transform: scale(.85); } 60% { transform: scale(1.08); } 100% { transform: none; } }
@keyframes ksad { 0% { transform: none; } 40% { transform: rotate(-10deg); } 100% { transform: rotate(-6deg); } }
@keyframes khop { 0%, 100% { transform: none; } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .k-happy, .k-sad, .k-cheer { animation: none; } }

/* ---------- kartlar, listeler ---------- */
html.modern .rows, html.modern .words, html.modern .legend, html.modern .info, html.modern .stat, html.modern .instcard, html.modern .rvhero, html.modern .hcard, html.modern .mcard, html.modern .stcard, html.modern .stq, html.modern .stbox:not(.x), html.modern .obfeat li, html.modern .obcard, html.modern .obsum > div, html.modern .tlegend {
  border: 0; box-shadow: var(--sh1); border-radius: var(--r); background: var(--card);
}
html.modern .sec { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin: 24px 4px 10px; }
html.modern .sec .cnt { font-size: .78rem; font-weight: 400; color: var(--muted); }
html.modern .ico { border-radius: 14px; background: var(--c); color: #fff; box-shadow: none; font-size: 1.15rem; font-weight: 700; }
html.modern .play { background: var(--c); box-shadow: none; }
html.modern .mi { background: var(--soft); color: var(--ink); }
html.modern .chev { color: var(--gray); }
html.modern .mc-crown { background: var(--green-t); color: var(--green); }
html.modern .mc-bar, html.modern .mpb, html.modern .bar, html.modern .tbar { background: var(--soft); }
html.modern .mc-bar i, html.modern .mpb i, html.modern .bar i { background: var(--green); }
html.modern .okc, html.modern .mpt { color: var(--ink); } html.modern .okc .ic, html.modern .mpt .ic, html.modern .mc-crown.ms { color: var(--amber); }

/* devam kartı: modül renginde, ince Bavyera deseni */
html.modern .hero { border: 0; color: #fff; border-radius: 20px; padding: 18px; background: var(--c) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='16'%3E%3Cpath d='M14 0L28 8 14 16 0 8z' fill='%23fff' fill-opacity='.08'/%3E%3C/svg%3E"); box-shadow: 0 0 0 1.5px var(--c), 0 6px 18px color-mix(in srgb, var(--c) 22%, transparent); margin-bottom: 16px; }
html.modern .hero .eyebrow, html.modern .hero .muted { color: #fff; opacity: .9; }
html.modern .hero .play { background: rgba(255, 255, 255, .2); }
html.modern .hero .bar { background: rgba(255, 255, 255, .28); } html.modern .hero .bar i { background: #fff; }
html.modern .hero.review { background-color: var(--green); }

/* ---------- düğmeler: eylem = mavi, her zaman ---------- */
html.modern .btn { border: 0; border-radius: 14px; background: var(--card); color: var(--ink); box-shadow: 0 0 0 1.5px var(--line), 0 2px 0 var(--line); font-weight: 600; font-size: 1rem; text-transform: none; letter-spacing: 0; transition: transform .06s, box-shadow .06s; }
html.modern .btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 0 0 1.5px var(--line); }
html.modern .btn.primary { background: var(--blue); color: #fff; box-shadow: none; font-weight: 600; }
@media (prefers-color-scheme: dark) { html.modern .btn.primary { background: #0076d3; } }
/* cevap sonrası "Devam": sonucun rengini taşır — doğru = yeşil, yanlış = kırmızı, pas = gri (cevap kutusu şeridiyle aynı) */
html.modern .btn.go-ok, html.modern .btn.go-bad, html.modern .btn.go-skip { color: #fff; box-shadow: none; font-weight: 600; }
html.modern .btn.go-ok { background: var(--green); } html.modern .btn.go-bad { background: var(--red); } html.modern .btn.go-skip { background: var(--muted); }
@media (prefers-color-scheme: dark) { html.modern .btn.go-ok, html.modern .btn.go-bad, html.modern .btn.go-skip { color: var(--bg); } }
html.modern .btn.primary:active:not(:disabled), html.modern .btn.go-ok:active, html.modern .btn.go-bad:active, html.modern .btn.go-skip:active { box-shadow: none; opacity: .9; }
html.modern .btn.ghost { background: none; box-shadow: none; color: var(--muted); }
html.modern .btn.danger { background: var(--red); color: #fff; box-shadow: none; }
html.modern .cta-row .btn { text-align: center; line-height: 1.2; padding: 0 10px; font-size: .95rem; }
html.modern .instcard .ib, html.modern .stp, html.modern .stcount.full, html.modern .aim.me, html.modern .hn { background: var(--blue); color: #fff; }
html.modern .chip { border: 0; box-shadow: var(--sh1); font-weight: 500; }
html.modern .chip.on { background: var(--blue-t); color: var(--blue); box-shadow: 0 0 0 1.5px var(--blue); }
html.modern .tabs a.on, html.modern .seg button.on { color: var(--ink); }
html.modern .txt { border: 0; background: var(--card); box-shadow: var(--sh1); }
html.modern .txt:focus { box-shadow: 0 0 0 2px var(--blue), 0 0 0 5px var(--blue-t); }
html.modern .switch input:checked + span { background: var(--blue); }
html.modern .bigchoice button.on { border-color: var(--blue); background: var(--blue-t); } html.modern .bigchoice button.on b { color: var(--blue); }
.bigchoice:has([data-act="gxp"]) { grid-template-columns: repeat(2, 1fr); }

/* ---------- sekme çubuğu ---------- */
html.modern .tabbar { margin: 0; border-radius: 0; padding: 6px 8px calc(6px + var(--sab)); background: var(--glass); box-shadow: none; border-top: 1.5px solid var(--line); }
html.modern .tabbar a { font-weight: 500; border-radius: 12px; margin: 0 2px; color: var(--muted); }
html.modern .tabbar a.on { background: var(--blue-t); color: var(--blue); font-weight: 600; }
html.modern .tabbar a span .ic { width: 24px; height: 24px; }
html.modern .shell:has(.tabbar) .cta { padding-bottom: 10px; }

/* ---------- Öğren (ana sayfa) ---------- */
.ktoday { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 14px; border-radius: 18px; background: var(--card); box-shadow: var(--sh1); text-decoration: none; color: inherit; }
.ktoday .kt-t { flex: 1; display: grid; gap: 6px; font-size: .92rem; } .ktoday .kbar { margin: 0; }
.ktoday.done .kbar i { background: var(--green); }
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mtile { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 2px; align-items: center; padding: 12px; border-radius: 18px; background: var(--card); box-shadow: 0 0 0 1.5px var(--line), 0 2px 0 var(--line); text-decoration: none; color: inherit; transition: transform .06s; }
.mtile:active { transform: translateY(2px); box-shadow: 0 0 0 1.5px var(--line); }
.mtile .ico { grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 13px; font-size: 1.1rem; }
.mtile b { font-size: .95rem; line-height: 1.2; }
.mtile small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-bar { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--soft); overflow: hidden; margin-top: 8px; }
.mt-bar i { display: block; height: 100%; border-radius: 99px; background: var(--green); }

/* ---------- karşılama kartı (İlerleme) ---------- */
.kgreet { position: relative; background: var(--card); border-radius: 22px; padding: 16px 16px 14px; margin-bottom: 14px; box-shadow: var(--sh1); overflow: hidden; }
.kgreet::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--ink) 0 33.3%, var(--red) 33.3% 66.6%, var(--amber) 66.6%); }
.kg-top { display: flex; align-items: flex-end; gap: 10px; margin: 4px 0 12px; }
.kbub { position: relative; flex: 1; background: var(--soft); border-radius: 16px; padding: 10px 14px; font-size: .95rem; line-height: 1.45; margin-bottom: 16px; }
.kbub::after { content: ""; position: absolute; left: -6px; bottom: 16px; width: 12px; height: 12px; background: var(--soft); transform: rotate(45deg); }
.kg-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; margin-top: 10px; }
.kg-l { display: inline-flex; align-items: center; gap: 6px; min-width: 0; } .kg-l small { color: var(--muted); font-weight: 400; }
.kg-l > .ic { width: 18px; height: 18px; color: var(--amber); }
.kg-v { color: var(--muted); font-weight: 500; white-space: nowrap; }
.kbar { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; margin-top: 6px; }
.kbar i { display: block; height: 100%; min-width: 10px; border-radius: 99px; background: var(--blue); transition: width .5s; }
.kbar.gold i { background: var(--amber); }
.kbar.rank i { background: var(--rc); }
.kgreet.done .kbar.gold i { background: var(--green); }
.kg-next { font-size: .82rem; color: var(--muted); margin-top: 8px; } .kg-next b { color: var(--ink); }
.kweek { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1.5px solid var(--line); }
.kweek span { display: grid; justify-items: center; gap: 4px; font-size: .74rem; font-weight: 500; color: var(--muted); }
.kweek i { width: 28px; height: 28px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; }
.kweek .on i { background: var(--amber-t); box-shadow: inset 0 0 0 1.5px var(--amber); }
.kweek .on i .ic { width: 16px; height: 16px; color: var(--amber); fill: var(--amber-t); }
.kweek .now { color: var(--ink); font-weight: 600; } .kweek .now i { box-shadow: inset 0 0 0 1.5px var(--ink); }
.kweek .now.on i { box-shadow: inset 0 0 0 1.5px var(--amber); }
.kweek .fut i { opacity: .5; }
.kinfo { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 12px; padding: 10px; border: 0; border-radius: 12px; background: var(--blue-t); color: var(--blue); font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; }
.kinfo .ic { width: 17px; height: 17px; }
.rbadge { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--rc); vertical-align: -6px; flex: none; }
.rbadge .ic { width: 13px !important; height: 13px !important; color: #fff !important; fill: none !important; stroke-width: 2.4; }
.kg-next .rbadge { width: 18px; height: 18px; vertical-align: -4px; } .kg-next .rbadge .ic { width: 11px !important; height: 11px !important; }
.kstats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.kt2 { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--card); box-shadow: var(--sh1); }
.kt2 .ic { grid-row: 1 / 3; width: 26px; height: 26px; }
.kt2 b { font-size: 1.25rem; font-weight: 700; line-height: 1.1; } .kt2 span { font-size: .8rem; color: var(--muted); }
.kt2.xp .ic, .kt2.fl .ic, .kt2.ms .ic { color: var(--amber); fill: var(--amber-t); } .kt2.ac .ic { color: var(--green); }

/* ---------- test seçimi ---------- */
.pickseg { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 560px) { .pickseg { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pickseg button { display: grid; gap: 4px; text-align: left; padding: 12px; border: 0; border-radius: 16px; background: var(--card); box-shadow: var(--sh1); font: inherit; color: var(--ink); cursor: pointer; }
.pickseg button b { display: inline-flex; align-items: center; gap: 6px; font-size: .92rem; } .pickseg button b .ic { width: 17px; height: 17px; color: var(--blue); }
.pickseg button small { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.pickseg button.on { box-shadow: 0 0 0 2px var(--blue); background: var(--blue-t); }
.pickseg button:disabled { opacity: .5; cursor: default; }
html.modern .pickrow.on { background: var(--blue-t); box-shadow: inset 4px 0 0 var(--blue); } html.modern .pickrow.on .radio { border-color: var(--blue); background: radial-gradient(var(--blue) 42%, transparent 48%); }
.mixline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 12px 4px 4px; font-size: .86rem; color: var(--muted); }
.mx { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-weight: 500; }
.mx i { width: 9px; height: 9px; border-radius: 50%; } .mx-new i { box-shadow: inset 0 0 0 1.5px var(--gray); } .mx-bad i { background: var(--red); } .mx-skip i { background: var(--gray); } .mx-ok i { background: var(--green); }
html.modern .stack .ok, html.modern .segs .ok { background: var(--green); border-color: var(--green); }
html.modern .stack .bad, html.modern .segs .bad { background: var(--red); border-color: var(--red); }

/* ---------- soru ekranı ---------- */
html.modern .quiz .appbar { border-bottom: 0; }
html.modern .qp .bar { height: 10px; background: var(--soft); border-radius: 99px; }
html.modern .qp .bar i { background: var(--blue); border-radius: 99px; min-width: 10px; }
html.modern .quiz .qctx, html.modern .mtag { color: var(--muted); }
html.modern .mtag { border: 0; box-shadow: var(--sh1); font-weight: 600; }
html.modern .qtitle { font-size: 1.05rem; font-weight: 600; color: var(--ink); }
html.modern .big { font-size: 2rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
html.modern .sent { font-size: 1.25rem; line-height: 1.55; font-weight: 400; }
html.modern .blank { border-bottom-color: var(--blue); }
html.modern .say { background: var(--blue-t); color: var(--blue); }
html.modern .hint2 .ic { color: var(--amber); }
html.modern .opt { border: 0; border-radius: 16px; background: var(--card); box-shadow: 0 0 0 1.5px var(--line), 0 2px 0 var(--line); font-weight: 500; font-size: 1.02rem; line-height: 1.35; margin-bottom: 2px; }
html.modern .opt:hover:not(:disabled) { box-shadow: 0 0 0 1.5px var(--blue), 0 2px 0 var(--blue); background: var(--card); }
html.modern .opt:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 0 0 1.5px var(--blue); }
html.modern .opt .kn { box-shadow: 0 0 0 1px var(--line); border-radius: 8px; color: var(--muted); }
html.modern .opt.right { background: var(--green-t); color: var(--green); box-shadow: 0 0 0 1.5px var(--green); }
html.modern .opt.wrong { background: var(--red-t); color: var(--red); box-shadow: 0 0 0 1.5px var(--red); }
html.modern .opt.dim { opacity: .45; }
html.modern .umlaut button { border: 0; box-shadow: 0 0 0 1.5px var(--line), 0 2px 0 var(--line); font-weight: 500; }
html.modern .sent mark, html.modern .fr mark { background: var(--amber-t); color: inherit; }
html.modern .pastnote { color: var(--muted); }

/* cevap kutusu: kart zemini, solda anlam rengi şeridi, kompakt + "Ayrıntılar" */
html.modern .fb { border: 0; border-radius: 18px; padding: 14px 16px 12px 20px; background: var(--card); box-shadow: var(--sh2); max-height: 46vh; }
html.modern .fb.ok { box-shadow: inset 4px 0 0 var(--green), var(--sh2); }
html.modern .fb.bad { box-shadow: inset 4px 0 0 var(--red), var(--sh2); }
html.modern .fb.skip { box-shadow: inset 4px 0 0 var(--muted), var(--sh2); }
html.modern .fbh { justify-content: flex-start; gap: 12px; margin-bottom: 6px; }
.fbh .khead { box-shadow: 0 0 0 1.5px var(--line); }
.fbt { display: grid; line-height: 1.25; flex: 1; }
.fbt b { font-size: 1.2rem; font-weight: 700; }
.fb.ok .fbt b { color: var(--green); } .fb.bad .fbt b { color: var(--red); } .fb.skip .fbt b { color: var(--ink); }
.fbt small { color: var(--muted); font-weight: 400; font-size: .86rem; }
.fbt .xpv { color: var(--ink); font-weight: 600; }
html.modern .fr { grid-template-columns: 96px 1fr; padding: 9px 0; border-top: 1.5px solid var(--line); }
html.modern .fr dt { text-transform: none; letter-spacing: 0; font-size: .82rem; font-weight: 500; color: var(--muted); }
html.modern .fr dd { font-size: 1rem; line-height: 1.5; color: var(--ink); }
html.modern .fr dd b { font-weight: 600; }
html.modern .fr.ans dd b { color: var(--green) !important; }
html.modern .fr.mine s { color: var(--red); text-decoration-thickness: 1.5px; }
html.modern .fr dd small { color: var(--muted); font-size: .88rem; }
html.modern .addnote { border: 0; background: var(--card); box-shadow: var(--sh1); font-weight: 500; color: var(--ink); }
.fbmore { margin-top: 2px; border-top: 1.5px solid var(--line); }
.fbmore summary { list-style: none; display: flex; align-items: center; gap: 6px; padding: 10px 0 2px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--blue); }
.fbmore summary::-webkit-details-marker { display: none; }
.fbmore summary .ic { width: 16px; height: 16px; transform: rotate(-90deg); transition: transform .15s; }
.fbmore[open] summary .ic { transform: rotate(90deg); }
.fbmore summary small { color: var(--muted); font-weight: 400; font-size: .8rem; }
.fbmore .frows { margin-top: 4px; } .fbmore .fbact { margin: 8px 0 2px; }

/* ---------- sonuç ---------- */
.kres { padding-top: 6px; }
.kres-art { width: 168px; height: 168px; margin: 0 auto; border-radius: 50%; display: grid; place-items: end center; overflow: hidden; background: var(--blue-t) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='16'%3E%3Cpath d='M14 0L28 8 14 16 0 8z' fill='%230076d3' fill-opacity='.10'/%3E%3C/svg%3E"); box-shadow: 0 0 0 4px var(--card), 0 0 0 5.5px var(--line); }
.kres-art .kastor { margin-bottom: -6px; }
.kres h2 { font-size: 1.6rem; color: var(--ink); margin-top: 16px; }
.ktiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 12px; }
.kt { border-radius: 16px; padding: 12px 6px; display: grid; gap: 2px; background: var(--card); box-shadow: var(--sh1); }
.kt span { display: inline-flex; gap: 4px; align-items: center; justify-content: center; font-size: .78rem; font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; padding: 0; }
.kt span .ic { width: 14px; height: 14px; color: var(--k); }
.kt b { font-size: 1.4rem; font-weight: 700; color: var(--ink); background: none; padding: 0; }
.kt.gold { --k: var(--amber); } .kt.green { --k: var(--green); } .kt.green b { color: var(--green); } .kt.orange { --k: var(--amber); }
html.modern .newly { color: var(--ink); }

/* seviye / rütbe kutlaması, bildirim hapı */
.lvup { position: fixed; inset: 0; z-index: 220; display: grid; place-items: center; background: rgba(20, 30, 45, .45); animation: fade .2s; }
.lvcard { background: var(--card); border-radius: 24px; padding: 22px 28px 20px; text-align: center; box-shadow: 0 0 0 2px var(--rc, var(--amber)), 0 20px 50px rgba(0, 0, 0, .25); animation: lvpop .4s cubic-bezier(.2, 1.3, .4, 1); max-width: 300px; }
.lvcard .kastor { margin: 0 auto; }
.lvcard > b { display: block; font-size: 1.8rem; font-weight: 700; color: var(--ink); margin-top: 8px; }
.lvcard p { margin: 4px 0 0; color: var(--muted); } .lvcard p b { color: var(--ink); }
@keyframes lvpop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
html.modern .fxpill { background: var(--ink); color: var(--bg); box-shadow: 0 8px 20px rgba(20, 30, 45, .25); display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
html.modern .fxpill .ic { width: 17px; height: 17px; color: var(--amber); fill: var(--amber-t); }

/* ---------- puanlar paneli ---------- */
.xpnote { margin: 0 0 10px; } .xph { margin: 18px 0 4px; font-size: 1.05rem; }
.xptab { display: grid; border-radius: 16px; box-shadow: var(--sh1); overflow: hidden; }
.xptab div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; font-size: .92rem; } .xptab div + div { border-top: 1.5px solid var(--line); }
.xptab b { color: var(--ink); white-space: nowrap; font-weight: 600; }
.rladder { display: grid; gap: 8px; }
.rl { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; box-shadow: var(--sh1); }
.rl:not(.got) { opacity: .6; }
.rl.on { box-shadow: 0 0 0 2px var(--rc); opacity: 1; }
.rl .rbadge { width: 34px; height: 34px; } .rl .rbadge .ic { width: 18px !important; height: 18px !important; }
.rlt { flex: 1; display: grid; font-size: .95rem; } .rl small { color: var(--muted); font-size: .78rem; }
.rl em { font-style: normal; font-size: .74rem; font-weight: 600; color: var(--ink); background: var(--card); box-shadow: 0 0 0 1.5px var(--rc); padding: 3px 8px; border-radius: 99px; }

/* ---------- kelime durumları (Yeni · Tanışıyor · Öğreniyor · Usta): gri → yeşil → mavi → kehribar ---------- */
html.modern .t-new { background: var(--line); } html.modern .t-spark { background: var(--green); } html.modern .t-learn { background: var(--blue); } html.modern .t-master { background: var(--amber); }
html.modern .tn-new i { background: var(--soft); color: var(--muted); } html.modern .tn-new b { color: var(--muted); }
html.modern .tn-spark i { background: var(--green-t); color: var(--green); } html.modern .tn-spark b { color: var(--green); }
html.modern .tn-learn i { background: var(--blue-t); color: var(--blue); } html.modern .tn-learn b { color: var(--blue); }
html.modern .tn-master i { background: var(--amber-t); color: var(--amber); } html.modern .tn-master b { color: var(--ink); }
html.modern .stars .ic { color: var(--gray); } html.modern .stars .ic.on { color: var(--amber); fill: var(--amber); }
html.modern .ic.flame { color: var(--amber); stroke: var(--amber); fill: var(--amber-t); fill-opacity: 1; }
html.modern .chk, html.modern .done-ck { background: var(--green); color: #fff; }
html.modern .lv { color: var(--blue); } html.modern .lv-C1 { background: var(--blue); color: #fff; }
html.modern .row.rv.ok .ico { background: var(--green-t); color: var(--green); }
html.modern .row.rv.bad .ico { background: var(--red-t); color: var(--red); }
html.modern .row.rv.skip .ico { background: var(--soft); color: var(--muted); }
html.modern .fly { background: var(--amber-t); border-color: var(--amber); color: var(--ink); }
html.modern .gap.late { background: var(--amber-t); border-bottom-color: var(--amber); }

/* ---------- çeviri modu ---------- */
html.modern body.trmode::after { box-shadow: inset 0 0 0 4px var(--blue); background: color-mix(in srgb, var(--blue) 5%, transparent); }
html.modern #trui { background: var(--blue); } html.modern #trui button { color: var(--blue); }
html.modern #trdock { background: var(--blue-t); border-top-color: var(--blue); }
html.modern #trpop { border-color: var(--blue); }

/* ---------- tanıtım ---------- */
.oblogo { width: 100%; aspect-ratio: 1024 / 559; border-radius: 20px; background: var(--soft) url(img/kastor-banner.webp) center / cover; box-shadow: var(--sh1); }
html.modern .obdots i.on, html.modern .obdots i.done { background: var(--blue); }
html.modern .obopt { border: 0; box-shadow: var(--sh1); }
html.modern .obopt.on { box-shadow: 0 0 0 2px var(--blue); background: var(--blue-t); }
html.modern .obopt.on .radio { border-color: var(--blue); background: radial-gradient(var(--blue) 42%, transparent 48%); }
html.modern .obemoji { background: var(--blue-t); color: var(--blue); box-shadow: none; }
html.modern .row.main { background: var(--blue-t); }
html.modern .eyebrow { color: var(--muted); } html.modern .pick input { accent-color: var(--blue); } html.modern .chev.big { color: #fff; }

/* dar telefonlarda üst çubuk: düğmeler başlığı sıkıştırmasın, sağ kenara yapışmasın */
@media (max-width: 400px) {
  html.modern .appbar { gap: 4px; padding-left: 4px; padding-right: 12px; }
  html.modern .appbar > .ab-btn:first-child { width: 36px; }
  html.modern .ab-acts { gap: 6px; }
  html.modern .ab-pill { margin-right: 0; padding: 0 10px; min-width: 0; gap: 4px; }
  html.modern .ab-title { font-size: .98rem; }
}
@media (max-width: 340px) {
  html.modern .ab-note { width: 32px; }
  html.modern .ab-pill { padding: 0 8px; }
  html.modern .ab-title { font-size: .9rem; white-space: normal; overflow-wrap: anywhere; }
}

/* hizalama düzeltmeleri */
html.modern .ab-title { white-space: normal; overflow-wrap: anywhere; text-wrap: balance; line-height: 1.15; }
html.modern .ab-title .ab-mod { white-space: nowrap; }
html.modern .quizbar .ab-note { width: 44px; height: 44px; border: 0; background: none; border-radius: 12px; }
html.modern .quizbar .ab-note i { top: 4px; right: 2px; }
html.modern .quizbar .ab-note .ic { width: 24px; height: 24px; }
html.modern .pickrow { gap: 12px; }
html.modern .pickrow .cnt2 { white-space: nowrap; }
.mtile small { overflow: visible; white-space: normal; text-overflow: clip; line-height: 1.25; }
.mtile:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ---------- kelime kartı (panel) ---------- */
.ws-top { position: sticky; top: -8px; z-index: 2; margin: -8px -18px 0; padding: 8px 10px 0; height: 44px; background: var(--card); display: flex; justify-content: center; }
.ws-top .grip { margin-top: 2px; }
.ws-x { position: absolute; right: 10px; top: 6px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--soft); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.ws-x .ic { width: 20px; height: 20px; stroke-width: 2.4; }
.ws-x:active { transform: scale(.92); }
.ws-card { margin-top: -6px; padding: 16px 16px 18px; border-radius: 18px; background: color-mix(in srgb, var(--c) 9%, var(--card)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 18%, transparent); }
.ws-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ws-grp { font-size: .8rem; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.modern .ws-card .ws-word { font-size: 1.9rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; overflow-wrap: anywhere; }
.ws-tr { margin-top: 4px; font-size: 1.05rem; color: var(--ink); }
.ws-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ws-tiles.n1 { grid-template-columns: 1fr; } .ws-tiles.n2, .ws-tiles.n4 { grid-template-columns: 1fr 1fr; }
.ws-tile { position: relative; min-width: 0; padding: 10px 12px; border-radius: 14px; background: var(--card); box-shadow: var(--sh1); display: grid; gap: 2px; }
.ws-tile span { font-size: .72rem; font-weight: 600; color: var(--muted); }
.ws-tile b { font-size: .98rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; padding-right: 2px; }
.ws-tile .say { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; margin: 0; }
.ws-tile:has(.say) span { padding-right: 26px; }
.ws-tile .say .ic { width: 15px; height: 15px; }
.ws-use { display: flex; flex-wrap: wrap; gap: 8px; }
.ws-chip { display: inline-grid; padding: 7px 12px; border-radius: 12px; background: var(--soft); line-height: 1.2; }
.ws-chip b { font-size: .9rem; font-weight: 600; } .ws-chip small { font-size: .74rem; color: var(--muted); }
.ws-sec { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: .95rem; font-weight: 700; }
.ws-st { font-size: .8rem; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.ws-st .ic { width: 15px; height: 15px; color: var(--amber); }
.ws-eg { padding: 12px 14px; border-radius: 14px; background: var(--soft); }
.ws-eg .eg-de { font-weight: 600; line-height: 1.4; } .ws-eg .eg-tr { margin-top: 2px; color: var(--muted); font-size: .9rem; }
.ws-rule { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--amber-t); font-size: .86rem; line-height: 1.4; }
.ws-rule .ic { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--amber); }
.ws-pats { display: flex; flex-wrap: wrap; gap: 8px; }
.ws-pat { display: grid; text-align: left; padding: 8px 12px; border: 0; border-radius: 12px; background: var(--card); box-shadow: var(--sh1); font: inherit; color: inherit; cursor: pointer; }
.ws-pat b { font-size: .9rem; font-weight: 600; color: var(--blue); } .ws-pat small { font-size: .76rem; color: var(--muted); }
.ws-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
html.modern .ws-acts .btn { min-height: 46px; padding: 0 8px; font-size: .88rem; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.ws-acts .btn .ic { width: 18px; height: 18px; }
.ws-acts .btn:disabled { opacity: 1; color: var(--green); }
.ws-hint { margin: -2px 2px 0; font-size: .78rem; color: var(--muted); }
.ws-mute { justify-self: center; margin: 2px 0 4px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; }
.ws-mute .ic { width: 16px; height: 16px; }

/* ---------- kelime durumu etiketi (listede ve kartta) ---------- */
.wpill { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; line-height: 1; vertical-align: middle; }
.wpill .ic { width: 13px; height: 13px; stroke-width: 2.4; }
.wpill.new { background: var(--soft); color: var(--muted); }
.wpill.ok { background: var(--green-t); color: var(--green); }
.wpill.bad { background: var(--red-t); color: var(--red); }
.wpill.skip { background: var(--soft); color: var(--ink); }
.wpill.master { background: var(--amber-t); color: var(--ink); } .wpill.master .ic { color: var(--amber); }
/* kart: ilerleme özeti + alıştırma tablosu */
.ws-sec .wpill { font-size: .78rem; }
.ws-sum { display: grid; gap: 6px; margin-top: -2px; font-size: .84rem; color: var(--muted); }
.ws-sum b { color: var(--ink); font-weight: 600; }
.ws-bar { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; } .ws-bar i { display: block; height: 100%; border-radius: 99px; background: var(--green); }
html.modern .ws-modes li { display: grid; grid-template-columns: 36px 1fr auto 50px; gap: 10px; align-items: center; padding: 8px 12px; min-height: 52px; }
html.modern .ws-modes li.ws-mh { min-height: 0; padding: 8px 12px 6px; font-size: .72rem; font-weight: 600; color: var(--muted); grid-template-columns: 1fr auto 50px; }
.ws-mh span:nth-child(3) { text-align: center; }
.ws-modes .mi { width: 36px; height: 36px; }
.ws-modes .mn { font-weight: 600; }
.mst { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; justify-self: end; }
.mst .ic { width: 14px; height: 14px; stroke-width: 2.6; }
.mst.ok { background: var(--green-t); color: var(--green); } .mst.bad { background: var(--red-t); color: var(--red); }
.mst.skip { background: var(--soft); color: var(--ink); } .mst.new { background: none; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); } .mst.off { background: none; color: var(--muted); }
.ws-modes li.off .mi, .ws-modes li.off .mn { opacity: .45; }

/* ---------- alıştırma kutuları: içinde işaret, yanında doğru sayısı ---------- */
html.modern .segs { gap: 3px; }
html.modern .segs i { position: relative; width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid var(--gray); background: var(--card); display: grid; place-items: center; }
html.modern .segs i::after { font: 800 10px/1 system-ui, sans-serif; color: #fff; font-style: normal; }
html.modern .segs i.ok { background: var(--green); border-color: var(--green); } html.modern .segs i.ok::after { content: "✓"; }
html.modern .segs i.bad { background: var(--red); border-color: var(--red); } html.modern .segs i.bad::after { content: "✕"; font-size: 9px; }
html.modern .segs i.skip { background: var(--muted); border-color: var(--muted); } html.modern .segs i.skip::after { content: "–"; }
html.modern .segs i.off { border-style: dashed; background: none; opacity: .6; }
@media (prefers-color-scheme: dark) { html.modern .segs i::after { color: var(--bg); } }
html.modern .wp small { min-width: 0; font-size: .76rem; font-weight: 600; color: var(--muted); }
/* başlık satırı: alıştırma adları dikey, tam kutuların üstünde */
html.modern .w.whead { min-height: 0; padding-top: 10px; padding-bottom: 4px; cursor: default; align-items: flex-end; }
html.modern .w.whead:active { background: none; }
.whead .lv, .whead .wp small, .whead .chev { visibility: hidden; }
.whead .meta { align-items: flex-end; }
html.modern .segh i { height: auto; border: 0; background: none; display: flex; justify-content: center; overflow: visible; }
html.modern .segh i::after { content: none; }
.segh b { font-style: normal; writing-mode: vertical-rl; transform: rotate(180deg); font-size: .62rem; font-weight: 600; color: var(--muted); white-space: nowrap; line-height: 15px; }
html.modern .segs i.na { visibility: hidden; }
