:root{--font-sans:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;--ease:cubic-bezier(0.4,0,0.2,1);--duration:0.24s;--page-gap:1rem;--block-gap:0.75rem;--radius-sm:10px;--radius-md:12px;--radius-lg:14px;--radius-xl:18px}[data-theme=light]{color-scheme:light;--bg:#ffffff;--bg-elevated:#ffffff;--surface-1:#ffffff;--surface-2:#f7f7f7;--surface-3:#e3e3e3;--surface-hover:#f0f0f0;--text:#0a0a0a;--text-secondary:#525252;--text-tertiary:#8a8a8a;--accent:#0a0a0a;--accent-hover:#2a2a2a;--accent-soft:rgba(10,10,10,0.06);--accent-on:#fafafa;--separator:rgba(10,10,10,0.1);--outline:rgba(10,10,10,0.16);--border-strong:rgba(10,10,10,0.22);--danger:#c62828;--success:#2e7d32;--nav-bg:rgba(255,255,255,0.9);--msg-user:#1a1a1a;--msg-user-text:#fafafa;--msg-assistant:#e0e0e0;--msg-assistant-text:#141414;--input-bg:#ffffff;--focus-ring:0 0 0 3px rgba(10,10,10,0.18);--shadow-sm:0 1px 2px rgba(0,0,0,0.05),0 2px 8px rgba(0,0,0,0.04);--shadow-md:0 8px 24px rgba(0,0,0,0.1);--shadow-nav:0 -1px 0 var(--separator),0 -12px 32px rgba(0,0,0,0.06);--glow:none}[data-theme=dark]{color-scheme:dark;--bg:#0a0a0a;--bg-elevated:#141414;--surface-1:#161616;--surface-2:#222222;--surface-3:#2e2e2e;--surface-hover:#2a2a2a;--text:#fafafa;--text-secondary:#b3b3b3;--text-tertiary:#737373;--accent:#fafafa;--accent-hover:#e0e0e0;--accent-soft:rgba(250,250,250,0.1);--accent-on:#0a0a0a;--separator:rgba(255,255,255,0.09);--outline:rgba(255,255,255,0.14);--border-strong:rgba(255,255,255,0.2);--danger:#f07178;--success:#8bc48a;--nav-bg:rgba(10,10,10,0.94);--msg-user:#fafafa;--msg-user-text:#0a0a0a;--msg-assistant:#262626;--msg-assistant-text:#f0f0f0;--input-bg:#161616;--focus-ring:0 0 0 3px rgba(255,255,255,0.22);--shadow-sm:0 1px 2px rgba(0,0,0,0.5),0 2px 10px rgba(0,0,0,0.35);--shadow-md:0 12px 32px rgba(0,0,0,0.55);--shadow-nav:0 -1px 0 var(--separator),0 -16px 40px rgba(0,0,0,0.45);--glow:radial-gradient(ellipse 100% 60% at 50% -30%,rgba(255,255,255,0.07),transparent 60%)}html:not([data-theme]){color-scheme:light dark}*{box-sizing:border-box}html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;scrollbar-gutter:stable}body,html{margin:0;min-height:100%;font-family:var(--font-sans);background:var(--bg);color:var(--text);transition:background-color var(--duration) var(--ease),color var(--duration) var(--ease)}[data-theme=dark] body{background-image:var(--glow);background-repeat:no-repeat}a{color:var(--text);text-decoration:underline;text-underline-offset:3px;-webkit-text-decoration-color:var(--text-tertiary);text-decoration-color:var(--text-tertiary)}a:hover{-webkit-text-decoration-color:var(--text);text-decoration-color:var(--text)}button,input,select,textarea{font:inherit;color:inherit}button{transition:background-color var(--duration) var(--ease),color var(--duration) var(--ease),border-color var(--duration) var(--ease),opacity .12s var(--ease),box-shadow var(--duration) var(--ease);touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:active:not(:disabled){opacity:.88}.btn{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;padding:.72rem 1.2rem;border-radius:var(--radius-md);border:1px solid transparent;cursor:pointer;background:var(--accent);color:var(--accent-on);font-weight:600;font-size:.94rem;letter-spacing:.015em;box-shadow:var(--shadow-sm)}.btn:hover:not(:disabled){background:var(--accent-hover)}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-outline{background:var(--surface-1);border:1px solid var(--border-strong);color:var(--text);box-shadow:none}.btn-outline:hover:not(:disabled){background:var(--surface-hover)}.btn-danger{background:var(--danger);color:#fff}.btn-danger:hover:not(:disabled){filter:brightness(1.08)}.btn-ghost{background:transparent;color:var(--text-secondary);box-shadow:none;padding:.5rem .65rem;border-radius:var(--radius-sm);border:none}.btn-ghost:hover:not(:disabled){background:var(--accent-soft);color:var(--text)}.auth-actions{display:flex;flex-direction:column;gap:.65rem;margin-top:1rem;align-items:stretch}.auth-actions .btn{width:100%;margin:0}.auth-actions .auth-link{width:100%;text-align:center;padding:.65rem;color:var(--text-secondary)}.card{background:var(--surface-1);border-radius:var(--radius-lg);padding:1rem;box-shadow:var(--shadow-sm);border:1px solid var(--border-strong);transition:background-color var(--duration) var(--ease),border-color var(--duration) var(--ease),box-shadow var(--duration) var(--ease)}.field{width:100%;padding:.75rem .9rem;border-radius:var(--radius-md);border:1px solid var(--outline);background:var(--input-bg);color:var(--text);transition:border-color var(--duration) var(--ease),box-shadow var(--duration) var(--ease),background-color var(--duration) var(--ease)}.field::placeholder{color:var(--text-tertiary)}.field:focus{outline:none;border-color:var(--text-secondary);box-shadow:var(--focus-ring)}.shell{display:flex;flex-direction:column;min-height:100dvh;max-width:430px;margin:0 auto;background:var(--bg-elevated);box-shadow:var(--shadow-md)}[data-theme=light] .shell{margin-top:.75rem;margin-bottom:.75rem;min-height:calc(100dvh - 1.5rem);border-radius:var(--radius-xl);overflow:hidden}[data-theme=dark] .shell{background:var(--bg);box-shadow:0 0 0 1px var(--separator),0 0 80px rgba(0,0,0,.4);border-radius:0;margin-top:0;margin-bottom:0;min-height:100dvh}.shell-main{flex:1 1;padding:.75rem 1rem calc(5.5rem + env(safe-area-inset-bottom, 0px));overflow-y:auto;-webkit-overflow-scrolling:touch}.shell-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:430px;display:flex;padding-bottom:env(safe-area-inset-bottom,0);background:var(--nav-bg);backdrop-filter:saturate(180%) blur(20px);-webkit-backdrop-filter:saturate(180%) blur(20px);border-top:1px solid var(--separator);box-shadow:var(--shadow-nav);z-index:50;transition:background-color var(--duration) var(--ease),border-color var(--duration) var(--ease)}.shell-nav button{flex:1 1;padding:.55rem .25rem .45rem;background:none;border:none;color:var(--text-tertiary);font-size:.65rem;font-weight:500;letter-spacing:.01em;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:.15rem}.shell-nav button .nav-icon{font-size:1.35rem;line-height:1;opacity:.85;transition:transform .15s var(--ease),opacity var(--duration) var(--ease)}.shell-nav button.active{color:var(--text);font-weight:600}.shell-nav button.active .nav-icon{opacity:1;transform:scale(1.08);filter:none}.menu-list{display:flex;flex-direction:column;gap:var(--block-gap,.75rem)}.menu-item{text-align:left;width:100%;padding:.9rem 1rem;border-radius:var(--radius-md);border:none;background:var(--surface-1);color:var(--text);cursor:pointer;box-shadow:var(--shadow-sm);font-weight:500}.menu-item:hover{background:var(--surface-hover)}.menu-item small{display:block;color:var(--text-secondary);font-weight:400;margin-top:.25rem;font-size:.8rem}.menu-item-static{display:flex;align-items:center;justify-content:space-between;gap:.75rem;cursor:default}.menu-item-static:hover{background:var(--surface-1)}.menu-item-static .btn-ghost{flex-shrink:0}.offer-badge-inline{display:inline-block;margin-bottom:.15rem;padding:.1rem .45rem;font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.03em;background:var(--accent-soft);color:var(--text)}.modal-offer-block{display:flex;flex-direction:column;gap:.5rem}.modal-offer-block .modal-actions{margin-top:0}.chat-messages{display:flex;flex-direction:column;gap:.5rem;margin-bottom:1rem}.msg{padding:.7rem .9rem;border-radius:18px;max-width:85%;white-space:pre-wrap;font-size:.95rem;line-height:1.45;transition:background-color var(--duration) var(--ease)}.msg-user{align-self:flex-end;background:var(--msg-user);color:var(--msg-user-text);border-bottom-right-radius:4px}.msg-assistant{align-self:flex-start;background:var(--msg-assistant);color:var(--msg-assistant-text);border-bottom-left-radius:4px}.chat-input-row{display:flex;gap:.5rem;position:-webkit-sticky;position:sticky;bottom:calc(4.75rem + env(safe-area-inset-bottom, 0px));padding-top:.5rem;background:linear-gradient(to top,var(--bg) 70%,transparent)}.page-header{margin-bottom:1rem}.page-header .back-btn{display:inline-flex;align-items:center;gap:.25rem;padding:.4rem .5rem .4rem 0;margin-left:-.25rem;border:none;background:none;color:var(--text-secondary);font-size:.95rem;font-weight:500;cursor:pointer}.page-header .back-btn:hover{color:var(--text)}.page-header h1{margin:.35rem 0 0;font-size:1.85rem;font-weight:800;letter-spacing:-.035em}.shell-topbar{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.5rem;padding-top:.25rem}.shell-topbar h1{margin:0;font-size:1.85rem;font-weight:800;letter-spacing:-.035em}.meta-line,.search-bar{margin-bottom:1rem}.meta-line{color:var(--text-secondary);font-size:.9rem}.section-block{display:flex;flex-direction:column;gap:var(--block-gap,.75rem);margin-bottom:0}.section-title{font-size:.8rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text-secondary);margin:0 0 .5rem .35rem}.shelf-scroll{display:flex;gap:.65rem;overflow-x:auto;padding:.15rem .15rem .35rem;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}.shelf-scroll::-webkit-scrollbar{display:none}.shelf-card{flex:0 0 148px;text-align:left;padding:.85rem;border-radius:var(--radius-lg);border:1px solid var(--border-strong);background:var(--surface-1);color:var(--text);cursor:pointer;box-shadow:var(--shadow-sm);scroll-snap-align:start;transition:transform .15s var(--ease),box-shadow var(--duration) var(--ease),border-color var(--duration) var(--ease)}.shelf-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-md);border-color:var(--text-tertiary)}.shelf-card strong{display:block;font-size:.9rem;font-weight:600}.shelf-card small{color:var(--text-secondary);font-size:.75rem}.shelf-emoji{font-size:1.6rem;display:block;margin-bottom:.4rem}.chip-row{display:flex;flex-wrap:wrap;gap:.4rem}.chip,.prompt-chip{padding:.4rem .75rem;border-radius:999px;border:none;background:var(--surface-2);color:var(--text);font-size:.82rem;font-weight:500;cursor:pointer;box-shadow:inset 0 0 0 1px var(--separator);transition:background-color var(--duration) var(--ease)}.chip:hover,.prompt-chip:hover{background:var(--surface-hover)}.prompt-chip{display:block;width:100%;text-align:left;margin-bottom:.4rem;border-radius:var(--radius-md)}.quick-actions{display:flex;flex-direction:column;gap:.5rem}.chat-row{display:flex;align-items:stretch;gap:.35rem;margin-bottom:.35rem}.chat-row-main{flex:1 1;display:flex;align-items:center;gap:.75rem;padding:.7rem .85rem;border-radius:var(--radius-lg);border:none;background:var(--surface-1);color:var(--text);cursor:pointer;text-align:left;box-shadow:var(--shadow-sm)}.chat-row-main:hover{background:var(--surface-hover)}.avatar{width:2.75rem;height:2.75rem;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:1.15rem;flex-shrink:0;font-weight:600;background:var(--surface-3);color:var(--text);box-shadow:inset 0 0 0 1px var(--separator)}.chat-row-text{display:flex;flex-direction:column;min-width:0;gap:.1rem}.chat-row-text strong{font-size:.95rem;font-weight:600}.chat-row-text small{color:var(--text-secondary);font-size:.78rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-row-delete{padding:.4rem .65rem;min-width:2.5rem;color:var(--danger);border-color:transparent}.avatar-picker{display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0}.avatar-picker button{width:3.1rem;height:3.1rem;font-size:1.5rem;border-radius:var(--radius-md);border:2px solid transparent;background:var(--surface-1);cursor:pointer;box-shadow:var(--shadow-sm)}.avatar-picker button.selected{border-color:var(--text);box-shadow:var(--focus-ring)}.avatar-picker-wrap{margin:.5rem 0 1rem}.avatar-upload-tile{width:3.1rem;height:3.1rem;border-radius:var(--radius-md);border:2px dashed var(--separator);background:var(--surface-2);display:flex;align-items:center;justify-content:center;font-size:1.25rem;font-weight:600;cursor:pointer;overflow:hidden;padding:0}.avatar-upload-tile.selected{border-style:solid;border-color:var(--text)}.avatar-upload-preview{width:100%;height:100%;object-fit:cover}.avatar.avatar-img{width:2.5rem;height:2.5rem;border-radius:50%;object-fit:cover;flex-shrink:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}a.menu-item{display:block;box-sizing:border-box;text-decoration:none;color:inherit}.profile-copyright{padding:.25rem .75rem;opacity:.65}.wizard-steps{display:flex;gap:.35rem;margin-bottom:1rem}.wizard-steps span{flex:1 1;text-align:center;font-size:.72rem;font-weight:500;padding:.4rem;border-radius:var(--radius-sm);background:var(--surface-1);color:var(--text-tertiary)}.wizard-steps span.active{color:var(--accent-on);background:var(--accent);font-weight:600}.notif-btn,.notif-wrap{position:relative}.notif-btn{padding:.35rem .55rem;font-size:1.2rem}.notif-badge{position:absolute;top:.1rem;right:.1rem;background:var(--danger);color:#fff;font-size:.6rem;font-weight:700;border-radius:999px;padding:0 .35rem;min-width:1rem;text-align:center;line-height:1.2}.notif-panel{position:absolute;right:0;top:2.25rem;width:min(300px,92vw);z-index:20;max-height:50vh;overflow-y:auto}.notif-item{margin-top:.65rem;padding-top:.5rem;border-top:1px solid var(--separator);font-size:.85rem}.notif-item.unread strong{color:var(--text);font-weight:700}.segmented{display:flex;padding:3px;border-radius:var(--radius-md);background:var(--surface-3);gap:2px}.segmented button{flex:1 1;padding:.45rem .5rem;border:none;border-radius:calc(var(--radius-md) - 3px);background:transparent;color:var(--text-secondary);font-size:.82rem;font-weight:500;cursor:pointer;box-shadow:none}.segmented button.active{background:var(--accent);color:var(--accent-on);font-weight:600;box-shadow:var(--shadow-sm)}.settings-group{background:var(--surface-1);border-radius:var(--radius-lg);overflow:hidden;border:1px solid var(--separator);margin-bottom:1rem}.switch-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.85rem 1rem;border-bottom:1px solid var(--separator);font-size:.95rem}.switch-row:last-child{border-bottom:none}.ios-switch{position:relative;width:51px;height:31px;flex-shrink:0}.ios-switch input{opacity:0;width:0;height:0}.ios-switch .slider{position:absolute;inset:0;background:var(--surface-3);border-radius:999px;cursor:pointer;transition:background-color var(--duration) var(--ease)}.ios-switch .slider:before{content:"";position:absolute;height:27px;width:27px;left:2px;bottom:2px;background:#fff;border-radius:50%;box-shadow:0 2px 6px rgba(0,0,0,.2);transition:transform var(--duration) var(--ease)}.ios-switch input:checked+.slider{background:var(--text)}[data-theme=light] .ios-switch input:checked+.slider{background:var(--accent)}.ios-switch input:checked+.slider:before{transform:translateX(20px)}.status-text{font-size:.9rem;margin-top:.5rem}.status-text.success{color:var(--text-secondary)}.status-text.error{color:var(--danger)}.text-muted{font-size:.9rem}.text-hint,.text-muted{color:var(--text-secondary)}.text-hint{font-size:.85rem}.auth-screen{display:flex;flex-direction:column;justify-content:center;min-height:100dvh;padding:2rem 1.5rem;max-width:430px;margin:0 auto}.auth-screen h1{font-size:2rem;font-weight:700;letter-spacing:-.03em;margin:0 0 .5rem}.auth-screen .subtitle{color:var(--text-secondary);margin-bottom:1.5rem;line-height:1.5}.language-screen{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2rem;text-align:center;gap:1rem}.language-screen h1{font-size:2rem;font-weight:700;letter-spacing:-.03em}.language-screen .lang-btn{width:100%;max-width:280px;padding:1rem;font-size:1.05rem}@media (min-width:768px){.shell.shell-wide{max-width:none;width:100%}.messenger-split{display:grid;grid-template-columns:minmax(260px,320px) 1fr;grid-gap:0;gap:0;min-height:calc(100dvh - 80px);margin:-1rem -1rem 0}.messenger-list{border-right:1px solid var(--border);padding:0 .75rem 1rem;overflow-y:auto}.messenger-conversation{display:flex;flex-direction:column;min-height:0;padding:0 1rem 1rem}.messenger-placeholder{padding:2rem;opacity:.6}.chat-row-selected{background:rgba(232,160,191,.12);border-radius:10px}.conversation-panel{display:flex;flex-direction:column;flex:1 1;min-height:0}.conversation-header{display:flex;align-items:flex-start;gap:.75rem;padding:.75rem 0;border-bottom:1px solid var(--border)}.conversation-scroll{flex:1 1;overflow-y:auto;padding:1rem 0}.msg-pending{opacity:.65}}.app-frame{display:flex;min-height:100dvh;max-width:100%;background:var(--bg)}.app-frame-chat .app-main:has(.tg-messenger-wide),.app-frame-chat-full .app-main{padding:0;max-width:none}.app-frame-chat-full{height:100dvh;overflow:hidden}.app-frame-chat-full .app-main{min-height:0;overflow:hidden;display:flex;flex-direction:column;height:100%}.app-sidebar{position:-webkit-sticky;position:sticky;top:0;flex:0 0 240px;height:100dvh;display:flex;flex-direction:column;padding:1.25rem .85rem;border-right:1px solid var(--separator);background:var(--bg)}.app-brand{display:flex;align-items:baseline;gap:.45rem;padding:0 .65rem 1.25rem}.app-brand-name{font-size:1.35rem;font-weight:800;letter-spacing:-.03em}.app-brand-ver{font-size:.75rem;color:var(--text-tertiary)}.app-sidebar-nav{display:flex;flex-direction:column;gap:.2rem;flex:1 1}.app-sidebar-foot{display:flex;flex-direction:column;gap:.2rem;padding-top:.75rem;border-top:1px solid var(--separator)}.app-nav-item{display:flex;align-items:center;gap:.65rem;width:100%;padding:.65rem .75rem;border:none;border-radius:999px;background:transparent;color:var(--text-secondary);font-size:.95rem;font-weight:500;cursor:pointer;text-align:left}.app-nav-item:hover{background:var(--accent-soft);color:var(--text)}.app-nav-item.active{background:var(--surface-2);color:var(--text);font-weight:600}.app-nav-icon-wrap{position:relative;display:flex;align-items:center;justify-content:center;width:1.35rem}.app-nav-icon{flex-shrink:0}.app-nav-icon-star{color:#f5c542}.app-nav-dot{position:absolute;top:-2px;right:-4px;width:8px;height:8px;border-radius:50%;background:var(--text)}.app-body{flex:1 1;display:flex;flex-direction:column;min-width:0;min-height:100dvh}.app-main{flex:1 1;width:100%;max-width:720px;margin:0 auto;padding:1rem 1.25rem calc(5.5rem + env(safe-area-inset-bottom, 0px));overflow-y:auto;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable}.app-footer{display:none}.app-main:has(.hub-page){padding:0}.hub-page{padding:.75rem 1rem calc(4.75rem + env(safe-area-inset-bottom, 0px))}.hub-page.page-stack{padding-bottom:calc(4.75rem + env(safe-area-inset-bottom, 0px));animation:none}.page-stack{display:flex;flex-direction:column;gap:var(--block-gap,.75rem);padding-bottom:.5rem;animation:pageIn .22s var(--ease)}@keyframes pageIn{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion:reduce){.page-stack{animation:none}}.page-title{margin:0;font-size:1.75rem;font-weight:800;letter-spacing:-.035em;min-height:2.2rem}.page-title-spacer{visibility:hidden}.auth-boot{min-height:100dvh;display:flex;align-items:center;justify-content:center;background:var(--bg,#0f0f12);color:var(--text,#f5f5f7)}.auth-boot-inner{text-align:center;display:flex;flex-direction:column;gap:.5rem}.auth-boot-inner strong{font-size:1.5rem;font-weight:800}.auth-boot-inner p{margin:0;opacity:.7;font-size:.95rem}.empty-state{color:var(--text-secondary);margin:2rem 0}.credits-pill{display:inline-flex;align-items:center;gap:.35rem;padding:.4rem .75rem;border-radius:999px;background:var(--surface-2);font-size:.88rem;width:-moz-fit-content;width:fit-content}.chats-origin-tabs{margin-bottom:.35rem}.chats-origin-tabs-wrap{display:flex;justify-content:center;width:100%}.settings-menu-item{margin-bottom:.35rem}.settings-menu-list{display:flex;flex-direction:column;gap:.35rem}.settings-hint{margin:.5rem 0 0;font-size:.82rem;line-height:1.45;opacity:.75}.legal-modal-body{max-height:min(70vh,520px);overflow-y:auto;padding-right:.25rem;font-size:.92rem;line-height:1.55}.legal-modal-body h3{margin:1.1rem 0 .45rem;font-size:.98rem;font-weight:600}.legal-modal-body h3:first-of-type{margin-top:.65rem}.legal-list{margin:.35rem 0 .75rem;padding-left:1.15rem}.legal-list li{margin-bottom:.35rem}.menu-item-danger{color:#dc2626}.settings-about-list{display:flex;flex-direction:column;gap:.35rem}.section-title-spaced{margin-top:1rem}.tg-origin-badge{display:inline-block;margin-left:.35rem;padding:.05rem .35rem;border-radius:6px;font-size:.62rem;font-weight:600;vertical-align:middle;opacity:.85}.tg-origin-web{background:rgba(51,144,236,.2);color:#6eb6ff}.tg-origin-telegram{background:rgba(43,182,115,.2);color:#5fd99a}.tg-origin-imported{background:rgba(200,160,60,.2);color:#e0c060}.feed-tabs{display:flex;gap:.35rem;padding:.25rem;border-radius:999px;background:var(--surface-2);width:-moz-fit-content;width:fit-content;max-width:100%;overflow-x:auto}.feed-tab{border:none;background:transparent;color:var(--text-secondary);padding:.45rem .85rem;border-radius:999px;font-size:.85rem;font-weight:500;cursor:pointer;white-space:nowrap}.feed-tab.active{background:var(--surface-1);color:var(--text);font-weight:600;box-shadow:var(--shadow-sm)}.feed-post-head{display:flex;flex-direction:column;gap:.15rem}.feed-post-meta{font-size:.8rem;color:var(--text-secondary)}.feed-post-body{margin:.5rem 0;font-size:.92rem;line-height:1.45}.feed-post-chars{font-size:.78rem;color:var(--text-tertiary)}.feed-post-actions{display:flex;gap:.5rem;flex-wrap:wrap}.btn-sm{padding:.45rem .85rem}.btn-block{width:100%}.search-field{border-radius:999px;padding-left:1rem;background:var(--surface-2);border-color:transparent}.template-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:.65rem;gap:.65rem}.template-card{display:flex;flex-direction:column;padding:0;border:none;border-radius:14px;overflow:hidden;text-align:left;cursor:pointer;background:var(--surface-2);box-shadow:var(--shadow-sm);transition:transform .15s var(--ease),box-shadow var(--duration) var(--ease)}.template-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-md)}.template-card-cover{position:relative;aspect-ratio:1;background-size:cover;background-position:50%;display:flex;align-items:center;justify-content:center}.template-card-emoji{font-size:2.75rem;filter:drop-shadow(0 2px 8px rgba(0,0,0,.25))}.template-card-body{padding:.65rem .7rem .75rem;background:var(--surface-2);min-height:4.5rem}[data-theme=light] .template-card-body{background:#f0f0f0}[data-theme=dark] .template-card-body{background:#1e1e1e}.template-card-title{font-size:.88rem;font-weight:700;line-height:1.25;margin-bottom:.2rem}.template-card-desc,.template-card-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.template-card-desc{margin:0;font-size:.75rem;line-height:1.35;color:var(--text-secondary)}.template-card-with-actions{position:relative}.template-card-inner{width:100%;height:100%}.template-card-heart{position:absolute;top:8px;right:8px;z-index:2;width:32px;height:32px;border:none;border-radius:50%;background:rgba(255,255,255,.92);color:#e11d48;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 1px 4px rgba(0,0,0,.12);transition:transform .15s var(--ease),background-color var(--duration) var(--ease)}.template-card-heart:hover{transform:scale(1.06)}.template-card-heart.saved{background:#fff1f2}.template-card-body-only{min-height:88px;display:flex;flex-direction:column;justify-content:center}.preview-heart{font-size:1.25rem;color:#e11d48}.modal-actions-stack{display:flex;flex-direction:column;gap:8px;margin-top:12px}.modal-actions-row-tight{margin-bottom:8px;gap:8px}.btn-sm{padding:6px 10px;font-size:.8125rem}.tg-chat-settings{flex-shrink:0;margin-left:auto}.template-shelf-card{flex:0 0 148px;padding:0;overflow:hidden;border-radius:var(--radius-lg);border:1px solid var(--border-strong);background:var(--surface-2);color:var(--text);cursor:pointer;scroll-snap-align:start}.template-shelf-card .template-card-cover{aspect-ratio:4/3;border-radius:0}.template-shelf-card .template-card-body{padding:.55rem .65rem .65rem;min-height:3.5rem}.template-preview-root{align-items:flex-end}.template-preview-panel{width:100%;max-width:430px;border-radius:1.25rem 1.25rem 0 0;overflow:hidden;background:var(--surface-1);box-shadow:var(--shadow-md)}.template-preview-cover{aspect-ratio:1.05}.template-preview-body{padding:1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));display:flex;flex-direction:column;gap:.65rem}.template-preview-head{display:flex;gap:.5rem;align-items:flex-start}.template-preview-head h2{margin:0 0 .35rem;font-size:1.15rem;font-weight:800}.template-preview-head p{margin:0;font-size:.88rem;line-height:1.4;color:var(--text-secondary)}.template-preview-share{flex-shrink:0;width:2.25rem;height:2.25rem;border-radius:50%;background:var(--accent-soft);font-size:1rem}.template-preview-primary,.template-preview-secondary{width:100%}.template-preview-primary{background:#3390ec;color:#fff}.template-preview-primary:hover:not(:disabled){background:#2b7fd4}.template-preview-secondary{background:rgba(51,144,236,.12);border-color:transparent;color:#3390ec}[data-theme=dark] .template-preview-secondary{background:rgba(51,144,236,.18);color:#6eb6ff}.template-list{display:flex;flex-direction:column;gap:.5rem}.template-row{display:flex;align-items:flex-start;gap:.85rem;width:100%;text-align:left;cursor:pointer;border:1px solid var(--separator)}.template-rank{font-size:1.1rem;font-weight:700;color:var(--text-tertiary);min-width:1.5rem}.template-body strong{display:block}.template-body small{color:var(--text-secondary);font-size:.82rem}.profile-hero{padding:0;overflow:hidden}.profile-banner{height:88px;background:linear-gradient(135deg,var(--surface-3),var(--surface-2))}.profile-head{gap:.85rem;padding:0 1rem 1rem;margin-top:-1.5rem}.profile-avatar,.profile-head{display:flex;align-items:center}.profile-avatar{width:3.5rem;height:3.5rem;border-radius:50%;justify-content:center;font-size:1.4rem;font-weight:700;background:var(--surface-3);border:3px solid var(--surface-1)}.character-row{display:flex;gap:.75rem;align-items:flex-start}.character-emoji{font-size:1.6rem}.profile-logout-mobile,.profile-notif-mobile{display:block}.text-link{color:var(--text);font-weight:600}.tg-messenger{display:grid;grid-template-columns:minmax(260px,320px) 1fr;grid-gap:0;gap:0;min-height:calc(100dvh - 2rem);margin:-1rem -1.25rem 0;max-width:none}.tg-messenger-list{border-right:1px solid var(--separator);padding:0 .5rem 1rem;overflow-y:auto;position:relative}.tg-list-title{padding:0 .5rem}.tg-messenger-pane{display:flex;flex-direction:column;background:var(--tg-bg,#0e1621)}.tg-pane-empty{padding:2rem;color:var(--text-secondary)}.tg-chat-row{display:flex;align-items:stretch;gap:.15rem;margin-bottom:.15rem;border-radius:12px}.tg-chat-row.selected{background:var(--accent-soft)}.tg-chat-row-main{display:flex;align-items:center;gap:.65rem;padding:.55rem .65rem;border:none;background:transparent;color:var(--text);cursor:pointer;text-align:left;overflow:hidden}.tg-chat-row-main,.tg-chat-row-text{flex:1 1;min-width:0}.tg-chat-row-top{display:flex;justify-content:space-between;gap:.5rem;min-width:0}.tg-chat-row-top strong{flex:1 1;min-width:0;font-size:.92rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tg-chat-row-top time{font-size:.72rem;color:var(--text-tertiary);flex-shrink:0}.tg-chat-row-text small{display:block;color:var(--text-secondary);font-size:.78rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tg-chat-row-actions{display:flex;align-items:center;gap:.1rem;padding-right:.15rem}.tg-row-action{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;border:none;border-radius:999px;background:transparent;color:var(--text-secondary);cursor:pointer;transition:background-color var(--duration) var(--ease),color var(--duration) var(--ease)}.tg-row-action:hover{background:var(--accent-soft);color:var(--text)}.tg-chat-delete,.tg-row-action-danger:hover{color:var(--danger)}.tg-fab{position:fixed;right:1rem;bottom:calc(4.75rem + env(safe-area-inset-bottom, 0px));width:3rem;height:3rem;border-radius:50%;border:none;background:#3390ec;color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:var(--shadow-md);z-index:40}.tg-chat{display:flex;flex-direction:column;height:100%;min-height:0;background:var(--tg-bg,#0e1621)}.tg-chat-compact{margin:0}.tg-chat-compact,.tg-messenger-pane .tg-chat{min-height:0;height:100%}.tg-chat-subtitle{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.tg-chat-origin-hint{font-size:.68rem;opacity:.75}.tg-chat-alerts{display:flex;flex-direction:column;gap:.35rem;margin-bottom:.5rem;padding:.5rem .65rem;border-radius:10px;background:var(--surface-2)}.tg-chat-alerts .status-text{margin:0}.tg-chat-no-credits{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem .75rem}.tg-chat-no-credits .status-text{margin:0;font-size:.82rem;line-height:1.35}.tg-chat-header{align-items:center;gap:.65rem;padding:.65rem .85rem;border-bottom:1px solid rgba(255,255,255,.08);background:var(--tg-header,#17212b)}.tg-chat-header,.tg-chat-header-info{display:flex;overflow:hidden;min-width:0}.tg-chat-header-info{flex-direction:column;flex:1 1}.tg-chat-header-info strong{font-size:.95rem}.tg-chat-header-info span{font-size:.75rem;color:var(--text-secondary)}.tg-back{padding:.35rem .5rem}.tg-chat-body{flex:1 1;overflow-y:auto;padding:.85rem;display:flex;flex-direction:column;gap:var(--block-gap,.75rem);background-image:radial-gradient(circle at 20% 20%,rgba(255,255,255,.03) 0,transparent 40%),radial-gradient(circle at 80% 0,rgba(51,144,236,.08) 0,transparent 35%)}.tg-empty-hint{color:var(--text-secondary);font-size:.88rem;text-align:center;margin:1rem 0}.tg-bubble-wrap{display:flex;flex-direction:column;gap:.35rem;max-width:78%}.tg-bubble-wrap-in{align-self:flex-start}.tg-bubble-wrap-out{align-self:flex-end}.tg-bubble{max-width:100%;display:flex}.tg-bubble-in{justify-content:flex-start}.tg-bubble-out{justify-content:flex-end}.tg-bubble-text{padding:.55rem .75rem;border-radius:14px;font-size:.92rem;line-height:1.4;white-space:pre-wrap;word-break:break-word;-moz-user-select:text;user-select:text;-webkit-user-select:text}.tg-bubble-in .tg-bubble-text{background:var(--tg-in,#182533);border-bottom-left-radius:4px}.tg-bubble-out .tg-bubble-text{background:var(--tg-out,#2b5278);color:#fff;border-bottom-right-radius:4px}.tg-bubble-in.tg-bubble-typing{background:var(--tg-in,#182533);border-bottom-left-radius:4px;padding:.55rem .75rem;border-radius:14px}.tg-typing-dots{display:inline-flex;align-items:center;gap:.28rem;min-height:1.1rem}.tg-typing-dots span{width:.42rem;height:.42rem;border-radius:50%;background:var(--text-secondary);animation:tg-typing-bounce 1.2s ease-in-out infinite}.tg-typing-dots span:nth-child(2){animation-delay:.15s}.tg-typing-dots span:nth-child(3){animation-delay:.3s}@keyframes tg-typing-bounce{0%,80%,to{opacity:.35;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}.tg-composer{display:flex;align-items:center;gap:.35rem;flex-shrink:0;padding:.55rem .65rem calc(.55rem + env(safe-area-inset-bottom, 0px));background:var(--tg-header,#17212b);border-top:1px solid rgba(255,255,255,.08)}.tg-composer-input{flex:1 1;border-radius:999px;background:var(--surface-2);border-color:transparent}.tg-composer-icon{padding:.35rem;color:var(--text-secondary)}.tg-send-btn{width:2.35rem;height:2.35rem;border-radius:50%;border:none;background:#3390ec;color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer}.tg-send-btn:disabled{opacity:.45;cursor:not-allowed}.tg-regen{margin:.5rem .85rem .85rem}.tg-hint{padding:0 .85rem}.notif-card.unread{border-color:var(--text-tertiary)}.app-mobile-nav{position:fixed;bottom:0;left:0;right:0;display:flex;padding-bottom:env(safe-area-inset-bottom,0);background:var(--nav-bg);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);border-top:1px solid var(--separator);z-index:50}.app-mobile-nav button{flex:1 1;min-width:0;min-height:3.35rem;flex-direction:column;gap:.2rem;padding:.45rem .2rem;border:none;background:none;color:var(--text-tertiary);font-size:.62rem;font-weight:500;cursor:pointer}.app-mobile-nav button,.mobile-nav-icon-wrap{display:flex;align-items:center;justify-content:center}.mobile-nav-icon-wrap{width:1.35rem;height:1.35rem;flex-shrink:0}.mobile-nav-label{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.15;min-height:1.38rem;text-align:center}.app-mobile-nav button.active{color:var(--text)}.mobile-nav-icon{width:1.35rem;height:1.35rem}@media (min-width:900px){.app-main{max-width:680px;padding-bottom:2rem}.app-frame-chat .app-main{max-width:none;padding:0}.app-footer{display:flex;flex-direction:column;align-items:flex-end;gap:.25rem;padding:1rem 1.5rem 1.25rem;font-size:.72rem}.app-footer,.app-footer a{color:var(--text-tertiary)}.app-footer a{text-decoration:none}.app-footer a:hover{color:var(--text-secondary)}.profile-logout-mobile,.profile-notif-mobile{display:none}.tg-fab{position:absolute;right:1rem;bottom:1rem}.app-mobile-nav{display:none}}@media (max-width:899px){.app-sidebar{display:none}.app-main:not(:has(.hub-page)){padding-bottom:calc(5.5rem + env(safe-area-inset-bottom, 0px))}.tg-messenger{grid-template-columns:1fr;margin:0}}[data-theme=light] .tg-chat,[data-theme=light] .tg-messenger-pane{background:var(--bg)}.app-frame-chat:has(.tg-messenger-wide){height:100dvh;overflow:hidden}.app-frame-chat:has(.tg-messenger-wide) .app-body{min-height:0;overflow:hidden}.app-frame-chat .app-main:has(.tg-messenger-wide){overflow:hidden;display:flex;flex-direction:column;height:100%;padding:0;max-width:none}.tg-messenger-wide{flex:1 1;margin:0;max-width:none;overflow:hidden}.tg-messenger-list,.tg-messenger-pane,.tg-messenger-wide{min-height:0;height:100%}.tg-messenger-pane{background:var(--bg);overflow:hidden;min-width:0}.tg-pane-empty-wrap{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;height:100%;padding:2rem}.tg-chat{background:var(--bg)}.tg-chat-header,.tg-composer{background:var(--surface-1);border-color:var(--separator)}.tg-chat-body{background:var(--bg);background-image:none}.tg-bubble-in .tg-bubble-text{background:var(--surface-2);color:var(--text)}.tg-bubble-out .tg-bubble-text{background:var(--accent-soft);color:var(--text)}[data-theme=light]{--tg-bg:var(--bg);--tg-header:var(--surface-1);--tg-in:var(--surface-2);--tg-out:var(--accent-soft)}[data-theme=light] .tg-bubble-out .tg-bubble-text{color:var(--text)}.tg-fab{background:var(--text);color:var(--bg)}.modal-root{position:fixed;inset:0;z-index:200;display:flex;align-items:flex-end;justify-content:center;padding:0;background:rgba(0,0,0,.45);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.modal-root.modal-enter{animation:modalBackdropIn var(--duration) var(--ease) forwards}.modal-root.modal-exit{animation:modalBackdropOut var(--duration) var(--ease) forwards}@keyframes modalBackdropIn{0%{opacity:0}to{opacity:1}}@keyframes modalBackdropOut{0%{opacity:1}to{opacity:0}}@media (min-width:900px){.modal-root{align-items:center;padding:1.5rem}}.modal-panel{width:100%;max-width:420px;max-height:min(90dvh,640px);display:flex;flex-direction:column;background:var(--surface-1);border-radius:1.25rem 1.25rem 0 0;box-shadow:var(--shadow-lg);overflow:hidden}.modal-panel.modal-panel-enter{animation:modalPanelInMobile .28s var(--ease) forwards}.modal-panel.modal-panel-exit{animation:modalPanelOutMobile .2s var(--ease) forwards}@keyframes modalPanelInMobile{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}@keyframes modalPanelOutMobile{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(100%)}}@keyframes modalPanelIn{0%{opacity:0;transform:translateY(16px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes modalPanelOut{0%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(12px) scale(.98)}}@media (prefers-reduced-motion:reduce){.modal-panel.modal-panel-enter,.modal-panel.modal-panel-exit,.modal-root.modal-enter,.modal-root.modal-exit{animation:none}}@media (min-width:900px){.modal-panel{border-radius:1.25rem}.modal-panel.modal-panel-enter{animation:modalPanelIn .28s var(--ease) forwards}.modal-panel.modal-panel-exit{animation:modalPanelOut .2s var(--ease) forwards}}@media (max-width:899px){.modal-root{align-items:flex-end;justify-content:center;padding:0 .75rem calc(4.75rem + env(safe-area-inset-bottom, 0px))}.modal-panel,.modal-panel-stack{width:100%;max-width:100%;max-height:min(52dvh,480px);border-radius:1.25rem;align-self:flex-end;margin:0}.modal-panel-stack-enter{animation:modalPanelInMobile .28s var(--ease) forwards}.modal-panel-stack-exit{animation:modalPanelOutMobile .22s var(--ease) forwards}}.modal-panel-floating{margin:0 .75rem calc(.75rem + env(safe-area-inset-bottom, 0px));border-radius:1.25rem;max-height:min(82dvh,580px)}@media (min-width:600px){.modal-panel-floating{margin:0;max-height:min(90dvh,640px)}}.modal-panel-wide{max-width:480px}.modal-header{display:grid;grid-template-columns:2.5rem 1fr 2.5rem;align-items:center;grid-gap:.35rem;gap:.35rem;padding:1rem 1.15rem;border-bottom:1px solid var(--separator)}.modal-header h2{margin:0;font-size:1.1rem;font-weight:700;text-align:center;grid-column:2}.modal-header-spacer{width:2rem;grid-column:1}.modal-nav-btn{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;border:none;border-radius:999px;background:var(--surface-2);color:var(--text);cursor:pointer}.modal-nav-btn:hover{background:var(--accent-soft)}.modal-back{grid-column:1}.modal-close{grid-column:3;justify-self:end}.hub-modal-body{padding:0;display:flex;flex-direction:column;gap:.75rem}.premium-modal.hub-modal-body{gap:1rem}.modal-body:has(.premium-modal){padding:.85rem 1.15rem 1.25rem;overflow-y:auto;min-height:0;flex:1 1}.modal-panel-stack .modal-body{flex:1 1;align-items:flex-start;padding:1rem 1.15rem 1.25rem}.modal-panel-stack .hub-modal-body{width:100%;padding:0;gap:.85rem}.modal-body{padding:1rem 1.15rem 1.25rem;overflow-y:auto;gap:.85rem}.modal-actions,.modal-body{display:flex;flex-direction:column}.modal-actions{gap:.5rem}.modal-actions-row{display:flex;gap:.5rem;margin-top:.25rem}.modal-actions-row .btn{flex:1 1}.modal-field{display:flex;flex-direction:column;gap:.35rem}.modal-field>span{font-size:.82rem;color:var(--text-secondary);font-weight:500}.modal-wizard-steps{margin-bottom:.25rem}.modal-wizard-steps span.done{opacity:.55}.modal-body .menu-item{text-align:left;width:100%}.modal-body .menu-item.active{border-color:var(--text)}.modal-body .menu-item small{display:block;color:var(--text-secondary);font-size:.78rem;margin-top:.2rem}.modal-body .avatar-picker{margin:.25rem 0 .5rem}.progress-block{display:flex;flex-direction:column;gap:.35rem}.progress-label{display:flex;justify-content:space-between;font-size:.78rem;color:var(--text-secondary)}.progress-track{height:6px;border-radius:999px;background:var(--surface-3);overflow:hidden}.progress-fill{height:100%;border-radius:999px;background:var(--text);transition:width .3s ease}.file-picker{position:relative;cursor:pointer;text-align:center}.wallet-card{gap:.35rem}.feed-composer,.wallet-card{display:flex;flex-direction:column;padding:.85rem 1rem}.feed-composer{gap:.65rem}.feed-composer-input{resize:vertical;min-height:4.5rem;border:none;background:var(--surface-2)}.credits-pill-btn{border:none;cursor:pointer;font:inherit}.credits-pill-btn:hover{background:var(--surface-3)}.app-legal-nav{display:flex;flex-direction:column;gap:.35rem;padding:.75rem .75rem 0;margin-top:.5rem;font-size:.72rem}.app-legal-nav a{color:var(--text-tertiary);text-decoration:none}.app-legal-nav a:hover{color:var(--text-secondary)}.app-legal-nav span{color:var(--text-tertiary);margin-top:.25rem}.app-mobile-legal{position:fixed;bottom:calc(3.25rem + env(safe-area-inset-bottom, 0px));left:0;right:0;display:flex;justify-content:center;gap:1rem;padding:.35rem .75rem;font-size:.62rem;z-index:45;background:var(--nav-bg);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);border-top:1px solid var(--separator)}.app-mobile-legal a{color:var(--text-tertiary);text-decoration:none}.app-mobile-legal a:hover{color:var(--text-secondary)}.legal-page{min-height:100dvh;max-width:680px;margin:0 auto;padding:1.5rem 1.25rem 3rem;background:var(--bg);color:var(--text)}.legal-page h1{font-size:1.75rem;font-weight:800;margin:0 0 1rem}.legal-page h2{font-size:1rem;font-weight:700;margin:1.5rem 0 .5rem}.legal-page li,.legal-page p{line-height:1.55;color:var(--text-secondary)}.legal-back{display:inline-flex;align-items:center;gap:.35rem;margin-bottom:1rem;color:var(--text-secondary);text-decoration:none;font-size:.9rem}.legal-back:hover{color:var(--text)}.status-grid{display:grid;grid-gap:.65rem;gap:.65rem;margin-top:1rem}.status-row{display:flex;justify-content:space-between;align-items:center;padding:.75rem 1rem;border-radius:12px;background:var(--surface-1);border:1px solid var(--separator)}.status-dot{width:8px;height:8px;border-radius:50%;margin-right:.5rem}.status-dot.ok{background:#34c759}.status-dot.err{background:#ff3b30}.msg-action-backdrop{position:fixed;inset:0;z-index:1200;background:rgba(0,0,0,.35);display:flex;align-items:flex-end;justify-content:center}.msg-action-sheet{width:100%;max-width:420px;background:var(--surface-1);border-radius:1rem 1rem 0 0;padding:.5rem 0 1rem;box-shadow:var(--shadow-lg)}.msg-action-sheet-popover{position:fixed;width:min(220px,calc(100vw - 1rem));border-radius:.75rem;padding:.35rem 0;align-self:auto}.msg-action-item{display:flex;align-items:center;gap:.75rem;width:100%;padding:.85rem 1rem;border:none;background:transparent;color:var(--text);font-size:.95rem;text-align:left;cursor:pointer}.msg-action-item:hover{background:var(--surface-2)}.msg-action-item.danger{color:#ff3b30}.msg-action-cancel{justify-content:center;color:var(--text-secondary);margin-top:.25rem}.auth-remember{margin:.75rem 0 1rem}.msg-action-bar{display:none}@media (max-width:899px){.msg-action-bar{display:flex;align-items:center;gap:.5rem;padding:.2rem .15rem .35rem;opacity:1;pointer-events:auto}.tg-bubble-wrap-in .msg-action-bar{justify-content:flex-start}.tg-bubble-wrap-out .msg-action-bar{justify-content:flex-end}.msg-action-bar-btn{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;border:none;border-radius:.4rem;background:transparent;color:var(--text-secondary);cursor:pointer}.msg-action-bar-btn.danger{color:var(--danger)}.msg-action-bar-btn:disabled{opacity:.4;cursor:not-allowed}}@media (min-width:900px){.msg-action-bar{display:flex;align-items:center;gap:.65rem;padding:.15rem .25rem;opacity:0;pointer-events:none;transition:opacity .15s var(--ease)}.tg-bubble-wrap-in .msg-action-bar{justify-content:flex-start}.tg-bubble-wrap-out .msg-action-bar{justify-content:flex-end}.tg-bubble-wrap:focus-within .msg-action-bar,.tg-bubble-wrap:hover .msg-action-bar{opacity:1;pointer-events:auto}.msg-action-bar-btn{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;border:none;border-radius:.4rem;background:transparent;color:var(--text-secondary);cursor:pointer;transition:color .15s var(--ease),background .15s var(--ease)}.msg-action-bar-btn:hover:not(:disabled){color:var(--text);background:var(--surface-2)}.msg-action-bar-btn.danger:hover:not(:disabled){color:var(--danger)}.msg-action-bar-btn:disabled{opacity:.45;cursor:not-allowed}}.msg-copy-toast{position:fixed;bottom:calc(6rem + env(safe-area-inset-bottom, 0px));left:50%;transform:translateX(-50%);z-index:1300;padding:.55rem 1rem;border-radius:999px;background:var(--surface-2);color:var(--text);font-size:.88rem;box-shadow:var(--shadow-md);pointer-events:none}@media (min-width:900px){.msg-copy-toast{bottom:1.5rem}}.tg-auth-page{position:relative;min-height:100dvh;display:flex;align-items:flex-start;justify-content:center;padding:max(1rem,env(safe-area-inset-top)) 1rem 1rem;background:#ffffff;overflow-y:auto;box-sizing:border-box}.tg-auth-lang{position:absolute;top:1rem;right:1rem;display:inline-flex;gap:.25rem;padding:.2rem;border-radius:999px;background:#f0f0f0}.tg-auth-lang button{border:none;background:transparent;color:rgba(0,0,0,.55);font-size:.78rem;font-weight:700;letter-spacing:.04em;padding:.35rem .55rem;border-radius:999px;cursor:pointer}.tg-auth-lang button.active{background:#fff;color:#b84258}.tg-auth-card{width:100%;max-width:380px;max-height:calc(100dvh - 2rem);overflow-y:auto;margin:auto 0;background:#fff;border-radius:14px;padding:2rem 1.75rem 1.5rem;box-shadow:0 8px 32px rgba(0,0,0,.12);text-align:center;box-sizing:border-box}@media (max-width:420px){.tg-auth-card{padding:1.25rem 1rem 1rem;border-radius:12px}.tg-auth-card h1{font-size:1.25rem}}.turnstile-wrap{display:flex;justify-content:center;max-width:100%;overflow:hidden}.tg-auth-notice{color:#2b7fd4;text-align:left}.tg-auth-card h1{margin:0 0 .75rem;font-size:1.45rem;font-weight:700;letter-spacing:-.02em;color:#111}.tg-auth-subtitle{margin:0 0 .35rem;color:#333;font-size:.95rem}.tg-auth-hint{margin:0 0 .75rem;color:#707579;font-size:.82rem;line-height:1.45}.tg-auth-card .field,.tg-auth-card label{text-align:left}.tg-auth-primary{width:100%;margin-top:.5rem;border-radius:8px;background:#3390ec;color:#fff}.tg-auth-primary:hover:not(:disabled){background:#2b7fd4}.tg-auth-switch{display:block;width:100%;margin-top:1rem;padding:.65rem .5rem;border:none;background:transparent;color:#3390ec;font-size:.82rem;font-weight:700;letter-spacing:.03em;cursor:pointer}.tg-auth-switch:hover{text-decoration:underline}.tg-auth-card .auth-remember{justify-content:space-between;margin:.25rem 0 .75rem;text-align:left}.tg-auth-card .status-text.error{text-align:left}.feed-composer-actions{display:flex;gap:.5rem;align-items:center;justify-content:flex-end}.feed-composer-image{position:relative;max-width:280px}.feed-composer-preview{width:100%;border-radius:var(--radius-md);display:block}.feed-composer-remove{position:absolute;top:4px;right:4px;width:28px;height:28px;border-radius:50%;background:rgba(0,0,0,.55);color:#fff}.feed-post-image{width:100%;max-height:360px;object-fit:cover;border-radius:var(--radius-md);margin-top:.5rem}.feed-post-fade{animation:feedPostIn .28s var(--ease)}@keyframes feedPostIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.browse-filters{display:flex;flex-direction:column;gap:.65rem;margin-bottom:0}.templates-filters-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;padding:.7rem 1rem;border:none;border-radius:.85rem;background:var(--surface-1);border:1px solid var(--separator);color:var(--text);text-align:left;cursor:pointer;font-size:.9rem}.templates-filters-toggle strong{font-weight:600}.templates-filters-toggle small{display:block;margin-top:.15rem;font-size:.78rem;color:var(--text-secondary);font-weight:400}.templates-filters-chevron{flex-shrink:0;color:var(--text-tertiary);transition:transform .2s var(--ease)}.templates-filters-chevron.open{transform:rotate(90deg)}.templates-filters-panel{padding:.85rem 1rem;border-radius:.85rem;background:var(--surface-1);border:1px solid var(--separator)}.browse-filter-section-label,.templates-filters-panel .browse-filter-section-label{margin:0 0 .35rem;font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text-tertiary)}.browse-filter-row{display:flex;flex-wrap:wrap;gap:.35rem}.filter-chip{border:1px solid var(--outline);background:var(--surface-2);color:var(--text-secondary);border-radius:999px;padding:.28rem .65rem;font-size:.78rem;cursor:pointer;transition:background-color var(--duration) var(--ease),color var(--duration) var(--ease),border-color var(--duration) var(--ease)}.filter-chip.active{background:var(--accent);color:var(--accent-on);border-color:var(--accent)}.character-use-btn{margin:0 .5rem .5rem}.profile-custom-card.disabled{opacity:.65}.nick-color-row{display:flex;flex-wrap:wrap;gap:.4rem;margin:.35rem 0 .65rem}.nick-color-swatch{width:28px;height:28px;border-radius:50%;border:2px solid transparent;cursor:pointer;transition:transform .15s var(--ease)}.nick-color-swatch.active{border-color:var(--text);transform:scale(1.08)}.card,.feed-post,.template-card{transition:transform .18s var(--ease),box-shadow var(--duration) var(--ease)}@media (hover:hover){.card:hover,.feed-post:hover,.template-card:hover{transform:translateY(-1px);box-shadow:var(--shadow-md)}}@media (prefers-reduced-motion:reduce){.feed-post-fade{animation:none}.card,.feed-post,.template-card{transition:none}.card:hover,.feed-post:hover,.template-card:hover{transform:none}}.switch-row-hidden{display:none!important}.premium-balance-strip{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem 1.25rem;padding:.65rem .85rem;margin-bottom:1rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);font-size:.9rem}.wallet-grid{display:grid;grid-gap:.75rem;gap:.75rem}@media (min-width:520px){.wallet-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}.wallet-tile{display:flex;flex-direction:column;gap:.35rem;padding:1rem}.wallet-tile-credits{grid-column:1/-1}@media (min-width:720px){.wallet-tile-credits{grid-column:auto}.wallet-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}.wallet-tile-label{font-size:.72rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}.wallet-tile-value{font-size:1.65rem;font-weight:800;line-height:1.1}.wallet-tile-hint{margin:0;font-size:.82rem}.wallet-tile-action{margin-top:.35rem;align-self:flex-start}.wallet-tile-alert{margin:.25rem 0 0;font-size:.85rem}.wallet-tile-row{display:flex;justify-content:space-between;align-items:center;margin:0;font-size:.92rem}.premium-modal{display:flex;flex-direction:column;gap:1rem}.premium-tabs{margin-bottom:.15rem}.premium-tabs button{flex:1 1;font-size:.88rem}.premium-tab-panel{display:flex;flex-direction:column;gap:.85rem}.premium-balance-hero{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.1rem;border-radius:16px;border:1px solid var(--border);background:linear-gradient(135deg,var(--surface) 0,var(--bg) 100%)}.premium-balance-label{display:block;font-size:.72rem;font-weight:600;letter-spacing:.05em;text-transform:uppercase;color:var(--muted);margin-bottom:.15rem}.premium-balance-amount{font-size:1.85rem;font-weight:800;line-height:1}.premium-section{display:flex;flex-direction:column;gap:.75rem;padding-top:.25rem;border-top:1px solid var(--border)}.premium-section:first-of-type{border-top:none;padding-top:0}.premium-section-title{margin:0;font-size:.78rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}.premium-amounts{margin-bottom:0}.premium-pay-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));grid-gap:.5rem;gap:.5rem}.premium-section-note{margin:0;font-size:.8rem}.premium-offers{display:flex;flex-direction:column;gap:.85rem}.premium-offer .offer-card-body{gap:.45rem;position:relative}.premium-offer .offer-badge{position:static;display:inline-block;align-self:flex-start;margin-bottom:.15rem}.credit-breakdown{display:flex;flex-direction:column;gap:.65rem}.credit-breakdown-compact .premium-balance-hero{padding:.75rem 1rem}.credit-breakdown-rows{display:grid;grid-template-columns:1fr 1fr;grid-gap:.5rem;gap:.5rem}.credit-breakdown-row{display:flex;flex-direction:column;gap:.2rem;padding:.65rem .75rem;border:1px solid var(--border);border-radius:12px;background:var(--surface);font-size:.82rem;color:var(--muted)}.credit-breakdown-row strong{font-size:1.05rem;color:var(--text)}.credit-breakdown-hint{margin:0;font-size:.78rem}.premium-section-divider{height:1px;background:var(--border);margin:.15rem 0}.premium-balance-block{position:relative}.premium-refresh-btn{position:absolute;top:.85rem;right:0}.premium-offer-footer{display:flex;flex-direction:column;gap:.5rem;margin-top:auto;padding-top:.35rem}.premium-skeleton-card{height:220px;border-radius:16px;background:linear-gradient(90deg,var(--surface) 25%,var(--border) 50%,var(--surface) 75%);background-size:200% 100%;animation:premium-shimmer 1.2s ease-in-out infinite}@keyframes premium-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.premium-error{padding:1rem;display:flex;flex-direction:column;gap:.65rem;align-items:flex-start}.premium-error p{margin:0}.premium-empty{margin:0;padding:.5rem 0}.premium-auth-hint{margin:0}.offer-visual-mark{position:absolute;right:1rem;bottom:.75rem;font-size:2rem;opacity:.35;color:#fff}.offer-desc{margin:0;font-size:.88rem}.offer-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));grid-gap:1rem;gap:1rem}.offer-grid-horizontal{grid-template-columns:repeat(auto-fit,minmax(240px,1fr));overflow-x:auto}.offer-badge-inline{font-size:.75rem;padding:.15rem .5rem;border-radius:999px;background:var(--surface);border:1px solid var(--border)}.offer-price{font-size:1.25rem;font-weight:700;margin:.5rem 0}.profile-avatar-upload{cursor:pointer;overflow:hidden}.profile-avatar-img{width:100%;height:100%;object-fit:cover;border-radius:inherit}.profile-banner-upload{margin-top:.75rem}.profile-head-text{flex:1 1;min-width:0}.profile-avatar-hint{margin-top:.35rem;font-size:.8rem}.profile-saved-msg{color:var(--accent,#059669);margin:.25rem 0 0}.profile-plus-cta,.profile-username-card{display:flex;flex-direction:column;gap:.65rem;padding:1rem}.profile-plus-cta{border:1px dashed var(--border)}.profile-plus-list{margin:0;padding-left:1.15rem;font-size:.88rem;color:var(--muted)}.profile-avatar-upload.busy{opacity:.6;pointer-events:none}.offer-card{border:1px solid var(--border);border-radius:16px;overflow:hidden;background:var(--bg);box-shadow:var(--shadow-sm);display:flex;flex-direction:column}.offer-card-featured{border-color:var(--text)}.offer-card-visual{height:96px;position:relative;background:linear-gradient(135deg,#e8f5e9,#c8e6c9)}.offer-visual-plus{background:linear-gradient(135deg,#1a1a1a,#3d3d3d)}.offer-visual-credits{background:linear-gradient(135deg,#f5f5f5,#e0e0e0)}.offer-badge{position:absolute;top:10px;left:10px;background:#fff;color:#111;font-size:.72rem;font-weight:700;padding:.2rem .5rem;border-radius:999px}.offer-card-body{padding:.85rem 1rem 1rem;display:flex;flex-direction:column;gap:.5rem;flex:1 1}.offer-tags{display:flex;flex-wrap:wrap;gap:.35rem}.offer-tag{font-size:.72rem;padding:.15rem .45rem;border:1px solid var(--border);border-radius:999px;color:var(--muted)}.offer-title{margin:0;font-size:1.05rem;font-weight:800}.offer-bullets{margin:0;padding-left:1.1rem;font-size:.85rem;color:var(--muted);flex:1 1}.offer-bullets li{margin-bottom:.25rem}.offer-actions{display:flex;flex-direction:column;gap:.4rem}.btn-sm{padding:.35rem .65rem;font-size:.82rem}.modal-panel-stack{max-width:100%;max-height:min(52dvh,480px);border-radius:1.25rem;align-self:flex-end}@media (min-width:900px){.modal-root:has(.modal-panel-stack){align-items:center;justify-content:center;padding:1.5rem}.modal-panel-stack{max-width:28rem;width:100%;margin:0 auto;border-radius:1.25rem;align-self:center;max-height:min(88dvh,720px)}}.modal-panel-stack-enter{animation:modalStackIn .28s var(--ease) forwards}.modal-panel-stack-exit{animation:modalStackOut .22s var(--ease) forwards}@keyframes modalStackIn{0%{opacity:0;transform:translateX(24px)}to{opacity:1;transform:translateX(0)}}@keyframes modalStackOut{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(20px)}}@media (prefers-reduced-motion:reduce){.modal-panel-stack-enter,.modal-panel-stack-exit{animation:none}}.premium-pay-stack{display:flex;flex-direction:column;gap:.55rem}.premium-pay-btn{min-height:2.85rem;font-weight:600}.segmented-block{margin-bottom:.5rem}.account-mobile{padding-top:.25rem}.account-mobile-header{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.35rem;padding:.5rem 0 1rem}.account-mobile-avatar{width:6.5rem;height:6.5rem;border-radius:50%;background:var(--surface-2);display:flex;align-items:center;justify-content:center;font-size:2rem;font-weight:700;overflow:hidden;margin-bottom:.35rem}.account-mobile-avatar.busy{opacity:.6}.account-mobile-avatar-img{width:100%;height:100%;object-fit:cover}.account-mobile-name{margin:0;font-size:1.35rem;font-weight:800}.account-mobile-status{margin:0;font-size:.88rem;color:var(--text-tertiary)}.account-mobile-email{margin:0;font-size:.85rem;color:var(--text-secondary)}.account-mobile-actions{display:grid;grid-template-columns:repeat(3,1fr);grid-gap:.5rem;gap:.5rem;margin-bottom:1rem}.account-mobile-action{display:flex;flex-direction:column;align-items:center;gap:.35rem;padding:.65rem .35rem;border:none;border-radius:.85rem;background:var(--surface-2);color:var(--text);font-size:.72rem;font-weight:500;cursor:pointer}.tg-info-card{background:var(--surface-1);border-radius:1rem;padding:.35rem 1rem;margin-bottom:.85rem;border:1px solid var(--separator)}.tg-info-row{display:flex;flex-direction:column;padding:.75rem 0;border-bottom:1px solid var(--separator)}.tg-info-row:last-child{border-bottom:none}.tg-info-row strong{font-size:1rem;font-weight:600}.tg-info-label{font-size:.78rem;color:var(--text-tertiary);margin-top:.15rem}.tg-settings-group{background:var(--surface-1);border-radius:1rem;overflow:hidden;margin-bottom:.85rem;border:1px solid var(--separator)}.tg-settings-group-title{margin:0;padding:.65rem 1rem .35rem;font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--accent,var(--text-secondary))}.tg-settings-row{display:flex;align-items:center;gap:.75rem;width:100%;padding:.7rem 1rem;border:none;border-top:1px solid var(--separator);background:transparent;color:var(--text);text-align:left;cursor:pointer}.tg-settings-group>.tg-settings-group-title+.tg-settings-row,.tg-settings-group>.tg-settings-row:first-of-type{border-top:none}.tg-settings-row-static{cursor:default}.tg-settings-icon{width:2rem;height:2rem;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0;background:var(--text);color:var(--bg)}.tg-settings-icon-danger{background:#ff3b30;color:#fff}.account-mobile-action-icon{width:2.5rem;height:2.5rem;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--text);color:var(--bg)}.tg-settings-row-body{flex:1 1;min-width:0;display:flex;flex-direction:column;gap:.1rem}.tg-settings-row-body strong{font-size:.95rem;font-weight:600}.tg-settings-row-body small{font-size:.78rem;color:var(--text-tertiary)}.tg-settings-chevron{color:var(--text-tertiary);font-size:1.1rem;flex-shrink:0}.tg-settings-switch{flex-shrink:0}.settings-mobile-profile{display:flex;align-items:center;gap:.85rem;width:100%;padding:.85rem 1rem;margin-bottom:.85rem;border:1px solid var(--separator);border-radius:1rem;background:var(--surface-1);color:var(--text);cursor:pointer;text-align:left}.settings-mobile-avatar{width:3.25rem;height:3.25rem;border-radius:50%;overflow:hidden;background:var(--surface-2);display:flex;align-items:center;justify-content:center;font-weight:700;flex-shrink:0}.settings-mobile-avatar img{width:100%;height:100%;object-fit:cover}.settings-mobile-profile-text{flex:1 1;min-width:0;display:flex;flex-direction:column;gap:.15rem}.settings-mobile-profile-text strong{font-size:1rem}.settings-mobile-profile-text small{font-size:.78rem;color:var(--text-tertiary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.settings-mobile-footer{text-align:center;margin-top:.5rem}.tg-edit-profile{display:flex;flex-direction:column;gap:.65rem}.tg-modal-row{border-radius:.75rem;margin:0}.tg-edit-hint{margin:.25rem 0 0;font-size:.8rem}.wallet-modal{display:flex;flex-direction:column;gap:.85rem}.system-dialog-root{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;padding:1.25rem;background:rgba(0,0,0,.45);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.system-dialog-panel{width:min(100%,22rem);padding:1.25rem 1.35rem 1.1rem;border-radius:1rem;background:var(--surface-1);border:1px solid var(--separator);box-shadow:var(--shadow-lg)}.system-dialog-panel-wide{width:min(100%,28rem)}.system-dialog-title{margin:0 0 .65rem;font-size:1.05rem;font-weight:700;text-align:center}.system-dialog-message{margin:0 0 1.1rem;font-size:.92rem;line-height:1.45;color:var(--text-secondary);text-align:center;white-space:pre-line}.system-dialog-input{width:100%;margin-bottom:1rem}.system-dialog-actions{display:flex;gap:.65rem;justify-content:stretch}.system-dialog-actions .btn{flex:1 1;min-width:0}.tg-settings-check{color:var(--accent);font-weight:700;font-size:1rem}.chats-mobile-hub .chats-origin-tabs-wrap,.templates-hub .templates-search{margin-bottom:.75rem}.templates-filter-btn{margin-bottom:.75rem;border-radius:.85rem;background:var(--surface-1);border:1px solid var(--separator)}.tg-settings-row-active{background:var(--surface-2)}.chats-mobile-hub .tg-chat-row{border-radius:.85rem;margin-bottom:.35rem;background:var(--surface-1);border:1px solid var(--separator)}.chats-mobile-hub .tg-fab,.hub-page .tg-fab,.templates-hub .tg-fab{right:1rem;bottom:calc(4.75rem + env(safe-area-inset-bottom, 0px))}.templates-create-char{padding:.85rem 1rem;margin-bottom:.85rem;display:flex;flex-direction:column;gap:.65rem}@media (min-width:900px){.account-hub.hub-page,.settings-hub.hub-page{max-width:32rem;margin:0 auto;padding:2rem 1.5rem 2.5rem;min-height:calc(100dvh - 2rem)}.templates-hub.hub-page{max-width:42rem;margin:0 auto;padding:1.5rem 1.5rem 2.5rem}.chats-mobile-hub.hub-page{max-width:36rem;margin:0 auto;padding:1.5rem 1.5rem 2.5rem}.hub-page.page-stack{padding-bottom:2.5rem}.tg-settings-row{padding:.95rem 1.1rem}.account-mobile-header{padding:1rem 0 1.25rem}.account-mobile-name{font-size:1.5rem}.chats-mobile-hub .tg-fab,.templates-hub .tg-fab{bottom:1.5rem}}