/* Phone sheets for Messenger (chat-sheets.js): they slide up from the bottom of the chat, like the Messenger app. */
.cs-wrap{position:absolute;inset:0;z-index:40;display:flex;flex-direction:column;justify-content:flex-end;pointer-events:none}
.cs-shade{position:absolute;inset:0;background:#0006;pointer-events:auto;animation:cs-fade .18s ease}
.cs-sheet{position:relative;pointer-events:auto;max-height:62%;display:flex;flex-direction:column;background:#1C2A30;color:#E8F1F3;border-radius:18px 18px 0 0;
  box-shadow:0 -10px 40px #000a;padding:0 0 max(12px,env(safe-area-inset-bottom));transform:translateY(100%);transition:transform .22s cubic-bezier(.2,.8,.2,1);font:15px/1.35 Inter,system-ui,sans-serif}
.cs-sheet.tall{height:72%;max-height:72%}
.cs-sheet.cs-music{height:94%;max-height:94%}
.cs-sheet.cs-in{transform:none}
.cs-sheet.cs-out{transform:translateY(100%)}
.cs-sheet *{box-sizing:border-box}
.cs-sheet button{font:inherit;color:inherit;cursor:pointer;margin:0;padding:0;border:0;background:none;-webkit-tap-highlight-color:transparent}
.cs-handle{flex:none;width:40px;height:5px;border-radius:3px;background:#5B7178;margin:8px auto 6px;touch-action:none;position:relative}
.cs-handle::after{content:'';position:absolute;inset:-12px -40px}
@keyframes cs-fade{from{opacity:0}}
.cs-ic{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.cs-sheet .cs-note{margin:4px 18px 0!important;font-size:12px;color:#8FA6AD!important}
.cs-sheet .cs-title{margin:6px 18px 4px!important;font:700 18px Inter,sans-serif!important;color:#E8F1F3!important;letter-spacing:0;text-transform:none}
.cs-sheet .cs-sub{margin:0 18px 12px!important;font-size:14px;color:#A9BCC1!important}
.cs-primary{display:block;width:calc(100% - 36px);margin:6px 18px;height:48px;border-radius:24px!important;background:#3FD2E8!important;color:#062026!important;font-weight:700!important}
.cs-primary.danger{background:#F0566A!important;color:#fff!important}
.cs-primary:disabled{opacity:.6}
.cs-plain{display:block;width:calc(100% - 36px);margin:2px 18px;height:44px;color:#9FE6F1!important;font-weight:600!important}
.cs-sheet .cs-empty{margin:0!important;padding:28px 18px;text-align:center;color:#8FA6AD!important;font-size:14px}
.cs-sheet .cs-empty:empty{display:none}

/* + sheet: a row of round buttons */
.cs-round-row{display:flex;gap:14px;overflow-x:auto;scrollbar-width:none;padding:8px 18px 10px}
.cs-round-row::-webkit-scrollbar{display:none}
.cs-round{flex:none;width:68px;display:flex;flex-direction:column;align-items:center;gap:6px;font-size:13px!important;color:#E8F1F3}
.cs-round-ic{width:60px;height:60px;border-radius:50%;display:grid;place-items:center;background:#2A3B42}
.cs-round-ic .cs-ic{width:26px;height:26px}
.cs-round-ic b{font:800 15px Inter,sans-serif}
.cs-round.t-gray .cs-round-ic{color:#E8F1F3}.cs-round.t-blue .cs-round-ic{color:#6FA8FF}.cs-round.t-purple .cs-round-ic{color:#C9A6F5}
.cs-round.t-sky .cs-round-ic{color:#3FD2E8}.cs-round.t-red .cs-round-ic{color:#FF7A8A}.cs-round.t-teal .cs-round-ic{color:#5FE0C1}.cs-round.t-amber .cs-round-ic{color:#F5C97F}
.cs-round[aria-pressed=true] .cs-round-ic{background:#F5C97F;color:#2A1A00}
.cs-round:active .cs-round-ic{transform:scale(.94)}

/* Lists (games, message options) */
.cs-list{display:flex;flex-direction:column;padding:4px 10px 6px;overflow-y:auto}
.cs-item{display:flex;align-items:center;gap:14px;width:100%;padding:10px 10px!important;border-radius:12px!important;text-align:left;color:#E8F1F3!important;text-decoration:none!important}
.cs-item:active{background:#ffffff10!important}
.cs-item-ic{flex:none;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:#2A3B42;font-size:20px}
.cs-item-ic .cs-ic{width:20px;height:20px}
.cs-item-text{display:flex;flex-direction:column;min-width:0}
.cs-item-text strong{font-weight:600}
.cs-item-text small{color:#8FA6AD;font-size:13px}
.cs-item-label{font-size:16px}
.cs-item.danger{color:#FF8A96!important}
.cs-small{max-height:80%}

/* Hold a message */
.cs-reacts{display:flex;justify-content:space-between;gap:4px;margin:4px 14px 6px;padding:6px;border-radius:30px;background:#2A3B42}
.cs-reacts.all{flex-wrap:wrap;justify-content:flex-start;border-radius:18px;max-height:220px;overflow-y:auto}
.cs-react{width:46px;height:46px;border-radius:50%!important;font-size:28px!important;line-height:1;display:grid;place-items:center}
.cs-reacts.all .cs-react{width:40px;height:40px;font-size:24px!important}
.cs-react[aria-pressed=true]{background:#3FD2E833!important}
.cs-react.more{color:#C9D8DC}
.cs-react:active{transform:scale(1.2)}
.cs-sheet .cs-preview{margin:2px 18px 4px!important;font-size:13px;color:#8FA6AD!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* 😊 sheet */
.cs-top{flex:none;display:flex;align-items:center;gap:10px;padding:2px 14px 8px}
.cs-search{flex:1;min-width:0;display:flex;align-items:center;gap:8px;height:42px;padding:0 14px;border-radius:21px;background:#2A3B42;color:#8FA6AD}
.cs-search input,.cs-search input:focus{flex:1;min-width:0;height:40px;border:0;background:none;color:#E8F1F3;font:16px Inter,sans-serif;outline:none!important;box-shadow:none;padding:0;border-radius:0}
.cs-search.wide{flex:none;margin:4px 14px 8px}
.cs-round-sm{flex:none;width:42px;height:42px;border-radius:50%!important;background:#2A3B42!important;display:grid;place-items:center;color:#E8F1F3}
.cs-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 12px 84px}
.cs-sheet .cs-h{margin:10px 4px 6px!important;font:700 13px Inter,sans-serif!important;color:#A9BCC1!important;letter-spacing:0;text-transform:none}
.cs-grid{display:grid;gap:4px}
.cs-grid.emo{grid-template-columns:repeat(8,1fr)}
.cs-grid.big,.cs-grid.mixed{grid-template-columns:repeat(5,1fr);gap:8px}
.cs-grid.gifs{grid-template-columns:repeat(3,1fr);gap:8px}
.cs-emo{aspect-ratio:1;font-size:28px!important;line-height:1;border-radius:10px!important;display:grid;place-items:center}
.cs-emo.big{font-size:34px!important}
.cs-emo.huge{font-size:44px!important}
.cs-emo:active{background:#ffffff14!important;transform:scale(1.1)}
.cs-tile{display:block;width:100%;border-radius:12px!important;overflow:hidden;background:#24343A!important;aspect-ratio:1}
.cs-tile img{display:block;width:100%;height:100%;object-fit:cover}
.cs-tile.gif{aspect-ratio:auto;min-height:80px}
.cs-tile.gif img{height:auto}
.cs-masonry{display:flex;gap:8px;align-items:flex-start}
.cs-col{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}
.cs-tabs{position:absolute;left:50%;bottom:max(14px,env(safe-area-inset-bottom));transform:translateX(-50%);display:flex;gap:4px;padding:6px;border-radius:30px;background:#2A3B42ee;box-shadow:0 8px 24px #0009;backdrop-filter:blur(8px)}
.cs-tab{width:54px;height:44px;border-radius:22px!important;display:grid;place-items:center;color:#C9D8DC}
.cs-tab b{font:800 13px Inter,sans-serif;padding:3px 5px;border-radius:5px;box-shadow:inset 0 0 0 2px currentColor}
.cs-tab[aria-selected=true]{background:#3FD2E826!important;color:#3FD2E8}

/* Add music */
.cs-music-head{flex:none;display:grid;grid-template-columns:42px 1fr 42px;align-items:center;padding:2px 14px 6px;text-align:center;font-size:17px}
.cs-songs{flex:1;min-height:0;overflow-y:auto;padding:0 6px 20px}
.cs-song{display:flex;align-items:center;gap:12px;padding:8px 10px;border-bottom:1px solid #2A3B42}
.cs-art{flex:none;width:54px;height:54px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#3FD2E8,#C9A6F5);display:grid;place-items:center}
.cs-art::before{content:'🎵';font-size:22px}
.cs-art:has(img)::before{display:none}
.cs-art img{width:100%;height:100%;object-fit:cover}
.cs-song-text{flex:1;min-width:0;display:flex;flex-direction:column}
.cs-song-text strong{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cs-song-text small{color:#8FA6AD;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cs-play{flex:none;width:38px;height:38px;border-radius:50%!important;background:#2A3B42!important;display:grid;place-items:center}
.cs-play .cs-ic{width:16px;height:16px;fill:currentColor;stroke:none}
.cs-send{flex:none;height:38px;padding:0 16px!important;border-radius:19px!important;background:#3FD2E8!important;color:#062026!important;font-weight:700!important}
body.ttc-calm .cs-sheet{transition:none}

/* ---------- The chat on phones (chat-dock.js .dk-touch) ---------- */
.dk-touch .dk-head{border-bottom:0;box-shadow:none;background:transparent}
.dk-touch .dk-tools .dk-ib{color:var(--dk-accent)}
.dk-touch .dk-foot{padding:6px 10px max(10px,env(safe-area-inset-bottom));background:transparent}
.dk-touch .dk-compose{align-items:center;gap:8px}
.dk-touch .dk-extras,.dk-touch .dk-compose.is-typing .dk-extras{display:none!important}
.dk-touch .dk-pill .dk-more{display:inline-grid!important}
.dk-touch .dk-pill{order:0;padding:0 4px 0 4px;min-height:46px;border-radius:23px;background:#ffffff14;align-items:center}
.dk-touch .dk-pill::before{content:none}
.dk-touch .dk-pill textarea{font-size:16px;line-height:22px;padding:12px 0}
.dk-touch .dk-pill .dk-ib{width:40px;height:40px;color:var(--dk-accent)}
.dk-touch .dk-pill .dk-ic{width:24px;height:24px}
.dk-touch .dk-compose.is-typing .dk-pill-mic{display:none}
.dk-touch .dk-like{width:46px;height:46px;font-size:28px;flex:none}
.dk-touch .dk-send{width:46px;height:46px;flex:none}
.dk-touch.dk-sens-on .dk-pill{box-shadow:inset 0 0 0 2px #F5C97F}
.dk-touch .dk-acts{display:none!important}
.dk-touch .dk-content{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.dk-touch .dk-row.dk-held .dk-content{transform:scale(.97);transition:transform .15s}
/* The back arrow shows how many other chats are unread, like Messenger's */
.dk-back[data-count]{width:auto!important;padding:0 6px 0 2px!important;border-radius:18px!important;gap:2px;display:inline-flex!important;align-items:center}
.dk-back[data-count]::after{content:attr(data-count);min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:var(--dk-accent);color:var(--dk-mine-ink);font:700 12px/22px Inter,sans-serif;text-align:center}

/* Chat themes get a backdrop in the full Messenger, not just a color */
.dk-full[data-chat-theme]{background-color:#0F1A1F;background-attachment:local}
.dk-full[data-chat-theme=classic]{background-image:radial-gradient(120% 60% at 100% 0%,#3FD2E81f,transparent 60%),radial-gradient(90% 50% at 0% 100%,#3FD2E814,transparent 60%)}
.dk-full[data-chat-theme=ocean]{background-image:radial-gradient(120% 70% at 100% 0%,#2F6FED40,transparent 60%),radial-gradient(100% 60% at 0% 100%,#1FB5C840,transparent 60%),linear-gradient(180deg,#0B1830,#081224)}
.dk-full[data-chat-theme=sunset]{background-image:radial-gradient(120% 70% at 100% 0%,#E0567A55,transparent 60%),radial-gradient(110% 70% at 0% 100%,#FF8A6544,transparent 60%),linear-gradient(180deg,#2A1230,#1A0D1E)}
.dk-full[data-chat-theme=forest]{background-image:radial-gradient(120% 70% at 100% 0%,#2E9E6248,transparent 60%),radial-gradient(100% 60% at 0% 100%,#6FDCA02e,transparent 60%),linear-gradient(180deg,#0C1E16,#08150F)}
.dk-full[data-chat-theme=midnight]{background-image:radial-gradient(120% 70% at 100% 0%,#6E56E855,transparent 60%),radial-gradient(110% 70% at 0% 100%,#A391FF33,transparent 60%),linear-gradient(180deg,#140F33,#0B0922)}
.dk-full .dk-log{background:transparent}

/* Song and location cards (any chat window) */
.dk-song{display:flex;align-items:center;gap:10px;width:min(280px,100%);padding:8px 8px 8px 8px;border-radius:16px;background:var(--dk-other);color:#E8F1F3}
.dk-row.mine .dk-song{background:color-mix(in srgb,var(--dk-mine) 22%,#15242A)}
.dk-song-art{flex:none;width:52px;height:52px;border-radius:10px;overflow:hidden;display:grid;place-items:center;background:linear-gradient(135deg,#3FD2E8,#C9A6F5);color:#062026}
.dk-song-art img{width:100%;height:100%;object-fit:cover}
.dk-song-text{flex:1;min-width:0;display:flex;flex-direction:column}
.dk-song-text strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dk-song-text small{font-size:12px;color:#A9BCC1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dk-song-open{font-size:11px;color:var(--dk-accent)!important;text-decoration:none}
.dk-song-play{flex:none;width:38px!important;height:38px!important;background:#ffffff1a!important;color:#E8F1F3!important}
.dk-song-play .dk-ic{fill:currentColor;stroke:none;width:16px;height:16px}
.dk-place{display:flex;flex-direction:column;width:min(240px,100%);border-radius:16px;overflow:hidden;background:var(--dk-other);color:#E8F1F3!important;text-decoration:none!important}
.dk-place-map{position:relative;display:block;height:120px;background:#24343A;overflow:hidden}
.dk-place-tiles{position:absolute;width:512px;height:512px}
.dk-place-tiles img{position:absolute;width:256px;height:256px;filter:saturate(.8) brightness(.9)}
.dk-place-pin{position:absolute;left:50%;top:50%;font-size:26px;line-height:1;transform:translate(-50%,-92%);filter:drop-shadow(0 2px 3px #0008)}
.dk-place-text{display:flex;flex-direction:column;padding:8px 12px}
.dk-place-text strong{font-size:14px}
.dk-place-text small{font-size:12px;color:var(--dk-accent)}
