/* Englio+ (v1617): günlük oturum, AI koç, düello, haftalık kart, sezon, telaffuz farkı */
:root {
  --ep-accent: #7c3aed;
  --ep-accent-2: #0ea5e9;
  --ep-text: #1e293b;
  --ep-muted: #64748b;
  --ep-border: #e2e8f0;
  --ep-surface: #ffffff;
  --ep-soft: #f8fafc;
  --ep-ok: #16a34a;
  --ep-bad: #dc2626;
  --ep-warn: #ea580c;
}
body.dark {
  --ep-text: #e2e8f0;
  --ep-muted: #94a3b8;
  --ep-border: #334155;
  --ep-surface: #0f172a;
  --ep-soft: #1e293b;
}

/* ---- Ana ekran ---- */
.ep-home { margin: 4px 0 18px; display: flex; flex-direction: column; gap: 12px; }
.ep-daily, .ep-streak-broken {
  display: flex; align-items: center; gap: 14px; width: 100%; box-sizing: border-box;
  border: none; border-radius: 22px; padding: 16px 18px; cursor: pointer; text-align: left;
  font: inherit; color: #fff; -webkit-tap-highlight-color: transparent;
}
.ep-daily { background: linear-gradient(135deg, var(--ep-accent) 0%, var(--ep-accent-2) 100%); box-shadow: 0 10px 24px rgba(124, 58, 237, .25); }
.ep-daily.done { background: linear-gradient(135deg, #16a34a 0%, #0ea5e9 100%); }
.ep-daily:active, .ep-tile:active, .ep-streak-broken:active { transform: scale(.98); }
.ep-daily-icon { font-size: 34px; line-height: 1; }
.ep-daily-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ep-daily-copy b { font-size: 18px; font-weight: 900; }
.ep-daily-copy small { font-size: 13px; opacity: .9; }
.ep-daily-go { background: rgba(255, 255, 255, .22); border-radius: 999px; padding: 8px 14px; font-weight: 800; white-space: nowrap; }
.ep-streak-broken { background: linear-gradient(135deg, #ea580c, #dc2626); flex-wrap: wrap; font-size: 15px; }
.ep-streak-broken span { margin-left: auto; font-weight: 800; }
/* Pratik merkezi: 4 küçük kart tek sırada (v1625) */
.ep-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ep-tile {
  border: 1px solid var(--ep-border); background: var(--ep-surface); color: var(--ep-text);
  border-radius: 14px; padding: 10px 4px 8px; cursor: pointer; font: inherit; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .05); -webkit-tap-highlight-color: transparent;
}
.ep-tile-icon { font-size: 22px; line-height: 1; }
.ep-tile-title { font-weight: 800; font-size: 11.5px; line-height: 1.2; overflow-wrap: anywhere; }
.ep-tile-sub { font-size: 11.5px; color: var(--ep-muted); line-height: 1.3; display: block; }
.ep-home .i3000-section-title { margin: 2px 0 -4px; }
/* Hesap → Lig & XP: Haftalık Kart + Sezon */
.hesap-engage-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.hesap-engage-tiles:empty { display: none; }
.ep-tile.ep-tile-wide { flex-direction: row; align-items: center; text-align: left; gap: 10px; padding: 12px; }
.ep-tile-wide .ep-tile-title { font-size: 14px; display: block; }

/* ---- Tam ekran panel ---- */
html.ep-sheet-open, html.ep-sheet-open body { overflow: hidden; }
.ep-sheet {
  position: fixed; inset: 0; z-index: 9000; background: rgba(15, 23, 42, .55);
  display: flex; align-items: flex-end; justify-content: center;
}
.ep-sheet-panel {
  width: 100%; max-width: 560px; height: 100%; max-height: 100%; box-sizing: border-box;
  background: var(--ep-surface); color: var(--ep-text); display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px);
}
@media (min-width: 600px) { .ep-sheet { align-items: center; } .ep-sheet-panel { height: auto; max-height: 92vh; border-radius: 24px; } }
.ep-sheet-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--ep-border); }
.ep-sheet-title { flex: 1; margin: 0; font-size: 19px; font-weight: 900; }
.ep-sheet-close { border: none; background: var(--ep-soft); color: var(--ep-text); width: 40px; height: 40px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.ep-sheet-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
.ep-sheet-body h4 { margin: 18px 0 8px; font-size: 15px; }

.ep-steps { display: flex; gap: 6px; margin-bottom: 10px; }
.ep-step { flex: 1; text-align: center; font-size: 12px; font-weight: 700; padding: 6px 0; border-radius: 999px; background: var(--ep-soft); color: var(--ep-muted); }
.ep-step.active { background: var(--ep-accent); color: #fff; }
.ep-bar { height: 6px; border-radius: 6px; background: var(--ep-soft); overflow: hidden; margin-bottom: 18px; }
.ep-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ep-accent), var(--ep-accent-2)); transition: width .3s; }
.ep-kicker { color: var(--ep-muted); font-size: 14px; margin: 0 0 10px; }
.ep-word { font-size: 30px; font-weight: 900; text-align: center; margin: 20px 0 24px; word-break: break-word; }
.ep-say { font-size: 24px; }
.ep-cloze { font-size: 20px; line-height: 1.5; font-weight: 700; margin: 12px 0; }
.ep-hint { color: var(--ep-muted); font-size: 13px; }
.ep-options { display: grid; gap: 10px; margin-top: 12px; }
.ep-opt {
  border: 2px solid var(--ep-border); background: var(--ep-surface); color: var(--ep-text);
  border-radius: 16px; padding: 14px 16px; font: inherit; font-size: 16px; font-weight: 700; text-align: left; cursor: pointer;
}
.ep-opt.ok { border-color: var(--ep-ok); background: rgba(22, 163, 74, .1); }
.ep-opt.bad { border-color: var(--ep-bad); background: rgba(220, 38, 38, .08); }
.ep-opt.picked { border-color: var(--ep-accent); }
.ep-feedback { margin-top: 12px; min-height: 22px; font-weight: 700; }
.ep-read { background: var(--ep-soft); border-radius: 14px; padding: 12px 14px; margin: 0 0 8px; cursor: pointer; line-height: 1.5; }
.ep-read-tr { display: block; color: var(--ep-muted); font-size: 14px; margin-top: 6px; }
.ep-read-tr[hidden] { display: none; }
.ep-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.ep-btn {
  border: 1px solid var(--ep-border); background: var(--ep-surface); color: var(--ep-text); text-decoration: none;
  border-radius: 14px; padding: 11px 16px; font: inherit; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.ep-btn-main { background: var(--ep-accent); border-color: var(--ep-accent); color: #fff; }
.ep-btn-ghost { background: transparent; }
.ep-btn:disabled { opacity: .6; cursor: default; }
.ep-finish { text-align: center; padding: 24px 0; }
.ep-finish-icon { font-size: 64px; }
.ep-finish h3 { margin: 8px 0; font-size: 24px; }
.ep-xp { font-size: 22px; font-weight: 900; color: var(--ep-accent); }
.ep-score { font-size: 34px; font-weight: 900; text-align: center; margin: 8px 0; }
.ep-ok-note { color: var(--ep-ok); font-weight: 700; }

/* ---- AI koç ---- */
.ac-text, .ac-input {
  width: 100%; box-sizing: border-box; border: 2px solid var(--ep-border); border-radius: 14px; padding: 12px;
  font: inherit; font-size: 16px; background: var(--ep-surface); color: var(--ep-text);
}
.ac-input { flex: 1; min-width: 0; width: auto; text-transform: uppercase; letter-spacing: 2px; }
.ac-score { font-size: 16px; margin: 12px 0; }
.ac-corrected { background: rgba(22, 163, 74, .08); border-radius: 12px; padding: 12px; line-height: 1.5; }
.ac-mistakes { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ac-mistakes li { background: var(--ep-soft); border-radius: 14px; padding: 12px; }
.ac-orig { color: var(--ep-bad); text-decoration: line-through; }
.ac-fix { color: var(--ep-ok); font-weight: 800; margin: 4px 0; }
.ac-rule { font-size: 14px; color: var(--ep-text); }
.ac-topic { margin-top: 8px; border: none; background: var(--ep-surface); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--ep-accent); }
.ac-pattern { border-left: 4px solid var(--ep-accent); padding: 4px 0 4px 12px; margin: 14px 0; }
.ac-pattern h4 { margin: 0 0 6px; }
.ac-ex { margin: 4px 0; font-size: 14px; }
.ac-summary, .ac-tip { font-weight: 600; }
.ac-loading { font-size: 48px; text-align: center; margin: 40px 0 12px; animation: epPulse 1.2s ease-in-out infinite; }
@keyframes epPulse { 50% { opacity: .35; transform: scale(.92); } }

/* ---- Telaffuz farkı ---- */
.speak-word-diff { margin: 10px 0; }
.spk-diff { line-height: 2.2; font-size: 17px; }
.spk-w { display: inline-flex; flex-direction: column; align-items: center; border-radius: 8px; padding: 0 6px; font-weight: 700; }
.spk-w small { font-size: 10px; font-weight: 600; line-height: 1; opacity: .85; }
.spk-ok { background: rgba(22, 163, 74, .14); color: var(--ep-ok); }
.spk-close { background: rgba(234, 88, 12, .14); color: var(--ep-warn); }
.spk-miss { background: rgba(220, 38, 38, .12); color: var(--ep-bad); text-decoration: underline wavy; }
.spk-diff-legend { font-size: 12px; color: var(--ep-muted); margin-top: 4px; }
.spk-diff-legend .spk-w { font-size: 11px; padding: 0 4px; }

/* ---- Düello ---- */
.duel-list { display: flex; flex-direction: column; gap: 8px; }
.duel-item {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: space-between;
  border: 1px solid var(--ep-border); background: var(--ep-surface); color: var(--ep-text);
  border-radius: 14px; padding: 12px; font: inherit; text-align: left; cursor: pointer;
}
.duel-item span { font-weight: 800; font-size: 13px; }
.duel-review { padding-left: 18px; line-height: 1.6; }
.duel-review li.ok { color: var(--ep-ok); }
.duel-review li.bad { color: var(--ep-bad); }

/* ---- Haftalık kart ---- */
.weekly-card-img { width: 100%; border-radius: 18px; box-shadow: 0 10px 30px rgba(15, 23, 42, .2); }

/* ---- Sezon ---- */
.season-frame { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 18px; border: 3px solid var(--ep-border); margin: 12px 0; font-size: 18px; }
.season-frame span { font-size: 40px; }
.season-badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.season-badge { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; border: 2px solid var(--ep-border); }
.season-badge span { font-size: 30px; }
.season-badge small { font-size: 11px; color: var(--ep-muted); }
.tier-bronze { border-color: #b45309; }
.tier-silver { border-color: #64748b; }
.tier-gold { border-color: #ca8a04; }
.tier-diamond { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, .15); }
.wb-lb-season { margin-left: 4px; font-size: 14px; }

/* ---- Hesap menüsü sade düzen (v1620) ---- */
.hesap-account-extra { padding: 12px; }
.hesap-account-extra .btn-placement-retake { width: 100%; margin: 0; }
.hesap-danger-zone { margin: 10px 0 4px; border: 1px solid rgba(220, 38, 38, .25); border-radius: 14px; padding: 4px 10px 10px; }
.hesap-danger-zone > summary { cursor: pointer; font-weight: 800; color: #dc2626; padding: 10px 2px; list-style-position: inside; }
.hesap-danger-zone .hesap-menu-card { margin-top: 8px; }
.admin-hub-tabs { margin: 4px 0 10px; }
#admin-panel-btn .hesap-menu-badge, #admin-panel-btn .push-menu-unread { margin-left: 6px; }

/* ---- Okuma kelime kartı: anında açılan sade görünüm (v1620) ---- */
.wa-quick { display: flex; flex-direction: column; gap: 12px; }
.wa-quick-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wa-quick-head .wa-focus-en { font-size: 26px; font-weight: 900; }
.wa-quick-lv { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #ede9fe; color: #6d28d9; }
.wa-quick-say { margin-left: auto; border: none; background: #f1f5f9; border-radius: 50%; width: 40px; height: 40px; font-size: 18px; cursor: pointer; }
.wa-quick-tr { font-size: 19px; font-weight: 700; color: #16a34a; }
.wa-quick-block { background: #f8fafc; border-radius: 14px; padding: 12px; }
.wa-quick-block .wa-hero-sentence-en { margin: 6px 0; line-height: 1.5; }
.wa-quick-ctx-tr, .wa-quick-ex-tr { color: #64748b; font-size: 14px; margin-top: 4px; }
.wa-link { border: none; background: none; color: #7c3aed; font-weight: 700; padding: 0; cursor: pointer; font-size: 13px; }
.wa-detail-btn { border: 1px dashed #c4b5fd; background: #faf5ff; color: #6d28d9; border-radius: 14px; padding: 12px; font-weight: 800; cursor: pointer; font-size: 14px; }
.wa-detail-btn small { font-weight: 600; opacity: .7; }
body.dark .wa-quick-block, body.dark .wa-quick-say { background: #1e293b; }
body.dark .wa-detail-btn { background: #1e1b4b; border-color: #4c1d95; color: #c4b5fd; }

/* ---- Kelime kartı: hazır örnek cümleler (v1622) ---- */
.wa-ex-list { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 8px; }
.wa-ex-list li { border-left: 3px solid #ddd6fe; padding: 2px 0 2px 10px; }
.wa-ex-en { font-size: 15px; line-height: 1.45; }
.wa-ex-tr { font-size: 13px; color: #64748b; margin-top: 2px; }
.wa-ex-badge { font-size: 11px; font-weight: 800; color: #6d28d9; white-space: nowrap; }
.wa-mark { background: #fef08a; color: inherit; border-radius: 4px; padding: 0 2px; }
.wa-topic-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.wa-topic-chip { border: 1px solid #c4b5fd; background: #fff; color: #6d28d9; border-radius: 999px; padding: 5px 10px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
body.dark .wa-topic-chip { background: #1e1b4b; border-color: #4c1d95; color: #c4b5fd; }
body.dark .wa-mark { background: #854d0e; }

/* ---- AI Speak tam ekran sohbet + öneriler + geçmiş (v1628) ---- */
html.sac-open, html.sac-open body { overflow: hidden; }
.sac-modal { position: fixed; inset: 0; z-index: 8500; background: rgba(15, 23, 42, .5); display: flex; align-items: stretch; justify-content: center; }
.sac-modal[hidden] { display: none; }
.sac-panel {
  background: var(--ep-soft); color: var(--ep-text); width: 100%; max-width: 640px; height: 100%;
  display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px);
}
@media (min-width: 700px) { .sac-modal { align-items: center; } .sac-panel { height: 92vh; border-radius: 24px; overflow: hidden; } }
.sac-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--ep-surface); border-bottom: 1px solid var(--ep-border); }
.sac-head-copy { flex: 1; min-width: 0; }
.sac-title { font-weight: 900; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sac-sub { font-size: 12px; color: var(--ep-muted); }
.sac-close { border: none; background: var(--ep-soft); color: var(--ep-text); width: 40px; height: 40px; border-radius: 50%; font-size: 18px; cursor: pointer; flex: none; }
.sac-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 12px 12px 4px; }
.sac-body .speak-chat-thread { flex: 1; max-height: none; min-height: 0; overflow-y: auto; }
.sac-foot { background: var(--ep-surface); border-top: 1px solid var(--ep-border); padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 6px; }
.sac-foot .speak-status { margin: 0; font-size: 12px; padding: 4px 8px; min-height: 0; }
.sac-foot .speak-actions-ai { display: grid; grid-template-columns: 1fr 1fr 2.4fr 1fr 1fr; gap: 6px; margin: 0; }
.sac-foot .speak-actions-ai .speak-btn-main { min-height: 50px; height: auto; padding: 4px 2px; font-size: 14px; border-radius: 14px; }
.sac-foot .sac-mini { flex-direction: column; gap: 1px; font-size: 18px; line-height: 1; }
.sac-foot .sac-mini small { font-size: 10px; font-weight: 800; }
.sac-foot #speak-ai-replay-btn { order: 1; } .sac-foot #speak-ai-stop-btn { order: 2; } .sac-foot #speak-ai-reset-btn { order: 4; } .sac-foot #speak-ai-summary-btn { order: 5; }
.sac-foot #speak-ai-record-btn { order: 3; font-size: 16px; }
.sac-suggest { display: flex; flex-direction: column; gap: 5px; max-height: 30vh; overflow-y: auto; }
.sac-suggest[hidden] { display: none; }
.sac-suggest-head { font-size: 12.5px; font-weight: 800; color: var(--ep-muted); }
.sac-suggest-head small { font-weight: 600; margin-left: 4px; }
.sac-sug { display: flex; gap: 6px; align-items: stretch; }
.sac-sug-main {
  flex: 1; min-width: 0; text-align: left; border: 1px solid var(--ep-border); background: var(--ep-soft); color: var(--ep-text);
  border-radius: 12px; padding: 6px 10px; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 1px;
}
.sac-sug-en { font-weight: 700; font-size: 13.5px; }
.sac-sug-tr { font-size: 12px; color: var(--ep-muted); }
.sac-sug-use { flex: none; width: 40px; border: none; border-radius: 12px; background: linear-gradient(135deg, #1f7a8c, #103957); color: #fff; font-size: 16px; cursor: pointer; }
.speak-bubble.has-tr { cursor: pointer; }
.speak-bubble-tr-btn { display: block; margin-top: 6px; border: none; background: none; padding: 0; color: #1f7a8c; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.speak-bubble-tr { display: block; margin-top: 4px; font-size: 13px; color: #475569; }
.speak-bubble-user .speak-bubble-tr { color: rgba(255, 255, 255, .8); }
.speak-bubble-tr[hidden] { display: none; }
.speak-ai-hint-en { font-weight: 800; }
.speak-ai-hint-tr { display: block; margin-top: 3px; font-weight: 600; opacity: .85; }
.speak-ai-hint-pron { cursor: pointer; }
.sac-history { margin-top: 14px; background: var(--ep-surface); border: 1px solid var(--ep-border); border-radius: 18px; padding: 12px; }
.sac-history-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sac-history-clear { border: none; background: none; color: var(--ep-muted); font: inherit; font-size: 12.5px; cursor: pointer; }
.sac-history-empty { margin: 0; font-size: 13px; color: var(--ep-muted); }
.sac-history-list { display: flex; flex-direction: column; gap: 6px; }
.sac-history-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid var(--ep-border);
  background: var(--ep-soft); color: var(--ep-text); border-radius: 14px; padding: 10px 12px; cursor: pointer; font: inherit;
}
.sac-history-icon { font-size: 22px; }
.sac-history-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sac-history-copy b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sac-history-copy small { color: var(--ep-muted); font-size: 12px; }
.sac-history-go { color: var(--ep-muted); font-size: 20px; }
.sac-transcript { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 16px; }
.sac-transcript .speak-bubble { animation: none; }
.sac-fix { align-self: flex-start; max-width: 92%; }
body.dark .speak-bubble-tr { color: #94a3b8; }
/* #screen-speak dışına taşınan AI tuşları için aynı görünüm */
.sac-foot .speak-btn-main { border: 1px solid #dbe7f8; background: #fff; color: #334155; font-weight: 900; display: flex; align-items: center; justify-content: center; gap: 6px; box-shadow: 0 4px 12px rgba(15, 23, 42, .08); cursor: pointer; font-family: inherit; }
.sac-foot .speak-btn-main:disabled { opacity: .5; box-shadow: none; }
.sac-foot .speak-btn-listen { background: #fff; color: #0f172a; }
.sac-foot .speak-btn-record { background: linear-gradient(135deg, #ef4444, #f97316); color: #fff; border: none; }
.sac-foot .speak-btn-stop { background: #0f172a; color: #fff; border: none; }
.sac-foot .speak-btn-next { background: linear-gradient(135deg, var(--brand-0), var(--brand-1)); color: #fff; border: none; }
/* Yazma Koçu geçmişi (v1631) */
.ac-history { margin-top: 18px; border-top: 1px solid var(--ep-border); padding-top: 6px; }
.ac-history-head { display: flex; align-items: center; justify-content: space-between; }
.ac-history-clear { border: none; background: none; color: var(--ep-muted); font: inherit; font-size: 12.5px; cursor: pointer; }
.ac-history-item {
  display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; margin-bottom: 6px;
  border: 1px solid var(--ep-border); background: var(--ep-soft); color: var(--ep-text); border-radius: 14px; padding: 10px 12px; cursor: pointer; font: inherit;
}
.ac-history-text { font-size: 14px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ac-history-item small { color: var(--ep-muted); font-size: 12px; }
.ac-orig-text { background: var(--ep-soft); border-radius: 12px; padding: 10px 12px; white-space: pre-wrap; }
.ac-history-detail { margin-top: 8px; }
/* Yazma Koçu: düzeltilmiş metne dokun → Türkçesi (v1633) */
.ac-corrected { cursor: pointer; }
.ac-corrected-toggle { display: block; margin-top: 6px; font-size: 12px; font-weight: 700; color: #1f7a8c; }
.ac-corrected-tr { display: block; margin-top: 4px; font-size: 13.5px; color: var(--ep-muted); }
.ac-corrected-tr[hidden] { display: none; }
