/* Jututuba: hüpikaken (variant A), vaheleht ja mängu hub. */

.main-wide { max-width: 1280px; }
/* Menüü koos Jututoa lingiga ei mahu 1024px päisesse: 1024-1279px kahel real,
   alates 1280px laiem päis ühel real. */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  header .nav-row1 { display: none !important; }
  header .nav-row2 { display: flex !important; }
}
@media (min-width: 1280px) { header .site-head { max-width: 1200px; } }

.nav-chat { display: inline-flex; align-items: center; gap: 0.35rem; }
.nav-chat-dot { width: 0.42rem; height: 0.42rem; border-radius: 9999px; background: var(--color-success); box-shadow: 0 0 6px var(--color-success); }
.nav-chat-dot.is-live { background: var(--color-danger); box-shadow: 0 0 7px var(--color-danger); animation: ch-pulse 1.4s infinite; }
@keyframes ch-pulse { 50% { opacity: 0.3; } }

.ch-live-dot { width: 7px; height: 7px; border-radius: 9999px; background: var(--color-danger); box-shadow: 0 0 7px var(--color-danger); animation: ch-pulse 1.4s infinite; flex: none; display: inline-block; }
.ch-online { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--color-muted); white-space: nowrap; }
.ch-online i { width: 7px; height: 7px; border-radius: 9999px; background: var(--color-success); box-shadow: 0 0 6px var(--color-success); }
.ch-logo { width: 20px; height: 20px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: 8.5px; flex: none; color: #fff; line-height: 1; }
.ch-logo.sm { width: 17px; height: 17px; font-size: 7px; border-radius: 4px; }
.ch-logo.lg { width: 44px; height: 44px; border-radius: 10px; font-size: 14px; }
.ch-logo.ink-dark { color: #10131b; }
.ch-logo.img { background: none !important; object-fit: contain; }
.ch-num { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.ch-icon-btn { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--color-muted);
  border: 1px solid var(--color-line); background: rgba(245, 246, 250, 0.03); cursor: pointer; flex: none; }
.ch-icon-btn:hover { color: var(--color-ink); border-color: var(--color-line-strong); }
.ch-icon-btn svg { width: 15px; height: 15px; }

/* --- Sõnumid --- */
.ch-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 14px; position: relative; }
.ch-msgs { display: flex; flex-direction: column; gap: 2px; }
.ch-more { align-self: center; margin: 4px 0 10px; font-size: 12px; color: var(--color-accent); background: none; border: 0; cursor: pointer; }
.ch-empty { color: var(--color-muted); font-size: 13px; text-align: center; padding: 30px 10px; }
.ch-day { align-self: center; margin: 10px 0 6px; font-size: 11px; color: var(--color-muted); padding: 2px 10px; border-radius: 9999px; border: 1px dashed var(--color-line-strong); }
.ch-msg { position: relative; display: flex; gap: 9px; align-items: flex-start; padding: 5px 6px; margin: 0 -6px; border-radius: 10px; }
.ch-msg:hover { background: rgba(245, 246, 250, 0.03); }
.ch-msg.cont { padding-top: 1px; }
.ch-msg.cont .ch-av { visibility: hidden; height: 0; }
.ch-msg.cont .ch-meta { display: none; }
.ch-msg.mention { background: rgba(255, 90, 31, 0.08); box-shadow: inset 2px 0 0 var(--color-accent); }
.ch-av { width: 30px; height: 30px; border-radius: 9999px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: #fff; overflow: hidden; }
.ch-av img { width: 100%; height: 100%; object-fit: cover; }
.ch-body { min-width: 0; flex: 1; }
.ch-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--color-muted); }
.ch-name { font-weight: 650; color: var(--color-ink); font-size: 12.5px; text-decoration: none; }
.ch-name:hover { color: var(--color-accent); }
.ch-msg.me .ch-name { color: var(--color-accent); }
.ch-rank { font-family: var(--font-display); font-size: 10px; border: 1px solid var(--color-line-strong); border-radius: 4px; padding: 0 3px; }
.ch-admin { font-size: 9.5px; font-weight: 700; padding: 0 5px; border-radius: 4px; background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.35); }
.ch-text { margin-top: 1px; line-height: 1.42; color: #dfe3ee; font-size: 13.5px; overflow-wrap: anywhere; white-space: pre-wrap; }
.ch-text .at { color: var(--color-accent); font-weight: 600; }
.ch-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.ch-reacts button { font-size: 11px; padding: 1px 7px; border-radius: 9999px; background: rgba(245, 246, 250, 0.06); border: 1px solid var(--color-line); color: var(--color-muted); cursor: pointer; }
.ch-reacts button.mine { border-color: rgba(255, 90, 31, 0.5); color: var(--color-ink); background: rgba(255, 90, 31, 0.12); }
.ch-tools { position: absolute; right: 6px; top: -10px; display: none; gap: 2px; padding: 2px; border-radius: 9px; background: var(--color-surface-alt); border: 1px solid var(--color-line-strong); box-shadow: 0 6px 18px -8px rgba(0,0,0,.8); z-index: 2; }
.ch-msg:hover .ch-tools, .ch-msg.tools-open .ch-tools { display: flex; }
.ch-tools button { border: 0; background: none; cursor: pointer; font-size: 13px; padding: 3px 5px; border-radius: 6px; color: var(--color-muted); }
.ch-tools button:hover { background: rgba(245, 246, 250, 0.08); color: var(--color-ink); }
.ch-flag { font-size: 10px; color: var(--color-danger); font-weight: 700; }
.ch-sys { align-self: center; margin: 6px 0; font-size: 11.5px; color: #ffd2bf; padding: 3px 11px; border-radius: 9999px; border: 1px solid rgba(255, 90, 31, 0.35); background: rgba(255, 90, 31, 0.07); text-align: center; max-width: 95%; }
.ch-typing { min-height: 18px; padding: 0 14px 4px; font-size: 11.5px; color: var(--color-muted); display: flex; align-items: center; gap: 6px; }
.ch-typing i { display: inline-flex; gap: 2px; }
.ch-typing i b { width: 4px; height: 4px; border-radius: 9999px; background: var(--color-muted); animation: ch-blink 1.2s infinite; }
.ch-typing i b:nth-child(2) { animation-delay: 0.2s; } .ch-typing i b:nth-child(3) { animation-delay: 0.4s; }
@keyframes ch-blink { 50% { opacity: 0.2; } }
.ch-newbtn { position: sticky; bottom: 6px; align-self: center; margin-left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2)); border: 0; border-radius: 9999px; padding: 4px 12px; cursor: pointer; box-shadow: 0 6px 18px -6px rgba(232,17,60,.7); }

/* --- Kirjutamine --- */
.ch-composer { position: relative; display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid var(--color-line); background: rgba(11, 14, 23, 0.85); }
.ch-composer textarea { flex: 1; min-width: 0; min-height: 38px; max-height: 120px; resize: none; border-radius: 10px; border: 1px solid var(--color-line-strong); background: var(--color-bg);
  padding: 9px 12px; color: var(--color-ink); font: inherit; font-size: 13.5px; line-height: 1.35; outline: none; }
