/* D&D — общее оформление (тёмная тема, золото). Шрифты Alegreya лежат в /static/fonts (лицензия OFL). */
@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/alegreya-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/alegreya-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/alegreya-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/alegreya-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alegreya"; font-style: italic; font-weight: 400; font-display: swap; src: url(/static/fonts/alegreya-cyrillic-400-italic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Alegreya"; font-style: italic; font-weight: 400; font-display: swap; src: url(/static/fonts/alegreya-latin-400-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alegreya"; font-style: italic; font-weight: 700; font-display: swap; src: url(/static/fonts/alegreya-cyrillic-700-italic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Alegreya"; font-style: italic; font-weight: 700; font-display: swap; src: url(/static/fonts/alegreya-latin-700-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alegreya SC"; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/alegreya-sc-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Alegreya SC"; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/alegreya-sc-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alegreya SC"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/alegreya-sc-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Alegreya SC"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/alegreya-sc-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/alegreya-sans-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/alegreya-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/alegreya-sans-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/alegreya-sans-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/alegreya-sans-cyrillic-700-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/alegreya-sans-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #120d14; --bg2: #150f18; --bar: #161019; --card: #1b141e; --card2: #241a28; --field: #130e16;
  --line: #2c2131; --line2: #3a2b40; --text: #efe7da; --text2: #d9cfe0; --muted: #b3a5b6; --faint: #958799;
  --gold: #e6b85c; --gold2: #c9a868; --red: #e36a6f; --green: #63cf8c; --mana: #8aa4ff; --hero: #7da7ff;
  --serif: "Alegreya", Georgia, serif; --sc: "Alegreya SC", "Alegreya", Georgia, serif;
  --sans: "Alegreya Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; font-family: var(--sans); font-size: 16px; color: var(--text);
  background: radial-gradient(ellipse at 50% -10%, #3a2440 0%, #1a1220 45%, #0d090f 100%) fixed;
  display: flex; align-items: center; justify-content: center;
}
.card {
  width: min(420px, 92vw); padding: 28px; border-radius: 18px;
  background: rgba(27, 20, 30, .94); border: 1px solid var(--line2); box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.card.wide { width: min(760px, 94vw); }
h1 { margin: 0 0 18px; font-family: var(--sc); font-weight: 700; font-size: 28px; text-align: center; color: var(--gold); letter-spacing: .5px; }
h2 { font-family: var(--sc); font-weight: 500; font-size: 19px; color: var(--gold); margin: 24px 0 10px; }
label { display: block; font-size: 14px; color: #d0c4d3; margin: 14px 0 6px; }
input, select {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line2);
  background: var(--field); color: var(--text); font: inherit; font-size: 16px;
}
input[type="range"] { padding: 0; border: 0; background: none; accent-color: var(--gold); }
input:focus, select:focus { outline: none; border-color: var(--gold); }
button {
  padding: 11px 18px; border: 0; border-radius: 12px; cursor: pointer; font: inherit; font-size: 15px; font-weight: 700;
  background: #2e2236; color: var(--text); border: 1px solid #45334c;
}
button:hover { filter: brightness(1.12); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
button.full { width: 100%; margin-top: 20px; height: 50px; font-size: 17px; }
button.full, button.ok { background: var(--gold); color: var(--bg); border-color: var(--gold); }
button.ghost { background: transparent; border: 1px solid var(--line2); color: var(--text2); font-weight: 500; }
button.ghost:hover { border-color: #6b5274; color: var(--text); filter: none; }
button.small { padding: 6px 12px; font-size: 14px; border-radius: 10px; }
button:disabled { opacity: .45; cursor: default; filter: none; }
.err { color: #ff8f93; font-size: 14px; min-height: 18px; margin-top: 10px; text-align: center; }
.muted { color: var(--muted); font-size: 14px; }
.row { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
td, th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-weight: 500; }
code { background: var(--field); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
a { color: var(--gold); }
a:hover { color: #f3cf85; }

/* вход и регистрация: заголовок над окном и ворона на окне входа */
.brand { text-align: center; margin-bottom: 24px; }
.brand .logo { font-family: var(--sc); font-weight: 700; font-size: 44px; color: var(--gold); letter-spacing: 2px; line-height: 1; }
.brand p { margin: 10px 0 0; font-family: var(--serif); font-style: italic; font-size: 17px; color: #c9bccc; }
.auth { display: flex; flex-direction: column; align-items: center; padding: 40px 0; }
.auth .card { position: relative; }
.auth .card h1 { font-weight: 500; font-size: 24px; color: var(--text); }
.raven { position: absolute; top: -78px; right: 30px; width: 96px; height: 80px; overflow: visible; pointer-events: none; }
.auth .with-raven { margin-top: 48px; }
