/* The chat of the site (26.11.2026; js/chat.js, the server side site_chat.js), in the Chinese look of the site: a dark
   lacquer panel with a thin gold edge, the title on a lacquer strip as in the support panel, the owner's cloud
   medallion for the window (design/cn/cut_menu_chat.py). Two hosts share these styles: .ch-page, the page /chat, and
   .ch-window, the panel over every page opened from the button in the corner. */

.ch {
    position: relative; display: flex; flex-direction: column; min-height: 0; overflow: hidden;
    background: linear-gradient(180deg, rgba(43, 12, 14, 0.94), rgba(27, 11, 12, 0.94) 160px, rgba(22, 10, 11, 0.95));
    border: 1px solid rgba(231, 161, 54, 0.3); border-radius: 16px;
    box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 226, 160, 0.06);
}
.ch-head {
    display: flex; align-items: center; gap: 12px; flex: none; padding: 12px 14px 12px 16px;
    border-bottom: 1px solid rgba(231, 161, 54, 0.18);
    background: linear-gradient(110deg, rgba(150, 24, 22, 0.5), rgba(42, 16, 19, 0) 72%);
}
.ch-seal { flex: none; width: 42px; height: 42px; border-radius: 50%; background: url(/media/cn/chat-medallion.webp?v=1) center / cover no-repeat; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.ch-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ch-title b { font: italic 800 20px/1.1 var(--wide); text-transform: uppercase; letter-spacing: 0.01em; }
.ch-page .ch-title b { font-size: 17px; }
.ch-online { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.ch-online i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.ch-online.is-up i { background: var(--live); box-shadow: 0 0 0 3px rgba(76, 195, 138, 0.16); }
/* the slow mode, while it is on: a small gold plate after the count of people */
.ch-slow { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 6px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--cn-gold-hi, var(--gold)); background: rgba(42, 18, 21, 0.9); box-shadow: inset 0 0 0 1px rgba(231, 161, 54, 0.4); }
.ch-hbtn {
    flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(231, 161, 54, 0.3); border-radius: 50%;
    background: rgba(18, 8, 9, 0.6); color: var(--soft); cursor: pointer; text-decoration: none; transition: border-color 150ms ease, color 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .ch-hbtn:hover { border-color: rgba(231, 161, 54, 0.7); color: #fff; } }

/* ── the messages ── */
.ch-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(231, 161, 54, 0.3) transparent; }
.ch-list { list-style: none; margin: 0; padding: 10px 8px 12px; }
.ch-wait, .ch-empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.ch-msg {
    position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px;
    margin-top: 4px; padding: 7px 10px; border-radius: 10px; transition: background-color 120ms ease;
}
.ch-msg.is-cont { margin-top: 0; padding-top: 1px; }
.ch-ava { grid-row: 1 / span 2; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--raised); box-shadow: 0 0 0 1px rgba(231, 161, 54, 0.35); }
/* «Стиль»: the player's frame round his avatar, as on his profile. The frame is almost twice the avatar, so the line
   that has one keeps room above, below and before the name */
.ch-ava-box { grid-row: 1 / span 2; align-self: start; width: 36px; height: 36px; }
.ch-ava-box .ch-ava { display: block; box-shadow: none; }
.ch-msg.has-frame, .ch-ga.has-frame { margin-top: 14px; margin-bottom: 8px; column-gap: 20px; }
.ch-meta { grid-column: 2; display: flex; align-items: center; gap: 8px; min-width: 0; padding-right: 4px; }
.ch-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 15px; color: var(--text); text-decoration: none; }
.ch-name > span { padding-right: 1px; }
.ch-meta .st-badge { --st-badge: 18px; margin-left: -2px; }
.ch-meta time { flex: none; margin-left: 2px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ch-text { grid-column: 2; margin: 2px 0 0; color: var(--soft); font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.ch-text a { color: var(--cn-gold-hi, var(--gold)); }
.ch-msg.is-me .ch-name { color: var(--cn-gold-hi, var(--gold)); }
.ch-msg.is-mention { background: rgba(231, 161, 54, 0.08); box-shadow: inset 2px 0 0 var(--cn-gold-lo, var(--gold)); }
@media (hover: hover) and (pointer: fine) {
    .ch-name:hover { text-decoration: underline; text-decoration-color: rgba(255, 226, 160, 0.4); text-underline-offset: 3px; }
    .ch-msg:hover { background: rgba(255, 255, 255, 0.035); }
}
.ch-role {
    flex: none; padding: 3px 6px 2px; border-radius: 4px; font: 700 10px/1 var(--sans); letter-spacing: 0.07em; text-transform: uppercase;
    color: var(--cn-gold-hi, var(--gold)); background: rgba(42, 18, 21, 0.9); box-shadow: inset 0 0 0 1px rgba(231, 161, 54, 0.45);
}
.ch-role.is-admin { color: #2a1204; background: linear-gradient(180deg, #ffe2a0, #e7a136); box-shadow: none; }
.ch-role.is-lead { color: #ffe2a0; background: linear-gradient(180deg, #b3241f, #7a1414); box-shadow: inset 0 0 0 1px rgba(255, 226, 160, 0.4); }
.ch-day { display: flex; align-items: center; gap: 12px; margin: 12px 10px 6px; color: var(--muted); font-size: 12px; letter-spacing: 0.04em; }
.ch-day::before, .ch-day::after { content: ""; flex: 1; height: 1px; background: rgba(231, 161, 54, 0.14); }

/* the buttons of a message: on hover, on focus, or after a tap on a touch screen */
.ch-acts { position: absolute; top: 4px; right: 6px; display: none; gap: 4px; padding: 3px; border-radius: 10px; background: rgba(22, 9, 10, 0.92); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45); }
.ch-msg.is-open .ch-acts, .ch-msg:focus-within .ch-acts { display: flex; }
@media (hover: hover) and (pointer: fine) { .ch-msg:hover .ch-acts { display: flex; } }
.ch-act {
    display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(231, 161, 54, 0.28); border-radius: 8px;
    background: rgba(18, 8, 9, 0.9); color: var(--soft); cursor: pointer; transition: border-color 150ms ease, color 150ms ease;
}
@media (hover: hover) and (pointer: fine) {
    .ch-act:hover { border-color: rgba(231, 161, 54, 0.75); color: #fff; }
    .ch-act.is-danger:hover { border-color: rgba(255, 96, 80, 0.8); color: #ffb3a8; }
}
@media (pointer: coarse) { .ch-act { width: 38px; height: 38px; } }
.ch-menu {
    position: absolute; z-index: 3; top: calc(100% + 6px); right: 0; display: grid; min-width: 180px; padding: 6px;
    border: 1px solid rgba(231, 161, 54, 0.35); border-radius: 12px; background: #1b0b0c; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}
.ch-menu.is-up { top: auto; bottom: calc(100% + 6px); }
.ch-menu b { padding: 6px 10px 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ch-menu button { padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); text-align: left; cursor: pointer; }
.ch-menu button:hover, .ch-menu button:focus-visible { background: rgba(231, 161, 54, 0.12); outline: none; }

/* the lines the chat writes for a player: a dice, the result of a giveaway */
.ch-line {
    position: relative; display: flex; align-items: center; gap: 9px; margin: 6px 4px; padding: 7px 12px; border-radius: 10px;
    font-size: 14px; line-height: 1.4; color: var(--soft); background: rgba(255, 255, 255, 0.025);
}
.ch-line > span:not(.ch-line-ico) { flex: 1; min-width: 0; }
.ch-line time { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ch-line-ico { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--cn-gold-hi, var(--gold)); background: linear-gradient(160deg, rgba(160, 28, 24, 0.55), rgba(90, 14, 14, 0.55)); box-shadow: inset 0 0 0 1px rgba(231, 161, 54, 0.3); }
.ch-who { font-weight: 700; color: var(--text); text-decoration: none; }
.ch-line b, .ch-ga-text b { color: var(--cn-gold-hi, var(--gold)); font-variant-numeric: tabular-nums; }
.ch-roll-n { font: italic 800 16px/1 var(--num); }
.ch-gwin { background: linear-gradient(90deg, rgba(231, 161, 54, 0.14), rgba(231, 161, 54, 0.03)); box-shadow: inset 2px 0 0 var(--cn-gold-lo, var(--gold)); }
@media (hover: hover) and (pointer: fine) { .ch-who:hover { text-decoration: underline; text-underline-offset: 3px; } .ch-line:hover .ch-acts, .ch-ga:hover .ch-acts { display: flex; } }
.ch-line.is-open .ch-acts, .ch-ga.is-open .ch-acts { display: flex; }

/* the card of a giveaway: the gift on a lacquer strip, who gives how much, then the time, the people and the button */
.ch-ga { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; margin: 8px 0 4px; padding: 4px 10px; }
.ch-ga-card {
    overflow: hidden; border-radius: 12px; border: 1px solid rgba(231, 161, 54, 0.45);
    background: linear-gradient(160deg, rgba(120, 20, 18, 0.55), rgba(36, 12, 13, 0.9) 70%); box-shadow: 0 10px 26px -14px rgba(255, 90, 40, 0.5);
}
.ch-ga-top { display: flex; align-items: center; gap: 8px; padding: 8px 14px; color: var(--cn-gold-hi, var(--gold)); font: italic 800 13px/1 var(--wide); letter-spacing: 0.04em; text-transform: uppercase; border-bottom: 1px solid rgba(231, 161, 54, 0.2); }
.ch-ga-text { margin: 10px 14px 0; font-size: 15px; color: var(--text); }
.ch-ga-text b { font: italic 800 17px/1 var(--num); }
.ch-ga-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 10px 14px 12px; color: var(--muted); font-size: 13.5px; }
.ch-ga-left { display: inline-flex; align-items: center; gap: 6px; }
.ch-ga-left b { color: var(--text); font-variant-numeric: tabular-nums; }
.ch-ga-btn {
    margin-left: auto; display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border: 0; border-radius: 9px;
    background: var(--gold); color: var(--gold-ink); font-weight: 700; cursor: pointer; text-decoration: none;
}
.ch-ga-btn.is-line { background: none; color: var(--soft); box-shadow: inset 0 0 0 1px var(--line-strong); }
.ch-ga-btn:disabled { opacity: 0.6; cursor: default; }
.ch-ga-btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .ch-ga-btn:not(.is-line):hover { background: var(--gold-hover); } }
.ch-ga-state { margin-left: auto; font-weight: 600; color: var(--soft); }
.ch-ga-state.is-in { color: var(--live); }

/* the answers to commands, seen by the writer alone, and the notices of the moderators */
.ch-sys {
    margin: 8px 6px; padding: 11px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; color: var(--soft);
    background: rgba(12, 5, 6, 0.78); box-shadow: inset 0 0 0 1px rgba(231, 161, 54, 0.22);
}
.ch-sys > small { display: block; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.ch-sys.is-error { color: #ffb3a8; box-shadow: inset 0 0 0 1px rgba(255, 96, 80, 0.4); }
.ch-sys a { color: var(--cn-gold-hi, var(--gold)); font-weight: 600; }
.ch-sys b { display: block; margin: 2px 0 6px; color: var(--text); }
/* the list of commands folds to its title line: «–» in its corner (the owner, 26.11.2026), «+» opens it again */
.ch-sys-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 6px; }
.ch-sys-head b { margin: 0; }
.ch-fold {
    flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin: -4px -6px -4px 0; padding: 0;
    border: 1px solid rgba(231, 161, 54, 0.3); border-radius: 8px; background: rgba(18, 8, 9, 0.6); color: var(--soft); cursor: pointer;
    transition: border-color 150ms ease, color 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .ch-fold:hover { border-color: rgba(231, 161, 54, 0.7); color: #fff; } }
@media (pointer: coarse) { .ch-fold { width: 36px; height: 36px; margin: -8px -8px -8px 0; } }
.ch-sys.is-folded :is(.ch-fold-body, small) { display: none; }
.ch-sys.is-folded .ch-sys-head { margin: 0; }
.ch-sys .ch-sub { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
.ch-notice { margin: 8px 12px; text-align: center; color: var(--muted); font-size: 13px; font-style: italic; }
.ch-cmds, .ch-list-plain { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.ch-cmds li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; column-gap: 10px; }
.ch-cmd, .ch-copy {
    display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; text-align: left;
}
.ch-cmd code, .ch-copy code, .ch-hints code, .chat-headline code {
    padding: 2px 7px; border-radius: 6px; font: 600 13px/1.5 ui-monospace, 'Cascadia Mono', Consolas, monospace; white-space: nowrap;
    color: var(--cn-gold-hi, var(--gold)); background: rgba(42, 18, 21, 0.9); border: 1px solid rgba(231, 161, 54, 0.22);
}
.ch-cmds span { color: var(--muted); font-size: 13.5px; }
@media (hover: hover) and (pointer: fine) { :is(.ch-cmd, .ch-copy):hover code { border-color: rgba(231, 161, 54, 0.6); } }
.ch-copy svg { color: var(--muted); }
.ch-copy.is-done svg { color: var(--live); }

.ch-new {
    position: absolute; z-index: 2; left: 50%; bottom: 84px; translate: -50% 0; display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px 7px 14px; border: 1px solid rgba(231, 161, 54, 0.5); border-radius: 999px; background: #2a1215; color: var(--cn-gold-hi, var(--gold));
    font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* ── the bottom: the line to write in, or why there is none ── */
.ch-foot { position: relative; flex: none; border-top: 1px solid rgba(231, 161, 54, 0.18); background: rgba(16, 7, 8, 0.6); }
.ch-form { display: flex; align-items: center; gap: 8px; padding: 10px; }
.ch-input {
    flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px;
    background: rgba(9, 4, 5, 0.85); color: var(--text); font: 400 15px var(--sans); transition: border-color 150ms ease;
}
.ch-input::placeholder { color: var(--dim); color: color-mix(in srgb, var(--muted) 72%, transparent); }
.ch-input:focus { outline: none; border-color: rgba(231, 161, 54, 0.7); }
.ch-count { position: absolute; right: 132px; bottom: 25px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; pointer-events: none; }
.ch-send {
    flex: none; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border: 0; border-radius: 10px;
    background: var(--gold); color: var(--gold-ink); font-weight: 700; cursor: pointer; transition: background-color 150ms ease, transform 120ms ease;
}
.ch-send:active { transform: scale(0.97); }
.ch-send:disabled { opacity: 0.6; cursor: default; }
/* the slow mode after a message: the button counts the seconds until the next one may go */
.ch-send.is-wait { background: rgba(42, 18, 21, 0.95); color: var(--muted); box-shadow: inset 0 0 0 1px rgba(231, 161, 54, 0.35); }
.ch-send.is-wait :is(svg, .ch-send-label) { display: none; }
.ch-send-wait { min-width: 2ch; font: italic 800 16px/1 var(--num); color: var(--cn-gold-hi, var(--gold)); text-align: center; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .ch-send:hover { background: var(--gold-hover); } }
.ch-window .ch-send .ch-send-label { display: none; }
.ch-window .ch-send { width: 46px; padding: 0; justify-content: center; }
.ch-window .ch-count { right: 66px; }
.ch-err { margin: 0; padding: 9px 14px 0; color: #ffb3a8; font-size: 13.5px; }
.ch-hints {
    position: absolute; z-index: 3; left: 10px; right: 10px; bottom: calc(100% - 2px); list-style: none; margin: 0; padding: 6px;
    border: 1px solid rgba(231, 161, 54, 0.35); border-radius: 12px; background: #1b0b0c; box-shadow: 0 -12px 34px rgba(0, 0, 0, 0.55);
}
.ch-hints li { display: flex; align-items: baseline; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.ch-hints li span { color: var(--muted); font-size: 13.5px; min-width: 0; }
.ch-hints li[aria-selected="true"], .ch-hints li:hover { background: rgba(231, 161, 54, 0.12); }
.ch-login, .ch-blocked { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; padding: 14px 16px; color: var(--soft); font-size: 14.5px; }
.ch-blocked { background: linear-gradient(90deg, rgba(150, 24, 22, 0.32), rgba(150, 24, 22, 0.08)); }
.ch-blocked a { color: var(--cn-gold-hi, var(--gold)); font-weight: 600; white-space: nowrap; }

/* ── the page /chat: the chat fills the screen under the title, the people, the commands and the rules beside it ── */
/* main grows with the body of every page (flex: 1 in site.css); here it is exactly the screen under the header */
.chat-page { flex: none; display: flex; flex-direction: column; gap: 18px; height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); min-height: 560px; padding-top: clamp(18px, 3.4vh, 36px); padding-bottom: 20px; }
.chat-headline { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 28px; row-gap: 4px; }
.chat-headline h1 { margin: 0; }
.chat-headline .sub { margin: 0; max-width: 48em; }
.chat-headline code { font-size: 13.5px; }
.chat-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
.chat-side { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.chat-card { padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; background: rgba(28, 13, 15, 0.86); }
.chat-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 9px; font: italic 800 15px/1.2 var(--wide); text-transform: uppercase; letter-spacing: 0.02em; }
.chat-card-h b { font: italic 800 17px/1 var(--num); color: var(--cn-gold-hi, var(--gold)); }
.chat-card-h.is-sub { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
/* the people take the height they need and give it up to the commands on a low screen, scrolling then */
.chat-card.is-people { flex: 0 1 auto; min-height: 190px; display: flex; flex-direction: column; }
.chat-side > .chat-card:not(.is-people) { flex: none; }
.chat-people { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.chat-people a { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 8px; text-decoration: none; color: var(--soft); font-size: 14px; }
.chat-people a > span:first-of-type { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-people img { flex: none; width: 26px; height: 26px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(231, 161, 54, 0.3); }
@media (hover: hover) and (pointer: fine) { .chat-people a:hover { background: rgba(255, 255, 255, 0.04); color: #fff; } }
.ch-people-none { color: var(--muted); font-size: 13.5px; }
.chat-side .ch-cmds { margin: 0; gap: 7px; }
.chat-side .ch-cmds li { align-items: center; }
.chat-side .ch-cmds span { font-size: 13px; line-height: 1.3; }
.chat-rules { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.chat-rules a { color: var(--soft); white-space: nowrap; }
.chat-page .ch-page { min-height: 0; }

@media (max-width: 1100px) {
    .chat-grid { grid-template-columns: minmax(0, 1fr) 260px; }
}
/* a tablet and a phone: the chat takes the screen, the cards go under it. The round support button would stand on
   the send button there: on this page it gives way (the footer keeps the ways to reach support) */
@media (max-width: 900px) {
    [data-page="chat"] .support { display: none; }
    .chat-page { height: auto; min-height: 0; }
    .chat-grid { display: flex; flex-direction: column; }
    .chat-page .ch-page { height: calc(100vh - var(--header-h) - 96px); height: calc(100dvh - var(--header-h) - 96px); min-height: 380px; }
    .chat-headline .sub { display: none; }
    .chat-side { overflow: visible; }
}
@media (max-width: 560px) {
    .chat-page { padding-top: 14px; gap: 12px; }
    .chat-page .ch-page { height: calc(100dvh - var(--header-h) - 72px); border-radius: 12px; margin: 0 calc(var(--gutter) * -0.5); }
    .ch-msg { grid-template-columns: 32px minmax(0, 1fr); column-gap: 10px; padding: 6px 8px; }
    .ch-ava, .ch-ava-box { width: 32px; height: 32px; }
    .ch-msg.has-frame, .ch-ga.has-frame { column-gap: 18px; }
    .ch-page .ch-send span { display: none; }
    .ch-page .ch-send { width: 46px; padding: 0; justify-content: center; }
    .ch-page .ch-count { right: 66px; }
    .ch-text, .ch-name { font-size: 14.5px; }
}

/* ── the window: the cloud medallion above the support button; the panel over the page ── */
.ch-dock {
    position: fixed; z-index: 41; right: max(16px, env(safe-area-inset-right)); bottom: calc(max(16px, env(safe-area-inset-bottom)) + 70px);
    display: grid; justify-items: end; gap: 12px; transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out);
}
.ch-dock-btn {
    position: relative; width: 58px; height: 58px; border: 0; border-radius: 50%; cursor: pointer;
    background: url(/media/cn/chat-medallion.webp?v=1) center / cover no-repeat; box-shadow: 0 10px 26px -6px rgba(255, 90, 40, 0.55);
    transition: filter 150ms ease, box-shadow 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .ch-dock-btn:hover { filter: brightness(1.1); box-shadow: 0 12px 30px -6px rgba(255, 110, 50, 0.7); } }
.ch-dock-btn:focus-visible { outline: 3px solid rgba(231, 161, 54, 0.6); outline-offset: 3px; }
.ch-unread {
    position: absolute; top: -3px; right: -3px; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px;
    background: #e5332a; color: #fff; font: 700 11.5px/21px var(--sans); text-align: center; box-shadow: 0 0 0 2px #1a0a0b;
}
/* the window stays under the header (its top line holds the balance and the menu of the player) and does not let the
   page show through */
.ch-panel { width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100vh - 250px)); height: min(600px, calc(100dvh - 250px)); }
.ch-window { background: linear-gradient(180deg, #2b0c0e, #1b0b0c 160px, #160a0b); }
.ch-panel[hidden] { display: none !important; }
/* the support panel and the chat window are never open together (js/chat.js closes one when the other opens); the
   support panel covers the place of the chat button, so that button waits under it. The support button itself stays
   in view while the chat is open (the owner, 26.11.2026: it must not vanish) */
.support.is-open ~ .ch-dock { visibility: hidden; }
@media (max-width: 720px) { .ch-dock { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 64px); } .ch-dock.is-away { transform: translateY(160px); opacity: 0; pointer-events: none; } }
@media (max-width: 560px) { .ch-dock-btn { width: 52px; height: 52px; } }
/* a phone: the window is the whole screen */
@media (max-width: 640px) {
    .ch-dock.is-open { inset: 0; display: block; }
    .ch-dock.is-open .ch-dock-btn { display: none; }
    .ch-dock.is-open .ch-panel { width: 100%; height: 100%; border-radius: 0; border-width: 0; }
    html.ch-locked, html.ch-locked body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
    .ch-dock, .ch-dock-btn, .ch-msg, .ch-act, .ch-hbtn, .ch-input, .ch-send { transition: none; }
}