.ch-composer textarea:focus { border-color: var(--color-accent); }
.ch-emo-btn { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--color-line); background: none; font-size: 16px; cursor: pointer; flex: none; }
.ch-send { width: 38px; height: 38px; border-radius: 10px; border: 0; display: inline-flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; flex: none;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2)); box-shadow: 0 6px 18px -6px rgba(232, 17, 60, 0.7); }
.ch-send:disabled { opacity: 0.5; cursor: default; }
.ch-send svg { width: 17px; height: 17px; }
.ch-err { padding: 0 12px 8px; font-size: 12px; color: var(--color-danger); }
.ch-emo-pop { position: absolute; bottom: 54px; left: 10px; display: flex; gap: 4px; padding: 6px; border-radius: 12px; background: var(--color-surface-alt); border: 1px solid var(--color-line-strong); box-shadow: 0 12px 30px -10px rgba(0,0,0,.8); z-index: 3; }
.ch-emo-pop button { font-size: 18px; background: none; border: 0; cursor: pointer; padding: 4px; border-radius: 8px; }
.ch-emo-pop button:hover { background: rgba(245, 246, 250, 0.08); }
.ch-suggest { position: absolute; bottom: 54px; left: 56px; right: 56px; max-height: 180px; overflow-y: auto; border-radius: 10px; background: var(--color-surface-alt); border: 1px solid var(--color-line-strong); z-index: 3; padding: 4px; }
.ch-suggest button { display: block; width: 100%; text-align: left; padding: 6px 8px; border-radius: 7px; border: 0; background: none; color: var(--color-ink); font-size: 13px; cursor: pointer; }
.ch-suggest button:hover, .ch-suggest button.on { background: rgba(255, 90, 31, 0.12); }
.ch-locked { padding: 14px; text-align: center; font-size: 13px; color: var(--color-muted); border-top: 1px solid var(--color-line); }

/* --- Tulemustabel jututoas (ticker) --- */
.ch-ticker { margin: 0 12px 8px; padding: 8px 11px; border-radius: 12px; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 8px;
  background: linear-gradient(90deg, rgba(232, 17, 60, 0.12), rgba(255, 90, 31, 0.05)); border: 1px solid rgba(232, 17, 60, 0.3); text-decoration: none; color: inherit; }
.ch-ticker.is-final { background: rgba(245,246,250,.03); border-color: var(--color-line); }
.ch-ticker .t { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; min-width: 0; }
.ch-ticker .t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-ticker .t.r { justify-content: flex-end; }
.ch-ticker .mid { text-align: center; line-height: 1; }
.ch-ticker .mid .s { font-family: var(--font-display); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ch-ticker .mid .s .lo { color: var(--color-muted); font-weight: 400; }
.ch-ticker .mid small { display: block; margin-top: 3px; font-family: var(--font-display); font-size: 10px; color: var(--color-accent); letter-spacing: 0.05em; }
.ch-ticker.is-final .mid small { color: var(--color-muted); }
.ch-ticker .pick { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--color-muted); border-top: 1px solid rgba(255, 255, 255, 0.06); padding-top: 6px; }
.ch-ticker .pick b.ok { color: var(--color-success); } .ch-ticker .pick b.bad { color: #fbbf24; }
.ch-ticker .hub { color: var(--color-accent); font-weight: 600; white-space: nowrap; }

/* --- Hüpikaken (A) --- */
.chw-fab { position: fixed; right: 20px; bottom: 20px; z-index: 45; width: 56px; height: 56px; border-radius: 18px; display: flex; align-items: center; justify-content: center; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2)); box-shadow: 0 14px 30px -10px rgba(232, 17, 60, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.25); color: #fff; }
.chw-fab svg { width: 25px; height: 25px; }
.chw-fab .badge { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 9999px; background: #fff; color: var(--color-accent-2); font-weight: 800; font-size: 11.5px;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 3px var(--color-bg); }
.chw-fab .badge.at { background: var(--color-accent-2); color: #fff; }
.chw-fab .live { position: absolute; left: -4px; bottom: -4px; width: 14px; height: 14px; border-radius: 9999px; background: var(--color-danger); box-shadow: 0 0 0 3px var(--color-bg), 0 0 8px var(--color-danger); animation: ch-pulse 1.4s infinite; }
.chw-panel { position: fixed; right: 20px; bottom: 88px; z-index: 46; width: 392px; height: min(620px, calc(100dvh - 110px)); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(26, 31, 44, 0.96), rgba(12, 15, 24, 0.97)); border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(232, 17, 60, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06); backdrop-filter: blur(14px); color: var(--color-ink); }
.chw-panel[hidden] { display: none; }
.chw-head { padding: 10px 10px 8px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--color-line); }
.chw-head-r { display: flex; gap: 6px; align-items: center; }
.ch-switch { display: inline-flex; align-items: center; gap: 7px; min-width: 0; padding: 6px 10px; border-radius: 11px; border: 1px solid rgba(255, 90, 31, 0.55); background: rgba(255, 90, 31, 0.1);
  font-weight: 650; font-size: 13px; color: var(--color-ink); cursor: pointer; }
