/* Help assistant (js/help.js): a round bubble bottom-right and a chat panel above it. */
.hp-bubble {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--primary) 60%, transparent);
  background: var(--primary); color: var(--primary-text, #fff); cursor: pointer;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.35), 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent);
  transition: transform 0.15s;
}
.hp-bubble:hover { transform: translateY(-2px) scale(1.04); }
.hp-bubble[aria-expanded="true"] { transform: scale(0.92); }
.hp-panel {
  position: fixed; right: 18px; bottom: 84px; z-index: 40; width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100vh - 110px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); box-shadow: 0 24px 70px rgb(0 0 0 / 0.5);
}
.hp-panel[hidden] { display: none; }
.hp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.hp-head div { display: flex; flex-direction: column; }
.hp-head span { font-size: 0.8rem; color: var(--muted); }
.hp-close { border: 0; background: transparent; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.hp-close:hover { color: var(--text); background: var(--surface); }
.hp-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.hp-msg { max-width: 88%; padding: 10px 12px; border-radius: 14px; line-height: 1.45; font-size: 0.92rem; }
.hp-msg p { margin: 0 0 6px; }
.hp-msg p:last-child { margin-bottom: 0; }
.hp-bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.hp-you { align-self: flex-end; background: var(--primary); color: var(--primary-text, #fff); border-bottom-right-radius: 4px; }
.hp-actions, .hp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hp-action { border: 0; border-radius: 999px; padding: 6px 12px; background: var(--primary); color: var(--primary-text, #fff); font: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.hp-chip { border: 1px solid var(--border); border-radius: 999px; padding: 5px 10px; background: transparent; color: var(--text); font: inherit; font-size: 0.8rem; cursor: pointer; text-align: left; }
.hp-chip:hover, .hp-action:hover { filter: brightness(1.12); border-color: var(--primary); }
.hp-small { font-size: 0.8rem; color: var(--muted); margin-top: 8px !important; }
.hp-small a { color: var(--primary); }
.hp-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); background: var(--surface); }
.hp-input { flex: 1; min-width: 0; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; }
.hp-input:focus { outline: 2px solid var(--primary); outline-offset: 0; }
.hp-send { border: 0; border-radius: 10px; padding: 0 14px; background: var(--primary); color: var(--primary-text, #fff); cursor: pointer; font-size: 1rem; }
@media (max-width: 520px) { .hp-panel { right: 12px; bottom: 80px; } .hp-bubble { right: 12px; bottom: 12px; } }
@media print { .hp-bubble, .hp-panel { display: none !important; } }

/* "TypingStreak has been updated. Reload" (js/app.js checkForUpdate) */
.update-bar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 16px; border-radius: 999px; background: var(--bg); color: var(--text); border: 1px solid var(--primary);
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.45);
}
