/* 09.11.2026 (owner): a more beautiful sign-in / registration card — a double parchment frame with corner diamonds,
   ornamented dividers, the e-mail and its code as one block, the gender chosen by portrait cards, «или» before VK ID.
   Loaded last; only #auth-root is styled. Narrow places use calc(px) so text-scale.js does not enlarge them. */
#auth-root .account-screen .account-card{position:relative;isolation:isolate;background:linear-gradient(180deg,#fffdf7 0%,#fbf5e7 55%,#f5ecd7 100%)!important;box-shadow:0 -6px 30px rgba(36,30,16,.16),0 12px 40px rgba(18,41,30,.22)!important}
/* corner diamonds on the top edge of the frame */
#auth-root .account-screen .account-card::after{content:"";position:absolute;top:calc(3px);left:50%;width:calc(9px);height:calc(9px);margin-left:calc(-4.5px);transform:rotate(45deg);background:#c9b27a;box-shadow:0 0 0 calc(3px) #fffdf7;pointer-events:none}
/* tabs: a fine rule with a diamond in the middle, active tab underlined in green and gold */
#auth-root .vl-tabs{position:relative;margin:calc(4px) 0 calc(16px)!important;border-bottom:1px solid #e3d6b4!important}
#auth-root .vl-tabs::after{content:"";position:absolute;left:50%;bottom:calc(-5px);width:calc(8px);height:calc(8px);margin-left:calc(-4px);transform:rotate(45deg);background:#fbf5e7;border:1px solid #d3c08e}
#auth-root .vl-tabs button{font:600 calc(17px)/1 Interface,sans-serif!important;letter-spacing:.01em;color:#9a9277!important}
#auth-root .vl-tabs button.active{color:#2f5a4c!important;border-bottom:2px solid #2f5f53!important;box-shadow:0 1px 0 #c9b27a}
/* fields: soft inset parchment, a gold-green focus */
#auth-root .vl-field input{background:#fffef9!important;border:1px solid #e0d3b1!important;border-radius:calc(14px)!important;box-shadow:inset 0 1px 2px rgba(80,62,24,.07)!important;transition:border-color .15s ease,box-shadow .15s ease}
#auth-root .vl-field input:focus{border-color:#7fa58f!important;box-shadow:0 0 0 calc(3px) rgba(127,165,143,.22),inset 0 1px 2px rgba(80,62,24,.05)!important;outline:none}
/* ornamented divider: line — diamond — word — diamond — line */
#auth-root .vg-auth-sep,#auth-root .vg-auth-or{display:flex;align-items:center;gap:calc(10px);margin:calc(6px) 0 calc(2px);color:#a0916a;font:700 calc(11px)/1 Interface,sans-serif;letter-spacing:.14em;text-transform:uppercase}
#auth-root .vg-auth-sep::before,#auth-root .vg-auth-sep::after,#auth-root .vg-auth-or::before,#auth-root .vg-auth-or::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,transparent,#d6c393 30%,#d6c393 70%,transparent)}
#auth-root .vg-auth-sep span,#auth-root .vg-auth-or span{position:relative;padding:0 calc(14px)}
#auth-root .vg-auth-sep span::before,#auth-root .vg-auth-sep span::after,#auth-root .vg-auth-or span::before,#auth-root .vg-auth-or span::after{content:"";position:absolute;top:50%;width:calc(5px);height:calc(5px);margin-top:calc(-2.5px);transform:rotate(45deg);background:#c9b27a}
#auth-root .vg-auth-sep span::before,#auth-root .vg-auth-or span::before{left:0}
#auth-root .vg-auth-sep span::after,#auth-root .vg-auth-or span::after{right:0}
#auth-root .vg-auth-or{width:100%;margin:calc(2px) 0 calc(4px);letter-spacing:.1em;text-transform:none;font-size:calc(12px)}
/* gender: two portrait cards */
#auth-root .vl-gender{gap:calc(10px)!important;margin:calc(2px) 0 calc(6px)!important}
#auth-root .vl-gender>button{position:relative;display:flex!important;align-items:center;justify-content:flex-start;gap:calc(10px);min-height:calc(58px)!important;padding:calc(6px) calc(12px) calc(6px) calc(6px)!important;border:1px solid #e0d3b1!important;border-radius:calc(16px)!important;background:linear-gradient(180deg,#fffef9,#f8f0de)!important;color:#5d6d5f!important;box-shadow:0 1px 2px rgba(80,62,24,.08);transition:border-color .16s ease,box-shadow .16s ease,transform .12s ease}
#auth-root .vl-gender>button img{width:calc(44px);height:calc(44px);flex:none;border-radius:calc(12px);object-fit:cover;object-position:center 18%;background:#e9dfc6;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);filter:saturate(.75);transition:filter .16s ease}
#auth-root .vl-gender>button b{font:700 calc(14.5px)/1.1 Interface,sans-serif}
#auth-root .vl-gender>button[aria-pressed="true"]{border-color:#2f5f50!important;background:linear-gradient(180deg,#f1f7f2,#e3efe6)!important;color:#2f5a4c!important;box-shadow:0 0 0 calc(2px) rgba(47,95,80,.18),0 2px 6px rgba(47,95,80,.14)}
#auth-root .vl-gender>button[aria-pressed="true"] img{filter:none}
#auth-root .vl-gender>button:active{transform:scale(.98)}
/* main button gets a gold hairline under it, VK keeps its own colours */
#auth-root .vl-go{box-shadow:0 3px 0 #23463b,0 6px 14px rgba(36,70,58,.25)!important}
#auth-root .vg-auth-alt{margin-top:calc(10px)}
#auth-root .account-error{border-radius:calc(12px)}

