:root {
  --bg: #05080f;
  --s1: #0b1220;
  --s2: #101b2d;
  --s3: #172238;
  --s4: #1d2b46;
  --b: #ffffff0d;
  --b2: #ffffff1a;
  --b3: #ffffff26;
  --a: #4f8ef7;
  --a2: #7ab3ff;
  --ag: linear-gradient(135deg, #4f8ef7 0%, #7c3aed 100%);
  --green: #22d3a5;
  --yellow: #fbbf24;
  --red: #f87171;
  --purple: #a78bfa;
  --orange: #fb923c;
  --t1: #eef2ff;
  --t2: #7a90b8;
  --t3: #394d6e;
  --r: 18px;
  --rs: 13px;
  --pt: max(env(safe-area-inset-top, 0px), 44px);
  --pb: env(safe-area-inset-bottom, 0px);
  --app-vh: 100vh;
  --ios-app-gap: 0px;
  --bnav-safe-bottom: clamp(0px, env(safe-area-inset-bottom, 0px), 18px);
  --glow-a: 0 0 20px rgba(79, 142, 247, 0.25);
  --glow-g: 0 0 20px rgba(34, 211, 165, 0.2);
  --shell-gap: 16px;
  --card-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  --glass: rgba(11, 18, 32, 0.76);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
mark.hl {
  background: rgba(79, 142, 247, 0.3);
  color: var(--t1);
  border-radius: 3px;
}
html {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}
body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--t1);
  font-family: 'Onest', sans-serif;
  width: 100%;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: pan-y;
}
html.is-ios,
body.is-ios {
  height: calc(var(--app-vh) + var(--ios-app-gap));
  min-height: calc(var(--app-vh) + var(--ios-app-gap));
}
html.modal-open,
body.modal-open {
  overscroll-behavior: none;
}
button,
input,
select,
textarea,
a,
[role='button'] {
  touch-action: manipulation;
}

/* NOISE TEXTURE OVERLAY */
body::after {
  content: '';
  position: fixed;
  inset: 0 0 calc(-1 * var(--ios-app-gap)) 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 2;
  opacity: 0.4;
}

/* SCREENS */
.scr {
  position: fixed;
  inset: 0 0 calc(-1 * var(--ios-app-gap)) 0;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  min-height: 100dvh;
  transition:
    transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.32s;
  will-change: transform;
  background: var(--bg);
}
.scr.out {
  transform: translateX(100%);
  pointer-events: none;
  opacity: 0;
}
.scr.back {
  transform: translateX(-20%);
  pointer-events: none;
  opacity: 0;
}

/* HEADER */
.hdr {
  padding: calc(env(safe-area-inset-top, 50px) + 14px) 16px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(5, 8, 15, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--b);
  flex-shrink: 0;
  z-index: 10;
}
.btn-bk {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--s2);
  border: 1px solid var(--b2);
  color: var(--t2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background 0.15s,
    color 0.15s;
}
.btn-bk:active {
  background: var(--s3);
  color: var(--t1);
}
.hdr-mid {
  flex: 1;
  min-width: 0;
}
.hdr-mid h1 {
  font-family: 'Unbounded';
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}
.hdr-mid p {
  font-size: 12px;
  color: var(--t3);
  margin-top: 2px;
}
.hdr-build {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-top: 6px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 9px;
  font-weight: 700;
  font-family: 'Unbounded';
  letter-spacing: 0.24px;
  color: var(--t3);
}
.btn-h {
  height: 40px;
  border-radius: 10px;
  background: var(--s2);
  border: 1px solid var(--b2);
  color: var(--t2);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: all 0.15s;
}
.btn-h:active {
  background: var(--s3);
}
.btn-h.ac {
  background: var(--ag);
  border: none;
  color: #fff;
  box-shadow: 0 4px 16px rgba(79, 142, 247, 0.3);
}
.btn-h.ac:active {
  opacity: 0.85;
}
.btn-h.gr {
  background: rgba(34, 211, 165, 0.1);
  border-color: rgba(34, 211, 165, 0.2);
  color: var(--green);
}
.btn-h.rd {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.18);
  color: var(--red);
}

/* SCROLL */
.scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  padding-bottom: var(--bnav-h, 80px);
  touch-action: pan-y pinch-zoom;
}
.scroll::-webkit-scrollbar,
.modal::-webkit-scrollbar,
.modal-list-frame::-webkit-scrollbar,
.sheet::-webkit-scrollbar,
.dchips::-webkit-scrollbar,
.ac-drop::-webkit-scrollbar {
  display: none;
}

/* BOTTOM NAV */
.bnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  background: #05080f;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-bottom: var(--bnav-safe-bottom);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}
.bnav-inner {
  display: flex;
  gap: 4px;
  padding: 6px 8px 4px;
  width: 100%;
}
.nb {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 16px;
  min-height: 48px;
  transition:
    color 0.15s,
    background 0.15s;
  color: rgba(255, 255, 255, 0.32);
  -webkit-tap-highlight-color: transparent;
}
.nb.on {
  color: var(--a2);
  background: rgba(79, 142, 247, 0.12);
}
.nb.is-locked {
  position: relative;
  color: rgba(255, 255, 255, 0.46);
}
.nb.is-locked::after {
  content: '🔒';
  position: absolute;
  top: 5px;
  right: 10px;
  font-size: 10px;
  opacity: 0.85;
}
.nb-ic {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nb-ic svg {
  width: 22px;
  height: 22px;
  display: block;
}
.nb.on .nb-ic {
  transform: scale(1.08) translateY(-1px);
}
.nb-lb {
  font-size: 11px;
  font-weight: 700;
  font-family: 'Unbounded';
  color: inherit;
  letter-spacing: 0.2px;
  text-align: center;
  white-space: nowrap;
}
.install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--pb) + 18px);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 13px;
  border-radius: 20px;
  background: rgba(8, 13, 22, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 70;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.install-banner.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.install-banner-copy {
  flex: 1;
  min-width: 0;
}
.install-banner-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.install-banner-sub {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--t2);
}
.install-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.install-banner-btn {
  min-height: 42px;
  padding: 0 14px;
  border: none;
  border-radius: 14px;
  background: var(--ag);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.install-banner-close {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--t2);
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}
body.has-tabbar .install-banner {
  bottom: calc(var(--pb) + 92px);
}
body.is-standalone .install-banner {
  display: none;
}
body.is-standalone .hdr {
  padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
}

/* HERO */
.hero {
  margin: 14px;
  border-radius: 22px;
  padding: 20px 20px 18px;
  background: linear-gradient(150deg, #0e2040 0%, #0b1a33 50%, #08111f 100%);
  border: 1px solid rgba(79, 142, 247, 0.12);
  position: relative;
  overflow: hidden;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 142, 247, 0.15), transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.08), transparent 65%);
  pointer-events: none;
}
.hero-tag {
  font-family: 'Unbounded';
  font-size: 10px;
  font-weight: 700;
  color: var(--a2);
  letter-spacing: 2px;
  opacity: 0.68;
  text-transform: uppercase;
}
.hero-big {
  font-family: 'Unbounded';
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
  margin: 8px 0 3px;
  background: linear-gradient(135deg, #fff 30%, #8ab5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 11px;
  color: var(--t3);
  margin-bottom: 16px;
}
.hero-chips {
  display: flex;
  gap: 8px;
}
.hchip {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
  backdrop-filter: blur(8px);
}
.hchip-v {
  font-family: 'Unbounded';
  font-size: 16px;
  font-weight: 700;
}
.hchip-l {
  font-size: 10px;
  color: var(--t3);
  margin-top: 2px;
}

/* PROGRESS */
.prog {
  margin: 0 14px 14px;
  background: var(--s1);
  border-radius: var(--r);
  padding: 14px 16px;
  border: 1px solid var(--b);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.prog-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  align-items: center;
}
.prog-tl {
  font-family: 'Unbounded';
  font-size: 11px;
  font-weight: 600;
  color: var(--t3);
  letter-spacing: 0.4px;
}
.prog-vl {
  font-family: 'Unbounded';
  font-size: 13px;
  font-weight: 700;
  color: var(--a2);
}
.pbar {
  height: 7px;
  background: var(--s3);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}
.pfill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--a), var(--green));
  transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.pfill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: shimmer 2.5s infinite;
  border-radius: 99px;
}
@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 200%;
  }
}
.prog-bot {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
  color: var(--t3);
}

/* SECTION */
.sec {
  font-family: 'Unbounded';
  font-size: 10px;
  font-weight: 700;
  color: var(--t3);
  letter-spacing: 1.1px;
  text-transform: uppercase;
  padding: 0 16px;
  margin-bottom: 10px;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sec-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--a2);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.2px;
  text-transform: none;
}
.sec-top {
  margin-top: 24px;
}
.content-pad-inline-sm {
  padding: 0 14px 4px;
}

/* QUARTER GRID */
.qgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 0 14px;
  margin-bottom: 4px;
}
.qcard {
  --quarter-color: var(--a2);
  background: var(--s1);
  border: 1px solid var(--b);
  border-radius: 18px;
  padding: 14px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.15s;
}
.qcard:active {
  transform: scale(0.96);
}
.qcard::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent);
  pointer-events: none;
}
.qcard-glow {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0.15;
  pointer-events: none;
  background: radial-gradient(circle, var(--quarter-color), transparent 70%);
}
.qcard-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  border-radius: 18px 18px 0 0;
  background: var(--quarter-color);
}
.qcard-q {
  font-family: 'Unbounded';
  font-size: 10px;
  font-weight: 700;
  color: var(--t3);
  letter-spacing: 0.8px;
  margin-top: 4px;
}
.qcard-name {
  font-size: 10px;
  font-weight: 600;
  margin-top: 2px;
  color: var(--quarter-color);
}
.qcard-num {
  font-family: 'Unbounded';
  font-size: 26px;
  font-weight: 900;
  margin-top: 8px;
  line-height: 1;
}
.qcard-sub {
  font-size: 10px;
  color: var(--t3);
  margin-top: 2px;
}
.qmini {
  height: 3px;
  background: var(--s3);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 8px;
}
.qmfill {
  height: 100%;
  border-radius: 99px;
}
.qcard-metrics {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.qcard-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.qcard-label {
  font-size: 10px;
  color: var(--t3);
}
.qcard-value {
  font-family: 'Unbounded';
  font-size: 13px;
  font-weight: 700;
  color: var(--t3);
}
.qcard-value.is-accent {
  color: var(--quarter-color);
}
.qcard-value.is-positive {
  color: var(--green);
}
.qcard-value-sub {
  font-size: 10px;
  font-weight: 400;
  color: var(--t3);
}

/* NEXT EVENT CARD */
.next-ev {
  margin: 0 14px 14px;
  background: var(--s1);
  border-radius: var(--r);
  padding: 14px 16px;
  border: 1px solid rgba(79, 142, 247, 0.18);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow:
    0 0 0 1px rgba(79, 142, 247, 0.05),
    0 4px 24px rgba(79, 142, 247, 0.08);
}
.next-ic {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(79, 142, 247, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.next-info {
  flex: 1;
  min-width: 0;
}
.next-title {
  font-size: 11px;
  color: var(--a2);
  font-family: 'Unbounded';
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 0.4px;
  opacity: 0.84;
}
.next-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.next-meta {
  font-size: 10px;
  color: var(--t3);
  margin-top: 2px;
}
.next-days {
  font-family: 'Unbounded';
  font-size: 20px;
  font-weight: 900;
  color: var(--a2);
  flex-shrink: 0;
  text-align: center;
  line-height: 1;
}
.next-days span {
  display: block;
  font-size: 9px;
  color: var(--t3);
  font-weight: 400;
  margin-top: 2px;
}

/* EVENT CARDS */
.evlist {
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.evcard {
  background: var(--s1);
  border: 1px solid var(--b);
  border-radius: 14px;
  padding: 12px 48px 12px 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  transition:
    background 0.15s,
    box-shadow 0.15s;
  position: relative;
}
.evcard:active {
  background: var(--s2);
}
.evcard.status-done {
  border-left: 3px solid var(--green);
  box-shadow: inset 3px 0 12px rgba(34, 211, 165, 0.05);
}
.evcard.status-cancelled {
  opacity: 0.45;
}
.evic {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}
.evic.is-active {
  background: rgba(34, 211, 165, 0.1);
}
.evinfo {
  flex: 1;
  min-width: 0;
}
.evtop {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.ev-mini-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: var(--t2);
  background: var(--s2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.ev-mini-pill.tone-hot {
  background: rgba(251, 191, 36, 0.14);
  color: var(--yellow);
  border-color: rgba(251, 191, 36, 0.22);
}
.ev-mini-pill.tone-warm {
  background: rgba(79, 142, 247, 0.14);
  color: var(--a2);
  border-color: rgba(79, 142, 247, 0.22);
}
.ev-mini-pill.tone-done {
  background: rgba(34, 211, 165, 0.14);
  color: var(--green);
  border-color: rgba(34, 211, 165, 0.22);
}
.ev-mini-pill.tone-muted {
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
  border-color: rgba(248, 113, 113, 0.18);
}
.ev-mini-pill.tone-soft {
  background: rgba(255, 255, 255, 0.04);
  color: var(--t3);
}
.ev-extra-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 500;
  padding: 0 7px;
  height: 18px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--t3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: 0.01em;
}
.evname {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.evmeta span + span::before {
  content: ' · ';
  opacity: 0.5;
}
.evmeta {
  font-size: 11px;
  color: var(--t3);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ev-status {
  font-size: 10px;
  font-weight: 700;
  font-family: 'Unbounded';
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0.15px;
}
.ev-status.planned {
  background: rgba(79, 142, 247, 0.1);
  color: var(--a2);
}
.ev-status.done {
  background: rgba(34, 211, 165, 0.1);
  color: var(--green);
}
.ev-status.cancelled {
  background: rgba(248, 113, 113, 0.08);
  color: var(--red);
}
.evside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 48px;
  flex-shrink: 0;
}
.evcnt {
  background: var(--s2);
  border-radius: 9px;
  padding: 5px 9px;
  font-family: 'Unbounded';
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--t2);
  min-width: 32px;
  text-align: center;
}
.evcnt.has {
  background: rgba(34, 211, 165, 0.12);
  color: var(--green);
}
.evcnt-sub {
  display: none;
  font-size: 9px;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Q HEADER in event list */
.q-group-hdr {
  --quarter-color: var(--a2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 8px;
  cursor: pointer;
}
.q-group-hdr-l {
  font-family: 'Unbounded';
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--quarter-color);
}
.q-group-hdr-r {
  font-size: 10px;
  color: var(--t3);
}

/* SEARCH */
.sbox {
  margin: 10px 14px 0;
  position: relative;
}
.sinput {
  width: 100%;
  background: var(--s1);
  border: 1px solid var(--b2);
  border-radius: var(--r);
  padding: 12px 14px 12px 42px;
  font-size: 16px;
  font-family: 'Onest';
  color: var(--t1);
  outline: none;
  -webkit-appearance: none;
  transition: border-color 0.15s;
}
.sinput:focus {
  border-color: rgba(79, 142, 247, 0.5);
  box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.08);
}
.sic {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
}
.sclr {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--s3);
  border: none;
  color: var(--t2);
  font-size: 14px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* DEPT CHIPS */
.dchips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 14px 0;
  scrollbar-width: none;
}
.dchips::-webkit-scrollbar {
  display: none;
}
.dchip {
  flex-shrink: 0;
  background: var(--s1);
  border: 1px solid var(--b2);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  color: var(--t2);
  white-space: nowrap;
  transition: all 0.15s;
}
.dchip.on {
  background: rgba(79, 142, 247, 0.12);
  border-color: rgba(79, 142, 247, 0.3);
  color: var(--a2);
}

/* PEOPLE FILTER */
.people-filter-row {
  padding: 12px 14px 0;
}
.people-filter-label {
  display: block;
  margin: 0 0 6px 2px;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Unbounded';
  letter-spacing: 0.24px;
  color: var(--t3);
  text-transform: uppercase;
}
.people-filter-select-wrap {
  position: relative;
}
.people-filter-select-wrap::after {
  content: '▾';
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--t3);
  font-size: 12px;
  font-family: 'Unbounded';
  pointer-events: none;
}
.people-filter-select {
  width: 100%;
  min-height: 48px;
  padding: 12px 42px 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--b2);
  background: rgba(11, 18, 32, 0.92);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  color: var(--t1);
  font-size: 16px;
  font-family: 'Onest';
  appearance: none;
  -webkit-appearance: none;
}
.people-filter-select:focus {
  border-color: rgba(79, 142, 247, 0.5);
  box-shadow:
    0 0 0 3px rgba(79, 142, 247, 0.08),
    0 8px 22px rgba(0, 0, 0, 0.18);
}
select.people-filter-select option {
  background: var(--s2);
  color: var(--t1);
}

/* PEOPLE LIST */
.plist {
  padding: 10px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.prow {
  background: var(--s1);
  border: 1px solid var(--b);
  border-radius: 14px;
  padding: 11px 13px;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  transition: background 0.12s;
}
.prow:active {
  background: var(--s2);
}
#ppl-list {
  gap: 10px;
  padding-bottom: 18px;
}
.people-directory-row {
  position: relative;
  align-items: center;
  gap: 13px;
  min-height: 80px;
  padding: 13px 14px 13px 18px;
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.98), rgba(10, 17, 29, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  transition:
    transform 0.12s,
    background 0.12s,
    border-color 0.12s,
    box-shadow 0.12s;
}
.people-directory-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}
.people-directory-row:active {
  transform: scale(0.992);
  background: linear-gradient(180deg, rgba(13, 21, 36, 0.98), rgba(10, 17, 29, 0.98));
}
.people-directory-row.is-mk-team::before {
  background: linear-gradient(180deg, rgba(167, 139, 250, 1), rgba(124, 58, 237, 0.86));
}
.people-directory-row.is-active::before {
  background: linear-gradient(180deg, rgba(34, 211, 165, 1), rgba(79, 142, 247, 0.9));
}
.people-directory-row.is-idle::before {
  background: linear-gradient(180deg, rgba(122, 144, 184, 0.88), rgba(57, 77, 110, 1));
}
.people-directory-row-avatar {
  margin-top: 2px;
}
.people-directory-row.is-mk-team .pav {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.86), rgba(167, 139, 250, 0.48));
  color: #fff;
  border: 1px solid rgba(167, 139, 250, 0.26);
}
.people-directory-row.is-active .pav {
  background: rgba(34, 211, 165, 0.14);
  color: var(--green);
  border: 1px solid rgba(34, 211, 165, 0.18);
}
.people-directory-row.is-idle .pav {
  background: rgba(255, 255, 255, 0.05);
  color: var(--t2);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.people-directory-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.people-directory-row-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}