.ch-switch .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-switch .cnt { font-size: 10px; font-weight: 800; color: #fff; background: var(--color-accent-2); border-radius: 9999px; padding: 1px 6px; white-space: nowrap; }
.ch-switch .chev { color: var(--color-muted); font-size: 11px; }
.ch-switch .dot { width: 8px; height: 8px; border-radius: 9999px; background: var(--color-accent-2); flex: none; }
.ch-menu { position: absolute; left: 10px; right: 10px; top: 54px; bottom: 64px; border-radius: 14px; background: #0d1018; border: 1px solid var(--color-line-strong); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.9);
  padding: 6px; overflow-y: auto; z-index: 5; }
.ch-menu[hidden] { display: none; }
.ch-menu .s { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-muted); font-weight: 700; padding: 9px 8px 5px; display: flex; justify-content: space-between; }
.ch-mi { display: grid; grid-template-columns: 12px minmax(0,1fr) auto auto; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 9px; font-size: 12.5px; width: 100%; border: 0; background: none; color: var(--color-ink); cursor: pointer; text-align: left; }
.ch-mi:hover { background: rgba(245, 246, 250, 0.05); }
.ch-mi.on { background: rgba(255, 90, 31, 0.12); box-shadow: inset 2px 0 0 var(--color-accent); }
.ch-mi .duo { display: flex; align-items: center; gap: 5px; min-width: 0; font-weight: 600; }
.ch-mi .duo .s2 { font-family: var(--font-display); font-weight: 700; font-size: 14px; margin: 0 1px; }
.ch-mi .q { font-family: var(--font-display); font-size: 11px; color: var(--color-accent); white-space: nowrap; }
.ch-mi .q.muted { color: var(--color-muted); }
.ch-mi .u { font-size: 10px; font-weight: 800; color: #fff; background: var(--color-accent-2); border-radius: 9999px; padding: 1px 6px; min-width: 20px; text-align: center; }
.ch-mi .u.zero { background: transparent; color: var(--color-muted); font-weight: 600; }
.ch-mi .p { width: 8px; height: 8px; border-radius: 9999px; background: var(--color-line-strong); }
.ch-mi .p.ok { background: var(--color-success); } .ch-mi .p.bad { background: #fbbf24; } .ch-mi .p.n { background: var(--color-muted); }
.ch-mi .ic { font-size: 13px; text-align: center; color: var(--color-muted); }
html.chw-lock { overflow: hidden; }
@media (max-width: 560px) {
  .chw-panel { inset: 0; width: auto; height: auto; border-radius: 0; right: 0; bottom: 0; }
  .chw-fab { right: 14px; bottom: 14px; }
}

/* --- Vaheleht --- */
.chp { display: grid; grid-template-columns: 240px minmax(0, 1fr) 210px; height: calc(100dvh - 140px); min-height: 520px; border: 1px solid var(--color-line); border-radius: 16px; overflow: hidden; background: var(--color-surface); }
.chp.embed { height: 100dvh; border-radius: 0; border: 0; grid-template-columns: minmax(0, 1fr); }
.chp.embed .chp-side, .chp.embed .chp-right { display: none; }
.chp-side { border-right: 1px solid var(--color-line); background: var(--color-bg-alt); padding: 14px 10px; overflow-y: auto; }
.chp-side h4 { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-muted); margin: 14px 8px 6px; font-weight: 700; display: flex; justify-content: space-between; }
.chp-side h4:first-child { margin-top: 0; }
.chp-room { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 9px; color: var(--color-muted); font-size: 13px; font-weight: 550; text-decoration: none; }
.chp-room:hover { color: var(--color-ink); background: rgba(245,246,250,.03); }
.chp-room .hash { font-family: var(--font-display); font-size: 15px; width: 16px; text-align: center; color: var(--color-line-strong); }
.chp-room.on { background: rgba(255, 90, 31, 0.12); color: var(--color-ink); box-shadow: inset 2px 0 0 var(--color-accent); }
.chp-room.on .hash { color: var(--color-accent); }
.chp-room .n { margin-left: auto; font-size: 10px; background: var(--color-accent-2); color: #fff; border-radius: 9999px; padding: 0 6px; font-weight: 700; }
.chp-room .sc { margin-left: auto; font-family: var(--font-display); font-size: 12px; color: var(--color-ink); white-space: nowrap; }
.chp-room .duo { display: inline-flex; gap: 2px; }
.chp-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chp-tabs { display: flex; gap: 2px; padding: 0 14px; border-bottom: 1px solid var(--color-line); background: var(--color-bg-alt); overflow-x: auto; }
.chp-tab { padding: 11px 13px; font-size: 13px; font-weight: 600; color: var(--color-muted); border-bottom: 2px solid transparent; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; white-space: nowrap; }
.chp-tab.on { color: var(--color-ink); border-color: var(--color-accent); }
.chp-tab .n { font-size: 10px; background: var(--color-accent-2); color: #fff; padding: 0 5px; border-radius: 9999px; }
.chp-head { padding: 12px 16px; border-bottom: 1px solid var(--color-line); display: flex; align-items: center; gap: 12px; }
.chp-head h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.03em; font-size: 19px; display: flex; align-items: center; gap: 8px; margin: 0; white-space: nowrap; }
.chp-head h2 .hash { color: var(--color-muted); font-weight: 400; }
.chp-head .desc { color: var(--color-muted); font-size: 12.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chp-head .ch-online { margin-left: auto; }
.chp-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chp-right { border-left: 1px solid var(--color-line); background: var(--color-bg-alt); padding: 14px 12px; overflow-y: auto; }
.chp-right h4 { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-muted); margin: 0 0 10px; font-weight: 700; }
.chp-who { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12.5px; color: var(--color-ink); text-decoration: none; }
.chp-who .ch-av { width: 24px; height: 24px; font-size: 10px; position: relative; overflow: visible; }
.chp-who .ch-av::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 8px; height: 8px; border-radius: 9999px; background: var(--color-success); box-shadow: 0 0 0 2px var(--color-bg-alt); }
.chp-guest { max-width: 32rem; margin: 3rem auto; text-align: center; }
@media (max-width: 1000px) { .chp { grid-template-columns: 220px minmax(0, 1fr); } .chp-right { display: none; } }
@media (max-width: 720px) {
  .chp { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 120px); border-radius: 12px; }
  .chp-side { display: none; }
  .chp-head .desc { display: none; }
}

