/* The phone and conversation each have their own space in the chat column. */
#castSocialThreadButton > img { object-fit:contain; }
#chatSection .chat-phone { position:relative; inset:auto; order:-1; z-index:40; display:flex; flex:0 1 auto; flex-direction:column; height:calc(80% - 60px); max-height:none; min-height:0; margin:calc(max(8px,env(safe-area-inset-top)) + 48px) 8px 4px; border:1px solid #e9e5e7; border-radius:18px; background:#fff; color:#20252b; box-shadow:0 -3px 15px #18111614; overflow:clip; }
/* Follow Safari's visual viewport without letting focus scroll the outer chat. */
body.chat-active.cast-social-thread-open #chatSection.has-chat-phone { position:fixed; top:var(--chat-phone-viewport-top,0px); right:0; bottom:auto; left:0; margin-inline:auto; height:var(--chat-phone-viewport-height,100dvh); max-height:none; overflow:clip; }
body.cast-social-thread-open #chatSection.has-chat-phone > .chat-header,
body.cast-social-thread-open #chatSection.has-chat-phone > :is(.chat-action-button,.random-situation-button,.change-cast-button,.situation-button) { display:none !important; }
body.cast-social-thread-open #chatSection.has-chat-phone > .chat-messages-container { flex:1 1 0; padding-top:8px; mask-image:none; -webkit-mask-image:none; }
/* Give Talk the available visual viewport while its own composer is in use. */
body.cast-social-thread-open #chatSection:has(.chat-phone.is-talk-thread .cast-social-thread-form:focus-within) > :is(.chat-messages-container,.chat-form) { display:none; }
body.cast-social-thread-open #chatSection:has(.chat-phone.is-talk-thread .cast-social-thread-form:focus-within) .chat-phone { flex:1 1 0; height:auto; }
body.cast-social-thread-open #chatSection.is-phone-typing .chat-phone { position:relative; inset:auto; height:44px; min-height:44px; margin:calc(max(8px,env(safe-area-inset-top)) + 48px) 8px 4px; }
body.cast-social-thread-open #chatSection.is-phone-typing .chat-phone > :not(.chat-phone-status-bar) { display:none !important; }
.chat-phone-resume { display:none; }
body.cast-social-thread-open #chatSection.is-phone-typing .chat-phone-status-bar { min-height:44px; padding:0 12px; justify-content:space-between; }
body.cast-social-thread-open #chatSection.is-phone-typing .chat-phone-resume { display:block; min-height:44px; padding:0 8px; border:0; background:transparent; color:inherit; font:inherit; font-size:13px; touch-action:manipulation; }
body.cast-social-thread-open #chatSection.is-phone-typing .chat-phone-status-bar > :is(.cast-social-thread-back,.chat-phone-context-title,.cast-social-thread-info-button) { display:none !important; }
#chatSection .chat-phone[hidden], .chat-phone [hidden] { display:none !important; }
.chat-phone > .cast-social-thread-header { flex:none; min-height:44px; }
.chat-phone .cast-social-thread-heading { grid-column:2; grid-row:1; }
.chat-phone .cast-social-thread-close { grid-column:3; grid-row:1; }
body.cast-social-thread-open #chatSection.has-chat-phone > .bgm-toggle-button { visibility:hidden; }
#chatSection .chat-phone .cast-social-thread-back { visibility:visible; pointer-events:auto; }
.chat-phone .cast-social-thread-header h2 { font-size:14px; }
.chat-phone .cast-social-thread-list,.chat-phone .cast-social-thread-creator,.chat-phone .world-board { flex:1; min-height:0; overflow:auto; }
.chat-phone .cast-social-thread-messages { flex:1; background:#a7bdd7; padding:12px; }
.chat-phone .cast-social-thread-message--user .cast-social-thread-bubble { background:#8de055; color:#111; border-radius:17px; }
.chat-phone .cast-social-thread-message--participant .cast-social-thread-bubble { border-radius:17px; }
.chat-phone .cast-social-thread-bubble { padding:10px 13px; line-height:1.6; }
.chat-phone.is-thread-view > .cast-social-thread-header { background:#a7bdd7; border:0; }
.chat-phone .cast-social-thread-form { flex:none; background:#f6f7f8; padding:8px 12px; }
.chat-phone .cast-social-thread-form .school-sticker-tray { box-sizing:border-box; max-height:var(--chat-phone-sticker-height,min(180px,24dvh)); }
.chat-phone .cast-social-thread-form textarea { background:#fff; font-size:16px; }
.chat-phone .cast-social-thread-list-item { min-height:76px; padding:12px 18px; gap:14px; }
.chat-phone .cast-social-thread-list-avatar { width:48px; height:48px; flex-basis:48px; }
.chat-phone .cast-social-thread-list-title { font-size:15px; font-weight:600; }
.chat-phone .cast-social-thread-list-preview { font-size:12px; color:#8c8c8c; }
.chat-phone .cast-social-thread-list [data-open-talk] { display:flex; }
.chat-phone-home { display:flex; flex:1; flex-direction:column; min-height:0; overflow:auto; gap:24px; box-sizing:border-box; padding:24px 16px 18px; background:transparent; }
.chat-phone-apps { display:grid; flex:none; grid-template-columns:repeat(4,minmax(0,1fr)); gap:22px 8px; }
.chat-phone-app { display:flex; min-width:0; flex-direction:column; align-items:center; gap:7px; min-height:92px; padding:0; border:0; background:transparent; color:#fff; font:inherit; font-size:12px; touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
.chat-phone-app-name { display:block; width:100%; min-height:15px; overflow:hidden; font-size:11px; line-height:1.35; text-align:center; text-overflow:ellipsis; white-space:nowrap; text-shadow:0 1px 3px #1d294d66; }
.chat-phone-home .chat-phone-app-icon { flex:none; width:56px; height:56px; border-radius:14px; box-shadow:0 2px 5px #1e32521c; }
.chat-phone-app:focus-visible { outline:2px solid #fff; outline-offset:4px; border-radius:14px; }
.chat-phone-dock { display:grid; flex:none; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:center; gap:8px; margin-top:auto; padding:14px 4px; border:1px solid #ffffff40; border-radius:28px; background:#ffffff30; backdrop-filter:blur(22px); -webkit-backdrop-filter:blur(22px); }
.chat-phone-dock .chat-phone-app { min-height:56px; gap:0; }
.chat-phone-dock .chat-phone-app-name { display:none; }
.chat-phone-app-icon { display:grid; place-items:center; width:52px; height:52px; border-radius:14px; background:#fff; overflow:hidden; }
.chat-phone-app-icon img { width:100%; height:100%; }
.chat-phone-app-icon--music { background:#191414; color:#1ed760; font-size:36px; }
/* School's board uses flat, separated topics rather than chat bubbles. */
.chat-phone .world-board { border-top:3px solid #c4456c; background:#fff; font-size:14px; }
.chat-phone .world-board-content { overflow:auto; background:#fff; padding:0; display:block; }
.chat-phone .world-board-list-row { gap:12px; margin:0; border-bottom:1px solid #e9e5e7; padding:14px 16px; }
.chat-phone .world-board-list-row .cast-social-thread-list-title { color:#333; font-size:14px; line-height:1.6; }
.chat-phone .world-board-list-row .cast-social-thread-list-preview { color:#777; font-size:12px; }
.chat-phone .world-board .world-board-topic,.chat-phone .world-board .world-board-comment { display:block; max-width:none; margin:0; padding:14px 16px; border-bottom:1px solid #e9e5e7; }
.chat-phone .world-board .cast-social-thread-bubble { margin:6px 0 0; padding:0; border-radius:0; background:transparent; font-size:14px; line-height:1.85; }
.chat-phone .world-board-speaker { margin:0; }
.chat-phone .world-board .world-board-form { margin:0; padding:12px; }
.chat-phone .world-board .cast-social-thread-creator-submit { background:#c4456c; border-radius:4px; }
.chat-phone .world-board > .cast-social-thread-status:empty { display:none; }
/* Independent topic and anonymous-thread boards share data operations, not appearance. */
.chat-phone .world-board[data-board-kind="girls"], .chat-phone .world-board[data-board-kind="anonymous"] { border-top:0; }
.chat-phone.is-board-view .chat-phone-context-title { display:none; }
.chat-phone.is-board-view[data-board-kind="trend"] .chat-phone-context-title { display:block; }
.chat-phone .world-board[data-board-kind="girls"] { --forum-accent:#df4972; background:#fff; }
.chat-phone .world-board[data-board-kind="anonymous"] { --forum-accent:#185ba7; background:#efefef; font-family:Arial,"Noto Sans JP",sans-serif; }
.forum-masthead { display:flex; flex-direction:column; gap:3px; padding:13px 12px; background:var(--forum-accent); color:#fff; text-align:center; }
.forum-brand { font-size:23px; font-weight:800; letter-spacing:1px; }
.forum-tagline { font-size:10px; }
[data-board-kind="anonymous"] .forum-masthead { padding:10px 12px; background:#efefef; border-bottom:1px solid #aaa; color:#333; text-align:left; }
[data-board-kind="anonymous"] .forum-brand { color:#135a27; font-family:serif; font-size:24px; letter-spacing:0; }
.forum-tools { display:flex; min-height:44px; border-bottom:1px solid #ddd; }
.forum-tab { flex:1; min-height:44px; padding:8px; border:0; border-bottom:3px solid transparent; background:#fff; color:#777; font:inherit; font-size:13px; }
.forum-tab[aria-pressed="true"] { color:var(--forum-accent); border-bottom-color:var(--forum-accent); font-weight:700; }
.forum-board-name { padding:14px 10px; font-size:13px; }
.forum-thread { display:grid; grid-template-columns:24px minmax(0,1fr); gap:5px 8px; width:100%; min-height:96px; padding:16px 12px; border:0; border-bottom:1px solid #ddd; background:#fff; color:#252525; text-align:left; font:inherit; touch-action:manipulation; }
.forum-thread-rank { grid-row:1 / 3; font-size:20px; font-weight:700; color:var(--forum-accent); }
.forum-thread-subject { font-size:15px; font-weight:700; line-height:1.55; overflow-wrap:anywhere; }
.forum-thread-total { grid-column:2; color:var(--forum-accent); font-size:12px; font-weight:600; }
.forum-thread-date { grid-column:2; color:#888; font-size:10px; }
[data-board-kind="anonymous"] .forum-thread { grid-template-columns:20px minmax(0,1fr) auto; gap:4px; min-height:76px; padding:12px 10px; border-bottom:1px solid #bbb; background:#efefef; }
[data-board-kind="anonymous"] .forum-thread-rank { grid-row:1; font-size:12px; color:#444; }
[data-board-kind="anonymous"] .forum-thread-subject { color:#1457a6; text-decoration:underline; font-size:13px; font-weight:400; }
[data-board-kind="anonymous"] .forum-thread-total { grid-column:3; color:#444; font-weight:400; font-size:11px; }
.forum-refresh { display:block; min-height:44px; width:calc(100% - 24px); margin:12px; padding:10px; border:1px solid #ddd; border-radius:4px; background:#fff; color:var(--forum-accent); font:inherit; font-size:13px; touch-action:manipulation; }
.forum-empty { padding:20px 12px; font-size:13px; color:#666; }
.forum-thread-heading { padding:12px; border-bottom:1px solid #ddd; }
.forum-breadcrumb { min-height:44px; padding:6px 0; border:0; background:transparent; color:var(--forum-accent); font:inherit; font-size:12px; text-decoration:underline; }
.forum-thread-title { margin:0 0 8px; color:#222; font-size:17px; line-height:1.5; }
.forum-thread-count { font-size:11px; color:#777; }
.forum-post { padding:15px 12px; border-bottom:1px solid #ddd; background:#fff; }
.forum-post-meta { display:flex; flex-wrap:wrap; align-items:center; gap:5px; font-size:11px; color:#777; }
.forum-post-number { min-width:32px; min-height:44px; padding:0 4px; border:0; background:transparent; color:var(--forum-accent); font:inherit; font-weight:700; }
.forum-post-time { font-size:10px; }
.forum-own-label { color:var(--forum-accent); }
.forum-post-body { margin:4px 0 10px; white-space:pre-wrap; overflow-wrap:anywhere; color:#222; font-size:14px; line-height:1.9; }
.forum-reply-button { min-height:44px; padding:6px 10px; border:1px solid #ddd; border-radius:4px; background:#fff; color:#777; font:inherit; font-size:11px; }
.forum-anchor { min-height:44px; padding:0 3px; border:0; background:transparent; color:#1457a6; text-decoration:underline; font:inherit; }
[data-board-kind="anonymous"] .forum-post { padding:8px 10px; background:#efefef; border-bottom:1px solid #ccc; }
[data-board-kind="anonymous"] .forum-post-name { color:#166b29; font-weight:700; }
[data-board-kind="anonymous"] .forum-post-body { margin:0 0 6px 16px; font-size:13px; line-height:1.75; }
.chat-phone .world-board[data-board-kind="anonymous"] .world-board-form { background:#e5e5e5; }
.chat-phone .world-board[data-board-kind="girls"] .world-board-form { background:#fff5f8; }
.chat-phone-photos { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; }
.chat-phone-photos .photo-app--detail { height:100%; padding-bottom:0; }
.chat-phone-photos .photo-empty { min-height:0; padding:20px; }
.chat-phone-photos .photo-toolbar { min-height:44px; }
.chat-phone-photos .photo-library-heading h2 { font-size:22px; }
.chat-phone-photos .photo-stage { flex:1 0 90px; }
.chat-phone-photos .photo-app--editor { height:auto; min-height:100%; }
.chat-phone-photos .photo-app--editor .photo-stage { height:120px; flex:none; }
.chat-phone-photos .photo-app--editor .photo-preview { max-height:120px; }
.chat-phone-photos button { border:0; font:inherit; cursor:pointer; }
/* Music uses a scrolling library above an always-visible player. */
.chat-phone-music { display:flex; flex:1; min-height:0; overflow:hidden; background:#121212; color:#fff; }
.chat-phone-music .bgm-settings-popover { position:static; display:flex; flex:1; flex-direction:column; min-width:0; min-height:0; width:100%; max-width:none; max-height:none; padding:0; border:0; border-radius:0; box-shadow:none; background:#121212; color:#fff; overflow:hidden; box-sizing:border-box; }
.chat-phone-music .bgm-library-header { display:flex; align-items:center; justify-content:space-between; flex:none; gap:8px; padding:10px 14px 4px; }
.chat-phone-music .bgm-library-header h3 { margin:0; color:#fff; font-size:17px; font-weight:750; letter-spacing:-.4px; white-space:nowrap; }
.chat-phone-music .bgm-library-tabs { display:flex; flex:none; gap:2px; }
.chat-phone-music .bgm-library-tabs button { min-height:36px; padding:6px 10px; border:0; border-radius:18px; background:transparent; color:#b3b3b3; font:inherit; font-size:12px; }
.chat-phone-music .bgm-library-tabs [aria-pressed=true] { background:#fff; color:#121212; }
.chat-phone-music .bgm-track-filter { flex:none; flex-wrap:nowrap; gap:6px; margin:0; padding:2px 14px 8px; overflow:auto; }
.chat-phone-music .bgm-track-filter-button { flex:none; min-height:30px; padding:5px 11px; background:#282828; color:#eee; border:0; border-radius:20px; font-size:11px; font-weight:500; }
.chat-phone-music .bgm-track-filter-button.is-active { background:#1ed760; color:#000; }
.chat-phone-music .bgm-library-scroll { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; padding:0 8px 8px; }
.chat-phone-music .bgm-track-list { display:flex; flex-direction:column; gap:0; overflow:visible; }
.chat-phone-music .bgm-track-option { justify-content:flex-start; flex:none; gap:10px; width:100%; min-height:60px; padding:6px; border:0; border-radius:5px; background:transparent; color:#fff; text-align:left; }
.chat-phone-music .bgm-track-option.is-selected { background:#ffffff09; }
.chat-phone-music .bgm-track-main { display:flex; flex:1; flex-direction:column; min-width:0; gap:4px; }
.chat-phone-music .bgm-rank { flex:0 0 16px; color:#a7a7a7; text-align:center; font-size:13px; font-variant-numeric:tabular-nums; }
.chat-phone-music .bgm-track-title { display:block; overflow:hidden; color:#fff; font-size:13px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.chat-phone-music .is-selected .bgm-track-title { color:#1ed760; }
.chat-phone-music .bgm-track-description { display:block; overflow:hidden; margin:0; color:#a7a7a7; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.chat-phone-music .bgm-playing-mark { color:#1ed760; font-size:17px; letter-spacing:1px; }
.chat-phone-music .bgm-art { display:grid; place-items:center; flex:none; width:44px; height:44px; overflow:hidden; border-radius:3px; background:linear-gradient(145deg,#315c7b,#171c45); }
.chat-phone-music .bgm-art--1 { background:linear-gradient(145deg,#cc7765,#5c2145); }
.chat-phone-music .bgm-art--2 { background:linear-gradient(145deg,#78a78d,#173a3c); }
.chat-phone-music .bgm-art--3 { background:linear-gradient(145deg,#cbb575,#5a4635); }
.chat-phone-music .bgm-art--4 { background:linear-gradient(145deg,#9786bb,#3d325a); }
.chat-phone-music .bgm-art--5 { background:linear-gradient(145deg,#76b5b9,#164c64); }
.chat-phone-music .bgm-art svg { width:37px; height:37px; fill:none; stroke:#ffffff60; stroke-width:1; }
.chat-phone-music .bgm-art svg path { stroke:#ffffffe0; stroke-width:2; stroke-linejoin:round; }
.chat-phone-music .bgm-art svg ellipse { fill:#ffffffe0; stroke:none; }
.chat-phone-music .bgm-player-dock { flex:none; border-top:1px solid #ffffff0c; background:#252c28; }
.chat-phone-music .bgm-now-playing { display:flex; align-items:center; gap:9px; min-height:50px; padding:5px 12px 0; }
.chat-phone-music .bgm-now-playing .bgm-art { width:36px; height:36px; }
.chat-phone-music .bgm-now-playing .bgm-art svg { width:31px; height:31px; }
.chat-phone-music .bgm-playing-copy { display:flex; flex:1; flex-direction:column; min-width:0; gap:3px; }
.chat-phone-music .bgm-playing-copy strong { overflow:hidden; font-size:12px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.chat-phone-music .bgm-playing-copy small { color:#c6cbc7; font-size:10px; }
.chat-phone-music .bgm-settings-toggle { display:grid; place-items:center; flex:none; width:40px; height:40px; min-height:40px; margin:0; padding:9px; border:0; border-radius:50%; background:#1ed760; color:#121212; }
.chat-phone-music .bgm-settings-toggle.is-active { background:#1ed760; }
.chat-phone-music .bgm-settings-toggle svg { width:22px; height:22px; fill:currentColor; }
.chat-phone-music .bgm-volume { display:flex; align-items:center; gap:10px; padding:0 14px 4px; color:#bdc3be; font-size:10px; }
.chat-phone-music .bgm-volume input { flex:1; min-width:0; height:26px; accent-color:#1ed760; }
.chat-phone-music .bgm-track-load-more,.chat-phone-music .bgm-cast-recommended { display:block; min-height:40px; width:100%; margin:4px 0 0; padding:8px; border:0; border-radius:4px; background:transparent; color:#b3b3b3; font:inherit; font-size:11px; text-align:center; }
.chat-phone-music .bgm-library-empty { padding:12px; color:#b3b3b3; font-size:12px; line-height:1.7; }
/* The thought camera captures the current chat image and reveals text on shutter. */
.chat-phone-thoughts { display:flex; flex:1; min-height:0; overflow:auto; background:#101113; color:#fff; }
.thought-camera { display:flex; flex:1; flex-direction:column; min-height:100%; width:100%; }
.thought-camera-viewfinder { position:relative; display:flex; align-items:center; justify-content:center; flex:1 0 180px; min-height:180px; overflow:hidden; background:#050505; }
.thought-camera-preview { position:absolute; width:100%; height:100%; object-fit:contain; }
.thought-camera-focus { position:absolute; inset:20% 25%; border:1px solid #ffffff70; border-radius:8px; pointer-events:none; }
.thought-camera-bubble { position:absolute; inset:auto 12px 12px; box-sizing:border-box; max-height:calc(100% - 56px); overflow:auto; margin:0; padding:12px 14px; border-radius:12px; background:#fffffff2; color:#2a2328; font-size:13px; line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; }
.thought-camera-working { position:absolute; inset:0; display:grid; place-items:center; padding:16px; background:#0009; color:#fff; font-size:13px; }
.thought-camera-flash { position:absolute; inset:0; background:#fff; pointer-events:none; animation:thought-camera-flash .3s ease-out both; }
.thought-camera-controls { display:flex; flex:none; flex-direction:column; align-items:center; gap:8px; padding:8px 12px 12px; background:#17181b; }
.thought-camera-status { margin:0; color:#b7b8bb; font-size:11px; line-height:1.5; text-align:center; }
.thought-camera-status[role=alert] { color:#ffb4ab; }
.thought-camera-shutter { width:56px; height:56px; min-height:56px; padding:0; border:3px solid #fff; border-radius:50%; background:#fff; box-shadow:inset 0 0 0 3px #17181b; }
.thought-camera-shutter:active:not(:disabled) { transform:scale(.94); }
.thought-camera-shutter:disabled { opacity:.4; }
@keyframes thought-camera-flash { from { opacity:.9; } to { opacity:0; } }
@media (prefers-reduced-motion:reduce) { .thought-camera-flash { display:none; } }
/* Phone chrome: no clock or date, only fixed reception and battery symbols. */
.chat-phone { --phone-chrome-bg:#fff; --phone-chrome-ink:#20252b; }
.chat-phone.is-phone-home { --phone-chrome-bg:transparent; --phone-chrome-ink:#fff; background:radial-gradient(ellipse at 0% 0%,#e0aac8 0%,transparent 62%),radial-gradient(ellipse at 100% 100%,#aabce4 0%,transparent 65%),linear-gradient(155deg,#ab90bd,#708dc1 70%,#91a9cf) !important; }
#chatSection .chat-phone.is-phone-home { border-radius:28px; border-color:#ffffff50; }
.chat-phone.is-phone-home .chat-phone-status-bar { padding:4px 18px 0; }
.chat-phone-status-bar { display:flex; justify-content:flex-end; align-items:center; flex:none; min-height:32px; padding:0 12px; gap:4px; background:var(--phone-chrome-bg); color:var(--phone-chrome-ink); }
.chat-phone-status-icons { display:flex; flex:none; align-items:center; gap:6px; margin-left:auto; }
.chat-phone-status-icons svg { display:block; width:17px; height:13px; fill:currentColor; }
.chat-phone-status-icons .chat-phone-status-signal { width:18px; height:12px; }
.chat-phone-status-icons .chat-phone-status-battery { width:27px; height:13px; }
.chat-phone .cast-social-thread-header { grid-template-columns:40px minmax(0,1fr) 40px; }
.chat-phone .cast-social-thread-header[hidden] { display:none; }
.chat-phone-home-button { display:grid; place-items:center; flex:none; width:100%; min-height:44px; padding:0; border:0; background:var(--phone-chrome-bg); color:var(--phone-chrome-ink); touch-action:manipulation; }
.chat-phone-home-button::after { content:""; width:100px; height:4px; border-radius:4px; background:currentColor; }
.chat-phone-photos .photo-back[aria-label="スマホ"] { visibility:hidden; }
.chat-phone-status-bar .cast-social-thread-back { flex:none; width:44px; height:44px; min-height:44px; color:inherit; }
.chat-phone-context-title { flex:1; min-width:0; margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:inherit; font-size:14px; font-weight:600; }
.chat-phone-status-bar .cast-social-thread-info-button { flex:none; width:44px; height:44px; margin:0; color:inherit; }
.chat-phone-status-bar .cast-social-thread-info-button svg { transform:none; }
.chat-phone.is-phone-dark { --phone-chrome-bg:#101113; --phone-chrome-ink:#fff; }
.chat-phone.is-phone-dark .cast-social-thread-header { background:var(--phone-chrome-bg); border-color:transparent; color:var(--phone-chrome-ink); }
.chat-phone.is-phone-dark .cast-social-thread-header h2,.chat-phone.is-phone-dark .cast-social-thread-back { color:var(--phone-chrome-ink); }
.has-chat-phone > .chat-phone-minimize { display:none; }
body.cast-social-thread-open .has-chat-phone > .chat-phone-minimize { position:absolute; display:grid; place-items:center; top:max(8px,env(safe-area-inset-top)); right:max(8px,env(safe-area-inset-right)); bottom:auto; z-index:41; width:44px; height:44px; min-height:44px; padding:0; border:0; border-radius:50%; background:transparent; color:#2a2328; font:inherit; font-size:18px; touch-action:manipulation; }
.chat-phone-minimize > span { display:grid; place-items:center; box-sizing:border-box; width:32px; height:32px; border:1px solid #e9e5e7; border-radius:50%; background:#fff; pointer-events:none; }

/* The regular camera keeps its controls around one uninterrupted viewfinder. */
#chatSection .chat-phone.is-snapshot-camera { background:#080808; color:#fff; }
.chat-phone.is-snapshot-camera > .cast-social-thread-header { background:#080808; border:0; color:#fff; }
.chat-phone.is-snapshot-camera .cast-social-thread-header h2 { color:#fff; }
.chat-phone.is-snapshot-camera .cast-social-thread-header button { color:#fff; }
.chat-phone-snapshot-camera { display:flex; flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; background:#080808; }
.snapshot-camera { display:flex; flex-direction:column; flex:1 0 auto; min-height:100%; color:#fff; }
.snapshot-camera button { font:inherit; touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
.snapshot-camera button:disabled { opacity:.4; }
.snapshot-camera button:focus-visible { outline:2px solid #ffd45d; outline-offset:3px; }
.snapshot-camera svg { display:block; width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.snapshot-camera-viewfinder { position:relative; display:flex; flex:1; min-height:60px; overflow:hidden; background:#181818; touch-action:manipulation; }
.snapshot-camera-preview { position:absolute; inset:0; display:block; width:100%; height:100%; min-height:0; object-fit:contain; }
.snapshot-camera-preview.is-mirrored { transform:scaleX(-1); }
.snapshot-camera-focus { position:absolute; width:56px; height:56px; border:1px solid #ffd45d; transform:translate(-50%,-50%); pointer-events:none; }
.snapshot-camera-progress { position:absolute; inset:0; display:grid; place-items:center; background:#0008; color:#fff; font-size:14px; }
.snapshot-camera.is-capturing .snapshot-camera-viewfinder { animation:snapshot-shutter .3s ease-out; }
.snapshot-camera-controls { flex:none; padding:6px 20px 8px; text-align:center; }
.snapshot-camera-status { min-height:18px; margin:0 0 7px; color:#ffd45d; font-size:12px; line-height:1.5; }
.snapshot-camera-status[role=alert] { color:#fff; }
.snapshot-camera-shutter-row { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.snapshot-camera-album,.snapshot-camera-flip { display:grid; place-items:center; flex:none; width:44px; height:44px; border:0; border-radius:8px; background:#252525; color:#fff; overflow:hidden; padding:0; }
.snapshot-camera-album img { width:100%; height:100%; object-fit:cover; }
.snapshot-camera-flip { border-radius:50%; }
.snapshot-camera-shutter { display:grid; place-items:center; flex:none; width:68px; height:68px; padding:0; border:4px solid #fff; border-radius:50%; background:#fff; box-shadow:inset 0 0 0 3px #080808; color:#080808; }
.snapshot-camera-shutter:active:not(:disabled) { background:#bbb; }
.snapshot-camera-remaining { display:block; min-height:15px; margin-top:6px; color:#bbb; font-size:10px; }
@keyframes snapshot-shutter { from { opacity:.25; } to { opacity:1; } }
@media (prefers-reduced-motion:reduce) { .snapshot-camera.is-capturing .snapshot-camera-viewfinder { animation:none; } }

/* Talk: separate app navigation from phone chrome; keep the other apps scoped out. */
.chat-phone-talk-header { display:flex; align-items:center; flex:none; min-height:48px; gap:4px; padding:0 10px; background:#fff; color:#1c242b; }
.chat-phone-talk-header .chat-phone-context-title { font-size:17px; font-weight:700; letter-spacing:0; }
.chat-phone-talk-header .cast-social-thread-back { flex:none; width:40px; min-height:44px; color:inherit; }
.chat-phone-talk-header .cast-social-thread-info-button { flex:none; width:44px; height:44px; margin:0; color:inherit; }
.chat-phone-talk-header .cast-social-thread-info-button svg { transform:none; }
.chat-phone.is-talk-list .chat-phone-talk-header { min-height:54px; padding:0 16px 4px; }
.chat-phone.is-talk-list .chat-phone-context-title { font-size:25px; font-weight:750; letter-spacing:-.7px; }
.chat-phone.is-talk-list .cast-social-thread-list-item { grid-template-columns:48px minmax(0,1fr); gap:12px; min-height:78px; padding:10px 16px; }
.chat-phone.is-talk-list .cast-social-thread-list-item::after { left:76px; background:#f0f1f2; }
.chat-phone.is-talk-list .cast-social-thread-list-content { display:grid; grid-template-columns:minmax(0,1fr) 44px; column-gap:12px; row-gap:3px; align-items:baseline; }
.chat-phone.is-talk-list .cast-social-thread-list-heading { display:contents; }
.chat-phone.is-talk-list .cast-social-thread-list-title { grid-column:1; grid-row:1; min-width:0; }
.chat-phone.is-talk-list .cast-social-thread-list-preview { grid-column:1; grid-row:2; min-width:0; }
.chat-phone.is-talk-list .cast-social-thread-list-time { grid-column:2; grid-row:1; justify-self:end; white-space:nowrap; line-height:1.35; }
.chat-phone.is-talk-list .cast-social-thread-list-item[data-unread="true"]::before { content:none; }
.chat-phone.is-talk-list .cast-social-thread-list-item[data-unread="true"] .cast-social-thread-list-content::after { content:""; grid-column:2; grid-row:2; justify-self:end; align-self:center; width:10px; height:10px; border-radius:50%; background:#06c755; }
.chat-phone.is-talk-list .cast-social-thread-list-title { font-size:15px; font-weight:600; }
.chat-phone.is-talk-list .cast-social-thread-list-preview { color:#858b91; font-size:12px; line-height:1.45; }
.chat-phone.is-talk-list .cast-social-thread-list-time { color:#93999f; font-size:10px; }
.chat-phone.is-talk-list .cast-social-thread-info-popup { top:82px; }
.chat-phone.is-talk-thread { --phone-chrome-bg:#819ec2; --phone-chrome-ink:#182636; }
.chat-phone.is-talk-thread .chat-phone-talk-header { background:#819ec2; }
.chat-phone.is-talk-thread .cast-social-thread-messages { gap:12px; padding:14px 15px; background:#819ec2; }
.chat-phone.is-talk-thread .cast-social-thread-message { max-width:84%; }
.chat-phone.is-talk-thread .cast-social-thread-speaker { margin:0 7px 4px; color:#253c55; font-size:11px; font-weight:400; }
.chat-phone.is-talk-thread .cast-social-thread-bubble { padding:9px 12px; border-radius:16px; color:#17202a; font-size:15px; line-height:1.45; }
.chat-phone.is-talk-thread .cast-social-thread-message--participant .cast-social-thread-bubble { background:#fff; border-top-left-radius:12px; }
.chat-phone.is-talk-thread .cast-social-thread-message--user .cast-social-thread-bubble { background:#a5e879; border-top-right-radius:12px; }
.chat-phone.is-talk-thread .cast-social-thread-bubble:not(.cast-social-thread-typing)::before { position:absolute; top:4px; width:10px; height:12px; background:inherit; content:""; }
.chat-phone.is-talk-thread .cast-social-thread-message--participant .cast-social-thread-bubble::before { left:-5px; clip-path:polygon(0 0,100% 26%,100% 100%); }
.chat-phone.is-talk-thread .cast-social-thread-message--user .cast-social-thread-bubble::before { right:-5px; clip-path:polygon(100% 0,0 26%,0 100%); }
.chat-phone.is-talk-thread .cast-social-thread-status { background:#fff; }
.chat-phone.is-talk-thread .cast-social-thread-form { display:grid; grid-template-columns:minmax(0,1fr) 44px; align-items:center; gap:0 4px; padding:5px 9px; border-top:0; background:#fff; }
.chat-phone.is-talk-thread .cast-social-thread-form textarea { grid-area:1 / 1; min-height:40px; max-height:104px; padding:10px 46px 10px 14px; border:0; border-radius:22px; background:#f0f1f3; color:#20252b; font-size:16px; line-height:20px; }
.chat-phone.is-talk-thread .cast-social-thread-form textarea:focus-visible { outline:2px solid #06b454; outline-offset:-2px; }
.chat-phone.is-talk-thread .cast-social-thread-form .school-sticker-picker { grid-area:1 / 1; align-self:end; justify-self:end; width:44px; z-index:1; }
.chat-phone.is-talk-thread .cast-social-thread-form .sticker-toggle { width:44px; height:44px; padding:10px; border-radius:50%; background:transparent; color:#737a82; }
.chat-phone.is-talk-thread .cast-social-thread-form .sticker-toggle svg { width:24px; height:24px; fill:none; stroke:currentColor; }
.chat-phone.is-talk-thread .cast-social-thread-form > button { grid-area:1 / 2; width:44px; height:44px; min-width:44px; min-height:44px; border-radius:50%; background:transparent; color:#a9b1b7; }
.chat-phone.is-talk-thread .cast-social-thread-form > button.is-ready { background:transparent; color:#06b454; }
.chat-phone.is-talk-thread .cast-social-thread-form > button svg { width:24px; height:24px; }
.chat-phone.is-talk-thread .cast-social-thread-sticker-draft { grid-column:1 / -1; grid-row:2; padding:4px 3px; }
.chat-phone.is-talk-thread .chat-phone-home-button { background:#fff; color:#25303a; }
.chat-phone-talk-tabs { display:flex; flex:1; align-items:center; gap:18px; min-width:0; }
.chat-phone-talk-tabs button { display:flex; align-items:center; min-height:44px; padding:0; border:0; background:transparent; color:#a0a4a9; font:inherit; font-size:24px; font-weight:700; letter-spacing:-.6px; touch-action:manipulation; }
.chat-phone-talk-tabs [aria-current=page] { color:#1c242b; }
.chat-phone-talk-create { display:grid; place-items:center; flex:none; width:44px; height:44px; padding:10px; border:0; background:transparent; color:#1c242b; touch-action:manipulation; }
.chat-phone-talk-create svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; }
.chat-phone-talk-tabs button:focus-visible,.chat-phone-talk-create:focus-visible,.chat-phone-friend:focus-visible { outline:2px solid #06b454; outline-offset:-2px; }
.chat-phone-talk-friends { flex:1; min-height:0; overflow:auto; padding:4px 16px 12px; background:#fff; }
.chat-phone-friends-search { display:flex; align-items:center; gap:8px; min-height:40px; padding:0 12px; border-radius:10px; background:#f1f2f4; color:#93999f; }
.chat-phone-friends-search svg { flex:none; width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; }
.chat-phone-friends-search input { flex:1; min-width:0; min-height:44px; padding:8px 0; border:0; outline:0; background:transparent; color:#20252b; font:inherit; font-size:16px; }
.chat-phone-friends-search:focus-within { outline:2px solid #06b454; outline-offset:1px; }
.chat-phone-friends-status { margin:14px 0 4px; color:#858b91; font-size:12px; line-height:1.5; }
.chat-phone-friends-list { display:flex; flex-direction:column; }
.chat-phone-friend { display:flex; align-items:center; gap:12px; min-height:70px; width:100%; padding:9px 0; border:0; background:#fff; color:#20252b; text-align:left; font:inherit; touch-action:manipulation; }
.chat-phone-friend:disabled { opacity:.55; }
.chat-phone-friend-avatar { display:grid; place-items:center; flex:none; width:48px; height:48px; overflow:hidden; border-radius:50%; background:#edf0f2; color:#737a82; font-size:18px; }
.chat-phone-friend-avatar img { width:100%; height:100%; object-fit:cover; object-position:center top; }
.chat-phone-friend-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:15px; font-weight:600; }