.people-directory-row-status {
  font-size: 11px;
  line-height: 1.45;
  word-break: break-word;
  color: var(--t3);
}
.people-directory-row-status.is-mk-team {
  color: var(--purple);
}
.people-directory-row-status.is-active {
  color: var(--green);
}
.people-directory-row-status.is-idle {
  color: var(--t2);
}
.people-directory-row-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 8px;
}
.people-directory-row-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  font-family: 'Unbounded';
  font-size: 15px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.people-directory-row-mark.is-mk-team {
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.22), rgba(124, 58, 237, 0.14));
  border-color: rgba(167, 139, 250, 0.2);
  color: #f5ddff;
  font-size: 11px;
  letter-spacing: 0.35px;
}
.people-directory-row-mark.is-active {
  background: rgba(34, 211, 165, 0.14);
  border-color: rgba(34, 211, 165, 0.2);
  color: var(--green);
}
.people-directory-row-mark.is-idle {
  background: rgba(122, 144, 184, 0.12);
  border-color: rgba(122, 144, 184, 0.16);
  color: var(--t2);
}
.people-directory-row-count {
  min-width: 46px;
  text-align: center;
}
.people-directory-row-count strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: var(--t1);
  font-family: 'Unbounded';
}
.people-directory-row-count span {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  font-weight: 700;
  color: var(--t3);
  font-family: 'Unbounded';
  letter-spacing: 0.15px;
}
.people-card {
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.98), rgba(10, 17, 29, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.12s,
    background 0.12s,
    border-color 0.12s;
}
.people-card:active {
  transform: scale(0.992);
  background: linear-gradient(180deg, rgba(13, 21, 36, 0.98), rgba(10, 17, 29, 0.98));
}
.people-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.people-card-main {
  flex: 1;
  min-width: 0;
}
.people-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.people-card-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}
.people-card-score {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  background: var(--s2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Unbounded';
  font-size: 14px;
  font-weight: 700;
  color: var(--t3);
  flex-shrink: 0;
}
.people-card-score.is-active {
  background: rgba(34, 211, 165, 0.14);
  color: var(--green);
}
.people-card-meta {
  font-size: 12px;
  color: var(--t2);
  margin-top: 5px;
  line-height: 1.5;
  word-break: break-word;
}
.people-card-sub {
  font-size: 11px;
  color: var(--t3);
  margin-top: 3px;
  line-height: 1.45;
  word-break: break-word;
}
.people-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.people-card-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 10px;
  font-weight: 700;
  color: var(--t2);
  font-family: 'Unbounded';
  letter-spacing: 0.15px;
}
.people-card-chip.is-mk {
  background: rgba(167, 139, 250, 0.14);
  border-color: rgba(167, 139, 250, 0.24);
  color: var(--purple);
}
.people-card-chip.is-mk-dir {
  background: rgba(79, 142, 247, 0.12);
  border-color: rgba(79, 142, 247, 0.2);
  color: var(--a2);
}
.people-card-chip.is-award {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.22);
  color: var(--yellow);
}
.people-card-chip.is-access {
  background: rgba(79, 142, 247, 0.12);
  border-color: rgba(79, 142, 247, 0.2);
  color: var(--a2);
}
.people-card-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.people-card-fact {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 10px 11px;
}
.people-card-fact span {
  display: block;
  font-size: 10px;
  color: var(--t3);
  font-family: 'Unbounded';
  letter-spacing: 0.35px;
}
.people-card-fact strong {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--t1);
  line-height: 1.3;
}
.pav {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--s2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--t2);
  flex-shrink: 0;
  font-family: 'Unbounded';
}
.pav.mk {
  background: rgba(79, 142, 247, 0.14);
  color: var(--a2);
  border: 1px solid rgba(79, 142, 247, 0.2);
}
.pinf {
  flex: 1;
  min-width: 0;
}
.pfio {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pdept {
  font-size: 10px;
  color: var(--t3);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ppills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.ppill {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.ppill-mk {
  background: rgba(79, 142, 247, 0.18);
  color: var(--a2);
}
.ppill-score {
  background: rgba(34, 211, 165, 0.14);
  color: var(--green);
}
.ppill-info {
  background: rgba(79, 142, 247, 0.14);
  color: var(--a2);
}
.ppill-zero {
  background: rgba(255, 255, 255, 0.05);
  color: var(--t3);
  font-weight: 400;
}
.pbadge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Unbounded';
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.pbadge.b0 {
  background: var(--s2);
  color: var(--t3);
}
.pbadge.b1 {
  background: rgba(79, 142, 247, 0.13);
  color: var(--a2);
}
.pbadge.b2 {
  background: rgba(34, 211, 165, 0.13);
  color: var(--green);
}
.pbadge.b3 {
  background: rgba(251, 191, 36, 0.13);
  color: var(--yellow);
}
.pbadge.b4 {
  background: rgba(244, 114, 182, 0.13);
  color: #f472b6;
}
.pbadge.bm {
  background: rgba(248, 113, 113, 0.1);
  color: var(--red);
  font-size: 11px;
}
.pbadge.tone-success {
  background: rgba(34, 211, 165, 0.12);
  color: var(--green);
}
.pbadge.tone-muted {
  background: var(--s2);
  color: var(--t3);
}
/* QUICK SCORE BUTTONS */
.pqbtns {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}
.pqbtn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  font-family: 'Unbounded';
  font-size: 12px;
  font-weight: 700;
  color: var(--t3);
  background: var(--s2);
  flex-shrink: 0;
  transition:
    background 0.12s,
    color 0.12s,
    transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pqbtn:active {
  transform: scale(0.88);
  opacity: 0.75;
}
.pqbtn.on1 {
  background: rgba(79, 142, 247, 0.2);
  color: var(--a2);
}
.pqbtn.on2 {
  background: rgba(34, 211, 165, 0.2);
  color: var(--green);
}
.warn {
  background: rgba(79, 142, 247, 0.15);
  color: var(--a2);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 700;
  font-family: 'Unbounded';
  margin-left: 5px;
}
.cm-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--a2);
  margin-left: 6px;
  display: inline-block;
  vertical-align: middle;
}

/* SCORE PICKER SHEET */
.overlay {
  position: fixed;
  inset: 0;
  padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
  background: rgba(0, 0, 0, 0.7);
  z-index: 420;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.25s;
}
.overlay.hide {
  opacity: 0;
  pointer-events: none;
}
.sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--s1);
  border-radius: 28px 28px 0 0;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 10px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y pinch-zoom;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
  border-top: 1px solid var(--b2);
  scrollbar-width: none;
}
.sheet::before {
  content: '';
  display: block;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  margin: 10px auto 8px;
}
.overlay.hide .sheet {
  transform: translateY(100%);
}
.sh-handle {
  width: 36px;
  height: 4px;
  background: var(--b3);
  border-radius: 99px;
  margin: 12px auto 0;
}
.sh-person {
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--b);
}
.picker-section-label {
  padding: 12px 18px 0;
  font-size: 10px;
  font-weight: 700;
  color: var(--t3);
  font-family: 'Unbounded';
  letter-spacing: 0.5px;
}
.picker-section-hint {
  padding: 4px 18px 0;
  font-size: 11px;
  color: var(--t3);
}
.sh-name {
  font-size: 17px;
  font-weight: 700;
  font-family: 'Unbounded';
  letter-spacing: -0.3px;
}
.sh-dept {
  font-size: 11px;
  color: var(--t3);
  margin-top: 3px;
}
.sopts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px 18px;
}
.sopt {
  border-radius: 14px;
  padding: 14px 10px;
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
}
.sopt:active {
  transform: scale(0.95);
}
.sopt-v {
  font-size: 26px;
  font-weight: 900;
  font-family: 'Unbounded';
}
.sopt-l {
  font-size: 11px;
  margin-top: 3px;
  font-weight: 500;
}
.s-none {
  background: rgba(255, 255, 255, 0.04);
  color: var(--t3);
}
.s1 {
  background: rgba(79, 142, 247, 0.1);
  color: var(--a2);
}
.s2 {
  background: rgba(34, 211, 165, 0.1);
  color: var(--green);
}
.s3 {
  background: rgba(251, 191, 36, 0.1);
  color: var(--yellow);
}
.s4 {
  background: rgba(244, 114, 182, 0.1);
  color: #f472b6;
}
.sm {
  background: rgba(248, 113, 113, 0.08);
  color: var(--red);
}
.sopt.active {
  border-color: currentColor;
  box-shadow:
    0 0 0 1px currentColor inset,
    0 4px 16px rgba(0, 0, 0, 0.2);
}
.cm-wrap {
  padding: 0 18px 12px;
}
.cm-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--t3);
  font-family: 'Unbounded';
  letter-spacing: 0.5px;
  margin-bottom: 7px;
}
.cm-input {
  width: 100%;
  background: var(--s2);
  border: 1px solid var(--b2);
  border-radius: var(--rs);
  padding: 10px 13px;
  font-size: 16px;
  font-family: 'Onest';
  color: var(--t1);
  outline: none;
  resize: none;
  min-height: 70px;
  -webkit-appearance: none;
  transition: border-color 0.15s;
}
.cm-input:focus {
  border-color: rgba(79, 142, 247, 0.45);
}
.cm-hint {
  font-size: 10px;
  color: var(--t3);
  margin-top: 4px;
}
.sh-actions {
  display: flex;
  gap: 9px;
  padding: 0 18px;
}
.btn-save {
  flex: 1;
  background: var(--ag);
  border: none;
  border-radius: var(--rs);
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Onest';
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(79, 142, 247, 0.25);
}
.btn-cancel {
  background: var(--s2);
  border: 1px solid var(--b2);
  border-radius: var(--rs);
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Onest';
  color: var(--t2);
  cursor: pointer;
}

/* MODALS */
.mover {
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 12, 0.68);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
  padding-bottom: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 430;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  transition: opacity 0.2s;
}
.mover.hide {
  opacity: 0;
  pointer-events: none;
}
.modal {
  width: min(100%, 640px);
  margin: 0 auto;
  background: var(--s1);
  border-radius: 28px 28px 0 0;
  padding: 0 18px calc(env(safe-area-inset-bottom, 0px) + 12px);
  max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 10px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scroll-padding-top: 88px;
  scroll-padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 72px);
  touch-action: pan-y pinch-zoom;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 1px solid var(--b2);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
  scrollbar-width: none;
}
.modal.modal-compact {
  width: min(100%, 320px);
  max-width: 320px;
  margin: auto;
}
.modal.modal-wide {
  width: min(100%, 600px);
  max-width: 600px;
  margin: 0 auto;
}
.mover.hide .modal {
  transform: translateY(100%);
}
body.modal-open .bnav {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}
.modal-title {
  font-family: 'Unbounded';
  font-size: 16px;
  font-weight: 700;
  padding: 20px 0 14px;
  border-bottom: 1px solid var(--b);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: -0.3px;
}
.modal-title::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transform: translateX(-50%);
}
.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--s2);
  border: 1px solid var(--b2);
  color: var(--t2);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-copy {
  font-size: 13px;
  color: var(--t2);
  margin: -2px 0 16px;
  line-height: 1.6;
}
.modal-copy.pre-line {
  white-space: pre-line;
}
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-inline-note {
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(79, 142, 247, 0.12);
  border: 1px solid rgba(122, 179, 255, 0.2);
  color: var(--t2);
  font-size: 12px;
  line-height: 1.5;
}
.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.modal-field .fl {
  margin-bottom: 0;
}
.modal-field .fi {
  margin-bottom: 0;
}
.modal-field-note {
  color: var(--t3);
  font-size: 12px;
  line-height: 1.35;
}
.modal-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.modal-ac-wrap {
  position: relative;
}
.modal-ac-wrap .fi {
  margin-bottom: 0;
}
.modal-note {
  font-size: 11px;
  color: var(--t3);
  line-height: 1.55;
}
.modal-note.compact {
  margin-top: -8px;
}
.modal-card-note {
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(79, 142, 247, 0.08);
  border: 1px solid rgba(79, 142, 247, 0.16);
  font-size: 12px;
  color: var(--t2);
  line-height: 1.55;
}
.modal-card-note.warn {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.16);
}
.modal-card-note.danger {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.16);
}
.modal-card-note:empty,
.modal-event-chip:empty {
  display: none;
}
.modal-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.modal-menu .btn-sec {
  margin-top: 0;
}
.export-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.export-group-kicker {
  font-family: 'Unbounded';
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--t3);
  padding-top: 2px;
}
.modal-danger-zone {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.modal-search-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.modal-search-row .fi {
  margin-bottom: 0;
}
.modal-search-grow {
  flex: 1;
}
.modal-filter-select {
  width: 96px;
  flex: 0 0 96px;
}
.modal-list-frame {
  max-height: min(55dvh, 420px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px;
  touch-action: pan-y pinch-zoom;
  scrollbar-width: none;
}
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}
.modal-actions-inline {
  flex-direction: row;
}
.modal-actions-top {
  margin-top: 14px;
}
.modal-actions > .btn-p,
.modal-actions > .btn-d,
.modal-actions > .btn-sec {
  margin-top: 0;
}
.modal-actions-inline > * {
  flex: 1;
}
.modal-event-chip {
  font-size: 12px;
  color: var(--a2);
  font-weight: 600;
  padding: 8px 12px;
  background: rgba(79, 142, 247, 0.08);
  border-radius: var(--rs);
  line-height: 1.5;
}
.modal-status {
  min-height: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--green);
  margin-top: 8px;
}
.modal-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--b2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}
.modal-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--a);
  margin-top: 1px;
  flex-shrink: 0;
}
.modal-check-copy {
  font-size: 13px;
  color: var(--t2);
  line-height: 1.45;
}
.modal-range-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 0 4px;
}
.modal-range-row span {
  font-size: 11px;
  color: var(--t3);
}
.modal-foot-space {
  height: 8px;
}
label.fl {
  font-size: 10px;
  font-weight: 700;
  color: var(--t3);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: 'Unbounded';
  display: block;
  margin-bottom: 6px;
}
.fi {
  width: 100%;
  background: var(--s2);
  border: 1px solid var(--b2);
  border-radius: var(--rs);
  padding: 12px 13px;
  font-size: 16px;
  font-family: 'Onest';
  color: var(--t1);
  outline: none;
  -webkit-appearance: none;
  margin-bottom: 14px;
  transition: border-color 0.15s;
}
.fi:focus {
  border-color: rgba(79, 142, 247, 0.45);
  box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.07);
}
textarea.fi {
  min-height: 92px;
  resize: vertical;
  line-height: 1.45;
}
select.fi option {
  background: var(--s2);
  color: var(--t1);
}
.btn-p {
  width: 100%;
  background: var(--ag);
  border: none;
  border-radius: var(--rs);
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Onest';
  color: #fff;
  cursor: pointer;
  margin-top: 4px;
  box-shadow: 0 4px 20px rgba(79, 142, 247, 0.25);
  transition: opacity 0.15s;
}
.btn-p:active {
  opacity: 0.85;
}
.btn-d {
  width: 100%;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: var(--rs);
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Onest';
  color: var(--red);
  cursor: pointer;
  margin-top: 8px;
}
.btn-d.btn-d-subtle {
  background: transparent;
  border-color: rgba(248, 113, 113, 0.12);
  border-style: dashed;
  color: rgba(248, 113, 113, 0.88);
}
.btn-sec {
  width: 100%;
  background: var(--s2);
  border: 1px solid var(--b2);
  border-radius: var(--rs);
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Onest';
  color: var(--t2);
  cursor: pointer;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.12s;
}
.btn-sec:active {
  background: var(--s3);
}
.btn-sec.btn-sec-danger {
  background: rgba(248, 113, 113, 0.05);
  border-color: rgba(248, 113, 113, 0.14);
  color: var(--red);
}

/* STATS */
.sg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 14px;
}
.sc {
  background: var(--s1);
  border: 1px solid var(--b);
  border-radius: 18px;
  padding: 16px 14px;
  overflow: hidden;
  position: relative;
}
.sc::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 142, 247, 0.06), transparent 70%);
  pointer-events: none;
}
.sc-v {
  font-family: 'Unbounded';
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}
.sc-l {
  font-size: 11px;
  color: var(--t3);
  margin-top: 5px;
}
.sc-note {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--t2);
}
.ti {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--b);
  cursor: pointer;
  transition: background 0.12s;
}
.ti:active {
  background: var(--s1);
}
.ti-r {
  width: 26px;
  font-family: 'Unbounded';
  font-size: 13px;
  font-weight: 700;
  color: var(--t3);
  text-align: center;
  flex-shrink: 0;
}
.ti-r.g1 {
  color: #fbbf24;
}
.ti-r.g2 {
  color: #94a3b8;
}
.ti-r.g3 {
  color: #d97706;
}
.ti-inf {
  flex: 1;
  min-width: 0;
}
.ti-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ti-dept {
  font-size: 10px;
  color: var(--t3);
}
.ti-sc {
  font-family: 'Unbounded';
  font-size: 20px;
  font-weight: 700;
  color: var(--green);
}
.stats-section-card {
  background: var(--s1);
  border: 1px solid var(--b);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}
.stats-section-card-muted {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
}
.stats-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
/* Переключатель режима рейтинга */
.stats-rating-tabs {
  display: flex;
  flex-shrink: 0;
  gap: 4px;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 3px;
  margin-top: 4px;
}
.stats-rating-tab {
  border: none;
  background: transparent;
  color: var(--a2);
  font-family: 'Onest', sans-serif;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}
.stats-rating-tab.is-active {
  background: var(--a);
  color: #fff;
}
.stats-section-kicker {
  font-family: 'Unbounded';
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--a2);
}
.stats-section-title {
  margin-top: 8px;
  font-family: 'Unbounded';
  font-size: 16px;
  line-height: 1.28;
}
.stats-section-copy {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--t2);
}
.stats-list-frame {
  margin-top: 12px;
}
.stats-list-frame .ti {
  padding-left: 0;
  padding-right: 0;
  background: transparent;
}
.stats-list-frame .ti:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.stats-list-frame-gap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stats-list-frame-gap .prow {
  box-shadow: none;
}
.dist-bar {
  display: flex;
  height: 8px;
  border-radius: 99px;
  overflow: hidden;
  gap: 2px;
  margin-top: 8px;
}
.dist-seg {
  height: 100%;
  border-radius: 99px;
  min-width: 3px;
}

/* PERSON DETAIL */
.pd-av {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--s3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  font-family: 'Unbounded';
  color: var(--t2);
  margin-bottom: 12px;
}
.pd-av.mk {
  background: rgba(79, 142, 247, 0.15);
  color: var(--a2);
  border: 1px solid rgba(79, 142, 247, 0.2);
}
.mk-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(79, 142, 247, 0.12);
  color: var(--a2);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(79, 142, 247, 0.18);
  margin-bottom: 12px;
}
.ehi {
  background: var(--s2);
  border-radius: var(--rs);
  padding: 10px 12px;
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--b);
}
.ehi-b {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Unbounded';
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.ehi-i {
  flex: 1;
  min-width: 0;
}
.ehi-n {
  font-size: 12px;
  font-weight: 600;
}
.ehi-c {
  font-size: 11px;
  color: var(--t3);
  margin-top: 3px;
  font-style: italic;
}
.ehi-ed {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--s3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
  border: 1px solid var(--b);
}
.person-sheet {
  padding: 20px 0 10px;
}
.person-sheet-shell {
  padding: 0 20px 0;
}
.person-sheet-hero {
  padding: 0 0 8px;
}
.person-sheet-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.person-sheet-avatar {
  margin-bottom: 14px;
}
.person-sheet-avatar .av-circle {
  box-shadow: 0 8px 24px rgba(79, 142, 247, 0.2);
}
.person-avatar-link {
  font-size: 11px;
  color: var(--a2);
  cursor: pointer;
}
.person-avatar-link.danger {
  color: var(--red);
}
.person-sheet-name {
  font-family: 'Unbounded';
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 4px;
  word-break: break-word;
}
.person-sheet-meta {
  font-size: 12px;
  color: var(--t2);
  line-height: 1.55;
  word-break: break-word;
}
.person-sheet-meta-sub {
  color: var(--t3);
  margin-top: 2px;
}
.person-sheet-stats {
  margin-top: 16px;
}
.person-section-title {
  margin-top: 20px;
}
.person-access-card,
.person-org-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 14px 15px;
}
.person-access-card.is-blocked {
  border-color: rgba(248, 113, 113, 0.24);
  background: rgba(248, 113, 113, 0.06);
}
.person-access-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.person-access-copy {
  flex: 1;
  min-width: 0;
}
.person-access-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.person-access-login {
  font-size: 11px;
  color: var(--a2);
  margin-top: 4px;
  line-height: 1.45;
  word-break: break-word;
}
.person-access-note {
  font-size: 11px;
  color: var(--t2);
  line-height: 1.55;
  margin-top: 10px;
  word-break: break-word;
}
.person-org-kicker {
  font-size: 10px;
  font-family: 'Unbounded';
  font-weight: 700;
  letter-spacing: 0.45px;
  color: var(--purple);
  text-transform: uppercase;
}
.person-org-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  margin-top: 8px;
}
.person-org-note {
  font-size: 11px;
  color: var(--t2);
  line-height: 1.6;
  margin-top: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}
