/* Остальные экраны в новом стиле: беседы, урок и практика, контекст,
   прогресс, отзывы, наборы слов, модальные окна и вход. Токены — из
   today.css. Общие блоки страницы: .page, .page-head, .panel, кнопки
   .ui-primary/.ui-secondary; экраны на старой разметке (.topbar, .btn)
   приводятся к тем же размерам и цветам здесь. */
.page{max-width:860px;margin:0 auto;display:flex;flex-direction:column;gap:24px;color:var(--text)}
.page-head{display:flex;flex-direction:column;gap:8px}
.page-head h1{margin:0;font:700 clamp(28px,3vw,36px) 'Golos Text',sans-serif;letter-spacing:-.8px;color:var(--text)}
.page-head p{margin:0;font-size:16px;line-height:1.5;color:var(--text-muted);max-width:640px}
.page-back{align-self:flex-start;padding:0;background:none;color:var(--accent);font-size:14px;font-weight:600}
.page-empty{margin:0;font-size:15px;color:var(--text-muted)}
.panel{background:var(--surface);border-radius:24px;padding:24px;box-shadow:0 1px 2px rgba(22,24,29,.06);color:var(--text)}
.ui-primary,.ui-secondary{min-height:48px;padding:0 20px;border-radius:14px;font-size:15px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.ui-primary{background:var(--inverse);color:var(--inverse-ink)}
.ui-secondary{background:var(--surface);color:var(--text);border:1px solid var(--rule)}
.ui-primary:disabled,.ui-secondary:disabled{opacity:.5;cursor:default}
.ui-primary i{width:18px}

/* Контекст */
#context .context-card{display:flex;flex-direction:column;gap:12px;border:0}
#context .context-card h2{margin:0;font-size:20px;font-weight:600}
#context .context-card>p{margin:0;font-size:15px;line-height:1.55;color:var(--text-muted)}
#context .context-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;margin-top:8px}
#context .context-field{display:flex;flex-direction:column;gap:6px}
#context .context-field label{font-size:14px;font-weight:600;color:var(--text)}
#context .context-field input{height:48px;padding:0 14px;border:1px solid var(--rule);border-radius:12px;background:var(--surface);color:var(--text);font-size:15px}
#context .context-field small{font-size:13px;color:var(--text-muted)}
#context .context-tags{display:flex;gap:6px;flex-wrap:wrap}
#context .context-tags span{padding:6px 12px;border-radius:16px;background:var(--accent-soft);color:var(--text);font-size:14px}
#context .context-consent{display:flex;gap:10px;align-items:flex-start;margin:20px 0;padding:16px;border-radius:16px;background:var(--surface-2);color:var(--text);font-size:14px;line-height:1.5}
#context .context-save{align-self:flex-start}

/* Наборы слов */
#word-sets .word-sets-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}
#word-sets .word-set-card{display:flex;flex-direction:column;gap:8px;padding:22px;border:0;border-radius:22px;background:var(--surface);box-shadow:0 1px 2px rgba(22,24,29,.06);text-align:left;color:var(--text)}
#word-sets .word-set-icon{font-size:28px;margin:0}
#word-sets .word-set-card h3{margin:0;font-size:17px;font-weight:600}
#word-sets .word-set-progress{margin:0 0 6px;font-size:14px;color:var(--text-muted)}
#word-sets .word-set-card button{width:100%;margin-top:auto}

/* Модальные окна: новое слово, языки, вопрос коучу из практики */
.ui-modal,.practice-coach{position:fixed;inset:0;z-index:46;display:grid;place-items:center;padding:16px;background:rgba(15,17,21,.5)}
.practice-coach{display:none}
.practice-coach.open{display:grid}
.ui-modal-card,.coach-modal{position:relative;width:min(100%,460px);display:flex;flex-direction:column;gap:12px;padding:28px;border-radius:24px;background:var(--surface);color:var(--text);box-shadow:0 24px 70px rgba(15,17,21,.3)}
.ui-modal-card h2,.coach-modal h2{margin:0!important;font-size:24px;font-weight:700;letter-spacing:-.4px}
.coach-modal p{margin:0!important;font-size:14px!important;color:var(--text-muted)!important}
.ui-modal-close,.coach-modal .drawer-close{position:absolute;top:16px;right:16px;width:36px;height:36px;border-radius:18px;background:var(--surface-2);color:var(--text-muted)}
.coach-modal .ai-orb{display:none}
.ui-modal-card input,.coach-modal textarea{width:100%;min-height:48px;margin:0;padding:12px 14px;border:1px solid var(--rule);border-radius:12px;background:var(--surface);color:var(--text);font:15px 'Golos Text',sans-serif}
.coach-modal textarea{height:110px;resize:vertical}
.coach-modal .btn{min-height:48px;border-radius:14px;background:var(--inverse)!important;color:var(--inverse-ink)!important;font-weight:600}
.coach-answer{font-size:15px;line-height:1.55}
.translation-suggestions{display:flex;flex-wrap:wrap;gap:6px;min-height:4px;font-size:13px;color:var(--text-muted)}
.translation-suggestions button{min-height:32px;padding:0 12px;border-radius:16px;background:var(--accent-soft);color:var(--text);font-size:13px;font-weight:500}
.quick-add-status{margin:0;min-height:20px;font-size:14px;color:var(--text-muted)}
.language-list{display:flex;flex-direction:column;gap:8px}
.language-list button{display:flex;justify-content:space-between;align-items:center;min-height:52px;padding:0 16px;border:1px solid var(--rule);border-radius:14px;background:var(--surface);color:var(--text);font-size:15px;font-weight:500;text-align:left}
.language-list button.active{border-color:var(--text)}
.language-list small{font-size:13px;color:var(--text-muted)}
.language-add{display:flex;gap:8px;flex-wrap:wrap}

/* Вход и регистрация */
.auth-gate{background:var(--ground)}
.auth-card{display:flex;flex-direction:column;background:var(--surface);color:var(--text);border-radius:28px;box-shadow:0 1px 2px rgba(22,24,29,.06),0 24px 60px rgba(22,24,29,.08)}
.auth-brand{display:flex;align-items:center;gap:10px;font:700 18px 'Golos Text',sans-serif;color:var(--text);margin-bottom:24px}
.auth-brand span{background:var(--accent);color:var(--inverse-ink)}
.auth-card .eyebrow{font:600 12px 'Golos Text',sans-serif;letter-spacing:.4px;color:var(--accent)}
.auth-card h1{font:700 30px 'Golos Text',sans-serif;letter-spacing:-.6px;margin:6px 0 8px;color:var(--text)}
.auth-card p{color:var(--text-muted)}
.auth-card label{font:600 13px 'Golos Text',sans-serif;color:var(--text)}
.auth-card input,.auth-card select{height:48px;border-color:var(--rule);border-radius:12px;background:var(--surface);color:var(--text);font:15px 'Golos Text',sans-serif}
.auth-card .auth-submit{min-height:52px;border-radius:14px;background:var(--inverse);color:var(--inverse-ink);font-weight:600}
.auth-switch{color:var(--accent);font-weight:600}
.auth-login-note{background:var(--accent-soft);color:var(--text);font-size:13px}
.auth-error{color:var(--risk-text);font-size:14px}

/* Экраны на старой разметке: заголовок .topbar и кнопки .btn */
.screen .topbar{margin-bottom:24px;gap:16px}
.screen .topbar h1{margin:4px 0 0;font:700 clamp(28px,3vw,36px) 'Golos Text',sans-serif;letter-spacing:-.8px;line-height:1.15;color:var(--text)}
.screen .eyebrow,.eyebrow{font:600 12px 'Golos Text',sans-serif;letter-spacing:.4px;text-transform:uppercase;color:var(--text-muted)}
.btn{min-height:44px;padding:0 18px;border-radius:12px;font:600 15px 'Golos Text',sans-serif;box-shadow:none;transition:background .15s,border-color .15s}
.btn-primary,.screen .btn-primary{background:var(--inverse);color:var(--inverse-ink)}
.btn-primary:hover{transform:none;box-shadow:none;opacity:.9}
.btn:disabled{opacity:.5;cursor:default}
.section-title{font-weight:600;letter-spacing:-.2px}

/* Беседы */
#chat .chat-layout{border:0;border-radius:24px;background:var(--surface);box-shadow:var(--lift);height:calc(100vh - 210px);min-height:460px}
#chat .chat-history{background:var(--surface-2);border-right:1px solid var(--rule)}
#chat .chat-history h3{font-size:12px;font-weight:600;letter-spacing:.4px;text-transform:uppercase;color:var(--text-muted)}
#chat .chat-new{width:100%}
#chat .chat-main{background:var(--surface)}
#chatView .message{font-size:15px;line-height:1.55;border-radius:18px}
#chatView .message.user{background:var(--inverse);color:var(--inverse-ink);border-bottom-right-radius:6px}
#chatView .message.bot{background:var(--surface-2);color:var(--text);border-bottom-left-radius:6px}
#chatView .quick-actions button{min-height:34px;padding:0 12px;border-radius:17px;border:1px solid var(--rule);background:var(--surface);color:var(--text);font-size:13px;font-weight:500}
#chatView .chat-input{padding:6px;border:1px solid var(--rule);border-radius:16px;background:var(--surface);align-items:flex-end}
#chatView .chat-input textarea{border:0;background:transparent;color:var(--text);font:16px 'Golos Text',sans-serif;outline:none}
#chatView .chat-input .send{width:44px;height:44px;border-radius:12px;background:var(--inverse);color:var(--inverse-ink);display:grid;place-items:center}
#chatView .chat-input .mic,#chatView .chat-input .dictation-lang{height:44px;border-radius:12px;background:var(--surface-2);color:var(--text)}

/* Прогресс и отзывы */
.metric,.chart-card,.skills-card{border:0;border-radius:22px;background:var(--surface);box-shadow:var(--lift)}
.metric b{font:700 30px 'Golos Text',sans-serif;letter-spacing:-.6px;color:var(--text)}
.metric span{font-size:13px;color:var(--text-muted)}

/* Старые шрифты (Playfair Display, DM Mono, Manrope) в карточках урока,
   практике, отзывах и напоминаниях — на Golos, как во всём новом дизайне. */
.card-back .back-term,.example b,.exercise-card h2,.forms,.option-key,.phonetic,.pill,.practice-summary h2,.recall-input input,.recall-next kbd,.reminders-card h2,.reminders-row input[type=time],.shelf-card b,.study-complete h2,.translation,.word,.word-type,.mode-switch button,.feedback-form textarea,.feedback-note-input,#chatView .chat-input .dictation-lang{font-family:'Golos Text',sans-serif}
.word,.exercise-card h2,.practice-summary h2,.study-complete h2,.reminders-card h2,.translation{letter-spacing:-.6px}
.exercise-card{border:0;border-radius:24px;box-shadow:var(--lift)}
.context-save,#context .context-save{background:var(--inverse);color:var(--inverse-ink)}

#exercise .matching-grid button,body.dark #exercise .matching-grid button{border:1px solid var(--rule);background:var(--surface);color:var(--text)}
body.dark #chat .chat-history .chat-new{background:var(--inverse)!important;color:var(--inverse-ink)!important}
#chat .chat-history .chat-new{background:var(--inverse);color:var(--inverse-ink)}
#chat .chat-list-toggle{min-height:36px;padding:0 14px;border:1px solid var(--rule);background:var(--surface);color:var(--text)}

/* Старое правило `body.dark button{color:var(--ink)}` (theme.css) сильнее
   одиночного класса — возвращаем цвета кнопкам этих экранов. */
body.dark .ui-primary,body.dark .auth-card .auth-submit,body.dark .context-save,body.dark .btn-primary,body.dark #chatView .message.user,body.dark #chatView .chat-input .send{color:var(--inverse-ink)}
body.dark #chat .chat-layout,body.dark #chat .chat-main{background:var(--surface)}
body.dark #chat .chat-history{background:var(--surface-2)}
body.dark #chatView .message.bot{background:var(--surface-2);color:var(--text)}
body.dark .page-back,body.dark .auth-switch{color:var(--accent)}
body.dark .ui-modal-close,body.dark .coach-modal .drawer-close{color:var(--text-muted)}
body.dark .auth-card,body.dark .auth-card input,body.dark .auth-card select{background:var(--surface);color:var(--text)}
body.dark .auth-brand,body.dark .auth-card label{color:var(--text)}
body.dark .auth-card p{color:var(--text-muted)}

@media(max-width:800px){
  .page{gap:18px}
  .panel{padding:18px}
  .auth-card{padding:24px}
}
