/* =====================================================================
   Koban · Valheim — «Борт драккара»: нордическая тема всего раздела.

   Одна страница /v/ — куб из трёх граней под неподвижной балкой-шапкой
   (карта слева, главная спереди, настройки справа; см. cube.css, cube.js).
   Здесь — вид: балка со щитами, дубовые панели в железной оковке, рунный
   камень с кодом, доски разделов, панели карты на цепях.

   Всё под html.nr. Грани главной и настроек — .face--main и .face--options
   этого же документа; карта живёт во встроенном окне (/v/map/?embed=1),
   и там у корня html.nr.nr--map.
   ===================================================================== */

/* ---------- tokens ---------- */
html.nr {
  --nr-bar-h: 64px;
  --nr-top: env(safe-area-inset-top, 0px);
  --nr-bottom: env(safe-area-inset-bottom, 0px);
  --nr-rail-h: 70px;
  --nr-edge: 18px;

  --font-display: "Vollkorn SC", Georgia, serif;
  --font-body: "Alegreya Sans", "Source Sans 3", system-ui, sans-serif;
  --nr-rune: "Noto Sans Runic", serif;

  --nr-gold: #ecc77c;
  --nr-gold-2: #d4a95c;
  --nr-bronze: #8f6a31;
  --nr-ember: #ff9a3c;
  --nr-ember-soft: rgba(255, 154, 60, 0.42);
  --nr-parch: #f1e5cb;
  --nr-parch-dim: rgba(241, 229, 203, 0.66);
  --nr-blood: #8d2a1f;
  --nr-bone: #e6d6b3;
  --nr-iron-hi: #a2a7ac;
  --nr-iron: #50555a;
  --nr-iron-lo: #1f2225;

  /* Theme tokens re-pointed, so every existing component follows. */
  --panel: rgba(24, 16, 10, 0.86);
  --panel-border: rgba(214, 170, 96, 0.3);
  --panel-border-hover: rgba(236, 199, 124, 0.55);
  --text-main: #f1e5cb;
  --text-muted: #b9aa8c;
  --text-dim: rgba(241, 229, 203, 0.52);
  --accent: #d9b066;
  --accent-hover: #f0cd84;
  --accent-soft: rgba(217, 176, 102, 0.1);
  --accent-line: rgba(217, 176, 102, 0.34);
  --radius-lg: 9px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --radius-xs: 5px;

  /* ---- textures (SVG data URIs) ----
     У фильтра область задана ровно по плитке (width/height = 1): по
     умолчанию она на 20% больше, и stitchTiles сшивал шум не по краю
     плитки — на камне шире 600 px был виден вертикальный шов. */
  /* dark oak grain: long horizontal fibres */
  --nr-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='240'%3E%3Cfilter id='f' x='0' y='0' width='1' height='1'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.0022 0.085' numOctaves='3' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.03 0 0 0 0 0.018 0 0 0 0 0.008 0.9 0 0 0 -0.36'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  /* light fibres, sparse */
  --nr-grain-hi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='200'%3E%3Cfilter id='f' x='0' y='0' width='1' height='1'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.003 0.12' numOctaves='3' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.62 0 0 0 0 0.45 0 0 0 0 0.26 0.75 0 0 0 -0.44'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  /* stone grit */
  --nr-grit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='f' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.9 0 0 0 -0.36'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  /* stone mottling */
  --nr-mottle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='400'%3E%3Cfilter id='f' x='0' y='0' width='1' height='1'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012' numOctaves='4' seed='21' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.75 0 0 0 0 0.78 0 0 0 0 0.74 0.7 0 0 0 -0.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  /* iron corner brackets with a brass rivet */
  --nr-corner-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cdefs%3E%3ClinearGradient id='i' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23a3a8ad'/%3E%3Cstop offset='.5' stop-color='%234b4f54'/%3E%3Cstop offset='1' stop-color='%232a2d30'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M1 21V7.5A6.5 6.5 0 0 1 7.5 1H21v4.2H9A3.8 3.8 0 0 0 5.2 9v12z' fill='url(%23i)' stroke='%23080808' stroke-opacity='.6' stroke-width='.8'/%3E%3Ccircle cx='6.2' cy='6.2' r='1.9' fill='%23e7c47c' stroke='%235a4220' stroke-width='.7'/%3E%3C/svg%3E");
  --nr-corner-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cdefs%3E%3ClinearGradient id='i' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23a3a8ad'/%3E%3Cstop offset='.5' stop-color='%234b4f54'/%3E%3Cstop offset='1' stop-color='%232a2d30'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='translate(22 0) scale(-1 1)'%3E%3Cpath d='M1 21V7.5A6.5 6.5 0 0 1 7.5 1H21v4.2H9A3.8 3.8 0 0 0 5.2 9v12z' fill='url(%23i)' stroke='%23080808' stroke-opacity='.6' stroke-width='.8'/%3E%3Ccircle cx='6.2' cy='6.2' r='1.9' fill='%23e7c47c' stroke='%235a4220' stroke-width='.7'/%3E%3C/g%3E%3C/svg%3E");
  --nr-corner-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cdefs%3E%3ClinearGradient id='i' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23a3a8ad'/%3E%3Cstop offset='.5' stop-color='%234b4f54'/%3E%3Cstop offset='1' stop-color='%232a2d30'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='translate(0 22) scale(1 -1)'%3E%3Cpath d='M1 21V7.5A6.5 6.5 0 0 1 7.5 1H21v4.2H9A3.8 3.8 0 0 0 5.2 9v12z' fill='url(%23i)' stroke='%23080808' stroke-opacity='.6' stroke-width='.8'/%3E%3Ccircle cx='6.2' cy='6.2' r='1.9' fill='%23e7c47c' stroke='%235a4220' stroke-width='.7'/%3E%3C/g%3E%3C/svg%3E");
  --nr-corner-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cdefs%3E%3ClinearGradient id='i' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23a3a8ad'/%3E%3Cstop offset='.5' stop-color='%234b4f54'/%3E%3Cstop offset='1' stop-color='%232a2d30'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg transform='translate(22 22) scale(-1 -1)'%3E%3Cpath d='M1 21V7.5A6.5 6.5 0 0 1 7.5 1H21v4.2H9A3.8 3.8 0 0 0 5.2 9v12z' fill='url(%23i)' stroke='%23080808' stroke-opacity='.6' stroke-width='.8'/%3E%3Ccircle cx='6.2' cy='6.2' r='1.9' fill='%23e7c47c' stroke='%235a4220' stroke-width='.7'/%3E%3C/g%3E%3C/svg%3E");
  /* chain link, tiles vertically */
  --nr-chain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Crect x='2.5' y='1' width='7' height='8.4' rx='3.5' fill='none' stroke='%23b4b9be' stroke-width='2'/%3E%3Crect x='5' y='7' width='2' height='5' rx='1' fill='%23767b80'/%3E%3C/svg%3E");
}

/* ---------- base type ---------- */
html.nr body {
  font-family: var(--font-body);
  color: var(--text-main);
}

html.nr .k-title,
html.nr .hero__title,
html.nr .tile__title,
html.nr .home-logo::after {
  font-family: var(--font-display);
}

/* =====================================================================
   THE BEAM — one header for all three pages
   ===================================================================== */

html.nr .nr-bar {
  position: fixed;
  z-index: 44;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--nr-bar-h) + var(--nr-top));
  padding: var(--nr-top) var(--nr-edge) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  color: var(--nr-parch);
  font-family: var(--font-body);
  /* no transform/filter here: the phone rail inside must stay position:fixed
     relative to the viewport */
}

/* The oak itself. Lives on its own layer so backdrop effects never become a
   containing block for the fixed phone rail. */
html.nr .nr-bar__wood {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 140% at 50% 120%, rgba(255, 150, 60, 0.13) 0%, rgba(255, 150, 60, 0) 60%),
    var(--nr-grain-hi) 0 0 / 700px 100%,
    var(--nr-grain) 0 0 / 900px 100%,
    linear-gradient(180deg, #3d2a19 0%, #2c1d11 42%, #1c1209 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 214, 150, 0.16),
    inset 0 -12px 18px -6px rgba(0, 0, 0, 0.45),
    0 12px 30px rgba(0, 0, 0, 0.55);
}

