/* School administration, profiles, authentication and rewards share the learning UI. */
.profile-page-heading,.profile-caption{display:none}.profile-toolbar{margin:18px 0 22px;padding:0;background:none;border:0;justify-content:flex-end}.profile-toolbar .actions{margin:0;gap:8px}.profile-toolbar .actions button{display:inline-flex;align-items:center;justify-content:center;gap:8px}.profile-toolbar .actions svg{width:17px;height:17px}
dialog{--dialog-x:26px;--dialog-y:26px;padding:var(--dialog-y) var(--dialog-x);overflow-x:hidden}.dialog-heading{top:calc(-1 * var(--dialog-y));margin:calc(-1 * var(--dialog-y)) calc(-1 * var(--dialog-x)) 18px;padding:var(--dialog-y) var(--dialog-x) 17px;background:var(--panel);align-items:center}.dialog-heading h2{overflow-wrap:anywhere}.dialog-close{flex-shrink:0}
@media(max-width:760px){dialog{--dialog-x:18px;--dialog-y:23px}.dialog-heading{top:calc(-1 * var(--dialog-y));margin:calc(-1 * var(--dialog-y)) calc(-1 * var(--dialog-x)) 18px;padding:var(--dialog-y) var(--dialog-x) 17px}}
.journal-help{margin:0 0 20px;font-size:12px;color:var(--muted)}.journal-help summary{cursor:pointer;min-height:32px;display:flex;align-items:center;gap:8px}.journal-help summary::before{content:'›'}.journal-help[open] summary::before{transform:rotate(90deg)}.journal-help p{font-size:13px;line-height:1.7;max-width:680px;margin:10px 0 0;padding:14px 16px;background:var(--panel2);border:1px solid var(--line);border-radius:9px}
.eyebrow{display:none}
.auth{max-width:470px;margin:16px auto 36px}.auth>.back{margin-bottom:14px}.auth .card{padding:28px;background:var(--panel);border:1px solid var(--line);border-radius:16px;box-shadow:none}.auth h1{font-size:27px;letter-spacing:-.035em;margin:0 0 22px;line-height:1.25}.auth .tabs{margin-bottom:20px;background:var(--panel2);border:0;padding:4px;border-radius:10px}.auth .tabs button{border-radius:7px;font-size:13px;min-height:40px}.auth .tabs button.active{background:var(--panel);color:var(--text);box-shadow:0 1px 4px #0000000a}.auth label{margin-bottom:14px}.auth label small,.auth .form-note{font-size:12px;line-height:1.6;color:var(--muted)}.auth .form-note{margin-top:18px}.auth-help{font-size:13px}.auth .group-teachers{padding:12px 14px;background:var(--panel2);border:1px solid var(--line);border-radius:9px;margin-bottom:16px}.auth .password-field{position:relative}.auth .password-toggle{font-size:12px;color:var(--muted)}.auth .auth-divider{font-size:12px;margin:18px 0;color:var(--muted)}.vk-button{border-radius:9px;min-height:44px}.form-error:not(:empty){margin:12px 0;font-size:13px;line-height:1.5;color:var(--red)}
.overview-metrics{gap:12px;margin:20px 0}.overview-metric{background:var(--panel);border:1px solid var(--line);padding:18px;border-radius:12px;box-shadow:none;color:var(--text)}.overview-metric>strong{font-size:28px;line-height:1.3;font-weight:650}.overview-metric>span{font-size:13px}.overview-metric>small{font-size:12px;color:var(--muted)}.overview-metric:hover{background:var(--panel2);transform:none}.overview-columns{gap:18px}.overview-panel{padding:20px;margin-bottom:18px}.overview-panel h2,.section-title h2{font-size:19px;letter-spacing:-.02em;line-height:1.3}.overview-empty{font-size:13px;color:var(--muted);line-height:1.6}.overview-person,.overview-window{padding:12px 0;border-color:var(--line)}.overview-window{background:transparent;color:var(--text)}.overview-window:hover{background:var(--panel2)}.overview-group-grid{gap:10px}.overview-group-grid article{background:var(--panel2);border:1px solid var(--line);border-radius:10px;padding:16px}.overview-group-grid h3{font-size:17px;margin:10px 0 6px}.overview-group-grid p{font-size:13px}.overview-group-grid small{font-size:12px;color:var(--muted)}
.table-wrap{background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:none;overflow-x:auto;max-width:100%}table{background:var(--panel);font-size:13px;border-collapse:collapse;width:100%}th{background:var(--panel2);color:var(--muted);font-size:11px;text-transform:none;letter-spacing:0;font-weight:600;line-height:1.5}td,th{padding:12px 14px;border-bottom:1px solid var(--line);vertical-align:middle}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:color-mix(in srgb,var(--panel2) 70%,transparent)}.player{gap:10px;min-width:190px}.player>div{min-width:0}.player small{font-size:11px;color:var(--muted)}.ranking-intro{font-size:13px;color:var(--muted);margin:0 0 20px}.ranking .elo{font-weight:600}.name-link{font-size:13px;line-height:1.5;text-align:left;white-space:normal;overflow-wrap:anywhere}.row-actions{gap:6px;flex-wrap:wrap}.row-actions .compact{min-height:34px;padding:6px 10px;font-size:12px}.people-controls{gap:12px;margin:0 0 20px}.team-grid,.review-grid{gap:16px}.team-card,.achievement{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:20px}.achievement h2{font-size:20px;line-height:1.4}.achievement>p{font-size:14px;line-height:1.6}.achievement .actions{gap:10px;flex-wrap:wrap;padding-top:12px}
.profile-hero{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:26px;gap:24px;margin:12px 0 18px;box-shadow:none}.profile-identity{min-width:0;gap:18px}.profile-identity>div{min-width:0}.profile-identity h1{font-size:29px;line-height:1.3;letter-spacing:-.03em;overflow-wrap:anywhere;margin:0 0 8px}.profile-identity p{font-size:13px;line-height:1.65;margin:0}.profile-avatar .avatar,.avatar.large{width:78px;height:78px;font-size:24px;border-radius:16px;flex-shrink:0}.profile-rating{gap:14px}.profile-rating b{font-size:29px;line-height:1.2}.profile-rating small{font-size:11px;letter-spacing:.02em}.progress-panel{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:18px 20px;margin:0 0 18px;font-size:13px;box-shadow:none}.progress-panel>.hint{display:none}.scale{margin-top:14px;font-size:12px;color:var(--muted)}.scale summary{cursor:pointer;color:var(--text)}.profile-stats{gap:12px;margin:0 0 24px}.stat{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:18px;min-width:0;box-shadow:none}.stat b{font-size:27px;font-weight:650}.stat span{font-size:12px;line-height:1.5}.stat small{font-size:11px;line-height:1.5;color:var(--muted)}.profile-columns{gap:20px}.profile-columns>section{min-width:0}.profile-columns .card{padding:16px}.profile-columns .section-title{margin:24px 0 12px}.activity-row{border-color:var(--line);padding:12px 0;gap:12px}.activity-row strong{font-size:13px;line-height:1.5}.activity-row small{font-size:11px;color:var(--muted)}.activity-row b{font-size:14px}.activity-dot{background:var(--orange)}.profile-links{display:flex;flex-wrap:wrap;gap:8px}.profile-about{font-size:14px;line-height:1.6}.milestone-track{gap:10px}.milestone{background:var(--panel);border-color:var(--line);box-shadow:none}.level-scale{gap:10px}.level-scale>span{background:var(--panel2);border-color:var(--line)}
.access-section{margin:22px 0}.access-section .section-title{margin-bottom:14px}.access-card,.duplicate-card{background:var(--panel);border:1px solid var(--line);padding:18px;border-radius:12px;box-shadow:none}.access-card h3,.duplicate-card h3{font-size:17px}.access-card p,.duplicate-card p{font-size:13px;line-height:1.6;color:var(--muted)}.duplicate-actions{gap:8px;flex-wrap:wrap}.duplicate-side{min-width:0;background:var(--panel2);border:1px solid var(--line);border-radius:9px;padding:14px}.duplicate-link{color:var(--muted)}.group-settings-summary{background:var(--panel2);border:1px solid var(--line);padding:12px 16px;border-radius:10px;font-size:13px;margin-bottom:18px}.group-settings-grid{gap:16px}.group-settings-card{padding:20px;min-width:0}.group-card-heading h2{font-size:20px;line-height:1.3}.group-card-heading p,.group-curator,.group-policy-line{font-size:13px;line-height:1.6}.group-rate-pair{margin:16px 0;gap:12px}.group-card-footer{border-color:var(--line);margin-top:18px;padding-top:14px}.group-card-footer .secondary{margin-left:auto}.group-settings-card small{color:var(--muted);font-size:12px}
.help-layout{gap:20px}.help-layout>.card{padding:24px}.school-logo{max-width:82px;height:auto;margin-bottom:16px}.school-card h1{font-size:26px;letter-spacing:-.03em;line-height:1.3}.school-card p,.support-card p{font-size:14px;line-height:1.7;color:var(--muted)}.support-card h2,.faq h2{font-size:20px}.contact-links{gap:8px;display:flex;flex-wrap:wrap}.faq details{border-color:var(--line);background:transparent;padding:14px 0}.faq summary{font-size:14px;line-height:1.5}.faq p{font-size:13px;color:var(--muted);line-height:1.7}.screen-error{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:26px;max-width:640px;margin:20px auto}.screen-error h2{font-size:24px}.screen-error p{font-size:14px;line-height:1.6;color:var(--muted)}
.shop-page{color:var(--text)}.shop-hero{background:var(--panel);border:1px solid var(--line);padding:22px 24px;border-radius:14px;box-shadow:none}.shop-hero h1{font-size:30px;letter-spacing:-.035em}.shop-hero p{font-size:13px;line-height:1.6;color:var(--muted)}.shop-kicker{display:none}.shop-section-heading{margin:24px 0 14px}.shop-section-heading h2{font-size:21px;letter-spacing:-.02em}.shop-section-heading p,.shop-section-heading>span{font-size:12px;color:var(--muted)}.shop-tabs{background:var(--panel2);border-color:var(--line);border-radius:10px;gap:4px;padding:4px;margin:18px 0}.shop-tabs button{border-radius:7px;min-height:40px;font-size:13px;color:var(--muted)}.shop-tabs button.is-active{background:var(--panel);color:var(--text);box-shadow:0 1px 4px #0000000a}.shop-case-grid,.shop-goods-grid{gap:16px}.shop-case,.shop-product{background:var(--panel);border:1px solid var(--line);border-radius:14px;box-shadow:none;min-width:0}.shop-case:hover,.shop-product:hover{border-color:color-mix(in srgb,var(--orange) 40%,var(--line));transform:translateY(-2px)}.shop-case-info strong,.shop-product h3{font-size:17px;line-height:1.4}.shop-case p,.shop-product p{font-size:12px;line-height:1.6;color:var(--muted)}.shop-footnote{font-size:12px;line-height:1.7;color:var(--muted);padding:12px 0}.shop-soon{max-width:580px;min-height:360px;margin:26px auto;background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:38px 28px;box-shadow:none}.shop-soon h1{font-size:30px;line-height:1.3;letter-spacing:-.035em}.shop-soon p{font-size:14px;color:var(--muted);line-height:1.7}.shop-soon-orbit{width:78px;height:78px;margin:0 auto 22px;background:var(--panel2);border:1px solid var(--line)}.shop-soon-orbit svg{width:40px;height:40px;color:var(--orange)}.shop-soon-pill{display:none}
@media(max-width:780px){.overview-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-hero{padding:20px;gap:18px}.profile-identity h1{font-size:24px}.profile-rating b{font-size:25px}.profile-columns,.overview-columns,.help-layout{grid-template-columns:1fr}.profile-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-avatar .avatar,.avatar.large{width:62px;height:62px;font-size:21px;border-radius:13px}.shop-hero{padding:20px}.shop-tabs{overflow-x:auto;max-width:100%}.shop-tabs button{white-space:nowrap;flex-shrink:0}.shop-case-grid,.shop-goods-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.table-wrap{margin:0}.group-settings-grid{grid-template-columns:1fr}}
@media(max-width:420px){.auth{margin:8px auto 26px}.auth .card{padding:20px}.auth h1{font-size:24px}.profile-hero{padding:16px;flex-wrap:wrap}.profile-identity{gap:12px}.profile-identity h1{font-size:22px}.profile-rating{margin-left:74px}.stat{padding:14px}.stat b{font-size:24px}.stat small{display:none}.overview-panel,.team-card,.achievement{padding:16px}.overview-metric{padding:14px}.overview-metric>strong{font-size:25px}.shop-case-grid,.shop-goods-grid{gap:10px}.shop-case-info strong,.shop-product h3{font-size:15px}.shop-hero h1,.shop-soon h1{font-size:25px}.shop-soon{padding:28px 18px;min-height:300px}td,th{padding:10px 11px}.help-layout>.card{padding:20px}}
@media(prefers-reduced-motion:reduce){.shop-case:hover,.shop-product:hover{transform:none}}

/* Shared phone layout: controls keep their labels and remain easy to tap. */
@media(max-width:760px){
 html[data-theme] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):not([type="color"]),select,textarea){font-size:16px;min-width:0;max-width:100%}
 html[data-theme] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):not([type="color"]),select){min-height:44px}
 html[data-theme] :is(.primary,.secondary,.danger){min-height:44px;font-size:13px;line-height:1.4;word-break:normal;overflow-wrap:normal;max-width:100%}
 :is(.form-grid,.workspace-toolbar,.people-controls,.dialog-heading,.section-title,.profile-identity,.profile-toolbar)>*{min-width:0}
 :is(.admin-page-heading,.page-head,.section-title){gap:12px;flex-wrap:wrap}
 .admin-page-heading>.page-head{flex:1 1 190px}
 .admin-page-heading>.primary{flex:0 1 auto}
 .listening-heading>.page-head{flex:1 1 auto}
 .listening-heading>.primary{flex:0 0 auto}
 .page-head h1,.dialog-heading h2{overflow-wrap:break-word;word-break:normal}
 .workspace-toolbar{display:grid;grid-template-columns:minmax(0,1fr) max-content;align-items:end;gap:10px;padding-bottom:16px;margin-bottom:18px}
 .workspace-toolbar .filter-field{width:100%;max-width:none;min-width:0;margin:0}
 .workspace-toolbar>select{width:100%;margin:0}
 .workspace-toolbar>button{margin:0}
 .workspace-toolbar .filter-field>span{font-size:12px}
 .workspace-toolbar :is(input,select){margin-bottom:0}
 .people-controls,.search-toolbar{gap:10px;padding:12px}
 .search-toolbar .search-label{min-width:0;max-width:none;flex:1 1 100%}
 .search-toolbar select{width:100%;max-width:none;min-width:0}
 .row-actions{display:flex;gap:8px;flex-wrap:wrap;width:100%}
 .row-actions :is(button,a){flex:1 1 110px;min-height:44px;text-align:center;white-space:normal}
 .row-actions>.primary:first-child{flex-basis:100%}
 .student-scope{gap:8px}
 .student-scope button{min-height:44px;white-space:nowrap;overflow-wrap:normal}
 .group-card-heading{align-items:flex-start;flex-wrap:wrap;gap:10px}
 .group-card-heading .badge{max-width:100%;white-space:normal;line-height:1.5}
 .group-card-footer{flex-wrap:wrap;align-items:center;gap:12px}
 .group-card-footer>span{flex:1 1 120px}
 .group-card-footer>.secondary{flex:0 0 auto}
 .profile-toolbar{flex-wrap:wrap;gap:12px}
 .profile-toolbar .actions{width:100%;gap:8px}
 .profile-toolbar .actions>*{flex:1 1 160px}
 .profile-identity{align-items:flex-start}
 .profile-identity h1{font-size:23px;line-height:1.3}
 .profile-hero .profile-rating{max-width:100%}
 .student-bookings .booking .actions .compact,.staff-windows .window-actions :is(.primary,.secondary){min-height:44px;font-size:13px}
 .submission-links :is(a,button){min-height:44px;font-size:13px;line-height:1.5;white-space:normal;overflow-wrap:normal}
 .learning-assignment-actions{gap:8px}
 .learning-assignment-actions>*{min-width:0}
 .learning-assignment-actions :is(button,a){min-height:44px;font-size:13px;line-height:1.45;overflow-wrap:normal}
 .learning-block-filter{max-width:100%;min-width:0}
 .homework-files .homework-pdf{display:flex;align-items:flex-start;gap:10px;line-height:1.5}
 .homework-files .homework-pdf .pdf-name{overflow-wrap:break-word;word-break:normal;min-width:0}
 .written-check-row{grid-template-columns:minmax(0,1fr);gap:12px;padding:16px}
 .written-check-row>div{min-width:0}
 .written-check-row>button{grid-column:1/-1;justify-self:stretch;width:100%;min-height:44px}
 .written-check-row .written-check-score{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 12px;min-width:0;text-align:left}
 .written-check-score strong{font-size:17px}
 .written-check-row .written-check-assignment{font-size:15px;overflow-wrap:break-word}
 #modal .written-check-row{grid-template-columns:minmax(0,1fr);gap:12px;padding:14px}
 #modal .written-check-row>button{grid-column:1/-1}
 #modal .written-check-score{display:flex;flex-wrap:wrap;gap:8px 12px;min-width:0;text-align:left}
 #modal .form-grid{grid-template-columns:minmax(0,1fr);gap:0}
 #modal label{max-width:100%;min-width:0;overflow-wrap:break-word}
 #modal .dialog-heading{display:flex;flex-wrap:nowrap;align-items:flex-start;gap:12px}
 #modal .dialog-heading h2{flex:1;min-width:0;line-height:1.35}
 #modal .dialog-close{width:44px;height:44px;min-height:44px;flex:0 0 44px}
 #modal .dialog-actions{display:flex;flex-wrap:wrap;gap:10px}
 #modal .dialog-actions :is(button,a){flex:1 1 125px;min-width:0;min-height:44px;white-space:normal;overflow-wrap:normal;line-height:1.4;font-size:13px}
 #modal .dialog-actions>.primary,#modal .dialog-actions>.danger{flex:2 1 170px}
 #modal .dialog-actions>.secondary{flex:1 1 80px}
 #modal .notification-item{gap:10px;padding:14px 0;min-width:0}
 #modal .notification-item>span:last-child{min-width:0}
 #modal .notification-item :is(strong,p){overflow-wrap:break-word}
 .written-task-row{grid-template-columns:44px minmax(0,1fr);gap:10px}
 .written-task-row>label:first-child{padding:8px;min-height:44px;justify-content:center}
 .written-task-row label:has(select){min-width:0}
 .written-task-row select{margin-top:5px}
 .result-task-card{grid-template-columns:44px minmax(0,1fr);gap:10px}
 .result-task-card>select{min-width:0;max-width:100%;padding-left:10px}
 .calendar-controls{display:grid;grid-template-columns:44px max-content 44px;gap:6px;max-width:100%}
 .calendar-controls button{min-height:44px;padding:8px 12px;white-space:nowrap;overflow-wrap:normal}
 .calendar-controls button:first-child,.calendar-controls button:last-child{padding:0}
 .history-period{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .history-period label{width:auto;min-width:0}
 .history-period>button,.history-period>.form-error{grid-column:1/-1}
 .history-period>.form-error:empty{display:none}
 .history-period input{width:100%;min-width:0}
 .history-session{grid-template-columns:minmax(0,1fr) auto;gap:10px}
 .history-session>span:nth-child(2){grid-column:1;grid-row:2}
 .history-session>.history-result{grid-column:2;grid-row:1/3;text-align:right}
 .history-session>.badge{grid-column:1/-1;justify-self:start;max-width:100%;white-space:normal}
 .history-session>span:last-child{display:none}
 .listening-filters .filter-field select{padding-left:9px}
 .account-menu{max-width:calc(100vw - 16px)}
 .account-menu-identity strong{overflow-wrap:break-word}
 .password-toggle{top:0;bottom:0;right:4px;height:44px;margin-block:auto;min-height:44px;min-width:70px}
}
/* A ranking row becomes a complete card, keeping every metric visible. */
@media(max-width:600px){
 .overview-metric{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:8px;min-height:104px;padding:14px}
 .overview-metric>small{display:none}
 .ranking{display:block;min-width:0;width:100%}
 .ranking thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%)}
 .ranking tbody{display:block;width:100%}
 .ranking tr{display:flex;flex-wrap:wrap;align-items:center;gap:12px 10px;padding:16px;border-bottom:1px solid var(--line)}
 .ranking tr:last-child{border-bottom:0}
 .ranking td{display:block;padding:0;border:0;min-width:0;white-space:normal}
 .ranking td:nth-child(1){order:1;flex:0 0 28px;align-self:flex-start;padding-top:7px}
 .ranking td:nth-child(2){order:2;flex:1 1 calc(100% - 38px)}
 .ranking td:nth-child(3){order:3;flex:1 1 calc(100% - 90px);font-size:12px;line-height:1.5}
 .ranking td:nth-child(3) small{font-size:11px;overflow-wrap:break-word}
 .ranking td:nth-child(4){order:4;flex:0 0 auto}
 .ranking td:nth-child(n+5){order:5;flex:1 1 calc(33.33% - 8px);align-self:stretch;padding-top:12px;border-top:1px solid var(--line);font-size:15px}
 .ranking td[data-mobile-label]:before{content:attr(data-mobile-label);display:block;margin-bottom:5px;font-size:11px;font-weight:400;color:var(--muted)}
 .ranking td:nth-child(n+5) small{display:none}
 .ranking .player{min-width:0;gap:10px;align-items:center}
 .ranking .player .avatar{width:36px;height:36px;flex:0 0 36px;font-size:13px}
 .ranking .player .name-link{font-size:14px;line-height:1.4;overflow-wrap:break-word}
 .ranking .rank{font-size:15px}
 .ranking .level{width:34px;height:34px;font-size:13px}
 .ranking-intro{padding:18px}
 .ranking-intro h2{font-size:20px}
 .ranking-intro select{width:100%;max-width:none}
 .learning-toolbar{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
 [data-material-page] .learning-toolbar .material-tabs{display:flex;width:100%}
 [data-material-page] .material-tabs [role="tab"]{flex:1;min-height:44px;padding:9px 12px}
 [data-material-page] .learning-toolbar .study-block-picker{width:100%;max-width:none}
 [data-material-page] .study-block-picker label{display:block;width:100%}
 [data-material-page] .study-block-picker select{width:100%;max-width:none;margin:0}
}
@media(max-width:380px){
 .nav{column-gap:8px}
 .guest-account{padding-inline:8px;gap:4px}
 .written-task-row,.result-task-card{grid-template-columns:minmax(0,1fr);gap:6px}
 .written-task-row>label:first-child{justify-self:start;width:auto;min-width:56px}
 .written-task-row label:has(select){width:100%}
 .result-task-card>.booking-task-grid,.result-task-card>label{justify-self:start;min-width:60px}
 .profile-identity{gap:10px}
 .profile-identity h1{font-size:21px}
 .profile-avatar .avatar.large{width:56px;height:56px;flex-shrink:0}
 .profile-hero .profile-rating{margin-left:0}
 .shop-case-grid,.shop-goods-grid{grid-template-columns:minmax(0,1fr)}
 .shop-case{min-height:0}
 .shop-tabs{scrollbar-width:thin}
}

