/* Экраны вкладок и вспомогательные: профиль, настройки, практика, игры, чат, помощь. */

/* ===================== Профиль ===================== */

.profile {
  padding: calc(var(--sat) + 20px) 16px 10px;
}

.profile__title {
  margin-bottom: 16px;
  font-size: 20px;
  font-weight: 800;
}

.profile__who {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile__name {
  font-size: 17px;
  font-weight: 800;
}

.pill--button {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
}

.pstats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.pstat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px;
}

.pstat b {
  font-size: 15px;
  font-weight: 800;
}

.pstat span {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}

.cert {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 16px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  cursor: pointer;
}

.cert__icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert__title {
  font-size: 14px;
  font-weight: 700;
}

.cert__sub {
  margin-top: 1px;
  font-size: 12px;
  color: var(--muted);
}

.row-btn {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  cursor: pointer;
}

.row-btn + .row-btn {
  border-top: 1px solid var(--border);
}

.row-btn__text {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.row-btn__sub {
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--muted);
}

/* ===================== Настройки ===================== */

.settings {
  padding: 6px 16px 20px;
}

.section-title {
  margin: 0 4px 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--dim);
  text-transform: uppercase;
}

.device {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.device__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.device__icon.is-current {
  background: var(--accent-soft);
}

.device__name {
  font-size: 13.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device__sub {
  margin-top: 1px;
  font-size: 11.5px;
  color: var(--muted);
}

.device__sub.is-now {
  color: var(--green);
}

.row-note {
  padding: 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
}

/* ===================== Практика и игры ===================== */

.practice__head {
  flex-shrink: 0;
  padding: calc(var(--sat) + 20px) 16px 8px;
}

.practice__head p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.games {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.game-card {
  all: unset;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  cursor: pointer;
}

.game-card.is-soon {
  opacity: 0.6;
}

/* Игр пять — последняя, одна в ряду, занимает всю ширину */
.games .game-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

/* Слово в «Быстром словаре» */
.gameword {
  padding: 26px 16px;
  text-align: center;
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-text);
  word-break: break-word;
}

.game-card__icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-card__title {
  font-size: 14px;
  font-weight: 800;
}

.game-card__desc {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--muted);
}

.game-card__best {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-text);
}

.game__stage {
  flex: 1;
  padding: 8px 16px 16px;
}

.game__q {
  margin: 8px 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.game__streak {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--card);
  font-size: 13px;
  font-weight: 800;
}

.game__bottom {
  flex-shrink: 0;
  padding: 8px 16px calc(max(var(--sab), 12px) + 12px);
}

.tf {
  padding: 16px;
}

.tf__q {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.tf__a {
  margin-top: 10px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}

.tf__row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.bugcase {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px 14px;
}

.bugcase > div {
  display: flex;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
}

.bugcase span {
  flex: 0 0 88px;
  color: var(--muted);
}

.bugcase b {
  font-weight: 600;
  word-break: break-word;
}

.bugcase .bad {
  color: var(--red);
}

.bugcode {
  padding: 8px 0;
  overflow: hidden;
}

.bugline {
  all: unset;
  box-sizing: border-box;
  display: flex;
  width: 100%;
  padding-right: 12px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 32px;
  cursor: pointer;
}

.bugline__no {
  flex: none;
  width: 32px;
  text-align: center;
  color: var(--faint-2);
}

.bugline__code {
  white-space: pre;
  color: var(--text-2);
}

.bugline.is-correct {
  background: var(--green-soft);
}

.bugline.is-wrong {
  background: var(--red-soft);
}

.game__end {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 24px;
  text-align: center;
}

.game__end-img {
  width: 140px;
  height: auto;
}

.game__end-title {
  font-size: 20px;
  font-weight: 800;
}

.game__end-score {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--accent);
}

.game__end-best {
  font-size: 13px;
  color: var(--muted);
}

.game__mistake {
  align-self: stretch;
  margin-top: 12px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
  white-space: pre-wrap;
}

.game__end-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 18px;
}

/* ===================== Чат с Блокси ===================== */

.chat__head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding: calc(var(--sat) + 16px) 16px 12px;
  border-bottom: 1px solid var(--card);
}

.chat__ava {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent);
}

.chat__ava img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat__name {
  font-size: 16px;
  font-weight: 800;
}

.chat__state {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.chat__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.chat__dot.is-off {
  background: var(--yellow);
}

.chat__scroll {
  padding: 14px 16px 10px;
}

.chat__banner {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.chat__about {
  margin-top: 12px;
  padding: 16px 16px 14px;
  border-radius: 16px;
  background: var(--card);
}

.chat__about-title {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 800;
}

.chat__about p {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
}

.chat__features {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 10px;
}

.chat__features > div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-2);
}