.award-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 6px;
}
.award-toggle-card {
  min-height: 96px;
  border: none;
  border-radius: 14px;
  background: var(--s1);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  text-align: center;
  color: var(--t2);
  font: inherit;
  cursor: pointer;
  transition:
    background 0.12s,
    border-color 0.12s,
    color 0.12s;
}
.award-toggle-card.is-active {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.35);
  color: var(--yellow);
}
.award-toggle-card:disabled {
  cursor: default;
  opacity: 1;
}
.award-toggle-icon {
  font-size: 18px;
  line-height: 1;
}
.award-toggle-quarter {
  font-size: 10px;
  font-weight: 700;
  font-family: 'Unbounded';
  letter-spacing: 0.3px;
}
.award-toggle-note {
  font-size: 10px;
  line-height: 1.4;
  color: var(--t3);
}
.award-toggle-card.is-active .award-toggle-note {
  color: rgba(255, 255, 255, 0.68);
}
.person-sheet-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.person-sheet-links .btn-sec {
  margin-top: 0;
}
.person-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.person-sheet-actions .btn-sec,
.person-sheet-actions .btn-d {
  margin-top: 0;
}

.yugra-row {
  background: var(--s1);
  border: 1px solid var(--b);
  border-radius: var(--r);
  padding: 10px 12px;
}
.yugra-ev-name {
  font-size: 13px;
  line-height: 1.4;
}
.yugra-sel {
  margin: 4px 0 0 !important;
  font-size: 12px !important;
  padding: 6px 8px !important;
}

/* LOGIN */
.login-scr {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 44px) + 30px) 24px 30px;
  position: relative;
  overflow: hidden;
}
.login-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
}
.login-orb-1 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(79, 142, 247, 0.15), transparent 70%);
  top: -100px;
  right: -80px;
  animation: orb1 8s ease-in-out infinite alternate;
}
.login-orb-2 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.12), transparent 70%);
  bottom: -60px;
  left: -60px;
  animation: orb2 10s ease-in-out infinite alternate;
}
.login-orb-3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(34, 211, 165, 0.08), transparent 70%);
  bottom: 30%;
  right: 10%;
  animation: orb3 7s ease-in-out infinite alternate;
}
@keyframes orb1 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-30px, 20px) scale(1.1);
  }
}
@keyframes orb2 {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(20px, -30px) scale(1.15);
  }
}
@keyframes orb3 {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-20px, 20px);
  }
}
.login-logo {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: linear-gradient(135deg, #1a3a6e, #2563eb);
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  box-shadow:
    0 20px 50px rgba(37, 99, 235, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  position: relative;
  z-index: 1;
}
.login-title {
  font-family: 'Unbounded';
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}
.login-sub {
  font-size: 12px;
  color: var(--t3);
  text-align: center;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}
.login-gr {
  font-size: 14px;
  color: var(--t2);
  text-align: center;
  min-height: 20px;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}
.login-form {
  width: 100%;
  max-width: 300px;
  position: relative;
  z-index: 1;
}
.login-input {
  width: 100%;
  background: rgba(16, 27, 45, 0.9);
  border: 1px solid var(--b2);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 16px;
  font-family: 'Onest';
  color: var(--t1);
  outline: none;
  -webkit-appearance: none;
  margin-bottom: 10px;
  display: block;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  backdrop-filter: blur(8px);
}
.login-input:focus {
  border-color: rgba(79, 142, 247, 0.5);
  box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.1);
}
.pwd-wrap {
  position: relative;
  margin-bottom: 10px;
}
.pwd-wrap .login-input {
  margin-bottom: 0;
  padding-right: 48px;
}
.pwd-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--t3);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}
.login-btn {
  width: 100%;
  background: var(--ag);
  border: none;
  border-radius: 14px;
  padding: 15px;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Onest';
  color: #fff;
  cursor: pointer;
  margin-top: 4px;
  transition:
    opacity 0.15s,
    box-shadow 0.15s;
  box-shadow: 0 6px 24px rgba(79, 142, 247, 0.35);
}
.login-btn:active {
  opacity: 0.85;
}
.login-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}
.login-err {
  font-size: 12px;
  color: var(--red);
  font-weight: 600;
  text-align: center;
  min-height: 18px;
  margin-top: 10px;
  transition: opacity 0.3s;
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(5px);
  }
}
.shake {
  animation: shake 0.4s;
}

/* STAR / FAV */
.star-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.35;
  transition:
    opacity 0.15s,
    transform 0.15s;
  z-index: 2;
}
.star-btn.on {
  opacity: 1;
}
.star-btn:active {
  transform: translateY(-50%) scale(0.85);
}
.evcard {
  position: relative;
}

/* USER MANAGEMENT */
.usr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--b);
  background: var(--s1);
  cursor: pointer;
  transition: background 0.12s;
}
.usr-row:active {
  background: var(--s2);
}
.usr-av {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--s2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--t2);
  flex-shrink: 0;
  font-family: 'Unbounded';
}
.usr-av.admin {
  background: rgba(251, 191, 36, 0.12);
  color: var(--yellow);
  border: 1px solid rgba(251, 191, 36, 0.2);
}
.usr-av.editor {
  background: rgba(34, 211, 165, 0.12);
  color: var(--green);
  border: 1px solid rgba(34, 211, 165, 0.2);
}
.usr-av.supervisor {
  background: rgba(167, 139, 250, 0.12);
  color: var(--purple);
  border: 1px solid rgba(167, 139, 250, 0.2);
}
.usr-av.worker {
  background: rgba(251, 146, 60, 0.12);
  color: var(--orange);
  border: 1px solid rgba(251, 146, 60, 0.2);
}
.usr-av.viewer {
  background: rgba(79, 142, 247, 0.1);
  color: var(--a2);
  border: 1px solid rgba(79, 142, 247, 0.18);
}
.usr-av.blocked {
  background: rgba(248, 113, 113, 0.08);
  color: var(--red);
}
.usr-inf {
  flex: 1;
  min-width: 0;
}
.usr-name {
  font-size: 13px;
  font-weight: 600;
}
.usr-meta {
  font-size: 10px;
  color: var(--t3);
  margin-top: 2px;
}
.role-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  font-family: 'Unbounded';
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.3px;
}
.rb-admin {
  background: rgba(251, 191, 36, 0.12);
  color: var(--yellow);
}
.rb-editor {
  background: rgba(34, 211, 165, 0.1);
  color: var(--green);
}
.rb-supervisor {
  background: rgba(167, 139, 250, 0.1);
  color: var(--purple);
}
.rb-worker {
  background: rgba(251, 146, 60, 0.1);
  color: var(--orange);
}
.rb-viewer {
  background: rgba(79, 142, 247, 0.1);
  color: var(--a2);
}
.rb-blocked {
  background: rgba(248, 113, 113, 0.08);
  color: var(--red);
}

/* TABS */
.tabs {
  display: flex;
  gap: 0;
  padding: 0 14px;
  margin-top: 10px;
  border-bottom: 1px solid var(--b);
  flex-shrink: 0;
}
.tab {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  font-family: 'Unbounded';
  font-size: 10px;
  font-weight: 700;
  color: var(--t3);
  cursor: pointer;
  letter-spacing: 0.5px;
  border-bottom: 2px solid transparent;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.tab.on {
  color: var(--a2);
  border-bottom-color: var(--a2);
}

/* EVENT HERO (Kinopoisk style) */
.ev-hero {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  flex-shrink: 0;
}
.ev-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-color: var(--s2);
}
.ev-hero-ov {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.05) 35%,
    rgba(5, 8, 15, 0) 55%,
    rgba(5, 8, 15, 0.98) 100%
  );
}
.ev-hero-hdr {
  position: absolute;
  top: calc(env(safe-area-inset-top, 44px) + 8px);
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 5;
}
.ev-hero-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(5, 8, 15, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  flex-shrink: 0;
}
.ev-hero-edit-btn {
  height: 40px;
  border-radius: 10px;
  background: rgba(5, 8, 15, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ev-hero-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px 14px;
}
.ev-hero-ic {
  font-size: 30px;
  display: block;
  margin-bottom: 6px;
  line-height: 1;
}
.ev-hero-name {
  font-family: 'Unbounded';
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 10px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}
.ev-hero-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ev-hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  letter-spacing: 0.2px;
}
.ev-hero-chip.is-custom {
  background: var(--chip-bg);
  color: var(--chip-fg);
  border: 1px solid var(--chip-bd);
}
.ev-hero-chip.is-date {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.ev-hero-chip.is-status-planned {
  background: rgba(79, 142, 247, 0.3);
  color: #7ab3ff;
  border: 1px solid rgba(122, 179, 255, 0.35);
}
.ev-hero-chip.is-status-done {
  background: rgba(34, 211, 165, 0.3);
  color: #22d3a5;
  border: 1px solid rgba(34, 211, 165, 0.35);
}
.ev-hero-chip.is-status-cancelled {
  background: rgba(248, 113, 113, 0.25);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.35);
}
.ev-hero-chip.is-personal {
  background: rgba(255, 255, 255, 0.12);
  color: #f8d88e;
  border: 1px solid rgba(248, 216, 142, 0.28);
}
.ev-hero-meta {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}
.ev-hero-cam-wrap {
  position: absolute;
  right: 12px;
  bottom: 68px;
  display: flex;
  gap: 6px;
  z-index: 4;
}
.ev-hero-cam {
  background: rgba(5, 8, 15, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.ev-hero-cam-del {
  background: rgba(248, 113, 113, 0.25);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #f87171;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

/* STATS BAR */
.ev-stats-bar {
  padding: 12px 16px 10px;
  background: var(--s1);
  border-bottom: 1px solid var(--b);
  flex-shrink: 0;
}
.ev-stats-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 7px;
}
.ev-stats-n {
  font-family: 'Unbounded';
  font-size: 16px;
  font-weight: 700;
}
.ev-stats-t {
  font-size: 12px;
  color: var(--t3);
}
.ev-stats-pct {
  font-family: 'Unbounded';
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
}
.ev-stats-hint {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--t3);
}
.ev-stats-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.ev-stats-action {
  flex: 1;
  min-height: 42px;
  border: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--t2);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.ev-stats-action.on {
  background: rgba(79, 142, 247, 0.16);
  color: var(--a2);
}
.ev-tabs-sticky {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  flex-shrink: 0;
}
.ev-overview-card {
  margin: 12px 14px 0;
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(165deg, rgba(14, 24, 40, 0.96), rgba(10, 17, 29, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}
.ev-overview-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.ev-overview-kicker {
  font-family: 'Unbounded';
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--a2);
}
.ev-overview-title {
  margin-top: 8px;
  font-family: 'Unbounded';
  font-size: 17px;
  line-height: 1.28;
  letter-spacing: -0.25px;
}
.ev-overview-badge {
  min-width: 60px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(79, 142, 247, 0.12);
  color: var(--a2);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.ev-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.ev-overview-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 10px 11px;
}
.ev-overview-cell span {
  display: block;
  font-size: 10px;
  color: var(--t3);
  font-family: 'Unbounded';
  letter-spacing: 0.3px;
}
.ev-overview-cell strong {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--t1);
  word-break: break-word;
}
.ev-overview-note {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--t2);
}
.ev-personal-note-own {
  color: var(--a2);
  opacity: 0.8;
}
.ev-personal-note-other {
  color: var(--purple);
  opacity: 0.75;
}
.ev-overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.ev-overview-btn {
  flex: 1;
  min-height: 44px;
  border: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--t2);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.ev-overview-btn.is-primary {
  background: rgba(79, 142, 247, 0.16);
  color: var(--a2);
  border: 1px solid rgba(79, 142, 247, 0.16);
}
.ev-btn-edit {
  background: rgba(255, 255, 255, 0.05);
  color: var(--t2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.ev-btn-delete {
  background: rgba(248, 113, 113, 0.08);
  color: var(--red);
  border: 1px solid rgba(248, 113, 113, 0.16);
}
.ev-btn-delete:active {
  background: rgba(248, 113, 113, 0.18);
}

/* GALLERY */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 0 14px;
  margin-top: 10px;
}
.gallery-item {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--s2);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-add {
  aspect-ratio: 1;
  border-radius: 12px;
  background: var(--s1);
  border: 1px dashed var(--b2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  color: var(--t3);
}
.gallery-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(248, 113, 113, 0.85);
  border: none;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* DESCRIPTION */
.ev-desc {
  margin: 10px 14px;
  background: var(--s1);
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid var(--b);
}
.ev-section-head {
  font-size: 10px;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ev-inline-edit-btn {
  background: none;
  border: none;
  color: var(--a2);
  font-size: 11px;
  font-weight: 600;
  font-family: 'Onest';
  cursor: pointer;
  padding: 0;
}
.ev-desc-text {
  font-size: 13px;
  color: var(--t2);
  line-height: 1.65;
  min-height: 20px;
  white-space: pre-wrap;
  word-break: break-word;
}
.ev-desc-text.is-empty {
  white-space: normal;
}
.ev-desc-edit {
  width: 100%;
  min-height: 100px;
  background: var(--s2);
  border: 1px solid var(--b2);
  border-radius: 8px;
  padding: 10px;
  font-size: 16px;
  font-family: 'Onest';
  color: var(--t1);
  resize: vertical;
  box-sizing: border-box;
  margin-top: 6px;
  display: none;
}
.ev-desc-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  display: none;
}
.ev-coverage-card {
  margin: 10px 14px 0;
  background: linear-gradient(165deg, rgba(16, 27, 44, 0.96), rgba(10, 18, 31, 0.98));
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid var(--b);
}
.ev-coverage-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Unbounded';
  letter-spacing: 0.45px;
}
.ev-coverage-status.is-pending {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--t2);
}
.ev-coverage-status.is-yes {
  background: rgba(34, 211, 165, 0.16);
  border-color: rgba(34, 211, 165, 0.24);
  color: var(--green);
}
.ev-coverage-status.is-no {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.22);
  color: var(--red);
}
.ev-coverage-hint {
  font-size: 13px;
  color: var(--t2);
  line-height: 1.6;
}
.ev-coverage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.ev-coverage-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--b2);
  background: var(--s2);
  color: var(--t2);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Onest';
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}
.ev-coverage-btn.is-yes {
  color: var(--green);
}
.ev-coverage-btn.is-no {
  color: var(--red);
}
.ev-coverage-btn.is-active {
  box-shadow: 0 0 0 1px currentColor inset;
}
.ev-coverage-btn.is-yes.is-active {
  background: rgba(34, 211, 165, 0.12);
  border-color: rgba(34, 211, 165, 0.32);
}
.ev-coverage-btn.is-no.is-active {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.28);
}
.ev-coverage-btn.is-reset {
  color: var(--t3);
}
.ev-inline-primary {
  flex: 1;
  padding: 10px 14px;
  background: var(--ag);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Onest';
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(79, 142, 247, 0.2);
}
.ev-inline-secondary {
  padding: 10px 14px;
  background: var(--s2);
  color: var(--t2);
  border: 1px solid var(--b2);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Onest';
  cursor: pointer;
}
.ev-comment-card {
  margin: 10px 14px 12px;
  background: var(--s1);
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid var(--b);
  display: none;
}
.ev-comment-view {
  font-size: 13px;
  color: var(--t2);
  line-height: 1.5;
  min-height: 20px;
  cursor: pointer;
}
.ev-comment-edit {
  display: none;
}
.ev-comment-input {
  width: 100%;
  min-height: 80px;
  background: var(--s2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px;
  color: var(--t1);
  font-size: 13px;
  font-family: 'Onest';
  resize: vertical;
  box-sizing: border-box;
  margin-top: 4px;
}
.ev-inline-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.ev-related-note {
  margin: 0 14px 10px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--t2);
}
.ev-related-list {
  padding-bottom: 86px;
}