/* 09.11.2026 (owner, second pass): the code is a small section of its own — a seal, a title, and one seamless field+button */
#auth-root .vg-code-box{display:flex;flex-direction:column;gap:calc(8px);padding:calc(10px) calc(10px) calc(10px);border:1px solid #e6d9b6;border-radius:calc(16px);background:linear-gradient(180deg,#fbf3df,#f6ebd1);box-shadow:inset 0 1px 0 #fffaf0}
#auth-root .vg-code-head{display:flex;align-items:center;gap:calc(10px);padding:0 calc(2px)}
#auth-root .vg-code-head img{width:calc(34px);height:calc(34px);flex:none;object-fit:contain;filter:drop-shadow(0 2px 2px rgba(80,62,24,.2))}
#auth-root .vg-code-head span{display:flex;flex-direction:column;gap:calc(2px);min-width:0}
#auth-root .vg-code-head b{font:700 calc(13.5px)/1.15 Interface,sans-serif;color:#4b5a44}
#auth-root .vg-code-head small{font:500 calc(11.5px)/1.2 Interface,sans-serif;color:#9a9277}
#auth-root .vg-code-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0;align-items:stretch;padding:0;border:0;background:none;border-radius:calc(14px);box-shadow:0 1px 2px rgba(80,62,24,.08)}
#auth-root .vg-code-row::before{content:none}
#auth-root .vg-code-row .vl-field input{border-radius:calc(14px) 0 0 calc(14px)!important;border-right:0!important;letter-spacing:.2em;font-weight:700}
#auth-root .vg-code-row .vg-code-send{min-height:100%;margin:0;padding:0 calc(14px);border:1px solid #2f5f50;border-radius:0 calc(14px) calc(14px) 0;background:linear-gradient(180deg,#3f7a66,#2f5f50);color:#fff;font:700 calc(13px)/1.1 Interface,sans-serif;white-space:nowrap;box-shadow:inset 0 1px 0 rgba(255,255,255,.18)}
#auth-root .vg-code-row .vg-code-send:disabled{background:linear-gradient(180deg,#efe6cf,#e6dabb);border-color:#dccb9d;color:#9a9277;box-shadow:none}
#auth-root .vg-code-row .vg-code-send:active:not(:disabled){filter:brightness(.94)}
/* gender: the chosen card is outlined, no tick */
#auth-root .vl-gender>button[aria-pressed="true"]{border-color:#c4a45c!important;background:linear-gradient(180deg,#fffaf0,#f4ead2)!important;color:#2f5a4c!important;box-shadow:0 0 0 calc(2px) #fffdf7,0 0 0 calc(4px) rgba(63,122,102,.55),0 4px 14px rgba(63,122,102,.22)!important}
#auth-root .vl-gender>button[aria-pressed="true"] img{box-shadow:0 0 0 calc(2px) #c4a45c}
/* the bottom note keeps clear of the frame */
#auth-root .account-screen .account-card{padding-bottom:calc(24px)!important}
#auth-root .auth-footnote{margin:calc(12px) calc(6px) 0!important;font:400 calc(12px)/1.5 Interface,sans-serif!important;color:#8a8268!important;text-align:center}
#auth-root .auth-footnote .vl-hint{display:block;margin-bottom:calc(4px)}

/* A lost connection retains the current session and uses the same parchment as sign-in. */
#auth-root[data-mode=retry] .account-card{border-radius:24px!important;margin:0 14px 22px!important;width:calc(100% - 28px)!important;max-width:410px}
#auth-root[data-mode=retry] .vg-card-frame{min-height:0}
#auth-root .auth-reconnect{display:flex;flex-direction:column;align-items:center;padding:10px 5px 5px;gap:10px;color:#6e644b}
#auth-root .auth-reconnect-seal{display:grid;place-items:center;width:64px;height:64px;border:1px solid #baa16a;border-radius:50%;background:radial-gradient(circle,#fffdf2,#eadcb9);box-shadow:inset 0 0 0 4px #fffae9,0 4px 12px #5a47221a}
#auth-root .auth-reconnect-seal img{width:45px;height:45px;object-fit:contain}
#auth-root .auth-reconnect-eyebrow{color:#927951;font:11px/1.4 Interface,sans-serif;letter-spacing:.06em}
#auth-root .auth-reconnect h1{max-width:290px;margin:0!important;color:#315a4d;font:700 22px/1.25 Interface,sans-serif!important;text-wrap:balance}
#auth-root .auth-reconnect p{margin:0!important;font:13px/1.55 Interface,sans-serif!important;max-width:310px}
#auth-root .auth-reconnect-note{align-self:stretch;margin:4px 0 0;padding:11px 10px;border-top:1px solid #c5ae7a66;border-bottom:1px solid #c5ae7a66;color:#54705c;font:12px/1.5 Interface,sans-serif}
#auth-root .auth-reconnect button{margin:4px 0 0;min-height:45px;font-size:14px;border-radius:11px}

