/* Smolar Głos: własny przycisk i okno, niezależne od motywu. */
#sg-root { --sg-a: #b7834f; --sg-a2: #cb9660; --sg-bg: #16130f; --sg-card: #221d17; --sg-ink: #f3efe7; --sg-dim: #b9b0a3; --sg-line: #3a3229;
	position: fixed; left: 14px; bottom: 14px; z-index: 99990; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--sg-ink); }
#sg-root *, #sg-root *::before, #sg-root *::after { box-sizing: border-box; }
#sg-root [hidden] { display: none !important; }
body:has(.sma-open) #sg-root:not(.sg-open) { display: none; }
#sg-root button { font: inherit; cursor: pointer; }
#sg-root button:focus-visible, #sg-root a:focus-visible, #sg-root textarea:focus-visible { outline: 3px solid var(--sg-a2); outline-offset: 2px; }

.sg-launch { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 18px; border: 0; border-radius: 999px; background: var(--sg-a); color: #16130f; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.35); white-space: nowrap; }
.sg-launch:hover { background: var(--sg-a2); }
.sg-open .sg-launch { display: none; }
.sg-mic { width: 10px; height: 16px; border-radius: 5px; background: currentColor; flex: none; position: relative; margin-bottom: 4px; }
.sg-mic::after { content: ''; position: absolute; left: -4px; right: -4px; bottom: -4px; height: 11px; border: 2px solid currentColor; border-top: 0; border-radius: 0 0 9px 9px; }

.sg-panel { position: fixed; left: 14px; bottom: 14px; width: 380px; max-height: min(640px, calc(100vh - 28px)); display: flex; flex-direction: column; background: var(--sg-bg); border: 1px solid var(--sg-line); border-radius: 16px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.sg-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--sg-line); }
.sg-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sg-head strong { font-size: 16px; }
.sg-head small { color: var(--sg-dim); font-size: 13px; }
.sg-head small:empty { display: none; }
.sg-x { width: 44px; height: 44px; flex: none; border: 0; border-radius: 10px; background: transparent; color: var(--sg-ink); font-size: 26px !important; line-height: 1; }
.sg-x:hover { background: var(--sg-card); }

.sg-intro { padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.sg-start { min-height: 52px; border: 0; border-radius: 12px; background: var(--sg-a); color: #16130f; font-size: 17px !important; font-weight: 700; }
.sg-start:hover { background: var(--sg-a2); }
.sg-ts:empty { display: none; }
#sg-root .sg-info { margin: 0; font-size: 13px; color: var(--sg-dim); }
#sg-root .sg-info a, #sg-root .sg-compare { color: var(--sg-a2); text-decoration: underline; }
#sg-root .sg-compare { font-size: 14px; }
#sg-root .sg-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: #3b1a16; color: #ffcdc5; }
#sg-root .sg-error:empty { display: none; }

.sg-log { flex: 1; min-height: 120px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.sg-msg { max-width: 86%; padding: 9px 12px; border-radius: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.sg-assistant { align-self: flex-start; background: var(--sg-card); border-bottom-left-radius: 4px; }
.sg-user { align-self: flex-end; background: var(--sg-a); color: #16130f; border-bottom-right-radius: 4px; }

.sg-form { display: flex; gap: 8px; padding: 10px 10px 0; }
.sg-form textarea { flex: 1; min-height: 44px; max-height: 96px; padding: 10px 12px; border: 1px solid var(--sg-line); border-radius: 12px; background: var(--sg-card); color: var(--sg-ink); font: inherit; font-size: 16px; resize: none; }
.sg-send { width: 48px; min-height: 44px; border: 0; border-radius: 12px; background: var(--sg-a); color: #16130f; }
.sg-send:disabled, .sg-form textarea:disabled { opacity: .5; }

.sg-links { display: flex; gap: 8px; padding: 10px 10px 0; }
#sg-root .sg-link { flex: 1; min-height: 44px; display: flex; align-items: center; justify-content: center; padding: 4px 8px; border: 1px solid var(--sg-a); border-radius: 10px; color: var(--sg-ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.sg-going { margin: 10px 10px 0; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--sg-a); color: #16130f; }
.sg-going strong { flex: 1; }
.sg-stay { min-height: 44px; padding: 0 14px; border: 1px solid #16130f; border-radius: 10px; background: transparent; color: #16130f; }
.sg-bar { display: flex; align-items: center; gap: 10px; padding: 10px; }
.sg-clock { min-width: 44px; font-variant-numeric: tabular-nums; color: var(--sg-dim); }
.sg-sound { min-height: 44px; padding: 0 14px; border: 1px solid var(--sg-a); border-radius: 10px; background: transparent; color: var(--sg-ink); }
.sg-end { flex: 1; min-height: 48px; border: 0; border-radius: 12px; background: #b3261e; color: #fff; font-weight: 700; }

/* Telefon: okno na cały ekran, strona pod nim się nie przewija. */
@media (max-width: 600px) {
	#sg-root { left: 10px; bottom: 10px; }
	.sg-panel { inset: 0; width: auto; max-height: none; height: 100%; height: 100dvh; border: 0; border-radius: 0; padding-bottom: env(safe-area-inset-bottom); }
	html.sg-lock, html.sg-lock body { overflow: hidden; }
}
@media (max-width: 360px) { .sg-launch { padding: 9px 14px; font-size: 14px; } }
@media (prefers-reduced-motion: no-preference) { .sg-live .sg-head strong::after { content: ' ●'; color: #e5484d; animation: sg-pulse 1.6s infinite; } }
@keyframes sg-pulse { 50% { opacity: .25; } }
