:root { color-scheme: dark; }
* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-ui); font-size: 16px; line-height: 1.5; }
.portal-header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; border-bottom: 1px solid var(--line); background: #0c0f10; }
.portal-header a { min-height: 40px; display: flex; align-items: center; gap: 9px; color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 700; }
.portal-header a:hover { color: var(--text); }
.portal-brand span { color: var(--red); font-family: var(--font-data); font-size: 22px; }
.portal-back svg { width: 17px; height: 17px; }

.access-layout { min-height: calc(100svh - 64px); display: grid; place-items: center; padding: 40px 20px; background: linear-gradient(rgba(5,7,8,.8), rgba(5,7,8,.9)), url('/og.png') center / cover no-repeat; }
.login-panel { width: min(620px, 100%); padding: 32px; border: 1px solid #4b5355; border-top: 3px solid var(--red); border-radius: var(--radius); background: rgba(13,16,17,.97); box-shadow: 0 26px 70px rgba(0,0,0,.4); }
.login-panel__head { display: flex; align-items: center; justify-content: space-between; color: var(--red); font-size: 12px; font-weight: 700; }
.login-panel__head svg { width: 20px; height: 20px; }
.login-panel h1 { margin: 24px 0 8px; font-size: 36px; line-height: 1.1; }
.login-panel > p { max-width: 540px; margin: 0 0 24px; color: var(--text-secondary); font-size: 16px; line-height: 1.5; }
.vk-login { min-height: 48px; }
.login-state { position: relative; min-height: 48px; display: flex; align-items: center; margin-top: 14px; padding: 11px 13px; border-left: 3px solid var(--blue); background: #121a1f; color: var(--text-secondary); font-size: 14px; }
.login-state.is-ok { padding-left: 48px; border-left-color: var(--green); background: #101b16; color: #d8f7e6; animation: access-confirm 220ms ease-out; }
.login-state.is-ok::before { content: "✓"; position: absolute; left: 14px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #08110c; font-family: var(--font-data); font-weight: 700; }
.join-panel { display: grid; grid-template-columns: 34px 1fr; gap: 12px; margin-top: 16px; padding: 16px; border-left: 3px solid var(--amber); background: #1a160e; }
.join-panel > svg { width: 25px; height: 25px; color: var(--amber); }
.join-panel strong { font-size: 16px; }
.join-panel p { margin: 4px 0 0; color: var(--text-secondary); font-size: 14px; }
.join-panel .ui-button, .join-panel small { grid-column: 2; }
.join-panel .ui-button { justify-self: start; margin-top: 6px; }
.join-panel small { color: var(--text-muted); font-size: 12px; }
.access-note { display: flex; align-items: center; gap: 9px; margin-top: 20px; color: var(--text-muted); font-size: 12px; }
.access-note svg { width: 16px; height: 16px; flex: 0 0 auto; }
.privacy-link { display: inline-block; margin-top: 14px; color: var(--text-muted); font-size: 12px; }
.privacy-link:hover { color: var(--text-secondary); }

.legal-page { width: min(820px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 80px; }
.legal-kicker { color: var(--red); font-family: var(--font-data); font-size: 12px; font-weight: 700; }
.legal-page h1 { margin: 10px 0 16px; font-size: 44px; line-height: 1.1; }
.legal-lead { color: var(--text-secondary); font-size: 16px; }
.legal-page section { padding: 24px 0; border-top: 1px solid var(--line); }
.legal-page h2 { margin: 0 0 8px; font-size: 20px; }
.legal-page section p { margin: 0; color: var(--text-secondary); font-size: 16px; line-height: 1.5; }
.legal-page section a { color: var(--text); }

@keyframes access-confirm { from { opacity: 0; transform: translateY(6px); } }

@media (max-width: 720px) {
  .portal-header { min-height: 56px; padding: 0 16px; }
  .portal-brand { max-width: 210px; }
  .access-layout { min-height: calc(100svh - 56px); padding: 24px 14px; }
  .login-panel { padding: 24px 20px; }
  .login-panel h1 { font-size: 32px; }
  .legal-page { padding-top: 38px; }
  .legal-page h1 { font-size: 32px; }
}

@media (max-width: 440px) {
  .portal-back span { display: none; }
  .login-panel { padding: 22px 16px; }
  .join-panel { grid-template-columns: 28px 1fr; }
  .join-panel .ui-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