.chat__about-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--muted);
}

.chat__about-foot time {
  margin-left: 8px;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--faint);
}

.quickgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.quick {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 10px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.quick--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.quick:active {
  filter: brightness(1.15);
}

.chat__feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  padding-bottom: 8px;
}

/* Стикер-напоминание от Блокси — как стикер в Telegram: без пузыря, время в углу картинки */
.chat__sticker:not(:empty) {
  margin-top: 14px;
}

.sticker {
  position: relative;
  width: 178px;
  animation: sticker-in 0.45s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}

.sticker__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  object-position: left bottom;
}

.sticker__time {
  position: absolute;
  right: 4px;
  bottom: 6px;
  padding: 1px 7px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.5);
  font-size: 11px;
  color: #fff;
}

@keyframes sticker-in {
  from {
    opacity: 0;
    transform: scale(0.7) translateY(12px);
    transform-origin: left bottom;
  }
}

.msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.msg--me {
  justify-content: flex-end;
}

.msg__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bubble {
  max-width: 84%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.5;
}

.bubble--bot {
  background: var(--card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.bubble--me {
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  border-bottom-right-radius: 4px;
}

.bubble__title {
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 800;
}

.bubble__line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.weekstrip {
  display: flex;
  justify-content: space-between;
  margin: 12px 0 6px;
}

.weekstrip__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: var(--muted);
}

.weekstrip__day i {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.weekstrip__day i.is-done {
  background: var(--accent);
}

.weekstrip__day i.is-today {
  outline: 2px solid var(--accent-line);
  outline-offset: 1px;
}

.progline {
  margin-top: 10px;
}

.progline > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 12.5px;
}

.progline b {
  font-weight: 700;
}

.progline span {
  color: var(--muted);
}

.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chatchip {
  all: unset;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.chatchip--ghost {
  color: var(--muted);
}

.chat__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 10px 16px calc(max(var(--sab), 12px) + 12px);
  border-top: 1px solid var(--card);
}

.chat__input {
  flex: 1;
  min-width: 0;
  padding: 11px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}

.chat__input::placeholder {
  color: var(--faint);
}

.chat__send {
  all: unset;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ===================== Помощь ===================== */

.faq {
  overflow: hidden;
}

.faq__head {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.faq__head svg {
  transition: transform 0.18s ease;
}

.faq__text {
  padding: 0 14px 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

/* ===================== Словарь ===================== */

.dict__bar {
  flex-shrink: 0;
  padding: 4px 16px 8px;
}

.dict__search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
}

.dict__search:focus-within {
  border-color: var(--accent-line);
}

.dict__input {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  background: none;
  border: 0;
  outline: 0;
  color: var(--text);
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
}

.dict__input::placeholder {
  color: var(--dim);
}

.dict__input::-webkit-search-cancel-button {
  display: none;
}

.dict__count {
  min-height: 16px;
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--dim);
}

.dict__scroll {
  padding: 4px 16px 20px;
}

.dict__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dict__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 36px 24px;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.dict-card {
  padding: 14px;
}

.dict-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dict-card__word {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-text);
  overflow-wrap: anywhere;
}

.dict-card__tag {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--blue-soft);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--blue);
}

.dict-card__translation {
  margin-top: 2px;
  font-size: 12px;
  font-style: italic;
  color: var(--dim);
}

.dict-card__meaning {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
}

.dict-card__code {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--code-text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ===================== Достижения ===================== */

.ach-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 4px 2px 10px;
}

.ach-head b {
  font-size: 15px;
  font-weight: 800;
}

.ach-head span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.ach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.ach {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}

.ach__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
}

.ach__title {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.ach__desc {
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--muted);
}

.ach:not(.is-earned) {
  opacity: 0.55;
}

.ach.is-earned {
  border-color: var(--accent-line);
}

.ach.is-earned .ach__icon {
  background: var(--accent-soft);
}

/* ===================== Серия дней (шторка) ===================== */

.streak-sheet {
  text-align: center;
}

.streak-sheet__num {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--accent);
}

.streak-sheet__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.streak-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 18px 0 12px;
}

.streak-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--dim);
}

.streak-day i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 40px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--surface);
}

.streak-day.is-done i {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}

.streak-day.is-today i {
  border: 1.5px dashed var(--accent-line);
}

.streak-day.is-today span {
  color: var(--text);
}

.streak-sheet__hint {
  margin: 0 0 4px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  text-align: left;
}

.pstat--button {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.pstat--button:active {
  background: var(--card-2);
}