/* Progress periods share one compact, wrapping toolbar on every viewport. */
.progress-toolbar{display:flex;align-items:end;gap:16px;flex-wrap:wrap;margin:0 0 20px}
.progress-period{display:grid;gap:7px;min-width:180px;max-width:100%;font-size:13px;color:var(--muted)}
.progress-period select{min-width:0;width:100%;max-width:100%;color:var(--text)}
.profile-progress{margin-block:28px}.profile-progress .section-title{gap:16px;flex-wrap:wrap;align-items:end}
.profile-progress .section-title h2{margin:0}.profile-progress .profile-stats{margin-top:16px}
@media(max-width:600px){.progress-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:12px}.progress-period{min-width:0;width:100%}.progress-period select{font-size:14px;padding-inline:10px}.profile-progress .section-title .progress-period{width:100%}.profile-progress .profile-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-progress .stat{min-width:0}.profile-progress .stat small{overflow-wrap:anywhere}}

/* Separate main completion from extra tasks without widening the rating. */
.ranking-task-count{display:block;margin-top:4px;font-size:12px;font-weight:400;color:var(--muted);white-space:nowrap}
.ranking-independent:before{content:"Все задачи";display:block;margin-bottom:4px;font-size:11px;color:var(--muted)}
.ranking th:nth-last-child(-n+2){white-space:normal;max-width:170px;line-height:1.4}
@media(max-width:600px){.ranking-task-count{font-size:11px}.ranking td.ranking-independent:before{content:attr(data-mobile-label)}.ranking td.ranking-independent{flex-grow:2}}

