/* Сократ: пространственная тема для входа, арены и клуба. */
.self-page,.duel-page,.club-page{
  --bg:#080d1a;--surface:#111b2c;--line:rgba(143,185,230,.20);
  --ink:#f3f8ff;--muted:#b4c3d8;--accent:#70e8ff;--blue:#aa92ff;
  --danger:#ff919d;color-scheme:dark;
  min-height:100vh;
  background:
    radial-gradient(ellipse 58% 48% at 84% 6%,rgba(83,91,212,.21),transparent 70%),
    radial-gradient(ellipse 48% 44% at 7% 70%,rgba(5,175,198,.12),transparent 76%),
    linear-gradient(160deg,#080d1a 0%,#0b1324 54%,#070c19 100%);
  background-attachment:fixed;
}
.self-page::before,.duel-page::before,.club-page::before{
  content:"";position:fixed;inset:0;pointer-events:none;z-index:0;opacity:.22;
  background-image:linear-gradient(rgba(113,196,230,.13) 1px,transparent 1px),linear-gradient(90deg,rgba(113,196,230,.13) 1px,transparent 1px);
  background-size:46px 46px;
  mask-image:linear-gradient(to bottom,#000,transparent 78%);
}
.self-page main,.duel-page .wrap,.club-page main{position:relative;z-index:1}
.self-page .wrap{max-width:1120px;padding-top:18px}
.duel-page .wrap{max-width:1180px}
.self-page .top,.duel-page .top,.club-page .club-top{margin-bottom:14px}
.self-page .brand,.duel-page .brand,.club-page .club-brand{
  color:#e8fbff;font-weight:850;letter-spacing:.19em;text-shadow:0 0 24px rgba(112,232,255,.38)
}
.self-page .who,.duel-page .who{border-color:rgba(112,232,255,.24);background:rgba(15,31,52,.58);color:#bed0e6}
.experience-tools{display:flex;align-items:center;justify-content:flex-end;gap:7px}
.experience-tools .who{margin-right:4px}
.experience-icon{
  min-width:38px;min-height:38px;padding:0 8px;border:1px solid rgba(138,198,236,.27);
  border-radius:50%;background:linear-gradient(145deg,rgba(37,62,91,.74),rgba(11,20,39,.8));
  color:#dffaff;box-shadow:inset 0 1px rgba(255,255,255,.12),0 5px 14px rgba(0,0,0,.17);
  cursor:pointer;font-weight:750;
}
.experience-icon[aria-pressed="false"]{color:#91a0b7}
.experience-icon:hover,.experience-icon:focus-visible{border-color:var(--accent);color:#fff;transform:translateY(-2px)}
.self-page .card,.duel-page .card,.club-page .club-panel,.club-page .club-person,.club-page .club-request{
  background:linear-gradient(145deg,rgba(25,38,61,.92),rgba(12,22,40,.94));
  border:1px solid rgba(136,190,233,.23);border-radius:25px;
  box-shadow:inset 0 1px rgba(255,255,255,.07),0 18px 50px rgba(0,0,0,.25),0 0 45px rgba(75,152,219,.045);
  backdrop-filter:blur(16px);
}
.self-page .card{padding:22px}
.self-page h1,.duel-page h1,.club-page h1{letter-spacing:-.035em}
.self-page button.primary,.duel-page button.primary,.club-page .club-primary,.self-page .result-link{
  color:#051423!important;background:linear-gradient(112deg,#a4f8ff,#70d8f4 52%,#b5a2ff);
  border:0;box-shadow:inset 0 1px rgba(255,255,255,.6),0 10px 27px rgba(64,186,230,.21);
  font-weight:800;transition:transform .18s ease,box-shadow .18s ease,filter .18s ease;
}
.self-page button.primary:hover:enabled,.duel-page button.primary:hover:enabled,.club-page .club-primary:hover,.self-page .result-link:hover{
  transform:translateY(-2px);box-shadow:0 13px 32px rgba(64,186,230,.32);filter:saturate(1.1)
}
.self-page button.ghost,.duel-page button.ghost,.club-page .club-secondary{
  background:linear-gradient(145deg,rgba(25,41,66,.85),rgba(14,25,44,.9));border-color:rgba(148,196,233,.27);
  box-shadow:inset 0 1px rgba(255,255,255,.07);
}
.self-page input,.self-page select,.duel-page input,.duel-page select,.club-page input,.club-page textarea{
  background:rgba(7,16,32,.78);border-color:rgba(151,191,226,.23);border-radius:13px;
}
.self-page :is(button,a,input,select,summary):focus-visible,.duel-page :is(button,a,input,select,summary):focus-visible,.club-page :is(button,a,input,textarea):focus-visible{
  outline:2px solid var(--accent);outline-offset:3px;
}
.self-page .step,.self-page .form-step,.duel-page .step,.club-page .club-eyebrow{color:#7de8f5;letter-spacing:.13em;text-transform:uppercase;font-size:11px}

/* Вход: крупная идея слева, действие справа — без длинной страницы. */
@media(min-width:760px){
  .self-page #auth{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(340px,.95fr);gap:24px;align-items:stretch}
}
.self-page .intro{
  position:relative;isolation:isolate;overflow:hidden;min-height:335px;padding:30px;
  border:1px solid rgba(116,231,255,.27);border-radius:22px;
  background:radial-gradient(circle at 80% 20%,rgba(115,114,248,.29),transparent 44%),linear-gradient(146deg,rgba(23,58,85,.9),rgba(14,28,52,.92));
  display:flex;flex-direction:column;justify-content:flex-end;
}
.self-page .intro::after,.duel-page #invitation::after{
  content:"";position:absolute;z-index:-1;width:290px;height:290px;right:-60px;top:-95px;border-radius:50%;
  background:radial-gradient(circle at 32% 28%,rgba(208,250,255,.65),rgba(72,180,238,.19) 34%,rgba(83,62,211,.22) 58%,transparent 70%);
  filter:blur(3px);pointer-events:none;
}
.self-page .intro-kicker{display:block;color:#90eefa;font-size:11px;font-weight:800;letter-spacing:.18em;margin-bottom:9px}
.self-page .intro strong{font-size:clamp(25px,3.2vw,43px);letter-spacing:-.025em;line-height:1.12;max-width:420px;margin-bottom:12px;text-wrap:balance}
.self-page .intro p{color:#cee1ef;font-size:15px;max-width:390px;line-height:1.45}
.self-page .intro details{max-width:400px;margin-top:14px}
.orbit-mark{position:absolute;right:32px;top:26px;width:100px;height:100px;transform-style:preserve-3d;transform:rotateX(60deg) rotateZ(-23deg);opacity:.72}
.orbit-mark i{position:absolute;inset:0;border:1px solid rgba(159,239,255,.8);border-radius:50%;box-shadow:0 0 15px rgba(120,230,255,.18)}
.orbit-mark i:nth-child(2){transform:rotateY(58deg)}.orbit-mark i:nth-child(3){transform:rotateY(-58deg)}
.self-page .auth-main{align-self:center;padding:10px 4px}
.self-page .auth-main h1{font-size:clamp(25px,3vw,33px)}
.self-page .auth-main .note{max-width:420px}
.self-page .auth-main input{min-height:48px}

/* Кабинет: тема и соперник одновременно видны на широком экране. */
.self-page .account-row{margin-bottom:12px}
.self-page #account-email{font-size:12px;color:#b8c9dd}
.self-page .create-heading{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.self-page .create-heading .intro-kicker{width:100%;margin:0}
.self-page .create-heading h2{font-size:25px;margin:0}
.self-page .create-heading .note{margin:0}
.self-page .setup-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr);gap:14px;align-items:start}
.self-page .topic-panel,.self-page .opponent-panel{
  min-width:0;padding:17px;border:1px solid rgba(140,198,230,.2);border-radius:19px;
  background:linear-gradient(145deg,rgba(15,32,55,.72),rgba(10,20,37,.72));
  box-shadow:inset 0 1px rgba(255,255,255,.06);
}
.self-page .form-step{margin:0 0 11px}
.self-page .quick-topics{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 10px}
.self-page .quick-topics button,.self-page .choice-grid button{
  min-width:0;min-height:76px;margin:0;padding:12px;color:#e9f7ff;text-wrap:balance;
  border:1px solid rgba(143,194,230,.25);border-radius:15px;
  background:linear-gradient(150deg,rgba(41,57,87,.83),rgba(18,28,51,.88));
  box-shadow:inset 0 1px rgba(255,255,255,.08),0 9px 18px rgba(0,0,0,.14);
  transform:perspective(500px) rotateX(0);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.self-page .quick-topics button:hover,.self-page .choice-grid button:hover{
  transform:perspective(500px) translateY(-3px) rotateX(3deg);box-shadow:0 13px 25px rgba(0,0,0,.27),0 0 19px rgba(112,232,255,.08)
}
.self-page .quick-topics button[aria-pressed="true"],.self-page .choice-grid button[aria-pressed="true"]{
  border-color:#74e8fa;background:linear-gradient(140deg,rgba(23,91,118,.73),rgba(35,45,91,.84));
  box-shadow:inset 0 1px rgba(255,255,255,.2),0 0 0 1px rgba(116,232,250,.28),0 10px 24px rgba(30,141,189,.13)
}
.self-page .choice-grid{gap:8px;margin:0 0 12px}
.self-page .choice-grid button{min-height:92px}
.self-page #selected-topic{font-size:13px;margin:0 0 8px;color:#a9edfa}
.self-page #all-topics{margin:0;padding:7px 0;border-color:rgba(150,193,226,.18)}
.self-page .before-create{background:transparent;border:0;padding:0;margin:7px 0 12px;font-size:12px}
.self-page #create{min-height:50px}
.self-page #result{padding:20px!important;border:1px solid rgba(112,232,255,.28)!important;border-radius:20px;background:linear-gradient(120deg,rgba(19,63,86,.6),rgba(37,34,82,.6))}
.self-page #result .form-step{margin-bottom:5px}
.self-page #result .invite-panel{background:rgba(6,19,37,.38);border-radius:16px}
.self-page .club-entry{padding:12px 15px;margin:12px 0!important;border-radius:15px;border-color:rgba(144,154,255,.31);background:linear-gradient(105deg,rgba(44,47,105,.42),rgba(17,48,77,.42))}
.self-page #referrals{margin-top:10px;padding-top:10px}
.self-page .install-help{margin-top:12px}

/* Приглашение, подготовка и арена. */
.duel-page #invitation{position:relative;isolation:isolate;overflow:hidden;max-width:900px;margin:auto;padding:26px 30px}
.duel-page #invitation h1{font-size:clamp(28px,4vw,43px);max-width:680px}
.duel-page .invite-role-grid{gap:12px}
.duel-page .invite-role{
  border-radius:18px;padding:16px 17px;transform:perspective(600px) rotateY(0);
  box-shadow:inset 0 1px rgba(255,255,255,.1),0 12px 24px rgba(0,0,0,.16);transition:transform .2s ease;
}
.duel-page .invite-role:hover{transform:perspective(600px) rotateY(3deg) translateY(-2px)}
.duel-page .invite-role:first-child{border-color:rgba(112,232,255,.52);background:linear-gradient(145deg,rgba(36,88,107,.44),rgba(18,35,53,.55))}
.duel-page .invite-role:last-child{border-color:rgba(170,146,255,.55);background:linear-gradient(145deg,rgba(74,61,131,.43),rgba(26,34,72,.58))}
.duel-page .prep-note{border-color:rgba(112,232,255,.2);border-radius:14px;background:rgba(27,75,98,.22);padding:10px 13px;margin:10px 0;font-size:13px}
.duel-page #lobby{max-width:1060px;margin:auto}
.duel-page .lobby-layout{display:grid;grid-template-columns:minmax(0,.87fr) minmax(0,1.13fr);gap:22px;align-items:start}
.duel-page .lobby-intro,.duel-page .lobby-tools{min-width:0}
.duel-page #lobby-topic{font-size:clamp(25px,2.8vw,35px);text-wrap:balance}
.duel-page .prep-steps{gap:7px;margin:15px 0}
.duel-page .prep-steps li{padding:9px 11px;border:1px solid rgba(145,192,232,.2);border-radius:12px;background:rgba(11,25,45,.7)}
.duel-page .prep-steps b{color:#77e8fa}
.duel-page #device-check{margin:0}
.duel-page .readiness{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:9px 0}
.duel-page .readiness>div{display:block;min-width:0;padding:9px 10px;border-radius:12px;background:rgba(7,19,37,.72);border-color:rgba(140,191,230,.19)}
.duel-page .readiness>div span,.duel-page .readiness>div strong{display:block;line-height:1.3;text-align:left}
.duel-page .readiness>div span{font-size:11px;color:#a9c0d8;margin-bottom:4px}
.duel-page .readiness strong{font-size:12px}
.duel-page #preview-video{max-height:140px}
.duel-page #device-status{font-size:12px;margin:7px 0}
.duel-page #join{margin-top:9px}
.duel-page #invite-box{margin-top:8px}
.duel-page #room{padding-top:12px}
.duel-page .ring-head{width:min(1180px,calc(100% - 24px));background:rgba(10,22,39,.94);border-color:rgba(112,232,255,.32);box-shadow:0 8px 25px rgba(0,0,0,.3);backdrop-filter:blur(18px)}
.duel-page .arena-layout{display:grid;grid-template-columns:minmax(0,1.28fr) minmax(310px,.72fr);gap:14px;align-items:start}
.duel-page .arena-video{min-width:0}
.duel-page .arena-console{min-width:0;display:grid;gap:8px}
.duel-page .tiles{gap:9px;margin:0;grid-template-columns:repeat(2,minmax(0,1fr))}
.duel-page .tile{aspect-ratio:4/3;border-radius:17px;border:1px solid rgba(112,232,255,.3);box-shadow:inset 0 0 22px rgba(80,179,220,.07),0 10px 25px rgba(0,0,0,.18)}
.duel-page .tile.b{border-color:rgba(170,146,255,.47)}
.duel-page .judge{margin:0;padding:12px;border:1px solid rgba(112,232,255,.25);border-radius:17px;background:linear-gradient(135deg,rgba(24,61,80,.8),rgba(16,30,56,.88))}
.duel-page #judge-line{font-size:14px;line-height:1.42;max-height:145px;overflow:auto}
.duel-page #turn-note{margin:0;font-size:13px}
.duel-page #done,.duel-page #skip-question{margin:0;min-height:44px}
.duel-page #results{margin:0;font-size:13px}
.duel-page .controls{margin:0;gap:7px}
.duel-page .controls button{min-height:42px}
.duel-page #camera-status{margin:0;font-size:12px}
.duel-page #room-options{margin:0;padding:5px 0;border-color:rgba(145,192,232,.2)}
.duel-page #room-options summary{min-height:30px}
.duel-page #post-game{margin:0}

/* Клуб использует ту же световую систему и плотную навигацию. */
.club-page .club-wrap{max-width:1180px;padding-top:18px}
.club-page .club-top{justify-content:flex-start}
.club-page .club-back{margin-left:auto}
.club-page .experience-tools{margin-left:10px}
.club-page .club-hero{border-color:rgba(112,232,255,.28);border-radius:25px;padding:25px 28px;background:radial-gradient(circle at 90% 15%,rgba(93,104,213,.27),transparent 34%),linear-gradient(135deg,rgba(27,62,83,.82),rgba(18,30,53,.88));box-shadow:0 14px 38px rgba(0,0,0,.2)}
.club-page .club-hero h1{margin:7px 0}
.club-page .club-tabs{gap:7px;margin:12px 0 15px;flex-wrap:nowrap;overflow:auto}
.club-page .club-tabs button{min-height:42px;flex:1 0 auto;background:rgba(24,44,68,.73);border-radius:13px}
.club-page .club-tabs button[aria-selected=true]{background:linear-gradient(110deg,#a5f8ff,#9fb1ff);color:#071423;border-color:transparent}
.club-page .club-search{margin-bottom:12px}
.club-page .club-cards{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.club-page .club-person,.club-page .club-request{transition:transform .18s ease,box-shadow .18s ease}
.club-page .club-person:hover,.club-page .club-request:hover{transform:translateY(-3px);box-shadow:0 17px 36px rgba(0,0,0,.27)}
.club-page .club-pill{border-color:rgba(112,232,255,.34);color:#a9edfa}

.experience-dialog{width:min(430px,calc(100vw - 26px));max-height:min(78vh,640px);overflow:auto;padding:0;border:1px solid rgba(133,229,249,.37);border-radius:23px;color:var(--ink);background:linear-gradient(145deg,#19364e,#121e37 67%,#1b1a3e);box-shadow:0 32px 80px rgba(0,0,0,.52),0 0 55px rgba(98,195,243,.15)}
.experience-dialog::backdrop{background:rgba(2,8,19,.76);backdrop-filter:blur(7px)}
.experience-dialog .experience-dialog-inner{padding:24px}
.experience-dialog .dialog-kicker{font-size:11px;letter-spacing:.16em;font-weight:850;color:#84edfa;margin:0 0 8px}
.experience-dialog h2{font-size:25px;line-height:1.15;margin:0 0 10px;color:#f5faff}
.experience-dialog p{color:#c6d8e9;line-height:1.47;margin:0 0 16px}
.experience-dialog .dialog-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.experience-dialog .dialog-actions button,.experience-dialog .dialog-actions a{display:flex;align-items:center;justify-content:center;min-height:45px;padding:9px;border-radius:11px;text-align:center;text-decoration:none;font-weight:750}
.experience-dialog .dialog-actions a{grid-column:1/-1;background:linear-gradient(110deg,#a4f8ff,#b1a5ff);color:#081522}
.experience-dialog .dialog-actions button{background:rgba(13,35,58,.78);border:1px solid rgba(133,229,249,.3);color:#e7f7ff;cursor:pointer}
.experience-dialog.is-help .dialog-close{grid-column:1/-1}
.experience-toast{position:fixed;z-index:1000;right:16px;bottom:16px;max-width:min(360px,calc(100vw - 32px));padding:12px 16px;border-radius:14px;border:1px solid rgba(129,233,247,.44);background:linear-gradient(135deg,rgba(21,67,84,.97),rgba(26,33,70,.97));box-shadow:0 14px 36px rgba(0,0,0,.38);color:#f3fcff;font-size:13px;line-height:1.35}

.self-page button.primary:disabled,.duel-page button.primary:disabled,.club-page .club-primary:disabled{opacity:.48;box-shadow:none;cursor:not-allowed}

@media(max-width:800px){
  .self-page .setup-grid,.duel-page .lobby-layout,.duel-page .arena-layout{grid-template-columns:1fr}
  .self-page .wrap,.duel-page .wrap,.club-page .club-wrap{padding:12px 12px 38px}
  .self-page .card,.duel-page .card{padding:16px}
  .self-page .quick-topics{grid-template-columns:repeat(3,minmax(0,1fr))}
  .duel-page .lobby-intro .prep-steps{grid-template-columns:repeat(3,minmax(0,1fr))}
  .duel-page .lobby-intro .prep-steps li{font-size:12px}
}
@media(max-width:560px){
  .self-page .intro{min-height:210px;padding:19px;margin-bottom:14px}
  .self-page .intro strong{font-size:27px}
  .self-page .intro p{font-size:13px}
  .orbit-mark{width:65px;height:65px;right:16px;top:14px}
  .self-page .quick-topics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .self-page .quick-topics button:last-child{grid-column:1/-1}
  .self-page .quick-topics button{min-height:58px;font-size:13px;padding:9px}
  .self-page .choice-grid{grid-template-columns:1fr 1fr}
  .self-page .choice-grid button{min-height:74px;padding:10px}
  .self-page .choice-grid strong{font-size:13px}
  .self-page .choice-grid span{font-size:11px}
  .self-page .topic-panel,.self-page .opponent-panel{padding:12px}
  .self-page .setup-grid{gap:10px}
  .duel-page #invitation{padding:18px}
  .duel-page .invite-role{padding:11px}
  .duel-page .invite-role strong{font-size:14px}
  .duel-page .lobby-intro .prep-steps{grid-template-columns:1fr;gap:4px;margin:9px 0}
  .duel-page .lobby-intro .prep-steps li{padding:6px 10px;font-size:12px}
  .duel-page .readiness>div{padding:7px}
  .duel-page .readiness>div span{font-size:10px}
  .duel-page .readiness strong{font-size:11px}
  .duel-page .tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
  .duel-page .tile{aspect-ratio:1/1}
  .duel-page .ring-head{width:calc(100% - 12px);padding:7px 9px;border-radius:12px}
  .duel-page #room{padding-top:6px}
  .club-page .club-search{grid-template-columns:1fr 1fr}
  .club-page .club-search button{grid-column:1/-1}
  .club-page .club-tabs button{padding:0 12px;font-size:12px}
}
@media(max-width:360px){
  .self-page .top .who,.duel-page .top .who{display:none}
  .experience-icon{min-width:34px;min-height:34px}
  .club-page .club-search{grid-template-columns:1fr}
  .club-page .club-search button{grid-column:auto}
}
@media(hover:none){.self-page .quick-topics button:hover,.self-page .choice-grid button:hover,.duel-page .invite-role:hover,.club-page .club-person:hover,.club-page .club-request:hover{transform:none}}
@media(prefers-reduced-motion:reduce){.self-page *, .duel-page *, .club-page *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
