/* ATM-085c r3 (docs/product/web-ui.md 0.2): the same Pravajon as the app. The tokens are GlassPalettes (Memorizer.Client.Theming, Light and
   Dark) and TypeScale; WebStyleTests keeps them equal. Lighter only in technique: three radial gradients without a blur filter, no
   backdrop-filter but on the tab bar, short transitions only (none with prefers-reduced-motion). */

@font-face { font-family: Manrope; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/manrope-regular.woff2") format("woff2"); }
@font-face { font-family: Manrope; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/manrope-semibold.woff2") format("woff2"); }
@font-face { font-family: Manrope; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/manrope-extrabold.woff2") format("woff2"); }

/* GlassPalettes.Light */
:root {
    --ground: #F3F5FB;
    --text: #0E1424;
    --text-body: rgba(14, 20, 36, 0.84);
    --muted: rgba(14, 20, 36, 0.72);
    --faint: rgba(14, 20, 36, 0.64);
    --accent: #14B8A6;
    --on-accent: #042F2E;
    --accent-text: #115E59;
    --accent-graphic: #0D9488;
    --accent-tint: rgba(20, 184, 166, 0.15);
    --accent-border: rgba(20, 184, 166, 0.50);
    --success: #22C55E;
    --on-success: #052E16;
    --success-text: #14532D;
    --success-tint: rgba(34, 197, 94, 0.15);
    --success-border: rgba(34, 197, 94, 0.70);
    --danger: #F43F5E;
    --on-danger: #4C0519;
    --danger-text: #881337;
    --danger-soft: #BE123C;
    --danger-tint: rgba(244, 63, 94, 0.15);
    --danger-border: rgba(244, 63, 94, 0.70);
    --warning: #C2410C;
    --warning-tint: rgba(245, 158, 11, 0.15);
    --warning-border: rgba(245, 158, 11, 0.70);
    --glass: rgba(255, 255, 255, 0.85);
    --stroke: rgba(14, 20, 36, 0.12);
    --dense: rgba(255, 255, 255, 0.98);
    --track: rgba(14, 20, 36, 0.10);
    --badge: rgba(14, 20, 36, 0.08);
    --badge-text: rgba(14, 20, 36, 0.80);
    --field: rgba(255, 255, 255, 0.80);
    --field-stroke: rgba(14, 20, 36, 0.48);
    --shadow: 0 8px 24px rgba(14, 20, 36, 0.10);
    --glow: 0 10px 26px rgba(20, 184, 166, 0.30);
    --orb-violet: rgba(124, 58, 237, 0.22);
    --orb-sky: rgba(14, 165, 233, 0.18);
    --orb-teal: rgba(45, 212, 191, 0.16);
    --ring-hole: #F4F7FB;
    color-scheme: light;
}

/* GlassPalettes.Dark: the system's dark scheme unless Профиль chose «Светлая», and html[data-theme=dark] (Профиль, Telegram's colorScheme) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --ground: #0A0E1A;
        --text: #F4F6FB;
        --text-body: rgba(255, 255, 255, 0.78);
        --muted: rgba(255, 255, 255, 0.64);
        --faint: rgba(255, 255, 255, 0.56);
        --accent: #5EEAD4;
        --on-accent: #052E2B;
        --accent-text: #5EEAD4;
        --accent-graphic: #5EEAD4;
        --accent-tint: rgba(94, 234, 212, 0.14);
        --accent-border: rgba(94, 234, 212, 0.40);
        --success: #4ADE80;
        --on-success: #052E16;
        --success-text: #BBF7D0;
        --success-tint: rgba(74, 222, 128, 0.14);
        --success-border: rgba(74, 222, 128, 0.70);
        --danger: #FB7185;
        --on-danger: #4C0519;
        --danger-text: #FECDD3;
        --danger-soft: #FDA4AF;
        --danger-tint: rgba(251, 113, 133, 0.14);
        --danger-border: rgba(251, 113, 133, 0.70);
        --warning: #FDBA74;
        --warning-tint: rgba(251, 146, 60, 0.16);
        --warning-border: rgba(253, 186, 116, 0.70);
        --glass: rgba(255, 255, 255, 0.07);
        --stroke: rgba(255, 255, 255, 0.16);
        --dense: rgba(24, 28, 39, 0.96);
        --track: rgba(255, 255, 255, 0.12);
        --badge: rgba(255, 255, 255, 0.10);
        --badge-text: rgba(255, 255, 255, 0.80);
        --field: rgba(255, 255, 255, 0.06);
        --field-stroke: rgba(255, 255, 255, 0.36);
        --shadow: none;
        --glow: 0 10px 30px rgba(94, 234, 212, 0.28);
        --orb-violet: rgba(124, 58, 237, 0.42);
        --orb-sky: rgba(14, 165, 233, 0.32);
        --orb-teal: rgba(45, 212, 191, 0.28);
        --ring-hole: #171A33;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --ground: #0A0E1A;
    --text: #F4F6FB;
    --text-body: rgba(255, 255, 255, 0.78);
    --muted: rgba(255, 255, 255, 0.64);
    --faint: rgba(255, 255, 255, 0.56);
    --accent: #5EEAD4;
    --on-accent: #052E2B;
    --accent-text: #5EEAD4;
    --accent-graphic: #5EEAD4;
    --accent-tint: rgba(94, 234, 212, 0.14);
    --accent-border: rgba(94, 234, 212, 0.40);
    --success: #4ADE80;
    --on-success: #052E16;
    --success-text: #BBF7D0;
    --success-tint: rgba(74, 222, 128, 0.14);
    --success-border: rgba(74, 222, 128, 0.70);
    --danger: #FB7185;
    --on-danger: #4C0519;
    --danger-text: #FECDD3;
    --danger-soft: #FDA4AF;
    --danger-tint: rgba(251, 113, 133, 0.14);
    --danger-border: rgba(251, 113, 133, 0.70);
    --warning: #FDBA74;
    --warning-tint: rgba(251, 146, 60, 0.16);
    --warning-border: rgba(253, 186, 116, 0.70);
    --glass: rgba(255, 255, 255, 0.07);
    --stroke: rgba(255, 255, 255, 0.16);
    --dense: rgba(24, 28, 39, 0.96);
    --track: rgba(255, 255, 255, 0.12);
    --badge: rgba(255, 255, 255, 0.10);
    --badge-text: rgba(255, 255, 255, 0.80);
    --field: rgba(255, 255, 255, 0.06);
    --field-stroke: rgba(255, 255, 255, 0.36);
    --shadow: none;
    --glow: 0 10px 30px rgba(94, 234, 212, 0.28);
    --orb-violet: rgba(124, 58, 237, 0.42);
    --orb-sky: rgba(14, 165, 233, 0.32);
    --orb-teal: rgba(45, 212, 191, 0.28);
    --ring-hole: #171A33;
    color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

/* TypeScale: 26 / 24 / 19 / 15 / 13 / 11; Manrope 400 / 600 / 800 */
:root {
    --fs-display: 26px;
    --fs-title: 24px;
    --fs-heading: 19px;
    --fs-body: 15px;
    --fs-secondary: 13px;
    --fs-caption: 11px;
    --radius-card: 24px;
    --radius-control: 18px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--ground);
    color: var(--text);
    font-family: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    font-size: var(--fs-body);
    line-height: 1.45;
    -webkit-text-size-adjust: 100%;
}

/* the ground of the app: three colored orbs, no blur */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(60% 40% at 15% 5%, var(--orb-violet), transparent 70%),
        radial-gradient(55% 35% at 100% 55%, var(--orb-sky), transparent 70%),
        radial-gradient(60% 35% at 20% 100%, var(--orb-teal), transparent 70%);
}

h1, h2, h3, p { margin: 0; }
a { color: var(--accent-text); }
svg.ico { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* the keyboard's focus: accent, 2 px (web-ui.md section 3) */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --tg-*: Telegram's safeAreaInset + contentSafeAreaInset (telegram-bridge.js); 0 in the browser */
.shell {
    min-height: 100vh;
    padding: max(16px, calc(env(safe-area-inset-top) + var(--tg-top, 0px))) calc(16px + var(--tg-right, 0px))
             max(16px, calc(env(safe-area-inset-bottom) + var(--tg-bottom, 0px))) calc(16px + var(--tg-left, 0px));
}
.shell.has-tabs { padding-bottom: calc(104px + env(safe-area-inset-bottom) + var(--tg-bottom, 0px)); }
.shell-main { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }

.splash { display: grid; place-items: center; min-height: 60vh; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--track); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* glass: fill and rim by the tokens, no backdrop-filter (cheap phones, Telegram's WebView on Android) */
.panel, .glass {
    background: var(--glass);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
}
.panel { padding: 18px; display: flex; flex-direction: column; gap: 14px; }

.title, .panel-title { font-size: var(--fs-title); font-weight: 800; line-height: 1.25; }
.heading, .section-title { font-size: var(--fs-heading); font-weight: 800; line-height: 1.3; }
.section-title.small { font-size: 16px; }
.panel-text { color: var(--muted); font-size: var(--fs-body); }
.secondary { font-size: var(--fs-secondary); color: var(--muted); }
.caption { margin: 4px 0 0; color: var(--faint); font-size: var(--fs-secondary); text-align: center; }
.notice { color: var(--muted); font-size: var(--fs-secondary); }
.notice.error, .notice.limit { color: var(--danger-soft); }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }

/* buttons: radius 18 */
.btn {
    min-height: 52px; padding: 12px 18px; border-radius: var(--radius-control); border: 1px solid var(--stroke);
    background: var(--glass); color: var(--text); font: inherit; font-weight: 800; font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px; text-align: center; text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: var(--glow); }
.btn.outline { background: transparent; border-color: var(--accent-border); color: var(--accent-text); }
.btn.big { min-height: 56px; }
.btn.small { min-height: 40px; padding: 0 16px; border-radius: 14px; font-size: 14px; }
.btn.link {
    min-height: 0; background: none; border: none; box-shadow: none; color: var(--accent-text); padding: 4px 0; font-weight: 600;
    font-size: var(--fs-body); justify-content: flex-start; text-align: left;
}
.btn.selected { border-color: var(--accent-border); background: var(--accent-tint); color: var(--accent-text); }
.btn.danger, .btn.link.danger { color: var(--danger-soft); }
.btn:disabled { opacity: 0.5; cursor: default; box-shadow: none; }
.btn .ico { width: 20px; height: 20px; }
.actions { display: flex; flex-direction: column; gap: 10px; }
.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 4px; padding: 4px; border-radius: 16px; background: var(--badge); border: 1px solid var(--stroke); }
.choice .btn { min-height: 44px; border-radius: 12px; border: 0; background: none; box-shadow: none; color: var(--muted); font-weight: 600; font-size: var(--fs-body); }
.choice .btn.selected { background: var(--accent); color: var(--on-accent); font-weight: 800; }
.round-btn {
    width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
    background: var(--glass); border: 1px solid var(--stroke); color: var(--text); text-decoration: none;
}

/* the keys of the card: accent tint under accent text (not the brand: a highlight of the study) */
mark.key { background: var(--accent-tint); color: var(--accent-text); border-radius: 5px; padding: 0 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; padding: 0; list-style: none; }
.chip { padding: 5px 10px; border-radius: 10px; background: var(--accent-tint); color: var(--accent-text); font-size: var(--fs-secondary); font-weight: 600; }
.chip.neutral { background: var(--badge); color: var(--badge-text); }

/* the browser's own «Назад» / ✕ (the Mini App has Telegram's BackButton) */
.topbar { display: flex; align-items: center; gap: 12px; max-width: 720px; margin: 0 auto 12px; }
.topbar .label { font-size: var(--fs-secondary); color: var(--muted); }

/* the tab bar of the phone: the one place with backdrop-filter */
.tabbar {
    position: fixed; z-index: 10;
    left: calc(16px + var(--tg-left, 0px)); right: calc(16px + var(--tg-right, 0px));
    bottom: calc(16px + env(safe-area-inset-bottom) + var(--tg-bottom, 0px));
    max-width: 520px; margin: 0 auto; height: 64px; padding: 6px; border-radius: 32px;
    display: grid; grid-template-columns: repeat(3, 1fr);
    background: var(--dense); border: 1px solid var(--stroke); box-shadow: var(--shadow);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .tabbar { background: var(--glass); }
}
.tab {
    border-radius: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font-size: 12px; color: var(--muted); text-decoration: none; font-weight: 600;
}
.tab[aria-current="page"] { background: var(--accent-tint); color: var(--accent-text); }

/* the top navigation of the PC (>= 900 px) */
.topnav { display: none; }
.brand { display: flex; gap: 10px; align-items: center; font-weight: 800; font-size: 18px; color: var(--text); text-decoration: none; }
.brand svg { width: 34px; height: 34px; border-radius: 10px; }
.topnav .tabs { display: flex; gap: 6px; margin-left: 24px; }
.topnav .tab { flex-direction: row; padding: 8px 14px; border-radius: 12px; font-size: var(--fs-body); }
.topnav .tab .ico { display: none; }
.topnav .right { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.avatar {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px;
    background: var(--accent-tint); color: var(--accent-text); border: 1px solid var(--accent-border); text-decoration: none;
}
.avatar.big { width: 56px; height: 56px; font-size: 22px; }

/* Главная, Статистика, Слабые: a column of glass blocks on the ground */
.home, .stats, .weak { display: flex; flex-direction: column; gap: 14px; }
.hero { display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: center; }
.ring { position: relative; width: 132px; height: 132px; }
.ring svg { position: absolute; inset: 0; width: 132px; height: 132px; }
.ring .ring-track { stroke: var(--track); }
.ring .ring-fill { stroke: var(--accent-graphic); }
.ring .ring-value { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring .ring-value b { font-size: 30px; font-weight: 800; line-height: 1; }
.stats-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.stat { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; }
.stat .i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--badge); color: var(--badge-text); }
.stat.streak .i { color: var(--warning); background: var(--warning-tint); }
.stat.learned .i { color: var(--accent-text); background: var(--accent-tint); }
.stat b { display: block; font-size: 17px; font-weight: 800; line-height: 1.2; }
.stat span { font-size: var(--fs-secondary); color: var(--muted); }
.goal-state { margin-top: 14px; font-size: 14px; color: var(--muted); }
.goal-state.done { color: var(--success); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 4px; }

/* weak questions */
.weak-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.weak-item {
    display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 16px; border-radius: 20px;
    background: var(--glass); border: 1px solid var(--stroke); box-shadow: var(--shadow);
}
.weak-number { font-size: var(--fs-secondary); color: var(--muted); }
.weak-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.weak-count { grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: var(--fs-secondary); font-weight: 600; color: var(--danger-soft); }
.weak-item[data-status="unsure"] .weak-count { color: var(--warning); }

/* Статистика */
.statuses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.statuses div { padding: 10px 12px; border-radius: 16px; background: var(--glass); border: 1px solid var(--stroke); box-shadow: var(--shadow); }
.statuses dd { margin: 0; font-weight: 800; font-size: 20px; }
.statuses dt { color: var(--muted); font-size: var(--fs-secondary); order: 2; }
.statuses div { display: flex; flex-direction: column; }
.statuses [data-status="error"] dd { color: var(--danger-soft); }
.statuses [data-status="unsure"] dd { color: var(--warning); }
.statuses [data-status="known"] dd, .statuses [data-status="learned"] dd { color: var(--accent-text); }
.week { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; min-height: 90px; }
.week-day { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.week-day::before { content: ""; order: 1; display: block; width: 100%; height: 4px; border-radius: 6px; background: var(--track); }
.week-day[data-level="1"]::before { height: 16px; background: var(--accent-graphic); opacity: 0.5; }
.week-day[data-level="2"]::before { height: 32px; background: var(--accent-graphic); opacity: 0.65; }
.week-day[data-level="3"]::before { height: 48px; background: var(--accent-graphic); opacity: 0.8; }
.week-day[data-level="4"]::before { height: 64px; background: var(--accent-graphic); }
.week-count { order: 0; font-size: var(--fs-caption); color: var(--muted); }
.week-name { order: 2; font-size: var(--fs-caption); color: var(--muted); }

/* «Учить»: the order and the look of the app's card */
.study { display: flex; flex-direction: column; gap: 12px; }
.study-media, .study-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.study-head { display: flex; flex-direction: column; gap: 6px; }
.study-head .row { font-size: var(--fs-secondary); color: var(--muted); font-weight: 600; }
.bar { display: block; width: 100%; height: 6px; }
.bar .bar-track { fill: var(--track); }
.bar .bar-fill { fill: var(--accent-graphic); }
.image-frame { margin: 0; border-radius: 20px; overflow: hidden; border: 1px solid var(--stroke); background: var(--glass); display: grid; place-items: center; }
.card-image { display: block; max-width: 100%; max-height: 260px; object-fit: contain; }
.card-question { font-size: var(--fs-heading); font-weight: 800; line-height: 1.35; }
.badge.tricky { align-self: flex-start; padding: 5px 10px; border-radius: 10px; font-size: var(--fs-secondary); font-weight: 800; color: var(--warning); background: var(--warning-tint); border: 1px solid var(--warning-border); }

.options { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.option {
    width: 100%; display: grid; grid-template-columns: 30px 1fr auto auto; gap: 12px; align-items: center; text-align: left;
    padding: 12px 14px; border-radius: var(--radius-control); border: 1px solid var(--stroke); background: var(--glass);
    color: var(--text); font: inherit; font-size: var(--fs-body); cursor: pointer; transition: border-color 0.15s ease, background-color 0.15s ease;
}
.option .letter { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--badge); font-weight: 800; font-size: 14px; color: var(--badge-text); }
.option .mark { display: none; }
.option .hint { display: none; }
.option.state-selected { border-color: var(--accent-border); background: var(--accent-tint); }
.option.state-selected .letter { background: var(--accent); color: var(--on-accent); }
.option.state-correct { border: 1.5px solid var(--success-border); background: var(--success-tint); }
.option.state-correct .letter { background: var(--success); color: var(--on-success); }
.option.state-correct .mark { display: block; color: var(--success); }
.option.state-wrong { border: 1.5px solid var(--danger-border); background: var(--danger-tint); }
.option.state-wrong .letter { background: var(--danger); color: var(--on-danger); }
.option.state-wrong .mark { display: block; color: var(--danger); }
.option.state-dimmed { opacity: 0.55; }
.option:disabled { cursor: default; }

.verdict { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius-control); font-size: 14px; }
.verdict b { font-size: var(--fs-body); font-weight: 800; }
.verdict.ok { background: var(--success-tint); border: 1px solid var(--success-border); color: var(--success-text); }
.verdict.ok b { color: var(--success); }
.verdict.bad { background: var(--danger-tint); border: 1px solid var(--danger-border); color: var(--danger-text); }
.verdict.bad b { color: var(--danger); }

.details { display: flex; flex-direction: column; gap: 12px; }
.note { padding: 14px 16px; border-radius: 20px; background: var(--glass); border: 1px solid var(--stroke); box-shadow: var(--shadow); }
.note h3, .note summary { font-size: var(--fs-body); font-weight: 800; }
.note p { margin-top: 6px; color: var(--text-body); font-size: 14px; font-weight: 400; }
.note.hook { background: var(--accent-tint); border-color: var(--accent-border); box-shadow: none; border-radius: 22px; }
.note.hook h3 { display: flex; gap: 10px; align-items: center; font-size: var(--fs-secondary); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); }
.note.hook h3 i { width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; }
.note.hook h3 .ico { width: 18px; height: 18px; }
.note.hook p { margin-top: 10px; font-size: 18px; font-weight: 800; color: var(--text); }
.note.why summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; }
.note.why summary::-webkit-details-marker { display: none; }
.note.why summary .ico { width: 20px; height: 20px; transition: transform 0.15s ease; }
.note.why[open] summary .ico { transform: rotate(180deg); }
.note.copied { font-size: var(--fs-secondary); }
.eyebrow { font-size: var(--fs-secondary); color: var(--muted); }
.btn.link.report { color: var(--muted); font-size: var(--fs-secondary); gap: 8px; }
.btn.link.report .ico { width: 18px; height: 18px; }
.rating { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
/* the browser's own main button sticks to the bottom (the Mini App has Telegram's BottomButton) */
.sticky { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 5; }
.keycap { display: none; font: 600 12px ui-monospace, monospace; padding: 2px 7px; border-radius: 6px; border: 1px solid currentColor; opacity: 0.7; }

/* the limit */
.limit { align-items: stretch; }
.limit .limit-icon { width: 88px; height: 88px; border-radius: 50%; align-self: center; display: grid; place-items: center; color: var(--accent-text); background: var(--accent-tint); border: 1px solid var(--accent-border); }
.limit .limit-icon .ico { width: 40px; height: 40px; }
.limit .panel-title, .limit > .panel-text { text-align: center; }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pro-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 22px; background: var(--accent-tint); border: 1px solid var(--accent-border); }
.pro-card .pro-title { display: flex; gap: 10px; align-items: center; font-size: var(--fs-secondary); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); }
.pro-card .pro-text { font-size: 17px; font-weight: 800; }