/* Sorting belongs to the table headings; no separate toolbar controls. */
.ranking-sortable thead th{padding:0}
.ranking-sortable th button{display:flex;align-items:center;justify-content:space-between;gap:7px;width:100%;height:100%;min-height:48px;padding:14px 16px;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;text-align:left;white-space:normal}
.ranking-sortable th button:hover{background:var(--surface-hover,rgba(128,128,128,.09))}
.ranking-sortable th[aria-sort="ascending"],.ranking-sortable th[aria-sort="descending"]{color:var(--text)}
.ranking-sort-icon{flex-shrink:0;color:var(--muted);font-size:14px}
.ranking-sortable th[aria-sort="ascending"] .ranking-sort-icon,.ranking-sortable th[aria-sort="descending"] .ranking-sort-icon{color:var(--accent)}
.ranking-head-mobile{display:none}
@media(max-width:600px){
 .ranking-sortable thead{position:static;display:block;width:100%;height:auto;max-width:100%;padding:0;margin:0;overflow-x:auto;clip-path:none;scrollbar-width:thin;border-bottom:1px solid var(--line)}
 .ranking-sortable thead tr{display:flex;flex-wrap:nowrap;gap:0;padding:0;border:0;width:max-content;min-width:100%}
 .ranking-sortable thead th{display:block;flex:0 0 auto;max-width:none;order:3}
 .ranking-sortable thead th:nth-child(5){order:0}.ranking-sortable thead th:nth-child(6){order:1}.ranking-sortable thead th:nth-child(7){order:2}
 .ranking-sortable th button{min-height:44px;padding:10px 12px;font-size:12px;white-space:nowrap}
 .ranking-head-desktop{display:none}.ranking-head-mobile{display:inline}
}