/* Mängude ruudustik */
.chg-wrap { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; }
.chg-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chg-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 9999px; border: 1px solid var(--color-line); font-size: 12.5px; color: var(--color-muted); background: rgba(245, 246, 250, 0.03); font-weight: 550; cursor: pointer; }
.chg-chip.on { color: var(--color-ink); border-color: rgba(255, 90, 31, 0.55); background: rgba(255, 90, 31, 0.12); }
.chg-chip b { color: var(--color-ink); }
.chg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 10px; }
.chg-sec { grid-column: 1 / -1; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-muted); font-weight: 700; margin-top: 6px; }
.gc { position: relative; display: block; border-radius: 14px; border: 1px solid var(--color-line); background: linear-gradient(180deg, var(--color-surface), #0e1119); padding: 11px 11px 9px; overflow: hidden; text-decoration: none; color: inherit; }
.gc:hover { border-color: var(--color-line-strong); }
.gc.hot { border-color: rgba(255, 90, 31, 0.5); box-shadow: 0 0 0 1px rgba(255, 90, 31, 0.15), 0 12px 30px -16px rgba(232, 17, 60, 0.6); }
.gc.is-final { opacity: 0.82; }
.gc-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--color-muted); margin-bottom: 8px; min-height: 18px; }
.gc-q { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 600; color: var(--color-accent); letter-spacing: 0.04em; font-size: 12px; white-space: nowrap; }
.gc-q.half { color: var(--color-gold); } .gc-q.muted { color: var(--color-muted); }
.gc-tags { display: flex; gap: 4px; }
.gc-tag { font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; white-space: nowrap; }
.gc-tag.hot { background: rgba(255, 90, 31, 0.18); color: #ffb08a; }
.gc-tag.close { background: rgba(251, 191, 36, 0.16); color: #fcd34d; }
.gc-tag.derby { background: rgba(255, 209, 102, 0.16); color: var(--color-gold); }
.gc-row { display: flex; align-items: center; gap: 8px; height: 29px; }
.gc-row .nm { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-row .sc { font-family: var(--font-display); font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gc-row.lo .nm, .gc-row.lo .sc { color: var(--color-muted); font-weight: 500; }
.gc-row .mine { width: 6px; height: 6px; border-radius: 9999px; background: var(--color-accent); box-shadow: 0 0 6px var(--color-accent); flex: none; }
.gc-bar { height: 3px; border-radius: 9px; background: var(--color-line); margin: 8px 0 8px; overflow: hidden; }
.gc-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--color-accent), var(--color-accent-2)); }
.gc-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11.5px; }
.gc-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 3px; border-radius: 9999px; font-weight: 650; font-size: 11px; white-space: nowrap; background: rgba(245,246,250,.06); }
.gc-pill.ok { background: rgba(52, 211, 153, 0.15); color: var(--color-success); }
.gc-pill.bad { background: rgba(251, 191, 36, 0.14); color: #fbbf24; }
.gc-pill.none { padding-left: 8px; color: var(--color-muted); }
.gc-room { display: inline-flex; align-items: center; gap: 6px; color: var(--color-muted); }
.gc-room svg { width: 13px; height: 13px; }
.gc-room .unread { font-size: 10px; font-weight: 800; color: #fff; background: var(--color-accent-2); border-radius: 9999px; padding: 1px 6px; }

/* --- Mängu hub --- */
.hb-back { font-size: 13px; color: var(--color-muted); margin-bottom: 10px; display: inline-flex; gap: 6px; text-decoration: none; }
.hb-back:hover { color: var(--color-accent); }
.hb-board { border-radius: 18px; border: 1px solid var(--color-line); padding: 16px 20px 12px; position: relative; overflow: hidden; background: var(--color-surface); }
.hb-main { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 14px; }
.hb-team { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: inherit; }
.hb-team.r { justify-content: flex-end; text-align: right; }
.hb-team .nm { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; font-size: 21px; line-height: 1.05; }
.hb-score { text-align: center; }
.hb-score .s { font-family: var(--font-display); font-size: 52px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hb-score .s .lo { color: var(--color-muted); font-weight: 400; }
.hb-score .st { margin-top: 6px; font-family: var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; font-size: 12px; color: var(--color-muted); display: inline-flex; align-items: center; gap: 6px; }
.hb-score .st.live { color: var(--color-accent); }
.hb-qs { display: flex; justify-content: center; margin-top: 10px; }
.hb-qs table { border-collapse: collapse; font-size: 12px; }
.hb-qs th, .hb-qs td { padding: 3px 9px; text-align: center; font-variant-numeric: tabular-nums; }
.hb-qs th { color: var(--color-muted); font-weight: 600; font-size: 10.5px; letter-spacing: 0.06em; }
.hb-qs td:first-child { text-align: left; font-family: var(--font-display); font-weight: 600; letter-spacing: 0.03em; }
.hb-qs td.w { color: var(--color-ink); font-weight: 700; } .hb-qs td.l { color: var(--color-muted); }
.hb-qs td.tot { font-family: var(--font-display); font-weight: 700; font-size: 14px; border-left: 1px solid var(--color-line); }
.hb-predict { margin-top: 12px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 9px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--color-line); font-size: 12.5px; }
.hb-predict:empty { display: none; }
.hb-predict .crowd { flex: 1; min-width: 180px; display: flex; align-items: center; gap: 8px; color: var(--color-muted); }
.hb-predict .crowd .bar { flex: 1; height: 6px; border-radius: 9px; overflow: hidden; display: flex; background: var(--color-line); }
.hb-predict .favs { color: var(--color-muted); }
.hb-predict .favs a { color: var(--color-ink); font-weight: 600; text-decoration: none; }
.hb-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 9999px; font-weight: 650; font-size: 12px; white-space: nowrap; background: rgba(245,246,250,.06); }
.hb-pill.ok { background: rgba(52, 211, 153, 0.15); color: var(--color-success); }
.hb-pill.bad { background: rgba(251, 191, 36, 0.14); color: #fbbf24; }
.hb-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; align-items: start; }
.hb-panel { border-radius: 16px; border: 1px solid var(--color-line); background: var(--color-surface); overflow: hidden; }
.hb-tabs { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--color-line); background: var(--color-bg-alt); overflow-x: auto; }
.hb-tab { padding: 11px 12px; font-size: 13px; font-weight: 600; color: var(--color-muted); border: 0; border-bottom: 2px solid transparent; background: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.hb-tab.on { color: var(--color-ink); border-bottom-color: var(--color-accent); }
.hb-tab .n { font-size: 10px; background: var(--color-accent-2); color: #fff; padding: 0 5px; border-radius: 9999px; }
.hb-tab-chat { display: none; }
.hb-body { padding: 16px; }
/* Statistika on oma aknas (sama kõrge kui mängutuba), sisu keritakse akna sees. */
.hb-stats { display: flex; flex-direction: column; height: min(760px, calc(100dvh - 120px)); }
.hb-stats .hb-tabs { flex: none; }
.hb-statbody { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.hb-sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-muted); font-weight: 700; margin: 0 0 10px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hb-flow { width: 100%; height: 150px; display: block; }
.hb-flow-lbl { position: absolute; left: 4px; font-size: 10.5px; font-weight: 600; pointer-events: none; }
.hb-flow-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--color-muted); margin-top: 4px; }
.hb-cmp { display: flex; flex-direction: column; gap: 9px; margin-top: 18px; }
.hb-cmp-row { display: grid; grid-template-columns: 58px 1fr 130px 1fr 58px; align-items: center; gap: 8px; font-size: 12.5px; }
.hb-cmp-row .v { font-family: var(--font-display); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.hb-cmp-row .v.r { text-align: right; } .hb-cmp-row .v.lo { color: var(--color-muted); font-weight: 400; }
.hb-cmp-row .lbl { text-align: center; color: var(--color-muted); font-size: 11.5px; }
.hb-cmp-row .bl, .hb-cmp-row .br { height: 6px; border-radius: 9px; background: var(--color-line); overflow: hidden; display: flex; }
.hb-cmp-row .bl { justify-content: flex-end; }
.hb-tops { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.hb-top { border-radius: 12px; border: 1px solid var(--color-line); background: var(--color-bg-alt); padding: 10px; min-width: 0; }
.hb-top .who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hb-top .jersey { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 13px; flex: none; }
.hb-top .pn { font-weight: 650; font-size: 13px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-top .pt { font-size: 11px; color: var(--color-muted); }
.hb-top .stats { display: flex; justify-content: space-between; margin-top: 9px; }
.hb-top .stats div { text-align: center; }
.hb-top .stats b { display: block; font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.hb-top .stats span { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-muted); }
.hb-top.mvp { border-color: rgba(255, 209, 102, 0.4); background: linear-gradient(180deg, rgba(255, 209, 102, 0.07), var(--color-bg-alt)); }
.hb-top.mvp .pt b { color: var(--color-gold); }
.hb-src { margin-top: 14px; font-size: 10.5px; color: var(--color-muted); text-align: right; }
.hb-empty { color: var(--color-muted); font-size: 13px; padding: 24px 6px; text-align: center; }
.hb-boxwrap { overflow-x: auto; }
.hb-box { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 520px; }
.hb-box th { text-align: right; color: var(--color-muted); font-weight: 600; font-size: 10.5px; letter-spacing: 0.05em; padding: 6px; border-bottom: 1px solid var(--color-line); white-space: nowrap; }
.hb-box th:nth-child(2), .hb-box td:nth-child(2) { text-align: left; }
.hb-box td { padding: 6px; text-align: right; border-bottom: 1px solid rgba(35, 40, 56, 0.6); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hb-box td:first-child, .hb-box th:first-child { text-align: center; color: var(--color-muted); width: 28px; }
.hb-box td.pts { font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.hb-box tr.on td:nth-child(2)::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 9999px; background: var(--color-success); margin-right: 6px; vertical-align: 1px; }
.hb-box tr.tot td { font-weight: 700; color: var(--color-ink); border-top: 1px solid var(--color-line-strong); }
.hb-box .hi { color: var(--color-gold); font-weight: 700; }
.hb-teamhdr { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin: 4px 0 6px; }
.hb-ev { display: grid; grid-template-columns: 54px 22px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid rgba(35, 40, 56, 0.6); font-size: 12.5px; }
.hb-ev .t { font-family: var(--font-display); color: var(--color-muted); font-size: 12px; white-space: nowrap; }
.hb-ev .what b { font-weight: 650; }
.hb-ev .what span { color: var(--color-muted); }
.hb-ev .sc { font-family: var(--font-display); font-size: 13px; color: var(--color-muted); }
.hb-ev.key { background: rgba(255, 90, 31, 0.06); }
.hb-ev.key .what { color: #ffd2bf; }
.hb-ev.score .sc { color: var(--color-ink); }
.hb-shots-f { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.hb-court { width: 100%; max-width: 520px; display: block; margin: 0 auto; }
.hb-chat { display: flex; flex-direction: column; height: min(760px, calc(100dvh - 120px)); position: sticky; top: 76px; }
.hb-chat-h { padding: 11px 14px; border-bottom: 1px solid var(--color-line); display: flex; align-items: center; justify-content: space-between; background: var(--color-bg-alt); }
.hb-chat-h b { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 900px) {
  .hb-grid { grid-template-columns: minmax(0, 1fr); }
  .hb-tab-chat { display: inline-flex; }
  .hb-chatcol { display: none; }
  .hb-grid.show-chat .hb-chatcol { display: block; }
  .hb-grid.show-chat .hb-statbody { display: none; }
  .hb-chat { position: static; height: calc(100dvh - 200px); min-height: 420px; }
  .hb-stats { height: auto; }
  .hb-statbody { height: calc(100dvh - 190px); min-height: 380px; }
  .hb-grid.show-chat .hb-stats { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  .hb-team { flex-direction: column; gap: 6px; text-align: center; }
  .hb-team.r { flex-direction: column-reverse; text-align: center; }
  .hb-team .nm { font-size: 14px; }
  .hb-score .s { font-size: 40px; }
  .ch-logo.lg { width: 34px; height: 34px; font-size: 11px; }
  .hb-tops { grid-template-columns: 1fr 1fr; }
  .hb-tops .hb-top:nth-child(3) { display: none; }
  .hb-cmp-row { grid-template-columns: 44px 1fr 96px 1fr 44px; }
  .hb-qs th, .hb-qs td { padding: 3px 6px; }
}

/* --- Esimese külastuse tutvustus + reeglid --- */
.ch-rulesbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--color-line); background: rgba(255, 90, 31, 0.07); font-size: 12.5px; color: #ffd2bf; }
.ch-rulesbar[hidden] { display: none; }
.ch-rulesbar button { flex: none; border: 0; border-radius: 9px; padding: 7px 12px; font-weight: 700; font-size: 12.5px; color: #fff; cursor: pointer; background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2)); }
html.chr-lock { overflow: hidden; }
.chr-backdrop { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5, 7, 12, 0.72); backdrop-filter: blur(4px); }
.chr-backdrop[hidden] { display: none; }
.chr { width: 100%; max-width: 560px; max-height: min(760px, calc(100dvh - 32px)); display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; color: var(--color-ink);
  background: linear-gradient(180deg, #1a1f2c, #0e1119); border: 1px solid rgba(255, 255, 255, 0.09); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(232, 17, 60, 0.1); }
.chr-head { display: flex; gap: 14px; align-items: flex-start; padding: 20px 22px 14px; border-bottom: 1px solid var(--color-line); background: linear-gradient(90deg, rgba(232, 17, 60, 0.14), rgba(255, 90, 31, 0.04)); }
.chr-wave { font-size: 30px; line-height: 1; }
.chr-head h2 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; font-size: 22px; margin: 0 0 4px; }
.chr-head p { margin: 0; font-size: 13px; color: var(--color-muted); line-height: 1.45; }
.chr-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 22px 6px; }
.chr-body h3 { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-muted); font-weight: 700; margin: 6px 0 8px; }
.chr-feat { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 7px; }
.chr-feat li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; font-size: 13px; line-height: 1.45; color: #dfe3ee; }
.chr-feat b { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; background: rgba(255, 90, 31, 0.12); color: var(--color-accent); border: 1px solid rgba(255, 90, 31, 0.3); }
.chr-rules { margin: 0 0 8px; padding: 0; list-style: none; counter-reset: r; display: grid; gap: 8px; }
.chr-rules li { counter-increment: r; position: relative; padding: 9px 11px 9px 40px; border-radius: 11px; background: rgba(245, 246, 250, 0.035); border: 1px solid var(--color-line); font-size: 13px; line-height: 1.45; color: var(--color-muted); }
.chr-rules li::before { content: counter(r); position: absolute; left: 11px; top: 9px; width: 20px; height: 20px; border-radius: 9999px; font-family: var(--font-display); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2)); }
.chr-rules strong { color: var(--color-ink); font-weight: 650; }
.chr-more { font-size: 12px; color: var(--color-muted); margin: 6px 0 10px; }
.chr-more a { color: var(--color-accent); }
.chr-foot { padding: 14px 22px 18px; border-top: 1px solid var(--color-line); background: rgba(11, 14, 23, 0.85); }
.chr-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; font-weight: 600; cursor: pointer; line-height: 1.4; }
.chr-check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--color-accent); flex: none; cursor: pointer; }
.chr-err { margin: 8px 0 0; font-size: 12px; color: var(--color-danger); }
.chr-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.chr-btns button { border-radius: 10px; padding: 10px 16px; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.chr-later { background: none; border: 1px solid var(--color-line-strong); color: var(--color-muted); }
.chr-later:hover { color: var(--color-ink); }
.chr-ok { border: 0; color: #fff; background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2)); box-shadow: 0 8px 20px -8px rgba(232, 17, 60, 0.7); }
.chr-ok:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
@media (max-width: 560px) {
  .chr-backdrop { padding: 0; align-items: stretch; }
  .chr { max-width: none; max-height: none; border-radius: 0; }
  .chr-head { padding: 16px 16px 12px; } .chr-body { padding: 12px 16px 4px; } .chr-foot { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
  .chr-head h2 { font-size: 19px; }
}
.ch-composer[hidden] { display: none; }

.ch-note { align-self: center; margin: 2px 0 8px; font-size: 11px; color: var(--color-muted); }
.ch-msg.deleted .ch-text { opacity: 0.55; text-decoration: line-through; text-decoration-color: rgba(255,255,255,.35); }
.ch-msg.deleted .ch-av { opacity: 0.5; }
.ch-del { font-size: 10px; font-weight: 700; color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.35); border-radius: 4px; padding: 0 5px; }
.chp-day { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-muted); font-weight: 700; margin: 10px 9px 3px; opacity: 0.85; }
.chp-day.live { color: var(--color-danger); }

/* --- Toetajad: tärn ja kuldne nimi --- */
.ch-star { color: var(--color-gold); margin-right: 3px; font-size: 0.95em; }
.ch-name.sup { color: var(--color-gold); }
.ch-msg.me .ch-name.sup { color: var(--color-gold); }
.chp-who.sup span { color: var(--color-gold); font-weight: 650; }
.ch-name.gone { color: var(--color-muted); font-style: italic; cursor: default; }

/* --- Muutmine --- */
.ch-edited { font-size: 10.5px; color: var(--color-muted); font-style: italic; white-space: nowrap; }
.ch-hist { margin-top: 4px; padding: 5px 8px; border-left: 2px solid #fbbf24; border-radius: 4px; background: rgba(251, 191, 36, 0.06); font-size: 11.5px; color: var(--color-muted); }
.ch-hist b { color: #fbbf24; font-weight: 650; }
.ch-editbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px; font-size: 12px; color: #ffd2bf; background: rgba(255, 90, 31, 0.08); border-top: 1px solid rgba(255, 90, 31, 0.3); }
.ch-editbar[hidden] { display: none; }
.ch-editbar button { border: 0; background: none; color: var(--color-muted); font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: underline; }
.ch-msg.is-editing { background: rgba(255, 90, 31, 0.1); }
.ch-count { position: absolute; right: 60px; bottom: 15px; font-size: 11px; font-weight: 700; color: var(--color-muted); pointer-events: none; font-variant-numeric: tabular-nums; }
.ch-count[hidden] { display: none; }
.ch-count.over { color: var(--color-danger); }

/* --- Liigade toad --- */
.chl-list { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.chl-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--color-line); background: linear-gradient(180deg, var(--color-surface), #0e1119); color: var(--color-ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.chl-item:hover { border-color: var(--color-line-strong); }
.chl-ic { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 90, 31, 0.12); border: 1px solid rgba(255, 90, 31, 0.3); flex: none; }
.chl-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chl-n { font-size: 10px; font-weight: 800; color: #fff; background: var(--color-accent-2); border-radius: 9999px; padding: 1px 7px; }
.chl-go { color: var(--color-muted); font-size: 18px; }
.chp-tab[hidden] { display: none; }

/* --- Telefon: jututuba nagu sõnumirakendus --- */
.chp-app-back, .hb-chat-back { display: none; }
.hb-chat-score { font-family: var(--font-display); color: var(--color-muted); font-weight: 600; margin-left: 6px; letter-spacing: 0.02em; }
@media (min-width: 901px) { .hb-chat-score { display: none; } }
@media (max-width: 720px) {
  html.chat-app, html.chat-app body { overflow: hidden; overscroll-behavior: none; }
  html.chat-app .chp { position: fixed; left: 0; right: 0; top: 0; height: 100dvh; z-index: 50; border-radius: 0; border: 0; min-height: 0; margin: 0; }
  .chp-tabs { padding: 0 6px; align-items: center; }
  .chp-app-back { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; font-size: 20px; color: var(--color-ink); text-decoration: none; flex: none; }
  .chp-tab { padding: 12px 10px; }
  .chp-head { padding: 9px 12px; }
  .chp-head h2 { font-size: 17px; }
}
@media (max-width: 900px) {
  html.hb-chat-open, html.hb-chat-open body { overflow: hidden; overscroll-behavior: none; }
  html.hb-chat-open .hb-grid.show-chat .hb-chatcol { position: fixed; left: 0; right: 0; top: 0; height: 100dvh; z-index: 50; }
  html.hb-chat-open .hb-chatcol .hb-chat { height: 100%; min-height: 0; border-radius: 0; border: 0; }
  .hb-chat-back { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin: -4px 4px -4px -6px; border: 0; background: none; color: var(--color-ink); font-size: 20px; cursor: pointer; }
  .hb-chat-h { justify-content: flex-start; gap: 4px; }
  .hb-chat-h .ch-online { margin-left: auto; }
}
@media (max-width: 720px) {
  /* Kirjutusrida: 16px font (iOS ei suumi), ümarad nupud, turvaala all. */
  .ch-composer { gap: 6px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: #0b0e17; }
  .ch-composer textarea { font-size: 16px; min-height: 40px; border-radius: 20px; padding: 9px 14px; line-height: 1.3; }
  .ch-emo-btn { width: 40px; height: 40px; border-radius: 9999px; border: 0; background: rgba(245, 246, 250, 0.06); }
  .ch-send { width: 40px; height: 40px; border-radius: 9999px; }
  .ch-count { right: 58px; bottom: 19px; }
  .ch-emo-pop, .ch-suggest { bottom: 58px; }
  /* Sõnumimullid */
  .ch-scroll { padding: 10px 10px 6px; }
  .ch-msgs { gap: 3px; }
  .ch-msg { gap: 7px; margin: 0; padding: 3px 0; }
  .ch-msg:hover { background: none; }
  .ch-msg .ch-body { flex: 0 1 auto; max-width: 84%; }
  .ch-msg .ch-meta { padding: 0 4px 2px; }
  .ch-msg .ch-text { display: inline-block; background: #1c2130; padding: 7px 12px; border-radius: 4px 18px 18px 18px; font-size: 15px; line-height: 1.38; }
  .ch-msg.cont .ch-text { border-radius: 18px; }
  .ch-msg.cont { padding-left: 37px; }
  .ch-msg.cont .ch-av { display: none; }
  .ch-msg.me { flex-direction: row-reverse; }
  .ch-msg.me.cont { padding-left: 0; }
  .ch-msg.me .ch-av { display: none; }
  .ch-msg.me .ch-body { display: flex; flex-direction: column; align-items: flex-end; }
  .ch-msg.me .ch-meta > :not(.ch-time) { display: none; }
  .ch-msg.me .ch-text { background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2)); color: #fff; border-radius: 18px 4px 18px 18px; }
  .ch-msg.me.cont .ch-text { border-radius: 18px; }
  .ch-msg.me .ch-text .at, .ch-msg.me .ch-edited { color: rgba(255, 255, 255, 0.85); }
  .ch-msg.mention { background: none; box-shadow: none; }
  .ch-msg.mention .ch-text { box-shadow: inset 0 0 0 1.5px var(--color-accent); }
  .ch-msg.deleted .ch-text { background: rgba(28, 33, 48, 0.5); }
  .ch-msg .ch-reacts { padding: 0 4px; }
  .ch-msg .ch-tools { top: -16px; }
  .ch-msg.me .ch-tools { right: 0; }
  .ch-msg:not(.me) .ch-tools { right: auto; left: 37px; }
  .ch-msg:hover .ch-tools { display: none; }
  .ch-msg.tools-open .ch-tools { display: flex; }
  .ch-sys { font-size: 12px; }
}

/* --- Toetajad: avalehe kaart ja jalus --- */
.support-cta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 22px 24px; border-color: rgba(255, 209, 102, 0.28);
  background: radial-gradient(ellipse at top right, rgba(255, 209, 102, 0.09), transparent 60%), var(--color-surface); }
.support-cta__kicker { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-gold); margin-bottom: 6px; }
.support-cta__side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.support-cta__fund { text-align: right; line-height: 1.1; }
.support-cta__fund span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-muted); font-weight: 700; }
.support-cta__fund b { font-family: var(--font-display); font-size: 30px; color: var(--color-gold); }
.support-cta__logos { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.support-plate { display: inline-flex; align-items: center; justify-content: center; width: 92px; height: 46px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--color-line); }
.support-plate--light { background: #f4f5f8; }
.support-plate--dark { background: #12151d; }
.support-plate img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.foot-supporters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--color-line); }
.foot-supporters__label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-muted); font-weight: 700; margin-right: 4px; text-decoration: none; }
.foot-supporters__label:hover { color: var(--color-accent); }
.foot-supporters .support-plate { width: 78px; height: 38px; }
@media (max-width: 640px) {
  .support-cta { grid-template-columns: 1fr; padding: 18px; }
  .support-cta__side { align-items: flex-start; }
  .support-cta__fund { text-align: left; }
  .support-cta__logos { justify-content: flex-start; }
}

