/* Telegram-only visual shell. Existing browser layout and account data stay independent. */
html[data-telegram]{--bg:#f4f4f6;--surface:#fff;--raised:#ececef;--hover:#e8e8ed;--line:#e3e3e8;--ink:#202125;--muted:#7c7d86;--orange:#f56b3d;--green:#f56b3d;--soft:#f56b3d12;--mini-dock:76px;font-family:Arial,'Segoe UI',sans-serif}
html[data-telegram][data-theme=dark]{--bg:#131416;--surface:#1c1d20;--raised:#25262b;--hover:#2b2c32;--line:#2a2b31;--ink:#f0f0f3;--muted:#94959e;--soft:#f56b3d16}
html[data-telegram] body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;padding-bottom:calc(var(--mini-dock) + var(--rifma-safe-bottom) + 15px)}
html[data-telegram] header{position:sticky;top:var(--rifma-safe-top);display:flex;flex-wrap:nowrap;gap:12px;min-height:64px;padding:10px 16px;background:var(--bg);color:var(--ink);border:0;z-index:40}
html[data-telegram] header .brand{font-size:23px;letter-spacing:-.8px;text-decoration:none;color:var(--ink);gap:5px;font-weight:700}
html[data-telegram] .brand .mark{background:none;color:var(--orange);font-size:28px;width:auto;height:auto;font-weight:700;letter-spacing:-1px}
html[data-telegram] header>.workspace-tabs,html[data-telegram] header .account-nav{display:none}
html[data-telegram] header .header-actions{flex:1;flex-basis:auto;flex-wrap:nowrap;justify-content:flex-end;order:initial;gap:8px;padding:0;margin:0}
html[data-telegram] header #notificationsNav{margin-left:0}
html[data-telegram] header .notification-button,html[data-telegram] header .themebutton{width:36px;height:36px;min-width:36px;border:1px solid var(--line);background:transparent;color:var(--muted);border-radius:50%;padding:7px;display:grid;place-items:center}
html[data-telegram] header .theme-label{display:none}
html[data-telegram] header .notification-button svg{width:19px;height:19px}
html[data-telegram] header .notification-button.active,html[data-telegram] header .notification-button[aria-expanded=true]{color:var(--ink);background:var(--raised)}
html[data-telegram] main{max-width:900px;padding:12px 16px 24px}
html[data-telegram] .mini-dock{position:fixed;z-index:100;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;bottom:calc(10px + var(--rifma-safe-bottom));left:calc(12px + var(--rifma-safe-left));right:calc(12px + var(--rifma-safe-right));max-width:540px;margin:0 auto;padding:8px 6px;background:var(--surface);border:1px solid var(--line);border-radius:23px;box-shadow:0 5px 25px #0002}
html[data-telegram] .mini-dock-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:44px;border:0;border-radius:14px;background:none;color:var(--muted);font-size:9px;font-weight:500;padding:3px}
html[data-telegram] .mini-dock-item svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round}
html[data-telegram] .mini-dock-item.active{color:var(--ink);background:var(--raised)}
html[data-telegram] .mini-create svg{color:var(--orange);width:29px;height:29px;stroke-width:1.5}
html[data-telegram] .mini-create span{display:none}
html[data-telegram].mini-keyboard .mini-dock{display:none}
html[data-telegram] .mini-creators{margin-top:26px;padding:15px 0;color:var(--muted);border-top:1px solid var(--line);font-size:10px}
html[data-telegram] .mini-creators summary{cursor:pointer}
html[data-telegram] .mini-creators .author-avatars{margin:15px 0 0;gap:12px}
html[data-telegram] main>footer{font-size:9px;line-height:1.6;opacity:.7;padding-top:12px}
html[data-telegram] main>footer>span:first-child{display:none}
html[data-telegram] .community-heading{margin:0 0 18px;gap:12px;align-items:center;min-height:40px}
html[data-telegram] .community-heading .account-eyebrow,html[data-telegram] .community-heading>div>p{display:none}
html[data-telegram] .community-heading h1{font-size:24px;letter-spacing:-.6px;margin:0;line-height:1.3;font-weight:650}
html[data-telegram] .community-compose{display:flex;align-items:center;gap:5px;font-size:11px;font-weight:500;padding:9px 12px;border-radius:12px;background:var(--raised);color:var(--ink)}
html[data-telegram] .community-compose svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.7}
html[data-telegram] .community-layout{display:flex;flex-direction:column;gap:15px}
html[data-telegram] .community-main{width:100%}
html[data-telegram] .community-aside{position:static;order:-1;width:100%}
html[data-telegram] .community-note{display:none}
html[data-telegram] .daily-reminder{margin:0;padding:14px 15px;border:0;border-radius:15px;background:var(--surface);gap:12px;min-height:66px}
html[data-telegram] .daily-reminder-mark{color:var(--orange);font-size:23px;width:30px;text-align:center}
html[data-telegram] .daily-reminder strong{font-size:13px;font-weight:600;margin-bottom:3px}
html[data-telegram] .daily-reminder span span{font-size:10px;line-height:1.5}
html[data-telegram] .community-toolbar{border:0;padding:0;gap:12px;position:relative}
html[data-telegram] .community-scopes{display:flex;gap:20px;border:0}
html[data-telegram] .community-scopes .tab{background:none;border:0;border-bottom:2px solid transparent;padding:5px 0 8px;border-radius:0;font-size:13px;color:var(--muted)}
html[data-telegram] .community-scopes .tab.active{color:var(--ink);border-color:var(--orange)}
html[data-telegram] .community-filters{flex-wrap:nowrap;gap:6px;width:100%;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
html[data-telegram] .community-filters button{flex-shrink:0;border:0;background:var(--surface);padding:7px 11px;border-radius:9px;font-size:10px;color:var(--muted)}
html[data-telegram] .community-filters button.active{background:var(--raised);color:var(--ink)}
html[data-telegram] .community-refresh{position:absolute;right:0;top:7px;font-size:0;min-width:32px;min-height:28px;color:var(--muted)}
html[data-telegram] .community-refresh:before{content:'↻';font-size:21px}
html[data-telegram] #communityStatus{margin:9px 0;font-size:11px}
html[data-telegram] #communityStatus:empty{display:none}
html[data-telegram] #communityFeed{gap:12px;margin-top:13px}
html[data-telegram] .community-post{border:0;background:var(--surface);border-radius:16px;padding:16px}
html[data-telegram] .post-top{gap:10px;margin-bottom:14px}
html[data-telegram] .post-author>.account-mini-avatar{width:33px;height:33px;border-radius:11px;font-size:11px}
html[data-telegram] .post-author strong{font-size:12px;font-weight:600}
html[data-telegram] .post-author time{font-size:9px;margin-top:2px}
html[data-telegram] .post-category{font-size:9px;border-radius:7px;background:var(--raised);color:var(--muted);padding:4px 7px}
html[data-telegram] .community-post h2{font-size:17px;line-height:1.4;letter-spacing:-.25px;margin-bottom:9px;font-weight:600}
html[data-telegram] .post-body{font-size:12px;line-height:1.75;margin-bottom:14px}
html[data-telegram] .post-player{margin-top:12px;border:0;border-radius:10px;overflow:hidden;background:var(--raised)}
html[data-telegram] .player-embed-heading{height:31px;padding:0 11px;background:var(--raised);border:0}
html[data-telegram] .player-embed-brand{font-size:7px;letter-spacing:1px}
html[data-telegram] .player-embed-heading .post-track-link{font-size:8px}
html[data-telegram] .post-player .player-volume{padding:7px 10px;background:var(--raised);border:0;gap:5px}
html[data-telegram] .player-volume-label,html[data-telegram] .post-player .player-volume-label,html[data-telegram] .post-player .player-volume-value{font-size:9px}
html[data-telegram] .post-social{margin-top:12px;padding-top:10px;gap:20px;border:0}
html[data-telegram] .post-social .post-like,html[data-telegram] .post-social .post-comments-toggle{font-size:13px}
html[data-telegram] .post-views{font-size:11px}
html[data-telegram] .post-social svg{width:16px;height:16px}
html[data-telegram] .post-actions{margin-top:10px;padding-top:10px;gap:15px}
html[data-telegram] .post-actions button{font-size:10px}
html[data-telegram] .community-author-card{border:0;padding:18px;background:var(--surface);border-radius:16px;gap:15px;margin-bottom:18px;flex-direction:row;flex-wrap:wrap}
html[data-telegram] .community-author-card>.profile-avatar{width:66px;height:66px;border-radius:22px;font-size:22px}
html[data-telegram] .community-author-info{flex:1;min-width:180px}
html[data-telegram] .community-author-info h2{font-size:22px;margin-bottom:8px}
html[data-telegram] .community-author-bio{font-size:12px;line-height:1.7}
html[data-telegram] .profile-connections{gap:18px;margin-bottom:12px}
html[data-telegram] .profile-connection{font-size:11px}
html[data-telegram] .author-back,html[data-telegram] .author-edit,html[data-telegram] .author-follow,html[data-telegram] .author-message{font-size:11px;border-radius:10px;padding:9px 12px}
html[data-telegram] .community-empty{border:0;border-radius:16px;padding:30px 20px}
html[data-telegram] .community-empty-symbol{display:none}
html[data-telegram] .community-empty h2{font-size:18px}
html[data-telegram] .community-empty p{font-size:12px}
html[data-telegram] .daily-panel{padding-top:0}
html[data-telegram] .daily-heading h1{font-size:24px;letter-spacing:-.6px}
html[data-telegram] .daily-heading{margin-bottom:18px}
html[data-telegram] .daily-heading p{font-size:11px}
html[data-telegram] .daily-track{padding:16px 0}
html[data-telegram] .daily-track-heading h2{font-size:16px}
html[data-telegram] .daily-track .post-player{border-radius:9px}
html[data-telegram] .daily-track .player-volume{background:transparent}
html[data-telegram] .daily-about{border-radius:13px;background:var(--surface);padding:14px;margin-top:18px}
html[data-telegram] .studio-hero,html[data-telegram] .studio-banner{display:none!important}
html[data-telegram] .mini-studio-heading{margin-bottom:18px}
html[data-telegram] .mini-studio-heading h1{font-size:24px;letter-spacing:-.6px;margin:0 0 5px}
html[data-telegram] .mini-studio-heading p{font-size:11px;color:var(--muted);margin:0}
html[data-telegram] #rhymeSubnav{gap:17px;margin-bottom:16px}
html[data-telegram] #rhymeSubnav button{font-size:11px;white-space:nowrap}
html[data-telegram] .searchbox,html[data-telegram] .selected-panel,html[data-telegram] .linecard{background:var(--surface);border:0;border-radius:15px;padding:16px}
html[data-telegram] .search-heading{display:none}
html[data-telegram] .primary{border-radius:10px;font-weight:600}
html[data-telegram] input[type=text],html[data-telegram] select,html[data-telegram] textarea{border-radius:10px}
html[data-telegram] .word{border:0;border-radius:10px;font-size:14px;padding:11px 10px}
html[data-telegram] .messages-layout{border:0;border-radius:15px;background:var(--surface)}
html[data-telegram] #messagesPanel>.eyebrow,html[data-telegram] #notificationsPanel>.eyebrow{display:none}
html[data-telegram] #messagesPanel>h1,html[data-telegram] .notifications-heading h1{font-size:24px;letter-spacing:-.6px;margin:0 0 20px}
html[data-telegram] .notifications-heading p{display:none}
html[data-telegram] .chat-sidebar{padding:12px 0}
html[data-telegram] .chat-sidebar h2{font-size:12px;font-weight:500;color:var(--muted)}
html[data-telegram] .message-bubble{border:0;border-radius:12px 12px 12px 3px}
html[data-telegram] .message-bubble.own{background:var(--raised);color:var(--ink);border-radius:12px 12px 3px 12px;border:1px solid var(--line)}
html[data-telegram] .message-bubble p{font-size:12px}
html[data-telegram] .message-form{padding:12px}
html[data-telegram] .notification-item{background:var(--surface);border-radius:12px;border:0}
html[data-telegram] .notification-popover{border-radius:16px;box-shadow:0 12px 30px #0004}
html[data-telegram] .notification-popover:before{display:none}
html[data-telegram] dialog{border:1px solid var(--line);border-radius:19px;padding:23px;background:var(--surface)}
html[data-telegram] dialog h2{font-size:23px;letter-spacing:-.6px}
html[data-telegram] .account-eyebrow{font-size:9px;letter-spacing:1px}
@media(min-width:850px){html[data-telegram] main{padding-top:20px}html[data-telegram] .community-layout{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:20px}html[data-telegram] .community-aside{order:initial;position:sticky;top:85px}html[data-telegram] .community-note{display:block;border:0;border-radius:15px;padding:18px;margin-top:16px}html[data-telegram] .community-note-icon{display:none}html[data-telegram] .community-note h2{font-size:16px}html[data-telegram] .community-note p,html[data-telegram] .community-guide span{font-size:11px}}
@media(max-width:380px){html[data-telegram] header{padding:10px 12px;gap:7px}html[data-telegram] header .brand{font-size:20px}html[data-telegram] header .header-actions{gap:5px}html[data-telegram] main{padding-left:12px;padding-right:12px}html[data-telegram] .mini-dock{left:8px;right:8px}html[data-telegram] .community-post{padding:13px}}
html[data-telegram] .community-aside{display:block}
html[data-telegram] .community-heading{flex-direction:row;text-align:left;align-items:center}
html[data-telegram] .community-heading h1{text-align:left}
html[data-telegram] .post-player iframe{height:166px}
html[data-telegram] .post-player .player-loading{height:166px;top:31px}
html[data-telegram] .daily-track .post-player .player-loading{top:0}
html[data-telegram] #profilePanel>.eyebrow{display:none}
html[data-telegram] #profilePanel>h1{font-size:24px;margin:0 0 20px;letter-spacing:-.6px}
html[data-telegram] header .mini-fullscreen{width:36px;height:36px;flex-shrink:0;display:grid;place-items:center;padding:8px;border:1px solid var(--line);border-radius:50%;background:transparent;color:var(--muted)}
html[data-telegram] .mini-fullscreen svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}
html[data-telegram] .mini-fullscreen[aria-pressed=true]{color:var(--ink);background:var(--raised)}
html[data-telegram] .mini-fullscreen-status{font-size:11px;line-height:1.7;background:var(--surface);color:var(--muted);padding:12px;border-radius:10px;margin:0 0 15px}
/* An open conversation uses the full available bottom edge for its composer. */
html[data-telegram].mini-chat-open .mini-dock{display:none}
html[data-telegram].mini-chat-open body{padding-bottom:calc(var(--rifma-safe-bottom) + 16px)}
html[data-telegram] .message-form{scroll-margin-bottom:calc(var(--rifma-safe-bottom) + 20px)}
html[data-telegram] #messageText{scroll-margin-top:80px;scroll-margin-bottom:calc(var(--rifma-safe-bottom) + 72px)}
/* Safe-area padding belongs inside the header, not in a transparent gap above it. */
html[data-telegram] body{padding-top:0}
html[data-telegram] header{top:0;padding-top:calc(10px + var(--rifma-safe-top));padding-bottom:10px;isolation:isolate}
@media(min-width:1000px){
 html[data-telegram] body{padding-bottom:24px}
 html[data-telegram] header{position:relative;margin-left:88px;min-height:82px;padding-left:42px;padding-right:40px}
 html[data-telegram] header .brand{font-size:26px}
 html[data-telegram] main{max-width:1540px;padding:24px 40px 40px 128px;margin:0 auto}
 html[data-telegram] .mini-dock,html[data-telegram].mini-chat-open .mini-dock,html[data-telegram].mini-keyboard .mini-dock{display:flex;flex-direction:column;gap:13px;align-items:center;justify-content:flex-start;top:calc(var(--rifma-safe-top) + 15px);bottom:20px;left:12px;right:auto;width:64px;max-width:none;margin:0;padding:15px 5px;background:var(--bg);border:0;border-right:1px solid var(--line);border-radius:0;box-shadow:none}
 html[data-telegram] .mini-dock-item{width:48px;min-height:49px;gap:5px;font-size:9px;border-radius:13px;flex-shrink:0}
 html[data-telegram] .mini-dock-item[data-section=profile]{margin-top:auto}
 html[data-telegram] .mini-create{order:0}
 html[data-telegram] .community-heading{margin-bottom:24px}
 html[data-telegram] .community-heading h1{font-size:28px}
 html[data-telegram] .community-layout{grid-template-columns:minmax(0,1fr) 285px;gap:28px}
 html[data-telegram] .community-aside{top:24px}
 html[data-telegram] .community-post{padding:22px;border-radius:15px}
 html[data-telegram] .community-post h2{font-size:19px}
 html[data-telegram] .post-body{font-size:14px}
 html[data-telegram] .post-author strong{font-size:13px}
 html[data-telegram] .post-author time{font-size:10px}
 html[data-telegram] .post-category{font-size:10px}
 html[data-telegram] .community-filters button{font-size:12px;padding:8px 13px}
 html[data-telegram] .community-scopes .tab{font-size:14px}
 html[data-telegram] .community-note p,html[data-telegram] .community-guide span{font-size:12px}
 html[data-telegram] .daily-panel{max-width:1100px}
 html[data-telegram] .messages-layout{grid-template-columns:300px minmax(0,1fr)}
 html[data-telegram] .message-log{height:clamp(260px,calc(var(--rifma-webview-height,100dvh) - 430px),650px)}
 html[data-telegram] .chat-conversation{min-height:580px}
 html[data-telegram] .mini-creators,html[data-telegram] main>footer{max-width:1000px}
}
/* Creator SoundCloud links remain visible in the Mini App header. */
html[data-telegram] header{flex-wrap:wrap}
html[data-telegram] header>.mini-author-links{display:flex;align-items:center;justify-content:flex-end;gap:9px;margin:0 0 0 12px;order:2;flex-shrink:0}
html[data-telegram] header>.mini-author-links a{width:30px;height:30px;border-radius:50%}
@media(max-width:650px){html[data-telegram] header>.mini-author-links{flex-basis:100%;justify-content:flex-start;margin:0;padding:2px 0 0;gap:10px}html[data-telegram] header>.mini-author-links a{width:28px;height:28px}}
html[data-telegram] .daily-track{padding:18px}html[data-telegram] .daily-track-heading h2{font-size:17px}html[data-telegram] .daily-track .daily-author{font-size:12px;color:var(--ink)}html[data-telegram] .daily-meta{padding:11px 14px}html[data-telegram] .daily-track .account-mini-avatar{width:34px;height:34px}
@media(max-width:500px){html[data-telegram] .daily-track{padding:14px}html[data-telegram] .daily-track-heading h2{font-size:16px}html[data-telegram] .post-social .post-likers{font-size:10px}}