/* ACTIVE PARTICIPANTS */
.active-ppl {
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.active-ppl-item {
  background: var(--s1);
  border-radius: var(--r);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--b);
}
.active-badge {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Unbounded';
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.active-ppl-main {
  flex: 1;
  min-width: 0;
}
.active-ppl-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.active-ppl-dept {
  font-size: 10px;
  color: var(--t3);
}
.active-badge.b0,
.hist-score.b0 {
  background: var(--s2);
  color: var(--t3);
}
.active-badge.b1,
.hist-score.b1 {
  background: rgba(79, 142, 247, 0.15);
  color: var(--a2);
}
.active-badge.b2,
.hist-score.b2 {
  background: rgba(34, 211, 165, 0.15);
  color: var(--green);
}
.active-badge.b3,
.hist-score.b3 {
  background: rgba(251, 191, 36, 0.15);
  color: var(--yellow);
}
.active-badge.b4,
.hist-score.b4 {
  background: rgba(244, 114, 182, 0.15);
  color: #f472b6;
}
.active-badge.bm,
.hist-score.bm {
  background: rgba(248, 113, 113, 0.1);
  color: var(--red);
}

/* AVATARS */
.pav img,
.pav-sm img,
.pd-av img,
.ti-av img,
.usr-av img,
.my-acc-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
/* Аватарка в круглом контейнере — проф. профиль и кропп */
.av-circle img,
.prof-av img {
  border-radius: 16px;
}
.av-upload-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.av-circle {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: var(--s3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  font-family: 'Unbounded';
  color: var(--t2);
  flex-shrink: 0;
}
.av-circle.is-clickable {
  cursor: pointer;
}
.av-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.prof-av-fallback {
  font-family: 'Unbounded';
  font-size: 22px;
  font-weight: 700;
  color: var(--t2);
}

/* CROP MODAL */
#mod-crop .modal {
  padding-bottom: calc(var(--pb)+16px);
}
.crop-area {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
  background: #000;
  border-radius: 24px;
  margin: 0 auto;
  max-width: 280px;
}
.crop-img-wrap {
  position: absolute;
  inset: 0;
  cursor: grab;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}
.crop-img-wrap.dragging {
  cursor: grabbing;
}
.crop-img-wrap img {
  max-width: none;
  pointer-events: none;
}
.crop-overlay {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

/* AUTOCOMPLETE */
.ac-drop {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 200;
  background: var(--s2);
  border: 1px solid var(--b2);
  border-radius: var(--rs);
  max-height: 180px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 2px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  touch-action: pan-y pinch-zoom;
  scrollbar-width: none;
}
.ac-item {
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.ac-item:last-child {
  border-bottom: none;
}
.ac-item:hover,
.ac-item.focus {
  background: var(--s3);
}
.ac-item-sub {
  font-size: 10px;
  color: var(--t3);
  margin-top: 1px;
}
.ac-linked {
  font-size: 11px;
  color: var(--green);
  margin: -10px 0 12px;
  padding-left: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* PROFILE SCREEN */
.prof-hero {
  position: relative;
  padding: 20px 16px 20px;
  background: linear-gradient(150deg, #0d1e3d 0%, #0a1628 60%, #07101e 100%);
  border-bottom: 1px solid var(--b);
  flex-shrink: 0;
  overflow: hidden;
}
.prof-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 142, 247, 0.14), transparent 65%);
  pointer-events: none;
}
.prof-hero-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.prof-av {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: var(--ag);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  font-family: 'Unbounded';
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(79, 142, 247, 0.3);
  position: relative;
  z-index: 1;
}
.prof-name {
  font-family: 'Unbounded';
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 5px;
  letter-spacing: -0.4px;
}
.prof-pos {
  font-size: 13px;
  color: var(--t2);
  margin-bottom: 2px;
}
.prof-dept {
  font-size: 12px;
  color: var(--t3);
}
.prof-chips {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.prof-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 11px 16px;
  min-width: 72px;
  backdrop-filter: blur(8px);
}
.prof-chip-v {
  font-family: 'Unbounded';
  font-size: 20px;
  font-weight: 900;
}
.prof-chip-l {
  font-size: 10px;
  color: var(--t3);
  margin-top: 3px;
  text-align: center;
  letter-spacing: 0.3px;
}
.prof-chip-v.text-blue,
.sc-v.text-blue {
  color: var(--a2);
}
.prof-chip-v.text-green,
.sc-v.text-green {
  color: var(--green);
}
.prof-chip-v.text-yellow,
.sc-v.text-yellow {
  color: var(--yellow);
}
.prof-chip-v.text-purple,
.sc-v.text-purple {
  color: var(--purple);
}
.prof-chip-v.text-orange,
.sc-v.text-orange {
  color: var(--orange);
}
.prof-chip-v.text-red,
.sc-v.text-red {
  color: var(--red);
}
.profile-section {
  margin-top: 20px;
}
.profile-section-lg {
  margin-top: 24px;
}
.profile-footer-space {
  height: 20px;
}
.profile-link-cta {
  margin-top: 16px;
}
.profile-action-link {
  border-color: rgba(79, 142, 247, 0.2);
  color: var(--a2);
}
.hdr-action-icon {
  font-size: 16px;
  padding: 0 10px;
}
.hdr-action-compact {
  font-size: 13px;
}
.profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 10px;
  font-weight: 700;
  font-family: 'Unbounded';
  letter-spacing: 0.2px;
  color: #dbeafe;
}
.profile-pill-mk {
  background: rgba(167, 139, 250, 0.15);
  border-color: rgba(167, 139, 250, 0.3);
  color: var(--purple);
}
.profile-pill-award {
  background: rgba(251, 191, 36, 0.13);
  border-color: rgba(251, 191, 36, 0.24);
  color: var(--yellow);
}
.profile-ghost {
  display: block;
  min-height: 24px;
}
.profile-awards-list {
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-award-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--s1);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: var(--r);
  padding: 10px 14px;
}
.profile-award-icon {
  font-size: 22px;
  line-height: 1;
}
.profile-award-meta {
  min-width: 0;
}
.profile-award-title {
  font-size: 13px;
  font-weight: 600;
}
.profile-award-note {
  font-size: 11px;
  color: var(--t3);
  margin-top: 2px;
  line-height: 1.45;
}
.profile-link-card {
  margin: 20px 14px;
  background: var(--s1);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: var(--r);
  padding: 20px;
  text-align: center;
}
.profile-link-note {
  font-size: 12px;
  color: var(--t3);
  line-height: 1.55;
  margin-top: 8px;
}
.profile-empty {
  padding: 30px 20px;
}
.profile-empty-sub {
  font-size: 12px;
  color: var(--t3);
  line-height: 1.55;
  margin-top: 6px;
}
.profile-dashboard {
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-panel {
  background: var(--s1);
  border: 1px solid var(--b);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
}
.profile-panel-kicker {
  font-size: 10px;
  font-family: 'Unbounded';
  letter-spacing: 0.5px;
  color: var(--t3);
}
.profile-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.profile-panel-title {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--t1);
}
.profile-panel-note {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--t3);
}
.profile-fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.profile-fact-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 10px;
}
.profile-fact-card span {
  display: block;
  font-size: 10px;
  color: var(--t3);
  font-family: 'Unbounded';
  letter-spacing: 0.3px;
}
.profile-fact-card strong {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--t1);
  word-break: break-word;
}
.profile-scope-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.profile-scope-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(79, 142, 247, 0.12);
  border: 1px solid rgba(79, 142, 247, 0.16);
  font-size: 10px;
  font-weight: 700;
  font-family: 'Unbounded';
  letter-spacing: 0.2px;
  color: var(--a2);
}
.profile-inline-note {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--t2);
}
.profile-panel-actions .profile-panel-note {
  max-width: 36ch;
}
.profile-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.profile-action-btn {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--b2);
  background: var(--s2);
  color: var(--t1);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 12px;
}
.profile-action-btn.is-primary {
  background: rgba(79, 142, 247, 0.14);
  border-color: rgba(79, 142, 247, 0.24);
  color: var(--a2);
}
.profile-action-btn.is-secondary {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--t2);
}
.profile-action-btn.is-neutral {
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.18);
  color: var(--purple);
}
.profile-action-btn.is-danger {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.22);
  color: var(--red);
}

/* MK SCREEN */
.mk-card {
  background: var(--s1);
  border: 1px solid var(--b);
  border-radius: 18px;
  margin: 0 16px 10px;
  padding: 16px;
  transition: background 0.15s;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}
.mk-card:active {
  background: var(--s2);
}
.mk-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  font-family: 'Unbounded';
  letter-spacing: 0.2px;
  margin-bottom: 6px;
}
.mk-role-badge.role-chair {
  background: rgba(251, 191, 36, 0.25);
  color: var(--yellow);
}
.mk-role-badge.role-deputy {
  background: rgba(79, 142, 247, 0.2);
  color: var(--a2);
}
.mk-role-badge.role-direction-deputy {
  background: rgba(56, 189, 248, 0.14);
  color: #8fe5ff;
}
.mk-role-badge.role-secretary {
  background: rgba(244, 114, 182, 0.16);
  color: #f9a8d4;
}
.mk-role-badge.role-member {
  background: rgba(34, 211, 165, 0.12);
  color: var(--green);
}
.mk-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--ag);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 900;
  font-family: 'Unbounded';
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.mk-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.mk-main {
  flex: 1;
  min-width: 0;
}
.mk-name {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.mk-pos {
  font-size: 12px;
  color: var(--t2);
}
.mk-dir {
  font-size: 11px;
  color: var(--t3);
  margin-top: 3px;
}
.mk-comment {
  font-size: 12px;
  color: var(--t2);
  margin-top: 5px;
  line-height: 1.5;
  font-style: italic;
}
.mk-edit-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--s2);
  border: 1px solid var(--b2);
  color: var(--t2);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
}

/* LEADER NOTE BLOCK */
.leader-note-block {
  margin: 10px 14px;
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: var(--r);
  padding: 12px 14px;
}
.leader-note-lbl {
  font-size: 9px;
  font-family: 'Unbounded';
  font-weight: 700;
  color: var(--yellow);
  letter-spacing: 1px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.leader-note-txt {
  font-size: 12px;
  color: var(--t1);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.leader-note-block.is-danger {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.2);
}
.leader-note-lbl.is-danger {
  color: var(--red);
}

/* PARTICIPATION HISTORY */
.hist-item {
  background: var(--s1);
  border: 1px solid var(--b);
  border-radius: 14px;
  padding: 10px 13px;
  margin: 0 14px 6px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.hist-score {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Unbounded';
  font-size: 15px;
  font-weight: 900;
  flex-shrink: 0;
}
.hist-body {
  flex: 1;
  min-width: 0;
}
.hist-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hist-meta {
  font-size: 10px;
  color: var(--t3);
  margin-top: 2px;
}
.hist-comment {
  font-size: 11px;
  color: var(--t2);
  margin-top: 4px;
  font-style: italic;
  line-height: 1.5;
}
.hist-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.hist-open-btn {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(79, 142, 247, 0.18);
  background: rgba(79, 142, 247, 0.1);
  color: var(--a2);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.hist-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--t3);
  flex-shrink: 0;
  opacity: 0.7;
}
.hist-status-dot.is-done {
  background: var(--green);
  opacity: 1;
}
.hist-status-dot.is-cancelled {
  background: var(--red);
  opacity: 1;
}
.hist-edit-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--s2);
  border: 1px solid var(--b2);
  color: var(--t2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.hist-item.has-edit {
  align-items: flex-start;
}

/* OFFLINE / ERROR */
.offline-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  background: rgba(251, 191, 36, 0.12);
  border-bottom: 1px solid rgba(251, 191, 36, 0.2);
  color: var(--yellow);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 10px;
  display: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

/* TOAST */
.toast {
  position: fixed;
  top: calc(env(safe-area-inset-top, 44px) + 56px);
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  background: rgba(11, 18, 32, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--b2);
  border-radius: 16px;
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 88vw;
  text-align: center;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* LOADING */
.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  color: var(--t3);
}
.spin {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2.5px solid var(--s3);
  border-top-color: var(--a);
  animation: spin 0.75s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* EMPTY */
.empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--t3);
}
.empty-ic {
  font-size: 44px;
  margin-bottom: 12px;
  opacity: 0.6;
}
.smart-empty {
  text-align: center;
  padding: 18px 16px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
}
.smart-empty-ic {
  font-size: 30px;
  opacity: 0.75;
  margin-bottom: 10px;
}
.smart-empty-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--t1);
}
.smart-empty-sub {
  font-size: 12px;
  line-height: 1.55;
  color: var(--t3);
  margin-top: 6px;
}
.smart-empty-btn {
  margin-top: 12px;
  min-height: 42px;
  padding: 0 16px;
  border: none;
  border-radius: 14px;
  background: rgba(79, 142, 247, 0.14);
  color: var(--a2);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.gallery .smart-empty {
  grid-column: 1/-1;
}

/* ADMIN ACTION BUTTONS */
.admin-action-btn {
  background: var(--s1);
  border: 1px solid var(--b);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.12s;
}
.admin-action-btn:active {
  background: var(--s2);
}
.admin-action-btn.is-danger {
  border-color: rgba(248, 113, 113, 0.2);
}
.aab-ic {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--s2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  border: 1px solid var(--b);
}
.aab-inf {
  flex: 1;
  min-width: 0;
}
.aab-t {
  font-size: 13px;
  font-weight: 600;
}
.aab-t.danger {
  color: var(--red);
}
.aab-s {
  font-size: 11px;
  color: var(--t3);
  margin-top: 2px;
}
.aab-arr {
  font-size: 20px;
  color: var(--t3);
  flex-shrink: 0;
}
.aab-arr.danger {
  color: var(--red);
}

/* MY ACCOUNT CARD */
.my-acc {
  margin: 14px;
  background: linear-gradient(135deg, rgba(79, 142, 247, 0.1), rgba(124, 58, 237, 0.1));
  border: 1px solid rgba(79, 142, 247, 0.18);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 4px 24px rgba(79, 142, 247, 0.08);
}
.my-acc.is-clickable {
  cursor: pointer;
}
.my-acc-av {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--ag);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  font-family: 'Unbounded';
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(79, 142, 247, 0.3);
}
.my-acc-inf {
  flex: 1;
  min-width: 0;
}
.my-acc-name {
  font-size: 15px;
  font-weight: 700;
}
.my-acc-role {
  font-size: 11px;
  color: var(--a2);
  margin-top: 2px;
  font-weight: 600;
}
.my-acc-login {
  font-size: 10px;
  color: var(--t3);
  margin-top: 2px;
}
.my-acc-arr {
  font-size: 20px;
  color: var(--t3);
  flex-shrink: 0;
}

.users-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 14px 4px;
}
.users-overview-card {
  background: var(--s1);
  border: 1px solid var(--b);
  border-radius: 16px;
  padding: 12px 13px;
}
.users-overview-card span {
  display: block;
  font-size: 10px;
  color: var(--t3);
  font-family: 'Unbounded';
  letter-spacing: 0.4px;
}
.users-overview-card strong {
  display: block;
  margin-top: 7px;
  font-size: 20px;
  font-family: 'Unbounded';
  font-weight: 700;
  color: var(--t1);
}
.users-overview-card.is-warn strong {
  color: var(--red);
}
.access-lead-card {
  margin: 0 14px 12px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(79, 142, 247, 0.1), rgba(79, 142, 247, 0.04));
  border: 1px solid rgba(79, 142, 247, 0.16);
}
.access-lead-kicker {
  font-size: 10px;
  font-family: 'Unbounded';
  letter-spacing: 0.5px;
  color: var(--a2);
}
.access-lead-title {
  margin-top: 8px;
  font-size: 16px;
  font-family: 'Unbounded';
  font-weight: 700;
  line-height: 1.3;
  color: var(--t1);
}
.access-lead-copy {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--t2);
}
.access-lead-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.access-lead-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
  font-weight: 700;
  font-family: 'Unbounded';
  letter-spacing: 0.2px;
  color: var(--t1);
}

.user-card {
  background: var(--s1);
  border: 1px solid var(--b);
  border-radius: 18px;
  padding: 14px;
  margin: 0 14px 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
}
.user-card-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}
.user-card-main {
  flex: 1;
  min-width: 0;
}
.user-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.user-card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}
.user-card-meta {
  font-size: 10px;
  color: var(--t3);
  margin-top: 4px;
  line-height: 1.45;
}
.user-card-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.user-card-fact {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 10px;
}
.user-card-fact span {
  display: block;
  font-size: 10px;
  color: var(--t3);
  font-family: 'Unbounded';
  letter-spacing: 0.3px;
}
.user-card-fact strong {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--t1);
  line-height: 1.45;
  word-break: break-word;
}

/* USER ROW IMPROVEMENTS */
.usr-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.usr-act-btn {
  flex: 1;
  background: var(--s2);
  border: 1px solid var(--b2);
  border-radius: 9px;
  padding: 7px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--t2);
  cursor: pointer;
  text-align: center;
  transition: background 0.12s;
}
.usr-act-btn:active {
  background: var(--s3);
}
.usr-act-btn.danger {
  background: rgba(248, 113, 113, 0.07);
  border-color: rgba(248, 113, 113, 0.15);
  color: var(--red);
}

/* CONFIRM MODAL */
#mod-confirm {
  z-index: 240;
}
.al-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--b);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  transition: background 0.1s;
}
.al-item:last-child {
  border-bottom: none;
}
.al-ic {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--s2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  border: 1px solid var(--b);
}
.al-inf {
  flex: 1;
  min-width: 0;
}
.al-act {
  font-size: 12px;
  font-weight: 600;
}
.al-meta {
  font-size: 10px;
  color: var(--t3);
  margin-top: 2px;
}
.audit-detail {
  font-size: 12px;
  color: var(--t2);
  margin-top: 2px;
  line-height: 1.45;
}
.audit-score-note {
  color: var(--green);
}
.text-blue {
  color: var(--a2);
}
.text-green {
  color: var(--green);
}
.text-yellow {
  color: var(--yellow);
}
.text-purple {
  color: var(--purple);
}
.text-orange {
  color: var(--orange);
}
.text-red {
  color: var(--red);
}
.text-muted {
  color: var(--t3);
}
.screen-hidden {
  display: none;
}
.screen-flex-col {
  display: flex;
  flex-direction: column;
}
#ev-tab-ppl:not(.pane-hidden) {
  flex: 1;
  overflow: hidden;
}
.pane-hidden {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}
.hdr-shrink {
  flex-shrink: 0;
}
.sticky-surface {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
}
.spacer-6 {
  height: 6px;
}
.spacer-10 {
  height: 10px;
}
.auth-footnote {
  margin-top: 28px;
  font-size: 10px;
  color: var(--t3);
  font-family: 'Unbounded';
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  text-align: center;
}
.build-stamp {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 9px;
  font-weight: 700;
  color: #8ea8d6;
  letter-spacing: 0.24px;
}
.btn-h-icon {
  margin-right: 6px;
  font-size: 16px;
}
.evlist-spaced {
  padding-top: 12px;
  margin-bottom: 10px;
}
.stats-stack {
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}
.list-bottom-gap {
  margin-bottom: 4px;
}
.score-dist-pad {
  padding: 0 14px 14px;
}
.quick-actions-stack {
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.scroll-pad-20 {
  padding-bottom: 20px;
}
.list-top-pad {
  padding-top: 10px;
}
.file-hidden {
  display: none;
}
.range-grow {
  flex: 1;
  accent-color: var(--a);
}
.crop-shell {
  max-width: 280px;
  margin: 0 auto 16px;
}
.crop-canvas {
  border-radius: 50%;
  display: block;
  margin: 0 auto;
  cursor: grab;
  touch-action: none;
}
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) max(env(safe-area-inset-right, 0px), 12px)
    calc(env(safe-area-inset-bottom, 0px) + 16px) max(env(safe-area-inset-left, 0px), 12px);
  background: rgba(0, 0, 0, 0.92);
  z-index: 400;
  align-items: center;
  justify-content: center;
}
.lightbox-img {
  max-width: 100%;
  max-height: calc(
    100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 32px
  );
  border-radius: 12px;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  right: max(env(safe-area-inset-right, 0px), 16px);
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}
.qstats-card {
  --quarter-color: var(--a2);
  background: var(--s1);
  border: 1px solid var(--b);
  border-radius: var(--r);
  padding: 12px 14px;
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.qstats-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.qstats-label {
  font-family: 'Unbounded';
  font-size: 10px;
  font-weight: 700;
  color: var(--quarter-color);
}
.qstats-value {
  font-family: 'Unbounded';
  font-size: 12px;
  color: var(--t2);
}
.qstats-value.is-good {
  color: var(--green);
}
.qstats-card.is-good {
  border-color: rgba(34, 211, 165, 0.18);
}
.qstats-card .pfill {
  background: var(--quarter-color);
}
.qstats-meta {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  color: var(--t3);
}
.qstats-copy {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--t2);
}
.sleeping-toggle {
  text-align: center;
  padding: 12px;
  font-size: 12px;
  color: var(--a2);
  cursor: pointer;
  font-weight: 600;
}
.dist-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--t2);
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.dist-item {
  white-space: nowrap;
}
.dist-value {
  font-weight: 700;
}
.dist-seg.tone-blue {
  background: var(--a);
}
.dist-seg.tone-green {
  background: var(--green);
}
.dist-seg.tone-yellow {
  background: var(--yellow);
}
.dist-seg.tone-red {
  background: var(--red);
}
.yugra-group-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--t2);
  margin: 8px 0 4px;
}
.yugra-row.is-bound {
  background: rgba(34, 211, 165, 0.08);
  border-color: rgba(34, 211, 165, 0.14);
}
.yugra-ev-dir {
  color: var(--t2);
  font-size: 11px;
}
.yugra-empty {
  color: var(--t2);
  text-align: center;
  padding: 20px;
}

