/* ============================================================
   РАЗРЯД — design tokens & base styles
   Taekwondo gamification platform
   ============================================================ */

/* ---- Fonts loaded in index.html (Unbounded, Golos Text) ---- */

:root {
  /* shift accent — organizer-chosen brand color (default orange) */
  --shift-accent: #ff5a1f;
  --shift-accent-ink: #1a0d04;       /* text on accent */
  --shift-accent-soft: color-mix(in srgb, var(--shift-accent) 14%, transparent);

  /* brand orange (platform) */
  --brand: #ff5a1f;
  --brand-600: #f04d12;

  /* medals (semantic) */
  --gold: #f5b73d;
  --silver: #c2cbd4;
  --bronze: #d08a4e;

  /* taekwondo belts (level colors) */
  --belt-white: #eef0f2;
  --belt-yellow: #f2c43d;
  --belt-green: #4caa6a;
  --belt-blue: #3f7bd6;
  --belt-red: #e24b48;
  --belt-black: #2a2d33;

  /* radii / motion */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Golos Text", system-ui, sans-serif;

  /* attendance status colors */
  --att-present: #2fb763;
  --att-late: #efb02a;
  --att-absent: #e24b48;
  --att-excused: #8d8475;
}

/* color-scheme говорит браузеру рисовать нативные контролы (date, checkbox, scrollbar) тёмными */
:root { color-scheme: dark; }
[data-theme="light"] { color-scheme: light; }

/* ---------- THEME: DARK (default) ---------- */
[data-theme="dark"] {
  --bg: #15130f;
  --bg-1: #1c1a15;
  --surface: #211e18;
  --surface-2: #29251e;
  --surface-3: #332e25;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #f6f1e9;
  --ink-2: #c8c0b2;
  --ink-3: #8d8475;
  --shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.8);
  --shadow-sm: 0 6px 18px -10px rgba(0, 0, 0, 0.7);
  --grid-line: rgba(255, 255, 255, 0.035);
}

/* ---------- THEME: LIGHT ---------- */
[data-theme="light"] {
  --bg: #f3efe8;
  --bg-1: #efe9e0;
  --surface: #ffffff;
  --surface-2: #faf7f1;
  --surface-3: #f1ece2;
  --line: rgba(30, 22, 10, 0.10);
  --line-strong: rgba(30, 22, 10, 0.18);
  --ink: #241d12;
  --ink-2: #5c5443;
  --ink-3: #8d8473;
  --shadow: 0 22px 50px -26px rgba(60, 40, 12, 0.40);
  --shadow-sm: 0 8px 20px -14px rgba(60, 40, 12, 0.34);
  --grid-line: rgba(30, 22, 10, 0.045);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* scrollbars */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 20px; border: 3px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- typography helpers ---------- */
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 0.98; }
.num { font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.eyebrow { font-family: var(--font-body); font-weight: 700; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }

h1,h2,h3,h4 { margin: 0; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-body); font-weight: 700; font-size: 14px;
  border: none; border-radius: var(--r-md); padding: 11px 18px;
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  transition: transform 0.12s var(--ease), background 0.18s, box-shadow 0.18s, border-color 0.18s, color 0.18s;
  white-space: nowrap; line-height: 1;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--shift-accent); color: #fff; box-shadow: 0 10px 24px -12px var(--shift-accent); }
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 14px 30px -12px var(--shift-accent); }
.btn-ghost { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-3); border-color: var(--line-strong); }
.btn-quiet { background: transparent; color: var(--ink-2); padding: 9px 12px; }
.btn-quiet:hover { background: var(--surface-2); color: var(--ink); }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: var(--r-sm); }
.btn-lg { padding: 15px 26px; font-size: 16px; border-radius: var(--r-lg); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 22px; }

/* ---------- chips / pills ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 600;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.chip-accent { background: var(--shift-accent-soft); color: var(--shift-accent); border-color: transparent; }

/* level/belt swatch */
.belt-dot { width: 14px; height: 14px; border-radius: 4px; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18); }

/* progress bar */
.pbar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; position: relative; }
.pbar > span { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--shift-accent); transition: width 0.7s var(--ease); }

/* input */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.input {
  font-family: var(--font-body); font-size: 14.5px; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 12px 14px; width: 100%;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}
.input::placeholder { color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--shift-accent); box-shadow: 0 0 0 3px var(--shift-accent-soft); background: var(--surface); }

/* toggle switch */
.tgl { width: 44px; height: 25px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line); position: relative; cursor: pointer; transition: background 0.2s, border-color 0.2s; flex: none; }
.tgl::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: var(--ink-3); transition: transform 0.22s var(--ease-spring), background 0.2s; }
.tgl[data-on="true"] { background: var(--shift-accent); border-color: transparent; }
.tgl[data-on="true"]::after { transform: translateX(19px); background: #fff; }

/* dotted-grid backdrop */
.gridbg {
  background-image: radial-gradient(var(--grid-line) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
}

/* icon wrapper */
.ic { display: inline-flex; align-items: center; justify-content: center; }
.ic svg { display: block; }

/* utility */
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 20px; } .gap-6 { gap: 24px; }
.grow { flex: 1; }
.muted { color: var(--ink-3); }
.center { align-items: center; justify-content: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }

/* fade/slide entrance */
@keyframes rzFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* transform-only entrance — safe even if the animation engine is paused (content stays visible) */
@keyframes rzSlideUp { from { transform: translateY(12px); } to { transform: none; } }
@keyframes rzPop { 0% { opacity: 0; transform: scale(0.8); } 60% { opacity: 1; } 100% { transform: scale(1); } }
@keyframes rzSpark { 0%,100% { opacity: 0.5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
.fade-up { animation: rzSlideUp 0.45s var(--ease) both; }

/* count-up number flash */
@keyframes rzSlideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rzFlash { 0% { color: var(--shift-accent); transform: scale(1.12); } 100% { color: inherit; transform: none; } }
.flash { animation: rzFlash 0.6s var(--ease); display: inline-block; }
/* ============================================================
   РАЗРЯД — shell / chrome styles
   ============================================================ */

.rz-root { height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: #000; }

/* ---- prototype bar (chrome, always dark) ---- */
.rz-protobar {
  height: 50px; flex: none; background: #0c0b0a; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,0.08); position: relative; z-index: 50;
}
.rz-proto-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 var(--brand); animation: rzSpark 2s ease-in-out infinite; }
.rz-seg { display: flex; gap: 3px; background: rgba(255,255,255,0.06); border-radius: 11px; padding: 3px; }
.rz-seg button {
  border: none; background: transparent; color: rgba(255,255,255,0.6); font-family: var(--font-body);
  font-weight: 600; font-size: 13px; padding: 7px 14px; border-radius: 8px; cursor: pointer; transition: all 0.16s; white-space: nowrap;
}
.rz-seg button:hover { color: #fff; }
.rz-seg button.active { background: var(--brand); color: #fff; }
.rz-seg.small button { font-size: 12px; padding: 6px 11px; }
.rz-seg.small button.active { background: rgba(255,255,255,0.16); color: #fff; }
.rz-iconbtn { border: none; background: rgba(255,255,255,0.06); color: #fff; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; transition: background 0.16s; }
.rz-iconbtn:hover { background: rgba(255,255,255,0.14); }

.rz-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; }

/* ---- mobile role wrapper ---- */
.rz-mobilewrap { width: 100%; height: 100%; display: grid; place-items: center; background: var(--bg-1); overflow: auto; padding: 20px; }

/* ---- organizer shell ---- */
.rz-shell { display: flex; height: 100%; background: var(--bg); }
.rz-sidebar {
  width: 256px; flex: none; background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 14px; gap: 6px;
}
.rz-brand-wrap { display: flex; align-items: center; gap: 8px; padding: 0 4px; position: relative; }
.rz-brand-wrap .rz-brand { flex: 1; min-width: 0; padding: 6px 8px 16px; }
.rz-brand-wrap .rz-brand:hover { background: var(--surface-2); border-radius: var(--r-md); }
.rz-brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 16px; }
.rz-logo { width: 40px; height: 40px; border-radius: 12px; background: var(--shift-accent); display: grid; place-items: center; color: #fff; box-shadow: 0 8px 20px -8px var(--shift-accent); }
.rz-logo .display { font-size: 22px; }
.rz-shift-toggle {
  flex: none; width: 32px; height: 32px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink-2); cursor: pointer;
  display: grid; place-items: center;
  margin-bottom: 16px; transition: all 0.12s;
}
.rz-shift-toggle:hover { color: var(--shift-accent); border-color: var(--shift-accent); background: var(--shift-accent-soft); }
.rz-shift-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: var(--surface);
  transition: all 0.12s;
}
.rz-shift-row:hover { border-color: var(--line-strong); background: var(--surface-2); }
.rz-shift-row.active { border-color: var(--shift-accent); background: var(--shift-accent-soft); }
.rz-shift-logo {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center; color: #fff; font-size: 22px; flex: none;
}
.rz-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; overflow-y: auto; flex: 1; }
.rz-navitem {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px;
  border: none; background: transparent; color: var(--ink-2); font-family: var(--font-body);
  font-weight: 600; font-size: 14px; cursor: pointer; text-align: left; transition: all 0.15s; position: relative;
}
.rz-navitem:hover { background: var(--surface-2); color: var(--ink); }
.rz-navitem.active { background: var(--shift-accent-soft); color: var(--shift-accent); }
.rz-navitem.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--shift-accent); }
.rz-shiftcard { margin-top: auto; padding: 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.rz-shiftcard-btn { width: 100%; text-align: left; background: none; border: none; padding: 0; cursor: pointer; color: var(--ink); font-family: var(--font-body); }
.rz-shiftmenu { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 6px; z-index: 60; }
.rz-shiftopt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 8px; border-radius: 9px; border: none; background: transparent; cursor: pointer; color: var(--ink); font-family: var(--font-body); text-align: left; transition: background 0.14s; }
.rz-shiftopt:hover { background: var(--surface-2); }
.rz-shiftopt.on { background: var(--shift-accent-soft); }
.rz-shiftopt.create { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 12px; color: var(--shift-accent); }
.rz-shiftopt.create:disabled { opacity: 0.4; cursor: not-allowed; color: var(--ink-3); }

.rz-main { flex: 1; min-width: 0; overflow: auto; }
.rz-canvas { max-width: 1080px; margin: 0 auto; padding: 34px 40px 80px; animation: rzSlideUp 0.4s var(--ease) both; }
.rz-headicon { width: 38px; height: 38px; border-radius: 11px; background: var(--shift-accent-soft); color: var(--shift-accent); display: grid; place-items: center; flex: none; }

/* topbar inside canvas */
.rz-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }

/* generic grid — container-responsive via auto-fit */
.rz-grid { display: grid; gap: 16px; }
.rz-grid.c4 { grid-template-columns: repeat(auto-fit, minmax(214px, 1fr)); }
.rz-grid.c3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.rz-grid.c2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
@media (min-width: 1100px) { .rz-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* table */
.rz-table { width: 100%; border-collapse: collapse; }
.rz-table th { text-align: left; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: 0 14px 12px; }
.rz-table td { padding: 13px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.rz-table tbody tr { transition: background 0.14s; }
.rz-table tbody tr:hover { background: var(--surface-2); }

/* list row */
.rz-listrow { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); transition: all 0.15s; }
.rz-listrow:hover { border-color: var(--line-strong); transform: translateX(2px); }

/* segmented filter */
.rz-filter { display: inline-flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 4px; }
.rz-filter button, .rz-filter a { border: none; background: transparent; color: var(--ink-2); font-family: var(--font-body); font-weight: 600; font-size: 13px; padding: 7px 13px; border-radius: 8px; cursor: pointer; transition: all 0.15s; text-decoration: none; display: inline-block; line-height: 1.2; }
.rz-filter button.active, .rz-filter a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.rz-filter button:hover:not(.active), .rz-filter a:hover:not(.active) { color: var(--ink); }

/* mobile bottom nav */
.rz-tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: 78px; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-around; padding: 0 8px 16px; z-index: 20; }
.rz-tab { display: flex; flex-direction: column; align-items: center; gap: 3px; border: none; background: transparent; color: var(--ink-3); font-size: 10.5px; font-weight: 600; cursor: pointer; padding: 8px 12px; transition: color 0.15s; }
.rz-tab.active { color: var(--shift-accent); }

/* mobile page padding */
.rz-mpage { padding: 52px 18px 96px; min-height: 100%; }
/* ============================================================
   РАЗРЯД — screen-specific styles
   ============================================================ */

/* ---- auth ---- */
.rz-auth-split { display: flex; height: 100%; background: var(--bg); }
.rz-auth-brand { flex: 1.05; background: var(--surface); border-right: 1px solid var(--line); display: flex; align-items: center; padding: 56px; position: relative; overflow: hidden; }
.rz-auth-brand::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, var(--shift-accent-soft), transparent 70%); }
.rz-auth-brandinner { position: relative; z-index: 2; }
.rz-auth-form { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; overflow: auto; }
.rz-auth-divider { display: flex; align-items: center; gap: 12px; margin: 26px 0 16px; color: var(--ink-3); font-size: 12px; }
.rz-auth-divider::before, .rz-auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
@media (max-width: 860px) { .rz-auth-brand { display: none; } }

.rz-otp { text-align: center; font-family: var(--font-display); font-size: 24px; font-weight: 600; padding: 14px 0; aspect-ratio: 1; }

/* ---- onboarding ---- */
.rz-onb { height: 100%; display: flex; flex-direction: column; background: var(--bg); }
.rz-onb-top { flex: none; padding: 22px 40px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.rz-onb-steps { display: flex; align-items: center; gap: 8px; }
.rz-onb-stepdot { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.rz-onb-stepdot .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; transition: all 0.25s; }
.rz-onb-stepdot.active { color: var(--ink); }
.rz-onb-stepdot.active .n { background: var(--shift-accent); border-color: transparent; color: #fff; }
.rz-onb-stepdot.done .n { background: var(--shift-accent-soft); border-color: transparent; color: var(--shift-accent); }
.rz-onb-body { flex: 1; overflow: auto; display: flex; justify-content: center; padding: 40px; }
.rz-onb-inner { width: 100%; max-width: 760px; animation: rzSlideUp 0.4s var(--ease) both; }
.rz-onb-foot { flex: none; padding: 18px 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; background: var(--surface); }
.rz-emojibtn { width: 42px; height: 42px; flex: none; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); font-size: 20px; cursor: pointer; display: grid; place-items: center; transition: background 0.15s; }
.rz-emojibtn:hover { background: var(--surface-3); }
@media (max-width: 940px) { .rz-onb-steplabel { display: none; } .rz-onb-steps span[style*="width: 18px"] { display: none; } }

.rz-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.rz-choicecard { border: 1.5px solid var(--line); border-radius: var(--r-xl); padding: 28px; cursor: pointer; transition: all 0.2s var(--ease); background: var(--surface); position: relative; overflow: hidden; }
.rz-choicecard:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: var(--shadow); }
.rz-choicecard.sel { border-color: var(--shift-accent); box-shadow: 0 0 0 4px var(--shift-accent-soft); }
.rz-choicecard .badge-rec { position: absolute; top: 16px; right: 16px; }

.rz-tpl-preview { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 8px; }
.rz-tpl-item { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; animation: rzSlideUp 0.4s var(--ease) both; }
.rz-tpl-item .dot { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--shift-accent-soft); color: var(--shift-accent); flex: none; }

