.telegram-profile-media{min-width:0}.tp-body{min-width:0}.tp-bio,.tp-caption{white-space:pre-wrap;overflow-wrap:anywhere}.tp-tabs{display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid var(--line,#344450);padding-bottom:10px;margin:12px 0}.tp-tabs button{flex:1;min-width:85px;padding:9px 6px;font-size:12px}.tp-tabs [aria-selected=true]{border-color:var(--accent,#58baf0);color:var(--accent,#58baf0);background:var(--surface-2,#243440)}
.telegram-profile-media button,.tp-dialog button,.tp-dialog textarea{font:inherit;color:var(--text,#e5edf4);background:var(--surface-2,#243440);border:1px solid var(--line,#3c4c58);border-radius:9px;padding:9px 12px;box-sizing:border-box}.telegram-profile-media button,.tp-dialog button{cursor:pointer}.telegram-profile-media button:disabled,.tp-dialog button:disabled{opacity:.4;cursor:default}.telegram-profile-media button:focus-visible,.tp-dialog button:focus-visible,.tp-dialog textarea:focus-visible{outline:2px solid var(--accent,#58baf0);outline-offset:2px}
.tp-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.tp-tile{position:relative;min-width:0;overflow:hidden;padding:0!important;border-radius:6px!important;text-align:start}.tp-thumbnail{display:grid;width:100%;aspect-ratio:1;place-items:center;font-size:28px;overflow:hidden;background:var(--surface,#182630)}.tp-thumbnail img{width:100%;height:100%;object-fit:cover}.tp-tile time{display:block;padding:5px;font-size:10px;color:var(--muted,#9fb4c4);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tp-video-badge{position:absolute;top:5px;right:5px;padding:2px 6px;color:#fff;background:#0008;border-radius:5px;font-size:12px}
.tp-dialog{padding:0;margin:auto;color:var(--text,#e5edf4);background:var(--surface,#182630);border:1px solid var(--line,#3c4c58);border-radius:16px;width:min(760px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;box-shadow:0 18px 80px #0009}.tp-dialog::backdrop{background:#000a}.tp-dialog .tp-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-bottom:1px solid var(--line,#3c4c58);background:var(--surface,#182630);position:sticky;top:0;z-index:2}.tp-header>div{min-width:0}.tp-header h2{font-size:17px;margin:0 0 4px;overflow-wrap:anywhere}.tp-header small{color:var(--muted,#9fb4c4)}.tp-header>button{font-size:23px;flex:0 0 42px}.tp-dialog .tp-body{padding:16px 18px}.tp-dialog .tp-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.tp-dialog .tp-tabs button{font-size:14px}.tp-viewer-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.tp-viewer-tools>span{color:var(--muted,#9fb4c4);direction:ltr}.tp-stage{display:flex;align-items:center;gap:8px;min-height:180px}.tp-visual{background:#000;display:grid;place-items:center;flex:1;min-width:0;min-height:180px;border-radius:10px;overflow:hidden;color:#fff}.tp-visual img,.tp-visual video{display:block;width:100%;height:min(56dvh,640px);object-fit:contain}.tp-step{border-radius:50%!important;padding:0!important;font-size:32px!important;width:36px;height:36px;flex:0 0 36px;direction:ltr}.tp-date{display:block;font-size:12px;margin:12px 0 0;color:var(--muted,#9fb4c4)}.tp-caption{margin:8px 0}.tp-help{font-size:12px;color:var(--muted,#9fb4c4)}.tp-reply{position:sticky;bottom:-16px;padding:12px 0 2px;background:var(--surface,#182630)}.tp-reply label{display:flex;justify-content:space-between;gap:12px;font-size:13px;margin-bottom:7px}.tp-reply small{color:var(--muted,#9fb4c4)}.tp-reply>div{display:flex;gap:8px;align-items:center}.tp-reply textarea{resize:vertical;min-height:48px;max-height:140px;flex:1;min-width:0}.tp-reply button{background:var(--accent,#58baf0);color:var(--accent-contrast,#07283b);width:44px;height:44px;border:0;border-radius:50%;padding:0;font-size:23px;flex:0 0 44px}
@media(max-width:520px){.tp-dialog{width:calc(100vw - 12px);max-height:calc(100dvh - 12px);border-radius:12px}.tp-dialog .tp-body{padding:12px}.tp-dialog .tp-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.tp-dialog .tp-header{padding:12px}.tp-stage{gap:4px}.tp-step{width:29px;height:34px;flex-basis:29px}.tp-visual img,.tp-visual video{height:48dvh}.tp-reply{bottom:-12px}.tp-reply label{flex-wrap:wrap;gap:3px}.tp-header h2{font-size:15px}}

.profile-gallery-avatar{padding:0;border:0;background:transparent;color:inherit;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;flex:0 0 auto}.profile-gallery-avatar:focus-visible{outline:2px solid var(--accent,#58baf0);outline-offset:4px}.profile-gallery-avatar:disabled{cursor:default;opacity:.6}

.tp-grid{gap:8px}.tp-tile{border-radius:14px!important;box-shadow:inset 0 1px 0 #ffffff17,0 3px 10px #00000012;background:linear-gradient(145deg,var(--surface-2,#243440),var(--surface,#182630))!important}.tp-thumbnail{background:linear-gradient(135deg,var(--surface-2,#243440),var(--surface,#182630));color:var(--muted,#9fb4c4)}.tp-tile time{padding:7px 8px;font-size:11px}.tp-tile:hover{border-color:var(--accent,#58baf0)}.tp-thumbnail img{border-radius:12px 12px 0 0}.tp-tabs button{border-radius:11px}.tp-stage{position:relative}.tp-visual{border-radius:16px}.tp-dialog{box-shadow:0 22px 80px #0008,inset 0 1px 0 #ffffff18}
