/* СТАЛЬНОЙ ОРДЕН — оформление платформы.
   Тёмная зимняя ночь, латунь и лёд. Шрифты локальные (OFL), внешних запросов нет. */

@font-face { font-family: 'Forum'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/forum-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Forum'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/forum-latin.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: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/manrope-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/manrope-latin.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+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #090D12;
  --bg-2: #0E141B;
  --surface: #121A23;
  --surface-2: #18222E;
  --surface-3: #1F2B39;
  --line: #263343;
  --line-soft: rgba(233, 237, 242, .07);
  --text: #E9EDF2;
  --muted: #95A3B5;
  --faint: #66768B;
  --gold: #C9A45C;
  --gold-2: #E8CB8C;
  --gold-deep: #8F7038;
  --gold-ink: #1B1407;
  --ice: #9CC3E6;
  --ice-deep: #3F6688;
  --danger: #D0675C;
  --ok: #9DC48F;

  --c-bars: #9CC3E6;
  --c-berkut: #D9A441;
  --c-tur: #C0544A;
  --c-rys: #82A86E;

  --r-s: 10px;
  --r: 16px;
  --r-l: 22px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --serif: 'Forum', 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tabbar-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--sans);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
/* Небо: северное сияние вверху, глубокая ночь внизу */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(120% 60% at 15% -10%, rgba(80, 140, 170, .20), transparent 60%),
    radial-gradient(90% 50% at 95% -5%, rgba(120, 110, 180, .14), transparent 60%),
    radial-gradient(80% 60% at 50% 110%, rgba(201, 164, 92, .06), transparent 60%),
    linear-gradient(180deg, #0B1118 0%, var(--bg) 55%);
}
#snow { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .55; }

a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { display: block; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ------------------------------------------------------------ каркас */
.app { max-width: 540px; margin: 0 auto; padding: 0 16px calc(var(--tabbar-h) + var(--safe-b) + 24px); min-height: 100vh; }
.app.no-tabs { padding-bottom: 40px; }
.screen { display: none; animation: rise .35s ease both; }
.screen.on { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.topbar {
  position: sticky; top: 0; z-index: 20; margin: 0 -16px; padding: 12px 16px 10px;
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, rgba(9, 13, 18, .96) 60%, rgba(9, 13, 18, 0));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.brandmark { display: flex; align-items: center; gap: 8px; font-family: var(--serif); letter-spacing: .14em; text-transform: uppercase; font-size: 15px; color: var(--gold-2); }
.brandmark svg { width: 22px; height: 24px; }
.topbar .sp { flex: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap;
}
.chip .icon { width: 16px; height: 16px; }
.chip.gold { color: var(--gold-2); border-color: rgba(201, 164, 92, .35); background: rgba(201, 164, 92, .08); }
.chip.ice { color: var(--ice); border-color: rgba(156, 195, 230, .3); background: rgba(156, 195, 230, .07); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: .04em; margin: 0; }
h1 { font-size: 30px; line-height: 1.1; }
h2 { font-size: 22px; line-height: 1.2; }
h3 { font-size: 18px; line-height: 1.25; }
.eyebrow { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 2px 12px; gap: 12px; }
.section-title h2 { font-size: 20px; }

/* ------------------------------------------------------------ карточки */
.card {
  position: relative; background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line); border-radius: var(--r); padding: 16px;
}
.card.flat { background: var(--surface); }
.card.glow { box-shadow: var(--shadow); }
.card.gilded { border-color: rgba(201, 164, 92, .38); }
.card.gilded::before {
  content: ''; position: absolute; inset: 4px; border: 1px solid rgba(201, 164, 92, .14); border-radius: calc(var(--r) - 4px); pointer-events: none;
}
.divider { height: 1px; background: var(--line-soft); margin: 14px 0; border: 0; }
.ornament { display: flex; align-items: center; gap: 10px; color: var(--gold-deep); margin: 18px 0; }
.ornament::before, .ornament::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(201, 164, 92, .4), transparent); }
.ornament svg { width: 14px; height: 14px; }

/* ------------------------------------------------------------ кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 20px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 700; font-size: 15.5px; letter-spacing: .01em; cursor: pointer; text-decoration: none !important;
  transition: transform .12s ease, filter .15s ease, background .15s ease, border-color .15s ease;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.block { width: 100%; }
.btn.primary {
  color: var(--gold-ink);
  background: linear-gradient(180deg, var(--gold-2) 0%, var(--gold) 55%, #B48D45 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 8px 22px rgba(201, 164, 92, .22);
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--gold-deep); }
.btn.vk { background: #0077FF; color: #fff; box-shadow: 0 8px 22px rgba(0, 119, 255, .25); }
.btn.vk:hover { filter: brightness(1.07); }
.btn.small { min-height: 38px; padding: 8px 14px; font-size: 14px; border-radius: 11px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--gold-2); cursor: pointer; font-weight: 600; }

/* ------------------------------------------------------------ вход */
.hero { text-align: center; padding: 40px 6px 10px; }
.crest-big { width: 112px; height: 126px; margin: 0 auto 18px; filter: drop-shadow(0 10px 30px rgba(201, 164, 92, .25)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-5px); } }
.hero h1 { font-size: 40px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-2);
  text-shadow: 0 2px 30px rgba(201, 164, 92, .25); }
