/* E-mail sign-in popup (built by account.js), header links and the account line on the payment step. */
[data-account-link][hidden],.auth-dialog [hidden]{display:none!important}
html:has(.auth-dialog[open]){overflow:hidden}

/* Header: navigation (or the menu stripes) on the left, the logo in the middle, the account link on the right.
   The account link is a "Войти" button before sign-in and an icon (→ /account) after it, in the colour of the navigation. */
.site-header .header-inner :is(.header-right,.header-actions){display:contents}
.site-header .header-inner .desktop-navigation{grid-column:1;grid-row:1;justify-self:start;margin-left:0}
.site-header .header-inner .header-account{grid-column:3;grid-row:1;justify-self:end;display:flex;align-items:center;justify-content:center;gap:8px;color:#c3c3c3;font-size:12px;font-weight:600;white-space:nowrap;transition:color .2s,border-color .2s,background .2s}
.site-header .header-account svg{width:13px;height:13px;fill:currentColor;flex:0 0 auto}
.site-header .header-account:is(:hover,:focus-visible:where(html:not([data-focus-managed]) *,html[data-keyboard-focus] *)){color:#fff}
.site-header .header-account:not(.is-signed-in){min-height:36px;padding:0 15px;border:1px solid #3a3a3a;border-radius:10px}
.site-header .header-account:not(.is-signed-in):hover{border-color:#6a6a6a;background:#232323}
.site-header .header-inner .header-account.is-signed-in{width:36px;height:36px;margin-right:-10px}
.site-header .header-account.is-signed-in svg{width:16px;height:16px}

/* Phones and tablets: the stripes on the left and only the icon on the right, as wide as the stripes and in their colour. */
@media(max-width:980px){
  .site-header .header-inner .menu-toggle{grid-column:1;grid-row:1;justify-self:start;margin-left:-10px}
  .site-header .header-inner :is(.header-account,.header-account.is-signed-in){width:40px;height:44px;min-height:0;margin-right:-10px;padding:0;border:0;border-radius:0;background:none;color:inherit}
  .site-header .header-account span{display:none}
  .site-header .header-account svg,.site-header .header-account.is-signed-in svg{width:22px;height:22px}
}
@media(max-width:760px){
  .site-header .header-inner .menu-toggle{margin-left:-9px}
  .site-header .header-inner :is(.header-account,.header-account.is-signed-in){width:32px;margin-right:-9px}
  .site-header .header-account svg,.site-header .header-account.is-signed-in svg{width:16px;height:16px}
}

/* Popup card. */
.auth-dialog{width:min(440px,calc(100% - 32px));max-width:none;max-height:calc(100dvh - 32px);margin:auto;padding:0;border:0;background:transparent;color:var(--ink,#171717);overflow:visible}
.auth-dialog::backdrop{background:rgb(18 18 18 / .55);backdrop-filter:blur(6px);animation:auth-fade .24s ease both}
.auth-sheet{position:relative;display:flex;flex-direction:column;max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain;padding:22px 32px 26px;border-radius:28px;background:radial-gradient(90% 46% at 50% -6%,rgb(225 1 13 / .09),transparent 70%),#fff;box-shadow:0 1px 0 rgb(255 255 255 / .6) inset,0 40px 100px rgb(0 0 0 / .32)}
.auth-dialog[open] .auth-sheet{animation:auth-pop .34s cubic-bezier(.2,.8,.2,1) both}

.auth-topline{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:40px}
.auth-steps{display:flex;gap:5px}
.auth-steps span{width:22px;height:4px;border-radius:4px;background:#e8e8e7;transition:background .25s,width .25s}
.auth-steps span:first-child,.auth-steps[data-step="2"] span{background:var(--red,#e1010d)}
.auth-steps[data-step="1"] span:first-child,.auth-steps[data-step="2"] span:last-child{width:34px}
.auth-close{display:grid;place-items:center;width:40px;height:40px;margin-left:auto;border:0;border-radius:50%;background:#f3f3f2;color:#171717;transition:transform .2s,background .2s,color .2s}
.auth-close:hover{transform:rotate(90deg);background:#ebebea;color:var(--red,#e1010d)}
/* No red ring on the close button (phones show it after taps); a keyboard on a computer gets a thin dark one.
   On opening, the popup itself takes focus (.auth-sheet autofocus), not this button. */
.auth-close:focus-visible:where(html:not([data-focus-managed]) *,html[data-keyboard-focus] *){outline:none}
@media(hover:hover) and (pointer:fine){.auth-close:focus-visible:where(html:not([data-focus-managed]) *,html[data-keyboard-focus] *){box-shadow:0 0 0 2px #171717}}
.auth-sheet:focus{outline:none}
.auth-close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}

.auth-head{display:flex;flex-direction:column;align-items:center;text-align:center;margin-top:6px}
.auth-badge{position:relative;display:grid;place-items:center;width:64px;height:64px;border-radius:20px;background:linear-gradient(150deg,#2a2a2a,#121212);color:#fff;box-shadow:0 12px 26px rgb(0 0 0 / .18)}
.auth-badge::after{content:"";position:absolute;top:-3px;right:-3px;width:12px;height:12px;border-radius:50%;background:var(--red,#e1010d);box-shadow:0 0 0 3px #fff}
.auth-badge svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.auth-head h2{margin-top:20px;font-size:28px;line-height:1.12;letter-spacing:-.4px}
.auth-lead{max-width:360px;margin-top:9px;color:#767676;font-size:14px;line-height:1.6}
.auth-flow,.auth-done{margin-top:24px}

.auth-field{display:grid;gap:8px}
.auth-field>span:first-child{font-size:12px;font-weight:650;color:#171717}
.auth-input{display:flex;align-items:center;gap:12px;height:56px;padding:0 16px;border:1px solid #e2e2e1;border-radius:16px;background:#f8f8f7;transition:border-color .2s,box-shadow .2s,background .2s}
.auth-input:focus-within:where(html:not([data-focus-managed]) *,html[data-keyboard-focus] *){border-color:var(--red,#e1010d);background:#fff;box-shadow:0 0 0 4px rgb(225 1 13 / .08)}
.auth-input:has([aria-invalid="true"]){border-color:var(--red,#e1010d)}
.auth-input svg{flex:0 0 20px;width:20px;height:20px;fill:none;stroke:#8a8a8a;stroke-width:1.6;stroke-linejoin:round}
.auth-input input{flex:1;min-width:0;height:100%;border:0;outline:0;background:transparent;color:#171717;font:inherit;font-size:15px}
.auth-input input::placeholder{color:#a8a8a8}

.auth-check{position:relative;display:grid;grid-template-columns:20px minmax(0,1fr);gap:11px;margin-top:19px;color:#7a7a7a;font-size:12px;line-height:1.55;cursor:pointer}
.auth-check input{position:absolute;opacity:0;width:20px;height:20px;margin:0}
.auth-check-box{display:grid;place-items:center;width:20px;height:20px;border:1.5px solid #cfcfcf;border-radius:6px;background:#fff;transition:background .18s,border-color .18s}
.auth-check-box svg{width:14px;height:14px;fill:none;stroke:#fff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;opacity:0;transition:opacity .18s}
.auth-check input:checked+.auth-check-box{border-color:var(--red,#e1010d);background:var(--red,#e1010d)}
.auth-check input:checked+.auth-check-box svg{opacity:1}
.auth-check input:focus-visible:where(html:not([data-focus-managed]) *,html[data-keyboard-focus] *)+.auth-check-box{box-shadow:0 0 0 4px rgb(225 1 13 / .14)}
.auth-check a{color:#333;text-decoration:underline;text-decoration-color:#bbb;text-underline-offset:2px}
.auth-check a:hover{color:var(--red,#e1010d);text-decoration-color:currentColor}

.auth-sent{color:#767676;font-size:13px;line-height:1.7;text-align:center;overflow-wrap:anywhere}
.auth-sent strong{color:#171717;font-weight:650}
.auth-code{position:relative;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin-top:18px}
.auth-code input{position:absolute;inset:0;z-index:1;width:100%;height:100%;padding:0;border:0;opacity:0;font-size:16px;cursor:text}
.auth-code span{display:grid;place-items:center;height:62px;border:1px solid #e2e2e1;border-radius:16px;background:#f8f8f7;font-family:"Russo One",sans-serif;font-size:26px;color:#171717;transition:border-color .18s,box-shadow .18s,background .18s,transform .18s}
.auth-code span.is-filled{background:#fff;border-color:#cfcfcf}
.auth-code span.is-active:where(html:not([data-focus-managed]) *,html[data-keyboard-focus] *){border-color:var(--red,#e1010d);background:#fff;box-shadow:0 0 0 4px rgb(225 1 13 / .08);transform:translateY(-1px)}
.auth-code span.is-active:empty::after{content:"";width:2px;height:24px;background:var(--red,#e1010d);animation:auth-caret 1s steps(1) infinite}
.auth-code span.is-invalid{border-color:var(--red,#e1010d)}

.auth-error{margin-top:14px;color:#b0000d;font-size:13px;line-height:1.5;text-align:center}
.auth-status{margin-top:14px;padding:10px 12px;border-radius:12px;background:#f5f5f4;color:#555;font-size:13px;line-height:1.5;text-align:center}
.auth-submit{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:56px;margin-top:20px;padding:0 20px;border:0;border-radius:16px;background:#171717;color:#fff;font-size:15px;font-weight:620;transition:background .2s,transform .2s,box-shadow .2s,opacity .2s}
.auth-submit>span:last-child{font-size:18px;font-weight:400;transition:transform .2s}
.auth-submit:hover:not(:disabled){transform:translateY(-1px);background:var(--red,#e1010d);box-shadow:0 10px 22px rgb(225 1 13 / .2)}
.auth-submit:hover:not(:disabled)>span:last-child{transform:translateX(3px)}
/* Inactive (no consent yet) — faded like the button on the credentials step; sending — grey. */
.auth-submit:disabled{opacity:.52;cursor:not-allowed;box-shadow:none}
.auth-submit[aria-busy="true"]{opacity:1;background:#8a8a8a;cursor:wait}
a.auth-submit{text-decoration:none}

/* "или" and the Telegram button under "Получить код" (Telegram does not need the consent box). */
.auth-or{display:flex;align-items:center;gap:12px;margin:18px 0 0;color:#9a9a9a;font-size:12px}
.auth-or::before,.auth-or::after{content:"";flex:1;height:1px;background:#ececeb}
.auth-telegram{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:56px;margin-top:14px;padding:0 20px;border:1px solid #e2e2e1;border-radius:16px;background:#fff;color:#171717;font-size:15px;font-weight:620;transition:border-color .2s,background .2s,transform .2s,opacity .2s}
.auth-telegram svg{width:22px;height:22px;flex:0 0 auto}
.auth-telegram:hover:not(:disabled){transform:translateY(-1px);border-color:#2aabee;background:#f4fafd}
.auth-telegram:focus-visible:where(html:not([data-focus-managed]) *,html[data-keyboard-focus] *){outline:2px solid #2aabee;outline-offset:2px}
.auth-telegram:disabled{opacity:.52;cursor:not-allowed}
.auth-telegram[aria-busy="true"]{opacity:1;cursor:wait}
.auth-link{padding:0;border:0;background:none;color:#171717;font:inherit;font-weight:600;text-decoration:underline;text-decoration-color:#c7c7c7;text-underline-offset:3px;cursor:pointer}
.auth-link:hover:not(:disabled){color:var(--red,#e1010d);text-decoration-color:currentColor}
.auth-link:disabled{color:#a5a5a5;font-weight:500;text-decoration:none;cursor:default}
.auth-resend{display:block;margin:16px auto 0;font-size:13px}.auth-help{margin-top:22px;padding-top:18px;border-top:1px solid #efefee;color:#8a8a8a;font-size:12px;line-height:1.6;text-align:center}
.auth-help a{color:#171717;text-decoration:underline;text-decoration-color:#c7c7c7;text-underline-offset:2px}
.auth-help a:hover{color:var(--red,#e1010d)}

.auth-account-card{display:flex;align-items:center;gap:14px;padding:16px;border:1px solid #ececeb;border-radius:18px;background:#f8f8f7}
.auth-avatar{display:grid;place-items:center;flex:0 0 46px;width:46px;height:46px;border-radius:50%;background:var(--red,#e1010d);color:#fff;font-family:"Russo One",sans-serif;font-size:20px}
.auth-account-copy{display:grid;gap:3px;min-width:0}
.auth-account-copy small{color:#888;font-size:12px}
.auth-account-copy strong{color:#171717;font-size:15px;font-weight:650;overflow-wrap:anywhere}
.auth-secondary{width:100%;min-height:52px;margin-top:10px;border:1px solid #e2e2e1;border-radius:16px;background:#fff;color:#171717;font-size:14px;font-weight:600;transition:border-color .2s,color .2s}
.auth-secondary:hover:not(:disabled){border-color:#bbb;color:var(--red,#e1010d)}
/* No red ring on the popup buttons (focus lands here after sign-in and taps); a keyboard on a computer gets a dark one. */
.auth-dialog :is(.auth-submit,.auth-secondary):focus-visible:where(html:not([data-focus-managed]) *,html[data-keyboard-focus] *){outline:none}
@media(hover:hover) and (pointer:fine){.auth-dialog :is(.auth-submit,.auth-secondary):focus-visible:where(html:not([data-focus-managed]) *,html[data-keyboard-focus] *){box-shadow:0 0 0 2px #fff,0 0 0 4px #171717}}


@keyframes auth-pop{from{opacity:0;transform:translateY(14px) scale(.97)}}
@keyframes auth-slide{from{transform:translateY(100%)}}
@keyframes auth-fade{from{opacity:0}}
@keyframes auth-caret{50%{opacity:0}}

/* Phones: a bottom sheet with a grab handle. */
@media(max-width:560px){
  .auth-dialog{width:100%;max-height:94dvh;margin:auto 0 0}
  .auth-sheet{max-height:94dvh;padding:12px 20px calc(22px + env(safe-area-inset-bottom));border-radius:26px 26px 0 0}
  .auth-sheet::before{content:"";align-self:center;width:40px;height:4px;margin-bottom:6px;border-radius:4px;background:#dcdcdb}
  .auth-dialog[open] .auth-sheet{animation:auth-slide .34s cubic-bezier(.2,.8,.2,1) both}
  .auth-badge{width:56px;height:56px;border-radius:18px}
  .auth-head h2{margin-top:16px;font-size:25px}
  .auth-code{gap:6px}
  .auth-code span{height:54px;font-size:22px;border-radius:14px}
}
@media(prefers-reduced-motion:reduce){
  .auth-dialog::backdrop,.auth-dialog[open] .auth-sheet,.auth-code span.is-active:empty::after{animation:none}
  .auth-close,.auth-submit,.auth-submit>span:last-child,.auth-telegram,.auth-code span{transition:none}
}