.ai-chat-modal {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  height: 100%;
  max-height: 100%;
}
#mod-ai-assistant {
  padding: max(env(safe-area-inset-top, 0px), 8px) max(env(safe-area-inset-right, 0px), 0px) 0
    max(env(safe-area-inset-left, 0px), 0px);
}
#mod-ai-assistant .modal {
  width: min(100%, 720px);
  max-width: 720px;
  box-sizing: border-box;
  height: calc(100dvh - max(env(safe-area-inset-top, 0px), 8px));
  max-height: calc(100dvh - max(env(safe-area-inset-top, 0px), 8px));
}
.ai-chat-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 10px 0 2px;
  margin-bottom: 0;
  border-bottom: none;
  background: linear-gradient(
    180deg,
    rgba(11, 18, 32, 0.98),
    rgba(11, 18, 32, 0.88) 72%,
    transparent
  );
}
.ai-chat-header::before {
  display: none;
}
.ai-chat-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ai-chat-title-wrap span {
  font-size: 14px;
  line-height: 1.15;
}
.ai-chat-title-wrap small {
  color: var(--t3);
  font-size: 10px;
  font-weight: 500;
}
.ai-chat-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-size: 22px;
  line-height: 1;
  padding-bottom: 2px;
}
.ai-chat-clear-btn {
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  margin-top: 0;
  font-size: 11px;
}
.ai-chat-quick {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.ai-chat-quick::-webkit-scrollbar {
  display: none;
}
.ai-chat-chip {
  border: 1px solid rgba(79, 142, 247, 0.22);
  background: rgba(79, 142, 247, 0.1);
  color: var(--t1);
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex: 0 0 auto;
}
.ai-chat-list {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(circle at top, rgba(79, 142, 247, 0.08), transparent 35%),
    rgba(255, 255, 255, 0.02);
}
.ai-chat-list.is-empty {
  justify-content: center;
}
.ai-chat-empty {
  width: min(100%, 300px);
  margin: 0 auto;
  padding: 20px 16px;
  border-radius: 18px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.ai-chat-empty-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--t1);
}
.ai-chat-empty-copy {
  margin-top: 6px;
  color: var(--t2);
  font-size: 12px;
  line-height: 1.5;
}
.ai-chat-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.ai-chat-row.is-user {
  justify-content: flex-end;
}
.ai-chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 142, 247, 0.16);
  border: 1px solid rgba(79, 142, 247, 0.22);
  color: var(--t1);
  font-size: 11px;
  font-weight: 700;
  flex: 0 0 auto;
}
.ai-chat-bubble-wrap {
  max-width: min(82%, 620px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ai-chat-bubble {
  border-radius: 18px;
  padding: 11px 13px;
  background: rgba(8, 13, 22, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.ai-chat-row.is-user .ai-chat-bubble {
  background: linear-gradient(135deg, rgba(79, 142, 247, 0.22), rgba(113, 84, 255, 0.18));
  border-color: rgba(79, 142, 247, 0.24);
}
.ai-chat-bubble.is-error {
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.22);
}
.ai-chat-msg-body {
  color: var(--t1);
  line-height: 1.48;
  white-space: normal;
}
.ai-chat-meta {
  color: var(--t3);
  font-size: 10px;
  padding: 0 3px;
}
.ai-chat-row.is-user .ai-chat-meta {
  align-self: flex-end;
}
.ai-chat-context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ai-chat-context span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(34, 211, 165, 0.1);
  border: 1px solid rgba(34, 211, 165, 0.2);
  color: var(--t2);
  font-size: 11px;
}
.ai-chat-status {
  min-height: 14px;
  margin: 0;
  padding: 0 2px;
  font-size: 11px;
  text-align: left;
  opacity: 0.72;
}
.ai-chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding-top: 4px;
  background: linear-gradient(
    180deg,
    rgba(11, 18, 32, 0),
    rgba(11, 18, 32, 0.86) 28%,
    rgba(11, 18, 32, 0.98)
  );
}
.ai-chat-input {
  min-height: 46px;
  max-height: 120px;
  resize: none;
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 0;
}
.ai-chat-send-btn {
  min-width: 46px;
  width: 46px;
  min-height: 46px;
  border-radius: 16px;
  padding: 0;
  margin-top: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
.ai-chat-compose-note {
  display: none;
}
.ai-chat-thinking {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
}
.ai-chat-thinking-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--t2);
  opacity: 0.35;
  animation: ai-chat-thinking 1.15s ease-in-out infinite;
}
.ai-chat-thinking-dot:nth-child(2) {
  animation-delay: 0.18s;
}
.ai-chat-thinking-dot:nth-child(3) {
  animation-delay: 0.36s;
}
@keyframes ai-chat-thinking {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  40% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

/* ═══ IPHONE OPTIMIZATIONS ═══════════════════════════════ */
/* Убираем bounce scroll на body */
body {
  overscroll-behavior: none;
}
/* Smooth scroll везде */
* {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}
/* Scroll в контейнерах не bounces */
.scroll {
  overscroll-behavior-y: contain;
}
/* Фикс input zoom — уже 16px, но страхуемся */
input,
textarea,
select {
  font-size: max(16px, 1em);
}
/* Кнопки — убираем системный вид на iOS */
button {
  -webkit-appearance: none;
  appearance: none;
}
/* Sheet drag handle */
.sh-handle {
  touch-action: none;
}
/* Safe area для bottom sheet */
.sheet {
  padding-bottom: calc(var(--pb)+12px);
}
/* Chevron кнопка назад — крупнее на телефоне */
@media (max-width: 430px) {
  .btn-bk {
    width: 44px;
    height: 44px;
    font-size: 24px;
  }
  .hdr {
    padding: calc(env(safe-area-inset-top, 44px) + 10px) 14px 10px;
  }
  .nb-lb {
    font-size: 10px;
  }
  .nb-ic svg {
    width: 23px;
    height: 23px;
  }
  .install-banner {
    left: 10px;
    right: 10px;
    gap: 10px;
    padding: 13px;
  }
  .install-banner-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .install-banner-btn {
    width: 100%;
  }
  .install-banner-close {
    width: 100%;
    height: 40px;
  }
  /* Карточки мероприятий — чуть крупнее текст */
  .evname {
    font-size: 14px;
  }
  /* Модалки на весь экран почти */
  .modal {
    border-radius: 24px 24px 0 0;
  }
  .modal-grid-2 {
    grid-template-columns: 1fr;
  }
  .modal-actions-inline {
    flex-direction: column;
  }
  #mod-ai-assistant {
    padding: max(env(safe-area-inset-top, 0px), 6px) max(env(safe-area-inset-right, 0px), 0px) 0
      max(env(safe-area-inset-left, 0px), 0px);
  }
  #mod-ai-assistant .modal.ai-chat-modal {
    height: calc(100dvh - max(env(safe-area-inset-top, 0px), 6px));
    max-height: calc(100dvh - max(env(safe-area-inset-top, 0px), 6px));
    border-radius: 26px 26px 0 0;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  }
  .ai-chat-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
  }
  .ai-chat-title-wrap small {
    display: none;
  }
  .ai-chat-title-wrap span {
    font-size: 13px;
  }
  .ai-chat-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    font-size: 20px;
  }
  .ai-chat-clear-btn {
    min-height: 32px;
    padding: 0 10px;
    font-size: 10px;
  }
  .ai-chat-list {
    min-height: 0;
    max-height: none;
    padding: 10px;
  }
  .ai-chat-bubble-wrap {
    max-width: 90%;
  }
  .ai-chat-compose {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .ai-chat-send-btn {
    width: 46px;
    min-width: 46px;
  }
  /* Поля ввода — удобнее на телефоне */
  .fi {
    padding: 14px 13px;
  }
  .login-input {
    padding: 15px 16px;
  }
}

/* ═══ MOBILE-FIRST REDESIGN ═══════════════════════════════ */
html,
body {
  background:
    radial-gradient(circle at top right, rgba(79, 142, 247, 0.14), transparent 30%),
    radial-gradient(circle at bottom left, rgba(34, 211, 165, 0.08), transparent 28%),
    linear-gradient(180deg, #04070d 0%, #08111d 45%, #05080f 100%);
}
body::before {
  content: '';
  position: fixed;
  inset: 0 0 calc(-1 * var(--ios-app-gap)) 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.015),
    transparent 24%,
    transparent 76%,
    rgba(255, 255, 255, 0.01)
  );
  pointer-events: none;
  z-index: 1;
}
.scr {
  background: transparent;
}
body.is-ios .scr {
  min-height: calc(var(--app-vh) + var(--ios-app-gap));
}
.hdr {
  padding: calc(env(safe-area-inset-top, 50px) + 12px) 14px 12px;
  background: linear-gradient(
    180deg,
    rgba(4, 7, 13, 0.94) 0%,
    rgba(4, 7, 13, 0.82) 70%,
    rgba(4, 7, 13, 0.58) 100%
  );
  border-bottom: none;
  position: relative;
}
.hdr::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}
.hdr-mid h1 {
  font-size: 15px;
  letter-spacing: -0.25px;
}
.hdr-mid p {
  font-size: 11px;
  color: #6f86ab;
}
.btn-bk,
.btn-h {
  min-width: 44px;
  min-height: 44px;
  border-radius: 14px;
  background: rgba(16, 27, 45, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.btn-h {
  height: 44px;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 700;
}
.btn-h.ac {
  box-shadow: 0 10px 24px rgba(79, 142, 247, 0.28);
}
.scroll {
  padding-bottom: var(--bnav-h, 80px);
}
/* bnav: переопределение только того, что отличается от base-блока */
.nb-lb {
  font-size: 10px;
  letter-spacing: 0.2px;
}

.home-shell {
  padding: 14px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.home-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  box-shadow: var(--card-shadow);
}
.home-intro-copy {
  flex: 1;
  min-width: 0;
}
.home-intro-kicker {
  font-family: 'Unbounded';
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--a2);
  opacity: 0.82;
}
.home-intro-title {
  margin-top: 8px;
  font-family: 'Unbounded';
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.35px;
}
.home-intro-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--t2);
  line-height: 1.45;
}
.home-intro-mark {
  width: 72px;
  min-height: 72px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(79, 142, 247, 0.22), rgba(124, 58, 237, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}
.home-intro-mark-top {
  font-family: 'Unbounded';
  font-size: 11px;
  color: var(--a2);
}
.home-intro-mark-bottom {
  margin-top: 4px;
  font-family: 'Unbounded';
  font-size: 20px;
}
.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 14px 10px;
}
.home-quick-grid:empty {
  display: none;
}
.home-quick-card {
  min-height: 92px;
  border: none;
  border-radius: 20px;
  padding: 14px;
  text-align: left;
  background: linear-gradient(165deg, rgba(16, 27, 45, 0.94), rgba(11, 18, 32, 0.86));
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--t1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-start;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}
.home-quick-card.is-locked {
  position: relative;
  background: linear-gradient(165deg, rgba(13, 19, 31, 0.92), rgba(10, 14, 24, 0.88));
  border: 1px dashed rgba(255, 255, 255, 0.12);
}
.home-quick-card.is-locked::after {
  content: 'Ограничено';
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 9px;
  font-family: 'Unbounded';
  letter-spacing: 0.3px;
  color: var(--t3);
}
.home-quick-card:active {
  transform: scale(0.985);
}
.home-personal-card {
  margin: 0 14px 12px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(13, 22, 38, 0.96), rgba(8, 14, 26, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}
.home-personal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.home-personal-kicker {
  font-size: 10px;
  font-family: 'Unbounded';
  letter-spacing: 0.7px;
  color: var(--t3);
  text-transform: uppercase;
}
.home-personal-title {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 800;
  color: var(--t1);
}
.home-personal-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--t3);
}
.home-personal-add {
  min-height: 38px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(79, 142, 247, 0.24), rgba(116, 80, 255, 0.24));
  border: 1px solid rgba(122, 179, 255, 0.22);
  color: #dbe7ff;
  font-size: 11px;
  font-weight: 700;
}
/* Пояснение показываем только когда список пуст */
.home-personal-card:not(.is-empty) .home-personal-note {
  display: none;
}
.home-personal-note {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--t2);
}
.home-personal-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.home-personal-card.is-empty .home-personal-list {
  margin-top: 12px;
}
.home-quick-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(79, 142, 247, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.home-quick-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}
.home-quick-meta {
  font-size: 11px;
  color: var(--t2);
  line-height: 1.4;
  opacity: 0.85;
}
.home-stat-strip.is-locked {
  opacity: 0.92;
}
.home-stat-strip.is-locked .hss-fill {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.32));
}
.restricted-screen-state {
  padding: 0 14px 14px;
}
.restricted-screen-state .smart-empty {
  border-style: solid;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
}
.home-digest {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}
.home-events-shell {
  padding: 0 14px 12px;
}
.home-events-search {
  position: relative;
  margin-top: 2px;
}
.home-view-switch {
  display: flex;
  gap: 8px;
  padding: 0 14px 6px;
}
.home-view-switch:empty {
  display: none;
}
.home-view-tab {
  flex: 1;
  min-height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--t2);
  font-family: 'Unbounded';
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition:
    background 0.14s,
    transform 0.14s,
    border-color 0.14s,
    color 0.14s;
}
.home-view-tab.is-active {
  background: linear-gradient(135deg, rgba(79, 142, 247, 0.22), rgba(34, 211, 165, 0.12));
  border-color: rgba(79, 142, 247, 0.28);
  color: var(--t1);
  box-shadow: 0 10px 24px rgba(79, 142, 247, 0.12);
}
.home-view-tab:active {
  transform: scale(0.985);
}
.home-events-search .sinput {
  margin: 0;
}
.home-events-search .sclr {
  display: none; /* shown via JS when query is active */
}
.home-events-filters {
  padding: 10px 0 0;
}
.home-events-filters .dchip {
  min-height: 30px;
}
.home-digest-card {
  border-radius: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(10, 16, 28, 0.82);
}
.home-digest-card.tone-green {
  box-shadow: inset 0 0 0 1px rgba(34, 211, 165, 0.08);
}
.home-digest-card.tone-blue {
  box-shadow: inset 0 0 0 1px rgba(79, 142, 247, 0.08);
}
.home-digest-card.tone-yellow {
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.08);
}
.home-digest-card.tone-purple {
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.08);
}
.home-digest-label {
  font-size: 11px;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.home-digest-value {
  margin-top: 6px;
  font-family: 'Unbounded';
  font-size: 18px;
  line-height: 1;
}
.home-events-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--t2);
}
.home-events-note strong {
  color: var(--t1);
  font-weight: 700;
}

/* ── HOME CALENDAR ───────────────────────────────────────── */
.home-calendar-shell {
  margin: 6px 14px 4px;
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.96), rgba(8, 13, 22, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}
.home-calendar-shell .smart-empty {
  margin: 4px 0 0;
}
.home-cal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.home-cal-title-wrap {
  min-width: 0;
  flex: 1;
}
.home-cal-kicker {
  font-family: 'Unbounded';
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--t3);
}
.home-cal-title {
  margin-top: 6px;
  font-family: 'Unbounded';
  font-size: 18px;
  line-height: 1.2;
}
.home-cal-sub {
  margin-top: 5px;
  font-size: 11px;
  color: var(--t2);
  line-height: 1.4;
}
.home-cal-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-cal-nav-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--t1);
  font-family: 'Unbounded';
  font-size: 18px;
  cursor: pointer;
  transition:
    background 0.14s,
    transform 0.14s,
    border-color 0.14s;
}
.home-cal-nav-btn:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.09);
}
.home-cal-weekdays,
.home-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.home-cal-weekdays {
  margin-top: 14px;
}
.home-cal-weekday {
  padding: 0 0 4px;
  text-align: center;
  font-family: 'Unbounded';
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--t3);
}
.home-cal-day {
  min-height: 68px;
  padding: 8px;
  border: none;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--t1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  cursor: pointer;
  font: inherit;
  transition:
    background 0.14s,
    transform 0.14s,
    border-color 0.14s,
    box-shadow 0.14s,
    opacity 0.14s;
}
.home-cal-day:active {
  transform: scale(0.97);
}
.home-cal-day.is-outside {
  opacity: 0.34;
}
.home-cal-day.is-today {
  border-color: rgba(79, 142, 247, 0.24);
}
.home-cal-day.has-events {
  background: linear-gradient(180deg, rgba(79, 142, 247, 0.08), rgba(255, 255, 255, 0.02));
}
.home-cal-day.is-selected {
  background: linear-gradient(180deg, rgba(79, 142, 247, 0.2), rgba(22, 39, 65, 0.96));
  border-color: rgba(79, 142, 247, 0.32);
  box-shadow: 0 10px 24px rgba(79, 142, 247, 0.14);
}
.home-cal-day.is-done.has-events {
  background: linear-gradient(180deg, rgba(34, 211, 165, 0.14), rgba(255, 255, 255, 0.02));
}
.home-cal-day.is-selected.is-done {
  background: linear-gradient(180deg, rgba(34, 211, 165, 0.22), rgba(16, 35, 33, 0.96));
  border-color: rgba(34, 211, 165, 0.28);
  box-shadow: 0 10px 24px rgba(34, 211, 165, 0.12);
}
.home-cal-day-num {
  font-family: 'Unbounded';
  font-size: 12px;
  line-height: 1;
}
.home-cal-day-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(79, 142, 247, 0.16);
  color: var(--a2);
  font-size: 10px;
  font-weight: 700;
}
.home-cal-day.is-done .home-cal-day-count {
  background: rgba(34, 211, 165, 0.14);
  color: var(--green);
}
.home-cal-day-count.is-empty {
  visibility: hidden;
}
.home-cal-agenda {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.home-cal-agenda-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px 10px;
}
.home-cal-agenda-kicker {
  font-family: 'Unbounded';
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--t3);
}
.home-cal-agenda-date {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}
.home-cal-agenda-count {
  font-size: 11px;
  color: var(--t2);
  text-align: right;
}
.home-cal-agenda-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── HOME STAT STRIP ────────────────────────────────────── */
.home-stat-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 10px;
}
.hss-q {
  font-family: 'Unbounded';
  font-size: 11px;
  font-weight: 700;
  color: var(--a2);
  flex-shrink: 0;
}
.hss-bar {
  flex: 1;
  height: 5px;
  background: var(--s3);
  border-radius: 99px;
  overflow: hidden;
}
.hss-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--a), var(--green));
  transition: width 1s ease;
}
.hss-pct {
  font-family: 'Unbounded';
  font-size: 12px;
  font-weight: 700;
  color: var(--t1);
  flex-shrink: 0;
}
.hss-meta {
  font-size: 11px;
  color: var(--t3);
  flex-shrink: 0;
}