/* sign-in and the forms */
.login { align-items: stretch; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: var(--fs-secondary); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--stroke); }
.email-form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-secondary); color: var(--muted); }
.field input { min-height: 48px; padding: 12px; border-radius: 14px; border: 1px solid var(--field-stroke); background: var(--field); color: var(--text); font: inherit; font-size: var(--fs-body); }

/* Профиль */
.profile-head { display: flex; align-items: center; gap: 12px; }
.purchase { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 20px; background: var(--accent-tint); border: 1px solid var(--accent-border); }
.code { font-family: ui-monospace, monospace; }
.confirm { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 20px; border: 1px solid var(--danger-border); background: var(--danger-tint); }
.fatal { margin: 24px auto; }

/* the PC of the browser: the top navigation, the card in two columns when it has a picture, the hints of the keys with a mouse only.
   r4 (review r3 L4): the browser only - a Mini App wider than 900 px (Telegram Desktop, web.telegram.org) keeps the tab bar of section 2 */
@media (min-width: 900px) {
    .shell[data-mode=browser].has-tabs { padding-bottom: 32px; }
    .shell[data-mode=browser] .tabbar { display: none; }
    .shell[data-mode=browser] .topbar { display: none; }
    .shell[data-mode=browser] .topnav {
        display: flex; align-items: center; gap: 24px; height: 68px; padding: 0 32px; margin: -16px -16px 20px;
        border-bottom: 1px solid var(--stroke); background: var(--glass);
    }
    .shell[data-mode=browser] .study.has-image { display: grid; grid-template-columns: 300px 1fr; gap: 14px 18px; align-items: start; }
    .shell[data-mode=browser] .study.has-image > .study-head { grid-column: 1 / -1; }
    .shell[data-mode=browser] .study.has-image > .study-media { grid-column: 1; }
    .shell[data-mode=browser] .study.has-image > .study-body { grid-column: 2; }
}
@media (pointer: fine) {
    .option .hint { display: grid; place-items: center; min-width: 26px; height: 24px; border-radius: 7px; border: 1px solid var(--stroke); font: 600 12px ui-monospace, monospace; color: var(--muted); }
    .keycap { display: inline-block; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
