@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;800&display=swap');
:root { --bg: #0b0d14; --panel: #141828; --line: #232a40; --text: #e8ebf5; --muted: #8b93ad; }
body { background: radial-gradient(1200px 600px at 20% -10%, #1b2140 0%, var(--bg) 60%) fixed; color: var(--text);
       font-family: 'Manrope', system-ui, sans-serif; }
.q-tab-panels, .q-tab-panel { background: transparent !important; }
.q-tab { text-transform: none; font-weight: 600; letter-spacing: 0; }
.hdr { background: linear-gradient(90deg, rgba(20,24,40,.95), rgba(20,24,40,.6)); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.title { font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.muted { color: var(--muted); font-size: 13px; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 4px 12px; font-size: 13px; }

/* персонажи */
.roster { width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; }
.char { position: relative; border-radius: 14px; overflow: hidden; cursor: pointer; background: var(--panel);
        border: 2px solid var(--line); transition: transform .15s, box-shadow .15s, border-color .15s; aspect-ratio: 140/176; }
.char img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .2s, opacity .2s; }
.char .nm { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 8px 8px; font-weight: 700; font-size: 13px;
            background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.char .el { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.6); padding: 3px; }
.char .rk { position: absolute; top: 6px; right: 6px; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 6px; background: rgba(0,0,0,.65); }
.char .imp { position: absolute; top: 32px; right: 6px; font-size: 10px; padding: 1px 6px; border-radius: 6px; background: rgba(46,212,154,.85); color: #04120c; font-weight: 700; }
.char.off img { filter: grayscale(1) brightness(.55); }
.char.on { border-color: var(--el); box-shadow: 0 0 0 1px var(--el), 0 8px 24px -8px var(--el); }
.char:hover { transform: translateY(-3px); }

/* команды */
.tierrow { width: 100%; display: flex; gap: 14px; align-items: stretch; margin-bottom: 18px; }
.tierbadge { min-width: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
             font-weight: 800; font-size: 18px; color: #0b0d14; }
.teams { display: flex; flex-wrap: wrap; gap: 14px; flex: 1; }
.team { position: relative; width: 372px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
        background-size: cover; background-position: center top; }
.team::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,13,20,.55), rgba(11,13,20,.92) 70%); }
.team > * { position: relative; }
.team.ok { border-color: rgba(62,212,154,.6); box-shadow: 0 8px 24px -12px rgba(62,212,154,.5); }
.team.dim { opacity: .55; }
.team .tn { font-weight: 800; font-size: 15px; padding: 12px 14px 0; display: flex; align-items: center; gap: 8px; }
.team .tn img { width: 18px; height: 18px; }
.slots { display: flex; gap: 10px; padding: 10px 14px 12px; }
.slot { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.ico { width: 76px; height: 76px; border-radius: 10px; border: 2px solid var(--line); object-fit: cover; background: #000; }
.ico.have { border-color: #3ed49a; }
.ico.lack { border-color: #ff4d6d; filter: grayscale(1) brightness(.5); }
.ico.alt { width: 44px; height: 44px; border-radius: 8px; }
.alts { display: flex; gap: 6px; }
.cc { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 76px; }
.cc.alt { width: 50px; }
.cap { font-size: 11px; font-weight: 700; line-height: 1.1; text-align: center; max-width: 100%; overflow: hidden;
       text-overflow: ellipsis; white-space: nowrap; color: #e8ebf5; text-shadow: 0 1px 3px #000; }
.cc.alt .cap { font-size: 9px; font-weight: 600; color: #b7bfd9; }
.wk { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 2px 9px 2px 5px;
      border-radius: 999px; border: 1px solid var(--el); color: var(--el); }
.wk img { width: 16px; height: 16px; }
.stopcard { width: 100%; max-width: 1260px; border: 1px solid var(--line); background: var(--panel); border-radius: 14px;
            padding: 12px 16px; margin-bottom: 12px; }
.stophead { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.stophead .no { font-weight: 800; font-size: 18px; margin-right: 8px; color: #8ecae6; }
.sidebox { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.sidebox .info { width: 250px; flex: 0 0 250px; }
.sidebox .info .en { font-size: 12px; color: var(--muted); margin: 4px 0; }
.sidebox .sq { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; flex-wrap: nowrap; }
.hit { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.hit.h3 { background: #3ed49a; color: #04120c; } .hit.h2 { background: #ffd166; color: #1a1200; }
.hit.h0 { border: 1px solid var(--line); color: var(--muted); }
.warn { border: 1px solid #ffd166; background: rgba(255,209,102,.08); color: #ffd166; border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; max-width: 1100px; }
.status { padding: 0 14px 12px; font-size: 12px; font-weight: 600; }
.status.ok { color: #3ed49a; } .status.no { color: #ff8c9a; }

/* поезд */
.pair { width: 100%; max-width: 1000px; border: 1px solid var(--line); background: var(--panel); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.pair .row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.pair .lbl { width: 86px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pair .tname { width: 200px; font-weight: 700; }
.tier-mini { font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 6px; color: #0b0d14; margin-right: 8px; }
.pair .ico { width: 64px; height: 64px; }
.pair .cc { width: 64px; }
.bn { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.bn.live { background: #3ed49a; color: #04120c; } .bn.soon { background: #ffd166; color: #1a1200; }
.bn.tba { background: #2a3150; color: #c9d0ea; } .bn.none { border: 1px solid var(--line); color: var(--muted); }
.cand { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cand .who { display: flex; align-items: center; gap: 10px; width: 200px; font-weight: 700; }
.cand .who .ico { width: 56px; height: 56px; }
.cand .bns { display: flex; gap: 6px; flex-wrap: wrap; width: 250px; }
.cand .opens { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; font-size: 13px; }
.sched { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.sch { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 8px 12px; }
.sch .ico { width: 52px; height: 52px; }
.sch.have { border-color: rgba(62,212,154,.5); }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; white-space: pre-wrap; color: #b7bfd9; }
.aw { position: absolute; top: 32px; left: 6px; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 6px;
      background: rgba(255,209,102,.92); color: #1a1200; }
.pity { height: 14px; border-radius: 7px; background: #1b2036; position: relative; overflow: hidden; }
.pity .fill { height: 100%; background: linear-gradient(90deg, #3ed49a, #ffd166 78%, #ff4d6d); }
.pity .mk { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.55); }
.req { padding: 0 14px 10px; font-size: 12px; font-weight: 600; }
.req.okc { color: #3ed49a; } .req.lowc { color: #ffd166; }
.empty { border: 1px dashed var(--line); border-radius: 14px; padding: 18px; color: var(--muted); }

.sidelbl { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }

/* маршрут: эффект круга и карты Shadowquill */
.hit.fx { background: rgba(155,108,255,.22); color: #c9b3ff; border: 1px solid rgba(155,108,255,.5); }
.cardhint { flex: 1 1 200px; max-width: 320px; border: 1px solid var(--line); border-left: 3px solid #ffd166; border-radius: 10px;
            padding: 6px 10px; font-size: 13px; background: rgba(255,209,102,.05); line-height: 1.3; }
.cardhint .ck { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #ffd166; }
.cardhint .why { display: block; font-size: 11px; color: var(--muted); }

/* сборки персонажей */
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; width: 100%; }
.bcard { border: 1px solid var(--line); background: var(--panel); border-radius: 14px; padding: 12px 14px; }
.bcard .bhead { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 10px 0 4px; }
.bcard .stat { font-size: 12px; line-height: 1.35; color: #c9d0ea; }
.bcard .opt { font-size: 13px; padding: 2px 0; }
.bcard .opt .rk { display: inline-block; width: 18px; font-weight: 800; color: var(--muted); }
.bcard .opt .rk.rS { color: #ffd166; } .bcard .opt .rk.rA { color: #c7a6ff; }
.bcard .opt .have { font-size: 11px; font-weight: 700; color: #04120c; background: #3ed49a; border-radius: 6px; padding: 0 6px; }

/* промокоды */
.coderow { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 1100px; border: 1px solid var(--line);
           background: var(--panel); border-radius: 12px; padding: 8px 14px; margin-bottom: 8px; }
.coderow.used { opacity: .5; }
.coderow .codetxt { font-family: ui-monospace, Consolas, monospace; font-weight: 700; font-size: 15px; min-width: 190px; }
.coderow .rewards { font-size: 13px; color: #c9d0ea; }

/* прогресс аккаунта */
.questline { font-size: 13px; padding: 3px 0; display: flex; align-items: center; gap: 10px; }
.stopcard.cleared { opacity: .72; border-color: rgba(62,212,154,.35); }

/* обзор, развитие, снаряжение */
.todo { display: flex; flex-direction: column; gap: 8px; max-width: 1000px; margin-bottom: 8px; }
.todo-item { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.devcard { width: 300px; max-width: none; padding: 8px 10px; margin: 0; }
.subtabs { border-bottom: 1px solid var(--line); }
.gear-table { width: 100%; max-width: 1260px; background: var(--panel); border-radius: 12px; margin-bottom: 16px; }
.gear-table .q-table th { color: var(--muted); font-weight: 700; }
.gear-table .q-table td, .gear-table .q-table th { border-color: var(--line); }

/* ===== сайт: каркас, навигация, формы, таблицы (добавлено при переезде с NiceGUI) ===== */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-size: 15px; line-height: 1.4; }
a { color: #8ecae6; text-decoration: none; }
b { font-weight: 800; }
.hdr { position: sticky; top: 0; z-index: 10; }
.hdr-in { display: flex; align-items: center; gap: 12px; padding: 10px 24px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
main { padding: 16px 24px 60px; }
.grow { flex: 1 1 auto; }
.row-flex { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
.col-flex { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.no-wrap { flex-wrap: nowrap; }
.wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.gap-0 { gap: 0; } .gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.text-base { font-size: 16px; } .text-sm { font-size: 13px; } .font-bold { font-weight: 800; }
.sect { font-size: 16px; font-weight: 800; margin: 26px 0 4px; }

.tabs { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tabs a, .subtabs a { padding: 10px 16px; color: var(--muted); font-weight: 700; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover, .subtabs a:hover { color: var(--text); }
.tabs a.on, .subtabs a.on { color: var(--text); border-bottom-color: #8ecae6; }
.subtabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }

.btn { font: inherit; font-weight: 700; font-size: 13px; color: var(--text); background: #232a40; border: 1px solid var(--line); border-radius: 8px;
       padding: 7px 14px; cursor: pointer; }
.btn:hover { border-color: #3a4566; }
.btn.primary { background: #0f9d8a; border-color: #0f9d8a; color: #04120c; }
.btn.outline { background: transparent; border-color: #3a4566; color: #8ecae6; }
.btn.flat { background: transparent; border-color: transparent; color: #8ecae6; }
.btn.icon { padding: 3px 8px; background: transparent; border-color: transparent; color: var(--muted); font-size: 15px; }
.btn.icon:hover { color: var(--text); }

.sw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 14px; }
.sw .knob { width: 34px; height: 18px; border-radius: 9px; background: #2a3150; position: relative; transition: background .15s; flex: 0 0 auto; }
.sw .knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #c9d0ea; transition: left .15s; }
.sw.on .knob { background: #4f8dff; } .sw.on .knob::after { left: 18px; background: #fff; }
.cb { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 14px; }
.cb .box { width: 18px; height: 18px; border: 2px solid #3a4566; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center;
           font-size: 13px; font-weight: 800; color: #04120c; flex: 0 0 auto; }
.cb.on .box { background: #3ed49a; border-color: #3ed49a; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg.wrap { flex-wrap: wrap; margin-bottom: 8px; }
.seg button { font: inherit; font-size: 13px; font-weight: 700; color: var(--muted); background: transparent; border: 0; padding: 7px 14px; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.on { background: #4f8dff; color: #fff; }
.field { display: inline-flex; flex-direction: column; gap: 2px; font-size: 13px; }
.field .flabel { font-size: 11px; color: var(--muted); }
.field select, .field input { font: inherit; color: var(--text); background: var(--panel); border: 1px solid #3a4566; border-radius: 8px; padding: 6px 10px; min-width: 110px; max-width: 420px; }
.field input[type=number] { width: 110px; }

.menu { display: inline-block; position: relative; }
.menu summary { list-style: none; cursor: pointer; color: var(--muted); padding: 0 6px; font-size: 15px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { color: var(--text); }
.menu .menu-body { position: absolute; z-index: 5; top: 22px; left: 0; background: #1b2036; border: 1px solid #3a4566; border-radius: 10px; padding: 12px; gap: 6px; min-width: 190px;
                   box-shadow: 0 10px 30px rgba(0,0,0,.5); }

.dt-wrap { overflow-x: auto; }
.dt { width: 100%; border-collapse: collapse; font-size: 13px; }
.dt th { color: var(--muted); font-weight: 700; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dt th[data-sort] { cursor: pointer; } .dt th[data-sort]:hover { color: var(--text); }
.dt th.asc::after { content: " ▲"; font-size: 10px; } .dt th.desc::after { content: " ▼"; font-size: 10px; }
.dt td { padding: 6px 12px; border-bottom: 1px solid var(--line); }
.dt .left { text-align: left; } .dt .right { text-align: right; } .dt .center { text-align: center; }
.dt tr:last-child td { border-bottom: 0; }
.dt-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 8px 12px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
.dt-foot button { font: inherit; color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 2px 10px; cursor: pointer; }
.dt-foot button:disabled { opacity: .35; cursor: default; }

.char { -webkit-tap-highlight-color: transparent; }
.toast { border: 1px solid #3ed49a; background: rgba(62,212,154,.1); color: #3ed49a; border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; max-width: 1000px; }
.login { max-width: 360px; margin: 14vh auto; padding: 28px; border: 1px solid var(--line); background: var(--panel); border-radius: 16px; display: flex; flex-direction: column; gap: 16px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login .field input { max-width: none; width: 100%; padding: 10px 12px; }
.htmx-request { opacity: .6; transition: opacity .2s; }
@media (max-width: 700px) { main { padding: 12px 12px 60px; } .hdr-in { padding: 10px 12px; } .team { width: 100%; } .devcard { width: 100% !important; } }

/* учётные записи: вход, регистрация, профиль, администратор */
.login.wide { max-width: 560px; margin-top: 6vh; }
.login-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.login .btn { text-align: center; text-decoration: none; }
.fhint { font-size: 11px; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; }
.consent input { margin-top: 3px; }
.secret { display: flex; align-items: center; gap: 8px; background: #0e1122; border: 1px dashed #3a4566; border-radius: 10px; padding: 10px 12px; }
.secret code { flex: 1; font-family: Consolas, 'Courier New', monospace; font-size: 14px; word-break: break-all; user-select: all; }
.reveal { border: 1px solid #4f8dff; background: rgba(79,141,255,.08); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; max-width: 1000px;
          display: flex; flex-direction: column; gap: 8px; }
.terms h3 { margin: 14px 0 4px; font-size: 15px; }
.terms p, .terms li { font-size: 13px; line-height: 1.55; margin: 4px 0; }
.terms ul { padding-left: 18px; margin: 4px 0; }
.pform { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.pair.wide { max-width: 1400px; }
.pair.danger { border-color: #7a2c3a; }
.btn.danger { background: #7a2c3a; border-color: #a23a4c; }
.userchip { text-decoration: none; color: var(--text); font-weight: 700; }
.userchip:hover, .userchip.on { border-color: #8ecae6; }
.badge { background: #ff4d6d; color: #fff; border-radius: 999px; padding: 0 6px; font-size: 11px; }
.acts .btn { padding: 3px 8px; font-size: 12px; margin: 1px 0; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step > div:first-child { flex: 0 0 auto; }
.stepno { width: 30px; height: 30px; border-radius: 50%; background: #4f8dff; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.steptext { font-size: 13px; line-height: 1.55; margin-top: 4px; }
.steptext .btn { display: inline-block; text-decoration: none; margin-bottom: 6px; }
ul.plain { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; }
a.btn { text-decoration: none; display: inline-block; }
code.sum { font-family: Consolas, 'Courier New', monospace; font-size: 11px; word-break: break-all; }