/* ── EVENT GROUPS (главный экран) ───────────────────────── */
.ev-group {
  margin-bottom: 6px;
}
.ev-group-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 9px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.ev-group-hdr:active {
  opacity: 0.7;
}
.ev-group-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Unbounded';
  font-size: 10px;
  font-weight: 700;
  color: var(--t3);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.ev-group-badge {
  background: var(--s3);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  color: var(--t3);
  font-family: 'Onest';
  letter-spacing: 0;
  text-transform: none;
}
.ev-group-badge.is-urgent {
  background: rgba(248, 113, 113, 0.15);
  color: var(--red);
}
.ev-group-badge.is-done {
  background: rgba(34, 211, 165, 0.1);
  color: var(--green);
}
.ev-group-toggle {
  font-size: 16px;
  color: var(--t3);
  transition: transform 0.2s;
  display: inline-block;
}
.ev-group-toggle.open {
  transform: rotate(90deg);
}
.ev-group-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ev-group-add-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--a2);
  background: rgba(79, 142, 247, 0.12);
  border: none;
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.15s;
}
.ev-group-add-btn:active {
  background: rgba(79, 142, 247, 0.22);
}
.ev-group-body {
  padding: 0;
}
.ev-group-body.hg-collapsed {
  display: none;
}
.ev-group-more {
  display: block;
  width: 100%;
  padding: 10px 0;
  background: none;
  border: none;
  color: var(--a2);
  font-size: 12px;
  cursor: pointer;
  text-align: center;
}
.ev-group-more:active {
  opacity: 0.7;
}

/* ── QUARTERS ACCORDION ─────────────────────────────────── */
.home-quarters-accordion {
  margin: 6px 14px 20px;
}
.home-quarters-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 10px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  border-top: 1px solid var(--b);
}
.home-quarters-hdr:active {
  opacity: 0.7;
}
.home-quarters-title {
  font-family: 'Unbounded';
  font-size: 10px;
  font-weight: 700;
  color: var(--t3);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.home-quarters-toggle {
  font-size: 16px;
  color: var(--t3);
  transition: transform 0.2s;
  display: inline-block;
}
.home-quarters-toggle.open {
  transform: rotate(90deg);
}
.home-quarters-body {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.home-quarters-body.open {
  display: grid;
}

/* ── EVSIDE QUICK TAP ──────────────────────────────────── */
.evside-tap {
  cursor: pointer;
  border-radius: 10px;
  padding: 6px 4px;
  transition: background 0.12s;
}
.evside-tap:active {
  background: var(--s3);
}

.hero {
  margin: 14px;
  border-radius: 26px;
  padding: 22px 20px 18px;
  background:
    radial-gradient(circle at top right, rgba(122, 179, 255, 0.16), transparent 28%),
    linear-gradient(160deg, #10264b 0%, #0c1c34 44%, #0a1525 100%);
  border: 1px solid rgba(122, 179, 255, 0.12);
}
.hero-tag {
  opacity: 0.74;
}
.hero-big {
  font-size: 34px;
  line-height: 1.08;
}
.hero-sub {
  font-size: 12px;
  color: #8da3c8;
}
.hero-chips {
  gap: 10px;
}
.hchip {
  border-radius: 16px;
  padding: 12px 8px;
}
.hchip-v {
  font-size: 17px;
}
.hchip-l {
  font-size: 10px;
}
.prog {
  margin: 0 14px 12px;
  border-radius: 20px;
  padding: 15px 16px;
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.96), rgba(10, 16, 28, 0.9));
}
.next-ev {
  margin: 2px 14px 14px;
  border-radius: 20px;
  padding: 15px 16px;
}
.next-ic {
  width: 48px;
  height: 48px;
  border-radius: 16px;
}
.next-name {
  font-size: 14px;
  line-height: 1.35;
  white-space: normal;
}
.qgrid {
  gap: 10px;
}
.qcard {
  border-radius: 20px;
  padding: 16px 14px 14px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}
.qcard-q {
  font-size: 10px;
}
.qcard-name {
  font-size: 11px;
}
.q-group-hdr {
  padding: 16px 2px 8px;
}
.evlist {
  gap: 8px;
}
.evcard {
  border-radius: 18px;
  padding: 13px 48px 13px 13px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}
.evic {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}
.evname {
  font-size: 14px;
  line-height: 1.35;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.evmeta {
  margin-top: 4px;
  font-size: 11px;
  flex-wrap: wrap;
}
.evtop {
  gap: 5px;
}
.ev-mini-pill {
  min-height: 24px;
  padding: 0 10px;
}
.evside {
  min-width: 52px;
}
.evcnt {
  min-width: 42px;
  height: 36px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.star-btn {
  right: 8px;
  width: 34px;
  height: 34px;
}

#people-overview,
#stats-hero {
  padding: 0 14px 10px;
}
.people-overview-card,
.stats-hero-card {
  border-radius: 24px;
  padding: 16px;
  background: linear-gradient(160deg, rgba(11, 18, 32, 0.96), rgba(12, 23, 38, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: var(--card-shadow);
}
.people-overview-head,
.stats-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.people-overview-kicker,
.stats-hero-kicker {
  font-family: 'Unbounded';
  font-size: 9px;
  color: var(--a2);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.people-overview-title,
.stats-hero-title {
  margin-top: 8px;
  font-family: 'Unbounded';
  font-size: 18px;
  line-height: 1.22;
}
.stats-hero-meta {
  margin-top: 8px;
  font-size: 11px;
  color: var(--t3);
  line-height: 1.45;
}
.people-overview-badge {
  min-width: 64px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(79, 142, 247, 0.1);
  color: var(--a2);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.people-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.people-overview-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 10px;
}
.people-overview-cell span {
  display: block;
  font-size: 10px;
  color: var(--t3);
}
.people-overview-cell strong {
  display: block;
  margin-top: 6px;
  font-family: 'Unbounded';
  font-size: 16px;
}
.stats-hero-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Unbounded';
  font-size: 16px;
  flex-shrink: 0;
  background: conic-gradient(from 180deg, rgba(79, 142, 247, 0.2), rgba(79, 142, 247, 0.65));
}
.stats-hero-ring.is-good {
  background: conic-gradient(from 180deg, rgba(34, 211, 165, 0.18), rgba(34, 211, 165, 0.72));
}
.stats-hero-ring span {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #08111d;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stats-hero-sub {
  margin-top: 14px;
  font-size: 12px;
  color: var(--t2);
  line-height: 1.55;
}
.sg {
  padding-top: 4px;
  gap: 10px;
}
.sc {
  border-radius: 20px;
  padding: 18px 14px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}
.sc-v {
  font-size: 26px;
}
.sc-l {
  font-size: 11px;
  line-height: 1.4;
}
.sc-note {
  font-size: 11px;
}

.sbox {
  margin: 10px 14px 0;
}
.sinput {
  border-radius: 18px;
  padding: 13px 14px 13px 44px;
  background: rgba(11, 18, 32, 0.92);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}
.dchips {
  padding-top: 12px;
  gap: 7px;
}
.dchip {
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.plist {
  gap: 8px;
}
.prow {
  min-height: 62px;
  padding: 12px 14px;
  border-radius: 18px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}
.pfio {
  font-size: 14px;
  line-height: 1.3;
}
.pdept {
  font-size: 11px;
  margin-top: 3px;
}
.pbadge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}
.pqbtn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 13px;
}

.tabs {
  padding: 0 14px;
}
.tab {
  padding: 12px 0;
}
.ev-hero {
  min-height: 312px;
}
.ev-hero-name {
  font-size: 22px;
}
.ev-hero-chip {
  font-size: 11px;
}
.ev-hero-meta {
  font-size: 13px;
}
.ev-stats-bar {
  padding: 14px 16px 12px;
  background: rgba(11, 18, 32, 0.95);
}
.ev-stats-hint {
  font-size: 12px;
  line-height: 1.6;
}
.smart-empty {
  border-radius: 20px;
}
.ev-desc,
.ev-coverage-card,
.active-ppl-item,
.hist-item,
.ehi {
  border-radius: 18px;
}
.gallery {
  gap: 6px;
}
.gallery-item,
.gallery-add {
  border-radius: 16px;
}

.prof-hero {
  padding: 18px 16px 22px;
  background:
    radial-gradient(circle at top right, rgba(122, 179, 255, 0.16), transparent 30%),
    linear-gradient(155deg, #0f2242 0%, #0a1629 58%, #08111d 100%);
}
.prof-av {
  width: 82px;
  height: 82px;
  border-radius: 24px;
}
.prof-name {
  font-size: 20px;
}
.prof-chips {
  gap: 10px;
}
.prof-chip {
  border-radius: 16px;
}

.modal {
  border-radius: 28px 28px 0 0;
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.98), rgba(8, 13, 22, 0.98));
}
.mover#mod-person {
  align-items: flex-end;
  padding: calc(env(safe-area-inset-top, 0px) + 26px) max(env(safe-area-inset-right, 0px), 12px)
    calc(env(safe-area-inset-bottom, 0px) + 10px) max(env(safe-area-inset-left, 0px), 12px);
}
#mod-person .modal {
  width: min(100%, 560px);
  max-height: calc(
    100dvh - env(safe-area-inset-top, 0px) - 26px - env(safe-area-inset-bottom, 0px) - 10px
  );
  margin: 0 auto;
  border-radius: 30px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.48);
}
#mod-person .modal-title {
  padding: 18px 18px 14px;
  gap: 12px;
}
#mod-person .modal-title span {
  min-width: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
#mod-person .modal-close {
  flex-shrink: 0;
}
#mod-person .person-sheet {
  padding: 16px 0 8px;
}
#mod-person .sec {
  padding: 0;
}
#mod-person .person-sheet-hero {
  padding: 0 0 10px;
}
#mod-person .person-sheet-stats {
  margin-top: 14px;
}
.modal-title {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.98), rgba(11, 18, 32, 0.92));
  backdrop-filter: blur(12px);
  z-index: 2;
}
.fi,
.cm-input,
.ev-desc-edit {
  border-radius: 16px;
}
.btn-p,
.btn-d,
.btn-sec,
.btn-save,
.btn-cancel {
  min-height: 48px;
  border-radius: 16px;
}
.toast {
  top: calc(env(safe-area-inset-top, 44px) + 60px);
  white-space: normal;
  line-height: 1.4;
}

@media (max-width: 430px) {
  #mod-person {
    padding: calc(env(safe-area-inset-top, 0px) + 20px) max(env(safe-area-inset-right, 0px), 10px)
      calc(env(safe-area-inset-bottom, 0px) + 8px) max(env(safe-area-inset-left, 0px), 10px);
  }
  #mod-person .modal {
    width: 100%;
    max-height: calc(
      100dvh - env(safe-area-inset-top, 0px) - 20px - env(safe-area-inset-bottom, 0px) - 8px
    );
    border-radius: 26px;
  }
  #mod-person .modal-title {
    padding: 18px 16px 14px;
  }
  .person-sheet-shell {
    padding: 0 16px 0;
  }
  .home-events-shell {
    padding: 0 14px 10px;
  }
  .ev-overview-card {
    border-radius: 18px;
    padding: 14px;
  }
  .ev-overview-grid {
    grid-template-columns: 1fr;
  }
  .ev-overview-actions {
    flex-direction: column;
  }
  .people-card {
    border-radius: 18px;
    padding: 13px;
  }
  .people-card-score {
    min-width: 36px;
    height: 36px;
    border-radius: 11px;
  }
  .people-directory-row {
    min-height: 76px;
    padding: 12px 12px 12px 15px;
    border-radius: 17px;
  }
  .people-directory-row-count {
    min-width: 40px;
  }
  .home-shell {
    gap: 10px;
  }
  .home-intro {
    padding: 15px 14px;
  }
  .home-intro-title {
    font-size: 16px;
  }
  .home-intro-mark {
    width: 64px;
    min-height: 64px;
  }
  .hero {
    border-radius: 24px;
  }
  .hero-big {
    font-size: 30px;
  }
  .qgrid {
    grid-template-columns: 1fr 1fr;
  }
  .people-overview-grid {
    grid-template-columns: 1fr;
  }
  .profile-fact-grid,
  .profile-action-grid {
    grid-template-columns: 1fr;
  }
  .person-sheet-links {
    grid-template-columns: 1fr;
  }
  .access-lead-card {
    margin: 0 14px 10px;
    padding: 14px;
  }
}

