/* Связи × БРИКС — оболочка мобильного приложения (делегат и штаб).
   На телефоне — весь экран; на десктопе — тот же вьюпорт 390 по центру нейтрального фона. */
:root { --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); }
html, body { height: 100%; }
body.app-body { background: var(--paper); overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
.shell { position: relative; width: 100%; height: 100%; height: 100dvh; display: flex; flex-direction: column; background: var(--paper); overflow: hidden; }

/* десктоп: телефонный вьюпорт по центру, без колонок */
@media (min-width: 600px) and (min-height: 640px) {
  body.app-body { background: #E7E3DA; display: grid; place-items: center; }
  body.app-body.dark-desk { background: #0A1020; }
  .shell { width: 390px; height: min(844px, calc(100vh - 48px)); border-radius: 34px; box-shadow: 0 0 0 1px rgba(14, 26, 51, .1), 0 40px 90px -30px rgba(14, 26, 51, .45); }
  .dark-desk .shell { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 90px -30px #000; }
  .deskqr { display: flex !important; }
}
.deskqr { display: none; position: fixed; right: 24px; bottom: 24px; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px 10px 10px; font-size: 12px; color: var(--text-2); max-width: 250px; line-height: 1.35; }
.deskqr .qr { width: 76px; height: 76px; display: block; flex: none; }
.deskqr b { display: block; color: var(--text); font-size: 13px; margin-bottom: 2px; }
.dark-desk .deskqr { background: #131C33; border-color: #26324F; color: #A9B3CB; }
.dark-desk .deskqr b { color: #EDE6D6; }

/* ===== шапка ===== */
.appbar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(10px + var(--safe-t)) calc(14px + var(--safe-r)) 8px calc(14px + var(--safe-l)); min-height: calc(58px + var(--safe-t)); background: var(--paper); position: relative; z-index: 5; }
.appbar .mark { display: flex; align-items: center; gap: 10px; min-width: 0; }
.appbar .seal { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--gold); display: grid; place-items: center; font-family: var(--f-display); font-size: 13px; color: var(--gold-ink, #7A5B17); flex: none; }
.appbar .ttl { font-family: var(--f-display); font-size: 19px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar .ttl small { display: block; font-family: var(--f-body); font-size: 10px; letter-spacing: .14em; color: var(--text-2); text-transform: uppercase; margin-top: 2px; }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--text); flex: none; position: relative; }
.iconbtn:hover { background: rgba(14, 26, 51, .06); }
.iconbtn svg { width: 22px; height: 22px; }
.me-btn { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; font-family: var(--f-display); font-size: 15px; color: var(--paper); background: var(--claret-deep); cursor: pointer; flex: none; padding: 0; }
.net-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: #8A4A12; background: var(--warn-soft); padding: 4px 9px; border-radius: 99px; }
.net-dot[hidden] { display: none; }

/* полоса «нет сети» */
.offline-bar { flex: none; display: none; align-items: center; gap: 8px; background: var(--warn-soft); color: #8A4A12; font-size: 12.5px; padding: 8px calc(16px + var(--safe-r)) 8px calc(16px + var(--safe-l)); line-height: 1.3; }
.is-offline .offline-bar { display: flex; }
.offline-bar b { font-weight: 600; }

/* ===== экран ===== */
.view { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px calc(18px + var(--safe-r)) 28px calc(18px + var(--safe-l)); -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior: contain; }
.view::-webkit-scrollbar { display: none; }
.view:focus { outline: none; }
.view > * { animation: rise .3s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ===== таб-бар ===== */
.tabbar { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; background: rgba(255, 253, 248, .97); border-top: 1px solid var(--line); padding: 4px calc(4px + var(--safe-r)) calc(6px + var(--safe-b)) calc(4px + var(--safe-l)); position: relative; z-index: 5; }
.tabbar.hide { display: none; }
.tab { background: none; border: 0; display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 10.5px; color: var(--text-2); cursor: pointer; min-height: 54px; padding: 4px 0; position: relative; }
.tab svg { width: 23px; height: 23px; }
.tab[aria-current="page"] { color: var(--claret); font-weight: 600; }
.tab[aria-current="page"]::before { content: ''; position: absolute; top: -5px; width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--claret); }
.tab .cnt { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--claret); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.tab.fab { top: -14px; }
.tab.fab .ring { width: 58px; height: 58px; border-radius: 50%; background: var(--ink); color: var(--gold-hi); display: grid; place-items: center; box-shadow: 0 10px 22px -8px rgba(14, 26, 51, .6); border: 3px solid var(--paper); }
.tab.fab .ring svg { width: 26px; height: 26px; }
.tab.fab[aria-current="page"] .ring { background: var(--claret); color: #fff; }
.tab.fab[aria-current="page"]::before { display: none; }
.tab:focus-visible, .iconbtn:focus-visible, .me-btn:focus-visible, .seg button:focus-visible, .switch:focus-visible, .target:focus-visible, .ini:focus-visible, .lrow:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ===== общие элементы экранов ===== */
.h { font-family: var(--f-display); font-size: 30px; line-height: 1.05; margin: 6px 0 8px; }
.sub { color: var(--text-2); font-size: 14px; }
.stack { display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.sec-t { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); font-weight: 600; margin: 20px 0 8px; }
.kv { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv span { font-size: 11px; color: var(--text-2); letter-spacing: .06em; text-transform: uppercase; }
.lock { font-size: 11.5px; color: var(--text-2); display: inline-flex; gap: 5px; align-items: center; }
.field label { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--text-2); }
.field label .cc { font-weight: 500; font-family: var(--f-mono); font-size: 11px; }
.field textarea, .field input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; font: inherit; font-size: 16px; resize: none; background: var(--card); color: var(--text); }
.field textarea { min-height: 70px; }
.field textarea:focus, .field input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.field.err textarea, .field.err input { border-color: var(--claret); }
.field .hint { font-size: 12px; color: var(--text-2); margin-top: 5px; }
.field .msg { font-size: 12px; color: var(--claret); margin-top: 5px; display: none; }
.field.err .msg { display: block; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 10px; font-size: 13.5px; color: var(--text-2); align-items: start; padding: 10px 0; cursor: pointer; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--claret); margin: 0; }
.check a { color: var(--claret); }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); font-size: 18px; color: var(--paper); background: var(--ink-3); flex: none; position: relative; }
.avatar.sm { width: 38px; height: 38px; font-size: 15px; }
.avatar.lg { width: 76px; height: 76px; font-size: 28px; }
.avatar .flag { position: absolute; right: -4px; bottom: -2px; width: 20px; height: 13px; box-shadow: 0 0 0 2px var(--card); }
.avatar.lg .flag { width: 28px; height: 19px; }
.state { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.35; }
.state.ok { background: var(--ok-soft); color: var(--ok); }
.state.wait { background: var(--gold-soft); color: #7A5B17; }
.state.warn { background: var(--warn-soft); color: #8A4A12; }
.queue { display: inline-flex; gap: 6px; align-items: center; font-size: 11.5px; padding: 3px 9px; border-radius: 99px; background: var(--warn-soft); color: #8A4A12; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--paper-2); padding: 4px; border-radius: 12px; }
.seg button { border: 0; background: transparent; border-radius: 9px; min-height: 44px; font-size: 13px; cursor: pointer; line-height: 1.15; color: var(--text); }
.seg button small { display: block; font-size: 10.5px; color: var(--text-2); }
.seg button[aria-pressed="true"] { background: var(--card); box-shadow: var(--sh); font-weight: 600; }
.btn:not([disabled]):hover { filter: brightness(1.04); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.dots { display: flex; gap: 6px; justify-content: center; margin: 4px 0 14px; }
.dots i { width: 22px; height: 4px; border-radius: 2px; background: var(--line); }
.dots i.on { background: var(--claret); }
.switch { position: relative; width: 50px; height: 30px; border-radius: 99px; background: #BDB3A0; border: 0; cursor: pointer; flex: none; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch[aria-checked="true"] { background: var(--ink); }
.switch.warn[aria-checked="true"] { background: var(--warn); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

/* список-строки (профиль, меню) */
.list { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.lrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; font-size: 14.5px; cursor: pointer; text-decoration: none; color: var(--text); }
.lrow:last-child { border-bottom: 0; }
button.lrow:hover, a.lrow:hover { background: rgba(14, 26, 51, .03); }
.lrow .grow { flex: 1; min-width: 0; }
.lrow .grow small { display: block; font-size: 12px; color: var(--text-2); margin-top: 1px; }
.lrow .chev { color: var(--text-2); }
.lrow.small { min-height: 44px; font-size: 13px; color: var(--text-2); }

/* ===== бейдж ===== */
.badge .b-body { padding: 18px; display: grid; grid-template-columns: 1fr auto; gap: 14px; }
.badge .b-name { font-family: var(--f-display); font-size: 27px; line-height: 1.02; }
.badge .b-org { font-size: 12.5px; color: var(--text-2); margin-top: 6px; }
.badge .b-country { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; margin-top: 10px; }
.badge .b-qr { align-self: start; width: 116px; padding: 6px; background: #fff; border-radius: 10px; border: 1px solid var(--line); }
.badge .b-qr .qr { display: block; width: 100%; height: auto; }
.badge .b-can { padding: 0 18px 16px; display: grid; gap: 8px; }
.badge .b-can div { font-size: 13px; }
.badge .b-can b { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #7A5B17; }
.badge .b-id { display: flex; justify-content: space-between; padding: 8px 18px 12px; font-size: 10.5px; color: var(--text-2); letter-spacing: .06em; }
.amb-tag { display: inline-flex; gap: 6px; align-items: center; color: #7A5B17; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.bright { position: fixed; inset: 0; background: #fff; z-index: 60; display: none; place-items: center; padding: 30px; text-align: center; }
.bright.show { display: grid; }
.bright .qr { width: min(78vw, 300px); height: auto; }

/* ===== статистика-тайлы ===== */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-align: left; cursor: pointer; min-height: 44px; }
.tile .v { font-family: var(--f-display); font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.tile .l { font-size: 11.5px; color: var(--text-2); margin-top: 3px; line-height: 1.2; }

/* ===== сканер ===== */
.scanner { position: relative; border-radius: 22px; overflow: hidden; height: 300px; background: radial-gradient(120% 80% at 30% 20%, #3a4566 0%, #141b2e 60%, #0b101d 100%); display: grid; place-items: center; }
.scanner .frame { width: 200px; height: 200px; position: relative; }
.scanner .frame i { position: absolute; width: 34px; height: 34px; border: 3px solid var(--gold-hi); }
.scanner .frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.scanner .frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.scanner .frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.scanner .frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
.scanner .laser { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--gold-hi); box-shadow: 0 0 12px var(--gold-hi); animation: laser 1.8s ease-in-out infinite; }
@keyframes laser { 0%, 100% { top: 12px; } 50% { top: 186px; } }
.scanner .cap { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; color: #C9D0E0; font-size: 13px; }
.scanner .torch { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.scanner.flash::after { content: ''; position: absolute; inset: 0; background: #fff; animation: flash .35s ease-out forwards; }
@keyframes flash { from { opacity: .9; } to { opacity: 0; } }
.targets { display: grid; grid-auto-flow: column; grid-auto-columns: 148px; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -18px; padding-left: 18px; padding-right: 18px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.targets::-webkit-scrollbar { display: none; }
.target { scroll-snap-align: start; border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 12px; text-align: left; cursor: pointer; display: grid; gap: 6px; align-content: start; min-height: 112px; font-size: 12.5px; transition: border-color .2s, transform .12s; color: var(--text); }
.target:hover { border-color: var(--ink); }
.target:active { transform: scale(.98); }
.target b { font-size: 13.5px; line-height: 1.2; }
.target .muted { color: var(--text-2); }
.target.door { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.target.door .muted { color: #B8C1D6; }

/* ===== знакомство ===== */
.met { border-radius: 20px; background: var(--ink); color: var(--paper); padding: 18px; position: relative; overflow: hidden; }
.met::before { content: ''; position: absolute; inset: 0; background: var(--guilloche); background-size: 70px; opacity: .6; }
.met > * { position: relative; }
.met .who { display: flex; gap: 14px; align-items: center; margin: 10px 0 12px; }
.met .nm { font-family: var(--f-display); font-size: 25px; line-height: 1; }
.met .og { font-size: 12.5px; opacity: .8; margin-top: 4px; }
.both { display: inline-flex; gap: 8px; align-items: center; background: rgba(216, 180, 95, .16); color: var(--gold-hi); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; }
.contacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.contacts a { text-decoration: none; text-align: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px 4px; font-size: 12.5px; background: var(--card); min-height: 48px; display: grid; place-items: center; line-height: 1.2; }
.contacts a.off { opacity: .4; pointer-events: none; }
.canseek { padding: 12px; background: var(--paper-2); border-radius: 12px; font-size: 13px; display: grid; gap: 6px; }

/* ===== паспорт ===== */
.progress { height: 8px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-hi)); border-radius: inherit; transition: width .6s; }
.goal { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.goal .card { padding: 12px; }
.goal .big { font-family: var(--f-display); font-size: 30px; line-height: 1; }
.pass { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; position: relative; overflow: hidden; }
.pass::before { content: ''; position: absolute; inset: 0; background: var(--guilloche); background-size: 80px; opacity: .55; pointer-events: none; }
.pass > * { position: relative; }
.stamps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 6px; justify-items: center; padding: 8px 0 4px; }
.stamps .stamp { width: min(86px, 24vw); height: min(86px, 24vw); }

/* ===== пары ===== */
.pair { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.pair .hd { padding: 14px 16px; background: linear-gradient(120deg, var(--claret), #6E1F55 60%, var(--ink)); color: #fff; }
.pair .hd .eyebrow { color: var(--gold-hi); }
.pair .duo { display: grid; grid-template-columns: 1fr 34px 1fr; align-items: center; padding: 16px; gap: 6px; text-align: center; }
.pair .duo .avatar { margin: 0 auto 6px; }
.pair .duo .nm { font-weight: 600; font-size: 13.5px; }
.pair .duo .rl { font-size: 11.5px; color: var(--text-2); }
.pair .link { height: 2px; background: var(--gold); position: relative; }
.pair .link::after { content: '↔'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--card); color: #7A5B17; padding: 0 2px; font-size: 14px; }
.pair .canseek { margin: 0 16px; }
.yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 16px 16px; }
.pad { padding: 14px 16px 16px; }

/* ===== голосование ===== */
.ini { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; text-align: left; width: 100%; transition: border-color .2s, box-shadow .2s; min-height: 44px; color: var(--text); }
.ini:hover { border-color: var(--text-2); }
.ini[aria-checked="true"] { border-color: var(--claret); box-shadow: 0 0 0 2px var(--claret-soft); }
.ini .t { font-weight: 600; font-size: 14px; line-height: 1.3; display: block; }
.ini .m { font-size: 12px; color: var(--text-2); margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.ini .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); margin-top: 2px; display: grid; place-items: center; }
.ini[aria-checked="true"] .radio { border-color: var(--claret); }
.ini[aria-checked="true"] .radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--claret); }
.voted { border-radius: 18px; padding: 18px; background: var(--ink); color: var(--paper); text-align: center; }
.voted .display { font-size: 26px; margin: 8px 0; }
.sticky-cta { position: sticky; bottom: -28px; margin: 14px -18px -28px; padding: 12px 18px 18px; background: linear-gradient(180deg, rgba(247, 242, 232, 0), var(--paper) 30%); }

/* ===== программа / b2b ===== */
.slot { display: grid; grid-template-columns: 62px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.slot .tm { font-family: var(--f-mono); font-size: 14px; }
.slot .tm small { display: block; font-size: 10.5px; color: var(--text-2); font-family: var(--f-body); }
.slot .who { display: flex; gap: 10px; align-items: center; min-width: 0; }
.slot .tbl { white-space: nowrap; margin-left: auto; font-family: var(--f-mono); font-size: 12px; padding: 4px 8px; border-radius: 8px; background: var(--paper-2); }
.slot .live { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--claret); font-weight: 600; }
.slot .live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--claret); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.req { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.req .grow { flex: 1; min-width: 0; }
.req .st { margin-left: auto; font-size: 11.5px; padding: 4px 8px; border-radius: 99px; white-space: nowrap; }
.st.y { background: var(--ok-soft); color: var(--ok); }
.st.w { background: var(--gold-soft); color: #7A5B17; }
.st.n { background: var(--paper-2); color: var(--text-2); }
.promo { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; border: 0; border-radius: 16px; padding: 14px; background: var(--ink); color: var(--paper); cursor: pointer; min-height: 64px; margin-top: 10px; }
.promo.claret { background: linear-gradient(120deg, var(--claret), #6E1F55); }
.promo .grow { flex: 1; }
.promo small { display: block; opacity: .8; font-size: 12px; margin-top: 2px; }
.promo b { font-size: 15px; }

/* ===== мой форум ===== */
.sharecard { border-radius: 20px; padding: 20px; color: var(--paper); background: radial-gradient(120% 90% at 100% 0%, #3A2457 0%, transparent 60%), var(--ink); position: relative; overflow: hidden; }
.sharecard .display { font-size: 42px; line-height: .95; color: var(--gold-hi); }
.sharecard .flags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.cert { background: #FFFDF6; border: 1px solid var(--line); border-radius: 6px; padding: 18px 16px; text-align: center; position: relative; box-shadow: var(--sh); }
.cert::before { content: ''; position: absolute; inset: 6px; border: 1px solid var(--gold); border-radius: 3px; pointer-events: none; }
.cert .display { font-size: 22px; }
.cert .nm { font-family: var(--f-display); font-size: 26px; margin: 8px 0 4px; color: var(--claret-deep); }
.cert .foot { display: flex; justify-content: space-between; align-items: end; margin-top: 12px; font-size: 10.5px; color: var(--text-2); text-align: left; }
.cert .qr { width: 54px; height: 54px; }

/* ===== листы и модалки ===== */
.overlay { position: absolute; inset: 0; background: rgba(14, 26, 51, .55); display: none; z-index: 40; align-items: flex-end; }
.overlay.show { display: flex; animation: fade .2s ease; }
.overlay.center { align-items: center; justify-content: center; padding: 24px; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; background: var(--card); border-radius: 22px 22px 0 0; padding: 10px 18px calc(20px + var(--safe-b)); max-height: 88%; overflow-y: auto; animation: up .25s cubic-bezier(.2, .8, .2, 1); }
.sheet::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 12px; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.sheet h2 { font-size: 26px; margin-bottom: 6px; }
.sheet .what { background: var(--paper); border-radius: 12px; padding: 10px 12px; font-size: 13px; margin: 12px 0; line-height: 1.45; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.celebrate { background: var(--card); border-radius: 22px; padding: 24px 20px; text-align: center; border: 2px solid var(--gold); box-shadow: 0 0 0 6px rgba(216, 180, 95, .25); width: 100%; }
.celebrate .medal { width: 96px; height: 96px; margin: 0 auto 10px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #F7E3A7, var(--gold) 70%); display: grid; place-items: center; font-family: var(--f-display); font-size: 15px; color: var(--ink); box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .5); }
.shell .toast { position: absolute; bottom: calc(92px + var(--safe-b)); max-width: 88%; }
.shell.no-tabs .toast { bottom: calc(24px + var(--safe-b)); }

@media (max-width: 340px) {
  .h { font-size: 26px; }
  .badge .b-qr { width: 92px; }
  .badge .b-name { font-size: 23px; }
  .tiles .tile .v { font-size: 22px; }
}

/* ===== Программа с таймингом (по образцу Эмпатиума: пилюля времени в цвете зала, «Сейчас/Далее», «Ранее» свёрнуто) ===== */
.maplink { min-height: 40px; padding: 0 14px; gap: 6px; margin-bottom: 8px; }
.pclock { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin: 2px 0 8px; }
.pclock .sep { opacity: .5; }
.pclock .demo { font-size: 10.5px; padding: 1px 7px; border-radius: 99px; background: var(--gold-soft); color: #7A5B17; font-weight: 600; }
.pnow { display: grid; gap: 4px; background: var(--ink); color: var(--paper); border-radius: 14px; padding: 10px 12px; font-size: 13px; line-height: 1.35; }
.pnow .mono { color: var(--gold-hi); }
.pnow > div { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pchips { display: flex; gap: 6px; overflow-x: auto; margin: 12px calc(-18px - var(--safe-r)) 2px calc(-18px - var(--safe-l)); padding: 2px 18px 4px; scrollbar-width: none; }
.pchips::-webkit-scrollbar { display: none; }
.pchip { flex: none; min-height: 36px; padding: 0 13px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--pc) 35%, transparent); background: var(--card); color: var(--pc); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pchip[aria-pressed="true"] { background: var(--pc); border-color: var(--pc); color: #fff; }
.plist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.plist.past { opacity: .62; filter: grayscale(.85); margin-top: 8px; }
.prow { display: flex; align-items: stretch; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh); }
.prow.q { background: var(--paper-2); border-color: transparent; box-shadow: none; }
.prow.coffee { background: #FFF6EC; border: 1px dashed rgba(180, 98, 27, .45); }
/* одна система рамок: карточка 1px var(--line); «Сейчас» и фокус — кольцо box-shadow поверх, без смены размеров; цвет зала — внутренняя полоса слева */
.prow.is-now { border-color: var(--claret); box-shadow: 0 0 0 1px var(--claret), var(--sh); }
.ptray.is-now { box-shadow: inset 0 0 0 1.5px rgba(163, 32, 74, .55); }
.prow.in { border-radius: 11px; box-shadow: inset 3px 0 0 var(--hc); }
.prow:has(.pmain:focus-visible) { box-shadow: 0 0 0 2px var(--gold); }
.prow.in:has(.pmain:focus-visible) { box-shadow: inset 3px 0 0 var(--hc), 0 0 0 2px var(--gold); }
.pmain { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; padding: 11px 4px 11px 11px; border: 0; background: transparent; text-align: left; cursor: pointer; border-radius: 14px; }
.prow.in .pmain { padding: 10px 4px 10px 13px; border-radius: 11px; }
.pbody { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pt { font-size: 14.5px; font-weight: 600; line-height: 1.28; text-wrap: pretty; }
.pm { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.psp { font-size: 11.5px; color: var(--text); opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pok { font-size: 11.5px; color: var(--ok); }
.pclash { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--claret); font-weight: 500; }
.pclash::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.ppill { flex: none; display: inline-grid; place-items: center; width: 54px; height: 28px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.ptray.is-now .ptray-h .ppill { background: var(--claret); }
.ppill.q { background: #DCD0B8; color: var(--text); }
.ppill.past { filter: grayscale(1); opacity: .7; }
.pbadge { flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; }
.pbadge.now { background: var(--claret); color: #fff; }
.pbadge.now::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
.pbadge.soon { background: var(--gold-soft); color: #7A5B17; }
.pnow .pbadge.soon { background: rgba(216, 180, 95, .2); color: var(--gold-hi); }
.pstar { flex: none; width: 44px; border: 0; background: transparent; color: var(--gold); cursor: pointer; display: grid; place-items: center; border-radius: 0 13px 13px 0; }
.pstar[aria-pressed="false"] { color: #B9AC92; }
.pmain:focus-visible { outline: 0; }
.pstar:focus-visible, .pchip:focus-visible, .mrow-h:focus-visible, .mslot:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.ptray { background: var(--paper-2); border-radius: 16px; padding: 6px; }
.ptray-h { display: flex; gap: 10px; align-items: center; padding: 6px 6px 8px; }
.ptray ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pearlier { width: 100%; min-height: 46px; display: flex; justify-content: space-between; align-items: center; padding: 0 14px; border: 0; border-radius: 14px; background: var(--paper-2); color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; }
.pearlier svg { transition: transform .2s; }
.pearlier .pm { margin-left: 4px; font-weight: 500; }
.pspk { display: grid; gap: 8px; }
.psrow { display: flex; gap: 10px; align-items: center; }
.psrow b { display: block; font-size: 14px; }
.psrow small { display: block; font-size: 12px; color: var(--text-2); }
.hdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ===== Карта площадки ===== */
.plan-wrap { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 6px; }
.plan { display: block; width: 100%; height: auto; }
.plan-tag { position: absolute; right: 10px; top: 8px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pl-f { font-family: var(--f-body); font-size: 8px; letter-spacing: .14em; font-weight: 600; fill: #7A7F90; }
.pl-t { font-family: var(--f-body); font-size: 10px; font-weight: 700; }
.pl-t.s { font-weight: 500; font-size: 9px; }
.pl-room { cursor: pointer; }
.pl-room.on rect, .pl-room.on ellipse { filter: drop-shadow(0 3px 6px rgba(14, 26, 51, .18)); }
.pl-pin { cursor: pointer; }
.pl-n { font-family: var(--f-body); font-size: 10px; font-weight: 700; fill: #fff; pointer-events: none; }
.pl-pulse { opacity: .5; animation: plpulse 1.8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes plpulse { from { transform: scale(1); opacity: .55; } to { transform: scale(2.4); opacity: 0; } }
.mlist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.mrow { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mrow.on { border-width: 2px; }
.mrow-h { width: 100%; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 0; background: transparent; text-align: left; cursor: pointer; min-height: 52px; }
.mrow-h b { display: block; font-size: 14px; }
.mrow-h small { display: block; font-size: 12px; color: var(--text-2); }
.mrow-h .grow { flex: 1; min-width: 0; }
.mnum { flex: none; width: 24px; height: 24px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); }
.mrow-more { padding: 0 12px 12px 46px; display: grid; gap: 6px; font-size: 13px; color: var(--text-2); }
.mslot { display: flex; gap: 8px; align-items: center; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); text-align: left; cursor: pointer; font-size: 13px; color: var(--text); }
.mslot .mono { font-size: 12px; color: var(--text-2); flex: none; }
.mslot .grow { flex: 1; min-width: 0; display: grid; gap: 4px; }
.mslot .mtop { display: flex; gap: 8px; align-items: center; }
.mslot b { font-size: 13.5px; line-height: 1.3; }
.mslot .mhall { font-size: 12px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .pl-pulse, .pbadge.now::before { animation: none; } }
.ptop { display: flex; margin-bottom: 3px; }

/* ===== Расписание как в Эмпатиуме: вход с главного, дни, разделы «Программа · Спикеры · Карта» ===== */
.hprog { display: grid; gap: 7px; width: 100%; margin-top: 14px; padding: 13px 14px; border: 0; border-radius: 16px; background: var(--ink); color: var(--paper); text-align: left; cursor: pointer; box-shadow: 0 14px 30px -18px rgba(14, 26, 51, .7); }
.hprog:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hp-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hp-h .eyebrow { color: var(--gold-hi); }
.hp-all { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--paper); opacity: .85; white-space: nowrap; }
.hp-all .chev { width: 15px; height: 15px; }
.hp-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; line-height: 1.3; min-width: 0; }
.hp-row .mono { color: var(--gold-hi); font-size: 12.5px; flex: none; }
.hp-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-t .muted, .hp-t.muted { opacity: .65; }
.hprog .pbadge.soon { background: rgba(216, 180, 95, .2); color: var(--gold-hi); }
.hp-mine { display: block; font-size: 12.5px; padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, .08); color: var(--paper); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-mine .mono { color: var(--gold-hi); }
.hp-mine.hot { background: var(--claret); }
.premind { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 8px; padding: 10px 12px; border: 1px solid rgba(163, 32, 74, .35); border-radius: 14px; background: var(--claret-soft, #F6E1E7); color: var(--claret); text-align: left; cursor: pointer; }
.premind .grow { flex: 1; min-width: 0; }
.premind b { display: block; font-size: 13.5px; line-height: 1.3; }
.premind small { display: block; font-size: 12px; color: var(--text-2); }

.pdays { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 2px 0 8px; }
.pdays button { display: grid; align-content: center; gap: 1px; min-height: 58px; padding: 6px 10px; border: 0; border-radius: 12px; background: var(--paper-2); color: var(--text-2); text-align: left; cursor: pointer; }
.pdays button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.pdays .dn { font-family: var(--f-display); font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.pdays button[aria-pressed="true"] .dn { color: var(--gold-hi); }
.pdays .dtop { display: flex; align-items: baseline; gap: 5px; }
.pdays small { font-size: 10.5px; opacity: .8; white-space: nowrap; }
.pdays b { font-size: 12px; font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdays button:focus-visible, .psec button:focus-visible, .sptile:focus-visible, .sphost:focus-visible, .premind:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.psec-wrap { position: sticky; top: -6px; z-index: 5; margin: 4px calc(-18px - var(--safe-r)) 4px calc(-18px - var(--safe-l)); padding: 6px 18px 6px; background: var(--paper); }
/* мягкий край под липкой шапкой — уходящий вверх контент не выглядит «перекрытым» */
.psec-wrap::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 14px; background: linear-gradient(var(--paper), rgba(247, 242, 232, 0)); pointer-events: none; }
.psec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 5px; border-radius: 999px; background: var(--ink); box-shadow: 0 12px 24px -14px rgba(14, 26, 51, .8); }
.psec button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; border: 0; border-radius: 999px; background: transparent; color: rgba(247, 242, 232, .7); font-size: 13px; font-weight: 600; cursor: pointer; }
.psec button[aria-selected="true"] { color: #fff; background: linear-gradient(120deg, var(--claret), #6E1F55); box-shadow: 0 6px 14px -6px rgba(163, 32, 74, .8); }

.psearch { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 0 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text-2); }
.psearch:focus-within { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.psearch input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--text); outline: none; padding: 10px 0; }
.pchips.dim { opacity: .45; }
.cup { vertical-align: -3px; margin-right: 5px; color: #B4621B; }

.avatar.xs { width: 24px; height: 24px; font-size: 8.5px; letter-spacing: -.02em; font-family: var(--f-body); font-weight: 700; box-shadow: 0 0 0 2px var(--card); }
.avatar.xs .flag { display: none; }
.psp { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 3px; }
.psn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.faces { display: inline-flex; flex: none; }
.faces .avatar + .avatar { margin-left: -3px; }
.avatar.flagonly .flag { position: static; width: 52%; height: auto; box-shadow: 0 0 0 1px rgba(14, 26, 51, .12); }
.avatar.xs.flagonly .flag { display: block; }

.pout { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .75); border-left: 3px solid var(--hc); font-size: 13.5px; line-height: 1.4; }
.pout b { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--hc); margin-bottom: 2px; }

.sphost { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 3px; border: 0; border-radius: 18px; background: linear-gradient(120deg, var(--gold), var(--claret)); text-align: left; cursor: pointer; }
.sphost > * { position: relative; }
.sphost { position: relative; }
.sphost::before { content: ''; position: absolute; inset: 3px; border-radius: 15px; background: var(--card); }
.sphost .avatar { margin-left: 9px; width: 60px; height: 60px; font-size: 22px; }
.sphost .grow { flex: 1; min-width: 0; display: grid; gap: 2px; padding: 10px 0; }
.sphost .eyebrow { color: #7A5B17; }
.sphost b { font-family: var(--f-display); font-size: 21px; line-height: 1.1; font-weight: 400; }
.sphost small { font-size: 12px; color: var(--text-2); }
.sphost .chev { margin-right: 10px; color: var(--text-2); }
.spgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.sptile { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; padding: 14px 6px 10px; border: 1px solid var(--line); border-top: 3px solid var(--hc); border-radius: 14px; background: var(--card); text-align: center; cursor: pointer; box-shadow: var(--sh); }
.sptile .avatar { width: 60px; height: 60px; font-size: 22px; margin-bottom: 4px; }
.sptile .avatar .flag { width: 22px; height: 15px; }
.sptile b { font-size: 12.5px; line-height: 1.2; }
.sptile small { font-size: 11px; line-height: 1.25; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sp-dot { position: absolute; left: 8px; top: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--hc); box-shadow: 0 0 0 2px var(--card); }
.pstar-s { color: var(--gold); font-size: 15px; flex: none; }
/* программа по проекту 21.10: формат, модераторы/спикеры с темами */
.pf { display: block; font-size: 12px; font-weight: 500; line-height: 1.3; color: var(--text-2); }
.pf b { font-weight: 700; }
button.psrow { width: 100%; padding: 4px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; align-items: flex-start; border-radius: 10px; }
button.psrow:hover b { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.psrow .grow { min-width: 0; }
.pcn { font-weight: 500; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.psrow small.ptopic { color: var(--text); margin-top: 3px; font-style: italic; }