/* Iron band with brass rivets along the lower edge of the beam. */
html.nr .nr-bar__wood::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 8px;
  background:
    radial-gradient(circle at 50% 50%, #fbe2a4 0 0.9px, #c9a052 1.3px, #6a4c1e 2.2px, rgba(0, 0, 0, 0.55) 2.9px, transparent 3.4px) 12px 0 / 40px 8px repeat-x,
    linear-gradient(180deg, #8b9095 0%, #4b4f54 38%, #25282b 80%, #111315 100%);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5), 0 8px 18px rgba(0, 0, 0, 0.45);
}

/* Thin gold inlay just above the band. */
html.nr .nr-bar__wood::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  height: 1px;
  background: linear-gradient(90deg, rgba(236, 199, 124, 0) 0%, rgba(236, 199, 124, 0.45) 20%, rgba(236, 199, 124, 0.45) 80%, rgba(236, 199, 124, 0) 100%);
}

/* carved rope inlay just under the top edge */
html.nr .nr-bar::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  top: calc(var(--nr-top) + 4px);
  height: 3px;
  background: repeating-linear-gradient(-62deg, rgba(0, 0, 0, 0.5) 0 2px, rgba(236, 199, 124, 0.2) 2px 3.5px, rgba(0, 0, 0, 0.15) 3.5px 5px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  pointer-events: none;
}

html.nr .nr-bar__side {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 100%;
}

html.nr .nr-bar__side--right { justify-content: flex-end; }

html.nr .nr-divider {
  flex: none;
  width: 2px;
  height: 30px;
  margin: 0 4px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.55) 30%, rgba(0, 0, 0, 0.55) 70%, rgba(0, 0, 0, 0));
  box-shadow: 1px 0 0 rgba(255, 214, 150, 0.1);
}

/* ---------- crest: boar medallion + name + status ---------- */

html.nr .nr-crest {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

html.nr .nr-medal {
  --ring: #6b7076;
  --ring-glow: rgba(0, 0, 0, 0);
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  padding: 3px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 58%, rgba(0, 0, 0, 0.5) 60%),
    conic-gradient(from 210deg, var(--nr-iron-hi), var(--nr-iron-lo) 25%, var(--nr-iron-hi) 50%, var(--nr-iron-lo) 75%, var(--nr-iron-hi));
  box-shadow:
    0 0 0 2px var(--ring),
    0 0 14px 2px var(--ring-glow),
    0 4px 10px rgba(0, 0, 0, 0.6);
  transition: box-shadow 400ms ease;
}

html.nr .nr-medal img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6);
}

html.nr .nr-crest:has(.kicker--online) .nr-medal {
  --ring: rgba(110, 231, 168, 0.9);
  --ring-glow: rgba(110, 231, 168, 0.35);
  animation: nrAlive 3.2s ease-in-out infinite;
}

html.nr .nr-crest:has(.kicker--offline) .nr-medal {
  --ring: rgba(232, 104, 104, 0.85);
  --ring-glow: rgba(232, 104, 104, 0.18);
}

html.nr .nr-crest:has(.kicker--offline) .nr-medal img { filter: grayscale(0.75) brightness(0.8); }

@keyframes nrAlive {
  0%, 100% { box-shadow: 0 0 0 2px var(--ring), 0 0 8px 0 var(--ring-glow), 0 4px 10px rgba(0, 0, 0, 0.6); }
  50% { box-shadow: 0 0 0 2px var(--ring), 0 0 18px 4px var(--ring-glow), 0 4px 10px rgba(0, 0, 0, 0.6); }
}

/* Имя и статус — столбиком, справа от них полоса суток (.nr-day). На
   телефоне полоса встаёт под имя вместо статуса — см. раздел PHONE. */
html.nr .nr-crest__text {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: "name day" "status day";
  align-items: center;
  row-gap: 3px;
  min-width: 0;
}

html.nr .nr-crest__name { grid-area: name; }
html.nr .nr-crest__status { grid-area: status; }

html.nr .nr-crest__name {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.05em;
  color: var(--nr-parch);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55);
  white-space: nowrap;
}

html.nr .nr-crest__runes {
  font-style: normal;
  font-family: var(--nr-rune);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--nr-gold-2);
  opacity: 0.6;
}

/* the page's own status pill, restyled as a small line under the name */
html.nr .nr-crest__status .kicker {
  gap: 7px;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1;
  white-space: nowrap;
}

html.nr .nr-crest__status .kicker::before { width: 7px; height: 7px; }
html.nr .nr-crest__status .kicker--online { color: #7fedb2; }
html.nr .nr-crest__status .kicker--offline { color: #f29a8c; }
html.nr .nr-crest__status .topbar__kicker-text { display: inline !important; }

/* ---------- сутки мира: время и кованая планка ----------
   Цвета — из материалов балки, «день и ночь»: где кровать работает (с 12:00
   до 03:36) — воронёная сталь, ночная синь в тон небу под балкой; где нет —
   латунь, как золото балки. Время — тем же шрифтом, что имя в гербе:
   лунно-голубое, когда спать можно, янтарное, когда нельзя, выцветшее, когда
   время стоит (на сервере никого) или его нет. «Сейчас» — светлая черта с
   тёмной каймой: она видна и на стали, и на латуни. Насыщенные зелёный и
   красный здесь пробовали — на дубе и золоте они смотрелись светофором. */

html.nr .nr-day {
  --nr-day-c: rgba(241, 229, 203, 0.45);
  grid-area: day;
  position: relative;
  display: grid;
  justify-items: start;
  row-gap: 5px;
  margin: 0 0 0 16px;
  padding: 2px 2px 2px 16px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

html.nr .nr-day[data-state="sleep"] { --nr-day-c: #c9dbf5; }
html.nr .nr-day[data-state="wait"] { --nr-day-c: #f2bd66; }

/* резной желобок между гербом и сутками — как перед кнопками балки */
html.nr .nr-day::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 30px;
  margin-top: -15px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.55) 30%, rgba(0, 0, 0, 0.55) 70%, rgba(0, 0, 0, 0));
  box-shadow: 1px 0 0 rgba(255, 214, 150, 0.1);
}

html.nr .nr-day:focus-visible {
  outline: 2px solid rgba(240, 205, 132, 0.8);
  outline-offset: 3px;
}

html.nr .nr-day__time {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.07em;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--nr-day-c);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.62);
  transition: color 400ms ease;
}

html.nr .nr-day:hover .nr-day__time { filter: brightness(1.12); }

/* планка: латунная заклёпка — железо — латунная заклёпка */
html.nr .nr-day__rail {
  display: flex;
  align-items: center;
  gap: 3px;
}

html.nr .nr-day__rail::before,
html.nr .nr-day__rail::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #fbe2a4 0 0.9px, #d9b066 1.6px, #8f6a31 2.8px, #4a3414 3.5px);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.7);
}

