/* Free conversation (public/chat.js). Uses the variables from style.css. */
.chat-setup { display: grid; gap: 14px; }
.chat-setup > p { margin: 0; line-height: 1.4; }
.chat-setup fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 4px; }
.chat-setup legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.chat-setup .check { margin: 0; min-height: 36px; }
.chat-meta { margin: 0 0 4px; }
.chat-mode { grid-template-columns: auto 1fr; align-items: center; font-weight: 400; color: var(--muted); }
.chat-mode select { min-height: 40px; padding: 6px 10px; }

/* The correction card sits right under the learner's line and stays quiet. */
.correction {
  align-self: flex-end;
  max-width: 85%;
  margin-top: -2px;
  padding: 8px 12px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--surface);
  display: grid;
  gap: 2px;
  font-size: 0.95rem;
}
.chat-summary .correction { max-width: none; margin: 8px 0 0; }
.correction .en { margin: 0; font-weight: 600; color: var(--accent); }
.correction small { color: var(--muted); }
.correction-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.correction .badge { background: var(--bg); border: 1px solid var(--border); color: var(--muted); }
.save-phrase { display: inline-flex; align-items: center; gap: 8px; }
button.small-button { min-height: 40px; padding: 4px 10px; font-size: 0.9em; }
.chat-summary .tiles { margin-bottom: 4px; }
.chat-summary .coach-part > .save-phrase { margin-top: 10px; }

/* Kecání ladder: tiers from textbook English to accents, noise and phone (src/memory/unlocks.js). */
.chat-tier { margin: 18px 0 6px; }
.chat-tier-head { display: flex; align-items: center; gap: 12px; margin: 0 2px 8px; }
.chat-tier-head strong { display: block; font-family: var(--font-heading, inherit); font-size: 1.1rem; }
.chat-tier-no { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--color-on-primary, #fff); background: var(--color-primary, #ff6b4a); box-shadow: 0 3px 0 var(--color-primary-edge, #d9502f); }
.chat-tier.locked .chat-tier-no { background: var(--color-line, #e6dccb); color: var(--color-ink-soft, #667); box-shadow: 0 3px 0 var(--color-line-strong, #cfc2aa); }
.chat-people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px 10px; }
.chat-person { position: relative; display: grid; justify-items: center; gap: 6px; padding: 10px 4px 8px; border-radius: var(--radius-lg, 18px); color: inherit; text-decoration: none; transition: transform .12s ease; }
a.chat-person:active { transform: scale(.95); }
.chat-avatar { position: relative; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; font-weight: 800; background: var(--color-secondary-soft, #d8f5f1); box-shadow: 0 4px 0 var(--color-line, #e6dccb); }
.chat-avatar img { width: 100%; height: 100%; border-radius: 50%; }
.chat-name { font-weight: 800; font-size: 1rem; text-align: center; }
.chat-flag { position: absolute; right: -2px; bottom: -2px; font-size: 20px; line-height: 1; }
.chat-remembers { position: absolute; top: 4px; right: 10px; font-size: 16px; }
.chat-person.is-locked .chat-avatar img { filter: grayscale(1) opacity(.55); }
.chat-person.is-locked .chat-name { color: var(--color-ink-soft, #667); }
.chat-lock { position: absolute; inset: 0; margin: auto; color: var(--color-ink, #1f2a44); background: var(--color-surface, #fff); border-radius: 50%; padding: 6px; width: 34px; height: 34px; box-shadow: 0 2px 0 var(--color-line, #e6dccb); }
.chat-head-avatar { width: 52px; height: 52px; border-radius: 50%; flex: none; box-shadow: 0 3px 0 var(--color-line, #e6dccb); }