@media (min-width: 1100px) {
  :root {
    --desktop-rail-w: 108px;
    --desktop-shell: 1480px;
    --desktop-pad: 32px;
    --desktop-gap: 28px;
  }
  body.has-tabbar {
    --bnav-h: 0px;
  }
  body.has-tabbar .scr {
    left: calc(var(--desktop-rail-w) + 30px);
  }
  body.has-tabbar .scroll {
    padding-bottom: 28px;
  }
  .bnav {
    top: 18px;
    bottom: 18px;
    left: 18px;
    right: auto;
    width: var(--desktop-rail-w);
    border-radius: 32px;
    padding: 10px 0;
    background: linear-gradient(180deg, rgba(10, 17, 29, 0.96), rgba(7, 12, 22, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  }
  .bnav-inner {
    height: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    padding: 8px;
  }
  .nb {
    flex: 0 0 auto;
    min-height: 74px;
    gap: 8px;
    padding: 12px 8px;
    border-radius: 20px;
  }
  .nb.is-locked::after {
    top: 8px;
    right: 10px;
  }
  .nb-ic svg {
    width: 24px;
    height: 24px;
  }
  .nb-lb {
    font-size: 11px;
    line-height: 1.25;
    white-space: normal;
  }
  #scr-home .hdr,
  #scr-people .hdr,
  #scr-stats .hdr,
  #scr-profile .hdr {
    padding: 24px var(--desktop-pad) 16px;
  }
  #scr-home .hdr::after,
  #scr-people .hdr::after,
  #scr-stats .hdr::after,
  #scr-profile .hdr::after {
    left: var(--desktop-pad);
    right: var(--desktop-pad);
  }
  #home-content {
    max-width: var(--desktop-shell);
    margin: 0 auto;
    padding: 28px var(--desktop-pad) 36px;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
    gap: var(--desktop-gap);
    align-items: start;
  }
  #home-stat-strip {
    grid-column: 1/-1;
    margin: 0;
  }
  #home-quick-grid {
    grid-column: 2;
    align-self: start;
    margin: 0;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
  #home-personal-wrap {
    grid-column: 2;
    margin: 0;
  }
  #home-view-switch {
    grid-column: 1;
    margin: 0;
    padding: 0;
  }
  .home-view-tab {
    min-height: 48px;
    font-size: 11px;
  }
  .home-events-search {
    grid-column: 1;
    margin: 0 !important;
  }
  .home-events-search .sinput {
    min-height: 56px;
  }
  #home-event-groups {
    grid-column: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
  #home-event-groups.is-calendar {
    gap: 0;
  }
  #home-quarters-wrap {
    grid-column: 2;
    grid-row: 2 / span 3;
    align-self: start;
    position: sticky;
    top: 24px;
  }
  .ev-group {
    margin: 0;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(11, 18, 32, 0.96), rgba(8, 13, 22, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  }
  .ev-group-hdr {
    padding: 18px 20px 14px;
  }
  .ev-group-title {
    font-size: 11px;
  }
  .ev-group-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0 20px 20px;
  }
  .ev-group-body.hg-collapsed {
    display: none;
  }
  .ev-group-body .smart-empty {
    grid-column: 1/-1;
  }
  .ev-group-body .evcard {
    height: 100%;
  }
  .home-calendar-shell {
    margin: 0;
    padding: 20px;
    border-radius: 28px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  }
  .home-cal-weekdays,
  .home-cal-grid {
    gap: 10px;
  }
  .home-cal-day {
    min-height: 90px;
    padding: 12px;
    border-radius: 18px;
  }
  .home-cal-day-num {
    font-size: 14px;
  }
  .home-cal-agenda {
    margin-top: 18px;
    padding-top: 18px;
  }
  .home-cal-agenda-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .home-cal-agenda-list .smart-empty {
    grid-column: 1/-1;
  }
  .home-quarters-accordion {
    margin: 0;
    padding: 20px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(11, 18, 32, 0.94), rgba(9, 15, 25, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  }
  .home-quarters-hdr {
    padding: 0 0 14px;
    border-top: none;
    cursor: default;
  }
  .home-quarters-toggle {
    display: none;
  }
  .home-quarters-body {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  #scr-people .sticky-surface {
    padding: 0 var(--desktop-pad) 14px;
    background: linear-gradient(
      180deg,
      rgba(4, 7, 13, 0.92),
      rgba(4, 7, 13, 0.78) 72%,
      rgba(4, 7, 13, 0)
    );
  }
  #scr-people .sbox,
  #scr-people .people-filter-row {
    max-width: var(--desktop-shell);
    margin-left: auto;
    margin-right: auto;
  }
  #scr-people .sbox {
    margin-top: 14px;
  }
  #people-overview {
    max-width: var(--desktop-shell);
    margin: 0 auto;
    padding: 0 var(--desktop-pad) 18px;
  }
  .people-overview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  #ppl-list {
    max-width: min(1040px, var(--desktop-shell));
    margin: 0 auto;
    padding: 0 var(--desktop-pad) 36px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  #ppl-list .smart-empty {
    width: 100%;
  }
  .people-directory-row {
    padding: 14px 16px 14px 18px;
    border-radius: 22px;
  }
  #scr-stats .scroll {
    padding-top: 18px;
  }
  #scr-stats .sec,
  #stats-hero,
  .sg,
  #q-stats-wrap,
  .content-pad-inline-sm,
  .score-dist-pad,
  #scr-stats .spacer-10 {
    max-width: var(--desktop-shell);
    margin-left: auto;
    margin-right: auto;
  }
  #scr-stats .sec,
  #stats-hero,
  .sg,
  #q-stats-wrap,
  .content-pad-inline-sm,
  .score-dist-pad {
    padding-left: var(--desktop-pad);
    padding-right: var(--desktop-pad);
  }
  .stats-hero-card {
    border-radius: 28px;
    padding: 24px 26px;
  }
  .stats-hero-ring {
    width: 88px;
    height: 88px;
    font-size: 18px;
  }
  .stats-hero-ring span {
    width: 66px;
    height: 66px;
  }
  .sg {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding-top: 0;
    padding-bottom: 14px;
  }
  .sc {
    border-radius: 24px;
    padding: 22px 18px;
  }
  #q-stats-wrap {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .qstats-card {
    height: 100%;
    padding: 16px 18px;
    border-radius: 22px;
  }
  .stats-section-card {
    padding: 20px;
    border-radius: 24px;
  }
  .dist-meta {
    gap: 12px 16px;
  }
  #profile-content {
    max-width: var(--desktop-shell);
    margin: 0 auto;
    padding: 0 var(--desktop-pad) 36px;
  }
  .prof-hero {
    margin-top: 24px;
    border-radius: 32px;
    padding: 28px 32px 30px;
  }
  .profile-section,
  .profile-section-lg {
    padding: 0;
    margin-top: 26px;
    margin-bottom: 12px;
  }
  .profile-dashboard {
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
  .profile-awards-list {
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .profile-link-card {
    max-width: 760px;
    margin: 24px auto 0;
  }
  #profile-content .hist-item {
    max-width: 1120px;
    margin: 0 auto 10px;
  }
  #profile-content .profile-empty {
    max-width: 920px;
    margin: 0 auto;
  }
  #ev-hero-area,
  #ev-overview-wrap,
  #ev-stats-bar,
  #ev-tabs,
  #ev-desc-wrap,
  #ev-coverage-wrap,
  #ev-gallery-wrap,
  #ev-active-wrap,
  #ev-comment-wrap,
  #ev-related-wrap {
    width: min(1180px, calc(100% - 64px));
    margin-left: auto;
    margin-right: auto;
  }
  #ev-hero-area {
    padding-top: 24px;
  }
  .ev-hero {
    min-height: 380px;
    border-radius: 32px;
  }
  .ev-overview-card {
    margin: 20px 0 0;
    padding: 20px 22px;
    border-radius: 26px;
  }
  .ev-overview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }
  .ev-stats-bar {
    margin-top: 18px;
    border-radius: 24px;
    padding: 18px 22px 16px;
  }
  #ev-tabs {
    padding: 18px 0 0;
  }
  #ev-tab-ppl .hdr,
  #ev-tab-ppl .sticky-surface,
  #ev-tab-ppl .scroll {
    max-width: var(--desktop-shell);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
  #ev-tab-ppl .sticky-surface,
  #ev-tab-ppl .scroll {
    padding-left: var(--desktop-pad);
    padding-right: var(--desktop-pad);
  }
  #ev-tab-ppl .scroll {
    padding-bottom: 32px;
  }
  #ev-tab-ppl #plist {
    padding: 10px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  #ev-tab-ppl #plist .smart-empty {
    grid-column: 1/-1;
  }
  #q-evlist {
    max-width: var(--desktop-shell);
    margin: 0 auto;
    padding: 24px var(--desktop-pad) 34px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 1400px) {
  #ppl-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .profile-awards-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #q-stats-wrap {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  html,
  body {
    background: linear-gradient(180deg, #050910 0%, #08111b 100%);
  }

  body::before,
  body::after,
  .hero::before,
  .hero::after {
    display: none;
  }

  body {
    --bnav-h: calc(58px + env(safe-area-inset-bottom, 0px));
  }

  .scr {
    background: transparent;
  }

  .hdr {
    padding: calc(env(safe-area-inset-top, 44px) + 8px) 12px 8px;
    gap: 8px;
    background: rgba(5, 9, 16, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .hdr::after {
    left: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.06);
  }

  .hdr-mid h1 {
    font-family: 'Onest', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.18px;
  }

  .hdr-mid p {
    margin-top: 1px;
    font-size: 10px;
    color: #7890b4;
  }

  .hdr-build,
  .build-stamp {
    display: none;
  }

  .btn-bk,
  .btn-h {
    min-width: 38px;
    min-height: 38px;
    border-radius: 11px;
    background: rgba(17, 24, 39, 0.86);
  }

  .btn-bk {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .btn-h {
    height: 38px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 700;
    box-shadow: none;
  }

  .btn-h.ac,
  .btn-p,
  .btn-save {
    box-shadow: none;
  }

  .scroll {
    padding-bottom: var(--bnav-h);
  }

  .bnav {
    background: rgba(5, 9, 16, 0.98);
    border-top-color: rgba(255, 255, 255, 0.06);
  }

  .bnav-inner {
    gap: 2px;
    padding: 4px 6px 3px;
  }

  .nb {
    min-height: 42px;
    padding: 4px 2px;
    gap: 2px;
    border-radius: 13px;
  }

  .nb-ic svg {
    width: 19px;
    height: 19px;
  }

  .nb-lb {
    font-size: 9px;
    letter-spacing: 0.1px;
  }

  .sticky-surface {
    background: linear-gradient(180deg, rgba(5, 9, 16, 0.98), rgba(5, 9, 16, 0.9));
  }

  .hero,
  .prog,
  .next-ev,
  .home-intro,
  .home-calendar-shell,
  .home-digest-card,
  .home-quick-card,
  .qcard,
  .evcard,
  .people-directory-row,
  .people-card,
  .people-overview-card,
  .stats-hero-card,
  .sc,
  .profile-panel,
  .profile-link-card,
  .mk-card,
  .admin-action-btn,
  .modal,
  .sheet,
  .ev-overview-card,
  .ev-stats-bar,
  .ev-desc,
  .ev-coverage-card,
  .ev-comment-card,
  .active-ppl-item,
  .hist-item,
  .ehi {
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.05);
  }

  .hero,
  .home-calendar-shell,
  .home-intro,
  .prog,
  .next-ev {
    margin-left: 12px;
    margin-right: 12px;
    border-radius: 16px;
  }

  .hero {
    padding: 14px;
    background: linear-gradient(180deg, rgba(12, 22, 38, 0.96), rgba(8, 16, 28, 0.96));
  }

  .hero-big {
    margin: 6px 0 2px;
    font-size: 24px;
    line-height: 1.08;
  }

  .hero-sub {
    margin-bottom: 12px;
    font-size: 11px;
    color: var(--t2);
  }

  .hero-chips {
    gap: 6px;
  }

  .hchip {
    border-radius: 12px;
    padding: 8px 6px;
    backdrop-filter: none;
  }

  .hchip-v {
    font-size: 14px;
  }

  .hchip-l {
    font-size: 9px;
  }

  .prog,
  .next-ev {
    padding: 12px 14px;
  }

  .prog-top {
    margin-bottom: 8px;
  }

  .prog-vl {
    font-size: 12px;
  }

  .sec {
    padding: 0 12px;
    margin-top: 14px;
    margin-bottom: 7px;
    font-size: 9px;
    letter-spacing: 0.85px;
  }

  .content-pad-inline-sm {
    padding: 0 12px 2px;
  }

  .home-shell {
    padding: 12px 12px 0;
    gap: 10px;
  }

  .home-intro {
    padding: 14px;
    gap: 10px;
  }

  .home-intro-mark {
    display: none;
  }

  .home-intro-title {
    margin-top: 4px;
    font-size: 16px;
  }

  .home-intro-sub {
    margin-top: 4px;
    font-size: 11px;
  }

  .home-quick-grid {
    margin: 0 12px 8px;
    gap: 8px;
  }

  .home-quick-card {
    min-height: 74px;
    padding: 12px;
    gap: 5px;
    border-radius: 16px;
    background: rgba(10, 17, 29, 0.92);
  }

  .home-quick-card.is-locked::after {
    top: 10px;
    right: 10px;
    font-size: 8px;
  }

  .home-quick-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 16px;
  }

  .home-quick-title {
    font-size: 12px;
  }

  .home-quick-meta {
    font-size: 10px;
    line-height: 1.3;
  }

  .home-events-shell,
  .restricted-screen-state,
  #people-overview,
  #stats-hero,
  .profile-dashboard,
  .profile-awards-list {
    padding-left: 12px;
    padding-right: 12px;
  }

  .home-view-switch {
    padding: 0 12px 4px;
    gap: 6px;
  }

  .home-view-tab {
    min-height: 34px;
    font-size: 9px;
    letter-spacing: 0.22px;
    box-shadow: none;
  }

  .home-digest-value {
    font-size: 16px;
  }

  .home-calendar-shell {
    margin-top: 4px;
    margin-bottom: 2px;
    padding: 12px;
    background: rgba(10, 17, 29, 0.94);
  }

  .home-cal-title {
    margin-top: 4px;
    font-size: 15px;
  }

  .home-cal-sub {
    margin-top: 4px;
    font-size: 10px;
  }

  .home-cal-weekdays,
  .home-cal-grid {
    gap: 4px;
  }

  .home-cal-day {
    min-height: 52px;
    padding: 6px;
    border-radius: 12px;
    box-shadow: none;
  }

  .home-cal-day-num {
    font-size: 11px;
  }

  .home-cal-day-count {
    min-width: 18px;
    min-height: 18px;
    padding: 0 5px;
    font-size: 9px;
  }

  .home-stat-strip {
    gap: 6px;
    padding: 10px 12px 8px;
  }

  .hss-q,
  .hss-pct,
  .hss-meta {
    font-size: 10px;
  }

  .sbox {
    margin: 8px 12px 0;
  }

  .sinput {
    border-radius: 14px;
    padding: 12px 12px 12px 40px;
    background: rgba(10, 17, 29, 0.94);
    box-shadow: none;
  }

  .dchips {
    gap: 6px;
    padding: 8px 12px 0;
  }

  .dchip {
    min-height: 28px;
    padding: 0 10px;
    font-size: 10px;
    font-weight: 600;
  }

  .plist,
  .evlist {
    gap: 6px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .prow,
  .people-directory-row,
  .people-card,
  .evcard,
  .mk-card,
  .admin-action-btn {
    border-radius: 14px;
    box-shadow: none;
  }

  .prow {
    min-height: 48px;
    padding: 10px 11px;
  }

  .pav {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 12px;
  }

  .pfio {
    font-size: 12px;
  }

  .pdept {
    font-size: 9px;
  }

  .people-directory-row {
    min-height: 64px;
    padding: 10px 12px 10px 14px;
    gap: 10px;
    background: rgba(10, 17, 29, 0.96);
  }

  .people-directory-row-name,
  .people-card-name,
  .mk-name,
  .aab-t {
    font-size: 13px;
  }

  .people-directory-row-status,
  .people-card-sub,
  .aab-s {
    font-size: 10px;
  }

  .people-directory-row-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 12px;
  }

  .people-directory-row-count {
    min-width: 38px;
  }

  .people-directory-row-count strong {
    font-size: 12px;
  }

  .people-directory-row-count span {
    font-size: 8px;
  }

  .people-overview-card,
  .stats-hero-card {
    border-radius: 16px;
    padding: 14px;
    background: rgba(10, 17, 29, 0.94);
  }

  .people-overview-title,
  .stats-hero-title {
    margin-top: 5px;
    font-size: 15px;
  }

  .people-overview-grid {
    margin-top: 12px;
    gap: 6px;
  }

  .people-overview-cell {
    border-radius: 12px;
    padding: 9px 10px;
  }

  .stats-hero-ring {
    width: 62px;
    height: 62px;
    font-size: 14px;
  }

  .stats-hero-ring span {
    width: 46px;
    height: 46px;
  }

  .stats-hero-sub {
    margin-top: 12px;
    font-size: 11px;
  }

  .sg {
    padding-top: 2px;
    gap: 8px;
  }

  .sc {
    border-radius: 16px;
    padding: 14px 12px;
    background: rgba(10, 17, 29, 0.94);
  }

  .sc-v {
    font-size: 22px;
  }

  .sc-l,
  .sc-note {
    font-size: 10px;
  }

  .qgrid {
    gap: 8px;
    padding: 0 12px;
  }

  .qcard {
    border-radius: 16px;
    padding: 12px;
  }

  .qcard-num {
    font-size: 22px;
  }

  .q-group-hdr {
    padding: 12px 2px 6px;
  }

  .evcard {
    padding: 10px 40px 10px 10px;
    gap: 8px;
    background: rgba(10, 17, 29, 0.96);
  }

  .evic {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 16px;
  }

  .evname {
    font-size: 13px;
    line-height: 1.28;
  }

  .evmeta {
    margin-top: 3px;
    gap: 5px;
    font-size: 10px;
  }

  .ev-mini-pill {
    min-height: 20px;
    padding: 0 7px;
    font-size: 9px;
  }

  .evside {
    min-width: 42px;
    gap: 3px;
  }

  .evcnt {
    min-width: 32px;
    height: 28px;
    padding: 0 6px;
    border-radius: 9px;
    font-size: 10px;
  }

  .evcnt-sub {
    font-size: 8px;
    letter-spacing: 0.2px;
  }

  .tabs {
    padding: 0 12px;
    margin-top: 6px;
  }

  .tab {
    padding: 9px 0;
    font-size: 9px;
    letter-spacing: 0.22px;
  }

  .ev-hero {
    min-height: 220px;
    border-radius: 18px;
  }

  .ev-hero-name {
    font-size: 18px;
  }

  .ev-hero-meta {
    font-size: 11px;
  }

  .ev-overview-card,
  .ev-stats-bar,
  .ev-desc,
  .ev-coverage-card,
  .ev-comment-card {
    border-radius: 16px;
    background: rgba(10, 17, 29, 0.94);
  }

  .ev-overview-card {
    margin-top: 12px;
    padding: 14px;
  }

  .ev-overview-grid {
    gap: 6px;
  }

  .ev-overview-cell {
    border-radius: 12px;
    padding: 9px 10px;
  }

  .ev-stats-bar {
    padding: 12px 14px 10px;
  }

  .ev-stats-hint {
    font-size: 11px;
  }

  .prof-hero {
    padding: 14px 12px 16px;
    border-radius: 0 0 18px 18px;
    background: linear-gradient(180deg, rgba(11, 22, 38, 0.98), rgba(7, 14, 24, 0.96));
  }

  .prof-av {
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }

  .prof-name {
    font-size: 16px;
  }

  .prof-pos {
    font-size: 11px;
  }

  .prof-dept {
    font-size: 10px;
  }

  .prof-chips {
    gap: 6px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .prof-chip {
    min-width: 0;
    padding: 8px 6px;
    border-radius: 12px;
  }

  .prof-chip-v {
    font-size: 14px;
  }

  .prof-chip-l {
    font-size: 8px;
  }

  .profile-section,
  .profile-section-lg {
    margin-top: 16px;
    margin-bottom: 10px;
  }

  .profile-panel,
  .profile-link-card {
    border-radius: 16px;
    padding: 12px 14px;
  }

  .profile-panel-title {
    font-size: 14px;
  }

  .profile-panel-note,
  .profile-inline-note,
  .profile-link-note {
    font-size: 11px;
  }

  .profile-fact-grid,
  .profile-action-grid {
    gap: 6px;
  }

  .profile-fact-card {
    border-radius: 12px;
    padding: 9px 10px;
  }

  .profile-action-btn {
    min-height: 42px;
    border-radius: 12px;
    font-size: 11px;
  }

  .quick-actions-stack {
    padding: 0 12px;
    gap: 6px;
  }

  .admin-action-btn {
    padding: 10px 12px;
    gap: 10px;
    border-radius: 14px;
    background: rgba(10, 17, 29, 0.96);
  }

  .aab-ic {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 16px;
  }

  .aab-arr {
    font-size: 16px;
  }

  .mk-card {
    margin: 0 12px 6px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(10, 17, 29, 0.96);
  }

  .mk-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 14px;
  }

  .modal,
  .sheet {
    border-radius: 20px 20px 0 0;
    background: rgba(9, 15, 24, 0.985);
    box-shadow: none;
  }

  .modal-title {
    font-size: 14px;
    padding: 14px 0 10px;
    margin-bottom: 10px;
  }

  .modal-copy,
  .modal-check-copy,
  .modal-note {
    font-size: 11px;
  }

  .fi,
  .cm-input,
  .ev-desc-edit {
    border-radius: 14px;
    background: rgba(13, 21, 33, 0.94);
    box-shadow: none;
  }

  .smart-empty {
    padding: 16px 14px;
    border-radius: 16px;
  }

  .smart-empty-title {
    font-size: 13px;
  }

  .smart-empty-sub {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  :root {
    --r: 14px;
    --rs: 11px;
    --shell-gap: 10px;
    --card-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  }

  body {
    --bnav-h: 72px;
  }

  body::after {
    opacity: 0.28;
  }

  .hdr {
    padding: calc(env(safe-area-inset-top, 44px) + 8px) 12px 8px;
    gap: 8px;
  }

  .hdr::after {
    left: 12px;
    right: 12px;
  }

  .hdr-mid h1 {
    font-size: 14px;
  }

  .hdr-mid p {
    margin-top: 1px;
    font-size: 10px;
  }

  .hdr-build {
    min-height: 18px;
    margin-top: 5px;
    padding: 0 7px;
    font-size: 8px;
    letter-spacing: 0.2px;
  }

  .btn-bk,
  .btn-h {
    min-width: 40px;
    min-height: 40px;
    border-radius: 12px;
  }

  .btn-bk {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .btn-h {
    height: 40px;
    padding: 0 11px;
    gap: 4px;
    font-size: 11px;
  }

  .hdr-action-icon,
  .btn-h-icon {
    padding: 0 9px;
  }

  .scroll {
    padding-bottom: var(--bnav-h, 72px);
  }

  .bnav-inner {
    gap: 2px;
    padding: 4px 6px 3px;
  }

  .nb {
    min-height: 44px;
    padding: 4px 2px;
    gap: 2px;
    border-radius: 14px;
  }

  .nb-ic svg {
    width: 20px;
    height: 20px;
  }

  .nb-lb {
    font-size: 9px;
    letter-spacing: 0.12px;
  }

  .install-banner {
    left: 10px;
    right: 10px;
    bottom: calc(var(--pb) + 12px);
    padding: 12px;
    border-radius: 18px;
    gap: 10px;
  }

  .install-banner-title {
    font-size: 12px;
  }

  .install-banner-sub {
    font-size: 10px;
  }

  .install-banner-btn {
    min-height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 11px;
  }

  .install-banner-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 16px;
  }

  body.has-tabbar .install-banner {
    bottom: calc(var(--pb) + 82px);
  }

  .hero,
  .home-calendar-shell {
    margin-left: 12px;
    margin-right: 12px;
    border-radius: 18px;
  }

  .hero {
    padding: 16px 16px 14px;
  }

  .home-calendar-shell {
    margin-top: 4px;
    margin-bottom: 2px;
    padding: 12px;
  }

  .sec,
  .content-pad-inline-sm {
    padding-left: 12px;
    padding-right: 12px;
  }

  .sec-top {
    margin-top: 12px;
  }

  .home-shell {
    padding: 12px 12px 0;
    gap: 10px;
  }

  .home-intro {
    gap: 10px;
    padding: 14px 14px 13px;
    border-radius: 18px;
  }

  .home-intro-kicker {
    font-size: 9px;
    letter-spacing: 1px;
  }

  .home-intro-title {
    margin-top: 6px;
    font-size: 16px;
  }

  .home-intro-sub {
    font-size: 11px;
    line-height: 1.45;
  }

  .home-quick-grid {
    gap: 8px;
    margin: 0 12px 8px;
  }

  .home-quick-card {
    min-height: 78px;
    border-radius: 16px;
    padding: 12px;
    gap: 6px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  }

  .home-quick-card.is-locked::after {
    top: 10px;
    right: 10px;
    font-size: 8px;
  }

  .home-quick-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 17px;
  }

  .home-quick-title {
    font-size: 12px;
  }

  .home-quick-meta {
    font-size: 10px;
    line-height: 1.3;
  }

  .home-events-shell,
  .restricted-screen-state {
    padding-left: 12px;
    padding-right: 12px;
  }

  .home-view-switch {
    padding: 0 12px 4px;
    gap: 6px;
  }

  .home-view-tab {
    min-height: 36px;
    font-size: 9px;
    letter-spacing: 0.3px;
  }

  .home-digest-card {
    border-radius: 14px;
    padding: 10px 11px;
  }

  .home-cal-kicker {
    font-size: 9px;
  }

  .home-cal-title {
    margin-top: 4px;
    font-size: 16px;
  }

  .home-cal-sub {
    margin-top: 4px;
    font-size: 10px;
  }

  .home-cal-head {
    gap: 10px;
  }

  .home-cal-nav {
    gap: 6px;
  }

  .home-cal-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 16px;
  }

  .home-cal-weekdays,
  .home-cal-grid {
    gap: 4px;
  }

  .home-cal-weekdays {
    margin-top: 12px;
  }

  .home-cal-day {
    min-height: 56px;
    padding: 7px;
    border-radius: 14px;
  }

  .home-cal-day-num {
    font-size: 11px;
  }

  .home-cal-day-count {
    min-width: 18px;
    min-height: 18px;
    padding: 0 5px;
    font-size: 9px;
  }

  .home-cal-agenda {
    margin-top: 12px;
    padding-top: 12px;
  }

  .home-stat-strip {
    gap: 6px;
    padding: 10px 12px 8px;
  }

  .hss-q {
    font-size: 10px;
  }

  .hss-pct {
    font-size: 11px;
  }

  .hss-meta {
    font-size: 10px;
  }

  .qgrid {
    padding: 0 12px;
    gap: 8px;
  }

  .qcard {
    border-radius: 16px;
    padding: 12px;
  }

  .qcard-line {
    border-radius: 16px 16px 0 0;
  }

  .qcard-num {
    font-size: 22px;
  }

  .qcard-metrics {
    margin-top: 8px;
    gap: 4px;
  }

  .next-ev {
    margin: 0 12px 12px;
    padding: 12px 14px;
    gap: 10px;
  }

  .next-ic {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 18px;
  }

  .next-name {
    font-size: 12px;
  }

  .next-days {
    font-size: 18px;
  }

  .sbox {
    margin: 8px 12px 0;
  }

  .sinput {
    border-radius: 14px;
    padding: 11px 12px 11px 38px;
  }

  .sic {
    left: 12px;
    font-size: 15px;
  }

  .sclr {
    right: 10px;
    width: 20px;
    height: 20px;
    font-size: 13px;
  }

  .dchips {
    gap: 5px;
    padding: 8px 12px 0;
  }

  .dchip {
    padding: 5px 10px;
    font-size: 10px;
  }

  .people-filter-row {
    padding: 10px 12px 0;
  }

  .plist {
    padding: 8px 12px 0;
    gap: 4px;
  }

  #ppl-list {
    gap: 8px;
    padding-bottom: 14px;
  }

  .prow {
    min-height: 48px;
    padding: 10px 11px;
    gap: 10px;
    border-radius: 12px;
  }

  .pav {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 12px;
  }

  .pfio {
    font-size: 12px;
  }

  .pdept {
    font-size: 9px;
  }

  .people-directory-row {
    min-height: 68px;
    padding: 10px 11px 10px 14px;
    gap: 10px;
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
  }

  .people-directory-row::before {
    top: 10px;
    bottom: 10px;
  }

  .people-directory-row-name {
    font-size: 13px;
  }

  .people-directory-row-status {
    font-size: 10px;
  }

  .people-directory-row-side {
    gap: 4px;
    margin-left: 6px;
  }

  .people-directory-row-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    font-size: 13px;
  }

  .people-directory-row-count {
    min-width: 40px;
  }

  .people-directory-row-count strong {
    font-size: 13px;
  }

  .people-directory-row-count span {
    margin-top: 2px;
    font-size: 8px;
  }

  .people-overview-card,
  .stats-hero-card {
    border-radius: 18px;
    padding: 14px;
  }

  .people-card {
    border-radius: 16px;
    padding: 12px;
    gap: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  }

  .people-card-head {
    gap: 10px;
  }

  .people-card-name {
    font-size: 13px;
  }

  .people-card-score {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 11px;
    font-size: 13px;
  }

  .people-card-meta {
    margin-top: 4px;
    font-size: 11px;
  }

  .people-card-sub {
    margin-top: 2px;
    font-size: 10px;
  }

  .people-card-chips {
    gap: 5px;
    margin-top: 8px;
  }

  .people-card-chip {
    min-height: 22px;
    padding: 0 8px;
    font-size: 9px;
  }

  .people-card-facts {
    gap: 6px;
  }

  .people-card-fact {
    border-radius: 12px;
    padding: 9px 10px;
  }

  .people-card-fact span {
    font-size: 9px;
  }

  .people-card-fact strong {
    margin-top: 4px;
    font-size: 12px;
  }

  .ev-group-hdr {
    padding: 10px 12px 7px;
  }

  .ev-group-badge {
    padding: 2px 6px;
  }

  .evlist {
    padding: 0 12px;
    gap: 6px;
  }

  .evcard {
    border-radius: 14px;
    padding: 10px 42px 10px 10px;
    gap: 8px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
  }

  .evic {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 17px;
  }

  .evtop {
    gap: 4px;
    margin-bottom: 4px;
  }

  .ev-mini-pill {
    min-height: 20px;
    padding: 0 8px;
    font-size: 9px;
  }

  .evname {
    font-size: 13px;
    line-height: 1.28;
  }

  .evmeta {
    margin-top: 3px;
    gap: 5px;
    font-size: 10px;
  }

  .evside {
    min-width: 44px;
    gap: 3px;
  }

  .evcnt {
    min-width: 36px;
    height: 30px;
    padding: 0 7px;
    border-radius: 10px;
    font-size: 10px;
  }

  .evcnt-sub {
    font-size: 8px;
    letter-spacing: 0.25px;
  }

  .tabs {
    padding: 0 12px;
    margin-top: 8px;
  }

  .tab {
    padding: 9px 0;
    letter-spacing: 0.35px;
  }

  .ev-hero {
    min-height: 280px;
  }

  .ev-hero-name {
    font-size: 20px;
  }

  .ev-hero-meta {
    font-size: 12px;
  }

  .ev-stats-bar {
    padding: 12px 14px 10px;
  }

  .ev-stats-hint {
    font-size: 11px;
  }

  .ev-desc,
  .ev-coverage-card,
  .active-ppl-item,
  .hist-item,
  .ehi {
    border-radius: 16px;
  }

  .prof-hero {
    padding: 16px 14px 18px;
  }

  .prof-hero-hdr {
    margin-bottom: 12px;
  }

  .prof-av {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    margin-bottom: 10px;
  }

  .prof-name {
    font-size: 17px;
  }

  .prof-pos {
    font-size: 11px;
  }

  .prof-dept {
    font-size: 10px;
  }

  .prof-chips {
    gap: 6px;
    margin-top: 12px;
  }

  .prof-chip {
    min-width: 60px;
    padding: 8px 10px;
    border-radius: 12px;
  }

  .prof-chip-v {
    font-size: 16px;
  }

  .prof-chip-l {
    margin-top: 2px;
    font-size: 8px;
  }

  .av-circle {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    font-size: 22px;
  }

  .login-scr {
    padding: calc(env(safe-area-inset-top, 44px) + 22px) 20px 24px;
  }

  .login-logo {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    margin-bottom: 16px;
    font-size: 30px;
  }

  .login-title {
    font-size: 20px;
  }

  .login-sub,
  .login-err {
    font-size: 11px;
  }

  .login-gr {
    font-size: 13px;
    margin-bottom: 18px;
  }

  .login-input {
    padding: 13px 14px;
    border-radius: 13px;
    margin-bottom: 8px;
  }

  .pwd-wrap {
    margin-bottom: 8px;
  }

  .login-btn {
    padding: 14px;
    border-radius: 13px;
    font-size: 15px;
  }

  .modal {
    border-radius: 24px 24px 0 0;
    padding: 0 14px calc(var(--pb) + 12px);
  }

  .modal-title {
    font-size: 14px;
    padding: 16px 0 12px;
    margin-bottom: 12px;
  }

  .modal-title::before {
    top: 8px;
    width: 36px;
  }

  .modal-close {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .modal-copy {
    margin: -2px 0 12px;
    font-size: 12px;
  }

  .modal-form {
    gap: 12px;
  }

  .modal-grid-2 {
    gap: 8px;
  }

  .modal-list-frame {
    max-height: min(52dvh, 380px);
    gap: 5px;
  }

  .modal-check {
    padding: 10px 11px;
    border-radius: 14px;
  }

  .modal-check-copy {
    font-size: 12px;
  }

  .modal-status {
    margin-top: 6px;
    font-size: 12px;
  }

  label.fl {
    font-size: 9px;
    letter-spacing: 0.9px;
  }

  .fi,
  .cm-input,
  .ev-desc-edit {
    border-radius: 14px;
    padding: 11px 12px;
    margin-bottom: 12px;
  }

  .btn-p,
  .btn-d,
  .btn-sec,
  .btn-save,
  .btn-cancel {
    min-height: 44px;
    border-radius: 14px;
    padding: 12px;
    font-size: 13px;
  }

  .smart-empty {
    padding: 16px 14px;
    border-radius: 16px;
  }

  .smart-empty-ic {
    margin-bottom: 8px;
    font-size: 26px;
  }

  .smart-empty-title {
    font-size: 13px;
  }

  .smart-empty-sub {
    font-size: 11px;
  }

  .smart-empty-btn {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .hdr {
    padding-left: 10px;
    padding-right: 10px;
  }

  .hero,
  .home-calendar-shell {
    margin-left: 10px;
    margin-right: 10px;
  }

  .home-quick-grid {
    margin: 0 10px 8px;
    gap: 6px;
  }

  .home-view-switch {
    padding-left: 10px;
    padding-right: 10px;
  }

  .home-events-shell,
  .restricted-screen-state {
    padding-left: 10px;
    padding-right: 10px;
  }

  .evlist {
    padding-left: 10px;
    padding-right: 10px;
  }

  .plist {
    padding-left: 10px;
    padding-right: 10px;
  }

  .qgrid {
    padding-left: 10px;
    padding-right: 10px;
  }

  .sec,
  .content-pad-inline-sm {
    padding-left: 10px;
    padding-right: 10px;
  }

  .home-quick-card {
    min-height: 74px;
    padding: 10px;
  }

  .home-cal-day {
    min-height: 52px;
    padding: 6px;
  }

  .people-directory-row {
    padding-left: 12px;
    padding-right: 10px;
  }

  .evcard {
    padding-right: 38px;
  }

  .modal {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 820px) {
  :root {
    --phone-pad: 14px;
    --phone-gap: 12px;
    --phone-card-r: 22px;
  }

  body {
    --bnav-h: calc(78px + var(--bnav-safe-bottom));
  }

  .scroll {
    padding-bottom: calc(var(--bnav-h) + 10px);
  }

  .hdr {
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
  }

  .bnav {
    left: max(env(safe-area-inset-left, 0px), 10px);
    right: max(env(safe-area-inset-right, 0px), 10px);
    bottom: 0;
    padding-bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(8, 13, 22, 0.96), rgba(5, 9, 16, 0.92));
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    overflow: hidden;
    box-shadow:
      0 20px 44px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  .bnav-inner {
    gap: 4px;
    align-items: stretch;
    padding: 6px 8px calc(6px + var(--bnav-safe-bottom));
  }

  .nb {
    min-height: 48px;
    padding: 6px 4px 4px;
    border-radius: 16px;
  }

  .nb.on {
    background: linear-gradient(180deg, rgba(79, 142, 247, 0.18), rgba(79, 142, 247, 0.1));
    box-shadow: inset 0 0 0 1px rgba(122, 179, 255, 0.12);
  }

  body.has-tabbar .install-banner {
    bottom: calc(var(--pb) + 102px);
  }

  #home-stat-strip {
    margin: 0 var(--phone-pad);
    border-radius: var(--phone-card-r);
    background: linear-gradient(160deg, rgba(12, 22, 38, 0.96), rgba(8, 16, 28, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.2);
  }

  .home-quick-grid,
  .people-overview-grid,
  .sg {
    scrollbar-width: none;
  }

  .home-quick-grid::-webkit-scrollbar,
  .people-overview-grid::-webkit-scrollbar,
  .sg::-webkit-scrollbar {
    display: none;
  }

  .home-quick-grid {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0 var(--phone-pad) 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--phone-pad);
  }

  .home-quick-card {
    flex: 0 0 min(72vw, 292px);
    min-height: 116px;
    padding: 14px 14px 16px;
    border-radius: 22px;
    scroll-snap-align: start;
    background: linear-gradient(170deg, rgba(16, 27, 45, 0.97), rgba(9, 15, 27, 0.94));
  }

  .home-personal-card {
    margin: 0 var(--phone-pad) 12px;
    padding: 14px;
    border-radius: 20px;
  }

  .home-personal-title {
    font-size: 18px;
  }

  .home-personal-add {
    min-height: 36px;
    padding: 0 12px;
    font-size: 10px;
  }

  .home-view-switch {
    position: static;
    gap: 8px;
    padding: 4px var(--phone-pad) 10px;
    background: transparent;
  }

  #home-event-groups {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 var(--phone-pad) 2px;
  }

  #home-event-groups.is-calendar {
    gap: 0;
  }

  .home-calendar-shell {
    margin-left: 0;
    margin-right: 0;
    border-radius: 24px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
  }

  .ev-group {
    margin: 0;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(11, 18, 32, 0.95), rgba(8, 13, 22, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
  }

  .ev-group-hdr {
    padding: 14px 14px 10px;
  }

  .ev-group-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 12px 12px;
  }

  .ev-group-body.hg-collapsed {
    display: none;
  }

  .ev-group-body .evcard {
    margin: 0;
  }

  .home-quarters-accordion {
    margin: 2px var(--phone-pad) 16px;
    padding: 2px 0 0;
    border-radius: 20px;
    background: rgba(8, 13, 22, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.06);
  }

  .home-quarters-hdr {
    padding: 14px 14px 12px;
    border-top: none;
  }

  .home-quarters-body {
    padding: 0 12px 12px;
  }

  #scr-people .sticky-surface {
    padding-bottom: 8px;
    background: linear-gradient(
      180deg,
      rgba(5, 9, 16, 0.98),
      rgba(5, 9, 16, 0.82) 78%,
      rgba(5, 9, 16, 0)
    );
  }

  #people-overview {
    padding: 2px var(--phone-pad) 4px;
  }

  .people-overview-card {
    border-radius: 24px;
    padding: 16px;
    background: linear-gradient(165deg, rgba(12, 22, 38, 0.98), rgba(10, 17, 29, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
  }
  .people-overview-card.collapsed .people-overview-grid {
    display: none;
  }
  .people-overview-card.collapsed {
    padding: 12px 16px;
  }
  .people-overview-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(79, 142, 247, 0.12);
    color: var(--a2);
    font-size: 14px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
  }
  .people-overview-card.collapsed .people-overview-toggle {
    transform: rotate(-90deg);
  }

  .people-overview-badge {
    min-width: 74px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(79, 142, 247, 0.16), rgba(79, 142, 247, 0.08));
    line-height: 1.2;
  }

  .people-overview-grid {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    padding-bottom: 2px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
  }

  .people-overview-cell {
    flex: 0 0 134px;
    padding: 12px;
    border-radius: 18px;
    scroll-snap-align: start;
    background: rgba(255, 255, 255, 0.045);
  }

  #ppl-list {
    padding-top: 2px;
  }

  .people-directory-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 12px 12px 14px;
    border-radius: 18px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
  }

  .people-directory-row-side {
    align-items: flex-end;
    gap: 8px;
    margin-left: 0;
  }

  .people-directory-row-count {
    min-width: 50px;
  }

  #stats-hero,
  .stats-stack,
  .content-pad-inline-sm,
  .score-dist-pad {
    padding-left: var(--phone-pad);
    padding-right: var(--phone-pad);
  }

  .stats-hero-card {
    border-radius: 24px;
    padding: 16px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
  }

  .sg {
    display: flex;
    gap: 10px;
    padding: 4px var(--phone-pad) 2px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--phone-pad);
  }

  .sg .sc {
    flex: 0 0 min(74vw, 240px);
    min-height: 172px;
    scroll-snap-align: start;
    border-radius: 22px;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
  }

  .stats-stack {
    gap: 10px;
  }

  .qstats-card,
  .stats-section-card {
    border-radius: 22px;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.16);
  }

  #profile-content {
    padding-bottom: calc(var(--bnav-h) + 12px);
  }

  .prof-hero {
    margin: 12px var(--phone-pad) 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 28px;
    box-shadow: 0 20px 38px rgba(0, 0, 0, 0.22);
  }

  .prof-av {
    width: 88px;
    height: 88px;
    border-radius: 26px;
  }

  .prof-name {
    font-size: 22px;
    line-height: 1.12;
  }

  .prof-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .prof-chip {
    min-height: 74px;
    justify-content: center;
    border-radius: 18px;
  }

  .profile-dashboard {
    gap: 10px;
  }

  .profile-panel,
  .profile-link-card {
    border-radius: 22px;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.16);
  }

  .ev-hero {
    min-height: 360px;
    border-radius: 0 0 32px 32px;
  }

  .ev-hero-hdr {
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    left: var(--phone-pad);
    right: var(--phone-pad);
  }

  .ev-hero-body {
    padding: 16px var(--phone-pad) 18px;
  }

  .ev-hero-name {
    max-width: 92%;
    font-size: 24px;
    line-height: 1.14;
  }

  .ev-hero-chip {
    min-height: 34px;
    padding: 8px 12px;
  }

  .ev-hero-cam-wrap {
    right: var(--phone-pad);
    bottom: 82px;
  }

  #ev-overview-wrap {
    margin: -22px var(--phone-pad) 0;
    position: relative;
    z-index: 3;
  }

  #ev-stats-bar,
  #ev-tabs,
  #ev-desc-wrap,
  #ev-coverage-wrap,
  #ev-gallery-wrap,
  #ev-active-wrap,
  #ev-comment-wrap,
  #ev-related-wrap {
    margin-left: var(--phone-pad);
    margin-right: var(--phone-pad);
  }

  .ev-overview-card {
    margin: 0;
    border-radius: 24px;
    padding: 16px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.2);
  }

  .ev-overview-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .ev-overview-actions,
  .ev-stats-actions {
    flex-direction: column;
  }

  .ev-stats-bar {
    margin-top: 10px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
  }

  #ev-tabs {
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    z-index: 5;
    display: flex;
    gap: 6px;
    padding: 4px;
    margin-top: 12px;
    border: none;
    border-radius: 18px;
    background: rgba(8, 13, 22, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  }

  #ev-tabs .tab {
    min-height: 40px;
    padding: 10px 0;
    border: none;
    border-radius: 14px;
  }

  #ev-tabs .tab.on {
    color: var(--t1);
    background: linear-gradient(135deg, rgba(79, 142, 247, 0.18), rgba(79, 142, 247, 0.08));
    box-shadow: inset 0 0 0 1px rgba(122, 179, 255, 0.12);
  }
}

