:root{font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;color:#e9edfa;background:#0b1020;color-scheme:dark}*{box-sizing:border-box}body{margin:0;padding-bottom:80px}header{max-width:1160px;margin:auto;padding:22px 18px;display:flex;justify-content:space-between;gap:14px;align-items:center}.brand{font-weight:900;letter-spacing:.14em;font-size:14px}.brand span{color:#c6a1ff}.muted,small{color:#9ba9c6}main{max-width:1160px;margin:auto;padding:12px 18px 36px}h1{font-size:clamp(27px,4vw,43px);line-height:1.13;margin:6px 0 14px}h2{font-size:21px;margin:0 0 12px}h3{font-size:16px;margin:0 0 12px}p{line-height:1.55}.card{background:#192338;border:1px solid #303e59;border-radius:19px;padding:20px;margin:0 0 15px;overflow-wrap:anywhere}.hero{padding:30px 24px;background:linear-gradient(135deg,#262647,#162439)}.center{text-align:center}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(235px,1fr));gap:13px}.grid>.card{margin:0}.row{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.stack{display:flex;flex-direction:column;gap:11px}.field{display:flex;flex-direction:column;gap:6px;font-size:14px;color:#c6d0e4}.field input,.field textarea,.field select,textarea,input,select{width:100%;background:#0c1527;color:#f2f4fa;border:1px solid #43516d;border-radius:12px;padding:13px;font:inherit;min-height:46px}.field textarea{min-height:95px;resize:vertical}button,.btn{border:0;background:#a783e6;color:#151024;border-radius:12px;padding:13px 17px;min-height:44px;font-weight:750;cursor:pointer;font-size:14px;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:7px}button:disabled{opacity:.48;cursor:not-allowed}.secondary{background:#303c56;color:#f1f3ff}.danger{background:#753b52;color:#fff}.ghost{background:transparent;color:#c9b6fa;border:1px solid #475270}.tabs{display:flex;gap:7px;overflow-x:auto;padding-bottom:10px;margin:12px 0}.tabs button{white-space:nowrap}.tabs .active{background:#a783e6;color:#18112a}.pill{background:#32405a;border-radius:99px;padding:5px 10px;color:#ded6f7;font-size:12px}.ok{color:#83e6b7}.warn{color:#f8cf7e}.error{color:#ff9d9d}.bottom{position:fixed;bottom:0;left:0;right:0;background:#131b2e;border-top:1px solid #35415c;padding:8px;display:flex;justify-content:space-around;z-index:4}.bottom button{padding:8px 5px;flex:1;font-size:12px;border-radius:10px;min-height:50px}.hidden{display:none!important}#flash{position:sticky;top:0;z-index:9;text-align:center;background:#273657;color:#fff;min-height:0}#flash:not(:empty){padding:10px}a{color:#d6baff}pre{white-space:pre-wrap;overflow-wrap:anywhere}summary{cursor:pointer;padding:10px}details{border:1px solid #354361;border-radius:12px;margin:10px 0;padding:5px 10px}.admin-layout{display:grid;grid-template-columns:225px minmax(0,1fr);gap:18px}.side{position:sticky;top:8px;align-self:start}.side button{width:100%;justify-content:flex-start;margin:3px 0;background:transparent;color:#cbd4e8}.side button.active{background:#3b355f;color:#fff}.admin-content{min-width:0}.item{border-bottom:1px solid #34415a;padding:13px 0}.item:last-child{border:0}.score{font-size:31px;font-weight:900;color:#c8a5ff}.progress{height:9px;border-radius:10px;background:#35415c;overflow:hidden}.progress>div{background:#a783e6;height:100%}.thumb{max-width:100%;max-height:330px;border-radius:10px}.dialog{position:fixed;inset:0;background:#030711dc;display:grid;place-items:center;padding:18px;z-index:20}.dialog>.card{width:min(680px,100%);max-height:88vh;overflow-y:auto}.hide-desktop{display:none}.columns{display:grid;grid-template-columns:1fr 1fr;gap:14px}.actions{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0}.tiny{font-size:12px}.pre{white-space:pre-wrap}.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;font-size:13px}td,th{padding:10px;text-align:left;border-bottom:1px solid #34415a}input[type=checkbox]{width:auto;min-height:0;accent-color:#b498ee}label.check{display:flex;align-items:flex-start;gap:9px;line-height:1.4}label.check input{margin-top:4px}.grow{flex:1}@media(max-width:750px){header{padding:14px}.admin-layout{display:block}.side{position:static;display:none}.side.open{display:block}.side button{padding:14px}.hide-desktop{display:inline-flex}.columns{grid-template-columns:1fr}.card{padding:15px}.hero{padding:23px 17px}main{padding:8px 12px 28px}.grid{grid-template-columns:1fr}.bottom button{font-size:11px}}

/* Явно интерактивные кнопки */
button,.btn{box-shadow:0 2px 0 rgba(0,0,0,.26);transition:background-color .15s ease,transform .12s ease,box-shadow .15s ease,border-color .15s ease}
button:hover:not(:disabled),.btn:hover{filter:brightness(1.2);box-shadow:0 4px 14px rgba(167,131,230,.28);transform:translateY(-1px)}
button:active:not(:disabled),.btn:active{transform:translateY(1px);box-shadow:0 1px 2px rgba(0,0,0,.35)}
button:focus-visible,.btn:focus-visible{outline:3px solid #f0d5ff;outline-offset:3px}
button.secondary,button.ghost{border:1px solid #8190b4}
button.secondary:hover,button.ghost:hover{border-color:#d7bdff}
@media(prefers-reduced-motion:reduce){button,.btn{transition:none}}

/* Модерация: очередь слева, архив компактными миниатюрами справа */
.review-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(235px,290px);gap:17px;align-items:start}.review-main{min-width:0}.review-archive{min-width:0;position:sticky;top:12px}.review-archive-details{margin:0;padding:0;background:#192338;border:1px solid #4b5877;border-radius:16px;overflow:hidden}.review-archive-details>summary{list-style:none;display:flex;flex-direction:column;gap:6px;padding:16px;cursor:pointer;background:#25334f;color:#f4efff;font-weight:750}.review-archive-details>summary::-webkit-details-marker{display:none}.review-archive-details>summary:after{content:'⌄';position:absolute;right:21px;font-size:20px}.review-archive-details[open]>summary:after{content:'⌃'}.review-archive-details>summary small{font-weight:400}.review-archive-list{display:flex;flex-direction:column;gap:10px;padding:10px;max-height:70vh;overflow:auto}.review-tile{display:flex;gap:9px;background:#121d31;border:1px solid #394b69;border-radius:12px;padding:8px;min-width:0}.review-image{position:relative;flex:none;padding:0;width:79px;height:79px;border-radius:9px;background:#35415f;overflow:hidden;box-shadow:none}.review-mini{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .15s}.review-mini.is-ready{opacity:1}.review-image-fallback{font-size:24px}.review-mini.is-ready+.review-image-fallback{display:none}.review-tile-info{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}.review-tile-info>b,.review-tile-info>small{overflow-wrap:anywhere}.review-state{font-size:12px;font-weight:650}.review-approved{color:#94efc4}.review-revision{color:#ffd08d}.review-edit{margin:5px 0 0;padding:0;border:0}.review-edit>summary{padding:4px 0;font-size:12px;color:#d7baff;text-decoration:underline;cursor:pointer}.review-edit .field{font-size:12px}.review-edit .field input,.review-edit .field select{min-height:38px;padding:8px}.review-edit button{padding:8px;font-size:12px}.review-edit .stack{gap:7px}.review-archive-details>summary:focus-visible,.review-edit>summary:focus-visible{outline:3px solid #dbbdff;outline-offset:-3px}
@media(max-width:950px){.review-layout{grid-template-columns:1fr}.review-archive{position:static}.review-archive-list{max-height:480px}}

/* PLAY_OFF QUEST member v9 */
.entry-wrap{max-width:720px;margin:6vh auto 0;padding:48px 40px 30px;border-radius:28px;border:1px solid #3d4566;background:radial-gradient(circle at 90% 5%,#4b337766,transparent 44%),linear-gradient(145deg,#1d2740,#111a2e);min-height:480px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center}
.entry-logo{font-size:15px;font-weight:950;letter-spacing:.24em}.entry-logo span{color:#bc98ff}.entry-eyebrow,.eyebrow,.quest-kicker{letter-spacing:.17em;text-transform:uppercase;font-size:11px;font-weight:850;color:#b8a1eb}.entry-eyebrow{margin-top:56px}.entry-wrap h1{font-size:clamp(36px,7vw,62px);max-width:540px;margin:15px 0}.entry-wrap>p{max-width:520px;color:#b7c4dc;font-size:16px}.entry-actions{display:flex;flex-wrap:wrap;gap:12px;margin:23px 0 35px;width:100%}.entry-button{min-width:188px;justify-content:space-between;gap:35px;padding:17px 22px}.entry-button span{font-size:19px}.entry-outline{background:transparent;color:#e9ddff;border:1px solid #a783e6}.entry-caption{color:#8797b4;font-size:10px;letter-spacing:.23em}.auth-switch{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.member-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:24px}.event-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(300px,100%),1fr));gap:16px}.quest-event{display:flex;flex-direction:column;gap:9px;background:linear-gradient(150deg,#202c46,#182237);border:1px solid #3d506f;border-radius:20px;padding:21px}.quest-event h3{font-size:21px;margin:10px 0 0}.quest-event p{margin:2px 0}.quest-event-top{display:flex;gap:8px;align-items:center;justify-content:space-between}.state-chip{display:inline-flex;align-items:center;white-space:normal;border-radius:999px;padding:7px 11px;background:#35405b;color:#f2e5ff;font-size:12px;font-weight:800}.state-joined{background:#294c49;color:#a3f0d1}.quest-meta{display:flex;flex-direction:column;gap:5px;font-size:12px;color:#b1bdd5;margin:8px 0}.quest-teamname{font-size:14px}.quest-event>button{margin-top:auto;align-self:flex-start}.member-top{display:flex;justify-content:space-between;align-items:center;gap:16px;background:linear-gradient(115deg,#24314e,#1a253c);border:1px solid #3b4866;border-radius:20px;padding:22px;margin-bottom:17px}.member-top h1{font-size:clamp(25px,4vw,38px);margin:8px 0 12px}.member-score{text-align:center;min-width:116px;padding:13px;background:#10192d;border:1px solid #4e4674;border-radius:17px}.member-score .score{font-size:34px}.member-score small{font-size:11px}.status-kpi{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:4px 0 16px}.status-kpi>div{display:flex;flex-direction:column;gap:7px;padding:12px;background:#0f1b2f;border:1px solid #344662;border-radius:12px}.status-kpi span{font-size:12px;color:#a9b5ca}.status-kpi b{font-size:13px;line-height:1.4}.quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.quick-grid button{min-width:0;justify-content:flex-start;text-align:left}.section-heading{margin-bottom:15px}.bottom{gap:4px}.bottom button{line-height:1.2}
@media(max-width:600px){.entry-wrap{margin:3vh auto;padding:35px 23px;min-height:65vh}.entry-eyebrow{margin-top:44px}.entry-actions{flex-direction:column}.entry-button{width:100%}.member-top{padding:16px}.member-score{min-width:95px}.member-score .score{font-size:27px}.status-kpi{grid-template-columns:1fr}.quick-grid{grid-template-columns:1fr 1fr}.bottom button{font-size:10px;padding:7px 3px}.member-heading{flex-wrap:wrap}}
.point-line{padding:11px 0;border-bottom:1px solid #35415c;display:flex;align-items:center;justify-content:space-between;gap:14px}.point-line:last-child{border-bottom:0}.point-line>div{display:flex;flex-direction:column;gap:5px}.point-positive{color:#99e6bf}.point-negative{color:#ffb1ad}.point-line small{font-size:12px}


/* Контрольная страница подтверждения адреса */
.auth-result-wrap{max-width:680px;margin:5vh auto;padding:42px 35px;border-radius:26px;background:linear-gradient(140deg,#253451,#172238);border:1px solid #516182;display:flex;flex-direction:column;align-items:flex-start;gap:16px;box-shadow:0 15px 45px #050a185c}
.auth-result-wrap h1{font-size:clamp(30px,5.5vw,45px);margin:0}
.auth-result-wrap p{margin:0;color:#d1dcf0;max-width:560px}
.auth-result-icon{display:grid;place-items:center;width:69px;height:69px;border-radius:20px;font-weight:800;font-size:37px}
.auth-result-success{background:#28483f;color:#9ef4c6}.auth-result-warning{background:#583b39;color:#ffd29e}
.auth-result-actions{display:flex;flex-wrap:wrap;gap:10px}
.auth-tip{padding:18px;background:#111d31;border:1px solid #45516b;border-radius:16px;width:100%}
.auth-tip ol{padding-left:23px;line-height:1.9;color:#e5eaf5}.auth-tip p{font-size:13px}
@media(max-width:600px){.auth-result-wrap{margin:3vh auto;padding:27px 20px}}

/* Рейтинг организатора / игровое табло */
.ranking-panel{border-color:#655484;background:linear-gradient(150deg,#22304d,#19223a)}
.ranking-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:15px 0 18px}
.ranking-kpis>div{background:#101b30;border:1px solid #3c5070;border-radius:13px;display:flex;flex-direction:column;gap:6px;padding:14px}
.ranking-kpis b{font-size:28px;color:#dfc2ff}.ranking-kpis small{font-size:12px;color:#b7c5da}
.rank-list{display:flex;flex-direction:column;gap:9px;margin:13px 0}.rank-item{display:grid;grid-template-columns:50px minmax(0,1fr) minmax(85px,110px);gap:10px;align-items:center;padding:13px;border:1px solid #3d496a;background:#131f33;border-radius:15px}.rank-top{background:#242b49;border-color:#645684}.rank-place{text-align:center;font-size:21px;font-weight:900;color:#e1ccff}.rank-gold{font-size:26px}.rank-team{display:flex;flex-direction:column;gap:5px;min-width:0}.rank-team strong{overflow-wrap:anywhere}.rank-team small{color:#adbcd7;font-size:12px}.rank-points{text-align:right;font-weight:900;color:#d6baff;font-size:24px}.rank-points small{display:block;color:#9dabca;font-size:11px;font-weight:500}.empty-ranking{padding:24px;text-align:center;color:#aebbd3}.ranking-panel button:disabled,#rankingPublish button:disabled{opacity:.42;cursor:not-allowed;filter:none;transform:none}
@media(max-width:600px){.ranking-kpis{grid-template-columns:1fr 1fr 1fr}.ranking-kpis>div{padding:9px}.ranking-kpis b{font-size:22px}.ranking-kpis small{font-size:10px}.rank-item{grid-template-columns:34px minmax(0,1fr) 71px;padding:10px;gap:7px}.rank-points{font-size:19px}.rank-team strong{font-size:13px}}

/* V5: mobile player progress + creative statuses */
.player-progress{background:linear-gradient(135deg,#253353,#1a2943);border-color:#65558e}.player-progress p{margin:7px 0}.player-progress>.row>strong{font-size:24px;color:#d0b1ff}.progress-meta{display:flex;gap:12px;justify-content:space-between;flex-wrap:wrap;color:#c1cbe0;font-size:12px;margin-top:13px}.work-status{background:#121d31;border:1px solid #445478;border-radius:13px;padding:12px;margin:10px 0;display:flex;flex-direction:column;gap:5px}.work-status b{color:#f0e8ff}.work-state{font-size:13px;color:#d0b3ff;font-weight:700}.work-status p{margin:2px 0}.player-progress .progress{height:12px}.player-progress .progress>div{transition:width .2s ease}
@media(max-width:520px){.progress-meta{flex-direction:column;gap:6px}.bottom button{font-size:10px;min-width:0}.member-top{align-items:stretch}}

/* V5.2: compact and clickable overview KPIs */
.overview-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 17px}
.overview-stat{position:relative;display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;min-height:68px;padding:14px 16px;text-align:left;border-radius:14px;border:1px solid #354563;background:#192338;color:#edf0ff;box-shadow:none}
.overview-stat-label{font-size:13px;font-weight:650;line-height:1.25;color:#c4cee5;min-width:0}
.overview-stat-number{font-size:27px;line-height:1;font-weight:850;color:#c69dff;white-space:nowrap;margin-left:auto}
.overview-stat-arrow{position:absolute;right:9px;top:6px;font-size:12px;color:#8f9dba;opacity:.6}
.overview-stat:hover:not(:disabled){background:#23304c;border-color:#a783e6;box-shadow:0 3px 12px rgba(167,131,230,.16)}
@media(max-width:900px){.overview-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.overview-stats{gap:7px}.overview-stat{min-height:60px;padding:10px 12px}.overview-stat-number{font-size:23px}.overview-stat-label{font-size:12px}.overview-stat-arrow{top:4px;right:6px}}

/* V6 notifications – compact, responsive and accessible */
.notification-feed{display:grid;gap:10px;margin-top:14px}
.notification-item{border:1px solid var(--border,#364464);border-radius:13px;padding:14px;background:rgba(8,15,31,.35)}
.notification-item.is-unread{border-left:4px solid #b293fa;background:rgba(149,103,225,.07)}
.notification-item.is-read{opacity:.83}
.notification-item-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.notification-item p{white-space:pre-wrap;overflow-wrap:anywhere;margin:10px 0 6px}
.notification-new{background:#aa86ea;color:#121329;border-radius:99px;padding:3px 9px;font-size:12px;font-weight:700}
.notification-count{display:inline-block;padding:7px 10px;border-radius:9px;color:#d8c4ff;background:rgba(132,91,208,.18)}
.notification-count.has-unread{background:rgba(132,91,208,.28)}
.notice-shortcut{margin-bottom:12px}
.notice-shortcut button{display:flex;align-items:center;justify-content:space-between;width:100%;gap:16px}
@media(max-width:600px){.notification-item .actions{display:grid;grid-template-columns:1fr}.notification-item .actions button{width:100%}}

/* V7 browser Push subscription panel */
.push-settings{border:1px solid rgba(170,137,244,.4);margin:12px 0 18px}.push-settings .actions{display:flex;gap:8px;flex-wrap:wrap}.push-settings button{min-height:42px}.push-settings .tiny{line-height:1.45}

/* PLAY_OFF QUEST V8 — unified player account and sliding navigation */
.account-navigation{max-width:1160px;margin:0 auto 8px;padding:0 18px;display:flex;align-items:center;gap:12px}
.account-menu-button{padding:9px 14px;min-height:41px;background:#293653;border:1px solid #475875}.account-nav-label{font-size:13px;color:#a7b6d4;font-weight:700}.account-quests-button{margin-left:auto;padding:10px 13px;min-height:41px}
.drawer-overlay{position:fixed;inset:0;z-index:24;background:rgba(2,5,15,.75)}.drawer-overlay[hidden]{display:none}
.player-drawer{position:fixed;top:0;left:0;bottom:0;width:min(344px,90vw);background:#18223a;border-right:1px solid #475676;z-index:25;transform:translateX(-110%);transition:transform .23s ease;display:flex;flex-direction:column;box-shadow:0 0 60px rgba(0,0,0,.35)}.player-drawer.open{transform:translateX(0)}
.drawer-head{padding:24px 20px 18px;border-bottom:1px solid #374660;display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.drawer-head h2{margin:7px 0 6px}.drawer-head small{display:block;overflow-wrap:anywhere}.drawer-close{padding:9px;min-width:42px}
.drawer-links{padding:13px;overflow-y:auto;display:flex;flex-direction:column;gap:4px}.drawer-link{width:100%;justify-content:flex-start;text-align:left;background:transparent;color:#e3eaf6;font-size:15px;padding:14px 12px;border-radius:12px}.drawer-link span:first-child{min-width:26px;text-align:center;font-size:18px}.drawer-link.is-active,.drawer-link:hover{background:#3a345c}.drawer-team{width:100%;background:#293653;color:#f3efff;justify-content:flex-start;margin:7px 0}.drawer-groups{padding:12px 22px;border-top:1px solid #364760;overflow-y:auto}.drawer-footer{margin-top:auto;padding:14px 20px 22px;border-top:1px solid #364760}.drawer-footer button{width:100%}.drawer-is-open{overflow:hidden}
.account-welcome{background:linear-gradient(120deg,#232f50,#18233b);border:1px solid #3b4e70;border-radius:20px;padding:24px;margin-bottom:15px}.account-welcome h1{margin:13px 0 10px}.account-welcome p{max-width:710px}
.account-action-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 18px}.account-action-grid button{min-height:135px;display:flex;flex-direction:column;align-items:flex-start;gap:9px;text-align:left;justify-content:center}.account-action-grid button span{font-size:24px}.account-action-grid button strong{font-size:17px}.account-action-grid button small{color:inherit;opacity:.85;font-size:12px}.onboarding-steps{padding-left:21px;line-height:1.9;color:#c4d0e6}
@media(max-width:650px){.account-navigation{padding:0 12px 8px}.account-quests-button{font-size:12px}.account-action-grid{grid-template-columns:1fr 1fr}.account-action-grid button{min-height:118px;padding:14px}.account-action-grid button strong{font-size:14px}.account-action-grid button:last-child{grid-column:span 2;min-height:85px}.account-welcome{padding:19px}.drawer-links{padding-bottom:25px}.bottom button{font-size:11px}}
@media(prefers-reduced-motion:reduce){.player-drawer{transition:none}}

/* Push settings V8.1: hide inactive action and emphasize actual state. */
.push-settings button[hidden]{display:none!important}
.push-settings .push-enabled{display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(54,208,147,.45);background:rgba(29,126,93,.16);color:#aaf1d3;border-radius:10px;padding:10px 12px;font-size:.95rem;font-weight:700}
.push-settings .push-status:not(.push-enabled){margin:12px 0}
/* V10: Каталог аккаунтов */
.user-directory-toolbar{display:grid;grid-template-columns:minmax(220px,2fr) minmax(160px,1fr);gap:12px;align-items:end;margin:14px 0}
.user-directory-toolbar .field{margin:0}
.account-row{display:flex;align-items:center;justify-content:space-between;gap:14px;background:var(--card,#1b2740);border:1px solid rgba(171,185,224,.22);border-radius:13px;padding:15px 17px;margin:9px 0}
.account-main{min-width:0;flex:1;overflow-wrap:anywhere}
.account-main>div{margin:3px 0}
.account-row .pill{display:inline-block;margin-left:6px;white-space:nowrap}
.account-row .actions{flex-shrink:0;margin:0}
.danger-btn{background:#521d2a;color:#ffe1e5;border:1px solid #be6173;border-radius:11px;padding:10px 14px;cursor:pointer;font-weight:700}
.danger-btn:hover{background:#763044}
@media(max-width:650px){.user-directory-toolbar{grid-template-columns:1fr}.account-row{flex-direction:column;align-items:stretch}.account-row .actions{justify-content:flex-start}}

.sorting-question{border:1px solid #344761;border-radius:16px;padding:14px 14px 10px;margin:0;background:#121c31}.sorting-question legend{padding:0 8px;color:#e8edf9;font-weight:800}.sorting-options{display:grid;gap:9px;margin-top:8px}.sorting-option{display:flex;gap:10px;align-items:flex-start;padding:12px;background:#0e182b;border:1px solid #314260;border-radius:12px;cursor:pointer}.sorting-option input{margin-top:3px}.sorting-option span{line-height:1.45}.sorting-option:hover{border-color:#9d7fe0}.sorting-result{border:1px solid rgba(255,255,255,.1);border-radius:18px;padding:16px;background:linear-gradient(145deg,#1b2843,#131d31)}.sorting-result-top{display:flex;align-items:center;gap:12px;margin-bottom:8px}.sorting-result-icon{display:grid;place-items:center;width:54px;height:54px;border-radius:16px;background:rgba(255,255,255,.09);font-size:28px}.sorting-result h3{margin:0}.sorting-result-compact p:last-child{margin-bottom:0}.house-gryffindor{border-color:rgba(208,86,80,.55)}.house-slytherin{border-color:rgba(73,171,116,.55)}.house-ravenclaw{border-color:rgba(82,131,214,.55)}.house-hufflepuff{border-color:rgba(210,179,72,.55)}.sorting-thinking{text-align:center;padding:16px 10px}.sorting-hat-emoji{font-size:44px;margin-bottom:8px}.sorting-admin-panel{margin:14px 0;padding:14px;border:1px dashed #4c5f81;border-radius:14px;background:#121a2c}.sorting-admin-panel h3{margin-bottom:8px}

/* V16: cinematic single-use Sorting Hat ceremony */
.dialog>.card{position:relative;padding-top:24px}.dialog>.card>.row:first-child{align-items:flex-start;padding-right:46px;min-height:43px}.dialog>.card>.row:first-child>button{position:absolute;right:13px;top:12px;width:38px;height:38px;min-height:38px;padding:0;font-size:0;border-radius:50%;border:1px solid #566883;background:#26344d;color:#eef3ff}.dialog>.card>.row:first-child>button:after{content:'×';font-size:27px;line-height:1}
.hat-stage{text-align:center;position:relative;isolation:isolate;min-height:260px;display:grid;place-items:center;align-content:center;overflow:hidden;border:1px solid rgba(181,139,244,.3);border-radius:24px;background:radial-gradient(circle at 50% 45%,#54417c 0%,#242341 48%,#121a2e 95%);margin:12px 0 18px}.hat-stars{position:absolute;inset:13px;color:#d4c0fa;letter-spacing:36px;opacity:.8;animation:hatSparkle 2.8s ease-in-out infinite alternate}.hat-figure{height:145px;width:172px;position:relative;background:linear-gradient(125deg,#725039,#39281f 52%,#231c24);clip-path:polygon(50% 0%,59% 16%,63% 30%,82% 63%,76% 77%,99% 84%,95% 94%,5% 96%,1% 85%,22% 79%,23% 64%,39% 27%);filter:drop-shadow(0 0 28px #bd89ff);animation:hatFloat 3s ease-in-out infinite;transform-origin:50% 85%}.hat-figure:before{content:'';position:absolute;inset:55% 18% 22%;background:#100e17;transform:rotate(-5deg);border-radius:50%}.hat-eyes{position:absolute;left:39%;top:53%;width:11%;height:9%;border-top:4px solid #e8c5a1;border-radius:55%;transform:rotate(12deg)}.hat-eyes:after{content:'';position:absolute;left:42px;top:-8px;width:15px;height:8px;border-top:4px solid #e8c5a1;transform:rotate(-17deg);border-radius:55%}.hat-mouth{position:absolute;left:38%;top:70%;width:37%;height:12%;border-bottom:4px solid #c7a28b;transform:rotate(8deg);border-radius:0 0 50% 50%}.hat-stage-caption{z-index:1;color:#f1e3ff;font-weight:700;margin:6px 0 0}.hat-intro{text-align:center;color:#e7eaf7;max-width:530px;margin:auto}.hat-start{width:100%;font-size:16px;margin-top:16px;background:linear-gradient(110deg,#8b66d4,#c9a2fa)}.hat-mini{color:#d7c7ff;font-weight:800;text-align:center;padding:12px}.hat-pending{text-align:center}.hat-pending .hat-stage{min-height:245px}.hat-pending h3{font-size:24px}.hat-dots{display:flex;justify-content:center;gap:10px;padding:12px}.hat-dots span{width:11px;height:11px;border-radius:50%;background:#bd9aeb;animation:hatPulse 1.1s infinite alternate}.hat-dots span:nth-child(2){animation-delay:.25s}.hat-dots span:nth-child(3){animation-delay:.5s}.hat-reveal{position:relative;text-align:center;isolation:isolate;overflow:hidden;min-height:400px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:13px;border:1px solid rgba(255,255,255,.16);border-radius:24px;padding:28px 16px;background:radial-gradient(circle at 50% 38%,#423559,#161b32 75%);animation:hatReveal .9s cubic-bezier(.1,.7,.4,1) both}.hat-reveal.house-gryffindor{background:radial-gradient(circle at 50% 35%,#854846,#1b182b 78%)}.hat-reveal.house-slytherin{background:radial-gradient(circle at 50% 35%,#315e48,#151e29 78%)}.hat-reveal.house-ravenclaw{background:radial-gradient(circle at 50% 35%,#345c8e,#141e32 78%)}.hat-reveal.house-hufflepuff{background:radial-gradient(circle at 50% 35%,#7e6637,#242130 78%)}.hat-reveal-crest{font-size:82px;filter:drop-shadow(0 0 28px rgba(255,255,255,.5));animation:hatCrest 1.2s cubic-bezier(.1,.8,.5,1) both}.hat-reveal .eyebrow{color:#ead8ff}.hat-reveal h2{font-size:clamp(27px,6vw,46px);letter-spacing:.12em;margin:0;text-transform:uppercase}.hat-reveal>p{max-width:460px;margin:0}.hat-reveal>button{margin-top:12px}.hat-house-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.hat-house-tile{border:1px solid #4e5977;border-radius:13px;padding:14px;background:#101a2d;display:grid;gap:10px}.hat-house-tile>b{font-size:20px}.hat-house-tile>div:first-child{display:flex;align-items:center;gap:7px}.hat-house-tile .progress{height:7px}.hat-house-tile.house-gryffindor .progress>div{background:#c7625b}.hat-house-tile.house-slytherin .progress>div{background:#5db48c}.hat-house-tile.house-ravenclaw .progress>div{background:#739dda}.hat-house-tile.house-hufflepuff .progress>div{background:#e2ba59}@keyframes hatFloat{0%,100%{transform:translateY(0) rotate(-4deg)}50%{transform:translateY(-10px) rotate(4deg)}}@keyframes hatSparkle{from{opacity:.2;transform:scale(.96)}to{opacity:1;transform:scale(1.07)}}@keyframes hatPulse{to{transform:scale(1.7);opacity:.25}}@keyframes hatReveal{from{opacity:0;transform:scale(.88);filter:blur(12px)}to{opacity:1;transform:scale(1);filter:blur(0)}}@keyframes hatCrest{from{transform:translateY(30px) scale(.6);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}@media(max-width:600px){.dialog>.card{max-height:90vh}.hat-stage{min-height:230px}.hat-house-grid{grid-template-columns:1fr 1fr}.hat-house-tile{padding:10px}.hat-house-tile strong{font-size:12px}}@media(prefers-reduced-motion:reduce){.hat-figure,.hat-stars,.hat-dots span,.hat-reveal,.hat-reveal-crest{animation:none}}

/* V17: iOS Safari fix. Generic input{width:100%} had expanded each radio to a full row,
   leaving the label text only one character wide. Do not alter native checkbox fields. */
.dialog .sorting-question {min-width:0; width:100%; max-width:100%; padding:12px; margin:0; overflow:visible;}
.dialog .sorting-question legend {width:auto; max-width:100%; padding:0 5px; line-height:1.35; font-size:clamp(15px,3.6vw,19px); overflow-wrap:break-word; white-space:normal;}
.dialog .sorting-options {width:100%; min-width:0; display:grid; grid-template-columns:minmax(0,1fr); gap:9px;}
.dialog .sorting-option {width:100%; min-width:0; display:flex; flex-direction:row; align-items:center; gap:12px; padding:13px 12px; text-align:left;}
.dialog .sorting-option input[type="radio"] {appearance:auto; -webkit-appearance:radio; display:block; flex:0 0 21px; width:21px; max-width:21px; height:21px; min-height:21px; margin:0; padding:0; border:0; accent-color:#ba95fc;}
.dialog .sorting-option .sorting-answer-text {display:block; flex:1 1 0%; width:auto; min-width:0; max-width:100%; white-space:normal; overflow-wrap:break-word; word-break:normal; line-height:1.5; font-size:15px;}
.dialog .sorting-option:has(input:checked) {background:#2c2349; border-color:#c49af9; box-shadow:0 0 0 1px #a784e8;}
/* Use the selected cinematic imagery as motion-safe actual image assets. */
.hat-cinematic {display:flex; min-height:unset; aspect-ratio:4/3; width:100%; padding:0; background:#151528; border:1px solid rgba(181,139,244,.4); justify-content:flex-end; overflow:hidden;}
.hat-cinematic-photo {position:absolute; inset:0; width:100%; height:100%; object-fit:cover; transform-origin:center center; animation:hatCinematicDrift 6s ease-in-out infinite alternate;}
.hat-cinematic::after {content:''; position:absolute; inset:25% 0 0; background:linear-gradient(transparent 40%,rgba(10,11,25,.87) 100%); pointer-events:none;}
.hat-cinematic .hat-stage-caption {z-index:2; position:relative; font-size:clamp(12px,3vw,16px); padding:0 14px 12px; text-shadow:0 2px 10px #000;}
.hat-cinematic-sparks {position:absolute; inset:0; opacity:.45; background-image:radial-gradient(circle,#ffd08a 1px,transparent 2px); background-size:58px 73px; animation:hatSparkle 3s ease-in-out infinite alternate; pointer-events:none;}
.hat-cinematic-reveal {padding:0; min-height:unset; aspect-ratio:4/5; max-height:620px; justify-content:end; gap:0; background:#191628!important;}
.hat-reveal-photo {position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center top; animation:hatRevealPhoto 2.5s cubic-bezier(.2,.5,.2,1) both;}
.hat-reveal-shade {position:absolute; inset:20% 0 0; background:linear-gradient(transparent 0%,rgba(8,10,25,.45) 38%,rgba(8,10,25,.97) 100%);}
.hat-reveal-content {position:relative; z-index:2; width:100%; display:flex; flex-direction:column; align-items:center; gap:12px; padding:24px 18px 27px; animation:hatTextRise .9s .3s ease-out both;}
.hat-reveal-content h2 {font-size:clamp(23px,5.7vw,42px); line-height:1.15; overflow-wrap:anywhere; letter-spacing:.075em; color:#fff; text-shadow:0 3px 16px #000;}
.hat-reveal-content p {font-size:clamp(13px,3.2vw,17px); line-height:1.45; max-width:500px; margin:0; color:#fff; text-shadow:0 2px 8px #000;}
.hat-reveal-content .tiny {font-size:12px; color:#dce1e9;}
.hat-reveal-content .eyebrow {font-size:11px; letter-spacing:.13em; color:#f7e4cc; text-shadow:0 2px 8px #000;}
.hat-reveal-content button {margin-top:8px;}
.sorting-result-image {width:80px; height:80px; border-radius:12px; object-fit:cover; flex:0 0 auto; border:1px solid rgba(255,255,255,.16);}
.sorting-result-top {min-width:0; align-items:center;}
.sorting-result-top>div {min-width:0;}
@keyframes hatCinematicDrift {from {transform:scale(1.025) translateY(0)} to {transform:scale(1.1) translateY(-2%)}}
@keyframes hatRevealPhoto {from {transform:scale(1.15); filter:blur(8px); opacity:.25} to {transform:scale(1); filter:blur(0); opacity:1}}
@keyframes hatTextRise {from {opacity:0;transform:translateY(15px)} to {opacity:1;transform:translateY(0)}}
@media(max-width:520px){.hat-cinematic-reveal{aspect-ratio:4/5;max-height:69vh}.hat-reveal-content{padding:20px 12px 24px;gap:10px}.sorting-result-image{width:62px;height:62px}.dialog>.card{width:100%; min-width:0;}}
@media(prefers-reduced-motion:reduce){.hat-cinematic-photo,.hat-cinematic-sparks,.hat-reveal-photo,.hat-reveal-content{animation:none;}}

/* V18 · Focused participant dashboard and calm, hierarchical navigation */
.player-drawer{background:#141e31;box-shadow:24px 0 70px #0207129e}
.drawer-head{padding:21px 21px 14px}
.drawer-head h2{font-size:20px;margin:5px 0 5px;overflow-wrap:anywhere}
.drawer-head small{font-size:12px}
.drawer-current-team{padding:13px 20px;display:flex;flex-direction:column;gap:5px;background:#202a44;border-bottom:1px solid #364661}
.drawer-current-team b{font-size:14px;overflow-wrap:anywhere}
.drawer-links{gap:2px;padding:7px 12px 22px}
.drawer-group-title{font-size:10px;letter-spacing:.15em;color:#8e9eb9;font-weight:850;text-transform:uppercase;margin:15px 10px 5px}
.drawer-link{min-height:44px;font-size:14px;padding:11px 12px;gap:10px}
.drawer-link-icon{display:inline-flex;justify-content:center;min-width:26px!important;font-size:18px}
.drawer-link.is-active{background:#3b355c;border:1px solid #75659a}
.drawer-link-current{margin-left:auto;color:#c7a7f4}
.account-navigation{min-height:55px}
.account-nav-label{font-weight:800}
.mobile-nav-button{display:flex;flex-direction:column;gap:4px;justify-content:center;line-height:1.1!important;min-height:56px!important;border-radius:12px!important;padding:6px 2px!important}
.mobile-nav-button>span{font-size:21px}
.mobile-nav-button>small{color:inherit;font-size:11px;white-space:nowrap;font-weight:700}
.mobile-nav-button.is-active{background:#56438a;color:#fff}
.member-home{display:flex;flex-direction:column;gap:13px}
.member-home-identity{padding:8px 1px 0}
.member-home-identity h1{font-size:clamp(25px,5vw,35px);line-height:1.15;margin:0 0 5px}
.member-home-identity p{margin:0;font-size:13px}
.member-faculty-hero{height:clamp(170px,29vw,250px);overflow:hidden;position:relative;display:flex;align-items:flex-end;border:1px solid #445274;border-radius:19px;background:#151e30}
.member-faculty-hero>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 44%}
.member-faculty-shade{position:absolute;inset:0;background:linear-gradient(to top,rgba(8,12,25,.94),rgba(8,12,25,.1) 70%)}
.member-faculty-content{position:relative;z-index:1;padding:19px 22px;width:100%;text-shadow:0 2px 12px #04060b}
.member-faculty-content h2{font-size:clamp(27px,5vw,38px);margin:4px 0 0;font-weight:900;letter-spacing:.03em}
.member-faculty-content .eyebrow{color:#e8d1ff}
.member-faculty-full{height:min(430px,54vw);min-height:250px;margin-bottom:15px}
.member-faculty-full .member-faculty-content{padding:28px}
.member-faculty-full .member-faculty-content p{max-width:570px;margin:8px 0 0;font-size:15px;line-height:1.5;color:#f4f5fb}
.member-faculty-lock{font-size:12px!important;color:#e5e4f1!important}
.member-quest-abstract{min-height:160px;border:1px solid #455676;border-radius:18px;padding:22px;background:radial-gradient(circle at 85% 20%,#514078 0%,transparent 42%),linear-gradient(135deg,#273754,#131b2f);display:flex;flex-direction:column;justify-content:end}
.member-quest-abstract h2{font-size:clamp(21px,4vw,30px);margin:7px 0 0}
.member-quest-abstract p{margin:3px 0 0;color:#bfc9e2}
.member-primary-action{background:#1b2941;border:1px solid #435776;border-radius:19px;padding:21px 22px}
.member-primary-action h2{font-size:clamp(20px,4vw,25px);margin:8px 0}
.member-primary-action p{font-size:14px;color:#bac6dd;margin:0 0 16px;max-width:600px}
.member-primary-action button{min-width:195px}
.member-home-meta{display:flex;gap:10px;min-width:0}
.member-mini-stat{flex:1 1 0;background:#18253c;color:#e9edfa;border:1px solid #394c69;box-shadow:none;padding:14px 12px;min-width:0;display:flex;align-items:flex-start;flex-direction:column;gap:7px;text-align:left;line-height:1.25}
.member-mini-stat span{font-size:11px;color:#9faecb}
.member-mini-stat b{font-size:clamp(12px,2.6vw,16px);overflow-wrap:anywhere}
.member-latest-announcement{display:flex;flex-direction:column;text-align:left;align-items:flex-start;gap:6px;background:transparent;border:1px solid #394a65;color:#d9e3f4;min-height:0;padding:14px 17px;box-shadow:none}
.member-latest-announcement>span:not(.eyebrow){font-size:13px;line-height:1.5;font-weight:400}
.member-latest-announcement small{font-size:12px;color:#c5a5f1}
.member-section-heading{padding:4px 0 9px}
.member-section-heading h2{font-size:clamp(24px,4vw,30px);margin:6px 0}
.member-section-heading p{font-size:14px;margin:0 0 5px}
.member-info-lines{display:flex;flex-direction:column;gap:0}
.member-info-lines>div{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid #354361}
.member-info-lines>div:last-child{border-bottom:0}
.member-info-lines span{color:#aebbd4;font-size:13px;flex:0 0 37%}
.member-info-lines b{font-size:14px;text-align:right;overflow-wrap:anywhere}
.member-short-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:12px}
.member-short-actions button{font-size:13px}
.member-points-total{border-radius:20px;border:1px solid #645580;background:linear-gradient(125deg,#2c2648,#1a2946);padding:25px;display:flex;flex-direction:column;gap:4px;margin:6px 0 16px}
.member-points-total small{font-size:13px;color:#bcb1d9}
.member-points-total strong{font-size:clamp(38px,8vw,56px)}
.member-points-total strong span{font-size:15px;color:#dad5ea}
.member-settings-expand{margin:14px 0;border:1px solid #3a4a65;padding:5px 10px}
.member-settings-expand>summary{font-size:14px;color:#d9c6ff;font-weight:750}
.member-settings-expand .push-settings{margin:8px 0}
.member-hat-preview{border:1px solid #3c4b68;background:#1a2337;border-radius:18px;overflow:hidden;display:grid;grid-template-columns:minmax(180px,.8fr) 1fr;align-items:center;gap:14px}
.member-hat-preview img{height:100%;min-height:230px;width:100%;object-fit:cover}
.member-hat-preview>div{padding:18px}
.member-hat-preview h2{font-size:23px}
.member-start-card{display:flex;gap:20px;align-items:center;justify-content:space-between}
.member-start-card>div{flex:1}
@media(max-width:600px){
 .mobile-nav-button small{font-size:10px}
 .member-home-meta{gap:7px}
 .member-mini-stat{padding:11px 9px}
 .member-faculty-hero{height:208px}
 .member-faculty-full{height:340px}
 .member-faculty-full .member-faculty-content{padding:18px}
 .member-primary-action{padding:19px}
 .member-primary-action button{width:100%}
 .member-start-card{display:block}
 .member-start-card button{width:100%}
 .member-hat-preview{display:block}
 .member-hat-preview img{max-height:230px;min-height:0}
 .member-hat-preview>div{padding:17px}
}

/* V19: top right notifications and mobile first messenger */
.account-navigation{position:relative}.account-notification-bell{margin-left:auto;min-height:45px;min-width:46px;padding:7px 9px;border:1px solid #405274;background:#1e2c45;border-radius:14px;position:relative;display:flex;align-items:center;justify-content:center;color:#e8dcff;font-size:24px}
.account-notification-bell:focus-visible{outline:2px solid #ceb5ff;outline-offset:3px}
.account-bell-count{position:absolute;top:-7px;right:-8px;min-width:21px;height:21px;padding:0 4px;display:flex;align-items:center;justify-content:center;color:#fff;border:2px solid #111525;border-radius:100px;background:#d35272;font-size:11px;font-weight:900;line-height:1}
.account-bell-count[hidden]{display:none!important}.notification-archive{margin-top:16px;background:#131d31;border:1px solid #344260;border-radius:15px;padding:12px}.notification-archive summary{cursor:pointer;color:#cfc7e5;font-weight:700}
.messenger-shell{display:flex;flex-direction:column;border:1px solid #3d506e;background:linear-gradient(160deg,#162238,#101829);border-radius:21px;overflow:hidden;min-width:0;min-height:370px;box-shadow:0 12px 35px #070d1a60}
.messenger-title{display:flex;align-items:center;gap:11px;border-bottom:1px solid #344461;padding:13px 16px;background:#1b2b45}.messenger-title>div{display:flex;flex-direction:column;min-width:0}.messenger-title b{font-size:14px}.messenger-title small{font-size:11px;color:#9faccc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.messenger-avatar{width:39px;height:39px;min-width:39px;border-radius:50%;background:linear-gradient(140deg,#7754c4,#294f7d);display:flex;align-items:center;justify-content:center;font-size:20px;color:#fff}
.messenger-messages{display:flex;flex:1;flex-direction:column;gap:10px;overflow-y:auto;overscroll-behavior:contain;height:380px;min-height:220px;padding:16px 12px;scrollbar-color:#586882 transparent}.messenger-empty{text-align:center;margin:auto;color:#a1b1cd;font-size:14px;max-width:260px;padding:18px}
.messenger-line{display:flex;min-width:0}.messenger-line.mine{justify-content:flex-end}.messenger-line.theirs{justify-content:flex-start}.messenger-bubble{background:#263651;max-width:min(78%,530px);min-width:70px;padding:11px 13px;border-radius:17px 17px 17px 4px;border:1px solid #435471;overflow-wrap:anywhere}.mine .messenger-bubble{background:linear-gradient(130deg,#503f82,#344b8d);border-color:#6b5a9e;border-radius:17px 17px 4px 17px}.messenger-text{white-space:pre-wrap;font-size:14px;line-height:1.5;color:#f4f5fb}.messenger-meta{font-size:10px;color:#b7bdd4;margin-top:6px;text-align:right}.messenger-name{color:#d2bbfb;font-size:11px;font-weight:850;margin-bottom:3px}.message-urgent{color:#ffb2bb}
.messenger-compose{display:flex;align-items:end;gap:8px;padding:12px;background:#17243a;border-top:1px solid #384760}.messenger-compose textarea{display:block;flex:1;width:auto;min-width:0;resize:vertical;min-height:42px;max-height:126px;font:inherit;font-size:14px;border-radius:13px;padding:10px 12px}.messenger-compose button{min-width:42px;width:44px;height:43px;min-height:43px;padding:0;display:grid;place-items:center;font-size:21px;border-radius:13px}.messenger-compose .messenger-urgent{font-size:12px;white-space:nowrap;color:#d5d7e8;display:flex;align-items:center;gap:4px}.messenger-compose .messenger-urgent input{width:17px;flex:0 0 17px}
.messenger-tabset{display:flex;gap:9px;margin:14px 0}.messenger-tabset button{flex:1;min-width:0}.messenger-inbox{display:grid;grid-template-columns:minmax(190px,33%) minmax(0,1fr);border:1px solid #3d506e;border-radius:19px;overflow:hidden;background:#141f32;min-height:470px}.messenger-threads{padding:12px;border-right:1px solid #344460;min-width:0}.messenger-threads h3{margin:0 0 10px}.messenger-threads input{width:100%;margin-bottom:10px}.messenger-thread-scroll{display:flex;flex-direction:column;gap:4px;max-height:470px;overflow-y:auto}.messenger-thread{border:1px solid transparent!important;background:transparent!important;text-align:left;padding:12px 10px!important;min-height:auto!important;box-shadow:none!important;display:flex;gap:5px;justify-content:space-between;align-items:center}.messenger-thread.selected{background:#354061!important;border-color:#59648a!important}.messenger-thread>div{min-width:0;display:flex;flex-direction:column;gap:3px}.messenger-thread strong{font-size:13px}.messenger-thread small{font-size:11px;color:#b1bdd2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:185px}.messenger-thread[hidden]{display:none!important}.thread-unread{min-width:22px;padding:3px 6px;background:#b995f5;color:#1b1633;border-radius:30px;font-size:11px;font-weight:900;text-align:center}.messenger-dialog{padding:9px;min-width:0}.messenger-dialog .messenger-shell{height:100%;min-height:445px}.messenger-dialog .messenger-messages{height:350px}
.community-chat-entry{position:relative}.chat-moderate{display:block;margin:2px 2px 0 auto;font-size:10px!important;min-height:20px!important;padding:2px 7px!important;background:transparent!important;color:#f5bcc7!important;box-shadow:none!important;border:none!important}.admin-announce-expand{margin:17px 0;border:1px solid #344660;border-radius:14px;padding:12px}.admin-announce-expand>summary{font-weight:800;cursor:pointer}
@media(max-width:650px){.account-notification-bell{min-width:44px}.messenger-messages{height:min(48vh,470px);min-height:260px}.messenger-bubble{max-width:87%}.messenger-inbox{grid-template-columns:1fr}.messenger-threads{border-right:0;border-bottom:1px solid #344460}.messenger-thread-scroll{max-height:195px}.messenger-dialog{padding:7px}.messenger-dialog .messenger-shell{min-height:350px}.messenger-dialog .messenger-messages{height:310px}.messenger-compose{flex-wrap:wrap}.messenger-compose .messenger-urgent{order:3;flex:1 0 100%}.messenger-tabset button{font-size:12px;line-height:1.25;min-height:46px;padding:8px}}

/* V20 · Familiar messenger inbox, mobile-first thread navigation */
.chat-inbox-list{border:1px solid #405274;border-radius:20px;background:#172238;overflow:hidden;display:flex;flex-direction:column}
.chat-inbox-row{width:100%;display:flex;align-items:center;gap:12px;background:transparent!important;box-shadow:none!important;color:#ecedfc!important;text-align:left;padding:16px 14px!important;min-height:89px;border:0!important;border-bottom:1px solid #34435c!important;border-radius:0!important}
.chat-inbox-row:last-child{border-bottom:0!important}.chat-inbox-row:active,.chat-inbox-row:hover{background:#293752!important}
.chat-inbox-icon{width:51px;height:51px;flex:none;border-radius:50%;background:linear-gradient(135deg,#7654ae,#344f8d);display:grid;place-items:center;font-size:24px}
.chat-inbox-main{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}.chat-inbox-main strong{font-size:15px;line-height:1.3;white-space:normal;overflow-wrap:anywhere}.chat-inbox-main small{font-size:12px;color:#b6c2d9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-inbox-preview{font-size:13px;color:#abbad4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.chat-inbox-side{min-width:45px;display:flex;align-items:flex-end;flex-direction:column;gap:7px;color:#9baacc}.chat-inbox-side small{font-size:10px;white-space:nowrap}.chat-inbox-side>.thread-unread{align-self:end}.chat-inbox-side>span{font-size:22px;line-height:1;color:#b6a6d9}
.messenger-back{display:inline-flex;align-items:center;justify-content:flex-start;margin:0 0 12px;min-height:41px;padding:8px 14px;max-width:max-content;font-size:13px}
.messenger-shell .messenger-name{font-size:12px;color:#dec8ff}.messenger-shell .messenger-title b{font-size:15px}
@media(max-width:650px){.chat-inbox-row{padding:13px 11px!important;gap:10px}.chat-inbox-icon{width:45px;height:45px}.chat-inbox-side{min-width:35px}.chat-inbox-main strong{font-size:14px}.messenger-messages{height:clamp(300px,51dvh,590px)}.messenger-compose textarea{font-size:16px}}

/* V21: organizer workspace and launch-readiness screen */
.admin-menu-group{padding:10px 0 12px;border-top:1px solid #33425b;margin-top:5px}
.admin-menu-heading{font-size:10px;letter-spacing:.13em;color:#92a5cb;font-weight:850;padding:5px 10px 9px}
.side h3{font-size:15px;letter-spacing:.02em}
.side .admin-logout{margin-top:15px;border-top:1px solid #33425b;padding-top:18px;color:#d6bce9}
.admin-topbar{display:flex;align-items:flex-end;gap:12px;justify-content:space-between;flex-wrap:wrap;padding:5px 0 22px;margin-bottom:17px;border-bottom:1px solid #35415c}
.admin-event-context{min-width:0;flex:1;max-width:560px}
.admin-context-label,.admin-eyebrow{font-size:11px;font-weight:850;letter-spacing:.14em;color:#bba0ec;display:block;margin-bottom:8px}
.admin-event-context select{min-height:48px;font-weight:650}
.admin-state-chip{border:1px solid #58698b;padding:10px 13px;border-radius:100px;color:#cdd7ec;white-space:nowrap;font-size:12px;font-weight:650}
.admin-page-intro{margin:5px 0 24px;max-width:790px}
.admin-page-intro h1{margin:4px 0 10px}
.admin-page-intro p{margin:0}
.admin-feature-card{padding:25px;background:linear-gradient(135deg,#242941,#182a40)}
.admin-feature-header{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:14px;flex-wrap:wrap}
.admin-feature-header h2{margin:0 0 8px}
.admin-feature-header p{margin:0}
.readiness-percent{font-weight:850;font-size:31px;color:#e1c5ff}
.admin-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:20px}
.admin-shortcuts button{justify-content:flex-start;padding:18px;font-size:14px}
.readiness-list{display:flex;flex-direction:column;gap:9px;margin:14px 0}
.readiness-item{display:flex;align-items:center;gap:14px;padding:12px;background:#111b2e;border:1px solid #34445e;border-radius:14px;min-width:0}
.readiness-icon{height:34px;width:34px;flex:0 0 34px;display:grid;place-items:center;border-radius:50%;font-weight:900}
.readiness-icon.is-ready{background:#1c5344;color:#a3f4d5}
.readiness-icon.is-missing{background:#50402d;color:#ffd19b}
.readiness-item-main{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.admin-jump{font-size:12px;white-space:nowrap;min-height:38px;padding:9px 12px}
.admin-house-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:10px 0 20px}
.admin-house-stat{display:flex;flex-direction:column;gap:8px;background:#111a2c;border:1px solid #35435f;border-radius:14px;padding:13px;min-width:0}
.admin-house-stat b{font-size:13px}
.admin-house-stat strong{font-size:25px}
@media(max-width:900px){.admin-house-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:750px){.admin-topbar{align-items:stretch}.admin-topbar>.hide-desktop{flex:0 0 auto}.admin-event-context{flex:1 1 100%;max-width:none;order:2}.admin-state-chip{margin-left:auto}.side{position:static;max-height:75vh;overflow-y:auto}.admin-shortcuts{grid-template-columns:1fr}.admin-menu-group{padding-top:8px}.admin-page-intro{margin:0 0 18px}}
@media(max-width:420px){.readiness-item{gap:8px;padding:10px}.admin-jump{font-size:11px;padding:8px 9px}.readiness-icon{width:28px;height:28px;flex-basis:28px}.admin-house-stat{padding:10px}.admin-page-intro h1{font-size:29px}}

/* V22 – team life-cycle dashboard */
.v22-team-statgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0}
.v22-team-statgrid>div{background:#1a2439;border:1px solid #394a65;border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:8px}
.v22-team-statgrid small{color:#a8b6d3;font-size:.83rem}
.v22-team-statgrid b{font-size:1.75rem;line-height:1.2}
.v22-team-toolbar{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:12px;margin:16px 0}
.v22-team-card{margin:14px 0}
.v22-team-card[hidden]{display:none!important}
.v22-team-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;flex-wrap:wrap}
.v22-team-head h3{margin:0 0 4px}
.v22-team-head p{margin:0}
.v22-team-summary{display:flex;gap:16px;flex-wrap:wrap;margin:14px 0;color:#adbad5;font-size:.94rem}
.v22-team-summary b{color:#ecf0ff}
.v22-team-details{border:1px solid #37465d;border-radius:12px;margin:16px 0;padding:10px 14px}
.v22-team-details summary{cursor:pointer;font-weight:650;list-style:auto}
.v22-team-details form{margin-top:16px}
.v22-team-results{min-width:0}
@media(max-width:640px){.v22-team-statgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.v22-team-toolbar{grid-template-columns:1fr}.v22-team-summary{display:grid;gap:7px}.v22-team-card .actions{gap:7px}.v22-team-card .actions button{flex:1;min-width:0}}

/* V23 — unified organizer sidebar, based on approved visual reference */
.admin-layout{grid-template-columns:265px minmax(0,1fr);gap:20px}
.side.admin-nav{background:linear-gradient(160deg,#19243b 0%,#172137 75%,#131d31 100%);border:1px solid #374663;border-radius:23px;padding:21px 14px 24px;max-height:calc(100vh - 40px);overflow-y:auto;scrollbar-width:thin;scrollbar-color:#475775 transparent;box-shadow:0 12px 30px rgba(0,0,0,.12)}
.admin-nav-brand{display:flex;align-items:center;gap:10px;padding:9px 10px 21px;font-weight:850;font-size:15px;letter-spacing:.045em;color:#f0f2fa;white-space:nowrap}
.admin-nav-brand em{color:#c7a2f8;font-style:normal}
.admin-nav-brand-symbol{color:#c6a0f5;font-size:22px;line-height:1}
.admin-nav .admin-menu-group{padding:16px 0 18px;margin:0;border-top:1px solid #3a4a64}
.admin-nav .admin-menu-heading{padding:0 12px 11px;font-size:10px;letter-spacing:.17em;font-weight:850;color:#a7b8d8}
.admin-nav button.admin-nav-item{display:grid;grid-template-columns:22px minmax(0,1fr);justify-content:initial;align-items:center;column-gap:13px;width:100%;min-height:50px;max-height:none;margin:4px 0;padding:12px 12px;border:1px solid transparent;border-radius:12px;background:#26334d;color:#e6ebf7;box-shadow:0 2px 4px #080e1c55;line-height:1.28;font-size:13px;font-weight:700;text-align:left;overflow-wrap:normal;word-break:normal;transition:background-color .15s,border-color .15s,transform .12s}
.admin-nav button.admin-nav-item:hover:not(:disabled){background:#34415e;border-color:#576888;filter:none;transform:none;box-shadow:0 2px 8px #080e1c77}
.admin-nav button.admin-nav-item.active{background:linear-gradient(110deg,#554177,#654c91);border-color:#715e96;color:#fff;box-shadow:0 2px 8px #080e1c77}
.admin-nav .admin-nav-svg{width:21px;height:21px;flex-shrink:0;color:inherit;display:block}
.admin-nav .admin-nav-label{display:block;min-width:0;white-space:normal;line-height:1.26;overflow-wrap:normal;word-break:normal}
.admin-nav button.admin-logout{margin-top:15px;padding:13px 12px;border:1px solid #3a4a64;color:#e0b8f7;background:#25314a}
.admin-nav .admin-menu-group:last-of-type{padding-bottom:6px}
@media(max-width:930px) and (min-width:751px){.admin-layout{grid-template-columns:240px minmax(0,1fr);gap:12px}.side.admin-nav{padding:15px 9px}.admin-nav button.admin-nav-item{padding:11px 8px;font-size:12px;column-gap:8px}}
@media(max-width:750px){.admin-layout{display:block}.side.admin-nav{position:static;display:none;max-height:72vh;margin:0 0 15px;padding:14px 12px}.side.admin-nav.open{display:block}.admin-nav button.admin-nav-item{min-height:48px;font-size:14px}.admin-nav-brand{padding-bottom:15px}}
@media(prefers-reduced-motion:reduce){.admin-nav button.admin-nav-item{transition:none}}

/* V24 — clear, safe team operations */
.v24-warning{background:#342a3f;border:1px solid #8d697a;border-radius:12px;padding:14px;margin-bottom:14px}
.v24-warning p{margin:9px 0 0;color:#eedce4;font-size:.94rem}
button.v24-danger,button.v24-cancel{border:1px solid #a96c82;background:#563443;color:#fff}
button.v24-danger:hover,button.v24-cancel:hover{background:#754356}
button.v24-promote{background:#344e54;border:1px solid #678b8c;color:#f3ffff}
button.v24-promote:hover{background:#3a6168}
.v24-team-note{font-size:.84rem;color:#c9d2e7}
@media(max-width:640px){.v22-team-card .actions button{flex:1 1 42%;font-size:.85rem}}

/* V27: connectivity indicator, without hiding the cached interface */
#connectionBanner{position:fixed;left:12px;right:12px;top:max(8px,env(safe-area-inset-top));z-index:10010;background:#3d304e;color:#fff;border:1px solid #aa8bd0;border-radius:12px;padding:12px 14px;text-align:center;font-size:14px;box-shadow:0 8px 24px #0007;}
#connectionBanner[hidden]{display:none!important;}
#connectionBanner button{display:inline-block;width:auto;min-height:30px;margin:0 0 0 9px;padding:4px 10px;background:#9f7ce4;color:#131023;font-size:13px;font-weight:700;}

/* V28 · visibly isolated external testing */
.training-register-notice{background:rgba(133,92,232,.12);border:1px solid rgba(164,131,250,.46);padding:16px 18px;border-radius:16px;line-height:1.55;margin:10px 0 18px}
.training-register-notice strong{color:#e4d9ff;display:block;margin-bottom:7px}
.training-register-notice p{margin:0;color:#cbd1e1;font-size:.94rem}
.training-event-warning{color:#e4d9ff;font-weight:650;font-size:.86rem;margin:6px 0 13px}

/* V29: concise training setup hints */
.training-guide{border:1px solid rgba(167,132,244,.4);background:linear-gradient(135deg,rgba(87,59,136,.18),rgba(20,26,44,.78));line-height:1.55}.training-guide h2{margin:5px 0 12px}.training-guide p{margin:7px 0 14px}.training-guide .actions{margin-top:12px}

/* V31 · Гарри Поттер: двухчастные задания и медиаотчёты */
.hp-stage,.hp-creative{margin:12px 0}
.hp-stage h3,.hp-creative h3{margin-top:0}
.hp-puzzle-image{display:block;max-width:100%;height:auto;max-height:560px;object-fit:contain;border-radius:14px;border:1px solid rgba(172,185,210,.23);margin:14px auto;background:#fafafa}
.hp-fragments{display:flex;gap:6px;flex-wrap:wrap;margin:16px 0}
.hp-admin-stage{border:1px solid rgba(177,192,216,.17);border-radius:12px;margin:7px 0;padding:12px;background:rgba(24,36,60,.35)}
.hp-admin-stage summary{display:flex;gap:8px;align-items:center;justify-content:space-between;cursor:pointer;list-style:none}
.hp-admin-stage summary::-webkit-details-marker{display:none}
.hp-admin-stage summary b{font-size:.9rem;line-height:1.35}
.hp-admin-stage>.pre{margin-top:12px;white-space:pre-wrap;overflow-wrap:anywhere}
.hp-admin-stage form{margin-top:12px}
.hp-admin-stage .pill{white-space:normal;text-align:right;font-size:.72rem}
.hp-import>h2{margin-top:0}
.review-video-icon{display:flex;justify-content:center;align-items:center;min-height:82px;background:rgba(123,90,188,.2);color:#eee;border-radius:10px;font-weight:800}
video.thumb{width:100%;max-height:70vh;display:block;background:#000;object-fit:contain}
@media(max-width:600px){.hp-admin-stage summary{align-items:flex-start}.hp-stage .card{padding:12px}.hp-puzzle-image{max-height:370px}}
.hp-revealed-hint{border:1px solid rgba(168,138,223,.32);border-left:3px solid #ab86e8;border-radius:10px;padding:10px 12px;margin:10px 0;background:rgba(132,88,192,.1)}
.hp-revealed-hint p{margin:5px 0 0}

/* V32: сохраненные коды настоящего квеста отдельно от физической проверки */
.hp-saved-code{border:1px solid #477a69;background:#142e2f;border-radius:14px;padding:14px;margin:15px 0}
.hp-saved-label{display:block;color:#a2f2cc;font-size:13px;font-weight:760;margin-bottom:9px}
.hp-saved-code-row{display:flex;gap:11px;align-items:center;flex-wrap:wrap}
.hp-saved-code-row code{font:800 clamp(24px,3vw,30px)/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.13em;color:#fff;user-select:all}
.hp-copy-code{min-height:39px;padding:8px 12px;font-size:12px}
.hp-code-stats{display:flex;flex-wrap:wrap;gap:9px;margin:12px 0}
.hp-code-stats span{display:inline-block;padding:9px 12px;background:#273753;border:1px solid #445574;border-radius:10px;font-size:13px}
.hp-code-stats strong{color:#e6d3ff}
@media(max-width:520px){.hp-saved-code-row{justify-content:space-between}.hp-code-stats span{flex:1 1 100%}}

.hp-v33-label{display:inline-block;margin-left:8px;padding:3px 8px;border-radius:8px;background:#624997;color:#fff;font-size:12px;vertical-align:middle}

/* V34: three-stage quest editor */
.hp-v34-editor{max-width:100%;overflow:visible}
.hp-editor-faculty{margin:12px 0;border:1px solid #3e506d;border-radius:14px;background:rgba(24,36,60,.5);padding:12px}
.hp-editor-faculty>summary{display:flex;justify-content:space-between;gap:12px;align-items:center;cursor:pointer;font-size:1.05rem;padding:6px}
.hp-editor-faculty>summary span{color:#b2bfd2;font-size:.85rem}
.hp-editor-task{border:1px solid #334766;border-radius:12px;margin:12px 0;padding:12px;background:#162139}
.hp-editor-task>summary{display:flex;justify-content:space-between;align-items:center;gap:10px;cursor:pointer}
.hp-editor-task>summary>span:first-child{display:flex;flex-direction:column;gap:5px;min-width:0}
.hp-editor-task>summary small{font-weight:normal;color:#aab9d2}
.hp-editor-task>summary .pill{flex-shrink:0}
.hp-editor-form{padding-top:18px;gap:12px}
.hp-editor-part{border:1px solid #354763;background:rgba(16,26,46,.67);padding:15px;border-radius:12px;display:flex;flex-direction:column;gap:13px}
.hp-editor-part h4{display:flex;align-items:center;gap:10px;margin:0 0 4px;font-size:1.07rem}
.hp-editor-part h4>span{display:inline-grid;place-items:center;background:#755fc9;color:white;width:26px;height:26px;border-radius:7px}
.hp-editor-part h4 small{font-weight:normal;color:#aebcce}
.hp-editor-part .field{margin:0}
.hp-editor-part textarea{min-height:90px;resize:vertical}
.hp-editor-image{display:flex;flex-direction:column;gap:7px;align-items:flex-start}
.hp-editor-image img{max-width:min(100%,470px);max-height:330px;object-fit:contain;border-radius:8px;border:1px solid #4b5b76;background:#f3f3f3}
.hp-editor-image a{font-size:.85rem}
.hp-image-error{display:none;color:#ffc5ab}
.hp-image-missing img{display:none}.hp-image-missing .hp-image-error{display:block}
.hp-editor-private{border-color:#726438}
.hp-save-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;position:sticky;bottom:8px;padding:12px;background:#18243d;border:1px solid #44597d;border-radius:12px;z-index:3}
.hp-save-actions button{min-width:180px}
@media(max-width:620px){.hp-editor-part{padding:11px}.hp-editor-task{padding:9px}.hp-editor-task>summary{align-items:start}.hp-save-actions button{width:100%}}