/* color picker swatches */
.rz-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.rz-swatch { width: 42px; height: 42px; border-radius: 12px; cursor: pointer; border: 2px solid transparent; transition: transform 0.15s, border-color 0.15s; position: relative; }
.rz-swatch:hover { transform: scale(1.08); }
.rz-swatch.sel { border-color: var(--ink); }
.rz-swatch.sel::after { content: ""; position: absolute; inset: 0; display: grid; place-items: center; }

/* ---- badges grid ---- */
.rz-badge-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 22px 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); transition: all 0.18s; position: relative; }
.rz-badge-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.rz-badge-medal { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--shift-accent) 55%, #fff), var(--shift-accent)); color: #fff; box-shadow: 0 10px 22px -10px var(--shift-accent); flex: none; }
.rz-badge-medal.locked { background: var(--surface-3); color: var(--ink-3); box-shadow: none; }
.rz-badge-medal.auto { background: radial-gradient(circle at 35% 30%, #6fd6a8, #2e9e6e); box-shadow: 0 10px 22px -10px #2e9e6e; }

/* belt row */
.rz-belt-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.rz-belt-bar { width: 46px; height: 22px; border-radius: 6px; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.2); }

/* leaderboard rank */
.rz-rank {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700; font-size: 14px;
  line-height: 30px; /* === высоте бокса для идеальной вертикали */
  text-align: center;
  font-variant-numeric: tabular-nums lining-nums;
  background: var(--surface-3); color: var(--ink-2);
  padding: 0;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}
.rz-rank.g1 { background: var(--gold); color: #5a3d00; }
.rz-rank.g2 { background: var(--silver); color: #3a4047; }
.rz-rank.g3 { background: var(--bronze); color: #fff; }

/* segmented day picker for attendance */
.rz-att-grid { width: 100%; border-collapse: collapse; }
.rz-att-grid th, .rz-att-grid td { padding: 8px; text-align: center; }
.rz-att-cell { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; display: inline-grid; place-items: center; transition: all 0.14s; color: transparent; }
.rz-att-cell.yes { background: var(--shift-accent); border-color: transparent; color: #fff; }
.rz-att-cell.future { opacity: 0.35; pointer-events: none; }

/* mobile cards */
.rz-hero { border-radius: var(--r-xl); padding: 24px; color: #fff; position: relative; overflow: hidden; background: var(--shift-accent); }
.rz-hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,0.14); }
.rz-hero::before { content: ""; position: absolute; right: 30px; bottom: -60px; width: 140px; height: 140px; border-radius: 50%; background: rgba(0,0,0,0.08); }

/* segmented pill for variations */
.rz-varbar { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.rz-varbar button { flex: 1; border: none; background: transparent; color: var(--ink-2); font-family: var(--font-body); font-weight: 700; font-size: 12.5px; padding: 9px 6px; border-radius: 9px; cursor: pointer; transition: all 0.16s; }
.rz-varbar button.active { background: var(--shift-accent); color: #fff; }

/* bento grid (mobile) */
.rz-bento { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.rz-bento-cell { display: flex; flex-direction: column; min-height: 92px; padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.rz-bento-cell.big { grid-column: span 1; grid-row: span 1; }
.rz-bento .rz-bento-cell:first-child.big { grid-column: 1 / 2; grid-row: 1 / 1; min-height: 132px; }

/* belt journey path */
.rz-path { display: flex; flex-direction: column; }
.rz-path-step { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.rz-path-step:last-child { padding-bottom: 0; }
.rz-path-line { position: absolute; left: 15px; top: 30px; bottom: -2px; width: 2px; }
.rz-path-step:last-child .rz-path-line { display: none; }
.rz-path-node { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 2px solid var(--line); background: var(--surface-2); color: var(--ink-3); z-index: 2; }
.rz-path-node.done { color: #fff; }
.rz-path-node.cur { color: #fff; box-shadow: 0 0 0 4px var(--shift-accent-soft); }
.rz-path-info { flex: 1; padding-top: 5px; }

/* podium (rank) */
.rz-podium { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 18px; }
.rz-podium-col { flex: 1; display: flex; flex-direction: column; align-items: center; }
.rz-podium-ava { border-radius: 50%; display: grid; place-items: center; flex: none; }
.rz-podium-name { font-size: 12px; font-weight: 700; margin: 7px 0 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rz-podium-bar { width: 100%; margin-top: 8px; border-radius: 12px 12px 0 0; display: grid; place-items: center; position: relative; }

/* distribute options */
.rz-distopt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px; border-radius: var(--r-lg); border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; transition: all 0.18s; font-family: var(--font-body); color: var(--ink); }
.rz-distopt:hover { border-color: var(--line-strong); }
.rz-distopt.sel { border-color: var(--shift-accent); box-shadow: 0 0 0 3px var(--shift-accent-soft); }
.rz-distopt.sel > .ic:last-child, .rz-distopt.sel svg { color: var(--shift-accent); }
/* Дропдаун «Распределить»: на десктопе — popover у кнопки, на мобилке —
   модалка по центру с overlay (старая absolute-позиция выезжала за экран). */
.rz-dist-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 340px; padding: 18px; z-index: 30; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: var(--shadow); }
@media (max-width: 720px) {
  .rz-dist[open]::before { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 90; }
  .rz-dist-pop { position: fixed; left: 16px; right: 16px; top: auto; bottom: 96px; width: auto; z-index: 100; max-height: calc(100vh - 200px); overflow-y: auto; }
}

/* squad member row — белая таблетка на цветной карточке отряда */
.rz-sqmembers { display: flex; flex-direction: column; gap: 6px; }
.rz-sqmember {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.14s, transform 0.1s;
}
.rz-sqmember:hover { border-color: var(--line-strong); }
.rz-movebtn { opacity: 0; }
.rz-sqmember:hover .rz-movebtn { opacity: 1; }
.rz-sqmembers-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 18px 12px;
  border: 1.5px dashed color-mix(in srgb, var(--sq-color, var(--line-strong)) 35%, var(--line));
  border-radius: 10px;
  color: var(--ink-3); font-size: 12.5px; font-weight: 600;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.rz-sqmembers-empty i { color: color-mix(in srgb, var(--sq-color, var(--ink-3)) 60%, var(--ink-3)); }
/* Девиз поверх цветной карточки — чуть прозрачнее, чтобы попасть в общую тему */
.rz-sqcard .rz-sqmotto { background: color-mix(in srgb, var(--surface) 65%, transparent); }
.rz-sqcard .pbar { background: color-mix(in srgb, var(--surface) 60%, transparent); }

/* ---- attendance roster ---- */
.rz-roster-row { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); transition: border-color 0.14s; }
.rz-roster-row:hover { border-color: var(--line-strong); }
.rz-statbtns { display: flex; gap: 8px; flex: none; }
.rz-statbtn { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface-2); cursor: pointer; display: grid; place-items: center; color: var(--ink-3); transition: all 0.15s var(--ease); }
.rz-statbtn:hover { transform: scale(1.08); }
.rz-statbtn[data-k="present"] { color: var(--att-present); background: color-mix(in srgb, var(--att-present) 13%, transparent); border-color: color-mix(in srgb, var(--att-present) 30%, transparent); }
.rz-statbtn[data-k="late"] { color: var(--att-late); background: color-mix(in srgb, var(--att-late) 14%, transparent); border-color: color-mix(in srgb, var(--att-late) 32%, transparent); }
.rz-statbtn[data-k="absent"] { color: var(--att-absent); background: color-mix(in srgb, var(--att-absent) 13%, transparent); border-color: color-mix(in srgb, var(--att-absent) 30%, transparent); }
.rz-statbtn[data-k="excused"] { color: var(--att-excused); background: color-mix(in srgb, var(--att-excused) 13%, transparent); border-color: color-mix(in srgb, var(--att-excused) 28%, transparent); }
.rz-statbtn.on[data-k="present"] { background: var(--att-present); border-color: var(--att-present); color: #fff; box-shadow: 0 6px 16px -8px var(--att-present); }
.rz-statbtn.on[data-k="late"] { background: var(--att-late); border-color: var(--att-late); color: #3a2c00; box-shadow: 0 6px 16px -8px var(--att-late); }
.rz-statbtn.on[data-k="absent"] { background: var(--att-absent); border-color: var(--att-absent); color: #fff; box-shadow: 0 6px 16px -8px var(--att-absent); }
.rz-statbtn.on[data-k="excused"] { background: var(--att-excused); border-color: var(--att-excused); color: #fff; }
.rz-statbtn.dim { opacity: 0.35; }
.rz-statbtn.dim:hover { opacity: 1; }

/* count pill (отмечено сводка) */
.rz-countpill { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; }
.rz-countdot { width: 11px; height: 11px; border-radius: 50%; }

/* day picker */
.rz-daypick { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 4px; }
.rz-daypick .nav { width: 34px; height: 34px; border-radius: 8px; border: none; background: transparent; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; transition: background 0.14s; }
.rz-daypick .nav:hover { background: var(--surface-3); color: var(--ink); }
.rz-daypick .nav:disabled { opacity: 0.3; cursor: not-allowed; }
.rz-daypick .lbl { padding: 0 10px; text-align: center; line-height: 1.15; min-width: 132px; white-space: nowrap; }

/* ---- points awarder ---- */
.rz-amtbtn { flex: 1; min-width: 64px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 18px; padding: 14px 8px; border-radius: var(--r-md); cursor: pointer; transition: all 0.15s; }
.rz-amtbtn:hover { border-color: var(--line-strong); }
.rz-amtbtn.on { background: var(--shift-accent); border-color: transparent; color: #fff; box-shadow: 0 8px 20px -10px var(--shift-accent); }
.rz-amtbtn.neg.on { background: var(--att-absent); box-shadow: 0 8px 20px -10px var(--att-absent); }
.rz-reasonchip { border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-family: var(--font-body); font-weight: 600; font-size: 13px; padding: 9px 14px; border-radius: 99px; cursor: pointer; transition: all 0.15s; }
.rz-reasonchip:hover { border-color: var(--line-strong); color: var(--ink); }
.rz-reasonchip.on { background: var(--shift-accent-soft); border-color: var(--shift-accent); color: var(--shift-accent); }

/* Кнопка готового правила: причина и сумма одной нажимаемой парой. Сумма
   отделена визуально, чтобы взгляд ловил её без чтения названия. */
.rz-rulechip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-family: var(--font-body); font-weight: 600; font-size: 13.5px; padding: 9px 13px; border-radius: 12px; cursor: pointer; transition: all 0.15s; }
.rz-rulechip:hover { border-color: var(--line-strong); color: var(--ink); }
.rz-rulechip.on { background: var(--shift-accent-soft); border-color: var(--shift-accent); color: var(--shift-accent); }
.rz-rulechip b { font-family: var(--font-num, var(--font-body)); font-weight: 800; color: var(--att-present); }
.rz-rulechip b.minus { color: var(--att-absent); }
.rz-rulechip.on b { color: inherit; }
.rz-rulechip.other { color: var(--ink-3); border-style: dashed; }
.rz-bigaward { width: 100%; justify-content: center; font-family: var(--font-display); font-size: 18px; padding: 17px; letter-spacing: 0.01em; }
.rz-segbig { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; padding: 4px; flex: 1; }
.rz-segbig button { flex: 1; border: none; background: transparent; color: var(--ink-2); font-family: var(--font-body); font-weight: 700; font-size: 14px; padding: 11px; border-radius: 9px; cursor: pointer; transition: all 0.16s; }
.rz-segbig button.on { background: var(--shift-accent); color: #fff; }
.rz-pm { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; padding: 4px; }
.rz-pm button { width: 46px; border: none; background: transparent; color: var(--ink-2); font-size: 20px; font-weight: 700; border-radius: 9px; cursor: pointer; transition: all 0.16s; }
.rz-pm button.on-plus { background: var(--att-present); color: #fff; }
.rz-pm button.on-minus { background: var(--att-absent); color: #fff; }

/* rules setting row */
.rz-rulerow { padding: 14px 0; border-bottom: 1px solid var(--line); }
.rz-ruleinput { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding-left: 42px; }

/* ---- editors: emoji picker ---- */
.rz-emojipop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 8px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: var(--shadow); width: 220px; }
.rz-emojiopt { width: 36px; height: 36px; border-radius: 8px; border: none; background: transparent; font-size: 19px; cursor: pointer; transition: background 0.14s; }
.rz-emojiopt:hover { background: var(--surface-3); }
.rz-emojiopt.sel { background: var(--shift-accent-soft); box-shadow: inset 0 0 0 1.5px var(--shift-accent); }

/* ---- editors: level rows + DnD ---- */
.rz-lvlrow { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); transition: border-color 0.14s, box-shadow 0.14s, opacity 0.14s; }
.rz-lvlrow.over { border-color: var(--shift-accent); box-shadow: 0 0 0 3px var(--shift-accent-soft); }
.rz-lvlrow.dragging { opacity: 0.4; }
.rz-drag { color: var(--ink-3); cursor: grab; flex: none; display: inline-flex; }
.rz-drag:active { cursor: grabbing; }
.rz-colordots { display: flex; gap: 4px; flex: none; }
.rz-colordot { width: 18px; height: 18px; border-radius: 5px; border: 2px solid transparent; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15); transition: transform 0.12s; }
.rz-colordot:hover { transform: scale(1.12); }
.rz-colordot.sel { border-color: var(--ink); }

/* suggestion chip */
.rz-suggchip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 99px; border: 1px dashed var(--line-strong); background: var(--surface-2); color: var(--ink); font-family: var(--font-body); font-weight: 600; font-size: 13px; cursor: pointer; transition: all 0.15s; }
.rz-suggchip:hover { border-color: var(--shift-accent); color: var(--shift-accent); border-style: solid; }
.rz-suggchip:hover .ic { color: var(--shift-accent); }

/* badge add tile + library */
.rz-badge-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 22px 16px; border-radius: var(--r-lg); border: 1.5px dashed var(--line-strong); background: transparent; color: var(--ink-3); font-family: var(--font-body); font-weight: 600; font-size: 13px; cursor: pointer; transition: all 0.16s; }
.rz-badge-add:hover { border-color: var(--shift-accent); color: var(--shift-accent); }
.rz-libcard { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: all 0.15s; font-family: var(--font-body); }
.rz-libcard:hover { border-color: var(--shift-accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.rz-libplus { width: 26px; height: 26px; border-radius: 8px; background: var(--shift-accent-soft); color: var(--shift-accent); display: grid; place-items: center; flex: none; }
.rz-iconpick { width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line); display: grid; place-items: center; cursor: pointer; transition: all 0.14s; }

/* badge emoji tiles */
.rz-btile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px; padding: 18px 12px 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: all 0.18s; }
.rz-btile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.rz-btile-emoji { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; background: var(--surface-2); border: 1px solid var(--line); }
.rz-btile-auto { font-size: 10.5px; font-weight: 600; color: var(--att-present); background: color-mix(in srgb, var(--att-present) 14%, transparent); padding: 3px 9px; border-radius: 99px; margin-top: 2px; }
.rz-autochip { background: color-mix(in srgb, var(--att-present) 16%, transparent) !important; color: var(--att-present) !important; border-color: transparent !important; }
.rz-libemoji { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 21px; background: var(--surface-2); border: 1px solid var(--line); flex: none; }

/* ---- access / codes ---- */
.rz-codepill { font-family: "Unbounded", var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: 2px; background: var(--surface-3); padding: 5px 12px; border-radius: 8px; }

/* print overlay */
.rz-printroot { position: fixed; inset: 0; z-index: 200; background: var(--bg-1); display: flex; flex-direction: column; }
.rz-print-toolbar { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.rz-print-pages { flex: 1; overflow: auto; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.rz-a4card { width: 520px; max-width: 100%; aspect-ratio: 210 / 297; background: #fff; color: #14110c; border-radius: 4px; box-shadow: 0 18px 50px -22px rgba(0,0,0,0.6); padding: 48px 44px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.rz-a4top { width: 100%; display: flex; justify-content: center; padding-bottom: 28px; border-bottom: 2px dashed #d8d2c6; }
.rz-a4brand { font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 19px; color: #14110c; }
.rz-a4sub { font-size: 12.5px; color: #8a8377; font-weight: 600; }
.rz-a4qr { margin: 44px 0 36px; padding: 16px; border: 1px solid #e6e1d7; border-radius: 12px; }
.rz-a4name { font-family: "Unbounded", sans-serif; font-weight: 700; font-size: 28px; color: #14110c; }
.rz-a4codewrap { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 22px; }
.rz-a4codelabel { font-size: 12px; letter-spacing: 2px; color: #8a8377; font-weight: 700; }
.rz-a4code { font-family: "Unbounded", sans-serif; font-weight: 800; font-size: 52px; letter-spacing: 10px; color: var(--shift-accent); }
.rz-a4hint { margin-top: auto; font-size: 13px; color: #8a8377; font-weight: 500; max-width: 320px; line-height: 1.5; }

@media print {
  body > *:not(.rz-printroot) { display: none !important; }
  .no-print { display: none !important; }
  body, .rz-printroot { background: #fff !important; }
  .rz-printroot { position: static; }
  .rz-print-pages { padding: 0; gap: 0; display: block; }
  .rz-a4card { width: 100%; max-width: none; box-shadow: none; border-radius: 0; page-break-after: always; aspect-ratio: auto; min-height: 100vh; justify-content: center; }
}

/* ============================================================
   РАЗРЯД — Django-MVP additions (минимум, в токенах дизайна)
   ============================================================ */

/* Toaster (для Django messages) — поверх вьюпорта по дизайну */
.rz-toaster { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; max-width: calc(100vw - 32px); }
.rz-toast { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 12px 14px 12px 18px; font-size: 14px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 11px; animation: rzPop 0.3s var(--ease-spring) both; pointer-events: auto; max-width: 480px; }
.rz-toast-text { flex: 1; min-width: 0; }
.rz-toast-x {
  flex: none; border: none; background: transparent;
  color: var(--ink-3); cursor: pointer;
  width: 26px; height: 26px; border-radius: 7px;
  font-size: 18px; font-weight: 400; line-height: 1;
  display: grid; place-items: center;
  transition: background 0.12s, color 0.12s;
}
.rz-toast-x:hover { background: var(--surface-3); color: var(--ink); }
@keyframes rzToastOut {
  to { opacity: 0; transform: translateY(8px) scale(0.96); }
}
.rz-toast::before { content: ""; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--shift-accent); color: #fff; flex: none; }
.rz-toast-error::before, .rz-toast-warning::before { background: var(--belt-red); }
.rz-toast-success::before { background: var(--att-present); }

/* Auth страницы — высота 100vh на raw-base */
.rz-body { min-height: 100vh; }
body.rz-auth-body, body.rz-onb-body, body.rz-mobile-body, body.rz-org-body { min-height: 100vh; }
body.rz-auth-body { height: 100vh; }
body.rz-org-body { height: 100vh; overflow: hidden; }
body.rz-org-body .rz-shell { height: 100vh; }
/* Staff-страница — обычный документ-флоу со свободным скроллом окна */
body.rz-staff-body { min-height: 100vh; overflow: auto; }
body.rz-mobile-body { background: var(--bg-1); }
body.rz-mobile-body .rz-mobile-frame { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; background: var(--bg); }
body.rz-mobile-body .rz-mobile-frame .rz-mpage { padding-bottom: 110px; }
/* Таббар участника — прибит к низу экрана (fixed), не уезжает с контентом.
   fixed + translateX(-50%) дребезжит на iOS при скролле — центрируем через
   inset+margin, translateZ(0) выносит панель на свой GPU-слой. */
body.rz-mobile-body .rz-tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  margin: 0 auto; transform: translateZ(0);
  width: 100%; max-width: 480px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

/* Лендинг */
.rz-lp { min-height: 100vh; padding: 60px 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px; }
.rz-lp-inner { max-width: 980px; width: 100%; }
.rz-lp-h { font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 7vw, 76px); line-height: 0.98; letter-spacing: -0.03em; margin: 0 0 18px; }
.rz-lp-h em { font-style: normal; color: var(--shift-accent); }
.rz-lp-sub { font-size: 17px; line-height: 1.55; color: var(--ink-2); max-width: 600px; margin: 0 0 28px; }
.rz-lp-cta { display: inline-flex; gap: 12px; flex-wrap: wrap; }
.rz-lp-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 56px; }
.rz-lp-feat { display: flex; flex-direction: column; gap: 8px; }
.rz-lp-feat .ic-wrap { width: 38px; height: 38px; border-radius: 11px; background: var(--shift-accent-soft); color: var(--shift-accent); display: grid; place-items: center; font-size: 19px; flex: none; }
.rz-lp-feat h4 { font-family: var(--font-display); font-weight: 700; font-size: 16px; margin: 4px 0 0; }
.rz-lp-feat p { font-size: 13.5px; color: var(--ink-3); line-height: 1.5; margin: 0; }

/* Sidebar — кнопки активной смены / шифт-карточка */
.rz-sb-foot-user { padding: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.rz-sb-foot-user .who { font-weight: 700; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rz-sb-foot-user .logout { color: var(--ink-3); font-size: 12px; text-decoration: none; }
.rz-sb-foot-user .logout:hover { color: var(--shift-accent); }

/* Доступ — печать-карточки преамбула, плейсхолдер блок */
.rz-pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; font-family: ui-monospace, monospace; font-size: 12px; color: var(--ink-2); line-height: 1.5; }

/* Field / input стили: пробрасываем .field+input через rz-field/select для совместимости */
.rz-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 0; }
.rz-field > span, .rz-field > label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.rz-field input:not([type=checkbox]):not([type=radio]):not([type=color]), .rz-field select, .rz-field textarea { font-family: var(--font-body); font-size: 14.5px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; width: 100%; transition: border-color 0.16s, box-shadow 0.16s, background 0.16s; }
.rz-field input:focus, .rz-field select:focus, .rz-field textarea:focus { outline: none; border-color: var(--shift-accent); box-shadow: 0 0 0 3px var(--shift-accent-soft); background: var(--surface); }
.rz-field input[type=color] { width: 60px; height: 38px; padding: 4px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; }
.rz-row-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }

/* Чекбокс/радио — собственный стиль (на токенах) */
.rz-chk, .rz-rad { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; color: var(--ink); cursor: pointer; }
.rz-chk input, .rz-rad input { width: 18px; height: 18px; accent-color: var(--shift-accent); }

/* Ошибка */
.rz-err { background: color-mix(in srgb, var(--att-absent) 12%, transparent); color: var(--att-absent); border: 1px solid color-mix(in srgb, var(--att-absent) 30%, transparent); padding: 11px 14px; border-radius: var(--r-md); font-size: 13.5px; font-weight: 600; margin-bottom: 14px; }

/* Баннер */
.rz-banner-warn { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: color-mix(in srgb, var(--gold) 14%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 32%, transparent); color: var(--ink); padding: 14px 18px; border-radius: var(--r-md); font-size: 14px; margin-bottom: 22px; }
.rz-banner-warn b { color: var(--shift-accent); }

/* Drawer-like row для бейджей "панель быстрых" */
.rz-codepill-mono { font-family: ui-monospace, monospace; font-size: 13px; color: var(--ink-2); }

/* ============================================================
   Уровни-достижения (карточка по референсу)
   ============================================================ */
.rz-levelrow { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); transition: border-color 0.15s, transform 0.15s; }
.rz-levelrow:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.rz-levelrow .lv-emoji { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; font-size: 32px; flex: none; background: var(--surface-2); border: 1px solid var(--line); }
.rz-levelrow .lv-body { flex: 1; min-width: 0; }
.rz-levelrow .lv-head { display: flex; align-items: baseline; gap: 12px; }
.rz-levelrow .lv-tag { font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.rz-levelrow .lv-name { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--ink); letter-spacing: -0.01em; line-height: 1; }
.rz-levelrow .lv-range { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; font-weight: 500; }
.rz-levelrow .lv-edit { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); cursor: pointer; display: grid; place-items: center; transition: all 0.15s; flex: none; }
.rz-levelrow .lv-edit:hover { border-color: var(--shift-accent); color: var(--shift-accent); background: var(--shift-accent-soft); }

.rz-levels-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; padding: 22px 24px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.rz-levels-head h2 { font-family: var(--font-display); font-weight: 800; font-size: 24px; margin: 0 0 4px; letter-spacing: -0.01em; }
.rz-levels-head p { font-size: 14px; color: var(--ink-2); margin: 0; max-width: 480px; line-height: 1.5; }

/* native fixes для date / placeholder */
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.7); cursor: pointer; }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }

/* ============================================================
   Onboarding wizard: редактируемые строки (groups/levels/badges/squads)
   ============================================================ */
.rz-edrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); transition: border-color 0.14s; }
.rz-edrow:hover { border-color: var(--line-strong); }
.rz-edrow > input, .rz-edrow > select, .rz-edrow > textarea {
  font-family: var(--font-body); font-size: 13.5px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 8px 11px; width: 100%;
  transition: border-color 0.14s;
}
.rz-edrow > input:focus, .rz-edrow > select:focus, .rz-edrow > textarea:focus { outline: none; border-color: var(--shift-accent); box-shadow: 0 0 0 2px var(--shift-accent-soft); }
.rz-edrow .emoji-in { width: 50px; flex: none; text-align: center; font-size: 20px; padding: 8px 4px; }
.rz-edrow .name-in { flex: 1 1 140px; min-width: 0; font-weight: 600; }
.rz-edrow .num-in { width: 78px; flex: none; text-align: center; font-variant-numeric: tabular-nums; }
.rz-edrow .del { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; transition: all 0.14s; flex: none; }
.rz-edrow .del:hover { color: var(--att-absent); border-color: var(--att-absent); background: color-mix(in srgb, var(--att-absent) 12%, transparent); }
.rz-edrow .colordots { display: flex; gap: 4px; flex: none; }
.rz-edrow .cdot { width: 18px; height: 18px; border-radius: 5px; border: 2px solid transparent; cursor: pointer; padding: 0; transition: transform 0.12s; }
.rz-edrow .cdot:hover { transform: scale(1.12); }
.rz-edrow .cdot.sel { border-color: var(--ink); }
.rz-edrow .desc-in { flex: 2 1 200px; min-width: 0; font-size: 12.5px; }
.rz-edrow .type-in { width: 92px; flex: none; }

.rz-add-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border: 1px dashed var(--line-strong); border-radius: 99px; background: transparent; color: var(--ink-2); font-family: var(--font-body); font-weight: 600; font-size: 13px; cursor: pointer; transition: all 0.15s; align-self: flex-start; }
.rz-add-btn:hover { border-color: var(--shift-accent); color: var(--shift-accent); border-style: solid; }

/* Sections rows: обязательные — полупрозрачные */
.rz-secrow.fixed { opacity: 0.55; pointer-events: none; }
.rz-secrow.fixed .tgl { background: var(--shift-accent); }

/* Member bulk parse list */
.rz-bulkrow { display: flex; align-items: center; gap: 10px; padding: 7px 11px; border-radius: 8px; font-size: 13px; }
.rz-bulkrow.ok { background: color-mix(in srgb, var(--att-present) 8%, transparent); }
.rz-bulkrow.err { background: color-mix(in srgb, var(--att-absent) 12%, transparent); color: var(--att-absent); }
.rz-bulkrow .ic { width: 16px; height: 16px; flex: none; }
.rz-bulkrow .name { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rz-bulkrow .meta { font-size: 12px; color: var(--ink-3); flex: none; }
.rz-bulkrow.err .meta { color: var(--att-absent); }

/* ============================================================
   Мобильный кабинет организатора (≤860px)
   ============================================================ */
.rz-mhead, .rz-mtabbar { display: none; }
.rz-mhead {
  position: sticky; top: 0; z-index: 30;
  align-items: center; gap: 10px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.rz-mhead-title { flex: 1; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rz-mburger, .rz-mhead-action { border: none; background: var(--surface-2); color: var(--ink); width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; text-decoration: none; }
.rz-mtabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding: 0 8px env(safe-area-inset-bottom, 0px);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  align-items: center; justify-content: space-around;
  /* свой GPU-слой: fixed + backdrop-filter без него дёргается при скролле */
  transform: translateZ(0);
}
.rz-mtabbar .rz-tab { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; padding: 8px 8px; color: var(--ink-3); text-decoration: none; font-size: 10.5px; font-weight: 600; transition: color 0.15s; }
.rz-mtabbar .rz-tab.active { color: var(--shift-accent); }
.rz-mtabbar .rz-tab span { font-size: 10.5px; }

@media (max-width: 860px) {
  .rz-mhead, .rz-mtabbar { display: flex; }
  .rz-shell { display: flex; flex-direction: column; height: auto; min-height: 100vh; }
  body.rz-org-body { overflow: auto; height: auto; }
  body.rz-org-body .rz-shell { height: auto; }
  .rz-main { padding-bottom: 0; }
  /* Canvas на мобайл: 16px по бокам, отступ снизу под tabbar (64 + safe-area) */
  .rz-canvas { padding: 18px 16px calc(96px + env(safe-area-inset-bottom, 0px)); animation: none; max-width: none; margin: 0; }
  .rz-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 280px;
    transform: translateX(-105%); transition: transform 0.25s var(--ease);
    z-index: 50; box-shadow: var(--shadow);
    padding-top: calc(18px + env(safe-area-inset-top, 0px));
  }
  .rz-sidebar-open { transform: translateX(0); }
  /* Сетки на мобайл: ВСЁ в одну колонку. Inline grid-template-columns
     тоже перекрываем !important. Только мелкие g3/g4 (плитки-кнопки) оставляем. */
  .rz-grid { grid-template-columns: 1fr !important; }
  /* Topbar страниц на мобайл — колонкой с заголовком сверху */
  .rz-topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .rz-topbar > .row { flex-wrap: wrap; }
  /* Фильтры/таблицы — компактнее */
  .rz-filter { flex-wrap: wrap; }
  .card { overflow-x: auto; }
  .rz-table th, .rz-table td { white-space: nowrap; }
  .rz-edrow { flex-wrap: wrap; }
  .rz-edrow .num-in { width: 64px; }
}

/* Заглушка-страница */
.rz-stub { max-width: 620px; margin: 60px auto 0; text-align: center; padding: 60px 30px; border-radius: var(--r-xl); border: 1px solid var(--line); background: var(--surface); position: relative; overflow: hidden; }
.rz-stub::before { content: ""; position: absolute; inset: 0; opacity: 0.35; background: radial-gradient(circle at 50% 0%, var(--shift-accent-soft), transparent 60%); pointer-events: none; }
.rz-stub .ic-wrap { width: 76px; height: 76px; border-radius: 22px; background: var(--shift-accent-soft); color: var(--shift-accent); display: grid; place-items: center; margin: 0 auto 22px; position: relative; }
.rz-stub h1 { font-family: var(--font-display); font-weight: 800; font-size: 28px; margin: 0 0 14px; position: relative; }
.rz-stub p { font-size: 15px; color: var(--ink-2); line-height: 1.6; margin: 0; max-width: 460px; margin: 0 auto; position: relative; }
.rz-stub .badge-soon { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; background: var(--shift-accent-soft); color: var(--shift-accent); font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 18px; position: relative; }

/* Конкурсы */
.rz-contest-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-decoration: none; color: inherit; transition: all 0.15s; }
.rz-contest-row:hover { border-color: var(--line-strong); transform: translateX(2px); }
.rz-contest-row.sel { border-color: var(--shift-accent); background: var(--shift-accent-soft); }

/* A4 cards (print preview) */
.rz-cards-grid { display: grid; gap: 24px; padding: 24px; }
@media (max-width: 740px) { .rz-cards-grid { gap: 14px; padding: 14px; } }
.rz-a4card { animation: rzSlideUp 0.4s var(--ease) both; }

/* Bulk add */
.rz-bulk-card { background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 18px; }

/* ============================================================
   Демо-баннер сверху кабинета (для пользователей demo+...)
   ============================================================ */
.rz-demo-banner {
  position: sticky; top: 0; z-index: 41;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 11px 22px;
  background: linear-gradient(95deg, var(--shift-accent), color-mix(in srgb, var(--shift-accent) 70%, #b06ad6));
  color: #fff;
  font-size: 13.5px;
  border-bottom: 1px solid color-mix(in srgb, var(--shift-accent) 60%, #000);
  box-shadow: 0 6px 18px -10px rgba(0,0,0,.4);
}
.rz-demo-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 99px;
  background: rgba(255,255,255,.18); font-weight: 800;
  font-size: 11px; letter-spacing: 0.12em; flex: none;
  font-family: var(--font-display);
}
.rz-demo-text { flex: 1; min-width: 200px; opacity: .94; }
.rz-demo-cta {
  font-weight: 700; font-size: 13px;
  padding: 6px 14px; border-radius: 99px;
  background: rgba(255,255,255,.12); color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  text-decoration: none; flex: none;
  transition: background .14s, transform .14s;
}
.rz-demo-cta:hover { background: rgba(255,255,255,.22); transform: translateY(-1px); }
.rz-demo-cta.primary { background: #fff; color: var(--shift-accent); border-color: #fff; }
.rz-demo-cta.primary:hover { background: #fff; filter: brightness(.96); }
@media (max-width: 720px) {
  .rz-demo-banner { padding: 10px 14px; font-size: 12.5px; gap: 10px; }
  .rz-demo-text { display: none; }
}

/* ============================================================
   Переключатель темы (sidebar + mobile head)
   ============================================================ */
.rz-theme-toggle {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; flex: none;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink-2); border-radius: 8px; cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s, transform 0.12s var(--ease);
}
.rz-theme-toggle:hover {
  background: var(--shift-accent-soft); color: var(--shift-accent);
  border-color: var(--shift-accent);
}
.rz-theme-toggle:active { transform: scale(0.94); }
/* В тёмной теме иконка — солнце (намёк «переключить на свет»),
   в светлой — луна (намёк «переключить на тьму»). Это меняет JS-обработчик. */


/* ============================================================
   Уровни — инлайн-редактирование (форма прямо в строке)
   ============================================================ */
.rz-levelrow-form { gap: 14px; }
.rz-levelrow-form .lv-emoji-input {
  text-align: center;
  font-size: 28px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  width: 56px; height: 56px;
  padding: 4px;
  color: var(--ink);
}
.rz-levelrow-form .lv-emoji-input:focus { outline: none; border-color: var(--shift-accent); box-shadow: 0 0 0 3px var(--shift-accent-soft); }
.rz-levelrow-form .lv-name-input {
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
  color: var(--ink); letter-spacing: -0.01em; line-height: 1;
  background: transparent; border: none; border-bottom: 1px dashed transparent;
  padding: 4px 6px; width: 100%; min-width: 0;
  transition: border-color 0.14s, background 0.14s;
}
.rz-levelrow-form .lv-name-input:hover { border-bottom-color: var(--line-strong); }
.rz-levelrow-form .lv-name-input:focus { outline: none; border-bottom-color: var(--shift-accent); background: var(--surface-2); }
.rz-levelrow-form .lv-thr-input {
  width: 80px; text-align: center;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 5px 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.rz-levelrow-form .lv-thr-input:focus { outline: none; border-color: var(--shift-accent); }
.rz-levelrow-form .lv-actions { display: inline-flex; gap: 8px; flex: none; }
.rz-levelrow-form .lv-del:hover { border-color: var(--att-absent); color: var(--att-absent); background: color-mix(in srgb, var(--att-absent) 12%, transparent); }
.rz-levelrow-new {
  border-style: dashed !important;
  border-color: var(--line-strong) !important;
  background: transparent !important;
}
.rz-levelrow-new:hover { border-color: var(--shift-accent) !important; }

/* ============================================================
   Бейджи — инлайн-редактирование строкой (как уровни)
   ============================================================ */
.rz-badgerow {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  align-items: center; gap: 14px;
  padding: 12px 14px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.14s;
}
.rz-badgerow:hover { border-color: var(--line-strong); }
.rz-badgerow-new {
  border-style: dashed;
  border-color: var(--line-strong);
  background: transparent;
}
.rz-badgerow-new:hover { border-color: var(--shift-accent); }
.rz-badgerow .bd-emoji {
  width: 56px; height: 56px; padding: 4px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 14px; text-align: center;
  font-size: 28px; color: var(--ink);
}
.rz-badgerow .bd-emoji:focus { outline: none; border-color: var(--shift-accent); box-shadow: 0 0 0 3px var(--shift-accent-soft); }
.rz-badgerow .bd-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rz-badgerow .bd-name {
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  color: var(--ink); letter-spacing: -0.005em;
  background: transparent; border: none; border-bottom: 1px dashed transparent;
  padding: 3px 4px;
  transition: border-color 0.14s, background 0.14s;
}
.rz-badgerow .bd-name:hover { border-bottom-color: var(--line-strong); }
.rz-badgerow .bd-name:focus { outline: none; border-bottom-color: var(--shift-accent); background: var(--surface-2); }
.rz-badgerow .bd-desc {
  font-size: 12.5px; color: var(--ink-2);
  background: transparent; border: none; border-bottom: 1px dashed transparent;
  padding: 2px 4px;
  transition: border-color 0.14s;
}
.rz-badgerow .bd-desc:hover { border-bottom-color: var(--line); }
.rz-badgerow .bd-desc:focus { outline: none; border-bottom-color: var(--shift-accent); background: var(--surface-2); }
.rz-badgerow .bd-meta { display: flex; gap: 10px; flex: none; }
.rz-badgerow .bd-meta-lbl {
  font-family: ui-monospace, monospace; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-3); margin-bottom: 2px; display: block;
}
.rz-badgerow .bd-points-wrap, .rz-badgerow .bd-type-wrap { display: flex; flex-direction: column; }
.rz-badgerow .bd-points {
  width: 64px; text-align: center;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.rz-badgerow .bd-points:focus { outline: none; border-color: var(--shift-accent); }
.rz-badgerow .bd-type {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 5px 8px;
  font-size: 12.5px; color: var(--ink); font-weight: 600;
}
.rz-badgerow .bd-actions { display: inline-flex; gap: 8px; flex: none; }
.rz-badgerow .bd-btn {
  width: 36px; height: 36px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink-2); cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.14s;
}
.rz-badgerow .bd-btn:hover { border-color: var(--shift-accent); color: var(--shift-accent); background: var(--shift-accent-soft); }
.rz-badgerow .bd-del:hover { border-color: var(--att-absent); color: var(--att-absent); background: color-mix(in srgb, var(--att-absent) 12%, transparent); }

@media (max-width: 800px) {
  .rz-badgerow { grid-template-columns: 56px 1fr; }
  .rz-badgerow .bd-meta, .rz-badgerow .bd-actions { grid-column: 1 / -1; }
  .rz-badgerow .bd-meta { justify-content: flex-start; }
}

/* ============================================================
   Кнопка «Скопировать ссылку» в строке Доступов
   ============================================================ */
.rz-copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink-2); font-family: var(--font-body); font-weight: 600;
  font-size: 12.5px; cursor: pointer; white-space: nowrap;
  transition: all 0.14s;
}
.rz-copy-btn:hover {
  background: var(--shift-accent-soft); border-color: var(--shift-accent);
  color: var(--shift-accent);
}
.rz-copy-btn.rz-copy-ok {
  background: color-mix(in srgb, var(--att-present) 16%, transparent);
  border-color: var(--att-present); color: var(--att-present);
}

/* ============================================================
   Конкурсы — строка результата (вся группа + inline ввод)
   ============================================================ */
.rz-cresult {
  display: grid;
  grid-template-columns: 36px 1fr auto auto 36px;
  align-items: center; gap: 14px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.14s, background 0.14s;
}
.rz-cresult:hover { border-color: var(--line-strong); }
.rz-cresult:focus-within { border-color: var(--shift-accent); background: var(--shift-accent-soft); }

.rz-cresult .cr-rank {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: var(--surface-3); color: var(--ink-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700; font-size: 14px; line-height: 32px;
  text-align: center;
  font-variant-numeric: tabular-nums lining-nums;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}
.rz-cresult .cr-rank.g1 { background: var(--gold); color: #5a3d00; }
.rz-cresult .cr-rank.g2 { background: var(--silver); color: #3a4047; }
.rz-cresult .cr-rank.g3 { background: var(--bronze); color: #fff; }

.rz-cresult .cr-name { min-width: 0; }
.rz-cresult .cr-val {
  display: inline-flex; align-items: center; gap: 6px;
}
.rz-cresult .cr-input {
  width: 90px; text-align: center;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.rz-cresult .cr-input::placeholder { color: var(--ink-3); }
.rz-cresult .cr-input:focus { outline: none; border-color: var(--shift-accent); background: var(--surface); }

.rz-cresult .cr-save {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink-2); cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.14s;
}
.rz-cresult .cr-save:hover {
  border-color: var(--shift-accent); color: var(--shift-accent);
  background: var(--shift-accent-soft);
}

@media (max-width: 700px) {
  .rz-cresult { grid-template-columns: 28px 1fr 36px; gap: 10px; padding: 9px 11px; }
  .rz-cresult .cr-val { grid-column: 1 / -1; justify-content: flex-end; }
  .rz-cresult .cr-input { width: 100px; }
}

/* ============================================================
   Gate — упрощённый вход lk.vtrener.ru (2 кнопки)
   ============================================================ */
.rz-gate { min-height: 100vh; display: grid; place-items: center; padding: 40px 22px; }
.rz-gate-inner { width: 100%; max-width: 720px; text-align: center; }
.rz-gate-brand { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 38px; }
.rz-gate-h { font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 6vw, 52px); letter-spacing: -0.02em; margin: 0 0 8px; color: var(--ink); }
.rz-gate-sub { font-size: 16px; color: var(--ink-2); margin: 0 0 40px; }
.rz-gate-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.rz-gate-card {
  display: flex; flex-direction: column; align-items: flex-start; text-align: left;
  gap: 12px; padding: 30px 28px;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--r-xl); text-decoration: none; color: inherit;
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.rz-gate-card:hover { transform: translateY(-4px); border-color: var(--shift-accent); box-shadow: 0 24px 50px -24px var(--shift-accent); }
.rz-gate-ic {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--shift-accent-soft); color: var(--shift-accent);
  display: grid; place-items: center; margin-bottom: 6px;
}
.rz-gate-card-h { font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--ink); letter-spacing: -0.01em; }
.rz-gate-card-p { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.rz-gate-go { display: inline-flex; align-items: center; gap: 7px; margin-top: 6px; font-family: ui-monospace, monospace; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--shift-accent); }
.rz-gate-card:hover .rz-gate-go { gap: 11px; }
@media (max-width: 600px) { .rz-gate-cards { grid-template-columns: 1fr; } }

/* ============================================================
   Participant — история / отряд / конкурсы + скролл-таббар
   ============================================================ */
.rz-tabbar-scroll { overflow-x: auto; justify-content: flex-start; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.rz-tabbar-scroll::-webkit-scrollbar { display: none; }
.rz-tabbar-scroll .rz-tab { flex: 0 0 auto; min-width: 64px; }

.rz-phead { text-align: center; padding: 22px 0 18px; }
.rz-phead-pts { font-family: var(--font-display); font-weight: 800; font-size: 56px; line-height: 1; color: var(--ink); letter-spacing: -0.03em; }
.rz-phead-pts span { font-family: var(--font-body); font-weight: 600; font-size: 15px; color: var(--ink-3); margin-left: 8px; letter-spacing: 0; }
.rz-phead-sub { font-size: 13.5px; color: var(--ink-2); margin-top: 8px; }

.rz-psec-h { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink); margin: 22px 0 12px; }
.rz-ptitle { font-family: var(--font-display); font-weight: 800; font-size: 26px; color: var(--ink); margin: 14px 0 4px; letter-spacing: -0.02em; }
.rz-psubtitle { font-size: 13px; color: var(--ink-3); margin: 0 0 16px; }

.rz-phist { display: flex; flex-direction: column; gap: 7px; }
.rz-phist-row { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.rz-phist-row.me { border-color: var(--shift-accent); background: var(--shift-accent-soft); }
.rz-phist-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.rz-phist-ic.pos { background: color-mix(in srgb, var(--att-present) 16%, transparent); color: var(--att-present); }
.rz-phist-ic.neg { background: color-mix(in srgb, var(--att-absent) 16%, transparent); color: var(--att-absent); }
.rz-phist-body { flex: 1; min-width: 0; }
.rz-phist-reason { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.rz-phist-date { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
.rz-phist-delta { font-family: var(--font-display); font-weight: 700; font-size: 16px; flex: none; }
.rz-phist-delta.pos { color: var(--ink); }
.rz-phist-delta.neg { color: var(--att-absent); }

.rz-pempty { text-align: center; padding: 40px 20px; color: var(--ink-3); }
.rz-pempty p { font-size: 13.5px; line-height: 1.5; margin: 12px 0 0; max-width: 280px; margin-left: auto; margin-right: auto; }

.rz-psquad-hero { border-radius: var(--r-xl); padding: 26px 22px; text-align: center; color: #fff; background: var(--sq, var(--shift-accent)); position: relative; overflow: hidden; margin-top: 8px; }
.rz-psquad-hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.14); }
.rz-psquad-emoji { font-size: 48px; line-height: 1; position: relative; }
.rz-psquad-name { font-family: var(--font-display); font-weight: 800; font-size: 26px; margin-top: 8px; position: relative; }
.rz-psquad-meta { font-size: 13px; opacity: 0.92; margin-top: 6px; position: relative; }
.rz-psquad-place { font-weight: 700; }
.rz-psquad-stand { display: flex; flex-direction: column; gap: 6px; }
.rz-psquad-strow { display: flex; align-items: center; gap: 12px; padding: 10px 13px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.rz-psquad-strow.me { border-color: var(--shift-accent); background: var(--shift-accent-soft); }
.rz-psquad-rank, .rz-psquad-mrank { width: 28px; height: 28px; border-radius: 8px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-family: Arial, Helvetica, sans-serif; font-weight: 700; font-size: 13px; line-height: 28px; text-align: center; font-variant-numeric: tabular-nums lining-nums; background: var(--surface-3); color: var(--ink-2); text-rendering: geometricPrecision; -webkit-font-smoothing: antialiased; }
.rz-psquad-rank.g1 { background: var(--gold); color: #5a3d00; }
.rz-psquad-rank.g2 { background: var(--silver); color: #3a4047; }
.rz-psquad-rank.g3 { background: var(--bronze); color: #fff; }
.rz-psquad-srname { flex: 1; font-weight: 600; font-size: 14px; }
.rz-psquad-srpts { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.rz-psquad-mrank { background: transparent; color: var(--ink-3); }

.rz-pchips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.rz-pchips::-webkit-scrollbar { display: none; }
.rz-pchip { flex: 0 0 auto; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.rz-pchip.on { background: var(--shift-accent); border-color: var(--shift-accent); color: #fff; }
.rz-pcard-info { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; margin-bottom: 14px; }
.rz-pcard-info-h { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.rz-pcard-info-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }

/* ============================================================
   Конкурс — автосохранение статус + завершение группы
   ============================================================ */
.rz-cresult .cr-status { width: 24px; flex: none; display: grid; place-items: center; }
.rz-cresult .cr-status.ok { color: var(--att-present); }
.rz-cresult .cr-status.err { color: var(--att-absent); }
.rz-cresult .cr-status.saving { color: var(--ink-3); }
.rz-cresult .cr-status.saving i { animation: rz-spin 0.7s linear infinite; }
.rz-cresult .cr-status.dirty { color: var(--shift-accent); font-size: 22px; line-height: 1; font-weight: 900; }
@keyframes rz-spin { to { transform: rotate(360deg); } }
/* grid пересчёт: 5-я колонка теперь статус, не кнопка */
.rz-cresult { grid-template-columns: 36px 1fr auto 24px; }

.rz-cfinal {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 18px; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--shift-accent-soft); border: 1px solid color-mix(in srgb, var(--shift-accent) 30%, transparent);
  flex-wrap: wrap;
}
.rz-cfinal.done { background: color-mix(in srgb, var(--att-present) 12%, transparent); border-color: color-mix(in srgb, var(--att-present) 30%, transparent); }

/* ============================================================
   Календарь выходных дней (онбординг + настройки)
   ============================================================ */
.rz-cal { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 4px; }
.rz-cal-month { flex: 0 0 auto; }
.rz-cal-mtitle { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--ink); margin-bottom: 10px; text-transform: capitalize; }
.rz-cal-grid { display: grid; grid-template-columns: repeat(7, 34px); gap: 4px; }
.rz-cal-wd { width: 34px; height: 22px; display: grid; place-items: center; font-family: ui-monospace, monospace; font-size: 10.5px; color: var(--ink-3); font-weight: 600; }
.rz-cal-day {
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink); cursor: pointer; font-size: 13px; font-weight: 600;
  display: grid; place-items: center; transition: all 0.12s;
  font-variant-numeric: tabular-nums;
}
.rz-cal-day:hover { border-color: var(--shift-accent); }
.rz-cal-day.wknd { color: var(--ink-3); background: var(--surface-3); }
.rz-cal-day.off {
  background: var(--att-absent); color: #fff; border-color: var(--att-absent);
  text-decoration: line-through; text-decoration-thickness: 1.5px;
}
.rz-cal-day.off:hover { filter: brightness(1.08); }
.rz-cal-legend { display: flex; gap: 18px; align-items: center; margin-top: 12px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.rz-cal-legend .dot { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; margin-right: 5px; }
.rz-cal-legend .dot.train { background: var(--surface-2); border: 1px solid var(--line); }
.rz-cal-legend .dot.off { background: var(--att-absent); }

/* ============================================================
   Пьедестал отрядов + девиз
   ============================================================ */
.rz-podium-board {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
  align-items: end; max-width: 560px; margin: 0 auto 28px;
}
.rz-pod-col { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.rz-pod-crown { font-size: 26px; line-height: 1; margin-bottom: 2px; }
.rz-pod-ava {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 20px;
  box-shadow: 0 6px 18px -8px rgba(0,0,0,.5);
}
.rz-pod-ava.big { width: 62px; height: 62px; font-size: 26px; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--gold); }
.rz-pod-name { font-weight: 700; font-size: 12.5px; margin: 8px 0 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rz-pod-pts { font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.rz-pod-bar {
  width: 100%; margin-top: 8px; border-radius: 14px 14px 0 0;
  display: grid; place-items: center; position: relative;
}
.rz-pod-bar span { font-family: var(--font-display); font-weight: 800; font-size: 30px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.rz-pod-bar.p1 { height: 120px; }
.rz-pod-bar.p2 { height: 92px; }
.rz-pod-bar.p3 { height: 70px; }

.rz-sqava {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
}
.rz-sqmotto {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 11px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--line);
}
.rz-sqmotto-in {
  flex: 1; min-width: 0; background: transparent; border: none;
  color: var(--ink); font-size: 13px; font-style: italic; padding: 2px 0;
}
.rz-sqmotto-in:focus { outline: none; }
.rz-sqmotto-in::placeholder { color: var(--ink-3); font-style: normal; }
.rz-sqmotto-save {
  width: 28px; height: 28px; border-radius: 7px; flex: none;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-3); cursor: pointer; display: grid; place-items: center;
  transition: all 0.14s;
}
.rz-sqmotto-save:hover { border-color: var(--shift-accent); color: var(--shift-accent); background: var(--shift-accent-soft); }

@media (max-width: 480px) {
  .rz-pod-ava.big { width: 52px; height: 52px; font-size: 22px; }
  .rz-pod-bar.p1 { height: 96px; } .rz-pod-bar.p2 { height: 74px; } .rz-pod-bar.p3 { height: 58px; }
  .rz-pod-bar span { font-size: 24px; }
}

/* Девиз отряда в кабинете участника */
.rz-psquad-motto { font-size: 13px; font-style: italic; opacity: 0.92; margin-top: 6px; position: relative; line-height: 1.4; }
.rz-psquad-srmotto { font-size: 11px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rz-psquad-strow { align-items: flex-start !important; }

/* ============================================================
   Бейджи участника — сетка карточек (got / locked)
   ============================================================ */
.rz-pbadges-head {
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  letter-spacing: 0.04em; color: var(--ink); margin: 22px 0 12px;
}
.rz-pbadge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rz-pbadge-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px;
  display: flex; flex-direction: column; gap: 6px;
  position: relative; transition: border-color 0.15s;
}
.rz-pbadge-card.got { border-color: color-mix(in srgb, var(--att-present) 32%, var(--line)); }
.rz-pbadge-card.locked { opacity: 0.5; }
.rz-pbadge-card.locked .rz-pbadge-emoji { filter: grayscale(1); }
.rz-pbadge-top { display: flex; align-items: flex-start; justify-content: space-between; }
.rz-pbadge-emoji { font-size: 30px; line-height: 1; }
.rz-pbadge-check {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: var(--att-present); color: #fff;
  display: grid; place-items: center;
}
.rz-pbadge-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink); line-height: 1.15; letter-spacing: -0.01em; }
.rz-pbadge-card.locked .rz-pbadge-name { color: var(--ink-2); }
.rz-pbadge-desc { font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.rz-pbadge-xp { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--att-present); margin-top: 2px; }
.rz-pbadge-card.locked .rz-pbadge-xp { color: var(--ink-3); }

/* Поле ввода 4-значного кода участника — крупное, фиксированной высоты */
.rz-codeinput {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 14px;
  padding: 16px 0 16px 14px;  /* +left чтобы компенсировать letter-spacing справа */
}

/* ============================================================
   Знак бренда «Рекорд» — оранжевый квадрат + гистограмма со стрелкой
   ============================================================ */
.rz-brandmark { display:block; width:48px; height:48px; border-radius:14px;
  box-shadow: 0 12px 28px -10px rgba(255, 90, 31, 0.55); }
.rz-brandmark--sm { width:34px; height:34px; border-radius:10px; }
.rz-brandmark--md { width:48px; height:48px; border-radius:14px; }
.rz-brandmark--lg { width:64px; height:64px; border-radius:18px; }
.rz-brandmark--xl { width:80px; height:80px; border-radius:22px; }
.rz-brandrow { display:inline-flex; align-items:center; gap:12px; }
.rz-brandrow .display { font-size:24px; letter-spacing:-0.01em; }

/* ============================================================
   Sticky save-bar (настройки смены)
   ============================================================ */
.rz-savebar {
  grid-column: 1 / -1;
  position: sticky; bottom: 16px; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 16px; padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: 0 -8px 24px -8px rgba(0,0,0,0.45), 0 18px 36px -16px rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
}
.rz-savebar-msg { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); min-width: 0; }
.rz-savebar-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--att-present);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--att-present) 22%, transparent);
  flex: none; transition: background 0.2s, box-shadow 0.2s;
}
.rz-savebar.dirty .rz-savebar-dot {
  background: var(--shift-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--shift-accent) 22%, transparent);
  animation: rz-pulse 1.4s ease-in-out infinite;
}
.rz-savebar.dirty .rz-savebar-text { color: var(--shift-accent); font-weight: 600; }
@keyframes rz-pulse {
  0%,100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--shift-accent) 22%, transparent); }
  50%     { box-shadow: 0 0 0 7px color-mix(in srgb, var(--shift-accent) 10%, transparent); }
}
@media (max-width: 720px) {
  .rz-savebar { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
  .rz-savebar .btn { width: 100%; justify-content: center; }
  .rz-savebar-msg { justify-content: center; }
}

/* Разделитель в навигации сайдбара + админский пункт */
.rz-nav-sep { height:1px; background:var(--line); margin:8px 14px; opacity:.7; }
.rz-nav-eyebrow { font-size:10.5px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--ink-3); padding:6px 14px 4px; display:flex; align-items:center; gap:6px; }
.rz-nav-beta { font-size:9px; padding:2px 6px; border-radius:6px; background:color-mix(in srgb, var(--shift-accent) 18%, transparent); color:var(--shift-accent); letter-spacing:.04em; text-transform:uppercase; }
/* Переключатель «Лагерь / Клуб» в шапке сайдбара. Видим только тем,
   чей email в CLUB_ENABLED_EMAILS. */
.rz-navitem--staff { color: var(--ink-2); }
.rz-navitem--staff:hover { color: var(--shift-accent); }
.rz-navitem--staff.active { background: color-mix(in srgb, var(--shift-accent) 12%, transparent); color: var(--shift-accent); }

/* Номер места в углу карточки отряда — не толкает контент */
.rz-sq-rank { position:absolute; top:12px; right:12px; width:28px; height:28px; font-size:13px; border-radius:8px; z-index:2; }

/* ============================================================
   TG-карточка автора в сайдбаре кабинета (крупно, заметно)
   ============================================================ */
.rz-sb-tg {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 12px;
  margin: 10px 12px 8px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--shift-accent), color-mix(in srgb, var(--shift-accent) 70%, #fff));
  color: #fff;
  text-decoration: none;
  box-shadow: 0 18px 32px -16px var(--shift-accent);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.rz-sb-tg:hover { transform: translateY(-2px); box-shadow: 0 22px 38px -14px var(--shift-accent); }
.rz-sb-tg-emoji {
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255,255,255,0.22);
  display: grid; place-items: center;
  font-size: 18px; flex: none;
}
.rz-sb-tg-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.rz-sb-tg-eyebrow {
  font-family: var(--font-display, "Unbounded", sans-serif);
  font-weight: 600; font-size: 10.5px;
  letter-spacing: 0.12em; text-transform: uppercase;
  opacity: 0.85;
}
.rz-sb-tg-handle {
  font-family: var(--font-body, "Golos Text", sans-serif);
  font-weight: 800; font-size: 13.5px;
  letter-spacing: -0.01em;
  margin: 2px 0 3px;
  white-space: nowrap;
}
.rz-sb-tg-hint { font-size: 11.5px; opacity: 0.9; }

/* На мобильном сайдбар-меню тоже показывает */
@media (max-width: 900px) {
  .rz-sb-tg { margin: 8px 16px; }
}

/* ============================================================
   Ручной перенос участника между отрядами (squads.html)
   ============================================================ */
.rz-sqmv-wrap { position: relative; flex: none; }
.rz-sqmv-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-3);
  width: 26px; height: 26px; border-radius: 7px;
  display: grid; place-items: center; cursor: pointer;
  transition: all 0.12s;
}
.rz-sqmv-btn:hover { color: var(--shift-accent); border-color: var(--shift-accent); background: var(--shift-accent-soft); }
.rz-sqmv-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 50;
  min-width: 240px; max-width: 280px;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); box-shadow: var(--shadow);
  padding: 10px; display: none;
}
.rz-sqmv-pop.open { display: block; }
.rz-sqmv-h {
  font-family: var(--font-display, ui-monospace, monospace);
  font-weight: 600; font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3);
  margin: 2px 4px 8px; text-align: center;
}
.rz-sqmv-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 8px 12px;
  border: 1px solid var(--line); background: var(--surface-2);
  border-radius: 8px; cursor: pointer; color: var(--ink);
  font-size: 13px; font-weight: 600;
  transition: all 0.12s;
}
.rz-sqmv-opt:hover { transform: translateX(2px); background: var(--surface); box-shadow: 0 4px 12px -4px rgba(0,0,0,0.15); }
.rz-sqmv-opt.rz-sqmv-out { border-left: 3px solid var(--ink-3); color: var(--ink-2); }
.rz-sqmv-opt.rz-sqmv-out:hover { border-left-color: var(--belt-red); color: var(--belt-red); }

/* ============================================================
   Бейджи — карточки с мультиселектом + панель авто-логики
   ============================================================ */
.rz-bcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.rz-bcard[open] { border-color: var(--line-strong); box-shadow: var(--shadow); }
.rz-bcard-head {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px; cursor: pointer; list-style: none;
}
.rz-bcard-head::-webkit-details-marker { display: none; }
.rz-bcard-emoji {
  width: 54px; height: 54px; border-radius: 14px;
  background: var(--surface-2); display: grid; place-items: center;
  font-size: 32px; flex: none;
}
.rz-bcard-info { flex: 1; min-width: 0; }
.rz-bcard-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); }
.rz-bcard-desc { color: var(--ink-3); font-size: 13.5px; margin-top: 4px; }
.rz-bcard-meta { display: flex; gap: 14px; margin-top: 6px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; flex-wrap: wrap; }
.rz-bcard-tag {
  font-family: var(--font-display); font-weight: 700; font-size: 10.5px;
  padding: 4px 9px; border-radius: 6px; letter-spacing: 0.06em; flex: none;
}
.rz-bcard-tag.tag-auto { background: color-mix(in srgb, var(--att-present) 18%, transparent); color: var(--att-present); }
.rz-bcard-tag.tag-manual { background: var(--surface-3); color: var(--ink-3); }
.rz-bcard-edit {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-3); cursor: pointer;
  display: grid; place-items: center;
}
.rz-bcard-edit:hover { color: var(--shift-accent); border-color: var(--shift-accent); }
.rz-bcard-body { padding: 0 22px 22px; border-top: 1px solid var(--line); }

