/* ==========================================================================
   AMUORA — بخش‌های تازه‌ی یادگیری (Learn Lab، مربی گفتگو، نوشتن، شنیدن،
   داستان‌ها، اصطلاحات، Pro). روی css/amu-ui.css ساخته شده است.
   ========================================================================== */
body { background: var(--amu-bg, #f3f7fd); }
.ln-page { max-width: 1120px; }
.ln-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ln-spacer { flex: 1 1 auto; }
.ln-muted { color: var(--amu-muted); }
.ln-small { font-size: 13px; }
.ln-hidden, [hidden] { display: none !important; }

/* ---------- برچسب‌ها ---------- */
.ln-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: .2px; }
.ln-tag-free { background: #e7f8ef; color: #11743b; }
.ln-tag-pro { background: linear-gradient(135deg, #fde68a, #fbbf24); color: #6b4300; }
.ln-tag-limit { background: #eef4ff; color: #1d4ed8; }
.ln-tag-new { background: #fde2e2; color: #b42318; }
.ln-pro-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 13px; text-decoration: none;
    background: linear-gradient(135deg, #fde68a, #fbbf24); color: #6b4300; box-shadow: 0 6px 16px rgba(251, 191, 36, .35); }
.ln-quota { font-size: 12.5px; font-weight: 700; color: var(--amu-muted); }
.ln-quota b { color: var(--amu-navy); }

/* ---------- کارت‌ها و شبکه ---------- */
.ln-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.ln-tile { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 22px; background: #fff; box-shadow: var(--amu-shadow);
    text-decoration: none; color: var(--amu-ink); transition: transform .18s ease, box-shadow .18s ease; overflow: hidden; }
.ln-tile:hover { transform: translateY(-4px); box-shadow: 0 22px 44px rgba(15, 42, 90, .16); }
.ln-tile .ic { width: 52px; height: 52px; display: grid; place-items: center; font-size: 28px; border-radius: 16px; background: var(--g, linear-gradient(135deg, #e0ecff, #f3f7fd)); }
.ln-tile h3 { margin: 4px 0 0; font-size: 17px; color: var(--amu-navy); }
.ln-tile p { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--amu-muted); }
.ln-tile .ln-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }

/* ---------- برنامه‌ی روزانه ---------- */
.ln-plan { display: grid; gap: 10px; }
.ln-step { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: #f7faff; border: 1px solid var(--amu-line); text-decoration: none; color: var(--amu-ink); transition: background .2s; }
.ln-step:hover { background: #eef5ff; }
.ln-step .chk { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 2px solid #b8c7e0; font-weight: 900; color: #fff; }
.ln-step.done .chk { background: var(--amu-green); border-color: var(--amu-green); }
.ln-step.done .tt { text-decoration: line-through; opacity: .65; }
.ln-step .tt { font-weight: 700; }
.ln-step .mins { margin-inline-start: auto; font-size: 12px; font-weight: 700; color: var(--amu-muted); white-space: nowrap; }
.ln-plan-bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .25); overflow: hidden; margin-top: 12px; }
.ln-plan-bar i { display: block; height: 100%; background: var(--amu-yellow); border-radius: inherit; transition: width .8s ease; }

/* ---------- قفل Pro ---------- */
.pro-lock { text-align: center; padding: 26px 18px; border-radius: 22px; background: linear-gradient(160deg, #fffbeb, #fff); border: 2px dashed #fbbf24; }
.pro-lock-icon { font-size: 46px; }
.pro-lock h3 { margin: 6px 0; color: var(--amu-navy); }
.pro-lock p { margin: 0 0 14px; color: var(--amu-muted); line-height: 1.7; }

/* ---------- چیپ‌های انتخاب ---------- */
.ln-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ln-chip { border: 1.5px solid var(--amu-line); background: #fff; color: var(--amu-ink); padding: 8px 14px; border-radius: 999px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .15s; }
.ln-chip:hover { border-color: var(--amu-blue); }
.ln-chip.on { background: var(--amu-navy); border-color: var(--amu-navy); color: #fff; }
.ln-select, .ln-input, .ln-textarea { width: 100%; box-sizing: border-box; border: 1.5px solid var(--amu-line); border-radius: 14px; padding: 11px 14px; font: inherit; font-size: 15px; background: #fff; color: var(--amu-ink); }
.ln-select { width: auto; }
.ln-input:focus, .ln-textarea:focus, .ln-select:focus { outline: none; border-color: var(--amu-blue); box-shadow: 0 0 0 4px rgba(4, 113, 214, .12); }
.ln-textarea { min-height: 220px; resize: vertical; line-height: 1.75; }

/* ---------- گفتگو ---------- */
.tu-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.tu-chat { display: flex; flex-direction: column; height: min(72vh, 720px); min-height: 460px; background: #fff; border-radius: 24px; box-shadow: var(--amu-shadow); overflow: hidden; }
.tu-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--amu-line); background: linear-gradient(135deg, #f7faff, #fff); }
.tu-avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: linear-gradient(135deg, var(--amu-teal), var(--amu-blue)); color: #fff; flex: 0 0 auto; }
.tu-log { flex: 1 1 auto; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.tu-msg { max-width: 82%; padding: 11px 14px; border-radius: 18px; line-height: 1.6; font-size: 15px; word-wrap: break-word; animation: tuIn .25s ease; }
@keyframes tuIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tu-msg.ai { align-self: flex-start; background: #f1f5fb; border-end-start-radius: 6px; }
.tu-msg.me { align-self: flex-end; background: var(--amu-navy); color: #fff; border-end-end-radius: 6px; }
.tu-msg .tu-say { border: 0; background: none; cursor: pointer; font-size: 15px; padding: 0 0 0 6px; opacity: .7; }
.tu-fix { align-self: flex-end; max-width: 86%; padding: 10px 12px; border-radius: 14px; background: #fff7e6; border: 1px solid #fde3a7; font-size: 13.5px; line-height: 1.6; }
.tu-fix del { color: #b42318; margin-inline-end: 4px; }
.wc-text del { margin-inline-end: 3px; }
.tu-side .ln-select { padding: 7px 10px; font-size: 14px; }
.tu-fix ins { color: #11743b; text-decoration: none; font-weight: 700; }
.tu-fix.good { background: #ecfdf3; border-color: #b7ebc9; }
.tu-better { display: block; margin-top: 4px; color: #1d4ed8; }
.tu-words { display: flex; gap: 6px; flex-wrap: wrap; align-self: flex-start; }
.tu-word { border: 1px dashed #93b4e6; background: #f5f9ff; border-radius: 10px; padding: 4px 9px; font-size: 12.5px; cursor: pointer; }
.tu-typing { align-self: flex-start; display: flex; gap: 4px; padding: 14px; border-radius: 18px; background: #f1f5fb; }
.tu-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9db0cf; animation: tuDot 1s infinite; }
.tu-typing i:nth-child(2) { animation-delay: .15s; } .tu-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tuDot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
.tu-bar { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--amu-line); align-items: flex-end; }
.tu-bar textarea { flex: 1 1 auto; resize: none; min-height: 46px; max-height: 140px; border: 1.5px solid var(--amu-line); border-radius: 16px; padding: 11px 14px; font: inherit; font-size: 15px; }
.tu-mic, .tu-send { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; font-size: 20px; display: grid; place-items: center; }
.tu-mic { background: #eef4ff; }
.tu-mic.rec { background: var(--amu-red); color: #fff; animation: tuPulse 1.2s infinite; }
@keyframes tuPulse { 0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .45); } 100% { box-shadow: 0 0 0 16px rgba(220, 38, 38, 0); } }
.tu-send { background: var(--amu-blue); color: #fff; }
.tu-send:disabled { opacity: .5; cursor: default; }
.tu-side .amu-card + .amu-card { margin-top: 14px; }
.tu-switch { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
@media (max-width: 860px) { .tu-wrap { grid-template-columns: 1fr; } .tu-chat { height: 70vh; } }

/* ---------- نوشتن ---------- */
.wc-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .wc-wrap { grid-template-columns: 1fr; } }
.wc-score { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.wc-ring { position: relative; width: 104px; height: 104px; flex: 0 0 auto; }
.wc-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.wc-ring circle { fill: none; stroke-width: 10; }
.wc-ring .bg { stroke: #e6edf8; }
.wc-ring .fg { stroke: var(--amu-green); stroke-linecap: round; transition: stroke-dashoffset 1s ease; }
.wc-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; color: var(--amu-navy); }
.wc-level { font-size: 34px; font-weight: 900; color: var(--amu-blue); }
.wc-bars { display: grid; gap: 7px; flex: 1 1 200px; }
.wc-bar { display: grid; grid-template-columns: 96px 1fr 34px; gap: 8px; align-items: center; font-size: 12.5px; font-weight: 700; color: var(--amu-muted); }
.wc-bar em { font-style: normal; }
.wc-bar span { height: 8px; border-radius: 999px; background: #e6edf8; overflow: hidden; }
.wc-bar span i { display: block; height: 100%; background: linear-gradient(90deg, var(--amu-teal), var(--amu-blue)); border-radius: inherit; }
.wc-text { line-height: 1.9; font-size: 15px; white-space: pre-wrap; }
.wc-text del, .dx-del { background: #fde8e8; color: #b42318; border-radius: 4px; padding: 0 2px; }
.wc-text ins, .dx-ins { background: #e3f7ea; color: #11743b; text-decoration: none; border-radius: 4px; padding: 0 2px; font-weight: 600; }
.wc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wc-list li { padding: 10px 12px; border-radius: 14px; background: #f7faff; border: 1px solid var(--amu-line); font-size: 14px; line-height: 1.6; }
.wc-type { font-size: 11px; font-weight: 800; text-transform: uppercase; color: #7c3aed; letter-spacing: .4px; }
.wc-tabs { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }

/* ---------- شنیدن ---------- */
.ls-stage { text-align: center; padding: 26px 18px; }
.ls-play { width: 92px; height: 92px; border-radius: 50%; border: 0; cursor: pointer; font-size: 38px; color: #fff;
    background: linear-gradient(135deg, var(--amu-teal), var(--amu-blue)); box-shadow: 0 16px 36px rgba(4, 113, 214, .35); transition: transform .15s; }
.ls-play:active { transform: scale(.94); }
.ls-play.big-mic { background: linear-gradient(135deg, #f97316, #dc2626); box-shadow: 0 16px 36px rgba(220, 38, 38, .3); }
.ls-play.rec { animation: tuPulse 1.2s infinite; }
.ls-sentence { font-size: clamp(20px, 3.2vw, 28px); font-weight: 700; color: var(--amu-navy); line-height: 1.5; margin: 18px auto; max-width: 760px; }
.ls-result { font-size: 19px; line-height: 1.9; margin: 14px auto; max-width: 760px; }
.ls-result .ok { color: #11743b; font-weight: 700; }
.ls-result .bad { color: #b42318; text-decoration: line-through; }
.ls-result .miss { color: #b45309; border-bottom: 2px dashed #f59e0b; font-weight: 700; }
.ls-dots { display: flex; gap: 6px; justify-content: center; margin: 4px 0 14px; }
.ls-dots i { width: 10px; height: 10px; border-radius: 50%; background: #dbe5f3; }
.ls-dots i.cur { background: var(--amu-blue); transform: scale(1.3); }
.ls-dots i.good { background: var(--amu-green); }
.ls-dots i.mid { background: #f59e0b; }
.ls-dots i.low { background: var(--amu-red); }
.ls-score { font-size: 46px; font-weight: 900; }

/* ---------- داستان ---------- */
.st-reader { font-size: 19px; line-height: 2; color: #1b2c4a; }
.st-reader p { margin: 0 0 18px; }
.st-w { cursor: pointer; border-radius: 4px; transition: background .15s; }
.st-w:hover { background: #fff3c4; }
.st-w.gl { border-bottom: 2px dotted #7c3aed; }
.st-w.speaking { background: #fde68a; }
.st-pop { position: fixed; z-index: 9999; width: min(320px, calc(100vw - 24px)); background: #fff; border-radius: 18px; box-shadow: var(--amu-shadow-lg); padding: 14px 16px; animation: tuIn .18s ease; }
.st-pop h4 { margin: 0; font-size: 20px; color: var(--amu-navy); display: flex; align-items: center; gap: 8px; }
.st-pop .ipa { color: var(--amu-muted); font-size: 14px; }
.st-pop p { margin: 8px 0; font-size: 14px; line-height: 1.6; }
.st-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 20px; background: #fff; box-shadow: var(--amu-shadow); text-decoration: none; color: var(--amu-ink); transition: transform .18s; }
.st-card:hover { transform: translateY(-3px); }
.st-card .em { font-size: 40px; }
.st-card h3 { margin: 0; font-size: 16.5px; color: var(--amu-navy); line-height: 1.35; }
.st-q { padding: 14px; border-radius: 16px; background: #f7faff; margin-bottom: 10px; }
.st-q b { display: block; margin-bottom: 8px; }
.st-opt { display: block; width: 100%; text-align: start; margin: 6px 0; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--amu-line); background: #fff; font: inherit; cursor: pointer; }
.st-opt.ok { border-color: var(--amu-green); background: #ecfdf3; }
.st-opt.bad { border-color: var(--amu-red); background: #fef2f2; }

/* ---------- اصطلاحات ---------- */
.ex-card { perspective: 1200px; max-width: 560px; margin: 0 auto; height: 300px; cursor: pointer; }
.ex-inner { position: relative; width: 100%; height: 100%; transition: transform .6s cubic-bezier(.2, .8, .2, 1); transform-style: preserve-3d; }
.ex-card.flip .ex-inner { transform: rotateY(180deg); }
.ex-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 22px; text-align: center; box-shadow: var(--amu-shadow); }
.ex-front { background: linear-gradient(135deg, var(--amu-navy), var(--amu-blue)); color: #fff; }
.ex-front .ph { font-size: clamp(26px, 5vw, 38px); font-weight: 800; }
.ex-back { background: #fff; transform: rotateY(180deg); }
.ex-back .mn { font-size: 20px; font-weight: 700; color: var(--amu-navy); line-height: 1.5; }
.ex-back .eg { margin-top: 12px; font-size: 16px; color: var(--amu-muted); font-style: italic; line-height: 1.6; }
.ex-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.ex-item { padding: 14px; border-radius: 18px; background: #fff; box-shadow: var(--amu-shadow); }
.ex-item b { color: var(--amu-navy); font-size: 16px; }
.ex-item p { margin: 6px 0 0; font-size: 14px; line-height: 1.6; }
.ex-item .eg { color: var(--amu-muted); font-style: italic; }

/* ---------- قیمت‌ها ---------- */
.pr-plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.pr-plan { position: relative; padding: 24px 20px; border-radius: 26px; background: #fff; box-shadow: var(--amu-shadow); text-align: center; border: 2px solid transparent; }
.pr-plan.best { border-color: #fbbf24; transform: translateY(-6px); box-shadow: 0 26px 60px rgba(251, 191, 36, .25); }
.pr-plan .flag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); padding: 4px 14px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #fbbf24; color: #5a3800; white-space: nowrap; }
.pr-plan .price { font-size: 40px; font-weight: 900; color: var(--amu-navy); margin: 8px 0 0; }
.pr-plan .per { color: var(--amu-muted); font-size: 13px; }
.pr-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: var(--amu-shadow); }
.pr-table th, .pr-table td { padding: 12px 14px; border-bottom: 1px solid var(--amu-line); text-align: start; font-size: 14px; }
.pr-table th { background: #f7faff; color: var(--amu-navy); }
.pr-table td.c { text-align: center; font-weight: 700; white-space: nowrap; }
.pr-table tr:last-child td { border-bottom: 0; }

/* ---------- گواهی ---------- */
.ce-sheet { position: relative; max-width: 900px; margin: 0 auto; aspect-ratio: 1.414; background: #fffdf7; border-radius: 10px; box-shadow: var(--amu-shadow-lg); padding: 5%; box-sizing: border-box; overflow: hidden; text-align: center; color: #1b2c4a; }
.ce-sheet::before { content: ''; position: absolute; inset: 2.2%; border: 3px double #c9a227; border-radius: 6px; pointer-events: none; }
.ce-sheet .ce-brand { font-weight: 900; letter-spacing: 6px; color: var(--amu-navy); font-size: clamp(14px, 2vw, 20px); }
.ce-sheet .ce-title { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(22px, 4.4vw, 46px); margin: 3% 0 1%; color: #8a6d12; }
.ce-sheet .ce-name { font-family: Georgia, serif; font-size: clamp(24px, 5vw, 52px); font-weight: 700; color: var(--amu-navy); border-bottom: 2px solid #e8dcb0; display: inline-block; padding: 0 4% 1%; margin: 2% 0; }
.ce-sheet .ce-level { display: inline-grid; place-items: center; width: clamp(70px, 13vw, 130px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #fde68a, #c9a227); color: #3d2c00; font-size: clamp(22px, 4.5vw, 44px); font-weight: 900; box-shadow: 0 10px 24px rgba(201, 162, 39, .4); }
.ce-stats { display: flex; justify-content: center; gap: 6%; margin-top: 3%; font-size: clamp(11px, 1.6vw, 15px); }
.ce-stats b { display: block; font-size: clamp(16px, 2.6vw, 26px); color: var(--amu-navy); }
.ce-foot { position: absolute; left: 6%; right: 6%; bottom: 6%; display: flex; justify-content: space-between; font-size: clamp(9px, 1.3vw, 12.5px); color: #6b7a93; }
@media print {
    body * { visibility: hidden !important; }
    .ce-sheet, .ce-sheet * { visibility: visible !important; }
    .ce-sheet { position: fixed; inset: 0; margin: 0; box-shadow: none; max-width: none; width: 100%; }
    @page { size: A4 landscape; margin: 0; }
}
