/* SemsLanguage kurs oynatıcısı — tokenlar shared/brand.css'ten (sems ERA kimliği). */
.hidden { display: none !important; }
.screen { min-height: calc(100vh - var(--header-h)); display: flex; flex-direction: column; }
/* Ortak footer (partials/footer.html): kapı ve ders listesi ekranlarında, içeriğin altında; ders/test sırasında ve ilk ekran seçilmeden önce gizli. */
.foot { display: none; }
#gate-screen:not(.hidden) ~ .foot, #menu-screen:not(.hidden) ~ .foot { display: block; }

/* ── Kırıntı: "← Raf" (build.js kategoriye göre basar; raf sayfasına döner) — ortak stil brand.css'te ── */
.menu-main .crumb { margin-bottom: 14px; }

/* ── Kapı: tanıtım + kayıt ── */
#gate-screen { position: relative; overflow: hidden; }
.gate-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 45% at 50% 0%, rgba(34,211,238,.14), transparent 70%); }
.gate-in { position: relative; max-width: 1040px; width: 100%; margin: 0 auto; padding: clamp(40px, 6vw, 72px) 24px 64px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 40px; align-items: start; }
.gate-intro { min-width: 0; }
.gate-flag { font-size: 56px; line-height: 1; margin-bottom: 14px; }
.gate-kicker { font-size: 11px; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--fg-45); }
.gate-intro h1 { margin-top: 10px; font-size: clamp(34px, 5vw, 54px); font-weight: 900; letter-spacing: -.03em; line-height: 1.05; }
.gate-subtitle { margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--fg-60); }
.gate-blurb { margin-top: 16px; font-size: 15.5px; line-height: 1.7; color: var(--fg-80); max-width: 520px; }
.gate-lessons { margin-top: 24px; list-style: none; display: grid; gap: 6px; max-width: 520px; }
.gate-lessons li { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 13.5px; color: var(--fg-60); padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--fill-3); }
.gate-lessons li b { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #050506; background: var(--grad); }
.gate-lessons li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gate-lessons li.more { justify-content: center; color: var(--fg-45); border-style: dashed; }
.gate-card { position: sticky; top: calc(var(--header-h) + 16px); border-radius: var(--r-2xl); border: 1px solid var(--line-15); background: var(--ink); padding: 26px 24px 22px; box-shadow: 0 0 60px rgba(34,211,238,.08); }
@media (max-width: 880px) { .gate-in { grid-template-columns: minmax(0, 1fr); gap: 28px; } .gate-card { position: static; } .gate-flag { font-size: 44px; } }

/* ── Ders listesi ── */
.menu-main { max-width: 860px; width: 100%; margin: 0 auto; padding: 36px 24px 72px; }
.menu-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.menu-flag { font-size: 48px; line-height: 1; flex: none; }
.menu-kicker { font-size: 11px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--fg-45); }
.menu-main h2 { margin-top: 4px; font-size: clamp(24px, 3.4vw, 30px); font-weight: 900; letter-spacing: -.02em; }
.menu-sub { margin-top: 4px; font-size: 14px; color: var(--fg-60); }
.menu-progress { height: 6px; border-radius: 999px; background: var(--fill-10); overflow: hidden; }
.menu-progress-fill { height: 100%; width: 0; background: var(--grad); border-radius: 999px; transition: width .4s; }
.menu-progress-text { margin: 8px 0 22px; font-size: 12px; font-weight: 600; color: var(--fg-45); }
.lesson-list { display: grid; gap: 10px; }
.lesson-item { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--fill-3); cursor: pointer; text-align: left; color: inherit; font-family: inherit; width: 100%; transition: border-color .15s, background .15s, transform .12s; }
.lesson-item:hover { border-color: rgba(163,230,53,.5); background: var(--fill-4); transform: translateY(-1px); }
.lesson-num { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-15); background: var(--fill-6); color: var(--fg); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 16px; }
.lesson-item.done .lesson-num { background: var(--grad); color: #050506; border-color: transparent; }
.lesson-item.started .lesson-num { border-color: rgba(34,211,238,.6); color: var(--accent); }
.lesson-info { flex: 1; min-width: 0; }
.lesson-info .t { font-weight: 800; font-size: 15.5px; letter-spacing: -.01em; }
.lesson-info .d { font-size: 13px; color: var(--fg-60); margin-top: 2px; }
.lesson-state { flex: none; font-size: 12px; font-weight: 700; color: var(--fg-45); }
.lesson-item.done .lesson-state { color: var(--lift); }
.lesson-item.started .lesson-state { color: var(--accent); }

/* ── Oynatıcı ── */
.player-bar { position: sticky; top: var(--header-h); z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: rgba(5,5,6,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.player-title { flex: 1; min-width: 0; text-align: center; font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-counter { flex: none; font-size: 12px; font-weight: 700; color: var(--fg-45); min-width: 48px; text-align: right; }
.progress-track { height: 4px; background: var(--fill-10); }
.progress-fill { height: 100%; width: 0; background: var(--grad); transition: width .25s; }
.player-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 28px 16px; }
.card { width: min(680px, 100%); border-radius: 24px; border: 1px solid var(--line); background: var(--ink); padding: 40px 36px; box-shadow: 0 20px 60px rgba(0,0,0,.45); animation: slidein .25s ease; }
@keyframes slidein { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.card .kicker { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; margin-bottom: 20px; border: 1px solid var(--line-15); color: var(--fg-60); background: var(--fill-4); }
.card.k-intro .kicker { color: #FCD34D; border-color: rgba(252,211,77,.35); }
.card.k-teach .kicker { color: var(--accent); border-color: rgba(34,211,238,.4); }
.card.k-pattern .kicker { color: #C4B5FD; border-color: rgba(196,181,253,.4); }
.card.k-examples .kicker { color: var(--lift); border-color: rgba(163,230,53,.4); }
.card.k-tip .kicker { color: #FDA4AF; border-color: rgba(253,164,175,.4); }
.card.k-dialog .kicker { color: var(--accent); border-color: rgba(34,211,238,.4); }
.card.k-exercise .kicker { color: var(--lift); border-color: rgba(163,230,53,.4); }
.card.k-grammar .kicker { color: #C4B5FD; border-color: rgba(196,181,253,.4); }
.card.k-reading .kicker { color: #FCD34D; border-color: rgba(252,211,77,.35); }
.card.k-vocab .kicker { color: #FDA4AF; border-color: rgba(253,164,175,.4); }
.card h3 { font-size: 21px; font-weight: 800; letter-spacing: -.01em; margin-bottom: 14px; }
.card .body { font-size: 16px; line-height: 1.7; color: var(--fg-80); }
.card .es-big { font-size: 34px; font-weight: 900; letter-spacing: -.02em; margin: 10px 0 6px; line-height: 1.2; }
.card .tr-sub { font-size: 17px; color: var(--fg-60); margin-bottom: 14px; }
.card .note { margin-top: 18px; font-size: 14.5px; line-height: 1.65; color: var(--fg-80); background: var(--fill-4); border-left: 3px solid var(--lift); border-radius: 10px; padding: 12px 16px; }
.pair-list { margin-top: 14px; display: grid; gap: 10px; }
.pair { display: flex; flex-direction: column; gap: 2px; background: var(--fill-4); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.pair .es { font-weight: 800; font-size: 17px; }
.pair .tr { font-size: 14px; color: var(--fg-60); }

/* Kitap biçimli içerik (segment.content) */
.bk { margin-top: 6px; display: grid; gap: 10px; }
.bk-h { font-weight: 800; font-size: 15px; letter-spacing: -.01em; margin-top: 6px; }
.bk-i { font-style: italic; font-size: 14.5px; line-height: 1.55; color: var(--fg-60); }
.bk-p { font-size: 16px; line-height: 1.7; color: var(--fg-80); }
.bk-q { font-size: 15.5px; line-height: 1.6; color: var(--fg-80); padding-left: 4px; }
.bk-d { font-size: 16px; line-height: 1.6; color: var(--fg-80); padding: 8px 12px; border-radius: 10px; background: var(--fill-4); border: 1px solid var(--line); }
.bk-d b { color: var(--fg); margin-right: 2px; }
.bk-c { font-size: 13px; color: var(--fg-45); font-style: italic; }
.bk-n { font-size: 13.5px; color: var(--fg-60); border-left: 3px solid var(--line-30); padding: 6px 12px; }
.bk-grid { display: grid; gap: 4px 14px; align-items: start; font-size: 15px; line-height: 1.5; color: var(--fg-80); }
.bk-cell { min-width: 0; overflow-wrap: anywhere; padding: 3px 0; border-bottom: 1px solid var(--line); }
.bk-cell.bk-full { grid-column: 1 / -1; }
.bk .speak-btn { margin-left: 6px; vertical-align: middle; }
/* İsteğe bağlı çeviri / okunuş / Latin yazım alt satırları (ör. wal-fr: Fransızca satırın altında Türkçesi ve okunuşu;
   wal-zh: Çince satırın altında pinyin, okunuş ve Türkçesi) */
.bk-tr { display: block; font-size: 13.5px; line-height: 1.5; color: var(--fg-45); margin-top: 3px; }
.bk-pron { display: block; font-size: 13px; font-style: italic; letter-spacing: .2px; color: var(--fg-45); margin-top: 3px; }
.bk-roman { display: block; font-size: 13.5px; font-weight: 600; letter-spacing: .02em; color: var(--accent); margin-top: 3px; }
.bk-d .bk-tr { font-style: normal; }
.credit { margin-top: 10px; font-size: 12.5px; line-height: 1.5; color: var(--fg-45); }
.lesson-group { margin: 14px 0 2px; font-size: 11px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--fg-45); }
.lesson-list > .lesson-group:first-child { margin-top: 0; }

/* Telaffuz satırı + sesli okuma */
.pron { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; }
.pron-text { font-style: italic; color: var(--fg-45); font-size: 15px; letter-spacing: .2px; }
.pair .pron { margin: 0 0 2px; }
.pair .pron-text { font-size: 13px; }
/* Romanizasyon (Latin harfli standart yazım; yalnız alanı olan kurslarda) */
.card .roman { font-size: 15px; font-weight: 600; letter-spacing: .02em; color: var(--accent); margin: 0 0 2px; }
.pair .roman { font-size: 12.5px; }
.speak-btn { display: none; border: 1px solid var(--line-15); background: transparent; color: var(--fg); cursor: pointer; font-size: 14px; line-height: 1; padding: 4px 7px; border-radius: 8px; }
.speak-btn:hover { background: var(--fill-6); border-color: var(--line-30); }
body.has-voice .speak-btn { display: inline-block; }

.player-nav { display: flex; justify-content: space-between; gap: 12px; padding: 16px 16px max(24px, env(safe-area-inset-bottom)); max-width: 720px; width: 100%; margin: 0 auto; }
.player-nav .sl-btn { padding: 13px 24px; font-size: 15px; }

/* Ders sonu */
.card.k-end { text-align: center; }
.card.k-end .big-emoji { font-size: 54px; margin-bottom: 14px; }

/* ── Mini quiz kartı (shared/quiz.js) ── */
.card.k-quiz .kicker { color: #FCD34D; border-color: rgba(252,211,77,.4); }
.qz-prompt { font-size: 15px; font-weight: 700; color: var(--fg-80); margin-bottom: 8px; }
.qz-stim { margin-bottom: 18px; }
.qz-stim .es-big { margin-top: 4px; }
.qz-gap { display: inline-block; min-width: 2.2em; border-bottom: 3px solid var(--accent); color: transparent; line-height: .9; }
.qz-stim-audio { display: flex; justify-content: center; padding: 10px 0 4px; }
.qz-play { border: 1px solid var(--line-15); background: var(--fill-4); color: var(--fg); cursor: pointer; font-size: 14px; line-height: 1; padding: 5px 8px; border-radius: 8px; vertical-align: middle; }
.qz-play:hover { background: var(--fill-6); border-color: var(--line-30); }
.qz-play-big { display: inline-flex; align-items: center; gap: 10px; font-size: 26px; padding: 16px 26px; border-radius: 999px; border-color: rgba(34,211,238,.5); box-shadow: 0 0 40px rgba(34,211,238,.12); }
.qz-play-big span { font-size: 15px; font-weight: 700; }
.qz-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.qz-opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-15); background: var(--fill-4); color: var(--fg); font: inherit; font-size: 16px; font-weight: 600; text-align: left; cursor: pointer; transition: border-color .15s, background .15s, transform .12s; }
.qz-opt:hover:not(:disabled) { border-color: rgba(34,211,238,.6); background: var(--fill-6); transform: translateY(-1px); }
.qz-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.qz-opt:disabled { cursor: default; }
.qz-opt.is-locked { opacity: .55; }
.qz-opt.is-correct { opacity: 1; border-color: rgba(163,230,53,.8); background: rgba(163,230,53,.12); }
.qz-opt.is-wrong { opacity: 1; border-color: rgba(253,164,175,.8); background: rgba(253,164,175,.1); }
.qz-key { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: var(--fg-60); border: 1px solid var(--line-15); }
.qz-opt.is-correct .qz-key { background: var(--grad); color: #050506; border-color: transparent; }
.qz-opt-text { min-width: 0; overflow-wrap: anywhere; }
.qz-fb { margin-top: 16px; font-size: 15px; line-height: 1.6; color: var(--fg-80); }
.qz-fb.ok b { color: var(--lift); }
.qz-fb.no b { color: #FDA4AF; }
.qz-ans { font-weight: 800; color: var(--fg); }
.qz-hint { color: var(--fg-60); }
.qz-keys { font-size: 12.5px; color: var(--fg-45); }
.qz-fb .note { margin-top: 10px; }
.qz-actions { margin-top: 14px; display: flex; gap: 10px; justify-content: flex-end; }
.qz-dots { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }
.qz-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fill-10); border: 1px solid var(--line-15); }
.qz-dot.cur { border-color: var(--accent); }
.qz-dot.ok { background: var(--lift); border-color: transparent; }
.qz-dot.no { background: #FDA4AF; border-color: transparent; }
.qz-prev { margin-top: 12px; font-size: 12.5px; color: var(--fg-45); text-align: center; }
.qz-summary { text-align: center; }
.qz-summary .big-emoji { font-size: 54px; margin-bottom: 14px; }
.qz-summary .qz-actions { justify-content: center; }
.qz-cont { margin-top: 14px; font-size: 12.5px; color: var(--fg-45); }
@media (max-width: 560px) { .qz-opts { grid-template-columns: minmax(0, 1fr); } .qz-opt { font-size: 15px; } }
@media (prefers-reduced-motion: reduce) { .qz-opt:hover:not(:disabled) { transform: none; } }

/* ── Kurs sonu testi (shared/test.js) ── */
.test-entry-wrap:empty { display: none; }
.test-entry { margin-top: 18px; display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--fill-3); }
.test-entry.open { border-color: rgba(163,230,53,.45); background: linear-gradient(135deg, rgba(34,211,238,.08), rgba(163,230,53,.08)); }
.test-entry-ico { flex: none; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; border: 1px solid var(--line-15); background: var(--fill-6); }
.test-entry.open .test-entry-ico { background: var(--grad); border-color: transparent; }
.test-entry-text { flex: 1; min-width: 0; }
.test-entry-kicker { font-size: 11px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--fg-60); }
.test-entry-sub { margin-top: 3px; font-size: 13.5px; color: var(--fg-60); }
.test-entry-best { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--fg-80); }
.test-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #050506; background: var(--grad); vertical-align: 1px; }
.test-attempts { color: var(--fg-45); font-weight: 600; }
.test-entry-actions { flex: none; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) { .test-entry { flex-wrap: wrap; } .test-entry-actions { width: 100%; justify-content: stretch; } .test-entry-actions .sl-btn { flex: 1; } }
.card.k-test .kicker { color: var(--lift); border-color: rgba(163,230,53,.4); }
.qz-opt.is-chosen { border-color: rgba(34,211,238,.8); background: rgba(34,211,238,.12); }
.qz-opt.is-chosen .qz-key { background: var(--accent); color: #050506; border-color: transparent; }
.test-nav { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.test-dots { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; max-width: 50%; }
.test-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--fill-10); border: 1px solid var(--line-15); }
.test-dots i.on { background: var(--accent); border-color: transparent; }
.test-dots i.cur { border-color: var(--fg); }
.test-confirm { margin-top: 16px; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(252,211,77,.45); background: rgba(252,211,77,.08); font-size: 14.5px; color: var(--fg-80); }
.test-result-head { display: flex; align-items: center; gap: 24px; margin-top: 4px; }
.test-ring { flex: none; width: 128px; height: 128px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--fill-10) 0); }
.test-ring.pass { background: conic-gradient(var(--lift) calc(var(--p) * 1%), var(--fill-10) 0); }
.test-ring > div { width: 100px; height: 100px; border-radius: 50%; background: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.test-ring b { font-size: 36px; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.test-ring span { font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-45); margin-top: 4px; }
.test-result-head h3 { margin-bottom: 6px; }
.test-meta { font-size: 14.5px !important; }
.test-note { margin-top: 8px; font-size: 13px; color: #FCD34D; }
.test-wrong-title { margin-top: 24px; font-size: 14px; font-weight: 800; letter-spacing: .02em; color: var(--fg-80); }
.test-wrong { margin-top: 10px; display: grid; gap: 10px; padding-left: 0; list-style: none; counter-reset: tw; }
.test-wrong li { counter-increment: tw; padding: 12px 14px 12px 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--fill-4); position: relative; font-size: 14.5px; line-height: 1.55; }
.test-wrong li::before { content: counter(tw); position: absolute; left: 12px; top: 12px; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; color: var(--fg-60); border: 1px solid var(--line-15); }
.tw-q { font-weight: 700; }
.tw-hint { font-weight: 500; color: var(--fg-60); }
.tw-a { margin-top: 4px; color: var(--fg-80); }
.tw-a .no { color: #FDA4AF; }
.tw-a .ok { color: var(--lift); }
.tw-a .ok b { color: var(--fg); }
.tw-note { margin-top: 6px; font-size: 13px; color: var(--fg-60); }
.tw-go { margin-top: 8px; border: 1px solid var(--line-15); background: transparent; color: var(--accent); font: inherit; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 8px; cursor: pointer; }
.tw-go:hover { background: var(--fill-6); }
.test-share { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.test-share-title { font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--fg-45); margin-bottom: 10px; }
.test-share-row { display: flex; flex-wrap: wrap; gap: 8px; }
.test-actions { margin-top: 22px; justify-content: space-between; }
@media (max-width: 560px) { .test-result-head { flex-direction: column; align-items: flex-start; } .test-nav { flex-wrap: wrap; } .test-dots { order: 3; width: 100%; max-width: none; margin-top: 8px; } .test-actions { flex-direction: column-reverse; } .test-actions .sl-btn { width: 100%; } }

@media (max-width: 560px) {
  .card { padding: 28px 20px; }
  .card .es-big { font-size: 27px; }
  .player-nav .sl-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .card { animation: none; } .lesson-item:hover { transform: none; } }