/* === Мультиселект === */
.rz-multi { padding-top: 18px; }
.rz-multi-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.rz-multi-h {
  font-family: var(--font-display); font-weight: 700; font-size: 12px;
  letter-spacing: 0.14em; color: var(--ink-2);
}
.rz-multi-elig { color: var(--ink-3); font-weight: 600; }
.rz-multi-status { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--ink-2); }
.rz-multi-count b { color: var(--ink); font-family: var(--font-display); font-weight: 700; }
.rz-multi-link { color: var(--shift-accent); text-decoration: none; font-weight: 600; font-size: 12.5px; }
.rz-multi-link:hover { text-decoration: underline; }
.rz-multi-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px; margin-bottom: 18px;
}
.rz-multi-chip {
  position: relative; cursor: pointer;
  padding: 12px 18px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  display: flex; align-items: center; gap: 8px;
  transition: all 0.14s;
  user-select: none;
}
.rz-multi-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.rz-multi-chip input { position: absolute; opacity: 0; pointer-events: none; }
.rz-multi-chk {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.18); color: #fff;
  opacity: 0; transform: scale(0.6); transition: all 0.14s;
}
.rz-multi-chip:has(input:checked) {
  background: var(--shift-accent); color: #fff; border-color: var(--shift-accent);
  box-shadow: 0 6px 18px -8px var(--shift-accent);
}
.rz-multi-chip:has(input:checked) .rz-multi-chk { opacity: 1; transform: scale(1); }
.rz-multi-submit { width: 100%; justify-content: center; }
.rz-multi-submit:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.rz-multi-empty {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 32px; color: var(--att-present); font-weight: 600; font-size: 14px;
  background: color-mix(in srgb, var(--att-present) 8%, transparent);
  border-radius: var(--r-md);
}