@media (max-width: 820px) and (orientation: landscape) {
  body {
    --bnav-safe-bottom: 0px;
    --bnav-h: calc(62px + var(--bnav-safe-bottom));
  }

  .scroll {
    padding-bottom: calc(var(--bnav-h) + 8px);
  }

  .bnav {
    left: max(env(safe-area-inset-left, 0px), 8px);
    right: max(env(safe-area-inset-right, 0px), 8px);
    border-radius: 20px;
  }

  .bnav-inner {
    gap: 2px;
    padding: 4px 6px calc(4px + var(--bnav-safe-bottom));
  }

  .nb {
    min-height: 40px;
    gap: 2px;
    padding: 4px 2px 3px;
    border-radius: 14px;
  }

  .nb-ic svg {
    width: 19px;
    height: 19px;
  }

  .nb-lb {
    font-size: 9px;
    letter-spacing: 0.1px;
  }
}

@media (orientation: landscape) {
  body.is-android {
    --bnav-safe-bottom: 0px;
  }
}

body.is-ios .bnav {
  bottom: calc(-1 * var(--ios-app-gap));
}

@media (max-width: 430px) {
  .home-quick-card,
  .sg .sc {
    flex-basis: calc(100vw - 46px);
  }

  .mover {
    align-items: flex-end;
    padding: calc(env(safe-area-inset-top, 0px) + 16px) max(env(safe-area-inset-right, 0px), 8px)
      max(env(safe-area-inset-bottom, 0px), 8px) max(env(safe-area-inset-left, 0px), 8px);
  }

  .modal,
  .modal.modal-compact,
  .modal.modal-wide,
  #mod-person .modal {
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 30px;
    padding-left: 16px;
    padding-right: 16px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
  }

  .modal-actions-inline {
    flex-direction: column;
  }
}
