/* =====================================================================
   Czat Rdzenia — samodzielne style (używane w aplikacji i na stronie gry).
   ===================================================================== */
.rc {
  --rc-bg: #170b22; --rc-panel: #241536; --rc-card: rgba(255, 255, 255, .07); --rc-line: rgba(255, 255, 255, .12);
  --rc-text: #fff6f2; --rc-muted: #cdbad3; --rc-faint: #9a87a8; --rc-a1: var(--a1, #ff7a8a); --rc-a2: var(--a2, #ffb36b);
  --rc-font: var(--sans, 'Plus Jakarta Sans', system-ui, sans-serif); --rc-display: var(--display, 'Bricolage Grotesque', system-ui, sans-serif);
  display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--rc-bg); color: var(--rc-text); font: 15px/1.45 var(--rc-font); position: relative;
}
.rc * { box-sizing: border-box; }
.rc button { font: inherit; color: inherit; cursor: pointer; }
.rc-head { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; border-bottom: 1px solid var(--rc-line); background: rgba(23, 11, 34, .92); backdrop-filter: blur(14px); flex: none; }
.rc-ava { width: 42px; height: 42px; border-radius: 50%; overflow: visible; position: relative; flex: none; background: #2f1c44; }
.rc-ava svg { width: 100%; height: 100%; border-radius: 50%; }
.rc-ava i { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--rc-faint); border: 2px solid var(--rc-bg); }
.rc-ava i.on { background: #4ee6a6; box-shadow: 0 0 8px #4ee6a6; }
.rc-who { flex: 1; min-width: 0; display: grid; }
.rc-who b { font: 800 17px var(--rc-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-who small { font-size: 12px; color: var(--rc-faint); }
.rc-tag { font-size: 11px; font-weight: 800; color: #ffb36b; border: 1px solid rgba(255, 179, 107, .4); border-radius: 99px; padding: 3px 9px; }
.rc-icon { width: 40px; height: 40px; flex: none; border-radius: 13px; border: 1px solid var(--rc-line); background: var(--rc-card); display: grid; place-items: center; font-size: 18px; }
.rc-icon.back { font-size: 26px; line-height: 1; border: 0; background: none; }
.rc-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 12px 6px; display: flex; flex-direction: column; }
.rc-list > [data-items] { display: flex; flex-direction: column; gap: 4px; }
.rc-more { text-align: center; margin-bottom: 8px; }
.rc-more button { border: 1px solid var(--rc-line); background: var(--rc-card); border-radius: 99px; padding: 6px 14px; font-size: 12.5px; font-weight: 700; }
.rc-empty { margin: auto; text-align: center; color: var(--rc-muted); padding: 40px 20px; font-size: 14px; }
.rc-empty div { font-size: 44px; margin-bottom: 6px; }
.rc-day { text-align: center; margin: 12px 0 6px; }
.rc-day span { font-size: 11.5px; font-weight: 800; color: var(--rc-faint); background: var(--rc-card); padding: 3px 10px; border-radius: 99px; }
.rc-m { display: flex; flex-direction: column; max-width: 82%; animation: rcIn .28s cubic-bezier(.2, .8, .2, 1) both; }
.rc-m.me { align-self: flex-end; align-items: flex-end; }
.rc-m.them { align-self: flex-start; align-items: flex-start; }
@keyframes rcIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.rc-b { position: relative; border-radius: 20px; padding: 9px 13px; background: var(--rc-card); border: 1px solid var(--rc-line); overflow-wrap: anywhere; }
.rc-m.me .rc-b { background: linear-gradient(135deg, var(--rc-a1), var(--rc-a2)); color: #1a0a1f; border: 0; border-bottom-right-radius: 6px; }
.rc-m.them .rc-b { border-bottom-left-radius: 6px; }
.rc-b p { margin: 0; white-space: pre-wrap; }
.rc-m.k-photo .rc-b { padding: 4px; }
.rc-m.k-photo .rc-b p { padding: 6px 8px 4px; }
.rc-img { display: block; border: 0; padding: 0; background: #000; border-radius: 16px; overflow: hidden; width: min(240px, 62vw); max-height: 320px; }
.rc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-once { display: flex; gap: 10px; align-items: center; text-align: left; border: 0; border-radius: 16px; padding: 10px 14px 10px 10px; background: linear-gradient(135deg, #ff5e3a, #ff2a68); color: #fff; min-width: 220px; }
.rc-once > span:first-child { font-size: 26px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .2); flex: none; }
.rc-once b { display: block; font-size: 14px; }
.rc-once small { font-size: 12px; opacity: .9; }
.rc-once.ready { animation: rcPulse 1.8s ease-in-out infinite; }
.rc-once.viewed, .rc-once.sent { background: var(--rc-card); color: var(--rc-muted); border: 1px dashed var(--rc-line); }
.rc-m.me .rc-once.sent, .rc-m.me .rc-once.viewed { background: rgba(0, 0, 0, .18); color: #1a0a1f; border-color: rgba(26, 10, 31, .25); }
@keyframes rcPulse { 50% { box-shadow: 0 0 0 6px rgba(255, 64, 100, .25); } }
.rc-qcard { display: grid; gap: 6px; min-width: 230px; }
.rc-qcard > small { font-size: 11.5px; font-weight: 800; opacity: .75; }
.rc-qcard > b { font: 800 16.5px/1.25 var(--rc-display); }
.rc-m.k-question .rc-b { border: 1.5px solid rgba(255, 209, 102, .55); background: linear-gradient(160deg, rgba(255, 209, 102, .16), rgba(255, 209, 102, .04)); color: var(--rc-text); }
.rc-m.me.k-question .rc-b { border-bottom-right-radius: 20px; }
.rc-ans { background: rgba(0, 0, 0, .22); border-radius: 12px; padding: 8px 10px; white-space: pre-wrap; }
.rc-ans small { display: block; font-size: 11px; font-weight: 800; color: #ffd166; }
.rc-answer { display: flex; gap: 6px; }
.rc-answer input { flex: 1; min-width: 0; min-height: 40px; border-radius: 12px; border: 1.5px solid var(--rc-line); background: rgba(0, 0, 0, .25); color: var(--rc-text); padding: 6px 10px; font: inherit; }
.rc-answer button { width: 40px; border-radius: 12px; border: 0; background: #ffd166; color: #1a0a1f; font-weight: 900; }
.rc-mini { border: 0; background: none; color: #ffd166; font-weight: 800; font-size: 13px; padding: 2px 0; text-align: left; }
.rc-dim { opacity: .7; font-size: 12.5px; }
.rc-react { position: absolute; bottom: -10px; right: -6px; font-size: 15px; background: var(--rc-panel); border: 1px solid var(--rc-line); border-radius: 99px; padding: 1px 5px; animation: rcPop .35s cubic-bezier(.34, 1.56, .64, 1); }
.rc-m.me .rc-react { right: auto; left: -6px; }
@keyframes rcPop { from { transform: scale(0); } }
.rc-meta { font-size: 10.5px; color: var(--rc-faint); margin: 3px 6px 6px; }
.rc-m:has(.rc-react) .rc-meta { margin-top: 12px; }
.rc-typing { align-self: flex-start; display: flex; gap: 4px; align-items: center; padding: 8px 12px; margin-top: 4px; border-radius: 18px; background: var(--rc-card); font-size: 12px; color: var(--rc-muted); }
.rc-typing span { margin-right: 4px; }
.rc-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--rc-muted); animation: rcDot 1s infinite; }
.rc-typing i:nth-of-type(2) { animation-delay: .15s; } .rc-typing i:nth-of-type(3) { animation-delay: .3s; }
@keyframes rcDot { 30% { transform: translateY(-4px); opacity: .5; } }
.rc-qbar { flex: none; padding: 10px 12px 4px; border-top: 1px solid rgba(255, 209, 102, .35); background: linear-gradient(180deg, rgba(255, 209, 102, .12), transparent); }
.rc-qhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 13.5px; }
.rc-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.rc-chips::-webkit-scrollbar { display: none; }
.rc-chips button { flex: none; max-width: 240px; white-space: normal; text-align: left; border: 1px solid rgba(255, 209, 102, .4); background: rgba(0, 0, 0, .2); border-radius: 14px; padding: 7px 10px; font-size: 12.5px; font-weight: 700; color: #ffe9b0; }
.rc-x { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--rc-line); background: rgba(0, 0, 0, .3); color: var(--rc-text); display: grid; place-items: center; }
.rc-x.big { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; width: 44px; height: 44px; font-size: 18px; }
.rc-pop { position: absolute; left: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 3; display: grid; gap: 6px; padding: 8px; border-radius: 18px; background: var(--rc-panel); border: 1px solid var(--rc-line); box-shadow: 0 20px 40px -12px #000; animation: rcIn .2s both; }
.rc-pop button { display: grid; text-align: left; border: 0; background: var(--rc-card); border-radius: 12px; padding: 10px 14px; font-weight: 800; font-size: 14.5px; }
.rc-pop small { font-weight: 600; font-size: 11.5px; color: var(--rc-faint); }
.rc-compose { flex: none; display: flex; gap: 8px; align-items: flex-end; padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rc-line); background: rgba(23, 11, 34, .96); }
.rc.asking .rc-compose { border-top-color: transparent; }
.rc-compose textarea { flex: 1; min-width: 0; min-height: 42px !important; max-height: 140px; resize: none; border-radius: 21px !important; padding: 10px 14px !important; font-size: 16px; border: 1.5px solid var(--rc-line); background: rgba(0, 0, 0, .3); color: var(--rc-text); outline: none; font-family: inherit; line-height: 1.35; }
.rc-compose textarea:focus { border-color: var(--rc-a2); }
.rc.asking .rc-compose textarea { border-color: #ffd166; }
.rc-compose .rc-icon { width: 42px; height: 42px; border-radius: 50%; }
.rc-send { width: 44px; height: 42px; flex: none; border: 0; border-radius: 50%; background: linear-gradient(135deg, var(--rc-a1), var(--rc-a2)); color: #1a0a1f; font-size: 18px; font-weight: 900; }
.rc.asking .rc-send { background: #ffd166; }
.rc-flash { position: absolute; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #ffd3da; color: #1a0a1f; padding: 9px 14px; border-radius: 14px; font-weight: 700; font-size: 13.5px; z-index: 4; animation: rcIn .25s both; max-width: 90%; }
.rc-viewer { position: fixed; inset: 0; z-index: 120; background: rgba(5, 2, 8, .96); display: grid; place-items: center; animation: rcIn .2s both; user-select: none; -webkit-user-select: none; }
.rc-viewer img { max-width: 100%; max-height: 86dvh; object-fit: contain; -webkit-touch-callout: none; }
.rc-viewer.once img { filter: drop-shadow(0 0 30px rgba(255, 64, 100, .35)); }
.rc-cap { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; color: #cdbad3; font: 700 13px var(--rc-font); }
.rc-gallery { position: absolute; inset: 0; z-index: 5; background: var(--rc-bg); display: flex; flex-direction: column; animation: rcIn .2s both; }
.rc-gallery header { display: flex; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top)) 14px 12px; font: 800 18px var(--rc-display); border-bottom: 1px solid var(--rc-line); }
.rc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; overflow-y: auto; padding: 3px; }
.rc-grid button { border: 0; padding: 0; aspect-ratio: 1; background: #000; }
.rc-grid img { width: 100%; height: 100%; object-fit: cover; }

/* Szuflada czatu gry (strona gry i gry w aplikacji) */
.rc-drawer-bg { position: fixed; inset: 0; z-index: 110; background: rgba(5, 2, 8, 0); transition: background .25s; display: flex; align-items: flex-end; justify-content: center; }
.rc-drawer-bg.in { background: rgba(5, 2, 8, .6); }
.rc-drawer { width: 100%; max-width: 580px; height: min(78dvh, 640px); border-radius: 26px 26px 0 0; overflow: hidden; transform: translateY(100%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 -20px 50px -20px #000; }
.rc-drawer-bg.in .rc-drawer { transform: none; }
.rc-drawer .rc-head { padding-top: 12px; }
.rc-bubble { position: fixed; right: 14px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 105; width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer; background: linear-gradient(135deg, #ff7a8a, #8b6cff); color: #fff; font-size: 24px; display: grid; place-items: center; box-shadow: 0 14px 30px -10px rgba(139, 108, 255, .8); }
.rc-bubble b { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; border-radius: 10px; background: #ff4d6d; color: #fff; font: 800 11px/20px system-ui, sans-serif; padding: 0 5px; animation: rcPop .35s cubic-bezier(.34, 1.56, .64, 1); }