/* === Панель редактирования === */
.rz-bcard-edit-panel {
  margin-top: 22px; padding-top: 22px;
  border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 14px;
}
.rz-edit-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.rz-edit-row > .rz-field { min-width: 130px; }
.rz-auto-panel {
  background: color-mix(in srgb, var(--att-present) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--att-present) 22%, transparent);
  border-radius: var(--r-md); padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.rz-auto-title {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-weight: 700; font-size: 11.5px;
  letter-spacing: 0.14em; color: var(--att-present);
}
.rz-auto-hint { font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.rz-edit-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Tag для AUTO trigger в мобильной карточке участника на странице бейджей */
.rz-bcard-new .rz-bcard-emoji { background: var(--shift-accent-soft); }

/* Заголовок секции отряда в перекличке */
.rz-att-sqhead {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 4px;
  padding: 8px 14px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--sqclr, var(--shift-accent)) 12%, var(--surface));
  border-left: 4px solid var(--sqclr, var(--shift-accent));
  font-family: var(--font-display);
}
.rz-att-sqhead-em { font-size: 22px; line-height: 1; flex: none; }
.rz-att-sqhead-name { font-weight: 700; font-size: 15px; color: var(--ink); flex: 1; min-width: 0; }
.rz-att-sqhead-cnt { font-family: ui-monospace, monospace; font-size: 12px; color: var(--ink-3); font-weight: 600; flex: none; }
.rz-att-sqhead:first-child { margin-top: 0; }