.hero .tagline { margin: 12px auto 0; max-width: 360px; color: var(--muted); font-size: 16px; }
.features { margin-top: 28px; display: grid; gap: 10px; }
.feature { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: var(--r); background: rgba(18, 26, 35, .7); border: 1px solid var(--line-soft); text-align: left; }
.feature .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--gold-2);
  background: radial-gradient(circle at 30% 20%, rgba(232, 203, 140, .18), rgba(201, 164, 92, .05)); border: 1px solid rgba(201, 164, 92, .25); flex: none; }
.feature b { display: block; font-weight: 700; margin-bottom: 2px; }
.feature span { color: var(--muted); font-size: 14px; }
.login-box { margin-top: 26px; }
.legal-line { font-size: 12px; color: var(--faint); margin-top: 14px; text-align: center; }
.legal-line a { color: var(--muted); text-decoration: underline; text-decoration-color: rgba(149, 163, 181, .35); }
.dev-box { margin-top: 22px; padding: 12px; border: 1px dashed var(--line); border-radius: var(--r); }
.notice { padding: 12px 14px; border-radius: 12px; font-size: 14px; background: rgba(208, 103, 92, .1); border: 1px solid rgba(208, 103, 92, .35); color: #F1C1BB; }
.notice.info { background: rgba(156, 195, 230, .07); border-color: rgba(156, 195, 230, .28); color: #CFE2F3; }

/* ------------------------------------------------------------ посвящение */
.stepper { display: flex; gap: 6px; margin: 18px 0 22px; }
.stepper i { flex: 1; height: 3px; border-radius: 3px; background: var(--line); transition: background .3s; }
.stepper i.on { background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.choice { display: grid; gap: 10px; }
.opt {
  display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; padding: 14px; cursor: pointer;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); transition: border-color .15s, background .15s, transform .12s;
}
.opt:active { transform: scale(.99); }
.opt.sel { border-color: var(--gold); background: linear-gradient(180deg, rgba(201, 164, 92, .10), rgba(201, 164, 92, .03)); }
.opt .t { font-weight: 700; font-size: 16px; }
.opt .d { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.opt .tag { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); font-weight: 800; }
.opt .emb { width: 46px; height: 52px; flex: none; }
.opt .radio { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.opt.sel .radio { border-color: var(--gold); }
.opt.sel .radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--gold-2); }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 10px 2px; cursor: pointer; font-size: 14.5px; }
.check input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 1px 0 0; flex: none; border-radius: 7px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; display: grid; place-items: center; }
.check input:checked { border-color: var(--gold); background: var(--gold); }
.check input:checked::after { content: ''; width: 6px; height: 11px; border: solid var(--gold-ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.field { display: grid; gap: 6px; margin-top: 14px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; }
.input {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text); outline: none; transition: border-color .15s;
}
.input:focus { border-color: var(--gold); }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chips button { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; cursor: pointer; color: var(--muted); }
.chips button:hover { color: var(--text); border-color: var(--gold-deep); }
.rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.rules li { display: flex; gap: 10px; font-size: 14.5px; color: #D3DAE3; }
.rules li::before { content: ''; flex: none; width: 7px; height: 7px; margin-top: 8px; transform: rotate(45deg); background: var(--gold); }

/* ------------------------------------------------------------ сегодня */
.herocard { overflow: hidden; }
.herocard .bgcrest { position: absolute; right: -24px; top: -18px; width: 160px; opacity: .06; pointer-events: none; }
.rankrow { display: flex; gap: 14px; align-items: center; }
.rankshield { width: 58px; height: 66px; flex: none; position: relative; }
.rankshield svg { width: 100%; height: 100%; }
.rankshield b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 24px; color: var(--gold-ink); padding-bottom: 6px; }
.rankname { font-family: var(--serif); font-size: 22px; letter-spacing: .05em; }
.ranktitle { color: var(--gold-2); font-size: 13px; font-weight: 700; }
.xpbar { height: 8px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; margin-top: 12px; }
.xpbar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-2)); box-shadow: 0 0 12px rgba(232, 203, 140, .45); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.stat { background: rgba(9, 13, 18, .55); border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px; text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: 22px; line-height: 1.1; color: var(--text); }
.stat span { font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }

