/* «Навчи жителя» (teach.md): префікс .tc-. Блок «мовця» над вправою (.ex-speaker, §6.1) малює app.js (F-02);
   його стилі — тут, щоб F-05 не правив styles.css. Решта (.tc-offer, .tc-said, .tc-thanks, .tc-gift…) — F-05. */
.ex-speaker { display: flex; align-items: flex-end; gap: 10px; margin: 0 0 12px; }
.ex-speaker-art { flex: none; width: 56px; height: 70px; }
.ex-speaker-art svg { display: block; width: 100%; height: 100%; }
.ex-speaker-say {
  position: relative; flex: 1; min-width: 0; min-height: 56px; padding: 8px 14px 10px; overflow-wrap: anywhere;
  background: var(--bg2); border: 2px solid #3b2f2a; border-radius: 16px;
}
/* Хвостик бульбашки — у бік жителя */
.ex-speaker-say::before, .ex-speaker-say::after {
  content: ""; position: absolute; left: -12px; bottom: 20px; border: 6px solid transparent; border-right-width: 12px; border-left-width: 0;
}
.ex-speaker-say::before { border-right-color: #3b2f2a; }
.ex-speaker-say::after { left: -8px; border-right-color: var(--bg2); }
.ex-speaker-name { display: block; font-size: 12px; font-weight: 800; color: var(--label2); }
.ex-speaker-line { margin: 2px 0 0; font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--label); }
.ex-speaker[data-mood="happy"] .ex-speaker-art { animation: exSpeakerHop .3s var(--ease) 1; }
@keyframes exSpeakerHop { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .ex-speaker[data-mood="happy"] .ex-speaker-art { animation: none; } }
@media (min-width: 701px) {
  .ex-speaker-art { width: 72px; height: 90px; }
  .ex-speaker-line { font-size: 17px; }
}
/* Позначка «думка жителя» на варіанті / клітинці: місце й розмір; вигляд уточнює F-05 */
.card:has(> .tc-said), .opt:has(> .tc-said), .sq:has(> .tc-said) { position: relative; }
.tc-said { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; pointer-events: none; }
.sq .tc-said { top: 3px; right: 3px; width: 22px; height: 22px; }
/* Позначка думки: голова жителя в кружечку (§6.3); не зменшує зону варіанта */
.tc-said { display: grid; place-items: center; border-radius: 50%; background: var(--bg2); box-shadow: 0 0 0 2px #3b2f2a; overflow: hidden; z-index: 1; }
.tc-said svg { display: block; width: 100%; height: 100%; }

/* ---------- Картка пропозиції в «Справах» (§3.2) ---------- */
.tc-offer {
  display: grid; grid-template-columns: 48px 1fr; column-gap: 12px; align-items: start; padding: 12px 14px; border-radius: 20px;
  background: #fffaf1; color: var(--label); box-shadow: inset 0 0 0 1.5px rgba(90, 60, 30, .14), 0 2px 0 rgba(90, 60, 30, .08);
  transition: opacity .15s;
}
.tc-offer.tc-out { opacity: 0; }
.tc-offer-av { position: relative; width: 48px; height: 60px; display: block; }
.tc-offer-av::before {
  content: ""; position: absolute; left: -2px; top: 6px; width: 52px; height: 52px; border-radius: 50%;
  background: var(--rc, #e8913a); opacity: .18;
}
.tc-offer-av svg { position: relative; display: block; width: 48px; height: 60px; }
.tc-offer-txt { min-width: 0; }
.tc-offer-txt b { display: block; font-size: 15px; font-weight: 800; line-height: 1.3; }
.tc-offer-txt p { margin: 2px 0 4px; font-size: 15px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.tc-offer-txt small { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: #7a6553; }
.tc-offer-txt small svg { flex: none; width: 14px; height: 14px; }
.tc-offer-acts { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 10px; }
.tc-offer-acts .btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 0; width: auto; }
.tc-offer-acts .tc-go { flex: 1; background: #b4532e; color: #fff; }
.tc-offer-acts .tc-go svg { width: 18px; height: 18px; }
.tc-offer-acts .tc-later { flex: none; padding: 0 16px; }
.tc-offer .btn:focus-visible, .tc-museum:focus-visible, .tc-gift .btn:focus-visible, .tc-gift-x:focus-visible { outline: 3px solid #3b2a1e; outline-offset: 3px; }
.tl-errands + .tc-offer, .tm-review + .tc-offer, .tc-offer + * { margin-top: 10px; }

/* ---------- Кнопка в картці експоната музею (§5) ---------- */
.mu-act .tc-museum { min-height: 48px; margin-top: 8px; font-size: 15px; font-weight: 800; }
.tc-museum-av { flex: none; width: 28px; height: 35px; display: block; }
.tc-museum-av svg { display: block; width: 100%; height: 100%; }

/* ---------- «Дякую!» на екрані результату (§7.1) ---------- */
.tc-thanks { width: 100%; max-width: 480px; margin: 8px auto 0; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.tc-thanks-row { display: flex; align-items: flex-end; gap: 10px; }
.tc-thanks-art { flex: none; width: 80px; height: 100px; display: block; }
.tc-thanks-art svg { display: block; width: 100%; height: 100%; }
.tc-thanks-say .ex-speaker-line { font-size: 16px; }
.tc-heart { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; color: var(--label); }
.tc-heart-ic { color: #e8584f; font-size: 16px; }
.tc-gift-row {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px;
  background: rgba(90, 60, 30, .08); font-size: 14px; font-weight: 800; color: var(--label); line-height: 1.35;
}
.tc-gift-ic { flex: none; width: 56px; height: 56px; display: block; }
.tc-gift-ic svg { display: block; width: 100%; height: 100%; }
@media (min-width: 701px) {
  .tc-thanks-art { width: 96px; height: 120px; }
}

/* ---------- Лист подарунка на вулиці (§7.2) ---------- */
.tc-gift { position: relative; text-align: center; padding: 14px 16px 16px; width: 560px; max-width: calc(100% - 20px); }
.tc-gift-x { position: absolute; top: 10px; right: 10px; width: 48px; height: 48px; display: grid; place-items: center; }
.tc-gift-x svg { width: 16px; height: 16px; }
.tc-gift-hero { display: flex; align-items: flex-end; justify-content: center; gap: 16px; margin: 18px auto 8px; }
.tc-gift-who { width: 72px; height: 90px; display: block; }
.tc-gift-item { width: 96px; height: 96px; display: block; transform-origin: 50% 100%; animation: tcGiftPop .45s var(--ease, ease) .2s both; }
.tc-gift-who svg, .tc-gift-item svg { display: block; width: 100%; height: 100%; overflow: visible; }
@keyframes tcGiftPop { 0% { transform: scale(0); } 70% { transform: scale(1.1); } 100% { transform: scale(1); } }
.tc-gift h2 { margin: 4px 0 4px; font-size: 22px; font-weight: 800; outline: none; text-wrap: balance; }
.tc-gift-sub { margin: 0 0 14px; font-size: 16px; color: #7a6553; line-height: 1.4; }
.tc-gift .tc-gift-place { min-height: 56px; background: #b4532e; color: #fff; }
.tc-gift .tc-gift-later { min-height: 48px; margin-top: 8px; }
@media (max-width: 400px) { .tc-gift { width: 340px; } }
html.no-motion .tc-gift-item, html.no-motion .tc-offer, html.no-motion .tc-thanks * { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { .tc-gift-item, .tc-offer { animation: none !important; transition: none !important; } }
html.no-motion .ex-speaker[data-mood="happy"] .ex-speaker-art { animation: none; }