/* ============================================================
   Текстовый логотип «рекорд» (как на лендинге)
   ============================================================ */
.rz-wm {
  font-family: "Unbounded", var(--font-display, sans-serif);
  font-weight: 800;
  font-style: italic;
  text-transform: lowercase;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
  padding-right: 0.08em;
  color: var(--ink);
  display: inline-block;
  user-select: none;
}
.rz-wm .k { color: var(--shift-accent); }
.rz-wm--sm { font-size: 22px; }
.rz-wm--md { font-size: 32px; }
.rz-wm--lg { font-size: 44px; }
.rz-wm--xl { font-size: 58px; }

/* ============================================================
   Возрастные группы — строки с inline-редактированием
   ============================================================ */
.rz-grouprow {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 14px 18px;
}
.rz-grouprow:hover { border-color: var(--line-strong); }
.rz-grouprow--new { border-style: dashed; background: var(--surface-2); }
.rz-grouprow-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rz-grouprow-name {
  background: transparent; border: none; outline: none;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  color: var(--ink); padding: 0;
}
.rz-grouprow-name:focus { color: var(--shift-accent); }
.rz-grouprow-range {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ink-2);
}
.rz-grouprow-num {
  width: 60px; padding: 4px 8px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface-2); color: var(--ink);
  font-family: var(--font-display); font-weight: 700;
  text-align: center; font-size: 13px;
}
.rz-grouprow-num:focus { border-color: var(--shift-accent); outline: none; }
.rz-grouprow-cnt {
  font-family: ui-monospace, monospace; font-size: 11.5px;
  color: var(--ink-3); margin-left: 8px;
}
.rz-grouprow-btn {
  width: 34px; height: 34px; border-radius: 8px; flex: none;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.14s;
}
.rz-grouprow-btn:hover { color: var(--shift-accent); border-color: var(--shift-accent); }
.rz-grouprow-btn--del:hover { color: var(--belt-red); border-color: var(--belt-red); }