/* the frame is drawn on an inner wrapper that grows with the form, so it surrounds everything down to the note */
#auth-root .vg-card-frame{position:relative;box-sizing:border-box;min-height:100%;margin:calc(-11px) calc(-13px) 0;padding:calc(12px) calc(13px) calc(14px);border:1px solid #dccb9d;border-radius:calc(20px);box-shadow:inset 0 0 0 calc(3px) #fffdf7,inset 0 0 0 calc(4px) rgba(220,203,157,.45)}

/* 09.11.2026 (owner, third pass): registration fits the screen down to the VK ID button; the code field shows a short hint instead of a floating label */
#auth-root .vg-code-box{gap:calc(7px);padding:calc(8px)}
#auth-root .vg-code-head{gap:calc(8px);align-items:center;flex-wrap:nowrap}
#auth-root .vg-code-head img{width:calc(26px);height:calc(26px)}
#auth-root .vg-code-head b{font-size:calc(13px)}
#auth-root .vg-code-head small{margin-left:auto;font-size:calc(11.5px);white-space:nowrap}
#auth-root .vg-code-field input{padding:0 calc(12px)!important;text-align:center;font:700 calc(18px)/1 Interface,sans-serif!important;letter-spacing:.32em!important}
#auth-root .vg-code-field input::placeholder{font:500 calc(14px)/1 Interface,sans-serif;letter-spacing:.02em;color:#a39b80;opacity:1}
#auth-root[data-mode="create"] .vl-form{gap:calc(7px)!important}
#auth-root[data-mode="create"] .vl-field input{height:calc(48px)!important;padding-top:calc(18px)!important;padding-bottom:calc(4px)!important}
#auth-root[data-mode="create"] .vg-code-field input{padding-top:0!important;padding-bottom:0!important}
#auth-root[data-mode="create"] .vl-field>span{top:calc(14px)}
#auth-root[data-mode="create"] .vl-field:focus-within>span{top:calc(6px)}
#auth-root[data-mode="create"] .vl-eye{top:calc(6px)}
#auth-root[data-mode="create"] .vl-tabs{margin-bottom:calc(12px)!important}
#auth-root[data-mode="create"] .vg-auth-sep{margin:calc(2px) 0 0}
#auth-root[data-mode="create"] .vl-gender{margin:0 0 calc(2px)!important}
#auth-root[data-mode="create"] .vl-gender>span{display:none}
#auth-root[data-mode="create"] .vl-gender>button{min-height:calc(48px)!important;padding:calc(4px) calc(10px) calc(4px) calc(4px)!important}
#auth-root[data-mode="create"] .vl-gender>button img{width:calc(38px);height:calc(38px);border-radius:calc(10px)}
#auth-root[data-mode="create"] .vl-go{height:calc(48px)!important;min-height:calc(48px)!important}
#auth-root[data-mode="create"] .vg-auth-alt{margin-top:calc(4px);gap:calc(6px)}
#auth-root[data-mode="create"] .vg-auth-or{margin:0}
#auth-root[data-mode="create"] .vl-field:focus-within>span,#auth-root[data-mode="create"] .vl-field:has(input:not(:placeholder-shown))>span{top:calc(5px);font-size:calc(11px)}
#auth-root .vg-code-head b{white-space:nowrap}
#auth-root .vg-code-head small{display:none}

/* 09.11.2026 (owner): on narrow phones the two gender cards stay inside the form */
#auth-root .vl-gender{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%;box-sizing:border-box}
#auth-root .vl-gender>span{grid-column:1/-1}
#auth-root .vl-gender>button{min-width:0!important;width:100%!important;box-sizing:border-box!important}
#auth-root .vl-gender>button b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:360px){#auth-root .vl-gender{gap:8px!important}#auth-root .vl-gender>button{gap:7px!important;min-height:50px!important;padding:5px 8px 5px 5px!important}#auth-root .vl-gender>button img{width:36px;height:36px;border-radius:10px}#auth-root .vl-gender>button b{font-size:13px}}
@media (max-width:340px){#auth-root .vg-code-row{gap:6px}#auth-root .vg-code-send{padding-left:10px!important;padding-right:10px!important;font-size:12.5px!important}}