.duel { display: grid; gap: 10px; }
.duel-head { display: flex; align-items: center; gap: 10px; }
.duel-side { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.duel-side.r { justify-content: flex-end; text-align: right; }
.duel-side .emb { width: 30px; height: 34px; flex: none; }
.duel-side .nm { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.duel-vs { font-family: var(--serif); color: var(--gold); font-size: 15px; letter-spacing: .1em; }
.duel-bar { display: flex; height: 10px; border-radius: 10px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.duel-bar i { display: block; height: 100%; transition: width .6s ease; }
.duel-nums { display: flex; justify-content: space-between; font-family: var(--serif); font-size: 20px; }

.tasks { display: grid; gap: 10px; }
.task {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  padding: 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface);
  transition: border-color .2s, background .25s, transform .12s;
}
.task:active { transform: scale(.985); }
.task .seal { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; transition: all .25s; position: relative; }
.task .seal svg { width: 18px; height: 18px; opacity: 0; transform: scale(.4) rotate(-20deg); transition: all .3s cubic-bezier(.2, 1.6, .4, 1); stroke: var(--gold-ink); stroke-width: 3; fill: none; }
.task .body { flex: 1; min-width: 0; }
.task .lbl { font-weight: 700; font-size: 15.5px; overflow-wrap: anywhere; }
.task .sub { color: var(--muted); font-size: 13px; margin-top: 1px; }
.task .xp { font-family: var(--serif); font-size: 16px; color: var(--faint); flex: none; transition: color .2s; }
.task.done { border-color: rgba(201, 164, 92, .45); background: linear-gradient(180deg, rgba(201, 164, 92, .09), rgba(201, 164, 92, .02)); }
.task.done .seal { border-color: transparent; background: radial-gradient(circle at 35% 30%, var(--gold-2), var(--gold) 60%, var(--gold-deep)); box-shadow: 0 0 0 4px rgba(201, 164, 92, .12), 0 4px 14px rgba(201, 164, 92, .35); }
.task.done .seal svg { opacity: 1; transform: none; }
.task.done .lbl { color: var(--gold-2); }
.task.done .xp { color: var(--gold-2); }
.task.pop .seal { animation: stamp .45s ease; }
@keyframes stamp { 0% { transform: scale(1); } 35% { transform: scale(1.25); } 100% { transform: scale(1); } }
.task.mini { padding: 10px 12px; }
.task.mini .seal { width: 28px; height: 28px; }
.task.mini .seal svg { width: 14px; height: 14px; }
.task.mini .lbl { font-size: 14px; }
.dayprog { display: flex; align-items: center; gap: 10px; margin: 2px 2px 12px; font-size: 13px; color: var(--muted); }
.dayprog .pips { display: flex; gap: 4px; }
.dayprog .pips i { width: 18px; height: 5px; border-radius: 5px; background: var(--line); }
.dayprog .pips i.on { background: var(--gold); }

.workout .wtitle { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.workout ol, .workout ul { margin: 8px 0 0; padding-left: 20px; color: #D3DAE3; font-size: 14.5px; }
.workout li { margin: 4px 0; }
.exlist { display: grid; gap: 8px; margin-top: 12px; }
.ex {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  padding: 11px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-soft);
}
.ex:hover { border-color: var(--line); }
.ex .n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-family: var(--serif); color: var(--gold-2); background: rgba(201, 164, 92, .08); border: 1px solid rgba(201, 164, 92, .25); font-size: 14px; flex: none; }
.ex .nm { flex: 1; font-weight: 600; font-size: 14.5px; }
.ex .dose { font-size: 13.5px; color: var(--ice); font-weight: 700; white-space: nowrap; }
.ex .icon { width: 16px; height: 16px; color: var(--faint); }
.pillrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.safety { font-size: 12.5px; color: var(--faint); margin-top: 12px; line-height: 1.45; }
details.fold { margin-top: 12px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
details.fold summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::before { content: '+'; width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; border: 1px solid var(--line); font-size: 13px; color: var(--gold-2); }
details.fold[open] summary::before { content: '–'; }

/* ------------------------------------------------------------ карта */
.mapwrap { padding: 8px; overflow: hidden; }
.mapwrap svg { width: 100%; height: auto; }
.hex { transition: opacity .2s; cursor: pointer; }
.hex:hover { opacity: .92; }
.hex-label { font-family: var(--serif); font-size: 9.6px; letter-spacing: .06em; text-transform: uppercase; fill: #EEF2F6; pointer-events: none; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.legend .li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-soft); }
.legend .li .emb { width: 22px; height: 25px; }
.legend .li b { margin-left: auto; font-family: var(--serif); font-size: 17px; }
.legend .li.mine { border-color: rgba(201, 164, 92, .4); }
.hist { display: grid; gap: 8px; }
.hist .h { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); font-size: 14px; }
.hist .h .w { font-size: 11.5px; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }

/* ------------------------------------------------------------ рейтинг */
.seg { display: flex; padding: 4px; gap: 4px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); }
.seg button { flex: 1; min-height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; font-size: 14px; }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset; }
.board { display: grid; gap: 6px; margin-top: 12px; }
.brow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); }
.brow.me { border-color: rgba(201, 164, 92, .5); background: linear-gradient(90deg, rgba(201, 164, 92, .1), rgba(201, 164, 92, .02)); }
.brow .pl { width: 30px; text-align: center; font-family: var(--serif); font-size: 18px; color: var(--muted); flex: none; }
.brow.top1 .pl { color: #F0D28E; } .brow.top2 .pl { color: #CBD6E2; } .brow.top3 .pl { color: #D69A6A; }
.brow .dot { width: 10px; height: 10px; border-radius: 3px; transform: rotate(45deg); flex: none; }
.brow .who { flex: 1; min-width: 0; }
.brow .who b { display: block; font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brow .who span { font-size: 12px; color: var(--muted); }
.brow .pts { font-family: var(--serif); font-size: 19px; color: var(--gold-2); }
.clancard { display: flex; gap: 14px; align-items: center; }
.clancard .emb { width: 50px; height: 56px; flex: none; }
.clancard .meter { height: 6px; border-radius: 6px; background: var(--bg); overflow: hidden; margin-top: 8px; border: 1px solid var(--line-soft); }
.clancard .meter i { display: block; height: 100%; border-radius: 6px; }
.clancard .big { font-family: var(--serif); font-size: 26px; margin-left: auto; text-align: right; line-height: 1; }
.clancard .big small { display: block; font-family: var(--sans); font-size: 11px; color: var(--muted); margin-top: 4px; }

.land-emb { width: 48px; height: 54px; flex: none; }

/* лиги равных */
.lg-head { display: flex; gap: 14px; align-items: center; }
.lgshield { width: 54px; height: 61px; flex: none; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .35)); }
.lgshield.sm { width: 30px; height: 34px; }
.lg-ladder { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; }
.lg-step { padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--faint); }
.lg-step.past { color: var(--muted); }
.lg-step.on { color: var(--gold-ink); background: linear-gradient(180deg, var(--gold-2), var(--gold)); border-color: transparent; font-weight: 800; }
.lg-arrow { color: var(--faint); }
.brow.up { box-shadow: inset 3px 0 0 var(--ok); }
.brow.down { box-shadow: inset 3px 0 0 var(--danger); }
.zone-sep { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; padding: 6px 4px; }
.zone-sep.up { color: var(--ok); border-bottom: 1px dashed rgba(157, 196, 143, .4); margin-bottom: 2px; }
.zone-sep.down { color: #F1C1BB; border-top: 1px dashed rgba(208, 103, 92, .45); margin-top: 2px; }
.lg-mini { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer; padding: 12px 14px; }
.lg-mini .icon { width: 18px; height: 18px; color: var(--faint); }

/* ------------------------------------------------------------ программа */
.weekstrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.wday { padding: 10px 2px 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); text-align: center; cursor: pointer; }
.wday.today { border-color: var(--gold); background: linear-gradient(180deg, rgba(201, 164, 92, .14), rgba(201, 164, 92, .02)); }
.wday.past { opacity: .55; }
.wday .wd { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.wday .ty { width: 26px; height: 26px; margin: 6px auto 4px; color: var(--ice); }
.wday.today .ty { color: var(--gold-2); }
.wday .tl { font-size: 10.5px; color: var(--muted); line-height: 1.2; min-height: 26px; padding: 0 2px; }
.libgroup { margin-top: 16px; }
.libgroup h3 { font-size: 15px; color: var(--muted); margin-bottom: 8px; font-family: var(--sans); font-weight: 700; letter-spacing: .02em; }

/* ------------------------------------------------------------ я */
.charcard { text-align: center; padding: 24px 16px 18px; overflow: hidden; }
.charcard .bigshield { width: 96px; height: 108px; margin: 0 auto; position: relative; }
.charcard .bigshield b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 38px; color: var(--gold-ink); padding-bottom: 10px; }
.charcard .nm { font-family: var(--serif); font-size: 28px; margin-top: 12px; letter-spacing: .04em; overflow-wrap: anywhere; }
.charcard .banner { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); }
.charcard .banner .emb { width: 18px; height: 20px; }
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.badge { text-align: center; padding: 12px 4px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); cursor: pointer; }
.badge svg { width: 34px; height: 34px; margin: 0 auto 6px; }
.badge span { font-size: 11px; line-height: 1.2; color: var(--muted); display: block; }
.badge.got { border-color: rgba(201, 164, 92, .35); }
.badge.got span { color: var(--gold-2); }
.badge:not(.got) svg { opacity: .28; filter: grayscale(1); }
.heat { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.heat .col { display: grid; grid-template-rows: repeat(7, 1fr); gap: 4px; }
.heat i { aspect-ratio: 1; border-radius: 4px; background: var(--surface-2); display: block; }
.heat i.l1 { background: rgba(201, 164, 92, .25); } .heat i.l2 { background: rgba(201, 164, 92, .45); } .heat i.l3 { background: rgba(201, 164, 92, .7); } .heat i.l4 { background: var(--gold-2); box-shadow: 0 0 6px rgba(232, 203, 140, .4); }
.heat i.off { background: transparent; border: 1px dashed var(--line-soft); }
.heat i.today { outline: 1.5px solid var(--ice); outline-offset: 1px; }
.charts { display: grid; gap: 10px; }
.chart { padding: 12px 14px; }
.chart .row b { font-family: var(--serif); font-size: 22px; }
.chart svg { width: 100%; height: 54px; margin-top: 6px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.access-state { display: flex; align-items: center; gap: 12px; }
.access-state .icon { width: 28px; height: 28px; color: var(--gold-2); }

/* ------------------------------------------------------------ Кодекс Ордена
   Окна «системы»: ледяной свет поверх ночи. Золото — геральдика Ордена,
   лёд — голос Кодекса. Уголки рамки — свои, без заимствований. */
.codex {
  --cx: 156, 195, 230;
  position: relative; padding: 16px 16px 14px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(22, 38, 56, .88), rgba(10, 18, 28, .92));
  border: 1px solid rgba(var(--cx), .42);
  box-shadow: 0 0 0 1px rgba(var(--cx), .06) inset, 0 0 26px rgba(110, 170, 220, .16), inset 0 0 34px rgba(110, 170, 220, .06);
}
.codex::before, .codex::after {
  content: ''; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border: 2px solid rgba(var(--cx), .95); filter: drop-shadow(0 0 4px rgba(var(--cx), .7));
}
.codex::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: 12px; }
.codex::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: 12px; }
.codex.done { --cx: 232, 203, 140; box-shadow: 0 0 0 1px rgba(232, 203, 140, .08) inset, 0 0 26px rgba(201, 164, 92, .2), inset 0 0 34px rgba(201, 164, 92, .06); }
.codex-head {
  display: flex; align-items: center; gap: 8px; padding-bottom: 10px; margin-bottom: 12px;
  border-bottom: 1px solid rgba(var(--cx), .22);
  font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: rgb(var(--cx));
}
.codex-head svg { width: 12px; height: 12px; fill: currentColor; filter: drop-shadow(0 0 4px rgba(var(--cx), .8)); }
.codex-head .sp { flex: 1; }
.codex-title {
  text-align: center; font-weight: 800; font-size: 17px; letter-spacing: .14em; text-transform: uppercase;
  color: #EEF6FF; text-shadow: 0 0 14px rgba(var(--cx), .55); margin: 2px 0 4px;
}
.codex-sub { text-align: center; font-size: 13px; color: #B9CCE0; margin-bottom: 12px; }
.codex .qlist { display: grid; gap: 0; border-top: 1px solid rgba(var(--cx), .14); }
.codex .task {
  background: transparent; border: 0; border-bottom: 1px solid rgba(var(--cx), .14); border-radius: 0; padding: 12px 2px;
}
.codex .task .seal { border-color: rgba(var(--cx), .5); width: 30px; height: 30px; }
.codex .task .seal svg { width: 15px; height: 15px; }
.codex .task.done { background: transparent; border-color: rgba(var(--cx), .14); }
.codex .task .xp { font-family: var(--sans); font-size: 12.5px; font-weight: 800; letter-spacing: .04em; color: rgb(var(--cx)); }
.codex .task .mark { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: #B9CCE0; white-space: nowrap; }
.codex .task.done .mark { color: var(--gold-2); }
.codex-foot { margin-top: 12px; display: grid; gap: 6px; font-size: 12.5px; color: #B9CCE0; }
.codex-foot b { color: #EEF6FF; }
.codex-foot .warn { color: #F1C1BB; }
.codex-foot .row svg { width: 14px; height: 14px; }

/* окно статуса */
.st-top { display: flex; gap: 14px; align-items: center; }
.st-top .rankshield { width: 64px; height: 72px; }
.st-top .rankshield b { font-size: 30px; }
.st-name { font-family: var(--serif); font-size: 26px; line-height: 1.1; overflow-wrap: anywhere; }
.st-line { font-size: 13px; color: #B9CCE0; margin-top: 3px; }
.st-line b { color: #EEF6FF; font-weight: 700; }
.st-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.st-cell {
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 2px; padding: 10px 12px; border-radius: 10px; cursor: pointer; text-align: left;
  background: rgba(156, 195, 230, .06); border: 1px solid rgba(156, 195, 230, .2); color: inherit; min-width: 0;
}
.st-cell .k { font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--ice); }
.st-cell .v { font-family: var(--serif); font-size: 26px; line-height: 1; color: #EEF6FF; margin-left: auto; }
.st-cell .n { flex-basis: 100%; font-size: 11.5px; color: var(--muted); }
.st-cell.up { animation: statup 1.2s ease; }
@keyframes statup { 0% { box-shadow: 0 0 0 0 rgba(156, 195, 230, .6); } 100% { box-shadow: 0 0 0 10px rgba(156, 195, 230, 0); } }
.rl { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: 6px; border-radius: 6px;
  font-size: 11.5px; font-weight: 800; color: #0A1420; background: var(--ice); vertical-align: 2px; }
.rl.s, .rl.a { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); }

/* уведомления Кодекса — сверху по центру, как окно поверх мира */
.notices { position: fixed; left: 0; right: 0; top: 12px; z-index: 65; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.notice-cx {
  pointer-events: auto; width: min(420px, 100%); padding: 10px 14px 11px; border-radius: 10px;
  background: rgba(12, 22, 34, .94); border: 1px solid rgba(156, 195, 230, .5);
  box-shadow: 0 0 22px rgba(110, 170, 220, .25), 0 10px 30px rgba(0, 0, 0, .4);
  transform: translateY(-14px) scale(.98); opacity: 0; transition: all .28s cubic-bezier(.2, .9, .3, 1.2);
}
.notice-cx.on { transform: none; opacity: 1; }
.notice-cx .h { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .2em; color: var(--ice); text-transform: uppercase; }
.notice-cx .h svg { width: 10px; height: 10px; fill: currentColor; }
.notice-cx .t { margin-top: 4px; font-size: 14px; font-weight: 700; color: #EEF6FF; }
.notice-cx .d { font-size: 12.5px; color: #B9CCE0; margin-top: 2px; }
.notice-cx.gold { border-color: rgba(232, 203, 140, .6); box-shadow: 0 0 22px rgba(201, 164, 92, .28), 0 10px 30px rgba(0, 0, 0, .4); }
.notice-cx.gold .h { color: var(--gold-2); }

/* ------------------------------------------------------------ таб-бар */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 6px max(10px, calc((100vw - 540px) / 2 + 10px)) calc(6px + var(--safe-b));
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
  background: rgba(10, 14, 19, .92); border-top: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.tabbar[hidden] { display: none; }
.tabbar button {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 5px; border: 0; background: none; cursor: pointer;
  color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: .02em; border-radius: 12px; transition: color .15s;
}
.tabbar button .icon { width: 24px; height: 24px; }
.tabbar button.on { color: var(--gold-2); }
.tabbar button.on .icon { filter: drop-shadow(0 0 8px rgba(232, 203, 140, .45)); }

/* ------------------------------------------------------------ окна */
.sheet-back { position: fixed; inset: 0; z-index: 50; background: rgba(3, 5, 8, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .25s; }
.sheet-back.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51; max-width: 540px; margin: 0 auto; max-height: 88vh; overflow: auto;
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 22px 22px 0 0; padding: 10px 18px calc(24px + var(--safe-b));
  transform: translateY(105%); transition: transform .32s cubic-bezier(.2, .8, .2, 1); overscroll-behavior: contain;
}
.sheet.on { transform: none; }
.sheet .grip { width: 42px; height: 5px; border-radius: 5px; background: var(--line); margin: 0 auto 14px; }
.sheet .x { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.sheet h2 { padding-right: 44px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px); z-index: 60; transform: translate(-50%, 20px);
  max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--line);
  box-shadow: var(--shadow); font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .25s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.gold { border-color: rgba(201, 164, 92, .5); color: var(--gold-2); }

.ceremony { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: radial-gradient(circle at 50% 38%, rgba(201, 164, 92, .18), transparent 62%), rgba(6, 9, 13, .98); opacity: 0; pointer-events: none; transition: opacity .4s; padding: 24px; text-align: center; }
.ceremony.on { opacity: 1; pointer-events: auto; }
.ceremony .crest-big { animation: crestin 1.1s cubic-bezier(.2, .9, .2, 1) both; }
@keyframes crestin { from { transform: scale(.5) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.ceremony h1 { color: var(--gold-2); text-transform: uppercase; letter-spacing: .1em; }

.loader { display: grid; place-items: center; min-height: 60vh; }
.loader svg { width: 54px; height: 60px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; transform: scale(.96); } }
.empty { padding: 24px; text-align: center; color: var(--muted); }

table.mtab { width: 100%; border-collapse: collapse; font-size: 14px; }
table.mtab th { text-align: left; font-size: 11.5px; color: var(--faint); letter-spacing: .06em; text-transform: uppercase; padding: 6px 4px; font-weight: 700; }
table.mtab td { padding: 8px 4px; border-top: 1px solid var(--line-soft); }

@media (min-width: 600px) {
  .hero { padding-top: 64px; }
  .features { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .hero h1 { font-size: 32px; }
  .stats3 .stat b { font-size: 19px; }
  .badges { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  #snow { display: none; }
}

/* ============================================================ v3: знамёна участников, карта королевств, печати */
.emb.xs { width: 16px; height: 18px; flex: none; }
.emb.sm { width: 24px; height: 27px; flex: none; }
.emb.md { width: 34px; height: 38px; flex: none; }
.emb.xl { width: 64px; height: 72px; flex: none; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .4)); }
.cer-emb { width: 92px !important; height: 104px !important; margin: 6px auto 10px; display: block; }
.tiny-chip { font-size: 10px; padding: 2px 6px; vertical-align: 2px; }

/* знамя */
.clan-head { display: flex; gap: 16px; align-items: center; }
.clan-name { font-size: 26px; overflow-wrap: anywhere; }
.stats4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stats4 .stat b small { font-size: 12px; color: var(--muted); font-family: var(--sans); }
.siegebar { position: relative; height: 10px; border-radius: 10px; background: rgba(9, 13, 18, .8); border: 1px solid rgba(156, 195, 230, .25); overflow: hidden; margin-top: 8px; }
.siegebar i { display: block; height: 100%; border-radius: 10px; transition: width .6s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 0 10px rgba(255, 255, 255, .15); }
.siegebar.big { height: 18px; }
.siegebar.big span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 3px #000; }
.threat { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(208, 103, 92, .1); border: 1px solid rgba(208, 103, 92, .35); color: #F1C1BB; font-size: 13.5px; text-align: left; margin-top: 8px; }
.threat .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.clan-card { width: 100%; text-align: left; cursor: pointer; display: block; color: inherit; font: inherit; }
.clanless-card { display: flex; gap: 12px; align-items: center; }
.clanless-card > .icon { width: 28px; height: 28px; color: var(--gold-2); }
.review-card { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; cursor: pointer; border-color: rgba(156, 195, 230, .35); color: inherit; font: inherit; }
.review-card > .icon:first-child { width: 26px; height: 26px; color: var(--ice); }
.members { display: grid; gap: 6px; }
.mrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); }
.mrow.me { border-color: rgba(201, 164, 92, .5); }
.mrow .who { flex: 1; min-width: 0; }
.mrow .who b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .who span { font-size: 12px; color: var(--muted); }
.pips4 { display: flex; gap: 5px; padding: 0 2px; }
.pips4 i { width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg); background: var(--surface-3); border: 1px solid var(--line); }
.pips4 i.on { background: var(--gold); border-color: var(--gold-2); box-shadow: 0 0 6px rgba(232, 203, 140, .5); }
.mbtn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; flex: none; }
.role-chip { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; background: rgba(201, 164, 92, .15); color: var(--gold-2); }
.role-chip.officer { background: rgba(156, 195, 230, .14); color: var(--ice); }
.code-big { font-family: var(--serif); font-size: 26px; letter-spacing: .18em; color: var(--gold-2); }
.code-input { text-transform: uppercase; letter-spacing: .3em; font-size: 22px; text-align: center; font-weight: 800; }
.btn.danger { border-color: var(--danger) !important; color: #F1C1BB !important; }
.feed { display: grid; gap: 6px; }
.ev { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: start; padding: 9px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-soft); font-size: 13.5px; }
.ev .icon { width: 16px; height: 16px; color: var(--faint); margin-top: 2px; }
.ev.capture .icon, .ev.crown .icon, .ev.clan_created .icon { color: var(--gold-2); }
.ev.campaign .icon { color: var(--ice); }
.ev.power { opacity: .85; font-size: 13px; }
.ev .tm { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.clan-opt { cursor: default; }
.clan-opt .btn { flex: none; }
.opt[disabled] { opacity: .5; cursor: not-allowed; }

/* конструктор герба */
.cf-preview { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.cf-emb { width: 64px; height: 72px; flex: none; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .4)); }
.glyphs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.gl { display: grid; justify-items: center; gap: 4px; padding: 8px 2px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--muted); font-size: 10.5px; }
.gl.on { border-color: var(--gold); background: rgba(201, 164, 92, .1); color: var(--gold-2); }
.gl-emb { width: 30px; height: 34px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25); }
.sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--gold); }

/* печати Кодекса */
.pchip { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: rgba(156, 195, 230, .1); color: var(--ice); border: 1px solid rgba(156, 195, 230, .3); white-space: nowrap; }
.pchip .icon { width: 13px; height: 13px; }
.pchip.warn { background: rgba(232, 170, 80, .14); color: #F2C88A; border-color: rgba(232, 170, 80, .5); cursor: pointer; animation: chipPulse 2s ease-in-out infinite; }
.pchip.ok { background: rgba(157, 196, 143, .12); color: var(--ok); border-color: rgba(157, 196, 143, .4); }
.pchip.bad { background: rgba(208, 103, 92, .12); color: #F1C1BB; border-color: rgba(208, 103, 92, .4); }
@keyframes chipPulse { 50% { box-shadow: 0 0 0 4px rgba(232, 170, 80, .12); } }
.task.locked { opacity: .55; }
.task.locked .lbl { text-decoration: line-through; }
.word { margin: 14px auto 10px; text-align: center; font-family: var(--serif); font-size: 44px; letter-spacing: .14em; color: #EEF6FF; text-shadow: 0 0 22px rgba(156, 195, 230, .6); }
.word-inline { letter-spacing: .12em; color: #EEF6FF; }
.filebtn { cursor: pointer; }
.pf-prev, .pf-review { display: block; width: 100%; max-height: 52vh; object-fit: contain; border-radius: 12px; margin-top: 12px; background: #05080B; border: 1px solid var(--line); }

/* карта королевств */
.map-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 12px; }
.mapframe { position: relative; width: 100%; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #0B121A; box-shadow: var(--shadow); }
.worldmap { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.worldmap:active { cursor: grabbing; }
.prov { stroke: rgba(9, 13, 18, .85); stroke-width: 1; }
.prov.target { stroke: var(--gold-2); stroke-width: 2.4; stroke-dasharray: 5 3; animation: march 1.2s linear infinite; }
.prov.allowed { stroke: #EEF6FF; stroke-width: 2; animation: allowedGlow 1.4s ease-in-out infinite; }
@keyframes march { to { stroke-dashoffset: -16; } }
@keyframes allowedGlow { 50% { stroke-opacity: .25; } }
.terr path { stroke-width: 2.2; fill: none; stroke-linecap: round; pointer-events: none; }
.coast { fill: none; stroke: rgba(156, 195, 230, .35); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.kborder { fill: none; stroke: rgba(232, 203, 140, .55); stroke-width: 1.6; stroke-dasharray: 4 3; pointer-events: none; }
.pname { font-family: var(--serif); font-size: 6.2px; letter-spacing: .04em; fill: #EEF2F6; pointer-events: none; opacity: 0; transition: opacity .2s; paint-order: stroke; stroke: rgba(9, 13, 18, .75); stroke-width: 1.6px; }
.worldmap.zoomed .pname { opacity: 1; }
.pip { fill: #E8CB8C; fill-opacity: .9; pointer-events: none; }
.pemb, .siege { pointer-events: none; }
.kname { transition: opacity .25s; pointer-events: none; }
.kname text { font-family: var(--serif); font-size: 12px; letter-spacing: .22em; fill: rgba(238, 242, 246, .85); paint-order: stroke; stroke: rgba(9, 13, 18, .85); stroke-width: 3px; }
.kname .kcrown { font-size: 7.5px; letter-spacing: .06em; font-family: var(--sans); font-weight: 800; }
.worldmap:not(.far) .kname { opacity: 0; }
.ring-bg { fill: none; stroke: rgba(9, 13, 18, .55); stroke-width: 3; }
.ring { fill: none; stroke-width: 3; stroke-linecap: round; }
.siege.ours .ring { stroke-width: 3.8; }
.siege.threat .ring-bg { stroke: rgba(208, 103, 92, .55); }
.mapctl { position: absolute; right: 10px; top: 10px; display: grid; gap: 6px; }
.mapctl button { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: rgba(18, 26, 35, .9); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.mapctl .icon { width: 18px; height: 18px; }
.live { position: absolute; left: 10px; bottom: 8px; font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--ok); text-shadow: 0 1px 2px #000; pointer-events: none; }
.legend2 { display: flex; flex-wrap: wrap; gap: 6px; }
.lg-item { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-soft); font-size: 12.5px; }
.lg-item.mine { border-color: rgba(201, 164, 92, .5); }
.lg-item b { font-family: var(--serif); }
@media (max-width: 360px) { .stats4 { grid-template-columns: repeat(2, 1fr); } .glyphs { grid-template-columns: repeat(3, 1fr); } }