/* Чипы-шаблоны уровней в онбординге */
.rz-leveltpl { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); margin-bottom: 6px; }
.rz-leveltpl-h { font-family: var(--font-display, ui-monospace, monospace); font-weight: 600; font-size: 10.5px; letter-spacing: 0.12em; color: var(--ink-3); text-transform: uppercase; }
.rz-leveltpl-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.rz-leveltpl-btn {
  padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 99px;
  background: var(--surface); color: var(--ink-2);
  font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: all 0.14s;
}
.rz-leveltpl-btn:hover { border-color: var(--shift-accent); color: var(--shift-accent); }
.rz-leveltpl-btn.active {
  background: var(--shift-accent); color: #fff; border-color: var(--shift-accent);
  box-shadow: 0 6px 18px -8px var(--shift-accent);
}

/* Drag-and-drop уровней в онбординге */
.rz-lvlrow { cursor: default; }
.rz-lvlrow .rz-drag {
  flex: none; width: 22px; height: 22px;
  display: grid; place-items: center;
  color: var(--ink-3); cursor: grab;
  border-radius: 6px;
  transition: color 0.12s, background 0.12s;
}
.rz-lvlrow .rz-drag:hover { color: var(--shift-accent); background: var(--shift-accent-soft); }
.rz-lvlrow .rz-drag:active { cursor: grabbing; }
.rz-lvlrow-drag { opacity: 0.4; }
.rz-lvlrow-over { box-shadow: inset 0 3px 0 var(--shift-accent); background: color-mix(in srgb, var(--shift-accent) 8%, transparent); }
.rz-lvlrow .num-in:disabled { background: var(--surface-3); color: var(--ink-2); cursor: not-allowed; opacity: 0.85; }

/* ============================================================
   Библиотека готовых бейджей в /org/badges/
   ============================================================ */
.rz-blib { margin-top: 32px; }
.rz-blib-head { margin-bottom: 14px; }
.rz-blib-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.rz-blib-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md);
  transition: all 0.14s;
}
.rz-blib-card:hover { border-color: var(--line-strong); }
.rz-blib-card.added { opacity: 0.55; background: var(--surface-2); }
.rz-blib-emoji {
  font-size: 28px; line-height: 1; flex: none;
  width: 42px; height: 42px;
  background: var(--surface-2); border-radius: 11px;
  display: grid; place-items: center;
}
.rz-blib-body { flex: 1; min-width: 0; }
.rz-blib-name { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--ink); line-height: 1.2; }
.rz-blib-desc { color: var(--ink-3); font-size: 11.5px; line-height: 1.35; margin-top: 4px; }
.rz-blib-meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.rz-blib-pts { font-family: var(--font-display); font-weight: 700; font-size: 12px; color: var(--att-present); }
.rz-blib-tag { font-family: var(--font-display); font-weight: 700; font-size: 9.5px; padding: 2px 6px; border-radius: 5px; letter-spacing: 0.08em; }
.rz-blib-tag--auto { background: color-mix(in srgb, var(--att-present) 18%, transparent); color: var(--att-present); }
.rz-blib-tag--manual { background: var(--surface-3); color: var(--ink-3); }
.rz-blib-add {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-3); cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.14s;
}
.rz-blib-add:hover { color: #fff; background: var(--shift-accent); border-color: var(--shift-accent); transform: scale(1.08); }
.rz-blib-added {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: color-mix(in srgb, var(--att-present) 18%, transparent);
  color: var(--att-present); display: grid; place-items: center;
}

/* ============================================================
   Секция «Применить шаблон» на CRUD-страницах (levels/groups/squads)
   ============================================================ */
.rz-tpl-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px; margin-bottom: 18px;
  background: var(--surface); border: 1px dashed var(--line-strong);
  border-radius: var(--r-md); flex-wrap: wrap;
}
.rz-tpl-h { display: flex; align-items: center; gap: 12px; }
.rz-tpl-title {
  font-family: var(--font-display); font-weight: 700; font-size: 14.5px;
  color: var(--ink);
}
.rz-tpl-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.rz-tpl-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.rz-tpl-btn {
  padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 99px;
  background: var(--surface-2); color: var(--ink);
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  cursor: pointer; transition: all 0.14s;
}
.rz-tpl-btn:hover { background: var(--shift-accent); color: #fff; border-color: var(--shift-accent); transform: translateY(-1px); box-shadow: 0 6px 18px -8px var(--shift-accent); }

/* ============================================================
   Выбор пола участника
   ============================================================ */
.rz-gender-pick { display: flex; gap: 8px; }
.rz-gender-pick label {
  flex: 1; cursor: pointer; user-select: none;
  padding: 9px 14px; border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink-2);
  text-align: center; font-weight: 600; font-size: 13.5px;
  transition: all 0.14s;
}
.rz-gender-pick input { position: absolute; opacity: 0; pointer-events: none; }
.rz-gender-pick label:hover { border-color: var(--line-strong); color: var(--ink); }
.rz-gender-pick label:has(input:checked) {
  background: var(--shift-accent); color: #fff; border-color: var(--shift-accent);
  box-shadow: 0 6px 18px -8px var(--shift-accent);
}

