:root {
  --surface: var(--surface-1);
  --surface-soft: var(--surface-2);
  --border: var(--border-subtle);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --cyan: var(--accent);
  --blue: var(--info);
  --green: var(--success);
  --orange: var(--warning);
  --red: var(--danger);
  /* Resolve the configured image on the server from the very first paint.
     All access screens share this URL; JSON settings must not swap backdrops. */
  --app-landscape-image: none; /* Set from fresh, versioned public appearance metadata. */
}

html, body, #app { min-height: 100%; margin: 0; }
body {
  color: var(--text);
  background: var(--app-bg);
}
.auth-complete-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: linear-gradient(180deg, rgba(7, 9, 13, .18), var(--app-bg) 72%), var(--app-landscape-image) center top / cover no-repeat; }
.auth-complete-card { width: min(420px, 100%); padding: 34px 26px; border: 1px solid var(--border-accent); border-radius: var(--radius-xl); background: var(--surface-glass); text-align: center; box-shadow: var(--shadow-md); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.auth-complete-card h1 { margin: 18px 0 8px; font-size: 27px; }
.auth-complete-card p { margin: 0; color: var(--muted); }
.auth-complete-spinner { width: 42px; height: 42px; display: inline-block; border: 4px solid rgba(139, 123, 232, .22); border-top-color: var(--cyan); border-radius: 50%; animation: auth-spin .8s linear infinite; }
.auth-complete-link { display: inline-block; margin-top: 22px; color: var(--accent-light); }
@keyframes auth-spin { to { transform: rotate(360deg); } }
.page { background: transparent; }
.page-content { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.navbar { border-bottom: 0; background: transparent; }
.navbar-bg { background: transparent; }
.navbar-inner { min-height: 76px; padding-inline: max(18px, env(safe-area-inset-left)) max(18px, env(safe-area-inset-right)); }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; border: 0; padding: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.brand:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 10px; }
.brand img { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; box-shadow: var(--shadow-sm); }
.brand-title { display: block; font-weight: 780; font-size: 22px; line-height: 1.08; }
.brand-subtitle { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.page-shell { width: min(1180px, 100%); margin: 0 auto; padding: 22px clamp(16px, 3vw, 32px); }
.top-actions { display: flex; gap: 8px; align-items: center; }
.telegram-button { min-width: max-content; white-space: nowrap; border-radius: 13px; padding-inline: 14px; color: #fff !important; background: var(--telegram) !important; border-color: var(--telegram) !important; box-shadow: 0 8px 24px rgba(101, 170, 221, .22); }
.telegram-button:active { background: #5599cc !important; border-color: #5599cc !important; }
.telegram-icon { width: 17px; height: 17px; display: inline-block; background: currentColor; mask: url('/assets/icons/telegram.svg') center/contain no-repeat; -webkit-mask: url('/assets/icons/telegram.svg') center/contain no-repeat; }
.profile-button { min-width: 0; max-width: min(360px, 48vw); height: 48px; display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 9px; text-align: left; padding: 5px 9px; border-radius: 15px; }
.avatar-wrap { grid-row: 1 / 3; width: 36px; height: 36px; position: relative; }
.avatar-wrap img, .avatar-fallback { width: 36px; height: 36px; border-radius: 11px; object-fit: cover; }
.avatar-fallback { display: grid; place-items: center; background: #352f64; color: #d9d3ff; font-weight: 800; }
.profile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 780; font-size: 12px; }
.profile-meta { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero { margin: 0 0 18px; overflow: hidden; border: 1px solid var(--border); background: linear-gradient(140deg, rgba(139, 123, 232, .12), transparent 45%), var(--surface); }
.course-hero-media { padding: clamp(12px, 2vw, 18px) clamp(12px, 2vw, 18px) 0; }
.course-hero-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface-soft); }
.hero .card-content { padding: clamp(22px, 5vw, 44px); }
.eyebrow { color: var(--accent-light); text-transform: uppercase; letter-spacing: .18em; font-size: 11px; font-weight: 770; }
.hero h1 { margin: 8px 0 12px; font-size: clamp(31px, 5vw, 52px); line-height: 1.06; letter-spacing: -.035em; }
.hero p { max-width: 780px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-top: 28px; }
.hero-progress { flex: 1; min-width: min(500px, 100%); }
.progress-copy { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 14px; }
.progressbar { height: 9px; border-radius: 999px; overflow: hidden; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 24px 2px 12px; }
.section-head h2 { margin: 0; font-size: clamp(23px, 3vw, 32px); letter-spacing: -.025em; }
.section-head p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.course-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.course-card { margin: 0; border: 1px solid var(--border); overflow: hidden; cursor: pointer; transition: transform .18s ease, border-color .18s ease; }
.course-card:hover { transform: translateY(-2px); border-color: rgba(139, 123, 232, .42); }
.course-card-cover { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; border-bottom: 1px solid var(--border); background: var(--surface-soft); }
.course-percent { color: var(--accent-light); background: rgba(139, 123, 232, .18); border: 0; text-shadow: 0 .5px 1.5px #000, 0 0 3.5px #0009; box-shadow: 0 2px 7px #000b; backdrop-filter: blur(10px) brightness(.62); -webkit-backdrop-filter: blur(10px) brightness(.62); }
.course-card .card-content { padding: 20px; }
.course-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.course-title { font-weight: 750; font-size: 21px; line-height: 1.2; }
.course-copy { color: var(--muted); font-size: 14px; line-height: 1.56; margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.course-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.metric { padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255, 255, 255, .025); }
.metric strong { display: block; font-size: 20px; }
.metric span { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.course-progress { margin-top: 14px; }
.toolbar-card { margin: 0 0 14px; border: 1px solid var(--border); box-shadow: none; background: var(--surface-glass); }
.toolbar-content { padding: 12px; display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 10px; align-items: center; }
.exercise-search-wrap { position: relative; display: flex; align-items: center; min-width: 0; width: 100%; }
.exercise-search-wrap > svg { position: absolute; z-index: 1; left: 15px; width: 19px; height: 19px; color: var(--accent-light); pointer-events: none; }
#app .exercise-search-wrap #exercise-search { box-sizing: border-box; display: block; width: 100%; height: 48px; padding: 11px 42px 11px 48px !important; background: var(--surface-2) !important; border-color: var(--border-subtle) !important; border-radius: var(--radius-md) !important; font-size: 16px !important; }
.exercise-search-wrap #exercise-search::-webkit-search-cancel-button { display: none; }
.exercise-search-clear { position: absolute; right: 8px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; color: var(--accent-light); background: rgba(255, 255, 255, .08); font-size: 24px; line-height: 1; cursor: pointer; }
.exercise-search-clear[hidden] { display: none; }
#app input[type="text"], #app input[type="search"], #app input[type="number"], #app input[type="url"], #app input[type="email"], #app input[type="password"], #app input[type="tel"], #app textarea, #app select {
  background: var(--surface-2) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
  -webkit-text-fill-color: var(--text-primary);
  padding: 11px 13px !important;
  min-height: 44px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18);
}
#app input::placeholder, #app textarea::placeholder { color: var(--text-muted) !important; opacity: 1; }
#app input:focus, #app textarea:focus, #app select:focus {
  outline: 2px solid var(--accent-light) !important;
  outline-offset: 1px;
  border-color: var(--accent-light) !important;
  box-shadow: 0 0 0 4px rgba(139, 123, 232, .18);
}
#app input:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px var(--surface-2) inset !important; -webkit-text-fill-color: var(--text-primary) !important; }
.filters { display: flex; gap: 5px; padding: 5px; border: 1px solid var(--border); border-radius: 14px; overflow-x: auto; }
.filters .button { white-space: nowrap; border-radius: 10px; }
.module-chips { display: flex; gap: 7px; overflow-x: auto; padding: 2px 1px 12px; scrollbar-width: none; }
.module-chips::-webkit-scrollbar { display: none; }
.module-chips .chip { flex: 0 0 auto; cursor: pointer; }
.module-chips .chip.active { color: var(--text-primary); background: rgba(139, 123, 232, .22); border-color: var(--border-accent); }
.exercise-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.exercise-card { container-type: inline-size; min-width: 0; margin: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(174, 190, 222, .035), transparent 62%), var(--surface); box-shadow: none; cursor: pointer; overflow: hidden; transition: border-color var(--transition-fast), box-shadow var(--transition-fast); touch-action: manipulation; }
.exercise-card:hover { border-color: var(--border-accent); box-shadow: var(--shadow-sm); }
.exercise-card:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 4px; }
.exercise-cover-frame { position: relative; overflow: hidden; background: var(--surface-soft); }
.exercise-card .exercise-row { --exercise-media-width: 47%; position: relative; display: grid; grid-template-columns: minmax(0, var(--exercise-media-width)) minmax(0, 1fr); gap: 0; align-items: stretch; padding: 0; }
.exercise-tile-media { position: relative; min-width: 0; width: 100%; aspect-ratio: 16 / 9; align-self: start; overflow: hidden; border-radius: clamp(12px, 3.5cqw, 21px); background: var(--surface-soft); }
.exercise-card .exercise-tile-media > .responsive-cover { position: absolute; inset: 0; width: 100%; height: 100%; }
.exercise-card .exercise-tile-media .exercise-tile-cover { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Only the 16:9 media frame sizes the row; long text can never stretch the tile. */
.exercise-tile-content { --exercise-fit: 1; position: absolute; inset: 0 0 0 var(--exercise-media-width); display: flex; min-width: 0; min-height: 0; flex-direction: column; gap: calc(clamp(2px, .7cqw, 14px) * var(--exercise-fit)); padding: calc(clamp(3px, 1.2cqw, 16px) * var(--exercise-fit)) calc(clamp(4px, 1.5cqw, 20px) * var(--exercise-fit)); overflow: hidden; }
.exercise-tile-copy { flex: 0 0 auto; min-width: 0; }
.exercise-card .exercise-title { display: block; margin: 0; color: var(--text-primary); font-size: calc(clamp(12px, 3.8cqw, 22px) * var(--exercise-fit)); line-height: 1.15; letter-spacing: -.018em; font-weight: 750; overflow-wrap: anywhere; }
.exercise-card .exercise-tile-tags { flex: 0 0 auto; height: auto; min-height: 0; align-items: stretch; flex-wrap: wrap; gap: calc(clamp(2px, .7cqw, 7px) * var(--exercise-fit)); margin-top: 0; padding-bottom: clamp(4px, 1cqw, 10px); overflow: visible; }
.exercise-primary-tags { display: contents; }
.exercise-card .exercise-tile-tags .chip { display: inline-flex; flex: 0 1 auto; align-items: center; min-width: 0; max-width: 100%; height: auto; min-height: 0; margin: 0; padding: calc(1px * var(--exercise-fit)) calc(clamp(2px, .8cqw, 9px) * var(--exercise-fit)); border-radius: clamp(5px, 1.8cqw, 10px); font-size: calc(clamp(9px, 2.65cqw, 12px) * var(--exercise-fit)); line-height: 1.15; }
.exercise-card .exercise-tile-tags .chip-label { display: block; min-width: 0; max-width: 100%; font-size: inherit; white-space: normal; overflow-wrap: anywhere; overflow: visible; text-overflow: clip; line-height: inherit; }
.exercise-card .exercise-tile-tags .risk-low { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, transparent); background: color-mix(in srgb, var(--success) 8%, transparent); }
.exercise-card .exercise-tile-tags .risk-medium { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 40%, transparent); background: color-mix(in srgb, var(--warning) 8%, transparent); }
.exercise-card .exercise-tile-tags .risk-high { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 8%, transparent); }
.exercise-tile-footer { flex: 0 0 auto; margin-top: auto; padding-top: max(5px, calc(clamp(2px, .6cqw, 12px) * var(--exercise-fit))); border-top: 1px solid var(--border); }
.exercise-card .exercise-access-status { display: flex; grid-column: auto; align-items: center; flex-wrap: nowrap; gap: clamp(2px, .7cqw, 7px); min-width: 0; }
.exercise-card .exercise-access-status .chip { display: inline-flex; align-items: center; max-width: 100%; height: auto; min-height: clamp(18px, 5.3cqw, 31px); margin: 0; padding: 1px clamp(2px, .7cqw, 9px); border-radius: clamp(5px, 1.8cqw, 10px); font-size: clamp(9.5px, 2.7cqw, 12px); line-height: 1.15; }
.exercise-card .exercise-access-status .chip-label { min-width: 0; font-size: inherit; white-space: nowrap; overflow: visible; text-overflow: clip; line-height: inherit; }
.exercise-card .exercise-geo-badge { gap: 3px; }
.exercise-card .exercise-geo-badge .student-icon { width: 14px; height: 14px; flex-basis: 14px; }
/* Respond to the actual tile width, including the desktop sidebar and recommendations. */
@container (max-width: 340px) {
  .exercise-card .exercise-tile-content { padding-inline: calc(3px * var(--exercise-fit)); }
  .exercise-card .exercise-primary-tags > .chip { padding-inline: calc(1.5px * var(--exercise-fit)); }
}
@container (min-width: 340px) {
  .exercise-card .exercise-tile-content { padding-block: calc(clamp(5px, 1.7cqw, 16px) * var(--exercise-fit)); }
}
@container (min-width: 500px) {
  .exercise-card .exercise-row { --exercise-media-width: 48%; }
}
@container (min-width: 760px) {
  .exercise-card .exercise-row { --exercise-media-width: 51.923077%; }
  .exercise-card .exercise-tile-content { gap: calc(clamp(12px, 1.5cqw, 18px) * var(--exercise-fit)); padding: calc(clamp(18px, 2.2cqw, 27px) * var(--exercise-fit)) calc(clamp(20px, 2.6cqw, 32px) * var(--exercise-fit)); }
  .exercise-card .exercise-title { font-size: calc(clamp(24px, 3.2cqw, 36px) * var(--exercise-fit)); line-height: 1.24; }
  .exercise-card .exercise-tile-tags .chip { padding: calc(4px * var(--exercise-fit)) calc(9px * var(--exercise-fit)); font-size: calc(clamp(11px, 1.25cqw, 14px) * var(--exercise-fit)); line-height: 1.3; }
  .exercise-card .exercise-tile-footer { padding-top: max(5px, calc(clamp(12px, 1.6cqw, 18px) * var(--exercise-fit))); }
  .exercise-card .exercise-access-status .chip { min-height: 31px; padding: 5px 11px; font-size: clamp(12px, 1.35cqw, 15px); line-height: 1.3; }
  .exercise-card .exercise-geo-badge { gap: 4px; }
}
@media (max-width: 760px) {
  .exercise-card { border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .exercise-card { transition: none; }
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { border: 1px solid var(--border); }
.task-tag { color: var(--tag-color); border-color: color-mix(in srgb, var(--tag-color) 52%, transparent); background: color-mix(in srgb, var(--tag-color) 10%, transparent); }
.status-completed { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, transparent); background: color-mix(in srgb, var(--success) 10%, transparent); }
.status-in_progress, .status-needs_revision { color: var(--accent-light); border-color: var(--border-accent); background: rgba(139, 123, 232, .12); }
.status-skipped { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 40%, transparent); background: color-mix(in srgb, var(--warning) 10%, transparent); }
.risk-low { color: var(--success); }
.risk-medium { color: var(--warning); }
.risk-high { color: var(--danger); }
.difficulty-1 { --skill-color: #83e5b1; color: #83e5b1; border-color: rgba(61, 194, 124, .45); background: rgba(61, 194, 124, .1); }
.difficulty-2 { --skill-color: #9ed9fa; color: #9ed9fa; border-color: rgba(91, 179, 235, .45); background: rgba(91, 179, 235, .1); }
.difficulty-3 { --skill-color: #f4d889; color: #f4d889; border-color: rgba(232, 178, 76, .45); background: rgba(232, 178, 76, .1); }
.difficulty-4 { --skill-color: #ffb282; color: #ffb282; border-color: rgba(238, 126, 62, .45); background: rgba(238, 126, 62, .11); }
.difficulty-5 { --skill-color: #ff97b4; color: #ff97b4; border-color: rgba(235, 79, 129, .48); background: rgba(235, 79, 129, .12); }
.empty-state { margin: 0; text-align: center; padding: 34px 18px; color: var(--muted); border: 1px dashed var(--border); }
.detail-popup { --f7-popup-tablet-width: min(820px, 94vw); --f7-popup-tablet-height: min(940px, 94vh); }
.detail-popup .navbar { background: var(--surface-glass); border-bottom: 1px solid var(--border-subtle); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.detail-popup .navbar .title { font-weight: 680; }
.detail-popup .popup-close, .detail-popup .detail-close-link { min-height: 44px; color: var(--accent-light); }
.detail-body { width: min(760px, 100%); margin: 0 auto; padding: 20px 16px calc(46px + env(safe-area-inset-bottom)); }
.detail-featured-media { width: 100%; margin: 0 0 20px; border: 1px solid var(--border-accent); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.detail-featured-cover { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; }
.detail-title { font-size: clamp(28px, 5vw, 43px); line-height: 1.09; letter-spacing: -.035em; margin: 8px 0 16px; overflow-wrap: anywhere; }
.detail-difficulty { box-sizing: border-box; width: 100%; max-width: 100%; display: grid; grid-template-columns: 9px minmax(0, 1fr) auto auto; gap: 7px 10px; margin: 0 0 22px; padding: 14px 16px; color: var(--text); }
.detail-difficulty .skill-map-name { font-size: 14px; }
.detail-difficulty .skill-map-weight { align-self: center; }
.detail-difficulty-word { color: var(--skill-color); font-size: 13px; font-weight: 730; white-space: nowrap; }
.difficulty-hint { grid-column: 2 / -1; color: var(--text-secondary); font-size: 12px; line-height: 1.4; }
.detail-body .block-title { margin: 25px 0 9px; color: var(--text-primary); font-size: 18px; font-weight: 720; }
.detail-description { box-sizing: border-box; width: 100%; margin: 8px 0 20px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); white-space: pre-wrap; line-height: 1.7; color: var(--text-secondary); overflow-wrap: anywhere; }
.skill-map-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 8px 0 22px; }
.skill-map-item { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 11px 12px; border: 1px solid color-mix(in srgb, var(--skill-color) 58%, transparent); border-radius: var(--radius-md); background: color-mix(in srgb, var(--skill-color) 10%, var(--surface-1)); }
.detail-difficulty.skill-map-item { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto auto; gap: 7px 10px; padding: 14px 16px; }
.skill-map-dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: var(--skill-color); box-shadow: 0 0 10px var(--skill-color); }
.skill-map-name { min-width: 0; flex: 1; font-size: 13px; font-weight: 730; line-height: 1.3; }
.skill-map-weight { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.skill-map-bars { display: inline-flex; align-items: end; gap: 2px; height: 15px; }
.skill-map-bars i { display: block; width: 4px; height: 12px; border-radius: 3px; background: rgba(255, 255, 255, .2); }
.skill-map-bars i.filled { background: var(--skill-color); }
.skill-map-value { font-size: 11px; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.info-block { border: 1px solid var(--border); font-size: 14px; line-height: 1.6; }
.info-block.warning { border-color: rgba(255, 173, 59, .35); background: rgba(255, 173, 59, .07); }
.info-block.danger { border-color: rgba(255, 98, 98, .35); background: rgba(255, 98, 98, .07); }
.field-list { display: grid; gap: 9px; margin: 12px 0 20px; }
.field-item { padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.field-label { color: var(--muted); font-size: 12px; font-weight: 720; margin-bottom: 5px; }
.field-value { line-height: 1.58; white-space: pre-wrap; }
.media-swiper { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--app-bg); }
.media-swiper img, .media-swiper video { width: 100%; max-height: 520px; display: block; object-fit: contain; }
.media-caption { padding: 10px 14px; color: var(--muted); font-size: 12px; }
.report-composer { container-type: inline-size; position: relative; box-sizing: border-box; width: 100%; margin-top: 8px; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(145deg, #101627, #0e1220); transition: border-color .16s ease; }
.report-composer:focus-within { border-color: var(--border-accent); }
#app .report-composer .report-textarea { display: block; box-sizing: border-box; width: 100%; height: auto !important; aspect-ratio: 2.28 / 1; min-height: 130px !important; margin: 0; padding: clamp(14px, 2.8cqw, 22px) clamp(14px, 2.8cqw, 22px) calc(clamp(30px, 10cqw, 72px) + clamp(10px, 2.6cqw, 18px) + 12px) !important; border: 0 !important; border-radius: 16px !important; background: transparent !important; color: var(--text-primary); box-shadow: none !important; resize: vertical; font-size: 16px; line-height: 1.55; overflow-y: auto; }
#app .report-composer .report-textarea::placeholder { color: var(--text-secondary) !important; opacity: 1; }
#app .report-composer .report-textarea:focus { outline: 0 !important; box-shadow: none !important; }
.report-composer-tools { position: absolute; right: clamp(10px, 2.6cqw, 18px); bottom: clamp(10px, 2.6cqw, 18px); left: clamp(10px, 2.6cqw, 18px); display: flex; align-items: center; justify-content: space-between; gap: 12px; pointer-events: none; }
.report-upload-label { margin-right: auto; }
.report-composer-button { position: relative; box-sizing: border-box; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: clamp(30px, 10cqw, 72px); height: clamp(30px, 10cqw, 72px); padding: 0; border: 1px solid rgba(139, 123, 232, .72); border-radius: 50%; color: #e7e0ff; background: radial-gradient(circle at 50% 70%, rgba(139, 123, 232, .16), rgba(139, 123, 232, .035) 75%); box-shadow: 0 0 15px rgba(139, 123, 232, .08); cursor: pointer; pointer-events: auto; touch-action: manipulation; }
.report-composer-button::after { content: ''; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%); border-radius: 50%; }
.report-composer-button svg { display: block; width: 56%; height: 56%; flex: 0 0 auto; margin: 0; }
.report-composer-button:hover { background: rgba(139, 123, 232, .2); }
.report-composer-button:focus-visible, .report-voice-play:focus-visible, .report-voice-delete:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; }
.report-composer-button:disabled { opacity: .4; cursor: not-allowed; }
.report-mic-button.is-recording { color: #fff; border-color: var(--accent-light); background: rgba(139, 123, 232, .3); }
.report-voice-recorder { display: inline-flex; flex: 0 1 auto; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; pointer-events: auto; }
.report-voice-recorder[hidden] { display: none; }
.report-recording-dot { flex: 0 0 4px; width: 4px; height: 4px; margin-right: -6px; border-radius: 50%; background: #ff5e6e; animation: report-recording-blink 1.15s ease-in-out infinite; }
.report-recording-dot.is-paused { opacity: .4; box-shadow: none; animation: none; }
@keyframes report-recording-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .report-recording-dot { animation: none; } }
.report-recording-time { flex: 0 0 auto; min-width: 34px; color: var(--text-primary); font-size: clamp(13px, 2.8cqw, 17px); font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1; }
.report-recording-control { position: relative; display: flex; flex: 0 0 32px; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: rgba(139, 123, 232, .08); color: var(--text-secondary); cursor: pointer; }
.report-recording-control::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; }
.report-recording-control svg { display: block; flex: none; width: 17px; height: 17px; }
.report-recording-control:hover { background: rgba(139, 123, 232, .18); color: var(--text-primary); }
.report-recording-control:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; }
.report-voice-recorder .report-recording-copy { max-width: 150px; font-size: 11px; }
.report-recording-copy { display: grid; gap: 4px; min-width: 0; color: var(--text-secondary); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.report-recording-copy strong { color: var(--text-primary); }
.report-recording-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.report-recording-actions button, .report-voice-text-button { max-width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--border-accent); border-radius: 11px; background: rgba(139, 123, 232, .09); color: var(--accent-light); font: inherit; font-size: 13px; font-weight: 650; white-space: normal; cursor: pointer; }
.report-recording-actions button.is-primary { background: var(--accent); color: #fff; }
.report-recording-actions button:disabled { opacity: .55; cursor: wait; }
.report-voice-list { display: grid; gap: 10px; margin-top: 10px; min-width: 0; }
.report-voice-card { box-sizing: border-box; min-width: 0; width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(145deg, #121424, #10121e); }
/* The flat waveform baseline shares the controls' centre; timing sits below it. */
.report-voice-main { --voice-wave-height: 26px; display: grid; grid-template-columns: 34px minmax(0, 1fr) 32px 28px; align-items: start; gap: 8px; min-width: 0; }
.report-voice-main svg { display: block; width: 18px; height: 18px; }
.report-voice-mic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(139, 123, 232, .36); color: #ded6ff; }
.report-voice-play, .report-voice-delete { --voice-control-size: 34px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: var(--voice-control-size); height: var(--voice-control-size); margin-top: calc(var(--voice-wave-height) - var(--voice-control-size) / 2); padding: 0; border: 1px solid rgba(139, 123, 232, .85); border-radius: 50%; background: transparent; color: #d5cafa; cursor: pointer; }
.report-voice-play svg, .report-voice-delete svg { flex: none; }
.report-voice-delete { --voice-control-size: 32px; border-color: transparent; background: rgba(255, 255, 255, .045); color: var(--text-secondary); }
.report-voice-track { display: grid; gap: 2px; min-width: 0; }
.report-voice-meta { display: flex; align-items: center; min-width: 0; font-size: 11px; line-height: 16px; font-variant-numeric: tabular-nums; color: #8996a8; white-space: nowrap; }
.report-voice-duration { text-align: left; }
.report-voice-size { white-space: pre; }
.report-voice-size[hidden] { display: none !important; }
.report-voice-timeline { position: relative; min-width: 0; height: var(--voice-wave-height); border-radius: 4px; }
.report-voice-wave { display: flex; align-items: flex-end; justify-content: space-between; gap: 1px; width: 100%; height: var(--voice-wave-height); overflow: hidden; color: #68717f; }
.report-voice-wave i { flex: 1 1 2px; min-width: 1px; max-width: 3px; height: var(--wave-height); border-radius: 3px; background: currentColor; }
.report-voice-wave i.is-played { color: #ded8f4; }
.report-voice-wave-neutral { opacity: .55; }
.report-voice-card[aria-busy="true"] .report-voice-play { opacity: .45; cursor: wait; }
.report-voice-card[data-voice-draft] .report-recording-actions { margin-top: 10px; }
.report-voice-seek { position: absolute; z-index: 2; inset: 0; box-sizing: border-box; width: 100%; height: var(--voice-wave-height); margin: 0; opacity: 0; cursor: pointer; }
.report-voice-timeline:focus-within { outline: 2px solid var(--accent-light); outline-offset: 3px; }
.report-voice-caption { display: grid; gap: 2px; margin: 4px 0 0 44px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.report-voice-caption strong { font-weight: 500; color: var(--text-secondary); }
.report-voice-transcript { min-width: 0; margin-top: 10px; color: var(--text-secondary); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.report-voice-transcript summary { min-height: 24px; color: var(--accent-light); cursor: pointer; }
.report-voice-transcript[hidden] { display: none !important; }
.report-voice-transcript summary { display: none; }
.report-voice-transcribe { --voice-control-size: 32px; position: relative; display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: var(--voice-control-size); height: var(--voice-control-size); margin-top: calc(var(--voice-wave-height) - var(--voice-control-size) / 2); padding: 0; border: 1px solid rgba(139,123,232,.16); border-radius: 10px; background: rgba(139,123,232,.10); color: #ded8f4; cursor: pointer; transition: background .15s, border-color .15s; }
.report-voice-transcribe svg { flex: none; width: 20px; height: 20px; }
.report-voice-transcribe:hover, .report-voice-transcribe[aria-expanded="true"] { border-color: rgba(139,123,232,.42); background: rgba(139,123,232,.20); }
.report-voice-transcribe:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 3px; }
.report-voice-transcribe .report-voice-loading-outline { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); overflow: visible; pointer-events: none; }
.report-voice-loading-outline rect { width: calc(100% - 1.5px); height: calc(100% - 1.5px); fill: none; stroke: #eee9ff; stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 24 76; animation: report-transcribe-trace 1.3s linear infinite; }
.report-voice-card.is-transcript-open .report-voice-caption { display: none; }
@keyframes report-transcribe-trace { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -100; } }
@media (prefers-reduced-motion: reduce) { .report-voice-loading-outline rect { animation: none; } }
.report-voice-transcript-copy { margin: 10px 0; white-space: pre-wrap; }
.report-voice-transcript-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 10px; padding: 4px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); }
.report-voice-transcript-tab { flex: 1 1 90px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; min-height: 44px; padding: 6px 10px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--text-secondary); font: inherit; font-size: 12px; line-height: 1.35; text-align: center; overflow-wrap: anywhere; cursor: pointer; }
.report-voice-transcript-tab[aria-pressed="true"] { border-color: var(--border-accent); background: rgba(139,123,232,.16); color: var(--accent-light); }
.report-voice-transcript-tab:hover { background: rgba(139,123,232,.10); }
.report-voice-transcript-tab:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
.report-voice-transcript-language { font-size: 11px; color: var(--muted); }
.report-voice-transcript-tab[aria-pressed="true"] .report-voice-transcript-language { color: inherit; }
.report-voice-transcript-status { font-size: 11px; color: var(--muted); }
.report-transcript-label { display: grid; gap: 8px; }
.report-transcript-editor { display: block; box-sizing: border-box; width: 100%; min-height: 130px; margin-bottom: 8px; padding: 12px; border: 1px solid var(--border-accent); border-radius: 12px; background: var(--surface); color: var(--text-primary); font-size: 16px; line-height: 1.5; resize: vertical; }
@media (max-width: 380px) {
  .report-voice-card { padding: 10px; }
  .report-voice-main { grid-template-columns: 30px minmax(0, 1fr) 28px 26px; gap: 5px; }
  .report-voice-mic { width: 29px; height: 29px; }
  .report-voice-play, .report-voice-delete { --voice-control-size: 30px; }
  .report-voice-transcribe { --voice-control-size: 28px; }
  .report-voice-caption { margin-left: 35px; }
}
.status-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.status-actions .button { white-space: normal; min-height: 48px; height: auto; line-height: 1.25; padding-block: 8px; border-radius: var(--radius-md); }
.attachment-list { display: grid; gap: 8px; margin-top: 10px; }
.attachment-item { display: flex; align-items: center; gap: 10px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; min-width: 0; }
.attachment-item a { color: var(--text); }
.attachment-preview-link { flex: 0 0 76px; width: 76px; height: 76px; display: block; border-radius: 10px; overflow: hidden; background: #0c1720; }
.attachment-preview { display: block; width: 100%; height: 100%; object-fit: cover; }
.attachment-preview-fallback { display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.attachment-meta { flex: 1 1 auto; min-width: 0; display: grid; gap: 4px; }
.attachment-file { display: block; overflow-wrap: anywhere; font-size: 13px; line-height: 1.3; }
.attachment-size { color: var(--muted); font-size: 11px; }
.attachment-item .attachment-download { width: fit-content; max-width: 100%; color: var(--accent-light); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.attachment-delete { flex: 0 0 34px; width: 34px; height: 34px; padding: 0; border: 1px solid rgba(255, 91, 91, .55); border-radius: 50%; background: rgba(255, 68, 68, .14); color: #ff6b6b; font: 700 24px/30px Arial, sans-serif; cursor: pointer; }
.attachment-delete:active { transform: scale(.94); background: rgba(255, 68, 68, .28); }
.course-reset { margin: 30px 2px 12px; padding: 20px; border: 1px solid rgba(255, 98, 98, .3); border-radius: 18px; background: rgba(255, 98, 98, .06); }
.course-reset p { margin: 0 0 14px; color: var(--muted); line-height: 1.5; }
.course-reset .button { width: max-content; max-width: 100%; min-height: 44px; border-radius: 12px; }
.feedback { border-color: rgba(139, 123, 232, .35); background: rgba(139, 123, 232, .07); }
.detail-body [data-admin-feedback] .feedback { box-sizing: border-box; width: 100%; margin: 8px 0 18px; padding: 14px 16px; border-radius: 14px; }
.sync-note { color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 8px; }
.profile-popup {
  --f7-popup-tablet-width: 480px;
  --f7-popup-tablet-height: min(560px, calc(100vh - 48px));
}
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 14000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(180deg, rgba(7, 9, 13, .62), rgba(7, 9, 13, .94)), var(--app-landscape-image) center top / cover no-repeat;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.age-gate-card {
  width: min(480px, 100%);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  background: linear-gradient(140deg, rgba(139, 123, 232, .15), transparent 65%), var(--surface-glass);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}
.age-gate .profile-body { width: 100%; max-width: 440px; margin: 0 auto; }
.age-gate .profile-large { width: 72px; height: 72px; border-radius: 22px; color: var(--accent-light); background: rgba(139, 123, 232, .15); border: 1px solid var(--border-accent); font-size: 26px; }
.age-gate h2 { margin: 17px 0 8px; font-size: 27px; }
.age-gate p { color: var(--text-secondary); line-height: 1.55; }
.age-gate .button { width: 100%; margin-top: 21px; }
.push-consent { position: fixed; inset: 0; z-index: 13990; display: grid; place-items: center; padding: 20px; background: linear-gradient(180deg, rgba(7, 9, 13, .78), rgba(7, 9, 13, .96)), var(--app-landscape-image) center top / cover no-repeat; backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); }
.push-consent-card { box-sizing: border-box; width: min(440px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 28px 24px 22px; border: 1px solid var(--border-accent); border-radius: var(--radius-xl); background: linear-gradient(145deg, rgba(139, 123, 232, .15), transparent 75%), var(--surface-glass); box-shadow: var(--shadow-md); text-align: center; }
.push-consent-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px; border: 1px solid rgba(187, 173, 255, .5); border-radius: 20px; background: rgba(139, 123, 232, .2); font-size: 31px; }
.push-consent-icon svg { width: 29px; height: 29px; color: var(--accent-light); }
.push-consent-card h2 { margin: 0 0 10px; color: var(--text-primary); font-size: clamp(23px, 6vw, 29px); line-height: 1.2; }
.push-consent-card p { margin: 0 0 24px; color: var(--text-secondary); font-size: 15px; line-height: 1.55; }
.push-consent-card .button { box-sizing: border-box; width: 100%; min-height: 48px; height: auto; margin-top: 9px; padding: 10px 12px; border-radius: 12px; font-size: 15px; font-weight: 720; }
.push-consent-later { color: #d4cfff; }
.profile-body { padding: 28px 20px 34px; text-align: center; }
.profile-skills { display: grid; gap: 9px; width: 100%; margin: 22px 0 20px; text-align: left; }
.profile-skills h3 { margin: 0; font-size: 18px; }
.profile-skills > p { margin: 0 0 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.profile-skill { padding: 11px 12px; border: 1px solid color-mix(in srgb, var(--skill-color) 42%, transparent); border-radius: 13px; background: color-mix(in srgb, var(--skill-color) 8%, var(--surface)); }
.profile-skill-copy { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 12px; }
.profile-skill-copy strong { color: var(--skill-color); font-size: 13px; }
.profile-skill-copy span { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.profile-skill-track { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .12); }
.profile-skill-track > span { display: block; height: 100%; border-radius: inherit; background: var(--skill-color); box-shadow: 0 0 12px color-mix(in srgb, var(--skill-color) 55%, transparent); transition: width .35s ease; }
.profile-large { width: 88px; height: 88px; border-radius: 26px; margin: 0 auto; object-fit: cover; }
.profile-large.avatar-fallback { font-size: 30px; }
.role-row { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.offline-banner { position: sticky; top: 0; z-index: 20; margin: 0; border-radius: 0; background: color-mix(in srgb, var(--warning) 22%, var(--surface-2)); color: var(--warning); text-align: center; padding: 8px 12px; font-size: 12px; }

/* Student app shell and four primary learning destinations. */
.student-shell { background: var(--app-bg); color: var(--text-primary); }
.student-content { position: relative; isolation: isolate; background: var(--app-bg); padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
.student-content::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 560px;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 9, 13, .02) 0%, rgba(7, 9, 13, .08) 34%, var(--app-bg) 100%),
    linear-gradient(90deg, rgba(7, 9, 13, .46), rgba(7, 9, 13, .05) 80%),
    var(--app-landscape-image) 62% top / cover no-repeat;
}
.access-page { width: min(720px, 100%); min-height: min(640px, 76dvh); display: grid; align-items: center; }
.access-page .hero { margin: 0; border-color: var(--border-accent); background: var(--surface-glass); box-shadow: var(--shadow-md); }
.access-page .hero h1 { font-size: clamp(30px, 5vw, 43px); line-height: 1.12; }
.access-page .hero p { font-size: 15px; }
.access-page .hero-row { margin-top: 22px; }
.student-header { z-index: 30; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.student-header .navbar-bg { background: linear-gradient(180deg, rgba(7, 9, 13, .97), rgba(7, 9, 13, .84) 72%, rgba(7, 9, 13, .6)); }
.student-header .navbar-bg::before, .student-header .navbar-bg::after { content: none; }
.student-header .navbar-inner { min-height: 72px; display: flex; justify-content: space-between; gap: 12px; padding-inline: max(18px, env(safe-area-inset-left)) max(18px, env(safe-area-inset-right)); }
.student-header .navbar-inner .left, .ios .student-header .left, .md .student-header .left { display: flex; justify-content: flex-start; flex: 1 1 auto; gap: 8px; min-width: 0; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.student-header .navbar-inner .right, .ios .student-header .right, .md .student-header .right { padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.student-header .left .student-back { flex: 0 0 30px; width: 30px; min-height: 44px; padding: 0; margin: 0; justify-content: center; }
.student-brand { display: flex; align-items: center; flex: 0 0 auto; width: auto; gap: 10px; min-width: max-content; border: 0; padding: 0; background: none; color: var(--text-primary); cursor: pointer; }
.student-brand img { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px; object-fit: cover; box-shadow: var(--shadow-sm); }
.student-brand span { white-space: nowrap; font-size: 21px; font-weight: 760; letter-spacing: -.02em; }
.student-header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 11px; }
.student-notification-bell { position: relative; display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(187, 173, 255, .26); border-radius: 50%; background: rgba(25, 30, 47, .7); color: var(--text-primary); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03); cursor: pointer; }
.student-notification-bell:hover, .student-notification-bell[aria-expanded="true"] { border-color: var(--border-accent); background: rgba(139, 123, 232, .2); }
.student-notification-bell .student-icon { width: 23px; height: 23px; }
.student-notification-badge { position: absolute; top: -4px; right: -4px; display: grid; place-items: center; min-width: 19px; height: 19px; box-sizing: border-box; padding: 0 3px; border: 2px solid var(--app-bg); border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; line-height: 1; font-weight: 800; }
.student-notification-badge[hidden] { display: none; }
.student-avatar-button { box-sizing: border-box; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; grid-template: none; gap: 0; text-align: center; line-height: 1; width: 44px; height: 44px; min-width: 44px; padding: 0; overflow: hidden; position: relative; border: 2px solid var(--accent); border-radius: 50%; background: var(--surface-2); box-shadow: 0 0 0 3px rgba(139, 123, 232, .1); cursor: pointer; }
.student-avatar-button .avatar-wrap, .student-avatar-button .avatar-fallback, .student-avatar-button img { display: block; width: 100%; height: 100%; border-radius: 50%; }
.student-avatar-button .avatar-fallback { display: grid; place-items: center; }
.student-avatar-button img { object-fit: cover; }
.student-notification-overlay { position: fixed; inset: 0; z-index: 12900; }
.student-notification-backdrop { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: rgba(3, 5, 11, .55); cursor: default; }
.student-notification-panel { position: absolute; top: calc(76px + env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); box-sizing: border-box; width: min(390px, calc(100vw - 32px)); max-height: calc(100dvh - 98px - env(safe-area-inset-top)); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border-accent); border-radius: 22px; background: radial-gradient(circle at 100% 0%, rgba(139, 123, 232, .2), transparent 45%), #111725; box-shadow: 0 24px 70px rgba(0, 0, 0, .62); color: var(--text-primary); }
.student-notification-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 19px 19px 10px; }
.student-notification-head h2 { margin: 4px 0 0; font-size: 24px; line-height: 1.15; }
.student-notification-close { flex: 0 0 32px; width: 32px; height: 32px; padding: 0; border: 1px solid var(--border-subtle); border-radius: 10px; background: var(--surface-2); color: var(--text-primary); font-size: 22px; line-height: 1; cursor: pointer; }
.student-notification-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 0 19px 10px; color: var(--text-secondary); font-size: 12px; }
.student-notification-controls span { flex: 0 0 auto; white-space: nowrap; }
.student-notification-controls button, .student-notification-retry { border: 0; padding: 5px 0; background: none; color: var(--accent-light); font: inherit; font-weight: 700; cursor: pointer; }
.student-notification-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 8px; }
.student-notification-item { box-sizing: border-box; display: grid; grid-template-columns: 36px minmax(0, 1fr) 7px; align-items: start; gap: 10px; width: 100%; margin: 0; padding: 13px 10px; border: 0; border-top: 1px solid var(--border-subtle); border-radius: 9px; background: transparent; color: var(--text-primary); text-align: left; cursor: pointer; }
.student-notification-item.is-unread { background: rgba(139, 123, 232, .09); }
.student-notification-item:hover { background: rgba(139, 123, 232, .15); }
.student-notification-item-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: rgba(139, 123, 232, .19); color: var(--accent-light); }
.student-notification-item-icon svg { width: 19px; height: 19px; }
.student-notification-item-copy { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.student-notification-item-copy strong { font-size: 13px; line-height: 1.3; }
.student-notification-item-copy span { color: var(--text-secondary); font-size: 12px; line-height: 1.4; }
.student-notification-item-copy small { margin-top: 3px; color: var(--text-secondary); font-size: 11px; }
.student-notification-unread-dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(139, 123, 232, .18); }
.student-notification-empty, .student-notification-error { padding: 25px 19px; color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.student-notification-error { padding-block: 8px; color: #ffaaa9; }
.student-notification-retry { align-self: flex-start; margin: 0 19px 16px; }
.student-page-heading { margin: 0 0 22px; padding: 20px 2px 0; }
.student-page-heading .eyebrow { display: block; margin-bottom: 10px; }
.student-page-heading h1 { margin: 0; font-size: clamp(34px, 6vw, 56px); line-height: 1.03; letter-spacing: -.045em; font-weight: 770; overflow-wrap: anywhere; }
.student-page-heading p { margin: 10px 0 0; color: var(--text-secondary); font-size: clamp(14px, 2.3vw, 17px); line-height: 1.5; }
.student-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 28px 0 14px; }
.student-section-heading h2 { margin: 0; font-size: clamp(22px, 3.2vw, 30px); letter-spacing: -.025em; line-height: 1.2; }
.student-section-heading p { margin: 4px 0 0; color: var(--text-secondary); font-size: 14px; }
.student-section-heading .button, .student-section-heading a { flex: 0 0 auto; }
.student-empty { padding: 28px 20px; color: var(--text-secondary); border: 1px dashed var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface-glass); text-align: center; }
.student-empty strong { display: block; margin-bottom: 5px; color: var(--text-primary); }

.student-tabbar.toolbar { position: fixed; z-index: 120; left: 0; right: 0; bottom: 0; height: calc(82px + env(safe-area-inset-bottom)); padding: 0 max(12px, env(safe-area-inset-left)) env(safe-area-inset-bottom) max(12px, env(safe-area-inset-right)); background: linear-gradient(180deg, transparent, rgba(7, 9, 13, .84) 25%); box-shadow: none; }
.student-tabbar .toolbar-inner { position: relative; width: min(650px, 100%); height: 72px; margin: 0 auto; padding: 7px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; background: rgba(15, 20, 32, .96); border: 1px solid var(--border-subtle); border-radius: 22px; box-shadow: var(--shadow-md); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.student-tab { position: relative; top: 3px; min-width: 0; min-height: 55px; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 5px 2px !important; border: 0; color: var(--text-secondary) !important; background: transparent; border-radius: 15px; font-size: 12px; line-height: 1.12; font-weight: 580; text-decoration: none; cursor: pointer; transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast); }
.student-tab .tab-icon, .student-tab svg { display: block; width: 22px; height: 22px; flex: 0 0 22px; stroke-width: 1.8; }
.student-tab.active { color: var(--accent-light) !important; background: rgba(139, 123, 232, .2); box-shadow: inset 0 0 0 1px rgba(162, 137, 255, .13); }
.student-tab:active { transform: scale(.95); }
@media (min-width: 901px) { .student-tab { top: 0; } }

.welcome-block { margin: 0 0 22px; padding: 24px 2px 0; }
.welcome-block .eyebrow { display: block; margin-bottom: 7px; }
.welcome-block h1 { margin: 0; font-size: clamp(35px, 6vw, 54px); line-height: 1.06; letter-spacing: -.045em; font-weight: 780; overflow-wrap: anywhere; }
.welcome-block p { max-width: 560px; margin: 12px 0 0; color: var(--text-secondary); font-size: 16px; line-height: 1.5; }
.welcome-block .greeting-subtitle, .profile-identity .greeting-subtitle { overflow-wrap: anywhere; white-space: pre-line; }
.continue-card, .progress-hero, .profile-hero { margin: 0; overflow: hidden; background: radial-gradient(circle at 96% 0%, rgba(153, 105, 255, .3), transparent 26%), linear-gradient(135deg, rgba(139, 123, 232, .17), rgba(139, 123, 232, .025) 52%), var(--surface-glass); border: 1px solid var(--border-accent); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); }
.continue-card .card-content, .progress-hero .card-content, .profile-hero .card-content { padding: clamp(18px, 3vw, 26px); }
.continue-card { container-type: inline-size; border-radius: clamp(22px, 4.7vw, 44px); border-color: rgba(173, 143, 255, .85); background: radial-gradient(ellipse at 98% 0%, rgba(140, 93, 236, .22), transparent 48%), linear-gradient(135deg, rgba(150, 115, 240, .15), rgba(18, 23, 38, .82) 58%), var(--surface-glass); box-shadow: inset 0 1px 0 rgba(222, 206, 255, .2), 0 15px 35px rgba(0, 0, 0, .24), 0 0 22px rgba(139, 89, 250, .1); }
.continue-card .card-content { padding: clamp(16px, 3.6vw, 36px); padding: clamp(16px, 4cqi, 36px); }
.continue-card .eyebrow, .progress-hero .eyebrow { display: block; margin-bottom: 13px; }
.continue-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; margin-bottom: clamp(14px, 2cqi, 20px); }
.continue-heading .eyebrow { min-width: 0; margin-bottom: 0; font-size: 11px; font-size: clamp(10px, 2.5cqi, 23px); line-height: 1.5; letter-spacing: .18em; overflow-wrap: anywhere; }
.continue-cap { box-sizing: border-box; display: grid; flex: 0 0 44px; flex: 0 0 clamp(40px, 9cqi, 82px); place-items: center; width: 44px; width: clamp(40px, 9cqi, 82px); height: 44px; height: clamp(40px, 9cqi, 82px); border: 1px solid rgba(171, 134, 255, .65); border-radius: 14px; border-radius: clamp(13px, 3cqi, 26px); background: rgba(139, 123, 232, .1); color: var(--accent-light); box-shadow: inset 0 1px 0 rgba(224, 208, 255, .08); }
.continue-cap svg { width: 62%; height: 62%; }
.continue-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; display: block; object-fit: contain; border-radius: var(--radius-md); border-radius: clamp(12px, 3cqi, 23px); background: var(--surface-2); }
.continue-layout { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 12px; gap: clamp(12px, 3cqi, 26px); align-items: center; }
.continue-layout .course-cover-frame { min-width: 0; width: 100%; align-self: start; }
.continue-copy { min-width: 0; display: grid; gap: 12px; gap: clamp(12px, 2.4cqi, 22px); }
.continue-card h2 { margin: 0; padding-block: 3px; font-size: clamp(19px, 3.8vw, 34px); font-size: clamp(19px, 4.4cqi, 40px); line-height: 1.22; font-weight: 760; letter-spacing: -.02em; overflow-wrap: anywhere; }
.continue-stats { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; }
.continue-stats strong { min-width: 0; color: var(--text-primary); font-size: 12px; font-size: clamp(12px, 2.9cqi, 26px); line-height: 1.35; font-weight: 720; overflow-wrap: anywhere; }
.continue-percent { box-sizing: border-box; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-width: 48px; min-width: clamp(48px, 11.5cqi, 104px); min-height: 28px; min-height: clamp(28px, 5.8cqi, 52px); margin-left: auto; padding: 4px 10px; padding: 4px clamp(9px, 1.5cqi, 15px); border: 1px solid rgba(185, 151, 255, .85); border-radius: 999px; background: rgba(113, 74, 198, .12); color: var(--accent-light); font-size: 15px; font-size: clamp(15px, 3.1cqi, 28px); line-height: 1.1; font-weight: 680; font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(224, 208, 255, .12); }
.continue-card .continue-button { box-sizing: border-box; width: 100%; min-height: 48px; min-height: clamp(48px, 9.2cqi, 82px); height: auto; margin-top: 18px; margin-top: clamp(18px, 2.7cqi, 25px); padding: 12px 16px; display: flex; align-items: center; justify-content: center; gap: 12px; gap: clamp(12px, 3.2cqi, 29px); border-radius: 18px; border-radius: clamp(16px, 4cqi, 32px); background: linear-gradient(110deg, #ac8aff, #704ce6) !important; color: #fff; font-size: 17px; font-size: clamp(17px, 3.5cqi, 32px); font-weight: 700; line-height: 1.25; white-space: normal; box-shadow: inset 0 1px 0 rgba(226, 209, 255, .18), 0 7px 22px rgba(131, 83, 248, .2); }
.continue-button svg { display: block; flex: 0 0 24px; flex: 0 0 clamp(24px, 4.8cqi, 43px); width: 24px; width: clamp(24px, 4.8cqi, 43px); height: 24px; height: clamp(24px, 4.8cqi, 43px); }
.home-course-list { display: grid; gap: 12px; }
.home-course-list .course-card { max-width: none; }
.home-progress-card { box-sizing: border-box; width: 100%; margin: 20px 0 0; padding: 0; overflow: hidden; border: 1px solid var(--border-accent); border-radius: var(--radius-xl); background: radial-gradient(circle at 96% 0%, rgba(153, 105, 255, .28), transparent 32%), linear-gradient(135deg, rgba(139, 123, 232, .15), transparent 60%), var(--surface-glass); box-shadow: var(--shadow-md); }
.home-progress-card .card-content { padding: clamp(18px, 3vw, 26px); }
.home-progress-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.home-progress-heading > div { min-width: 0; }
.home-progress-card .eyebrow { display: block; margin-bottom: 9px; }
.home-progress-card h2 { margin: 0; font-size: clamp(21px, 3vw, 29px); line-height: 1.25; overflow-wrap: anywhere; }
.home-progress-icon { display: grid; flex: 0 0 44px; place-items: center; width: 44px; height: 44px; border: 1px solid var(--border-accent); border-radius: 14px; background: rgba(139, 123, 232, .12); color: var(--accent-light); }
.home-progress-summary { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 19px 0 10px; }
.home-progress-summary strong { min-width: 0; font-size: clamp(17px, 3vw, 24px); line-height: 1.3; overflow-wrap: anywhere; }
.home-progress-value { flex: 0 0 auto; color: var(--accent-light); font-size: 24px; font-weight: 750; line-height: 1.2; }
.home-progress-card p { margin: 12px 0 18px; color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.home-progress-card .home-progress-button { box-sizing: border-box; display: flex; justify-content: center; align-items: center; gap: 12px; width: 100%; min-height: 46px; height: auto; padding: 12px 16px; border-radius: var(--radius-md); background: linear-gradient(120deg, #ac8aff, #7154e4) !important; }
.student-section-link { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 40px; padding: 6px; border: 0; background: transparent; color: var(--accent-light); font-size: 13px; font-weight: 650; text-decoration: none; cursor: pointer; }
.student-section-link svg { width: 17px; height: 17px; }
.student-section-link:hover { color: #fff; }
.catalogue-tabs { box-sizing: border-box; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 0 0 18px; padding: 7px; overflow: hidden; background: var(--surface-glass); border: 1px solid var(--border-subtle); border-radius: 18px; }
.catalogue-tabs button { box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-width: 0; min-height: 43px; height: auto; padding: 7px 4px; border: 0; border-radius: 11px; color: var(--text-secondary); background: transparent; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; white-space: nowrap; cursor: pointer; }
.catalogue-tabs .catalogue-tab-label { min-width: 0; }
.catalogue-tabs .catalogue-tab-count { box-sizing: border-box; display: inline-grid; flex: 0 0 auto; place-items: center; width: 22px; height: 22px; border: 1px solid rgba(174, 159, 249, .22); border-radius: 50%; background: rgba(139, 123, 232, .16); color: var(--accent-light); font-size: 11px; line-height: 1; font-weight: 750; font-variant-numeric: tabular-nums; }
.catalogue-tabs button.is-active, .catalogue-tabs button[aria-pressed="true"] { color: #fff; background: linear-gradient(125deg, var(--accent-light), var(--accent-dark)); box-shadow: var(--shadow-accent); }
.catalogue-tabs button.is-active .catalogue-tab-count, .catalogue-tabs button[aria-pressed="true"] .catalogue-tab-count { border-color: rgba(255, 255, 255, .36); background: rgba(20, 12, 62, .22); color: #fff; }
@media (max-width: 430px) {
  .catalogue-tabs button { flex-direction: column-reverse; gap: 3px; min-height: 57px; padding: 5px 2px; font-size: 12px; }
  .catalogue-tabs .catalogue-tab-count { width: 20px; height: 20px; font-size: 10px; }
}
.catalogue-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.catalogue-card { position: relative; }
.catalogue-featured { min-width: 0; align-self: start; }
.catalogue-featured .course-cover-frame { display: block; margin: 0; width: 100%; }
.catalogue-featured .course-card-cover { max-height: none; aspect-ratio: 16 / 9; object-fit: contain; }
.catalogue-card .course-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; color: var(--text-secondary); font-size: 12px; }
.catalogue-card .metric { display: flex; min-width: 0; gap: 4px; align-items: center; padding: 0; border: 0; background: none; }
.catalogue-card .metric svg { flex: 0 0 17px; width: 17px; height: 17px; margin-right: 2px; }
.catalogue-card .metric strong { display: inline; font-size: 13px; color: var(--text-primary); }
.catalogue-card .metric span { display: inline; min-width: 0; margin: 0; font-size: 12px; line-height: 1.35; white-space: normal; overflow-wrap: anywhere; }
.catalogue-card .card-content { min-width: 0; padding: 18px; }
.catalogue-card .course-copy { margin-top: 6px; -webkit-line-clamp: 2; }
.catalogue-card .course-progress { margin-top: 14px; }
.catalogue-card .course-top { align-items: center; min-height: 45px; padding-right: 56px; }
.catalogue-card .course-title { overflow-wrap: anywhere; }
.catalogue-featured .card-content { position: relative; }
.catalogue-featured .course-percent { position: absolute; top: 12px; right: 12px; z-index: 1; box-sizing: border-box; display: inline-flex; justify-content: center; align-items: center; min-width: 44px; min-height: 25px; padding: 4px 9px; border-radius: 999px; font-size: 13px; line-height: 1; white-space: nowrap; }
.course-open { position: absolute; right: 18px; top: 18px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #b995ff, #785af1); box-shadow: 0 5px 20px rgba(139, 89, 250, .42); }
.course-open svg { width: 19px; height: 19px; }
.catalogue-featured .course-open { width: 45px; height: 45px; }
.student-back { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; margin-bottom: 8px; border: 0; background: transparent; color: var(--accent-light); font-size: 14px; font-weight: 650; line-height: 1.2; cursor: pointer; }
.student-back svg { width: 18px; height: 18px; }
.student-course-back { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; margin-bottom: 12px; padding: 4px 0; border: 0; color: var(--accent-light); background: transparent; font-size: 14px; font-weight: 650; cursor: pointer; }
.student-course-back svg { width: 18px; height: 18px; }
.course-detail-page .hero { background: var(--surface-glass); }
.course-detail-page .hero .card-content { padding: clamp(18px, 3vw, 28px); }

.progress-hero { padding: 0; }
.progress-hero h2 { margin: 0 0 13px; font-size: clamp(26px, 4vw, 38px); }
.progress-hero .progress-copy { font-size: 15px; }
.progress-hero-main { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.progress-hero-main strong { font-size: clamp(22px, 4vw, 34px); line-height: 1.2; }
.progress-hero-main span { color: var(--accent-light); font-size: 23px; font-weight: 730; }
.progress-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 22px; }
.progress-stat-grid .student-stat-card { width: 100%; margin: 0; }
.student-stat-card { min-width: 0; padding: 17px; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface-glass); }
.student-stat-card .card-content { padding: 0; }
.student-stat-card svg { display: block; width: 26px; height: 26px; margin-bottom: 16px; color: var(--accent-light); }
.student-stat-card strong { display: block; font-size: clamp(26px, 4vw, 38px); line-height: 1.1; font-variant-numeric: tabular-nums; }
.student-stat-card span { display: block; margin-top: 7px; color: var(--text-secondary); font-size: 13px; }
.progress-course-list, .progress-skills { display: grid; gap: 11px; }
.progress-skills { margin: 0; }
.progress-course-list .course-card { margin: 0; }
.progress-course-row { box-sizing: border-box; width: 100%; margin: 0; padding: 15px 18px; display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; text-align: left; color: var(--text-primary); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--surface-glass); cursor: pointer; }
.progress-course-row:hover { border-color: var(--border-accent); }
.progress-course-row .progressbar { grid-column: 1 / -1; margin-top: 2px; }
.progress-course-title { min-width: 0; overflow-wrap: anywhere; font-weight: 660; }
.progress-course-percent { color: var(--accent-light); font-variant-numeric: tabular-nums; }
.progress-skills .profile-skill { background: var(--surface-glass); padding: 14px; }
.progress-skills .card-content { padding: 18px; }
.progress-skills .eyebrow { display: block; margin-bottom: 21px; }
.progress-skills-layout { display: grid; grid-template-columns: minmax(130px, .38fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 30px); align-items: center; }
.progress-ring { width: min(100%, 205px); aspect-ratio: 1; margin: 0 auto; padding: 14px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(from -90deg, var(--accent-light) var(--progress-pct), rgba(113, 124, 163, .22) 0); box-shadow: 0 0 20px rgba(139, 89, 250, .13); }
.progress-ring-inner { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; background: var(--app-bg); text-align: center; }
.progress-ring-inner strong { color: var(--text-primary); font-size: clamp(22px, 4vw, 34px); line-height: 1.1; }
.progress-ring-inner span { max-width: 85px; margin-top: 5px; color: var(--text-secondary); font-size: 11px; line-height: 1.2; }
.progress-skills-layout .profile-skills { min-width: 0; margin: 0; }
.profile-hero { display: flex; align-items: center; gap: 18px; padding: 22px; }
.profile-avatar { width: 82px; height: 82px; flex: 0 0 82px; position: relative; }
.profile-avatar-root { display: flex; flex: 0 0 auto; }
button.profile-avatar { box-sizing: border-box; padding: 0; border: 0; background: transparent; border-radius: 50%; color: var(--text-primary); appearance: none; -webkit-appearance: none; }
.profile-avatar-editable { cursor: pointer; isolation: isolate; }
.profile-avatar-editable:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 7px; }
.profile-avatar-empty .avatar-initial { filter: blur(3px); opacity: .68; }
.profile-avatar-camera { box-sizing: border-box; position: absolute; z-index: 2; inset: 0; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-width: 44px; min-height: 44px; border-radius: 50%; color: #f4efff; background: rgba(24, 19, 45, .2); }
.profile-avatar-camera svg { display: block; width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .65)); }
.profile-avatar-editable:not(.profile-avatar-empty) .profile-avatar-camera { inset: auto -2px -2px auto; width: 32px; height: 32px; min-width: 0; min-height: 0; border: 1px solid rgba(197, 182, 255, .55); background: #312747; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.profile-avatar-editable:not(.profile-avatar-empty) .profile-avatar-camera svg { width: 18px; height: 18px; }
.profile-avatar-spinner { box-sizing: border-box; width: 24px; height: 24px; border: 2px solid rgba(242, 233, 255, .3); border-top-color: #fff; border-radius: 50%; animation: profile-avatar-loading .8s linear infinite; }
.profile-avatar-editable:not(.profile-avatar-empty) .profile-avatar-spinner { width: 18px; height: 18px; }
.profile-avatar.is-uploading { cursor: wait; }
@keyframes profile-avatar-loading { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .profile-avatar-spinner { animation-duration: 1.8s; } }
.profile-identity { min-width: 0; }
.profile-hero .profile-large, .profile-hero .avatar-fallback { width: 82px; height: 82px; border-radius: 50%; margin: 0; flex: 0 0 82px; }
.profile-hero h2 { margin: 0; font-size: clamp(25px, 4vw, 38px); overflow-wrap: anywhere; }
.profile-hero p { margin: 6px 0 0; color: var(--text-secondary); overflow-wrap: anywhere; }
.profile-summary { margin: 18px 0 0; color: var(--text-secondary); }
.profile-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 18px 0 0; }
.profile-skill-card { padding: 18px; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface-glass); }
.profile-menu { display: grid; gap: 8px; }
.profile-menu > .student-section-heading { display: block; margin: 24px 0 7px; }
.profile-menu-list { display: grid; gap: 8px; }
.profile-menu-row { width: 100%; min-height: 58px; display: flex; align-items: center; gap: 14px; padding: 11px 15px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--surface-glass); color: var(--text-primary); text-align: left; text-decoration: none; cursor: pointer; }
.profile-menu-row:not(button):not(a) { cursor: default; }
.profile-menu-row:not(button):not(a):hover { border-color: var(--border-subtle); background: var(--surface-glass); }
.profile-menu-row:hover { border-color: var(--border-accent); background: var(--surface-2); }
.profile-menu-row svg { flex: 0 0 21px; width: 21px; height: 21px; color: var(--accent-light); }
.profile-menu-row span { min-width: 0; flex: 1; }
.profile-menu-row > .profile-menu-icon { flex: 0 0 38px; width: 38px; }
.profile-menu-row small { display: block; margin-top: 2px; color: var(--text-secondary); }
.profile-menu-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; color: var(--accent-light); border-radius: 12px; background: rgba(139, 123, 232, .16); }
.profile-menu-copy { min-width: 0; flex: 1; }
.profile-menu-copy strong { display: block; font-size: 14px; }
.profile-menu-copy small { display: block; margin-top: 3px; font-size: 12px; }
.profile-logout { border-color: color-mix(in srgb, var(--danger) 36%, transparent); color: var(--danger); }
.profile-menu-row .button { flex: 0 0 auto; max-width: 175px; white-space: normal; text-align: center; font-size: 12px; line-height: 1.2; }
.profile-summary { margin: 18px 0 0; }
.profile-summary .card-content { padding: 18px; }
.profile-summary .student-section-heading { margin: 0; }
.profile-stats .student-stat-card { min-width: 0; margin: 0; padding: 4px 14px; border: 0; border-right: 1px solid var(--border-subtle); border-radius: 0; background: transparent; }
.profile-stats .student-stat-card:last-child { border-right: 0; }
.profile-stats .student-stat-card svg { margin-bottom: 11px; }
.profile-stats .student-stat-card strong { font-size: clamp(13px, 2.7vw, 21px); overflow-wrap: anywhere; }
.profile-stats .student-stat-card span { font-size: 12px; line-height: 1.35; }
.student-profile > .student-page-heading { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.student-profile .profile-hero { margin-top: 4px; padding: 12px 0 8px; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.student-profile .profile-hero .profile-large, .student-profile .profile-hero .avatar-fallback { border: 3px solid var(--accent-light); box-shadow: 0 0 0 4px rgba(139, 123, 232, .16), 0 0 24px rgba(139, 123, 232, .22); }
.student-profile .profile-hero .role-row { justify-content: flex-start; margin-top: 7px; }
.student-profile .profile-hero .role-row .chip { background: rgba(139, 123, 232, .18); border-color: var(--border-accent); color: var(--accent-light); }
.student-profile .profile-summary { margin-top: 18px; border-color: var(--border-accent); background: radial-gradient(circle at 94% 0%, rgba(139, 95, 255, .18), transparent 40%), var(--surface-glass); }
.student-profile .profile-summary .student-section-heading { width: 100%; margin: 0; align-items: center; justify-content: space-between; }
.student-profile .profile-summary .eyebrow { font-size: 10px; letter-spacing: .12em; white-space: nowrap; }
.profile-skill-card { margin: 16px 0 0; }
.profile-skill-card .profile-skills { margin: 0; }
.profile-skill-card .card-content { padding: 18px; }

@media (max-width: 760px) {
  .course-grid { grid-template-columns: 1fr; }
  .catalogue-list { grid-template-columns: 1fr; }
  .toolbar-content { grid-template-columns: 1fr; }
  .filters { width: 100%; }
  .brand-subtitle { display: none; }
  .page-shell { padding-top: 5px; }
  .home-course-list { grid-template-columns: 1fr; }
  .student-page-heading { margin-bottom: 15px; padding-top: 9px; }
  .student-page-heading p { margin-top: 6px; }
  .welcome-block { margin-bottom: 19px; padding-top: 9px; }
  .welcome-block p { margin-top: 9px; }
  .catalogue-tabs { margin-bottom: 13px; }
  .home-courses-section .student-section-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2px 8px; }
  .home-courses-section .student-section-heading > div { display: contents; }
  .home-courses-section .student-section-heading h2 { grid-column: 1; grid-row: 1; }
  .home-courses-section .student-section-heading p { grid-column: 1 / -1; grid-row: 2; margin-top: 3px; }
  .home-courses-section .student-section-link { grid-column: 2; grid-row: 1; }
  .progress-skills-layout { grid-template-columns: 118px minmax(0, 1fr); gap: 14px; }
  .progress-ring { padding: 10px; }
  .progress-skills-layout .profile-skill { padding: 9px 10px; }
  .progress-skills-layout .profile-skill-copy { flex-wrap: wrap; gap: 2px 8px; }
}

@media (max-width: 480px) {
  .navbar-inner { min-height: 64px; padding-inline: 8px; }
  .student-header .navbar-inner { min-height: 67px; padding-inline: 17px; }
  .student-brand span { font-size: 19px; }
  .student-avatar-button { width: 40px; height: 40px; min-width: 40px; }
  .student-notification-bell { flex-basis: 40px; width: 40px; height: 40px; }
  .student-notification-panel { top: calc(70px + env(safe-area-inset-top)); max-height: calc(100dvh - 84px - env(safe-area-inset-top)); }
  .brand img { width: 38px; height: 38px; border-radius: 12px; }
  .student-header .student-brand img { width: 42px; height: 42px; }
  .brand-title { font-size: 14px; }
  .telegram-button { min-height: 40px; height: auto; padding: 8px 10px; font-size: 12px; }
  .profile-button { max-width: 58vw; }
  .hero .card-content { padding: 20px; }
  .hero h1 { font-size: 33px; }
  .course-stats { grid-template-columns: 1fr 1fr; }
  .metric { padding: 8px; }
  .metric strong { font-size: 17px; }
  .status-actions { grid-template-columns: 1fr; }
  .detail-body { padding-inline: 12px; }
  .skill-map-list { grid-template-columns: 1fr; margin-inline: 4px; }
  .detail-popup, .profile-popup { --f7-popup-border-radius: 0; }
  .age-gate { padding: 16px; }
  .age-gate-card { width: 100%; max-height: calc(100dvh - 32px); }
  .student-page-heading { padding-top: 9px; }
  .student-page-heading h1 { font-size: 38px; }
  .welcome-block { padding-top: 9px; }
  .welcome-block h1 { font-size: 38px; }
  .catalogue-featured .course-card-cover { max-height: none; aspect-ratio: 16 / 9; }
  .catalogue-featured .card-content { padding: 15px 16px; }
  .catalogue-featured .course-top { min-height: 38px; padding-right: 48px; }
  .catalogue-featured .course-copy { margin-top: 4px; line-height: 1.35; }
  .catalogue-featured .course-stats { margin-top: 10px; }
  .catalogue-featured .course-progress { margin-top: 9px; }
  .catalogue-featured .course-stats { gap: 5px 11px; }
  .catalogue-featured .course-title { font-size: 21px; }
  .catalogue-featured .course-open { width: 38px; height: 38px; right: 14px; top: 15px; }
  .progress-stat-grid { gap: 8px; }
  .progress-stat-grid .student-stat-card { padding: 12px; }
  .progress-stat-grid .student-stat-card strong { font-size: 25px; }
  .progress-stat-grid .student-stat-card span { font-size: 11px; }
  .profile-hero { padding: 17px; gap: 14px; }
  .profile-hero h2 { font-size: 25px; }
  .student-profile .profile-hero { padding: 16px 2px 11px; }
  .student-profile .profile-hero h2 { font-size: clamp(24px, 6.2vw, 31px); }
  .student-profile .profile-hero p { line-height: 1.4; }
  .student-profile .profile-hero .profile-large, .student-profile .profile-hero .avatar-fallback { width: 88px; height: 88px; }
  .student-profile .profile-avatar { width: 88px; height: 88px; flex-basis: 88px; }
  .student-profile .profile-summary .card-content { padding: 17px 15px; }
  .profile-stats .student-stat-card { padding-inline: 8px; }
  .profile-stats .student-stat-card strong { font-size: 13px; }
  .profile-stats .student-stat-card span { font-size: 11px; }
  .profile-menu-row { gap: 10px; padding: 10px 12px; }
  .profile-menu-row .button { max-width: 118px; min-height: 42px; padding-inline: 5px; font-size: 11px; }
  .detail-difficulty.skill-map-item { grid-template-columns: 9px minmax(0, 1fr) auto; }
  .detail-difficulty-word { grid-column: 2 / -1; }
  .difficulty-hint { grid-column: 2 / -1; }
}

@media (max-width: 350px) {
  .brand-title { display: block; }
  .brand img { width: 34px; height: 34px; }
  .telegram-button { font-size: 11px; padding-inline: 8px; }
  .telegram-icon { width: 15px; height: 15px; }
  .navbar-inner { padding-inline: 6px; }
  .student-header .navbar-inner { padding-inline: 12px; }
  .student-tabbar.toolbar { padding-inline: 6px; }
  .student-tabbar .toolbar-inner { border-radius: 17px; }
  .student-tab { font-size: 10px; }
  .student-tab .tab-icon, .student-tab svg { width: 20px; height: 20px; }
  .catalogue-tabs button { font-size: 11px; }
  .catalogue-featured .course-stats { gap: 8px 10px; }
  .catalogue-featured .metric strong, .catalogue-featured .metric span { font-size: 11px; }
  .progress-skills-layout { grid-template-columns: 1fr; gap: 18px; }
  .progress-ring { width: 120px; }
  .profile-stats .student-stat-card { padding-inline: 5px; }
  .profile-stats .student-stat-card strong { font-size: 11px; }
  .profile-menu-row { flex-wrap: wrap; }
  .profile-menu-row .button { width: 100%; max-width: none; }
}

@media (min-width: 1024px) {
  .student-content { padding-left: 230px; padding-bottom: 50px; }
  .student-tabbar.toolbar { top: 100px; bottom: auto; left: 18px; right: auto; width: 205px; height: auto; padding: 0; background: none; }
  .student-tabbar .toolbar-inner { width: 100%; height: auto; padding: 9px; display: flex; flex-direction: column; gap: 4px; border-radius: var(--radius-lg); }
  .student-tab { width: 100%; min-height: 52px; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 8px 15px !important; font-size: 14px; }
  .student-tab .tab-icon, .student-tab svg { width: 20px; height: 20px; flex-basis: 20px; }
  .student-header .navbar-inner { padding-left: 28px; padding-right: 32px; }
  .student-content .page-shell { width: min(1180px, 100%); padding-inline: 32px; }
  .student-home .home-course-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalogue-featured { grid-column: auto; }
  .home-courses-section .student-section-heading { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; }
  .home-courses-section .student-section-heading > div { display: contents; }
  .home-courses-section .student-section-heading h2 { grid-column: 1; grid-row: 1; }
  .home-courses-section .student-section-heading p { grid-column: 1 / -1; grid-row: 2; }
  .home-courses-section .student-section-link { grid-column: 2; grid-row: 1; }
}

/* Access screens have no sidebar: center the card in the full viewport. */
.student-content[data-student-screen^="access:"] { padding-left: 0; }
.student-content .page-shell.access-page { width: min(720px, 100%); margin-inline: auto; }
/* Picture is only an image source selector; retain the established cover geometry. */
.responsive-cover { display: block; width: 100%; height: 100%; }
.responsive-cover > img { display: block; width: 100%; height: 100%; }
.responsive-cover[data-cover-state="loading"] > img,
.responsive-cover[data-cover-state="unavailable"] > img { opacity: 0; }
.responsive-cover[data-cover-state="unavailable"] { position: relative; }
.responsive-cover[data-cover-state="unavailable"]::after { content: attr(data-cover-message); position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; font-size: 12px; color: var(--text-secondary); text-align: center; }
/* Language preference shares the account menu's existing visual rhythm. */
.localization-language-select { color:var(--f7-text-color,#eeeaf9); background:#201d36; border:1px solid #5d5188; border-radius:12px; min-height:44px; padding:9px 30px 9px 12px; font:inherit; font-size:14px; max-width:180px; cursor:pointer; }
.localization-language-select:focus-visible { outline:2px solid #b9a4ff; outline-offset:3px; }
.localization-language-select:disabled { opacity:.6; cursor:wait; }
.profile-language-row .profile-menu-copy { min-width:0; }
.profile-language-row .profile-menu-icon svg { width:24px; height:24px; }
@media(max-width:420px) { .profile-language-row { flex-wrap:wrap; }.profile-language-row .localization-language-select { margin-left:auto; max-width:155px; font-size:13px; }.profile-language-row .profile-menu-copy small { max-width:155px; } }
