/* The chat's look chosen by the player for themself (js/chatprefs.js → attributes on <html>). Only the messenger is
   touched, nothing animates (no battery cost), and the default ("light", "m", "default") is the game's own look. */

/* colours of the chat area */
html[data-chat-theme="dark"] .messenger { --chat-bg: #1d1430; --chat-ink: #efe9fb; --chat-muted: #b5a8d0; --chat-bubble: #2c2045; }
html[data-chat-theme="rose"] .messenger { --chat-bg: #fff0f6; --chat-ink: #4a1d34; --chat-muted: #9c5d7c; --chat-bubble: #ffe0ee; }
html[data-chat-theme="ocean"] .messenger { --chat-bg: #eaf5ff; --chat-ink: #12324f; --chat-muted: #4f7393; --chat-bubble: #d8ecff; }
html:not([data-chat-theme="light"]) .messenger .chat-body,
html:not([data-chat-theme="light"]) .messenger .chat-list { background: var(--chat-bg); color: var(--chat-ink); }
html:not([data-chat-theme="light"]) .messenger .msg-box { background: var(--chat-bubble); }
html:not([data-chat-theme="light"]) .messenger .note,
html:not([data-chat-theme="light"]) .messenger .empty-note { color: var(--chat-muted); }
html[data-chat-theme="dark"] .messenger .chat-header { background: #251a3b; color: #efe9fb; }
html[data-chat-theme="dark"] .chat-switch { background: #34265a; }
html[data-chat-theme="dark"] .chat-sw { color: #b9a8e6; }
html[data-chat-theme="dark"] .chat-sw.on { background: #4b3a7d; color: #fff; }
html[data-chat-theme="dark"] .chat-sw-dot { box-shadow: 0 0 0 2px #251a3b; }

/* text size of the lines */
html[data-chat-size="s"] .messenger .chat-list { font-size: 12.5px; }
html[data-chat-size="l"] .messenger .chat-list { font-size: 16.5px; }
html[data-chat-size="xl"] .messenger .chat-list { font-size: 19px; }
html[data-chat-size="l"] .messenger .msg-text, html[data-chat-size="xl"] .messenger .msg-text,
html[data-chat-size="s"] .messenger .msg-text { font-size: 1em; line-height: 1.5; }

/* font of the lines */
html[data-chat-font="nunito"] .messenger .chat-list { font-family: Nunito, Cairo, sans-serif; }
html[data-chat-font="montserrat"] .messenger .chat-list { font-family: Montserrat, Cairo, sans-serif; }
html[data-chat-font="system"] .messenger .chat-list { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Tahoma, sans-serif; }

/* colour of the message text */
html[data-chat-color="ink"] .messenger .msg-text { color: #1b1028; }
html[data-chat-color="purple"] .messenger .msg-text { color: #6a2bd8; }
html[data-chat-color="blue"] .messenger .msg-text { color: #1f6fd1; }
html[data-chat-color="green"] .messenger .msg-text { color: #1e8a4c; }
html[data-chat-theme="dark"][data-chat-color="ink"] .messenger .msg-text { color: #ffffff; }

/* pictures turned off: a small grey chip in their place (tap the line's menu to see it) */
.chat-no-gifs .messenger .media-msg[data-kind="gif"] img,
.chat-no-stickers .messenger .msg-sticker img, .chat-no-stickers .messenger .msg-sticker .sticker-pic,
.chat-no-stickers .messenger .media-msg[data-kind="mstickers"] img,
.chat-no-animated .messenger .media-msg[data-kind="memoji"] img, .chat-no-animated .messenger .media-msg[data-kind="mtext"] img,
.chat-no-animated .messenger .media-msg[data-kind="mcustom"] img { display: none; }
.chat-no-gifs .messenger .media-msg[data-kind="gif"]::before,
.chat-no-stickers .messenger .msg-sticker::before, .chat-no-stickers .messenger .media-msg[data-kind="mstickers"]::before,
.chat-no-animated .messenger .media-msg[data-kind="memoji"]::before, .chat-no-animated .messenger .media-msg[data-kind="mtext"]::before,
.chat-no-animated .messenger .media-msg[data-kind="mcustom"]::before { content: "🖼 ⦸"; display: inline-block; padding: 2px 10px; border-radius: 999px; background: rgba(120, 100, 150, .15); color: #7a6b93; font-size: 12px; }
.chat-no-gifs .messenger .media-msg[data-kind="gif"] .media-attr { display: none; }

/* a line translated into my language as it came */
.msg-auto-tr { display: block; margin-top: 3px; font-size: .86em; opacity: .8; font-style: italic; }

/* the settings window's choices */
.st6-group { padding: 4px 0 10px; border-bottom: 1px solid #f1ecf7; }
.st6-group:last-of-type { border-bottom: 0; }
.st6-sub { display: block; margin: 8px 0 8px; font-size: 12.5px; font-weight: 800; color: #7a6b93; letter-spacing: .2px; }
.st6-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.st6-tiles-font { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.st6-tiles-color { display: flex; flex-wrap: wrap; justify-content: center; }
.st6-tiles-color .st6-tile { flex: 0 0 calc((100% - 16px) / 3); }
@media (min-width: 1100px) { .set-screen .st6-tiles-color .st6-tile { flex-basis: calc((100% - 32px) / 5); } }
.st6-tiles-font .st6-tile { flex-direction: row; justify-content: flex-start; gap: 8px; padding: 8px 10px; }
.st6-tiles-font .st6-tile-label { text-align: start; }
.st6-tile { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 4px 7px; border-radius: 14px; border: 1.5px solid #ebe5f3; background: #fbf9fe; color: #3a2d4f; cursor: pointer; transition: border-color .15s, background .15s; }
.st6-tile:hover { border-color: #cdbdf0; }
.st6-tile.on { border-color: #8b5cf6; background: #f3eeff; box-shadow: 0 0 0 3px rgba(139, 92, 246, .14); color: #5b2bc4; }
.st6-tile-label { max-width: 100%; font-size: 11.5px; font-weight: 700; line-height: 1.15; text-align: center; overflow-wrap: normal; word-break: normal; hyphens: auto; }
.st6-prev { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: 14px; line-height: 1; color: #3a2d4f; background: #fff; border: 1px solid #e6dff0; }
/* the colours: the chat's background with a message bubble in it */
.st6-prev[class*="prev-theme-"] i { width: 16px; height: 9px; border-radius: 5px; }
.prev-theme-light { background: #ffffff; } .prev-theme-light i { background: #efe9f8; }
.prev-theme-dark { background: #1d1430; border-color: #1d1430; } .prev-theme-dark i { background: #3a2c58; }
.prev-theme-rose { background: #fff0f6; } .prev-theme-rose i { background: #ffc9df; }
.prev-theme-ocean { background: #eaf5ff; } .prev-theme-ocean i { background: #bcdcfb; }
/* the sizes and the fonts: "Aa" as it would look */
.prev-size-s { font-size: 11px; } .prev-size-m { font-size: 14px; } .prev-size-l { font-size: 17px; } .prev-size-xl { font-size: 20px; }
.prev-font-default { font-family: inherit; } .prev-font-nunito { font-family: Nunito, Cairo, sans-serif; }
.prev-font-montserrat { font-family: Montserrat, Cairo, sans-serif; } .prev-font-system { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
/* the text colours: a dot of the colour */
.st6-prev[class*="prev-color-"] { width: 24px; height: 24px; border: 2px solid #fff; box-shadow: 0 0 0 1px #e1d8ee; }
.prev-color-default { background: linear-gradient(135deg, #3a2d4f 50%, #efe9fb 50%); } .prev-color-ink { background: #1b1028; }
.prev-color-purple { background: #6a2bd8; } .prev-color-blue { background: #1f6fd1; } .prev-color-green { background: #1e8a4c; }

/* the chat's ⋯ card: its buttons */
.ti-acts { display: grid; gap: 6px; margin-top: 10px; }
.ti-act { padding: 9px 12px; border-radius: 12px; background: #f3f0fb; color: #3a2d4f; font-weight: 800; font-size: 13.5px; text-align: start; }
.ti-act.danger { background: #fff0f2; color: #b0213f; }
/* (2026-11-10, the owner: long words — Russian — must never leave their tile) a colour tile shows its swatch only, its
   name on hover / long press (the tile's title); the other tiles' names wrap inside the tile */
.st6-tiles-color .st6-tile-label { display: none; }
.st6-tiles-color .st6-tile { padding: 8px 4px; }
.st6-tile-label { overflow-wrap: anywhere; }

/* How the windows open on a phone (mlayout.js): the chooser over the whole page, and the same two sketches in
   Settings — the table on top with the window in the chat's area, or the window over everything */
.ml-wrap { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px; background: rgba(24, 10, 48, .62); backdrop-filter: blur(3px); animation: ml-in .2s ease-out; }
@keyframes ml-in { from { opacity: 0; } }
.ml-box { position: relative; width: min(380px, 100%); max-height: 100%; overflow-y: auto; padding: 22px 16px 16px; border-radius: 24px; background: #fff; color: #2a1d40; text-align: center; box-shadow: 0 18px 50px rgba(30, 10, 70, .4); }
.ml-x { position: absolute; top: 10px; inset-inline-end: 12px; width: 32px; height: 32px; border-radius: 50%; background: #f3eefb; color: #6b4fa0; font-size: 15px; }
.ml-ico { font-size: 34px; line-height: 1; }
.ml-title { margin: 8px 0 4px; font-size: 19px; font-weight: 800; }
.ml-lead { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: #6a5d80; }
.ml-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ml-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 18px; border: 2px solid #ebe5f3; background: #fbf9fe; color: #2a1d40; cursor: pointer; transition: border-color .15s, transform .15s; }
.ml-opt:active { transform: scale(.97); }
.ml-opt.on { border-color: #8b5cf6; background: #f4eeff; box-shadow: 0 0 0 3px rgba(139, 92, 246, .18); }
.ml-name { font-size: 14.5px; font-weight: 800; }
.ml-note { font-size: 11.5px; line-height: 1.4; color: #7a6d90; }
.ml-later { display: block; margin-top: 12px; font-size: 12px; color: #8a7da0; }
/* the small phone */
.ml-phone { position: relative; display: block; width: 66px; height: 116px; border-radius: 12px; border: 3px solid #2d2142; background: #2d2142; overflow: hidden; }
.ml-bar { position: absolute; top: 0; inset-inline: 0; height: 9px; background: #1f6b2c; }
.ml-table { position: absolute; top: 9px; inset-inline: 0; height: 48px; background: radial-gradient(circle at 50% 50%, #8fd36a, #3a9a3f 75%); }
.ml-table i { position: absolute; width: 10px; height: 12px; border-radius: 2px; background: rgba(255, 255, 255, .85); }
.ml-table i:nth-child(1) { top: 5px; left: 8px; } .ml-table i:nth-child(2) { top: 5px; right: 8px; }
.ml-table i:nth-child(3) { bottom: 5px; left: 8px; } .ml-table i:nth-child(4) { bottom: 5px; right: 8px; }
.ml-table b { position: absolute; top: 50%; left: 50%; width: 5px; height: 18px; margin: -9px 0 0 -2.5px; border-radius: 3px; background: #2e7d32; transform: rotate(35deg); box-shadow: 0 0 0 1px #c8f0b0; }
.ml-win { position: absolute; inset-inline: 0; bottom: 0; top: 57px; display: flex; flex-direction: column; gap: 3px; padding: 4px; background: #fff; }
.ml-win em { display: block; height: 6px; border-radius: 3px; background: #8b5cf6; }
.ml-grid { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.ml-grid i { border-radius: 3px; background: #f1c9e0; }
.ml-grid i:nth-child(even) { background: #ffd98a; }
/* over everything: the window from the top bar down, the table under it */
.ml-full .ml-win { top: 0; }
.ml-full .ml-grid { grid-template-columns: repeat(3, 1fr); }
/* Settings: the two tiles with the sketches */
.st6-tiles-ml { grid-template-columns: 1fr 1fr; }
.st6-tiles-ml .st6-tile { padding: 10px 6px 8px; }
.st6-tiles-ml .ml-phone { width: 54px; height: 94px; border-width: 2.5px; }
.st6-tiles-ml .ml-table { height: 38px; }
.st6-tiles-ml .ml-win { top: 47px; }
.st6-tiles-ml .ml-full .ml-win { top: 0; }

/* The table's events a player switched off (2026-11-13, the owner): each kind's card in the public chat and the effect
   it draws on the table. A mini-game's own screen is never hidden — only its card in the chat. */
html.chat-no-ev-entrance .jc-event, html.chat-no-ev-entrance .jfx { display: none !important; }
html.chat-no-ev-club .cfx-chat, html.chat-no-ev-club .cfx { display: none !important; }
html.chat-no-ev-games .sk-event { display: none !important; }
html.chat-no-ev-passion .pk-event, html.chat-no-ev-passion .pfx { display: none !important; }
html.chat-no-ev-hearts .cc-event, html.chat-no-ev-hearts .hfx { display: none !important; }
/* «Hide all events» (the chat's ⋮ window): the five above and the other cards of the table — a player's achievement,
   a birthday, a Top 100 or a distributor's arrival. Players' own words, gifts and the welcome card always stay. */
html.chat-no-events .ak-event, html.chat-no-events .bd-event,
html.chat-no-events .ta-card, html.chat-no-events .da-card { display: none !important; }
/* the weekly events themselves: the 🎉 button wherever it stands (the top bar, the ☰ drawer, the windows list) with
   its red dot, and the strip over the gifts that announces a sale or ×N points. The panel is simply out of reach. */
html.chat-no-ev-weekly [data-action="events"], html.chat-no-ev-weekly .mi-events,
html.chat-no-ev-weekly .gs-offers { display: none !important; }