/* Бейдж пола в списке участников */
.rz-gender-badge {
  display: inline-grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%;
  font-size: 11px; font-weight: 700; margin-left: 6px;
  vertical-align: middle;
}
.rz-gender-m { background: color-mix(in srgb, var(--blue, #3f7bd6) 22%, transparent); color: var(--blue, #3f7bd6); }
.rz-gender-f { background: color-mix(in srgb, #e25fa3 22%, transparent); color: #e25fa3; }

/* ============================================================
   Выбор темы при создании смены
   ============================================================ */
.rz-themepick { display: flex; gap: 12px; }
.rz-themepick-opt {
  flex: 1; cursor: pointer; user-select: none;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px 12px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface-2);
  transition: all 0.14s;
}
.rz-themepick-opt input { position: absolute; opacity: 0; pointer-events: none; }
.rz-themepick-opt:hover { border-color: var(--line-strong); }
.rz-themepick-opt:has(input:checked) {
  border-color: var(--shift-accent);
  background: color-mix(in srgb, var(--shift-accent) 8%, var(--surface));
  box-shadow: 0 6px 24px -10px var(--shift-accent);
}
.rz-themepick-prev {
  width: 88px; height: 56px;
  border-radius: 10px;
  display: flex; align-items: flex-start; gap: 4px;
  padding: 9px; position: relative; overflow: hidden;
}
.rz-themepick-prev--dark { background: #15130f; border: 1px solid rgba(255,255,255,0.08); }
.rz-themepick-prev--light { background: #f4f1ea; border: 1px solid rgba(23,18,11,0.08); }
.rz-themepick-prev .dot1 { width: 28px; height: 7px; border-radius: 3px; background: var(--shift-accent); }
.rz-themepick-prev .dot2 { width: 18px; height: 7px; border-radius: 3px; flex: none; }
.rz-themepick-prev .dot3 { width: 12px; height: 7px; border-radius: 3px; flex: none; }
.rz-themepick-prev--dark .dot2 { background: rgba(255,255,255,0.18); }
.rz-themepick-prev--dark .dot3 { background: rgba(255,255,255,0.12); }
.rz-themepick-prev--light .dot2 { background: rgba(23,18,11,0.18); }
.rz-themepick-prev--light .dot3 { background: rgba(23,18,11,0.12); }
.rz-themepick-lbl { font-weight: 600; font-size: 13px; color: var(--ink); }

/* Маленькая иконка-кнопка для inline-редактирования (member_detail имя) */
.rz-iconbtn {
  width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-3); cursor: pointer;
  display: inline-grid; place-items: center;
  transition: all 0.14s;
}
.rz-iconbtn:hover { color: var(--shift-accent); border-color: var(--shift-accent); }

/* Заголовок панели редактирования бейджа */
.rz-edit-h {
  font-family: var(--font-display, ui-monospace, monospace);
  font-weight: 700; font-size: 11px; letter-spacing: 0.14em;
  color: var(--ink-3); text-transform: uppercase;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 4px;
}
.rz-bcard-edit { color: var(--ink-3); }
.rz-bcard[open] .rz-bcard-edit i { transform: rotate(180deg); transition: transform 0.2s; }

/* Зелёный баннер: смена бесплатна по промо «первые 10» */
.rz-banner-free {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--att-present), color-mix(in srgb, var(--att-present) 72%, #000));
  color: #fff; padding: 14px 18px; border-radius: var(--r-md);
  font-size: 14px; margin-bottom: 22px;
  box-shadow: 0 16px 34px -18px var(--att-present);
}
.rz-banner-free-em { font-size: 26px; line-height: 1; flex: none; }

/* Стрелки переставновки уровней на /org/levels/ */
.lv-swap { display: flex; flex-direction: column; gap: 3px; flex: none; margin-right: 4px; }
.lv-swap-btn {
  width: 26px; height: 22px; padding: 0;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-3); cursor: pointer;
  display: grid; place-items: center;
  border-radius: 6px;
  transition: all 0.12s;
}
.lv-swap-btn:hover:not(:disabled) {
  color: var(--shift-accent);
  border-color: var(--shift-accent);
  background: var(--shift-accent-soft);
}
.lv-swap-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ============================================================
   Триал + пейволл
   ============================================================ */

/* Баннер «Настройка» (синий) */
.rz-banner-setup {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: color-mix(in srgb, var(--belt-blue, #3f7bd6) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--belt-blue, #3f7bd6) 28%, transparent);
  color: var(--ink); padding: 12px 18px; border-radius: var(--r-md);
  font-size: 13.5px; margin-bottom: 22px;
}

/* Канвас под пейволлом — серый и размытый, всё содержимое заморожено */
.rz-canvas-locked { filter: grayscale(1) opacity(0.5); pointer-events: none; transition: filter 0.5s var(--ease); }

/* Полноэкранная модалка пейволла поверх кабинета */
.rz-paywall-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  padding: 24px;
  animation: rz-pw-in 0.45s var(--ease);
}
@keyframes rz-pw-in { from { opacity: 0; } }
.rz-paywall-modal {
  background: var(--surface); color: var(--ink);
  border-radius: 24px;
  padding: 36px 32px 28px;
  width: 100%; max-width: 440px;
  text-align: center;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,0.55);
  animation: rz-pw-modal-in 0.55s var(--ease);
  border: 1px solid var(--line);
}
@keyframes rz-pw-modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to   { opacity: 1; transform: none; }
}
.rz-paywall-chip {
  display: inline-block;
  font-size: 12px; font-weight: 800;
  background: color-mix(in srgb, var(--gold) 22%, transparent);
  color: #8a6210;
  padding: 6px 14px; border-radius: 99px;
  margin-bottom: 18px;
}
.rz-paywall-title {
  font-family: var(--font-display); font-weight: 800; font-style: italic;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.1; margin-bottom: 12px;
  color: var(--ink);
}
.rz-paywall-text {
  font-size: 14px; color: var(--ink-2);
  line-height: 1.5; margin-bottom: 22px;
}
.rz-paywall-text b { color: var(--ink); }
.rz-paywall-pay {
  width: 100%;
  background: var(--shift-accent); color: #fff;
  border: none; border-radius: 16px;
  padding: 18px;
  font-family: var(--font-display); font-weight: 800; font-style: italic;
  font-size: 17px; cursor: pointer;
  box-shadow: 0 16px 36px -14px var(--shift-accent);
  transition: transform 0.16s var(--ease);
}
.rz-paywall-pay:hover { transform: translateY(-2px); }
.rz-paywall-pay:active { transform: translateY(1px); }
.rz-paywall-note {
  font-size: 12px; color: var(--ink-3);
  margin-top: 12px;
}

/* Кабинет участника: пауза-оверлей */
.rz-frame-locked .rz-mpage { filter: grayscale(1) opacity(0.55); pointer-events: none; transition: filter 0.5s var(--ease); }
.rz-frame-locked .rz-tabbar { filter: grayscale(0.8) opacity(0.55); pointer-events: none; }
.rz-pause-overlay {
  position: absolute; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 24px; text-align: center;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: rz-pause-in 0.45s var(--ease);
}
@keyframes rz-pause-in { from { opacity: 0; transform: scale(0.96); } }
.rz-pause-icon { font-size: 48px; animation: rz-pause-bob 2.4s var(--ease) infinite; }
@keyframes rz-pause-bob { 50% { transform: translateY(-6px); } }
.rz-pause-title {
  font-family: var(--font-display); font-weight: 800; font-style: italic;
  font-size: 22px; color: var(--ink);
}
.rz-pause-text { font-size: 13px; color: var(--ink-2); line-height: 1.45; max-width: 240px; }

/* mobile-frame должен быть позиционирующим контейнером для оверлея */
.rz-mobile-frame { position: relative; }

/* Адаптив таблицы участников на мобилке:
   скрываем колонки Возраст/Отряд/Уровень, их данные показываем мелко под именем */
.rz-mobile-meta { display: none; }
@media (max-width: 860px) {
  .col-desktop { display: none !important; }
  .rz-mobile-meta {
    display: block;
    font-size: 11.5px; color: var(--ink-3);
    margin-top: 3px; line-height: 1.3;
    white-space: normal;
  }
  /* Код-пилюля чуть компактнее */
  .rz-codepill { font-size: 14px; letter-spacing: 1px; padding: 4px 9px; }
  /* Таблица — без nowrap, чтобы имя и Код+Баллы помещались */
  .rz-table th, .rz-table td { white-space: normal !important; padding: 11px 8px; }
  .rz-table th:first-child, .rz-table td:first-child { padding-left: 14px !important; }
  .rz-table th:last-child, .rz-table td:last-child { padding-right: 14px !important; }
}

/* ============================================================
   Рейтинг участника (карточки в стиле дизайна)
   ============================================================ */
.rz-rrank-list { display: flex; flex-direction: column; gap: 8px; }
.rz-rrank-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px;
}
.rz-rrank-row.me { border-color: var(--shift-accent); background: var(--shift-accent-soft); }
.rz-rrank-ava {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 14px;
  letter-spacing: -0.02em;
}
.rz-rrank-info { flex: 1; min-width: 0; }
.rz-rrank-name {
  font-weight: 700; font-size: 14px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rz-rrank-squad {
  font-size: 11.5px; color: var(--ink-3);
  font-style: italic; margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rz-rrank-stat { text-align: right; flex: none; }
.rz-rrank-pts {
  display: flex; align-items: baseline; justify-content: flex-end; gap: 4px;
}
.rz-rrank-pts b {
  font-family: var(--font-display);
  font-weight: 800; font-size: 22px;
  color: var(--ink); letter-spacing: -0.02em;
  font-style: italic;
}
.rz-rrank-pts span {
  font-size: 11px; font-weight: 700;
  color: var(--ink-3); text-transform: uppercase;
  letter-spacing: 0.06em;
}
.rz-rrank-lvl {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--ink-2);
  font-weight: 600; margin-top: 2px;
}
.rz-rrank-lvl::before { content: "🏅"; font-size: 11px; margin-right: -2px; }
.rz-rrank-lvl-dot { display: none; }

/* ============================================================
   Popover / bottom-sheet для форм «Добавить» (members.html и др.)
   ============================================================ */
.rz-popwrap { display: inline-block; }
.rz-popover {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 380px; max-width: 92vw;
  padding: 20px 20px 22px;
  z-index: 130;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  animation: rzModalIn 0.25s var(--ease-spring) both;
}
.rz-popover--wide { width: 480px; }
@keyframes rzModalIn {
  from { opacity: 0; transform: translate(-50%, -48%) scale(0.96); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.rz-pop-h {
  display: flex;
  align-items: center; justify-content: space-between;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.rz-pop-title {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  color: var(--ink);
}
.rz-pop-close {
  width: 32px; height: 32px; border-radius: 8px;
  border: none; background: var(--surface-2); color: var(--ink-2);
  font-size: 22px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.rz-pop-close:hover { background: var(--surface-3); color: var(--ink); }
/* Без backdrop-filter, и на десктопе тоже.
   Размытие заставляет браузер растрировать и размывать всю страницу под
   оверлеем заново на каждом кадре — а кадр случается на каждой букве, которую
   человек печатает в самом попапе, и на каждом мигании курсора. Цена растёт
   вместе со страницей под ним.
   Раньше размытие снимали только на телефоне (до 820px), и тренер с клубом на
   145 учеников на MacBook жаловался ровно на это: «написал три буквы — только
   сейчас появились». На занятии (страница вдвое короче) он же говорил
   «подвисает, но уже не сильно» — цена в точности по размеру страницы.
   Затемнение остаётся, визуально теряется почти ничего. */
.rz-pop-overlay {
  position: fixed; inset: 0; z-index: 125;
  background: rgba(10, 6, 0, 0.72);
  animation: rzFadeIn 0.2s var(--ease) both;
}

/* На мобилке — bottom sheet (открывается снизу, на всю ширину) */
@media (max-width: 720px) {
  .rz-popover, .rz-popover--wide {
    position: fixed !important;
    left: 0 !important; right: 0 !important; bottom: 0 !important;
    top: auto !important;
    width: 100% !important; max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    max-height: 88vh; overflow-y: auto;
    padding: 18px 18px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 130 !important;
    animation: rzSheetUp 0.3s var(--ease) both;
  }
  .rz-pop-h { display: flex; }
  body.rz-pop-open { overflow: hidden; }
}
@keyframes rzSheetUp { from { transform: translateY(100%); } }
@keyframes rzFadeIn { from { opacity: 0; } }

/* Кнопка удаления отряда в карточке (справа сверху, рядом с rz-sq-rank) */
.rz-sq-delete { position: absolute; top: 12px; right: 52px; margin: 0; z-index: 2; }
.rz-sq-delete button {
  width: 28px; height: 28px; border-radius: 8px; padding: 0;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-3); cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.12s;
}
.rz-sq-delete button:hover { color: var(--belt-red); border-color: var(--belt-red); background: color-mix(in srgb, var(--belt-red) 12%, transparent); }
/* Кнопка-карандаш «редактировать отряд» — слева от мусорной корзины,
   справа от ранга. Открывает модалку с полями имя/эмодзи/цвет/девиз. */
.rz-sq-edit { position: absolute; top: 12px; right: 88px; z-index: 2;
  width: 28px; height: 28px; border-radius: 8px; padding: 0;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-3); cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.12s;
}
.rz-sq-edit:hover { color: var(--shift-accent); border-color: var(--shift-accent); background: var(--shift-accent-soft); }
@media (max-width: 720px) {
  /* На мобиле кнопки крупнее для тача */
  .rz-sq-edit, .rz-sq-delete button { width: 34px; height: 34px; }
  .rz-sq-delete { top: 10px; right: 54px; }
  .rz-sq-edit { top: 10px; right: 96px; }
}

/* ============================================================
   Свои модалки (rzAlert / rzConfirm / rzPrompt / rzConfirmDelete)
   ============================================================ */
.rz-modal-wrap { position: fixed; inset: 0; z-index: 1000; animation: rzFadeIn 0.18s var(--ease); }
/* Размытия нет по той же причине, что и у .rz-pop-overlay: в этих окнах
   заводят уровень, награду, причину баллов — то есть печатают, а размытие
   переписывает всю страницу под собой на каждой букве. */
.rz-modal-overlay {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.rz-modal {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 420px; max-width: calc(100vw - 32px);
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: rzModalIn 0.22s var(--ease-spring);
}
.rz-modal-h {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
}
.rz-modal-title {
  font-family: var(--font-display); font-weight: 700; font-size: 17px;
  letter-spacing: -0.01em; color: var(--ink);
}
.rz-modal-body {
  padding: 14px 22px 0; font-size: 14px; line-height: 1.5;
  color: var(--ink-2);
}
.rz-modal-body:last-of-type { padding-bottom: 4px; }
.rz-modal-body b { color: var(--ink); font-weight: 700; }
.rz-modal-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  outline: none;
  transition: border-color 0.14s;
}
.rz-modal-input:focus { border-color: var(--shift-accent); background: var(--surface); }
.rz-modal-foot {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 20px 22px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  margin-top: 18px;
}
.rz-modal-foot .btn { min-width: 100px; justify-content: center; }
.btn-danger {
  background: var(--belt-red, #e24b48); color: #fff;
  box-shadow: 0 10px 24px -12px var(--belt-red, #e24b48);
  font-family: var(--font-body); font-weight: 700; font-size: 14px;
  border: none; border-radius: var(--r-md); padding: 11px 18px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 9px;
}
.btn-danger:hover:not(:disabled) { filter: brightness(1.05); }
.btn-danger:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
@media (max-width: 540px) {
  .rz-modal { width: calc(100vw - 24px); }
  .rz-modal-foot .btn { flex: 1; min-width: 0; }
}

/* Подсветка поля «Возраст», автоматически заполненного из даты рождения */
.rz-autofilled {
  background: color-mix(in srgb, var(--att-present) 12%, var(--surface-2)) !important;
  border-color: color-mix(in srgb, var(--att-present) 36%, var(--line)) !important;
}

/* Акцентное поле — для важных выборов, которые легко пропустить (напр. отряд) */
.rz-field--accent > select,
.rz-field--accent > input {
  background: color-mix(in srgb, var(--shift-accent) 6%, var(--surface-2)) !important;
  border-color: color-mix(in srgb, var(--shift-accent) 40%, var(--line)) !important;
}
.rz-field--accent.rz-field--ok > select,
.rz-field--accent.rz-field--ok > input {
  background: color-mix(in srgb, var(--att-present) 10%, var(--surface-2)) !important;
  border-color: color-mix(in srgb, var(--att-present) 38%, var(--line)) !important;
}

/* Подсказка/ошибка под полем (DOB) */
.rz-hint--ok { color: var(--att-present) !important; }
.rz-hint--err { color: var(--att-absent) !important; }
.rz-input--err {
  border-color: var(--att-absent) !important;
  background: color-mix(in srgb, var(--att-absent) 8%, var(--surface-2)) !important;
}

/* Клуб — switch (тумблер) */
.rz-switch { display:inline-block; position:relative; width:42px; height:24px; flex:none; cursor:pointer; }
.rz-switch input { opacity:0; width:0; height:0; position:absolute; }
.rz-switch-track {
  position:absolute; inset:0; border-radius:24px;
  background:var(--line); transition:background 0.15s;
}
.rz-switch-track::before {
  content:""; position:absolute; left:3px; top:3px;
  width:18px; height:18px; border-radius:50%;
  background:#fff; transition:transform 0.15s;
  box-shadow:0 1px 3px rgba(0,0,0,0.2);
}
.rz-switch input:checked + .rz-switch-track { background:var(--shift-accent); }
.rz-switch input:checked + .rz-switch-track::before { transform:translateX(18px); }

/* Клуб — правила баллов */
.rz-pr-row, .rz-pr-add {
  display:flex; align-items:center; gap:8px;
  padding:10px; border-radius:10px;
  background:var(--surface); border:1px solid var(--line);
}
.rz-pr-add { background:color-mix(in srgb, var(--shift-accent) 6%, var(--surface-2)); border:1px dashed color-mix(in srgb, var(--shift-accent) 35%, var(--line)); }
.rz-pr-emoji { width:50px; text-align:center; padding:6px; border:1px solid var(--line); border-radius:7px; background:var(--surface-2); }
.rz-pr-name { flex:1; padding:8px 10px; border:1px solid var(--line); border-radius:7px; background:var(--surface-2); font-size:14px; }
.rz-pr-val { width:80px; padding:8px 10px; border:1px solid var(--line); border-radius:7px; background:var(--surface-2); font-size:14px; font-weight:700; text-align:center; font-family:var(--font-body); }
.rz-pr-name:focus, .rz-pr-val:focus, .rz-pr-emoji:focus { outline:none; border-color:var(--shift-accent); }
/* Пикер эмодзи оборачивает поле в .rz-emoji-field шириной 100%, и обёртка
   съедала строку: значок растягивался, а название сжималось до обрезки.
   В строке правила обёртка должна быть по размеру самого поля. */
.rz-pr-row .rz-emoji-field, .rz-pr-add .rz-emoji-field { width:62px; flex:none; }

/* Клуб — попап выбора правила для начисления */
.rz-rules-pick { display:flex; flex-direction:column; gap:5px; max-height:300px; overflow-y:auto; padding:4px; }
.rz-rules-pick button {
  display:flex; align-items:center; gap:10px; text-align:left;
  padding:8px 12px; border-radius:8px;
  background:var(--surface); border:1px solid var(--line); cursor:pointer;
  transition:all 0.1s;
}
.rz-rules-pick button:hover { border-color:var(--shift-accent); }
.rz-rules-pick .rz-rule-em { font-size:18px; flex:none; }
.rz-rules-pick .rz-rule-name { flex:1; font-size:13.5px; font-weight:600; color:var(--ink); }
.rz-rules-pick .rz-rule-val { font-weight:800; font-family:var(--font-body); font-size:14px; }
.rz-rules-pick .rz-rule-val.pos { color:var(--att-present); }
.rz-rules-pick .rz-rule-val.neg { color:var(--att-absent); }

/* Маленькая кнопка «+ Баллы» рядом с учеником */
.rz-att-ptsbtn {
  display:inline-flex; align-items:center; gap:4px;
  padding:6px 10px; border-radius:7px;
  background:color-mix(in srgb, var(--shift-accent) 10%, var(--surface-2));
  border:1px solid color-mix(in srgb, var(--shift-accent) 32%, var(--line));
  color:var(--shift-accent); font-size:12px; font-weight:700; cursor:pointer;
}
.rz-att-ptsbtn:hover { background:color-mix(in srgb, var(--shift-accent) 18%, var(--surface-2)); }

/* Клуб — нормативы (список уровней и элементов) */
.rz-lvl-order {
  width:34px; height:34px; flex:none;
  display:grid; place-items:center;
  background:var(--surface); border:1px solid var(--line); border-radius:50%;
  font-weight:800; font-size:14px; color:var(--ink-2);
}
.rz-el-row {
  display:flex; align-items:center; gap:8px;
  padding:8px 10px; border-radius:10px;
  background:var(--surface); border:1px solid var(--line);
}
.rz-el-num {
  width:24px; height:24px; flex:none;
  display:grid; place-items:center;
  background:var(--surface-2); border-radius:50%;
  font-size:11.5px; font-weight:700; color:var(--ink-3);
}
.rz-el-input {
  flex:1; min-width:0;
  font-family:var(--font-body); font-size:14px;
  background:transparent; border:none; padding:6px 4px; color:var(--ink);
}
.rz-el-input:focus { outline:none; background:var(--surface-2); border-radius:6px; }
.rz-el-add {
  display:flex; gap:8px; padding:10px; border:1px dashed var(--line-strong); border-radius:10px;
  background:color-mix(in srgb, var(--surface) 50%, transparent);
}
.rz-el-add input {
  flex:1; min-width:0;
  font-family:var(--font-body); font-size:14px;
  background:var(--surface); border:1px solid var(--line); padding:8px 10px; border-radius:8px; color:var(--ink);
}
.rz-el-add input:focus { outline:none; border-color:var(--shift-accent); }

/* Клуб — чек-лист элементов на карточке ученика */
.rz-elcheck {
  display:flex; align-items:center; gap:12px;
  padding:10px 14px; border-radius:10px;
  background:var(--surface); border:1px solid var(--line);
  cursor:pointer; transition:all 0.12s;
  margin:0;
}
.rz-elcheck:hover { border-color:var(--line-strong); }
.rz-elcheck-btn {
  width:24px; height:24px; flex:none;
  display:grid; place-items:center;
  background:var(--surface-2); border:2px solid var(--line); border-radius:7px;
  cursor:pointer; color:transparent; transition:all 0.12s;
}
.rz-elcheck-name { font-size:14px; color:var(--ink-2); flex:1; }
.rz-elcheck--on { background:color-mix(in srgb, var(--att-present) 12%, var(--surface)); border-color:color-mix(in srgb, var(--att-present) 38%, var(--line)); }
.rz-elcheck--on .rz-elcheck-btn { background:var(--att-present); border-color:var(--att-present); color:#fff; }
.rz-elcheck--on .rz-elcheck-name { color:var(--ink); font-weight:600; }

/* Клуб — экран «Сегодня» */
.rz-today-time {
  flex:none;
  width:64px; height:64px;
  display:grid; place-items:center;
  background:color-mix(in srgb, var(--sq-color, var(--shift-accent)) 18%, var(--surface));
  border:1px solid color-mix(in srgb, var(--sq-color, var(--shift-accent)) 38%, var(--line));
  border-radius:14px;
}
.rz-today-time .num { font-size:18px; font-weight:800; color:var(--ink); font-family:var(--font-body); }
.rz-pastrow {
  display:flex; align-items:center; gap:12px;
  padding:10px 14px; border-radius:10px;
  background:var(--surface); border:1px solid var(--line);
  transition:all 0.12s;
}
.rz-pastrow:hover { border-color:var(--line-strong); }
.rz-pastrow-date { display:flex; flex-direction:column; align-items:center; min-width:42px; flex:none; }

/* Клуб — расписание группы */
.rz-schedrow { display:grid; grid-template-columns:repeat(7, 1fr); gap:8px; }
@media (max-width: 720px) { .rz-schedrow { grid-template-columns:repeat(4, 1fr); } }
.rz-schedday {
  display:flex; flex-direction:column; align-items:center; gap:6px;
  padding:10px 6px; border-radius:10px;
  background:var(--surface); border:1px solid var(--line);
  cursor:pointer; transition:all 0.14s;
}
.rz-schedday input[type=checkbox] { display:none; }
.rz-schedday-name { font-size:12.5px; font-weight:700; text-transform:uppercase; color:var(--ink-3); letter-spacing:.08em; }
.rz-schedday-time { width:100%; font-size:13px; font-family:var(--font-body); padding:6px; border:1px solid var(--line); border-radius:6px; background:var(--surface-2); color:var(--ink-3); text-align:center; pointer-events:none; opacity:.55; }
.rz-schedday--on { background:color-mix(in srgb, var(--shift-accent) 12%, var(--surface)); border-color:color-mix(in srgb, var(--shift-accent) 45%, var(--line)); }
.rz-schedday--on .rz-schedday-name { color:var(--shift-accent); }
.rz-schedday--on .rz-schedday-time { pointer-events:auto; opacity:1; color:var(--ink); background:var(--surface); border-color:color-mix(in srgb, var(--shift-accent) 35%, var(--line)); }

/* Клуб — посещаемость тренировки (3 состояния) */
.rz-att-counter { display:flex; flex-direction:column; align-items:flex-end; line-height:1.1; }
.rz-att-counter .num { font-size:22px; font-weight:700; color:var(--ink); }
.rz-att-list { display:flex; flex-direction:column; gap:6px; }
.rz-att-block { display:flex; flex-direction:column; gap:0; }
.rz-att-row {
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
  padding:10px 14px; border-radius:10px;
  background:var(--surface); border:1px solid var(--line);
  transition:all 0.14s;
}
.rz-att-row .rz-att-name { flex:1; min-width:160px; }
.rz-att-row:hover { border-color:var(--line-strong); }
.rz-att-elbtn {
  display:inline-flex; align-items:center; gap:4px;
  padding:6px 10px; border-radius:7px;
  background:var(--surface-2); border:1px solid var(--line);
  color:var(--ink-2); font-size:12px; font-weight:700; cursor:pointer;
  transition:all 0.12s;
}
.rz-att-elbtn:hover { border-color:var(--shift-accent); color:var(--shift-accent); }
.rz-att-el {
  padding:10px 14px 12px 38px;
  background:color-mix(in srgb, var(--surface-2) 70%, transparent);
  border:1px solid var(--line); border-top:none;
  border-radius:0 0 10px 10px;
  margin-top:-2px;
}
.rz-elcheck-mini { padding:6px 10px; font-size:13px; background:var(--surface); border:1px solid var(--line); cursor:pointer; text-align:left; }
.rz-elcheck-mini .rz-elcheck-btn { width:20px; height:20px; }
.rz-elcheck-mini .rz-elcheck-name { font-size:13px; }
.rz-att-name { font-size:14px; font-weight:600; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rz-att-3 { display:flex; gap:4px; flex:none; flex-wrap:wrap; justify-content:flex-end; }
.rz-att-3 input[type=radio] { display:none; }
.rz-att-3 label {
  display:flex; align-items:center; gap:4px;
  padding:6px 10px; border-radius:7px; cursor:pointer;
  font-size:12.5px; font-weight:700; user-select:none;
  background:var(--surface-2); color:var(--ink-3); border:1px solid var(--line);
  transition:all 0.12s;
}
.rz-att-3 label:hover { border-color:var(--line-strong); }
.rz-att-3 input:checked + label[data-st="present"] { background:var(--att-present); color:#fff; border-color:var(--att-present); }
.rz-att-3 input:checked + label[data-st="late"] { background:var(--att-late, #E89B2B); color:#fff; border-color:var(--att-late, #E89B2B); }
.rz-att-3 input:checked + label[data-st="absent"] { background:var(--att-absent); color:#fff; border-color:var(--att-absent); }
.rz-att-3 input:checked + label[data-st="excused"] { background:#64748b; color:#fff; border-color:#64748b; }

/* Stat-grid — компактные числовые карточки для дашборда */
.rz-statgrid { display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:12px; }
.rz-statcard {
  padding:14px 16px; border-radius:14px;
  background:var(--surface); border:1px solid var(--line);
}
.rz-statcard .cap { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; color:var(--ink-3); margin-bottom:6px; }
.rz-statcard .num { font-family:var(--font-body); font-size:28px; font-weight:800; line-height:1; color:var(--ink); }

/* Табы — для рейтинга, дашбордов и т.п. */
.rz-tabs { display:inline-flex; gap:4px; padding:4px; background:var(--surface); border:1px solid var(--line); border-radius:999px; }
.rz-tabs a {
  display:inline-flex; align-items:center; gap:6px;
  padding:8px 14px; border-radius:999px;
  font-size:13px; font-weight:700; color:var(--ink-3); text-decoration:none;
  transition:all 0.12s;
}
.rz-tabs a:hover { color:var(--ink-2); }
.rz-tabs a.on { background:var(--shift-accent); color:#fff; }
.rz-tabs--small a { padding:6px 12px; font-size:12px; }

/* База учеников — фильтр контекста (все/клуб/лагерь/новые) */
.rz-rosterfilter { display:flex; gap:4px; padding:3px; background:var(--surface-2); border:1px solid var(--line); border-radius:999px; }
.rz-rosterfilter button {
  flex:1; padding:6px 10px; border-radius:999px;
  border:none; background:transparent;
  font-size:11.5px; font-weight:700; color:var(--ink-3); cursor:pointer;
  transition:all 0.12s;
}
.rz-rosterfilter button:hover { color:var(--ink-2); }
.rz-rosterfilter button.on { background:var(--shift-accent); color:#fff; }

/* База учеников — список с чекбоксами в попапе */
.rz-roster-list { display:flex; flex-direction:column; gap:4px; max-height:380px; overflow-y:auto; border:1px solid var(--line); border-radius:var(--r-md); padding:6px; background:var(--surface-2); }
.rz-roster-item { display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:8px; cursor:pointer; transition:background 0.12s; }
.rz-roster-item:hover { background:var(--surface); }
.rz-roster-item input[type=checkbox] { width:16px; height:16px; margin:0; cursor:pointer; flex:none; }
.rz-roster-body { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.rz-roster-name { font-size:14px; font-weight:600; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rz-roster-meta { font-size:12px; color:var(--ink-3); display:flex; align-items:center; gap:2px; flex-wrap:wrap; }
.rz-roster-item--on { opacity:0.55; cursor:not-allowed; }
.rz-roster-item--on:hover { background:transparent; }
.rz-roster-del { flex:none; background:transparent; border:1px solid transparent; color:var(--ink-3); padding:5px 7px; border-radius:6px; cursor:pointer; transition:all 0.12s; }
.rz-roster-del:hover { background:color-mix(in srgb, var(--att-absent) 14%, transparent); color:var(--att-absent); border-color:color-mix(in srgb, var(--att-absent) 28%, transparent); }

/* ============ ЕДИНЫЙ ЭМОДЗИ-ПИКЕР ============
   Один компонент на весь клубный режим: достижения, магазин, группы, уровни,
   нормативы, правила баллов. На десктопе — компактное окно у поля, на
   телефоне — нижняя панель с крупными кнопками. */
.rz-emoji-field { position: relative; display: inline-flex; align-items: center; width: 100%; }
.rz-emoji-field > input { width: 100%; padding-right: 34px !important; }
.rz-emoji-open-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border: none; border-radius: 7px; cursor: pointer;
  background: var(--surface-2); color: var(--ink-3); font-size: 14px; line-height: 1;
  display: grid; place-items: center; padding: 0;
}
.rz-emoji-open-btn:hover { background: var(--line); color: var(--ink); }
.rz-emoji-open-btn:focus-visible { outline: 2px solid var(--shift-accent); outline-offset: 1px; }

.rz-emoji-pop {
  position: absolute; z-index: 9999; display: none;
  width: 340px; max-width: calc(100vw - 16px);
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 14px; box-shadow: 0 20px 60px -14px rgba(0,0,0,.45);
  flex-direction: column; overflow: hidden;
}
.rz-emoji-pop.open { display: flex; }

.rz-emoji-head { display: flex; gap: 8px; padding: 10px 10px 8px; align-items: center; }
.rz-emoji-search {
  flex: 1; min-width: 0; height: 34px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface-2); color: var(--ink); font-size: 14px;
}
.rz-emoji-search:focus { outline: none; border-color: var(--shift-accent); }
.rz-emoji-close {
  flex: none; width: 30px; height: 30px; border: none; border-radius: 8px;
  background: transparent; color: var(--ink-3); font-size: 15px; cursor: pointer;
}
.rz-emoji-close:hover { background: var(--surface-2); color: var(--ink); }

.rz-emoji-tabs {
  display: flex; gap: 2px; padding: 0 8px 6px; overflow-x: auto;
  scrollbar-width: none; border-bottom: 1px solid var(--line);
}
.rz-emoji-tabs::-webkit-scrollbar { display: none; }
.rz-emoji-tab {
  flex: none; width: 32px; height: 30px; border: none; border-radius: 8px;
  background: transparent; font-size: 16px; cursor: pointer; padding: 0;
  opacity: .55; line-height: 1;
}
.rz-emoji-tab:hover { background: var(--surface-2); opacity: .9; }
.rz-emoji-tab.on { background: var(--shift-accent-soft, var(--surface-2)); opacity: 1; }

.rz-emoji-title {
  padding: 7px 12px 4px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3);
}
.rz-emoji-grid {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px;
  padding: 0 8px 8px; max-height: 240px; overflow-y: auto; overscroll-behavior: contain;
}
.rz-emoji-cell {
  aspect-ratio: 1; border: none; border-radius: 7px; background: transparent;
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0;
}
.rz-emoji-cell:hover { background: var(--surface-2); }
.rz-emoji-cell:focus-visible { outline: 2px solid var(--shift-accent); outline-offset: -2px; }
.rz-emoji-hint {
  padding: 8px 12px 10px; font-size: 11.5px; line-height: 1.4;
  color: var(--ink-3); border-top: 1px solid var(--line); background: var(--surface-2);
}

/* Телефон — нижняя панель во всю ширину, кнопки под палец. */
.rz-emoji-pop.mobile {
  position: fixed; inset: auto 0 0 0; width: 100%; max-width: none;
  border-radius: 18px 18px 0 0; border-bottom: none;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -20px 60px -10px rgba(0,0,0,.6);
}
.rz-emoji-pop.mobile .rz-emoji-search { height: 42px; font-size: 16px; }
.rz-emoji-pop.mobile .rz-emoji-close { width: 38px; height: 38px; font-size: 17px; }
.rz-emoji-pop.mobile .rz-emoji-tab { width: 42px; height: 38px; font-size: 19px; }
.rz-emoji-pop.mobile .rz-emoji-grid {
  grid-template-columns: repeat(7, 1fr); gap: 4px; max-height: 46dvh;
}
.rz-emoji-pop.mobile .rz-emoji-cell { font-size: 26px; border-radius: 9px; }
body.rz-emoji-open { overflow: hidden; }
@media (min-width: 641px) { body.rz-emoji-open { overflow: auto; } }
