
  :root {
    /* Pager — единственный эталон общих размеров. Лента использует эти же значения;
       размеры рисунков намеренно остаются отдельными. */
    --pager-meta-size: 9.5px;
    --pager-meta-line-height: 1.3;
    --pager-meta-tracking: .08em;
    --pager-copy-size: 15.8px;
    --pager-copy-line-height: 1.38;
    /* Лента чуть спокойнее личного Pager, но остаётся производной от его эталона. */
    --feed-copy-size: calc(var(--pager-copy-size) - .8px);
    --feed-copy-line-height: 1.36;
    --pager-action-size: 34px;
    --pager-action-gap: 8px;
    --pager-action-top: 11px;
    --pager-action-icon-size: 16px;
    --pager-action-label-size: 8.5px;
    --pager-action-label-tracking: .075em;
    --pager-composer-top: 12px;
    --pager-composer-field-height: 46px;
    --pager-composer-field-max-height: 168px;
    --pager-composer-icon-size: 21px;
    --pager-composer-footer-height: 18px;
    --main-head-v2-height: 64px;
    --conversation-safe-bottom: env(safe-area-inset-bottom);
    --conversation-composer-bottom: clamp(8px, calc(var(--conversation-safe-bottom) - 8px), 16px);
    --feed-safe-bottom: env(safe-area-inset-bottom);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important;
    margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important;
    white-space: nowrap !important; border: 0 !important; }
  html, body { height: 100%; overflow: hidden; }
  body {
    position: fixed; inset: 0;
    background: #0c0f0d; color: #c9d4c0;
    font-family: ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace;
    display: flex; flex-direction: column; align-items: center;
    -webkit-text-size-adjust: 100%;
  }
  /* гибрид: длинные тексты — гуманистическим, LCD/цифры/меты — моно */
  .tagline, .wraptext, .step span, .rules li span, .okbtn, .g-msg p,
  .row, .empty, textarea, .send button, .dlg input, .callcard .cbody,
  .vline p, .undercta { font-family: -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif; }
  .row small, .stagechip, .vbrand, .vtop, .vnum, .vsub, .vline small { font-family: ui-monospace, Menlo, Consolas, monospace; }

  .col {
    width: 100%; max-width: 420px; flex: 1; min-height: 0;
    display: flex; flex-direction: column;
    padding: max(8px, env(safe-area-inset-top)) 16px 0;
    overflow-y: auto; overscroll-behavior: contain;
    scroll-padding: 12px 0 max(18px, env(safe-area-inset-bottom));
  }
  /* Top compensates native document pan even before keyboard detection. Bottom
     follows a bounded opening prediction, then the actual visualViewport. */
  body.composer-keyboard .col {
    padding-top: calc(max(8px, env(safe-area-inset-top)) + var(--composer-keyboard-top, 0px));
  }
  body.composer-keyboard-visible .col {
    padding-bottom: var(--composer-keyboard-inset, 0px);
  }
  #app { flex: 1; min-height: 0; display: flex; flex-direction: column; }

  /* ===== устройство ===== */
  .device { flex: none;
    background: linear-gradient(180deg, #262e20, #171d13);
    border: 2px solid #3a4630; border-radius: 24px;
    padding: 13px; box-shadow: 0 14px 36px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.07); }
  /* верхушка корпуса: марка слева, питание справа (отдельной строки под дисплеем больше нет) */
  .brand { display: flex; justify-content: space-between; align-items: center;
    font-size: 11px; letter-spacing: .26em; color: #cbd5c6; font-weight: 600; padding: 0 3px 10px; }
  .brand-mark { display: flex; align-items: center; gap: 7px; }
  .brand-logo { width: 18px; height: 18px; color: #9fc9c0; flex: none; }
  .brand .pw { color: #778370; font-size: 8px; font-weight: 500; letter-spacing: .12em; }
  .brand .pw { display: flex; align-items: center; gap: 8px; }
  .mode-tabs { display: flex; align-items: center; gap: 12px; }
  .mode-tab { position: relative; border: 0; background: none; color: #66715f; cursor: pointer;
    padding: 2px 0 7px; font: inherit; font-size: 9.5px; font-weight: 500; letter-spacing: .2em; }
  .mode-tab.active { color: #d0dacb; }
  .mode-tab.active::after { content: ''; position: absolute; left: 0; right: .2em; bottom: 1px; height: 1px;
    background: #93a873; box-shadow: 0 0 5px rgba(159,180,127,.5); }
  .mode-info { flex: none; width: 18px; height: 18px; border: 1px solid #52604a; border-radius: 50%;
    background: rgba(159,180,127,.07); color: #87947f; cursor: pointer; font: inherit;
    font-size: 8px; font-weight: 500; line-height: 1; }
  .feed-dot { position: absolute; top: -1px; right: -6px; width: 4px; height: 4px; border-radius: 50%;
    background: #b8cc91; box-shadow: 0 0 5px rgba(184,204,145,.9); }
  .glass {
    position: relative; border-radius: 13px; overflow: hidden;
    background: linear-gradient(165deg, #b3c791, #9cb27a 58%, #92a771);
    color: #1d2415;
    box-shadow: inset 0 4px 12px rgba(20,28,12,.45), inset 0 -1px 3px rgba(255,255,255,.3);
    padding: 12px 14px 14px;
  }
  .glass::after { content: ''; position: absolute; inset: 0; pointer-events: none;
    z-index: 5; background: repeating-linear-gradient(0deg, rgba(20,28,12,.05) 0 1px, transparent 1px 3px); }
  .pager-screen { position: relative; z-index: 1; }
  #app.feed-mode { gap: 0; }
  #app.feed-mode .device { flex: 1; min-height: 300px; display: flex; flex-direction: column; }
  #app.feed-mode .glass { flex: 1; min-height: 0; padding: 0; }
  #app.feed-mode .pw, #app.feed-mode .hist, #app.feed-mode #pagerComposer { display: none !important; }
  #app.feed-mode #feedComposer { display: block !important; }
  .feed-screen { position: relative; z-index: 1; height: 100%; min-height: 0;
    display: flex; flex-direction: column; padding: 3px 14px 8px; }
  .feed-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
  .feed-list::-webkit-scrollbar { width: 0; height: 0; }
  .feed-post { padding: 9px 1px 3px; border-bottom: 1px dashed rgba(20,28,12,.12); }
  .feed-post.day-start:not(:first-child) { padding-top: 18px; }
  .post-meta { display: flex; align-items: baseline; min-width: 0;
    color: rgba(29,36,21,.7); font-size: var(--pager-meta-size); line-height: var(--pager-meta-line-height);
    font-weight: 500; letter-spacing: var(--pager-meta-tracking); text-transform: uppercase; }
  .post-author { flex: 0 1 auto; min-width: 0; max-width: calc(100% - 62px); display: inline-flex;
    align-items: baseline; white-space: nowrap; }
  .feed-post.day-start .post-author { max-width: 44%; }
  .post-author-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .post-author-number { flex: none; }
  .post-author.owned { padding: 2px 5px 2px 6px; margin: -2px 0; background: #1d2415;
    color: #b3c791; opacity: 1; }
  .post-meta-leader { flex: 1 1 18px; min-width: 10px; height: 2px; margin: 0 7px;
    background: repeating-linear-gradient(90deg, rgba(20,28,12,.27) 0 2px, transparent 2px 4px);
    transform: translateY(-2px); }
  .post-meta time { flex: none; white-space: nowrap; }
  .feed-post.day-start .post-meta time { color: rgba(29,36,21,.86);
    font-size: calc(var(--pager-meta-size) + .5px); letter-spacing: .11em; }
  .post-text { margin-top: 7px; color: rgba(29,36,21,.94); font-family: -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
    font-size: var(--feed-copy-size); font-weight: 400; line-height: var(--feed-copy-line-height);
    letter-spacing: -.008em; white-space: pre-wrap; word-break: break-word; }
  .post-graffiti-frame { width: max-content; max-width: 100%; margin: 9px auto 2px; padding: 6px;
    border: 1px solid rgba(20,28,12,.36); background: rgba(29,36,21,.075); }
  .post-graffiti { display: block; width: 116px; height: 116px;
    image-rendering: pixelated; background: transparent; }
  .post-graffiti-frame.post-photo-frame { padding: 0; border: 0; background: transparent; }
  .post-graffiti.post-photo { background: #b3c791; }
  .post-actions { min-height: 44px; display: flex; justify-content: space-between; align-items: center;
    gap: var(--pager-action-gap); margin-top: 2px; }
  .post-action { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    border: 0; background: none; color: rgba(29,36,21,.65); border-radius: 0; padding: 0 2px; cursor: pointer;
    font: inherit; font-size: var(--pager-action-label-size); font-weight: 500;
    letter-spacing: var(--pager-action-label-tracking); text-transform: uppercase; }
  .post-action svg { width: var(--pager-action-icon-size); height: var(--pager-action-icon-size);
    fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .post-action .feed-heart { overflow: visible; fill: transparent; stroke: currentColor;
    transform: translateY(-.1px); transform-origin: center; }
  .post-action .action-label { display: inline-flex; align-items: center; gap: 5px; padding-bottom: 2px;
    border-bottom: 1px dotted rgba(20,28,12,.36); }
  .post-action .action-label svg { width: 12px; height: 12px; stroke-width: 1.65; }
  .post-action .action-symbol { font-size: 11px; line-height: 1; }
  .post-action .like-count, .post-action .reply-count { font-size: 8px; line-height: 1;
    letter-spacing: .05em; font-variant-numeric: tabular-nums; }
  .post-action .like-count:empty, .post-action .reply-count:empty { display: none; }
  .post-action.like-action { justify-content: flex-start; padding: 0 8px 0 1px; }
  .post-action.reply-action, .post-action.remove-action { justify-content: flex-end; }
  .post-action.liked { color: #963f33; }
  .post-action.liked .feed-heart { fill: currentColor; stroke: currentColor; }
  .post-action:focus-visible { outline: 1px dashed rgba(20,28,12,.65); outline-offset: -5px; }
  .post-action:disabled { opacity: .48; cursor: default; }
  .feed-empty, .feed-state { color: rgba(29,36,21,.55); text-align: center; font-size: 9px;
    line-height: 1.5; letter-spacing: .09em; padding: 26px 10px; text-transform: uppercase;
    overflow-wrap: anywhere; }
  .feed-state { padding: 10px; }
  .g-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 9px; letter-spacing: 1.5px; font-weight: 500; opacity: .72; }
  .number { font-size: 46px; font-weight: 600; letter-spacing: .14em; text-indent: .14em; text-align: center; margin: 6px 0 3px; white-space: nowrap; text-shadow: 0 1px 0 rgba(255,255,255,.2); }
  .number.dim { opacity: .35; }
  .g-status { text-align: center; font-size: 10px; letter-spacing: 2px; opacity: .65; font-weight: 700; }

  .g-msg { position: relative; border-top: 1px dashed rgba(20,28,12,.32); margin-top: 11px; padding-top: 11px; }
  .g-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    font-size: var(--pager-meta-size); line-height: var(--pager-meta-line-height);
    letter-spacing: var(--pager-meta-tracking); font-weight: 500;
    opacity: .7; margin-bottom: 7px; text-transform: uppercase; }
  .g-meta span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .g-meta time { flex: none; white-space: nowrap; }
  .g-msg p { font-size: var(--pager-copy-size); line-height: var(--pager-copy-line-height);
    font-weight: 400; word-break: break-word; min-height: 22px; }
  .gdraw { display: block; width: min(128px, 48vw); height: auto; margin: 2px auto 0;
    image-rendering: pixelated; border: 0; background: transparent; }
  .gmelody { min-height: 38px; display: flex; align-items: center; justify-content: flex-start; gap: 9px;
    padding: 2px 0 0; }
  .melody-play { flex: none; width: var(--pager-action-size); height: var(--pager-action-size); display: grid; place-items: center;
    border: 1px solid rgba(20,28,12,.34); border-radius: 50%; background: rgba(184,202,150,.2);
    color: rgba(29,36,21,.76); cursor: pointer; font: 500 12px/1 ui-monospace, Menlo, monospace; }
  .melody-play span { transform: translateX(1px); }
  .melody-play.playing { background: #1d2415; color: #b3c791; border-color: #1d2415; }
  .melody-play.playing span { transform: none; font-size: 10px; }
  .gmelody-label { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
  .gmelody-label strong { color: #1d2415; font-size: 12px; font-weight: 500; letter-spacing: .15em; }
  .gmelody-label span { color: rgba(29,36,21,.58); font-size: 9px; font-weight: 500; letter-spacing: .12em; }
  /* длинное сообщение не раздувает корпус на пол-экрана: четыре строки, остальное по тапу
     со своим скроллом — как листали строки на настоящих пейджерах */
  .g-msg.clip p { max-height: 5.6em; overflow: hidden; }
  .g-msg.clip.open p { max-height: 11.2em; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: rgba(20,28,12,.35) transparent; }
  /* курсор набора: новое сообщение «печатается» на экранчике */
  .cur { display: inline-block; width: 6px; height: 15px; vertical-align: -2px; background: #1d2415;
    margin-left: 2px; animation: curb .9s steps(1) infinite; }
  @keyframes curb { 50% { opacity: 0 } }
  .more { display: none; margin-top: 7px; font-size: 8.5px; letter-spacing: 2px; font-weight: 700;
    color: rgba(29,36,21,.6); background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
  .g-msg.clip .more { display: inline-block; }
  .g-actions { display: flex; align-items: center; gap: var(--pager-action-gap);
    margin-top: var(--pager-action-top); justify-content: center; }
  /* до нажатия — пустой контур, после — залитая кнопка. Раньше было наоборот:
     нетронутое сердечко выглядело нажатым, а отправленное блёкло от :disabled */
  .g-actions button { font: inherit; cursor: pointer; background: rgba(184,202,150,.2);
    color: rgba(29,36,21,.68); border: 1px solid rgba(20,28,12,.3);
    min-height: var(--pager-action-size); padding: 0; display: inline-flex; align-items: center; justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
  .g-actions .round-action { flex: none; width: var(--pager-action-size); border-radius: 50%; }
  .g-actions .round-action svg { width: var(--pager-action-icon-size); height: var(--pager-action-icon-size); fill: none; }
  .g-actions .save-number { width: auto; padding: 0 10px; gap: 7px; border-radius: 9px;
    color: #1d2415; font-size: var(--pager-action-label-size); font-weight: 500;
    letter-spacing: var(--pager-action-label-tracking); text-transform: uppercase; }
  .g-actions .save-number svg { width: 14px; height: 14px; flex: none; }
  .g-actions button:disabled { opacity: .45; }
  .g-actions button.liked { background: #1d2415; color: #b3c791; border-color: #1d2415; opacity: 1; }
  .g-actions button.liked svg { fill: currentColor; }

  .switch { position: relative; width: 40px; height: 21px; border-radius: 999px; cursor: pointer; flex: none;
    background: #10140e; border: 1px solid #333d29; transition: background .15s, opacity .15s; }
  .switch .knob { position: absolute; top: 1.5px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
    background: #55614d; transition: left .15s, background .15s; }
  .switch.on { background: #1f2a1a; border-color: #46543f; box-shadow: inset 0 0 8px rgba(159,180,127,.3); }
  .switch.on .knob { left: 20px; background: #9fb47f; box-shadow: 0 0 8px rgba(159,180,127,.85); }
  .switch.busy { opacity: .45; }
  @keyframes swpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(159,180,127,0); } 50% { box-shadow: 0 0 12px 3px rgba(159,180,127,.5); } }
  .switch.attn { animation: swpulse 1.6s ease-in-out infinite; }

  /* ===== история: без коробки, на волосяных линиях ===== */
  .hist { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 18px; }
  /* заголовок живёт только в свёрнутом виде: подпись на линии */
  .hist-head { flex: none; display: flex; align-items: center; gap: 12px; }
  .hist-head::before, .hist-head::after { content: ''; flex: 1; height: 1px; background: #1a2016; }
  .hist-head button { font: inherit; font-size: 10px; letter-spacing: 2px; font-weight: 500; cursor: pointer;
    background: none; color: #64705d; border: 0; border-radius: 0; padding: 0; }
  .hist-head button span { display: inline-block; margin-left: 4px; transition: transform .16s ease; }
  /* панель открытой ленты: селектор адресата + корзина + свернуть */
  .histbar { flex: none; display: flex; align-items: center; gap: 6px; padding: 0 2px 9px;
    border-bottom: 1px solid #1a2016; }
  .selwrap { position: relative; flex: 1; min-width: 0; }
  .peersel { font: inherit; font-size: 11px; letter-spacing: 2px; font-weight: 700; cursor: pointer;
    background: none; border: 0; padding: 4px 0; color: #cfe0c8; display: inline-flex; align-items: center; gap: 7px;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .peersel i { font-style: normal; font-size: 9px; color: #7f9463; }
  .histbar .ic { flex: none; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    background: none; border: 0; color: #55614d; cursor: pointer; font-size: 13px; font-family: inherit; }
  .histbar .ic svg { width: 16px; height: 16px; }
  .histbar .ic:active { color: #9fb47f; }
  .menu { position: absolute; z-index: 40; left: -6px; top: calc(100% + 6px); min-width: 190px; max-height: 44vh;
    overflow-y: auto; background: #12160f; border: 1px solid #2c3524; border-radius: 14px; padding: 5px;
    box-shadow: 0 14px 34px rgba(0,0,0,.6); }
  .menu button { display: flex; width: 100%; align-items: baseline; justify-content: space-between; gap: 12px;
    font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; background: none; border: 0;
    color: #b7c4ab; padding: 9px 11px; border-radius: 9px; }
  .menu button.on { background: #1c2317; color: #cfe0c8; }
  .menu button span { font-size: 10px; color: #55614d; }
  .histbox { flex: 1; min-height: 120px; margin: 4px 0 0;
    display: flex; flex-direction: column; overflow: hidden; }
  .histlist { flex: 1; min-height: 0; padding: 12px 0 4px; display: flex; flex-direction: column; gap: 8px;
    overflow-y: auto; overscroll-behavior: contain;
    scrollbar-width: thin; scrollbar-color: #2c3524 transparent; }
  .histlist::-webkit-scrollbar { width: 4px; }
  .histlist::-webkit-scrollbar-thumb { background: #2c3524; border-radius: 2px; }
  /* реакции не занимают строки в истории: тихая плашка висит на самом сообщении */
  .reactionmark { position: absolute; right: 10px; bottom: -9px; display: inline-flex; align-items: center; gap: 5px;
    font-size: 10px; line-height: 1; background: #1a2016; color: #819374;
    border: 1px solid #2c3524; border-radius: 999px; padding: 3px 6px; }
  .reactionmark .mark-like { color: #c07a5e; }
  .row.hasmark { margin-bottom: 6px; }
  .row { position: relative; border-radius: 12px; padding: 9px 12px; font-size: 13.5px; cursor: pointer; word-break: break-word; flex: none;
    font-family: -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif; }
  .row small { display: block; font-size: 9.5px; letter-spacing: 1px; opacity: .8; margin-bottom: 3px; font-weight: 700;
    font-family: ui-monospace, Menlo, monospace; }
  .row.in { background: linear-gradient(165deg, #a3b884, #93a873); color: #1d2415; box-shadow: inset 0 2px 6px rgba(20,28,12,.25); margin-right: 30px; }
  .row.out { background: #161b13; border: 1px solid #262e21; color: #99a58f; margin-left: 30px; }
  .history-retry { display: block; width: max-content; max-width: 100%; margin: 7px 0 0 auto; padding: 2px 0;
    border: 0; border-bottom: 1px dotted currentColor; background: transparent; color: #819374;
    font: 600 8.5px/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .11em; cursor: pointer; }
  .history-retry:disabled { opacity: .58; cursor: default; }
  .row .pixelmsg { display: block; width: 112px; height: 112px; margin: 5px 0 2px;
    image-rendering: pixelated; border: 1px solid currentColor; background: #b3c791; }
  .row .melodymsg { display: flex; align-items: center; justify-content: space-between; gap: 10px;
    min-height: 37px; margin-top: 2px; }
  .row .melodymsg span { font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 10px; font-weight: 500; letter-spacing: .11em; }
  .row .history-melody-play { flex: none; width: 34px; height: 34px; display: grid; place-items: center;
    border: 1px solid currentColor; border-radius: 50%; background: transparent; color: inherit;
    cursor: pointer; font: 500 12px/1 ui-monospace, Menlo, monospace; opacity: .72; }
  .row .history-melody-play.playing { background: currentColor; opacity: 1; }
  .row.in .history-melody-play.playing { color: #1d2415; box-shadow: inset 0 0 0 20px #1d2415; }
  .row.in .history-melody-play.playing span { color: #b3c791; }
  .row.out .history-melody-play.playing { color: #9fb47f; box-shadow: inset 0 0 0 20px #2b3525; }
  .empty { font-size: 12.5px; color: #4e5a45; text-align: center; padding: 22px 14px; line-height: 1.6; }
  .histspacer { flex: 1; }

  /* ===== композер ===== */
  .composer { flex: none; padding-bottom: max(10px, env(safe-area-inset-bottom));
    padding-top: var(--pager-composer-top); }
  /* при открытой ленте композер становится доком: переписка уходит ПОД него */
  body.dock .composer { margin: 0 -16px; padding: var(--pager-composer-top) 16px max(10px, env(safe-area-inset-bottom));
    background: #0a0d09; border-top: 1px solid #1a2016; box-shadow: 0 -14px 26px rgba(6,8,6,.75); }
  /* затухание меряем в пикселях и добавляем такой же запас снизу, иначе последняя
     запись ленты навсегда остаётся в тумане — доскроллить до читаемого невозможно */
  body.dock .histlist { padding-bottom: 30px;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 26px), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 26px), transparent); }
  /* растущее поле забирает место у ленты — она обязана уметь ужиматься, иначе наезжает на док */
  body.dock .histbox { min-height: 0; }
  body.dock .hist { overflow: hidden; }
  .panel { display: flex; flex-direction: column; gap: 9px; }
  /* строка «кому» появляется, только когда номер набран целиком */
  .toline { font-size: 10px; letter-spacing: 2px; font-weight: 700; color: #55614d; padding: 0 4px 2px; }
  .toline b { color: #9fb47f; font-weight: 700; }
  .toline button { font: inherit; font-size: 10px; letter-spacing: 1px; background: none; border: 0;
    color: #7f9463; text-decoration: underline dotted; cursor: pointer; padding: 0 0 0 8px; }
  .numwrap { position: relative; flex: none; }
  /* список частых адресатов всплывает НАД полем: снизу на телефоне клавиатура */
  .numMenu { left: -4px; right: auto; top: auto; bottom: calc(100% + 8px);
    width: min(276px, calc(100vw - 42px)); min-width: 176px; max-height: min(310px, 48dvh); }
  .number-option { display: grid; grid-template-columns: minmax(0, 1fr) 38px; align-items: stretch; border-radius: 9px; }
  .number-option.no-edit { grid-template-columns: minmax(0, 1fr); }
  .number-option:focus-within { background: #1a2117; }
  .number-option .number-pick, .number-option .number-edit, .number-save-new {
    border: 0; color: #adb9a7; background: transparent; cursor: pointer; }
  .number-option .number-pick { display: block; min-width: 0; min-height: 45px; padding: 7px 9px; text-align: left; }
  .number-option .number-pick strong { display: block; overflow: hidden; color: #c9d3c4;
    font-size: 12.5px; font-weight: 400; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
  .number-option .number-pick small { display: block; margin-top: 4px; color: #65715e;
    font-size: 9px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
  .number-option .number-edit { display: grid; place-items: center; width: 38px; min-height: 42px;
    padding: 0; color: #697561; font-size: 14px; }
  .number-option .number-edit svg { width: 14px; height: 14px; }
  .number-save-new { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 42px;
    margin-top: 4px; padding: 0 9px; border-top: 1px solid #2b3425; color: #95a976;
    font-size: 9px; font-weight: 500; letter-spacing: .065em; text-align: left; text-transform: uppercase; }
  .io { display: flex; align-items: flex-start; gap: 0;
    background: #0e120c; border: 1px solid #232a20; border-radius: 14px; padding: 3px; }
  .io input, .io textarea { font: inherit; background: none; color: #d7e0d4; border: 0; outline: none; }
  .io input { width: 78px; flex: none; padding: 10px; font-size: 17px; font-weight: 500; text-align: center; letter-spacing: 3px; }
  /* поле растёт под текст (growText); номер и трубка за ним не тянутся */
  .io textarea { flex: 1; resize: none; height: var(--pager-composer-field-height);
    min-height: var(--pager-composer-field-height); max-height: var(--pager-composer-field-max-height); overflow-y: auto;
    padding: 11px; font-size: 16px; line-height: 1.35;
    border-left: 1px solid #1e2519; border-right: 1px solid #1e2519;
    scrollbar-width: thin; scrollbar-color: #2c3524 transparent;
    font-family: -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif; }
  .io .callbtn { flex: none; width: var(--pager-composer-field-height); height: var(--pager-composer-field-height);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    background: none; color: #6d7a64; border: 0; }
  .io .callbtn:disabled { opacity: .4; }
  .io .callbtn svg { width: var(--pager-composer-icon-size); height: var(--pager-composer-icon-size); }
  .attachwrap { position: relative; flex: none; width: var(--pager-composer-field-height);
    height: var(--pager-composer-field-height); }
  .attachwrap .callbtn { width: 100%; height: 100%; }
  .attach-menu { position: absolute; z-index: 45; right: -44px; bottom: calc(100% + 8px);
    width: 156px; padding: 5px; overflow: hidden; background: #12160f;
    border: 1px solid #2c3524; border-radius: 13px; box-shadow: 0 14px 34px rgba(0,0,0,.62); }
  .attach-menu button { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 10px;
    border: 0; border-radius: 9px; padding: 7px 9px; background: transparent; color: #aab7a2;
    cursor: pointer; font: 500 9px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .11em; }
  .attach-menu button + button { border-top: 1px solid #252d21; border-radius: 0 0 9px 9px; }
  .attach-menu button:active { background: #1c2317; color: #cfe0c8; }
  .attach-menu svg { flex: none; width: 19px; height: 19px; color: #829176; }
  .send button { width: 100%; font: inherit; font-size: 13px; font-weight: 600; letter-spacing: 2.2px; cursor: pointer;
    background: linear-gradient(180deg, #a8bd86, #90a76e); color: #131a0e; border: 0; border-radius: 13px; padding: 14px;
    box-shadow: 0 6px 18px rgba(159,180,127,.18), inset 0 1px 0 rgba(255,255,255,.35); }
  .send button.sending { color: #b0bda7; background: #252d21; }
  .send button.sent { color: #172011; background: linear-gradient(180deg, #c0d19b, #9db879); }
  .send button.failed { color: #d9c9aa; background: #3a3020; }
  .send button:active { transform: translateY(1px); }
  .send button:disabled { opacity: .4; }
  .sstatus { font-size: 11px; color: #6d7a64; text-align: center; min-height: 14px; }
  .sstatus.ok { color: #7fc86a; } .sstatus.err { color: #d99a4e; }
  /* остаток символов: абсолютом, чтобы появление счётчика не двигало статус и композер */
  .sline { position: relative; }
  .ccount { position: absolute; right: 2px; top: 0; font-size: 11px; color: #6d7a64; pointer-events: none; }
  .ccount.low { color: #d99a4e; }
  .howlink { height: 12px; line-height: 12px; text-align: center; font-size: 10px; margin-top: 6px; }
  .howlink a { color: #55614d; text-decoration: underline dotted; cursor: pointer; }
  /* У ленты нет ссылки под кнопкой, но её пустое место сохраняется: поэтому оба
     нижних блока начинаются и заканчиваются на одной высоте. */
  .feed-composer::after { content: ''; display: block; height: var(--pager-composer-footer-height); }
  .feed-composer .io textarea { width: 100%; border-left: 0; }

  /* ===== новая главная Pager: первый обратимый этап редизайна ===== */
  #app.main-home-v2-mode { display: block; min-height: 100%; }
  #app.main-home-v2-mode > .device,
  #app.main-home-v2-mode > .hist,
  #app.main-home-v2-mode > #pagerComposer,
  #app.main-home-v2-mode > #feedComposer { display: none !important; }
  .main-home-v2 {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - max(8px, env(safe-area-inset-top)));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    color: #dce8ae;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
  }
  .main-head-v2 {
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: var(--main-head-v2-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 3px 0 7px;
    border-bottom: 1px solid rgba(108,128,82,.22);
    background: linear-gradient(180deg, rgba(12,15,13,.99) 78%, rgba(12,15,13,.94));
  }
  .main-head-v2::before {
    content: '';
    position: absolute;
    left: -16px;
    right: -16px;
    bottom: 100%;
    height: max(8px, env(safe-area-inset-top));
    background: var(--pt-bg);
  }
  .main-tabs-v2 { min-width: 0; display: flex; align-items: center; gap: 6px; }
  .main-tabs-v2 button,
  .main-receive-v2 {
    min-width: 44px;
    min-height: 44px;
    border: 0;
    background: none;
    color: #86966c;
    font: 600 11px/1 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
    letter-spacing: .1em;
    cursor: pointer;
  }
  .main-tabs-v2 button { position: relative; padding: 0 3px; }
  .main-tabs-v2 button.active { color: #e7f0be; }
  .main-tabs-v2 button.active::after {
    content: '';
    position: absolute;
    right: 4px;
    bottom: 2px;
    left: 3px;
    height: 2px;
    background: #b9ce7f;
  }
  .main-tabs-v2 .main-settings-v2 { display: grid; place-items: center; padding: 0; }
  .main-tabs-v2 .main-settings-v2::after { display: none; }
  .main-settings-v2 svg { width: 20px; height: 20px; }
  .main-feed-dot-v2 {
    position: absolute;
    top: 7px;
    right: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #b9ce7f;
  }
  .main-receive-v2 { flex: none; display: flex; align-items: center; gap: 8px; padding: 0; }
  .main-receive-v2 span { color: #86966c; }
  .main-receive-v2 i {
    position: relative;
    display: block;
    width: 45px;
    height: 26px;
    border-radius: 999px;
    background: #34412d;
    transition: background .18s ease;
  }
  .main-receive-v2 i::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #d9dfc5;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
    transition: transform .18s ease;
  }
  .main-receive-v2.on i { background: #9fc768; }
  .main-receive-v2.on i::after { transform: translateX(19px); }

  .main-number-v2 {
    position: relative;
    min-height: 100px;
    margin: 12px 0 10px;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #202914;
    border: 1px solid #7c8f59;
    border-radius: 22px;
    background:
      repeating-linear-gradient(0deg, rgba(54,72,33,.035) 0 1px, transparent 1px 4px),
      linear-gradient(150deg, #e0e9b6, #c9da91);
    box-shadow: inset 0 0 18px rgba(59,74,39,.25), 0 10px 24px rgba(0,0,0,.16);
  }
  .main-number-v2 strong {
    font: 400 clamp(58px, 18vw, 70px)/1 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    letter-spacing: .1em;
    text-indent: .1em;
  }
  .main-number-status-v2 {
    position: absolute;
    right: 14px;
    bottom: 10px;
    left: 14px;
    color: #654838;
    text-align: center;
    font-size: 9.5px;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: .1em;
  }
  .main-chat-list-v2 { width: 100%; }
  .pager-avatar-v2 {
    display: block;
    flex: none;
    border: 0;
    border-radius: 14px;
    background: #111511;
    box-shadow: none;
    image-rendering: pixelated;
  }
  .main-chat-item-v1 {
    position: relative;
    min-height: 84px;
    overflow: hidden;
  }
  .main-chat-item-v1::after {
    content: '';
    position: absolute;
    z-index: 2;
    left: 64px;
    right: 0;
    bottom: 0;
    border-bottom: 1px solid rgba(108,128,82,.22);
    pointer-events: none;
  }
  .main-chat-row-v2 {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 84px;
    display: flex;
    align-items: center;
    padding: 11px 2px;
    border: 0;
    color: inherit;
    text-align: left;
    background: #0c0f0d;
    box-shadow: 8px 0 18px rgba(0,0,0,.18);
    cursor: pointer;
    touch-action: pan-y;
    transition: background-color 120ms ease;
    -webkit-tap-highlight-color: transparent;
  }
  /* This real box owns the whole-row press.
     Its transparent wrappers let the preview use the space below the date. */
  .main-chat-content-v3 {
    position: relative;
    flex: 1;
    min-width: 0;
    min-height: 52px;
    display: grid;
    grid-template-columns: 52px minmax(0,1fr) auto;
    grid-template-rows: 21px auto;
    gap: 5px 10px;
    align-content: center;
    align-items: center;
  }
  .main-chat-row-v2:active {
    background: linear-gradient(rgba(215,229,163,.04), rgba(215,229,163,.04)), #0c0f0d;
  }
  /* Press the visible contents without changing the native hit area. */
  .main-chat-row-v2 > * {
    scale: 1;
    transition: scale 220ms cubic-bezier(.22,1.35,.36,1);
  }
  .main-chat-item-v1 .main-chat-row-v2:is(:active, .is-pressed-v6):not(:disabled) > * {
    scale: .975;
    transition-duration: 75ms;
    transition-timing-function: ease-out;
  }
  .main-chat-avatar-v2 { width: 52px; height: 52px; border-radius: 0; background: transparent; }
  .main-chat-content-v3 > .main-chat-avatar-v2 {
    position: absolute;
    left: 0;
    top: 50%;
    width: 52px;
    height: 52px;
    /* Independent translate keeps profile-refresh scale animations centered. */
    translate: 0 -50%;
  }
  .main-chat-avatar-v2.photo-avatar-v2,
  .main-chat-avatar-v2[data-avatar-kind="photo"] { border-radius: 50%; object-fit: cover; }
  .pager-avatar-v2.photo-avatar-v2 { image-rendering: auto; }
  .main-chat-number-v2 {
    flex: none;
    color: #b9ca8b;
    font: 600 14px/18px ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    letter-spacing: .055em;
    font-variant-numeric: tabular-nums;
  }
  .main-chat-copy-v2 { display: contents; }
  .main-chat-title-v2 { grid-column: 2; grid-row: 1; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
  #app .main-chat-title-v2 > .main-chat-muted-v2 {
    flex: none;
    align-self: center;
    width: 14px;
    height: 14px;
    color: var(--pt-muted);
  }
  .main-chat-title-v2 strong {
    min-width: 0;
    overflow: hidden;
    color: #e2edb5;
    font-size: 16px;
    font-weight: 650;
    line-height: 21px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .main-chat-preview-v2 {
    grid-column: 2 / 4;
    grid-row: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    align-self: start;
    min-width: 0;
    min-height: 18px;
    max-height: 36px;
    overflow: hidden;
    white-space: normal;
    overflow-wrap: anywhere;
    color: #929f7c;
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
  }
  .main-chat-preview-text-v2 {
    display: inline;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .main-chat-preview-v2 svg {
    display: inline-block;
    vertical-align: -2px;
    margin: 0 5px 0 0;
    width: 14px;
    height: 14px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .main-chat-photo-preview-v7 {
    position: relative; display: inline-block; vertical-align: -4px; margin-right: 5px;
    width: 18px; height: 18px; overflow: hidden; border-radius: 3px;
    background: color-mix(in srgb, currentColor 10%, transparent);
  }
  .main-chat-photo-preview-v7 svg { display: block; margin: 2px; }
  .main-chat-photo-preview-v7:has(img) svg { visibility: hidden; }
  .main-chat-photo-preview-v7 img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .main-chat-ticks-v2 {
    width: 14px;
    height: 12px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #849366;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
  }
  .main-chat-ticks-v2 svg { width: 14px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
  .main-chat-ticks-v2.read { color: #91c77a; }
  .main-chat-row-v2.unread .main-chat-title-v2 strong { color: #f0f6d1; font-weight: 750; }
  .main-chat-title-v2 strong.is-public,
  .main-chat-row-v2.unread .main-chat-title-v2 strong.is-public { color: var(--pt-gold); }
  .main-chat-row-v2.unread .main-chat-preview-v2 { padding-right: 18px; color: #b1be94; font-weight: 400; }
  .main-chat-aside-v2 {
    display: contents;
    text-align: right;
  }
  .main-chat-stamp-v2 {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
  }
  .main-chat-aside-v2 time {
    color: #85956b;
    font-size: 11px;
    line-height: 21px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
  .main-chat-state-v2 {
    grid-column: 3;
    grid-row: 2;
    min-height: 18px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
  }
  .main-chat-state-v2:empty { display: none; }
  .companion-entry .main-chat-preview-v2 { grid-column: 2; }
  .companion-entry-arrow { grid-column: 3; grid-row: 1 / 3; }
  .main-chat-row-v2.unread .main-chat-aside-v2 time { color: #b7ca85; }
  .main-chat-unread-v2 {
    width: 6px;
    height: 6px;
    flex: none;
    border-radius: 50%;
    background: #c8dd8a;
    box-shadow: 0 0 0 2px rgba(184,207,124,.08);
  }
  .main-chat-empty-v2 { padding: 30px 6px; color: #7f8e68; text-align: center; font-size: 13px; line-height: 1.5; }
  .main-home-clearance-v2 { min-height: 20px; flex: 1 0 20px; }
  .main-receive-feedback-v2 {
    position: fixed;
    z-index: 22;
    left: 50%;
    bottom: calc(max(8px, env(safe-area-inset-bottom)) + 64px);
    transform: translateX(-50%);
    width: min(388px, calc(100vw - 32px));
    padding: 13px 16px;
    border: 1px solid #514536;
    border-radius: 16px;
    background: #242119;
    color: #e5ccb0;
    box-shadow: 0 8px 24px rgba(0,0,0,.28);
    font: 400 14px/1.45 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
    text-align: left;
    overflow-wrap: anywhere;
    pointer-events: none;
    animation: receive-feedback-in-v2 160ms ease-out;
  }
  @keyframes receive-feedback-in-v2 { from { opacity: 0; } to { opacity: 1; } }
  @media (prefers-reduced-motion: reduce) {
    .main-receive-feedback-v2 { animation: none; }
  }
  .main-compose-v2 {
    --compose-face: #d7e5a3;
    --compose-face-pressed: #cbdc94;
    --compose-shadow: 0 12px 26px rgba(0,0,0,.36);
    --compose-shadow-pressed: 0 3px 9px rgba(0,0,0,.24);
    position: sticky;
    z-index: 12;
    bottom: max(8px, env(safe-area-inset-bottom));
    align-self: flex-end;
    flex: none;
    min-width: 174px;
    min-height: 52px;
    margin: 16px 0 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 26px;
    color: #273018;
    background: transparent;
    box-shadow: none;
    font: 650 14px/1 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
    letter-spacing: .08em;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  /* Keep the native hit area still while the button face presses and rebounds. */
  .main-compose-face-v5 {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: inherit;
    min-height: inherit;
    padding: 0 20px;
    border-radius: inherit;
    background: var(--compose-face);
    box-shadow: var(--compose-shadow);
    pointer-events: none;
    transform: translateY(0) scale(1);
    transition: transform 240ms cubic-bezier(.22,1.5,.36,1), background-color 110ms ease, box-shadow 110ms ease;
  }
  .main-compose-v2:is(:active, .is-pressed-v5):not(:disabled) .main-compose-face-v5 {
    transform: translateY(1px) scale(.96);
    background: var(--compose-face-pressed);
    box-shadow: var(--compose-shadow-pressed);
    transition: transform 80ms ease-out, background-color 80ms ease-out, box-shadow 80ms ease-out;
  }
  .main-compose-v2 svg {
    width: 19px;
    height: 19px;
    flex: none;
    stroke-width: 1.8;
  }
  @media (max-width: 350px) {
    .main-head-v2 { gap: 4px; }
    .main-tabs-v2 { gap: 0; }
    .main-tabs-v2 button { padding-right: 1px; padding-left: 1px; font-size: 10px; }
    .main-receive-v2 { gap: 6px; font-size: 10px; }
    .main-number-v2 { min-height: 94px; }
    .main-chat-title-v2 { gap: 6px; }
    .main-chat-title-v2 strong { font-size: 15px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .main-compose-face-v5,
    .main-compose-v2:is(:active, .is-pressed-v5):not(:disabled) .main-compose-face-v5 { transform: none; transition: none; }
    .main-chat-row-v2 > *,
    .main-chat-item-v1 .main-chat-row-v2:is(:active, .is-pressed-v6):not(:disabled) > * { scale: 1; transition: none; }
    .main-chat-row-v2 { transition: none; }
  }

  /* ===== новый диалог: отдельный полноэкранный сценарий ===== */
  .main-new-dialog-v2 {
    position: fixed;
    inset: 0;
    z-index: 72;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: #0c100c;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
  }
  .main-new-dialog-sheet-v2 {
    width: min(100%, 420px);
    height: 100%;
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: max(8px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    color: #e3edb7;
    background: #0c100c;
  }
  .main-sheet-head-v2 {
    min-height: 58px;
    display: grid;
    grid-template-columns: 44px minmax(0,1fr) 44px;
    align-items: center;
    gap: 4px;
  }
  .main-sheet-head-v2 h2 {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.02em;
    text-align: center;
  }
  .main-sheet-head-v2 button {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    color: #dce8ae;
    background: transparent;
    cursor: pointer;
  }
  .main-sheet-head-v2 svg { width: 21px; height: 21px; }
  .main-recipient-field-v2 { display: block; margin-top: 8px; }
  .main-recipient-field-v2 input,
  .main-recipient-save-form-v2 input {
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 16px;
    outline: none;
    color: #e5edc6;
    background: #161e14;
    font: 400 17px/1.2 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
  }
  .main-recipient-field-v2 input { padding: 0 16px; }
  .main-recipient-field-v2 input::placeholder,
  .main-recipient-save-form-v2 input::placeholder { color: #758261; }
  .main-recipient-results-v2 {
    min-height: 0;
    flex: 1;
    margin-top: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .main-recipient-row-v2 {
    width: 100%;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 4px;
    border: 0;
    border-bottom: 1px solid rgba(111,132,84,.2);
    color: inherit;
    text-align: left;
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
    cursor: pointer;
  }
  .main-recipient-row-v2 > span:first-child { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
  .main-recipient-row-v2 strong { overflow: hidden; font-size: 16px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
  .main-recipient-row-v2 small,
  .main-recipient-row-v2 > span:last-child { color: #8c9b70; font-size: 12px; }
  .main-recipient-row-v2 > span:last-child { flex: none; }
  .main-recipient-empty-v2 { padding: 26px 6px; color: #7f8d68; text-align: center; font-size: 14px; }
  .main-recipient-exact-v2 { margin-top: 14px; }
  .main-recipient-exact-v2 .main-recipient-empty-v2 { padding-bottom: 16px; }
  .main-recipient-identity-v2 {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    padding: 8px 4px;
    border-bottom: 1px solid rgba(111,132,84,.2);
  }
  .main-recipient-identity-v2 strong {
    min-width: 0;
    overflow: hidden;
    font-size: 16px;
    font-weight: 680;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .main-recipient-identity-v2 span { flex: none; color: #8c9b70; font-size: 12px; }
  .main-recipient-retry-v2 {
    min-height: 44px;
    display: block;
    margin: -8px auto 8px;
    padding: 0 12px;
    border: 0;
    color: #dce9aa;
    background: transparent;
    font: 650 14px/1 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
    cursor: pointer;
  }
  .main-recipient-save-prompt-v2 {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #a7b486;
    font-size: 14px;
  }
  .main-recipient-save-prompt-v2 button {
    min-height: 44px;
    padding: 0 4px;
    border: 0;
    color: #dce9aa;
    background: transparent;
    font: 650 14px/1 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
    cursor: pointer;
  }
  .main-recipient-save-form-v2 {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 8px;
    margin-bottom: 12px;
  }
  .main-recipient-save-form-v2 input { min-width: 0; padding: 0 14px; }
  .main-recipient-save-form-v2 button {
    min-height: 52px;
    padding: 0 16px;
    border: 0;
    border-radius: 16px;
    color: #273018;
    background: #d7e5a3;
    font: 650 14px/1 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
    cursor: pointer;
  }
  .main-recipient-actions-v2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .main-recipient-actions-v2.single { grid-template-columns: 1fr; }
  .main-recipient-actions-v2 button {
    min-width: 0;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 12px;
    border: 0;
    border-radius: 17px;
    color: #dce7b4;
    background: #1b2418;
    font: 650 15px/1 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
    cursor: pointer;
  }
  .main-recipient-actions-v2 button.primary { color: #273018; background: #d7e5a3; }
  .main-recipient-actions-v2 svg { width: 19px; height: 19px; flex: none; }

  /* ===== настройки: только редкие и действительно работающие действия ===== */
  .main-system-v2 {
    position: fixed;
    inset: 0;
    z-index: 73;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    background: rgba(4,6,4,.72);
    font-family: var(--pager-ui-font);
  }
  .main-system-sheet-v2 {
    width: min(100%, 420px);
    max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 12px 20px 20px;
    border: 1px solid var(--pt-line);
    border-radius: var(--pager-ui-panel-radius);
    color: var(--pt-text);
    background: var(--pt-surface);
    box-shadow: 0 18px 60px rgba(0,0,0,.4);
    animation: settings-appear-v3 .18s ease-out;
  }
  .main-system-head-v2 {
    flex: none;
    min-height: 56px;
    display: grid;
    grid-template-columns: 44px minmax(0,1fr) 44px;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
  }
  .main-system-head-v2 h2 {
    min-width: 0;
    margin: 0;
    font-size: var(--pager-ui-title-size);
    font-weight: var(--pager-ui-title-weight);
    line-height: 1.3;
    letter-spacing: 0;
    text-align: left;
  }
  .main-system-head-v2:has(.main-system-back-v2.hidden) { grid-template-columns: minmax(0,1fr) 44px; }
  .main-system-head-v2:has(.main-system-back-v2.hidden) .main-system-spacer-v2 { display: none; }
  .main-system-head-v2:has(.main-system-back-v2:not(.hidden)):has(.main-system-spacer-v2:not(.hidden)) { grid-template-columns: 44px minmax(0,1fr); }
  .main-system-head-v2:has(.main-system-back-v2:not(.hidden)):has(.main-system-spacer-v2:not(.hidden)) .main-system-spacer-v2 { display: none; }
  .main-system-head-v2 button,
  .main-system-spacer-v2 {
    width: 44px;
    height: 44px;
  }
  .main-system-head-v2 button {
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    color: var(--pt-muted);
    background: transparent;
    cursor: pointer;
  }
  .main-system-head-v2 svg { width: 21px; height: 21px; }
  .main-system-done-v2 svg { width: 23px; height: 23px; }
  .main-system-menu-v2, .main-system-profile-v2, .main-system-transfer-v2 {
    min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
    scrollbar-color: var(--pt-line) transparent;
  }
  .main-system-menu-v2 { padding: 0; }
  .main-system-group-v3 + .main-system-group-v3 { margin-top: 24px; }
  .main-system-label-v3 { margin: 0 0 4px; color: var(--pt-muted); font-size: 12px; line-height: 1.45;
    font-weight: 600; letter-spacing: 0; text-transform: none; }
  .main-system-menu-v2 button {
    width: 100%;
    min-height: 56px;
    display: grid;
    grid-template-columns: minmax(0,1fr) 24px;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border: 0;
    border-bottom: 1px solid var(--pt-line);
    color: inherit;
    text-align: left;
    background: transparent;
    cursor: pointer;
  }
  .main-system-menu-v2 button > span { min-width: 0; }
  #mainSystemProfileOpenV2 { grid-template-columns: minmax(0,1fr) 46px 24px; }
  .main-system-profile-copy-v2 { min-width: 0; }
  .main-system-avatar-v2 { width: 46px; height: 46px; justify-self: end; background: transparent; box-shadow: none; }
  .main-system-group-v3 > button:last-of-type { border-bottom: 0; }
  .main-system-menu-v2 strong,
  .main-system-menu-v2 small { display: block; }
  .main-system-menu-v2 strong { font-size: var(--pager-ui-label-size); font-weight: var(--pager-ui-title-weight); line-height: 1.3; }
  .main-system-menu-v2 small { margin-top: 4px; color: var(--pt-muted); font-size: var(--pager-ui-note-size); line-height: 1.45; font-weight: 400; letter-spacing: 0; }
  .main-system-menu-v2 button > svg { width: 18px; height: 18px; color: var(--pt-muted); justify-self: end; }
  .main-system-menu-v2 .main-system-toggle-v2 {
    grid-template-columns: minmax(0,1fr) 48px;
  }
  .main-system-menu-v2 .main-system-toggle-v2:disabled { cursor: wait; opacity: .62; }
  .settings-update-v1 { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--pt-line); }
  .settings-update-v1 p { margin: 0; color: var(--pt-muted); font-size: var(--pager-ui-note-size); line-height: 1.45; text-align: left; }
  .settings-version-v1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
  .settings-version-v1 span { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; letter-spacing: 0; }
  .main-system-menu-v2 .settings-update-v1 button {
    display: flex; justify-content: flex-start; gap: 8px; min-height: var(--pager-ui-control-height); margin: 4px 0 0;
    padding: 12px 0; border: 0; font-size: var(--pager-ui-label-size); font-weight: var(--pager-ui-title-weight); line-height: 1.3;
    color: var(--pt-text);
  }
  .main-system-menu-v2 .settings-update-v1 button > svg { width: 16px; height: 16px; flex: none; color: inherit; }
  .main-system-menu-v2 .settings-update-v1 button:disabled { opacity: .6; cursor: wait; }
  .settings-update-v1 [data-error="true"] { color: var(--pt-danger, #df9991); }
  .main-system-switch-v2 {
    width: 46px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    justify-self: end;
    padding: 3px;
    border: 1px solid rgba(135,150,109,.45);
    border-radius: 99px;
    background: #20281c;
    transition: background-color .16s ease, border-color .16s ease;
  }
  .main-system-switch-v2 > span {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #87966d;
    box-shadow: 0 2px 6px rgba(0,0,0,.28);
    transition: transform .16s ease, background-color .16s ease;
  }
  .main-system-toggle-v2[aria-checked="true"] .main-system-switch-v2 {
    border-color: #d7e5a3;
    background: #53623f;
  }
  .main-system-toggle-v2[aria-checked="true"] .main-system-switch-v2 > span {
    transform: translateX(18px);
    background: #e3edb7;
  }
  .main-system-profile-v2 { padding: 0; }
  .main-profile-hero-v2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0 32px;
  }
  .main-profile-avatar-v2 {
    width: 116px;
    height: 116px;
    border-radius: 30px;
    background: transparent;
    box-shadow: none;
  }
  .main-profile-actions-v2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .main-profile-actions-v2 button,
  .main-system-profile-v2 .main-profile-reset-v2 {
    min-height: var(--pager-ui-control-height);
    padding: 12px;
    border: 0;
    border-radius: var(--pager-ui-control-radius);
    font: inherit;
    font-size: var(--pager-ui-label-size);
    font-weight: var(--pager-ui-title-weight);
    line-height: 1.3;
    cursor: pointer;
  }
  .main-profile-actions-v2 button { color: var(--pt-text); background: var(--pt-surface-alt); }
  .main-profile-reset-v2 {
    width: 100%;
    min-height: 44px;
    margin-top: 9px;
    padding: 0 13px;
    border: 0;
    border-radius: 17px;
    color: #95a478;
    background: transparent;
    font: inherit;
    font-size: 15px;
    font-weight: 670;
    cursor: pointer;
  }
  .main-profile-reset-v2:disabled { opacity: .5; cursor: default; }
  .main-system-profile-v2 .main-profile-reset-v2 { min-height: var(--pager-ui-control-height); margin-top: 8px; color: var(--pt-muted); font-weight: 400; }
  .main-system-transfer-v2 { padding: 0; }
  .main-transfer-lead-v2 {
    margin: 0 0 12px;
    color: var(--pt-text);
    font-size: var(--pager-ui-body-size);
    line-height: 1.45;
  }
  .main-transfer-note-v2 {
    margin: 0 0 24px;
    color: var(--pt-muted);
    font-size: var(--pager-ui-note-size);
    line-height: 1.45;
  }
  .main-transfer-create-v2 {
    width: 100%;
    min-height: var(--pager-ui-control-height);
    padding: 12px 16px;
    border: 0;
    border-radius: var(--pager-ui-control-radius);
    color: var(--pt-on-accent);
    background: var(--pt-accent);
    font: inherit;
    font-size: var(--pager-ui-label-size);
    font-weight: var(--pager-ui-title-weight);
    line-height: 1.3;
    cursor: pointer;
  }
  .main-transfer-create-v2:disabled { opacity: .6; cursor: default; }
  .main-transfer-ready-v2 { padding-top: 0; }
  .main-transfer-timer-v2 {
    min-height: 34px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    color: var(--pt-muted);
    font-size: var(--pager-ui-note-size);
  }
  .main-transfer-timer-v2 strong { color: var(--pt-text); font-size: var(--pager-ui-title-size); font-weight: var(--pager-ui-title-weight); font-variant-numeric: tabular-nums; }
  .main-transfer-ready-v2 > p { margin: 8px 0 24px; color: var(--pt-muted); font-size: var(--pager-ui-note-size); line-height: 1.45; }
  .main-transfer-link-v2 {
    width: 100%;
    min-height: var(--pager-ui-control-height);
    display: grid;
    grid-template-columns: minmax(0,1fr) 22px;
    align-items: center;
    gap: 12px;
    padding: 0 15px;
    border: 0;
    border-radius: var(--pager-ui-control-radius);
    color: var(--pt-text);
    background: var(--pt-surface-alt);
    font: inherit;
    font-size: var(--pager-ui-note-size);
    text-align: left;
    cursor: pointer;
  }
  .main-transfer-link-v2 span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .main-transfer-link-v2 svg { width: 19px; height: 19px; color: var(--pt-muted); }
  .main-transfer-ready-v2 .main-transfer-status-v2 { margin: 8px 0 0; color: var(--pt-muted); font-size: var(--pager-ui-note-size); line-height: 1.45; }
  .main-transfer-status-v2:empty { display: none; }
  .main-system-transfer-v2 .main-transfer-error-v3 { margin: 16px 0 0; color: var(--pt-danger); font-size: var(--pager-ui-note-size); line-height: 1.45; overflow-wrap: anywhere; }
  .main-system-transfer-v2 .main-transfer-renew-v3 { width: 100%; min-height: var(--pager-ui-control-height); margin-top: 16px; padding: 12px 16px;
    border: 0; border-radius: var(--pager-ui-control-radius); color: var(--pt-on-accent); background: var(--pt-accent); font: inherit; font-size: var(--pager-ui-label-size); font-weight: var(--pager-ui-title-weight); line-height: 1.3; cursor: pointer; }
  .main-system-transfer-v2 .main-transfer-renew-v3:disabled { opacity: .6; cursor: wait; }
  .main-system-transfer-v2 .main-transfer-link-v2:disabled { opacity: .5; cursor: default; }
  .main-system-transfer-v2 .main-transfer-renew-v3:not(:disabled):active { transform: scale(.98); }
  @media (prefers-reduced-motion: reduce) { .main-system-transfer-v2 .main-transfer-renew-v3:not(:disabled):active { transform: none; } }
  .main-system-v2 button { -webkit-tap-highlight-color: transparent; }
  .main-system-v2 button:focus-visible { outline: 2px solid #d4e79c; outline-offset: -2px; }
  .main-system-head-v2 button { border-radius: 12px; }
  .main-system-head-v2 button:active { background: #20291b; }
  .main-system-menu-v2 button:not(:disabled):active { background: rgba(159,180,127,.07); }
  .main-system-profile-v2 button:not(:disabled):active, .main-transfer-create-v2:not(:disabled):active,
  .main-transfer-link-v2:not(:disabled):active { transform: scale(.98); }
  @keyframes settings-appear-v3 { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  @media (max-width: 350px) {
    .main-system-sheet-v2 { padding: 12px 16px 20px; }
    .main-system-menu-v2 button { gap: 10px; }
    .main-profile-actions-v2 { grid-template-columns: 1fr; }
  }
  @media (prefers-reduced-motion: reduce) {
    .main-system-sheet-v2 { animation: none; }
    .main-system-switch-v2, .main-system-switch-v2 > span { transition: none; }
    .main-system-v2 button:not(:disabled):active { transform: none; }
  }

  /* ===== общая лента: тот же каркас, компактные разделённые записи ===== */
  #app.main-feed-v2-mode {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-rows: var(--main-head-v2-height) minmax(0,1fr) auto;
    color: #e3edb7;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
  }
  #app.main-feed-v2-mode > .main-home-v2 {
    grid-row: 1;
    min-height: 0;
    padding: 0;
  }
  #app.main-feed-v2-mode > .main-home-v2 > :not(.main-head-v2) { display: none !important; }
  #app.main-feed-v2-mode .main-head-v2 { position: relative; height: var(--main-head-v2-height); }
  #app.main-feed-v2-mode > .device { display: contents; }
  #app.main-feed-v2-mode > .device > .brand { display: none !important; }
  #app.main-feed-v2-mode > .device > .glass {
    grid-row: 2;
    min-height: 0;
    display: block;
    overflow: hidden;
    padding: 0;
    border: 1px solid #738552;
    border-radius: 22px;
    background:
      repeating-linear-gradient(0deg, rgba(54,72,33,.035) 0 1px, transparent 1px 4px),
      linear-gradient(150deg, #dfe8b5, #c6d68f);
    box-shadow: inset 0 0 18px rgba(59,74,39,.24), 0 10px 24px rgba(0,0,0,.14);
  }
  #app.main-feed-v2-mode .glass::after { opacity: .42; }
  #app.main-feed-v2-mode .pager-screen { display: none !important; }
  #app.main-feed-v2-mode .feed-screen {
    height: 100%;
    padding: 0 14px 8px;
  }
  #app.main-feed-v2-mode .feed-list { padding-bottom: 8px; }
  #app.main-feed-v2-mode .feed-day {
    margin: 0;
    padding: 15px 0 7px;
    color: rgba(32,41,20,.58);
    font-size: 10px;
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: .11em;
    text-transform: uppercase;
  }
  #app.main-feed-v2-mode .feed-day:not(:first-child) { padding-top: 21px; }
  #app.main-feed-v2-mode .feed-post {
    padding: 10px 0 7px;
    border-bottom: 1px solid rgba(32,41,20,.16);
  }
  #app.main-feed-v2-mode .post-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    color: rgba(32,41,20,.63);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0;
    text-transform: none;
  }
  #app.main-feed-v2-mode .post-author {
    min-width: 0;
    max-width: calc(100% - 54px);
    gap: 6px;
    color: rgba(32,41,20,.82);
  }
  #app.main-feed-v2-mode .post-author-name {
    font-size: 14px;
    font-weight: 700;
  }
  #app.main-feed-v2-mode .post-author-number { color: rgba(32,41,20,.55); font-size: 11px; }
  #app.main-feed-v2-mode .post-author.owned {
    margin: 0;
    padding: 0;
    color: rgba(32,41,20,.82);
    background: transparent;
  }
  #app.main-feed-v2-mode .post-meta time { color: rgba(32,41,20,.5); font-variant-numeric: tabular-nums; }
  #app.main-feed-v2-mode .post-text {
    margin: 6px 0 0;
    color: #202914;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.38;
  }
  #app.main-feed-v2-mode .post-graffiti-frame {
    margin: 8px 0 2px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  #app.main-feed-v2-mode .post-graffiti { width: 104px; height: 104px; }
  #app.main-feed-v2-mode .post-melody {
    min-height: 50px;
    margin-top: 7px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  #app.main-feed-v2-mode .post-melody-play {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #d7e5a3;
    background: #26321d;
    cursor: pointer;
  }
  #app.main-feed-v2-mode .post-melody-play span { font-size: 13px; transform: translateX(1px); }
  #app.main-feed-v2-mode .post-melody-play.playing span { transform: none; }
  #app.main-feed-v2-mode .post-melody-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  #app.main-feed-v2-mode .post-melody-copy strong { color: #202914; font-size: 14px; font-weight: 650; }
  #app.main-feed-v2-mode .post-melody-copy small { color: rgba(32,41,20,.54); font-size: 11px; }
  #app.main-feed-v2-mode .post-actions {
    min-height: 44px;
    margin-top: 2px;
    gap: 10px;
  }
  #app.main-feed-v2-mode .post-action {
    min-width: 44px;
    min-height: 44px;
    color: rgba(32,41,20,.58);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .04em;
  }
  #app.main-feed-v2-mode .post-action svg { width: 16px; height: 16px; }
  #app.main-feed-v2-mode .post-action .feed-heart { width: 16px; height: 16px; }
  #app.main-feed-v2-mode .post-action.like-action,
  #app.main-feed-v2-mode .post-action.thread-action { justify-content: center; }
  #app.main-feed-v2-mode .post-action .action-label { gap: 4px; padding: 0; border: 0; }
  #app.main-feed-v2-mode .post-action.like-action { padding: 0 8px; }
  #app.main-feed-v2-mode .post-action.liked { color: #9b473f; }
  #app.main-feed-v2-mode .feed-empty {
    min-height: 100%;
    display: grid;
    place-items: center;
    padding: 24px;
    color: rgba(32,41,20,.57);
    font-size: 13px;
    line-height: 1.45;
    letter-spacing: 0;
    text-transform: none;
  }
  #app.main-feed-v2-mode .feed-state {
    min-height: 44px;
    display: grid;
    place-items: center;
    padding: 8px;
    color: rgba(32,41,20,.57);
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
  }
  #app.main-feed-v2-mode .feed-state:only-child { min-height: 100%; }
  #app.main-feed-v2-mode > .hist,
  #app.main-feed-v2-mode > #pagerComposer { display: none !important; }
  #app.main-feed-v2-mode > #feedComposer {
    grid-row: 3;
    display: block !important;
    padding: 10px 0 max(8px, var(--feed-safe-bottom));
    background: #0c0f0d;
  }
  body.composer-keyboard-visible #app.main-feed-v2-mode > #feedComposer {
    padding-bottom: 6px;
  }
  #app.main-feed-v2-mode #feedComposer .panel { display: block; }
  #app.main-feed-v2-mode #feedComposer .feed-io {
    display: grid;
    grid-template-columns: minmax(0,1fr) 50px;
    align-items: end;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  #app.main-feed-v2-mode #feedComposer .feed-field {
    position: relative;
    min-width: 0;
    border-radius: 18px;
    background: #151d13;
  }
  #app.main-feed-v2-mode #feedComposer textarea {
    width: 100%;
    min-height: 50px;
    height: 50px;
    max-height: 144px;
    padding: 14px 52px 12px 16px;
    border: 0;
    color: #e3edbd;
    background: transparent;
    font: 400 16px/1.4 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
  }
  #app.main-feed-v2-mode #feedComposer textarea::placeholder { color: #778563; }
  #app.main-feed-v2-mode #feedComposer .feed-attachwrap {
    position: absolute;
    right: 3px;
    bottom: 2px;
    width: 46px;
    height: 46px;
  }
  #app.main-feed-v2-mode #feedComposer #feedAttachBtn {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 0;
    color: #9dac79;
    background: transparent;
  }
  #app.main-feed-v2-mode #feedComposer #feedAttachBtn svg { width: 21px; height: 21px; }
  #app.main-feed-v2-mode #feedComposer .feed-publish {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 17px;
    color: #273018;
    background: #d7e5a3;
    cursor: pointer;
  }
  #app.main-feed-v2-mode #feedComposer .feed-publish svg { width: 23px; height: 23px; }
  #app.main-feed-v2-mode #feedComposer .feed-publish:disabled { opacity: .36; cursor: default; }
  #app.main-feed-v2-mode #feedComposer .feed-publish.sending { opacity: .7; }
  #app.main-feed-v2-mode #feedComposer .feed-publish.sent { background: #b9d17e; }
  #app.main-feed-v2-mode #feedComposer .feed-publish.failed { color: #ead1bb; background: #513b2f; }
  #app.main-feed-v2-mode #feedComposer .sline { min-height: 0; }
  #app.main-feed-v2-mode #feedComposer .sstatus { min-height: 0; margin-top: 5px; font-size: 11px; }
  #app.main-feed-v2-mode #feedComposer .sstatus:empty,
  #app.main-feed-v2-mode #feedComposer .ccount:empty { display: none; }
  #app.main-feed-v2-mode #feedComposer::after { display: none; }
  #app.main-feed-v2-mode #feedComposer .feed-attach-menu {
    position: absolute;
    z-index: 45;
    right: -54px;
    bottom: calc(100% + 10px);
    width: min(300px, calc(100vw - 32px));
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 4px;
    padding: 6px;
    border-radius: 16px;
    background: #151d13;
    box-shadow: 0 14px 34px rgba(0,0,0,.6);
  }
  #app.main-feed-v2-mode #feedComposer .feed-attach-menu.hidden { display: none; }
  #app.main-feed-v2-mode #feedComposer .feed-attach-menu button {
    min-width: 0;
    min-height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 2px;
    border: 0;
    border-radius: 11px;
    color: #afbe89;
    background: transparent;
    font: 600 10px/1 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
    cursor: pointer;
  }
  #app.main-feed-v2-mode #feedComposer .feed-attach-menu svg { width: 19px; height: 19px; }

  /* Первое открытие ленты: один факт о видимости и один — о личных сообщениях. */
  body.feed-info-v2-open #feedInfoOv {
    align-items: flex-end;
    padding: max(28px, env(safe-area-inset-top)) 0 0;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
  }
  body.feed-info-v2-open #feedInfoOv .sheet.feedinfo {
    width: min(100%, 420px);
    max-width: 420px;
    max-height: calc(100dvh - max(28px, env(safe-area-inset-top)));
    padding: 12px 20px max(26px, env(safe-area-inset-bottom));
    overflow-y: auto;
    border: 0;
    border-radius: 28px 28px 0 0;
    color: #e3edb7;
    background: #10160f;
    box-shadow: 0 -18px 48px rgba(0,0,0,.45);
  }
  body.feed-info-v2-open #feedInfoOv .sheet.feedinfo::before {
    content: '';
    display: block;
    flex: none;
    width: 42px;
    height: 5px;
    margin: 0 auto 18px;
    border-radius: 99px;
    background: #46583b;
  }
  body.feed-info-v2-open #feedInfoOv .feedinfo .x {
    top: 21px;
    right: 12px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    color: #dce8ae;
    background: transparent;
    font-size: 20px;
  }
  body.feed-info-v2-open #feedInfoOv .feedinfo .x.hidden { display: none !important; }
  body.feed-info-v2-open #feedInfoOv .feedinfo h2 {
    min-height: 44px;
    margin: 0 44px 14px;
    display: grid;
    place-items: center;
    color: #e3edb7;
    font-size: 22px;
    font-weight: 720;
    line-height: 1.15;
    letter-spacing: 0;
    text-transform: none;
  }
  body.feed-info-v2-open #feedInfoOv .feedinfo p {
    margin: 0;
    color: #b3bf91;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
  }
  body.feed-info-v2-open #feedInfoOv .feedinfo .feedcontrast {
    margin-top: 12px;
    padding: 0;
    border: 0;
    color: #82906b;
    background: transparent;
    font-size: 13px;
    line-height: 1.45;
  }
  body.feed-info-v2-open #feedInfoOv .feedinfo .okbtn {
    min-height: 54px;
    margin: 20px 0 0;
    padding: 0 16px;
    border: 0;
    border-radius: 17px;
    color: #273018;
    background: #d7e5a3;
    box-shadow: none;
    font: inherit;
    font-size: 15px;
    font-weight: 680;
    letter-spacing: 0;
  }

  /* Удаление записи — короткое подтверждение, а не ещё одна техническая страница. */
  #askOv.feed-ask-v2 {
    align-items: flex-end;
    padding: max(28px, env(safe-area-inset-top)) 0 0;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
  }
  #askOv.feed-ask-v2 .sheet.ask {
    width: min(100%, 420px);
    max-width: 420px;
    padding: 12px 20px max(26px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 28px 28px 0 0;
    color: #e3edb7;
    background: #10160f;
    box-shadow: 0 -18px 48px rgba(0,0,0,.45);
  }
  #askOv.feed-ask-v2 .sheet.ask::before {
    content: '';
    display: block;
    width: 42px;
    height: 5px;
    margin: 0 auto 20px;
    border-radius: 99px;
    background: #46583b;
  }
  #askOv.feed-ask-v2 .askhead {
    color: #e3edb7;
    font-size: 22px;
    font-weight: 720;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
  }
  #askOv.feed-ask-v2 .asktext {
    margin: 8px 0 20px;
    color: #9eac80;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
  }
  #askOv.feed-ask-v2 .askrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  #askOv.feed-ask-v2 .askrow button {
    min-height: 52px;
    padding: 0 12px;
    border: 0;
    border-radius: 17px;
    font: inherit;
    font-size: 15px;
    font-weight: 650;
    letter-spacing: 0;
  }
  #askOv.feed-ask-v2 .askno { color: #dce7b4; background: #1b2418; }
  #askOv.feed-ask-v2 .askyes.danger { color: #f5d8ce; background: #57352f; box-shadow: none; }
  #askOv.main-chat-ask-v2 .sheet.ask { padding-top: 24px; text-align: left; }
  #askOv.main-chat-ask-v2 .sheet.ask::before { display: none; }
  #askOv.main-chat-ask-v2 .asktext { margin-top: 18px; }
  #askOv.main-chat-ask-v2 .asktext span { font-family: inherit; }
  #askOv.main-chat-ask-v2 .main-chat-confirm-name-v2 {
    display: block;
    color: #dce7b4;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
    unicode-bidi: plaintext;
  }
  #askOv.main-chat-ask-v2 .main-chat-confirm-detail-v2 {
    display: block;
    margin-top: 4px;
    color: #89967a;
    font-size: 12px;
  }
  #askOv.main-chat-ask-v2 .main-chat-confirm-note-v2 { display: block; margin-top: 16px; color: #a7b58a; }

  /* Call confirmation shares the chat palette, without a draggable-sheet handle. */
  #askOv.main-call-ask-v2 {
    align-items: center;
    padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
  }
  #askOv.main-call-ask-v2 .sheet.ask {
    width: 100%;
    max-width: 360px;
    padding: 22px 20px 20px;
    border: 1px solid #2b3423;
    border-radius: 24px;
    background: #10160f;
    color: #e3edb7;
    text-align: left;
    box-shadow: 0 20px 64px #0008;
  }
  #askOv.main-call-ask-v2 .sheet.ask::before { display: none; }
  #askOv.main-call-ask-v2 .askhead {
    color: #e3edb7;
    font-family: inherit;
    font-size: 20px;
    font-weight: 650;
    line-height: 1.25;
    letter-spacing: -.2px;
    text-transform: none;
  }
  #askOv.main-call-ask-v2 .asktext { margin: 22px 0 24px; }
  #askOv.main-call-ask-v2 .asktext span { font-family: inherit; }
  #askOv.main-call-ask-v2 .call-confirm-peer-v2 { display: flex; align-items: center; gap: 14px; }
  #askOv.main-call-ask-v2 .call-confirm-avatar-v2 {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    box-shadow: none;
  }
  #askOv.main-call-ask-v2 .call-confirm-identity-v2 { min-width: 0; }
  #askOv.main-call-ask-v2 .call-confirm-name-v2 {
    display: block;
    color: #e3edb7;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
    unicode-bidi: plaintext;
  }
  #askOv.main-call-ask-v2 .call-confirm-username-v2 { color: var(--pt-gold); }
  #askOv.main-call-ask-v2 .asktext .call-confirm-number-v2 {
    display: block;
    margin-top: 4px;
    color: #8e9b79;
    font: 13px/1.3 ui-monospace, 'SFMono-Regular', Consolas, monospace;
    letter-spacing: .6px;
  }
  #askOv.main-call-ask-v2 .askrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  #askOv.main-call-ask-v2 .askrow button {
    min-height: 48px;
    padding: 10px;
    border: 0;
    border-radius: 15px;
    font: 600 15px/1.3 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: 0;
    box-shadow: none;
    transition: transform 120ms ease, background-color 120ms ease;
  }
  #askOv.main-call-ask-v2 .askno { color: #c5cea8; background: #20291b; }
  #askOv.main-call-ask-v2 .askyes { color: #202914; background: #d4e79c; }
  #askOv.main-call-ask-v2 .askrow button:active { transform: scale(.97); }
  #askOv.main-call-ask-v2 .askrow button:focus-visible { outline: 2px solid #d4e79c; outline-offset: 3px; }
  @media (prefers-reduced-motion: reduce) {
    #askOv.main-call-ask-v2 .askrow button { transition: none; }
    #askOv.main-call-ask-v2 .askrow button:active { transform: none; }
  }

  /* ===== личный диалог: та же логика, новый спокойный каркас ===== */
  /* Only the message list scrolls in a conversation. Animated composer overflow
     must not create another scroll range that native caret reveal can move. */
  .col:has(> #app.main-conversation-v2-mode) { overflow: clip; }
  #app.main-conversation-v2-mode {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0,1fr) auto;
    color: #e5edbf;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
  }
  #app.main-conversation-v2-mode > .device,
  #app.main-conversation-v2-mode > .main-home-v2,
  #app.main-conversation-v2-mode > #feedComposer { display: none !important; }
  #app.main-conversation-v2-mode > .hist {
    min-height: 0;
    margin: 0;
    overflow: hidden;
  }
  #app.main-conversation-v2-mode .hist-head,
  #app.main-conversation-v2-mode .histbar,
  #app.main-conversation-v2-mode .histspacer { display: none !important; }
  .conversation-head-v2 {
    flex: none;
    min-height: 64px;
    display: grid;
    grid-template-columns: 88px minmax(0,1fr) 88px;
    align-items: center;
    gap: 0;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(108,128,82,.22);
  }
  .conversation-nav-v2 {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    color: #dce8ae;
    background: transparent;
    cursor: pointer;
  }
  .conversation-nav-v2 svg { width: 20px; height: 20px; }
  .conversation-nav-spacer-v2 { visibility: hidden; pointer-events: none; }
  .conversation-peer-v2 { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 7px; text-align: center; }
  .conversation-avatar-v2 { width: 32px; height: 32px; border-radius: 10px; box-shadow: none; }
  .conversation-peer-copy-v2 { min-width: 0; max-width: calc(100% - 39px); display: flex; align-items: baseline; gap: 7px; }
  .conversation-peer-copy-v2 strong { min-width: 0; overflow: hidden; font-size: 17px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
  .conversation-peer-copy-v2 > span {
    flex: none;
    color: #b9ca8b;
    font: 600 14px/18px ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    letter-spacing: .055em;
    font-variant-numeric: tabular-nums;
  }
  .conversation-peer-copy-v2 > span:empty { display: none; }
  .conversation-actions-v2 {
    width: 88px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }
  .conversation-actions-v2 .conversation-nav-v2 { flex: none; }
  .conversation-head-v2:has(.conversation-add-contact-v2.hidden) {
    grid-template-columns: 44px minmax(0,1fr) 44px;
  }
  .conversation-head-v2:has(.conversation-add-contact-v2.hidden) .conversation-actions-v2 { width: 44px; }
  @media (max-width: 350px) {
    .conversation-head-v2:not(:has(.conversation-add-contact-v2.hidden)) {
      grid-template-columns: 44px minmax(0,1fr) 88px;
    }
  }
  .conversation-add-contact-v2 {
    color: #dce8ae;
    transition: color 150ms ease, background-color 150ms ease, transform 140ms ease;
  }
  .conversation-add-contact-v2:hover { color: #dce8ae; background: rgba(213,230,160,.06); }
  .conversation-add-contact-v2:active { transform: scale(.95); }
  .conversation-add-contact-v2:focus-visible { outline: 2px solid #829e57; outline-offset: -2px; }
  #app.main-conversation-v2-mode .histbox { min-height: 0; margin: 0; }
  #app.main-conversation-v2-mode .histlist {
    scrollbar-width: none;
    padding: 12px 0 16px;
    gap: 10px;
    background: radial-gradient(circle at 50% 38%, rgba(55,72,43,.13), transparent 48%);
    -webkit-mask-image: none;
    mask-image: none;
  }
  #app.main-conversation-v2-mode .histlist::-webkit-scrollbar { display: none; width: 0; height: 0; }
  .conversation-day-v2 {
    align-self: center;
    margin: 4px 0 3px;
    color: #829168;
    font-size: 11px;
    font-weight: 560;
    line-height: 1.2;
    letter-spacing: .07em;
  }
  .conversation-time-break-v2 {
    align-self: center;
    margin: 4px 0 -2px;
    color: rgba(130,145,104,.72);
    font-size: 10px;
    font-weight: 520;
    line-height: 1.2;
    letter-spacing: .04em;
    font-variant-numeric: tabular-nums;
  }
  .conversation-message-v2 {
    position: relative;
    width: max-content;
    max-width: 86%;
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: flex-start;
  }
  .conversation-message-v2.conversation-session-space-v2 { margin-top: 12px; }
  .conversation-message-v2.conversation-group-next-v2 { margin-top: -6px; }
  .conversation-message-v2.out { align-self: flex-end; align-items: flex-end; transform-origin: bottom right; }
  .conversation-message-v2.in { transform-origin: bottom left; }
  .conversation-call-card-v2 {
    max-width: 100%;
    min-width: 184px;
    display: grid;
    grid-template-columns: 22px minmax(0,1fr);
    align-items: center;
    gap: 11px;
    padding: 10px 13px;
    border: 1px solid rgba(134,151,110,.09);
    border-radius: 15px;
    color: #bccba2;
    background: #141b13;
  }
  .conversation-call-card-v2 > svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .conversation-call-detail-v2 { min-width: 0; display: grid; gap: 3px; }
  .conversation-call-title-v2 {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
  .conversation-call-detail-v2 > time {
    color: #87946f;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
  }
  .conversation-call-card-v2.missed { color: #c48f84; }
  .conversation-bubble-v2 {
    position: relative;
    max-width: 100%;
    padding: 10px 13px 7px;
    border-radius: 17px 17px 17px 5px;
    color: #e7efc2;
    background: #151d13;
  }
  .conversation-message-v2.out .conversation-bubble-v2 {
    color: #202914;
    border-radius: 17px 17px 5px 17px;
    background:
      repeating-linear-gradient(0deg, rgba(54,72,33,.03) 0 1px, transparent 1px 4px),
      #d5e6a0;
  }
  .conversation-message-v2.in.conversation-group-before-v2 .conversation-bubble-v2 { border-bottom-left-radius: 8px; }
  .conversation-message-v2.in.conversation-group-next-v2 .conversation-bubble-v2 { border-top-left-radius: 8px; }
  .conversation-message-v2.out.conversation-group-before-v2 .conversation-bubble-v2 { border-bottom-right-radius: 8px; }
  .conversation-message-v2.out.conversation-group-next-v2 .conversation-bubble-v2 { border-top-right-radius: 8px; }
  .conversation-copy-v2 { font-size: 16px; font-weight: 400; line-height: 1.38; overflow-wrap: anywhere; white-space: pre-wrap; }
  .conversation-meta-v2 {
    min-height: 20px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    color: #87946f;
    font-size: 11px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .conversation-meta-v2 > time,
  .conversation-meta-v2 > .delivery { flex: none; }
  .conversation-meta-v2 > .conversation-like-badge-v2 + time { margin-left: 8px; }
  .conversation-message-v2.out .conversation-meta-v2 { color: rgba(32,41,20,.58); }
  .conversation-state-v2 {
    min-width: 13px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
  }
  .conversation-state-v2.delivery svg {
    width: 17px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .conversation-state-v2.delivery.read { color: #277b44; }
  .conversation-state-v2.delivery.read svg { stroke-width: 1.9; }
  .conversation-graffiti-bubble-v2 .conversation-state-v2.delivery.read,
  .conversation-photo-bubble-v2 .conversation-state-v2.delivery.read { color: #8dcc92; }
  .conversation-state-v2.liked { color: #d47a79; }
  .conversation-state-v2.liked svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
  .conversation-like-badge-v2 {
    position: relative;
    flex: 0 0 16px;
    width: 16px;
    height: 18px;
    min-width: 16px;
    margin-right: auto;
    pointer-events: none;
    user-select: none;
  }
  .conversation-message-v2.out .conversation-like-badge-v2 {
    color: #9b4444;
  }
  .conversation-message-v2.out .conversation-graffiti-bubble-v2 .conversation-like-badge-v2,
  .conversation-message-v2.out .conversation-photo-bubble-v2 .conversation-like-badge-v2 { color: #d47a79; }
  .conversation-reaction-anchor-v2 {
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: filter .12s ease;
  }
  .conversation-reaction-anchor-v2:active {
    filter: brightness(1.025);
  }
  .conversation-reaction-anchor-v2:focus-visible {
    outline: 2px solid #829e57;
    outline-offset: 3px;
  }
  .conversation-own-like-v2 {
    pointer-events: none;
  }
  .conversation-copy-v2 { -webkit-user-select: text; user-select: text; }
  .conversation-like-pending-v2 { will-change: transform, opacity; }
  .conversation-own-like-v2.just-liked {
    transform-origin: center;
    animation: conversation-like-arrive .28s cubic-bezier(.2,.82,.25,1);
  }
  @keyframes conversation-like-arrive {
    0% { opacity: 0; transform: scale(.65); }
    55% { opacity: 1; transform: scale(1.18); }
    78% { transform: scale(.96); }
    100% { opacity: 1; transform: none; }
  }
  .conversation-own-like-v2.is-retracting {
    animation: conversation-like-retract .16s ease-in both;
  }
  @keyframes conversation-like-retract {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(.72); }
  }
  @media (prefers-reduced-motion: reduce) {
    .conversation-bubble-v2,
    .conversation-reaction-anchor-v2,
    .conversation-own-like-v2.just-liked,
    .conversation-own-like-v2.is-retracting { animation: none; transition: none; }
  }
  .conversation-recovery-v2 {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    color: #b08f65;
    font-size: 12px;
  }
  .conversation-recovery-v2 button {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    color: #b5c47e;
    background: transparent;
    cursor: pointer;
  }
  .conversation-recovery-v2 svg { width: 16px; height: 16px; }
  .conversation-recovery-v2 button:disabled { opacity: .5; }
  .conversation-message-v2 .pixelmsg { display: block; width: min(180px, 54vw); height: auto; margin: 2px 0;
    border: 0; background: transparent; image-rendering: pixelated; }
  .conversation-message-v2 .pixelmsg.conversation-graffiti-v2 { background: transparent; }
  .conversation-message-v2 .pixelmsg.conversation-photo-v2 { background: #b3c791; }
  .conversation-message-v2 .conversation-graffiti-bubble-v2,
  .conversation-message-v2.out .conversation-graffiti-bubble-v2 {
    padding: 4px 7px 3px;
    color: #e7efc2;
    background: transparent;
  }
  .conversation-message-v2 .conversation-photo-bubble-v2,
  .conversation-message-v2.out .conversation-photo-bubble-v2 {
    padding: 4px 7px 3px;
    color: #e7efc2;
    background: transparent;
  }
  .conversation-message-v2.out .conversation-graffiti-bubble-v2 .conversation-meta-v2,
  .conversation-message-v2.out .conversation-photo-bubble-v2 .conversation-meta-v2 { color: #87946f; }
  .conversation-message-v2 .conversation-melody-v2 {
    width: min(176px, 56vw);
    min-width: 156px;
    display: grid;
    grid-template-columns: 44px minmax(0,1fr);
    align-items: center;
    gap: 10px;
  }
  .conversation-message-v2 .conversation-melody-play-v2 {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(213,230,160,.22);
    border-radius: 50%;
    color: #d5e6a0;
    background: rgba(213,230,160,.07);
    cursor: pointer;
    opacity: 1;
    transition: transform 140ms ease, background-color 160ms ease, color 160ms ease;
    -webkit-tap-highlight-color: transparent;
  }
  .conversation-message-v2.out .conversation-melody-play-v2 {
    border-color: rgba(32,41,20,.18);
    color: #202914;
    background: rgba(32,41,20,.08);
  }
  .conversation-message-v2 .conversation-melody-play-v2:active { transform: scale(.96); }
  .conversation-message-v2 .conversation-melody-play-v2:focus-visible {
    outline: 2px solid #829e57;
    outline-offset: 2px;
  }
  .conversation-message-v2 .conversation-melody-play-v2.playing {
    border-color: #d5e6a0;
    color: #151d13;
    background: #d5e6a0;
  }
  .conversation-message-v2.out .conversation-melody-play-v2.playing {
    border-color: #202914;
    color: #d5e6a0;
    background: #202914;
  }
  .conversation-melody-play-icon-v2 { width: 18px; height: 18px; fill: currentColor; }
  .conversation-melody-stop-shape-v2 { display: none; }
  .conversation-melody-play-v2.playing .conversation-melody-play-shape-v2 { display: none; }
  .conversation-melody-play-v2.playing .conversation-melody-stop-shape-v2 { display: block; }
  .conversation-melody-detail-v2 { min-width: 0; width: 100%; display: flex; align-items: center; gap: 8px; color: #87946f; }
  .conversation-message-v2.out .conversation-melody-detail-v2 { color: rgba(32,41,20,.58); }
  .conversation-melody-wave-v2 { min-width: 0; width: 100%; height: 12px; overflow: visible; }
  .conversation-melody-wave-v2 path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    stroke-linecap: round;
  }
  .conversation-melody-duration-v2 {
    flex: none;
    font-size: 11px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .conversation-message-v2 .conversation-voice-bubble-v2 { padding: 8px 11px 6px; }
  .conversation-voice-v2,
  .history-voice-v2 {
    width: min(218px, 66vw);
    min-width: 184px;
    display: grid;
    grid-template-columns: 40px minmax(0,1fr);
    align-items: center;
    gap: 10px;
  }
  .conversation-voice-play-v2 {
    position: relative;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(213,230,160,.22);
    border-radius: 50%;
    padding: 0;
    color: #d5e6a0;
    background: rgba(213,230,160,.07);
    cursor: pointer;
    transition: transform 140ms cubic-bezier(.2,.72,.35,1), background-color 160ms ease,
      color 160ms ease, border-color 160ms ease;
    -webkit-tap-highlight-color: transparent;
  }
  .conversation-message-v2.out .conversation-voice-play-v2 {
    border-color: rgba(32,41,20,.18);
    color: #202914;
    background: rgba(32,41,20,.08);
  }
  .conversation-voice-play-v2:active { transform: scale(.95); }
  .conversation-voice-play-v2:focus-visible { outline: 2px solid #829e57; outline-offset: 2px; }
  .conversation-voice-play-v2.playing {
    border-color: #d5e6a0;
    color: #151d13;
    background: #d5e6a0;
  }
  .conversation-message-v2.out .conversation-voice-play-v2.playing {
    border-color: #202914;
    color: #d5e6a0;
    background: #202914;
  }
  .conversation-voice-play-icon-v2 { width: 18px; height: 18px; fill: currentColor; }
  .conversation-voice-pause-shape-v2 { display: none; }
  .conversation-voice-play-v2.playing .conversation-voice-play-shape-v2 { display: none; }
  .conversation-voice-play-v2.playing .conversation-voice-pause-shape-v2 { display: block; }
  .conversation-voice-detail-v2 {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #647153;
  }
  .conversation-message-v2.out .conversation-voice-detail-v2 { color: rgba(32,41,20,.38); }
  .conversation-voice-wave-v2 {
    min-width: 0;
    height: 18px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 2px;
  }
  .conversation-voice-wave-v2 i {
    width: 2px;
    min-width: 1px;
    height: var(--voice-bar, 5px);
    flex: 1 1 2px;
    border-radius: 2px;
    background: currentColor;
    transition: color 120ms linear, transform 120ms ease;
  }
  .conversation-voice-wave-v2 i.played { color: #d5e6a0; transform: scaleY(1.05); }
  .conversation-message-v2.out .conversation-voice-wave-v2 i.played { color: #384322; }
  .conversation-voice-duration-v2 {
    min-width: 27px;
    color: #87946f;
    font-size: 11px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .conversation-message-v2.out .conversation-voice-duration-v2 { color: rgba(32,41,20,.58); }
  .conversation-voice-v2.uploading .conversation-voice-play-icon-v2 { opacity: 0; }
  .conversation-voice-v2.uploading .conversation-voice-play-v2::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1.5px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: conversation-voice-upload-v2 .72s linear infinite;
  }
  @keyframes conversation-voice-upload-v2 { to { transform: rotate(1turn); } }
  @media (prefers-reduced-motion: reduce) {
    .conversation-add-contact-v2,
    .conversation-message-v2 .conversation-melody-play-v2,
    .conversation-voice-play-v2,
    .conversation-voice-wave-v2 i { transition: none; }
    .conversation-voice-v2.uploading .conversation-voice-play-v2::after { animation-duration: 1.5s; }
  }
  #app.main-conversation-v2-mode .empty { margin: auto; padding: 24px; color: #68745a; font-size: 13px; }

  body.dock #app.main-conversation-v2-mode > #pagerComposer {
    margin: 0 -16px;
    padding: 8px 16px var(--conversation-composer-bottom);
    border-top: 1px solid rgba(108,128,82,.22);
    background: #0c100c;
    box-shadow: 0 -10px 24px rgba(4,6,4,.42);
  }
  body.composer-keyboard-visible.dock #app.main-conversation-v2-mode > #pagerComposer {
    padding-bottom: 6px;
  }
  #app.main-conversation-v2-mode .conversation-keyboard-motion-v2 {
    animation: conversation-keyboard-shift-v2 190ms cubic-bezier(.22,.72,.25,1) both;
    will-change: transform;
  }
  @keyframes conversation-keyboard-shift-v2 {
    from { transform: translate3d(0, var(--conversation-keyboard-shift-v2, 0px), 0); }
    to { transform: translate3d(0, 0, 0); }
  }
  @media (prefers-reduced-motion: reduce) {
    #app.main-conversation-v2-mode .conversation-keyboard-motion-v2 { animation: none; }
    #app.main-conversation-v2-mode #pagerComposer .voice-record-v2,
    #app.main-conversation-v2-mode #pagerComposer .io textarea,
    #app.main-conversation-v2-mode #pagerComposer .attachwrap,
    .voice-record-cancel-v2,
    .voice-record-wave-v2 i { transition: none; }
    .voice-record-dot-v2,
    #app.main-conversation-v2-mode #pagerComposer .send button > svg { animation: none; }
  }
  #app.main-conversation-v2-mode #pagerComposer .panel {
    display: grid;
    grid-template-columns: minmax(0,1fr) 52px;
    gap: 8px;
  }
  #app.main-conversation-v2-mode #pagerComposer .toline,
  #app.main-conversation-v2-mode #pagerComposer .numwrap,
  #app.main-conversation-v2-mode #pagerComposer > .howlink,
  #app.main-conversation-v2-mode #pagerComposer #callBtn { display: none !important; }
  #app.main-conversation-v2-mode #pagerComposer .io {
    position: relative;
    min-width: 0;
    min-height: 52px;
    align-items: flex-end;
    border: 0;
    border-radius: 18px;
    padding: 3px 4px 3px 12px;
    background: #151d13;
  }
  #app.main-conversation-v2-mode #pagerComposer .io textarea {
    min-width: 0;
    height: 46px;
    min-height: 46px;
    max-height: 132px;
    padding: 12px 4px;
    border: 0;
    color: #e4ebc3;
    font-size: 16px;
    line-height: 1.35;
  }
  #app.main-conversation-v2-mode #pagerComposer .io textarea::placeholder { color: #758261; }
  #app.main-conversation-v2-mode #pagerComposer .io textarea,
  #app.main-conversation-v2-mode #pagerComposer .attachwrap {
    transition: opacity 140ms ease, transform 180ms cubic-bezier(.22,.72,.25,1);
  }
  .voice-record-v2 { display: none; }
  #app.main-conversation-v2-mode #pagerComposer .voice-record-v2 {
    position: absolute;
    z-index: 3;
    inset: 3px 4px 3px 5px;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    opacity: 0;
    transform: translateX(7px);
    pointer-events: none;
    transition: opacity 150ms ease, transform 190ms cubic-bezier(.22,.72,.25,1);
  }
  #app.main-conversation-v2-mode #pagerComposer.voice-recording-v2 .voice-record-v2 {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  #app.main-conversation-v2-mode #pagerComposer.voice-recording-v2 .io textarea,
  #app.main-conversation-v2-mode #pagerComposer.voice-recording-v2 .attachwrap {
    opacity: 0;
    transform: translateX(-5px);
    pointer-events: none;
  }
  .voice-record-cancel-v2 {
    width: 42px;
    height: 42px;
    flex: none;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 14px;
    padding: 0;
    color: #879674;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 140ms ease, background-color 140ms ease, transform 120ms ease;
  }
  .voice-record-cancel-v2 svg { width: 19px; height: 19px; }
  .voice-record-cancel-v2:active {
    color: #dce7b8;
    background: rgba(213,230,160,.07);
    transform: scale(.94);
  }
  .voice-record-dot-v2 {
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
    background: #d45e55;
    box-shadow: 0 0 0 0 rgba(212,94,85,.3);
    animation: voice-record-dot-v2 1.45s ease-out infinite;
  }
  @keyframes voice-record-dot-v2 {
    0%, 35% { opacity: 1; box-shadow: 0 0 0 0 rgba(212,94,85,.28); }
    72%, 100% { opacity: .72; box-shadow: 0 0 0 5px rgba(212,94,85,0); }
  }
  .voice-record-time-v2 {
    min-width: 34px;
    flex: none;
    color: #d7dfb7;
    font-size: 13px;
    font-weight: 430;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .voice-record-wave-v2 {
    min-width: 0;
    height: 24px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    overflow: hidden;
    color: #91a371;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0,0,0,.72) 12px, #000 30px);
    mask-image: linear-gradient(90deg, transparent 0, rgba(0,0,0,.72) 12px, #000 30px);
  }
  .voice-record-wave-v2 i {
    width: 2px;
    min-width: 2px;
    flex: 0 0 2px;
    height: var(--voice-live-bar, 4px);
    border-radius: 2px;
    background: currentColor;
    transform-origin: center;
    transition: height 70ms linear, opacity 90ms ease;
  }
  #app.main-conversation-v2-mode #pagerComposer .attachwrap { width: 44px; height: 46px; }
  #app.main-conversation-v2-mode #pagerComposer #attachBtn { width: 44px; height: 46px; color: #9eae78; }
  #app.main-conversation-v2-mode #pagerComposer #attachBtn svg { width: 21px; height: 21px; }
  #app.main-conversation-v2-mode #pagerComposer .send { display: block; }
  #app.main-conversation-v2-mode #pagerComposer .send button {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    padding: 0;
    color: #273018;
    background: #d7e5a3;
    box-shadow: none;
  }
  #app.main-conversation-v2-mode #pagerComposer .send button svg { width: 23px; height: 23px; }
  #app.main-conversation-v2-mode #pagerComposer .send button[data-mode="mic"] {
    color: #a8b982;
    background: #151d13;
  }
  #app.main-conversation-v2-mode #pagerComposer .send button[data-mode="mic"] svg { width: 21px; height: 21px; }
  #app.main-conversation-v2-mode #pagerComposer .send button[data-mode="mic-pending"] {
    color: #c8d79a;
    background: #1a2316;
  }
  #app.main-conversation-v2-mode #pagerComposer .send button[data-mode="mic-pending"] svg {
    animation: conversation-mic-await-v2 1s ease-in-out infinite;
  }
  #app.main-conversation-v2-mode #pagerComposer .send button > svg {
    scale: 1;
    transition: scale 180ms cubic-bezier(.22,1.5,.36,1);
    animation: conversation-send-icon-enter-v2 170ms cubic-bezier(.2,.78,.28,1) both;
  }
  #app.main-conversation-v2-mode #pagerComposer .send button:is(:active, .is-pressed-v5):not(:disabled) > svg {
    scale: .86;
    transition: scale 80ms ease-out;
  }
  @media (prefers-reduced-motion: reduce) {
    #app.main-conversation-v2-mode #pagerComposer .send button > svg,
    #app.main-conversation-v2-mode #pagerComposer .send button:is(:active, .is-pressed-v5):not(:disabled) > svg {
      scale: 1; transition: none;
    }
  }
  @keyframes conversation-send-icon-enter-v2 {
    from { opacity: .25; transform: scale(.78); }
    to { opacity: 1; transform: none; }
  }
  @keyframes conversation-mic-await-v2 {
    50% { opacity: .55; transform: scale(.94); }
  }
  #app.main-conversation-v2-mode #pagerComposer .send button.sending,
  #app.main-conversation-v2-mode #pagerComposer .send button.sent,
  #app.main-conversation-v2-mode #pagerComposer .send button.failed { color: #273018; background: #d7e5a3; }
  .conversation-send-busy-v2 { font-size: 17px; letter-spacing: .08em; transform: translateY(-2px); }
  #app.main-conversation-v2-mode #pagerComposer .sline { display: none; }
  #app.main-conversation-v2-mode #pagerComposer .attach-menu {
    right: -56px;
    bottom: calc(100% + 10px);
    width: min(224px, calc(100vw - 32px));
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 4px;
    padding: 6px;
    border: 0;
    border-radius: 16px;
    background: #151d13;
  }
  #app.main-conversation-v2-mode #pagerComposer .attach-menu.hidden { display: none; }
  #app.main-conversation-v2-mode #pagerComposer .attach-menu button {
    min-width: 0;
    min-height: 58px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 6px 2px;
    border: 0;
    border-radius: 11px;
    font: 600 10px/1 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
    letter-spacing: .02em;
  }
  #app.main-conversation-v2-mode #pagerComposer .attach-menu button + button { border: 0; }
  #app.main-conversation-v2-mode #pagerComposer .attach-menu svg { width: 19px; height: 19px; }

  @media (max-width: 350px) {
    .main-new-dialog-sheet-v2 { padding-right: 14px; padding-left: 14px; }
    .main-recipient-actions-v2 button { gap: 6px; padding: 0 8px; font-size: 14px; }
    .conversation-message-v2 { max-width: 90%; }
    .conversation-peer-v2 strong { font-size: 16px; }
  }


  /* ===== оверлеи ===== */
  .backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(5,7,5,.72);
    display: flex; align-items: center; justify-content: center; padding: 20px; }
  .sheet { position: relative; width: 100%; max-width: 360px; background: #12160f;
    border: 1px solid #2c3524; border-radius: 18px; padding: 18px; box-shadow: 0 12px 44px rgba(0,0,0,.6);
    display: flex; flex-direction: column; max-height: 84dvh; overflow-y: auto; }
  /* z-index: крестик оверлея должен оставаться поверх его содержимого */
  .sheet .x { position: absolute; top: 10px; right: 12px; background: none; border: none;
    color: #55614d; font-size: 18px; cursor: pointer; padding: 4px; z-index: 2; }
  .sheet h2 { font-size: 11px; letter-spacing: 3px; color: #8a967f; margin-bottom: 12px; text-align: center; }
  .okbtn { margin-top: 14px; width: 100%; font-size: 14px; cursor: pointer;
    background: #2a3328; color: #cfe0c8; border: 1px solid #46543f; border-radius: 10px; padding: 11px; }
  /* Справка живёт внутри своего корпуса: ЖК-экран скроллится, шапка и основное
     действие остаются на месте даже на 320×568. Первый запуск и читалка используют
     один контейнер, но разные страницы. */
  /* По горизонтали справка совпадает с .device: .col шириной до 420px имеет
     по 16px полей, поэтому сам корпус достигает 388px. Верхняя кромка также
     начинается на той же линии, что и основной Pager. */
  #rulesOv { align-items: flex-start;
    padding: calc(16px + env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
  .sheet.rules { width: 100%; max-width: 388px;
    height: min(760px, calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
    max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 13px; overflow: hidden; border: 2px solid #3a4630; border-radius: 24px;
    background: linear-gradient(180deg, #262e20, #171d13);
    box-shadow: 0 14px 36px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.07); }
  .ruleschrome { flex: none; padding: 0 3px 10px; display: flex; align-items: center;
    justify-content: space-between; color: #cbd5c6; font-size: 11px; font-weight: 600;
    letter-spacing: .26em; }
  .rulesbrand-tab { display: inline-block; cursor: default; }
  .ruleschrome .x { position: relative; top: auto; right: auto; width: 21px; height: 21px; padding: 0; display: inline-flex;
    align-items: center; justify-content: center; color: #778370; font-size: 10px; line-height: 1;
    border: 1px solid #333d29; border-radius: 50%; }
  .ruleschrome .x::before { content: ''; position: absolute; inset: -11px; }
  .ruleslcd { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    scrollbar-width: thin; scrollbar-color: rgba(46,64,37,.52) transparent; border: 0;
    border-radius: 13px; color: #1d2415; background:
      repeating-linear-gradient(0deg, rgba(20,28,12,.05) 0 1px, transparent 1px 3px),
      linear-gradient(165deg, #b3c791, #9cb27a 58%, #92a771);
    box-shadow: inset 0 4px 12px rgba(20,28,12,.45), inset 0 -1px 3px rgba(255,255,255,.3); }
  .ruleslcd::-webkit-scrollbar { width: 5px; }
  .ruleslcd::-webkit-scrollbar-thumb { border-radius: 9px; background: rgba(46,64,37,.42); }
  .rulespage { position: relative; z-index: 1; display: none; min-height: 100%; padding: 25px 22px 28px;
    animation: rules-enter .18s ease-out; }
  .rulespage.active { display: block; }
  /* Пять стартовых шагов короче полной справки: на длинном экране корпус идёт
     ровно по содержимому, на коротком ЖК-область ужимается и скроллится. */
  #rulesOv.onboarding-mode .sheet.rules { height: auto; }
  #rulesOv.onboarding-mode .ruleslcd { flex: 0 1 auto; }
  #rulesOv.onboarding-mode .rulespage { min-height: 0; }
  @keyframes rules-enter { from { opacity: 0; transform: translateX(5px); } to { opacity: 1; transform: none; } }
  @media (prefers-reduced-motion: reduce) { .rulespage { animation: none; } }
  .rules-onboarding { padding-top: 12px; }
  .rulessteps { margin: 0; padding: 0; list-style: none; }
  .rulessteps li { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 9px;
    align-items: start; padding: 13px 0; border-bottom: 1px solid rgba(45,61,37,.28); }
  .rulesnum { align-self: start; padding-top: 1px; color: #506047; font-size: 10px;
    line-height: 1.3; letter-spacing: .08em; }
  .rulessteps strong { display: block; font-size: 11px; font-weight: 500; line-height: 1.3; letter-spacing: .14em; }
  .rulessteps p { margin: 5px 0 0; font-size: 13px; line-height: 1.45; }
  .rulesmore { margin: 18px 5px 0; color: #506047; font-size: 10.5px; line-height: 1.45; text-align: center; }
  .rulesheading { text-align: center; }
  .ruleskicker { margin: 0 0 8px; color: #506047; font-size: 10px; letter-spacing: .22em; }
  .rulesheading h2 { margin: 0; color: #1e2a19; font-size: 17px; font-weight: 500; letter-spacing: .12em; }
  .ruleslead { max-width: 330px; margin: 16px auto 0; font-size: 13px; line-height: 1.55; }
  .rulesmenu { margin-top: 24px; border-top: 1px solid rgba(38,53,31,.48); }
  .rulesmenu > button { width: 100%; min-height: 67px; padding: 11px 4px; display: flex;
    align-items: center; justify-content: space-between; border: 0; border-bottom: 1px solid rgba(38,53,31,.48);
    color: #1e2a19; text-align: left; background: transparent; cursor: pointer; }
  .rulesmenu > button > span { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 8px; align-items: start; }
  .rulesmenu b { color: #506047; font-size: 10px; font-weight: 400; }
  .rulesmenu strong { display: block; font-size: 12px; font-weight: 500; letter-spacing: .08em; }
  .rulesmenu small { display: block; margin-top: 5px; color: #506047; font-size: 10.5px; line-height: 1.35; }
  .rulesmenu i { font-style: normal; font-size: 20px; color: #506047; }
  .rulessubhead { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 12px; align-items: center;
    padding-bottom: 18px; border-bottom: 1px solid rgba(38,53,31,.48); }
  .rulessubhead button { width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center;
    justify-content: center; border: 1px solid rgba(38,53,31,.48); border-radius: 50%; color: #1e2a19;
    background: transparent; font: inherit; font-size: 16px; cursor: pointer; }
  .rulessubhead p { margin: 0 0 4px; color: #506047; font-size: 10px; letter-spacing: .22em; }
  .rulessubhead h2 { margin: 0; color: #1e2a19; font-size: 14px; font-weight: 500;
    letter-spacing: .08em; text-align: left; overflow-wrap: anywhere; }
  .rulescopy { padding-top: 4px; }
  .rulescopy > p { margin: 15px 0; font-size: 13px; line-height: 1.62; overflow-wrap: anywhere; }
  .rulescopy h3 { margin: 27px 0 10px; padding-bottom: 7px; border-bottom: 1px solid rgba(45,61,37,.28);
    font-size: 10.5px; font-weight: 500; letter-spacing: .14em; overflow-wrap: anywhere; }
  .rulescopy strong { font-weight: 600; }
  .rulesdefinitions { margin: 8px 0 18px; }
  .rulesdefinitions div { display: grid; grid-template-columns: 112px minmax(0,1fr); gap: 7px; padding: 9px 0;
    border-bottom: 1px dotted rgba(38,53,31,.48); font-size: 12px; line-height: 1.45; }
  .rulesdefinitions dt { font-weight: 600; }
  .rulesdefinitions dd { margin: 0; }
  .rulesflow { margin: 6px 0 22px; padding: 0; list-style: none; }
  .rulesflow li { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 11px; padding: 13px 0;
    border-bottom: 1px solid rgba(45,61,37,.28); }
  .rulesflow li > span { width: 27px; height: 27px; display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(38,53,31,.48); border-radius: 50%; font-size: 10px; }
  .rulesflow p { margin: 1px 0 0; font-size: 12.5px; line-height: 1.55; }
  .rulesnote { margin: 22px 0; padding: 14px; border: 1px solid rgba(38,53,31,.48);
    background: rgba(43,60,35,.07); }
  .rulesnote strong { font-size: 10px; letter-spacing: .14em; }
  .rulesnote p { margin: 7px 0 0; font-size: 12px; line-height: 1.55; }
  .rulescommand { padding: 14px 0; border-bottom: 1px solid rgba(45,61,37,.28); }
  .rulescommand code { display: inline-block; padding: 4px 6px; color: #c3d99a; background: #1e2a19;
    font: inherit; font-size: 11px; font-weight: 500; }
  .rulescommand p { margin: 9px 0 0; font-size: 12.5px; line-height: 1.52; }
  .rulesthemes { padding: 12px 0 1px; font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 10.5px !important; line-height: 1.7 !important; letter-spacing: .04em; }
  .transfer-primary { width: 100%; min-height: 45px; margin: 8px 0 2px; padding: 10px 12px;
    border: 1px solid #1e2a19; border-radius: 9px; color: #c3d99a; background: #1e2a19;
    font: inherit; font-size: 11px; font-weight: 600; letter-spacing: .12em; cursor: pointer; }
  .transfer-primary:disabled, .transfer-actions button:disabled { opacity: .58; cursor: default; }
  .transfer-ticket { margin: 18px 0 2px; padding: 14px; border: 1px solid rgba(38,53,31,.48);
    background: rgba(43,60,35,.07); }
  .transfer-ticket label { display: block; margin: 0 0 8px; color: #506047;
    font-size: 9.5px; letter-spacing: .12em; }
  .transfer-ticket input { width: 100%; height: 38px; box-sizing: border-box; padding: 8px 9px;
    border: 1px solid rgba(38,53,31,.48); border-radius: 7px; color: #1e2a19;
    background: rgba(219,232,185,.34); font: 10.5px/1.2 ui-monospace, Menlo, Consolas, monospace; }
  .transfer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
  .transfer-actions button { min-height: 39px; padding: 8px 6px; border: 1px solid rgba(38,53,31,.48);
    border-radius: 7px; color: #1e2a19; background: transparent; font: inherit;
    font-size: 9.5px; font-weight: 600; letter-spacing: .08em; cursor: pointer; }
  .transfer-ticket > p { margin: 11px 0 0; color: #506047; font-size: 11px; line-height: 1.5; }
  .transfer-claim { padding-top: 16px; text-align: center; }
  .transfer-eyebrow { margin-bottom: 4px !important; color: #506047; font-size: 9.5px !important;
    letter-spacing: .2em; }
  .transfer-number { margin: 5px 0 24px; color: #1d2415; font-size: 52px; line-height: 1;
    letter-spacing: .18em; text-indent: .18em; }
  .transfer-claim .rulesnote { text-align: left; }
  .transfer-status { margin-top: 22px !important; color: #506047; font-size: 11px !important;
    letter-spacing: .03em; }
  #rulesOv.transfer-mode .ruleschrome .x { visibility: hidden; }
  #rulesOv.transfer-mode .rulessubhead { grid-template-columns: minmax(0,1fr); }
  #rulesOv.transfer-mode .rulessubhead p,
  #rulesOv.transfer-mode .rulessubhead h2 { text-align: center; }
  #transferHeading:focus { outline: none; }
  .rulessteps p, .rulesmore, .ruleslead, .rulesmenu small, .rulescopy, .rulesflow p,
    .rulesnote p, .rulescommand p { font-family: -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif; }
  .rules .okbtn { flex: none; width: 100%; min-height: 52px; margin: 13px 0 0; font-weight: 700;
    letter-spacing: 1.1px; background: linear-gradient(180deg, #a8bd86, #90a76e); color: #131a0e;
    border: 0; border-radius: 14px; padding: 12px 10px; box-shadow: 0 6px 18px rgba(159,180,127,.18),
    inset 0 1px 0 rgba(255,255,255,.35); }
  @media (max-width: 380px) {
    .rulespage { padding: 21px 16px 24px; }
    .rules-onboarding { padding-top: 8px; }
    .rulessteps li { grid-template-columns: 29px minmax(0,1fr); padding: 10px 0; }
    .rulessteps p { font-size: 12.5px; }
    .rulesmenu > button > span { grid-template-columns: 29px minmax(0,1fr); }
    .rulesdefinitions div { grid-template-columns: 1fr; gap: 3px; }
    .transfer-actions { grid-template-columns: 1fr; }
    .rules .okbtn { min-height: 48px; margin-top: 9px; font-size: 12px; letter-spacing: .06em; }
  }
  /* главный выход из тупика — скачать готовое приложение: делаем его заметным */
  a.okbtn { display: block; text-align: center; text-decoration: none; box-sizing: border-box;
    font-weight: 700; letter-spacing: 1.5px; background: linear-gradient(180deg, #a8bd86, #90a76e);
    color: #131a0e; border: 0; padding: 13px; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
  /* спрашиваем по-своему: системное окно рядом с этим дизайном выглядело чужим и пугало */
  .sheet.ask { max-width: 320px; padding: 20px 18px 16px; text-align: center; }
  .askhead { font-size: 9px; letter-spacing: 3px; font-weight: 700; color: #7f9463; }
  .asktext { font-size: 18px; font-weight: 700; color: #e2ead9; margin: 9px 0 16px; line-height: 1.35;
    overflow-wrap: anywhere; } /* длинное имя из книжки резалось краем окна */
  .asktext span { color: #9fb47f; font-family: ui-monospace, Menlo, monospace; }
  .askrow { display: flex; gap: 8px; }
  .askrow button { flex: 1; font: inherit; font-size: 13px; font-weight: 700; letter-spacing: 1px;
    padding: 13px; border-radius: 12px; cursor: pointer; }
  .askno { background: #171d13; color: #8a967f; border: 1px solid #333d29; }
  .askyes { background: linear-gradient(180deg, #a8bd86, #90a76e); color: #131a0e; border: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
  .askyes.danger { background: linear-gradient(180deg, #c98a6a, #b2704f); color: #1a0f09; }
  .dlg { display: flex; flex-direction: column; gap: 8px; }
  .dlg label { font-size: 9px; letter-spacing: 2px; color: #6d7a64; font-weight: 700; text-align: center; }
  .dlg input { font-size: 14px; padding: 9px; border-radius: 10px; background: #0e120c;
    color: #d7e0d4; border: 1px solid #2c3524; text-align: center; }
  .dlg input.num { letter-spacing: 4px; font-family: ui-monospace, Menlo, monospace; font-size: 16px; }
  .dlg .drow { display: flex; gap: 8px; margin-top: 6px; }
  .dlg .drow button { flex: 1; font: inherit; font-size: 13px; padding: 10px; border-radius: 10px; cursor: pointer; }
  .dlg .save { background: #2a3328; color: #cfe0c8; border: 1px solid #46543f; }
  .dlg .cancel { background: transparent; color: #6d7a64; border: 1px solid #2a3224; }

  #contactOv { padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
  #contactOv .sheet { max-width: 380px; max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 24px; border: 1px solid #293323; border-radius: 24px; background: #11170f; color: #e3edba;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif; }
  #contactOv .sheet h2 { padding-right: 32px; margin: 0 0 22px; color: #e3edba; text-align: left;
    font-size: 20px; line-height: 1.25; font-weight: 680; letter-spacing: -.3px; }
  #contactOv .sheet .x { top: 13px; right: 13px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; color: #aab58d; }
  #contactOv .x svg { width: 22px; height: 22px; }
  #contactOv .contact-peer-v2 { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
  #contactOv .contact-peer-v2 > div { min-width: 0; }
  #contactOv #dlgAvatarV2 { flex: none; width: 50px; height: 50px; border-radius: 14px; background: transparent; box-shadow: none; }
  #contactOv #dlgPeerNameV2 { display: block; font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
  #contactOv #dlgPeerNameV2.public-name-v2 { color: var(--pt-gold); }
  #contactOv #dlgPeerNumberV2 { display: block; margin-top: 4px; color: #8e9b73; font: 13px/1.25 ui-monospace, Menlo, monospace; }
  #contactOv #dlgPeerNumberV2:empty { display: none; }
  #contactOv .dlg { gap: 8px; }
  #contactOv .dlg label { color: #9ca984; font-size: 13px; font-weight: 500; letter-spacing: 0; text-align: left; }
  #contactOv .dlg label:not(:first-child) { margin-top: 8px; }
  #contactOv .dlg input { width: 100%; min-width: 0; min-height: 48px; padding: 12px 14px; border: 1px solid #303c28;
    border-radius: 13px; background: #192115; color: #e3edba; font-size: 16px; line-height: 1.3; text-align: left; }
  #contactOv .dlg input.num { font-size: 16px; letter-spacing: 2px; }
  #contactOv #dlgHintV2 { color: #82916d; font-size: 12px; line-height: 1.4; margin: 0; }
  #contactOv #dlgErrorV2, #mainRecipientExactV2 .contact-save-error-v2 { color: #e6bd99; font-size: 13px; line-height: 1.45; margin: 4px 0 0; overflow-wrap: anywhere; }
  #mainRecipientExactV2 .contact-save-error-v2 { grid-column: 1 / -1; }
  #contactOv .dlg .drow { gap: 10px; margin-top: 16px; }
  #contactOv .dlg .drow button { min-width: 0; min-height: 48px; border: 0; border-radius: 14px; font: inherit; font-size: 15px; line-height: 1.2; font-weight: 650;
    transition: transform .15s ease; }
  #contactOv .dlg .save { color: #202914; background: #d4e79c; }
  #contactOv .dlg .cancel { color: #c5cea8; background: #20291b; }
  #contactOv button:disabled { opacity: .55; cursor: wait; }
  #contactOv input:disabled { opacity: .7; }
  #contactOv button:focus-visible, #contactOv input:focus-visible { outline: 2px solid #d4e79c; outline-offset: 3px; }
  #contactOv .drow button:not(:disabled):active { transform: scale(.97); }
  @media (max-width: 350px) { #contactOv .sheet { padding: 22px 18px; } }
  @media (prefers-reduced-motion: reduce) {
    #contactOv .drow button { transition: none; }
    #contactOv .drow button:not(:disabled):active { transform: none; }
  }

  .backdrop.avatar-photo-ov-v2 { padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
  .avatar-photo-sheet-v2 {
    width: 100%; max-width: 420px; max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-y: auto; padding: 12px 20px 20px; border: 1px solid var(--pt-line); border-radius: var(--pager-ui-panel-radius);
    background: var(--pt-surface); color: var(--pt-text); box-shadow: 0 20px 60px rgba(0,0,0,.4);
    font-family: var(--pager-ui-font);
  }
  .avatar-photo-head-v2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; margin-bottom: 16px; }
  .avatar-photo-head-v2 h2 { margin: 0; font-size: var(--pager-ui-title-size); line-height: 1.3; font-weight: var(--pager-ui-title-weight); text-align: left; }
  .avatar-photo-head-v2 button { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 12px; color: var(--pt-muted); background: transparent; cursor: pointer; }
  .avatar-photo-head-v2 svg { width: 21px; height: 21px; }
  #avatarPhotoCanvasV2 { display: block; width: 100%; aspect-ratio: 1; border-radius: 18px; background: #0c0f0d; touch-action: none; cursor: grab; image-rendering: auto; }
  #avatarPhotoCanvasV2:active { cursor: grabbing; }
  #avatarPhotoCanvasV2:focus-visible { outline: 2px solid #c8dd96; outline-offset: 3px; }
  .avatar-photo-zoom-v2 { display: flex; align-items: center; gap: 16px; min-height: 56px; padding-top: 8px; color: var(--pt-muted); font-size: var(--pager-ui-note-size); }
  .avatar-photo-zoom-v2 input { min-width: 0; flex: 1; height: 44px; accent-color: #c8dd96; cursor: pointer; }
  #avatarPhotoStatusV2 { margin: 8px 0 24px; color: var(--pt-muted); font-size: var(--pager-ui-note-size); line-height: 1.45; }
  .avatar-photo-actions-v2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .avatar-photo-actions-v2 button { min-height: var(--pager-ui-control-height); padding: 12px 8px; border: 0; border-radius: var(--pager-ui-control-radius); font: var(--pager-ui-title-weight) var(--pager-ui-label-size)/1.3 var(--pager-ui-font); cursor: pointer; }
  #avatarPhotoChooseV2 { color: var(--pt-text); background: var(--pt-surface-alt); }
  #avatarPhotoSaveV2 { color: var(--pt-on-accent); background: var(--pt-accent); }
  .avatar-photo-sheet-v2 button:disabled { opacity: .45; cursor: default; }
  @media (max-width: 350px) { .avatar-photo-sheet-v2 { padding-right: 16px; padding-left: 16px; } }

  /* редактор рисунка появляется только по кнопке-карандашу; основной экран не меняем */
  .sheet.drawsheet { max-width: 380px; overflow: hidden; }
  .drawcanvas { display: block; width: min(100%, 320px); aspect-ratio: 1; margin: 0 auto 12px;
    image-rendering: pixelated; background: #0c0f0d; border: 1px solid #46543f;
    border-radius: 8px; touch-action: none; cursor: crosshair;
    transition: opacity 140ms ease; }
  .drawsheet.photo-preview .drawcanvas { border: 0; border-radius: 0; touch-action: auto; cursor: default; }
  .drawsheet.photo-preview .palette { display: none; }
  .drawsheet.photo-preview .drawclear { flex: 1.25; color: #c7d8a7; border-color: #46543f;
    background: #151b12; letter-spacing: .06em; }
  .drawsheet.photo-preview .drawclear:active:not(:disabled) { background: #20291a; transform: scale(.985); }
  .drawsheet.photo-busy .drawcanvas { opacity: .38; }
  .palette { display: grid; grid-template-columns: repeat(8, 1fr); gap: 7px; margin-bottom: 13px; }
  .palette button { aspect-ratio: 1; min-width: 0; border-radius: 7px; border: 2px solid #2c3524;
    cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
  .palette button.on { outline: 2px solid #cfe0c8; outline-offset: 1px; }
  .drawrow { display: flex; gap: 8px; }
  .drawrow button { flex: 1; font: inherit; font-size: 12px; font-weight: 700; padding: 11px 7px;
    border-radius: 10px; cursor: pointer; }
  .drawclear, .drawcancel { background: transparent; color: #8a967f; border: 1px solid #2a3224; }
  .drawclear:disabled, .drawcancel:disabled { opacity: .38; cursor: default; }
  .drawsend { background: #2a3328; color: #cfe0c8; border: 1px solid #46543f; }
  .drawsend:disabled { opacity: .4; }
  .drawprivacy { margin: 10px 3px 0; color: #65736a; font-size: 10px; line-height: 1.45;
    text-align: center; font-family: -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif; }
  #drawOv.settings-drawing-v3 { padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
  #drawOv.settings-drawing-v3 .drawsheet { max-width: 420px;
    max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto;
    padding: 24px 20px 20px; border: 1px solid var(--pt-line); border-radius: var(--pager-ui-panel-radius); background: var(--pt-surface); color: var(--pt-text);
    font-family: var(--pager-ui-font); }
  #drawOv.settings-drawing-v3 .drawsheet h2 { margin: 0 44px 24px 0; color: var(--pt-text); font-size: var(--pager-ui-title-size);
    line-height: 1.3; font-weight: var(--pager-ui-title-weight); letter-spacing: 0; text-align: left; }
  #drawOv.settings-drawing-v3 .x { top: 11px; right: 9px; width: 44px; height: 44px; padding: 0;
    display: grid; place-items: center; color: var(--pt-muted); font: 400 18px/1 sans-serif; border-radius: 12px; }
  #drawOv.settings-drawing-v3 .drawcanvas { width: min(100%, 280px); flex: none; margin-bottom: 18px; border-color: #35432b; border-radius: 14px; }
  #drawOv.settings-drawing-v3 .palette { width: min(100%, 320px); align-self: center;
    grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); gap: 6px; margin-bottom: 18px; }
  #drawOv.settings-drawing-v3 .palette button { min-height: 44px; aspect-ratio: auto; border-radius: 11px; }
  #drawOv.settings-drawing-v3 .palette button.on { outline: 2px solid #d4e79c; outline-offset: 1px; }
  #drawOv.settings-drawing-v3 .drawrow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #drawOv.settings-drawing-v3 .drawrow button { min-width: 0; min-height: var(--pager-ui-control-height); padding: 12px 10px; border: 0; border-radius: var(--pager-ui-control-radius);
    font: var(--pager-ui-title-weight) var(--pager-ui-label-size)/1.3 var(--pager-ui-font); letter-spacing: 0; transition: transform .15s ease; }
  #drawOv.settings-drawing-v3 .drawclear, #drawOv.settings-drawing-v3 .drawcancel { color: var(--pt-text); background: var(--pt-surface-alt); }
  #drawOv.settings-drawing-v3 .drawsend { grid-column: 1 / -1; color: var(--pt-on-accent); background: var(--pt-accent); }
  #drawOv.settings-drawing-v3 .drawprivacy { margin: 16px 0 0; color: var(--pt-muted); font-size: var(--pager-ui-note-size); line-height: 1.45; text-align: left; }
  #drawOv.settings-drawing-v3 button:focus-visible { outline: 2px solid #d4e79c; outline-offset: 3px; }
  #drawOv.settings-drawing-v3 .drawrow button:active:not(:disabled) { transform: scale(.98); }
  @media (max-width: 350px) {
    #drawOv.settings-drawing-v3 .drawsheet { padding-right: 16px; padding-left: 16px; }
    #drawOv.settings-drawing-v3 .palette { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  }
  @media (prefers-reduced-motion: reduce) {
    #drawOv.settings-drawing-v3 .drawrow button { transition: none; }
    #drawOv.settings-drawing-v3 .drawrow button:active:not(:disabled) { transform: none; }
  }
  /* мини-композитор: по духу Nokia Composer, но без скрытого автозапуска */
  .sheet.melodysheet { max-width: 390px; overflow: hidden; padding: 17px 16px 15px; }
  .melody-preset-label { display: block; margin: 0 0 6px; color: #66735f; text-align: center;
    font-size: 8px; font-weight: 500; letter-spacing: .16em; }
  .melody-preset { width: 100%; height: 37px; border: 1px solid #303a29; border-radius: 9px;
    padding: 0 10px; background: #0e120c; color: #b8c5b0; outline: none;
    font: 500 10px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .09em; }
  .melody-sequence { height: 58px; margin: 10px 0; display: flex; align-items: center; gap: 5px;
    overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin;
    scrollbar-color: #34402d transparent; border: 1px solid #293225; border-radius: 10px;
    padding: 8px; background: #0c100b; color: #94a28b; }
  .melody-sequence.empty { justify-content: center; color: #4f5b48; font-size: 8px; letter-spacing: .14em; }
  .melody-chip { flex: none; min-width: 40px; height: 36px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 2px; border: 1px solid #33402c;
    border-radius: 7px; background: #171d13; color: #c3d0ba; }
  .melody-chip.pause { color: #74816b; border-style: dashed; }
  .melody-chip b { font-size: 9px; font-weight: 500; line-height: 1; }
  .melody-chip small { font-size: 7px; line-height: 1; color: #697761; }
  .melody-tools { display: flex; gap: 3px; margin-bottom: 11px; }
  .melody-lengths { flex: 1; min-width: 0; display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; }
  .melody-tools button { min-width: 0; height: 34px; border: 1px solid #303a29; border-radius: 8px;
    background: #11160f; color: #7d8a75; cursor: pointer;
    font: 500 8.5px/1 ui-monospace, Menlo, Consolas, monospace; }
  .melody-tools button.on { border-color: #6e825b; background: #25301f; color: #c8d5bf;
    box-shadow: inset 0 0 8px rgba(159,180,127,.12); }
  .melody-tools .melody-pause { flex: none; width: 54px; font-size: 7.5px; letter-spacing: .07em; }
  .melody-tools .melody-delete { flex: none; width: 36px; font-size: 18px; }
  .melody-keyboard { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 7px;
    align-items: stretch; }
  .octave-arrow { border: 1px solid #303a29; border-radius: 9px; background: #11160f;
    color: #84917c; cursor: pointer; font: 400 27px/1 ui-monospace, Menlo, monospace; }
  .octave-arrow:disabled { opacity: .28; cursor: default; }
  .piano { position: relative; display: flex; height: 112px; min-width: 0; }
  .piano-key { position: relative; flex: 1; min-width: 0; border: 1px solid #303a29; border-left: 0;
    border-radius: 0 0 6px 6px; background: linear-gradient(180deg, #d7dfd1, #9ca995);
    color: #263021; cursor: pointer; font: 500 7.5px/1 ui-monospace, Menlo, Consolas, monospace; }
  .piano-key:first-child { border-left: 1px solid #303a29; border-radius: 6px 0 0 6px; }
  .piano-key:nth-child(7) { border-radius: 0 6px 6px 0; }
  .piano-key span { position: absolute; left: 50%; bottom: 9px; transform: translateX(-50%); }
  .piano-key.black { position: absolute; z-index: 2; top: 0; width: 10%; height: 62%;
    border: 1px solid #090c08; border-radius: 0 0 5px 5px; background: linear-gradient(180deg, #242b20, #0c100b);
    color: #aab6a2; box-shadow: 0 3px 4px rgba(0,0,0,.45); }
  .piano-key.black[data-note="c#"] { left: 9.3%; }
  .piano-key.black[data-note="d#"] { left: 23.6%; }
  .piano-key.black[data-note="f#"] { left: 52.1%; }
  .piano-key.black[data-note="g#"] { left: 66.4%; }
  .piano-key.black[data-note="a#"] { left: 80.7%; }
  .piano-key.black span { bottom: 7px; font-size: 6.5px; }
  .piano-key:active { filter: brightness(.78); }
  .melody-row { display: grid; grid-template-columns: .8fr 1.15fr 1.1fr; gap: 6px; margin-top: 12px; }
  .melody-row button { min-width: 0; height: 40px; border-radius: 10px; cursor: pointer;
    font: 600 9px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .05em; }
  .melody-cancel { background: transparent; color: #7a8772; border: 1px solid #2a3224; }
  .melody-preview { background: #192017; color: #a9b79f; border: 1px solid #35412f; }
  .melody-preview.playing { color: #cfe0c8; border-color: #70835e; }
  .melody-send { background: #2a3328; color: #cfe0c8; border: 1px solid #46543f; }
  .melody-row button:disabled { opacity: .38; cursor: default; }
  @media (max-height: 650px) {
    .sheet.melodysheet { max-height: 94dvh; padding-top: 14px; padding-bottom: 12px; }
    .sheet.melodysheet h2 { margin-bottom: 8px; }
    .melody-sequence { height: 48px; margin: 7px 0; }
    .melody-chip { height: 30px; }
    .piano { height: 92px; }
    .melody-tools { margin-bottom: 8px; }
    .melody-row { margin-top: 9px; }
  }
  .regtext { font-size: 13px; line-height: 1.55; color: #a9b59e; text-align: center;
    font-family: -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif; }
  .sheet.feedinfo { max-width: 380px; }
  .feedinfo .feedkicker { color: #738068; font-size: 8px; letter-spacing: .18em; text-align: center;
    text-transform: uppercase; margin-bottom: 9px; }
  .feedinfo p { color: #aab6a2; font-family: -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
    font-size: 14px; font-weight: 400; line-height: 1.5; }
  .feedinfo p strong { color: #d0dacb; font-weight: 600; }
  .feedcontrast { margin-top: 16px; border-left: 2px solid #91a873; background: #192016;
    color: #c9d5c1; padding: 12px 13px; font-family: -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
    font-size: 13.5px; line-height: 1.45; }
  .feedcontrast strong { color: #e0e8dc; font-weight: 600; }
  @media (max-height: 700px) {
    #app.feed-mode .device { min-height: 260px; }
    .feed-post { padding: 7px 1px 2px; }
    .feed-post.day-start:not(:first-child) { padding-top: 15px; }
    .post-graffiti { width: 96px; height: 96px; }
  }
  @media (max-width: 350px) {
    .brand-mark { gap: 5px; }
    .mode-tabs { gap: 9px; }
    .mode-tab { font-size: 8.5px; letter-spacing: .15em; }
    .feed-screen { padding-left: 11px; padding-right: 11px; }
    .post-meta-leader { margin-left: 5px; margin-right: 5px; }
    .feed-post.day-start .post-author { max-width: 38%; }
    .feed-post.day-start .post-meta time { font-size: var(--pager-meta-size); letter-spacing: .08em; }
  }

  /* номер открывается как лотерейный билет; остальной интерфейс не меняется */
  .sheet.lottery { max-width: 340px; overflow: hidden; text-align: center; }
  .lotteryhead { font-size: 9px; letter-spacing: 3px; font-weight: 700; color: #7f9463; }
  .lotteryticket { position: relative; width: 100%; aspect-ratio: 8 / 3; margin: 13px 0 10px;
    overflow: hidden; border: 1px solid #46543f; border-radius: 13px;
    background: linear-gradient(165deg, #b3c791, #9cb27a 58%, #92a771);
    box-shadow: inset 0 4px 12px rgba(20,28,12,.35); }
  .lotterynum { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: #1d2415; font-size: 52px; line-height: 1; font-weight: 800; letter-spacing: 11px;
    text-indent: 11px; text-shadow: 0 1px 0 rgba(255,255,255,.25); }
  .lotteryticket canvas { position: absolute; inset: 0; width: 100%; height: 100%;
    touch-action: none; cursor: crosshair; opacity: 1; transition: opacity .32s ease; }
  .lotteryticket.revealed canvas { opacity: 0; pointer-events: none; }
  .lotteryhint { min-height: 18px; color: #8a967f; font-size: 11px; line-height: 1.45;
    letter-spacing: 1.5px; font-weight: 700; }
  .lottery .okbtn { font-weight: 700; letter-spacing: 1px; }
  @media (prefers-reduced-motion: reduce) {
    .lotteryticket canvas { transition: none; }
  }

  /* Входящий и активный звонок — одна спокойная панель поверх Pager. */
  .callcard { position: fixed; top: 0; left: 0; right: 0; z-index: 95;
    display: flex; justify-content: center; padding: calc(10px + env(safe-area-inset-top)) 14px 0;
    pointer-events: none; }
  .callcard .inner { width: 100%; max-width: 392px;
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto;
    background: #10160f; color: #d9e2c4; border: 1px solid #2d3724;
    border-radius: 22px; padding: 17px; box-shadow: 0 14px 44px rgba(0,0,0,.5);
    pointer-events: auto; animation: call-panel-enter-v2 .2s ease-out;
    font-family: -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif; }
  @keyframes call-panel-enter-v2 { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
  .callcard .call-panel-peer-v2 { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
  .callcard .call-panel-avatar-v2 { width: 50px; height: 50px; flex: none; border-radius: 13px; background: transparent; }
  .callcard .call-panel-identity-v2 { flex: 1; min-width: 0; }
  .callcard .cmeta { color: #9ba68b; font-size: 12px; line-height: 1.4; font-weight: 400; }
  .callcard .cbody { color: #d9e2c4; font-size: 18px; line-height: 1.25; font-weight: 600; margin: 3px 0 0;
    overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .callcard .cbody.call-panel-username-v2 { color: var(--pt-gold); }
  .callcard .call-panel-number-v2 { margin-top: 3px; color: #9ba68b; font: 12px/1.35 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .07em; }
  .callcard .crow { display: flex; flex-wrap: wrap; gap: 8px; }
  .callcard .crow button { flex: 1 1 0; min-width: 0; min-height: 48px; display: inline-flex;
    align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 14px; line-height: 1.2;
    font-weight: 600; padding: 11px 9px; border: 1px solid transparent; border-radius: 14px; cursor: pointer;
    transition: background .15s ease, transform .15s ease; }
  .callcard .crow button svg { width: 19px; height: 19px; flex: none; }
  .callcard .crow button:active { transform: scale(.97); }
  .callcard .crow button:focus-visible { outline: 2px solid #d7e89f; outline-offset: 3px; }
  .callcard .answer { background: #d5e79d; color: #243016; }
  .callcard .dismiss { background: #1b2316; color: #c8d1b8; border-color: #303b27; }
  .callcard .call-panel-hang-v2 { background: #30211c; color: #e9b0a0; border-color: #52382e; }
  #cbSound { flex-basis: 100%; order: 1; }
  #cbMute[aria-pressed="true"] { background: #d5e79d; color: #243016; border-color: transparent; }
  #cbMute .call-panel-mic-slash-v2 { display: none; }
  #cbMute[aria-pressed="true"] .call-panel-mic-slash-v2 { display: block; }
  @media (prefers-reduced-motion: reduce) {
    .callcard .inner { animation: none; }
    .callcard .crow button { transition: none; }
    .callcard .crow button:active { transform: none; }
  }

  /* ===== витрина (дизайн v6.1) ===== */
  /* margin:auto по вертикали — центр на длинных экранах, обычный скролл на коротких */
  .hero { text-align: center; margin: auto 0; padding: 6px 0 20px; }
  .stagechip { font-size: 9.5px; letter-spacing: 3px; color: #4e5a45; font-weight: 700; margin: 0 0 14px; }

  /* герой: сам пейджер. Префикс v- — у приложения свои .device/.glass, их не трогаем */
  .vdev { margin: 0 auto 22px; width: 100%; max-width: 312px;
    background: linear-gradient(180deg, #262e20, #171d13);
    border: 1px solid #333d29; border-radius: 24px; padding: 11px;
    box-shadow: 0 18px 44px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06); }
  .vbrand { display: flex; justify-content: space-between; align-items: center;
    font-size: 8px; letter-spacing: 2.5px; color: #5d6b52; font-weight: 700; padding: 0 3px 8px; }
  .vbrand-mark { display: flex; align-items: center; gap: 6px; }
  .vbrand-logo { width: 15px; height: 15px; color: #89afa8; flex: none; }
  .vbrand i { width: 5px; height: 5px; border-radius: 50%; background: #9fb47f;
    box-shadow: 0 0 7px #9fb47f; animation: vblink 2.4s ease-in-out infinite; }
  @keyframes vblink { 0%,72%,100% { opacity: 1 } 80%,92% { opacity: .25 } }
  .vglass { position: relative; border-radius: 12px; overflow: hidden;
    background: linear-gradient(165deg, #b3c791, #9cb27a 58%, #92a771);
    color: #1d2415; padding: 11px 13px 13px;
    box-shadow: inset 0 4px 12px rgba(20,28,12,.45), inset 0 -1px 3px rgba(255,255,255,.3); }
  .vglass::after { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(0deg, rgba(20,28,12,.055) 0 1px, transparent 1px 3px); }
  .vtop { display: flex; justify-content: space-between; align-items: baseline;
    font-size: 8.5px; letter-spacing: 2px; font-weight: 700; opacity: .72; }
  .vnum { font-size: 44px; font-weight: 800; letter-spacing: 9px; text-indent: 9px;
    text-align: center; margin: 5px 0 1px; white-space: nowrap; text-shadow: 0 1px 0 rgba(255,255,255,.2); }
  .vnum.dim { opacity: .3; font-size: 34px; letter-spacing: 7px; }
  .vsub { text-align: center; font-size: 8.5px; letter-spacing: 2.5px; opacity: .6; font-weight: 700; }
  .vline { border-top: 1px dashed rgba(20,28,12,.32); margin-top: 9px; padding-top: 9px; min-height: 42px; }
  .vline small { display: block; font-size: 8.5px; letter-spacing: 2px; font-weight: 700; opacity: .65; margin-bottom: 4px; }
  .vline p { font-size: 13.5px; line-height: 1.4; font-weight: 600; min-height: 19px; }
  .vcur { display: inline-block; width: 6px; height: 14px; vertical-align: -2px;
    background: #1d2415; margin-left: 2px; animation: vcurb .9s steps(1) infinite; }
  @keyframes vcurb { 50% { opacity: 0 } }
  .vkeys { display: flex; gap: 6px; justify-content: center; margin-top: 9px; }
  .vkeys i { width: 30px; height: 6px; border-radius: 4px; background: #10140e;
    border: 1px solid #333d29; box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
  .vkeys i.wide { width: 52px; }

  .undercta { font-size: 11.5px; line-height: 1.5; color: #5d6b52; margin-top: 11px; }
  .undercta a { color: #7f9463; text-decoration: underline dotted; display: inline-block; margin-top: 4px; }
  .wraptext { font-size: 13px; line-height: 1.55; color: #7f8c75; max-width: 330px; margin: 0 auto;
    font-family: -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif; }
  .linkrow { display: flex; min-width: 0; gap: 8px; margin-top: 12px; }
  .linkrow .lnk { flex: 1 1 0; min-width: 0; display: block; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; text-align: center;
    background: #10140e; border: 1px solid #232a20; border-radius: 13px; font-size: 13px;
    letter-spacing: .5px; color: #a9b59e; padding: 13px 6px; user-select: all; -webkit-user-select: all; }
  .linkrow button { flex: none; font: inherit; font-size: 11.5px; letter-spacing: 1px; background: #171d13; color: #9fb47f;
    border: 1px solid #333d29; border-radius: 13px; padding: 13px 14px; cursor: pointer; }
  /* видимый канал сообщений там, где composer скрыт (витрина, экран обёртки) */
  .toast { position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 80; max-width: min(340px, calc(100vw - 32px));
    background: #1c2317; border: 1px solid #46543f; border-radius: 12px;
    padding: 11px 16px; font-size: 13px; line-height: 1.4; color: #cfe0c8; text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,.55); pointer-events: none; }
  .toast.conversation-toast-v2 {
    bottom: calc(94px + env(safe-area-inset-bottom));
    border-color: rgba(123,145,88,.52);
    background: #182016;
  }
  body.composer-keyboard-visible .toast.conversation-toast-v2 {
    top: calc(var(--composer-keyboard-top, 0px) + max(80px, calc(env(safe-area-inset-top) + 72px)));
    bottom: auto;
  }
  .toast.conversation-toast-v2.failed {
    border-color: rgba(179,126,79,.62);
    color: #efd2b5;
    background: #2d241b;
  }
  /* Pager notices use the same quiet card as the conversation. */
  /* Profile (74), its contact editor, then that editor's confirmation. */
  #contactOv { z-index: 75; }
  #askOv.main-contact-ask-v3 { z-index: 76; }
  #enableOv { z-index: 76; }
  /* Session gates cover every normal editor/viewer and the call controls (95). */
  #registrationOv { z-index: 100; }
  .pager-notice-icon-v3 { display: none; }
  .backdrop.pager-notice-v3,
  #askOv.main-contact-ask-v3 {
    padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
  }
  .pager-notice-v3 .sheet,
  #askOv.main-contact-ask-v3 .sheet {
    max-width: 360px;
    max-height: calc(100dvh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-y: auto;
    padding: 24px 20px 20px;
    border: 1px solid #2b3423;
    border-radius: 24px;
    background: #10160f;
    color: #e3edb7;
    box-shadow: 0 20px 64px #0008;
    text-align: left;
  }
  .pager-notice-v3 .sheet::before { display: none; }
  .pager-notice-v3 .sheet > h2,
  .pager-notice-v3 .lotteryhead,
  #askOv.main-contact-ask-v3 .askhead {
    margin: 0 36px 16px 0;
    color: #e3edb7;
    font-size: 20px;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: -.2px;
    text-align: left;
    overflow-wrap: anywhere;
  }
  .pager-notice-v3 .sheet .x {
    display: grid;
    place-items: center;
    top: 12px;
    right: 10px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #a3b18b;
    font: 400 18px/1 sans-serif;
  }
  .pager-notice-v3 .pager-notice-icon-v3 {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    border-radius: 15px;
    color: #cbdc9d;
    background: #20291b;
  }
  .pager-notice-icon-v3 svg { width: 25px; height: 25px; }
  .pager-notice-v3 #enableText,
  .pager-notice-v3 #permText,
  .pager-notice-v3 #notifyText,
  .pager-notice-v3 .regtext {
    margin: 0;
    color: #a8b495;
    font: 400 15px/1.55 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-align: left;
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }
  #permOv:not(.pager-notice-v3) #permText,
  #enableOv:not(.pager-notice-v3) #enableText,
  #notifyOv:not(.pager-notice-v3) #notifyText {
    font: 13px/1.5 -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
    color: #a9b59e;
  }
  .pager-notice-v3 .okbtn,
  #askOv.main-contact-ask-v3 .askrow button {
    display: block;
    min-height: 48px;
    margin-top: 22px;
    padding: 12px;
    border: 0;
    border-radius: 15px;
    color: #202914;
    background: #d4e79c;
    box-shadow: none;
    font: 600 15px/1.35 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: 0;
    text-align: center;
    transition: transform 120ms ease, background-color 120ms ease;
  }
  .pager-notice-v3 .okbtn + .okbtn { margin-top: 10px; }
  .pager-notice-v3 .okbtn.hidden { display: none; }
  .pager-notice-v3 button:focus-visible,
  .pager-notice-v3 a:focus-visible,
  #askOv.main-contact-ask-v3 button:focus-visible { outline: 2px solid #d4e79c; outline-offset: 3px; }
  .pager-notice-v3 .okbtn:active,
  #askOv.main-contact-ask-v3 .askrow button:active { transform: scale(.98); }
  #registrationOv.pager-notice-v3 .sheet > h2 { margin-right: 0; }
  #notifyOv.pager-notice-v3 #notifyLater { color: #c5cea8; background: #20291b; }
  #numberOv.pager-notice-v3 .lotteryhead { margin: 0 0 20px; text-align: center; }
  #numberOv.pager-notice-v3 .lotteryticket { border: 0; border-radius: 16px; box-shadow: none; }
  #numberOv.pager-notice-v3 .lotteryhint {
    margin: 16px 0 0;
    color: #a8b495;
    font: 400 14px/1.45 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: 0;
  }
  #askOv.main-contact-ask-v3 .askhead { margin-right: 0; }
  #askOv.main-contact-ask-v3 .asktext { margin: 0 0 22px; color: #a8b495; font-size: 15px; font-weight: 400; }
  #askOv.main-contact-ask-v3 .asktext span { font-family: inherit; }
  #askOv.main-contact-ask-v3 .contact-confirm-name-v2 { display: block; margin-top: 12px; color: #e3edb7; font-weight: 600; }
  #askOv.main-contact-ask-v3 .contact-confirm-number-v2 { color: #8e9b79; font: 13px/1.4 ui-monospace, monospace; }
  #askOv.main-contact-ask-v3 .contact-confirm-note-v2 { display: block; margin-top: 14px; color: #a8b495; }
  #askOv.main-contact-ask-v3 .askrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  #askOv.main-contact-ask-v3 .askrow button { margin: 0; }
  #askOv.main-contact-ask-v3 .askno { color: #c5cea8; background: #20291b; }
  #askOv.main-contact-ask-v3 .askyes.danger { color: #f1c5b9; background: #4b302a; }
  .toast.pager-toast-v3 {
    width: max-content;
    max-width: min(360px, calc(100vw - 32px));
    padding: 13px 17px;
    border-color: #35432a;
    border-radius: 17px;
    color: #dce7b4;
    background: #182016;
    font: 400 14px/1.45 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow-wrap: anywhere;
  }
  .toast.pager-toast-v3.failed { color: #efd2bf; border-color: #6d4e3c; background: #2b221b; }
  #rulesOv.pager-help-v3 { align-items: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
  #rulesOv.pager-help-v3 .sheet.rules { width: min(100%, 420px); max-width: 420px; height: auto; padding: 12px 20px 20px;
    border: 1px solid var(--pt-line); border-radius: var(--pager-ui-panel-radius); background: var(--pt-surface); box-shadow: 0 18px 60px #0006;
    font: 400 var(--pager-ui-body-size)/1.5 var(--pager-ui-font); }
  #rulesOv.pager-help-v3 .ruleschrome { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; gap: 4px;
    min-height: 56px; margin-bottom: 16px; padding: 0; letter-spacing: 0; }
  #rulesOv.pager-help-v3 .ruleschrome:has(.rules-header-back-v4.hidden) { grid-template-columns: minmax(0,1fr) 44px; }
  #rulesOv.pager-help-v3 .ruleschrome:has(.rules-header-back-v4.hidden) .rules-header-spacer-v4 { display: none; }
  #rulesOv.pager-help-v3 .rulesbrand { display: none; }
  #rulesOv.pager-help-v3 #rulesHeaderTitleV4 { margin: 0; color: var(--pt-text); font: inherit; font-size: var(--pager-ui-title-size); font-weight: var(--pager-ui-title-weight); line-height: 1.3; letter-spacing: 0; text-align: left; }
  #rulesOv.pager-help-v3 .ruleschrome .x, #rulesOv.pager-help-v3 .rules-header-back-v4 { display: grid; place-items: center;
    width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; color: var(--pt-muted); background: transparent; cursor: pointer; }
  .ruleschrome .x svg, .rules-header-back-v4 svg { width: 21px; height: 21px; }
  .rules-header-spacer-v4 { width: 44px; height: 44px; }
  #rulesOv.pager-help-v3 .ruleschrome .x::before { display: none; }
  #rulesOv.pager-help-v3 .ruleslcd { flex: 0 1 auto; color: var(--pt-text); background: transparent; box-shadow: none; border-radius: 0; }
  #rulesOv.pager-help-v3 .rulespage { min-height: 0; padding: 0; animation: none; }
  #rulesOv.pager-help-v3 :is(.rulesheading,.rulessubhead) { display: none; }
  #rulesOv.pager-help-reading-v4 #rulesOk { display: none; }
  #rulesOv.pager-help-v3 :is(.rulessteps strong,.rulesheading h2,.rulessubhead h2,.rulescopy h3) {
    color: var(--pt-text);
    font-family: var(--pager-ui-font);
    font-size: var(--pager-ui-label-size);
    line-height: 1.35;
    font-weight: var(--pager-ui-title-weight);
    letter-spacing: 0;
  }
  #rulesOv.pager-help-v3 :is(.rulesnum,.rulesmore,.ruleskicker,.rulessubhead p) { color: var(--pt-muted); letter-spacing: 0; }
  #rulesOv.pager-help-v3 :is(.rulessteps p,.rulescopy > p,.rulesflow p,.rulesnote p) { font-size: var(--pager-ui-body-size); line-height: 1.5; }
  #rulesOv.pager-help-v3 .rulesmore { font-size: var(--pager-ui-note-size); line-height: 1.45; text-align: left; }
  #rulesOv.pager-help-v3 :is(.rulessteps li,.rulessubhead,.rulescopy h3,.rulesflow li,.rulesdefinitions div) { border-color: var(--pt-line); }
  #rulesOv.pager-help-v3 .rulescopy { padding-top: 0; }
  #rulesOv.pager-help-v3 .rulescopy > :first-child { margin-top: 8px; }
  #rulesOv.pager-help-v3 .rulescopy h3 { margin: 24px 0 8px; padding: 0; border: 0; font-size: var(--pager-ui-label-size); }
  #rulesOv.pager-help-v3 .rulesnote { margin: 24px 0; border: 0; border-radius: var(--pager-ui-control-radius); background: var(--pt-surface-alt); }
  #rulesOv.pager-help-v3 .rulesnote strong { color: var(--pt-text); font-size: var(--pager-ui-note-size); font-weight: var(--pager-ui-title-weight); line-height: 1.45; letter-spacing: 0; }
  #rulesOv.pager-help-v3 .rulesdefinitions div { grid-template-columns: 102px minmax(0,1fr); font-size: var(--pager-ui-note-size); }
  #rulesOv.pager-help-v3 :is(.rulessubhead button,.rulesflow li > span) { color: var(--pt-muted); border-color: var(--pt-line); }
  #rulesOv.pager-help-v3 .rulessubhead button { width: 44px; height: 44px; }
  #rulesOv.pager-help-v3 .rules .okbtn { min-height: var(--pager-ui-control-height); color: var(--pt-on-accent); background: var(--pt-accent); box-shadow: none; font-size: var(--pager-ui-label-size); font-weight: var(--pager-ui-title-weight); letter-spacing: 0; }
  #rulesOv.pager-help-v3 .rulesmenu { margin: 0; border: 0; }
  #rulesOv.pager-help-v3 .rulesmenu button { min-height: 56px; gap: 12px; padding: 12px 0; color: var(--pt-text);
    border-color: var(--pt-line); background: transparent; border-radius: 0; -webkit-tap-highlight-color: transparent; }
  #rulesOv.pager-help-v3 .rulesmenu button:last-child { border-bottom: 0; }
  #rulesOv.pager-help-v3 .rulesmenu button > span { min-width: 0; display: block; }
  #rulesOv.pager-help-v3 .rulesmenu b { display: none; }
  #rulesOv.pager-help-v3 .rulesmenu :is(small,i) { color: var(--pt-muted); }
  #rulesOv.pager-help-v3 .rulesmenu small { margin-top: 4px; font-size: var(--pager-ui-note-size); line-height: 1.45; }
  #rulesOv.pager-help-v3 .rulesmenu strong { color: var(--pt-text); font: inherit; font-size: var(--pager-ui-label-size); font-weight: var(--pager-ui-title-weight); line-height: 1.3; letter-spacing: 0; }
  #rulesOv.pager-help-v3 .rulescommand code { max-width: 100%; overflow-wrap: anywhere; border-radius: 8px; padding: 7px 9px; color: var(--pt-text); background: var(--pt-surface-alt); }
  #rulesOv.pager-help-v3 .rulescommand p { font-size: var(--pager-ui-body-size); line-height: 1.5; }
  #rulesOv.pager-help-v3 .rulesthemes { font-size: var(--pager-ui-note-size) !important; line-height: 1.45 !important; }
  #rulesOv.pager-help-v3 .transfer-ticket { border: 1px solid var(--pt-line); border-radius: var(--pager-ui-control-radius); background: var(--pt-surface-alt); }
  #rulesOv.pager-help-v3 :is(.transfer-ticket label,.transfer-ticket p,.transfer-status,.transfer-eyebrow) { color: var(--pt-muted); font-size: var(--pager-ui-note-size); line-height: 1.45; letter-spacing: 0; }
  #rulesOv.pager-help-v3 :is(.transfer-status,.transfer-eyebrow) { font-size: var(--pager-ui-note-size) !important; }
  #rulesOv.pager-help-v3 .transfer-claim > p:not(.transfer-eyebrow) { text-align: left; }
  #rulesOv.pager-help-v3 .transfer-ticket input { height: var(--pager-ui-control-height); color: var(--pt-text); background: var(--pt-surface); border-color: var(--pt-line); font-size: var(--pager-ui-note-size); }
  #rulesOv.pager-help-v3 :is(.transfer-primary,.transfer-actions button) { min-height: var(--pager-ui-control-height); border: 0; border-radius: var(--pager-ui-control-radius); font-size: var(--pager-ui-label-size); font-weight: var(--pager-ui-title-weight); line-height: 1.3; letter-spacing: 0; }
  #rulesOv.pager-help-v3 .transfer-primary { color: var(--pt-on-accent); background: var(--pt-accent); }
  #rulesOv.pager-help-v3 .transfer-actions button { color: var(--pt-text); background: var(--pt-surface); }
  #rulesOv.pager-help-v3 .transfer-number { color: var(--pt-text); }
  #rulesOv:not(.pager-help-v3) :is(.transfer-primary,.transfer-actions button) { text-transform: uppercase; }
  #rulesOv.pager-help-v3 button:focus-visible { outline: 2px solid #d4e79c; outline-offset: -2px; }
  #rulesOv.pager-help-v3 button:not(:disabled):active { background-color: #20291b; }
  .settings-error-v4 { margin: 0 0 8px; color: var(--pt-danger); font-size: var(--pager-ui-note-size); line-height: 1.45; }
  .settings-error-v4:empty { display: none; }
  @media (max-width: 350px) {
    #rulesOv.pager-help-v3 .sheet.rules { padding: 12px 16px 20px; }
    #rulesOv.pager-help-v3 .rulesdefinitions div { grid-template-columns: 1fr; }
  }
  @media (prefers-reduced-motion: reduce) {
    .pager-notice-v3 .okbtn, #askOv.main-contact-ask-v3 .askrow button { transition: none; }
    .pager-notice-v3 .okbtn:active, #askOv.main-contact-ask-v3 .askrow button:active { transform: none; }
  }

  /* единственное яркое пятно на экране — действие */
  .installBanner { display: block; width: 100%; font: inherit; font-size: 14.5px; font-weight: 700;
    letter-spacing: 2px; cursor: pointer; text-align: center; text-decoration: none; box-sizing: border-box;
    background: linear-gradient(180deg, #a8bd86, #90a76e); color: #131a0e;
    border: 0; border-radius: 15px; padding: 16px; margin: 22px 0 0;
    box-shadow: 0 8px 26px rgba(159,180,127,.22), inset 0 1px 0 rgba(255,255,255,.35); }
  .installBanner:active { transform: translateY(1px); }
  .installBanner:disabled { opacity: .55; }
  /* статусы установки — длинные фразы: капсовый разрядкой моно их распирает на 3 строки */
  .installBanner.note { font-size: 12.5px; font-weight: 600; letter-spacing: 0; padding: 13px;
    font-family: -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif; }
  .installBanner.busy { animation: instblink 1.2s ease-in-out infinite; }
  /* 0%/100% заданы явно: иначе крайние кадры берут opacity от :disabled и мигание пропадает */
  @keyframes instblink { 0%,100% { opacity: 1 } 50% { opacity: .5 } }
  /* режим обёртки: из витрины остаётся только выход наружу
     (.wrapstep — подсказка самой обёртки, её прятать нельзя: без неё тупик) */
  .hero.wrapped .tagline, .hero.wrapped .steps:not(.wrapstep),
  .hero.wrapped .undercta:not(.wrapstep), .hero.wrapped button.installBanner { display: none; }
  .undercta.wrapstep { max-width: 330px; margin-left: auto; margin-right: auto; }
  #wrapIc { font-size: 15px; }
  .hero h1 { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -.2px;
    color: #e2ead9; margin-bottom: 9px;
    font-family: -apple-system, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif; }
  .tagline { font-size: 13px; line-height: 1.55; color: #7f8c75; max-width: 330px; margin: 0 auto; }
  .tagline + .tagline { margin-top: 8px; }
  .tagline b { color: #9fb47f; font-weight: 600; }
  /* блок шагов стоит на центральной оси страницы, строки внутри ровные:
     центровка каждой строки рассыпала бы колонку иконок */
  .steps { display: flex; flex-direction: column; max-width: 292px; margin: 20px auto 0; text-align: left; }
  .step { display: flex; gap: 13px; align-items: center; font-size: 12.5px; line-height: 1.45;
    color: #9aa791; padding: 11px 2px; border-top: 1px solid #1a2016; }
  .steps .step:last-child { border-bottom: 1px solid #1a2016; }
  .step .ic { flex: none; width: 26px; height: 26px; color: #9fb47f;
    display: flex; align-items: center; justify-content: center; }
  .step .ic svg { width: 23px; height: 23px; }
  .step span i { color: #d7e0d4; font-style: normal; }

  /* низкие экраны (SE, 8, mini): поджимаем витрину ровно настолько, чтобы влезла без скролла */
  @media (max-height: 730px) {
    .vdev { max-width: 300px; margin-bottom: 16px; }
    .vnum { font-size: 38px; letter-spacing: 7px; text-indent: 7px; }
    .vline { min-height: 38px; margin-top: 8px; padding-top: 8px; }
    .vline p { font-size: 12.5px; }
    .hero h1 { font-size: 20px; }
    .tagline { font-size: 12.5px; }
    .steps { margin-top: 14px; }
    .step { padding: 9px 2px; font-size: 12px; }
    .installBanner { margin-top: 16px; padding: 14px; }
  }

  /* ===== Лента v2: темы и ответы в том же визуальном языке, что список чатов ===== */
  #app.main-feed-v2-mode > .device > .glass {
    border: 0;
    border-radius: 0;
    background: #0c0f0d;
    box-shadow: none;
  }
  #app.main-feed-v2-mode .glass::after { display: none; }
  #app.main-feed-v2-mode .feed-screen { padding: 0; color: #e3edb7; }
  #app.main-feed-v2-mode .feed-list { padding: 0; }
  .feed-identity-prompt-v2 {
    width: 100%;
    min-height: 66px;
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) 22px;
    align-items: center;
    gap: 11px;
    padding: 8px 5px 9px 3px;
    border: 0;
    border-bottom: 1px solid rgba(108,128,82,.23);
    color: #dce8ae;
    background: #111710;
    font: inherit;
    text-align: left;
    cursor: pointer;
  }
  .feed-identity-prompt-v2 span { min-width: 0; }
  .feed-identity-prompt-v2 strong { font-size: 14px; font-weight: 680; }
  .feed-identity-prompt-v2 > svg { width: 19px; height: 19px; color: #809064; }
  .feed-identity-avatar-v2 { width: 42px; height: 42px; border-radius: 13px; }

  #app.main-feed-v2-mode .feed-post.feed-topic-v2 {
    min-width: 0;
    display: grid;
    grid-template-columns: 44px minmax(0,1fr);
    align-items: start;
    gap: 11px;
    padding: 13px 2px 9px;
    border-bottom: 1px solid rgba(108,128,82,.22);
    background: transparent;
    cursor: pointer;
  }
  .feed-topic-avatar-v2 {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: #151d13;
  }
  .feed-topic-main-v2 { min-width: 0; }
  #app.main-feed-v2-mode .feed-topic-meta-v2 {
    min-height: 20px;
    align-items: center;
    gap: 8px;
  }
  .feed-author-line-v2,
  .feed-topic-last-author-v2 {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #e3edb7;
  }
  .feed-author-line-v2 strong,
  .feed-topic-last-author-v2 strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 690;
    letter-spacing: .01em;
  }
  .feed-status-badge-v2 {
    flex: none;
    display: inline-grid;
    place-items: center;
    min-width: 16px;
    height: 16px;
    color: #c6d98a;
    font: 650 13px/1 -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  }
  #app.main-feed-v2-mode .feed-topic-meta-v2 time {
    flex: none;
    color: #758261;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
  }
  .feed-topic-aside-v2 { flex: none; display: inline-flex; align-items: center; gap: 6px; }
  .feed-topic-unread-v2 {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #b9ce7f;
    box-shadow: 0 0 5px rgba(185,206,127,.45);
  }
  #app.main-feed-v2-mode .feed-topic-v2 .post-text {
    display: -webkit-box;
    margin: 3px 0 0;
    overflow: hidden;
    color: #bdca9b;
    font-size: 14px;
    line-height: 1.38;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
  }
  #app.main-feed-v2-mode .feed-topic-v2 .post-graffiti-frame { margin: 7px 0 1px; }
  #app.main-feed-v2-mode .feed-topic-v2 .post-graffiti { width: 112px; height: 112px; }
  #app.main-feed-v2-mode .feed-topic-v2 .post-melody { min-height: 44px; margin-top: 5px; }
  #app.main-feed-v2-mode .feed-topic-v2 .post-melody-play {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    color: #cddd9d;
    background: #182016;
  }
  #app.main-feed-v2-mode .feed-topic-v2 .post-melody-copy strong { color: #bdca9b; font-size: 13px; }
  #app.main-feed-v2-mode .feed-topic-v2 .post-melody-copy small { color: #71805d; }
  #app.main-feed-v2-mode .feed-topic-v2 .post-actions {
    min-height: 38px;
    display: flex;
    justify-content: flex-start;
    gap: 0;
    margin: 2px 0 -4px;
  }
  #app.main-feed-v2-mode .feed-topic-v2 .post-action,
  .feed-thread-v2 .post-action {
    min-width: 44px;
    min-height: 44px;
    padding: 0 8px;
    gap: 5px;
    color: #74815f;
    border: 0;
    background: transparent;
    font: 620 11px/1 -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    letter-spacing: 0;
  }
  #app.main-feed-v2-mode .feed-topic-v2 .post-action svg,
  .feed-thread-v2 .post-action svg { width: 16px; height: 16px; stroke-width: 1.75; }
  #app.main-feed-v2-mode .feed-topic-v2 .post-action .feed-heart,
  .feed-thread-v2 .post-action .feed-heart { width: 16px; height: 16px; }
  #app.main-feed-v2-mode .feed-topic-v2 .post-action.remove-action { margin-left: auto; }
  #app.main-feed-v2-mode .feed-topic-v2 .post-action.liked,
  .feed-thread-v2 .post-action.liked { color: #a9564b; }
  .feed-topic-last-v2 {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 0 0 2px;
    color: #6f7d5c;
    font-size: 12px;
    line-height: 1.3;
  }
  .feed-topic-last-author-v2 { flex: none; max-width: 42%; color: #8fa171; }
  .feed-topic-last-author-v2 strong { font-size: 12px; font-weight: 650; }
  .feed-topic-last-v2 > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .feed-skeleton-v2 { width: 100%; }
  .feed-skeleton-row-v2 {
    min-height: 94px;
    display: grid;
    grid-template-columns: 44px minmax(0,1fr);
    align-items: start;
    gap: 11px;
    padding: 13px 2px;
    border-bottom: 1px solid rgba(108,128,82,.18);
  }
  .feed-skeleton-avatar-v2 {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: rgba(108,128,82,.12);
  }
  .feed-skeleton-copy-v2 { display: block; min-width: 0; padding-top: 3px; }
  .feed-skeleton-copy-v2 i {
    display: block;
    height: 8px;
    border-radius: 4px;
    background: rgba(108,128,82,.12);
  }
  .feed-skeleton-title-v2 { width: min(108px, 38%); }
  .feed-skeleton-body-v2 { width: min(224px, 76%); margin-top: 14px; opacity: .72; }
  #app.main-feed-v2-mode .feed-empty,
  #app.main-feed-v2-mode .feed-state {
    color: #778563;
    background: transparent;
  }
  #app.main-feed-v2-mode > #feedComposer { border-top: 1px solid rgba(108,128,82,.2); }
  #app.main-feed-v2-mode #feedComposer .sline { display: none; }

  /* Открытая тема занимает тот же экран, что личный диалог. */
  #app.main-feed-v2-mode.main-feed-thread-v2-mode {
    grid-template-rows: minmax(0,1fr) auto;
  }
  #app.main-feed-thread-v2-mode > .main-home-v2,
  #app.main-feed-thread-v2-mode > .device,
  #app.main-feed-thread-v2-mode > .hist,
  #app.main-feed-thread-v2-mode > #pagerComposer { display: none !important; }
  #app.main-feed-thread-v2-mode > .feed-thread-v2 {
    grid-row: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    color: #e3edb7;
    background: #0c0f0d;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
  }
  #app.main-feed-thread-v2-mode > #feedComposer { grid-row: 2; }
  .feed-thread-head-v2 {
    flex: none;
    min-height: var(--main-head-v2-height);
    display: grid;
    grid-template-columns: 44px minmax(0,1fr) 44px;
    align-items: center;
    gap: 5px;
    border-bottom: 1px solid rgba(108,128,82,.22);
  }
  .feed-thread-back-v2 {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    color: #c8d791;
    background: transparent;
    cursor: pointer;
  }
  .feed-thread-back-v2 svg { width: 22px; height: 22px; }
  .feed-thread-title-v2 {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
  }
  .feed-thread-title-v2 > span { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
  .feed-thread-title-v2 strong {
    max-width: 160px;
    overflow: hidden;
    color: #e3edb7;
    font-size: 15px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .feed-thread-title-v2 small { color: #748260; font-size: 10.5px; }
  .feed-thread-avatar-v2 { width: 34px; height: 34px; border-radius: 11px; }
  .feed-thread-list-v2 {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    padding: 0 2px 18px;
  }
  .feed-thread-list-v2::-webkit-scrollbar { display: none; }
  .feed-thread-root-v2,
  .feed-reply-v2 {
    min-width: 0;
    display: grid;
    grid-template-columns: 44px minmax(0,1fr);
    gap: 11px;
    padding: 17px 1px 9px;
    border-bottom: 1px solid rgba(108,128,82,.18);
  }
  .feed-reply-v2 { grid-template-columns: 36px minmax(0,1fr); padding: 12px 1px 8px 9px; }
  .feed-thread-root-avatar-v2 { width: 44px; height: 44px; border-radius: 13px; }
  .feed-reply-avatar-v2 { width: 36px; height: 36px; border-radius: 11px; }
  .feed-thread-root-main-v2,
  .feed-reply-main-v2 { min-width: 0; }
  .feed-thread-entry-meta-v2 {
    min-height: 21px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .feed-thread-entry-meta-v2 time { flex: none; color: #6f7c5d; font-size: 10.5px; font-variant-numeric: tabular-nums; }
  #app.main-feed-thread-v2-mode .feed-thread-v2 .post-text {
    margin: 5px 0 0;
    color: #c8d4a5;
    font-size: 15px;
    line-height: 1.44;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  #app.main-feed-thread-v2-mode .feed-thread-v2 .post-graffiti-frame { margin: 9px 0 2px; padding: 0; border: 0; background: transparent; }
  #app.main-feed-thread-v2-mode .feed-thread-v2 .post-graffiti { width: min(224px, 62vw); height: min(224px, 62vw); image-rendering: pixelated; }
  #app.main-feed-thread-v2-mode .feed-thread-v2 .post-melody { min-height: 48px; display: flex; align-items: center; gap: 10px; margin-top: 7px; }
  #app.main-feed-thread-v2-mode .feed-thread-v2 .post-melody-play {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    color: #cddd9d;
    background: #182016;
  }
  #app.main-feed-thread-v2-mode .feed-thread-v2 .post-melody-copy { display: flex; flex-direction: column; gap: 2px; }
  #app.main-feed-thread-v2-mode .feed-thread-v2 .post-melody-copy strong { color: #c8d4a5; font-size: 14px; }
  #app.main-feed-thread-v2-mode .feed-thread-v2 .post-melody-copy small { color: #71805d; font-size: 11px; }
  .feed-thread-entry-actions-v2 { min-height: 40px; display: flex; align-items: center; margin: 1px 0 -5px; }
  .feed-thread-entry-actions-v2 .post-action.remove-action,
  .feed-thread-entry-actions-v2 .post-action.reply-remove-action { margin-left: auto; }
  #app.main-feed-thread-v2-mode .feed-thread-v2 .post-action { color: #74815f; }
  #app.main-feed-thread-v2-mode .feed-thread-v2 .post-action.liked { color: #a9564b; }
  .feed-thread-divider-v2 {
    padding: 17px 9px 5px 56px;
    color: #788763;
    font-size: 9.5px;
    font-weight: 650;
    letter-spacing: .12em;
  }
  .feed-thread-empty-v2 { padding: 25px 32px 12px 56px; color: #6f7d5d; font-size: 13px; line-height: 1.45; }
  .feed-thread-state-v2 { min-height: 100%; display: grid; place-items: center; color: #748260; font-size: 13px; }
  .feed-replies-older-v2 {
    min-height: 44px;
    display: block;
    margin: 6px auto 0;
    padding: 0 14px;
    border: 0;
    color: #90a071;
    background: transparent;
    font: 620 12px/1 -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    cursor: pointer;
  }

  /* Имя выбирается в спокойном нижнем листе; проверка не двигает основной экран. */
  body.feed-profile-v2-open .feed-profile-ov-v2 {
    align-items: flex-end;
    padding: max(28px, env(safe-area-inset-top)) 0 0;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
  }
  .feed-profile-sheet-v2 {
    width: min(100%, 420px);
    max-width: 420px;
    padding: 12px 20px max(28px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 28px 28px 0 0;
    color: #e3edb7;
    background: #10160f;
    box-shadow: 0 -18px 48px rgba(0,0,0,.45);
  }
  .feed-profile-handle-v2 { display: block; width: 42px; height: 5px; margin: 0 auto 10px; border-radius: 99px; background: #46583b; }
  .feed-profile-head-v2 {
    min-height: 58px;
    display: grid;
    grid-template-columns: 44px minmax(0,1fr) 44px;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
  }
  .feed-profile-head-v2 h2 {
    min-width: 0;
    margin: 0;
    color: #e3edb7;
    font-size: 22px;
    font-weight: 720;
    line-height: 1.15;
    letter-spacing: 0;
    text-align: center;
  }
  .feed-profile-head-v2 button {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    color: #dce8ae;
    background: transparent;
    cursor: pointer;
  }
  .feed-profile-head-v2 button:disabled { opacity: .28; cursor: default; }
  .feed-profile-head-v2 svg { width: 21px; height: 21px; }
  .feed-profile-head-v2 button:last-child svg { width: 23px; height: 23px; }
  .feed-nickname-field-v2 { display: block; padding-top: 14px; }
  .feed-nickname-field-v2 input {
    width: 100%;
    height: 52px;
    padding: 0 15px;
    border: 1px solid rgba(127,149,91,.38);
    border-radius: 16px;
    outline: 0;
    color: #e4edbd;
    background: #182016;
    font: 650 17px/1 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
    letter-spacing: .025em;
    text-transform: uppercase;
  }
  .feed-nickname-field-v2 input:focus { border-color: #9ebc6c; box-shadow: 0 0 0 3px rgba(158,188,108,.1); }
  .feed-nickname-field-v2 input::placeholder { color: #58664a; font-size: 14px; }
  .feed-nickname-state-v2 { min-height: 19px; padding: 6px 2px 0; color: #82906d; font-size: 12px; }
  .feed-nickname-state-v2.ok { color: #a9c37a; }
  .feed-nickname-state-v2.err { color: #c58b74; }
  .feed-nickname-rules-v2 { margin-top: 12px; color: #6f7d5d; font-size: 11.5px; line-height: 1.48; }

  @media (max-width: 350px) {
    #app.main-feed-v2-mode .feed-post.feed-topic-v2 { grid-template-columns: 40px minmax(0,1fr); gap: 9px; }
    .feed-topic-avatar-v2 { width: 40px; height: 40px; }
    .feed-author-line-v2 strong { font-size: 14px; }
    .feed-thread-title-v2 strong { max-width: 120px; }
    .feed-thread-root-v2 { grid-template-columns: 40px minmax(0,1fr); gap: 9px; }
    .feed-thread-root-avatar-v2 { width: 40px; height: 40px; }
    .feed-reply-v2 { grid-template-columns: 34px minmax(0,1fr); gap: 8px; padding-left: 5px; }
    .feed-reply-avatar-v2 { width: 34px; height: 34px; }
    .feed-profile-sheet-v2 { padding-right: 16px; padding-left: 16px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .feed-profile-sheet-v2, .feed-thread-v2, .feed-topic-v2 { scroll-behavior: auto; }
  }

  /* Settings share the username editor with Feed, but keep their own card. */
  .backdrop.feed-profile-ov-v2.settings-identity-v3 {
    align-items: center;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    background: rgba(4, 6, 4, .76);
  }
  .settings-identity-v3 .feed-profile-sheet-v2 {
    width: 100%;
    max-width: 420px;
    max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    padding: 12px 20px 20px;
    border: 1px solid var(--pt-line);
    border-radius: var(--pager-ui-panel-radius);
    color: var(--pt-text);
    background: var(--pt-surface);
    font-family: var(--pager-ui-font);
    box-shadow: 0 20px 64px rgba(0, 0, 0, .42);
  }
  .settings-identity-v3 .feed-profile-handle-v2 { display: none; }
  .settings-identity-v3 .feed-profile-head-v2 { min-height: 56px; margin-bottom: 16px; }
  .settings-identity-v3 .feed-profile-head-v2 h2 { color: var(--pt-text); font-size: var(--pager-ui-title-size); font-weight: var(--pager-ui-title-weight); line-height: 1.3; letter-spacing: 0; text-align: left; }
  .settings-identity-v3 .feed-profile-head-v2 button { border-radius: 12px; color: var(--pt-muted); }
  .settings-identity-v3 .feed-profile-head-v2 button:active:not(:disabled) { background: rgba(192, 212, 148, .08); }
  .settings-identity-v3 .feed-profile-head-v2 button:focus-visible,
  .settings-identity-v3 .main-profile-reset-v2:focus-visible { outline: 2px solid #c5d993; outline-offset: 3px; }
  .settings-identity-v3 .feed-nickname-field-v2 { padding-top: 0; }
  .settings-identity-v3 .feed-nickname-field-v2 input {
    height: var(--pager-ui-control-height);
    border-color: var(--pt-line);
    border-radius: var(--pager-ui-control-radius);
    background: var(--pt-surface-alt);
    color: var(--pt-text);
    text-transform: none;
    font-size: var(--pager-ui-label-size);
    font-weight: var(--pager-ui-title-weight);
    letter-spacing: 0;
  }
  .settings-identity-v3 .feed-nickname-field-v2 input::placeholder { color: var(--pt-muted); font-size: var(--pager-ui-label-size); font-weight: 400; }
  .settings-identity-v3 .feed-nickname-state-v2 {
    min-height: 0;
    margin: 0;
    padding: 8px 0 0;
    color: var(--pt-muted);
    font-size: var(--pager-ui-note-size);
    line-height: 1.45;
    overflow-wrap: anywhere;
  }
  .settings-identity-v3 .feed-nickname-state-v2:empty { display: none; }
  .settings-identity-v3 .feed-nickname-state-v2.ok { color: var(--pt-muted); }
  .settings-identity-v3 .feed-nickname-state-v2.err { color: var(--pt-danger); }
  .settings-identity-v3 .feed-nickname-rules-v2 { margin: 16px 0 0; color: var(--pt-muted); font-size: var(--pager-ui-note-size); line-height: 1.45; text-align: left; }
  .settings-identity-v3 .main-profile-reset-v2 {
    width: 100%;
    min-height: var(--pager-ui-control-height);
    margin: 24px 0 0;
    padding: 12px 14px;
    border: 0;
    border-radius: var(--pager-ui-control-radius);
    color: var(--pt-danger);
    background: transparent;
    font: var(--pager-ui-title-weight) var(--pager-ui-label-size)/1.3 var(--pager-ui-font);
  }

  #askOv.main-settings-ask-v3 {
    z-index: 76;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    font-family: var(--pager-ui-font);
  }
  #askOv.main-settings-ask-v3 .sheet {
    width: 100%;
    max-width: 420px;
    max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-y: auto;
    padding: 24px 20px 20px;
    border: 1px solid var(--pt-line);
    border-radius: var(--pager-ui-panel-radius);
    color: var(--pt-text);
    background: var(--pt-surface);
    box-shadow: 0 20px 64px #0008;
    text-align: left;
  }
  #askOv.main-settings-ask-v3 .askhead { margin: 0 0 16px; font-size: var(--pager-ui-title-size); font-weight: var(--pager-ui-title-weight); line-height: 1.3; letter-spacing: 0; }
  #askOv.main-settings-ask-v3 .asktext { margin: 0 0 24px; color: var(--pt-muted); font-size: var(--pager-ui-body-size); font-weight: 400; line-height: 1.5; overflow-wrap: anywhere; }
  #askOv.main-settings-ask-v3 .asktext b { color: var(--pt-text); font-weight: var(--pager-ui-title-weight); }
  #askOv.main-settings-ask-v3 .askrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  #askOv.main-settings-ask-v3 .askrow button { min-height: var(--pager-ui-control-height); margin: 0; padding: 12px; border: 0; border-radius: var(--pager-ui-control-radius); box-shadow: none; font-family: inherit; font-size: var(--pager-ui-label-size); font-weight: var(--pager-ui-title-weight); line-height: 1.3; text-transform: none; letter-spacing: 0; }
  #askOv.main-settings-ask-v3 .askno { color: #c5cea8; background: #20291b; }
  #askOv.main-settings-ask-v3 .askyes.danger { color: #f1c5b9; background: #4b302a; }
  #askOv.main-settings-ask-v3 button:focus-visible { outline: 2px solid #d4e79c; outline-offset: 3px; }
  @media (max-width: 350px) {
    .settings-identity-v3 .feed-profile-sheet-v2,
    #askOv.main-settings-ask-v3 .sheet { padding-right: 16px; padding-left: 16px; }
  }

  .hidden { display: none !important; }


/* Appearance is a local preference. Existing dark surfaces stay unchanged. */
:root {
  --pt-bg: #0c0f0d;
  --pt-surface: #11170f;
  --pt-surface-alt: #1b2418;
  --pt-text: #e3edb7;
  --pt-muted: #9ba980;
  --pt-muted-strong: #b2c08e;
  --pt-line: #293323;
  --pt-accent: #d7e5a3;
  --pt-accent-soft: #293621;
  --pt-on-accent: #25321d;
  --pt-gold: #dfb85f;
  --pt-danger: #e6bd99;
  --pt-overlay: rgba(4,6,4,.72);
}
html[data-pager-theme="light"] {
  --pt-bg: #f6f5ef;
  --pt-surface: #fffef9;
  --pt-surface-alt: #eceee5;
  --pt-text: #293126;
  --pt-muted: #69725f;
  --pt-muted-strong: #5c674f;
  --pt-line: #d7ddce;
  --pt-accent: #536e37;
  --pt-accent-soft: #dce8bf;
  --pt-on-accent: #25321d;
  --pt-gold: #916709;
  --pt-danger: #a54435;
  --pt-overlay: rgba(34,42,29,.32);
  background: var(--pt-bg);
}
html[data-pager-theme="light"] body { background: var(--pt-bg); color: var(--pt-text); }
html[data-pager-theme="light"] :focus-visible { outline-color: var(--pt-accent); }
.appearance-panel-v5 { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0; }
.appearance-options-v5 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.appearance-option-v5 {
  min-width: 0; padding: 6px; border: 1px solid var(--pt-line); border-radius: 18px;
  background: transparent; color: var(--pt-text); font: inherit; cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease;
}
.appearance-option-v5[aria-checked="true"] { border-color: var(--pt-accent); background: var(--pt-accent-soft); }
.appearance-option-v5:not(:disabled):active { transform: scale(.985); }
.appearance-preview-v5 { position: relative; height: 108px; display: block; overflow: hidden; border: 1px solid rgba(104,121,82,.25); border-radius: 12px; }
.appearance-preview-dark-v5 { background: #0c0f0d; }
.appearance-preview-light-v5 { background: #f6f5ef; }
.appearance-preview-v5 i { position: absolute; left: 11px; right: 11px; top: 11px; height: 27px; border-radius: 7px; background: linear-gradient(150deg,#e0e9b6,#c9da91); }
.appearance-preview-v5 b, .appearance-preview-v5 em { position: absolute; display: block; height: 19px; border-radius: 9px; }
.appearance-preview-v5 b { left: 11px; top: 49px; width: 58%; background: #1b2418; border-bottom-left-radius: 3px; }
.appearance-preview-v5 em { right: 11px; top: 76px; width: 47%; background: #d7e5a3; border-bottom-right-radius: 3px; }
.appearance-preview-light-v5 b { background: #e5e9df; }
.appearance-preview-light-v5 em { background: #dce8bf; }
.appearance-option-label-v5 { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 5px 7px; font-size: var(--pager-ui-label-size); font-weight: var(--pager-ui-title-weight); line-height: 1.3; }
.appearance-radio-v5 { flex: none; display: block; width: 18px; height: 18px; border: 1.5px solid var(--pt-muted); border-radius: 50%; }
[aria-checked="true"] > .appearance-radio-v5, [aria-checked="true"] .appearance-option-label-v5 .appearance-radio-v5 {
  border: 5px solid var(--pt-accent); background: var(--pt-surface);
}
.appearance-system-v5 { grid-column: 1 / -1; min-height: 56px; display: grid; grid-template-columns: 24px minmax(0,1fr) 18px; align-items: center; gap: 12px; padding: 14px; text-align: left; font-size: var(--pager-ui-label-size); font-weight: var(--pager-ui-title-weight); line-height: 1.3; }
.appearance-system-v5 > svg { width: 24px; height: 24px; color: var(--pt-muted); }
.appearance-note-v5 { margin: 24px 0 0; color: var(--pt-muted); font-size: var(--pager-ui-note-size); line-height: 1.45; text-align: left; }
@media (prefers-reduced-motion: reduce) {
  .appearance-option-v5 { transition: none; }
  .appearance-option-v5:not(:disabled):active { transform: none; }
}

/* Light Pager: home, conversations and recipient picker. Media pixels stay unchanged. */
html[data-pager-theme="light"] .main-home-v2,
html[data-pager-theme="light"] #app.main-conversation-v2-mode {
  color: var(--pt-text);
}
html[data-pager-theme="light"] .main-head-v2 {
  border-color: var(--pt-line);
  background: var(--pt-bg);
}
html[data-pager-theme="light"] .main-tabs-v2 button,
html[data-pager-theme="light"] .main-receive-v2,
html[data-pager-theme="light"] .main-receive-v2 span {
  color: var(--pt-muted);
}
html[data-pager-theme="light"] .main-tabs-v2 button.active { color: var(--pt-text); }
html[data-pager-theme="light"] .main-tabs-v2 button.active::after,
html[data-pager-theme="light"] .main-feed-dot-v2 { background: var(--pt-accent); }
html[data-pager-theme="light"] .main-receive-v2 i { background: #c0c8b7; }
html[data-pager-theme="light"] .main-receive-v2 i::after {
  background: var(--pt-surface);
  box-shadow: 0 1px 3px rgba(34,42,29,.18);
}
html[data-pager-theme="light"] .main-receive-v2.on i { background: var(--pt-accent); }
html[data-pager-theme="light"] .main-number-v2 {
  border-color: transparent;
  background:
    repeating-linear-gradient(0deg, rgba(54,72,33,.018) 0 1px, transparent 1px 4px),
    linear-gradient(150deg, #e2ebc8, #d9e5b7);
  box-shadow: none;
}
html[data-pager-theme="light"] .main-chat-item-v1::after { border-color: var(--pt-line); }
html[data-pager-theme="light"] .main-chat-row-v2 {
  background: var(--pt-bg);
  box-shadow: 8px 0 18px rgba(53,66,39,.06);
}
html[data-pager-theme="light"] .main-chat-row-v2:active { background: var(--pt-surface-alt); }
html[data-pager-theme="light"] .main-chat-avatar-v2,
html[data-pager-theme="light"] .conversation-avatar-v2 { background: transparent; }
html[data-pager-theme="light"] .main-chat-title-v2 strong,
html[data-pager-theme="light"] .main-chat-row-v2.unread .main-chat-title-v2 strong { color: var(--pt-text); }
html[data-pager-theme="light"] .main-chat-title-v2 strong.is-public,
html[data-pager-theme="light"] .main-chat-row-v2.unread .main-chat-title-v2 strong.is-public { color: var(--pt-gold); }
html[data-pager-theme="light"] .main-chat-number-v2,
html[data-pager-theme="light"] .conversation-peer-copy-v2 > span { color: #52643e; }

/* A bare number is the primary identity, using the same ink as secondary IDs. */
:root .main-chat-row-v2 .main-chat-title-v2 strong.is-number,
:root .conversation-peer-copy-v2 strong.is-number {
  color: #b9ca8b;
  font: 600 18px/1.25 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: .055em;
}
html[data-pager-theme="light"] .main-chat-row-v2 .main-chat-title-v2 strong.is-number,
html[data-pager-theme="light"] .conversation-peer-copy-v2 strong.is-number { color: #52643e; }
html[data-pager-theme="light"] .main-chat-preview-v2,
html[data-pager-theme="light"] .main-chat-ticks-v2,
html[data-pager-theme="light"] .main-chat-aside-v2 time,
html[data-pager-theme="light"] .main-chat-empty-v2 { color: var(--pt-muted); }
html[data-pager-theme="light"] .main-chat-row-v2.unread .main-chat-preview-v2 { color: var(--pt-text); }
html[data-pager-theme="light"] .main-chat-row-v2.unread .main-chat-aside-v2 time { color: var(--pt-accent); }
html[data-pager-theme="light"] .main-chat-ticks-v2.read { color: #277b44; }
html[data-pager-theme="light"] .main-chat-unread-v2 {
  background: var(--pt-accent);
  box-shadow: 0 0 0 2px rgba(83,110,55,.08);
}
html[data-pager-theme="light"] .main-compose-v2 {
  --compose-face: var(--pt-accent-soft);
  --compose-face-pressed: #cedfac;
  --compose-shadow: 0 8px 22px rgba(53,66,39,.14);
  --compose-shadow-pressed: 0 2px 7px rgba(53,66,39,.12);
  color: var(--pt-on-accent);
}
html[data-pager-theme="light"] .main-tabs-v2 button:active:not(:disabled),
html[data-pager-theme="light"] .main-receive-v2:active:not(:disabled) { color: var(--pt-accent); }
html[data-pager-theme="light"] .main-home-v2 button:focus-visible {
  outline: 2px solid var(--pt-accent);
  outline-offset: -2px;
}
html[data-pager-theme="light"] .main-home-v2 button:disabled { opacity: .55; }

/* The picker keeps local names neutral; resolved public names are gold. */
html[data-pager-theme="light"] .main-new-dialog-v2,
html[data-pager-theme="light"] .main-new-dialog-sheet-v2 {
  color: var(--pt-text);
  background: var(--pt-bg);
}
html[data-pager-theme="light"] .main-new-dialog-v2 .main-sheet-head-v2 button { color: var(--pt-accent); }
html[data-pager-theme="light"] .main-recipient-field-v2 input,
html[data-pager-theme="light"] .main-recipient-save-form-v2 input {
  color: var(--pt-text);
  -webkit-text-fill-color: var(--pt-text);
  caret-color: var(--pt-accent);
  background: var(--pt-surface-alt);
}
html[data-pager-theme="light"] .main-recipient-field-v2 input::placeholder,
html[data-pager-theme="light"] .main-recipient-save-form-v2 input::placeholder {
  color: var(--pt-muted-strong, #5c674f);
  -webkit-text-fill-color: var(--pt-muted-strong, #5c674f);
  opacity: 1;
}
html[data-pager-theme="light"] .main-recipient-field-v2 input:focus,
html[data-pager-theme="light"] .main-recipient-save-form-v2 input:focus {
  outline: 2px solid var(--pt-accent);
  outline-offset: 2px;
}
html[data-pager-theme="light"] .main-recipient-row-v2,
html[data-pager-theme="light"] .main-recipient-identity-v2 { border-color: var(--pt-line); }
html[data-pager-theme="light"] .main-recipient-row-v2 strong { color: var(--pt-text); }
html[data-pager-theme="light"] .main-recipient-row-v2 strong.is-public,
html[data-pager-theme="light"] .main-recipient-identity-v2 strong { color: var(--pt-gold); }
html[data-pager-theme="light"] .main-recipient-row-v2 small,
html[data-pager-theme="light"] .main-recipient-row-v2 > span:last-child,
html[data-pager-theme="light"] .main-recipient-identity-v2 span,
html[data-pager-theme="light"] .main-recipient-empty-v2,
html[data-pager-theme="light"] .main-recipient-save-prompt-v2 { color: var(--pt-muted); }
html[data-pager-theme="light"] .main-recipient-retry-v2,
html[data-pager-theme="light"] .main-recipient-save-prompt-v2 button { color: var(--pt-accent); }
html[data-pager-theme="light"] .main-recipient-actions-v2 button {
  color: var(--pt-text);
  background: var(--pt-surface-alt);
}
html[data-pager-theme="light"] .main-recipient-save-form-v2 button,
html[data-pager-theme="light"] .main-recipient-actions-v2 button.primary {
  color: var(--pt-on-accent);
  background: var(--pt-accent-soft);
}
html[data-pager-theme="light"] #mainRecipientExactV2 .contact-save-error-v2 { color: var(--pt-danger); }
html[data-pager-theme="light"] .main-new-dialog-v2 button:active:not(:disabled) {
  background: var(--pt-surface-alt);
}
html[data-pager-theme="light"] .main-recipient-save-form-v2 button:active:not(:disabled),
html[data-pager-theme="light"] .main-recipient-actions-v2 button.primary:active:not(:disabled) { background: #cedfac; }
html[data-pager-theme="light"] .main-recipient-actions-v2 button:not(.primary):active:not(:disabled) { background: var(--pt-line); }
html[data-pager-theme="light"] .main-new-dialog-v2 button:focus-visible {
  outline: 2px solid var(--pt-accent);
  outline-offset: -2px;
}
html[data-pager-theme="light"] .main-new-dialog-v2 button:disabled,
html[data-pager-theme="light"] .main-new-dialog-v2 input:disabled { opacity: .55; }

/* Conversation chrome and message metadata. */
html[data-pager-theme="light"] .conversation-head-v2 { border-color: var(--pt-line); }
html[data-pager-theme="light"] .conversation-nav-v2,
html[data-pager-theme="light"] .conversation-add-contact-v2 { color: var(--pt-accent); }
html[data-pager-theme="light"] .conversation-add-contact-v2:hover {
  color: var(--pt-accent);
  background: var(--pt-surface-alt);
}
html[data-pager-theme="light"] .conversation-nav-v2:active:not(:disabled) { background: var(--pt-surface-alt); }
html[data-pager-theme="light"] .conversation-nav-v2:focus-visible {
  outline: 2px solid var(--pt-accent);
  outline-offset: -2px;
}
html[data-pager-theme="light"] .conversation-nav-v2:disabled { opacity: .55; }
html[data-pager-theme="light"] .conversation-peer-copy-v2 strong { color: var(--pt-text); }
html[data-pager-theme="light"] .conversation-peer-copy-v2 strong.is-public { color: var(--pt-gold); }
html[data-pager-theme="light"] .conversation-day-v2,
html[data-pager-theme="light"] .conversation-time-break-v2,
html[data-pager-theme="light"] #app.main-conversation-v2-mode .empty { color: var(--pt-muted); }
html[data-pager-theme="light"] #app.main-conversation-v2-mode .histlist {
  background: none;
}
html[data-pager-theme="light"] .conversation-call-card-v2 {
  color: var(--pt-text);
  background: var(--pt-surface-alt);
  border-color: var(--pt-line);
}
html[data-pager-theme="light"] .conversation-call-card-v2 > svg { color: var(--pt-accent); }
html[data-pager-theme="light"] .conversation-call-card-v2.missed,
html[data-pager-theme="light"] .conversation-call-card-v2.missed > svg { color: var(--pt-danger); }
html[data-pager-theme="light"] .conversation-call-detail-v2 > time { color: var(--pt-muted-strong, #5c674f); }
html[data-pager-theme="light"] .conversation-bubble-v2 {
  color: var(--pt-text);
  background: var(--pt-surface-alt);
}
html[data-pager-theme="light"] .conversation-message-v2.out .conversation-bubble-v2 {
  color: var(--pt-on-accent);
  background: var(--pt-accent-soft);
}
html[data-pager-theme="light"] .conversation-meta-v2,
html[data-pager-theme="light"] .conversation-message-v2.out .conversation-meta-v2 { color: var(--pt-muted-strong, #5c674f); }
html[data-pager-theme="light"] .conversation-state-v2.delivery.read,
html[data-pager-theme="light"] .conversation-graffiti-bubble-v2 .conversation-state-v2.delivery.read,
html[data-pager-theme="light"] .conversation-photo-bubble-v2 .conversation-state-v2.delivery.read { color: #277b44; }
html[data-pager-theme="light"] .conversation-state-v2.liked { color: #9d484c; }
html[data-pager-theme="light"] .conversation-like-badge-v2,
html[data-pager-theme="light"] .conversation-message-v2.out .conversation-like-badge-v2,
html[data-pager-theme="light"] .conversation-message-v2.out .conversation-graffiti-bubble-v2 .conversation-like-badge-v2,
html[data-pager-theme="light"] .conversation-message-v2.out .conversation-photo-bubble-v2 .conversation-like-badge-v2 {
  color: #9d484c;
}
html[data-pager-theme="light"] .conversation-reaction-anchor-v2:active { filter: none; }
html[data-pager-theme="light"] .conversation-reaction-anchor-v2:focus-visible { outline-color: var(--pt-accent); }
html[data-pager-theme="light"] .conversation-recovery-v2 { color: var(--pt-danger); }
html[data-pager-theme="light"] .conversation-recovery-v2 button { color: var(--pt-accent); }
html[data-pager-theme="light"] .conversation-recovery-v2 button:active:not(:disabled) { background: var(--pt-surface-alt); }
html[data-pager-theme="light"] .conversation-recovery-v2 button:focus-visible {
  outline: 2px solid var(--pt-accent);
  outline-offset: -2px;
}
html[data-pager-theme="light"] .conversation-message-v2 .conversation-graffiti-bubble-v2,
html[data-pager-theme="light"] .conversation-message-v2.out .conversation-graffiti-bubble-v2,
html[data-pager-theme="light"] .conversation-message-v2 .conversation-photo-bubble-v2,
html[data-pager-theme="light"] .conversation-message-v2.out .conversation-photo-bubble-v2 {
  color: var(--pt-text);
  background: transparent;
}
html[data-pager-theme="light"] .conversation-message-v2.out .conversation-graffiti-bubble-v2 .conversation-meta-v2,
html[data-pager-theme="light"] .conversation-message-v2.out .conversation-photo-bubble-v2 .conversation-meta-v2 { color: var(--pt-muted); }

/* Playback controls are distinct from the message surface in both directions. */
html[data-pager-theme="light"] .conversation-message-v2 .conversation-melody-play-v2,
html[data-pager-theme="light"] .conversation-message-v2 .conversation-voice-play-v2,
html[data-pager-theme="light"] .conversation-message-v2.out .conversation-melody-play-v2,
html[data-pager-theme="light"] .conversation-message-v2.out .conversation-voice-play-v2 {
  border-color: rgba(83,110,55,.22);
  color: var(--pt-accent);
  background: rgba(255,254,249,.6);
}
html[data-pager-theme="light"] .conversation-message-v2 .conversation-melody-play-v2.playing,
html[data-pager-theme="light"] .conversation-message-v2 .conversation-voice-play-v2.playing,
html[data-pager-theme="light"] .conversation-message-v2.out .conversation-melody-play-v2.playing,
html[data-pager-theme="light"] .conversation-message-v2.out .conversation-voice-play-v2.playing {
  border-color: var(--pt-accent);
  color: var(--pt-surface);
  background: var(--pt-accent);
}
html[data-pager-theme="light"] .conversation-message-v2 .conversation-melody-play-v2:focus-visible,
html[data-pager-theme="light"] .conversation-message-v2 .conversation-voice-play-v2:focus-visible { outline-color: var(--pt-accent); }
html[data-pager-theme="light"] .conversation-message-v2 .conversation-melody-play-v2:active:not(.playing):not(:disabled),
html[data-pager-theme="light"] .conversation-message-v2 .conversation-voice-play-v2:active:not(.playing):not(:disabled) { background: var(--pt-surface); }
html[data-pager-theme="light"] .conversation-message-v2 .conversation-melody-play-v2:disabled,
html[data-pager-theme="light"] .conversation-message-v2 .conversation-voice-play-v2:disabled { opacity: .55; }
html[data-pager-theme="light"] .conversation-melody-detail-v2,
html[data-pager-theme="light"] .conversation-message-v2.out .conversation-melody-detail-v2,
html[data-pager-theme="light"] .conversation-voice-duration-v2,
html[data-pager-theme="light"] .conversation-message-v2.out .conversation-voice-duration-v2 { color: var(--pt-muted-strong, #5c674f); }
html[data-pager-theme="light"] .conversation-voice-detail-v2,
html[data-pager-theme="light"] .conversation-message-v2.out .conversation-voice-detail-v2 { color: #748166; }
html[data-pager-theme="light"] .conversation-voice-wave-v2 i.played,
html[data-pager-theme="light"] .conversation-message-v2.out .conversation-voice-wave-v2 i.played { color: var(--pt-accent); }

/* Composer, recording and attachment menu. ID specificity mirrors the existing CSS. */
html[data-pager-theme="light"] body.dock #app.main-conversation-v2-mode > #pagerComposer {
  border-color: var(--pt-line);
  background: var(--pt-bg);
  box-shadow: 0 -8px 22px rgba(53,66,39,.05);
}
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .io { background: var(--pt-surface-alt); }
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .io:focus-within {
  box-shadow: inset 0 0 0 1px rgba(83,110,55,.5);
}
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .io textarea {
  color: var(--pt-text);
  -webkit-text-fill-color: var(--pt-text);
  caret-color: var(--pt-accent);
  scrollbar-color: var(--pt-line) transparent;
}
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .io textarea::placeholder {
  color: var(--pt-muted-strong, #5c674f);
  -webkit-text-fill-color: var(--pt-muted-strong, #5c674f);
  opacity: 1;
}
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer #attachBtn,
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .voice-record-cancel-v2,
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .voice-record-wave-v2 { color: var(--pt-accent); }
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .voice-record-time-v2 { color: var(--pt-text); }
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .voice-record-dot-v2 { background: var(--pt-danger); }
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .voice-record-cancel-v2:active:not(:disabled) {
  color: var(--pt-danger);
  background: #f2e2dc;
}
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .send button,
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .send button.sending,
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .send button.sent {
  color: var(--pt-on-accent);
  background: var(--pt-accent-soft);
}
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .send button[data-mode="mic"],
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .send button[data-mode="mic-pending"] {
  color: var(--pt-accent);
  background: var(--pt-surface-alt);
}
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .send button.failed {
  color: var(--pt-danger);
  background: #f2e2dc;
}
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .send button:active:not(:disabled) { background: #cedfac; }
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .send button[data-mode="mic"]:active:not(:disabled) { background: var(--pt-line); }
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .send button:disabled { opacity: .55; }
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer button:focus-visible {
  outline: 2px solid var(--pt-accent);
  outline-offset: -2px;
}
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .attach-menu {
  color: var(--pt-text);
  background: var(--pt-surface);
  box-shadow: 0 10px 30px rgba(53,66,39,.16), 0 0 0 1px var(--pt-line);
}
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .attach-menu button { color: var(--pt-text); }
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .attach-menu svg { color: var(--pt-accent); }
html[data-pager-theme="light"] #app.main-conversation-v2-mode #pagerComposer .attach-menu button:active:not(:disabled) {
  color: var(--pt-text);
  background: var(--pt-surface-alt);
}

/* Local feedback remains legible over both milk and pistachio surfaces. */
html[data-pager-theme="light"] .toast.conversation-toast-v2 {
  border-color: var(--pt-line);
  color: var(--pt-text);
  background: var(--pt-surface);
  box-shadow: 0 8px 24px rgba(53,66,39,.14);
}
html[data-pager-theme="light"] .toast.conversation-toast-v2.failed,
html[data-pager-theme="light"] .main-receive-feedback-v2 {
  border-color: #dac2b3;
  color: #854333;
  background: #f6eade;
  box-shadow: 0 8px 24px rgba(53,66,39,.14);
}

/* Light Pager surfaces. Theme selection keeps Feed and classic Pager dark. */
html[data-pager-theme="light"] :is(#mainSystemV2, #askOv, #contactOv, #registrationOv, #numberOv, #avatarPhotoOvV2, #drawOv, #melodyOv, #enableOv, #notifyOv, #permOv, #rulesOv),
html[data-pager-theme="light"] #feedProfileOv.settings-identity-v3 {
  background: var(--pt-overlay);
}
html[data-pager-theme="light"] :is(#askOv, #contactOv, #registrationOv, #numberOv, #drawOv, #melodyOv, #enableOv, #notifyOv, #permOv, #rulesOv).backdrop .sheet,
html[data-pager-theme="light"] #mainSystemV2 .main-system-sheet-v2,
html[data-pager-theme="light"] #avatarPhotoOvV2 .avatar-photo-sheet-v2,
html[data-pager-theme="light"] #feedProfileOv.settings-identity-v3 .feed-profile-sheet-v2,
html[data-pager-theme="light"] .callcard .inner {
  color: var(--pt-text);
  background: var(--pt-surface);
  border-color: var(--pt-line);
  box-shadow: 0 18px 60px rgba(47, 57, 34, .15);
}
html[data-pager-theme="light"] :is(#askOv, #contactOv, #registrationOv, #numberOv, #drawOv, #melodyOv, #enableOv, #notifyOv, #permOv).backdrop :is(h2, .askhead, .lotteryhead),
html[data-pager-theme="light"] #avatarPhotoTitleV2,
html[data-pager-theme="light"] #feedProfileOv.settings-identity-v3 .feed-profile-head-v2 h2,
html[data-pager-theme="light"] #mainSystemV2 .main-system-head-v2 h2 { color: var(--pt-text); }
html[data-pager-theme="light"] :is(#askOv, #contactOv, #registrationOv, #numberOv, #drawOv, #melodyOv, #enableOv, #permOv).backdrop .x,
html[data-pager-theme="light"] #mainSystemV2 .main-system-head-v2 button,
html[data-pager-theme="light"] #avatarPhotoOvV2 .avatar-photo-head-v2 button,
html[data-pager-theme="light"] #feedProfileOv.settings-identity-v3 .feed-profile-head-v2 button { color: var(--pt-accent); }

/* Settings: keep the hierarchy, switches and saved-avatar colors intact. */
html[data-pager-theme="light"] #mainSystemV2 .main-system-label-v3 { color: var(--pt-muted); }
html[data-pager-theme="light"] #mainSystemV2 .main-system-menu-v2 button { color: var(--pt-text); border-color: var(--pt-line); }
html[data-pager-theme="light"] #mainSystemV2 .main-system-menu-v2 :is(small, svg),
html[data-pager-theme="light"] #mainSystemV2 :is(.main-transfer-note-v2, .main-transfer-timer-v2, .main-transfer-ready-v2 > p),
html[data-pager-theme="light"] #mainSystemV2 .main-system-profile-v2 .main-profile-reset-v2 { color: var(--pt-muted); }
html[data-pager-theme="light"] #mainSystemV2 :is(.main-transfer-lead-v2, .main-transfer-timer-v2 strong) { color: var(--pt-text); }
html[data-pager-theme="light"] #mainSystemV2 .main-system-switch-v2 { background: var(--pt-surface-alt); border-color: #afb9a4; }
html[data-pager-theme="light"] #mainSystemV2 .main-system-switch-v2 > span { background: #8a957d; box-shadow: 0 1px 4px rgba(47,57,34,.15); }
html[data-pager-theme="light"] #mainSystemV2 .main-system-toggle-v2[aria-checked="true"] .main-system-switch-v2 { background: var(--pt-accent); border-color: var(--pt-accent); }
html[data-pager-theme="light"] #mainSystemV2 .main-system-toggle-v2[aria-checked="true"] .main-system-switch-v2 > span { background: var(--pt-surface); }
html[data-pager-theme="light"] #mainSystemV2 :is(.main-profile-actions-v2 button, .main-transfer-link-v2) { color: var(--pt-text); background: var(--pt-surface-alt); }
html[data-pager-theme="light"] #mainSystemV2 .main-transfer-link-v2 svg { color: var(--pt-accent); }
html[data-pager-theme="light"] #mainSystemV2 :is(.main-transfer-create-v2, .main-transfer-renew-v3) { color: var(--pt-on-accent); background: var(--pt-accent-soft); }
html[data-pager-theme="light"] #mainSystemV2 :is(.settings-error-v4, .main-transfer-error-v3) { color: var(--pt-danger); }
html[data-pager-theme="light"] #mainSystemV2 :is(.main-system-head-v2, .main-system-menu-v2) button:not(:disabled):active { background: var(--pt-surface-alt); }

/* Username editor belongs to settings only; Feed's original editor is untouched. */
html[data-pager-theme="light"] #feedProfileOv.settings-identity-v3 .feed-nickname-field-v2 input {
  color: var(--pt-text); background: var(--pt-bg); border-color: var(--pt-line); caret-color: var(--pt-accent);
}
html[data-pager-theme="light"] #feedProfileOv.settings-identity-v3 .feed-nickname-field-v2 input::placeholder { color: var(--pt-muted); }
html[data-pager-theme="light"] #feedProfileOv.settings-identity-v3 .feed-nickname-field-v2 input:focus { border-color: var(--pt-accent); box-shadow: 0 0 0 3px rgba(83,110,55,.12); }
html[data-pager-theme="light"] #feedProfileOv.settings-identity-v3 :is(.feed-nickname-state-v2, .feed-nickname-rules-v2) { color: var(--pt-muted); }
html[data-pager-theme="light"] #feedProfileOv.settings-identity-v3 .feed-nickname-state-v2.ok { color: var(--pt-muted); }
html[data-pager-theme="light"] #feedProfileOv.settings-identity-v3 .feed-nickname-state-v2.err { color: var(--pt-danger); }
html[data-pager-theme="light"] #feedProfileOv.settings-identity-v3 .main-profile-reset-v2 { color: var(--pt-danger); background: transparent; }
html[data-pager-theme="light"] #feedProfileOv.settings-identity-v3 .feed-profile-head-v2 button:active:not(:disabled) { background: var(--pt-surface-alt); }

/* Confirmations: semantic color differentiates destructive and ordinary actions. */
html[data-pager-theme="light"] #askOv.backdrop :is(.asktext, .main-chat-confirm-detail-v2, .main-chat-confirm-note-v2, .contact-confirm-note-v2, .contact-confirm-number-v2),
html[data-pager-theme="light"] #askOv.backdrop .asktext .call-confirm-number-v2 { color: var(--pt-muted); }
html[data-pager-theme="light"] #askOv.backdrop :is(.asktext b, .main-chat-confirm-name-v2, .call-confirm-name-v2, .contact-confirm-name-v2) { color: var(--pt-text); }
html[data-pager-theme="light"] #askOv.backdrop .call-confirm-username-v2 { color: var(--pt-gold); }
html[data-pager-theme="light"] #askOv.backdrop .askno { color: var(--pt-text); background: var(--pt-surface-alt); border-color: var(--pt-line); box-shadow: none; }
html[data-pager-theme="light"] #askOv.backdrop .askyes { color: var(--pt-on-accent); background: var(--pt-accent-soft); border-color: var(--pt-line); box-shadow: none; }
html[data-pager-theme="light"] #askOv.backdrop .askyes.danger { color: var(--pt-danger); background: #f5e6df; border-color: #ddbaad; }

/* Contact labels, including validation and the local/public identity distinction. */
html[data-pager-theme="light"] #contactOv :is(#dlgPeerNameV2, .dlg input) { color: var(--pt-text); }
html[data-pager-theme="light"] #contactOv #dlgPeerNameV2.public-name-v2 { color: var(--pt-gold); }
html[data-pager-theme="light"] #contactOv :is(#dlgPeerNumberV2, .dlg label, #dlgHintV2) { color: var(--pt-muted); }
html[data-pager-theme="light"] #contactOv .dlg input { background: var(--pt-bg); border-color: var(--pt-line); caret-color: var(--pt-accent); }
html[data-pager-theme="light"] #contactOv .dlg input::placeholder { color: var(--pt-muted); }
html[data-pager-theme="light"] #contactOv #dlgErrorV2 { color: var(--pt-danger); }
html[data-pager-theme="light"] #contactOv .dlg .save { color: var(--pt-on-accent); background: var(--pt-accent-soft); }
html[data-pager-theme="light"] #contactOv .dlg .cancel { color: var(--pt-text); background: var(--pt-surface-alt); }

/* Permissions, registration, receive gate and lottery chrome. Scratch canvas is content. */
html[data-pager-theme="light"] :is(#registrationOv, #enableOv, #notifyOv, #permOv, #numberOv).backdrop :is(.regtext, #enableText, #notifyText, #permText, .lotteryhint) { color: var(--pt-muted); }
html[data-pager-theme="light"] :is(#registrationOv, #enableOv, #notifyOv, #permOv, #numberOv).backdrop .pager-notice-icon-v3 { color: var(--pt-accent); background: var(--pt-accent-soft); }
html[data-pager-theme="light"] :is(#enableOv, #notifyOv, #permOv, #numberOv).backdrop .okbtn { color: var(--pt-on-accent); background: var(--pt-accent-soft); border-color: var(--pt-line); box-shadow: none; }
html[data-pager-theme="light"] #notifyOv.backdrop #notifyLater { color: var(--pt-text); background: var(--pt-surface-alt); }

/* Help and transfer are readable paper cards, including onboarding and claim states. */
html[data-pager-theme="light"] #rulesOv .ruleslcd { color: var(--pt-text); background: transparent; box-shadow: none; scrollbar-color: #a4b095 transparent; }
html[data-pager-theme="light"] #rulesOv.pager-help-v3 :is(#rulesHeaderTitleV4, .rulessteps strong, .rulescopy h3, .rulesheading h2, .rulessubhead h2, .rulesmenu strong, .transfer-number, .rulesnote strong) { color: var(--pt-text); }
html[data-pager-theme="light"] #rulesOv :is(.ruleschrome, .ruleschrome .x, .rules-header-back-v4, .rulesnum, .rulesmore, .ruleskicker, .rulessubhead p, .rulesmenu small, .rulesmenu i, .transfer-ticket label, .transfer-ticket p, .transfer-status, .transfer-eyebrow) { color: var(--pt-muted); }
html[data-pager-theme="light"] #rulesOv.pager-help-v3 :is(.ruleschrome .x, .rules-header-back-v4) { color: var(--pt-accent); }
html[data-pager-theme="light"] #rulesOv.pager-help-v3 :is(.rulessteps li, .rulessubhead, .rulesflow li, .rulesflow li > span, .rulesdefinitions div, .rulescommand, .rulesmenu button) { border-color: var(--pt-line); }
html[data-pager-theme="light"] #rulesOv.pager-help-v3 .rulesmenu button { color: var(--pt-text); background: transparent; }
html[data-pager-theme="light"] #rulesOv.pager-help-v3 :is(.rulesnote, .transfer-ticket) { color: var(--pt-text); background: var(--pt-surface-alt); border-color: var(--pt-line); }
html[data-pager-theme="light"] #rulesOv.pager-help-v3 :is(.rulescommand code, .rulesflow li > span) { color: var(--pt-accent); background: var(--pt-accent-soft); }
html[data-pager-theme="light"] #rulesOv.pager-help-v3 .transfer-ticket input { color: var(--pt-text); background: var(--pt-surface); border-color: var(--pt-line); }
html[data-pager-theme="light"] #rulesOv.pager-help-v3 :is(.okbtn, .transfer-primary) { color: var(--pt-on-accent); background: var(--pt-accent-soft); box-shadow: none; }
html[data-pager-theme="light"] #rulesOv.pager-help-v3 .transfer-actions button { color: var(--pt-text); background: var(--pt-surface); border-color: var(--pt-line); }
html[data-pager-theme="light"] #rulesOv.pager-help-v3 .transfer-ticket :is(label, p) { color: var(--pt-muted-strong); }
html[data-pager-theme="light"] #rulesOv.pager-help-v3 button:not(:disabled):active { background-color: var(--pt-surface-alt); }

/* Incoming/active call controls. Avatars stay transparent, without image filters. */
html[data-pager-theme="light"] .callcard :is(.cmeta, .call-panel-number-v2) { color: var(--pt-muted); }
html[data-pager-theme="light"] .callcard .cbody { color: var(--pt-text); }
html[data-pager-theme="light"] .callcard .cbody.call-panel-username-v2 { color: var(--pt-gold); }
html[data-pager-theme="light"] .callcard .answer,
html[data-pager-theme="light"] #cbMute[aria-pressed="true"] { color: var(--pt-on-accent); background: var(--pt-accent-soft); border-color: var(--pt-accent); }
html[data-pager-theme="light"] .callcard .dismiss { color: var(--pt-text); background: var(--pt-surface-alt); border-color: var(--pt-line); }
html[data-pager-theme="light"] .callcard .call-panel-hang-v2 { color: var(--pt-danger); background: #f5e6df; border-color: #ddbaad; }

/* Photo/graffiti media retain their original rendering; only editor controls change. */
html[data-pager-theme="light"] #avatarPhotoOvV2 :is(.avatar-photo-zoom-v2, #avatarPhotoStatusV2) { color: var(--pt-muted); }
html[data-pager-theme="light"] #avatarPhotoOvV2 .avatar-photo-zoom-v2 input { accent-color: var(--pt-accent); }
html[data-pager-theme="light"] #avatarPhotoChooseV2 { color: var(--pt-text); background: var(--pt-surface-alt); }
html[data-pager-theme="light"] #avatarPhotoSaveV2 { color: var(--pt-on-accent); background: var(--pt-accent-soft); }
html[data-pager-theme="light"] #drawOv.backdrop :is(.drawclear, .drawcancel) { color: var(--pt-text); background: var(--pt-surface-alt); border-color: var(--pt-line); }
html[data-pager-theme="light"] #drawOv.backdrop .drawsheet.photo-preview .drawclear:active:not(:disabled) { background: var(--pt-accent-soft); }
html[data-pager-theme="light"] #drawOv.backdrop .drawsend { color: var(--pt-on-accent); background: var(--pt-accent-soft); border-color: var(--pt-line); }
html[data-pager-theme="light"] #drawOv.backdrop .drawprivacy { color: var(--pt-muted); }
html[data-pager-theme="light"] #drawOv.backdrop .palette button { border-color: var(--pt-line); }
html[data-pager-theme="light"] #drawOv.backdrop .palette button.on { outline-color: var(--pt-accent); }

/* Melody sequencer and musical keyboard keep distinct white/black keys. */
html[data-pager-theme="light"] #melodyOv :is(.melody-preset-label, .melody-chip small, .melody-chip.pause) { color: var(--pt-muted); }
html[data-pager-theme="light"] #melodyOv :is(.melody-preset, .melody-sequence) { color: var(--pt-text); background: var(--pt-bg); border-color: var(--pt-line); scrollbar-color: #a4b095 transparent; }
html[data-pager-theme="light"] #melodyOv .melody-sequence.empty { color: var(--pt-muted); }
html[data-pager-theme="light"] #melodyOv :is(.melody-chip, .melody-tools button, .octave-arrow, .melody-cancel, .melody-preview) { color: var(--pt-text); background: var(--pt-surface-alt); border-color: var(--pt-line); }
html[data-pager-theme="light"] #melodyOv .melody-chip :is(small),
html[data-pager-theme="light"] #melodyOv .melody-chip.pause { color: var(--pt-muted-strong); }
html[data-pager-theme="light"] #melodyOv :is(.melody-tools button.on, .melody-preview.playing, .melody-send) { color: var(--pt-on-accent); background: var(--pt-accent-soft); border-color: var(--pt-accent); box-shadow: none; }
html[data-pager-theme="light"] #melodyOv .piano-key:not(.black) { color: var(--pt-text); background: linear-gradient(180deg, #fffef9, #e8ebdf); border-color: #aeb7a3; }
html[data-pager-theme="light"] #melodyOv .piano-key.black { color: #f0f2e7; background: linear-gradient(180deg, #414b38, #25301f); border-color: #25301f; box-shadow: 0 3px 4px rgba(47,57,34,.2); }

html[data-pager-theme="light"] .toast,
html[data-pager-theme="light"] .toast.pager-toast-v3 { color: var(--pt-text); background: var(--pt-surface); border-color: #b6c4a3; box-shadow: 0 8px 28px rgba(47,57,34,.16); }
html[data-pager-theme="light"] .toast.failed { color: var(--pt-danger); background: #fcf0e9; border-color: #ddbaad; }

/* A saved light preference also applies to the installation/registration shell. */
html[data-pager-theme="light"] #preinstall :is(h1, .tagline b, .step span i) { color: var(--pt-text); }
html[data-pager-theme="light"] #preinstall :is(.stagechip, .tagline, .wraptext, .undercta, .step) { color: var(--pt-muted); }
html[data-pager-theme="light"] #preinstall :is(.step .ic, .undercta a) { color: var(--pt-accent); }
html[data-pager-theme="light"] #preinstall .step { border-color: var(--pt-line); }
html[data-pager-theme="light"] #preinstall .linkrow .lnk { color: var(--pt-text); background: var(--pt-surface); border-color: var(--pt-line); }
html[data-pager-theme="light"] #preinstall .linkrow button { color: var(--pt-accent); background: var(--pt-surface-alt); border-color: var(--pt-line); }
html[data-pager-theme="light"] #preinstall .installBanner { color: var(--pt-on-accent); background: var(--pt-accent-soft); border-color: var(--pt-line); box-shadow: 0 5px 16px rgba(47,57,34,.1); }
html[data-pager-theme="light"] #preinstall .installBanner.note { color: var(--pt-muted-strong); background: var(--pt-surface-alt); }
html[data-pager-theme="light"] #preinstall :is(a, button):focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 3px; }

/* A focused control must stay apparent on light cards; disabled state stays non-interactive. */
html[data-pager-theme="light"] :is(#mainSystemV2, #askOv, #contactOv, #registrationOv, #numberOv, #avatarPhotoOvV2, #drawOv, #melodyOv, #enableOv, #notifyOv, #permOv, #rulesOv, #feedProfileOv) :is(button, input, select, a, canvas):focus-visible,
html[data-pager-theme="light"] .callcard button:focus-visible { outline: 2px solid var(--pt-accent); }
html[data-pager-theme="light"] :is(#avatarPhotoOvV2, #drawOv, #melodyOv) button:disabled,
html[data-pager-theme="light"] #feedProfileOv.settings-identity-v3 .feed-profile-head-v2 button:disabled { opacity: .5; }

/* Эфир: общий разговор, отдельная публикация и те же две темы, что в Чатах. */
#app.main-feed-v2-mode {
  --feed-action-bg: var(--pt-accent);
  --feed-like: #ce8279;
  color: var(--pt-text);
}
html[data-pager-theme="light"] #app.main-feed-v2-mode {
  --feed-action-bg: var(--pt-accent-soft);
  --feed-like: #9d484c;
}
#app.main-feed-v2-mode > .device > .glass,
#app.main-feed-thread-v2-mode > .feed-thread-v2,
#app.main-feed-v2-mode > #feedComposer { color: var(--pt-text); background: var(--pt-bg); }
#app.main-feed-v2-mode .feed-screen { color: var(--pt-text); }
#feedOverviewV7 { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 54px; padding: 7px 0 3px 2px; color: var(--pt-muted); font-size: 13px; line-height: 1.45; }
#feedOverviewV7 p { margin: 0; }
#feedAboutV7 { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; color: var(--pt-muted); background: transparent; font: 500 17px/1 Georgia, serif; cursor: pointer; }
#feedAboutV7:active { background: var(--pt-surface-alt); }
#app.main-feed-v2-mode .feed-list { padding-bottom: 8px; }
#app.main-feed-v2-mode .feed-post.feed-topic-v2 { padding-top: 14px; padding-bottom: 13px; border-color: var(--pt-line); }
#app.main-feed-v2-mode .pager-avatar-v2,
#feedAuthorOvV7 .pager-avatar-v2 { background: transparent; }
#app.main-feed-v2-mode .feed-author-line-v2,
#app.main-feed-v2-mode .feed-topic-last-author-v2 { color: var(--pt-text); }
#app.main-feed-v2-mode .feed-author-line-v2 strong { font-size: 15px; font-weight: 650; letter-spacing: 0; }
#app.main-feed-v2-mode .feed-author-line-v2.is-public strong,
#app.main-feed-v2-mode .feed-author-line-v2 strong.is-public,
#app.main-feed-v2-mode .feed-topic-last-author-v2.is-public strong { color: var(--pt-gold); }
#app.main-feed-v2-mode .feed-status-badge-v2 { color: var(--pt-accent); }
#app.main-feed-v2-mode .feed-topic-meta-v2 time,
#app.main-feed-v2-mode .feed-thread-entry-meta-v2 time { color: var(--pt-muted); font-size: 11px; }
#app.main-feed-v2-mode .feed-topic-unread-v2 { background: var(--pt-accent); box-shadow: none; }
#app.main-feed-v2-mode .feed-topic-v2 .post-text,
#app.main-feed-thread-v2-mode .feed-thread-v2 .post-text {
  margin-top: 5px;
  color: var(--pt-text);
  font-size: 16px;
  line-height: 1.45;
}
#app.main-feed-v2-mode .feed-topic-v2 .post-graffiti-frame { background: transparent; }
#app.main-feed-v2-mode .feed-topic-v2 .post-actions { min-height: 44px; margin: 3px 0 -4px -8px; }
#app.main-feed-v2-mode .feed-topic-v2 .post-action,
#app.main-feed-thread-v2-mode .feed-thread-v2 .post-action {
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  color: var(--pt-muted);
  font-size: 12px;
  font-weight: 500;
}
#app.main-feed-v2-mode .feed-topic-v2 .post-action.liked,
#app.main-feed-thread-v2-mode .feed-thread-v2 .post-action.liked { color: var(--feed-like); }
#app.main-feed-v2-mode :is(.post-action, .feed-thread-back-v2, .feed-replies-older-v2):active:not(:disabled) { background: var(--pt-surface-alt); }
#app.main-feed-v2-mode .feed-topic-last-v2 { gap: 5px; margin-top: 3px; color: var(--pt-muted); font-size: 13px; line-height: 1.4; }
#app.main-feed-v2-mode .feed-topic-last-author-v2 { color: var(--pt-muted-strong); }
#app.main-feed-v2-mode .feed-topic-last-author-v2 strong { font-size: 13px; font-weight: 550; }
#app.main-feed-v2-mode .post-melody { gap: 10px; }
#app.main-feed-v2-mode .feed-topic-v2 .post-melody-play,
#app.main-feed-thread-v2-mode .feed-thread-v2 .post-melody-play { color: var(--pt-accent); background: var(--pt-surface-alt); }
#app.main-feed-v2-mode .feed-topic-v2 .post-melody-copy strong,
#app.main-feed-thread-v2-mode .feed-thread-v2 .post-melody-copy strong { color: var(--pt-text); font-size: 15px; font-weight: 550; }
#app.main-feed-v2-mode .feed-topic-v2 .post-melody-copy small,
#app.main-feed-thread-v2-mode .feed-thread-v2 .post-melody-copy small { color: var(--pt-muted); font-size: 12px; }
#app.main-feed-v2-mode .feed-skeleton-row-v2 { border-color: var(--pt-line); }
#app.main-feed-v2-mode :is(.feed-skeleton-avatar-v2, .feed-skeleton-copy-v2 i) { background: var(--pt-surface-alt); }
#app.main-feed-v2-mode :is(.feed-empty, .feed-state, .feed-thread-empty-v2, .feed-thread-state-v2) {
  color: var(--pt-muted);
  background: transparent;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
}
#app.main-feed-v2-mode .feed-empty { min-height: 180px; padding: 42px 20px; text-transform: none; }
#app.main-feed-v2-mode .feed-empty strong { display: block; margin-bottom: 8px; color: var(--pt-text); font-size: 18px; font-weight: 600; }
#app.main-feed-v2-mode .feed-identity-prompt-v2 { min-height: 68px; padding: 8px 0; color: var(--pt-text); border-color: var(--pt-line); background: transparent; }
#app.main-feed-v2-mode .feed-identity-prompt-v2 > svg { color: var(--pt-muted); }
#app.main-feed-v2-mode .feed-identity-prompt-v2 strong { font-size: 15px; font-weight: 550; }

/* The overview has one explicit action; the existing composer belongs to a reply or a draft. */
#feedCreateV7,
#feedDraftV7 { display: none; }
#app.main-feed-v2-mode:not(.main-feed-thread-v2-mode):not(.feed-compose-open-v7) > #feedComposer { display: none !important; }
#app.main-feed-v2-mode:not(.main-feed-thread-v2-mode):not(.feed-compose-open-v7) > #feedCreateV7 {
  grid-row: 3;
  display: flex;
  justify-content: flex-end;
  padding: 12px 0 max(12px, var(--feed-safe-bottom));
  background: var(--pt-bg);
}
#feedNewPostV7 {
  min-width: 190px;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  border: 0;
  border-radius: 28px;
  color: var(--pt-on-accent);
  background: var(--feed-action-bg);
  box-shadow: 0 6px 18px rgba(0,0,0,.16);
  font: 600 14px/1.2 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
  cursor: pointer;
}
#feedNewPostV7 svg { width: 20px; height: 20px; flex: none; }
#feedNewPostV7:active:not(:disabled) { box-shadow: 0 2px 5px rgba(0,0,0,.12); }
html[data-pager-theme="light"] #feedNewPostV7 { box-shadow: 0 6px 18px rgba(53,66,39,.1); }

#app.main-feed-v2-mode .feed-thread-head-v2 { grid-template-columns: 44px minmax(0,1fr) 12px; gap: 6px; padding: 4px 0; border-color: var(--pt-line); }
#app.main-feed-v2-mode .feed-thread-back-v2 { color: var(--pt-accent); border-radius: 12px; }
#app.main-feed-v2-mode .feed-thread-title-v2 { justify-content: flex-start; }
#app.main-feed-v2-mode .feed-thread-title-v2 > span { width: 100%; gap: 3px; }
#app.main-feed-v2-mode .feed-thread-title-v2 strong { width: 100%; max-width: none; color: var(--pt-text); font-size: 16px; font-weight: 600; }
#app.main-feed-v2-mode .feed-thread-title-v2 small { color: var(--pt-muted); font-size: 11.5px; }
#app.main-feed-v2-mode :is(.feed-thread-root-v2, .feed-reply-v2) { border-color: var(--pt-line); }
#app.main-feed-v2-mode .feed-thread-entry-actions-v2 { margin-left: -8px; }
#app.main-feed-v2-mode .feed-thread-divider-v2 { padding-top: 20px; color: var(--pt-muted); font-size: 10px; font-weight: 600; letter-spacing: .08em; }
#app.main-feed-v2-mode .feed-replies-older-v2 { color: var(--pt-accent); border-radius: 12px; font-size: 13px; font-weight: 550; }
#app.main-feed-v2-mode > #feedComposer { border-color: var(--pt-line); }
#app.main-feed-v2-mode #feedComposer .feed-field { background: var(--pt-surface-alt); }
#app.main-feed-v2-mode #feedComposer textarea { color: var(--pt-text); -webkit-text-fill-color: var(--pt-text); caret-color: var(--pt-accent); scrollbar-width: none; }
#app.main-feed-v2-mode #feedComposer textarea::-webkit-scrollbar { display: none; }
#app.main-feed-v2-mode #feedComposer textarea::placeholder { color: var(--pt-muted); -webkit-text-fill-color: var(--pt-muted); opacity: 1; }
#app.main-feed-v2-mode #feedComposer #feedAttachBtn { color: var(--pt-accent); border-radius: 12px; }
#app.main-feed-v2-mode #feedComposer .feed-publish { color: var(--pt-on-accent); background: var(--feed-action-bg); }
#app.main-feed-v2-mode #feedComposer .feed-publish.sent { background: var(--feed-action-bg); }
#app.main-feed-v2-mode #feedComposer .feed-publish.failed { color: var(--pt-danger); background: var(--pt-surface-alt); }
#app.main-feed-v2-mode #feedComposer .feed-attach-menu { color: var(--pt-text); background: var(--pt-surface); box-shadow: 0 8px 28px rgba(0,0,0,.2), 0 0 0 1px var(--pt-line); }
#app.main-feed-v2-mode #feedComposer .feed-attach-menu button { color: var(--pt-text); font-size: 10px; font-weight: 550; }
#app.main-feed-v2-mode #feedComposer .feed-attach-menu svg { color: var(--pt-accent); }
#app.main-feed-v2-mode #feedComposer :is(#feedAttachBtn, .feed-attach-menu button):active:not(:disabled) { background: var(--pt-surface-alt); }
#app.main-feed-v2-mode #feedComposer .sline { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
#app.main-feed-v2-mode #feedComposer .sstatus { color: var(--pt-muted); font-size: 12px; line-height: 1.4; text-align: left; }
#app.main-feed-v2-mode #feedComposer .sstatus.err,
#app.main-feed-v2-mode #feedComposer .ccount.low { color: var(--pt-danger); }
#app.main-feed-v2-mode #feedComposer .sstatus.ok { color: var(--pt-accent); }
#app.main-feed-v2-mode #feedComposer .ccount { position: static; flex: none; margin-left: auto; color: var(--pt-muted); font-size: 11px; }

/* A draft is an ordinary page. Its editable region shrinks with the keyboard. */
#app.main-feed-v2-mode.feed-compose-open-v7 { grid-template-rows: auto minmax(0,1fr); }
#app.main-feed-v2-mode #mainReceiveV2 { display: none; }
#app.main-feed-v2-mode.feed-compose-open-v7 > :is(.main-home-v2, .device, #feedThreadV2, #feedCreateV7) { display: none !important; }
#app.main-feed-v2-mode.feed-compose-open-v7 > #feedDraftV7 { grid-row: 1; display: block; min-width: 0; }
#feedDraftHeadV7 { display: grid; grid-template-columns: 44px minmax(0,1fr) 12px; align-items: center; gap: 6px; min-height: 72px; padding: 4px 0 10px; border-bottom: 1px solid var(--pt-line); }
#feedDraftHeadV7 > :is(div, span) { min-width: 0; }
#feedDraftHeadV7 :is(h1, h2, strong) { color: var(--pt-text); font-size: 18px; font-weight: 600; line-height: 1.3; }
#feedDraftHeadV7 :is(p, small) { display: block; margin-top: 4px; color: var(--pt-muted); font-size: 12px; line-height: 1.4; }
#feedDraftHeadV7 button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; color: var(--pt-accent); background: transparent; cursor: pointer; }
#feedDraftHeadV7 button svg { width: 22px; height: 22px; }
#feedDraftHeadV7 button:active { background: var(--pt-surface-alt); }
#app.main-feed-v2-mode.feed-compose-open-v7 > #feedComposer { grid-row: 2; min-height: 0; display: flex !important; flex-direction: column; padding-top: 0; border-top: 0; }
#app.main-feed-v2-mode.feed-compose-open-v7 #feedComposer .panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#app.main-feed-v2-mode.feed-compose-open-v7 #feedComposer .feed-io { flex: 1; min-height: 0; grid-template-columns: minmax(0,1fr) 50px; grid-template-rows: minmax(0,1fr) 52px; align-items: end; column-gap: 8px; row-gap: 12px; }
#app.main-feed-v2-mode.feed-compose-open-v7 #feedComposer .feed-field { display: contents; }
#app.main-feed-v2-mode.feed-compose-open-v7 #feedComposer textarea { grid-column: 1 / -1; grid-row: 1; width: 100%; min-height: 0; height: 100% !important; max-height: none; padding: 22px 3px 12px; border-radius: 0; resize: none; font-size: 18px; line-height: 1.5; }
#app.main-feed-v2-mode.feed-compose-open-v7 #feedComposer .feed-attachwrap { position: relative; grid-column: 1; grid-row: 2; right: auto; bottom: auto; width: 50px; height: 50px; }
#app.main-feed-v2-mode.feed-compose-open-v7 #feedComposer #feedAttachBtn { width: 50px; height: 50px; background: var(--pt-surface-alt); border-radius: 17px; }
#app.main-feed-v2-mode.feed-compose-open-v7 #feedComposer .feed-publish { grid-column: 2; grid-row: 2; }
#app.main-feed-v2-mode.feed-compose-open-v7 #feedComposer .feed-attach-menu { right: auto; left: 0; bottom: calc(100% + 10px); width: min(300px, calc(100vw - 32px)); }

/* Public-author controls are distinct from the action that opens a discussion. */
#app.main-feed-v2-mode .feed-author-trigger-v7 { min-width: 0; min-height: 44px; display: inline-flex; align-items: center; padding: 0; border: 0; border-radius: 8px; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
#app.main-feed-v2-mode .feed-author-avatar-button-v7 { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 14px; background: transparent; cursor: pointer; }
#app.main-feed-v2-mode :is(.feed-author-trigger-v7, .feed-author-avatar-button-v7):active { opacity: .7; }
#app.main-feed-v2-mode :is(button, [role="button"]):focus-visible { outline: 2px solid var(--pt-accent); outline-offset: -2px; }

#feedAuthorOvV7 {
  align-items: center;
  padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  background: var(--pt-overlay);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif;
}
#feedAuthorOvV7 .feed-author-sheet-v7 { position: relative; width: min(100%, 388px); max-height: 100%; overflow-y: auto; padding: 24px; border: 1px solid var(--pt-line); border-radius: 24px; color: var(--pt-text); background: var(--pt-surface); box-shadow: 0 16px 48px rgba(0,0,0,.2); }
#feedAuthorOvV7 .feed-author-sheet-v7::before { display: none; }
#feedAuthorOvV7 .feed-author-head-v7 { min-height: 28px; margin-bottom: 16px; padding-right: 28px; color: var(--pt-muted); font-size: 12px; line-height: 1.4; }
#feedAuthorOvV7 .feed-author-avatar-v7 { width: 80px; height: 80px; margin: 4px auto 15px; border-radius: 22px; }
#feedAuthorNameV7 { display: block; min-width: 0; margin: 0; overflow-wrap: anywhere; color: var(--pt-text); font-size: 22px; font-weight: 650; line-height: 1.3; letter-spacing: 0; text-align: center; }
#feedAuthorNameV7.is-public { color: var(--pt-gold); }
#feedAuthorNumberV7 { display: block; margin-top: 6px; color: var(--pt-muted); font: 13px/1.4 ui-monospace, Menlo, Consolas, monospace; text-align: center; }
#feedAuthorStatusV7 { margin: 14px 0 0; color: var(--pt-muted); font-size: 13px; line-height: 1.5; text-align: center; }
#feedAuthorOvV7 :is(.x, #feedAuthorCloseV7) { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; color: var(--pt-muted); background: transparent; cursor: pointer; }
#feedAuthorOvV7 :is(.x, #feedAuthorCloseV7) svg { width: 20px; height: 20px; }
#feedAuthorActionV7 { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 50px; margin-top: 24px; padding: 12px; border: 0; border-radius: 16px; color: var(--pt-on-accent); background: #d7e5a3; box-shadow: none; font: 600 15px/1.3 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, system-ui, sans-serif; letter-spacing: 0; cursor: pointer; }
#feedAuthorActionV7 svg { width: 20px; height: 20px; }
html[data-pager-theme="light"] #feedAuthorActionV7 { background: var(--pt-accent-soft); }
#feedAuthorOvV7 button:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 3px; }
#feedAuthorOvV7 button:disabled { opacity: .5; cursor: default; }

/* The audience note uses the same simple card as the rest of Pager's notices. */
body.feed-info-v2-open #feedInfoOv { align-items: center; padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); background: var(--pt-overlay); }
body.feed-info-v2-open #feedInfoOv .sheet.feedinfo { width: min(100%, 388px); max-height: 100%; padding: 22px; border: 1px solid var(--pt-line); border-radius: 24px; color: var(--pt-text); background: var(--pt-surface); box-shadow: 0 16px 48px rgba(0,0,0,.2); }
body.feed-info-v2-open #feedInfoOv .sheet.feedinfo::before { display: none; }
body.feed-info-v2-open #feedInfoOv .feedinfo .x { top: 12px; right: 12px; color: var(--pt-muted); }
body.feed-info-v2-open #feedInfoOv .feedinfo h2 { justify-content: start; margin: 0 36px 14px 0; color: var(--pt-text); font-size: 21px; font-weight: 600; text-align: left; }
body.feed-info-v2-open #feedInfoOv .feedinfo p { color: var(--pt-text); font-size: 15px; line-height: 1.5; }
body.feed-info-v2-open #feedInfoOv .feedinfo .feedcontrast { color: var(--pt-muted); font-size: 13px; line-height: 1.5; }
body.feed-info-v2-open #feedInfoOv .feedinfo .okbtn { min-height: 50px; color: var(--pt-on-accent); font-weight: 600; }
html[data-pager-theme="light"] body.feed-info-v2-open #feedInfoOv .feedinfo .okbtn { background: var(--pt-accent-soft); }
body.feed-info-v2-open #feedInfoOv button:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 3px; }
#askOv.feed-ask-v2 .sheet.ask::before { display: none; }
#askOv.feed-ask-v2:not(.main-chat-ask-v2) { align-items: center; padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); background: var(--pt-overlay); }
#askOv.feed-ask-v2:not(.main-chat-ask-v2) .sheet.ask { width: min(100%, 388px); max-height: 100%; overflow-y: auto; padding: 24px 22px 22px; border: 1px solid var(--pt-line); border-radius: 24px; color: var(--pt-text); background: var(--pt-surface); box-shadow: 0 16px 48px rgba(0,0,0,.2); text-align: left; }
#askOv.feed-ask-v2:not(.main-chat-ask-v2) .askhead { color: var(--pt-text); font-size: 21px; font-weight: 600; }
#askOv.feed-ask-v2:not(.main-chat-ask-v2) .asktext { color: var(--pt-muted); font-size: 15px; line-height: 1.5; }
#askOv.feed-ask-v2:not(.main-chat-ask-v2) .askno { color: var(--pt-text); background: var(--pt-surface-alt); }
#askOv.feed-ask-v2:not(.main-chat-ask-v2) button:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 3px; }

@media (max-width: 350px) {
  #feedDraftHeadV7 { grid-template-columns: 40px minmax(0,1fr) 0; gap: 4px; }
  #feedDraftHeadV7 :is(h1, h2, strong) { font-size: 17px; }
  #feedDraftHeadV7 :is(p, small) { font-size: 11.5px; }
  #feedAuthorOvV7 .feed-author-sheet-v7 { padding: 22px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  #app.main-feed-v2-mode :is(#feedNewPostV7, .feed-author-trigger-v7, .feed-author-avatar-button-v7) { transition: none; }
}

/* Shared soft error strips. Existing forms retain their own error lifecycle. */
:root {
  --pager-ui-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --pager-ui-title-size: 20px;
  --pager-ui-label-size: 16px;
  --pager-ui-body-size: 15px;
  --pager-ui-note-size: 13px;
  --pager-ui-title-weight: 600;
  --pager-ui-control-height: 48px;
  --pager-ui-control-radius: 14px;
  --pager-ui-panel-radius: 24px;
  --pager-error-bg-v4: #1c2118;
  --pager-error-text-v4: var(--pt-text);
  --pager-error-muted-v4: var(--pt-muted);
}
html[data-pager-theme="light"] {
  --pager-error-bg-v4: #eceee5;
}
:root :is(
  #toast.pager-error-v4,
  #contactOv #dlgErrorV2,
  #mainRecipientExactV2 .contact-save-error-v2,
  #mainSystemV2 .settings-error-v4,
  #mainSystemV2 .main-transfer-error-v3,
  #mainSystemUpdateStatusV1[data-error="true"],
  #mainTransferStatusV2[data-error="true"],
  #transferClaimStatus[data-error="true"],
  .main-recipient-empty-v2[data-error="true"],
  #feedProfileOv.settings-identity-v3 .feed-nickname-state-v2.err,
  #avatarPhotoStatusV2.error,
  .main-receive-feedback-v2
):not(:empty) {
  box-sizing: border-box;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  color: var(--pager-error-text-v4);
  background: var(--pager-error-bg-v4);
  box-shadow: none;
  font: 400 14px/1.45 var(--pager-ui-font);
  letter-spacing: 0;
  text-align: left;
  overflow-wrap: anywhere;
}
#toast.pager-error-v4 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 12px;
  width: min(480px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
}
#toast.pager-error-v4.is-inline {
  position: static;
  transform: none;
  width: 100%;
  max-width: none;
  margin: 0 0 10px;
  flex: none;
}
#mainHomeV2 > #toast.pager-error-v4.is-inline { margin: 4px 0 10px; }
.sheet > #toast.pager-error-v4.is-inline,
.main-system-sheet-v2 > #toast.pager-error-v4.is-inline { margin-top: 12px; }
.pager-error-copy-v4 { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; min-width: 0; }
.pager-error-detail-v4 { color: var(--pager-error-muted-v4); font-size: var(--pager-ui-note-size); line-height: 1.45; }
:root #toast .pager-error-action-v4 {
  flex: none;
  min-height: 32px;
  margin: -6px 0;
  padding: 6px 0;
  border: 0;
  border-radius: 4px;
  color: var(--pt-accent);
  background: transparent;
  box-shadow: none;
  font: 600 var(--pager-ui-note-size)/1.45 var(--pager-ui-font);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  pointer-events: auto;
}
:root #toast .pager-error-action-v4:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 3px; }
:root .conversation-recovery-v2 {
  padding: 7px 10px;
  border: 0;
  border-radius: 10px;
  background: var(--pager-error-bg-v4);
  color: var(--pager-error-text-v4);
  box-shadow: none;
}

/* A real page-owned startup state; the operating system splash is separate. */
.pager-boot-status-v5 {
  position: fixed;
  inset: 0;
  display: none;
  place-content: center;
  justify-items: center;
  gap: 15px;
  padding: 24px;
  background: var(--pt-bg, #0c0f0d);
  color: var(--pt-muted, #99a18b);
  font: 400 15px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-align: center;
  pointer-events: none;
}
.pager-boot-status-v5.is-visible { display: grid; }
.pager-boot-status-v5 svg {
  width: 48px;
  height: 48px;
  color: var(--pt-accent, #b9ce7f);
  animation: pager-startup-breathe-v5 1.6s ease-in-out infinite;
}
.main-receive-v2 > span { min-width: 44px; text-align: right; }
.main-receive-v2.busy { cursor: wait; opacity: 1; }
.main-receive-v2.busy i::before {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: pager-receive-turn-v5 .8s linear infinite;
}
.main-receive-v2.on.busy i::before { right: auto; left: 8px; }
@keyframes pager-startup-breathe-v5 { 50% { opacity: .5; transform: translateY(-2px); } }
@keyframes pager-receive-turn-v5 { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
  .pager-boot-status-v5 svg, .main-receive-v2.busy i::before { animation: none; }
}

/* Attachment menu and photo reactions use the same geometry in both themes. */
.conversation-peer-copy-v2 strong.is-public,
.main-recipient-row-v2 strong.is-public { color: var(--pt-gold); }
#app.main-conversation-v2-mode #pagerComposer .attach-menu button {
  min-height: 66px; font-size: 13px; font-weight: 550; letter-spacing: 0; text-transform: none;
}
#app.main-conversation-v2-mode #pagerComposer .attach-menu svg { width: 23px; height: 23px; color: var(--pt-accent); }
#app.main-feed-v2-mode #feedComposer .feed-attach-menu { grid-template-columns: repeat(2, minmax(0,1fr)); }
#app.main-feed-v2-mode #feedComposer .feed-attach-menu button { font-size: 13px; text-transform: none; }

/* Settings is a page within the app column. Other overlays keep their own shell. */
:root #mainSystemV2.settings-page-v6 {
  --settings-number-ink-v6: #b9ca8b;
  --settings-switch-track-v6: #34412d;
  --settings-switch-on-v6: #9fc768;
  --settings-switch-thumb-v6: #d9dfc5;
  position: fixed; inset: 0; display: block; padding: 0;
  background: var(--pt-bg); color: var(--pt-text); font-family: var(--pager-ui-font);
}
html[data-pager-theme="light"] #mainSystemV2.settings-page-v6 {
  --settings-number-ink-v6: #52643e;
  --settings-switch-track-v6: #c0c8b7;
  --settings-switch-on-v6: var(--pt-accent);
  --settings-switch-thumb-v6: var(--pt-surface);
}
:root #mainSystemV2.settings-page-v6 .main-system-sheet-v2 {
  box-sizing: border-box; width: min(100%, 420px); height: 100%; max-height: none; min-height: 0;
  margin: 0 auto; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  display: flex; flex-direction: column; overflow: hidden;
  border: 0; border-radius: 0; box-shadow: none; color: var(--pt-text); background: var(--pt-bg);
  animation: settings-page-enter-v6 .2s cubic-bezier(.2,.8,.2,1);
}
html.navigation-motion-v7 #mainSystemV2.settings-page-v6 .main-system-sheet-v2 { animation: none; }
/* A new peer's header may be shown before its local history is available. */
#histbox.navigation-pending-v7 > * { visibility: hidden; pointer-events: none; }
:root #mainSystemV2.settings-page-v6 .main-system-head-v2 {
  flex: none; min-height: 64px; margin: 0; padding: 0 8px;
  display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 4px;
}
:root #mainSystemV2.settings-page-v6 .main-system-head-v2:has(.main-system-done-v2:not(.hidden):not([hidden])) {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
}
:root #mainSystemV2.settings-page-v6 .main-system-head-v2 h2 {
  min-width: 0; margin: 0; color: var(--pt-text); font: 600 20px/1.3 var(--pager-ui-font);
  letter-spacing: 0; text-align: left; overflow-wrap: anywhere;
}
:root #mainSystemV2.settings-page-v6 .main-system-head-v2 button {
  width: 44px; height: 44px; min-height: 44px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--pt-muted);
}
:root #mainSystemV2.settings-page-v6 .main-system-head-v2 svg { width: 22px; height: 22px; }
:root #mainSystemV2.settings-page-v6 :is(.main-system-close-v2, .main-system-spacer-v2) { display: none; }
:root #mainSystemV2.settings-page-v6 .main-system-sheet-v2 > :is(nav, section) {
  flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto;
  overscroll-behavior: contain; scrollbar-width: thin; scroll-padding-block: 12px 28px;
}
:root #mainSystemV2.settings-page-v6 .main-system-menu-v2 { padding: 0 0 28px; }
:root #mainSystemV2.settings-page-v6 :is(.main-system-profile-v2, .main-system-transfer-v2, .appearance-panel-v5) { padding: 8px 16px 28px; }
:root #mainSystemV2.settings-page-v6 .settings-me-v6 {
  box-sizing: border-box; width: 100%; min-height: 84px; padding: 8px 16px 12px;
  display: grid; grid-template-columns: 64px minmax(0, 1fr) 18px; align-items: center; gap: 14px;
  border: 0; border-radius: 0; background: transparent; color: var(--pt-text); text-align: left;
  font-family: var(--pager-ui-font); cursor: pointer;
}
:root #mainSystemV2.settings-page-v6 .settings-me-avatar-v6 {
  display: block; width: 64px; height: 64px; justify-self: start; background: transparent; box-shadow: none;
}
:root #mainSystemV2.settings-page-v6 :is(.settings-me-avatar-v6, .main-profile-avatar-v2):is(.photo-avatar-v2, [data-avatar-kind="photo"]) { border-radius: 50%; object-fit: cover; }
:root #mainSystemV2.settings-page-v6 .settings-me-copy-v6 { display: block; min-width: 0; }
:root #mainSystemV2.settings-page-v6 .settings-me-name-v6 {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--dialog-public-gold); font: 700 17px/1.3 var(--pager-ui-font); letter-spacing: -.01em;
}
:root #mainSystemV2.settings-page-v6 .settings-me-number-v6 {
  display: block; margin-top: 3px; color: var(--settings-number-ink-v6);
  font: 600 14px/18px ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: .055em; font-variant-numeric: tabular-nums;
}
:root #mainSystemV2.settings-page-v6 .settings-me-name-v6.is-number {
  color: var(--settings-number-ink-v6); font: 600 18px/1.25 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  letter-spacing: .055em; font-variant-numeric: tabular-nums;
}
:root #mainSystemV2.settings-page-v6 .settings-me-number-v6.is-label {
  color: var(--pt-muted); font: 400 14px/1.4 var(--pager-ui-font); letter-spacing: 0;
}
:root #mainSystemV2.settings-page-v6 .settings-group-v6 { margin-top: 28px; }
:root #mainSystemV2.settings-page-v6 .settings-group-v6.is-first { margin-top: 16px; }
:root #mainSystemV2.settings-page-v6 .settings-row-v6 {
  position: relative; box-sizing: border-box; display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 52px; margin: 0; padding: 10px 16px; border: 0; border-radius: 0;
  background: transparent; color: var(--pt-text); font: 400 16px/1.35 var(--pager-ui-font);
  letter-spacing: 0; text-transform: none; text-align: left; cursor: pointer;
}
:root #mainSystemV2.settings-page-v6 .settings-row-v6 + .settings-row-v6::before,
:root #mainSystemV2.settings-page-v6 .settings-update-v1 > .settings-row-v6::before {
  content: ''; position: absolute; top: 0; left: 52px; right: 16px; height: 1px; background: var(--pt-line);
}
:root #mainSystemV2.settings-page-v6 .settings-row-v6 .settings-icon-v6 {
  flex: none; width: 22px; height: 22px; color: var(--pt-muted-strong); fill: none; stroke-width: 1.7;
}
:root #mainSystemV2.settings-page-v6 .settings-label-v6 { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
:root #mainSystemV2.settings-page-v6 .settings-value-v6 {
  flex: 0 1 auto; min-width: 0; max-width: 48%; color: var(--pt-muted);
  font: 400 14px/1.4 var(--pager-ui-font); text-align: right; overflow-wrap: anywhere;
}
:root #mainSystemV2.settings-page-v6 .settings-chevron-v6 {
  flex: none; width: 18px; height: 18px; justify-self: end; color: var(--pt-muted); opacity: .65;
}
:root #mainSystemV2.settings-page-v6 .settings-foot-v6 {
  margin: 0; padding: 4px 16px 0; color: var(--pt-muted); font: 400 13px/1.45 var(--pager-ui-font); text-align: left;
}
:root #mainSystemV2.settings-page-v6 .settings-group-v6 > .settings-error-v4 { margin: 8px 16px 0; }
:root #mainSystemV2.settings-page-v6 .main-system-switch-v2 {
  box-sizing: border-box; position: relative; flex: 0 0 45px; width: 45px; height: 26px;
  display: block; padding: 0; border: 0; border-radius: 999px; background: var(--settings-switch-track-v6);
  transition: background-color .18s ease;
}
:root #mainSystemV2.settings-page-v6 .main-system-switch-v2 > span {
  position: absolute; top: 3px; left: 3px; display: block; width: 20px; height: 20px; border-radius: 50%;
  background: var(--settings-switch-thumb-v6); box-shadow: 0 1px 3px rgba(0,0,0,.3);
  transform: translateX(0); transition: transform .18s ease;
}
:root #mainSystemV2.settings-page-v6 .main-system-toggle-v2[aria-checked="true"] .main-system-switch-v2 { background: var(--settings-switch-on-v6); }
:root #mainSystemV2.settings-page-v6 .main-system-toggle-v2[aria-checked="true"] .main-system-switch-v2 > span {
  transform: translateX(19px); background: var(--settings-switch-thumb-v6);
}
html[data-pager-theme="light"] #mainSystemV2.settings-page-v6 .main-system-switch-v2 > span { box-shadow: 0 1px 3px rgba(34,42,29,.18); }
:root #mainSystemV2.settings-page-v6 .settings-update-v1 { margin: 0; padding: 0; border: 0; }
:root #mainSystemV2.settings-page-v6 .settings-update-v1 .settings-version-v1 {
  margin: 10px 16px 0; color: var(--pt-muted); font: 400 12px/1.45 var(--pager-ui-font); gap: 6px;
}
:root #mainSystemV2.settings-page-v6 .settings-version-v1 span { overflow-wrap: anywhere; }
:root #mainSystemV2.settings-page-v6 .settings-profile-name-v6 { margin: 24px 0 28px; padding-right: 0; padding-left: 0; border-top: 1px solid var(--pt-line); border-bottom: 1px solid var(--pt-line); }
:root #mainSystemV2.settings-page-v6 .main-profile-avatar-open-v1 { display: grid; place-items: center; padding: 0; border: 0; background: transparent; border-radius: 30px; cursor: pointer; touch-action: manipulation; }
:root #mainSystemV2.settings-page-v6 .main-profile-avatar-open-v1:active { transform: scale(.97); }
:root #mainSystemV2.settings-page-v6 .main-profile-gifts-v1 { padding-bottom: 20px; }
:root #mainSystemV2.settings-page-v6 .settings-profile-name-v6 .settings-value-v6 { color: var(--dialog-public-gold); }
:root #mainSystemV2.settings-page-v6 .settings-profile-name-v6:not(:disabled):active { transform: none; }
:root #mainSystemV2.settings-page-v6 :is(.main-system-head-v2 button, .settings-row-v6, .settings-me-v6):not(:disabled):active { background: var(--pt-surface-alt); }
:root #mainSystemV2.settings-page-v6 button:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: -2px; }

/* The shared username editor becomes a page only when opened from Settings. */
html:root #feedProfileOv.settings-profile-page-v6 {
  position: fixed; inset: 0; display: block; padding: 0; background: var(--pt-bg);
  color: var(--pt-text); font-family: var(--pager-ui-font);
}
html:root #feedProfileOv.settings-profile-page-v6 .feed-profile-sheet-v2 {
  box-sizing: border-box; width: min(100%, 420px); max-width: 420px; height: 100%; max-height: none;
  display: block; margin: 0 auto;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) calc(28px + env(safe-area-inset-bottom)) env(safe-area-inset-left);
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scroll-padding-top: calc(76px + env(safe-area-inset-top));
  border: 0; border-radius: 0; background: var(--pt-bg); color: var(--pt-text); box-shadow: none;
  animation: settings-page-enter-v6 .2s cubic-bezier(.2,.8,.2,1);
}
html:root #feedProfileOv.settings-profile-page-v6 .feed-profile-handle-v2 { display: none; }
html:root #feedProfileOv.settings-profile-page-v6 .feed-profile-head-v2 {
  position: sticky; top: env(safe-area-inset-top); z-index: 1; min-height: 64px; margin: 0; padding: 0 8px;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 4px;
  background: var(--pt-bg);
}
html:root #feedProfileOv.settings-profile-page-v6 .feed-profile-head-v2 h2 {
  min-width: 0; margin: 0; color: var(--pt-text); font: 600 20px/1.3 var(--pager-ui-font);
  text-align: left; letter-spacing: 0; overflow-wrap: anywhere;
}
html:root #feedProfileOv.settings-profile-page-v6 .feed-profile-head-v2 button {
  width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 12px;
  display: grid; place-items: center; color: var(--pt-muted); background: transparent;
}
html:root #feedProfileOv.settings-profile-page-v6 .feed-profile-head-v2 svg { width: 22px; height: 22px; }
html:root #feedProfileOv.settings-profile-page-v6 .feed-profile-head-v2 button:active:not(:disabled) { background: var(--pt-surface-alt); }
html:root #feedProfileOv.settings-profile-page-v6 .feed-nickname-field-v2 { margin: 8px 16px 0; padding: 0; }
html:root #feedProfileOv.settings-profile-page-v6 .feed-nickname-state-v2 { margin: 0 16px; }
html:root #feedProfileOv.settings-profile-page-v6 .feed-nickname-rules-v2 { margin: 16px 16px 0; }
html:root #feedProfileOv.settings-profile-page-v6 .main-profile-reset-v2 { width: calc(100% - 32px); margin: 24px 16px 0; }
html:root #feedProfileOv.settings-profile-page-v6 :is(button, input):focus-visible { outline: 2px solid var(--pt-accent); outline-offset: -2px; }
@keyframes settings-page-enter-v6 { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 350px) {
  :root #mainSystemV2.settings-page-v6 .settings-row-v6 { gap: 12px; }
  :root #mainSystemV2.settings-page-v6 .settings-value-v6 { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  :root #mainSystemV2.settings-page-v6 .main-system-sheet-v2 { animation: none; }
  :root #mainSystemV2.settings-page-v6 :is(.main-system-switch-v2, .main-system-switch-v2 > span) { transition: none; }
  html:root #feedProfileOv.settings-profile-page-v6 .feed-profile-sheet-v2 { animation: none; }
}

/* Replies share the composer's quiet surface; content stays plain text. */
#replyDraftV1 { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0,1fr) 44px; align-items: center; gap: 6px; width: 100%; margin-bottom: 8px; padding: 0 4px 0 10px; }
#replyDraftV1.hidden { display: none; }
#replyDraftV1 button { border: 0; color: var(--pt-text); background: none; padding: 8px; text-align: left; font: inherit; min-width: 0; }
#replyDraftV1 .reply-draft-body-v1 { border-left: 2px solid var(--pt-muted); padding: 2px 10px; display: grid; gap: 3px; }
#replyDraftV1 strong { color: var(--pt-muted-strong, var(--pt-muted)); font-size: 12px; font-weight: 600; }
#replyDraftV1 span { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#replyDraftCloseV1 { min-height: 44px; display: grid; place-items: center; }
#replyDraftCloseV1 svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; fill: none; }
.message-reply-quote-v1 { box-sizing: border-box; width: 100%; display: grid; gap: 3px; max-width: 100%; min-width: 0; padding: 5px 9px; margin: 0 0 6px; border: 0; border-left: 2px solid currentColor; border-radius: 2px 6px 6px 2px; background: color-mix(in srgb,currentColor 7%,transparent); color: inherit; text-align: left; font: inherit; cursor: pointer; }
.message-reply-quote-v1 strong { font-size: 12px; font-weight: 600; }
.message-reply-quote-v1 span { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.conversation-reaction-glyph-v3 { font-size: 17px; line-height: 1; }
.conversation-meta-v2 > .conversation-like-badge-v2 + .conversation-like-badge-v2 { margin-left: 3px; }
.conversation-message-v2.is-reply-target-v1 > .conversation-bubble-v2 { animation: reply-target-v1 1.4s ease-out; }
@keyframes reply-target-v1 { 0%,30% { box-shadow: 0 0 0 3px var(--pt-muted); } 100% { box-shadow: 0 0 0 3px transparent; } }
@media (prefers-reduced-motion: reduce) {
  .conversation-message-v2.is-reply-target-v1 > .conversation-bubble-v2 { animation: none; outline: 2px solid var(--pt-muted); outline-offset: 3px; }
}

.message-reply-quote-v1:disabled { opacity: 1; cursor: default; }

/* Installed WebKit: normal root flow fills the screen, including its safe areas.
   Keep this frame during input; visualViewport movement only changes the column inset. */
html.pager-ios-flow-v2 { height: 100vh; min-height: 100vh; }
html.pager-ios-flow-v2 body { position: relative; inset: auto; height: 100vh; }

/* iOS cold-launch trial: give WebKit an opaque viewport edge in the existing
   status safe area. No layout space, blur, transform or interception of taps. */
#iosStatusSurfaceV11 { display: none; }
html.pager-ios-flow-v2 #iosStatusSurfaceV11 {
  display: block; position: fixed; top: 0; left: 0; right: 0;
  height: env(safe-area-inset-top, 0px); background: var(--pt-bg, #0c0f0d);
  z-index: 110; pointer-events: none;
}