html.nr .nr-day__track {
  position: relative;
  display: block;
  width: 112px;
  height: 8px;
  border-radius: 1.5px;
  background: linear-gradient(180deg, #9aa0a6 0%, #5a5f64 30%, #2e3236 72%, #15171a 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.65),
    0 2px 3px rgba(0, 0, 0, 0.5),
    0 1px 0 1px rgba(255, 214, 150, 0.07);
}

/* шкала суток — чуть внутри планки: черта у края суток не лезет на
   заклёпку. Вся шкала — латунь, окна сна поверх — воронёная сталь. */
html.nr .nr-day__scale {
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 4px;
  right: 4px;
  border-radius: 1px;
  background: linear-gradient(180deg, #f3d08a 0%, #d19a48 55%, #96703a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 240, 210, 0.3), inset 0 -1px 1px rgba(0, 0, 0, 0.35);
}

html.nr .nr-day__win {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background: linear-gradient(180deg, #6f86b0 0%, #435781 55%, #26334f 100%);
  box-shadow: inset 0 1px 0 rgba(210, 225, 255, 0.22), inset 0 -1px 1px rgba(0, 0, 0, 0.4);
}

/* «сейчас» — светлая черта с тёмной каймой */
html.nr .nr-day__now {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: 0;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 1.5px;
  background: linear-gradient(180deg, #fffaf0, #f3e6c8);
  box-shadow: 0 0 0 1px rgba(16, 10, 4, 0.9), 0 0 5px rgba(255, 240, 210, 0.55);
}

html.nr .nr-day[data-state="frozen"] .nr-day__scale,
html.nr .nr-day[data-state="none"] .nr-day__scale { filter: saturate(0.2) brightness(0.75); }
html.nr .nr-day[data-state="frozen"] .nr-day__now { background: #b9b2a2; box-shadow: 0 0 0 1px rgba(20, 12, 4, 0.75); }
html.nr .nr-day[data-state="none"] .nr-day__now { display: none; }

/* Щелчок по суткам в балке: панель «Время в мире» на миг обводится золотом. */
html.nr .face--main .panel.is-called {
  outline: 2px solid rgba(240, 205, 132, 0);
  outline-offset: 5px;
  animation: nrCalled 1.9s ease-out;
}

@keyframes nrCalled {
  0%, 35% { outline-color: rgba(240, 205, 132, 0.9); }
  100% { outline-color: rgba(240, 205, 132, 0); }
}

/* ---------- the three rune shields ---------- */

html.nr .nr-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 100%;
}

html.nr .nr-tab {
  --s: 46px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 100%;
  padding: 0 18px 0 12px;
  text-decoration: none;
  color: var(--nr-parch-dim);
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  -webkit-tap-highlight-color: transparent;
  transition: color 200ms ease;
}

/* carved groove between tabs */
html.nr .nr-tab + .nr-tab::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 50%;
  width: 2px;
  height: 26px;
  margin-top: -15px;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 1px 0 0 rgba(255, 214, 150, 0.1);
}

html.nr .nr-shield {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  border: 3px solid transparent;
  background:
    /* boss */
    /* блик на умбоне — отдельным слоем, сам умбон строго по центру щита
       (раньше центр градиента стоял на 42% 38%, и круг съезжал влево-вверх) */
    radial-gradient(circle closest-side at 45% 41%, rgba(92, 76, 58, 0.6), rgba(58, 48, 39, 0) 34%) padding-box,
    radial-gradient(circle closest-side, #2e251d 0 30%, #1a130d 57.7%, rgba(10, 6, 3, 0.92) 61%, rgba(10, 6, 3, 0) 64.5%) padding-box,
    /* planks */
    repeating-linear-gradient(90deg, #6b4a2b 0 6px, #3b2615 6px 7px, #5a3c22 7px 13px, #2f1e11 13px 14px) padding-box,
    /* iron rim */
    conic-gradient(from 200deg, #b1b6bb, #3a3e42 22%, #8e9398 45%, #2a2d30 70%, #b1b6bb) border-box;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.6),
    inset 0 -6px 10px rgba(0, 0, 0, 0.45),
    0 4px 10px rgba(0, 0, 0, 0.55);
  transition: transform 520ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 300ms ease, filter 300ms ease;
}

/* studs on the rim */
html.nr .nr-shield::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 22deg, #f0d08a 0 5deg, transparent 5deg 45deg);
  -webkit-mask: radial-gradient(circle, transparent calc(50% - 3px), #000 calc(50% - 3px) calc(50% - 0.5px), transparent calc(50% - 0.5px));
  mask: radial-gradient(circle, transparent calc(50% - 3px), #000 calc(50% - 3px) calc(50% - 0.5px), transparent calc(50% - 0.5px));
  opacity: 0.75;
  pointer-events: none;
}

html.nr .nr-shield svg {
  position: relative;
  width: 22px;
  height: 22px;
  color: #dccba6;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.85));
}

html.nr .nr-tab__label {
  position: relative;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

html.nr .nr-tab:hover { color: var(--nr-parch); }
html.nr .nr-tab:hover .nr-shield { transform: rotate(-14deg) scale(1.06); }
html.nr .nr-tab:active .nr-shield { transform: scale(0.94); }
html.nr .nr-tab:focus-visible { outline: none; }
html.nr .nr-tab:focus-visible .nr-shield { box-shadow: 0 0 0 3px rgba(240, 205, 132, 0.8), 0 4px 10px rgba(0, 0, 0, 0.55); }

/* current section: painted shield, lit label, hot metal on the band */
html.nr .nr-tab[aria-current="page"] { color: var(--nr-gold); }

html.nr .nr-tab[aria-current="page"] .nr-tab__label {
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.65), 0 0 16px rgba(255, 170, 70, 0.45);
}

html.nr .nr-tab[aria-current="page"] .nr-shield {
  --s: 52px;
  border-width: 3px;
  background:
    radial-gradient(circle closest-side at 45% 41%, rgba(98, 68, 38, 0.6), rgba(61, 42, 23, 0) 34%) padding-box,
    radial-gradient(circle closest-side, #301f10 0 30%, #170e07 57.7%, #f0cd84 60.3%, #8f6a31 63.7%, rgba(0, 0, 0, 0) 66.2%) padding-box,
    conic-gradient(from 45deg, #9a2e22 0 25%, #e8d8b5 0 50%, #9a2e22 0 75%, #e8d8b5 0) padding-box,
    conic-gradient(from 200deg, #fbe2a4, #8f6a31 22%, #f0cd84 45%, #6d4f22 70%, #fbe2a4) border-box;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.55),
    inset 0 -8px 12px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 22px 2px var(--nr-ember-soft),
    0 6px 14px rgba(0, 0, 0, 0.6);
  animation: nrEmber 2.8s ease-in-out infinite;
}

html.nr .nr-tab[aria-current="page"] .nr-shield svg {
  width: 24px;
  height: 24px;
  color: #ffd98f;
  filter: drop-shadow(0 0 5px rgba(255, 160, 50, 0.95)) drop-shadow(0 1px 0 rgba(0, 0, 0, 0.8));
}

@keyframes nrEmber {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55), inset 0 -8px 12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 16px 1px var(--nr-ember-soft), 0 6px 14px rgba(0, 0, 0, 0.6); }
  50% { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55), inset 0 -8px 12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.5), 0 0 28px 5px var(--nr-ember-soft), 0 6px 14px rgba(0, 0, 0, 0.6); }
}

/* hot metal on the iron band under the current tab */
html.nr .nr-tab[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: -4px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 140, 40, 0) 0%, rgba(255, 170, 70, 0.85) 25%, #ffe0a0 50%, rgba(255, 170, 70, 0.85) 75%, rgba(255, 140, 40, 0) 100%);
  box-shadow: 0 0 14px rgba(255, 150, 50, 0.8), 0 0 30px rgba(255, 120, 30, 0.4);
  mix-blend-mode: screen;
  animation: nrHot 2.8s ease-in-out infinite;
}

@keyframes nrHot {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

/* sparks rising off the lit shield (and off any hovered one) */
html.nr .nr-sparks {
  position: absolute;
  left: calc(12px + var(--s) / 2);
  top: 6px;
  width: 0;
  height: 0;
  pointer-events: none;
}

html.nr .nr-sparks i {
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffd27a;
  box-shadow: 0 0 6px 1px rgba(255, 160, 50, 0.9);
  opacity: 0;
}

html.nr .nr-tab[aria-current="page"] .nr-sparks i,
html.nr .nr-tab:hover .nr-sparks i { animation: nrSpark 2.4s ease-out infinite; }
html.nr .nr-sparks i:nth-child(2) { animation-delay: 0.8s !important; left: -9px; }
html.nr .nr-sparks i:nth-child(3) { animation-delay: 1.6s !important; left: 8px; }

@keyframes nrSpark {
  0% { opacity: 0; transform: translate(0, 18px) scale(1); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(6px, -14px) scale(0.3); }
}

/* ---------- action buttons on the beam ---------- */

html.nr .nr-bar .tbtn {
  position: relative;
  min-width: 44px;
  min-height: 44px;
  height: 44px;
  padding: 0 15px 0 12px;
  gap: 9px;
  border-radius: 7px;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--nr-parch);
  border: 1px solid rgba(214, 170, 96, 0.42);
  background:
    radial-gradient(circle at 6px 6px, #e7c47c 0 1.3px, rgba(0, 0, 0, 0.6) 1.9px, transparent 2.4px),
    radial-gradient(circle at calc(100% - 6px) 6px, #e7c47c 0 1.3px, rgba(0, 0, 0, 0.6) 1.9px, transparent 2.4px),
    radial-gradient(circle at 6px calc(100% - 6px), #e7c47c 0 1.3px, rgba(0, 0, 0, 0.6) 1.9px, transparent 2.4px),
    radial-gradient(circle at calc(100% - 6px) calc(100% - 6px), #e7c47c 0 1.3px, rgba(0, 0, 0, 0.6) 1.9px, transparent 2.4px),
    var(--nr-grain) 0 0 / 400px 100%,
    linear-gradient(180deg, #4b3420 0%, #2c1d11 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 160, 0.18),
    inset 0 -2px 0 rgba(0, 0, 0, 0.4),
    0 2px 0 rgba(0, 0, 0, 0.45),
    0 4px 10px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
  transition: color 180ms ease, border-color 180ms ease, box-shadow 220ms ease, transform 180ms ease;
}

html.nr .nr-bar .tbtn svg { width: 19px; height: 19px; }

html.nr .nr-bar .tbtn:hover:not(:disabled) {
  color: var(--nr-gold);
  border-color: rgba(240, 205, 132, 0.8);
  background:
    radial-gradient(circle at 6px 6px, #f7dc98 0 1.3px, rgba(0, 0, 0, 0.6) 1.9px, transparent 2.4px),
    radial-gradient(circle at calc(100% - 6px) 6px, #f7dc98 0 1.3px, rgba(0, 0, 0, 0.6) 1.9px, transparent 2.4px),
    radial-gradient(circle at 6px calc(100% - 6px), #f7dc98 0 1.3px, rgba(0, 0, 0, 0.6) 1.9px, transparent 2.4px),
    radial-gradient(circle at calc(100% - 6px) calc(100% - 6px), #f7dc98 0 1.3px, rgba(0, 0, 0, 0.6) 1.9px, transparent 2.4px),
    var(--nr-grain) 0 0 / 400px 100%,
    linear-gradient(180deg, #56391f 0%, #332011 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 160, 0.22),
    inset 0 0 16px rgba(255, 150, 50, 0.22),
    0 2px 0 rgba(0, 0, 0, 0.45),
    0 0 18px rgba(255, 150, 50, 0.18);
}

html.nr .nr-bar .tbtn:active:not(:disabled) { transform: translateY(1px); }

/* toggles that are on: the rune is lit */
html.nr .nr-bar .tbtn[aria-pressed="true"] {
  color: #ffe2a6;
  border-color: rgba(255, 196, 110, 0.9);
  background:
    radial-gradient(120% 140% at 50% 120%, rgba(255, 150, 50, 0.4) 0%, rgba(255, 150, 50, 0) 70%),
    var(--nr-grain) 0 0 / 400px 100%,
    linear-gradient(180deg, #5b3a1c 0%, #2e1c0e 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 160, 0.3),
    inset 0 0 14px rgba(255, 150, 50, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 150, 50, 0.3);
}

html.nr .nr-bar .tbtn:disabled { opacity: 0.6; }

/* counters: small brass coins */
html.nr .nr-bar .tbtn__badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  margin-left: 0;
  font-size: 11px;
  color: rgba(241, 229, 203, 0.7);
  background: radial-gradient(circle at 40% 30%, #4a4f54, #1f2225);
  border: 1px solid rgba(0, 0, 0, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
  text-shadow: none;
}

html.nr .nr-bar .tbtn__badge.is-live {
  color: #1b1208;
  background: radial-gradient(circle at 40% 30%, #fbe2a4, #c9a052 60%, #8f6a31);
  border-color: rgba(60, 40, 10, 0.8);
  box-shadow: 0 0 10px rgba(255, 190, 90, 0.45);
}

/* toast under the beam */
html.nr .k-toast {
  top: calc(var(--nr-bar-h) + var(--nr-top) + 16px);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 7px;
  background: linear-gradient(180deg, #3b2918, #22160c);
  border-color: rgba(236, 199, 124, 0.55);
}

/* =====================================================================
   PANELS — smoked oak with iron corners (all pages)
   ===================================================================== */

html.nr .glass-panel {
  background:
    var(--nr-corner-tl) left top / 22px 22px no-repeat,
    var(--nr-corner-tr) right top / 22px 22px no-repeat,
    var(--nr-corner-bl) left bottom / 22px 22px no-repeat,
    var(--nr-corner-br) right bottom / 22px 22px no-repeat,
    var(--nr-grain) 0 0 / 900px 260px,
    linear-gradient(180deg, rgba(44, 30, 18, 0.88) 0%, rgba(24, 16, 10, 0.9) 100%);
  border: 1px solid rgba(214, 170, 96, 0.3);
  border-radius: var(--radius-lg);
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.5),
    0 2px 0 rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 220, 160, 0.1),
    inset 0 0 0 3px rgba(0, 0, 0, 0.35),
    inset 0 0 0 4px rgba(214, 170, 96, 0.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  backdrop-filter: blur(10px) saturate(1.1);
}

html.nr .glass-panel--interactive:hover {
  border-color: rgba(236, 199, 124, 0.5);
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.5),
    0 2px 0 rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 220, 160, 0.12),
    inset 0 0 0 3px rgba(0, 0, 0, 0.35),
    inset 0 0 0 4px rgba(214, 170, 96, 0.16),
    0 0 36px rgba(255, 150, 50, 0.07);
}

html.nr .panel { padding: clamp(1rem, 2.2vw, 1.35rem); }

/* heading: gold rune-diamond, carved text, fading inlay */
html.nr .panel__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 0.85rem;
  padding: 0;
  border: 0;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--nr-gold);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
}

html.nr .panel__head::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #fbe2a4, #8f6a31);
  box-shadow: 0 0 8px rgba(255, 170, 60, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.5);
}

html.nr .panel__head::after {
  content: "";
  flex: 1 1 auto;
  min-width: 12px;
  height: 1px;
  background: linear-gradient(90deg, rgba(214, 170, 96, 0.5), rgba(214, 170, 96, 0));
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

/* buttons */
html.nr .btn-primary {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #24160a;
  border: 1px solid #5c3f16;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 45%),
    linear-gradient(180deg, #f5d894 0%, #d9ae5e 50%, #a57a34 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 210, 0.7),
    inset 0 -2px 0 rgba(90, 60, 20, 0.45),
    0 2px 0 #3a260d,
    0 8px 22px rgba(0, 0, 0, 0.45);
  text-shadow: 0 1px 0 rgba(255, 235, 190, 0.5);
}

html.nr .btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 210, 0.8),
    inset 0 -2px 0 rgba(90, 60, 20, 0.45),
    0 3px 0 #3a260d,
    0 0 26px rgba(255, 170, 60, 0.4),
    0 10px 26px rgba(0, 0, 0, 0.45);
}

html.nr .btn-ghost,
html.nr .btn-secondary {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 7px;
  color: var(--nr-parch);
  border: 1px solid rgba(214, 170, 96, 0.42);
  background: linear-gradient(180deg, #4b3420 0%, #2c1d11 100%);
}

/* switches: iron slot, brass rivet knob; on = ember */
html.nr .k-switch {
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.7);
  background: linear-gradient(180deg, #16110c, #2a2119);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 220, 160, 0.1);
}

html.nr .k-switch::after {
  border-radius: 4px;
  background: radial-gradient(circle at 50% 50%, #3d4146 0 25%, transparent 28%), linear-gradient(180deg, #a3a8ad, #4b4f54);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

html.nr .k-switch.is-on {
  border-color: rgba(120, 70, 20, 0.9);
  background: linear-gradient(180deg, #5b2f10, #a9581c);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 12px rgba(255, 140, 40, 0.35);
}

html.nr .k-switch.is-on::after {
  background: radial-gradient(circle at 50% 50%, #7a5620 0 25%, transparent 28%), linear-gradient(180deg, #fbe2a4, #c9a052);
  box-shadow: 0 0 8px rgba(255, 200, 110, 0.7);
}

/* chips: little oak tiles, the chosen one is gilded */
html.nr .k-chip {
  font-family: var(--font-body);
  font-weight: 700;
  border-radius: 5px;
  color: rgba(241, 229, 203, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.6);
  background: linear-gradient(180deg, #3a291a, #231710);
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.1), 0 1px 0 rgba(0, 0, 0, 0.4);
}

html.nr .k-chip.is-on {
  color: #24160a;
  border-color: #5c3f16;
  background: linear-gradient(180deg, #f5d894 0%, #c9a052 100%);
  box-shadow: inset 0 1px 0 rgba(255, 245, 210, 0.7), 0 0 12px rgba(255, 170, 60, 0.3);
}

html.nr .k-input {
  border-radius: 7px;
  background: rgba(10, 7, 4, 0.7);
  border-color: rgba(214, 170, 96, 0.3);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}


/* =====================================================================
   MAIN
   ===================================================================== */

html.nr .face--main .home-logo {
  margin-top: clamp(1.1rem, 2.6vw, 1.7rem);
  width: clamp(12rem, 26vw, 18rem);
}

html.nr .face--main .home-logo::after {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.34em;
  color: var(--nr-gold);
}

/* the hero loses its outer panel: stone + two framed boards stand on their own */
html.nr .face--main .hero {
  background: none;
  border: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  padding: 0;
}

/* join code — a runestone. Valheim runestones glow amber where carved. */
html.nr .face--main .hero__id {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  /* Отступы одинаковые с обеих сторон: руны справа — фон камня, под
     надписями, а не отдельная полоса, которая сдвигала всё влево. */
  padding: clamp(1.2rem, 2.8vw, 1.7rem) clamp(1.2rem, 3vw, 1.8rem) clamp(1.1rem, 2.6vw, 1.5rem);
  border: 1px solid rgba(0, 0, 0, 0.7);
  border-radius: 46px 58px 12px 14px / 34px 42px 12px 14px;
  background:
    var(--nr-grit) 0 0 / 220px 220px,
    var(--nr-mottle) 0 0 / 600px 400px,
    radial-gradient(130% 120% at 25% 0%, #6b716d 0%, #454b48 42%, #2b302e 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.12),
    inset 0 -6px 14px rgba(0, 0, 0, 0.55),
    inset 6px 0 14px -8px rgba(255, 255, 255, 0.12),
    0 18px 40px rgba(0, 0, 0, 0.55),
    0 3px 0 rgba(0, 0, 0, 0.45);
}

/* moss at the foot of the stone */
html.nr .face--main .hero__id::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -10%;
  right: -10%;
  bottom: -18px;
  height: 46px;
  background: radial-gradient(60% 60% at 30% 100%, rgba(70, 110, 50, 0.55), rgba(70, 110, 50, 0) 70%), radial-gradient(40% 50% at 85% 100%, rgba(60, 100, 45, 0.45), rgba(60, 100, 45, 0) 70%);
  pointer-events: none;
}

html.nr .face--main .hero__id .tile__kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.24em;
  color: rgba(245, 236, 216, 0.82);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.12);
}

html.nr .face--main .hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  letter-spacing: 0.08em;
  color: #eee6d4;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.14);
}

html.nr .face--main .code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 3.4rem);
  letter-spacing: 0.14em;
  color: #ffc766;
  text-shadow:
    0 -1px 0 rgba(0, 0, 0, 0.75),
    0 0 10px rgba(255, 150, 40, 0.75),
    0 0 26px rgba(255, 120, 30, 0.45);
  animation: nrRuneGlow 3.6s ease-in-out infinite;
}

html.nr .face--main .code.muted { animation: none; color: rgba(241, 229, 203, 0.55); text-shadow: none; font-size: 1.1rem; }

@keyframes nrRuneGlow {
  0%, 100% { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.75), 0 0 8px rgba(255, 150, 40, 0.6), 0 0 20px rgba(255, 120, 30, 0.3); }
  50% { text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.75), 0 0 12px rgba(255, 160, 50, 0.9), 0 0 34px rgba(255, 120, 30, 0.55); }
}

/* rune band carved down the right edge of the stone, a glint travels along it */
html.nr .face--main .nr-stone-runes {
  position: absolute;
  /* Под содержимым камня, но над самим камнем (у .hero__id isolation). */
  z-index: -1;
  top: 18px;
  bottom: 18px;
  right: clamp(0.6rem, 1.4vw, 0.9rem);
  writing-mode: vertical-rl;
  font-family: var(--nr-rune);
  font-size: 15px;
  letter-spacing: 0.32em;
  overflow: hidden;
  white-space: nowrap;
  color: transparent;
  /* Резьба, а не полоса: знаки чуть темнее камня, к концам растворяются —
     иначе тёмная колонка у края читалась как шов. */
  background: linear-gradient(180deg, rgba(20, 22, 21, 0.42) 0%, rgba(20, 22, 21, 0.42) 40%, #ffc766 50%, rgba(20, 22, 21, 0.42) 60%, rgba(20, 22, 21, 0.42) 100%) 0 0 / 100% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-mask: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
  animation: nrGlint 6s linear infinite;
  pointer-events: none;
}

@keyframes nrGlint {
  from { background-position: 0 100%; }
  to { background-position: 0 -50%; }
}

html.nr .face--main .hero__copy {
  position: relative;
  z-index: 1;
  min-height: 3rem;
  font-size: 16px;
}

/* the two section boards */
html.nr .face--main .tile {
  border: 1px solid rgba(214, 170, 96, 0.45);
  border-radius: 9px;
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.5),
    0 2px 0 rgba(0, 0, 0, 0.5),
    inset 0 0 0 3px rgba(0, 0, 0, 0.45),
    inset 0 0 0 4px rgba(214, 170, 96, 0.14);
}

html.nr .face--main .tile::before {
  background:
    var(--nr-corner-tl) left top / 22px 22px no-repeat,
    var(--nr-corner-tr) right top / 22px 22px no-repeat,
    var(--nr-corner-bl) left bottom / 22px 22px no-repeat,
    var(--nr-corner-br) right bottom / 22px 22px no-repeat,
    linear-gradient(12deg, rgba(20, 12, 6, 0.94) 10%, rgba(20, 12, 6, 0.55) 55%, rgba(20, 12, 6, 0.15) 100%);
}

html.nr .face--main .tile--opts::before {
  background:
    var(--nr-corner-tl) left top / 22px 22px no-repeat,
    var(--nr-corner-tr) right top / 22px 22px no-repeat,
    var(--nr-corner-bl) left bottom / 22px 22px no-repeat,
    var(--nr-corner-br) right bottom / 22px 22px no-repeat,
    radial-gradient(90% 120% at 85% 10%, rgba(255, 150, 50, 0.16) 0%, rgba(255, 150, 50, 0) 60%),
    var(--nr-grain) 0 0 / 900px 260px,
    linear-gradient(180deg, #33231a 0%, #1b120b 100%);
}

html.nr .face--main .tile--opts::after { background: none; }

html.nr .face--main .tile:hover {
  border-color: rgba(240, 205, 132, 0.85);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.55),
    0 2px 0 rgba(0, 0, 0, 0.5),
    inset 0 0 0 3px rgba(0, 0, 0, 0.45),
    inset 0 0 0 4px rgba(240, 205, 132, 0.3),
    0 0 30px rgba(255, 150, 50, 0.16);
}

html.nr .face--main .tile__kicker {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--nr-gold-2);
}

html.nr .face--main .tile__title {
  font-weight: 700;
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  letter-spacing: 0.06em;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6), 0 2px 18px rgba(0, 0, 0, 0.6);
}

html.nr .face--main .tile__text {
  font-size: 0.95rem;
  color: rgba(241, 229, 203, 0.78);
}

/* the arrow becomes a small shield */
html.nr .face--main .tile__go {
  width: 2.4rem;
  height: 2.4rem;
  border: 2px solid transparent;
  color: #ffd98f;
  background:
    radial-gradient(circle, #20150c 0 55%, rgba(0, 0, 0, 0) 57%) padding-box,
    repeating-linear-gradient(90deg, #6b4a2b 0 5px, #3b2615 5px 6px) padding-box,
    conic-gradient(from 200deg, #fbe2a4, #8f6a31 25%, #f0cd84 50%, #6d4f22 75%, #fbe2a4) border-box;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

html.nr .face--main .tile:hover .tile__go {
  transform: translateX(4px) rotate(-12deg);
  background:
    radial-gradient(circle, #20150c 0 55%, rgba(0, 0, 0, 0) 57%) padding-box,
    repeating-linear-gradient(90deg, #6b4a2b 0 5px, #3b2615 5px 6px) padding-box,
    conic-gradient(from 200deg, #fbe2a4, #8f6a31 25%, #f0cd84 50%, #6d4f22 75%, #fbe2a4) border-box;
  box-shadow: 0 0 16px rgba(255, 160, 60, 0.55);
}

/* the section's pictogram burnt into its board — same one as its shield */
html.nr .face--main .nr-tile-mark {
  position: absolute;
  z-index: -1;
  right: 4%;
  top: 50%;
  width: clamp(6rem, 11vw, 9rem);
  height: clamp(6rem, 11vw, 9rem);
  transform: translateY(-62%) rotate(-8deg);
  color: rgba(255, 190, 100, 0.1);
  filter: drop-shadow(0 0 18px rgba(255, 140, 40, 0.18));
  pointer-events: none;
  transition: color 400ms ease, filter 400ms ease, transform 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

html.nr .face--main .nr-tile-mark svg { width: 100%; height: 100%; display: block; }

html.nr .face--main .tile:hover .nr-tile-mark {
  color: rgba(255, 196, 110, 0.24);
  filter: drop-shadow(0 0 24px rgba(255, 140, 40, 0.55));
  transform: translateY(-62%) rotate(0deg) scale(1.05);
}

html.nr .face--main .tile--map .nr-tile-mark { color: rgba(255, 210, 140, 0.07); filter: none; }

/* dashboard lists */
html.nr .face--main .list li.is-online .player-row__name { color: #7fedb2; }

/* =====================================================================
   OPTIONS
   ===================================================================== */

html.nr .face--options .nr-pagehead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: clamp(0.4rem, 1.6vw, 1rem) 0 clamp(0.2rem, 1vw, 0.5rem);
  text-align: center;
}

/* the section's shield, hung above its title: same pictogram as in the beam */
html.nr .face--options .nr-pagehead__mark { display: flex; align-items: center; gap: 14px; }

html.nr .face--options .nr-pagehead__mark .nr-shield {
  --s: 44px;
  background:
    radial-gradient(circle closest-side at 45% 41%, rgba(98, 68, 38, 0.6), rgba(61, 42, 23, 0) 34%) padding-box,
    radial-gradient(circle closest-side, #301f10 0 30%, #170e07 57.7%, #f0cd84 60.3%, #8f6a31 63.7%, rgba(0, 0, 0, 0) 66.2%) padding-box,
    conic-gradient(from 45deg, #9a2e22 0 25%, #e8d8b5 0 50%, #9a2e22 0 75%, #e8d8b5 0) padding-box,
    conic-gradient(from 200deg, #fbe2a4, #8f6a31 22%, #f0cd84 45%, #6d4f22 70%, #fbe2a4) border-box;
  box-shadow: 0 0 20px 2px var(--nr-ember-soft), 0 6px 14px rgba(0, 0, 0, 0.6);
}

html.nr .face--options .nr-pagehead__mark .nr-shield svg {
  color: #ffd98f;
  filter: drop-shadow(0 0 5px rgba(255, 160, 50, 0.95)) drop-shadow(0 1px 0 rgba(0, 0, 0, 0.8));
}

html.nr .face--options .nr-pagehead__title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.45rem, 4vw, 2.6rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nr-parch);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.55), 0 0 30px rgba(0, 0, 0, 0.6);
}

html.nr .face--options .nr-pagehead__title::before,
html.nr .face--options .nr-pagehead__title::after {
  content: "";
  width: clamp(28px, 7vw, 90px);
  height: 2px;
  background: linear-gradient(90deg, rgba(236, 199, 124, 0), rgba(236, 199, 124, 0.8));
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

html.nr .face--options .nr-pagehead__title::after { transform: scaleX(-1); }

html.nr .face--options .nr-pagehead__sub {
  margin: 0;
  text-wrap: balance;
  font-size: 1.02rem;
  font-weight: 500;
  color: rgba(245, 236, 216, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95), 0 0 14px rgba(0, 0, 0, 0.85), 0 0 28px rgba(0, 0, 0, 0.5);
}

html.nr .face--options .ointro p { color: rgba(241, 229, 203, 0.78); }
html.nr .face--options .wopt { border-bottom: 1px dashed rgba(214, 170, 96, 0.14); }
html.nr .face--options .wopt__label { color: var(--nr-parch); font-size: 0.95rem; }
html.nr .face--options .wopt__hint { color: rgba(241, 229, 203, 0.46); font-size: 0.8rem; }
html.nr .face--options .k-dialog {
  border-radius: 10px;
  background: var(--nr-grain) 0 0 / 900px 260px, linear-gradient(180deg, #33231a, #1b120b);
}

/* =====================================================================
   MAP
   ===================================================================== */

html.nr--map .layers-fab { display: none !important; }

/* panels hang from the beam */
html.nr--map .sheet,
html.nr--map .dockcol {
  top: calc(var(--nr-bar-h) + var(--nr-top) + 18px);
}

html.nr--map .sheet {
  left: var(--nr-edge);
  bottom: auto;
  max-height: calc(100vh - var(--nr-bar-h) - var(--nr-top) - 36px);
  width: min(360px, calc(100vw - 2 * var(--nr-edge)));
  transform-origin: 50% 0;
  transform: perspective(1100px) rotateX(-78deg);
  opacity: 0;
  transition: transform 620ms cubic-bezier(0.34, 1.45, 0.64, 1), opacity 240ms ease;
}

html.nr--map .sheet.is-open { transform: none; opacity: 1; }

/* Закрытая панель только сложена и прозрачна — без этого она невидимо
   ловила клики, колесо и Tab в левом верхнем углу карты. */
html.nr--map .sheet:not(.is-open) {
  pointer-events: none;
  visibility: hidden;
  transition: transform 620ms cubic-bezier(0.34, 1.45, 0.64, 1), opacity 240ms ease, visibility 0s linear 620ms;
}

html.nr--map .dockcol {
  right: var(--nr-edge);
  width: min(340px, calc(100vw - 2 * var(--nr-edge)));
  gap: 22px;
  /* Колонка кончается над кнопками масштаба (18 + 3×48 + 2×10 + зазор). */
  bottom: calc(var(--nr-bottom) + 18px + 3 * 48px + 2 * 10px + 12px);
}

/* Игроки и чат вместе: место делится поровну, а короткая панель отдаёт
   лишнее соседке (длинный чат не сплющивает игроков, короткий не режет их). */
html.nr--map .dockcol:has(.dock--players.is-open):has(.dock--chat.is-open) {
  display: grid;
  grid-template-rows: minmax(0, max-content) minmax(0, max-content);
  align-content: start;
}

html.nr--map .dock {
  transform-origin: 50% 0;
  transform: perspective(1100px) rotateX(-78deg);
  transition: opacity 240ms ease, transform 620ms cubic-bezier(0.34, 1.45, 0.64, 1), display 620ms allow-discrete;
}

html.nr--map .dock.is-open { transform: none; opacity: 1; }

@starting-style {
  html.nr--map .dock.is-open { opacity: 0; transform: perspective(1100px) rotateX(-78deg); }
}

/* chains from the beam to the panel */
html.nr--map .sheet::after,
html.nr--map .dock::after {
  content: "";
  position: absolute;
  top: -22px;
  left: 26px;
  right: 26px;
  height: 22px;
  background:
    var(--nr-chain) left top / 12px 12px repeat-y,
    var(--nr-chain) right top / 12px 12px repeat-y;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.6));
  pointer-events: none;
}

/* notch pointing at the button that opened the panel */
html.nr--map .sheet::before,
html.nr--map .dock::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -8px;
  left: var(--nr-notch, 50%);
  width: 14px;
  height: 14px;
  margin-left: -7px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #fbe2a4, #b8893e);
  border: 1px solid #5c3f16;
  box-shadow: 0 0 12px rgba(255, 170, 60, 0.55);
}

/* only the top panel of the right column hangs from the beam */
html.nr--map .dock.is-open ~ .dock.is-open::before { display: none; }

html.nr--map .sheet__head,
html.nr--map .dock__head { padding: 14px 10px 6px 18px; }

html.nr--map .sheet__title,
html.nr--map .dock__title { flex: 1 1 auto; margin: 0; }

html.nr--map .layer__toggle {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--nr-parch);
}

html.nr--map .cat__glyph {
  border-radius: 6px;
  background: linear-gradient(180deg, #3a291a, #1f150d);
  border-color: rgba(0, 0, 0, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.1);
}

html.nr--map .k-check {
  border-radius: 4px;
  background: linear-gradient(180deg, #16110c, #2a2119);
  border-color: rgba(0, 0, 0, 0.7);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7);
}

html.nr--map .k-check:checked {
  background: linear-gradient(180deg, #f5d894, #b8893e);
  border-color: #5c3f16;
}

html.nr--map .k-check::after { border-color: #2a1a08; }

/* zoom: three small round shields */
html.nr--map .zoombar {
  right: var(--nr-edge);
  bottom: calc(var(--nr-bottom) + 18px);
  gap: 10px;
}

html.nr--map .zoombar .btn-icon {
  width: 48px;
  height: 48px;
  color: var(--nr-parch);
  border: 3px solid transparent;
  background:
    radial-gradient(circle, rgba(20, 13, 7, 0.95) 0 50%, rgba(0, 0, 0, 0) 52%) padding-box,
    repeating-linear-gradient(90deg, #6b4a2b 0 6px, #3b2615 6px 7px, #5a3c22 7px 13px, #2f1e11 13px 14px) padding-box,
    conic-gradient(from 200deg, #b1b6bb, #3a3e42 22%, #8e9398 45%, #2a2d30 70%, #b1b6bb) border-box;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html.nr--map .zoombar .btn-icon:hover:not(:disabled) {
  color: #ffd98f;
  transform: rotate(-12deg);
  box-shadow: 0 0 18px rgba(255, 160, 60, 0.5), 0 6px 16px rgba(0, 0, 0, 0.6);
}

html.nr--map .coords {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: rgba(241, 229, 203, 0.7);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(50, 34, 20, 0.85), rgba(26, 17, 10, 0.85));
  border-color: rgba(214, 170, 96, 0.3);
}

html.nr--map .mapBorder__ring { stroke: rgba(236, 199, 124, 0.7); }

html.nr--map .player.selected {
  background: rgba(255, 150, 50, 0.12);
  border-color: rgba(236, 199, 124, 0.55);
}

html.nr--map .player__name { font-family: var(--font-display); letter-spacing: 0.04em; font-weight: 700; font-size: 1.05rem; }

/* =====================================================================
   MID WIDTHS — the beam compacts before it ever overlaps
   ===================================================================== */

/* Правила были написаны под отдельную страницу карты (html.nr--map); на
   общей странице они не срабатывали, и на 721–1100 px «Игроки» налезали на
   щит «Настройки». */
/* Полоса суток заняла место слева: на грани карты за ней ещё «Слои». Сначала
   «Слои» теряют подпись, потом герб — имя и статус (статус остаётся цветом
   ободка медали), потом щиты складывают подписи под себя. */
@media (max-width: 1493px) {
  html.nr .nr-bar__side--left .tbtn:not(.tbtn--labeled) .tbtn__label { display: none; }
  html.nr .nr-bar__side--left .tbtn:not(.tbtn--labeled) { padding: 0 10px; }
}

@media (min-width: 721px) and (max-width: 1373px) {
  html.nr .nr-crest__name,
  html.nr .nr-crest__status { display: none; }
  html.nr .nr-crest__text { grid-template-columns: auto; grid-template-areas: "day"; }
}

@media (max-width: 1240px) {
  html.nr .nr-crest__runes { display: none; }
  html.nr .nr-bar .tbtn:not(.tbtn--labeled) .tbtn__label { display: none; }
  html.nr .nr-bar .tbtn:not(.tbtn--labeled) { padding: 0 10px; }
}

@media (max-width: 1180px) {
  html.nr .nr-tab { padding: 0 12px 0 8px; gap: 9px; }
}

/* Щиты с подписью под собой — как на телефонной рейке, только в балке:
   так средняя колонка занимает ~250 px вместо ~500. */
@media (min-width: 721px) and (max-width: 1180px) {
  html.nr .nr-nav { gap: 2px; }
  html.nr .nr-tab {
    --s: 38px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 0 12px;
    font-size: 10.5px;
    letter-spacing: 0.1em;
  }
  html.nr .nr-tab[aria-current="page"] .nr-shield { --s: 42px; }
  html.nr .nr-tab__label { line-height: 1; }
  html.nr .nr-tab + .nr-tab::before { height: 34px; margin-top: -17px; }
  html.nr .nr-sparks { left: 50%; top: 2px; }
}

/* Планшет, полэкрана: все кнопки балки — значки 44 px со счётчиком в углу.
   От 721 px — ниже своя раскладка телефона. */
@media (min-width: 721px) and (max-width: 920px) {
  html.nr .nr-day { margin-left: 0; padding-left: 0; }
  html.nr .nr-day::before { display: none; }
  html.nr .nr-day__track { width: 88px; }
  html.nr .nr-day__time { font-size: 17px; }
  html.nr .nr-medal { width: 40px; height: 40px; }
  html.nr .nr-bar .tbtn { width: 44px; padding: 0; }
  html.nr .nr-bar .tbtn--labeled .tbtn__label { display: none; }
  html.nr .nr-bar .tbtn__badge { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; font-size: 10px; }
  html.nr .nr-bar .tbtn__badge:not(.is-live) { display: none; }
}

/* =====================================================================
   PHONE — shields move to a bottom rail (same element)
   ===================================================================== */

@media (max-width: 720px) {
  html.nr {
    --nr-bar-h: 58px;
    --nr-edge: 10px;
  }

  html.nr .nr-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  /* Под именем — одна строка: сутки, пока сервер отвечает, иначе статус
     («Связь», «Оффлайн»). «Онлайн» и так видно по зелёному ободку медали. */
  html.nr .nr-crest__text { grid-template-columns: auto; grid-template-areas: "name" "line"; row-gap: 6px; }
  html.nr .nr-crest__status { grid-area: line; }
  html.nr .nr-day {
    grid-area: line;
    grid-auto-flow: column;
    align-items: center;
    column-gap: 7px;
    margin: 0;
    padding: 0;
  }
  html.nr .nr-day::before { display: none; }
  /* палец крупнее строки */
  html.nr .nr-day::after { content: ""; position: absolute; inset: -9px -6px; }
  html.nr .nr-day__time { font-size: 16px; }
  html.nr .nr-day__rail { gap: 2px; }
  html.nr .nr-day__rail::before,
  html.nr .nr-day__rail::after { width: 6px; height: 6px; }
  html.nr .nr-day__track { width: 70px; height: 7px; }
  html.nr .nr-day__scale { left: 3px; right: 3px; }
  html.nr .nr-day__now { top: -3px; bottom: -3px; width: 2.5px; margin-left: -1.25px; }
  html.nr .nr-crest__text:not(:has(.kicker--online)) .nr-day,
  html.nr .nr-day[data-state="none"] { display: none; }
  html.nr .nr-crest__text:has(.kicker--online):has(.nr-day:not([data-state="none"])) .nr-crest__status { display: none; }
  html.nr .nr-crest__runes { display: none; }
  html.nr .nr-medal { width: 40px; height: 40px; }
  html.nr .nr-crest { gap: 10px; }
  html.nr .nr-crest__name { font-size: 19px; }
  html.nr .nr-crest__status .kicker { font-size: 10px; letter-spacing: 0.18em; }

  html.nr .nr-bar .tbtn { height: 44px; min-height: 44px; padding: 0 12px; }
  html.nr .nr-bar .tbtn--labeled .tbtn__label { display: inline; }
  html.nr .nr-bar .tbtn:not(.tbtn--labeled) { width: 44px; padding: 0; }
  html.nr .nr-bar .tbtn:not(.tbtn--labeled) .tbtn__label { display: none; }
  html.nr .nr-bar .tbtn__badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    font-size: 10px;
  }
  html.nr .nr-bar .tbtn__badge:not(.is-live) { display: none; }
  html.nr .nr-divider { display: none; }
  html.nr .nr-bar__side--left { gap: 6px; }

  /* the rail */
  html.nr .nr-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 44;
    height: calc(var(--nr-rail-h) + var(--nr-bottom));
    padding: 0 6px var(--nr-bottom);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    align-items: stretch;
  }

  html.nr .nr-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
      radial-gradient(60% 160% at 50% -40%, rgba(255, 150, 60, 0.1) 0%, rgba(255, 150, 60, 0) 60%),
      var(--nr-grain-hi) 0 0 / 700px 100%,
      var(--nr-grain) 0 0 / 900px 100%,
      linear-gradient(180deg, #34241a 0%, #22170e 55%, #150d07 100%);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.6), 0 -10px 26px rgba(0, 0, 0, 0.5);
  }

  /* iron band on top of the rail */
  html.nr .nr-nav::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -4px;
    height: 8px;
    background:
      radial-gradient(circle at 50% 50%, #fbe2a4 0 0.9px, #c9a052 1.3px, #6a4c1e 2.2px, rgba(0, 0, 0, 0.55) 2.9px, transparent 3.4px) 12px 0 / 40px 8px repeat-x,
      linear-gradient(180deg, #8b9095 0%, #4b4f54 38%, #25282b 80%, #111315 100%);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.4);
    pointer-events: none;
  }

  html.nr .nr-tab {
    --s: 40px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    height: auto;
    padding: 6px 0 0;
    font-size: 12px;
    letter-spacing: 0.12em;
  }

  html.nr .nr-tab + .nr-tab::before { top: 22px; margin-top: 0; height: 30px; left: -1px; }

  /* Железная полоса с заклёпками — позади щитов: текущий щит поднимается
     перед ней, а не прячется за неё (раньше полоса резала его пополам). */
  html.nr .nr-nav::after { z-index: 0; }
  html.nr .nr-tab { z-index: 1; }
  html.nr .nr-tab .nr-shield { z-index: 2; }

  html.nr .nr-tab[aria-current="page"] .nr-shield {
    --s: 48px;
    transform: translateY(-20px);
    /* 8px taller than its siblings: pull the label back into line */
    margin-bottom: -8px;
    margin-top: 0;
    filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.55));
  }

  html.nr .nr-tab:hover .nr-shield { transform: none; }
  html.nr .nr-tab[aria-current="page"]:hover .nr-shield { transform: translateY(-20px); }

  /* Раскалённый металл — на полосе, под поднятым щитом. */
  html.nr .nr-tab[aria-current="page"]::after {
    z-index: 1;
    top: -4px;
    bottom: auto;
    left: 18%;
    right: 18%;
  }

  html.nr .nr-sparks { left: 50%; top: -10px; z-index: 3; }
  html.nr .nr-tab:hover:not([aria-current]) .nr-sparks i { animation: none; }

  html.nr .k-toast { top: calc(var(--nr-bar-h) + var(--nr-top) + 12px); }


  html.nr .face--main .home-logo { width: clamp(11rem, 58vw, 15rem); margin-top: 1rem; }

  html.nr .face--options .nr-pagehead__title { gap: 10px; letter-spacing: 0.1em; }
  html.nr .face--options .nr-pagehead__title::before,
  html.nr .face--options .nr-pagehead__title::after { width: 18px; }
  html.nr .face--options .nr-pagehead__sub { font-size: 0.95rem; max-width: 20rem; }
  html.nr .face--main .hero__id { border-radius: 36px 44px 10px 12px / 28px 34px 10px 12px; }
  html.nr .face--main .nr-tile-mark { width: 5.5rem; height: 5.5rem; }

  /* map: every panel drops from the beam, under its own button */
  html.nr--map .sheet {
    top: calc(var(--nr-bar-h) + var(--nr-top) + 16px);
    left: var(--nr-edge);
    right: var(--nr-edge);
    bottom: auto;
    width: auto;
    height: auto;
    max-height: calc(100vh - var(--nr-bar-h) - var(--nr-top) - var(--nr-rail-h) - var(--nr-bottom) - 36px);
    border-radius: var(--radius-lg);
    border-bottom: 1px solid rgba(214, 170, 96, 0.3);
    padding-bottom: 0;
    transform: perspective(900px) rotateX(-80deg);
  }

  html.nr--map .sheet.is-open { transform: none; }
  html.nr--map .sheet__grip { display: none; }

  html.nr--map .dockcol {
    top: calc(var(--nr-bar-h) + var(--nr-top) + 16px);
    left: var(--nr-edge);
    right: var(--nr-edge);
    bottom: calc(var(--nr-rail-h) + var(--nr-bottom) + 16px);
    width: auto;
  }

  html.nr--map .dock { transform: perspective(900px) rotateX(-80deg); }
  @starting-style {
    html.nr--map .dock.is-open { opacity: 0; transform: perspective(900px) rotateX(-80deg); }
  }

  html.nr--map .zoombar {
    bottom: calc(var(--nr-rail-h) + var(--nr-bottom) + 16px);
    gap: 8px;
  }

  html.nr--map .zoombar .btn-icon { width: 46px; height: 46px; }

  html.nr--map .zoombar { transition: opacity 200ms ease, transform 300ms ease; }
  html.nr--map:has(.scrim.is-on) .zoombar { opacity: 0; transform: translateX(12px); pointer-events: none; }

  html.nr--map .stage > .poiCard {
    bottom: calc(var(--nr-rail-h) + var(--nr-bottom) + 16px);
  }
}

/* Узкий телефон: «Обновить» — значком, полоса короче. */
@media (max-width: 374px) {
  html.nr .nr-bar .tbtn--labeled { width: 44px; padding: 0; }
  html.nr .nr-bar .tbtn--labeled .tbtn__label { display: none; }
  html.nr .nr-day { column-gap: 6px; }
  html.nr .nr-day__time { font-size: 15px; }
  html.nr .nr-day__track { width: 58px; }
}

@media (max-width: 340px) {
  html.nr .nr-day__time { font-size: 13px; letter-spacing: 0.04em; }
  html.nr .nr-day__track { width: 40px; }
}

@media (max-width: 360px) {
  html.nr .nr-crest__status .kicker { letter-spacing: 0.1em; }
  html.nr .nr-tab { font-size: 11px; letter-spacing: 0.06em; }
}

@media (prefers-reduced-motion: reduce) {
  html.nr .nr-medal,
  html.nr .nr-tab[aria-current="page"] .nr-shield,
  html.nr .nr-tab[aria-current="page"]::after,
  html.nr .nr-sparks i,
  html.nr .face--main .code,
  html.nr .face--main .nr-stone-runes { animation: none !important; }
  html.nr--map .sheet,
  html.nr--map .dock { transition: opacity 200ms ease; }
  html.nr--map .sheet:not(.is-open) { transition: opacity 200ms ease, visibility 0s linear 200ms; }
}

/* =====================================================================
   MAP inside the cube (/v/map/?embed=1): the beam and the rail belong to
   the parent page, so inside the frame they take no room. Panels hang from
   the frame's top edge — right under their buttons on the beam above.
   ===================================================================== */

html.nr.embed {
  --nr-bar-h: 0px;
  --nr-top: 0px;
  --nr-rail-h: 0px;
  --nr-bottom: 0px;
}

html.nr.embed .topbar,
html.nr.embed .layers-fab { display: none !important; }

html.nr.embed .sheet,
html.nr.embed .dockcol { top: 22px; }

html.nr.embed .k-toast { top: 16px; }

@media (max-width: 720px) {
  html.nr.embed .sheet,
  html.nr.embed .dockcol { top: 20px; }
  html.nr.embed .dockcol { bottom: 16px; }
  html.nr.embed .zoombar { bottom: 16px; }
  html.nr.embed .stage > .poiCard { bottom: 16px; }
}

/* Низкий экран (телефон боком): колонка игроков и чата — до низа, масштаб
   прячется, пока открыта панель. */
@media (min-width: 721px) and (max-height: 500px) {
  html.nr--map .dockcol { bottom: calc(var(--nr-bottom) + 16px); }
  html.nr--map .zoombar { transition: opacity 200ms ease; }
  html.nr--map:has(.dock.is-open) .zoombar { opacity: 0; pointer-events: none; }
}

/* Заголовок настроек читается и на фоне светлого облака. */
html.nr .face--options .nr-pagehead__title,
html.nr .face--options .nr-pagehead__sub {
  text-shadow: 0 1px 0 #3a2410, 0 2px 3px rgba(0, 0, 0, 0.8), 0 0 18px rgba(4, 19, 24, 0.75), 0 0 36px rgba(4, 19, 24, 0.5);
}

/* Узкий телефон: «Настройки мира» на плитке не обрезается. */
/* Узкий телефон: «Настройки» не помещаются рядом со щитом-стрелкой. При
   стрелке по умолчанию (справа снизу) щит уходит в правый верхний угол:
   текст прижат к низу, верх свободен, и заголовок получает всю ширину.
   Выбранный в раскладке угол (data-arrow / data-valign) не трогаем. */
@media (max-width: 400px) {
  html.nr .face--main .hero__grid .tile__title { font-size: clamp(1rem, 4.6vw, 1.3rem); letter-spacing: 0.03em; }
  html.nr .face--main .hero__grid .tile:not([data-arrow]):not([data-valign]) > .tile__go {
    position: absolute;
    margin: 0;
    top: clamp(0.9rem, 2.2vw, 1.25rem);
    right: clamp(0.9rem, 2.2vw, 1.25rem);
  }
  html.nr .face--main .hero__grid .tile .tile__kicker { letter-spacing: 0.16em; }
}

@media (min-width: 721px) and (max-width: 760px) {
  html.nr .nr-actions .nr-divider { display: none; }
}

@media (min-width: 721px) and (max-width: 800px) {
  html.nr .nr-day__track { width: 68px; }
}

/* ?fx=noglass — без размытия под стеклом (для сравнения скорости). */
html.fx-no-glass .glass-panel {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
