/* XP Arena · App shell для студента: игровой топ-бар, нижние вкладки / боковая рельса, экраны.
   Подключается из partials/xa-head; всё ограничено .xa-gamebar / .xa-apptabs / .scr, преподавателя не трогает. */

/* ---------- переходы между экранами ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: as-out .16s ease-in both; }
::view-transition-new(root) { animation: as-in .24s var(--xa-ease) both; }
.xa-gamebar { view-transition-name: xa-gamebar; }
.xa-apptabs { view-transition-name: xa-apptabs; }
@keyframes as-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes as-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes as-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes as-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 75, 110, .6); } 50% { box-shadow: 0 0 0 6px rgba(255, 75, 110, 0); } }
.scr { animation: as-in .28s var(--xa-ease) both; }

/* ---------- 3D-кнопка (как на карте) ---------- */
.ab, .scr .ab {
  --c: #3d8bff; --cd: #1f56c9;
  margin: 0; min-height: 48px; padding: 0 18px; border: 0; border-radius: 16px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box;
  background: var(--c); color: #fff !important; text-decoration: none !important;
  font: 900 14px var(--xa-font); letter-spacing: .05em; text-transform: uppercase;
  box-shadow: 0 5px 0 var(--cd); transition: transform .1s, box-shadow .1s, filter .15s;
  -webkit-tap-highlight-color: transparent;
}
.ab:hover { filter: brightness(1.08); }
.ab:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--cd); }
.ab[disabled] { cursor: not-allowed; filter: grayscale(.8) brightness(.7); transform: none; }
.ab--block { width: 100%; }
.ab--sm, .scr .ab--sm { min-height: 36px; padding: 0 12px; font-size: 12px; border-radius: 12px; box-shadow: 0 4px 0 var(--cd); }
.ab--sm:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--cd); }
.ab.ab--green { --c: #58cc02; --cd: #3c8f00; }
.ab.ab--red { --c: #ff4b6e; --cd: #c22748; }
.ab.ab--gold { --c: #ffc61a; --cd: #c48f00; color: #3a2600 !important; }
.ab.ab--violet { --c: #8b6cff; --cd: #5a3fd0; }
.ab--ghost, .scr .ab--ghost { background: rgba(255,255,255,.04); color: var(--xa-text) !important; border: 2px solid rgba(255,255,255,.14); box-shadow: 0 4px 0 rgba(255,255,255,.07); }
form.ab-form { display: inline; margin: 0; }

/* ---------- игровой топ-бар ---------- */
.xa-gamebar { gap: 10px; padding-left: 12px; padding-right: 12px; }
.gb-brand { display: none; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.gb-brand .xa-brand__word { font-size: 15px; }
.gb-me { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none !important; color: inherit !important; }
.gb-me__xp { display: flex; flex-direction: column; gap: 4px; min-width: 76px; }
.gb-me__lbl { font: 700 10.5px var(--xa-font-mono); letter-spacing: .12em; color: var(--xa-cyan); white-space: nowrap; }
.gb-me__bar { display: block; width: 92px; height: 8px; border-radius: 8px; background: rgba(255,255,255,.08); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.5); }
.gb-me__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #58cc02, #00f0ff); }
.gb-stats { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.gb-pill {
  display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border-radius: 12px;
  background: rgba(13,19,40,.9); border: 1px solid rgba(255,255,255,.08); border-bottom: 3px solid rgba(0,0,0,.45);
  color: #fff !important; text-decoration: none !important; font-size: 13px; white-space: nowrap;
}
.gb-pill b { font-weight: 800; font-size: 12.5px; }
.gb-pill__ic { font-size: 14px; line-height: 1; }
.gb-pill--xp { border-color: rgba(0,240,255,.35); }
.gb-pill--streak { opacity: .75; }
.gb-pill--streak.is-hot { opacity: 1; border-color: rgba(255,150,40,.55); background: linear-gradient(135deg, rgba(255,120,20,.2), rgba(13,19,40,.9)); }
.gb-pill--coin { border-color: rgba(255,215,0,.45); color: var(--xa-gold) !important; }

/* кольцо уровня (общий компонент) */
.lvring { --p: 0; --sz: 44px; position: relative; width: var(--sz); height: var(--sz); flex: none; display: inline-block; }
.lvring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.lvring circle { fill: none; stroke-width: 3.5; }
.lvring__bg { stroke: rgba(255,255,255,.1); }
.lvring__fg { stroke: url(#none); stroke: #58cc02; stroke-linecap: butt; stroke-dasharray: calc(var(--p) * 1) 100; transition: stroke-dasharray .8s var(--xa-ease); }
.lvring__av {
  position: absolute; inset: 12%; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--xa-grad); color: #05070f; font-weight: 900; font-size: calc(var(--sz) * .36);
}
.lvring__av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lvring__lvl {
  position: absolute; right: -4px; bottom: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; box-sizing: border-box;
  display: grid; place-items: center; background: #ffc61a; color: #3a2600; font: 900 10.5px var(--xa-font-display);
  box-shadow: 0 2px 0 #c48f00, 0 0 0 2px #05070f;
}
.lvring--xl { --sz: 112px; }
.lvring--xl circle { stroke-width: 3; }
.lvring--xl .lvring__lvl { min-width: 34px; height: 30px; border-radius: 15px; font-size: 15px; right: 2px; bottom: 2px; box-shadow: 0 3px 0 #c48f00, 0 0 0 3px #0b1124; }
.lvring--md { --sz: 52px; }
.lvring--sm { --sz: 40px; }
.lvring--sm .lvring__lvl { min-width: 16px; height: 16px; font-size: 9.5px; }

/* ---------- нижние вкладки (мобильный) ---------- */
body.xa.xa-has-tabbar .xa-nav { display: none !important; }
body.xa.xa-has-tabbar .xa-tabbar.xa-apptabs {
  position: relative; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr); flex: 0 0 auto;
  height: var(--xa-tabbar-h); padding: 0 4px env(safe-area-inset-bottom); box-sizing: content-box;
  background: rgba(7,10,22,.94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 2px solid rgba(255,255,255,.06);
}
.apptab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--xa-muted-2) !important; text-decoration: none !important; font: 800 10.5px var(--xa-font); letter-spacing: .03em;
  -webkit-tap-highlight-color: transparent;
}
.apptab::before { display: none !important; }
.apptab__ic {
  position: relative; width: 44px; height: 34px; border-radius: 13px; display: grid; place-items: center;
  border: 2px solid transparent; transition: background .2s, border-color .2s, transform .15s;
}
.apptab__ic .xa-ic { width: 24px; height: 24px; stroke-width: 2.1; }
.apptab:active .apptab__ic { transform: translateY(2px) scale(.96); }
.apptab.is-active { color: #fff !important; }
.apptab.is-active .apptab__ic {
  background: color-mix(in srgb, var(--c) 22%, transparent); border-color: var(--c);
  box-shadow: 0 3px 0 var(--cd); color: var(--c);
}
.apptab.is-active .xa-ic { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c) 70%, transparent)); }
.apptab__badge {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px;
  display: grid; place-items: center; background: #ff4b6e; color: #fff; font: 900 10.5px var(--xa-font);
  box-shadow: 0 0 0 2px #070a16; animation: as-pop .4s var(--xa-ease) both, as-pulse 2s 1s infinite;
}

/* ---------- десктоп: рельса слева, шапка сверху ---------- */
@media (min-width: 900px) {
  body.xa.xa-has-tabbar {
    display: grid; grid-template-columns: 100px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  }
  body.xa.xa-has-tabbar > .xa-header { grid-column: 1 / -1; grid-row: 1; }
  body.xa.xa-has-tabbar > .xa-body { grid-column: 2; grid-row: 2; min-height: 0; }
  body.xa.xa-has-tabbar > .xa-tabbar.xa-apptabs {
    grid-column: 1; grid-row: 2; display: flex; flex-direction: column; align-items: stretch; gap: 6px;
    height: auto; padding: 16px 8px; border-top: 0; border-right: 2px solid rgba(255,255,255,.06);
  }
  .apptab { padding: 8px 0; border-radius: 16px; font-size: 11.5px; gap: 4px; }
  .apptab:hover { background: rgba(255,255,255,.04); color: #fff !important; }
  .apptab__ic { width: 52px; height: 42px; }
  .gb-brand { display: inline-flex; margin-right: 16px; }
  .gb-me__bar { width: 140px; }
}

/* ---------- экраны ---------- */
.scr { max-width: 560px; margin: 0 auto; padding: 14px 14px 28px; box-sizing: border-box; display: flex; flex-direction: column; gap: 14px; }
.scr--wide { max-width: 1040px; }
.scr-head { display: flex; align-items: center; gap: 10px; }
.scr-head h1 { margin: 0; font: 900 20px var(--xa-font-display); letter-spacing: .04em; color: #fff; }
.scr-head .scr-sub { color: var(--xa-muted); font-size: 13px; }
.scr-head__back {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: rgba(13,19,40,.9); border: 2px solid rgba(255,255,255,.1); border-bottom-width: 4px; color: #fff !important;
}
.scr-head__back .xa-ic { width: 20px; height: 20px; }
.scr-head__end { margin-left: auto; display: flex; gap: 8px; }

.gcard {
  position: relative; border-radius: 20px; padding: 14px; box-sizing: border-box;
  background: linear-gradient(180deg, rgba(20,28,56,.82), rgba(13,19,40,.86));
  border: 2px solid rgba(255,255,255,.07); border-bottom-width: 5px; border-bottom-color: rgba(0,0,0,.45);
}
.gcard__title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 900 13px var(--xa-font); letter-spacing: .1em; text-transform: uppercase; color: var(--xa-muted); }
.gcard__title .xa-ic { width: 18px; height: 18px; color: var(--xa-cyan); }
.gcard__title a { margin-left: auto; font-size: 12px; letter-spacing: .04em; color: var(--xa-cyan) !important; text-decoration: none; text-transform: none; font-weight: 800; }
.gcard__empty { margin: 0; color: var(--xa-muted-2); font-size: 13.5px; }

/* герой-профиль */
.hero {
  position: relative; overflow: hidden; border-radius: 26px; padding: 16px 16px 14px; text-align: center;
  background: radial-gradient(120% 80% at 50% 0%, rgba(0,240,255,.18), transparent 60%), linear-gradient(160deg, #18215a, #0d1328 70%);
  border: 2px solid rgba(0,240,255,.22); border-bottom-width: 6px; border-bottom-color: rgba(0,0,0,.5);
}
.hero--bg { background: linear-gradient(180deg, rgba(5,7,15,.15), rgba(5,7,15,.88) 75%), var(--hero-bg) center / cover no-repeat; }
.hero .lvring { margin: 0 auto; }
.hero__name { margin: 8px 0 2px; font: 900 21px/1.2 var(--xa-font); color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.6); word-break: break-word; }
.hero__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 9px; font-size: 12px; font-weight: 700;
  background: rgba(5,7,15,.6); border: 1px solid rgba(255,255,255,.12); color: var(--xa-text); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.tag img { width: 16px; height: 16px; object-fit: contain; }
.tag--online { color: #8dff6a; border-color: rgba(88,204,2,.5); }
.tag--league { border-color: rgba(255,215,0,.4); }
.hero__bio { margin: 8px auto 0; max-width: 40ch; font-size: 13px; color: var(--xa-muted); font-style: italic; }
.hero__xp { margin-top: 12px; text-align: left; }
.hero__xp-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--xa-muted); margin-bottom: 5px; }
.hero__xp-row b { color: #fff; }
.xpbar { height: 14px; border-radius: 14px; background: rgba(255,255,255,.08); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,.55); }
.xpbar i { display: block; height: 100%; border-radius: inherit; position: relative; background: linear-gradient(90deg, #58cc02, #00f0ff); transition: width .9s var(--xa-ease); }
.xpbar i::after { content: ""; position: absolute; left: 6px; right: 6px; top: 3px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.45); }
.hero__edit { position: absolute; top: 12px; right: 12px; }
.hero__back { position: absolute; top: 12px; left: 12px; }
.hero__actions { display: flex; gap: 10px; margin-top: 14px; }
.hero__actions > * { flex: 1 1 0; }
.hero__actions form { display: flex; }
.hero__actions form .ab { flex: 1 1 auto; }

/* плитки статистики */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat {
  --c: #00d9ff; position: relative; padding: 10px 6px 9px; border-radius: 16px; text-align: center; text-decoration: none !important; color: inherit !important;
  background: color-mix(in srgb, var(--c) 12%, rgba(13,19,40,.9)); border: 2px solid color-mix(in srgb, var(--c) 40%, transparent); border-bottom-width: 4px;
}
.stat__ic { font-size: 20px; line-height: 1; }
.stat__v { margin-top: 4px; font: 900 18px var(--xa-font-display); color: #fff; font-variant-numeric: tabular-nums; }
.stat__l { margin-top: 2px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: var(--xa-muted); text-transform: uppercase; }

/* CTA карты */
.cta-map {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; text-decoration: none !important; color: #fff !important;
  background: linear-gradient(135deg, #58cc02, #2f9e00); box-shadow: 0 6px 0 #2a7300, 0 12px 30px rgba(88,204,2,.25);
  transition: transform .1s, box-shadow .1s;
}
.cta-map:active { transform: translateY(5px); box-shadow: 0 1px 0 #2a7300; }
.cta-map__ic { width: 52px; height: 52px; border-radius: 16px; flex: none; display: grid; place-items: center; background: rgba(255,255,255,.22); font-size: 28px; }
.cta-map__t { font: 900 15px var(--xa-font); letter-spacing: .04em; text-transform: uppercase; }
.cta-map__s { font-size: 12.5px; opacity: .92; margin-top: 2px; }
.cta-map__go { margin-left: auto; font-size: 26px; font-weight: 900; }

/* строки людей (друзья, одногруппники, поиск) */
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.person {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px;
  background: rgba(5,7,15,.45); border: 1px solid rgba(255,255,255,.06);
}
.person__link { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; text-decoration: none !important; color: inherit !important; }
.person__av { position: relative; flex: none; }
.person__dot { position: absolute; right: -1px; top: -1px; width: 12px; height: 12px; border-radius: 50%; background: #58cc02; box-shadow: 0 0 0 2px #0b1124, 0 0 8px rgba(88,204,2,.8); }
.person__txt { min-width: 0; display: flex; flex-direction: column; }
.person__name { font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14.5px; }
.person__sub { font-size: 12px; color: var(--xa-muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person__sub .on { color: #8dff6a; font-weight: 700; }
.person__xp { font: 800 12px var(--xa-font-mono); color: var(--xa-cyan); }
.person__act { display: flex; gap: 6px; flex: none; }
.person__act form { margin: 0; }
.person__act .ab { white-space: nowrap; }
.people--strip { flex-direction: row; overflow-x: auto; gap: 10px; padding-bottom: 4px; scrollbar-width: none; }
.people--strip::-webkit-scrollbar { display: none; }
.chipperson { flex: none; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none !important; color: var(--xa-text) !important; font-size: 11.5px; font-weight: 700; text-align: center; }
.chipperson span.n { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; width: 100%; overflow: hidden; line-height: 1.2; }

.banner {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; text-decoration: none !important; color: #fff !important;
  background: rgba(255,75,110,.14); border: 2px solid rgba(255,75,110,.45); font-weight: 700; font-size: 13.5px;
}
.banner--info { background: rgba(0,217,255,.1); border-color: rgba(0,217,255,.4); }
.banner--ok { background: rgba(88,204,2,.12); border-color: rgba(88,204,2,.5); }
.banner--warn { background: rgba(255,198,26,.1); border-color: rgba(255,198,26,.45); }
.banner b { color: #fff; }
.banner__go { margin-left: auto; }

/* сегменты-вкладки внутри экрана */
.segs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 5px; border-radius: 16px; background: rgba(5,7,15,.6); border: 1px solid rgba(255,255,255,.08); }
.segs a {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 5px; height: 38px; border-radius: 12px;
  color: var(--xa-muted) !important; text-decoration: none !important; font: 800 12.5px var(--xa-font);
}
.segs a.is-active { background: #1c2758; color: #fff !important; box-shadow: 0 3px 0 #0b1030; border: 1px solid rgba(0,240,255,.35); }
.segs .cnt { min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; background: #ff4b6e; color: #fff; font-size: 10.5px; display: grid; place-items: center; }

.search { display: flex; gap: 8px; }
.search input {
  flex: 1 1 auto; min-width: 0; height: 46px; padding: 0 14px; border-radius: 14px; box-sizing: border-box;
  background: rgba(5,7,15,.75); border: 2px solid rgba(255,255,255,.12); color: #fff; font: 600 15px var(--xa-font);
}
.search input:focus { outline: none; border-color: var(--xa-cyan); box-shadow: 0 0 0 3px rgba(0,240,255,.15); }

/* «Ещё» — плитки */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile, .scr .tile {
  --c: #00d9ff; margin: 0; --cd: #0090b8; position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 20px; min-height: 108px; box-sizing: border-box;
  text-decoration: none !important; color: #fff !important; background: color-mix(in srgb, var(--c) 16%, rgba(13,19,40,.92));
  border: 2px solid color-mix(in srgb, var(--c) 50%, transparent); box-shadow: 0 5px 0 color-mix(in srgb, var(--cd) 70%, #000);
  transition: transform .1s, box-shadow .1s; cursor: pointer; font: inherit; text-align: left; width: 100%;
}
.tile:active { transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in srgb, var(--cd) 70%, #000); }
.tile__ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: color-mix(in srgb, var(--c) 30%, transparent); }
.tile__ic img { width: 30px; height: 30px; object-fit: contain; }
.tile__t { font: 900 14px var(--xa-font); letter-spacing: .02em; }
.tile__s { font-size: 11.5px; color: var(--xa-muted); line-height: 1.3; }
.tile__badge { position: absolute; top: 10px; right: 10px; }
.tile--wide { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 0; }
.tiles form { margin: 0; display: contents; }

/* лиги / достижения / активность */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(5,7,15,.45); border: 1px solid rgba(255,255,255,.06); }
.list li img { width: 32px; height: 32px; object-fit: contain; }
.list li .r { margin-left: auto; font: 800 12.5px var(--xa-font-mono); color: var(--xa-cyan); white-space: nowrap; }
.list li.is-me { border-color: rgba(255,215,0,.6); background: rgba(255,215,0,.08); }
.list li.is-bad .r { color: #ff7d95; }
.ach { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ach__i { padding: 12px 6px; border-radius: 16px; text-align: center; background: rgba(13,19,40,.85); border: 2px solid rgba(255,255,255,.08); border-bottom-width: 4px; }
.ach__i .e { font-size: 30px; line-height: 1.1; }
.ach__i .t { margin-top: 6px; font-size: 12px; font-weight: 800; color: #fff; }
.ach__i .d { margin-top: 2px; font-size: 10.5px; color: var(--xa-muted-2); line-height: 1.25; }
.ach__i.is-on { border-color: rgba(255,198,26,.6); background: linear-gradient(180deg, rgba(255,198,26,.16), rgba(13,19,40,.9)); }
.ach__i:not(.is-on) .e { filter: grayscale(1) brightness(.6); }

/* настройки */
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.form-row label { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--xa-muted); }
.form-row input[type=text], .form-row input[type=password], .form-row textarea {
  width: 100%; box-sizing: border-box; padding: 11px 13px; border-radius: 12px; background: rgba(5,7,15,.75); border: 2px solid rgba(255,255,255,.12); color: #fff; font: 600 15px var(--xa-font);
}
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--xa-cyan); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.filebtn { position: relative; overflow: hidden; }
.filebtn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.hint { font-size: 12px; color: var(--xa-muted-2); margin: 6px 0 0; }

/* дуэли-экран: обёртка над старыми строками s2-duel-row */
body.xa .scr .student-v2 { padding: 0 !important; margin: 0 !important; max-width: none !important; width: auto !important; min-height: 0 !important; background: none !important; }
body.xa .scr .student-v2 .gcard { margin: 0; }
.scr .s3-duels-block { margin: 0; }
.scr .s2-duels { display: flex; flex-direction: column; gap: 8px; }

/* десктоп: двухколоночный дом */
@media (min-width: 900px) {
  .scr { max-width: 1040px; padding: 22px 24px 36px; }
  .scr--home { display: grid; grid-template-columns: 380px minmax(0, 1fr); align-items: start; gap: 18px; }
  .scr--home > .col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .scr--narrow { max-width: 720px; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 899px) { .scr--home > .col { display: contents; } }
@media (max-width: 380px) {
  .gb-me__xp { display: none; }
  .gb-pill { padding: 0 8px; }
  .stats { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
  .scr, .apptab__badge { animation: none !important; }
  .lvring__fg, .xpbar i, .apptab__ic, .ab, .tile, .cta-map { transition: none !important; }
}

/* ---------- обучающий тур поверх оболочки ---------- */
body.xa .xa-apptabs:has(.tutorial-highlight),
body.xa .xa-gamebar:has(.tutorial-highlight),
body.xa .xa-body:has(.tutorial-highlight) { z-index: 100001; }
body.xa .xa-apptabs:has(.tutorial-highlight) .apptab:not(.tutorial-highlight) { opacity: .3; }
body.xa .xa-body:has(.tutorial-highlight) .scr > :not(.tutorial-highlight):not(:has(.tutorial-highlight)),
body.xa .xa-body:has(.tutorial-highlight) .scr > .col > :not(.tutorial-highlight):not(:has(.tutorial-highlight)) { opacity: .18; transition: opacity .2s; }
.apptab.tutorial-highlight { border-radius: 16px; }

/* ---------- Задания дня ---------- */
.quests { border-color: rgba(255,198,26,.35); background: linear-gradient(180deg, rgba(255,198,26,.08), rgba(255,255,255,.02)); }
.quests__timer { margin-left: auto; font: 800 12px var(--xa-font-mono); letter-spacing: .04em; color: var(--xa-muted); text-transform: none; }
.quests__timer b { color: #fff; }
.quests__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.quest, .quests__chest { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,.04); border: 2px solid rgba(255,255,255,.08); transition: border-color .2s, background .2s; }
.quest__ic, .quests__chest-ic { flex: 0 0 44px; height: 44px; display: grid; place-items: center; font-size: 24px; border-radius: 14px; background: rgba(255,255,255,.06); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); }
.quest--easy .quest__ic { background: rgba(88,204,2,.18); }
.quest--medium .quest__ic { background: rgba(0,217,255,.16); }
.quest--hard .quest__ic { background: rgba(255,75,110,.18); }
.quest__body { flex: 1 1 auto; min-width: 0; }
.quest__t { font-weight: 800; color: #fff; font-size: 14.5px; line-height: 1.25; margin-bottom: 6px; }
.quest__bar { position: relative; height: 18px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.quest__bar i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, #ffc61a, #ff9f1a); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), inset 0 3px 0 rgba(255,255,255,.25); transition: width .8s var(--xa-ease); }
.quest__bar span { position: relative; display: block; text-align: center; font: 900 11px/18px var(--xa-font); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.quest__meta { margin-top: 4px; font-size: 12px; color: var(--xa-muted-2); }
.quest__diff { text-transform: uppercase; letter-spacing: .08em; font-weight: 800; font-size: 10.5px; }
.quest--easy .quest__diff { color: #8dff6a; } .quest--medium .quest__diff { color: #6fe7ff; } .quest--hard .quest__diff { color: #ff8aa1; }
.quest__end { flex: 0 0 auto; display: flex; align-items: center; }
.quest__rew { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; background: rgba(255,198,26,.12); color: var(--xa-gold); font-weight: 900; }
.quest__claim { flex-direction: column; gap: 2px; line-height: 1.05; padding: 8px 12px !important; min-width: 0; }
.quest__claim small { font-size: 10.5px; letter-spacing: 0; text-transform: none; opacity: .85; }
.quest__done { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #58cc02; color: #fff; font-weight: 900; font-size: 18px; box-shadow: 0 3px 0 #3c8f00; }
.quest__lock { font-size: 20px; opacity: .55; }
.quest.is-ready, .quests__chest.is-ready { border-color: rgba(255,198,26,.75); background: rgba(255,198,26,.10); animation: q-glow 2.2s infinite; }
@keyframes q-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,198,26,.55); } 50% { box-shadow: 0 0 0 6px rgba(255,198,26,0); } }
.quest.is-claimed .quest__bar i { background: linear-gradient(90deg, #58cc02, #8dff6a); }
.quest.is-claimed .quest__t { color: var(--xa-muted); }
.quests__chest { margin-top: 10px; border-style: dashed; }
.quests__chest.is-ready .quests__chest-ic { animation: q-wiggle 1.2s infinite; }
.quests__chest.is-claimed { border-style: solid; border-color: rgba(88,204,2,.5); }
.is-pop .quest__done { animation: as-pop .45s var(--xa-ease) both; }
@keyframes q-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg) scale(1.06); } 75% { transform: rotate(9deg) scale(1.06); } }
.qpop { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 2000; }
.qpop[hidden] { display: none; }
.qpop__b { padding: 16px 26px; border-radius: 22px; background: linear-gradient(180deg, #ffd84d, #ffb800); color: #3a2600; font: 900 22px var(--xa-font-display); letter-spacing: .02em; box-shadow: 0 6px 0 #c48f00, 0 18px 50px rgba(255,198,26,.45); animation: q-pop 1.8s var(--xa-ease) both; text-align: center; max-width: 86vw; }
.qpop__b--big { font-size: 26px; background: linear-gradient(180deg, #b79bff, #7b61ff); color: #fff; box-shadow: 0 6px 0 #5236c9, 0 18px 50px rgba(123,97,255,.5); animation-duration: 2.6s; }
@keyframes q-pop { 0% { transform: scale(.4) translateY(30px); opacity: 0; } 15% { transform: scale(1.08); opacity: 1; } 25% { transform: scale(1); } 80% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-40px); } }
@media (prefers-reduced-motion: reduce) { .quest.is-ready, .quests__chest.is-ready, .quests__chest.is-ready .quests__chest-ic { animation: none; } }

/* ---------- Разбор ошибок / Мои ошибки / тренировка ---------- */
.rv-sum { display: flex; gap: 10px; margin-bottom: 12px; }
.rv-sum .stat { flex: 1; }
.rv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rv { padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.04); border: 2px solid rgba(255,75,110,.35); }
.rv.is-ok { border-color: rgba(88,204,2,.35); }
.rv__q { font-weight: 800; color: #fff; margin-bottom: 8px; line-height: 1.35; }
.rv__q b { color: var(--xa-muted-2); margin-right: 4px; }
.rv__opts { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 6px; }
.rv__opt { display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.03); color: var(--xa-muted); font-size: 13.5px; }
.rv__opt .L { flex: 0 0 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font: 900 11px var(--xa-font); background: rgba(255,255,255,.08); color: #fff; }
.rv__opt.is-correct { background: rgba(88,204,2,.14); color: #d9ffc8; }
.rv__opt.is-correct .L { background: #58cc02; }
.rv__opt.is-wrong { background: rgba(255,75,110,.14); color: #ffd3dc; }
.rv__opt.is-wrong .L { background: #ff4b6e; }
.rv__tag { margin-left: auto; font-size: 11px; font-weight: 800; white-space: nowrap; }
.rv__e { font-size: 13px; color: var(--xa-muted); padding: 8px 10px; border-radius: 10px; background: rgba(0,217,255,.07); border-left: 3px solid var(--xa-cyan); }
.rv__fast { font-size: 12px; color: #ffcf5a; margin-bottom: 6px; }
.rv-lock { text-align: center; padding: 28px 18px; }
.rv-lock__ic { font-size: 54px; margin-bottom: 6px; }
.rv-lock p { color: var(--xa-muted); }
.mz-group { margin-bottom: 14px; }
.mz-group__h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mz-group__h h2 { margin: 0; font: 900 16px var(--xa-font); color: #fff; flex: 1; min-width: 0; }
.mz-group__n { font: 900 12px var(--xa-font); color: #ff8aa1; background: rgba(255,75,110,.14); padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.mz-item { padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.04); margin-bottom: 8px; }
.mz-item__q { font-weight: 700; color: #fff; font-size: 14px; margin-bottom: 4px; }
.mz-item__a { font-size: 13px; color: var(--xa-muted); }
.mz-item__a .bad { color: #ff8aa1; } .mz-item__a .good { color: #8dff6a; }
.pr-q { font: 800 18px/1.35 var(--xa-font); color: #fff; margin: 4px 0 14px; }
.pr-opts { display: grid; gap: 10px; }
.pr-opts .ab { justify-content: flex-start; text-align: left; text-transform: none; letter-spacing: 0; font-weight: 700; font-size: 15px; white-space: normal; }
.pr-fb { margin-bottom: 14px; }
.duel-review-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin: 10px 0; }
.duel-review-cta .muted { color: var(--xa-muted); font-size: 13px; text-align: center; }
.dm-confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 1990; }

.quest__rew--xp { background: rgba(0,217,255,.12); color: #6fe7ff; white-space: nowrap; }
.quest__xp { color: #6fe7ff; font-weight: 800; }
