/* Yankı Halkası · mint / night / sand. Familiar controls, consistent surfaces. */
:root,[data-theme=light]{--bg:#e9f1eb;--surface:#fff;--surface2:#f2f5f3;--ink:#142b2e;--muted:#5f7475;--line:#e0e7e3;--accent:#007f6d;--accentSoft:#d9f3e7;--bubble:#fff;--shadow:#133a2214}
[data-theme=dark]{--bg:#0c171c;--surface:#111f26;--surface2:#1c2b33;--ink:#e9f2f3;--muted:#a6b8bc;--line:#2a3940;--accent:#46d8ac;--accentSoft:#13443b;--bubble:#21323a;--shadow:#0004}
[data-theme=warm]{--bg:#f6eee3;--surface:#fffaf3;--surface2:#f2e6d8;--ink:#3a2b23;--muted:#806656;--line:#eadbcc;--accent:#a8462c;--accentSoft:#f8dcc6;--bubble:#fffdf8;--shadow:#50302116}
body{font-family:system-ui,-apple-system,"Segoe UI",sans-serif}button{min-height:44px;-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible{outline:3px solid var(--accent);outline-offset:3px}button:active:not(:disabled){filter:brightness(.93)}button:disabled{cursor:default;opacity:.42}.glyph{width:24px;height:24px;display:inline-flex}.glyph svg{width:100%;height:100%}.icon-button{width:44px;height:44px;min-width:44px;border-radius:50%;background:transparent;color:var(--ink);box-shadow:none}.icon-button:hover{background:var(--surface2)}.primary{background:var(--accent);color:var(--surface);border-radius:24px;box-shadow:none;font-weight:650}.primary:hover{background:var(--accent);filter:brightness(1.06)}.secondary{border-radius:20px;background:var(--surface2);color:var(--ink)}.avatar{border-radius:50%;background:var(--accent);color:var(--surface)}.chat-head{height:64px;flex-basis:64px;gap:4px;padding:0 8px;background:var(--surface);border-bottom:1px solid var(--line)}.chat-head .avatar{width:38px;height:38px;flex-basis:38px;margin-inline-end:6px}.chat-title strong{font-size:16px;font-weight:650}.chat-title small{font-size:12px;color:var(--muted)}.chat-head .call-button{width:42px;min-width:42px}.messages{background-color:var(--bg);background-image:radial-gradient(ellipse at 18% 5%,color-mix(in srgb,var(--accent) 5%,transparent),transparent 70%);gap:7px;padding:20px 14px}.bubble{position:relative;background:var(--bubble);border-radius:8px 12px 12px 12px;padding:8px 10px 5px;box-shadow:0 1px 2px var(--shadow);font-size:15px;line-height:1.4;max-width:82%}.bubble.mine{background:var(--accentSoft);color:var(--ink);border-radius:12px 8px 12px 12px}.bubble.selected{outline:2px solid var(--accent);background:color-mix(in srgb,var(--accentSoft) 90%,var(--surface))}.bubble img{border-radius:7px;max-height:340px}.bubble footer{font-size:10px;margin-top:4px;color:var(--muted);opacity:1}.file-preview{background:transparent;border:0;font-size:12px;padding:7px 0;min-height:32px;color:var(--ink);text-align:start}.download-link{font-size:12px;font-weight:500!important}.composer{display:grid;grid-template-columns:40px 40px minmax(40px,1fr) 40px 44px 44px;align-items:end;gap:0;padding:6px 6px max(7px,env(safe-area-inset-bottom));border-top:0;background:var(--bg);position:relative}.composer textarea{background:var(--surface);border:0;border-radius:0;min-width:0;min-height:44px;padding:12px 3px;font-size:15px;color:var(--ink);box-shadow:none;z-index:1}.composer #attachments{grid-column:4;grid-row:1;border-radius:0;background:var(--surface);width:40px;min-width:40px;z-index:1}.composer #composer-emoji{grid-column:1;grid-row:1;border-radius:24px 0 0 24px;background:var(--surface);width:40px;min-width:40px;z-index:1}.composer #message{grid-column:2 / 4;grid-row:1}.composer #take-photo{grid-column:5;grid-row:1;border-radius:0 24px 24px 0;background:var(--surface);width:40px;min-width:40px;z-index:1}.composer #record{grid-column:6;grid-row:1;background:var(--accent);color:var(--surface);margin-inline-start:4px;z-index:2}.composer .send{grid-column:6;grid-row:1;background:var(--accent);color:var(--surface);width:44px;height:44px;border-radius:50%;z-index:3;display:none;margin-inline-start:4px}.composer.has-draft .send{display:grid}.composer.has-draft #record{visibility:hidden}.send .glyph{width:24px;height:24px}.message-actions{gap:0;min-height:48px;border:0;border-bottom:1px solid var(--line);background:var(--surface2);padding:0 6px;flex-wrap:nowrap;overflow-x:auto;flex-shrink:0}.message-actions button{min-width:40px;width:40px;height:44px;padding:7px;border:0;background:transparent;border-radius:50%;flex:0 0 40px;color:var(--ink)}#selected-count{font-size:12px;min-width:68px;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.reaction-tray{position:fixed;z-index:8;display:flex;justify-content:space-around;align-items:center;gap:0;height:54px;padding:3px 4px;border-radius:30px;background:var(--surface);border:1px solid var(--line);box-shadow:0 6px 24px var(--shadow)}.reaction-quick{border:0;background:none;border-radius:50%;font-size:25px;padding:0;min-width:42px;height:44px;line-height:1}.reaction-quick:hover{background:var(--surface2)}.more-emoji{background:var(--surface2);color:var(--ink);font-size:27px}.full-emoji-picker{display:flex;flex-direction:column;gap:12px}.emoji-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));max-height:42dvh;overflow-y:auto;gap:2px}.emoji-choice{background:transparent;border:0;font-size:27px;min-width:0;padding:4px;height:46px}.emoji-tabs,.emoji-tones{display:flex;justify-content:space-around;gap:4px}.emoji-tab,.emoji-tone{font-size:23px;background:var(--surface2);border:0;border-radius:15px;min-width:40px;padding:2px;color:var(--ink)}.emoji-tone.active{outline:2px solid var(--accent)}.sidebar-head{padding:15px 16px 12px}.sidebar-head .eyebrow{display:none}.sidebar-head h2{font-size:26px;letter-spacing:-.04em;color:var(--accent)}.sidebar-head h2 span{display:none}.sidebar-head h2:before{content:'';display:inline-block;width:28px;height:28px;background:url('/icon.svg') center/contain no-repeat;vertical-align:-5px;margin-inline-end:8px}.conversation-item{border:0;padding:12px 16px;gap:12px}.conversation-item.selected{background:var(--surface2);border:0}.conversation-top strong{font-size:15px}.conversation-meta small{font-size:13px}.conversation-list .avatar{width:48px;height:48px;flex-basis:48px}.search-box{margin:0 12px 12px}.search-box input{border:0;border-radius:25px;background:var(--surface2)}.chat-filters{gap:8px;padding:0 14px 12px}.filter-tab{border-radius:20px;padding:6px 14px;min-height:36px;border:0}.filter-tab.active{background:var(--accentSoft);color:var(--accent)}.section-row{display:none}.sidebar-actions{padding:10px 14px;background:var(--surface);border-top:1px solid var(--line)}.sidebar-actions button{font-size:12px;font-weight:600;min-height:48px}.settings-home .menu-item{border:0;border-bottom:1px solid var(--line);border-radius:0;min-height:68px;background:transparent;box-shadow:none}.settings-profile-row{display:block;width:100%;text-align:start;border:0;background:transparent;padding:0;margin-bottom:15px;color:inherit}.profile-hero{margin:0;display:flex;align-items:center;gap:14px;background:transparent}.profile-hero .avatar{width:64px;height:64px;flex-basis:64px}.settings-back{border:0;background:transparent;color:var(--accent);display:flex;align-items:center;gap:8px;margin-bottom:14px;padding:0}.settings-modal .settings-label{margin-bottom:16px}.settings-modal{max-height:90dvh;overflow-y:auto}.settings-label input{border-radius:8px;background:var(--surface);border-bottom:2px solid var(--accent)}.settings-home .menu-item .glyph{color:var(--accent)}.theme-choices{gap:8px}.theme-choice{border-radius:12px;box-shadow:none}.tone-row{border-radius:10px;min-height:60px}.tone-preview{border-radius:20px;min-height:40px}.auth-shell{background:var(--surface);padding:24px}.auth-shell>.brand-mark,.auth-shell>.eyebrow,.auth-shell>h1{display:none}.brand-mark img,.empty-illustration img{width:100%;height:100%}.brand-mark{background:transparent;box-shadow:none}.welcome-screen{text-align:center;max-width:400px;padding:24px 8px}.welcome-logo{display:block;width:140px;height:140px;margin:0 auto 35px}.welcome-screen h1{font-size:28px;letter-spacing:-.02em}.welcome-screen p{font-size:15px;color:var(--muted);line-height:1.6;margin:20px 0 48px}.welcome-screen button{width:100%}.auth-card{border:0;box-shadow:none;background:var(--surface);padding:15px}.auth-lead{color:var(--muted);text-align:center}.auth-card input{border-radius:0;border:0;border-bottom:2px solid var(--accent);background:var(--surface);color:var(--ink)}.auth-card label{color:var(--ink)}.privacy-notice{font-size:11px;color:var(--muted)}.switch{background:var(--surface2)}.switch button.active{background:var(--accentSoft);color:var(--accent)}.image-stage{height:60dvh;min-height:260px;overflow:auto;touch-action:none;overscroll-behavior:contain;display:block;padding:0;direction:ltr}.image-stage .zoom-image{display:block;margin:0;object-fit:initial;max-height:none;user-select:none;pointer-events:auto}.media-modal{width:min(96vw,1000px);max-height:96dvh;padding:12px}.media-modal .modal-head{margin-bottom:8px}.document-frame{height:72dvh}.viewer-tools{min-height:44px;gap:8px}#toast{z-index:12;background:var(--ink);color:var(--surface);max-width:88vw;border-radius:20px}dialog{border-radius:20px;border:1px solid var(--line);box-shadow:0 12px 40px var(--shadow)}dialog::backdrop{background:#0007}.modal-head h3{font-size:18px}.lock-screen .brand-mark{background:url('/icon.svg') center/contain no-repeat}.draft-queue{border-radius:12px;background:var(--surface);margin:4px 8px}.draft-hint{color:var(--muted)}[dir=rtl] .composer{direction:rtl}[dir=rtl] .bubble footer{text-align:left}@media(max-width:350px){.composer{grid-template-columns:34px 34px minmax(30px,1fr) 34px 38px 44px}.composer #attachments,.composer #composer-emoji,.composer #take-photo{width:34px;min-width:34px}.chat-title strong{font-size:14px}.chat-head .icon-button{min-width:38px;width:38px}.emoji-grid{grid-template-columns:repeat(6,minmax(0,1fr))}}
.phone-auth{max-width:400px}.phone-auth h2{font-size:23px;text-align:center;margin:0 0 20px}.phone-auth input{width:100%;padding:14px;text-align:center;margin:18px 0;border:0;border-bottom:2px solid var(--accent);background:var(--surface);color:var(--ink)}.phone-auth .primary{width:100%;text-align:center}.text-button{background:transparent;color:var(--accent);border:0;display:block;margin:12px auto;text-align:center}.phone-auth-status{font-size:13px;color:var(--muted);line-height:1.6}.phone-auth .settings-select{border-radius:0;border:0;border-bottom:1px solid var(--accent);text-align:center}

.message-actions span{display:block}.message-actions .glyph{display:inline-flex;margin:0}.profile-meta{display:block}.profile-meta strong,.profile-meta>span{display:block}.profile-meta>span{font-size:12px;color:var(--muted);margin-top:4px}.emoji-choice,.reaction-quick,.emoji-tab,.emoji-tone{font-family:"Apple Color Emoji","Noto Color Emoji","Segoe UI Emoji",system-ui}

/* Keep the main chat controls comfortably tappable on narrow screens. */
.chat-head .icon-button,.chat-head .call-button{width:48px;min-width:48px;height:48px}.composer{grid-template-columns:48px 48px minmax(30px,1fr) 48px 48px 48px}.composer textarea{min-height:48px;padding-block:14px}.composer #attachments,.composer #composer-emoji,.composer #take-photo,.composer #record,.composer .send{width:48px;min-width:48px;height:48px}.composer #record,.composer .send{margin-inline-start:0}.message-actions button{height:48px}.settings-back{min-height:48px}
