/* TLL app depiction: the real Toddler Language Learning app, drawn live for the editable flat frame
   and the iPhone Duo's screens. Its own look, never the host's: values from
   depictions/tll-app/README.md and the captures. Scoped to [data-depiction="tll-app"]. */
@font-face {
  font-family: "Nunito";
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
  src: url("fonts/Nunito-Variable.woff2") format("woff2");
}
[data-depiction="tll-app"] {
  --tll-ink: #2b2b2b;
  --tll-second: #80776d;
  --tll-arrow: #fbf4ee;
  --tll-speak: #ffd43b;
  position: absolute; inset: 0; overflow: hidden;
  background: var(--tll-bg, #ffe8d1);
  color: var(--tll-ink);
  font-family: "Nunito", "SF Pro Rounded", ui-rounded, system-ui, sans-serif;
  letter-spacing: 0; line-height: 1;
}
.tll-split { display: flex; }
.tll-pane { position: relative; flex: 1 1 0; min-width: 0; height: 100%; container-type: size; }
.tll-single { container-type: size; }
.tll-card {
  position: absolute; left: 50%; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 11%; overflow: hidden; background: #fff;
}
.tll-card img { width: 100%; height: 100%; object-fit: cover; }
.tll-words { position: absolute; left: 4cqw; right: 4cqw; display: grid; justify-items: center; text-align: center; }
.tll-word { font-weight: 900; letter-spacing: -0.01em; outline: none; border-radius: 4px; overflow-wrap: anywhere; }
.tll-second { font-weight: 700; color: var(--tll-second); outline: none; border-radius: 3px; }
.tll-bar { position: absolute; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; }
.tll-bar > * {
  -webkit-appearance: none; appearance: none; border: 0; padding: 0; margin: 0; font: inherit; color: var(--tll-ink);
  display: grid; place-items: center; border-radius: 50%; aspect-ratio: 1;
  box-shadow: 0 1.2cqw 2.6cqw rgb(43 43 43 / 0.12);
}
.tll-bar .tll-arrow { background: var(--tll-arrow); }
.tll-bar .tll-speak { background: var(--tll-speak); }
.tll-bar svg { width: 44%; height: 44%; }
.tll-cog { position: absolute; color: #8a8178; }
.tll-cog svg { width: 100%; height: 100%; }

/* Picture pane (left half of the Duo) */
.tll-pane--pic .tll-card { top: 50%; width: min(78cqw, 70cqh); transform: translate(-50%, -50%); }
/* Word pane (right half of the Duo) */
.tll-pane--word .tll-words { top: 30cqh; gap: 3.5cqh; }
.tll-pane--word .tll-word { font-size: min(19cqw, 15cqh); }
.tll-pane--word .tll-second { font-size: min(8cqw, 6.4cqh); }
.tll-pane--word .tll-bar { bottom: 11cqh; padding: 0 9cqw; }
.tll-pane--word .tll-arrow { width: 19cqw; }
.tll-pane--word .tll-speak { width: 27cqw; }
.tll-pane--word .tll-cog { top: 6cqw; right: 6cqw; width: 7cqw; height: 7cqw; }
/* One screen (the Duo's cover screen) */
.tll-single .tll-card { top: 15cqh; width: 64cqw; }
.tll-single .tll-words { top: 63cqh; gap: 2cqh; }
.tll-single .tll-word { font-size: 13cqw; }
.tll-single .tll-second { font-size: 6cqw; }
.tll-single .tll-bar { bottom: 5cqh; padding: 0 9cqw; }
.tll-single .tll-arrow { width: 15cqw; }
.tll-single .tll-speak { width: 21cqw; }
.tll-single .tll-cog { top: 5.5cqw; right: 5.5cqw; width: 6cqw; height: 6cqw; }

.is-speaking .tll-speak { animation: tll-speak .9s ease-out; }
@keyframes tll-speak {
  0% { box-shadow: 0 0 0 0 rgb(255 212 59 / .7), 0 1.2cqw 2.6cqw rgb(43 43 43 / .12); transform: scale(1); }
  30% { transform: scale(1.06); }
  100% { box-shadow: 0 0 0 6cqw rgb(255 212 59 / 0), 0 1.2cqw 2.6cqw rgb(43 43 43 / .12); transform: scale(1); }
}

/* Editing affordances in the flat frame: Figma's own blue text hover and focus. */
[data-src] [contenteditable] { cursor: text; }
[data-src] [contenteditable]:hover { box-shadow: 0 0 0 1px #0d99ff; }
[data-src] [contenteditable]:focus { box-shadow: 0 0 0 1.5px #0d99ff; }
[data-src] .tll-bar > * { cursor: pointer; }


/* Real captures inside the phones. */
[data-depiction="tll-app"] .cap { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #ffe8d1; }
.cap-pair[data-depiction="tll-app"] { position: absolute; inset: 0; display: flex; background: #ffe8d1; }
.cap-pair[data-depiction="tll-app"] img { flex: 1; min-width: 0; height: 100%; object-fit: cover; }

@media (prefers-reduced-motion: reduce) { .is-speaking .tll-speak { animation: none; } }
