/* Aurora interface polish — existing layout preserved, visual system rebuilt. */
:root{
  --au-accent:#6d5dfc;
  --au-accent-hover:#5e4ef0;
  --au-accent-soft:#f0edff;
  --au-accent-soft-strong:#e7e2ff;
  --au-bg:#f3f4f7;
  --au-surface:#ffffff;
  --au-surface-2:#f7f7f9;
  --au-surface-3:#eef0f4;
  --au-text:#191a1e;
  --au-text-2:#656a74;
  --au-text-3:#9499a3;
  --au-line:#e4e6eb;
  --au-line-strong:#d7dae1;
  --au-positive:#28a76f;
  --au-danger:#dc4f5b;
  --au-warning:#e59935;
  --au-shadow:0 16px 48px rgba(27,30,40,.12);
  --au-shadow-soft:0 8px 28px rgba(27,30,40,.08);
  --au-font:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --sidebar-w:392px;
  --info-w:356px;
  --header-h:64px;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0;overflow:hidden}
body{font-family:var(--au-font);font-size:15px;color:var(--au-text);background:var(--au-bg);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
button,input,textarea,select{font:inherit}
button{border:0;background:none;color:inherit;padding:0;cursor:pointer}
button:disabled{cursor:default;opacity:.52}
a{color:inherit;text-decoration:none}
input,textarea,select{color:var(--au-text)}
::selection{background:rgba(109,93,252,.2)}
.tg-hidden{display:none!important}
.tg-page{height:100%;width:100%;overflow:hidden;background:var(--au-bg)}
.tg-shell{height:100dvh;width:100vw;display:flex;position:relative;overflow:hidden;background:var(--au-bg)}
.tg-icon{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 22px;color:currentColor}
.tg-icon svg{width:100%;height:100%;display:block;stroke-linecap:round;stroke-linejoin:round}
.tg-avatar{width:52px;height:52px;aspect-ratio:1/1;border-radius:16px;display:flex;align-items:center;justify-content:center;flex:0 0 auto;overflow:hidden;position:relative;background:linear-gradient(145deg,#7a6dff,#5f4eea);color:#fff;font-size:19px;font-weight:700;letter-spacing:-.02em;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}
.tg-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.tg-avatar--small{width:42px;height:42px;border-radius:13px;font-size:16px}
.tg-avatar--mini{width:28px;height:28px;border-radius:9px;font-size:11px;border:2px solid var(--au-surface)}
.tg-avatar--big{width:92px;height:92px;border-radius:28px;font-size:34px;box-shadow:0 10px 28px rgba(109,93,252,.2)}
.tg-round-btn{width:40px;height:40px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;color:var(--au-text-2);transition:background-color .16s ease,color .16s ease,transform .16s ease}
.tg-round-btn:hover{background:var(--au-surface-3);color:var(--au-text)}
.tg-round-btn:active{transform:scale(.95)}
.tg-pill{height:22px;min-width:22px;padding:0 7px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:var(--au-accent);color:#fff;font-size:11px;font-weight:750;line-height:1}
.tg-checks{display:inline-flex;align-items:center;margin-left:4px;color:var(--au-accent);vertical-align:-2px}
.tg-checks .tg-icon{width:16px;height:16px;flex-basis:16px}

/* Existing three-column structure */
.tg-left{width:var(--sidebar-w);min-width:var(--sidebar-w);max-width:var(--sidebar-w);height:100%;display:flex;flex-direction:column;position:relative;z-index:8;background:var(--au-surface);border-right:1px solid var(--au-line)}
.tg-main{height:100%;min-width:0;flex:1;display:flex;flex-direction:column;position:relative;overflow:hidden;background:
  linear-gradient(rgba(245,246,249,.88),rgba(245,246,249,.88)),
  url('/static/tg_chat_bg_light.png') center/cover}
.tg-main::before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 78% 4%,rgba(109,93,252,.075),transparent 30%)}
.tg-right{width:var(--info-w);min-width:var(--info-w);height:100%;display:flex;flex-direction:column;z-index:7;background:var(--au-bg);border-left:1px solid var(--au-line)}
.tg-shell.has-info .tg-main{border-right:0}

/* Sidebar */
.tg-topbar,.tg-side-head,.tg-info-head,.tg-chat-header{height:var(--header-h);min-height:var(--header-h);display:flex;align-items:center;position:relative;z-index:4;background:rgba(255,255,255,.94);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border-bottom:1px solid var(--au-line)}
.tg-topbar{gap:9px;padding:10px 12px}
.tg-search{height:42px;min-width:0;flex:1;display:flex;align-items:center;gap:9px;padding:0 12px;border-radius:13px;background:var(--au-surface-2);border:1px solid transparent;color:var(--au-text-3);transition:border-color .16s ease,background .16s ease,box-shadow .16s ease}
.tg-search:focus-within{background:var(--au-surface);border-color:rgba(109,93,252,.5);box-shadow:0 0 0 3px rgba(109,93,252,.1);color:var(--au-accent)}
.tg-search .tg-icon{width:19px;height:19px;flex-basis:19px}
.tg-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;font-size:14px;color:var(--au-text)}
.tg-search input::placeholder{color:var(--au-text-3)}
.tg-mini-logo{width:40px;height:40px;border-radius:13px;display:flex;align-items:center;justify-content:center;color:#fff;background:linear-gradient(145deg,#796bff,#5b49e7);box-shadow:0 8px 18px rgba(109,93,252,.22);transition:transform .16s ease,box-shadow .16s ease}
.tg-mini-logo:hover{transform:translateY(-1px);box-shadow:0 10px 22px rgba(109,93,252,.28)}
.tg-mini-logo .tg-icon{width:21px;height:21px}
.tg-folders{height:48px;display:flex;align-items:center;gap:4px;padding:6px 10px 5px;overflow-x:auto;scrollbar-width:none;background:var(--au-surface);border-bottom:1px solid var(--au-line)}
.tg-folders::-webkit-scrollbar{display:none}
.tg-folder{height:34px;display:inline-flex;align-items:center;gap:7px;padding:0 11px;border-radius:10px;white-space:nowrap;color:var(--au-text-2);font-size:12.5px;font-weight:650;transition:background .16s ease,color .16s ease}
.tg-folder:hover{background:var(--au-surface-2);color:var(--au-text)}
.tg-folder.is-active{background:var(--au-accent-soft);color:var(--au-accent)}
.tg-folder .tg-pill{height:19px;min-width:19px;padding:0 5px;background:rgba(101,106,116,.12);color:inherit;font-size:10px}
.tg-folder.is-active .tg-pill{background:rgba(109,93,252,.14)}
.tg-chat-list{flex:1;min-height:0;overflow-y:auto;padding:8px 7px 92px;scrollbar-color:rgba(120,125,136,.25) transparent;scrollbar-width:thin}
.tg-chat-row{width:100%;min-height:76px;display:flex;align-items:center;gap:12px;padding:10px;border-radius:14px;text-align:left;transition:background-color .15s ease,transform .15s ease}
.tg-chat-row:hover{background:var(--au-surface-2)}
.tg-chat-row:active{transform:scale(.995)}
.tg-chat-row.is-active{background:var(--au-accent-soft)}
.tg-chat-row.is-active .tg-chat-row__title{color:#4436c9}
.tg-chat-row__body{min-width:0;flex:1;display:flex;flex-direction:column;gap:3px}
.tg-chat-row__top,.tg-chat-row__bottom{min-width:0;display:flex;align-items:center;gap:8px}
.tg-chat-row__title{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14.5px;font-weight:720;letter-spacing:-.01em}
.tg-chat-row__time{flex:0 0 auto;color:var(--au-text-3);font-size:11px;font-weight:550}
.tg-chat-row__meta{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--au-text-3);font-size:11.5px}
.tg-chat-row__preview{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--au-text-2);font-size:13px;line-height:18px}
.tg-chat-row__pin{width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;color:var(--au-accent)}
.tg-chat-row__pin .tg-icon{width:16px;height:16px;flex-basis:16px}
.tg-loader{padding:28px 18px;text-align:center;color:var(--au-text-3);font-size:13px}
.tg-fab{position:absolute;right:18px;bottom:20px;width:52px;height:52px;border-radius:17px;display:flex;align-items:center;justify-content:center;color:#fff;background:var(--au-accent);box-shadow:0 12px 26px rgba(109,93,252,.32);transition:background .16s ease,transform .16s ease,box-shadow .16s ease}
.tg-fab:hover{background:var(--au-accent-hover);transform:translateY(-2px);box-shadow:0 16px 32px rgba(109,93,252,.36)}
.tg-fab .tg-icon{width:23px;height:23px}

/* Menu */
.tg-menu{position:absolute;left:10px;top:58px;width:276px;padding:8px;z-index:30;background:rgba(255,255,255,.98);border:1px solid var(--au-line);border-radius:17px;box-shadow:var(--au-shadow);transform-origin:top left;animation:au-pop .14s ease-out}
.tg-menu__profile{width:100%;display:flex;align-items:center;gap:11px;padding:8px;border-radius:12px;text-align:left}
.tg-menu__profile:hover{background:var(--au-surface-2)}
.tg-menu__profile strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.tg-menu__sep{height:1px;margin:6px 4px;background:var(--au-line)}
.tg-menu__item{width:100%;height:42px;display:flex;align-items:center;gap:11px;padding:0 11px;border-radius:11px;color:var(--au-text-2);text-align:left;font-size:13.5px;font-weight:560;transition:background .14s ease,color .14s ease}
.tg-menu__item:hover{background:var(--au-surface-2);color:var(--au-text)}
.tg-menu__item:last-child{color:var(--au-danger)}
.tg-menu__item .tg-icon{width:20px;height:20px;flex-basis:20px}

/* Chat header */
.tg-chat-header{padding:8px 12px;gap:10px}
.tg-chat-header__main{min-width:0;display:flex;align-items:center;gap:11px;text-align:left;border-radius:13px;padding:3px 6px 3px 3px;transition:background .15s ease}
.tg-chat-header__main:hover{background:var(--au-surface-2)}
.tg-chat-header__copy{min-width:0;display:flex;flex-direction:column;gap:2px}
.tg-chat-header__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14.5px;font-weight:730;letter-spacing:-.01em}
.tg-chat-header__status{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--au-text-2);font-size:11.5px}
.tg-chat-header__actions{margin-left:auto;display:flex;align-items:center;gap:3px}
.tg-mobile-back{display:none}
.tg-pinned{min-width:0;max-width:320px;margin-left:6px;padding-left:12px;border-left:3px solid var(--au-accent);display:flex;flex-direction:column;align-items:flex-start;text-align:left}
.tg-pinned span{color:var(--au-accent);font-size:10px;font-weight:760;text-transform:uppercase;letter-spacing:.045em}
.tg-pinned strong{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--au-text-2);font-size:11.5px;font-weight:560}
.tg-inline-search{height:58px;display:flex;align-items:center;gap:8px;padding:8px 12px;z-index:3;background:rgba(255,255,255,.96);border-bottom:1px solid var(--au-line)}
.tg-search-results{position:absolute;top:122px;right:12px;width:min(420px,calc(100% - 24px));max-height:340px;overflow:auto;z-index:20;padding:7px;background:var(--au-surface);border:1px solid var(--au-line);border-radius:16px;box-shadow:var(--au-shadow)}
.tg-search-results button{width:100%;display:flex;flex-direction:column;gap:3px;padding:10px 11px;border-radius:10px;text-align:left}
.tg-search-results button:hover{background:var(--au-surface-2)}
.tg-search-results b{font-size:12px;color:var(--au-accent)}
.tg-search-results span{font-size:12px;color:var(--au-text-2)}

/* Messages */
.tg-messages{position:relative;z-index:1;flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:rgba(93,97,109,.24) transparent;padding:22px 18px 10px}
.tg-messages__inner{width:min(850px,100%);margin:0 auto;display:flex;flex-direction:column;gap:5px}
.tg-day,.tg-service,.tg-empty-chat{align-self:center;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.82);border:1px solid rgba(221,224,231,.88);box-shadow:0 4px 16px rgba(31,34,44,.05);backdrop-filter:blur(10px);color:var(--au-text-2);font-size:11px;font-weight:650}
.tg-empty-chat{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:9px 14px;font-size:12.5px}
.tg-msg{width:100%;display:flex;padding:1px 0}
.tg-msg.is-in{justify-content:flex-start}
.tg-msg.is-out{justify-content:flex-end}
.tg-bubble{position:relative;max-width:min(68%,620px);padding:9px 12px 7px;border-radius:18px;box-shadow:0 2px 9px rgba(29,32,42,.07);font-size:14px;line-height:20px;white-space:pre-wrap;word-break:break-word}
.tg-msg.is-in .tg-bubble{background:rgba(255,255,255,.97);border:1px solid rgba(226,228,234,.9);border-bottom-left-radius:7px;color:var(--au-text)}
.tg-msg.is-out .tg-bubble{background:linear-gradient(145deg,#7162ff,#6352eb);border-bottom-right-radius:7px;color:#fff;box-shadow:0 6px 18px rgba(92,74,228,.18)}
.tg-bubble__sender{width:auto;display:flex;align-items:center;gap:5px;margin-bottom:4px;padding:0;border:0;background:transparent;color:var(--au-accent);font-size:12px;font-weight:750;text-align:left;cursor:pointer}
.tg-bubble__sender:hover>span{text-decoration:underline}.tg-bubble__sender>.tg-avatar{width:20px;height:20px;flex:0 0 20px}.tg-bubble__sender>.tg-verified-badge{flex:0 0 auto}
.tg-bubble__reply{display:block;margin:-2px 0 7px;padding:4px 0 4px 9px;border-left:3px solid currentColor;opacity:.78;font-size:11.5px;line-height:16px}
.tg-bubble__reply strong{display:block;font-weight:750}
.tg-bubble__meta{display:inline-flex;align-items:center;float:right;margin-left:9px;margin-top:6px;color:var(--au-text-3);font-size:10px;line-height:14px;white-space:nowrap}
.tg-msg.is-out .tg-bubble__meta,.tg-msg.is-out .tg-checks{color:rgba(255,255,255,.78)}
.tg-bubble__media{display:block;margin:-5px -8px 7px;overflow:hidden;border-radius:14px}
.tg-bubble__media img,.tg-bubble__media video{display:block;width:100%;max-height:430px;object-fit:cover}
.tg-bubble__file,.tg-bubble__voice{display:flex;align-items:center;gap:10px;min-width:230px;margin:1px 0 4px}
.tg-bubble__file-icon,.tg-bubble__play{width:38px;height:38px;display:flex;align-items:center;justify-content:center;border-radius:12px;background:var(--au-accent-soft);color:var(--au-accent)}
.tg-msg.is-out .tg-bubble__file-icon,.tg-msg.is-out .tg-bubble__play{background:rgba(255,255,255,.17);color:#fff}
.tg-bubble__file-icon .tg-icon,.tg-bubble__play .tg-icon{width:19px;height:19px;flex-basis:19px}
.tg-wave{width:128px;height:22px;border-radius:6px;opacity:.65;background:repeating-linear-gradient(90deg,currentColor 0 2px,transparent 2px 5px)}
.tg-msg.is-focus .tg-bubble{animation:au-focus 1.2s ease}

/* Composer */
.tg-composer-wrap{position:relative;z-index:3;width:100%;padding:8px 14px max(12px,env(safe-area-inset-bottom));background:linear-gradient(180deg,rgba(243,244,247,0),rgba(243,244,247,.92) 35%,rgba(243,244,247,.98))}
.tg-composer{width:min(870px,100%);margin:0 auto;display:flex;align-items:flex-end;gap:8px}
.tg-composer__box{position:relative;min-height:50px;flex:1;display:flex;align-items:flex-end;gap:3px;padding:5px 7px;background:rgba(255,255,255,.98);border:1px solid var(--au-line);border-radius:17px;box-shadow:0 8px 28px rgba(28,31,41,.08)}
.tg-composer__box textarea{min-width:0;flex:1;min-height:39px;max-height:150px;resize:none;border:0;outline:0;background:transparent;padding:9px 5px 7px;color:var(--au-text);font-size:14px;line-height:20px}
.tg-composer__box textarea::placeholder{color:var(--au-text-3)}
.tg-send{width:50px;height:50px;border-radius:16px;display:flex;align-items:center;justify-content:center;flex:0 0 auto;background:var(--au-surface);border:1px solid var(--au-line);color:var(--au-text-2);box-shadow:0 8px 24px rgba(28,31,41,.08);transition:background .16s ease,color .16s ease,transform .16s ease,box-shadow .16s ease}
.tg-send.is-active{background:var(--au-accent);border-color:var(--au-accent);color:#fff;box-shadow:0 10px 24px rgba(109,93,252,.3)}
.tg-send:hover{transform:translateY(-1px)}
.tg-send .tg-icon{width:22px;height:22px}
.tg-replybar,.tg-attach-preview{width:min(870px,100%);min-height:42px;margin:0 auto 6px;display:flex;align-items:center;gap:10px;padding:7px 10px 7px 13px;background:var(--au-surface);border:1px solid var(--au-line);border-radius:13px;box-shadow:var(--au-shadow-soft)}
.tg-replybar{border-left:3px solid var(--au-accent)}
.tg-replybar>span,.tg-attach-preview>span{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--au-text-2);font-size:11.5px}
.tg-replybar b{color:var(--au-accent)}
.tg-replybar button,.tg-attach-preview button{width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;color:var(--au-text-2)}
.tg-replybar button:hover,.tg-attach-preview button:hover{background:var(--au-surface-3)}

/* Right info panel */
.tg-info-head,.tg-side-head{gap:9px;padding:10px 12px}
.tg-info-head strong,.tg-side-head strong{font-size:14.5px;font-weight:730}
.tg-info-body,.tg-side-scroll{flex:1;min-height:0;overflow-y:auto;padding:12px;scrollbar-width:thin;scrollbar-color:rgba(120,125,136,.23) transparent}
.tg-info-profile,.tg-settings-hero{display:flex;flex-direction:column;align-items:center;text-align:center;padding:20px 12px 18px;background:var(--au-surface);border:1px solid var(--au-line);border-radius:18px;box-shadow:0 6px 20px rgba(31,34,44,.04)}
.tg-info-profile strong,.tg-settings-hero strong{margin-top:12px;font-size:18px;font-weight:760;letter-spacing:-.02em}
.tg-info-profile span,.tg-settings-hero span{margin-top:4px;color:var(--au-text-2);font-size:12px}
.tg-info-card,.tg-settings-card{margin-top:10px;overflow:hidden;background:var(--au-surface);border:1px solid var(--au-line);border-radius:16px}
.tg-info-row,.tg-settings-row{width:100%;min-height:58px;display:flex;align-items:center;gap:12px;padding:9px 13px;text-align:left;color:var(--au-text);transition:background .14s ease}
.tg-info-row+.tg-info-row,.tg-settings-row+.tg-settings-row{border-top:1px solid var(--au-line)}
button.tg-info-row:hover,button.tg-settings-row:hover,a.tg-settings-row:hover{background:var(--au-surface-2)}
.tg-info-row>.tg-icon,.tg-settings-row>.tg-icon{width:21px;height:21px;flex-basis:21px;color:var(--au-accent)}
.tg-info-row__body,.tg-settings-row__body{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.tg-info-row__body strong,.tg-settings-row__body strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13.5px;font-weight:670}
.tg-info-row__body span,.tg-settings-row__body span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--au-text-2);font-size:11.5px}
.tg-settings-row__trail{color:var(--au-positive);font-size:11px;font-weight:700}
.tg-settings-row.danger,.tg-settings-row.danger>.tg-icon{color:var(--au-danger)}
.tg-tabs{display:flex;margin-top:10px;padding:4px;background:var(--au-surface-3);border-radius:12px}
.tg-tab{height:34px;flex:1;border-radius:9px;color:var(--au-text-2);font-size:12px;font-weight:650}
.tg-tab.is-active{background:var(--au-surface);color:var(--au-accent);box-shadow:0 3px 10px rgba(31,34,44,.08)}
.tg-media-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;margin-top:10px}
.tg-media-cell{aspect-ratio:1;overflow:hidden;border-radius:10px;background:var(--au-surface-3)}
.tg-media-cell img,.tg-media-cell video{width:100%;height:100%;object-fit:cover;display:block}
.tg-file-row{display:flex;align-items:center;gap:10px;padding:10px;margin-top:8px;background:var(--au-surface);border:1px solid var(--au-line);border-radius:12px}
.tg-file-row>.tg-icon{color:var(--au-accent)}
.tg-file-row span{display:flex;flex-direction:column;font-size:12px;font-weight:650}
.tg-file-row small{margin-top:2px;color:var(--au-text-3);font-size:10px;font-weight:500}
.tg-info-empty{padding:30px 12px;text-align:center;color:var(--au-text-3);font-size:12px}
.tg-switch{width:38px;height:22px;padding:2px;border-radius:999px;background:var(--au-line-strong);transition:background .16s ease}
.tg-switch::after{content:"";display:block;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.16);transition:transform .16s ease}
.tg-switch.is-on{background:var(--au-accent)}
.tg-switch.is-on::after{transform:translateX(16px)}

/* Modal, context, forms */
.tg-modal-backdrop{position:fixed;inset:0;z-index:90;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(20,22,28,.38);backdrop-filter:blur(5px);animation:au-fade .15s ease}
.tg-modal{width:min(480px,100%);max-height:min(720px,calc(100dvh - 36px));overflow:hidden;display:flex;flex-direction:column;background:var(--au-surface);border:1px solid rgba(255,255,255,.45);border-radius:21px;box-shadow:0 28px 90px rgba(17,19,25,.26);animation:au-pop .18s ease-out}
.tg-modal__head{height:62px;min-height:62px;display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--au-line)}
.tg-modal__head strong{font-size:15px;font-weight:740}
.tg-modal__body{min-width:0;overflow-y:auto;display:flex;flex-direction:column;gap:10px;padding:14px}
.tg-field{display:flex;flex-direction:column;gap:6px;color:var(--au-text-2);font-size:11.5px;font-weight:650}
.tg-field input,.tg-field textarea{width:100%;min-height:44px;border:1px solid var(--au-line-strong);border-radius:12px;outline:0;background:var(--au-surface-2);padding:10px 12px;color:var(--au-text);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}
.tg-field textarea{min-height:96px;resize:vertical}
.tg-field input:focus,.tg-field textarea:focus{background:var(--au-surface);border-color:rgba(109,93,252,.55);box-shadow:0 0 0 3px rgba(109,93,252,.1)}
.tg-primary,.tg-auth-submit{min-height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:var(--au-accent);color:#fff;font-weight:710;box-shadow:0 8px 18px rgba(109,93,252,.2);transition:background .16s ease,transform .16s ease}
.tg-primary:hover,.tg-auth-submit:hover{background:var(--au-accent-hover)}
.tg-primary:active,.tg-auth-submit:active{transform:scale(.985)}
.tg-auth-link{min-height:38px;color:var(--au-accent);font-size:12.5px;font-weight:650;text-align:center}
.tg-list-block{margin-top:5px;border:1px solid var(--au-line);border-radius:14px;overflow:hidden}
.tg-context{position:fixed;z-index:110;min-width:220px;padding:7px;background:rgba(255,255,255,.98);border:1px solid var(--au-line);border-radius:15px;box-shadow:var(--au-shadow);animation:au-pop .12s ease-out}
.tg-context button{width:100%;height:40px;display:flex;align-items:center;gap:10px;padding:0 11px;border-radius:10px;color:var(--au-text-2);font-size:13px;text-align:left}
.tg-context button:hover{background:var(--au-surface-2);color:var(--au-text)}
.tg-context button.danger{color:var(--au-danger)}
.tg-context .tg-icon{width:19px;height:19px;flex-basis:19px}
.tg-toast{position:fixed;z-index:130;left:50%;bottom:26px;transform:translateX(-50%);max-width:min(430px,calc(100% - 32px));padding:10px 15px;border-radius:12px;background:rgba(26,28,34,.9);color:#fff;box-shadow:0 12px 34px rgba(0,0,0,.22);font-size:12.5px;font-weight:600;text-align:center;backdrop-filter:blur(10px);animation:au-toast .18s ease-out}

/* Auth — same markup, modernized */
.tg-auth-page{overflow:auto;background:
 radial-gradient(circle at 18% 8%,rgba(109,93,252,.16),transparent 28%),
 radial-gradient(circle at 88% 90%,rgba(68,186,160,.11),transparent 28%),
 #f4f5f8}
.tg-auth-page #auth-root{min-height:100%}
.tg-auth{min-height:100dvh;display:flex;align-items:center;justify-content:center;padding:30px 18px}
.tg-auth-card{width:min(430px,100%);padding:30px;background:rgba(255,255,255,.94);border:1px solid rgba(222,224,231,.9);border-radius:24px;box-shadow:0 24px 70px rgba(32,35,46,.12);backdrop-filter:blur(18px);text-align:left}
.tg-auth-monkey{width:58px;height:58px;margin:0 0 20px;border-radius:18px;display:flex;align-items:center;justify-content:center;background:linear-gradient(145deg,#39b9f4,#1764d8);color:#fff;box-shadow:0 12px 28px rgba(25,136,229,.25)}
.tg-auth-monkey .tg-icon{width:29px;height:29px}
.tg-auth-logo{overflow:hidden;background:#1b4bd1}
.tg-auth-logo img{width:100%;height:100%;object-fit:cover}
.tg-auth-card h1{margin:0;color:var(--au-text);font-size:25px;line-height:1.18;letter-spacing:-.035em}
.tg-auth-card>p{margin:10px 0 24px;color:var(--au-text-2);font-size:13px;line-height:19px}
.tg-auth-card form{display:flex;flex-direction:column;gap:12px}
.tg-auth-field{position:relative;display:flex;flex-direction:column;gap:6px;color:var(--au-text-2);font-size:11.5px;font-weight:650}
.tg-auth-field input{width:100%;height:48px;border:1px solid var(--au-line-strong);border-radius:13px;outline:0;background:var(--au-surface-2);padding:0 13px;color:var(--au-text);font-size:14px;transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}
.tg-auth-field input:focus{background:#fff;border-color:rgba(109,93,252,.55);box-shadow:0 0 0 3px rgba(109,93,252,.1)}
.tg-auth-field:has(.tg-auth-eye) input{padding-right:48px}
.tg-auth-eye{position:absolute;right:4px;bottom:4px;width:40px;height:40px;border-radius:10px;display:flex;align-items:center;justify-content:center;color:var(--au-text-3)}
.tg-auth-eye:hover{background:var(--au-surface-3);color:var(--au-text)}
.tg-auth-eye .tg-icon{width:20px;height:20px}
.tg-auth-submit{width:100%;margin-top:4px}
.tg-auth-alert{padding:10px 12px;border:1px solid rgba(220,79,91,.25);border-radius:12px;background:rgba(220,79,91,.08);color:#b73542;font-size:12px;line-height:17px}
.tg-auth-card>.tg-auth-link{width:100%;margin-top:12px}

/* Dark theme class uses the same structure */
.tg-shell.theme-dark{
  --au-bg:#101115;--au-surface:#17191f;--au-surface-2:#1d2027;--au-surface-3:#252832;
  --au-text:#f4f5f7;--au-text-2:#aeb3bd;--au-text-3:#777d88;--au-line:#292c35;--au-line-strong:#343844;
  --au-accent-soft:#292541;--au-accent-soft-strong:#342e58;--au-shadow:0 18px 52px rgba(0,0,0,.36);--au-shadow-soft:0 10px 28px rgba(0,0,0,.24)
}
.tg-shell.theme-dark .tg-main{background:linear-gradient(rgba(17,18,23,.84),rgba(17,18,23,.84)),url('/static/tg_chat_bg_exact.png') center/cover}
.tg-shell.theme-dark .tg-topbar,.tg-shell.theme-dark .tg-side-head,.tg-shell.theme-dark .tg-info-head,.tg-shell.theme-dark .tg-chat-header,.tg-shell.theme-dark .tg-inline-search{background:rgba(23,25,31,.94)}
.tg-shell.theme-dark .tg-menu,.tg-shell.theme-dark .tg-context{background:rgba(23,25,31,.98)}
.tg-shell.theme-dark .tg-day,.tg-shell.theme-dark .tg-service,.tg-shell.theme-dark .tg-empty-chat{background:rgba(29,32,39,.86);border-color:rgba(52,56,68,.9)}
.tg-shell.theme-dark .tg-msg.is-in .tg-bubble{background:rgba(28,30,37,.98);border-color:rgba(53,57,68,.9)}
.tg-shell.theme-dark .tg-composer-wrap{background:linear-gradient(180deg,rgba(16,17,21,0),rgba(16,17,21,.92) 35%,rgba(16,17,21,.98))}
.tg-shell.theme-dark .tg-modal{border-color:var(--au-line)}
.tg-shell.theme-dark .tg-switch::after{background:#f6f7f8}
.tg-shell.theme-dark .tg-avatar--mini{border-color:var(--au-surface)}

/* Existing local compact/reduced modes */
.tg-shell.compact-mode .tg-chat-row{min-height:64px;padding-top:6px;padding-bottom:6px}
.tg-shell.compact-mode .tg-avatar:not(.tg-avatar--small):not(.tg-avatar--big):not(.tg-avatar--mini){width:44px;height:44px;border-radius:13px;font-size:16px}
.tg-shell.reduce-motion *{animation:none!important;transition:none!important;scroll-behavior:auto!important}

@keyframes au-pop{from{opacity:0;transform:translateY(-4px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes au-fade{from{opacity:0}to{opacity:1}}
@keyframes au-toast{from{opacity:0;transform:translate(-50%,8px)}to{opacity:1;transform:translate(-50%,0)}}
@keyframes au-focus{0%,100%{box-shadow:0 2px 9px rgba(29,32,42,.07)}35%{box-shadow:0 0 0 4px rgba(109,93,252,.22),0 8px 28px rgba(109,93,252,.18)}}

/* Responsive rules preserve the same screens and navigation */
@media(max-width:1180px){
  :root{--sidebar-w:360px;--info-w:330px}
  .tg-pinned{display:none}
}
@media(max-width:920px){
  :root{--sidebar-w:340px}
  .tg-right{position:absolute;right:0;top:0;bottom:0;box-shadow:-18px 0 50px rgba(20,22,30,.16)}
}
@media(max-width:720px){
  :root{--sidebar-w:100vw;--header-h:60px}
  .tg-left{position:absolute;left:0;top:0;bottom:0;width:100vw;min-width:100vw;max-width:100vw;transform:translateX(-100%);transition:transform .22s ease;box-shadow:18px 0 45px rgba(23,26,34,.14)}
  .tg-left.is-open,.tg-shell.no-chat .tg-left,.tg-shell.tg-full-settings .tg-left{transform:translateX(0)}
  .tg-shell.no-chat .tg-main,.tg-shell.tg-full-settings .tg-main{visibility:hidden}
  .tg-mobile-back{display:flex}
  .tg-chat-header{padding-left:7px;padding-right:7px}
  .tg-chat-header__actions{gap:0}
  .tg-chat-header__actions .tg-round-btn:nth-child(-n+2){display:none}
  .tg-messages{padding:16px 8px 8px}
  .tg-messages__inner{width:100%}
  .tg-bubble{max-width:84%;font-size:13.5px;line-height:19px}
  .tg-composer-wrap{padding:7px 7px max(8px,env(safe-area-inset-bottom))}
  .tg-composer__box{border-radius:15px}
  .tg-send{width:48px;height:48px;border-radius:15px}
  .tg-right{width:100vw;min-width:100vw;max-width:100vw;z-index:40}
  .tg-modal-backdrop{align-items:flex-end;padding:0}
  .tg-modal{width:100%;max-height:88dvh;border-radius:22px 22px 0 0;border-bottom:0;animation:au-sheet .2s ease-out}
  .tg-toast{bottom:max(18px,env(safe-area-inset-bottom))}
}

/* Aurora emoji picker — compact Telegram-style composer panel */
.tg-emoji-panel{
  position:absolute;z-index:30;left:8px;bottom:64px;width:min(364px,calc(100vw - 24px));
  max-height:min(480px,calc(100dvh - 150px));display:flex;flex-direction:column;overflow:hidden;
  color:#e9f1fb;background:#172230;border:1px solid #2d3d50;border-radius:12px;
  box-shadow:0 16px 42px rgba(4,10,18,.42),0 2px 8px rgba(4,10,18,.25)
}
.tg-emoji-panel__modes{display:flex;flex:0 0 42px;align-items:stretch;border-bottom:1px solid #2a3a4c;background:#1c2a39}
.tg-emoji-panel__modes button{position:relative;flex:1;border:0;background:transparent;color:#8ea4bb;font-size:13px;font-weight:700;cursor:pointer}
.tg-emoji-panel__modes button:hover{color:#d9eaff;background:#223447}
.tg-emoji-panel__modes button.is-active{color:#55a9f7}
.tg-emoji-panel__modes button.is-active::after{content:"";position:absolute;left:18px;right:18px;bottom:0;height:2px;border-radius:2px;background:#4e9de6}
.tg-emoji-panel__search{display:flex;align-items:center;gap:8px;padding:8px 10px;border-bottom:1px solid #2a3a4c;background:#172230}
.tg-emoji-panel__search>span{display:grid;place-items:center;color:#8ca2b7}.tg-emoji-panel__search>span .tg-icon{width:16px;height:16px}
.tg-emoji-panel__search input{min-width:0;flex:1;height:30px;padding:0 10px;border:1px solid #394d63;border-radius:7px;outline:none;background:#213243;color:#edf5ff;font-size:13px}
.tg-emoji-panel__search input::placeholder{color:#8298ad}.tg-emoji-panel__search input:focus{border-color:#4f9de7;box-shadow:0 0 0 2px rgba(79,157,231,.14)}
.tg-emoji-panel__search button{display:grid;place-items:center;width:26px;height:26px;padding:0;border:0;background:transparent;color:#8ea4bb;cursor:pointer}.tg-emoji-panel__search button:hover{color:#fff}
.tg-emoji-panel__recent{padding:7px 10px 5px;border-bottom:1px solid rgba(54,72,91,.7)}
.tg-emoji-panel__recent>span{display:block;margin:0 0 4px;color:#b7c9dc;font-size:12px;font-weight:700}
.tg-emoji-panel__recent>div{display:flex;gap:1px;overflow-x:auto;scrollbar-width:none}.tg-emoji-panel__recent>div::-webkit-scrollbar{display:none}
.tg-emoji-panel__recent button{flex:0 0 29px;width:29px;height:29px;padding:0;border:0;border-radius:6px;background:transparent;font-size:21px;line-height:1;cursor:pointer}.tg-emoji-panel__recent button:hover{background:#2a4055}
.tg-emoji-panel__category-row{display:flex;gap:2px;padding:4px 8px;border-bottom:1px solid rgba(54,72,91,.7);overflow-x:auto;scrollbar-width:none}.tg-emoji-panel__category-row::-webkit-scrollbar{display:none}
.tg-emoji-panel__category-row button{flex:0 0 29px;width:29px;height:26px;padding:0;border:0;border-radius:6px;background:transparent;color:#a8bbce;font-size:17px;line-height:1;cursor:pointer}.tg-emoji-panel__category-row button:hover,.tg-emoji-panel__category-row button.is-active{background:#2a4055;color:#fff}
.tg-emoji-panel__title{display:flex;align-items:center;justify-content:space-between;padding:8px 11px 5px;color:#adc1d4}.tg-emoji-panel__title strong{font-size:12px;font-weight:700}.tg-emoji-panel__title span{color:#6f879e;font-size:10px}
.tg-emoji-panel__grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:2px;padding:3px 8px 10px;overflow-y:auto;overscroll-behavior:contain;scrollbar-color:#3c536a transparent;scrollbar-width:thin}
.tg-emoji-panel__grid button{display:grid;place-items:center;width:100%;aspect-ratio:1;padding:0;border:0;border-radius:7px;background:transparent;color:#fff;font-family:"Segoe UI Emoji","Apple Color Emoji",sans-serif;font-size:25px;line-height:1;cursor:pointer;transition:background .12s ease,transform .12s ease}.tg-emoji-panel__grid button:hover{background:#2a4055;transform:scale(1.08)}
.tg-emoji-panel__empty{grid-column:1/-1;padding:28px 12px;text-align:center;color:#7f95aa;font-size:12px}.tg-emoji-panel__empty--large{display:flex;flex:1;min-height:190px;align-items:center;justify-content:center;flex-direction:column;gap:6px}.tg-emoji-panel__empty--large strong{color:#c4d3e2;font-size:13px}.tg-emoji-panel__empty--large span{font-size:11px}
.tg-emoji-panel__sticker-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:12px;overflow-y:auto}.tg-emoji-panel__sticker-grid button{display:grid;place-items:center;min-height:92px;border:1px solid #2d4154;border-radius:10px;background:#1f3041;cursor:pointer}.tg-emoji-panel__sticker-grid button:hover{background:#294258}.tg-emoji-panel__sticker-grid img{width:76px;height:76px;object-fit:contain}
.tg-emoji-panel__gif-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px;overflow-y:auto}.tg-emoji-panel__gif-card{min-width:0;overflow:hidden;border:1px solid #2d4154;border-radius:10px;background:#1e2e3e}.tg-emoji-panel__gif-preview{display:block;width:100%;padding:0;border:0;overflow:hidden;background:#14202c;cursor:pointer}.tg-emoji-panel__gif-preview img{display:block;width:100%;height:100%;object-fit:cover}.tg-emoji-panel__gif-card>div{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:7px 8px}.tg-emoji-panel__gif-card strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#c8d7e5;font-size:10px}.tg-emoji-panel__gif-card>div button{flex:0 0 auto;padding:5px 7px;border:0;border-radius:6px;background:#347fbd;color:#fff;font-size:9px;font-weight:700;cursor:pointer}.tg-emoji-panel__gif-card button:hover{background:#4296d7}.tg-emoji-panel__gif-card button:disabled{opacity:.6;cursor:wait}
@media(max-width:560px){.tg-emoji-panel{left:4px;bottom:58px;width:calc(100vw - 16px);max-height:min(440px,calc(100dvh - 126px))}.tg-emoji-panel__grid{grid-template-columns:repeat(7,minmax(0,1fr));padding-left:6px;padding-right:6px}.tg-emoji-panel__grid button{font-size:24px}}
.tg-shell.theme-light .tg-emoji-panel{color:#1d2c3b;background:#fff;border-color:#d7e1eb;box-shadow:0 14px 35px rgba(29,54,77,.22)}
.tg-shell.theme-light .tg-emoji-panel__modes{background:#f8fbfe;border-color:#dfe8f0}.tg-shell.theme-light .tg-emoji-panel__modes button{color:#71869b}.tg-shell.theme-light .tg-emoji-panel__modes button:hover{background:#eef5fb}.tg-shell.theme-light .tg-emoji-panel__modes button.is-active{color:#348ed8}
.tg-shell.theme-light .tg-emoji-panel__search,.tg-shell.theme-light .tg-emoji-panel__recent{background:#fff;border-color:#e3ebf2}.tg-shell.theme-light .tg-emoji-panel__search input{background:#f4f7fa;border-color:#d4e0eb;color:#243546}.tg-shell.theme-light .tg-emoji-panel__recent>span,.tg-shell.theme-light .tg-emoji-panel__title{color:#4c6479}.tg-shell.theme-light .tg-emoji-panel__category-row{border-color:#e3ebf2}.tg-shell.theme-light .tg-emoji-panel__category-row button{color:#6f8498}.tg-shell.theme-light .tg-emoji-panel__grid button:hover,.tg-shell.theme-light .tg-emoji-panel__recent button:hover,.tg-shell.theme-light .tg-emoji-panel__category-row button:hover,.tg-shell.theme-light .tg-emoji-panel__category-row button.is-active{background:#edf4fa}.tg-shell.theme-light .tg-emoji-panel__empty--large strong{color:#445d72}
.tg-shell.theme-light .tg-emoji-panel__gif-card{border-color:#d6e2ed;background:#f5f8fb}.tg-shell.theme-light .tg-emoji-panel__gif-card>div strong{color:#435b70}.tg-shell.theme-light .tg-emoji-panel__gif-preview{background:#e8eff5}
.tg-emoji-panel{color:#243546;background:#fff;border-color:#d7e1eb}.tg-emoji-panel__modes{background:#f8fbfe;border-color:#dfe8f0}.tg-emoji-panel__search{background:#fff;border-color:#e3ebf2}.tg-emoji-panel__search input{background:#f4f7fa;border-color:#d4e0eb;color:#243546}.tg-emoji-panel__grid button:hover{background:#edf4fa}.tg-emoji-panel__sticker-grid button{border-color:#d6e2ed;background:#f5f8fb}.tg-emoji-panel__gif-card{border-color:#d6e2ed;background:#f5f8fb}.tg-emoji-panel__gif-preview{background:#e8eff5}
.tg-modal--story{position:relative;width:min(470px,calc(100vw - 24px));height:min(760px,calc(100vh - 28px));max-height:none;overflow:hidden;padding:0;background:#111820;border-radius:18px;box-shadow:0 24px 90px rgba(0,0,0,.55)}.tg-modal-backdrop:has(.tg-modal--story){background:rgba(9,14,20,.76);backdrop-filter:blur(12px)}.tg-modal--story .tg-story-progress{position:absolute;z-index:4;top:11px;left:14px;right:14px;height:3px;background:rgba(255,255,255,.3);border-radius:4px;overflow:hidden}.tg-modal--story .tg-story-progress i{display:block;width:42%;height:100%;background:#fff}.tg-modal--story .tg-modal__head{position:absolute;z-index:3;top:23px;left:12px;right:12px;height:46px;min-height:46px;padding:0;border:0;color:#fff;background:linear-gradient(180deg,rgba(0,0,0,.5),transparent)}.tg-modal--story .tg-modal__head .tg-round-btn{color:#fff;background:rgba(0,0,0,.3)}.tg-modal--story .tg-modal__head strong{font-size:14px;text-shadow:0 1px 3px #000}.tg-modal--story .tg-story-view{position:absolute;inset:0;padding:0;display:block}.tg-modal--story .tg-story-view img,.tg-modal--story .tg-story-view video{display:block;width:100%;height:100%;max-height:none;border-radius:0;object-fit:cover;background:#111820}.tg-modal--story .tg-story-view:after{content:"";position:absolute;inset:45% 0 0;background:linear-gradient(transparent,rgba(0,0,0,.8));pointer-events:none}.tg-modal--story .tg-story-view p{position:absolute;z-index:2;left:18px;right:18px;bottom:86px;width:auto;margin:0;color:#fff;font-size:14px;text-shadow:0 1px 4px #000}.tg-story-actions{position:absolute;z-index:3;right:18px;bottom:86px;display:flex;align-items:center;gap:8px}.tg-story-like{background:rgba(20,25,31,.55);color:#fff}.tg-story-like.is-liked{background:#ff5473;color:#fff}.tg-modal--story .tg-text-danger{color:#fff;position:absolute;z-index:3;right:20px;bottom:56px}.tg-story-reply{position:absolute;z-index:3;left:16px;right:16px;bottom:15px;width:auto;padding:11px 15px;border:1px solid rgba(255,255,255,.28);border-radius:999px;background:rgba(27,35,44,.72);color:#dbe4ec;font-size:12px}.tg-story-reply span{font-size:16px;color:#dbe4ec}
@media(max-width:560px){.tg-modal--story{width:100vw;height:100dvh;border-radius:0}.tg-modal-backdrop:has(.tg-modal--story){padding:0}}
.tg-modal--story .tg-story-view video{object-fit:contain!important;background:#05080b}
.tg-checks{display:inline-flex;align-items:center;margin-left:4px;color:currentColor;opacity:.72}.tg-checks.is-read{color:#3f9cff;opacity:1}.tg-checks .tg-icon{width:13px;height:13px}
.tg-bubble__text a,.tg-album__caption a{color:#2d8cff;text-decoration:underline;text-underline-offset:2px}.tg-bubble.is-out .tg-bubble__text a{color:#fff}
@media(max-width:430px){
  .tg-auth{align-items:flex-start;padding:20px 12px}
  .tg-auth-card{padding:24px 20px;border-radius:20px}
  .tg-auth-card h1{font-size:23px}
  .tg-chat-row{min-height:72px}
  .tg-folder{padding:0 9px}
}
@keyframes au-sheet{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:translateY(0)}}
.tg-profile-status{display:inline-flex!important;align-items:center;justify-content:center;gap:4px}
.tg-profile-status>.tg-icon{width:14px;height:14px;flex-basis:14px;color:var(--au-accent)}
.tg-profile-status>span{margin:0!important;color:inherit!important}

/* 2026 feature pass: resizable sidebar, albums, reactions and in-app media viewer. */
.tg-sidebar-resizer{
  position:absolute;z-index:35;top:0;right:-5px;width:10px;height:100%;
  cursor:col-resize;touch-action:none;background:transparent;
}
.tg-sidebar-resizer::after{
  content:"";position:absolute;top:0;bottom:0;left:4px;width:2px;
  background:transparent;transition:background-color .16s ease,box-shadow .16s ease;
}
.tg-sidebar-resizer:hover::after,.is-resizing-sidebar .tg-sidebar-resizer::after{
  background:var(--au-accent);box-shadow:0 0 0 1px rgba(109,93,252,.12);
}
.is-resizing-sidebar,.is-resizing-sidebar *{cursor:col-resize!important;user-select:none!important}

.tg-msg{position:relative}
.tg-message-react{
  width:30px;height:30px;border-radius:10px;display:flex;align-items:center;justify-content:center;
  align-self:center;margin:0 5px;color:var(--au-text-3);background:var(--au-surface);
  border:1px solid var(--au-line);box-shadow:0 4px 12px rgba(22,25,34,.06);
  opacity:0;transform:scale(.92);transition:opacity .14s ease,transform .14s ease,background-color .14s ease;
}
.tg-msg:hover .tg-message-react,.tg-message-react:focus-visible{opacity:1;transform:scale(1)}
.tg-msg.is-out .tg-message-react{order:-1}
.tg-message-react:hover{background:var(--au-accent-soft);color:var(--au-accent)}
.tg-message-react .tg-icon{width:17px;height:17px;flex-basis:17px}
.tg-reactions{display:flex;flex-wrap:wrap;gap:4px;clear:both;padding-top:7px}
.tg-reaction{
  min-width:34px;height:25px;padding:0 7px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;gap:4px;
  background:rgba(112,116,129,.11);border:1px solid transparent;color:inherit;font-size:13px;line-height:1;
}
.tg-reaction b{font-size:10.5px;font-weight:750;opacity:.72}
.tg-reaction.is-own{background:var(--au-accent-soft);border-color:rgba(109,93,252,.24);color:var(--au-accent)}
.tg-msg.is-out .tg-reaction{background:rgba(255,255,255,.14)}
.tg-msg.is-out .tg-reaction.is-own{background:#fff;color:var(--au-accent)}
.tg-context__emoji{width:22px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 22px;font-size:18px}

.tg-bubble__media{width:100%;padding:0;border:0;background:none;cursor:zoom-in;text-align:inherit}
.tg-bubble__media.is-gif{width:auto;max-width:min(320px,68vw);display:block;margin:-5px -8px 7px;background:rgba(0,0,0,.06)}
.tg-bubble__media.is-gif img{width:auto;max-width:100%;height:auto;max-height:320px;object-fit:contain;margin:0 auto}
.tg-bubble__text{display:inline}
.tg-media-play{
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:44px;height:44px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;color:#fff;background:rgba(16,18,24,.62);backdrop-filter:blur(8px);
}
.tg-media-play .tg-icon{width:22px;height:22px;flex-basis:22px;margin-left:2px}
.tg-media-cell,.tg-album__item{position:relative;padding:0;border:0;cursor:zoom-in}
.tg-album{display:grid;gap:3px;margin:-5px -8px 7px;overflow:hidden;border-radius:14px;max-width:520px}
.tg-album__item{min-height:130px;overflow:hidden;background:var(--au-surface-3)}
.tg-album__item img,.tg-album__item video{display:block;width:100%;height:100%;min-height:130px;max-height:360px;object-fit:cover}
.tg-album__item.is-gif{min-height:0;max-height:360px;background:rgba(0,0,0,.06)}
.tg-album__item.is-gif img{width:auto;height:auto;max-width:100%;max-height:360px;min-height:0;object-fit:contain;margin:0 auto}
.tg-album--1{grid-template-columns:1fr}
.tg-album--2{grid-template-columns:repeat(2,minmax(0,1fr))}
.tg-album--3{grid-template-columns:repeat(2,minmax(0,1fr))}
.tg-album--3 .tg-album__item:first-child{grid-row:span 2}
.tg-album--4,.tg-album--5,.tg-album--6{grid-template-columns:repeat(2,minmax(0,1fr))}
.tg-album--5 .tg-album__item:first-child,.tg-album--6 .tg-album__item:first-child{grid-column:span 2}
.tg-album__caption{margin-top:3px}
.tg-album-files{display:flex;flex-direction:column;gap:6px}
.tg-msg.has-album .tg-bubble{padding-top:9px}

.tg-attach-preview{display:block;padding:10px 11px}
.tg-attach-preview__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:7px}
.tg-attach-item{position:relative;min-width:0;height:82px;overflow:hidden;border-radius:11px;background:var(--au-surface-3);border:1px solid var(--au-line)}
.tg-attach-item img,.tg-attach-item video{width:100%;height:100%;display:block;object-fit:cover}
.tg-attach-item>span{position:absolute;left:0;right:0;bottom:0;padding:18px 7px 5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:linear-gradient(transparent,rgba(13,15,21,.78));color:#fff;font-size:10px}
.tg-attach-item>button{position:absolute;right:5px;top:5px;width:27px;height:27px;border-radius:9px;background:rgba(15,17,23,.7);color:#fff;backdrop-filter:blur(8px)}
.tg-attach-item>button:hover{background:rgba(15,17,23,.9)}
.tg-attach-item>button .tg-icon{width:15px;height:15px;flex-basis:15px}
.tg-attach-preview__meta{margin-top:7px;color:var(--au-text-2);font-size:11px;font-weight:600}

.tg-profile-avatar-button{position:relative;display:inline-flex;border-radius:50%;cursor:zoom-in}
.tg-info-profile .tg-avatar--big{border-radius:50%}
.tg-profile-avatar-button__zoom{
  position:absolute;right:0;bottom:0;width:31px;height:31px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:var(--au-surface);border:2px solid var(--au-surface);color:var(--au-accent);box-shadow:0 5px 15px rgba(24,27,37,.16)
}
.tg-profile-avatar-button__zoom .tg-icon{width:16px;height:16px;flex-basis:16px}

.tg-lightbox{
  position:fixed;inset:0;z-index:150;display:flex;align-items:center;justify-content:center;padding:24px;
  background:rgba(7,8,12,.9);backdrop-filter:blur(18px);animation:au-fade .16s ease;
}
.tg-lightbox__stage{position:relative;max-width:min(1500px,96vw);max-height:94vh;display:flex;align-items:center;justify-content:center}
.tg-lightbox__stage>img,.tg-lightbox__stage>video{display:block;max-width:100%;max-height:94vh;object-fit:contain;border-radius:10px;box-shadow:0 28px 90px rgba(0,0,0,.42)}
.tg-lightbox__close,.tg-lightbox__open{
  position:fixed;top:18px;width:44px;height:44px;border-radius:14px;display:flex;align-items:center;justify-content:center;
  color:#fff;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.14);backdrop-filter:blur(12px)
}
.tg-lightbox__close{right:18px}.tg-lightbox__open{right:70px}
.tg-lightbox__close:hover,.tg-lightbox__open:hover{background:rgba(255,255,255,.2)}

.tg-shell.theme-dark .tg-message-react{background:var(--au-surface);border-color:var(--au-line)}
.tg-shell.theme-dark .tg-reaction{background:rgba(255,255,255,.08)}

@media(max-width:720px){
  .tg-sidebar-resizer{display:none}
  .tg-message-react{display:none}
  .tg-album{max-width:100%}
  .tg-album__item,.tg-album__item img,.tg-album__item video{min-height:105px}
  .tg-attach-preview__grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .tg-attach-item{height:72px}
  .tg-lightbox{padding:8px}
  .tg-lightbox__stage>img,.tg-lightbox__stage>video{max-height:calc(100dvh - 16px);border-radius:7px}
  .tg-lightbox__close,.tg-lightbox__open{top:max(10px,env(safe-area-inset-top));width:42px;height:42px}
  .tg-lightbox__close{right:10px}.tg-lightbox__open{right:60px}
}

/* Package 2 — profile, community management, stable context menu and gallery. */
.tg-self-avatar{
  width:42px;height:42px;flex:0 0 42px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  padding:0;box-shadow:0 5px 16px rgba(31,34,44,.12);transition:transform .16s ease,box-shadow .16s ease;
}
.tg-self-avatar:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(31,34,44,.16)}
.tg-self-avatar .tg-avatar{width:42px;height:42px;border-radius:50%}
.tg-topbar .tg-avatar,.tg-chat-header .tg-avatar{border-radius:50%}

.tg-context{width:max-content;min-width:222px;max-width:min(320px,calc(100vw - 16px));overflow:hidden}
.tg-context__reactions{display:flex;align-items:center;gap:2px;padding:3px 3px 7px;border-bottom:1px solid var(--au-line)}
.tg-context__reactions button{width:42px;height:40px;min-width:0;padding:0;display:flex;align-items:center;justify-content:center;border-radius:11px}
.tg-context__reactions button:hover{background:var(--au-accent-soft);transform:translateY(-1px)}
.tg-context__reactions .tg-context__emoji{width:auto;flex:auto;font-size:21px;line-height:1}
.tg-context__actions{padding-top:4px}
.tg-context__actions button{width:100%}

.tg-modal--wide{width:min(660px,100%)}
.tg-profile-view,.tg-profile-editor{padding:0 18px 18px}
.tg-profile-hero{position:relative;margin:0 -18px;padding:88px 22px 22px;display:flex;flex-direction:column;align-items:center;text-align:center;overflow:hidden;background:var(--au-surface)}
.tg-profile-hero__cover{position:absolute;left:0;right:0;top:0;height:126px;background:
  radial-gradient(circle at 18% 20%,rgba(255,255,255,.28),transparent 24%),
  radial-gradient(circle at 82% 35%,rgba(255,255,255,.18),transparent 26%),
  linear-gradient(135deg,#7d70ff,#5c4de2 58%,#4c3fc1)}
.tg-profile-hero__cover::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent,rgba(35,27,111,.22))}
.tg-profile-hero__avatar{position:relative;z-index:1;padding:5px;border-radius:50%;background:var(--au-surface);box-shadow:0 12px 32px rgba(26,28,40,.22)}
.tg-profile-hero .tg-avatar--big{width:108px;height:108px;border-radius:50%;box-shadow:none}
.tg-profile-hero>.tg-profile-hero__avatar+strong{margin-top:14px;font-size:22px;line-height:28px;letter-spacing:-.025em}
.tg-profile-hero>span{margin-top:3px;color:var(--au-accent);font-size:13px;font-weight:650}
.tg-profile-hero>p{max-width:460px;margin:12px 0 0;color:var(--au-text-2);font-size:13px;line-height:19px;white-space:pre-wrap}
.tg-profile-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:14px}
.tg-profile-stats>div{min-width:0;padding:13px 8px;border:1px solid var(--au-line);border-radius:14px;background:var(--au-surface-2);text-align:center}
.tg-profile-stats b{display:block;font-size:18px;line-height:22px}
.tg-profile-stats span{display:block;margin-top:2px;color:var(--au-text-3);font-size:10.5px;text-transform:uppercase;letter-spacing:.035em}
.tg-profile-details{margin-top:12px;overflow:hidden;border:1px solid var(--au-line);border-radius:16px;background:var(--au-surface)}
.tg-profile-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:12px}
.tg-profile-actions .tg-primary,.tg-profile-actions .tg-secondary{gap:8px}
.tg-secondary{min-height:44px;border:1px solid var(--au-line-strong);border-radius:12px;display:flex;align-items:center;justify-content:center;background:var(--au-surface-2);color:var(--au-text);font-weight:680}
.tg-secondary:hover{background:var(--au-surface-3)}
.tg-secondary .tg-icon,.tg-primary .tg-icon{width:18px;height:18px;flex-basis:18px}

/* One visual verification component everywhere in the messenger. */
.tg-verified-badge{display:inline-flex;align-items:center;justify-content:center;width:21px;height:21px;margin-left:6px;vertical-align:-5px;color:#249de8;filter:drop-shadow(0 2px 4px rgba(5,68,130,.58));flex:0 0 21px}
.tg-verified-badge .tg-icon{width:21px;height:21px;flex-basis:21px}
.tg-verified-badge.is-verified{color:#249de8}
.tg-risk-marker{display:inline-flex;align-items:center;justify-content:center;width:19px;height:19px;margin-left:6px;vertical-align:-4px;color:#ff626d;font-size:17px;font-weight:900;line-height:1;filter:drop-shadow(0 1px 3px rgba(140,18,30,.45));flex:0 0 19px}
.tg-risk-marker.is-compact{width:16px;height:16px;margin-left:4px;vertical-align:-3px;font-size:14px;flex-basis:16px}
.tg-channel-subscriber-wrap{display:flex;align-items:center;justify-content:center;gap:10px}
.tg-channel-notify-toggle,.tg-channel-unsubscribe{min-height:42px;border-radius:13px;font-size:13px;font-weight:750}
.tg-channel-notify-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 16px;border:1px solid var(--au-line);background:var(--au-surface-2);color:var(--au-text-2)}
.tg-channel-notify-toggle.is-on{border-color:rgba(36,157,232,.38);background:var(--au-accent-soft);color:var(--au-accent)}
.tg-channel-notify-toggle .tg-icon{width:18px;height:18px;flex-basis:18px}
.tg-channel-unsubscribe{padding:0 12px;border:0;background:transparent;color:#db4f60}
.tg-verification-note .tg-verified-badge{margin-left:0;vertical-align:0}

/* Account picker actions stay aligned and never inherit full-width buttons. */
.tg-account-switch-actions{display:flex;align-items:center;gap:8px;margin-left:10px;flex:0 0 auto}
.tg-account-switch-actions .tg-text-danger{padding:6px 3px;border:0;white-space:nowrap}
.tg-account-switch-go{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 12px;border:1px solid rgba(75,157,232,.35);border-radius:10px;background:var(--au-accent);color:#fff;font-size:12px;font-weight:750;line-height:1;white-space:nowrap;box-shadow:0 5px 13px rgba(37,138,225,.22);transition:transform .16s ease,filter .16s ease}
.tg-account-switch-go:hover{filter:brightness(1.08);transform:translateY(-1px)}
.tg-account-switch-go:active{transform:translateY(0)}

.tg-profile-editor__avatar{display:flex;flex-direction:column;align-items:center;gap:10px;padding:18px 0 8px}
.tg-profile-editor__avatar .tg-avatar--big{border-radius:50%}
.tg-avatar-upload{height:38px;padding:0 13px;border-radius:11px;display:inline-flex;align-items:center;gap:7px;background:var(--au-accent-soft);color:var(--au-accent);font-size:12px;font-weight:680;cursor:pointer}
.tg-avatar-upload:hover{background:var(--au-accent-soft-strong)}
.tg-avatar-upload .tg-icon{width:17px;height:17px;flex-basis:17px}
.tg-field small{color:var(--au-text-3);font-size:10.5px;font-weight:500;line-height:15px}
.tg-field input[readonly]{background:var(--au-surface-3);color:var(--au-text-2);cursor:not-allowed}
.tg-profile-public{position:relative;min-height:58px;display:flex;align-items:center;gap:12px;padding:9px 12px;border:1px solid var(--au-line);border-radius:14px;background:var(--au-surface-2);cursor:pointer}
.tg-profile-public>span{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.tg-profile-public strong{font-size:13px}
.tg-profile-public small{color:var(--au-text-2);font-size:11px}
.tg-profile-public input{position:absolute;opacity:0;pointer-events:none}
.tg-profile-public input:checked~.tg-switch{background:var(--au-accent)}
.tg-profile-public input:checked~.tg-switch::after{transform:translateX(16px)}
.tg-profile-editor__secondary{display:flex;justify-content:center;gap:18px}
.tg-auth-link.danger{color:var(--au-danger)}

.tg-community-create{gap:13px}
.tg-community-cover{display:flex;align-items:center;gap:13px;padding:15px;border-radius:16px;background:linear-gradient(135deg,var(--au-accent-soft),var(--au-surface-2));border:1px solid rgba(109,93,252,.14)}
.tg-community-cover--channel{background:linear-gradient(135deg,rgba(67,173,154,.13),var(--au-surface-2));border-color:rgba(67,173,154,.16)}
.tg-community-cover__icon{width:48px;height:48px;border-radius:15px;display:flex;align-items:center;justify-content:center;background:var(--au-accent);color:#fff;box-shadow:0 8px 18px rgba(109,93,252,.22)}
.tg-community-cover--channel .tg-community-cover__icon{background:#35a88f;box-shadow:0 8px 18px rgba(53,168,143,.22)}
.tg-community-cover__icon .tg-icon{width:24px;height:24px;flex-basis:24px}
.tg-community-cover>div{min-width:0;display:flex;flex-direction:column;gap:3px}
.tg-community-cover strong{font-size:14px}.tg-community-cover span{color:var(--au-text-2);font-size:11.5px;line-height:16px}
.tg-member-picker{display:flex;flex-direction:column;gap:8px}
.tg-selected-members{display:flex;flex-wrap:wrap;gap:6px}
.tg-member-chip{height:34px;max-width:100%;display:inline-flex;align-items:center;gap:6px;padding:3px 5px 3px 4px;border-radius:999px;background:var(--au-accent-soft);color:var(--au-accent)}
.tg-member-chip b{max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
.tg-member-chip button{width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center}
.tg-member-chip button:hover{background:rgba(109,93,252,.12)}
.tg-member-chip button .tg-icon{width:14px;height:14px;flex-basis:14px}
.tg-member-results{max-height:250px;overflow-y:auto;border:1px solid var(--au-line);border-radius:14px;background:var(--au-surface)}
.tg-member-result{width:100%;min-height:58px;display:flex;align-items:center;gap:10px;padding:8px 10px;text-align:left}
.tg-member-result+.tg-member-result{border-top:1px solid var(--au-line)}
.tg-member-result:hover,.tg-member-result.is-selected{background:var(--au-surface-2)}
.tg-member-result>span:not(.tg-avatar){min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.tg-member-result strong,.tg-member-result small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-member-result strong{font-size:12.5px}.tg-member-result small{color:var(--au-text-3);font-size:10.5px}
.tg-member-result>i{width:30px;height:30px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:var(--au-surface-3);color:var(--au-text-2);font-style:normal}
.tg-member-result.is-selected>i{background:var(--au-accent);color:#fff}
.tg-member-result>i .tg-icon{width:16px;height:16px;flex-basis:16px}
.tg-member-empty{padding:20px 12px;text-align:center;color:var(--au-text-3);font-size:11.5px}

.tg-community-manage{min-height:480px;display:flex;flex-direction:column;overflow:hidden}
.tg-manage-summary{display:flex;align-items:center;gap:11px;padding:12px 15px;border-bottom:1px solid var(--au-line);background:var(--au-surface-2)}
.tg-manage-summary>span:not(.tg-avatar){min-width:0;display:flex;flex-direction:column;gap:2px}
.tg-manage-summary strong,.tg-manage-summary small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-manage-summary strong{font-size:13.5px}.tg-manage-summary small{color:var(--au-text-2);font-size:10.5px}
.tg-manage-tabs{display:flex;gap:3px;padding:7px 9px;border-bottom:1px solid var(--au-line);overflow-x:auto;scrollbar-width:none}
.tg-manage-tabs::-webkit-scrollbar{display:none}
.tg-manage-tabs button{height:34px;padding:0 11px;border-radius:10px;color:var(--au-text-2);font-size:11.5px;font-weight:650;white-space:nowrap}
.tg-manage-tabs button:hover{background:var(--au-surface-2)}
.tg-manage-tabs button.is-active{background:var(--au-accent-soft);color:var(--au-accent)}
.tg-manage-content{min-height:0;flex:1;overflow-y:auto;padding:14px}
.tg-manage-overview{display:flex;flex-direction:column;gap:12px}
.tg-manage-avatar{display:flex;flex-direction:column;align-items:center;gap:8px;padding:6px 0 10px}
.tg-manage-avatar .tg-avatar--big{border-radius:50%}
.tg-manage-avatar label{height:36px;display:inline-flex;align-items:center;gap:7px;padding:0 12px;border-radius:10px;background:var(--au-accent-soft);color:var(--au-accent);font-size:11.5px;font-weight:670;cursor:pointer}
.tg-manage-avatar label .tg-icon{width:16px;height:16px;flex-basis:16px}
.tg-manage-search{margin-bottom:12px}
.tg-manage-members{display:flex;flex-direction:column;gap:7px}
.tg-manage-member{position:relative;min-height:64px;display:flex;align-items:center;gap:10px;padding:8px 9px;border:1px solid var(--au-line);border-radius:14px;background:var(--au-surface)}
.tg-manage-member>span:not(.tg-avatar){min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.tg-manage-member strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.tg-manage-member small{color:var(--au-text-3);font-size:10.5px}
.tg-role-badge{width:28px;height:28px;border-radius:9px;display:flex;align-items:center;justify-content:center;background:var(--au-accent-soft);color:var(--au-accent);font-style:normal}
.tg-role-badge .tg-icon{width:15px;height:15px;flex-basis:15px}
.tg-member-actions{position:absolute;right:7px;top:54px;z-index:3;display:none;min-width:180px;padding:5px;border:1px solid var(--au-line);border-radius:12px;background:var(--au-surface);box-shadow:var(--au-shadow-soft)}
.tg-manage-member:hover .tg-member-actions,.tg-manage-member:focus-within .tg-member-actions{display:block}
.tg-member-actions button{width:100%;height:34px;display:flex;align-items:center;gap:8px;padding:0 8px;border-radius:8px;text-align:left;font-size:11px}
.tg-member-actions button:hover{background:var(--au-surface-2)}.tg-member-actions button.danger{color:var(--au-danger)}
.tg-member-actions .tg-icon{width:15px;height:15px;flex-basis:15px}
.tg-invite-panel{min-height:340px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px}
.tg-invite-icon{width:64px;height:64px;border-radius:20px;display:flex;align-items:center;justify-content:center;background:var(--au-accent-soft);color:var(--au-accent)}
.tg-invite-icon .tg-icon{width:30px;height:30px;flex-basis:30px}
.tg-invite-panel>strong{margin-top:14px;font-size:17px}.tg-invite-panel>p{max-width:390px;margin:7px 0 15px;color:var(--au-text-2);font-size:12px;line-height:17px}
.tg-invite-link{width:100%;display:flex;gap:7px}
.tg-invite-link input{min-width:0;flex:1;height:44px;border:1px solid var(--au-line);border-radius:12px;background:var(--au-surface-2);padding:0 11px;color:var(--au-text-2);outline:0}
.tg-invite-link button{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:var(--au-accent);color:#fff}
.tg-invite-panel>.tg-secondary{width:100%;margin-top:9px}
.tg-community-actions{overflow:hidden;border:1px solid var(--au-line);border-radius:15px}

.tg-info-profile--enhanced{position:relative;overflow:hidden;padding-top:28px}
.tg-info-profile--enhanced::before{content:"";position:absolute;left:0;right:0;top:0;height:78px;background:linear-gradient(135deg,rgba(109,93,252,.2),rgba(68,186,160,.12));pointer-events:none}
.tg-info-profile--enhanced>*{position:relative;z-index:1}
.tg-info-profile--channel::before{height:104px;background:radial-gradient(circle at 82% 12%,rgba(255,255,255,.30),transparent 31%),linear-gradient(125deg,#147fe1 0%,#289fea 52%,#68cdf5 100%)}

.tg-lightbox__stage{width:100%;height:calc(100dvh - 48px);padding:58px 72px 104px}
.tg-lightbox__stage>img,.tg-lightbox__stage>video{max-width:100%;max-height:100%;border-radius:8px}
.tg-lightbox__nav{position:fixed;top:50%;transform:translateY(-50%);width:52px;height:64px;border-radius:16px;display:flex;align-items:center;justify-content:center;color:#fff;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.14);backdrop-filter:blur(12px)}
.tg-lightbox__nav:hover{background:rgba(255,255,255,.2)}
.tg-lightbox__nav--prev{left:18px}.tg-lightbox__nav--next{right:18px}
.tg-lightbox__nav .tg-icon{width:28px;height:28px;flex-basis:28px}
.tg-lightbox__counter{position:fixed;left:50%;top:20px;transform:translateX(-50%);height:36px;padding:0 13px;border-radius:12px;display:flex;align-items:center;color:#fff;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.14);font-size:12px;font-weight:680;backdrop-filter:blur(12px)}
.tg-lightbox__strip{position:fixed;left:50%;bottom:15px;transform:translateX(-50%);max-width:min(760px,calc(100vw - 120px));height:76px;display:flex;gap:6px;overflow-x:auto;padding:6px;border-radius:16px;background:rgba(18,20,27,.62);border:1px solid rgba(255,255,255,.12);backdrop-filter:blur(14px);scrollbar-width:none}
.tg-lightbox__strip::-webkit-scrollbar{display:none}
.tg-lightbox__strip button{width:62px;height:62px;flex:0 0 62px;overflow:hidden;border-radius:10px;border:2px solid transparent;opacity:.62;transition:opacity .15s ease,border-color .15s ease,transform .15s ease}
.tg-lightbox__strip button:hover{opacity:.9}.tg-lightbox__strip button.is-active{opacity:1;border-color:#fff;transform:translateY(-1px)}
.tg-lightbox__strip img,.tg-lightbox__strip video{width:100%;height:100%;display:block;object-fit:cover}

.tg-shell.theme-dark .tg-community-cover,.tg-shell.theme-dark .tg-manage-summary,.tg-shell.theme-dark .tg-profile-stats>div,.tg-shell.theme-dark .tg-profile-public{background:var(--au-surface-2)}

@media(max-width:720px){
  .tg-modal--wide{width:100%}
  .tg-profile-view,.tg-profile-editor{padding-left:13px;padding-right:13px}
  .tg-profile-hero{margin-left:-13px;margin-right:-13px}
  .tg-profile-actions{grid-template-columns:1fr}
  .tg-profile-stats span{font-size:9px}
  .tg-community-manage{min-height:65dvh}
  .tg-manage-content{padding:10px}
  .tg-member-actions{position:static;display:flex;min-width:0;width:100%;margin-left:52px;padding:0;border:0;box-shadow:none;background:transparent}
  .tg-manage-member{flex-wrap:wrap}
  .tg-member-actions button{width:auto;flex:1;justify-content:center;background:var(--au-surface-2)}
  .tg-lightbox__stage{height:100dvh;padding:60px 8px 98px}
  .tg-lightbox__nav{width:44px;height:54px;border-radius:13px}
  .tg-lightbox__nav--prev{left:7px}.tg-lightbox__nav--next{right:7px}
  .tg-lightbox__strip{max-width:calc(100vw - 16px);bottom:max(8px,env(safe-area-inset-bottom));height:68px}
  .tg-lightbox__strip button{width:54px;height:54px;flex-basis:54px}
  .tg-lightbox__counter{top:max(12px,env(safe-area-inset-top))}
  .tg-context__reactions button{width:39px}
}
.tg-profile-view>.tg-profile-hero,.tg-profile-view>.tg-profile-stats,.tg-profile-view>.tg-profile-details,.tg-profile-view>.tg-profile-actions{flex:0 0 auto}

/* Package 3 — edge-aligned messages, round avatars, solid menus, wallpapers and username search. */
.tg-avatar,
.tg-avatar--small,
.tg-avatar--mini,
.tg-avatar--big,
.tg-chat-row .tg-avatar,
.tg-chat-header .tg-avatar,
.tg-topbar .tg-avatar{border-radius:50%}

.tg-main{
  background-image:var(--chat-bg-image,url('/static/tg_chat_bg_light.png'));
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
}
.tg-shell.theme-dark .tg-main{
  background-image:var(--chat-bg-image,url('/static/tg_chat_bg_exact.png'));
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
}

.tg-messages{padding-left:8px;padding-right:8px}
.tg-messages__inner{width:100%;max-width:none;margin:0}
.tg-msg.is-in{padding-right:11%}
.tg-msg.is-out{padding-left:11%}
.tg-bubble{max-width:min(76%,720px)}

.tg-composer__box textarea{
  height:auto;
  max-height:none;
  overflow-y:hidden;
  resize:none;
}

/* Dropdowns and dialogs stay visually whole. The backdrop scrolls as one surface when needed. */
.tg-menu,.tg-context{overflow:visible;max-height:none}
.tg-modal-backdrop{overflow-y:auto;align-items:flex-start}
.tg-modal{max-height:none;overflow:visible;margin:auto}
.tg-modal__body{overflow:visible}
.tg-community-manage{min-height:0;overflow:visible}
.tg-manage-content{overflow:visible}
.tg-member-results{max-height:none;overflow:visible}
.tg-search-results{max-height:none;overflow:visible}

.tg-global-users{flex:0 0 auto;padding:7px;border-bottom:1px solid var(--au-line);background:var(--au-surface)}
.tg-global-users__head{padding:5px 8px 7px;color:var(--au-text-3);font-size:11px;font-weight:750;letter-spacing:.06em;text-transform:uppercase}
.tg-global-user{width:100%;min-height:62px;display:flex;align-items:center;gap:10px;padding:7px 9px;border-radius:13px;text-align:left;transition:background .15s ease}
.tg-global-user:hover{background:var(--au-accent-soft)}
.tg-global-user>span:not(.tg-avatar){min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.tg-global-user strong,.tg-global-user small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-global-user strong{font-size:13.5px}
.tg-global-user small{color:var(--au-text-2);font-size:11.5px}
.tg-global-user i{width:34px;height:34px;border-radius:11px;display:flex;align-items:center;justify-content:center;background:var(--au-accent-soft);color:var(--au-accent);font-style:normal}
.tg-global-user i .tg-icon{width:17px;height:17px;flex-basis:17px}

.tg-wallpaper-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.tg-wallpaper-card{min-width:0;display:flex;flex-direction:column;gap:7px;padding:7px;border:1px solid var(--au-line);border-radius:15px;background:var(--au-surface);text-align:left;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease}
.tg-wallpaper-card:hover{transform:translateY(-1px);border-color:var(--au-line-strong);box-shadow:var(--au-shadow-soft)}
.tg-wallpaper-card.is-active{border-color:var(--au-accent);box-shadow:0 0 0 3px rgba(109,93,252,.11)}
.tg-wallpaper-card>span{height:100px;border-radius:10px;background-position:center;background-size:cover;background-repeat:no-repeat;display:flex;align-items:center;justify-content:center;color:var(--au-accent);background-color:var(--au-surface-2)}
.tg-wallpaper-card>b{padding:0 3px 2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.tg-wallpaper-card--upload{cursor:pointer}
.tg-wallpaper-card--upload>span{border:1px dashed var(--au-line-strong)}
.tg-wallpaper-card--upload .tg-icon{width:28px;height:28px;flex-basis:28px}

@media(max-width:720px){
  .tg-msg.is-in{padding-right:4%}
  .tg-msg.is-out{padding-left:4%}
  .tg-bubble{max-width:88%}
  .tg-messages{padding-left:5px;padding-right:5px}
  .tg-wallpaper-grid{grid-template-columns:1fr 1fr}
  .tg-wallpaper-card>span{height:82px}
  .tg-modal-backdrop{padding:8px;align-items:flex-start}
  .tg-modal{margin:auto 0;width:100%;border-radius:18px}
}
.tg-msg.is-in .tg-message-react{order:2}

/* Settings completion */
.tg-main::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:rgba(0,0,0,var(--wallpaper-dim,0));
}
.tg-main>*{position:relative;z-index:1}
.tg-settings-caption{padding:11px 14px 5px;color:var(--au-text-3);font-size:10.5px;font-weight:750;letter-spacing:.055em;text-transform:uppercase}
.tg-theme-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;padding:9px;background:var(--au-surface-2);border-radius:16px}
.tg-theme-picker .tg-settings-caption{grid-column:1/-1;padding:3px 5px 10px}
.tg-theme-picker .tg-settings-row{min-height:38px;justify-content:center;padding:0 8px;border-radius:10px;text-align:center}
.tg-theme-picker .tg-settings-row>.tg-icon{display:none}
.tg-theme-picker .tg-settings-row__body{display:block;flex:0 1 auto}
.tg-theme-picker .tg-settings-row__body strong{font-size:12px}
.tg-theme-picker .tg-settings-row__body span{display:none}
.tg-settings-row.is-selected{color:var(--au-accent);background:var(--au-accent-soft)}
.tg-settings-row.is-selected>.tg-icon{opacity:1}
.tg-settings-row:not(.is-selected)> .tg-icon{opacity:.72}
.tg-range-setting{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 12px;padding:14px}
.tg-range-setting>span{display:flex;min-width:0;flex-direction:column;gap:3px}
.tg-range-setting strong{font-size:13.5px}
.tg-range-setting small{color:var(--au-text-2);font-size:11.5px}
.tg-range-setting output{color:var(--au-accent);font-size:12px;font-weight:750}
.tg-range-setting input{grid-column:1/-1;width:100%;accent-color:var(--au-accent)}
.tg-shell.font-small{font-size:13px}
.tg-shell.font-small .tg-bubble{font-size:12.5px;line-height:18px}
.tg-shell.font-small .tg-chat-row__title{font-size:13.5px}
.tg-shell.font-large{font-size:16px}
.tg-shell.font-large .tg-bubble{font-size:15.5px;line-height:22px}
.tg-shell.font-large .tg-chat-row__title{font-size:15.5px}
.tg-shell.messages-narrow .tg-bubble{max-width:min(54%,520px)}
.tg-shell.messages-wide .tg-bubble{max-width:min(82%,820px)}
.tg-shell.hide-chat-avatars .tg-chat-row>.tg-avatar{display:none}
.tg-shell.hide-chat-avatars .tg-chat-row{padding-left:14px}
@media(max-width:760px){
  .tg-shell.messages-narrow .tg-bubble{max-width:72%}
  .tg-shell.messages-wide .tg-bubble{max-width:94%}
}

/* Voice recorder and advanced chat controls */
.tg-recording{display:flex;align-items:center;gap:10px;min-width:190px;padding:0 10px;color:#d9364f}
.tg-recording__dot{width:10px;height:10px;border-radius:50%;background:#e54861;box-shadow:0 0 0 0 rgba(229,72,97,.45);animation:tgRecPulse 1.2s infinite}
.tg-recording b{font-variant-numeric:tabular-nums;color:var(--au-text)}
.tg-recording button{border:0;background:transparent;color:#d9364f;font-weight:700;cursor:pointer}
.tg-composer__box.is-recording{opacity:.55}
.tg-send.is-recording{background:#e54861;color:#fff;animation:tgRecButton 1.3s infinite}
@keyframes tgRecPulse{70%{box-shadow:0 0 0 9px rgba(229,72,97,0)}100%{box-shadow:0 0 0 0 rgba(229,72,97,0)}}
@keyframes tgRecButton{50%{transform:scale(.96)}}
@media (prefers-reduced-motion:reduce){.tg-recording__dot,.tg-send.is-recording{animation:none}}

/* Package 5 — Telegram-style archive and full community/profile editors */
.tg-folders{display:none!important}
.tg-archive-row{
  flex:0 0 auto;width:100%;min-height:64px;display:flex;align-items:center;gap:12px;
  padding:9px 14px;border-bottom:1px solid var(--au-line);background:var(--au-surface);
  text-align:left;color:var(--au-text);transition:background .16s ease
}
.tg-archive-row:hover{background:var(--au-surface-2)}
.tg-archive-row>.tg-icon{
  width:42px;height:42px;flex:0 0 42px;padding:10px;border-radius:50%;
  color:#fff;background:linear-gradient(145deg,#6d5dfc,#7f75ff);box-shadow:0 8px 20px rgba(109,93,252,.22)
}
.tg-archive-row.is-open>.tg-icon{background:var(--au-surface-2);color:var(--au-accent);box-shadow:none}
.tg-archive-row>span{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.tg-archive-row strong{font-size:14px}.tg-archive-row small{color:var(--au-text-2);font-size:11.5px}
.tg-archive-row>b{min-width:25px;height:25px;display:grid;place-items:center;padding:0 7px;border-radius:999px;background:var(--au-accent);color:#fff;font-size:11px}

.tg-telegram-editor{gap:14px!important}
.tg-editor-section{display:flex;flex-direction:column;gap:10px;padding:14px;border:1px solid var(--au-line);border-radius:17px;background:var(--au-surface)}
.tg-editor-section__title{color:var(--au-accent);font-size:11px;font-weight:800;letter-spacing:.055em;text-transform:uppercase}
.tg-editor-photo{display:flex;align-items:center;justify-content:center;gap:18px;padding:16px;border-radius:18px;background:var(--au-surface-2)}
.tg-editor-photo--compact{justify-content:flex-start}
.tg-editor-photo__actions{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.tg-editor-photo .tg-profile-editor__avatar{padding:0}
.tg-avatar-upload{display:inline-flex;align-items:center;gap:8px;padding:9px 12px;border-radius:11px;background:var(--au-accent-soft);color:var(--au-accent);font-size:12px;font-weight:750;cursor:pointer}
.tg-avatar-upload .tg-icon{width:17px;height:17px;flex-basis:17px}
.tg-text-danger{padding:5px 2px;color:#dc445c;font-size:12px;font-weight:700;background:transparent}
.tg-editor-toggle{min-height:55px;display:flex;align-items:center;gap:14px;padding:9px 2px;border-bottom:1px solid var(--au-line);cursor:pointer}
.tg-editor-toggle:last-child{border-bottom:0}
.tg-editor-toggle>span{min-width:0;flex:1;display:flex;flex-direction:column;gap:3px}
.tg-editor-toggle strong{font-size:13.5px}.tg-editor-toggle small{color:var(--au-text-2);font-size:11.5px;line-height:16px}
.tg-editor-toggle>input{position:absolute;opacity:0;pointer-events:none}
.tg-editor-toggle>input:checked~.tg-switch{background:var(--au-accent)}
.tg-editor-toggle>input:checked~.tg-switch::after{transform:translateX(16px)}
.tg-username-field{display:flex;align-items:center;min-height:44px;border:1px solid var(--au-line);border-radius:12px;background:var(--au-surface-2);overflow:hidden}
.tg-username-field:focus-within{border-color:var(--au-accent);box-shadow:0 0 0 3px var(--au-accent-soft)}
.tg-username-field>b{padding-left:13px;color:var(--au-text-2);font-size:13px;white-space:nowrap}
.tg-username-field>input{min-width:0;flex:1;border:0!important;background:transparent!important;box-shadow:none!important;padding-left:4px!important}
.tg-field select{width:100%;min-height:44px;padding:0 12px;border:1px solid var(--au-line);border-radius:12px;background:var(--au-surface-2);color:var(--au-text);font:inherit;outline:0}
.tg-field select:focus{border-color:var(--au-accent);box-shadow:0 0 0 3px var(--au-accent-soft)}

.tg-community-manage{min-height:0!important;overflow:visible!important}
.tg-manage-tabs{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px!important;padding:9px!important;overflow:visible!important}
.tg-manage-tabs button{width:100%;min-width:0;padding:0 6px!important;white-space:normal!important;line-height:14px}
.tg-manage-content{overflow:visible!important}
.tg-manage-form{display:flex;flex-direction:column;gap:14px}
.tg-manage-overview{display:flex;flex-direction:column;gap:13px}
.tg-manage-avatar{display:flex;align-items:center;justify-content:center}
.tg-manage-member>span{min-width:0}.tg-manage-member>span strong,.tg-manage-member>span small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-member-actions{flex-wrap:wrap;justify-content:flex-end}

@media(max-width:720px){
  .tg-archive-row{min-height:58px;padding:7px 11px}.tg-archive-row>.tg-icon{width:38px;height:38px;flex-basis:38px;padding:9px}
  .tg-editor-photo{align-items:center;gap:12px;padding:13px}.tg-editor-photo__actions{gap:6px}
  .tg-manage-tabs{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .tg-editor-section{padding:12px}
}

/* Aurora E2EE device-key encryption UI */
.tg-e2ee-badge{display:inline-flex;align-items:center;gap:5px;min-height:30px;padding:0 10px;border:1px solid var(--au-line);border-radius:999px;background:color-mix(in srgb,var(--au-surface) 86%,transparent);color:var(--au-muted);font-size:11px;font-weight:750;white-space:nowrap}
.tg-e2ee-badge .tg-icon{width:14px;height:14px;flex-basis:14px}
.tg-e2ee-badge.is-ready{color:#16845f;border-color:rgba(22,132,95,.28);background:rgba(31,182,126,.10)}
.tg-e2ee-badge.is-waiting{color:#a16a12;border-color:rgba(161,106,18,.28);background:rgba(231,169,46,.10)}
.tg-e2ee-mark{display:inline-flex;align-items:center;color:var(--au-muted);margin-right:3px}
.tg-e2ee-mark .tg-icon{width:11px;height:11px;flex-basis:11px}
.tg-e2ee-mark.is-verified{color:#16845f}
.tg-e2ee-info{gap:14px}
.tg-e2ee-hero{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:24px 18px;border-radius:20px;background:linear-gradient(145deg,rgba(31,182,126,.13),rgba(109,93,252,.10));border:1px solid rgba(31,182,126,.20)}
.tg-e2ee-hero>.tg-icon{width:44px;height:44px;flex-basis:44px;color:#16845f}
.tg-e2ee-hero strong{font-size:18px}
.tg-e2ee-hero p,.tg-e2ee-note{margin:0;color:var(--au-muted);font-size:13px;line-height:1.5}
.tg-e2ee-fingerprint{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;word-break:break-word;letter-spacing:.04em}
.tg-e2ee-note{padding:12px 14px;border-radius:14px;background:var(--au-surface-2);border:1px solid var(--au-line)}
.tg-shell.theme-dark .tg-e2ee-badge.is-ready{color:#65deb1;background:rgba(31,182,126,.14)}
@media(max-width:720px){.tg-e2ee-badge span{display:none}.tg-e2ee-badge{width:32px;padding:0;justify-content:center}.tg-e2ee-badge .tg-icon{width:15px;height:15px}}


/* Aurora profile badges build 5100 */
.tg-custom-badges{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:5px;margin:7px 0 1px}
.tg-custom-badges.is-compact{display:inline-flex;flex-wrap:nowrap;justify-content:flex-start;margin:0 0 0 5px;vertical-align:middle;gap:3px}
.tg-custom-badge{display:inline-flex;align-items:center;min-height:20px;padding:2px 7px;border-radius:999px;border:1px solid rgba(105,115,135,.15);background:var(--au-surface-2);color:var(--au-text-2);font-size:8.5px;font-weight:900;line-height:1;letter-spacing:.04em;white-space:nowrap;box-shadow:0 2px 7px rgba(19,28,48,.05)}
.tg-custom-badges.is-compact .tg-custom-badge{min-height:16px;padding:1px 5px;font-size:7px}
.tg-custom-badge.is-gold{background:#fff2c7;color:#805400;border-color:#f0d57c}.tg-custom-badge.is-violet{background:#ece7ff;color:#6346ca;border-color:#d6cbff}.tg-custom-badge.is-blue{background:#e3efff;color:#2767b9;border-color:#c7ddfa}.tg-custom-badge.is-green{background:#dcf7e9;color:#14754c;border-color:#bce9d2}.tg-custom-badge.is-cyan{background:#ddf7f7;color:#087478;border-color:#b9e8e8}.tg-custom-badge.is-pink{background:#ffe5f1;color:#a52c65;border-color:#f7cade}.tg-custom-badge.is-orange{background:#ffead6;color:#a6500d;border-color:#f5d2ae}.tg-custom-badge.is-red{background:#ffe2df;color:#a8362e;border-color:#f4c2bd}.tg-custom-badge.is-more{background:var(--au-surface-2);color:var(--au-text-2)}
.tg-chat-row__title,.tg-chat-header__title,.tg-bubble__sender{display:flex;align-items:center;min-width:0}.tg-chat-row__title .tg-custom-badges,.tg-chat-header__title .tg-custom-badges,.tg-bubble__sender .tg-custom-badges{flex:0 0 auto}
@media(max-width:640px){.tg-chat-row__title .tg-custom-badge:nth-child(n+2),.tg-chat-header__title .tg-custom-badge:nth-child(n+2){display:none}.tg-custom-badges:not(.is-compact){max-width:100%;justify-content:center}}

/* Aurora build 5200: detailed profile badge gallery */
.tg-custom-badge__image{width:17px;height:17px;display:block;object-fit:contain;flex:0 0 17px;filter:drop-shadow(0 2px 3px rgba(96,61,0,.2))}
.tg-custom-badges.is-compact .tg-custom-badge__image{width:14px;height:14px;flex-basis:14px}
.tg-profile-badges-panel{margin:10px 14px 12px;border:1px solid var(--au-line);border-radius:18px;background:color-mix(in srgb,var(--au-surface) 94%,#e4b64d 6%);box-shadow:0 8px 26px rgba(19,28,48,.06);overflow:hidden}
.tg-profile-badges-panel>header{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:10px;align-items:center;padding:13px 14px;border-bottom:1px solid var(--au-line);background:linear-gradient(135deg,rgba(255,241,168,.2),rgba(85,231,255,.08))}
.tg-profile-badges-panel>header>div{min-width:0}.tg-profile-badges-panel>header strong,.tg-profile-badges-panel>header span{display:block}.tg-profile-badges-panel>header strong{font-size:13px;color:var(--au-text)}.tg-profile-badges-panel>header>div>span{margin-top:2px;color:var(--au-muted);font-size:10px}.tg-profile-badges-panel>header>b{display:grid;place-items:center;min-width:27px;height:27px;padding:0 8px;border-radius:999px;background:rgba(217,164,65,.15);color:#8a5a12;font-size:11px}
.tg-profile-badges-panel__symbol{display:grid!important;place-items:center;width:34px;height:34px;border-radius:12px;background:linear-gradient(145deg,#fff3bd,#d99c31);color:#6f4300;font-size:18px;box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 4px 12px rgba(139,90,22,.17)}
.tg-profile-badges-grid{display:grid;gap:9px;padding:10px}
.tg-profile-badge-card{display:grid;grid-template-columns:76px minmax(0,1fr);gap:11px;align-items:center;padding:10px;border:1px solid rgba(217,164,65,.22);border-radius:15px;background:linear-gradient(135deg,rgba(255,248,220,.58),rgba(245,249,255,.78));position:relative;overflow:hidden}
.tg-profile-badge-card::after{content:"";position:absolute;inset:auto -25px -35px auto;width:90px;height:90px;border-radius:50%;background:radial-gradient(circle,rgba(85,231,255,.14),transparent 68%);pointer-events:none}
.tg-profile-badge-card__icon{width:76px;height:76px;display:grid;place-items:center}.tg-profile-badge-card__icon img{width:76px;height:76px;display:block;object-fit:contain;filter:drop-shadow(0 6px 8px rgba(88,52,0,.24));transition:transform .22s ease}.tg-profile-badge-card:hover .tg-profile-badge-card__icon img{transform:translateY(-2px) scale(1.04)}
.tg-profile-badge-card__body{min-width:0}.tg-profile-badge-card__body strong{display:block;color:var(--au-text);font-size:13px}.tg-profile-badge-card__body p{margin:5px 0 0;color:var(--au-text-2);font-size:10px;line-height:1.45}.tg-profile-badge-card__body small{display:block;margin-top:7px;color:#916013;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.035em}
.tg-profile-badge-card__fallback{display:grid;place-items:center;min-width:62px;height:32px;padding:0 9px;border-radius:999px;background:var(--au-surface-2);font-size:9px;font-weight:900}.tg-profile-badge-card__fallback.is-gold{background:#fff2c7;color:#805400}
.tg-profile-badges-empty{padding:17px 12px;text-align:center;color:var(--au-muted);font-size:11px}
.tg-shell.theme-dark .tg-profile-badges-panel{background:color-mix(in srgb,var(--au-surface) 93%,#8a5a12 7%)}
.tg-shell.theme-dark .tg-profile-badge-card{background:linear-gradient(135deg,rgba(62,48,24,.46),rgba(19,27,42,.92));border-color:rgba(228,182,77,.25)}
.tg-shell.theme-dark .tg-profile-badge-card__body small{color:#f0ca74}
@media(max-width:640px){.tg-profile-badges-panel{margin-left:10px;margin-right:10px}.tg-profile-badge-card{grid-template-columns:64px minmax(0,1fr)}.tg-profile-badge-card__icon,.tg-profile-badge-card__icon img{width:64px;height:64px}.tg-profile-badge-card__body p{font-size:9.5px}}

/* Aurora build 5200 — profile redesign and emoji verification */
.tg-featured-badge-mini{display:inline-grid;place-items:center;width:23px;height:23px;margin-left:6px;flex:0 0 23px;border-radius:50%;background:transparent;vertical-align:middle;filter:drop-shadow(0 2px 4px rgba(44,37,16,.18))}
.tg-featured-badge-mini.is-compact{width:20px;height:20px;flex-basis:20px;margin-left:5px}
.tg-featured-badge-mini .tg-custom-badge__image{width:100%;height:100%;object-fit:contain;display:block}
.tg-featured-badge-mini>span{font-size:13px;line-height:1}

.tg-profile-view--v2{padding:0 20px 20px;background:var(--au-bg)}
.tg-profile-v2{position:relative;margin:0 -20px;padding:0 24px 22px;overflow:hidden;background:var(--au-surface);border-bottom:1px solid var(--au-line)}
.tg-profile-v2__cover{height:170px;margin:0 -24px;background:
 radial-gradient(circle at 18% 20%,rgba(255,255,255,.42) 0 2px,transparent 3px),
 radial-gradient(circle at 75% 28%,rgba(255,255,255,.28) 0 3px,transparent 4px),
 linear-gradient(125deg,#5b5ce2 0%,#7357e8 34%,#2ca7c9 70%,#43c89c 100%);position:relative;overflow:hidden}
.tg-profile-v2__cover::before,.tg-profile-v2__cover::after{content:"";position:absolute;border-radius:999px;filter:blur(1px);opacity:.6}
.tg-profile-v2__cover::before{width:260px;height:260px;right:-70px;top:-140px;border:36px solid rgba(255,255,255,.13);transform:rotate(-20deg)}
.tg-profile-v2__cover::after{width:170px;height:170px;left:-45px;bottom:-110px;background:rgba(255,255,255,.12);box-shadow:130px -35px 0 rgba(255,255,255,.07)}
.tg-profile-v2__top{display:flex;align-items:flex-end;justify-content:space-between;min-height:64px;margin-top:-58px;position:relative;z-index:2}
.tg-profile-v2__avatar{position:relative;padding:5px;border-radius:50%;background:var(--au-surface);box-shadow:0 15px 34px rgba(20,25,42,.23)}
.tg-profile-v2__avatar .tg-avatar--big{width:116px;height:116px;border-radius:50%;box-shadow:none}
.tg-profile-v2__avatar>i{position:absolute;right:8px;bottom:8px;width:18px;height:18px;border:4px solid var(--au-surface);border-radius:50%;background:#9aa3b3}
.tg-profile-v2__avatar>i.is-online{background:#28bd7d}
.tg-profile-v2__actions{display:flex;gap:8px;padding-bottom:7px}
.tg-profile-icon-action{display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--au-line);border-radius:13px;background:color-mix(in srgb,var(--au-surface) 92%,transparent);color:var(--au-text-2);box-shadow:0 6px 18px rgba(22,29,45,.08);backdrop-filter:blur(12px);transition:.16s ease}
.tg-profile-icon-action:hover{transform:translateY(-1px);color:var(--au-accent);border-color:color-mix(in srgb,var(--au-accent) 32%,var(--au-line))}
.tg-profile-v2__name,.tg-public-profile-v2__name{display:flex;align-items:center;justify-content:flex-start;gap:7px;margin-top:15px;min-width:0}
.tg-profile-v2__name>strong{font-size:25px;line-height:1.15;letter-spacing:-.035em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-profile-v2__name>span,.tg-public-profile-v2__name>span{display:grid;place-items:center;color:#4b8cff}.tg-profile-v2__name .tg-icon,.tg-public-profile-v2__name .tg-icon{width:19px;height:19px;flex-basis:19px}
.tg-profile-identity-line{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:7px;color:var(--au-text-3);font-size:12px;line-height:1.4}
.tg-profile-identity-line span:first-child{color:var(--au-accent);font-weight:700}
.tg-profile-identity-line i{width:3px;height:3px;border-radius:50%;background:currentColor;opacity:.48}
.tg-profile-v2__bio{margin-top:19px;padding:15px 17px;border-left:3px solid color-mix(in srgb,var(--au-accent) 70%,#41c99a);border-radius:0 14px 14px 0;background:var(--au-surface-2)}
.tg-profile-v2__bio>span{display:block;color:var(--au-text-3);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.09em}
.tg-profile-v2__bio p{margin:5px 0 0;color:var(--au-text-2);font-size:13px;line-height:1.55;white-space:pre-wrap}

.tg-profile-featured{position:relative;display:grid;grid-template-columns:92px minmax(0,1fr) auto;gap:16px;align-items:center;margin-top:15px;padding:15px 15px 15px 13px;overflow:hidden;border:1px solid rgba(206,158,48,.27);border-radius:21px;background:linear-gradient(135deg,color-mix(in srgb,var(--au-surface) 94%,#ffdc78 6%),color-mix(in srgb,var(--au-surface) 96%,#4fd8e8 4%));box-shadow:0 10px 30px rgba(26,31,49,.07)}
.tg-profile-featured__glow{position:absolute;width:180px;height:180px;left:-65px;top:-65px;border-radius:50%;background:radial-gradient(circle,rgba(255,211,93,.28),transparent 68%);pointer-events:none}
.tg-profile-featured__art{position:relative;z-index:1;width:92px;height:92px;display:grid;place-items:center}
.tg-profile-featured__image{width:92px;height:92px;object-fit:contain;filter:drop-shadow(0 8px 11px rgba(85,54,8,.25))}
.tg-badge-art__fallback{display:grid;place-items:center;min-width:70px;height:34px;padding:0 10px;border-radius:999px;background:#fff1c0;color:#815600;font-size:10px;font-weight:900;letter-spacing:.05em}
.tg-profile-featured__copy{position:relative;z-index:1;min-width:0}
.tg-profile-featured__copy>span{display:block;color:#a2741e;font-size:9.5px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
.tg-profile-featured__copy>strong{display:block;margin-top:3px;color:var(--au-text);font-size:16px;line-height:1.2}
.tg-profile-featured__copy>p{margin:6px 0 0;color:var(--au-text-2);font-size:11px;line-height:1.45}
.tg-profile-featured__copy>small{display:block;margin-top:7px;color:#9b711d;font-size:9px;font-weight:750;text-transform:uppercase;letter-spacing:.035em}
.tg-profile-featured__more{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;width:62px;min-height:58px;padding:7px;border:1px solid color-mix(in srgb,var(--au-line) 80%,#d9a441 20%);border-radius:16px;background:color-mix(in srgb,var(--au-surface) 87%,transparent);color:var(--au-text-2);transition:.16s ease}
.tg-profile-featured__more:hover{transform:translateY(-1px);border-color:#d9a441;color:#8b5a12}
.tg-profile-featured__more b{font-size:16px;line-height:1}.tg-profile-featured__more span{margin-top:4px;font-size:8.5px;font-weight:750}
.tg-profile-featured.is-empty{grid-template-columns:46px minmax(0,1fr);border-style:dashed;background:var(--au-surface);box-shadow:none}
.tg-profile-featured__empty-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:15px;background:var(--au-surface-2);color:var(--au-text-3);font-size:19px}
.tg-profile-featured.is-empty strong{display:block;font-size:13px}.tg-profile-featured.is-empty p{margin:4px 0 0;color:var(--au-text-3);font-size:10.5px;line-height:1.4}

.tg-profile-dashboard{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:12px}
.tg-profile-dashboard>div{display:grid;grid-template-columns:32px 1fr;grid-template-rows:auto auto;column-gap:9px;align-items:center;padding:12px;border:1px solid var(--au-line);border-radius:16px;background:var(--au-surface)}
.tg-profile-dashboard>div>span{grid-row:1/3;display:grid;place-items:center;width:32px;height:32px;border-radius:11px;background:var(--au-surface-2);color:var(--au-accent)}
.tg-profile-dashboard .tg-icon{width:17px;height:17px;flex-basis:17px}
.tg-profile-dashboard b{font-size:17px;line-height:1}.tg-profile-dashboard small{margin-top:3px;color:var(--au-text-3);font-size:9px;text-transform:uppercase;letter-spacing:.05em}
.tg-profile-section{margin-top:12px;padding:14px;border:1px solid var(--au-line);border-radius:18px;background:var(--au-surface)}
.tg-profile-section>header{display:flex;flex-direction:column;margin-bottom:9px}.tg-profile-section>header strong{font-size:13px}.tg-profile-section>header span{margin-top:2px;color:var(--au-text-3);font-size:10px}
.tg-profile-details--grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;overflow:hidden;border:1px solid var(--au-line);border-radius:14px;background:var(--au-line)}
.tg-profile-details--grid .tg-info-row{margin:0;border:0;border-radius:0;background:var(--au-surface);min-width:0}
.tg-profile-actions--v2{display:grid;grid-template-columns:1.2fr .8fr;gap:9px;margin-top:12px}

.tg-public-profile-v2{position:relative;margin:0 0 12px;padding:0 17px 18px;overflow:hidden;border:1px solid var(--au-line);border-radius:20px;background:var(--au-surface);box-shadow:0 8px 24px rgba(24,30,46,.06)}
.tg-public-profile-v2__cover{height:105px;margin:0 -17px;background:linear-gradient(125deg,#635bdc,#4b8fd2 56%,#4bc19c);position:relative;overflow:hidden}
.tg-public-profile-v2__cover::after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 72% 10%,rgba(255,255,255,.27),transparent 34%),linear-gradient(20deg,transparent 35%,rgba(255,255,255,.09) 36% 38%,transparent 39%)}
.tg-public-profile-v2__avatar{position:relative;width:max-content;margin-top:-48px;padding:4px;border-radius:50%;background:var(--au-surface);box-shadow:0 12px 27px rgba(24,28,43,.2)}
.tg-public-profile-v2__avatar .tg-avatar--big{width:92px;height:92px;border-radius:50%}
.tg-public-profile-v2__avatar>i{position:absolute;right:5px;bottom:5px;width:15px;height:15px;border:3px solid var(--au-surface);border-radius:50%;background:#9aa3b3}.tg-public-profile-v2__avatar>i.is-online{background:#28bd7d}
.tg-public-profile-v2__name{margin-top:11px}.tg-public-profile-v2__name strong{font-size:20px;letter-spacing:-.025em}
.tg-public-profile-v2__bio{margin-top:14px;padding-top:13px;border-top:1px solid var(--au-line);color:var(--au-text-2);font-size:12px;line-height:1.5;white-space:pre-wrap}
.tg-profile-facts{margin-top:10px}

.tg-badge-library{padding-top:14px}
.tg-badge-library>header{display:grid;grid-template-columns:46px minmax(0,1fr) auto;gap:12px;align-items:center;padding:15px;border:1px solid var(--au-line);border-radius:18px;background:linear-gradient(135deg,rgba(255,220,118,.13),rgba(91,92,226,.08))}
.tg-badge-library>header>span{display:grid;place-items:center;width:46px;height:46px;border-radius:15px;background:linear-gradient(145deg,#fff0b3,#dca537);color:#714700;font-size:23px;box-shadow:0 7px 15px rgba(130,85,0,.15)}
.tg-badge-library>header strong{display:block;font-size:14px}.tg-badge-library>header p{margin:3px 0 0;color:var(--au-text-3);font-size:10.5px;line-height:1.4}.tg-badge-library>header>b{display:grid;place-items:center;min-width:34px;height:34px;padding:0 10px;border-radius:999px;background:var(--au-surface);font-size:12px}
.tg-badge-library__grid{display:grid;gap:10px;margin-top:12px}
.tg-badge-library-card{display:grid;grid-template-columns:74px minmax(0,1fr) auto;gap:13px;align-items:center;padding:12px;border:1px solid var(--au-line);border-radius:17px;background:var(--au-surface);transition:.16s ease}
.tg-badge-library-card.is-selected{border-color:rgba(217,164,65,.5);box-shadow:0 0 0 3px rgba(217,164,65,.1)}
.tg-badge-library-card__art{width:74px;height:74px;display:grid;place-items:center}.tg-badge-library-card__image{width:72px;height:72px;object-fit:contain;filter:drop-shadow(0 6px 8px rgba(67,42,8,.22))}
.tg-badge-library-card__copy{min-width:0}.tg-badge-library-card__copy>div{display:flex;align-items:center;gap:7px}.tg-badge-library-card__copy strong{font-size:13px}.tg-badge-library-card__copy p{margin:5px 0 0;color:var(--au-text-2);font-size:10.5px;line-height:1.45}.tg-badge-library-card__copy small{display:block;margin-top:6px;color:var(--au-text-3);font-size:9px;text-transform:uppercase;letter-spacing:.035em}
.tg-badge-library-card__selected{padding:3px 7px;border-radius:999px;background:#fff0bf;color:#835600;font-size:8px;font-weight:900;text-transform:uppercase;letter-spacing:.04em}
.tg-badge-library-card__choose{min-height:34px;padding:0 12px;border:1px solid var(--au-line);border-radius:11px;background:var(--au-surface-2);color:var(--au-accent);font-size:10px;font-weight:800;white-space:nowrap}.tg-badge-library-card__choose:hover:not(:disabled){border-color:var(--au-accent)}.tg-badge-library-card__choose:disabled{color:var(--au-text-3);cursor:default}
.tg-badge-library-empty{padding:32px 15px;text-align:center;color:var(--au-text-3);font-size:12px}

.tg-e2ee-badge.has-emoji{min-width:auto;height:34px;padding:0 9px;border-color:rgba(42,177,125,.25);background:color-mix(in srgb,var(--au-surface) 90%,rgba(42,177,125,.1));box-shadow:0 3px 12px rgba(27,90,70,.08)}
.tg-e2ee-emoji-code{display:flex!important;align-items:center;gap:1px;margin:0!important;font-size:16px!important;line-height:1;letter-spacing:0!important;filter:saturate(.92)}
.tg-e2ee-emoji-panel{padding:18px;border:1px solid rgba(44,173,126,.23);border-radius:18px;background:linear-gradient(145deg,rgba(44,190,132,.12),rgba(91,92,226,.08));text-align:center}
.tg-e2ee-emoji-panel>span{display:block;color:var(--au-text-3);font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.08em}.tg-e2ee-emoji-panel>strong{display:block;margin-top:9px;font-size:30px;line-height:1.2;letter-spacing:.14em}.tg-e2ee-emoji-panel>p{max-width:410px;margin:10px auto 0;color:var(--au-text-2);font-size:11px;line-height:1.45}
.tg-e2ee-device-emoji{font-size:18px!important;letter-spacing:.08em!important;line-height:1.4}

.tg-shell.theme-dark .tg-profile-featured{background:linear-gradient(135deg,rgba(77,59,24,.48),rgba(24,31,46,.94));border-color:rgba(217,164,65,.25)}
.tg-shell.theme-dark .tg-profile-featured__copy>span,.tg-shell.theme-dark .tg-profile-featured__copy>small{color:#e7bd62}
.tg-shell.theme-dark .tg-badge-library-card__selected{background:rgba(217,164,65,.19);color:#f1cb79}

@media(max-width:720px){
  .tg-profile-view--v2{padding-left:12px;padding-right:12px}.tg-profile-v2{margin-left:-12px;margin-right:-12px;padding-left:16px;padding-right:16px}.tg-profile-v2__cover{margin-left:-16px;margin-right:-16px;height:145px}.tg-profile-v2__avatar .tg-avatar--big{width:100px;height:100px}.tg-profile-v2__top{margin-top:-50px}.tg-profile-v2__name>strong{font-size:22px}
  .tg-profile-featured{grid-template-columns:70px minmax(0,1fr) 54px;gap:10px;padding:12px}.tg-profile-featured__art,.tg-profile-featured__image{width:70px;height:70px}.tg-profile-featured__copy>p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.tg-profile-featured__more{width:52px;min-height:52px}
  .tg-profile-dashboard>div{grid-template-columns:1fr;grid-template-rows:auto auto auto;justify-items:center;text-align:center;gap:4px}.tg-profile-dashboard>div>span{grid-row:auto}.tg-profile-details--grid{grid-template-columns:1fr}.tg-profile-actions--v2{grid-template-columns:1fr}
  .tg-badge-library-card{grid-template-columns:58px minmax(0,1fr);}.tg-badge-library-card__art,.tg-badge-library-card__image{width:58px;height:58px}.tg-badge-library-card__choose{grid-column:1/-1;width:100%}
  .tg-e2ee-badge.has-emoji{padding:0 6px}.tg-e2ee-emoji-code{font-size:14px!important}.tg-e2ee-emoji-panel>strong{font-size:25px;letter-spacing:.08em}
}

/* Aurora build 5300: dialog encryption mode picker */
.tg-dm-create{gap:18px}.tg-encryption-picker{display:grid;gap:10px}.tg-encryption-picker__title{font-size:13px;font-weight:800;letter-spacing:.02em;color:var(--tg-muted,#718096);text-transform:uppercase}.tg-encryption-option{position:relative;display:grid;grid-template-columns:auto 44px minmax(0,1fr);align-items:center;gap:12px;padding:15px 16px;border:1px solid rgba(120,135,160,.22);border-radius:18px;background:rgba(127,140,165,.06);cursor:pointer;transition:border-color .18s ease,background .18s ease,transform .18s ease}.tg-encryption-option:hover{transform:translateY(-1px);border-color:rgba(75,145,255,.48)}.tg-encryption-option:has(input:checked){border-color:#4f8cff;background:linear-gradient(135deg,rgba(79,140,255,.14),rgba(85,231,255,.08));box-shadow:0 0 0 3px rgba(79,140,255,.08)}.tg-encryption-option input{width:18px;height:18px;accent-color:#4f8cff}.tg-encryption-option__icon{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:rgba(79,140,255,.12);font-size:23px}.tg-encryption-option>span:last-child{display:grid;gap:4px}.tg-encryption-option strong{font-size:15px}.tg-encryption-option small{font-size:12px;line-height:1.45;color:var(--tg-muted,#718096)}.tg-encryption-option em{justify-self:start;padding:3px 8px;border-radius:999px;background:#e8f1ff;color:#2869c8;font-size:10px;font-style:normal;font-weight:800;text-transform:uppercase}.tg-encryption-picker__note{margin:2px 2px 0;color:var(--tg-muted,#718096);font-size:12px;line-height:1.45}.tg-e2ee-badge.is-standard{background:rgba(112,128,151,.11);border-color:rgba(112,128,151,.22);color:var(--tg-muted,#718096)}.tg-e2ee-badge.is-standard .tg-icon{width:15px;height:15px}.tg-e2ee-hero--standard{background:linear-gradient(135deg,rgba(112,128,151,.12),rgba(79,140,255,.08))}.tg-encryption-hero-emoji{font-size:44px;line-height:1}.tg-encryption-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.tg-encryption-facts>div{display:grid;gap:6px;padding:15px;border:1px solid rgba(120,135,160,.18);border-radius:16px;background:rgba(127,140,165,.05)}.tg-encryption-facts b{font-size:13px}.tg-encryption-facts span{font-size:12px;line-height:1.45;color:var(--tg-muted,#718096)}
@media(max-width:620px){.tg-encryption-option{grid-template-columns:auto 38px minmax(0,1fr);padding:13px}.tg-encryption-option__icon{width:38px;height:38px;font-size:20px}.tg-encryption-facts{grid-template-columns:1fr}}

/* Aurora build 5400 — wider public profile and strict circular avatars */
:root{--info-w:430px}
.tg-right{max-width:min(430px,100vw)}
.tg-info-body{padding:16px}
.tg-public-profile-v2{margin:0 0 14px;padding:0 22px 22px;border-radius:24px}
.tg-public-profile-v2__cover{height:148px;margin:0 -22px}
.tg-public-profile-v2__avatar{
  width:116px;height:116px;aspect-ratio:1/1;margin-top:-58px;padding:5px;
  border-radius:50%;overflow:hidden;box-sizing:border-box;background:var(--au-surface)
}
.tg-public-profile-v2__avatar .tg-profile-avatar-button,
.tg-public-profile-v2__avatar .tg-avatar--big,
.tg-public-profile-v2__avatar .tg-avatar--big img{
  width:106px!important;height:106px!important;min-width:106px!important;min-height:106px!important;
  aspect-ratio:1/1;border-radius:50%!important
}
.tg-public-profile-v2__avatar .tg-profile-avatar-button,
.tg-public-profile-v2__avatar .tg-avatar--big{display:grid;place-items:center;overflow:hidden}
.tg-public-profile-v2__avatar .tg-avatar--big img{display:block;object-fit:cover;object-position:center}
.tg-public-profile-v2__avatar>i{right:7px;bottom:7px;width:17px;height:17px;border-width:4px}
.tg-public-profile-v2__name{margin-top:15px}
.tg-public-profile-v2__name strong{font-size:23px}
.tg-public-profile-v2__bio{margin-top:17px;padding:15px 16px;border:1px solid var(--au-line);border-radius:16px;background:var(--au-surface-2);font-size:13px}
.tg-profile-featured{padding:17px;grid-template-columns:100px minmax(0,1fr) auto}
.tg-profile-featured__art,.tg-profile-featured__image{width:100px;height:100px}

/* Device-bound secret chat states */
.tg-messages--secret-gate{display:grid;place-items:center;padding:28px}
.tg-messages--secret-gate .tg-messages__inner{width:min(520px,100%);margin:auto}
.tg-secret-gate{
  display:flex;flex-direction:column;align-items:center;text-align:center;padding:30px 28px;
  border:1px solid rgba(44,173,126,.28);border-radius:26px;
  background:linear-gradient(145deg,color-mix(in srgb,var(--au-surface) 94%,#42d59a 6%),color-mix(in srgb,var(--au-surface) 95%,#655dfc 5%));
  box-shadow:0 18px 55px rgba(25,34,48,.10)
}
.tg-secret-gate__icon{display:grid;place-items:center;width:72px;height:72px;margin-bottom:16px;border-radius:23px;background:linear-gradient(145deg,#31c98a,#5b62e7);font-size:34px;box-shadow:0 12px 28px rgba(50,153,126,.24)}
.tg-secret-gate strong{font-size:20px;letter-spacing:-.025em}
.tg-secret-gate p{max-width:420px;margin:10px 0 20px;color:var(--au-text-2);font-size:13px;line-height:1.58}
.tg-secret-gate .tg-primary{min-width:230px}
.tg-secret-gate.is-waiting{border-color:rgba(229,153,53,.28);background:linear-gradient(145deg,color-mix(in srgb,var(--au-surface) 94%,#ffc36a 6%),var(--au-surface))}
.tg-secret-gate.is-waiting .tg-secret-gate__icon{background:linear-gradient(145deg,#ffbf59,#df8c31)}
.tg-secret-gate.is-locked{border-color:rgba(220,79,91,.25);background:linear-gradient(145deg,color-mix(in srgb,var(--au-surface) 95%,#ef7380 5%),var(--au-surface))}
.tg-secret-gate.is-locked .tg-secret-gate__icon{background:linear-gradient(145deg,#ec6a78,#ad4551)}
.tg-secret-composer-lock{position:relative;z-index:3;display:flex;align-items:center;justify-content:center;gap:9px;min-height:64px;padding:14px;background:color-mix(in srgb,var(--au-bg) 94%,transparent);border-top:1px solid var(--au-line);color:var(--au-text-3);font-size:12px;font-weight:700}
.tg-secret-composer-lock .tg-icon{width:18px;height:18px;flex-basis:18px}

@media (max-width:1180px){
  :root{--info-w:410px}
  .tg-right{width:var(--info-w);min-width:var(--info-w);max-width:var(--info-w)}
}
@media (max-width:720px){
  .tg-right{width:100vw;min-width:100vw;max-width:100vw}
  .tg-info-body{padding:12px}
  .tg-public-profile-v2{padding-left:17px;padding-right:17px}
  .tg-public-profile-v2__cover{margin-left:-17px;margin-right:-17px;height:132px}
  .tg-public-profile-v2__avatar{width:106px;height:106px;margin-top:-53px}
  .tg-public-profile-v2__avatar .tg-profile-avatar-button,
  .tg-public-profile-v2__avatar .tg-avatar--big,
  .tg-public-profile-v2__avatar .tg-avatar--big img{width:96px!important;height:96px!important;min-width:96px!important;min-height:96px!important}
  .tg-secret-gate{padding:24px 18px;border-radius:22px}
}

/* Aurora build 5400 — expanded public profile and pixel-perfect avatar frame */
@media (min-width:1181px){
  :root{--info-w:clamp(420px,35vw,500px)}
  .tg-right{width:var(--info-w);min-width:var(--info-w);max-width:var(--info-w)}
}
.tg-public-profile-v2__avatar{
  display:grid;place-items:center;isolation:isolate;clip-path:circle(50% at 50% 50%);
  border-radius:999px!important;line-height:0
}
.tg-public-profile-v2__avatar .tg-profile-avatar-button{
  box-sizing:border-box!important;appearance:none;-webkit-appearance:none;border:0!important;padding:0!important;
  margin:0!important;background:transparent!important;line-height:0!important;clip-path:circle(50% at 50% 50%)
}
.tg-public-profile-v2__avatar .tg-avatar--big{
  box-sizing:border-box!important;overflow:hidden!important;border-radius:999px!important;
  clip-path:circle(50% at 50% 50%);transform:translateZ(0)
}
.tg-public-profile-v2__avatar .tg-avatar--big img{
  display:block!important;width:100%!important;height:100%!important;max-width:none!important;
  border:0!important;border-radius:999px!important;object-fit:cover!important;object-position:50% 50%!important;
  clip-path:circle(50% at 50% 50%);transform:translateZ(0)
}

/* Aurora build 5410 — self-profile bounds and clean presence placement */
.tg-modal--profile{
  width:min(700px,calc(100vw - 24px));
  max-width:calc(100vw - 24px);
  max-height:calc(100dvh - 24px);
  overflow:hidden;
  margin:auto;
}
.tg-modal--profile .tg-modal__body{
  flex:1 1 auto;
  width:100%;
  max-width:100%;
  min-width:0;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
}
.tg-modal--profile .tg-profile-view--v2,
.tg-modal--profile .tg-profile-view--v2 *{box-sizing:border-box}
.tg-modal--profile .tg-profile-view--v2{
  width:100%;
  max-width:100%;
  min-width:0;
  overflow-x:hidden;
}
.tg-modal--profile .tg-profile-v2{
  width:100%;
  max-width:100%;
  min-width:0;
  margin:0;
  border:1px solid var(--au-line);
  border-radius:22px;
}
.tg-modal--profile .tg-profile-v2__cover{max-width:none}
.tg-modal--profile .tg-profile-featured,
.tg-modal--profile .tg-profile-dashboard,
.tg-modal--profile .tg-profile-section,
.tg-modal--profile .tg-profile-actions--v2{
  width:100%;
  max-width:100%;
  min-width:0;
}
.tg-modal--profile .tg-profile-featured__copy,
.tg-modal--profile .tg-profile-featured__copy>strong,
.tg-modal--profile .tg-profile-featured__copy>p,
.tg-modal--profile .tg-info-row,
.tg-modal--profile .tg-info-row__body,
.tg-modal--profile .tg-info-row__body strong,
.tg-modal--profile .tg-info-row__body span{
  min-width:0;
  overflow-wrap:anywhere;
  word-break:break-word;
}

/* The own-profile avatar is one exact circle. Presence is intentionally not overlaid. */
.tg-profile-v2__avatar{
  display:grid;
  place-items:center;
  width:126px;
  height:126px;
  min-width:126px;
  min-height:126px;
  aspect-ratio:1/1;
  padding:5px;
  overflow:hidden;
  border-radius:50%!important;
  line-height:0;
}
.tg-profile-v2__avatar .tg-profile-avatar-button,
.tg-profile-v2__avatar .tg-avatar--big{
  display:grid;
  place-items:center;
  width:116px!important;
  height:116px!important;
  min-width:116px!important;
  min-height:116px!important;
  max-width:116px!important;
  max-height:116px!important;
  padding:0!important;
  margin:0!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:50%!important;
  background:transparent!important;
  line-height:0!important;
  appearance:none;
  -webkit-appearance:none;
}
.tg-profile-v2__avatar .tg-avatar--big img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-width:100%!important;
  min-height:100%!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  border:0!important;
  border-radius:50%!important;
  object-fit:cover!important;
  object-position:center!important;
}
.tg-profile-avatar-button--self .tg-profile-avatar-button__zoom{display:none!important}
.tg-profile-v2__avatar>i,
.tg-public-profile-v2__avatar>i{display:none!important}

/* Status and join date live below the nickname, never on top of the photo. */
.tg-profile-identity-line{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  max-width:100%;
  min-width:0;
}
.tg-profile-identity-line__username,
.tg-profile-identity-line__status,
.tg-profile-identity-line__joined{
  display:inline-flex;
  align-items:center;
  min-width:0;
  max-width:100%;
  line-height:1.35;
}
.tg-profile-identity-line__username{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.tg-profile-identity-line__status{gap:5px;color:var(--au-text-2)}
.tg-profile-identity-line__status>i{
  display:block;
  width:7px!important;
  height:7px!important;
  min-width:7px;
  border-radius:50%;
  background:#9aa3b3!important;
  opacity:1!important;
}
.tg-profile-identity-line__status.is-online{color:#16845f}
.tg-profile-identity-line__status.is-online>i{background:#28bd7d!important;box-shadow:0 0 0 3px rgba(40,189,125,.12)}
.tg-profile-identity-line__separator{color:var(--au-text-3);opacity:.55;font-size:10px;line-height:1}
.tg-profile-identity-line__joined{color:var(--au-text-3)}

@media(max-width:720px){
  .tg-modal--profile{
    width:calc(100vw - 12px);
    max-width:calc(100vw - 12px);
    max-height:calc(100dvh - 12px);
    margin:0 auto;
    border-radius:18px;
  }
  .tg-modal--profile .tg-profile-view--v2{padding:10px}
  .tg-modal--profile .tg-profile-v2{margin:0;padding-left:15px;padding-right:15px;border-radius:18px}
  .tg-modal--profile .tg-profile-v2__cover{margin-left:-15px;margin-right:-15px}
  .tg-profile-v2__avatar{
    width:110px;height:110px;min-width:110px;min-height:110px;padding:5px
  }
  .tg-profile-v2__avatar .tg-profile-avatar-button,
  .tg-profile-v2__avatar .tg-avatar--big{
    width:100px!important;height:100px!important;min-width:100px!important;min-height:100px!important;
    max-width:100px!important;max-height:100px!important
  }
  .tg-profile-v2__actions{min-width:0;flex-wrap:wrap;justify-content:flex-end}
  .tg-profile-featured{grid-template-columns:70px minmax(0,1fr);align-items:start}
  .tg-profile-featured__more{grid-column:1/-1;width:100%;min-height:42px;flex-direction:row;gap:6px}
  .tg-profile-featured__more span{margin-top:0}
}

@media(max-width:420px){
  .tg-profile-v2__top{align-items:flex-end;gap:8px}
  .tg-profile-v2__actions{gap:6px}
  .tg-profile-icon-action{width:38px;height:38px}
  .tg-profile-dashboard{grid-template-columns:1fr}
  .tg-profile-dashboard>div{grid-template-columns:32px 1fr;grid-template-rows:auto auto;justify-items:start;text-align:left}
  .tg-profile-dashboard>div>span{grid-row:1/3}
  .tg-profile-identity-line__separator{display:none}
  .tg-profile-identity-line{column-gap:11px;row-gap:5px}
}

/* Aurora build 5500 — communities, unified settings and clean profile avatar */
/* The decorative rings were perceived as a broken semicircle near the avatar. */
.tg-modal--profile .tg-profile-v2__cover::before,
.tg-modal--profile .tg-profile-v2__cover::after{
  content:none!important;
  display:none!important;
}
.tg-modal--profile .tg-profile-v2__avatar{
  padding:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
}
.tg-modal--profile .tg-profile-v2__avatar .tg-profile-avatar-button,
.tg-modal--profile .tg-profile-v2__avatar .tg-avatar--big{
  border:5px solid var(--au-surface)!important;
  box-shadow:0 16px 34px rgba(25,28,42,.19)!important;
  overflow:hidden!important;
}
.tg-modal--profile .tg-profile-v2__avatar::before,
.tg-modal--profile .tg-profile-v2__avatar::after,
.tg-modal--profile .tg-profile-avatar-button::before,
.tg-modal--profile .tg-profile-avatar-button::after{
  content:none!important;
  display:none!important;
}

/* Settings are now a first-class Aurora surface instead of a stack of legacy rows. */
.tg-settings-screen-v2{background:var(--au-bg)}
.tg-settings-scroll-v2{
  padding:14px 14px 96px;
  background:
    radial-gradient(circle at 100% 0,rgba(109,93,252,.09),transparent 26%),
    var(--au-bg);
}
.tg-settings-profile-v2{
  position:relative;
  overflow:hidden;
  border:1px solid var(--au-line);
  border-radius:24px;
  background:var(--au-surface);
  box-shadow:0 14px 42px rgba(31,34,48,.08);
}
.tg-settings-profile-v2__cover{
  height:92px;
  background:
    radial-gradient(circle at 18% 24%,rgba(255,255,255,.34),transparent 22%),
    radial-gradient(circle at 82% 20%,rgba(255,255,255,.21),transparent 20%),
    linear-gradient(135deg,#786bff 0%,#6656ec 54%,#37a898 130%);
}
.tg-settings-profile-v2__main{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:13px;
  margin-top:-27px;
  padding:0 16px 15px;
}
.tg-settings-profile-v2__main>.tg-avatar{
  width:70px;height:70px;border-radius:50%;
  border:5px solid var(--au-surface);
  box-shadow:0 12px 26px rgba(28,31,48,.18);
}
.tg-settings-profile-v2__main>div{min-width:0;padding-top:28px;display:flex;flex-direction:column;gap:3px}
.tg-settings-profile-v2__main strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px;letter-spacing:-.02em}
.tg-settings-profile-v2__main span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--au-text-2);font-size:12px}
.tg-settings-profile-v2__main>button{
  align-self:end;height:34px;margin-bottom:2px;padding:0 12px;border-radius:11px;
  background:var(--au-accent-soft);color:var(--au-accent);font-size:11.5px;font-weight:730;
}
.tg-settings-profile-v2__main>button:hover{background:var(--au-accent-soft-strong)}
.tg-settings-profile-v2__stats{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  border-top:1px solid var(--au-line);background:var(--au-surface-2);
}
.tg-settings-profile-v2__stats>div{padding:12px 8px;text-align:center}
.tg-settings-profile-v2__stats>div+div{border-left:1px solid var(--au-line)}
.tg-settings-profile-v2__stats b{display:block;font-size:16px;line-height:20px}
.tg-settings-profile-v2__stats span{display:block;margin-top:2px;color:var(--au-text-3);font-size:9.5px;text-transform:uppercase;letter-spacing:.045em}
.tg-settings-grid-v2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:12px}
.tg-settings-tile-v2{
  min-width:0;min-height:88px;display:grid;grid-template-columns:42px minmax(0,1fr) 18px;
  align-items:center;gap:10px;padding:12px;border:1px solid var(--au-line);border-radius:17px;
  background:var(--au-surface);text-align:left;box-shadow:0 5px 18px rgba(31,34,48,.035);
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.tg-settings-tile-v2:hover{transform:translateY(-1px);border-color:var(--au-line-strong);box-shadow:0 10px 24px rgba(31,34,48,.07)}
.tg-settings-tile-v2>i{
  width:42px;height:42px;border-radius:14px;display:flex;align-items:center;justify-content:center;
  background:var(--tile-bg,var(--au-accent-soft));color:var(--tile-color,var(--au-accent));font-style:normal;
}
.tg-settings-tile-v2>i .tg-icon{width:21px;height:21px;flex-basis:21px}
.tg-settings-tile-v2>span{min-width:0;display:flex;flex-direction:column;gap:4px}
.tg-settings-tile-v2 strong{font-size:12.5px;line-height:16px}
.tg-settings-tile-v2 small{color:var(--au-text-3);font-size:10.5px;line-height:14px}
.tg-settings-tile-v2>b{display:flex;color:var(--au-text-3)}
.tg-settings-tile-v2>b .tg-icon{width:17px;height:17px;flex-basis:17px}
.tg-settings-tile-v2.is-blue{--tile-bg:rgba(53,137,245,.12);--tile-color:#2877dc}
.tg-settings-tile-v2.is-cyan{--tile-bg:rgba(38,174,183,.12);--tile-color:#178e98}
.tg-settings-tile-v2.is-orange{--tile-bg:rgba(229,153,53,.13);--tile-color:#c37817}
.tg-settings-tile-v2.is-green{--tile-bg:rgba(40,167,111,.12);--tile-color:#21885c}
.tg-settings-tile-v2.is-red{--tile-bg:rgba(220,79,91,.12);--tile-color:#c74451}
.tg-settings-account-v2{
  margin-top:12px;overflow:hidden;border:1px solid var(--au-line);border-radius:18px;background:var(--au-surface)
}
.tg-settings-account-v2>header{padding:14px 14px 10px;display:flex;flex-direction:column;gap:2px;background:linear-gradient(180deg,var(--au-surface-2),var(--au-surface))}
.tg-settings-account-v2>header strong{font-size:13.5px}
.tg-settings-account-v2>header span{color:var(--au-text-3);font-size:10.5px}
.tg-settings-account-v2>.tg-info-row{border-top:1px solid var(--au-line)}
.tg-settings-section-head-v2{
  margin-bottom:12px;padding:16px;display:grid;grid-template-columns:46px minmax(0,1fr);gap:12px;
  border:1px solid var(--au-line);border-radius:19px;background:linear-gradient(135deg,var(--au-surface),var(--au-surface-2));
}
.tg-settings-section-head-v2>i{width:46px;height:46px;border-radius:15px;display:flex;align-items:center;justify-content:center;background:var(--au-accent-soft);color:var(--au-accent);font-style:normal}
.tg-settings-section-head-v2>div{min-width:0;display:flex;flex-direction:column;justify-content:center;gap:3px}
.tg-settings-section-head-v2 strong{font-size:15px}
.tg-settings-section-head-v2 span{color:var(--au-text-2);font-size:11px;line-height:15px}
.tg-settings-section-body-v2{display:flex;flex-direction:column;gap:10px}
.tg-settings-section-body-v2>.tg-settings-card,
.tg-settings-section-body-v2>.tg-wallpaper-grid{margin-top:0}

/* Redesigned create flow and management workspace for groups and channels. */
.tg-community-create-v2{display:flex;flex-direction:column;gap:12px}
.tg-community-create-hero{
  position:relative;overflow:hidden;display:grid;grid-template-columns:54px minmax(0,1fr);gap:13px;
  align-items:center;padding:16px;border:1px solid rgba(109,93,252,.16);border-radius:19px;
  background:linear-gradient(135deg,rgba(109,93,252,.14),var(--au-surface));
}
.tg-community-create-hero::after{content:"";position:absolute;width:150px;height:150px;right:-70px;top:-85px;border-radius:50%;background:rgba(109,93,252,.08);pointer-events:none}
.tg-community-create-hero.is-channel{border-color:rgba(38,157,139,.18);background:linear-gradient(135deg,rgba(38,157,139,.14),var(--au-surface))}
.tg-community-create-hero>i{width:54px;height:54px;border-radius:17px;display:flex;align-items:center;justify-content:center;background:var(--au-accent);color:#fff;font-style:normal;box-shadow:0 10px 22px rgba(109,93,252,.24)}
.tg-community-create-hero.is-channel>i{background:#269d8b;box-shadow:0 10px 22px rgba(38,157,139,.22)}
.tg-community-create-hero>i .tg-icon{width:27px;height:27px;flex-basis:27px}
.tg-community-create-hero>div{min-width:0;display:flex;flex-direction:column;gap:4px;position:relative;z-index:1}
.tg-community-create-hero strong{font-size:15px}
.tg-community-create-hero span{color:var(--au-text-2);font-size:11.5px;line-height:16px}
.tg-community-create-v2 .tg-editor-section{margin:0;border:1px solid var(--au-line);border-radius:17px;background:var(--au-surface);padding:12px}
.tg-community-create-v2 .tg-primary{position:sticky;bottom:0;z-index:3;box-shadow:0 12px 26px rgba(109,93,252,.22)}

.tg-community-manage-v2{min-height:0;display:flex;flex-direction:column;background:var(--au-bg)}
.tg-community-manage-v2 .tg-manage-summary{
  padding:14px 16px;background:linear-gradient(135deg,var(--au-surface),var(--au-surface-2));
}
.tg-community-manage-v2 .tg-manage-summary>.tg-avatar{width:50px;height:50px;border-radius:16px}
.tg-community-manage-v2 .tg-manage-summary>span{flex:1}
.tg-community-manage-v2 .tg-manage-tabs{padding:8px 12px;background:var(--au-surface)}
.tg-community-manage-v2 .tg-manage-tabs button{height:38px;border-radius:12px;padding:0 13px}
.tg-community-manage-v2 .tg-manage-content{padding:14px;background:var(--au-bg)}
.tg-community-notice{
  display:flex;align-items:flex-start;gap:10px;padding:11px 12px;border:1px solid rgba(229,153,53,.25);
  border-radius:14px;background:rgba(229,153,53,.09);color:#9a6115;font-size:11.5px;line-height:16px;
}
.tg-community-notice>.tg-icon{width:18px;height:18px;flex:0 0 18px;margin-top:1px}
.tg-community-notice>span:not(.tg-icon){display:flex;min-width:0;flex:1;flex-direction:column;gap:2px}.tg-community-notice>span:not(.tg-icon)>strong{font-size:11.5px}.tg-community-notice>span:not(.tg-icon)>small{font-size:9.5px;line-height:14px}
.tg-community-overview-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.tg-community-overview-stats>div{padding:13px 8px;border:1px solid var(--au-line);border-radius:14px;background:var(--au-surface);text-align:center}
.tg-community-overview-stats b{display:block;font-size:18px}
.tg-community-overview-stats span{display:block;margin-top:3px;color:var(--au-text-3);font-size:9px;text-transform:uppercase;letter-spacing:.045em}
.tg-community-empty-v2{min-height:210px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:28px;text-align:center;color:var(--au-text-3)}
.tg-community-empty-v2>.tg-icon{width:38px;height:38px;flex-basis:38px;color:var(--au-accent)}
.tg-community-empty-v2 strong{color:var(--au-text);font-size:14px}
.tg-community-empty-v2 span{max-width:340px;font-size:11.5px;line-height:16px}
.tg-manage-member.is-restricted{border-color:rgba(220,79,91,.22);background:linear-gradient(90deg,rgba(220,79,91,.055),var(--au-surface))}
.tg-manage-member.is-restricted::before{content:"";position:absolute;left:-1px;top:12px;bottom:12px;width:3px;border-radius:0 4px 4px 0;background:var(--au-danger)}
.tg-manage-member .tg-member-admin-title{color:var(--au-accent);font-weight:680}
.tg-admin-rights-editor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:10px}
.tg-admin-rights-editor label{min-height:47px;display:flex;align-items:center;gap:9px;padding:8px 10px;border:1px solid var(--au-line);border-radius:12px;background:var(--au-surface-2);font-size:11px;line-height:14px;cursor:pointer}
.tg-admin-rights-editor input{width:16px;height:16px;accent-color:var(--au-accent)}
.tg-join-request-list{display:flex;flex-direction:column;gap:8px}
.tg-join-request{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px;border:1px solid var(--au-line);border-radius:15px;background:var(--au-surface)}
.tg-join-request>span{min-width:0;display:flex;flex-direction:column;gap:3px}
.tg-join-request strong,.tg-join-request small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-join-request small{color:var(--au-text-3);font-size:10.5px}
.tg-join-request>div{display:flex;gap:6px}
.tg-join-request>div button{height:34px;padding:0 10px;border-radius:10px;background:var(--au-accent-soft);color:var(--au-accent);font-size:10.5px;font-weight:700}
.tg-join-request>div button.danger{background:rgba(220,79,91,.1);color:var(--au-danger)}
.tg-file-row.is-protected{cursor:default;opacity:.82}
.tg-file-row.is-protected small{color:var(--au-warning)}

@media(min-width:721px){
  .tg-shell.tg-full-settings .tg-left{
    width:min(520px,100vw)!important;
    min-width:min(520px,100vw)!important;
    max-width:min(520px,100vw)!important;
  }
  .tg-modal--wide .tg-community-manage-v2{min-height:min(720px,calc(100dvh - 110px))}
}
@media(max-width:720px){
  .tg-settings-scroll-v2{padding:10px 10px 88px}
  .tg-settings-grid-v2{grid-template-columns:1fr}
  .tg-settings-tile-v2{min-height:74px}
  .tg-settings-profile-v2__main{grid-template-columns:auto minmax(0,1fr);padding-left:12px;padding-right:12px}
  .tg-settings-profile-v2__main>button{grid-column:1/-1;width:100%;margin-top:2px}
  .tg-settings-profile-v2__stats>div{padding:10px 5px}
  .tg-community-overview-stats{grid-template-columns:1fr}
  .tg-admin-rights-editor{grid-template-columns:1fr}
  .tg-join-request{grid-template-columns:auto minmax(0,1fr)}
  .tg-join-request>div{grid-column:1/-1}
  .tg-join-request>div button{flex:1}
  .tg-community-manage-v2 .tg-manage-content{padding:10px}
}

/* Build 5500 component alignment corrections */
.tg-community-create-hero{grid-template-columns:54px minmax(0,1fr) auto}
.tg-community-create-hero>span:first-child{
  width:54px;height:54px;border-radius:17px;display:flex;align-items:center;justify-content:center;
  background:var(--au-accent);color:#fff;box-shadow:0 10px 22px rgba(109,93,252,.24)
}
.tg-community-create-hero.is-channel>span:first-child{background:#269d8b;box-shadow:0 10px 22px rgba(38,157,139,.22)}
.tg-community-create-hero>span:first-child .tg-icon{width:27px;height:27px;flex-basis:27px}
.tg-community-create-hero>.tg-avatar-upload{position:relative;z-index:1;white-space:nowrap}
.tg-admin-rights-editor{
  display:flex;flex-direction:column;gap:11px;margin-top:12px;padding:13px;
  border:1px solid var(--au-line);border-radius:17px;background:var(--au-surface)
}
.tg-admin-rights-editor>header{display:flex;align-items:center;gap:10px;padding-bottom:10px;border-bottom:1px solid var(--au-line)}
.tg-admin-rights-editor>header>div{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.tg-admin-rights-editor>header strong{font-size:13px}
.tg-admin-rights-editor>header span{color:var(--au-text-3);font-size:10.5px}
.tg-admin-rights-editor>header button{width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;color:var(--au-text-2)}
.tg-admin-rights-editor>header button:hover{background:var(--au-surface-2)}
.tg-admin-rights-editor>.tg-editor-section{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:0;padding:0;border:0;background:transparent}
.tg-admin-rights-editor>.tg-editor-section .tg-editor-toggle{margin:0}
@media(max-width:720px){
  .tg-community-create-hero{grid-template-columns:50px minmax(0,1fr)}
  .tg-community-create-hero>.tg-avatar-upload{grid-column:1/-1;width:100%;justify-content:center}
  .tg-admin-rights-editor>.tg-editor-section{grid-template-columns:1fr}
}
.tg-bubble__file.is-protected{cursor:default;color:var(--au-text-2);background:rgba(229,153,53,.08)}
.tg-bubble__file.is-protected .tg-bubble__file-icon{color:var(--au-warning)}

/* Aurora build 5600 — self profile rebuilt from zero */
.tg-modal--self-profile{
  width:min(860px,calc(100vw - 28px));
  max-width:min(860px,calc(100vw - 28px));
  height:min(820px,calc(100dvh - 28px));
  max-height:calc(100dvh - 28px);
  overflow:hidden;
}
.tg-modal--self-profile .tg-modal__head{flex:0 0 auto;border-bottom:1px solid var(--au-line)}
.tg-self-profile3{
  width:100%;min-width:0;max-width:100%;padding:14px 14px 34px!important;
  overflow-x:hidden!important;overflow-y:auto!important;background:var(--au-bg);
}
.tg-self-profile3,.tg-self-profile3 *{box-sizing:border-box}
.tg-self-profile3__hero{
  position:relative;isolation:isolate;min-height:274px;overflow:hidden;border-radius:26px;
  background:
    radial-gradient(circle at 86% 20%,rgba(255,255,255,.22),transparent 22%),
    radial-gradient(circle at 10% 100%,rgba(45,225,184,.24),transparent 34%),
    linear-gradient(135deg,#5546dc 0%,#765ff0 46%,#3e9cc8 100%);
  color:#fff;box-shadow:0 20px 55px rgba(55,46,130,.22);
}
.tg-self-profile3__hero-shade{
  position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,rgba(10,12,30,.02),rgba(13,17,37,.42));
}
.tg-self-profile3__hero::before{
  content:"";position:absolute;z-index:-1;width:330px;height:330px;right:-165px;bottom:-215px;
  border:42px solid rgba(255,255,255,.08);border-radius:50%;transform:rotate(-18deg);
}
.tg-self-profile3__hero-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px}
.tg-self-profile3__eyebrow{
  display:inline-flex;align-items:center;min-height:30px;padding:0 12px;border:1px solid rgba(255,255,255,.2);
  border-radius:999px;background:rgba(20,22,52,.18);backdrop-filter:blur(12px);font-size:10px;font-weight:800;
  letter-spacing:.085em;text-transform:uppercase;
}
.tg-self-profile3__hero-tools>div{display:flex;gap:8px}
.tg-self-profile3__tool{
  width:40px;height:40px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.18);border-radius:13px;
  background:rgba(18,21,47,.18);color:#fff;backdrop-filter:blur(14px);transition:.18s ease;
}
.tg-self-profile3__tool:hover{background:rgba(255,255,255,.18);transform:translateY(-1px)}
.tg-self-profile3__tool .tg-icon{width:18px;height:18px;flex-basis:18px}
.tg-self-profile3__identity{
  display:grid;grid-template-columns:126px minmax(0,1fr);align-items:end;gap:20px;padding:36px 24px 25px;
}
.tg-self-profile3__avatar-button{
  display:grid;place-items:center;width:126px;height:126px;min-width:126px;min-height:126px;padding:0!important;
  overflow:hidden;border:5px solid rgba(255,255,255,.96);border-radius:50%!important;background:rgba(255,255,255,.16)!important;
  box-shadow:0 18px 45px rgba(15,18,47,.3);line-height:0;appearance:none;-webkit-appearance:none;
}
.tg-self-profile3__avatar-button .tg-avatar--big{
  width:116px!important;height:116px!important;min-width:116px!important;min-height:116px!important;max-width:116px!important;max-height:116px!important;
  margin:0!important;border:0!important;border-radius:50%!important;overflow:hidden!important;box-shadow:none!important;
}
.tg-self-profile3__avatar-button .tg-avatar--big img{
  display:block!important;width:100%!important;height:100%!important;max-width:none!important;margin:0!important;
  border:0!important;border-radius:50%!important;object-fit:cover!important;object-position:50% 50%!important;
}
.tg-self-profile3__identity-copy{min-width:0;padding-bottom:3px}
.tg-self-profile3__name{display:flex;align-items:center;gap:8px;min-width:0}
.tg-self-profile3__name>strong{
  min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:31px;line-height:1.08;letter-spacing:-.045em;
}
.tg-self-profile3__name>span:not(.tg-featured-badge-mini){display:grid;place-items:center;color:#fff}
.tg-self-profile3__name>span:not(.tg-featured-badge-mini) .tg-icon{width:20px;height:20px;flex-basis:20px}
.tg-self-profile3__name .tg-featured-badge-mini{filter:drop-shadow(0 4px 7px rgba(13,16,42,.28))}
.tg-self-profile3__identity .tg-profile-identity-line{margin-top:9px;color:rgba(255,255,255,.78)}
.tg-self-profile3__identity .tg-profile-identity-line__status,
.tg-self-profile3__identity .tg-profile-identity-line__joined{color:rgba(255,255,255,.78)}
.tg-self-profile3__identity .tg-profile-identity-line__status.is-online{color:#d8fff1}
.tg-self-profile3__identity .tg-profile-identity-line__status.is-online>i{border:1px solid rgba(255,255,255,.7)}
.tg-self-profile3__identity-copy>p{
  max-width:590px;margin:12px 0 0;color:rgba(255,255,255,.88);font-size:13px;line-height:1.55;white-space:pre-wrap;
}
.tg-verification-note{display:inline-flex;align-items:center;gap:6px;align-self:flex-start;margin-top:10px;padding:6px 10px;border:1px solid var(--au-line);border-radius:999px;background:var(--au-surface-2);color:var(--au-text-2);font-size:11px;font-weight:750}
.tg-verification-note.is-on-cover{border-color:rgba(255,255,255,.28);background:rgba(13,18,55,.2);color:rgba(255,255,255,.94)}
.tg-self-profile3__actions{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:12px;
}
.tg-self-profile3__actions>button{
  min-width:0;min-height:72px;display:grid;grid-template-columns:40px minmax(0,1fr);align-items:center;gap:11px;padding:11px 13px;
  border:1px solid var(--au-line);border-radius:17px;background:var(--au-surface);text-align:left;transition:.17s ease;
}
.tg-self-profile3__actions>button:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--au-accent) 30%,var(--au-line));box-shadow:0 10px 26px rgba(40,43,78,.08)}
.tg-self-profile3__actions>button>.tg-icon{width:40px;height:40px;display:grid;place-items:center;flex-basis:40px;padding:10px;border-radius:13px;background:var(--au-accent-soft);color:var(--au-accent)}
.tg-self-profile3__actions>button>span{min-width:0;display:flex;flex-direction:column;gap:3px}
.tg-self-profile3__actions strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12.5px}
.tg-self-profile3__actions small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--au-text-3);font-size:9.8px}
.tg-self-profile3__layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(230px,.75fr);gap:12px;margin-top:12px;align-items:start}
.tg-self-profile3__main,.tg-self-profile3__side{min-width:0;display:flex;flex-direction:column;gap:12px}
.tg-self-profile3__section,.tg-self-profile3__stat-card,.tg-self-profile3__privacy{
  min-width:0;border:1px solid var(--au-line);border-radius:20px;background:var(--au-surface);overflow:hidden;
}
.tg-self-profile3__section>header,.tg-self-profile3__stat-card>header{
  display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 15px 11px;border-bottom:1px solid var(--au-line);
}
.tg-self-profile3__section>header>div,.tg-self-profile3__stat-card>header{min-width:0}
.tg-self-profile3__section>header>div,.tg-self-profile3__stat-card>header{display:flex}
.tg-self-profile3__section>header>div{flex-direction:column;gap:2px}
.tg-self-profile3__section>header strong,.tg-self-profile3__stat-card>header strong{font-size:13px}
.tg-self-profile3__section>header span,.tg-self-profile3__stat-card>header span{color:var(--au-text-3);font-size:9.8px}
.tg-self-profile3__section>header>button{padding:7px 10px;border-radius:10px;background:var(--au-accent-soft);color:var(--au-accent);font-size:10px;font-weight:750}
.tg-self-profile3__badge-section>.tg-profile-featured{margin:0;border:0;border-radius:0;box-shadow:none}
.tg-self-profile3__facts>.tg-info-row{border-top:1px solid var(--au-line)}
.tg-self-profile3__facts>.tg-info-row:first-child{border-top:0}
.tg-self-profile3__stat-card>header{flex-direction:column;align-items:flex-start}
.tg-self-profile3__stats{display:flex;flex-direction:column;padding:6px}
.tg-self-profile3__stats>div{display:grid;grid-template-columns:40px minmax(0,1fr);align-items:center;gap:10px;padding:9px;border-radius:13px}
.tg-self-profile3__stats>div:hover{background:var(--au-surface-2)}
.tg-self-profile3__stats i{width:40px;height:40px;display:grid;place-items:center;border-radius:13px;background:var(--au-surface-2);color:var(--au-accent);font-style:normal}
.tg-self-profile3__stats i .tg-icon{width:18px;height:18px;flex-basis:18px}
.tg-self-profile3__stats>div>span{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.tg-self-profile3__stats b{font-size:20px}.tg-self-profile3__stats small{color:var(--au-text-3);font-size:10px;text-transform:uppercase;letter-spacing:.05em}
.tg-self-profile3__privacy{padding:16px;text-align:left}
.tg-self-profile3__privacy>div{width:44px;height:44px;display:grid;place-items:center;border-radius:14px;background:var(--au-accent-soft);color:var(--au-accent)}
.tg-self-profile3__privacy>div .tg-icon{width:21px;height:21px;flex-basis:21px}
.tg-self-profile3__privacy>strong{display:block;margin-top:12px;font-size:13px}
.tg-self-profile3__privacy>p{margin:6px 0 12px;color:var(--au-text-2);font-size:10.8px;line-height:1.5}
.tg-self-profile3__privacy>button{width:100%;min-height:38px;border-radius:12px;background:var(--au-surface-2);color:var(--au-accent);font-size:10.5px;font-weight:750}

/* Aurora build 5600 — channel/group management rebuilt as a control center */
.tg-modal--community{
  width:min(1060px,calc(100vw - 28px));max-width:min(1060px,calc(100vw - 28px));
  height:min(840px,calc(100dvh - 28px));max-height:calc(100dvh - 28px);overflow:hidden;
}
.tg-modal--community .tg-modal__head{flex:0 0 auto;border-bottom:1px solid var(--au-line)}
.tg-community-console{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden;background:var(--au-bg)}
.tg-community-console,.tg-community-console *{box-sizing:border-box}
.tg-community-console__hero{
  flex:0 0 auto;display:grid;grid-template-columns:72px minmax(0,1fr) auto;align-items:center;gap:15px;padding:17px 20px;
  border-bottom:1px solid var(--au-line);background:
    radial-gradient(circle at 95% 0,rgba(109,93,252,.12),transparent 32%),
    linear-gradient(135deg,var(--au-surface),var(--au-surface-2));
}
.tg-community-console__avatar{width:72px;height:72px;display:grid;place-items:center;overflow:hidden;border-radius:22px;background:var(--au-surface);box-shadow:0 12px 30px rgba(28,31,62,.13)}
.tg-community-console__avatar .tg-avatar--big{width:72px!important;height:72px!important;border-radius:22px!important;box-shadow:none!important}
.tg-community-console__identity{min-width:0;display:flex;flex-direction:column;gap:3px}
.tg-community-console__identity>span{color:var(--au-accent);font-size:9.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.tg-community-console__identity>strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:22px;letter-spacing:-.025em}
.tg-community-console__identity>small{color:var(--au-text-3);font-size:10.5px}
.tg-community-console__hero-tags{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:6px}
.tg-community-console__hero-tags>span{min-height:28px;display:inline-flex;align-items:center;padding:0 10px;border:1px solid var(--au-line);border-radius:999px;background:var(--au-surface);color:var(--au-text-2);font-size:9.5px;font-weight:700}
.tg-community-console__workspace{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:228px minmax(0,1fr)}
.tg-community-console__nav{min-height:0;overflow-y:auto;padding:10px;border-right:1px solid var(--au-line);background:var(--au-surface)}
.tg-community-console__nav>button{
  position:relative;width:100%;min-height:58px;display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:9px;padding:8px 10px;
  border-radius:14px;color:var(--au-text-2);text-align:left;transition:.16s ease;
}
.tg-community-console__nav>button:hover{background:var(--au-surface-2)}
.tg-community-console__nav>button.is-active{background:var(--au-accent-soft);color:var(--au-accent)}
.tg-community-console__nav>button.is-active::before{content:"";position:absolute;left:0;top:12px;bottom:12px;width:3px;border-radius:0 4px 4px 0;background:var(--au-accent)}
.tg-community-console__nav>button>i{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:var(--au-surface-2);font-style:normal}
.tg-community-console__nav>button.is-active>i{background:rgba(109,93,252,.14)}
.tg-community-console__nav>button>i .tg-icon{width:18px;height:18px;flex-basis:18px}
.tg-community-console__nav>button>span{min-width:0;display:flex;flex-direction:column;gap:2px}
.tg-community-console__nav strong,.tg-community-console__nav small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-community-console__nav strong{font-size:11.5px}.tg-community-console__nav small{color:var(--au-text-3);font-size:8.8px}
.tg-community-console__nav>button>b{min-width:24px;height:24px;display:grid;place-items:center;padding:0 6px;border-radius:999px;background:var(--au-danger);color:#fff;font-size:9px}
.tg-community-console__content{min-width:0;min-height:0;overflow-x:hidden;overflow-y:auto;padding:14px 16px 40px;background:var(--au-bg)}
.tg-community-console__overview{display:flex;flex-direction:column;gap:12px}
.tg-community-console__metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.tg-community-console__metrics>div{min-width:0;display:grid;grid-template-columns:42px minmax(0,1fr);align-items:center;gap:10px;padding:12px;border:1px solid var(--au-line);border-radius:16px;background:var(--au-surface)}
.tg-community-console__metrics>div>i{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:var(--au-accent-soft);color:var(--au-accent);font-style:normal}
.tg-community-console__metrics>div>i .tg-icon{width:19px;height:19px;flex-basis:19px}
.tg-community-console__metrics>div>span{min-width:0;display:flex;flex-direction:column;gap:2px}
.tg-community-console__metrics b{font-size:20px;line-height:1}.tg-community-console__metrics small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--au-text-3);font-size:9px;text-transform:uppercase;letter-spacing:.05em}
.tg-community-console__overview-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(250px,.75fr);gap:12px;align-items:start}
.tg-community-console__profile-card,.tg-community-console__quick>section,.tg-community-console__panel,.tg-community-console__invite,.tg-community-console__danger{
  min-width:0;border:1px solid var(--au-line);border-radius:20px;background:var(--au-surface);overflow:hidden;
}
.tg-community-console__profile-card{display:flex;flex-direction:column;gap:11px;padding:14px}
.tg-community-console__profile-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding-bottom:11px;border-bottom:1px solid var(--au-line)}
.tg-community-console__profile-card>header>div{min-width:0;display:flex;flex-direction:column;gap:2px}
.tg-community-console__profile-card>header strong{font-size:13.5px}.tg-community-console__profile-card>header span{color:var(--au-text-3);font-size:9.8px}
.tg-community-console__access{flex:0 0 auto;padding:6px 9px;border-radius:999px;background:var(--au-surface-2);color:var(--au-text-3)!important;font-size:8.8px!important;font-weight:750}
.tg-community-console__access.is-ok{background:rgba(40,189,125,.12);color:#16845f!important}
.tg-community-console__photo{display:grid;grid-template-columns:92px minmax(0,1fr);align-items:center;gap:13px;padding:4px 0}
.tg-community-console__photo>div{width:92px;height:92px;overflow:hidden;border-radius:24px;background:var(--au-surface-2)}
.tg-community-console__photo .tg-avatar--big{width:92px!important;height:92px!important;border-radius:24px!important;box-shadow:none!important}
.tg-community-console__photo>aside{display:flex;align-items:center;flex-wrap:wrap;gap:7px}
.tg-community-console__quick{min-width:0;display:flex;flex-direction:column;gap:12px}
.tg-community-console__quick>section>header,.tg-community-console__panel>header,.tg-community-console__status>header{display:flex;flex-direction:column;gap:2px;padding:13px 14px 10px;border-bottom:1px solid var(--au-line)}
.tg-community-console__quick>section>header>div,.tg-community-console__panel>header>div,.tg-community-console__status>header>div{display:flex;min-width:0;flex-direction:column;gap:2px}
.tg-community-console__quick>section>header strong,.tg-community-console__panel>header strong{font-size:13px}
.tg-community-console__quick>section>header span,.tg-community-console__panel>header span{color:var(--au-text-3);font-size:9.5px}
.tg-community-console__quick>section>button{width:100%;display:grid;grid-template-columns:38px minmax(0,1fr) 18px;align-items:center;gap:9px;padding:10px 12px;border-top:1px solid var(--au-line);text-align:left}
.tg-community-console__quick>section>button:first-of-type{border-top:0}
.tg-community-console__quick>section>button:hover{background:var(--au-surface-2)}
.tg-community-console__quick>section>button>.tg-icon:first-child{width:38px;height:38px;display:grid;place-items:center;flex-basis:38px;padding:10px;border-radius:12px;background:var(--au-accent-soft);color:var(--au-accent)}
.tg-community-console__quick>section>button>.tg-icon:last-child{width:16px;height:16px;flex-basis:16px;color:var(--au-text-3)}
.tg-community-console__quick>section>button>span{min-width:0;display:flex;flex-direction:column;gap:2px}
.tg-community-console__quick>section>button strong,.tg-community-console__quick>section>button small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-community-console__quick>section>button strong{font-size:10.8px}.tg-community-console__quick>section>button small{color:var(--au-text-3);font-size:8.8px}
.tg-community-console__status>div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 13px;border-top:1px solid var(--au-line);font-size:10px}
.tg-community-console__status>div:first-of-type{border-top:0}.tg-community-console__status>div>span{color:var(--au-text-3)}.tg-community-console__status>div>b{text-align:right;font-weight:700}
.tg-community-console__panel>header{padding:15px 16px 12px}
.tg-community-console__panel>.tg-manage-form,.tg-community-console__panel>.tg-member-picker,.tg-community-console__panel>.tg-community-notice,.tg-community-console__panel>.tg-manage-members,.tg-community-console__panel>.tg-admin-rights-editor,.tg-community-console__panel>.tg-join-request-list,.tg-community-console__panel>.tg-community-empty-v2{margin:12px}
.tg-community-console__panel>.tg-manage-form{border:0;background:transparent}
.tg-community-console__panel>.tg-manage-form>.tg-editor-section{margin:0;border:0;background:transparent;padding:0}
.tg-community-console__verification{display:flex;flex-direction:column;gap:12px;padding:12px}
.tg-community-console__verification>.tg-community-notice{margin:0}
.tg-community-console__verification>.tg-primary{align-self:flex-start}
.tg-community-console__verification>.tg-primary:disabled{cursor:not-allowed;opacity:.48;box-shadow:none}
.tg-verification-requirements{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.tg-verification-requirements>div{display:flex;flex-direction:column;gap:2px;padding:11px 12px;border:1px solid var(--au-line);border-radius:13px;background:var(--au-surface-2);color:var(--au-text-3)}.tg-verification-requirements>div.is-done{border-color:rgba(40,189,125,.28);background:rgba(40,189,125,.08);color:#16845f}.tg-verification-requirements b{font-size:14px}.tg-verification-requirements span{font-size:10px}
.tg-community-console__invite{display:grid;grid-template-columns:58px minmax(0,1fr);gap:13px;padding:18px}
.tg-community-console__invite-icon{width:58px;height:58px;display:grid;place-items:center;border-radius:18px;background:var(--au-accent-soft);color:var(--au-accent)}
.tg-community-console__invite-icon .tg-icon{width:27px;height:27px;flex-basis:27px}
.tg-community-console__invite>div:nth-child(2){min-width:0}.tg-community-console__invite>div:nth-child(2)>span{color:var(--au-text-3);font-size:9px;text-transform:uppercase;letter-spacing:.06em}.tg-community-console__invite>div:nth-child(2)>strong{display:block;margin-top:2px;font-size:16px}.tg-community-console__invite>div:nth-child(2)>p{margin:7px 0 0;color:var(--au-text-2);font-size:10.5px;line-height:1.5}
.tg-community-console__invite>.tg-invite-link,.tg-community-console__invite>.tg-secondary{grid-column:1/-1}
.tg-community-console__danger>header{display:flex;align-items:center;gap:11px;padding:15px;border-bottom:1px solid var(--au-line)}
.tg-community-console__danger>header>div{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:rgba(220,79,91,.1);color:var(--au-danger)}
.tg-community-console__danger>header>span{min-width:0;display:flex;flex-direction:column;gap:2px}.tg-community-console__danger>header strong{font-size:13px}.tg-community-console__danger>header small{color:var(--au-text-3);font-size:9.5px}
.tg-community-console__danger>.tg-settings-row{margin:12px;border:1px solid rgba(220,79,91,.18);border-radius:15px}

@media(max-width:840px){
  .tg-self-profile3__layout{grid-template-columns:1fr}
  .tg-self-profile3__side{display:grid;grid-template-columns:1fr 1fr}
  .tg-community-console__workspace{grid-template-columns:190px minmax(0,1fr)}
  .tg-community-console__overview-grid{grid-template-columns:1fr}
}
@media(max-width:720px){
  .tg-modal--self-profile,.tg-modal--community{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0}
  .tg-self-profile3{padding:8px 8px 28px!important}
  .tg-self-profile3__hero{min-height:310px;border-radius:20px}
  .tg-self-profile3__identity{grid-template-columns:1fr;align-items:center;justify-items:center;text-align:center;padding:16px 16px 24px}
  .tg-self-profile3__identity-copy{width:100%}.tg-self-profile3__name{justify-content:center}.tg-self-profile3__identity .tg-profile-identity-line{justify-content:center}.tg-self-profile3__identity-copy>p{margin-left:auto;margin-right:auto}
  .tg-self-profile3__actions{grid-template-columns:1fr}
  .tg-self-profile3__actions>button{min-height:62px}
  .tg-self-profile3__side{display:flex}
  .tg-community-console__hero{grid-template-columns:58px minmax(0,1fr);padding:12px}.tg-community-console__avatar{width:58px;height:58px;border-radius:18px}.tg-community-console__avatar .tg-avatar--big{width:58px!important;height:58px!important;border-radius:18px!important}.tg-community-console__identity>strong{font-size:18px}.tg-community-console__hero-tags{grid-column:1/-1;justify-content:flex-start}
  .tg-community-console__workspace{display:flex;flex-direction:column}
  .tg-community-console__nav{flex:0 0 auto;display:flex;gap:6px;padding:8px;overflow-x:auto;overflow-y:hidden;border-right:0;border-bottom:1px solid var(--au-line);scrollbar-width:none}
  .tg-community-console__nav::-webkit-scrollbar{display:none}
  .tg-community-console__nav>button{flex:0 0 auto;width:auto;min-width:56px;min-height:50px;grid-template-columns:34px auto;padding:7px 9px}
  .tg-community-console__nav>button::before{display:none}.tg-community-console__nav>button>i{width:34px;height:34px}.tg-community-console__nav>button>span small{display:none}.tg-community-console__nav>button>b{position:absolute;right:2px;top:2px;min-width:18px;height:18px;font-size:8px}
  .tg-community-console__content{padding:9px 9px 30px}
  .tg-community-console__metrics{grid-template-columns:1fr}
  .tg-community-console__photo{grid-template-columns:76px minmax(0,1fr)}.tg-community-console__photo>div{width:76px;height:76px;border-radius:20px}.tg-community-console__photo .tg-avatar--big{width:76px!important;height:76px!important;border-radius:20px!important}
}
@media(max-width:430px){
  .tg-self-profile3__hero-tools{padding:14px}.tg-self-profile3__eyebrow{font-size:8.5px}.tg-self-profile3__avatar-button{width:112px;height:112px;min-width:112px;min-height:112px}.tg-self-profile3__avatar-button .tg-avatar--big{width:102px!important;height:102px!important;min-width:102px!important;min-height:102px!important;max-width:102px!important;max-height:102px!important}.tg-self-profile3__name>strong{font-size:25px}
  .tg-self-profile3__section>header{align-items:flex-start;flex-direction:column}.tg-self-profile3__section>header>button{width:100%}
  .tg-community-console__nav>button>span{display:none}.tg-community-console__nav>button{min-width:48px;grid-template-columns:34px;padding:7px}
  .tg-community-console__profile-card>header{flex-direction:column}.tg-community-console__photo{grid-template-columns:1fr;justify-items:center;text-align:center}.tg-community-console__photo>aside{justify-content:center}
}

/* Aurora build 5620 — clean profile avatar and Aurora Voice */
.tg-self-profile3__avatar-button,
.tg-self-profile3__avatar-button.is-static{
  position:relative!important;
  cursor:default!important;
  pointer-events:none!important;
  isolation:isolate;
}
.tg-self-profile3__avatar-button::before,
.tg-self-profile3__avatar-button::after,
.tg-self-profile3__avatar-button>*::before,
.tg-self-profile3__avatar-button>*::after{
  content:none!important;
  display:none!important;
}
.tg-self-profile3__avatar-button>.tg-avatar{display:flex!important}
.tg-modal--self-profile .tg-profile-avatar-button__zoom,
.tg-modal--self-profile [class*="avatar"]>[class*="plus"],
.tg-modal--self-profile [class*="avatar"]>[class*="add"]{display:none!important}

.tg-bubble:has(.tg-voice-message){
  width:min(420px,72vw);
  min-width:300px;
  padding:7px 8px 6px;
}
.tg-voice-message{
  --voice-card-accent:var(--au-accent);
  --voice-card-soft:rgba(109,93,252,.13);
  --voice-card-muted:rgba(93,99,113,.28);
  width:100%;min-width:0;display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:10px;
  padding:5px 5px 4px;border-radius:16px;position:relative;overflow:hidden;
  color:var(--au-text);
}
.tg-msg.is-out .tg-voice-message{
  --voice-card-accent:#fff;
  --voice-card-soft:rgba(255,255,255,.18);
  --voice-card-muted:rgba(255,255,255,.34);
  color:#fff;
}
.tg-voice-message::before{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:linear-gradient(120deg,var(--voice-card-soft),transparent 58%);opacity:.52;
}
.tg-voice-message__play{
  position:relative;z-index:2;width:48px;height:48px;display:grid;place-items:center;border-radius:50%;
  background:var(--voice-card-accent);color:#fff;box-shadow:0 9px 22px rgba(88,70,219,.25);
  transition:transform .16s ease,box-shadow .16s ease;
}
.tg-msg.is-out .tg-voice-message__play{background:#fff;color:#6756ee;box-shadow:0 8px 20px rgba(39,25,111,.22)}
.tg-voice-message__play:hover{transform:scale(1.045)}
.tg-voice-message__play:active{transform:scale(.96)}
.tg-voice-message__play .tg-icon{width:21px;height:21px;flex-basis:21px;position:relative;z-index:2}
.tg-voice-message__pulse{position:absolute;inset:-4px;border:1px solid currentColor;border-radius:50%;opacity:0}
.tg-voice-message.is-playing .tg-voice-message__pulse{animation:auroraVoicePulse 1.35s ease-out infinite}
.tg-voice-message__content{position:relative;z-index:2;min-width:0;display:flex;flex-direction:column;gap:4px}
.tg-voice-message__head{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:18px}
.tg-voice-message__head>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;font-weight:760;letter-spacing:.01em}
.tg-voice-message__speed{
  flex:0 0 auto;min-width:34px;height:22px;padding:0 7px;border-radius:999px;background:var(--voice-card-soft);
  color:inherit;font-size:9.5px;font-weight:850;font-variant-numeric:tabular-nums;
}
.tg-voice-message__wave{
  position:relative;width:100%;height:30px;display:block;overflow:hidden;border-radius:8px;
  cursor:pointer;touch-action:manipulation;
}
.tg-voice-message__bars{position:absolute;inset:3px 0 4px;display:flex;align-items:center;gap:2px;opacity:.72}
.tg-voice-message__bars i{
  flex:1 1 0;min-width:2px;max-width:4px;height:var(--voice-bar);border-radius:999px;background:var(--voice-card-muted);
  transform-origin:center;transition:background .15s ease,transform .15s ease;
}
.tg-voice-message.is-playing .tg-voice-message__bars i:nth-child(3n+1){animation:auroraVoiceBar .74s ease-in-out infinite alternate}
.tg-voice-message.is-playing .tg-voice-message__bars i:nth-child(3n+2){animation:auroraVoiceBar .92s .12s ease-in-out infinite alternate}
.tg-voice-message.is-playing .tg-voice-message__bars i:nth-child(3n){animation:auroraVoiceBar .81s .2s ease-in-out infinite alternate}
.tg-voice-message__played{
  position:absolute;left:0;bottom:1px;width:var(--voice-progress);height:3px;border-radius:999px;
  background:var(--voice-card-accent);box-shadow:0 0 10px color-mix(in srgb,var(--voice-card-accent) 54%,transparent);
  transition:width .08s linear;
}
.tg-voice-message__thumb{
  position:absolute;left:var(--voice-progress);bottom:-1px;width:7px;height:7px;border-radius:50%;background:var(--voice-card-accent);
  transform:translateX(-50%);box-shadow:0 0 0 3px var(--voice-card-soft);opacity:0;transition:opacity .15s ease,left .08s linear;
}
.tg-voice-message:hover .tg-voice-message__thumb,.tg-voice-message.is-active .tg-voice-message__thumb{opacity:1}
.tg-voice-message__footer{display:flex;align-items:center;gap:5px;color:var(--au-text-3);font-size:9.5px;font-variant-numeric:tabular-nums;line-height:1}
.tg-msg.is-out .tg-voice-message__footer{color:rgba(255,255,255,.72)}
.tg-voice-message__secure{margin-left:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8.5px;font-weight:750;letter-spacing:.02em}
.tg-voice-message__dot{opacity:.55}
.tg-voice-message+.tg-bubble__meta{display:flex;float:none;clear:both;width:max-content;margin:3px 3px 0 auto}

.tg-composer.is-voice-recording{align-items:center}
.tg-voice-recorder{
  flex:1;min-width:0;min-height:58px;display:grid;grid-template-columns:auto minmax(0,1fr) 42px;align-items:center;gap:11px;
  padding:7px 8px 7px 12px;border:1px solid rgba(229,72,97,.19);border-radius:19px;
  background:linear-gradient(120deg,rgba(255,255,255,.98),rgba(255,244,247,.98));
  box-shadow:0 12px 34px rgba(89,33,48,.11);
}
.tg-voice-recorder__live{display:flex;align-items:center;gap:6px;color:#db3855;font-size:9px;font-weight:900;letter-spacing:.08em}
.tg-voice-recorder__live>span{width:10px;height:10px;border-radius:50%;background:#e54861;animation:tgRecPulse 1.15s infinite}
.tg-voice-recorder__body{min-width:0;display:flex;flex-direction:column;gap:3px}
.tg-voice-recorder__top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.tg-voice-recorder__top strong{font-size:11.5px}.tg-voice-recorder__top time{color:#d9364f;font-size:11px;font-weight:800;font-variant-numeric:tabular-nums}
.tg-voice-recorder__body>small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--au-text-3);font-size:8.7px}
.tg-voice-recorder__wave{height:18px;display:flex;align-items:center;gap:2px;overflow:hidden}
.tg-voice-recorder__wave i{flex:1 1 0;min-width:2px;max-width:4px;height:var(--voice-bar);border-radius:999px;background:linear-gradient(180deg,#ee6680,#d82f50);animation:auroraVoiceBar .74s ease-in-out infinite alternate}
.tg-voice-recorder__wave i:nth-child(3n+2){animation-delay:.16s;animation-duration:.91s}.tg-voice-recorder__wave i:nth-child(3n){animation-delay:.28s;animation-duration:.82s}
.tg-voice-recorder__cancel{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:rgba(229,72,97,.1);color:#d9364f}
.tg-voice-recorder__cancel:hover{background:rgba(229,72,97,.17)}
.tg-voice-recorder__cancel .tg-icon{width:18px;height:18px;flex-basis:18px}
.tg-send.is-recording{border-radius:50%;background:#e54861;border-color:#e54861;box-shadow:0 10px 26px rgba(229,72,97,.28)}

@keyframes auroraVoicePulse{0%{transform:scale(.88);opacity:.58}100%{transform:scale(1.35);opacity:0}}
@keyframes auroraVoiceBar{from{transform:scaleY(.56);opacity:.72}to{transform:scaleY(1.08);opacity:1}}

.theme-dark .tg-voice-recorder{background:linear-gradient(120deg,rgba(35,36,48,.99),rgba(48,31,40,.99));border-color:rgba(238,102,128,.22)}
.theme-dark .tg-voice-recorder__top strong{color:#fff}

@media(max-width:640px){
  .tg-bubble:has(.tg-voice-message){width:min(350px,84vw);min-width:260px}
  .tg-voice-message{grid-template-columns:44px minmax(0,1fr);gap:8px}
  .tg-voice-message__play{width:44px;height:44px}
  .tg-voice-message__bars{gap:1.5px}
  .tg-voice-recorder{grid-template-columns:auto minmax(0,1fr) 38px;gap:8px;padding-left:9px}
  .tg-voice-recorder__cancel{width:38px;height:38px}
  .tg-voice-recorder__body>small{display:none}
}
@media(prefers-reduced-motion:reduce){
  .tg-voice-message.is-playing .tg-voice-message__bars i,.tg-voice-message.is-playing .tg-voice-message__pulse,.tg-voice-recorder__wave i{animation:none!important}
}

/* Aurora build 5620 — animated, audio-derived voice messages */
.tg-bubble:has(.tg-voice-message){
  width:min(410px,74vw);min-width:310px;padding:7px 8px!important;overflow:visible;
}
.tg-voice-message{
  --voice-accent:#6d5dfc;
  --voice-accent-2:#28b8ff;
  --voice-muted:rgba(80,88,109,.25);
  --voice-surface:linear-gradient(135deg,rgba(255,255,255,.84),rgba(246,244,255,.72));
  width:100%;min-width:0;display:grid;grid-template-columns:54px minmax(0,1fr);align-items:center;gap:11px;
  position:relative;isolation:isolate;overflow:hidden;padding:7px 8px 7px 6px;border-radius:20px;
  color:var(--au-text);background:var(--voice-surface);border:1px solid rgba(109,93,252,.11);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72),0 8px 26px rgba(31,27,64,.07);
}
.tg-voice-message::before{
  content:"";position:absolute;z-index:-1;inset:-40% -30%;pointer-events:none;opacity:0;
  background:linear-gradient(110deg,transparent 32%,rgba(109,93,252,.13) 48%,rgba(40,184,255,.1) 55%,transparent 70%);
  transform:translateX(-42%) rotate(5deg);
}
.tg-voice-message.is-playing::before{opacity:1;animation:auroraVoiceShimmer 2.8s linear infinite}
.tg-voice-message::after{
  content:"";position:absolute;z-index:-1;width:160px;height:160px;right:-110px;top:-110px;border-radius:50%;
  background:radial-gradient(circle,rgba(109,93,252,.16),transparent 68%);pointer-events:none;
}
.tg-msg.is-out .tg-voice-message{
  --voice-accent:#fff;
  --voice-accent-2:#c9f8ff;
  --voice-muted:rgba(255,255,255,.34);
  --voice-surface:linear-gradient(135deg,rgba(255,255,255,.13),rgba(255,255,255,.04));
  color:#fff;border-color:rgba(255,255,255,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.14),0 8px 22px rgba(45,30,130,.14);
}
.tg-voice-message__play{
  position:relative;z-index:2;width:52px;height:52px;display:grid;place-items:center;border-radius:50%;overflow:visible;
  color:#fff;background:linear-gradient(145deg,#8071ff,#5f4de9 62%,#5140d5);
  box-shadow:0 10px 24px rgba(93,76,224,.3),inset 0 1px 0 rgba(255,255,255,.34);
  transition:transform .18s cubic-bezier(.2,.8,.2,1),box-shadow .18s ease,filter .18s ease;
}
.tg-msg.is-out .tg-voice-message__play{color:#6756ef;background:#fff;box-shadow:0 9px 22px rgba(42,27,121,.24),inset 0 1px 0 #fff}
.tg-voice-message__play:hover{transform:scale(1.055);filter:saturate(1.08)}
.tg-voice-message__play:active{transform:scale(.95)}
.tg-voice-message__play-core{position:relative;z-index:4;display:grid;place-items:center}
.tg-voice-message__play-core .tg-icon{width:22px;height:22px;flex-basis:22px;filter:drop-shadow(0 1px 2px rgba(0,0,0,.14))}
.tg-voice-message__pulse{position:absolute;z-index:1;inset:-5px;border-radius:50%;border:1.5px solid var(--voice-accent);opacity:0;pointer-events:none}
.tg-voice-message__orbit{
  position:absolute;z-index:2;inset:-3px;border-radius:50%;opacity:0;pointer-events:none;
  background:conic-gradient(from 0deg,transparent 0 22%,var(--voice-accent-2) 36%,var(--voice-accent) 50%,transparent 66% 100%);
  -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 2px),#000 0);mask:radial-gradient(farthest-side,transparent calc(100% - 2px),#000 0);
}
.tg-voice-message.is-playing .tg-voice-message__play{box-shadow:0 11px 29px rgba(93,76,224,.4),0 0 0 5px rgba(109,93,252,.1),inset 0 1px 0 rgba(255,255,255,.38)}
.tg-msg.is-out .tg-voice-message.is-playing .tg-voice-message__play{box-shadow:0 10px 25px rgba(38,25,116,.28),0 0 0 5px rgba(255,255,255,.16)}
.tg-voice-message.is-playing .tg-voice-message__pulse{animation:auroraVoiceHalo 1.45s ease-out infinite}
.tg-voice-message.is-playing .tg-voice-message__orbit{opacity:.95;animation:auroraVoiceOrbit 2.2s linear infinite}
.tg-voice-message__content{position:relative;z-index:2;min-width:0;display:flex;flex-direction:column;gap:4px}
.tg-voice-message__head{min-height:20px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.tg-voice-message__title{min-width:0;display:inline-flex;align-items:center;gap:6px;overflow:hidden;color:var(--au-text-2);font-size:10.5px;font-weight:760;letter-spacing:.015em}
.tg-msg.is-out .tg-voice-message__title{color:rgba(255,255,255,.8)}
.tg-voice-message__title>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-voice-message__title>i{width:6px;height:6px;flex:0 0 6px;border-radius:50%;background:var(--voice-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--voice-accent) 13%,transparent)}
.tg-voice-message.is-playing .tg-voice-message__title>i{animation:auroraVoiceLiveDot 1.15s ease-in-out infinite}
.tg-voice-message__speed{
  min-width:38px;height:23px;padding:0 8px;border-radius:999px;background:rgba(109,93,252,.1);color:#6657df;
  font-size:10px;font-weight:900;font-variant-numeric:tabular-nums;letter-spacing:-.01em;transition:transform .15s ease,background .15s ease;
}
.tg-msg.is-out .tg-voice-message__speed{background:rgba(255,255,255,.16);color:#fff}
.tg-voice-message__speed:hover{transform:translateY(-1px);background:rgba(109,93,252,.16)}
.tg-msg.is-out .tg-voice-message__speed:hover{background:rgba(255,255,255,.24)}
.tg-voice-message__wave{
  position:relative;width:100%;height:34px;display:block;padding:0;border:0;border-radius:9px;overflow:visible;
  cursor:ew-resize;touch-action:none;background:transparent;
}
.tg-voice-message__wave-grid{position:absolute;inset:2px 0 3px;overflow:hidden;border-radius:8px}
.tg-voice-message__bars{position:absolute;inset:0;display:flex;align-items:center;gap:2px;pointer-events:none}
.tg-voice-message__bars i{
  flex:1 1 0;min-width:1.5px;max-width:4px;height:var(--voice-bar);border-radius:999px;transform-origin:center;
  transition:height .3s cubic-bezier(.2,.8,.2,1),filter .14s ease,opacity .14s ease;
}
.tg-voice-message__bars--base i{background:var(--voice-muted);opacity:.82}
.tg-voice-message__bars--active{
  z-index:2;clip-path:inset(0 calc(100% - var(--voice-progress)) 0 0);will-change:clip-path;
}
.tg-voice-message__bars--active i{background:linear-gradient(180deg,var(--voice-accent-2),var(--voice-accent));box-shadow:0 0 7px color-mix(in srgb,var(--voice-accent) 26%,transparent)}
.tg-voice-message.has-real-waveform .tg-voice-message__bars i{transition:height .48s cubic-bezier(.22,.8,.2,1)}
.tg-voice-message.is-playing .tg-voice-message__bars--active i.is-current{
  filter:brightness(1.2) saturate(1.18);animation:auroraVoiceCurrentBar .46s var(--voice-delay) ease-in-out infinite alternate;
}
.tg-voice-message__playhead{
  position:absolute;z-index:5;left:var(--voice-progress);top:50%;width:2px;height:31px;border-radius:999px;
  transform:translate(-1px,-50%);background:var(--voice-accent);box-shadow:0 0 9px color-mix(in srgb,var(--voice-accent) 62%,transparent);
  opacity:0;transition:opacity .16s ease;pointer-events:none;
}
.tg-voice-message__playhead i{position:absolute;left:50%;top:50%;width:7px;height:7px;border-radius:50%;background:var(--voice-accent);transform:translate(-50%,-50%);box-shadow:0 0 0 4px color-mix(in srgb,var(--voice-accent) 16%,transparent)}
.tg-voice-message.is-active .tg-voice-message__playhead,.tg-voice-message.is-playing .tg-voice-message__playhead{opacity:1}
.tg-voice-message__hover-time{
  position:absolute;z-index:8;left:var(--voice-hover);top:-25px;transform:translateX(-50%) translateY(3px);opacity:0;pointer-events:none;
  min-width:38px;padding:4px 6px;border-radius:7px;background:#171923;color:#fff;box-shadow:0 5px 15px rgba(0,0,0,.2);
  font-size:9px;font-weight:800;font-variant-numeric:tabular-nums;transition:opacity .13s ease,transform .13s ease;
}
.tg-voice-message.is-seek-preview .tg-voice-message__hover-time{opacity:1;transform:translateX(-50%) translateY(0)}
.tg-voice-message.is-seek-preview .tg-voice-message__playhead{left:var(--voice-hover);opacity:.38}
.tg-voice-message__footer{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--au-text-3);font-size:9.5px;line-height:1.15}
.tg-msg.is-out .tg-voice-message__footer{color:rgba(255,255,255,.7)}
.tg-voice-message__clock{display:inline-flex;align-items:center;gap:3px;font-variant-numeric:tabular-nums}
.tg-voice-message__clock b{color:var(--voice-accent);font-weight:850}
.tg-msg.is-out .tg-voice-message__clock b{color:#fff}
.tg-voice-message__secure{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8.5px;font-weight:760;letter-spacing:.015em}

.tg-voice-recorder{
  --record-level:.14;flex:1;min-width:0;min-height:64px;display:grid;grid-template-columns:auto minmax(0,1fr) 44px;align-items:center;gap:11px;
  position:relative;isolation:isolate;overflow:hidden;padding:8px 9px 8px 12px;border:1px solid rgba(229,72,97,.2);border-radius:21px;
  background:linear-gradient(125deg,rgba(255,255,255,.98),rgba(255,244,248,.98) 58%,rgba(244,240,255,.98));
  box-shadow:0 14px 34px rgba(103,32,55,.12),inset 0 1px 0 rgba(255,255,255,.82);
}
.tg-voice-recorder::before{
  content:"";position:absolute;z-index:-1;inset:-55% -20%;pointer-events:none;
  background:radial-gradient(circle at 16% 50%,rgba(229,72,97,.16),transparent 27%),radial-gradient(circle at 82% 50%,rgba(109,93,252,.1),transparent 30%);
  animation:auroraRecorderFlow 3.4s ease-in-out infinite alternate;
}
.tg-voice-recorder__live{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:#da3654;font-size:8px;font-weight:950;letter-spacing:.09em}
.tg-voice-recorder__live>span{position:relative;width:18px;height:18px;display:grid;place-items:center;border-radius:50%;background:rgba(229,72,97,.11);transform:scale(var(--record-scale,1));transition:transform .08s linear}
.tg-voice-recorder__live>span::before,.tg-voice-recorder__live>span::after{content:"";position:absolute;inset:-4px;border-radius:50%;border:1px solid rgba(229,72,97,.34);animation:auroraRecorderRing 1.35s ease-out infinite}
.tg-voice-recorder__live>span::after{animation-delay:.55s}
.tg-voice-recorder__live>span i{width:8px;height:8px;border-radius:50%;background:#e54861;box-shadow:0 0 13px rgba(229,72,97,.55)}
.tg-voice-recorder__body{min-width:0;display:flex;flex-direction:column;gap:4px}
.tg-voice-recorder__top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.tg-voice-recorder__top strong{font-size:11.5px;color:var(--au-text);letter-spacing:-.01em}
.tg-voice-recorder__top time{padding:3px 7px;border-radius:999px;background:rgba(229,72,97,.09);color:#d93653;font-size:10px;font-weight:900;font-variant-numeric:tabular-nums}
.tg-voice-recorder__wave{height:23px;display:flex;align-items:center;gap:2px;overflow:hidden}
.tg-voice-recorder__wave i{
  flex:1 1 0;min-width:1.5px;max-width:4px;height:var(--voice-bar);border-radius:999px;transform-origin:center;
  background:linear-gradient(180deg,#f07189,#d83253 68%,#9a3ee8);box-shadow:0 0 6px rgba(222,56,87,.14);
  transition:height .075s linear;
}
.tg-voice-recorder__body>small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--au-text-3);font-size:8.8px}
.tg-voice-recorder__cancel{width:42px;height:42px;display:grid;place-items:center;border-radius:14px;background:rgba(229,72,97,.1);color:#d93653;transition:transform .15s ease,background .15s ease}
.tg-voice-recorder__cancel:hover{transform:scale(1.05);background:rgba(229,72,97,.17)}
.tg-send.is-recording{transform:scale(var(--record-scale,1));box-shadow:0 9px var(--record-glow,24px) rgba(229,72,97,.34)!important;transition:transform .08s linear,box-shadow .08s linear}

.theme-dark .tg-voice-message{
  --voice-muted:rgba(183,190,211,.24);--voice-surface:linear-gradient(135deg,rgba(40,41,54,.9),rgba(31,31,46,.82));
  border-color:rgba(139,123,255,.14);box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 9px 28px rgba(0,0,0,.16);
}
.theme-dark .tg-voice-message__title{color:#c8cad8}.theme-dark .tg-voice-message__footer{color:#9296aa}
.theme-dark .tg-voice-recorder{background:linear-gradient(125deg,rgba(35,36,48,.99),rgba(49,31,42,.99),rgba(39,31,58,.99));border-color:rgba(238,102,128,.22)}
.theme-dark .tg-voice-recorder__top strong{color:#fff}.theme-dark .tg-voice-recorder__body>small{color:#9a9caf}

@keyframes auroraVoiceShimmer{0%{transform:translateX(-48%) rotate(5deg)}100%{transform:translateX(48%) rotate(5deg)}}
@keyframes auroraVoiceHalo{0%{transform:scale(.82);opacity:.68}100%{transform:scale(1.38);opacity:0}}
@keyframes auroraVoiceOrbit{to{transform:rotate(360deg)}}
@keyframes auroraVoiceLiveDot{0%,100%{transform:scale(.82);opacity:.7}50%{transform:scale(1.18);opacity:1}}
@keyframes auroraVoiceCurrentBar{from{transform:scaleY(.74)}to{transform:scaleY(1.17)}}
@keyframes auroraRecorderFlow{from{transform:translateX(-2%) scale(1)}to{transform:translateX(2%) scale(1.06)}}
@keyframes auroraRecorderRing{0%{transform:scale(.65);opacity:.72}100%{transform:scale(1.38);opacity:0}}

@media(max-width:640px){
  .tg-bubble:has(.tg-voice-message){width:min(360px,86vw);min-width:276px}
  .tg-voice-message{grid-template-columns:48px minmax(0,1fr);gap:9px;padding:6px 7px 6px 5px;border-radius:18px}
  .tg-voice-message__play{width:47px;height:47px}
  .tg-voice-message__bars{gap:1.5px}.tg-voice-message__secure{max-width:120px}
  .tg-voice-recorder{grid-template-columns:auto minmax(0,1fr) 40px;gap:8px;padding-left:9px}
  .tg-voice-recorder__cancel{width:40px;height:40px}.tg-voice-recorder__body>small{display:none}
}
@media(max-width:390px){
  .tg-bubble:has(.tg-voice-message){width:min(330px,88vw);min-width:252px}
  .tg-voice-message{grid-template-columns:44px minmax(0,1fr);gap:8px}
  .tg-voice-message__play{width:43px;height:43px}.tg-voice-message__wave{height:31px}
  .tg-voice-message__secure{max-width:96px;font-size:8px}.tg-voice-message__title{font-size:10px}
}
.reduce-motion .tg-voice-message::before,.reduce-motion .tg-voice-message__pulse,.reduce-motion .tg-voice-message__orbit,.reduce-motion .tg-voice-message__title>i,.reduce-motion .tg-voice-message__bars i,.reduce-motion .tg-voice-recorder::before,.reduce-motion .tg-voice-recorder__live>span::before,.reduce-motion .tg-voice-recorder__live>span::after{animation:none!important}
@media(prefers-reduced-motion:reduce){
  .tg-voice-message::before,.tg-voice-message__pulse,.tg-voice-message__orbit,.tg-voice-message__title>i,.tg-voice-message__bars i,.tg-voice-recorder::before,.tg-voice-recorder__live>span::before,.tg-voice-recorder__live>span::after{animation:none!important}
}

/* Aurora build 5640 — compact textured voice messages */
.tg-bubble:has(.tg-voice-message){
  width:min(336px,68vw)!important;
  min-width:238px!important;
  padding:4px 5px!important;
}
.tg-voice-message{
  --voice-accent:#7367f7;
  --voice-accent-2:#35b9f2;
  --voice-muted:rgba(74,82,105,.24);
  grid-template-columns:40px minmax(0,1fr)!important;
  gap:8px!important;
  min-height:48px!important;
  padding:4px 6px 4px 4px!important;
  border-radius:15px!important;
  background-color:rgba(249,249,255,.88)!important;
  background-image:
    linear-gradient(135deg,rgba(255,255,255,.88),rgba(244,243,253,.72)),
    radial-gradient(circle at 1px 1px,rgba(83,74,150,.055) 1px,transparent 1.25px)!important;
  background-size:auto,10px 10px!important;
  border:1px solid rgba(100,88,190,.11)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.82),0 4px 13px rgba(35,31,71,.055)!important;
}
.tg-voice-message::after{
  width:90px!important;height:90px!important;right:-64px!important;top:-64px!important;
  background:radial-gradient(circle,rgba(109,93,252,.105),transparent 70%)!important;
}
.tg-voice-message::before{
  inset:-80% -45%!important;
  background:linear-gradient(112deg,transparent 37%,rgba(112,96,246,.085) 49%,rgba(48,184,242,.065) 55%,transparent 68%)!important;
}
.tg-voice-message.is-playing::before{animation-duration:4.2s!important}
.tg-msg.is-out .tg-voice-message{
  background-color:rgba(255,255,255,.09)!important;
  background-image:
    linear-gradient(135deg,rgba(255,255,255,.12),rgba(255,255,255,.035)),
    radial-gradient(circle at 1px 1px,rgba(255,255,255,.075) 1px,transparent 1.2px)!important;
  border-color:rgba(255,255,255,.14)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 4px 12px rgba(36,24,104,.1)!important;
}
.tg-voice-message__play{
  width:38px!important;height:38px!important;
  box-shadow:0 5px 13px rgba(93,76,224,.23),inset 0 1px 0 rgba(255,255,255,.34)!important;
}
.tg-voice-message__play .tg-icon{width:17px!important;height:17px!important;flex-basis:17px!important}
.tg-voice-message__pulse{inset:-3px!important}
.tg-voice-message__orbit{inset:-2px!important}
.tg-voice-message__content{gap:2px!important}
.tg-voice-message__main{display:grid;grid-template-columns:minmax(0,1fr) 29px;align-items:center;gap:6px;min-width:0}
.tg-voice-message__wave{height:25px!important;border-radius:7px!important}
.tg-voice-message__wave-grid{inset:2px 0!important}
.tg-voice-message__bars{gap:1.5px!important}
.tg-voice-message__bars i{min-width:1px!important;max-width:3px!important}
.tg-voice-message__playhead{height:23px!important}
.tg-voice-message__speed{
  width:29px!important;min-width:29px!important;height:20px!important;padding:0!important;
  font-size:8.5px!important;background:rgba(109,93,252,.1)!important;
}
.tg-msg.is-out .tg-voice-message__speed{background:rgba(255,255,255,.15)!important}
.tg-voice-message__footer{justify-content:flex-start!important;gap:5px!important;font-size:8.7px!important;line-height:1!important}
.tg-voice-message__state{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:.78;font-size:8.4px;font-weight:720}
.tg-voice-message__secure{margin-left:auto!important;flex:0 0 auto;font-size:9px!important;line-height:1}
.tg-voice-message__hover-time{top:-22px!important;padding:3px 5px!important}
.theme-dark .tg-voice-message{
  background-color:rgba(34,35,48,.9)!important;
  background-image:
    linear-gradient(135deg,rgba(42,43,58,.92),rgba(29,30,43,.84)),
    radial-gradient(circle at 1px 1px,rgba(203,198,255,.055) 1px,transparent 1.25px)!important;
  border-color:rgba(139,123,255,.13)!important;
}
@media(max-width:640px){
  .tg-bubble:has(.tg-voice-message){width:min(316px,82vw)!important;min-width:224px!important}
  .tg-voice-message{grid-template-columns:38px minmax(0,1fr)!important;gap:7px!important;padding:4px 5px 4px 4px!important}
  .tg-voice-message__play{width:36px!important;height:36px!important}
  .tg-voice-message__wave{height:23px!important}
}
@media(max-width:390px){
  .tg-bubble:has(.tg-voice-message){width:min(292px,84vw)!important;min-width:212px!important}
  .tg-voice-message__state{display:none}
}

/* Aurora build 5640 — account recovery phrase */
.tg-settings-row--recovery{align-items:center}
.tg-recovery-status{margin-left:auto;padding:5px 8px;border-radius:999px;background:rgba(114,120,140,.1);color:var(--au-text-3);font-size:9px;white-space:nowrap}
.tg-recovery-status.is-enabled{background:rgba(32,177,112,.12);color:#16945d}
.tg-recovery{display:flex;flex-direction:column;gap:14px;max-width:620px}
.tg-recovery__hero{display:flex;gap:13px;align-items:flex-start;padding:16px;border:1px solid rgba(109,93,252,.13);border-radius:18px;background:linear-gradient(135deg,rgba(109,93,252,.09),rgba(40,184,255,.05))}
.tg-recovery__hero>div{width:42px;height:42px;display:grid;place-items:center;flex:0 0 auto;border-radius:14px;background:linear-gradient(145deg,#8173ff,#5c4ae2);color:#fff;box-shadow:0 8px 20px rgba(91,72,220,.22)}
.tg-recovery__hero>div .tg-icon{width:21px;height:21px;flex-basis:21px}
.tg-recovery__hero>span{display:flex;flex-direction:column;gap:5px;min-width:0}
.tg-recovery__hero strong{font-size:15px}
.tg-recovery__hero p{margin:0;color:var(--au-text-3);font-size:11px;line-height:1.48}
.tg-recovery__hero.is-enabled{border-color:rgba(32,177,112,.18);background:linear-gradient(135deg,rgba(32,177,112,.1),rgba(40,184,255,.04))}
.tg-recovery__hero.is-enabled>div{background:linear-gradient(145deg,#31c887,#17945e);box-shadow:0 8px 20px rgba(24,151,95,.2)}
.tg-recovery__words{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.tg-recovery__words>div{display:flex;align-items:center;gap:8px;min-width:0;padding:10px;border:1px solid var(--au-border);border-radius:12px;background:color-mix(in srgb,var(--au-panel) 92%,var(--au-accent) 8%)}
.tg-recovery__words span{width:20px;height:20px;display:grid;place-items:center;flex:0 0 auto;border-radius:7px;background:rgba(109,93,252,.11);color:var(--au-accent);font-size:8.5px;font-weight:900}
.tg-recovery__words b{min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:10.5px;letter-spacing:.01em}
.tg-recovery__copy{display:flex;align-items:center;justify-content:center;gap:8px}
.tg-recovery__copy .tg-icon{width:16px;height:16px;flex-basis:16px}
.tg-recovery__ack{display:flex;align-items:flex-start;gap:10px;padding:12px;border-radius:14px;background:rgba(255,173,48,.08);color:var(--au-text-2);font-size:10px;line-height:1.45;cursor:pointer}
.tg-recovery__ack input{position:absolute;opacity:0;pointer-events:none}
.tg-recovery__ack i{width:19px;height:19px;flex:0 0 auto;border:1.5px solid rgba(109,93,252,.4);border-radius:6px;background:var(--au-panel);position:relative}
.tg-recovery__ack input:checked+i{background:var(--au-accent);border-color:var(--au-accent)}
.tg-recovery__ack input:checked+i::after{content:"";position:absolute;left:5px;top:2px;width:5px;height:9px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}
.tg-recovery__danger-note,.tg-recovery__warning{display:flex;gap:10px;padding:12px;border-radius:14px;background:rgba(229,72,97,.07)}
.tg-recovery__danger-note{flex-direction:column;gap:3px}
.tg-recovery__danger-note b,.tg-recovery__warning strong{font-size:10.5px}
.tg-recovery__danger-note span,.tg-recovery__warning small{color:var(--au-text-3);font-size:9.5px;line-height:1.45}
.tg-recovery__warning>span{display:flex;flex-direction:column;gap:3px}
.tg-recovery__warning>.tg-icon{width:18px;height:18px;flex-basis:18px;color:var(--au-accent)}
.tg-recovery__facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.tg-recovery__facts>div{display:flex;flex-direction:column;gap:5px;padding:11px;border:1px solid var(--au-border);border-radius:13px;background:var(--au-panel)}
.tg-recovery__facts span{color:var(--au-text-3);font-size:8.5px;text-transform:uppercase;letter-spacing:.06em}
.tg-recovery__facts b{font-size:10px;line-height:1.35}
.tg-recovery__check-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.tg-recovery__disable{align-self:center;padding:8px 12px}
.theme-dark .tg-recovery__words>div{background:rgba(139,123,255,.06)}
@media(max-width:640px){
  .tg-recovery__words{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tg-recovery__facts,.tg-recovery__check-grid{grid-template-columns:1fr}
}

/* Login recovery screen */
.tg-auth-card--recovery{max-width:470px!important}
.tg-auth-field--phrase textarea{width:100%;min-height:118px;resize:vertical;border:1px solid var(--au-border);border-radius:13px;background:var(--au-panel);color:var(--au-text);padding:12px;font:inherit;font-size:12px;line-height:1.55;outline:none}
.tg-auth-field--phrase textarea:focus{border-color:var(--au-accent);box-shadow:0 0 0 3px rgba(109,93,252,.1)}
.tg-auth-field--phrase small{display:block;margin-top:5px;color:var(--au-text-3);font-size:9px;text-align:right}
.tg-auth-recovery-link{width:100%;display:grid;grid-template-columns:36px minmax(0,1fr);column-gap:10px;align-items:center;margin-top:10px;padding:10px 12px;border:1px solid rgba(109,93,252,.14);border-radius:14px;background:rgba(109,93,252,.055);text-align:left;color:var(--au-text)}
.tg-auth-recovery-link>span{grid-row:1/3;width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:linear-gradient(145deg,#8173ff,#5c4ae2);color:#fff;font-size:11px;font-weight:900}
.tg-auth-recovery-link b{font-size:11px}.tg-auth-recovery-link small{color:var(--au-text-3);font-size:9px}
.tg-auth-recovery-note{margin-top:10px;padding:9px;border-radius:11px;background:rgba(114,120,140,.07);color:var(--au-text-3);font-size:9px;text-align:center}
.tg-auth-security-note{display:flex;flex-direction:column;gap:4px;margin-top:12px;padding:11px;border-radius:13px;background:rgba(255,173,48,.08);text-align:left}
.tg-auth-security-note b{font-size:10px}.tg-auth-security-note span{color:var(--au-text-3);font-size:9px;line-height:1.45}


/* Profile backgrounds, reliable settings scrolling and avatar initials. */
.tg-side-screen{
  width:100%;height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden;
}
.tg-settings-screen-v2>.tg-side-head{flex:0 0 auto}
.tg-settings-screen-v2>.tg-side-scroll{
  flex:1 1 auto;min-height:0;max-height:100%;overflow-x:hidden;overflow-y:auto;
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
}
.tg-avatar__initial{display:flex;align-items:center;justify-content:center;width:100%;height:100%;line-height:1}
.tg-avatar>img{position:absolute;inset:0;z-index:1}
.tg-profile-cover-theme{
  background:var(--profile-cover-background,linear-gradient(135deg,#147fe1 0%,#289fea 46%,#68cdf5 100%));
  background-position:center;background-size:cover;background-repeat:no-repeat;
}
.tg-profile-cover-theme.profile-bg-is-default{--profile-cover-background:linear-gradient(135deg,#147fe1 0%,#289fea 46%,#68cdf5 100%)}
.tg-profile-cover-theme.profile-bg-is-sky{--profile-cover-background:radial-gradient(circle at 78% 15%,rgba(255,255,255,.5),transparent 28%),linear-gradient(145deg,#5d8bf4,#71c5ee 58%,#d9f6ff)}
.tg-profile-cover-theme.profile-bg-is-sunset{--profile-cover-background:radial-gradient(circle at 22% 25%,rgba(255,238,185,.45),transparent 28%),linear-gradient(145deg,#6f4bd8,#ea7186 56%,#ffb25f)}
.tg-profile-cover-theme.profile-bg-is-mint{--profile-cover-background:radial-gradient(circle at 78% 20%,rgba(255,255,255,.42),transparent 24%),linear-gradient(145deg,#258d88,#59c7ad 54%,#b9f1d2)}
.tg-profile-cover-theme.profile-bg-is-cosmic{--profile-cover-background:radial-gradient(circle at 75% 22%,rgba(205,162,255,.35),transparent 25%),radial-gradient(circle at 18% 72%,rgba(63,211,255,.18),transparent 30%),linear-gradient(145deg,#17142f,#49317c 55%,#7a4fc4)}
.tg-profile-cover-theme.profile-bg-is-inferno{--profile-cover-background:radial-gradient(circle at 80% 20%,rgba(255,218,122,.42),transparent 24%),linear-gradient(145deg,#4c1826,#c33f3f 52%,#ff8a38)}
.tg-profile-cover-theme.profile-bg-is-prism{--profile-cover-background:linear-gradient(125deg,#6448e8 0%,#c85bd6 28%,#ff8b74 55%,#65d8c0 78%,#4e8ff3 100%)}
.tg-profile-cover-theme.has-profile-image{
  background-image:linear-gradient(180deg,rgba(10,12,25,.08),rgba(10,12,25,.42)),var(--profile-cover-image);
}
.tg-profile-background-picker{
  margin-top:12px;padding:13px;border:1px solid var(--au-line);border-radius:19px;background:var(--au-surface);box-shadow:0 5px 18px rgba(31,34,48,.035);
}
.tg-profile-background-picker>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.tg-profile-background-picker>header>div{min-width:0;display:flex;flex-direction:column;gap:2px}
.tg-profile-background-picker>header strong{font-size:13px}
.tg-profile-background-picker>header span{color:var(--au-text-3);font-size:10.5px}
.tg-profile-background-picker>header>b{min-width:24px;height:24px;display:grid;place-items:center;border-radius:999px;background:var(--au-accent-soft);color:var(--au-accent);font-size:10px}
.tg-profile-background-picker__rail{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(128px,42%);gap:8px;overflow-x:auto;padding-bottom:3px;scroll-snap-type:x proximity;scrollbar-width:thin}
.tg-profile-background-card{min-width:0;padding:7px;border:1px solid var(--au-line);border-radius:14px;background:var(--au-surface-2);text-align:left;scroll-snap-align:start;cursor:pointer;position:relative}
.tg-profile-background-card>span{display:block;height:64px;border-radius:10px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}
.tg-profile-background-card>strong,.tg-profile-background-card>small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-profile-background-card>strong{margin-top:7px;font-size:10.5px}
.tg-profile-background-card>small{margin-top:2px;color:var(--au-text-3);font-size:9px}
.tg-profile-background-card.is-active{border-color:rgba(109,93,252,.55);background:var(--au-accent-soft);box-shadow:0 0 0 2px rgba(109,93,252,.1)}
.tg-profile-background-card.is-active>small{color:var(--au-accent);font-weight:750}
.tg-profile-background-card--upload{border-style:dashed}
.tg-profile-background-card--upload input{position:absolute;inset:0;opacity:0;pointer-events:none}
.tg-profile-background-card__upload-preview{display:grid!important;place-items:center;color:var(--au-accent);background:linear-gradient(135deg,rgba(109,93,252,.11),rgba(72,196,255,.12));box-shadow:inset 0 0 0 1px rgba(109,93,252,.15)!important}
.tg-profile-background-card__upload-preview .tg-icon{width:20px;height:20px;flex-basis:20px}

.tg-timezone-setting{display:flex;flex-direction:column;gap:9px;padding:13px}
.tg-timezone-setting>span{display:flex;flex-direction:column;gap:3px}
.tg-timezone-setting strong{font-size:13px}
.tg-timezone-setting small{color:var(--au-text-3);font-size:10.5px;line-height:1.4}
.tg-timezone-setting select{width:100%;height:42px;padding:0 36px 0 12px;border:1px solid var(--au-line);border-radius:12px;background:var(--au-surface-2);color:var(--au-text);font:inherit;font-size:12px;outline:none;cursor:pointer}
.tg-timezone-setting select:focus{border-color:rgba(109,93,252,.55);box-shadow:0 0 0 3px rgba(109,93,252,.1)}

.tg-stories{display:flex;gap:10px;overflow-x:auto;padding:10px 12px 9px;border-bottom:1px solid var(--au-line);scrollbar-width:none}
.tg-stories::-webkit-scrollbar{display:none}
.tg-story-add,.tg-story-card{border:0;background:none;color:var(--au-text);display:flex;flex:0 0 54px;flex-direction:column;align-items:center;gap:4px;padding:0;cursor:pointer;font:inherit}
.tg-story-add small,.tg-story-card small{max-width:62px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;color:var(--au-text-2)}
.tg-story-add__avatar{position:relative;width:42px;height:42px;padding:2px;border:2px solid var(--au-accent);border-radius:50%}
.tg-story-add__avatar .tg-avatar{width:100%;height:100%}
.tg-story-add__avatar b{position:absolute;right:-4px;bottom:-4px;width:17px;height:17px;border-radius:50%;background:var(--au-accent);color:#fff;font-size:16px;line-height:16px}
.tg-story-card__ring{display:block;width:42px;height:42px;padding:2px;border:2px solid #7b67ff;border-radius:50%}
.tg-story-card__ring img,.tg-story-card__ring video{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover}
.tg-story-card__ring{position:relative}.tg-story-card__ring>b{position:absolute;right:-5px;bottom:-4px;width:17px;height:17px;border-radius:50%;background:var(--au-accent);color:#fff;font-size:16px;line-height:16px}
.tg-story-drop{display:flex;flex-direction:column;align-items:center;gap:8px;padding:28px 16px;border:1px dashed var(--au-line-strong);border-radius:16px;color:var(--au-text-2);cursor:pointer;text-align:center}
.tg-story-drop span{font-size:30px;color:var(--au-accent)}.tg-story-drop small{font-size:11px}.tg-story-drop input{max-width:100%;font-size:11px}
.tg-story-view{display:flex;flex-direction:column;align-items:center;gap:12px}.tg-story-view img,.tg-story-view video{display:block;max-width:min(78vw,420px);max-height:46vh;border-radius:14px;object-fit:contain;background:#eef3f7}.tg-story-view p{width:100%;margin:0;color:var(--au-text-2);font-size:13px;white-space:pre-wrap}.tg-story-like{border:0;border-radius:999px;padding:7px 18px;background:#f0f2f6;color:#596273;font:600 14px inherit;cursor:pointer}.tg-story-like.is-liked{background:#ffe8ed;color:#e84d68}.tg-check{display:flex;gap:9px;align-items:center;font-size:12px;color:var(--au-text-2)}.tg-check input{accent-color:var(--au-accent)}

/* Aurora 5664: stories / realtime UI / attachments refinements */
.tg-chat-list{padding:6px 6px 88px}
.tg-chat-row{min-height:64px;gap:9px;padding:7px 8px;border-radius:12px;contain:layout paint style}
.tg-chat-row>.tg-avatar:not(.tg-avatar--small):not(.tg-avatar--big):not(.tg-avatar--mini){width:44px;height:44px;min-width:44px;min-height:44px;max-width:44px;max-height:44px;aspect-ratio:1/1;flex:0 0 44px;border-radius:50%;font-size:16px}
.tg-chat-row__body{gap:1px}
.tg-chat-row__top,.tg-chat-row__bottom{gap:6px}
.tg-chat-row__title{font-size:13.5px}
.tg-chat-row__time{font-size:10.5px}
.tg-chat-row__meta{font-size:10.5px;line-height:14px}
.tg-chat-row__preview{font-size:12.2px;line-height:16px}
.tg-shell.compact-mode .tg-chat-row{min-height:56px;padding:5px 7px}
.tg-shell.compact-mode .tg-chat-row>.tg-avatar:not(.tg-avatar--small):not(.tg-avatar--big):not(.tg-avatar--mini){width:40px;height:40px;border-radius:12px}

.tg-story-card.is-unviewed .tg-story-card__ring{border-color:transparent;background:linear-gradient(var(--au-surface),var(--au-surface)) padding-box,linear-gradient(145deg,#7b67ff,#fb5d9b,#ffb54d) border-box}
.tg-story-card.is-viewed .tg-story-card__ring,.tg-story-card--own .tg-story-card__ring{border-color:rgba(120,128,142,.48);background:none}
.tg-story-card.is-viewed small{color:var(--au-text-3)}

.tg-file-drop-overlay{position:absolute;z-index:30;inset:66px 16px 82px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;border:2px dashed rgba(109,93,252,.55);border-radius:20px;background:rgba(246,247,252,.92);color:var(--au-accent);opacity:0;transform:scale(.985);pointer-events:none;transition:opacity .14s ease,transform .14s ease}
.tg-file-drop-overlay .tg-icon{width:34px;height:34px}
.tg-file-drop-overlay strong{font-size:15px}.tg-file-drop-overlay span{font-size:12px;color:var(--au-text-2)}
.tg-main.is-file-dragover .tg-file-drop-overlay{opacity:1;transform:scale(1)}
.tg-shell.theme-dark .tg-file-drop-overlay{background:rgba(25,27,34,.92)}

.tg-attach-preview__item.is-file{min-height:88px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;background:var(--au-surface-2)}
.tg-attach-preview__file-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:var(--au-accent-soft);color:var(--au-accent)}
.tg-attach-preview__file-icon .tg-icon{width:21px;height:21px}
.tg-attach-preview__item.is-file>small{max-width:92%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;color:var(--au-text-2)}

.tg-emoji-panel{width:min(420px,calc(100vw - 24px));max-height:min(510px,calc(100dvh - 126px));border-radius:14px;overflow:hidden;box-shadow:0 18px 46px rgba(26,40,55,.24)}
.tg-emoji-panel__modes{min-height:46px}.tg-emoji-panel__modes button{display:flex;align-items:center;justify-content:center;gap:6px;font-size:12px}
.tg-emoji-panel__search{padding:9px 10px}.tg-emoji-panel__search input{height:34px;border-radius:9px}
.tg-emoji-panel__grid{grid-template-columns:repeat(9,minmax(0,1fr));gap:3px;padding:5px 8px 11px}
.tg-emoji-panel__grid button{font-size:24px}
.tg-emoji-panel__sticker-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:10px}
.tg-emoji-panel__sticker-grid button{min-height:112px;padding:7px 4px;grid-template-rows:1fr auto;gap:4px;transition:transform .12s ease,background .12s ease}
.tg-emoji-panel__sticker-grid button:hover{transform:translateY(-1px)}
.tg-emoji-panel__sticker-grid img{width:82px;height:82px}.tg-emoji-panel__sticker-grid small{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--au-text-2);font-size:10px}
.tg-emoji-panel__gif-grid{gap:7px;padding:9px}.tg-emoji-panel__gif-card{border-radius:11px}.tg-emoji-panel__gif-preview{aspect-ratio:1.35}.tg-emoji-panel__gif-preview img{height:100%;object-fit:cover}
.tg-emoji-panel__hint{padding:6px 10px 9px;color:var(--au-text-3);font-size:10px;text-align:center}

.tg-lightbox__stage.is-file{width:min(1040px,94vw);height:min(780px,90vh);padding:56px 54px 40px}
.tg-lightbox__file{width:100%;height:100%;display:flex;flex-direction:column;overflow:hidden;border-radius:12px;background:#fff;box-shadow:0 28px 90px rgba(0,0,0,.34)}
.tg-lightbox__file-head{height:46px;flex:0 0 46px;display:flex;align-items:center;gap:9px;padding:0 14px;border-bottom:1px solid #e3e7ed;color:#263545}
.tg-lightbox__file-head .tg-icon{width:20px;height:20px}.tg-lightbox__file-head strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.tg-lightbox__file iframe{width:100%;height:100%;border:0;background:#f4f6f8}
.tg-lightbox__file-thumb{display:grid;place-items:center;width:100%;height:100%;color:#fff;background:rgba(255,255,255,.1)}
.tg-lightbox__file-thumb .tg-icon{width:26px;height:26px}

/* Story composer */
.tg-modal--wide:has(.tg-story-editor){width:min(920px,calc(100vw - 28px));max-height:min(860px,calc(100dvh - 28px));overflow:hidden}
.tg-story-editor{display:grid;grid-template-columns:minmax(0,1fr);gap:0;padding:0!important;overflow:auto}
.tg-story-editor__workspace{display:grid;grid-template-columns:minmax(290px,356px) minmax(250px,1fr);gap:22px;padding:18px 22px;background:var(--au-surface-2)}
.tg-story-editor__stage,.tg-story-editor__empty{position:relative;width:min(100%,356px);aspect-ratio:9/16;max-height:590px;justify-self:center;overflow:hidden;border-radius:18px;background:#0e1116;box-shadow:0 15px 42px rgba(24,28,39,.18)}
.tg-story-editor__empty{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;border:1px dashed var(--au-line-strong);color:var(--au-text-2);cursor:pointer;box-shadow:none}
.tg-story-editor__empty>span{display:grid;place-items:center;width:56px;height:56px;border-radius:18px;background:var(--au-accent-soft);color:var(--au-accent)}
.tg-story-editor__empty .tg-icon{width:28px;height:28px}.tg-story-editor__empty strong{font-size:14px;color:var(--au-text)}.tg-story-editor__empty small{font-size:11px}
.tg-story-editor__empty.is-dragover,.tg-story-editor__stage.is-dragover{outline:3px solid rgba(109,93,252,.55);outline-offset:-3px}
.tg-story-editor__stage>img,.tg-story-editor__stage>video{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:cover}
.tg-story-overlay{position:absolute;z-index:3;inset:0;width:100%;height:100%;overflow:visible;touch-action:none}
.tg-story-overlay-text.is-editable{cursor:grab}.tg-story-overlay-text.is-editable:active{cursor:grabbing}
.tg-story-editor__safe{position:absolute;z-index:4;pointer-events:none;inset:42px 12px 64px;border:1px dashed rgba(255,255,255,.22);border-radius:12px}.tg-story-editor__safe span{position:absolute;top:5px;right:7px;color:rgba(255,255,255,.5);font-size:8px;text-transform:uppercase;letter-spacing:.08em}
.tg-story-editor__replace{position:absolute;z-index:6;right:10px;top:10px;height:32px;display:flex;align-items:center;gap:5px;padding:0 9px;border-radius:10px;background:rgba(15,18,24,.55);color:#fff;backdrop-filter:blur(8px);font-size:10px}.tg-story-editor__replace .tg-icon{width:15px;height:15px}
.tg-story-editor__tools{display:flex;flex-direction:column;gap:14px;min-width:0;padding:6px 0}
.tg-story-editor__tool-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.tg-story-editor__tool-row button{min-height:62px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:4px;border:1px solid var(--au-line);border-radius:13px;background:var(--au-surface);color:var(--au-text-2);font-size:18px}.tg-story-editor__tool-row button span{font-size:10px}.tg-story-editor__tool-row button.is-active{border-color:rgba(109,93,252,.45);background:var(--au-accent-soft);color:var(--au-accent)}
.tg-story-editor__paint{display:grid;grid-template-columns:1fr 1.5fr;gap:10px}.tg-story-editor__paint label{display:flex;flex-direction:column;gap:7px;color:var(--au-text-2);font-size:10px}.tg-story-editor__paint input[type=color]{width:100%;height:36px;padding:3px;border:1px solid var(--au-line);border-radius:10px;background:var(--au-surface)}.tg-story-editor__paint input[type=range]{width:100%}
.tg-story-editor__text{display:flex;gap:7px}.tg-story-editor__text input{min-width:0;flex:1;height:38px;padding:0 11px;border:1px solid var(--au-line);border-radius:11px;background:var(--au-surface);color:var(--au-text);outline:none}.tg-story-editor__text input:focus{border-color:var(--au-accent)}.tg-story-editor__text button{padding:0 12px;border-radius:11px;background:var(--au-accent);color:#fff;font-size:11px;font-weight:700}
.tg-story-editor__tip{line-height:1.45;color:var(--au-text-3);font-size:10px}
.tg-story-editor__meta{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(220px,1fr);gap:12px 18px;padding:16px 22px 20px;background:var(--au-surface)}
.tg-story-editor__meta>.tg-field:first-child{grid-row:span 2}.tg-story-editor__audience{display:grid;grid-template-columns:1fr;gap:8px}.tg-story-editor__meta>.tg-check{align-self:center}.tg-story-editor__meta>.tg-primary{align-self:end}

/* Reference-style story viewer */
.tg-modal-backdrop:has(.tg-modal--story){padding:0;background:rgba(18,20,22,.89);backdrop-filter:none}
.tg-modal--story{position:relative;width:min(1280px,100vw);height:100dvh;max-height:none;padding:0;overflow:visible;border:0;border-radius:0;background:transparent;box-shadow:none}
.tg-story-shell{width:100%;height:100%;display:grid;grid-template-columns:minmax(120px,1fr) auto minmax(120px,1fr);align-items:center;gap:34px;padding:14px 26px 58px}
.tg-story-frame{position:relative;width:min(466px,calc((100dvh - 74px)*.5625),calc(100vw - 28px));aspect-ratio:9/16;max-height:calc(100dvh - 74px);overflow:visible;border-radius:10px;background:#101216;box-shadow:0 22px 76px rgba(0,0,0,.46)}
.tg-story-media{position:absolute;inset:0;overflow:hidden;border-radius:10px;background:#080a0d}
.tg-story-media:after{content:"";position:absolute;z-index:2;pointer-events:none;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.34) 0,transparent 17%,transparent 67%,rgba(0,0,0,.38) 100%)}
.tg-story-media>img,.tg-story-media>video{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:cover;background:#080a0d}
.tg-story-media .tg-story-overlay{z-index:2;pointer-events:none}
.tg-story-progress{position:absolute;z-index:8;top:8px;left:8px;right:8px;height:3px;overflow:hidden;border-radius:999px;background:rgba(255,255,255,.32)}
.tg-story-progress i{display:block;height:100%;border-radius:inherit;background:#fff;transition:width .08s linear}
.tg-story-top{position:absolute;z-index:8;top:17px;left:10px;right:9px;height:42px;display:flex;align-items:center;gap:8px;color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.7)}
.tg-story-top>.tg-avatar{width:30px;height:30px;border-radius:50%;font-size:11px}.tg-story-top>span{min-width:0;display:flex;flex:1;flex-direction:column;line-height:1.16}.tg-story-top strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:730}.tg-story-top small{margin-top:2px;color:rgba(255,255,255,.72);font-size:9px}
.tg-story-top__actions{display:flex;align-items:center;gap:2px}.tg-story-top__actions button{width:28px;height:28px;display:grid;place-items:center;border-radius:50%;color:#fff;background:transparent;text-shadow:0 1px 4px rgba(0,0,0,.75);font-size:13px}.tg-story-top__actions button:hover{background:rgba(0,0,0,.26)}.tg-story-top__actions .tg-icon{width:16px;height:16px}
.tg-story-hit{position:absolute;z-index:6;top:64px;bottom:64px;width:32%;background:transparent}.tg-story-hit--prev{left:0}.tg-story-hit--next{right:0}
.tg-story-caption{position:absolute;z-index:7;left:17px;right:17px;bottom:17px;margin:0;color:#fff;font-size:12px;line-height:1.38;text-shadow:0 1px 4px rgba(0,0,0,.8);white-space:pre-wrap}
.tg-story-bottom{position:absolute;z-index:12;top:calc(100% + 13px);left:0;right:0;display:flex;align-items:center;gap:8px;height:42px;color:#fff}
.tg-story-reply{order:-1;min-width:0;flex:1;height:38px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 13px;border:1px solid rgba(255,255,255,.14);border-radius:999px;background:#27384b;color:#9db0c3;box-shadow:0 8px 24px rgba(0,0,0,.14);font-size:11px}.tg-story-reply span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tg-story-reply b{flex:0 0 auto;color:#b6c5d3;font-size:16px;font-weight:400;letter-spacing:.06em}
.tg-story-like{height:38px;min-width:38px;padding:0 10px;border:0;border-radius:999px;background:rgba(255,255,255,.09);color:#d8e0e8;font-size:14px}.tg-story-like.is-liked{background:rgba(255,80,113,.18);color:#ff6682}.tg-story-like span{font-size:10px}
.tg-story-view-count,.tg-story-delete{height:34px;display:flex;align-items:center;padding:0 9px;border-radius:999px;background:rgba(255,255,255,.08);color:#d9e1e8;font-size:9px}.tg-story-delete{border:0;cursor:pointer}
.tg-story-side{min-width:0;display:flex;align-items:center}.tg-story-side--left{justify-content:flex-end}.tg-story-side--right{justify-content:flex-start}
.tg-story-peek{width:min(205px,100%);aspect-ratio:9/16;display:flex;position:relative;overflow:hidden;border-radius:9px;background:#111;border:0;opacity:.52;filter:saturate(.8) brightness(.72);box-shadow:0 13px 44px rgba(0,0,0,.2);transition:opacity .15s ease,transform .15s ease,filter .15s ease}.tg-story-peek:hover{opacity:.78;filter:saturate(.95) brightness(.88);transform:scale(1.015)}.tg-story-peek>span{position:absolute;inset:0}.tg-story-peek img,.tg-story-peek video{width:100%;height:100%;display:block;object-fit:cover}.tg-story-peek small{display:none}.tg-story-peek.is-empty{visibility:hidden}

@media(max-width:900px){
  .tg-story-editor__workspace{grid-template-columns:minmax(260px,330px) minmax(220px,1fr);gap:14px;padding:14px}
  .tg-story-shell{grid-template-columns:minmax(72px,1fr) auto minmax(72px,1fr);gap:18px;padding-left:12px;padding-right:12px}
  .tg-story-peek{width:min(135px,100%)}
}
@media(max-width:680px){
  .tg-chat-row{min-height:62px}
  .tg-emoji-panel__grid{grid-template-columns:repeat(8,minmax(0,1fr))}
  .tg-modal--wide:has(.tg-story-editor){width:100vw;height:100dvh;max-height:none;border-radius:0}
  .tg-story-editor__workspace{display:flex;flex-direction:column;padding:10px}
  .tg-story-editor__stage,.tg-story-editor__empty{width:min(78vw,320px);max-height:none}
  .tg-story-editor__tools{width:min(100%,420px);margin:auto}.tg-story-editor__tool-row{grid-template-columns:repeat(4,minmax(0,1fr))}.tg-story-editor__tool-row button{min-height:54px}
  .tg-story-editor__meta{grid-template-columns:1fr;padding:14px}.tg-story-editor__meta>.tg-field:first-child{grid-row:auto}
  .tg-story-shell{display:flex;align-items:center;justify-content:center;padding:8px 8px 58px}.tg-story-side{display:none}.tg-story-frame{width:min(calc(100vw - 16px),calc((100dvh - 68px)*.5625));max-height:calc(100dvh - 68px)}
  .tg-lightbox__stage.is-file{width:100vw;height:100dvh;padding:56px 8px 10px}.tg-lightbox__file{border-radius:8px}
}
.tg-attach-item.is-file{min-height:88px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;background:var(--au-surface-2)}
.tg-attach-item__file{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;width:52px;height:52px;border-radius:14px;background:var(--au-accent-soft);color:var(--au-accent)}
.tg-attach-item__file .tg-icon{width:22px;height:22px}.tg-attach-item__file b{font-size:8px;letter-spacing:.05em}

/* Aurora 5675: story fidelity, editor polish and picker/performance fixes */
.tg-chat-row>.tg-avatar:not(.tg-avatar--small):not(.tg-avatar--big):not(.tg-avatar--mini),
.tg-shell.compact-mode .tg-chat-row>.tg-avatar:not(.tg-avatar--small):not(.tg-avatar--big):not(.tg-avatar--mini){border-radius:50%!important}
.tg-chat-row>.tg-avatar>img{border-radius:inherit}

/* Keep picker headers/recent items above the independently scrolling content. */
.tg-emoji-panel{height:min(510px,calc(100dvh - 126px));max-height:min(510px,calc(100dvh - 126px));contain:layout paint}
.tg-emoji-panel__modes,.tg-emoji-panel__search,.tg-emoji-panel__recent,.tg-emoji-panel__category-row,.tg-emoji-panel__title,.tg-emoji-panel__hint{flex:0 0 auto;position:relative;z-index:2}
.tg-emoji-panel__recent{background:var(--au-surface);box-shadow:0 1px 0 var(--au-line)}
.tg-emoji-panel__recent>div{min-height:31px;max-width:100%}
.tg-emoji-panel__grid,.tg-emoji-panel__sticker-grid,.tg-emoji-panel__gif-grid,.tg-emoji-panel__empty--large{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.tg-emoji-panel__sticker-grid,.tg-emoji-panel__gif-grid{align-content:start}
.tg-emoji-panel__hint{margin-top:auto;background:var(--au-surface);border-top:1px solid var(--au-line)}

/* Story viewer sized and spaced to the desktop reference. */
.tg-modal-backdrop:has(.tg-modal--story){background:rgba(18,20,22,.90)}
.tg-modal--story{width:100vw;max-width:none;height:100dvh}
.tg-story-shell{grid-template-columns:minmax(180px,1fr) auto minmax(180px,1fr);gap:34px;padding:8px 26px 58px}
.tg-story-frame{width:min(466px,calc((100dvh - 83px)*.5625),calc(100vw - 40px));max-height:calc(100dvh - 83px);border-radius:9px;box-shadow:0 22px 68px rgba(0,0,0,.48)}
.tg-story-media{border-radius:9px}
.tg-story-media>img,.tg-story-media>video,.tg-story-peek img,.tg-story-peek video,.tg-story-editor__stage>[data-story-base-media]{transform-origin:50% 50%;will-change:transform,filter;backface-visibility:hidden}
.tg-story-progress{top:7px;left:8px;right:8px;height:2px;background:rgba(255,255,255,.34)}
.tg-story-progress i{transition:none}
.tg-story-top{top:14px;left:10px;right:10px;height:42px;gap:8px}
.tg-story-top>.tg-avatar{width:26px;height:26px;font-size:10px}
.tg-story-top strong{font-size:11px;font-weight:760}.tg-story-top small{font-size:9px;margin-top:1px}
.tg-story-top__actions{gap:1px}.tg-story-top__actions button{width:27px;height:27px;font-size:12px}.tg-story-top__actions .tg-icon{width:15px;height:15px}
.tg-story-caption{left:17px;right:17px;bottom:14px;font-size:12px}
.tg-story-arrow{position:absolute;z-index:18;top:50%;width:24px;height:24px;display:grid;place-items:center;margin-top:-12px;border:0;border-radius:50%;background:rgba(194,198,201,.58);color:#42474c;box-shadow:0 2px 8px rgba(0,0,0,.18);cursor:pointer;transition:background .12s ease,transform .12s ease}
.tg-story-arrow:hover{background:rgba(221,224,226,.82);transform:scale(1.06)}
.tg-story-arrow .tg-icon{width:14px;height:14px;flex-basis:14px;stroke-width:2.2}
.tg-story-arrow--prev{left:-39px}.tg-story-arrow--next{right:-39px}
.tg-story-bottom{top:calc(100% + 14px);height:40px;display:block}
.tg-story-replybar{width:100%;height:38px;display:flex;align-items:center;gap:2px;padding:0 7px;border-radius:999px;background:#2b3d50;box-shadow:0 7px 22px rgba(0,0,0,.16);color:#9eb0c0}
.tg-story-replybar button{height:32px;display:grid;place-items:center;border:0;background:transparent;color:#aab8c5;cursor:pointer}
.tg-story-replybar__clip{width:28px;flex:0 0 28px}.tg-story-replybar__clip .tg-icon{width:17px;height:17px}
.tg-story-replybar__text{min-width:0;flex:1!important;justify-content:flex-start!important;padding:0 3px!important;font:inherit!important;font-size:11px!important;text-align:left!important}.tg-story-replybar__text span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-story-reaction,.tg-story-replybar__emoji,.tg-story-replybar__sticker{position:relative;width:32px;flex:0 0 32px;font-size:17px!important}
.tg-story-reaction.is-liked{color:#ff6c87}.tg-story-reaction [data-story-like-count]{position:absolute;right:-1px;top:1px;min-width:10px;height:10px;padding:0 2px;display:grid;place-items:center;border-radius:999px;background:#ff6682;color:#fff;font-size:6px;line-height:10px}
.tg-story-owner-tools{position:absolute;left:50%;top:47px;display:flex;align-items:center;gap:6px;transform:translateX(-50%)}
.tg-story-view-count,.tg-story-delete{height:24px;padding:0 8px;background:rgba(255,255,255,.10);font-size:8px;white-space:nowrap}
.tg-story-side{transform:translateY(30px)}
.tg-story-peek{width:min(212px,100%);border-radius:8px;opacity:.58;filter:saturate(.76) brightness(.70);isolation:isolate}
.tg-story-peek>span{position:absolute}.tg-story-peek__media{inset:0}.tg-story-peek__shade{inset:0;background:linear-gradient(180deg,rgba(0,0,0,.05),rgba(0,0,0,.34));z-index:2}
.tg-story-peek__meta{z-index:3;left:12px;right:12px;top:50%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;transform:translateY(-8%);color:#fff;text-shadow:0 1px 4px rgba(0,0,0,.8)}
.tg-story-peek__meta>.tg-avatar{width:48px;height:48px;border:2px solid rgba(255,255,255,.82);font-size:15px;box-shadow:0 3px 12px rgba(0,0,0,.22)}
.tg-story-peek__meta strong{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:700}
.tg-story-peek small{display:none}

/* Non-destructive story photo editor. */
.tg-modal--wide:has(.tg-story-editor){width:min(980px,calc(100vw - 28px));max-height:min(900px,calc(100dvh - 28px))}
.tg-story-editor{overflow:hidden}
.tg-story-editor__workspace{grid-template-columns:minmax(300px,372px) minmax(300px,1fr);gap:24px;padding:18px 24px;overflow:auto}
.tg-story-editor__stage,.tg-story-editor__empty{width:min(100%,372px);max-height:620px;border-radius:20px;background:#080a0e;box-shadow:0 18px 50px rgba(24,28,39,.22)}
.tg-story-editor__stage{cursor:default;contain:paint}.tg-story-editor__stage.is-tool-media .tg-story-overlay{cursor:grab}.tg-story-editor__stage.is-tool-media .tg-story-overlay:active{cursor:grabbing}.tg-story-editor__stage.is-tool-draw .tg-story-overlay{cursor:crosshair}
.tg-story-overlay-text.is-editable{cursor:move}.tg-story-overlay-text.is-selected{stroke:rgba(16,18,24,.70);filter:drop-shadow(0 0 4px rgba(255,255,255,.35))}
.tg-story-editor__safe{inset:46px 13px 68px;border-color:rgba(255,255,255,.18)}
.tg-story-editor__replace{top:11px;right:11px;height:34px;border:1px solid rgba(255,255,255,.14);background:rgba(12,15,20,.52)}
.tg-story-editor__tools{gap:11px;padding:2px 0}
.tg-story-editor__tool-row{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.tg-story-editor__tool-row button{min-height:62px;padding:6px;border-radius:13px;gap:5px;font-size:17px}.tg-story-editor__tool-row button>b{font-size:18px;line-height:1}.tg-story-editor__tool-row button span{font-size:9px;font-weight:700}
.tg-story-editor__history{display:grid;grid-template-columns:1fr 1fr;gap:7px}.tg-story-editor__history button{height:34px;border:1px solid var(--au-line);border-radius:10px;background:var(--au-surface);color:var(--au-text-2);font-size:10px;font-weight:700}.tg-story-editor__history button:hover:not(:disabled){background:var(--au-surface-2)}.tg-story-editor__history button:disabled{opacity:.42;cursor:default}
.tg-story-editor__panel{display:flex;flex-direction:column;gap:12px;padding:13px;border:1px solid var(--au-line);border-radius:16px;background:var(--au-surface);box-shadow:0 7px 22px rgba(25,30,45,.035)}
.tg-story-editor__panel-title{display:flex;flex-direction:column;gap:2px}.tg-story-editor__panel-title strong{font-size:12px}.tg-story-editor__panel-title span{color:var(--au-text-3);font-size:9px}
.tg-story-editor__range{display:flex;flex-direction:column;gap:7px}.tg-story-editor__range>span{display:flex;align-items:center;justify-content:space-between;color:var(--au-text-2);font-size:10px}.tg-story-editor__range>span b{color:var(--au-text);font-size:9px}.tg-story-editor__range input[type=range]{width:100%;accent-color:var(--au-accent)}
.tg-story-editor__quick{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.tg-story-editor__quick button{min-width:0;min-height:48px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;border:1px solid var(--au-line);border-radius:10px;background:var(--au-surface-2);color:var(--au-text-2);font-size:15px}.tg-story-editor__quick button span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8px}.tg-story-editor__quick button.is-active{border-color:rgba(109,93,252,.45);background:var(--au-accent-soft);color:var(--au-accent)}
.tg-story-editor__presets{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}.tg-story-editor__presets button{min-width:0;padding:4px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--au-text-2)}.tg-story-editor__presets button i{display:block;width:100%;aspect-ratio:1;border-radius:7px;background:linear-gradient(135deg,#6048d9,#f08c96)}.tg-story-editor__presets button span{display:block;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:7px}.tg-story-editor__presets button.is-active{border-color:rgba(109,93,252,.45);background:var(--au-accent-soft)}
.tg-story-editor__presets .is-vivid{filter:saturate(1.5) contrast(1.1)}.tg-story-editor__presets .is-soft{filter:saturate(.8) contrast(.85) brightness(1.08)}.tg-story-editor__presets .is-cinema{filter:saturate(.8) contrast(1.25) brightness(.94)}.tg-story-editor__presets .is-mono{filter:grayscale(1) contrast(1.15)}.tg-story-editor__presets .is-fade{filter:saturate(.7) contrast(.8) brightness(1.08)}
.tg-story-editor__text{display:flex;gap:7px}.tg-story-editor__text input{height:40px}.tg-story-editor__text button{min-width:78px}
.tg-story-editor__text-style{display:grid;grid-template-columns:78px minmax(0,1fr);gap:10px;align-items:end}.tg-story-editor__text-style>label:first-child{display:flex;flex-direction:column;gap:7px;color:var(--au-text-2);font-size:10px}.tg-story-editor__text-style input[type=color]{width:100%;height:35px;padding:3px;border:1px solid var(--au-line);border-radius:9px;background:var(--au-surface-2)}
.tg-story-editor__clear-drawing{height:36px;border:1px solid rgba(219,76,92,.18);border-radius:10px;background:rgba(219,76,92,.07);color:#c34d5d;font-size:10px;font-weight:700}
.tg-story-editor__tip{padding:0 2px;font-size:9px;line-height:1.45}

@media(max-width:900px){
  .tg-story-shell{grid-template-columns:minmax(90px,1fr) auto minmax(90px,1fr);gap:20px;padding-left:14px;padding-right:14px}.tg-story-peek{width:min(145px,100%)}
  .tg-story-arrow--prev{left:-32px}.tg-story-arrow--next{right:-32px}
  .tg-story-editor__workspace{grid-template-columns:minmax(270px,340px) minmax(250px,1fr);gap:14px;padding:14px}.tg-story-editor__presets{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:680px){
  .tg-emoji-panel{height:min(455px,calc(100dvh - 116px))}
  .tg-story-shell{padding:8px 8px 58px}.tg-story-side{transform:none}.tg-story-frame{width:min(calc(100vw - 16px),calc((100dvh - 68px)*.5625));max-height:calc(100dvh - 68px)}.tg-story-arrow,.tg-story-side{display:none}
  .tg-story-editor__workspace{display:flex;flex-direction:column}.tg-story-editor__stage,.tg-story-editor__empty{width:min(82vw,330px)}.tg-story-editor__tool-row{grid-template-columns:repeat(4,minmax(0,1fr))}
}
.tg-story-editor__quick--text{grid-template-columns:repeat(3,minmax(0,1fr))}
.tg-story-editor__quick button.is-danger{color:#c34d5d;background:rgba(219,76,92,.07);border-color:rgba(219,76,92,.18)}
.tg-story-editor__quick button:disabled{opacity:.38;cursor:default;transform:none}
/* Keep neighbouring stories at the same outward offset as the desktop reference. */
.tg-story-side--left,.tg-story-side--right{justify-content:center}
.tg-story-side--left{transform:translate(-64px,30px)}
.tg-story-side--right{transform:translate(64px,30px)}
@media(max-width:1200px){.tg-story-side--left{transform:translate(-24px,30px)}.tg-story-side--right{transform:translate(24px,30px)}}
@media(max-width:900px){.tg-story-side--left,.tg-story-side--right{transform:translateY(30px)}}
@media(max-width:680px){.tg-story-side--left,.tg-story-side--right{transform:none}}

/* Aurora 5676: grouped stories, inline replies, MP4/editor interaction fixes */
.tg-story-card__ring{position:relative}
.tg-story-card__count{position:absolute;z-index:4;top:-5px;right:-5px;min-width:17px;height:17px;padding:0 4px;display:grid;place-items:center;border:2px solid var(--au-surface);border-radius:999px;background:var(--au-accent);color:#fff;font-size:8px;font-style:normal;font-weight:800;line-height:1}

.tg-story-progress{display:flex!important;gap:3px!important;overflow:visible!important;background:transparent!important;border-radius:0!important}
.tg-story-progress>span{position:relative;display:block;flex:1 1 0;height:100%;overflow:hidden;border-radius:999px;background:rgba(255,255,255,.34)}
.tg-story-progress>span>i{display:block;width:0;height:100%;border-radius:inherit;background:#fff;transition:none!important}

.tg-story-bottom{display:flex!important;align-items:center!important;gap:7px!important}
.tg-story-replybar{min-width:0;flex:1 1 auto;width:auto!important;height:38px;padding:0 7px!important}
.tg-story-replybar__clip{display:grid;place-items:center;width:28px;flex:0 0 28px;color:#aab8c5}
.tg-story-replybar__clip .tg-icon{width:17px;height:17px}
.tg-story-replybar input{min-width:0;flex:1;height:34px;padding:0 4px;border:0;outline:0;background:transparent;color:#eef4f9;font:inherit;font-size:11px;line-height:34px}
.tg-story-replybar input::placeholder{color:#9eb0c0;opacity:1}
.tg-story-replybar__send{width:30px!important;flex:0 0 30px!important;border-radius:50%!important;color:#dce7f0!important}
.tg-story-replybar__send:hover{background:rgba(255,255,255,.08)!important}
.tg-story-replybar__send .tg-icon{width:16px;height:16px}
.tg-story-reaction{position:relative;flex:0 0 38px!important;width:38px!important;height:38px!important;padding:0!important;display:grid!important;place-items:center;border:0;border-radius:50%!important;background:#2b3d50!important;color:#dbe4ec;font-size:18px!important;box-shadow:0 7px 22px rgba(0,0,0,.16)}
.tg-story-reaction.is-liked{background:#2b3d50!important;color:#ff6c87!important}

/* Tool tab changes re-render the editor; suppress modal/sheet entry animation on those renders. */
.tg-modal-backdrop:has(.tg-story-editor),.tg-modal:has(.tg-story-editor),.tg-story-editor,.tg-story-editor__workspace,.tg-story-editor__tools,.tg-story-editor__panel{animation:none!important;transition:none!important}

/* Aurora 5677: stable story video playback, rigid story avatars and motion cleanup */
.tg-modal-backdrop:has(.tg-modal--story),
.tg-modal--story,
.tg-modal--story .tg-story-shell,
.tg-modal--story .tg-story-frame,
.tg-modal--story .tg-story-media,
.tg-modal--story .tg-story-side,
.tg-modal--story .tg-story-peek,
.tg-modal--story .tg-story-arrow{
  animation:none!important;
  transition:none!important;
}
.tg-modal--story .tg-avatar{
  aspect-ratio:1/1;
  overflow:hidden;
  border-radius:50%!important;
}
.tg-modal--story .tg-avatar>img{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-width:100%!important;
  min-height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
  border-radius:50%!important;
}
.tg-story-top>.tg-avatar{
  width:28px!important;
  height:28px!important;
  min-width:28px!important;
  min-height:28px!important;
  max-width:28px!important;
  max-height:28px!important;
  flex:0 0 28px!important;
}
.tg-story-peek__meta>.tg-avatar{
  min-width:48px!important;
  min-height:48px!important;
  max-width:48px!important;
  max-height:48px!important;
  flex:0 0 48px!important;
}
/* Avoid forcing a GPU filter/compositing layer for plain video; this can render
   hardware-decoded MP4 as black on some Chromium/WebView configurations. */
.tg-story-media>video,
.tg-story-peek video,
.tg-story-editor__stage>video[data-story-base-media]{
  will-change:auto!important;
  backface-visibility:visible!important;
}
.tg-story-video-error{
  position:absolute;
  z-index:5;
  inset:0;
  display:grid;
  place-items:center;
  padding:24px;
  background:#111820;
  color:rgba(255,255,255,.78);
  text-align:center;
  font-size:12px;
}
.tg-story-video-error[hidden]{display:none!important}

/* Aurora 5678: persistent-session UI, story profiles/engagement and safer delete menu. */
.tg-story-author{
  min-width:0;
  flex:1 1 auto;
  display:flex;
  align-items:center;
  gap:8px;
  padding:2px 4px 2px 0;
  border:0;
  border-radius:12px;
  background:transparent;
  color:inherit;
  text-align:left;
  cursor:pointer;
}
.tg-story-author:hover{background:rgba(0,0,0,.18)}
.tg-story-author>.tg-avatar{
  position:relative;
  width:28px!important;
  height:28px!important;
  min-width:28px!important;
  min-height:28px!important;
  max-width:28px!important;
  max-height:28px!important;
  flex:0 0 28px!important;
  aspect-ratio:1/1;
  overflow:hidden;
  border-radius:50%!important;
}
.tg-story-author>.tg-avatar>img{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
  border-radius:50%!important;
}
.tg-story-author>span{min-width:0;display:flex;flex-direction:column;line-height:1.16}
.tg-story-author strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-story-sound{border:1px solid transparent!important}
.tg-story-sound .tg-icon{width:17px!important;height:17px!important;stroke-width:2!important}
.tg-story-sound.is-muted{background:rgba(0,0,0,.26)!important;border-color:rgba(255,255,255,.08)!important}
.tg-story-sound:hover{background:rgba(0,0,0,.38)!important}

.tg-story-reaction .tg-icon{width:20px;height:20px;stroke-width:1.9}
.tg-story-reaction.is-liked .tg-icon svg{fill:currentColor}
.tg-story-owner-tools{gap:7px}
.tg-story-stat,.tg-story-delete{
  height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  padding:0 9px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:999px;
  background:rgba(31,42,53,.74);
  color:#e8eef4;
  font-size:9px;
  line-height:1;
  white-space:nowrap;
  backdrop-filter:blur(8px);
}
button.tg-story-stat{cursor:pointer}
button.tg-story-stat:hover,.tg-story-delete:hover{background:rgba(54,70,85,.88)}
.tg-story-stat .tg-icon{width:13px;height:13px;flex-basis:13px}
.tg-story-stat--likes{color:#ff8297}
.tg-story-stat--likes .tg-icon svg{fill:currentColor}

.tg-story-engagement{
  position:absolute;
  z-index:30;
  left:10px;
  right:10px;
  bottom:10px;
  max-height:min(58%,430px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  background:rgba(18,27,36,.96);
  color:#eef4f9;
  box-shadow:0 18px 50px rgba(0,0,0,.46);
  backdrop-filter:blur(18px);
}
.tg-story-engagement>header{display:flex;align-items:center;gap:10px;padding:12px 12px 10px;border-bottom:1px solid rgba(255,255,255,.08)}
.tg-story-engagement>header>div{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.tg-story-engagement>header strong{font-size:12px}
.tg-story-engagement>header span{color:#93a7b9;font-size:9px}
.tg-story-engagement>header button{width:30px;height:30px;display:grid;place-items:center;border:0;border-radius:50%;background:rgba(255,255,255,.07);color:#dfe8ef}
.tg-story-engagement>header .tg-icon{width:15px;height:15px}
.tg-story-engagement__section{min-height:0;overflow-y:auto;padding:9px}
.tg-story-engagement__section+ .tg-story-engagement__section{border-top:1px solid rgba(255,255,255,.07)}
.tg-story-engagement__section h4{margin:2px 5px 7px;color:#93a7b9;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.tg-story-engagement__person{width:100%;display:flex;align-items:center;gap:9px;padding:7px;border:0;border-radius:11px;background:transparent;color:#eef4f9;text-align:left}
.tg-story-engagement__person:hover{background:rgba(255,255,255,.06)}
.tg-story-engagement__person>.tg-avatar{position:relative;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;max-width:34px!important;max-height:34px!important;flex:0 0 34px!important;overflow:hidden;border-radius:50%!important}
.tg-story-engagement__person>.tg-avatar>img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:cover!important;border-radius:50%!important}
.tg-story-engagement__person>span{min-width:0;flex:1;display:flex;flex-direction:column;gap:2px}
.tg-story-engagement__person strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}
.tg-story-engagement__person small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8fa3b5;font-size:8px}
.tg-story-engagement__person>b{display:grid;place-items:center;color:#ff708a}
.tg-story-engagement__person>b .tg-icon{width:14px;height:14px}.tg-story-engagement__person>b svg{fill:currentColor}
.tg-story-engagement__empty{padding:20px 8px;text-align:center;color:#8fa3b5;font-size:10px}

.tg-delete-message-menu{gap:8px!important;padding:14px!important}
.tg-delete-message-menu__preview{display:flex;align-items:center;gap:11px;padding:12px;margin-bottom:3px;border-radius:14px;background:var(--au-surface-2);color:var(--au-text)}
.tg-delete-message-menu__preview>.tg-icon{width:22px;height:22px;color:var(--au-danger)}
.tg-delete-message-menu__preview>span{min-width:0;display:flex;flex-direction:column;gap:3px}
.tg-delete-message-menu__preview strong{max-width:360px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.tg-delete-message-menu__preview small{color:var(--au-text-3);font-size:10px}
.tg-delete-choice{width:100%;min-height:54px;display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--au-line);border-radius:14px;background:var(--au-surface);color:var(--au-text);text-align:left}
.tg-delete-choice:hover{background:var(--au-surface-2)}
.tg-delete-choice>.tg-icon{width:20px;height:20px;flex:0 0 20px}
.tg-delete-choice>span{display:flex;flex-direction:column;gap:2px}.tg-delete-choice strong{font-size:12px}.tg-delete-choice small{color:var(--au-text-3);font-size:10px}
.tg-delete-choice.is-danger{border-color:rgba(219,76,92,.22);background:rgba(219,76,92,.07);color:var(--au-danger)}
.tg-delete-choice.is-danger:hover{background:rgba(219,76,92,.12)}
.tg-delete-choice.is-cancel{min-height:42px;justify-content:center;border:0;background:transparent;color:var(--au-text-2);text-align:center}

@media(max-width:680px){
  .tg-story-engagement{left:7px;right:7px;bottom:7px;max-height:62%}
  .tg-story-author{max-width:calc(100% - 68px)}
}


/* Aurora 5679: uninterrupted E2EE session and explicit story engagement controls. */
.tg-story-bottom.is-owner{display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important}
.tg-story-bottom.is-owner .tg-story-owner-tools{position:static!important;left:auto!important;top:auto!important;transform:none!important;margin:0 auto!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important}
.tg-story-stat em{font:inherit;font-style:normal;color:inherit;opacity:.82}
.tg-story-stat--views{cursor:pointer!important}
.tg-story-stat--views .tg-icon{color:#cbd7e1}
.tg-story-stat--views:hover{border-color:rgba(255,255,255,.16);background:rgba(61,78,94,.94)}
.tg-story-reaction{cursor:pointer!important}
.tg-story-reaction:active{transform:none!important}
.tg-story-reaction[aria-pressed="true"]{color:#ff6c87!important}

/* Aurora 5681: real read receipts, edit menu, story rings, and timezone polish. */
.tg-avatar.has-active-story{
  outline:2px solid #7b67ff;
  outline-offset:2px;
}
.tg-modal--story .tg-avatar.has-active-story{
  outline-color:rgba(152,135,255,.96);
}
.tg-edited-mark{
  margin-right:4px;
  opacity:.78;
  font-size:9px;
  font-style:normal;
}
.tg-edit-message-menu{gap:12px!important;padding:14px!important}
.tg-edit-message-menu__preview{display:flex;align-items:center;gap:11px;padding:12px;border-radius:14px;background:var(--au-surface-2);color:var(--au-text)}
.tg-edit-message-menu__preview>.tg-icon{width:22px;height:22px;color:var(--au-accent)}
.tg-edit-message-menu__preview>span{min-width:0;display:flex;flex-direction:column;gap:3px}
.tg-edit-message-menu__preview strong{font-size:12px}
.tg-edit-message-menu__preview small{color:var(--au-text-3);font-size:10px;line-height:1.35}
.tg-edit-message-menu textarea{min-height:132px;resize:vertical;line-height:1.45}
.tg-edit-message-menu__actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.tg-edit-message-menu__actions>.tg-primary,.tg-edit-message-menu__actions>.tg-secondary{width:100%;min-height:42px}
@media(max-width:560px){
  .tg-edit-message-menu__actions{grid-template-columns:1fr}
  .tg-edit-message-menu__actions>.tg-primary{order:-1}
}

/* Aurora 5683: lightweight media upload feedback + lazy chat videos. */
.tg-upload-progress{margin-top:9px;padding-top:9px;border-top:1px solid var(--au-line);display:grid;gap:6px}
.tg-upload-progress__head{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:11px;color:var(--au-text-2)}
.tg-upload-progress__head strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--au-text);font-size:11.5px}
.tg-upload-progress__track{height:6px;overflow:hidden;border-radius:999px;background:var(--au-surface-3)}
.tg-upload-progress__track>i{display:block;height:100%;border-radius:inherit;background:var(--au-accent);transition:width .08s linear;will-change:width}
.tg-upload-progress>small{font-size:10px;color:var(--au-text-3)}
.tg-bubble__media.is-video{position:relative;min-height:150px;background:#11151c;contain:layout paint}
.tg-bubble__media.is-video video{background:#11151c}
.tg-media-loading{position:absolute;left:50%;top:50%;width:28px;height:28px;margin:-14px 0 0 -14px;border:2px solid rgba(255,255,255,.24);border-top-color:rgba(255,255,255,.92);border-radius:50%;animation:tgMediaSpin .8s linear infinite;pointer-events:none}
.tg-bubble__media.is-video.is-media-ready .tg-media-loading,.tg-bubble__media.is-video.is-media-error .tg-media-loading{display:none}
.tg-bubble__media.is-video.is-media-error::after{content:'Видео недоступно';position:absolute;left:10px;right:10px;bottom:9px;color:#fff;font-size:10px;text-align:center;text-shadow:0 1px 2px #000}
@keyframes tgMediaSpin{to{transform:rotate(360deg)}}
.tg-shell.reduce-motion .tg-media-loading{animation:none}

/* Divine 1/1 profile badge */
.tg-profile-featured.is-divine{border-color:rgba(187,43,255,.48);background:linear-gradient(135deg,color-mix(in srgb,var(--au-surface) 87%,#a600c8 13%),color-mix(in srgb,var(--au-surface) 91%,#4f00a8 9%));box-shadow:0 12px 34px rgba(135,0,180,.16)}
.tg-profile-featured.is-divine .tg-profile-featured__glow{background:radial-gradient(circle,rgba(214,63,255,.32),transparent 68%)}
.tg-profile-featured.is-divine .tg-profile-featured__copy>span,.tg-profile-featured.is-divine .tg-profile-featured__copy>small{color:#b448d7}
.tg-profile-featured.is-divine .tg-profile-featured__image,.tg-badge-library-card__image[src$="mikadroff_official.gif"]{image-rendering:pixelated;filter:drop-shadow(0 8px 14px rgba(123,0,156,.34))}



html.aurora-pre-dark,html.aurora-pre-dark body{background:#090d13!important;color-scheme:dark}
body.aurora-theme-dark{background:#090d13;color:#eef2f7;color-scheme:dark}

/* Aurora 5686: complete dark appearance — shared palette for shell, overlays and editors. */
.tg-page.theme-dark,
.tg-page.theme-dark .tg-shell.theme-dark{
  color-scheme:dark;
  --au-accent:#8b7cff;
  --au-accent-hover:#9a8cff;
  --au-accent-soft:rgba(139,124,255,.14);
  --au-accent-soft-strong:rgba(139,124,255,.22);
  --au-bg:#090d13;
  --au-surface:#111720;
  --au-surface-2:#171e29;
  --au-surface-3:#202936;
  --au-text:#eef2f7;
  --au-text-2:#a7b1bf;
  --au-text-3:#6f7b8d;
  --au-line:rgba(151,166,187,.13);
  --au-line-strong:rgba(161,177,199,.22);
  --au-positive:#44c98a;
  --au-danger:#ff6f7e;
  --au-warning:#f2b05b;
  --au-shadow:0 22px 70px rgba(0,0,0,.48);
  --au-shadow-soft:0 10px 34px rgba(0,0,0,.28);
  background:#090d13;
  color:#eef2f7;
}
.tg-page.theme-dark{isolation:isolate}
.tg-page.theme-dark .tg-shell{background:#090d13}
.tg-page.theme-dark .tg-left{
  background:linear-gradient(180deg,#101620 0%,#0e141d 100%);
  border-right-color:rgba(156,170,191,.12);
}
.tg-page.theme-dark .tg-right,
.tg-page.theme-dark .tg-side-screen{
  background:#0d131c;
  border-color:rgba(156,170,191,.12);
}
.tg-page.theme-dark .tg-topbar,
.tg-page.theme-dark .tg-side-head,
.tg-page.theme-dark .tg-info-head,
.tg-page.theme-dark .tg-chat-header,
.tg-page.theme-dark .tg-inline-search{
  background:rgba(16,22,31,.91);
  border-bottom-color:rgba(156,170,191,.12);
  box-shadow:0 1px 0 rgba(255,255,255,.015);
  backdrop-filter:blur(22px) saturate(135%);
  -webkit-backdrop-filter:blur(22px) saturate(135%);
}
.tg-page.theme-dark .tg-folders,
.tg-page.theme-dark .tg-global-users{
  background:#101620;
  border-color:rgba(156,170,191,.12);
}
.tg-page.theme-dark .tg-folder:hover,
.tg-page.theme-dark .tg-round-btn:hover,
.tg-page.theme-dark .tg-menu__profile:hover,
.tg-page.theme-dark .tg-menu__item:hover,
.tg-page.theme-dark .tg-context button:hover,
.tg-page.theme-dark button.tg-info-row:hover,
.tg-page.theme-dark button.tg-settings-row:hover,
.tg-page.theme-dark a.tg-settings-row:hover{
  background:#1a2230;
}
.tg-page.theme-dark .tg-folder.is-active,
.tg-page.theme-dark .tg-chat-row.is-active,
.tg-page.theme-dark .tg-settings-row.is-selected{
  background:rgba(139,124,255,.14);
}
.tg-page.theme-dark .tg-chat-row:hover{background:#151d28}
.tg-page.theme-dark .tg-chat-row.is-active:hover{background:rgba(139,124,255,.18)}
.tg-page.theme-dark .tg-chat-row.is-active .tg-chat-row__title{color:#e6e1ff}
.tg-page.theme-dark .tg-chat-row__time,
.tg-page.theme-dark .tg-chat-row__meta{color:#748195}

.tg-page.theme-dark .tg-main{
  background-color:#0b1017;
  background-image:var(--chat-bg-image,url('/static/tg_chat_bg_exact.png'));
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
}
.tg-page.theme-dark .tg-main::before{background:transparent}
.tg-page.theme-dark .tg-main::after{background:rgba(0,0,0,var(--wallpaper-dim,0))}
.tg-page.theme-dark .tg-day,
.tg-page.theme-dark .tg-service,
.tg-page.theme-dark .tg-empty-chat{
  background:rgba(19,27,38,.84);
  border-color:rgba(157,175,199,.14);
  color:#aeb8c7;
  box-shadow:0 8px 24px rgba(0,0,0,.14);
  backdrop-filter:blur(12px);
}
.tg-page.theme-dark .tg-msg.is-in .tg-bubble{
  background:linear-gradient(145deg,rgba(23,31,43,.98),rgba(18,25,35,.98));
  border-color:rgba(167,184,207,.13);
  color:#edf2f8;
  box-shadow:0 6px 18px rgba(0,0,0,.18);
}
.tg-page.theme-dark .tg-msg.is-out .tg-bubble{
  background:linear-gradient(145deg,#7869f8 0%,#6253dc 58%,#5949cb 100%);
  color:#fff;
  box-shadow:0 8px 24px rgba(77,62,192,.28);
}
.tg-page.theme-dark .tg-bubble__meta{color:#79869a}
.tg-page.theme-dark .tg-msg.is-out .tg-bubble__meta,
.tg-page.theme-dark .tg-msg.is-out .tg-checks{color:rgba(255,255,255,.77)}
.tg-page.theme-dark .tg-bubble__file-icon,
.tg-page.theme-dark .tg-bubble__play{background:rgba(139,124,255,.15);color:#a99eff}
.tg-page.theme-dark .tg-message-react{background:#151c27;border-color:rgba(154,169,192,.12)}
.tg-page.theme-dark .tg-reaction{background:rgba(255,255,255,.065)}
.tg-page.theme-dark .tg-reaction:hover{background:rgba(139,124,255,.14)}

.tg-page.theme-dark .tg-composer-wrap{
  background:linear-gradient(180deg,rgba(9,13,19,0),rgba(9,13,19,.86) 30%,rgba(9,13,19,.98) 72%);
}
.tg-page.theme-dark .tg-composer__box{
  background:rgba(18,25,35,.96);
  border-color:rgba(162,178,200,.17);
  box-shadow:0 12px 36px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.025);
}
.tg-page.theme-dark .tg-composer__box:focus-within{
  border-color:rgba(139,124,255,.48);
  box-shadow:0 12px 38px rgba(0,0,0,.31),0 0 0 3px rgba(139,124,255,.09);
}
.tg-page.theme-dark .tg-composer__box textarea{caret-color:#a99eff}
.tg-page.theme-dark .tg-replybar,
.tg-page.theme-dark .tg-attach-preview{
  background:rgba(18,25,35,.96);
  border-color:rgba(162,178,200,.17);
  box-shadow:0 12px 36px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.025);
}
.tg-page.theme-dark .tg-replybar button:hover,
.tg-page.theme-dark .tg-attach-preview button:hover{
  background:rgba(139,124,255,.12);
  color:#d7d2ff;
}
.tg-page.theme-dark .tg-search{
  background:#161e2a;
  border-color:rgba(156,174,198,.08);
}
.tg-page.theme-dark .tg-search:hover{background:#1a2330}
.tg-page.theme-dark .tg-search:focus-within{
  background:#121a24;
  border-color:rgba(139,124,255,.48);
  box-shadow:0 0 0 3px rgba(139,124,255,.1);
}

/* Inputs, settings and cards */
.tg-page.theme-dark .tg-info-profile,
.tg-page.theme-dark .tg-settings-hero,
.tg-page.theme-dark .tg-info-card,
.tg-page.theme-dark .tg-settings-card,
.tg-page.theme-dark .tg-profile-section,
.tg-page.theme-dark .tg-profile-dashboard>div,
.tg-page.theme-dark .tg-settings-profile-v2,
.tg-page.theme-dark .tg-settings-account-v2,
.tg-page.theme-dark .tg-settings-tile-v2,
.tg-page.theme-dark .tg-story-editor__panel,
.tg-page.theme-dark .tg-story-editor__meta{
  background:#111720;
  border-color:rgba(158,174,197,.13);
  box-shadow:none;
}
.tg-page.theme-dark .tg-settings-tile-v2:hover{
  background:#151d28;
  border-color:rgba(164,181,205,.2);
  box-shadow:0 12px 30px rgba(0,0,0,.18);
}
.tg-page.theme-dark .tg-settings-profile-v2__stats,
.tg-page.theme-dark .tg-settings-account-v2 header{border-color:rgba(158,174,197,.12)}
.tg-page.theme-dark .tg-settings-section-head-v2{
  background:linear-gradient(135deg,rgba(139,124,255,.12),rgba(64,151,255,.05));
  border-color:rgba(139,124,255,.15);
}
.tg-page.theme-dark .tg-community-notice{
  background:rgba(139,124,255,.075);
  border-color:rgba(139,124,255,.18);
}
.tg-page.theme-dark .tg-field input,
.tg-page.theme-dark .tg-field textarea,
.tg-page.theme-dark .tg-field select,
.tg-page.theme-dark input[type='text'],
.tg-page.theme-dark input[type='search'],
.tg-page.theme-dark input[type='password'],
.tg-page.theme-dark input[type='tel'],
.tg-page.theme-dark input[type='email'],
.tg-page.theme-dark input[type='number'],
.tg-page.theme-dark textarea,
.tg-page.theme-dark select{
  background:#161e29;
  border-color:rgba(160,176,199,.17);
  color:#edf2f8;
}
.tg-page.theme-dark .tg-field input:focus,
.tg-page.theme-dark .tg-field textarea:focus,
.tg-page.theme-dark .tg-field select:focus{
  background:#121923;
  border-color:rgba(139,124,255,.54);
  box-shadow:0 0 0 3px rgba(139,124,255,.1);
}
.tg-page.theme-dark input::placeholder,
.tg-page.theme-dark textarea::placeholder{color:#687587;opacity:1}
.tg-page.theme-dark select option{background:#111720;color:#edf2f8}
.tg-page.theme-dark .tg-secondary{background:#171f2b;border-color:rgba(160,176,199,.16)}
.tg-page.theme-dark .tg-secondary:hover{background:#202a38}
.tg-page.theme-dark .tg-tabs{background:#0e141d}
.tg-page.theme-dark .tg-tab.is-active{background:#1a2230;box-shadow:0 5px 16px rgba(0,0,0,.18)}
.tg-page.theme-dark .tg-switch{background:#303947}
.tg-page.theme-dark .tg-switch::after{background:#e9edf3;box-shadow:0 2px 7px rgba(0,0,0,.34)}
.tg-page.theme-dark .tg-switch.is-on{background:#7769ee}

/* Menus, popovers and modal sheets are outside .tg-shell, so page-level theming is mandatory. */
.tg-page.theme-dark .tg-menu,
.tg-page.theme-dark .tg-context,
.tg-page.theme-dark .tg-emoji-panel{
  background:rgba(15,21,30,.985);
  border-color:rgba(160,177,200,.16);
  color:#edf2f8;
  box-shadow:0 24px 70px rgba(0,0,0,.52);
}
.tg-page.theme-dark .tg-modal-backdrop{
  background:rgba(3,6,10,.66);
  backdrop-filter:blur(10px) saturate(115%);
  -webkit-backdrop-filter:blur(10px) saturate(115%);
}
.tg-page.theme-dark .tg-modal{
  background:#101720;
  border-color:rgba(168,184,206,.16);
  box-shadow:0 34px 110px rgba(0,0,0,.62),inset 0 1px 0 rgba(255,255,255,.025);
}
.tg-page.theme-dark .tg-modal__head{background:#111923;border-color:rgba(162,178,200,.13)}
.tg-page.theme-dark .tg-modal__body{background:#101720}
.tg-page.theme-dark .tg-delete-message-menu__preview,
.tg-page.theme-dark .tg-edit-message-menu__preview{background:#171f2b}
.tg-page.theme-dark .tg-delete-choice{background:#121923;border-color:rgba(160,177,201,.15)}
.tg-page.theme-dark .tg-delete-choice:hover{background:#1a2330}
.tg-page.theme-dark .tg-toast{background:rgba(19,26,36,.94);border:1px solid rgba(166,181,203,.12);box-shadow:0 16px 42px rgba(0,0,0,.42)}

/* Emoji/stickers/GIFs: one consistent dark surface instead of mixed navy panels. */
.tg-page.theme-dark .tg-emoji-panel__modes,
.tg-page.theme-dark .tg-emoji-panel__search{background:#111923;border-color:rgba(160,177,200,.12)}
.tg-page.theme-dark .tg-emoji-panel__recent,
.tg-page.theme-dark .tg-emoji-panel__category-row{background:#0f161f;border-color:rgba(160,177,200,.1)}
.tg-page.theme-dark .tg-emoji-panel__search input{background:#182230;border-color:rgba(163,181,205,.18);color:#edf2f8}
.tg-page.theme-dark .tg-emoji-panel__modes button:hover,
.tg-page.theme-dark .tg-emoji-panel__grid button:hover,
.tg-page.theme-dark .tg-emoji-panel__recent button:hover,
.tg-page.theme-dark .tg-emoji-panel__category-row button:hover,
.tg-page.theme-dark .tg-emoji-panel__category-row button.is-active{background:#1d2836}
.tg-page.theme-dark .tg-emoji-panel__gif-card{background:#141c27;border-color:rgba(160,177,200,.12)}
.tg-page.theme-dark .tg-emoji-panel__gif-preview{background:#0c1118}

/* Profile and story editor */
.tg-page.theme-dark .tg-profile-view--v2{background:#0d131c}
.tg-page.theme-dark .tg-profile-v2{background:#111720;border-color:rgba(158,174,197,.12)}
.tg-page.theme-dark .tg-profile-v2__avatar{background:#111720;box-shadow:0 16px 38px rgba(0,0,0,.34)}
.tg-page.theme-dark .tg-profile-v2__bio{background:#171f2b}
.tg-page.theme-dark .tg-profile-icon-action{background:rgba(17,23,32,.86);border-color:rgba(160,177,200,.15);box-shadow:0 7px 22px rgba(0,0,0,.18)}
.tg-page.theme-dark .tg-profile-details--grid{background:rgba(158,174,197,.11);border-color:rgba(158,174,197,.11)}
.tg-page.theme-dark .tg-profile-details--grid .tg-info-row{background:#111720}
.tg-page.theme-dark .tg-profile-featured{background:linear-gradient(135deg,rgba(70,54,26,.46),rgba(17,24,34,.97));border-color:rgba(222,175,69,.24)}
.tg-page.theme-dark .tg-profile-featured__copy>span,
.tg-page.theme-dark .tg-profile-featured__copy>small{color:#eac76f}
.tg-page.theme-dark .tg-profile-featured__more{background:rgba(17,23,32,.78)}
.tg-page.theme-dark .tg-story-editor__workspace{background:#0d131c}
.tg-page.theme-dark .tg-story-editor__tool-row button,
.tg-page.theme-dark .tg-story-editor__history button{background:#141c27;border-color:rgba(159,176,200,.14)}
.tg-page.theme-dark .tg-story-editor__tool-row button:hover,
.tg-page.theme-dark .tg-story-editor__history button:hover:not(:disabled){background:#1b2532}
.tg-page.theme-dark .tg-story-editor__quick button{background:#171f2b;border-color:rgba(159,176,200,.13)}
.tg-page.theme-dark .tg-story-editor__quick button:hover{background:#202a38}
.tg-page.theme-dark .tg-story-editor__paint input[type=color],
.tg-page.theme-dark .tg-story-editor__text-style input[type=color]{background:#171f2b;border-color:rgba(159,176,200,.15)}

/* Media and loading */
.tg-page.theme-dark .tg-upload-progress{border-color:rgba(159,176,200,.12)}
.tg-page.theme-dark .tg-upload-progress__track{background:#263140}
.tg-page.theme-dark .tg-bubble__media.is-video{background:#070a0f}
.tg-page.theme-dark .tg-file-row{border-color:rgba(159,176,200,.12)}
.tg-page.theme-dark .tg-media-cell{background:#0a0f16}

/* Native controls and scrollbars */
.tg-page.theme-dark *{scrollbar-color:#334052 transparent}
.tg-page.theme-dark *::-webkit-scrollbar{width:10px;height:10px}
.tg-page.theme-dark *::-webkit-scrollbar-track{background:transparent}
.tg-page.theme-dark *::-webkit-scrollbar-thumb{background:#303c4d;border:3px solid transparent;border-radius:999px;background-clip:padding-box}
.tg-page.theme-dark *::-webkit-scrollbar-thumb:hover{background:#445166;border:3px solid transparent;background-clip:padding-box}
.tg-page.theme-dark ::selection{background:rgba(139,124,255,.34);color:#fff}
.tg-page.theme-dark input[type='range']{accent-color:#8b7cff}
.tg-page.theme-dark input[type='checkbox'],
.tg-page.theme-dark input[type='radio']{accent-color:#8b7cff}

/* Explicit light class fixes components that already have dedicated light variants. */
.tg-page.theme-light,.tg-page.theme-light .tg-shell{color-scheme:light}

@media (prefers-contrast:more){
  .tg-page.theme-dark,.tg-page.theme-dark .tg-shell.theme-dark{--au-line:rgba(190,202,219,.22);--au-line-strong:rgba(200,211,226,.32);--au-text-2:#bdc6d2;--au-text-3:#8793a4}
  .tg-page.theme-dark .tg-msg.is-in .tg-bubble{border-color:rgba(195,208,225,.22)}
}


/* Aurora 5687: preserve chat wallpapers in dark mode + divine rarity purple treatment. */
.tg-profile-featured.is-divine{
  border-color:rgba(170,72,255,.62);
  background:linear-gradient(135deg,color-mix(in srgb,var(--au-surface) 82%,#8d2cff 18%),color-mix(in srgb,var(--au-surface) 86%,#4c16a8 14%));
  box-shadow:0 14px 38px rgba(111,33,190,.22),inset 0 1px 0 rgba(255,255,255,.08);
}
.tg-profile-featured.is-divine .tg-profile-featured__glow{
  background:radial-gradient(circle,rgba(208,103,255,.42),rgba(130,57,224,.12) 46%,transparent 70%);
}
.tg-profile-featured.is-divine .tg-profile-featured__copy>span,
.tg-profile-featured.is-divine .tg-profile-featured__copy>small{color:#b85cff}
.tg-profile-featured.is-divine .tg-profile-featured__copy>strong{color:color-mix(in srgb,var(--au-text) 84%,#a64fff 16%)}
.tg-profile-featured.is-divine .tg-profile-featured__more{
  border-color:rgba(174,88,255,.34);
  background:color-mix(in srgb,var(--au-surface) 80%,#7727db 20%);
}
.tg-badge-library-card.is-divine{
  border-color:rgba(171,77,255,.46);
  background:linear-gradient(135deg,color-mix(in srgb,var(--au-surface) 90%,#982fff 10%),color-mix(in srgb,var(--au-surface) 94%,#5d1bc0 6%));
  box-shadow:0 10px 28px rgba(107,35,177,.13);
}
.tg-badge-library-card.is-divine.is-selected{
  border-color:rgba(188,99,255,.72);
  box-shadow:0 0 0 3px rgba(155,67,235,.15),0 12px 30px rgba(100,31,169,.16);
}
.tg-badge-library-card.is-divine .tg-badge-library-card__copy small{color:#a84ee7}
.tg-badge-library-card.is-divine .tg-badge-library-card__selected{background:rgba(155,66,232,.15);color:#8b2fc4}
.tg-badge-library-card.is-divine .tg-badge-library-card__choose{border-color:rgba(158,72,230,.28);color:#8f36c9}
.tg-badge-library-card.is-divine .tg-badge-library-card__image,
.tg-profile-featured.is-divine .tg-profile-featured__image{
  filter:drop-shadow(0 9px 16px rgba(123,36,186,.42));
}
.tg-page.theme-dark .tg-profile-featured.is-divine{
  border-color:rgba(191,100,255,.5);
  background:linear-gradient(135deg,rgba(83,34,126,.62),rgba(37,21,65,.96));
}
.tg-page.theme-dark .tg-profile-featured.is-divine .tg-profile-featured__copy>span,
.tg-page.theme-dark .tg-profile-featured.is-divine .tg-profile-featured__copy>small{color:#d18bff}
.tg-page.theme-dark .tg-badge-library-card.is-divine{
  border-color:rgba(190,97,255,.4);
  background:linear-gradient(135deg,rgba(77,32,117,.56),rgba(22,20,34,.96));
}
.tg-page.theme-dark .tg-badge-library-card.is-divine .tg-badge-library-card__copy small{color:#cf8cff}
.tg-page.theme-dark .tg-badge-library-card.is-divine .tg-badge-library-card__selected{background:rgba(170,78,240,.2);color:#dda4ff}

/* Aurora 5688: channel posts, in-app dialogs and notification cards. */
.tg-msg.is-channel-post{justify-content:flex-start;padding:5px 11% 5px 0}
.tg-channel-post__card{position:relative;width:min(680px,76%);overflow:visible;padding:10px 12px 8px;border:1px solid rgba(224,228,235,.92);border-radius:16px 16px 16px 6px;background:rgba(255,255,255,.97);box-shadow:0 5px 18px rgba(23,30,43,.09);color:var(--au-text);font-size:14px;line-height:20px;white-space:pre-wrap;word-break:break-word}
.tg-channel-post__identity{display:flex;align-items:center;gap:9px;margin-bottom:8px;color:var(--au-accent)}
.tg-channel-post__identity .tg-avatar--tiny{width:30px;height:30px;flex-basis:30px;font-size:10px}
.tg-channel-post__identity>div{display:flex;min-width:0;flex-direction:column;line-height:15px}.tg-channel-post__identity strong{font-size:13px}.tg-channel-post__identity small{color:var(--au-text-3);font-size:10px}
.tg-channel-post__card .tg-bubble__media{margin:0 -12px 8px;border-radius:0}.tg-channel-post__card .tg-bubble__media:first-of-type{margin-top:2px}
.tg-channel-post__card .tg-bubble__media img,.tg-channel-post__card .tg-bubble__media video{max-height:520px}
.tg-channel-post__stats{display:flex;align-items:center;justify-content:flex-end;gap:10px;clear:both;margin-top:7px;color:var(--au-text-3);font-size:10px;line-height:14px}.tg-channel-post__stats>span{display:inline-flex;align-items:center;gap:3px}.tg-channel-post__stats .tg-icon{width:13px;height:13px;flex-basis:13px}
.tg-channel-post__forward{position:absolute;right:-48px;bottom:6px;width:38px;height:38px;display:grid;place-items:center;border:1px solid rgba(224,228,235,.94);border-radius:50%;background:rgba(255,255,255,.96);box-shadow:0 5px 16px rgba(24,31,45,.12);color:var(--au-accent);transition:transform .16s ease,background .16s ease}.tg-channel-post__forward:hover{transform:translateY(-2px);background:var(--au-accent-soft)}.tg-channel-post__forward .tg-icon{width:18px;height:18px}
.tg-channel-post__comments{display:flex;width:calc(100% + 24px);min-height:40px;align-items:center;gap:9px;margin:9px -12px -8px;padding:8px 12px;border:0;border-top:1px solid rgba(84,166,224,.18);border-radius:0 0 16px 6px;background:#eaf5fc;color:#278bd0;font-size:12px;font-weight:700;text-align:left}.tg-channel-post__comments:hover{background:#dceffa}.tg-channel-post__comments>span{flex:1}.tg-channel-post__comments .tg-icon{width:18px;height:18px;flex-basis:18px}
.tg-discussion-settings{display:flex;flex-direction:column;gap:12px;margin:12px}.tg-discussion-settings>.tg-community-notice{margin:0}.tg-discussion-settings>.tg-primary,.tg-discussion-settings>.tg-secondary{align-self:flex-start;min-height:42px}.tg-discussion-linked{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--au-line);border-radius:15px;background:var(--au-surface)}.tg-discussion-linked>.tg-avatar{width:42px!important;height:42px!important;flex:0 0 42px!important;border-radius:50%!important}.tg-discussion-linked>span:not(.tg-avatar){display:flex;min-width:0;flex:1;flex-direction:column}.tg-discussion-linked small,.tg-discussion-groups small{color:var(--au-text-3)}.tg-discussion-linked>button{padding:8px 13px;border:0;border-radius:10px;background:var(--au-accent-soft);color:var(--au-accent);font-weight:650}.tg-discussion-groups{display:flex;flex-direction:column;gap:7px}.tg-discussion-groups>strong{color:var(--au-text-3);font-size:10px;text-transform:uppercase}.tg-discussion-groups>button{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--au-line);border-radius:14px;background:var(--au-surface);color:var(--au-text);text-align:left}.tg-discussion-groups>button:hover{border-color:var(--au-accent)}.tg-discussion-groups>button>span:not(.tg-avatar){display:flex;min-width:0;flex:1;flex-direction:column}.tg-discussion-groups>button>.tg-icon{color:var(--au-text-3)}
.tg-discussion-settings>.tg-primary{display:inline-flex;align-items:center;justify-content:center;gap:8px}.tg-discussion-settings>.tg-primary .tg-icon{width:18px;height:18px;flex-basis:18px}.tg-discussion-notice{display:grid!important;grid-template-columns:36px minmax(0,1fr);align-items:center!important;gap:12px!important;padding:13px 14px!important;text-align:left}.tg-discussion-notice>.tg-icon{width:36px!important;height:36px!important;display:grid;place-items:center;align-self:center;margin:0!important;padding:8px;border-radius:11px;background:rgba(229,153,53,.13)}.tg-discussion-notice>span:not(.tg-icon){width:100%;flex:none!important;gap:3px!important}.tg-discussion-notice>span>strong{font-size:12px!important;line-height:16px}.tg-discussion-notice>span>small{font-size:10px!important;line-height:15px!important}
.tg-forwarded-label{display:flex;align-items:center;gap:7px;margin:0 0 8px;color:#2d91d2}.tg-forwarded-label>span{width:24px;height:24px;display:grid;place-items:center;border-radius:50%;background:linear-gradient(145deg,#55b8ef,#358bda);color:#fff;font-size:10px;font-weight:800}.tg-forwarded-label>div{display:flex;flex-direction:column;line-height:13px}.tg-forwarded-label small{font-size:9px;opacity:.75}.tg-forwarded-label strong{font-size:11px}
.tg-msg.is-out .tg-forwarded-label{color:#fff}.tg-msg.is-out .tg-forwarded-label>span{background:rgba(255,255,255,.22)}

.tg-aurora-dialog-layer{position:fixed;z-index:10000;inset:0;display:grid;place-items:center;padding:18px;background:rgba(8,13,22,.58);backdrop-filter:blur(9px);animation:au-fade .15s ease}
.tg-aurora-dialog{width:min(440px,calc(100vw - 28px));max-height:min(700px,calc(100vh - 36px));display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(177,188,207,.26);border-radius:24px;background:#fff;box-shadow:0 34px 100px rgba(0,0,0,.36);color:#172033;animation:au-pop .18s ease}
.tg-aurora-dialog>header{display:flex;align-items:center;gap:11px;padding:17px 18px 13px;border-bottom:1px solid #edf0f5}.tg-aurora-dialog>header>div{display:flex;flex:1;flex-direction:column}.tg-aurora-dialog>header strong{font-size:16px}.tg-aurora-dialog>header small{color:#8791a2;font-size:10px}.tg-aurora-dialog>header button{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;color:#788396}.tg-aurora-dialog>header button:hover{background:#f1f3f7}
.tg-aurora-dialog__brand{width:38px;height:38px;display:grid;place-items:center;border-radius:13px;background:linear-gradient(145deg,#7668ff,#4f8fff);box-shadow:0 8px 20px rgba(88,91,224,.3);color:#fff;font-size:19px;font-weight:850}
.tg-aurora-dialog__brand{overflow:hidden;background:#1b4bd1}
.tg-aurora-dialog__brand img{width:100%;height:100%;object-fit:cover}
.tg-aurora-dialog__message{margin:0;padding:15px 18px 5px;color:#667084;font-size:13px;line-height:19px;white-space:pre-wrap}
.tg-aurora-dialog__choices{display:flex;flex-direction:column;gap:6px;overflow:auto;padding:12px 14px 16px}.tg-aurora-dialog__choice{display:flex;align-items:center;gap:10px;min-height:54px;padding:9px 11px;border:1px solid #e9edf3;border-radius:14px;background:#f8f9fb;text-align:left;color:#263146}.tg-aurora-dialog__choice:hover{border-color:#d9d6ff;background:#f1efff}.tg-aurora-dialog__choice>span{width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:#ebe9ff;color:#6558e8}.tg-aurora-dialog__choice>b{display:flex;min-width:0;flex:1;flex-direction:column}.tg-aurora-dialog__choice strong{font-size:13px}.tg-aurora-dialog__choice small{overflow:hidden;color:#7b8596;font-size:10px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}.tg-aurora-dialog__choice>.tg-icon{width:16px;color:#9ca5b3}.tg-aurora-dialog__choice.is-danger{color:#d54451}.tg-aurora-dialog__choice.is-danger>span{background:#ffeaec;color:#d54451}
.tg-aurora-dialog__field,.tg-aurora-dialog__search{display:flex;align-items:center;gap:8px;margin:13px 16px 0}.tg-aurora-dialog__field{align-items:stretch;flex-direction:column;color:#6e788a;font-size:11px}.tg-aurora-dialog__field input,.tg-aurora-dialog__search input{width:100%;height:43px;padding:0 12px;border:1px solid #dfe4eb;border-radius:12px;background:#f7f8fa;color:#182235;outline:none}.tg-aurora-dialog__field input:focus,.tg-aurora-dialog__search input:focus{border-color:#7466ec;box-shadow:0 0 0 3px rgba(116,102,236,.12)}.tg-aurora-dialog__search{padding:0 11px;border:1px solid #e1e5ec;border-radius:13px;background:#f7f8fa}.tg-aurora-dialog__search input{padding:0;border:0;background:transparent;box-shadow:none!important}.tg-aurora-dialog__search .tg-icon{width:17px;color:#8a94a4}
.tg-aurora-dialog>footer{display:flex;justify-content:flex-end;gap:8px;padding:12px 16px 16px}.tg-aurora-dialog>footer button{width:auto;min-width:112px}
.tg-aurora-notices{position:fixed;z-index:9990;top:18px;right:18px;width:min(370px,calc(100vw - 28px));display:flex;flex-direction:column;gap:9px;pointer-events:none}.tg-aurora-notice{display:flex;align-items:flex-start;gap:10px;padding:13px;border:1px solid rgba(176,189,209,.28);border-radius:17px;background:rgba(255,255,255,.96);box-shadow:0 16px 48px rgba(13,21,35,.22);backdrop-filter:blur(14px);color:#1d2738;pointer-events:auto;animation:au-slide-in .24s ease}.tg-aurora-notice.is-leaving{opacity:0;transform:translateX(16px);transition:.18s}.tg-aurora-notice__icon{width:38px;height:38px;display:grid;place-items:center;flex:0 0 38px;border-radius:12px;background:#eceaff;color:#6759e8}.tg-aurora-notice>div{min-width:0;flex:1}.tg-aurora-notice strong{font-size:13px}.tg-aurora-notice p{margin:3px 0 0;color:#717c8e;font-size:11px;line-height:16px}.tg-aurora-notice>button{width:28px;height:28px;display:grid;place-items:center;color:#8c96a5}.tg-aurora-notice>button .tg-icon{width:15px}.tg-aurora-notice.is-success .tg-aurora-notice__icon{background:#e7f8ef;color:#1e9d62}.tg-aurora-notice.is-danger .tg-aurora-notice__icon{background:#ffebed;color:#d84955}
.tg-aurora-notice.is-clickable{cursor:pointer}.tg-aurora-notice.is-clickable:hover{border-color:rgba(109,93,252,.35);transform:translateY(-1px)}
.tg-mention{display:inline;padding:0;border:0;background:transparent;color:#218dcc;font:inherit;font-weight:750;vertical-align:baseline}.tg-mention:hover{text-decoration:underline}.tg-msg.is-out .tg-mention{color:#fff;text-decoration:underline;text-decoration-color:rgba(255,255,255,.45)}
.tg-mention-suggestions{position:absolute;z-index:35;left:44px;right:44px;bottom:calc(100% + 9px);max-height:300px;overflow:auto;padding:6px;border:1px solid var(--au-line);border-radius:16px;background:var(--au-surface);box-shadow:0 18px 50px rgba(15,24,39,.22)}.tg-mention-suggestions[hidden]{display:none}.tg-mention-suggestions>button{display:flex;width:100%;align-items:center;gap:9px;padding:8px;border-radius:11px;color:var(--au-text);text-align:left}.tg-mention-suggestions>button:hover,.tg-mention-suggestions>button:focus{background:var(--au-accent-soft)}.tg-mention-suggestions>button>span:not(.tg-avatar){display:flex;min-width:0;flex:1;flex-direction:column}.tg-mention-suggestions strong{font-size:12px}.tg-mention-suggestions small{color:var(--au-text-3);font-size:10px}
@keyframes au-slide-in{from{opacity:0;transform:translateX(22px)}to{opacity:1;transform:none}}

.tg-page.theme-dark .tg-channel-post__card{border-color:rgba(151,170,196,.18);background:#172432;color:#edf4fb;box-shadow:0 8px 24px rgba(0,0,0,.26)}.tg-page.theme-dark .tg-channel-post__comments{border-color:rgba(98,186,243,.16);background:#13283a;color:#63baf3}.tg-page.theme-dark .tg-channel-post__comments:hover{background:#193449}.tg-page.theme-dark .tg-channel-post__forward{border-color:rgba(151,170,196,.18);background:#172432;color:#63baf3}.tg-page.theme-dark .tg-channel-post__forward:hover{background:#203348}.tg-page.theme-dark .tg-channel-post__identity small,.tg-page.theme-dark .tg-channel-post__stats{color:#7f92a8}
body.aurora-theme-dark .tg-aurora-dialog{border-color:rgba(163,181,205,.18);background:#101720;color:#edf3f9}body.aurora-theme-dark .tg-aurora-dialog>header{border-color:rgba(163,181,205,.13)}body.aurora-theme-dark .tg-aurora-dialog>header button:hover{background:#1a2532}body.aurora-theme-dark .tg-aurora-dialog__message{color:#aab5c4}body.aurora-theme-dark .tg-aurora-dialog__choice{border-color:rgba(163,181,205,.13);background:#151e29;color:#eaf1f8}body.aurora-theme-dark .tg-aurora-dialog__choice:hover{border-color:rgba(139,124,255,.45);background:#1d2937}body.aurora-theme-dark .tg-aurora-dialog__choice small{color:#98a5b6}body.aurora-theme-dark .tg-aurora-dialog__field input,body.aurora-theme-dark .tg-aurora-dialog__search{border-color:rgba(163,181,205,.16);background:#172230;color:#edf3f9}body.aurora-theme-dark .tg-aurora-notice{border-color:rgba(163,181,205,.17);background:rgba(16,23,32,.96);color:#edf3f9}body.aurora-theme-dark .tg-aurora-notice p{color:#aab5c4}
@media(max-width:720px){.tg-msg.is-channel-post{padding-right:44px}.tg-channel-post__card{width:100%}.tg-channel-post__forward{right:-43px}.tg-aurora-notices{top:10px;right:10px}.tg-aurora-dialog{border-radius:20px}.tg-context{top:auto!important;right:8px!important;bottom:max(8px,env(safe-area-inset-bottom))!important;left:8px!important;width:auto;min-width:0;max-width:none;max-height:min(70dvh,520px);overflow-y:auto;border-radius:18px}.tg-context__reactions{display:grid;grid-template-columns:repeat(6,minmax(0,1fr))}.tg-context__reactions button{width:100%}.tg-discussion-settings{margin:8px}.tg-discussion-notice{grid-template-columns:32px minmax(0,1fr);gap:10px!important;padding:11px!important}.tg-discussion-notice>.tg-icon{width:32px!important;height:32px!important;padding:7px}.tg-discussion-settings>.tg-primary,.tg-discussion-settings>.tg-secondary{width:100%;align-self:stretch}.tg-discussion-linked{align-items:flex-start;flex-wrap:wrap}.tg-discussion-linked>span:not(.tg-avatar){padding-top:3px}.tg-discussion-linked>button{width:100%}}

/* Aurora 5688: green official badge styling and cleaner avatar media controls. */
.tg-profile-avatar-button__zoom{display:none!important}
.tg-profile-featured.is-divine{
  border-color:rgba(72,185,108,.56);
  background:linear-gradient(135deg,color-mix(in srgb,var(--au-surface) 82%,#2fb85c 18%),color-mix(in srgb,var(--au-surface) 87%,#17683a 13%));
  box-shadow:0 14px 38px rgba(20,98,49,.20),inset 0 1px 0 rgba(230,255,238,.07);
}
.tg-profile-featured.is-divine .tg-profile-featured__glow{
  background:radial-gradient(circle,rgba(100,235,139,.34),rgba(48,151,83,.12) 46%,transparent 70%);
}
.tg-profile-featured.is-divine .tg-profile-featured__copy>span,
.tg-profile-featured.is-divine .tg-profile-featured__copy>small{color:#70e59a}
.tg-profile-featured.is-divine .tg-profile-featured__copy>strong{color:color-mix(in srgb,var(--au-text) 86%,#53d37f 14%)}
.tg-profile-featured.is-divine .tg-profile-featured__more{
  border-color:rgba(82,198,119,.30);
  background:color-mix(in srgb,var(--au-surface) 82%,#1f8a47 18%);
}
.tg-badge-library-card.is-divine{
  border-color:rgba(84,196,120,.42);
  background:linear-gradient(135deg,color-mix(in srgb,var(--au-surface) 90%,#2da85b 10%),color-mix(in srgb,var(--au-surface) 94%,#17592f 6%));
  box-shadow:0 10px 28px rgba(18,87,40,.13);
}
.tg-badge-library-card.is-divine.is-selected{
  border-color:rgba(106,224,145,.68);
  box-shadow:0 0 0 3px rgba(57,181,98,.14),0 12px 30px rgba(27,99,49,.16);
}
.tg-badge-library-card.is-divine .tg-badge-library-card__copy small{color:#5ccd85}
.tg-badge-library-card.is-divine .tg-badge-library-card__selected{background:rgba(55,184,98,.14);color:#2f9d59}
.tg-badge-library-card.is-divine .tg-badge-library-card__choose{border-color:rgba(67,175,100,.26);color:#2e9c57}
.tg-badge-library-card.is-divine .tg-badge-library-card__image,
.tg-profile-featured.is-divine .tg-profile-featured__image,
.tg-featured-badge-mini.is-divine .tg-custom-badge__image{
  mix-blend-mode:screen;
  filter:drop-shadow(0 9px 16px rgba(33,130,65,.34));
}
.tg-page.theme-dark .tg-profile-featured.is-divine{
  border-color:rgba(89,214,128,.42);
  background:linear-gradient(135deg,rgba(30,85,48,.72),rgba(12,32,19,.96));
}
.tg-page.theme-dark .tg-profile-featured.is-divine .tg-profile-featured__copy>span,
.tg-page.theme-dark .tg-profile-featured.is-divine .tg-profile-featured__copy>small{color:#8eecaf}
.tg-page.theme-dark .tg-badge-library-card.is-divine{
  border-color:rgba(87,202,125,.34);
  background:linear-gradient(135deg,rgba(28,74,42,.66),rgba(15,23,18,.96));
}
.tg-page.theme-dark .tg-badge-library-card.is-divine .tg-badge-library-card__copy small{color:#89e7aa}
.tg-page.theme-dark .tg-badge-library-card.is-divine .tg-badge-library-card__selected{background:rgba(66,170,99,.18);color:#9df2ba}


/* Aurora 5689: Mika badge keeps the original purple divine styling. */
.tg-profile-featured.badge-key-mikadroff_official{
  border-color:rgba(170,72,255,.62)!important;
  background:linear-gradient(135deg,color-mix(in srgb,var(--au-surface) 82%,#8d2cff 18%),color-mix(in srgb,var(--au-surface) 86%,#4c16a8 14%))!important;
  box-shadow:0 14px 38px rgba(111,33,190,.22),inset 0 1px 0 rgba(255,255,255,.08)!important;
}
.tg-profile-featured.badge-key-mikadroff_official .tg-profile-featured__glow{
  background:radial-gradient(circle,rgba(208,103,255,.42),rgba(130,57,224,.12) 46%,transparent 70%)!important;
}
.tg-profile-featured.badge-key-mikadroff_official .tg-profile-featured__copy>span,
.tg-profile-featured.badge-key-mikadroff_official .tg-profile-featured__copy>small{color:#b85cff!important}
.tg-profile-featured.badge-key-mikadroff_official .tg-profile-featured__copy>strong{color:color-mix(in srgb,var(--au-text) 84%,#a64fff 16%)!important}
.tg-profile-featured.badge-key-mikadroff_official .tg-profile-featured__more{
  border-color:rgba(174,88,255,.34)!important;
  background:color-mix(in srgb,var(--au-surface) 80%,#7727db 20%)!important;
}
.tg-badge-library-card.badge-key-mikadroff_official{
  border-color:rgba(171,77,255,.46)!important;
  background:linear-gradient(135deg,color-mix(in srgb,var(--au-surface) 90%,#982fff 10%),color-mix(in srgb,var(--au-surface) 94%,#5d1bc0 6%))!important;
  box-shadow:0 10px 28px rgba(107,35,177,.13)!important;
}
.tg-badge-library-card.badge-key-mikadroff_official.is-selected{
  border-color:rgba(188,99,255,.72)!important;
  box-shadow:0 0 0 3px rgba(155,67,235,.15),0 12px 30px rgba(100,31,169,.16)!important;
}
.tg-badge-library-card.badge-key-mikadroff_official .tg-badge-library-card__copy small{color:#a84ee7!important}
.tg-badge-library-card.badge-key-mikadroff_official .tg-badge-library-card__selected{background:rgba(155,66,232,.15)!important;color:#8b2fc4!important}
.tg-badge-library-card.badge-key-mikadroff_official .tg-badge-library-card__choose{border-color:rgba(158,72,230,.28)!important;color:#8f36c9!important}
.tg-badge-library-card.badge-key-mikadroff_official .tg-badge-library-card__image,
.tg-profile-featured.badge-key-mikadroff_official .tg-profile-featured__image{
  mix-blend-mode:screen;
  filter:drop-shadow(0 9px 16px rgba(123,36,186,.42))!important;
}
.tg-page.theme-dark .tg-profile-featured.badge-key-mikadroff_official{
  border-color:rgba(191,100,255,.5)!important;
  background:linear-gradient(135deg,rgba(83,34,126,.62),rgba(37,21,65,.96))!important;
}
.tg-page.theme-dark .tg-profile-featured.badge-key-mikadroff_official .tg-profile-featured__copy>span,
.tg-page.theme-dark .tg-profile-featured.badge-key-mikadroff_official .tg-profile-featured__copy>small{color:#d18bff!important}
.tg-page.theme-dark .tg-badge-library-card.badge-key-mikadroff_official{
  border-color:rgba(190,97,255,.4)!important;
  background:linear-gradient(135deg,rgba(77,32,117,.56),rgba(22,20,34,.96))!important;
}
.tg-page.theme-dark .tg-badge-library-card.badge-key-mikadroff_official .tg-badge-library-card__copy small{color:#cf8cff!important}
.tg-page.theme-dark .tg-badge-library-card.badge-key-mikadroff_official .tg-badge-library-card__selected{background:rgba(170,78,240,.2)!important;color:#dda4ff!important}


/* Aurora 5690: make Jr.Larzyk official GIF visually larger. */
.tg-profile-featured.badge-key-jr_larzyk_official .tg-profile-featured__art{
  overflow:hidden;
}
.tg-profile-featured.badge-key-jr_larzyk_official .tg-profile-featured__image{
  transform:scale(1.8);
  transform-origin:center center;
}
.tg-badge-library-card.badge-key-jr_larzyk_official .tg-badge-library-card__art{
  overflow:hidden;
}
.tg-badge-library-card.badge-key-jr_larzyk_official .tg-badge-library-card__image{
  transform:scale(1.7);
  transform-origin:center center;
}
.tg-page.theme-dark .tg-profile-featured.badge-key-jr_larzyk_official .tg-profile-featured__image{
  transform:scale(1.8);
}
.tg-page.theme-dark .tg-badge-library-card.badge-key-jr_larzyk_official .tg-badge-library-card__image{
  transform:scale(1.7);
}
.tg-authenticator{gap:18px}
.tg-authenticator-hero{display:grid;justify-items:center;text-align:center;gap:9px;padding:20px;border:1px solid var(--tg-line);border-radius:18px;background:linear-gradient(145deg,color-mix(in srgb,var(--tg-accent) 13%,var(--tg-panel)),var(--tg-panel))}
.tg-authenticator-hero>.tg-icon{width:46px;height:46px;padding:11px;border-radius:50%;color:#fff;background:var(--tg-accent)}
.tg-authenticator-hero strong{font-size:18px}
.tg-authenticator-hero p{margin:0;max-width:410px;color:var(--tg-muted);line-height:1.45}
.tg-authenticator-hero.is-enabled>.tg-icon{background:#2fb36f}
.tg-authenticator-steps{display:flex;align-items:center;gap:12px;font-weight:700}
.tg-authenticator-steps b{display:grid;place-items:center;flex:0 0 30px;height:30px;border-radius:50%;color:#fff;background:var(--tg-accent)}
.tg-authenticator-qr{display:grid;place-items:center;padding:16px;border-radius:20px;background:#fff;align-self:center}
.tg-authenticator-qr img{display:block;width:min(250px,68vw);height:auto;aspect-ratio:1;object-fit:contain}
.tg-authenticator-secret{display:grid;gap:7px;text-align:center;color:var(--tg-muted)}
.tg-authenticator-secret button{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px;border:1px solid var(--tg-line);border-radius:12px;color:var(--tg-text);background:var(--tg-panel-2);cursor:pointer}
.tg-authenticator-secret code{font:700 14px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:1.4px;overflow-wrap:anywhere}
.tg-authenticator-secret .tg-icon{width:18px;height:18px;flex:0 0 18px}
.tg-authenticator-note{margin:0;color:var(--tg-muted);font-size:12px;line-height:1.45;text-align:center}
.tg-primary--danger{background:#e05252!important}
.tg-context--composer{min-width:246px;padding:6px}
.tg-context__title{padding:7px 10px 6px;color:var(--tg-muted);font-size:11px;font-weight:800;letter-spacing:.03em;text-transform:uppercase}
.tg-context__section{margin:6px 3px 3px;padding:8px 8px 4px;border-top:1px solid var(--au-line);color:var(--tg-muted);font-size:10.5px;font-weight:800;letter-spacing:.025em;text-transform:uppercase}
.tg-context__actions .tg-context__section:first-child{margin-top:0;border-top:0}
.tg-context--composer .tg-context__actions button{height:36px}
.tg-ttl-control{position:relative;display:flex;align-items:flex-end;flex:0 0 40px;isolation:isolate}
.tg-ttl-control::after{content:"";position:absolute;right:0;bottom:100%;width:236px;height:12px}
.tg-ttl-control__trigger{position:relative;z-index:2}.tg-ttl-control__trigger small{font-size:16px;line-height:1}
.tg-ttl-control__trigger.is-active{color:#fff;background:linear-gradient(135deg,#168ce8,#37c5ef);box-shadow:0 6px 16px rgba(24,145,229,.28)}
.tg-ttl-control__menu{position:absolute;z-index:80;right:0;bottom:calc(100% + 7px);width:236px;padding:11px;border:1px solid rgba(145,184,219,.27);border-radius:15px;background:rgba(12,23,37,.98);box-shadow:0 16px 40px rgba(4,13,26,.34);color:#f4f8ff;opacity:0;pointer-events:none;transform:translateY(6px) scale(.98);transform-origin:bottom right;transition:opacity .14s ease,transform .14s ease}
.tg-ttl-control:hover .tg-ttl-control__menu,.tg-ttl-control:focus-within .tg-ttl-control__menu,.tg-ttl-control.is-open .tg-ttl-control__menu{opacity:1;pointer-events:auto;transform:translateY(0) scale(1)}
.tg-ttl-control__menu>strong{display:block;font-size:12px;font-weight:850;letter-spacing:.015em}.tg-ttl-control__menu>span{display:block;margin:3px 0 8px;color:#99b3ca;font-size:11px;font-weight:600}
.tg-ttl-control__menu>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}.tg-ttl-control__menu button{height:31px;padding:0 8px;border-radius:9px;color:#c9d8e8;background:rgba(255,255,255,.045);font-size:11px;font-weight:700;text-align:left;white-space:nowrap}.tg-ttl-control__menu button:hover{background:rgba(68,174,241,.2);color:#fff}.tg-ttl-control__menu button.is-selected{color:#fff;background:linear-gradient(135deg,#147fdf,#31b8eb)}
@media(max-width:640px){.tg-ttl-control__menu{right:-36px;width:226px}.tg-ttl-control::after{right:-36px;width:226px}}
@media(max-width:640px){.tg-authenticator{gap:14px}.tg-authenticator-qr{padding:10px}.tg-authenticator-qr img{width:min(220px,72vw)}}

/* Compact confirmation dialogs: softer, rounded and visually separated from the chat. */
.tg-modal:has(.tg-delete-message-menu),.tg-modal:has(.tg-edit-message-menu){overflow:hidden!important;border-radius:28px!important;border-color:rgba(154,184,212,.22)!important;box-shadow:0 28px 88px rgba(2,9,20,.5),inset 0 1px 0 rgba(255,255,255,.035)!important}
.tg-modal:has(.tg-delete-message-menu) .tg-modal__head,.tg-modal:has(.tg-edit-message-menu) .tg-modal__head{height:68px;min-height:68px;padding:12px 15px;border-bottom-color:rgba(154,184,212,.14);background:linear-gradient(135deg,rgba(31,47,65,.9),rgba(18,28,40,.98))}
.tg-modal:has(.tg-delete-message-menu) .tg-modal__head strong,.tg-modal:has(.tg-edit-message-menu) .tg-modal__head strong{font-size:16px;letter-spacing:-.01em}.tg-modal:has(.tg-delete-message-menu) .tg-modal__head .tg-round-btn,.tg-modal:has(.tg-edit-message-menu) .tg-modal__head .tg-round-btn{border-radius:13px}
.tg-delete-message-menu{gap:10px!important;padding:18px!important;background:linear-gradient(180deg,rgba(16,25,36,.98),rgba(13,21,31,.99))}
.tg-delete-message-menu__preview{padding:14px!important;margin-bottom:5px!important;border:1px solid rgba(156,184,209,.09);border-radius:18px!important;background:linear-gradient(135deg,rgba(36,50,68,.86),rgba(26,37,51,.9))!important}
.tg-delete-choice{min-height:62px!important;padding:12px 14px!important;border-radius:17px!important;border-color:rgba(156,184,209,.17)!important;transition:transform .15s ease,background .15s ease,border-color .15s ease!important}.tg-delete-choice:hover{transform:translateY(-1px);border-color:rgba(101,184,238,.38)!important;background:rgba(31,47,64,.95)!important}.tg-delete-choice.is-danger:hover{border-color:rgba(255,102,122,.45)!important;background:rgba(92,35,47,.28)!important}
.tg-delete-choice.is-cancel{justify-content:center;min-height:46px!important;margin-top:2px;border-color:transparent!important;background:transparent!important;color:#b9cadb!important}.tg-delete-choice.is-cancel:hover{transform:none;background:rgba(255,255,255,.055)!important;color:#fff!important}
@media(max-width:640px){.tg-modal:has(.tg-delete-message-menu),.tg-modal:has(.tg-edit-message-menu){border-radius:24px!important}.tg-delete-message-menu{padding:14px!important}}
.tg-poll{display:flex;flex-direction:column;gap:9px;min-width:240px;padding:12px;margin-top:4px;border:1px solid rgba(94,181,236,.24);border-radius:16px;background:rgba(31,62,88,.28)}.tg-poll>strong{font-size:14px;line-height:1.3}.tg-poll>div{display:grid;gap:6px}.tg-poll button{position:relative;overflow:hidden;display:flex;align-items:center;min-height:35px;padding:0 9px;border:1px solid rgba(144,184,212,.18);border-radius:10px;color:inherit;background:rgba(255,255,255,.04);text-align:left}.tg-poll button i{position:absolute;inset:0 auto 0 0;background:rgba(42,159,232,.2);pointer-events:none}.tg-poll button span,.tg-poll button b{position:relative}.tg-poll button span{flex:1;font-size:12px}.tg-poll button b{font-size:10px}.tg-poll button.is-voted{border-color:#36acec;background:rgba(37,145,223,.14)}.tg-poll small{color:var(--tg-muted);font-size:10px}

/* Elega Control Center: compact blue workspace inspired by the selected concept. */
.tg-page.theme-dark .tg-modal--community{border-color:rgba(72,173,239,.22);background:#09121e;box-shadow:0 30px 90px rgba(0,0,0,.65),inset 0 1px 0 rgba(120,214,255,.05)}
.tg-page.theme-dark .tg-community-console{background:linear-gradient(145deg,#08121f,#0d1723)}
.tg-page.theme-dark .tg-community-console__hero{padding:22px 24px;border-bottom:1px solid rgba(119,195,245,.17);background:linear-gradient(108deg,#0b2945,#104778 55%,#145fd0);box-shadow:inset 0 -1px 0 rgba(255,255,255,.07)}
.tg-page.theme-dark .tg-community-console__avatar{border-radius:50%;background:#0e2842;box-shadow:0 10px 28px rgba(0,0,0,.28)}
.tg-page.theme-dark .tg-community-console__avatar .tg-avatar--big{border-radius:50%!important}.tg-page.theme-dark .tg-community-console__identity>span{color:#55c5ff}.tg-page.theme-dark .tg-community-console__identity>strong{font-size:24px}
.tg-page.theme-dark .tg-community-console__workspace{grid-template-columns:116px minmax(0,1fr)}
.tg-page.theme-dark .tg-community-console__nav{padding:14px 10px;border-color:rgba(119,195,245,.14);background:linear-gradient(180deg,#0b1724,#0a131d)}
.tg-page.theme-dark .tg-community-console__nav>button{grid-template-columns:1fr;justify-items:center;padding:10px 4px;border-radius:14px}.tg-page.theme-dark .tg-community-console__nav>button>span{display:none}.tg-page.theme-dark .tg-community-console__nav>button>i{width:42px;height:42px;border-radius:13px;background:transparent}.tg-page.theme-dark .tg-community-console__nav>button.is-active{background:rgba(31,145,229,.16);color:#55c5ff}.tg-page.theme-dark .tg-community-console__nav>button.is-active>i{background:rgba(47,169,239,.2)}
.tg-page.theme-dark .tg-community-console__content{padding:20px 22px 42px;background:radial-gradient(circle at top right,rgba(30,133,217,.08),transparent 31%),#0d1723}.tg-page.theme-dark .tg-community-console__profile-card,.tg-page.theme-dark .tg-community-console__quick>section,.tg-page.theme-dark .tg-community-console__panel,.tg-page.theme-dark .tg-community-console__invite,.tg-page.theme-dark .tg-community-console__danger{border-color:rgba(132,191,231,.16);border-radius:18px;background:rgba(15,28,42,.86)}
@media(max-width:720px){.tg-page.theme-dark .tg-community-console__hero{padding:15px}.tg-page.theme-dark .tg-community-console__workspace{grid-template-columns:1fr}.tg-page.theme-dark .tg-community-console__nav{padding:8px;flex-direction:row}.tg-page.theme-dark .tg-community-console__nav>button{min-width:48px;padding:7px}.tg-page.theme-dark .tg-community-console__content{padding:12px}}

/* Elega visual layer: rounded compact dialogs with blue controls. */
.tg-page.theme-dark .tg-modal:not(.tg-modal--story):not(.tg-modal--community):not(.tg-modal--self-profile):not(.tg-modal--profile){overflow:hidden!important;border-color:rgba(63,185,255,.4)!important;border-radius:28px!important;background:linear-gradient(145deg,#101c30,#0d1421)!important;box-shadow:0 30px 88px rgba(2,7,24,.65),inset 0 1px 0 rgba(255,255,255,.045)!important}
.tg-page.theme-dark .tg-modal:not(.tg-modal--story):not(.tg-modal--community):not(.tg-modal--self-profile):not(.tg-modal--profile) .tg-modal__head{height:68px;min-height:68px;padding:12px 16px;border-bottom-color:rgba(91,202,255,.18);background:linear-gradient(112deg,rgba(17,117,193,.38),rgba(15,25,43,.98) 62%)}
.tg-page.theme-dark .tg-modal:not(.tg-modal--story):not(.tg-modal--community):not(.tg-modal--self-profile):not(.tg-modal--profile) .tg-modal__head strong{font-size:16px;letter-spacing:-.012em}
.tg-page.theme-dark .tg-modal:not(.tg-modal--story):not(.tg-modal--community):not(.tg-modal--self-profile):not(.tg-modal--profile) .tg-modal__head .tg-round-btn{border-radius:13px;color:#a9e6ff;background:rgba(47,159,222,.15)}
.tg-page.theme-dark .tg-modal:not(.tg-modal--story):not(.tg-modal--community):not(.tg-modal--self-profile):not(.tg-modal--profile) .tg-modal__body{padding:18px;background:radial-gradient(circle at 100% 0,rgba(43,159,240,.13),transparent 38%),transparent}
.tg-page.theme-dark .tg-modal .tg-settings-row{border-color:rgba(80,184,247,.2);border-radius:16px;background:rgba(255,255,255,.025)}
.tg-page.theme-dark .tg-modal .tg-settings-row:hover{border-color:rgba(73,192,255,.54);background:rgba(37,143,221,.13)}
.tg-page.theme-dark .tg-modal .tg-field input,.tg-page.theme-dark .tg-modal .tg-field textarea,.tg-page.theme-dark .tg-modal .tg-field select{border-color:rgba(72,180,244,.36);background:rgba(8,13,27,.58)}
.tg-page.theme-dark .tg-modal .tg-field input:focus,.tg-page.theme-dark .tg-modal .tg-field textarea:focus,.tg-page.theme-dark .tg-modal .tg-field select:focus{border-color:#55c9ff;box-shadow:0 0 0 3px rgba(70,184,255,.16)}
.tg-page.theme-dark .tg-primary,.tg-page.theme-dark .tg-auth-submit{border:1px solid rgba(156,228,255,.72);background:linear-gradient(135deg,#128fe1,#26c7f3);box-shadow:0 10px 22px rgba(24,149,229,.34)}
.tg-page.theme-dark .tg-primary:hover,.tg-page.theme-dark .tg-auth-submit:hover{background:linear-gradient(135deg,#28a8f2,#4fd8fb)}
.tg-page.theme-dark .tg-secondary{gap:8px;border-color:rgba(87,193,255,.58);background:rgba(36,151,225,.11);color:#bfeeff}
.tg-page.theme-dark .tg-secondary:hover{border-color:#72d2ff;background:rgba(40,163,234,.21);color:#fff}
.tg-page.theme-dark .tg-info-row>.tg-icon,.tg-page.theme-dark .tg-settings-row>.tg-icon,.tg-page.theme-dark .tg-primary .tg-icon,.tg-page.theme-dark .tg-secondary .tg-icon{color:#62ceff}

/* Saved Messages has its own blue profile cover; its chat background stays unchanged. */
.tg-info-profile--enhanced.tg-info-profile--saved{padding-top:44px}
.tg-info-profile--enhanced.tg-info-profile--saved::before{height:112px;background:radial-gradient(circle at 78% 12%,rgba(174,231,255,.34),transparent 29%),linear-gradient(125deg,#175fc8 0%,#219ee6 56%,#6bd4f5 100%)}

/* Share QR dialog. */
.tg-qr-dialog{gap:16px!important;text-align:center}
.tg-qr-dialog__hero{display:flex;align-items:center;gap:13px;padding:14px 15px;border:1px solid rgba(78,191,255,.28);border-radius:19px;background:linear-gradient(135deg,rgba(31,139,219,.24),rgba(21,54,89,.25));text-align:left}
.tg-qr-dialog__hero>i{display:grid;place-items:center;flex:0 0 43px;width:43px;height:43px;border-radius:14px;color:#a7edff;background:linear-gradient(135deg,rgba(70,205,255,.26),rgba(30,125,232,.3))}
.tg-qr-dialog__hero .tg-icon{width:23px;height:23px}
.tg-qr-dialog__hero strong{display:block;font-size:15px}.tg-qr-dialog__hero p{margin:3px 0 0;color:var(--tg-muted);font-size:12px;line-height:1.4}
.tg-qr-dialog__code{display:grid;place-items:center;align-self:center;padding:15px;border:1px solid rgba(102,205,255,.3);border-radius:23px;background:#fff;box-shadow:0 12px 30px rgba(2,8,28,.35)}
.tg-qr-dialog__code img{display:block;width:min(238px,66vw);height:auto;aspect-ratio:1;object-fit:contain}
@media(max-width:640px){.tg-page.theme-dark .tg-modal:not(.tg-modal--story):not(.tg-modal--community):not(.tg-modal--self-profile):not(.tg-modal--profile){border-radius:24px!important}.tg-page.theme-dark .tg-modal:not(.tg-modal--story):not(.tg-modal--community):not(.tg-modal--self-profile):not(.tg-modal--profile) .tg-modal__body{padding:14px}.tg-qr-dialog__code{padding:11px}.tg-qr-dialog__code img{width:min(220px,70vw)}}

/* Elega start screen: shown while the messenger data is prepared. */
.elega-startup{position:fixed;z-index:1000;inset:0;display:grid;place-content:center;justify-items:center;color:#fff;background:#17191d;opacity:1;visibility:visible;transition:opacity .32s ease,visibility .32s step-end}
.elega-startup.is-hidden{opacity:0;visibility:hidden;pointer-events:none;transition:opacity .32s ease,visibility 0s linear .32s}
.elega-startup__mark{width:72px;height:72px;filter:drop-shadow(0 9px 20px rgba(0,0,0,.22));animation:elegaStartupMark 1.45s ease-in-out infinite}
.elega-startup__mark svg{display:block;width:100%;height:100%;fill:#fff}
@keyframes elegaStartupMark{50%{transform:scale(1.035);opacity:.9}}
@media(prefers-reduced-motion:reduce){.elega-startup__mark{animation:none}}

/* Elega profile and settings: selected blue dashboard design. */
.tg-page.theme-dark .tg-modal--self-profile{border-color:rgba(71,188,255,.24);background:#0b1421;box-shadow:0 28px 86px rgba(0,0,0,.58)}
.tg-page.theme-dark .tg-modal--self-profile .tg-modal__head{height:68px;min-height:68px;padding:12px 16px;border-bottom-color:rgba(108,194,247,.14);background:linear-gradient(110deg,#101f33,#0d1723)}
.tg-page.theme-dark .tg-self-profile3{padding:16px!important;background:radial-gradient(circle at 100% 0,rgba(25,152,231,.08),transparent 28%),#0b1421}
.tg-page.theme-dark .tg-self-profile3__hero{min-height:258px;border:1px solid rgba(103,207,255,.28);border-radius:24px;background:radial-gradient(circle at 83% 18%,rgba(186,238,255,.22),transparent 25%),linear-gradient(125deg,#0879dd 0%,#149ce3 56%,#56c5ee 100%);box-shadow:0 18px 42px rgba(5,84,157,.2)}
.tg-page.theme-dark .tg-self-profile3__hero-shade{background:linear-gradient(180deg,rgba(0,27,70,.04),rgba(4,35,75,.36))}
.tg-page.theme-dark .tg-self-profile3__hero::before{width:300px;height:300px;right:-138px;bottom:-220px;border-color:rgba(255,255,255,.12)}
.tg-page.theme-dark .tg-self-profile3__tool{border-color:rgba(220,247,255,.24);background:rgba(7,75,133,.32);color:#dcf7ff}
.tg-page.theme-dark .tg-self-profile3__tool:hover{background:rgba(255,255,255,.2)}
.tg-page.theme-dark .tg-self-profile3__actions{gap:10px;margin-top:14px}
.tg-page.theme-dark .tg-self-profile3__actions>button,.tg-page.theme-dark .tg-self-profile3__section,.tg-page.theme-dark .tg-self-profile3__stat-card,.tg-page.theme-dark .tg-self-profile3__privacy{border-color:rgba(92,183,237,.18);background:linear-gradient(145deg,rgba(16,30,47,.98),rgba(12,23,37,.98))}
.tg-page.theme-dark .tg-self-profile3__actions>button:hover{border-color:rgba(78,197,255,.52);box-shadow:0 12px 26px rgba(4,54,99,.22)}
.tg-page.theme-dark .tg-self-profile3__actions>button>.tg-icon{background:rgba(27,157,224,.16);color:#65d2ff}
.tg-page.theme-dark .tg-self-profile3__section>header,.tg-page.theme-dark .tg-self-profile3__stat-card>header,.tg-page.theme-dark .tg-self-profile3__facts>.tg-info-row{border-color:rgba(109,193,240,.12)}
.tg-page.theme-dark .tg-self-profile3__stats>div>i,.tg-page.theme-dark .tg-self-profile3__privacy>div{background:rgba(29,153,223,.16);color:#61d0ff}

.tg-page.theme-dark .tg-settings-screen-v2{background:radial-gradient(circle at 100% 0,rgba(35,154,232,.1),transparent 26%),#0b1421}
.tg-page.theme-dark .tg-settings-profile-v2{border-color:rgba(78,190,255,.22);background:#101a28;box-shadow:0 14px 34px rgba(0,0,0,.2)}
.tg-page.theme-dark .tg-settings-profile-v2__cover{height:104px;background:radial-gradient(circle at 85% 15%,rgba(211,246,255,.24),transparent 24%),linear-gradient(125deg,#087de1,#1da4e5 58%,#67d0f1)!important}
.tg-page.theme-dark .tg-settings-profile-v2__main>.tg-avatar{border-color:#101a28;box-shadow:0 12px 27px rgba(4,57,104,.3)}
.tg-page.theme-dark .tg-settings-profile-v2__main>button{border:1px solid rgba(89,204,255,.38);background:rgba(26,160,228,.16);color:#76dbff}
.tg-page.theme-dark .tg-settings-profile-v2__main>button:hover{background:rgba(31,174,240,.26)}
.tg-page.theme-dark .tg-settings-profile-v2__stats{grid-template-columns:repeat(2,minmax(0,1fr));border-color:rgba(103,194,241,.13);background:#0e1825}
.tg-page.theme-dark .tg-profile-background-picker,.tg-page.theme-dark .tg-settings-account-v2{border-color:rgba(86,184,239,.18);background:linear-gradient(145deg,#111e2e,#0e1724)}
.tg-page.theme-dark .tg-profile-background-picker>header>b{background:rgba(34,158,225,.17);color:#69d4ff}
.tg-page.theme-dark .tg-profile-background-card{border-color:rgba(89,185,239,.16);background:#101b29}.tg-page.theme-dark .tg-profile-background-card.is-active{border-color:#55caff;box-shadow:0 0 0 2px rgba(65,190,255,.16)}
.tg-page.theme-dark .tg-settings-grid-v2{gap:10px}.tg-page.theme-dark .tg-settings-tile-v2{border-color:rgba(88,183,237,.19);border-radius:18px;background:linear-gradient(145deg,#111d2b,#0e1723)}
.tg-page.theme-dark .tg-settings-tile-v2:hover{border-color:rgba(84,202,255,.5);background:linear-gradient(145deg,#132536,#101d2b);box-shadow:0 12px 28px rgba(2,47,85,.23)}
.tg-page.theme-dark .tg-settings-tile-v2>i{background:rgba(29,155,225,.15);color:#61d1ff}.tg-page.theme-dark .tg-settings-tile-v2.is-violet>i,.tg-page.theme-dark .tg-settings-tile-v2.is-blue>i,.tg-page.theme-dark .tg-settings-tile-v2.is-cyan>i,.tg-page.theme-dark .tg-settings-tile-v2.is-orange>i,.tg-page.theme-dark .tg-settings-tile-v2.is-green>i,.tg-page.theme-dark .tg-settings-tile-v2.is-red>i{background:rgba(29,155,225,.15);color:#61d1ff}
@media(max-width:720px){.tg-page.theme-dark .tg-self-profile3{padding:10px!important}.tg-page.theme-dark .tg-self-profile3__hero{min-height:286px;border-radius:21px}.tg-page.theme-dark .tg-settings-profile-v2__cover{height:96px}}

/* New blue icon system for profile and settings actions. */
.tg-page.theme-dark .tg-self-profile3__actions>button>.tg-icon,.tg-page.theme-dark .tg-settings-tile-v2>i,.tg-page.theme-dark .tg-self-profile3__stats>div>i,.tg-page.theme-dark .tg-self-profile3__privacy>div{position:relative;overflow:hidden;border:1px solid rgba(103,215,255,.26);background:linear-gradient(145deg,rgba(22,191,246,.27),rgba(19,96,185,.24))!important;color:#78ddff!important;box-shadow:inset 0 1px 0 rgba(223,250,255,.12),0 8px 18px rgba(5,67,126,.2)}
.tg-page.theme-dark .tg-self-profile3__actions>button>.tg-icon::before,.tg-page.theme-dark .tg-settings-tile-v2>i::before,.tg-page.theme-dark .tg-self-profile3__stats>div>i::before,.tg-page.theme-dark .tg-self-profile3__privacy>div::before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 28% 18%,rgba(214,251,255,.2),transparent 36%);pointer-events:none}
.tg-page.theme-dark .tg-self-profile3__actions>button>.tg-icon .tg-icon,.tg-page.theme-dark .tg-settings-tile-v2>i .tg-icon,.tg-page.theme-dark .tg-self-profile3__stats>div>i .tg-icon,.tg-page.theme-dark .tg-self-profile3__privacy>div .tg-icon{position:relative;z-index:1;filter:drop-shadow(0 1px 5px rgba(0,203,255,.32))}
.tg-page.theme-dark .tg-self-profile3__actions>button:hover>.tg-icon,.tg-page.theme-dark .tg-settings-tile-v2:hover>i{border-color:rgba(141,229,255,.62);background:linear-gradient(145deg,rgba(39,211,255,.38),rgba(28,120,222,.33))!important;transform:translateY(-1px)}
