/* Репетиторы (POTOK 29). Окно-страница на весь экран, не зависит от общих правил .modal-overlay */
.tt-overlay { position: fixed; inset: 0; z-index: 6000; background: #0d0818; color: #fff; overflow-y: auto; display: none; font-family: 'Inter', sans-serif; }
.tt-overlay.open { display: block; }
.tt-box { max-width: 780px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; background: #120b22; border-left: 1px solid rgba(255,255,255,.08); border-right: 1px solid rgba(255,255,255,.08); }
.tt-chatbox { height: 100%; min-height: 0; }
.tt-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; background: #1a1230; border-bottom: 1px solid rgba(255,255,255,.12); }
.tt-back { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: #241a3f; color: #fff; font-size: 1.1rem; cursor: pointer; flex: none; }
.tt-head-text { flex: 1; min-width: 0; overflow: hidden; }
.tt-title { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; color: #c9b4f0; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-sub { font-size: .75rem; color: rgba(255,255,255,.62); }
.tt-body { padding: 1rem .9rem 5rem; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tt-chatbox .tt-body { padding: 0; }
.tt-lead { color: rgba(255,255,255,.82); line-height: 1.5; margin: .2rem 0 1rem; }
.tt-fine { color: rgba(255,255,255,.62); font-size: .85rem; line-height: 1.5; margin: .4rem 0 .9rem; }
.tt-hint { text-align: center; color: rgba(255,255,255,.6); font-size: .9rem; line-height: 1.5; padding: 1.2rem; }
.tt-section { margin: 1.2rem 0 .5rem; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.tt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .7rem; }
.tt-card, .tt-exam, .tt-row { background: #1a1230; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; color: #fff; cursor: pointer; text-align: left; font: inherit; }
.tt-card { display: flex; flex-direction: column; gap: .3rem; padding: .9rem; min-height: 86px; }
.tt-card:hover:not([disabled]), .tt-exam:hover:not([disabled]), .tt-row:hover { border-color: #c9b4f0; background: #221942; }
.tt-card[disabled], .tt-exam[disabled] { opacity: .55; cursor: default; }
.tt-card-name { font-size: 1.02rem; font-weight: 500; }
.tt-card-note { font-size: .75rem; color: rgba(255,255,255,.6); }
.tt-exams { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.tt-exam { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 1.6rem .6rem; }
.tt-exam-name { font-family: 'Cormorant Garamond', serif; font-size: 2rem; color: #c9b4f0; }
.tt-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; width: 100%; padding: .7rem .85rem; margin-bottom: .5rem; }
.tt-topic-title { font-size: .98rem; line-height: 1.35; }
.tt-topic-meta { font-size: .78rem; color: rgba(255,255,255,.65); line-height: 1.45; text-align: right; }
.tt-card-info .tt-topic-meta, .tt-note + .tt-topic-meta { text-align: left; }
.tt-card-info { background: #1a1230; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: .85rem .95rem; margin-bottom: .8rem; }
.tt-chip { display: inline-block; padding: .1rem .55rem; border-radius: 999px; background: #2b2050; color: #c9b4f0; font-size: .72rem; margin-left: .35rem; }
.tt-note { background: #231a38; border: 1px solid rgba(245,200,66,.35); border-radius: 12px; padding: .65rem .8rem; font-size: .88rem; line-height: 1.45; margin-bottom: .8rem; }
.tt-err { border-color: rgba(255,110,110,.55); color: #ffb3b3; }
.tt-admin-box { background: #17102b; border: 1px dashed rgba(201,180,240,.45); border-radius: 14px; padding: .8rem; margin-bottom: 1rem; }
.tt-admin-title { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #c9b4f0; margin-bottom: .6rem; }
.tt-label { display: block; margin: .8rem 0 .3rem; font-size: .8rem; color: rgba(255,255,255,.7); }
.tt-input { width: 100%; box-sizing: border-box; background: #0f0920; color: #fff; border: 1px solid rgba(255,255,255,.22); border-radius: 12px; padding: .65rem .8rem; font: inherit; font-size: 16px; }
.tt-two { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.tt-btn { background: #241a3f; color: #fff; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: .7rem 1.2rem; font: inherit; cursor: pointer; margin-top: .8rem; }
.tt-btn:hover:not([disabled]) { border-color: #c9b4f0; }
.tt-btn[disabled] { opacity: .5; cursor: default; }
.tt-primary { background: linear-gradient(135deg, #c9b4f0, #8f5af0); color: #130a24; border: none; font-weight: 600; }
.tt-small { margin: 0; padding: .45rem .85rem; font-size: .8rem; flex: none; }
.tt-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.tt-sticky { position: sticky; bottom: 0; background: #120b22; padding: .7rem 0 .9rem; margin-top: 1rem; border-top: 1px solid rgba(255,255,255,.1); }
.tt-totals { margin-bottom: .6rem; color: rgba(255,255,255,.85); }
.tt-bal { font-size: .8rem; color: #f5c842; white-space: nowrap; }
.tt-mini { margin-bottom: .35rem; padding: .5rem .7rem; font-size: .88rem; }

.tt-splash { text-align: center; padding: 2.5rem 1rem; }
.tt-orb { width: 90px; height: 90px; margin: 0 auto 1.4rem; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #c9b4f0 35%, #6b3fd0 70%, #1a1230); box-shadow: 0 0 40px rgba(143,90,240,.55); animation: ttPulse 2.2s ease-in-out infinite; }
@keyframes ttPulse { 0%, 100% { transform: scale(.93); opacity: .85; } 50% { transform: scale(1.07); opacity: 1; } }
.tt-splash-text { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; color: #c9b4f0; margin-bottom: 1rem; }
.tt-bar { height: 6px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.tt-bar-big { height: 10px; margin: .6rem auto 1rem; max-width: 420px; }
.tt-bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, #8f5af0, #c9b4f0); transition: width .5s ease; }

.tt-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tt-topicbar { padding: .55rem .9rem; background: #1a1230; border-bottom: 1px solid rgba(255,255,255,.1); }
.tt-topicbar-text { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .9rem; margin-bottom: .4rem; }
.tt-msgs { flex: 1; overflow-y: auto; padding: 1rem .9rem; display: flex; flex-direction: column; gap: .6rem; }
.tt-msg { max-width: 84%; padding: .65rem .9rem; border-radius: 16px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; font-size: .95rem; }
.tt-user { align-self: flex-end; background: #35275f; border-bottom-right-radius: 4px; }
.tt-bot { align-self: flex-start; background: #1d1533; border: 1px solid rgba(255,255,255,.1); border-bottom-left-radius: 4px; }
.tt-typing { opacity: .6; }
.tt-note-msg { align-self: center; max-width: 92%; background: transparent; border: 1px dashed rgba(201,180,240,.4); color: #c9b4f0; font-size: .82rem; text-align: center; }
.tt-foot { display: flex; gap: .5rem; padding: .7rem .9rem .3rem; background: #1a1230; border-top: 1px solid rgba(255,255,255,.12); }
.tt-foot textarea { flex: 1; resize: none; background: #0f0920; color: #fff; border: 1px solid rgba(255,255,255,.22); border-radius: 12px; padding: .6rem .8rem; font: inherit; font-size: 16px; }
.tt-ctl { flex: none; align-self: stretch; min-width: 96px; background: #241a3f; color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: 0 .8rem; font: inherit; font-size: .85rem; cursor: pointer; }
.tt-ctl-go { background: linear-gradient(135deg, #c9b4f0, #8f5af0); color: #130a24; border: none; font-weight: 600; }
.tt-ctl:disabled { opacity: .5; cursor: default; }
.tt-foot textarea:disabled { opacity: .6; }
.tt-send { background: linear-gradient(135deg, #c9b4f0, #8f5af0); color: #130a24; border: none; border-radius: 12px; padding: 0 1.1rem; font-size: 1.1rem; cursor: pointer; }
.tt-send:disabled { opacity: .5; }
.tt-price { padding: .1rem .9rem .6rem; background: #1a1230; font-size: .75rem; color: rgba(255,255,255,.6); text-align: right; }

.tt-sheet { position: fixed; inset: 0; z-index: 6100; background: rgba(8,4,16,.75); display: flex; align-items: flex-end; justify-content: center; }
.tt-sheet-box { width: 100%; max-width: 560px; background: #1a1230; border-radius: 22px 22px 0 0; padding: 1.1rem 1rem calc(1.1rem + env(safe-area-inset-bottom, 0px)); border: 1px solid rgba(255,255,255,.14); }

@media (max-width: 520px) {
  .tt-exams { grid-template-columns: 1fr; }
  .tt-two { grid-template-columns: 1fr; }
  .tt-title { font-size: 1.2rem; }
}

/* Фото репетитора и варианты ответа (POTOK 31) */
.tt-photo { padding: .6rem .9rem; background: #17102b; border-bottom: 1px solid rgba(255,255,255,.1); }
.tt-photo-row { display: flex; gap: .8rem; align-items: center; }
.tt-photo-slim { justify-content: space-between; }
.tt-photo-img, .tt-photo-ph { flex: none; width: 72px; height: 96px; border-radius: 14px; object-fit: cover; background: #241a3f; border: 1px solid rgba(201,180,240,.4); display: flex; align-items: center; justify-content: center; }
.tt-photo-info { flex: 1; min-width: 0; font-size: .85rem; }
.tt-photo-who { color: #c9b4f0; margin-bottom: .4rem; }
.tt-photo-btns { display: flex; gap: .5rem; flex-wrap: wrap; }
.tt-orb-s { width: 34px; height: 34px; margin: 0; box-shadow: 0 0 16px rgba(143,90,240,.55); }
.tt-err-text { color: #ffb3b3; font-size: .8rem; margin-bottom: .4rem; }
.tt-opts { align-self: stretch; display: flex; flex-direction: column; gap: .5rem; padding: .2rem 0 .3rem; }
.tt-opt-label { font-size: .75rem; color: rgba(255,255,255,.6); margin-bottom: .25rem; }
.tt-opt-row { display: flex; flex-wrap: wrap; gap: .45rem; }
.tt-opt { background: #241a3f; color: #fff; border: 1px solid rgba(201,180,240,.45); border-radius: 999px; padding: .45rem .95rem; font: inherit; font-size: .92rem; cursor: pointer; }
.tt-opt:hover:not([disabled]) { border-color: #c9b4f0; background: #2e2250; }
.tt-opt.on { background: linear-gradient(135deg, #c9b4f0, #8f5af0); color: #130a24; border-color: transparent; font-weight: 600; }
.tt-opt[disabled] { opacity: .5; cursor: default; }

/* Опасные действия и сброс прогресса (PR 32) */
.tt-danger { margin-top: 2rem; padding-top: .4rem; border-top: 1px solid rgba(255,110,110,.35); }
.tt-danger-btn { border-color: rgba(255,110,110,.6); color: #ffb3b3; }
.tt-reset { display: flex; flex-direction: column; gap: .2rem; margin-top: .9rem; }
.tt-linkbtn { background: none; border: none; color: rgba(255,255,255,.6); font: inherit; font-size: .8rem; text-align: left; padding: .35rem 0; cursor: pointer; text-decoration: underline; }
.tt-linkbtn:hover { color: #ffb3b3; }

/* Все репетиторы сразу и покупка курса (PR 33) */
.tt-queue { margin-top: .8rem; max-height: 46vh; overflow-y: auto; }
.tt-course { background: linear-gradient(135deg, rgba(143,90,240,.18), rgba(201,180,240,.08)); border: 1px solid rgba(201,180,240,.45); border-radius: 16px; padding: .9rem 1rem; margin-bottom: 1rem; }
.tt-course-paid { color: #9be3b6; border-color: rgba(75,179,126,.5); background: rgba(75,179,126,.1); }
.tt-course-title { font-size: 1rem; margin-bottom: .4rem; }
.tt-course-prices { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-bottom: .3rem; }
.tt-old { text-decoration: line-through; color: rgba(255,255,255,.5); }
.tt-new { font-size: 1.35rem; color: #f5c842; font-weight: 600; }

/* PR 37: текст про виртуальных репетиторов и согласие, оценка за тему */
.tt-disclaimer { background: #1a1230; border: 1px solid rgba(201,180,240,.35); border-radius: 14px; padding: .8rem .9rem; font-size: .9rem; line-height: 1.5; color: rgba(255,255,255,.88); margin: 0 0 .7rem; }
.tt-ack { display: flex; gap: .6rem; align-items: flex-start; margin: 0 0 1rem; line-height: 1.4; cursor: pointer; color: #fff; }
.tt-ack input { margin-top: .22rem; flex: none; width: 1.1rem; height: 1.1rem; }
.tt-needs-ack { opacity: .45; }
.tt-score { display: inline-block; padding: .1rem .55rem; border-radius: 999px; background: #3a2a14; color: #f5c842; border: 1px solid rgba(245,200,66,.5); font-size: .72rem; margin-left: .35rem; cursor: pointer; }
.tt-score-ok { background: #17382b; color: #b4f0d4; border-color: rgba(180,240,212,.5); }
.tt-score-wait { background: #2b2050; color: #c9b4f0; border-color: rgba(201,180,240,.5); }
.tt-topicbar-right { display: inline-flex; align-items: center; }
.tt-topicbar-actions { display: flex; justify-content: flex-end; margin-top: .25rem; }
.tt-redo { font-size: .78rem; padding: .1rem 0; }
.tt-redo:hover { color: #c9b4f0; }
.tt-result-sheet { z-index: 6200; }
.tt-result-sheet .tt-sheet-box { max-height: 88vh; overflow-y: auto; }
.tt-res-head { display: flex; align-items: center; gap: .9rem; margin-bottom: .7rem; }
.tt-res-score { flex: none; width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: 600; background: #3a2a14; color: #f5c842; border: 2px solid rgba(245,200,66,.6); }
.tt-res-score.tt-score-ok { background: #17382b; color: #b4f0d4; border-color: rgba(180,240,212,.6); }
.tt-res-text { line-height: 1.55; color: rgba(255,255,255,.9); margin: .3rem 0 .6rem; }
.tt-res-list { margin: 0 0 .5rem 1.1rem; padding: 0; line-height: 1.5; color: rgba(255,255,255,.85); }

/* PR 38: правила курса, платное перепрохождение, блокировка чата */
.tt-rules { background: #231a38; border: 1px solid rgba(245,200,66,.35); border-radius: 12px; padding: .75rem .85rem; font-size: .88rem; line-height: 1.5; margin: .6rem 0 .8rem; color: rgba(255,255,255,.92); }
.tt-buy-sheet { z-index: 6300; }
.tt-buy-sheet .tt-sheet-box { max-height: 90vh; overflow-y: auto; }
.tt-blocked { border-color: rgba(255,107,129,.6); color: #ffb3c0; }
.tt-blocked[hidden] { display: none; }
.tt-price-paid { color: #f5c842; }