/* --- Toetajate leht: nimelised toetajad --- */
.user-supporters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.user-supporter { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 209, 102, 0.22); background: rgba(255, 209, 102, 0.04); text-decoration: none; min-width: 0; transition: border-color .15s; }
.user-supporter:hover { border-color: rgba(255, 209, 102, 0.5); }
.user-supporter .avatar { width: 36px; height: 36px; flex: none; border-radius: 9999px; object-fit: cover; }
.user-supporter .avatar-fallback { display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 209, 102, 0.14); border: 1px solid rgba(255, 209, 102, 0.35); color: var(--color-gold); font-weight: 700; font-size: 15px; text-transform: uppercase; }
.user-supporter__txt { display: flex; flex-direction: column; min-width: 0; }
.user-supporter__name { color: var(--color-gold); font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-supporter__note { color: var(--color-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Privaatvestlus adminiga --- */
.ch-dm-note { border-color: rgba(255, 90, 31, 0.3); color: #ffcbb5; }
.chp-room--dm .hash, .chp-tab--dm { }
.chp-room.unread { color: var(--color-ink); font-weight: 650; }
.chd-list { display: flex; flex-direction: column; gap: 6px; max-width: 640px; }
.chd-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--color-line); background: linear-gradient(180deg, var(--color-surface), #0e1119); color: var(--color-ink); text-decoration: none; }
.chd-item:hover { border-color: var(--color-line-strong); }
.chd-item.unread { border-color: rgba(255, 90, 31, 0.45); }
.chd-item .ch-av { width: 38px; height: 38px; flex: none; }
.chd-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chd-top { display: flex; align-items: baseline; gap: 8px; }
.chd-nm { flex: 1; min-width: 0; font-weight: 650; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chd-time { font-size: 11px; color: var(--color-muted); flex: none; }
.chd-last { font-size: 12.5px; color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chd-item.unread .chd-last { color: var(--color-ink); }
.chd-you { color: var(--color-muted); }
.contact-dm { border-color: rgba(255, 90, 31, 0.3); }
.chd-new { position: relative; max-width: 640px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.chd-new__label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-accent); }
.chd-new input { width: 100%; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.chd-results { border: 1px solid var(--color-line-strong); border-radius: 12px; background: #0f121a; padding: 4px; display: flex; flex-direction: column; gap: 2px; }
.chd-results[hidden] { display: none; }
.chd-res { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 9px; background: none; color: var(--color-ink); font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.chd-res:hover { background: rgba(255, 90, 31, 0.1); }
.chd-res .ch-av { width: 30px; height: 30px; flex: none; }
.chd-res__go { margin-left: auto; font-size: 12px; color: var(--color-accent); }
.chp-who-row { display: flex; align-items: center; gap: 4px; }
.chp-who-row .chp-who { flex: 1; min-width: 0; }
.chp-who__dm { flex: none; width: 28px; height: 28px; border: 1px solid var(--color-line); border-radius: 8px; background: none; color: var(--color-muted); cursor: pointer; font-size: 13px; opacity: 0.55; }
.chp-who-row:hover .chp-who__dm, .chp-who__dm:focus { opacity: 1; }
.chp-who__dm:hover { color: var(--color-accent); border-color: rgba(255, 90, 31, 0.5); }
@media (hover: none) { .chp-who__dm { opacity: 1; } }

/* --- Telefon: ülariba ja toavahetaja (asendab sakid + toa päise) --- */
.chp-mbar, .chp-msheet { display: none; }
@media (max-width: 720px) {
  .chp-main { position: relative; }
  .chp-tabs, .chp-head { display: none !important; }
  .chp-mbar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; min-height: 58px; border-bottom: 1px solid var(--color-line); background: var(--color-bg-alt); flex: none; }
  .chp-mbar__back { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--color-ink); border-radius: 12px; text-decoration: none; }
  .chp-mbar__back:active { background: rgba(245, 246, 250, 0.08); }
  .chp-mbar__sw { flex: 1; min-width: 0; height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 12px; border-radius: 14px; border: 1px solid var(--color-line-strong); background: rgba(245, 246, 250, 0.04); color: var(--color-ink); text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .chp-mbar__sw:active, .chp-mbar__sw[aria-expanded="true"] { border-color: rgba(255, 90, 31, 0.6); background: rgba(255, 90, 31, 0.08); }
  .chp-mbar__sw .ic { width: 22px; flex: none; text-align: center; font-size: 17px; line-height: 1; color: var(--color-muted); }
  .chp-mbar__sw .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
  .chp-mbar__sw .t { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chp-mbar__sw .d { font-size: 11.5px; color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
  .chp-mbar__sw .d[hidden], .chp-mbar__sw .d:empty { display: none; }
  .chp-mbar__sw .n { flex: none; font-size: 11px; font-weight: 800; color: #fff; background: var(--color-accent-2); border-radius: 9999px; padding: 2px 7px; min-width: 22px; text-align: center; }
  .chp-mbar__sw .n[hidden] { display: none; }
  .chp-mbar__sw .chev { flex: none; color: var(--color-muted); transition: transform .15s; }
  .chp-mbar__sw[aria-expanded="true"] .chev { transform: rotate(180deg); }
  .chp-mbar__on { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; font-size: 13px; font-weight: 600; color: var(--color-muted); font-variant-numeric: tabular-nums; }
  .chp-mbar__on i { width: 8px; height: 8px; border-radius: 9999px; background: var(--color-success); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); }
  .chp-msheet { display: block; position: absolute; left: 0; right: 0; top: 58px; bottom: 0; z-index: 40; background: rgba(4, 6, 10, 0.6); }
  .chp-msheet[hidden] { display: none; }
  .chp-msheet__panel { max-height: 78%; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background: #0d1018; border-bottom: 1px solid var(--color-line-strong); border-radius: 0 0 20px 20px; padding: 4px 10px 14px; box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.9); animation: chp-sheet-in .16s ease-out; }
  @keyframes chp-sheet-in { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
  .chp-msheet .s { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-muted); font-weight: 700; padding: 14px 8px 6px; display: flex; justify-content: space-between; }
  .chp-msheet .ch-mi { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; min-height: 50px; padding: 8px 10px; border-radius: 12px; font-size: 15px; width: 100%; border: 0; background: none; color: var(--color-ink); text-align: left; -webkit-tap-highlight-color: transparent; }
  .chp-msheet .ch-mi:active { background: rgba(245, 246, 250, 0.07); }
  .chp-msheet .ch-mi.on { background: rgba(255, 90, 31, 0.13); box-shadow: inset 3px 0 0 var(--color-accent); }
  .chp-msheet .ch-mi .ic { font-size: 16px; text-align: center; color: var(--color-muted); }
  .chp-msheet .ch-mi .duo { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .chp-msheet .ch-mi .duo .s2 { font-size: 16px; }
  .chp-msheet .ch-mi .q { font-size: 12.5px; }
  .chp-msheet .ch-mi .u { font-size: 11px; padding: 2px 7px; min-width: 22px; }
  .chp-msheet .ch-mi .p { width: 9px; height: 9px; }

  /* Kirjutusrida: suuremad puutealad */
  .ch-composer { gap: 8px; padding: 8px 10px 10px; align-items: flex-end; }
  .ch-composer textarea { min-height: 44px; padding: 11px 16px; font-size: 16px; border-radius: 22px; }
  .ch-emo-btn, .ch-send { width: 44px; height: 44px; flex: none; }
  .ch-emo-btn { font-size: 20px; }
  .ch-count { right: 64px; bottom: 22px; }
  .ch-emo-pop, .ch-suggest { bottom: 64px; }
  .ch-emo-pop button { width: 44px; height: 44px; font-size: 22px; }
  .ch-empty { font-size: 14.5px; line-height: 1.5; padding: 28px 18px; }
  .ch-typing { font-size: 12.5px; padding-left: 14px; }
  .ch-editbar { font-size: 13px; padding: 9px 14px; }
  .ch-editbar button { font-size: 13px; padding: 4px 6px; }
}
@media (max-width: 720px) { .ch-emo-pop { flex-wrap: wrap; max-width: calc(100% - 20px); } }
@media (max-width: 720px) {
  .chp-msheet .ch-mi .ch-logo.sm { width: 26px; height: 26px; font-size: 8px; border-radius: 7px; }
  .chp-msheet .ch-mi .ch-logo.sm.img { width: 26px; height: 26px; }
}

/* --- Telefon: turvaalad (kumerad nurgad, kodunupu riba) ja suurem tekst --- */
@media (max-width: 720px) {
  html.chat-app .chp { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  .chp-mbar { padding-top: calc(6px + env(safe-area-inset-top)); }
  .chp-msheet { top: calc(58px + env(safe-area-inset-top)); }
  /* Kirjutusrida tõstetud ekraani alaservast: vähemalt 18px, kodunupu ribaga telefonis selle võrra rohkem. */
  .ch-composer { padding: 10px max(14px, env(safe-area-inset-left)) max(18px, calc(env(safe-area-inset-bottom) + 6px)) max(14px, env(safe-area-inset-right)); }
  .ch-composer textarea { font-size: 17px; min-height: 46px; padding: 12px 16px; }
  .ch-emo-btn, .ch-send { width: 46px; height: 46px; }
  .ch-count { bottom: calc(max(18px, calc(env(safe-area-inset-bottom) + 6px)) + 14px); }
  .ch-emo-pop, .ch-suggest { bottom: calc(max(18px, calc(env(safe-area-inset-bottom) + 6px)) + 60px); }
  .ch-msg .ch-text { font-size: 16.5px; line-height: 1.4; padding: 8px 13px; }
  .ch-meta { font-size: 12.5px; }
  .ch-msg .ch-name { font-size: 13.5px; }
  .ch-sys { font-size: 13px; }
  .ch-day { font-size: 12px; }
  .ch-note { font-size: 12.5px; }
  .ch-empty { font-size: 16px; }
  .ch-reacts button { font-size: 13px; padding: 3px 9px; }
  .chp-mbar__sw .t { font-size: 18px; }
  .chp-mbar__sw .d { font-size: 12.5px; }
  .chp-msheet .ch-mi { font-size: 16px; }
  .hb-chat-h { padding-top: calc(10px + env(safe-area-inset-top)); }
}

/* --- Võrgus olijate aken --- */
button.chp-mbar__on { border: 0; background: none; cursor: pointer; height: 44px; border-radius: 12px; -webkit-tap-highlight-color: transparent; }
button.chp-mbar__on:active { background: rgba(245, 246, 250, 0.08); }
.ch-online--btn { border: 0; background: none; cursor: pointer; font: inherit; color: inherit; padding: 4px 6px; border-radius: 8px; }
.ch-online--btn:hover { background: rgba(245, 246, 250, 0.06); }
.ch-online-sheet { position: fixed; inset: 0; z-index: 90; background: rgba(4, 6, 10, 0.62); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ch-online-sheet[hidden] { display: none; }
.ch-online-sheet__panel { width: 100%; max-width: 380px; max-height: min(70vh, 560px); display: flex; flex-direction: column; background: #0f121a; border: 1px solid var(--color-line-strong); border-radius: 18px; box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.9); overflow: hidden; }
.ch-online-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--color-line); }
.ch-online-sheet__head b { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: 0.02em; }
.ch-online-sheet__x { width: 38px; height: 38px; border: 0; border-radius: 10px; background: rgba(245, 246, 250, 0.06); color: var(--color-muted); font-size: 16px; cursor: pointer; }
.ch-online-sheet__list { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 6px 8px 10px; }
.ch-online-row { display: flex; align-items: center; gap: 6px; }
.ch-online-row__u { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; min-height: 52px; padding: 6px 8px; border-radius: 12px; color: var(--color-ink); text-decoration: none; font-weight: 600; font-size: 15.5px; }
.ch-online-row__u:active, .ch-online-row__u:hover { background: rgba(245, 246, 250, 0.06); }
.ch-online-row__u .ch-av { width: 36px; height: 36px; flex: none; position: relative; }
.ch-online-row__u .ch-av { box-shadow: 0 0 0 2px #0f121a, 0 0 0 4px rgba(34, 197, 94, 0.85); margin: 0 3px; }
.ch-online-row__u .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-online-row__u.sup .nm { color: var(--color-gold); }
.ch-online-row__me { font-size: 11px; font-weight: 600; color: var(--color-muted); margin-left: auto; }
.ch-online-row__dm { flex: none; width: 42px; height: 42px; border: 1px solid var(--color-line); border-radius: 12px; background: none; color: var(--color-muted); font-size: 16px; cursor: pointer; }
.ch-online-row__dm:active, .ch-online-row__dm:hover { color: var(--color-accent); border-color: rgba(255, 90, 31, 0.5); }
.ch-online-sheet__more { font-size: 12px; color: var(--color-muted); text-align: center; padding: 0 0 10px; }
html.ch-online-open, html.ch-online-open body { overflow: hidden; }
@media (max-width: 720px) {
  .ch-online-sheet { align-items: flex-end; padding: 0; }
  .ch-online-sheet__panel { max-width: none; max-height: 75vh; border-radius: 20px 20px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); animation: ch-online-up .18s ease-out; }
  @keyframes ch-online-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* --- Kirjutamise lukk (alla 3 ennustatud vooru) --- */
.ch-lockbar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--color-line); background: linear-gradient(180deg, rgba(255, 90, 31, 0.07), rgba(255, 90, 31, 0.02)); }
.ch-lockbar[hidden] { display: none; }
.ch-lockbar__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ch-lockbar__txt b { font-size: 13.5px; font-weight: 650; color: var(--color-ink); }
.ch-lockbar__txt > span { font-size: 12px; color: var(--color-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ch-lockbar__dots { display: inline-flex; gap: 4px; }
.ch-lockbar__dots i { width: 9px; height: 9px; border-radius: 9999px; background: var(--color-line-strong); }
.ch-lockbar__dots i.on { background: var(--color-accent); }
.ch-lockbar__act { display: flex; gap: 8px; flex: none; align-items: center; }
.ch-lockbar__go { padding: 8px 14px; border-radius: 10px; background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2)); color: #fff; font-weight: 700; font-size: 13px; text-decoration: none; white-space: nowrap; }
.ch-lockbar__dm { font-size: 12px; color: var(--color-muted); text-decoration: underline; white-space: nowrap; }
@media (max-width: 720px) {
  .ch-lockbar { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px max(14px, env(safe-area-inset-left)) max(18px, calc(env(safe-area-inset-bottom) + 6px)); }
  .ch-lockbar__txt b { font-size: 15px; }
  .ch-lockbar__txt > span { font-size: 13px; }
  .ch-lockbar__act { justify-content: space-between; }
  .ch-lockbar__go { flex: 1; text-align: center; padding: 12px 14px; font-size: 15px; border-radius: 12px; }
  .ch-lockbar__dm { font-size: 13.5px; padding: 0 6px; }
}
