/* GrokGames chat widget: dark green glass, matches /futuristic.css. Scoped to .ggc. */
.ggc { margin-top: 16px; border-radius: 18px; overflow: hidden; color: #e6fff0;
  background: linear-gradient(160deg, rgba(25, 193, 85, 0.20), #072a1b 55%);
  border: 1px solid rgba(61, 255, 138, 0.35); box-shadow: 0 10px 30px rgba(7, 42, 27, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.07); }
.gk-side .ggc { margin-top: 0; }
.ggc * { box-sizing: border-box; }
.ggc-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px; font: inherit; font-weight: 600; color: #e6fff0;
  background: transparent; border: 0; cursor: pointer; text-align: left; }
.ggc-title { font-family: Chango, Georgia, serif; font-weight: 400; font-size: 1.15rem; letter-spacing: 0.01em; }
.ggc-head:focus-visible, .ggc-in:focus-visible, .ggc-send:focus-visible, .ggc-log:focus-visible { outline: 3px solid #3dff8a; outline-offset: 2px; }
.ggc-live { width: 8px; height: 8px; border-radius: 50%; background: #5d7f6c; }
.ggc-live.ggc-on { background: #3dff8a; box-shadow: 0 0 8px #3dff8a; }
.ggc-live.ggc-off { background: #ff8a80; }
.ggc-badge { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #3dff8a; color: #03140b; font-size: 0.8rem; text-align: center; }
.ggc-chev { margin-left: auto; transition: transform 0.2s; }
.ggc-badge:not([hidden]) + .ggc-chev { margin-left: 4px; }
.ggc-open .ggc-chev { transform: rotate(180deg); }
.ggc-body { padding: 0 14px 14px; }
.ggc-body[hidden] { display: none; }
.ggc-log { height: 260px; overflow-y: auto; padding: 8px 10px; border-radius: 12px; background: rgba(3, 15, 9, 0.55); border: 1px solid rgba(61, 255, 138, 0.18);
  scrollbar-width: thin; scrollbar-color: #19c155 transparent; overscroll-behavior: contain; }
.ggc-empty { margin: 8px 0; color: #a6d8bb; font-size: 0.95rem; }
.ggc-msg { display: block; padding: 5px 0; border-bottom: 1px solid rgba(61, 255, 138, 0.10); font-size: 0.95rem; line-height: 1.35; }
.ggc-msg:last-child { border-bottom: 0; }
.ggc-who { font-weight: 600; color: #7dffb0; overflow-wrap: anywhere; }
.ggc-me .ggc-who { color: #ffe27a; }
.ggc-grp { font-size: 0.75rem; padding: 0 7px; border-radius: 999px; border: 1px solid rgba(61, 255, 138, 0.35); color: #a6d8bb; }
.ggc-time { font-size: 0.78rem; color: #8bb9a0; }
.ggc-grp { margin-left: 6px; }
.ggc-time::before, .ggc-text::before { content: ' - '; color: #8bb9a0; font-size: 0.9rem; white-space: pre; }
.ggc-text { color: #e6fff0; overflow-wrap: anywhere; white-space: pre-wrap; }
.ggc-sys { font-size: 0.82rem; font-style: italic; color: #8bb9a0; padding: 3px 0; }
.ggc-sys .ggc-text { color: #a6d8bb; }
.ggc-sys .ggc-text::before { content: '→ '; }
.ggc-sys .ggc-time { margin-left: 6px; font-size: 0.72rem; }
.ggc-sys .ggc-time::before { content: none; }
.ggc-note { min-height: 1.3em; margin: 8px 2px 4px; font-size: 0.88rem; font-weight: 600; color: #a6d8bb; }
.ggc-note.ggc-bad { color: #ffb4ab; }
.ggc-namerow { margin-bottom: 8px; }
.ggc-namerow[hidden] { display: none; }
.ggc-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.ggc .ggc-in { display: block; width: 100%; margin: 0; padding: 9px 12px; font: inherit; font-size: 1rem; color: #e6fff0; background: rgba(3, 15, 9, 0.7);
  border: 1px solid rgba(61, 255, 138, 0.3); border-radius: 12px; text-transform: none; letter-spacing: 0; }
.ggc .ggc-in::placeholder { color: #7fae96; }
.ggc .ggc-in:focus { border-color: #3dff8a; }
.ggc-send { font: inherit; font-weight: 600; cursor: pointer; padding: 9px 18px; border: 0; border-radius: 999px; color: #03140b;
  background: linear-gradient(180deg, #3dff8a, #19c155); box-shadow: 0 0 14px rgba(25, 193, 85, 0.45); }
.ggc-send:disabled { opacity: 0.5; cursor: default; }
.ggc-count { grid-column: 1 / -1; justify-self: end; font-size: 0.75rem; color: #8bb9a0; margin-top: -2px; }
.ggc-count.ggc-warn { color: #ffe27a; }
@media (max-width: 720px) { .ggc-log { height: 220px; } .ggc-in { font-size: 16px; } }
/* Side rail layout (built by chat.js around .game-wrap): full-width game on the left, chat column docked right.
   Portrait under 900px: chat hidden (only the game shows). Landscape (phones too) and 900px+: side by side. */
.ggc-layout { display: block; }
.ggc-rail[hidden] { display: none; }
.ggc-layout:not(.ggc-side) > .ggc-rail { width: min(980px, calc(100% - 32px)); margin: -36px auto 48px; }
.ggc-layout:not(.ggc-side) > .ggc-rail .ggc { margin-top: 0; }
.ggc-layout.ggc-side { display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 21vw, 340px);
  align-items: start; column-gap: 12px; padding: 0 10px; width: 100%; box-sizing: border-box; }
.ggc-layout.ggc-side > .game-wrap { width: 100%; max-width: none; margin: 0; min-width: 0; }
.ggc-side > .ggc-rail { position: sticky; top: 0; height: 100vh; height: 100dvh; padding: 28px 0 16px; display: flex; flex-direction: column; min-width: 0; }
.ggc-side > .ggc-rail > .ggc-dock { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; max-height: 100%; }
.ggc-side > .ggc-rail .ggc { margin-top: 0; display: flex; flex-direction: column; min-height: 0; max-height: 100%; }
.ggc-side > .ggc-rail .ggc.ggc-open { flex: 1 1 auto; }
.ggc-side > .ggc-rail .ggc-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.ggc-side > .ggc-rail .ggc-body[hidden] { display: none; }
.ggc-side > .ggc-rail .ggc-log { height: auto; flex: 1 1 auto; min-height: 120px; }
/* narrow landscape (phones on their side, small tablets): slimmer column */
@media (max-width: 1099px) {
  .ggc-layout.ggc-side { grid-template-columns: minmax(0, 1fr) clamp(240px, 30vw, 280px); column-gap: 10px; padding: 0 8px; }
  .ggc-layout.ggc-side > .game-wrap { padding-top: 16px; }
  .ggc-side > .ggc-rail { padding: 16px 0 10px; }
  .ggc-side > .ggc-rail .ggc-head { padding: 9px 12px; }
  .ggc-side > .ggc-rail .ggc-body { padding: 0 10px 10px; }
  .ggc-side > .ggc-rail .ggc-msg { font-size: .88rem; }
}
@media (max-height: 520px) {
  .ggc-side > .ggc-rail { padding: 8px 0 8px; }
  .ggc-side > .ggc-rail .ggc-log { min-height: 70px; }
  .ggc-side > .ggc-rail .ggc-note { margin: 4px 2px 2px; min-height: 1em; }
  .ggc-side > .ggc-rail .ggc-count { display: none; }
}
/* phones and narrow screens held upright: game only */
@media (orientation: portrait) and (max-width: 899px) { .ggc-dock, .ggc-rail { display: none !important; } }

/* Popup chat: opt in with data-chat="popup" on #gg-chat. Skips the side rail. */
.ggc-fab { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; align-items: center; gap: 8px;
  background: #072a1b; color: #e6fff0; border: 1px solid rgba(61, 255, 138, 0.5); border-radius: 999px; padding: 10px 16px;
  font: 700 14px/1 system-ui, sans-serif; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.ggc-fab:hover, .ggc-fab:focus-visible { background: #0f4a2c; outline: none; }
.ggc-fab-b { display: inline-flex; min-width: 1.4em; justify-content: center; padding: 2px 6px; border-radius: 999px;
  background: #e35; color: #fff; font-size: .75rem; font-weight: 700; }
.ggc-fab-b[hidden] { display: none !important; }
.ggc.ggc-drawer { background: linear-gradient(160deg, #0f4a2c, #072a1b 55%); position: fixed; right: 16px; bottom: 66px; z-index: 80; width: min(340px, calc(100vw - 32px));
  max-height: min(60vh, 460px); margin: 0; box-shadow: 0 10px 28px rgba(0,0,0,.4); display: flex; flex-direction: column; }
.ggc.ggc-drawer[hidden] { display: none !important; }
.ggc.ggc-drawer .ggc-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.ggc.ggc-drawer .ggc-log { height: auto; flex: 1 1 auto; min-height: 120px; max-height: calc(min(60vh, 460px) - 120px); }
.ggc-popup { display: contents; }
@media (orientation: portrait) and (max-width: 899px) {
  .ggc-fab { right: 10px; bottom: 10px; padding: 9px 14px; font-size: 13px; }
  .ggc.ggc-drawer { right: 10px; bottom: 56px; width: calc(100vw - 20px); max-height: min(55vh, 400px); }
}
