/* Calls from history: the incoming-call card, the open line and the outcome.
   Self-contained (its own tokens) so it looks the same on the live board, on a
   lesson page and on a phone. */
.cl-root { --cl-bg: #170d07; --cl-bg2: #22140b; --cl-ink: #f3e6cc; --cl-ink2: rgba(243, 230, 204, 0.72); --cl-ink3: rgba(243, 230, 204, 0.5); --cl-gold: #d6a34a; --cl-gold-hi: #f0c46c; --cl-rule: rgba(243, 230, 204, 0.16); --cl-red: #a8341f; --cl-green: #4f8f5a; --cl-serif: 'Cormorant Garamond', Georgia, serif; --cl-sans: 'IBM Plex Sans', system-ui, sans-serif; font-family: var(--cl-sans); color: var(--cl-ink); font-variant-numeric: lining-nums; }
.cl-root[hidden] { display: none !important; }
.cl-root--overlay { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: 32px; background: radial-gradient(ellipse at 50% 40%, rgba(15, 8, 4, 0.72), rgba(15, 8, 4, 0.94) 75%); }
.cl-root--inline { display: grid; place-items: center; padding: 0; }
.cl-root--page { position: fixed; inset: 0; z-index: 1400; display: grid; place-items: center; padding: 24px; background: rgba(11, 7, 5, 0.9); }

.cl-card { width: min(640px, 100%); background: linear-gradient(180deg, var(--cl-bg2), var(--cl-bg)); border: 1px solid var(--cl-rule); border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(243, 230, 204, 0.08); padding: 36px 38px 30px; text-align: center; animation: cl-in 0.35s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
@keyframes cl-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.cl-kicker { margin: 0 0 10px; font: 600 12px var(--cl-sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--cl-gold); }
.cl-name { margin: 0 0 6px; font: 600 clamp(30px, 3.4vw, 46px)/1.05 var(--cl-serif); letter-spacing: -0.005em; text-wrap: balance; }
.cl-role { margin: 0 0 4px; font-size: 16px; color: var(--cl-ink2); }
.cl-place { margin: 0 0 22px; font-size: 14px; color: var(--cl-ink3); }
.cl-place i { color: var(--cl-gold); margin-right: 4px; }
.cl-hint { margin: 16px 0 0; font-size: 14px; line-height: 1.5; color: var(--cl-ink3); text-wrap: balance; }
.cl-note { margin: 0; font-size: 14px; color: #f0c46c; }

.cl-bell { display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 50%; background: var(--cl-green); color: #fff; font-size: 34px; box-shadow: 0 0 0 0 rgba(79, 143, 90, 0.55); }
.cl-bell.is-ringing { animation: cl-ring 1.1s ease-in-out infinite; }
@keyframes cl-ring { 0%, 100% { transform: rotate(0); box-shadow: 0 0 0 0 rgba(79, 143, 90, 0.55); } 10% { transform: rotate(-14deg); } 20% { transform: rotate(12deg); } 30% { transform: rotate(-10deg); } 40% { transform: rotate(8deg); } 50% { transform: rotate(0); box-shadow: 0 0 0 22px rgba(79, 143, 90, 0); } }
@media (prefers-reduced-motion: reduce) { .cl-bell.is-ringing { animation: none; } .cl-card { animation: none; } }

.cl-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.cl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 26px; border: 0; border-radius: 14px; font: 800 14px/1 var(--cl-sans); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; transition: transform 0.08s, filter 0.15s; }
.cl-btn:active { transform: translateY(3px); }
.cl-btn:disabled { opacity: 0.6; cursor: default; }
.cl-btn--answer { background: var(--cl-green); color: #fff; box-shadow: 0 5px 0 #2f5c38; }
.cl-btn--decline, .cl-btn--hangup { background: var(--cl-red); color: #fff; box-shadow: 0 5px 0 #6a1d10; }
.cl-btn--close { background: var(--cl-gold-hi); color: #2a1604; box-shadow: 0 5px 0 #8a5c1c; }
.cl-btn i { font-size: 17px; }

.cl-card--live { text-align: left; padding: 26px 30px 22px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: min(78vh, 720px); }
.cl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--cl-rule); }
.cl-head .cl-name { font-size: clamp(26px, 2.6vw, 36px); }
.cl-meter { display: grid; justify-items: end; gap: 8px; }
.cl-timer { font: 500 15px var(--cl-sans); color: var(--cl-ink2); font-variant-numeric: tabular-nums; }
.cl-wave { display: inline-flex; align-items: center; gap: 3px; height: 26px; }
.cl-wave i { display: block; width: 4px; height: 6px; border-radius: 2px; background: var(--cl-ink3); transition: height 0.15s; }
.cl-wave.is-speaking i { background: var(--cl-gold-hi); animation: cl-bar 0.9s ease-in-out infinite; }
.cl-wave.is-speaking i:nth-child(2) { animation-delay: 0.12s; } .cl-wave.is-speaking i:nth-child(3) { animation-delay: 0.24s; } .cl-wave.is-speaking i:nth-child(4) { animation-delay: 0.36s; } .cl-wave.is-speaking i:nth-child(5) { animation-delay: 0.48s; }
.cl-wave.is-hearing i { background: #8ec39a; height: 14px; }
@keyframes cl-bar { 0%, 100% { height: 6px; } 50% { height: 24px; } }
.cl-lines { overflow-y: auto; padding: 18px 2px 8px; display: grid; gap: 12px; align-content: start; font-size: 17px; line-height: 1.5; min-height: 160px; }
.cl-line { margin: 0; }
.cl-line b { display: block; font: 600 11px var(--cl-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cl-gold); margin-bottom: 2px; }
.cl-line--caller { font-family: var(--cl-serif); font-size: 22px; line-height: 1.35; }
.cl-line--us b, .cl-line--phone b { color: var(--cl-ink3); }
.cl-line--phone { padding-left: 14px; border-left: 2px solid var(--cl-rule); }
.cl-line.is-partial { opacity: 0.8; }
.cl-line--empty { color: var(--cl-ink3); font-style: italic; }
.cl-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 16px; border-top: 1px solid var(--cl-rule); }
.cl-foot .cl-hint { margin: 0; text-align: left; }
.cl-outcome { margin: 18px 0 24px; padding: 18px 20px; text-align: left; border-top: 1px solid var(--cl-gold); border-bottom: 1px solid var(--cl-rule); }
.cl-outcome span { display: block; font: 600 11px var(--cl-sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--cl-gold); margin-bottom: 8px; }
.cl-outcome p { margin: 0; font-size: 17px; line-height: 1.55; }

@media (max-width: 640px) {
  .cl-root--overlay, .cl-root--page { padding: 12px; }
  .cl-card { padding: 26px 20px 22px; border-radius: 18px; }
  .cl-card--live { padding: 18px 16px 14px; max-height: 86vh; }
  .cl-foot { flex-direction: column; align-items: stretch; }
  .cl-foot .cl-hint { text-align: center; }
  .cl-line--caller { font-size: 19px; }
}
