:root {
    --bg: #100d0b;
    --panel: #1d1815;
    --panel-strong: #16110f;
    --accent: #c88a34;
    --border: #43362f;
    --text: #cec2ae;
    --muted: #8c8175;
    --danger: #c6614d;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Trebuchet MS', 'Verdana', sans-serif;
    min-height: 100dvh;
    -webkit-tap-highlight-color: transparent;
}

body.shell-page {
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    background:
    radial-gradient(circle at top left, rgba(200,138,52,0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(102,128,69,0.16), transparent 28%),
    linear-gradient(180deg, #1a1411 0%, #0d0a08 100%);
}

body.shell-page::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.7), transparent 90%);
}

.loading {
    position: relative;
}
.loading::after {
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    bottom: 0px;
    z-index: 10000;
    content: "";
    background-image: url(/i/icons/loader.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-color: rgb(20 20 20 / 90%);
}


body main.game-body {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
    max-width: 640px;
    width: 100%;
    margin: 0px auto;
    position: relative;
}

body.modal-open { overflow: hidden; }

[hidden] { display: none !important; }

a { color: inherit; }

.card-panel {
    position: relative;
    background: linear-gradient(180deg, rgba(28,31,34,0.96), rgba(15,17,19,0.96));
    border: 1px solid rgba(226,160,34,0.18);
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.28);
    backdrop-filter: blur(14px);
}

.eyebrow {
    color: var(--accent);
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.page-title,
.section-title {
    color: #f4e8ce;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: bold;
    line-height: 1.05;
}

.page-title {
    font-size: clamp(34px, 8vw, 64px);
    margin-top: 14px;
}

.section-title {
    font-size: clamp(24px, 4vw, 34px);
}

.page-copy {
    color: #aeb4b9;
    font-size: 16px;
    line-height: 1.7;
}

.page-copy--compact {
    font-size: 15px;
}

.btn-main,
.btn-ghost {
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.btn-main {
    background: linear-gradient(135deg, #e2a022, #f4c14f);
    border: none;
    color: #140d00;
}

.btn-main:hover,
.btn-ghost:hover {
    transform: translateY(-1px);
}

.btn-main:disabled,
.btn-ghost:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
}

.btn-ghost {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    color: #e0e5e8;
}

.btn-main--small,
.btn-ghost--small {
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 11px;
}

.stack-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.errors {
    min-height: 18px;
    color: #ff8c78;
    font-size: 12px;
}
.error-modal {
    position: fixed;
    top: 40%;
    left: calc(50% - 120px);
    z-index: 1000;
    width: 240px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background-color: var(--panel);
    min-height: 80px;
    gap: 5px;
    padding: 25px 5px 5px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.error-close {
    position: absolute;
    top: 2px;
    right: 5px;
    cursor: pointer;
}

div.f-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
div.f-label > span {
    width: 100%;
    display: block;
}

.f-label {
    display: block;
    font-size: 10px;
    color: #555;
    letter-spacing: 1px;
    margin: 5px 0px;
    text-transform: uppercase;
}

/* Контейнер для одного переключателя */
.radio {
    display: flex;
    position: relative;
    align-items: center;
    padding: 0px 10px 0px 25px;
    cursor: pointer;
    font-size: 12px;
    user-select: none;
    transition: color 0.2s ease;
    text-transform: capitalize;
    height: 20px;
}

.radio input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

/* Создаем кастомный круг */
.radio .checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: #eee;
  border-radius: 50%;
  border: 2px solid #ddd;
  transition: all 0.2s ease-in-out;
}

/* Эффект при наведении */
.radio:hover input ~ .checkmark {
  background-color: #ccc;
  border-color: #bbb;
}

/* Стиль для активного (checked) состояния */
.radio input:checked ~ .checkmark {
  background-color: #fff;
  border-color: var(--accent);
}

/* Показываем точку при активации */
.radio input:checked ~ .checkmark:after {
    display: block;
}

/* Центрируем и стилизуем точку */
.radio .checkmark:after {
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    content: "";
    position: absolute;
    display: none;
}

/* Небольшая анимация при клике */
.radio input:checked ~ .checkmark {
  transform: scale(1.05);
}

.f-input,
.f-select {
    width: 100%;
    background: #111;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: #ccc;
    font-family: inherit;
    font-size: 14px;
    padding: 9px 10px;
    outline: none;
    transition: border-color 0.2s;
}

.f-input:focus,
.f-select:focus { border-color: var(--accent); }

.f-select option { background: #111; }

.tiny-note {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.info-pill {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(226,160,34,0.08);
    border: 1px solid rgba(226,160,34,0.14);
    color: #ebddb9;
    font-size: 11px;
    letter-spacing: 0.4px;
}

.empty-state {
    padding: 40px 18px;
    text-align: center;
    color: #8f969b;
    border: 1px dashed rgba(255,255,255,0.14);
    border-radius: 14px;
}

/* ── Language Switcher ─────────────────────────────── */
.lang-switcher {
    display: inline-flex;
    gap: 2px;
    align-items: center;
}
.lang-btn {
    padding: 3px 9px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.lang-btn:hover { color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.35); }
.lang-btn--active { color: #fff; border-color: rgba(255,255,255,0.55); background: rgba(255,255,255,0.08); }
@media (max-width: 920px) {
    .landing-grid,
    .auth-shell,
    .characters-layout {
        grid-template-columns: 1fr!important;
    }

    .account-banner,
    .panel-head,
    .selection-strip {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 640px) {
    .landing-shell,
    .auth-shell,
    .characters-shell {
        width: calc(100vw - 24px);
        padding-top: 12px;
        padding-bottom: 16px;
    }

    .landing-hero {
        grid-auto-flow: row;
    }

    .landing-actions,
    .auth-side-links,
    .account-banner-actions {
        flex-direction: column;
    }

    .account-banner,
    .roster-panel,
    .card-panel--news,
    .card-panel--fact,
    .auth-panel,
    .landing-hero {
        padding: 18px;
    }

    .drawer-row {
        align-items: stretch;
    }

    .drawer-row-top {
        align-items: flex-start;
        flex-direction: column;
    }
}