/* ===== Telefone sem Fio (Atividade aberta numa call) =====
   Herda o topo, os botões, o saguão e as folhas do Império, e o quadro do Rabisco (as
   ferramentas, as cores). O que é só daqui: a mesa de estudo, a fila ligada por um fio
   de telefone, o cartão de caderno (papel pautado com margem) com a tarefa do passo e o
   álbum da revelação. No saguão, um caderno de exemplo vira as páginas sozinho. */
.telefone { --cor: #ff6b6b; --tf-papel: #fdf8ec; --tf-pauta: rgba(80, 130, 220, .18); --tf-tinta: #22304d;
  position: fixed; inset: 0; z-index: 4; overflow: hidden; color: var(--im-marfim); background: #101a30; }
.telefone.em-partida .im-saguao { display: none; }
.tf-fundo { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(90% 60% at 50% 20%, rgba(255, 107, 107, .12), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .02) 0 2px, transparent 2px 14px),
    radial-gradient(130% 90% at 50% 30%, #1c2b4d, #101a30 60%, #0a1122); }

.tf-palco { position: absolute; display: flex; flex-direction: column; gap: 10px; min-height: 0;
  inset: calc(var(--im-pad) + 58px) max(10px, var(--in-right, 0px)) max(10px, var(--in-bottom, 0px)) max(10px, var(--in-left, 0px)); }
.telefone.no-saguao .tf-palco { bottom: calc(var(--tf-baixo, 44%) + 8px); }
body[data-layout="pc"] .telefone.no-saguao .tf-palco { right: calc(360px + 28px + var(--in-right, 0px)); bottom: max(14px, var(--in-bottom, 0px)); }
body[data-layout="pc"] #telefone #tf-saguao { left: auto; width: 360px; right: max(14px, var(--in-right, 0px)); top: calc(var(--im-pad) + 66px); bottom: auto;
  max-height: calc(100% - var(--im-pad) - 80px); margin: 0; overflow-y: auto; padding: 14px; gap: 10px; border-radius: 22px; border: 1px solid rgba(255, 107, 107, .3); }
body[data-layout="pc"] #telefone #tf-saguao::before { display: none; }
.telefone:not(.no-saguao) .tf-vitrine, .telefone:not(.jogando) .tf-cartao, .telefone:not(.revelando) .tf-album { display: none; }

/* ----- a fila: cada um ligado ao vizinho por um fio de telefone ----- */
.tf-fila { flex: none; display: flex; align-items: center; justify-content: safe center; gap: 0; min-height: 66px; padding: 4px 6px;
  overflow-x: auto; scrollbar-width: none; }
.tf-fila::-webkit-scrollbar { display: none; }
.tf-pessoa { flex: none; display: grid; justify-items: center; gap: 2px; width: 58px; border: 0; padding: 0; background: none; color: inherit; font: inherit;
  animation: tf-chega .4s cubic-bezier(.3, 1.5, .5, 1) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes tf-chega { from { transform: scale(.4); opacity: 0; } }
.tf-rosto { position: relative; display: grid; }
.tf-rosto .ava { width: 42px; height: 42px; font-size: 16px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .14), 0 5px 12px -5px #000; transition: box-shadow .25s; }
.tf-pessoa small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 11px var(--im-sans); color: rgba(244, 236, 216, .75); }
.tf-pessoa.feito .ava { box-shadow: 0 0 0 3px #6ee7a8, 0 0 14px rgba(110, 231, 168, .45); }
.tf-pessoa.fora { opacity: .4; }
.tf-pessoa.eu small { color: #ffb3b3; }
.tf-ok { position: absolute; right: -4px; bottom: -3px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font: 900 11px var(--im-sans);
  font-style: normal; color: #123; background: #6ee7a8; box-shadow: 0 2px 4px #000; animation: tf-pop .3s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes tf-pop { from { transform: scale(.3); } }
.tf-coroa { position: absolute; left: 50%; top: -11px; width: 17px; height: 17px; transform: translateX(-50%); color: #ffd34d; filter: drop-shadow(0 2px 3px #000); }
.tf-coroa svg { width: 100%; height: 100%; }
.tf-fio { flex: 0 0 22px; height: 14px; margin-bottom: 18px; opacity: .55;
  background: radial-gradient(circle at 50% 100%, transparent 5px, #ff8f8f 5px 7px, transparent 7px) 0 0 / 10px 14px repeat-x; }
.tf-vaga { cursor: pointer; }
.tf-mais { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 2px dashed var(--cor); color: var(--cor);
  background: rgba(255, 107, 107, .12); animation: tf-chama 1.6s ease-in-out infinite; }
.tf-mais svg { width: 45%; height: 45%; }
.tf-vaga small { color: #ffb3b3; }
@keyframes tf-chama { 50% { box-shadow: 0 0 0 7px rgba(255, 107, 107, .12), 0 0 22px rgba(255, 107, 107, .45); transform: scale(1.06); } }

/* ----- o caderno de exemplo do saguão ----- */
.tf-vitrine { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; }
.tf-ex { position: absolute; display: grid; place-content: center; width: min(78%, 300px); aspect-ratio: 4 / 3; padding: 14px 16px; border-radius: 6px 14px 14px 6px; color: var(--tf-tinta); text-align: center;
  background: linear-gradient(90deg, transparent 22px, rgba(226, 60, 60, .45) 22px 24px, transparent 24px),
    repeating-linear-gradient(180deg, transparent 0 21px, var(--tf-pauta) 21px 22px), var(--tf-papel);
  box-shadow: 0 16px 30px -12px #000; transform: translate(calc(var(--k) * 10px - 20px), calc(var(--k) * 12px - 26px)) rotate(calc(var(--k) * 2.5deg - 4deg));
  animation: tf-ex-entra .5s cubic-bezier(.2, .9, .3, 1.2) both; }
.tf-ex small { display: block; font: 800 10px var(--im-sans); letter-spacing: .14em; text-transform: uppercase; color: #c94a4a; }
.tf-ex b { font: 800 19px/1.25 "Marker Felt", "Chalkboard SE", "Comic Sans MS", var(--im-sans); }
.tf-ex.desenho { padding: 8px; }
.tf-ex.desenho svg { display: block; width: 100%; height: auto; }
.tf-ex.sai { animation: tf-ex-sai .8s ease-in forwards; }
@keyframes tf-ex-entra { from { transform: translate(-60px, 40px) rotate(-14deg); opacity: 0; } }
@keyframes tf-ex-sai { to { transform: translate(80px, -30px) rotate(12deg); opacity: 0; } }

/* ----- o cartão da tarefa ----- */
.tf-cartao { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; width: min(100%, 680px); align-self: center;
  padding: 14px 14px 14px 30px; border-radius: 8px 18px 18px 8px; color: var(--tf-tinta);
  background: linear-gradient(90deg, transparent 18px, rgba(226, 60, 60, .5) 18px 20px, transparent 20px),
    repeating-linear-gradient(180deg, transparent 0 25px, var(--tf-pauta) 25px 26px), var(--tf-papel);
  box-shadow: 0 24px 50px -18px #000, 0 0 0 1px rgba(0, 0, 0, .2); }
.tf-topo-cartao { display: flex; align-items: flex-start; gap: 10px; }
.tf-cabeca { flex: 1; min-width: 0; }
.tf-pedido { display: grid; gap: 2px; }
.tf-pedido small { font: 800 11px var(--im-sans); letter-spacing: .12em; text-transform: uppercase; color: #c94a4a; }
.tf-pedido > b, .tf-frase { font: 800 clamp(19px, 5.4vw, 26px)/1.2 "Marker Felt", "Chalkboard SE", "Comic Sans MS", var(--im-sans); color: var(--tf-tinta); }
.tf-pedido > span:not(:first-child) { font-size: 13.5px; color: rgba(34, 48, 77, .7); }
.tf-pedido > span:first-child { font-size: 26px; }
.tf-tempo { --p: 1; position: relative; flex: none; display: grid; place-items: center; min-width: 58px; height: 30px; padding: 0 10px; border-radius: 99px; overflow: hidden;
  font: 800 14px var(--im-sans); font-variant-numeric: tabular-nums; color: #fff; background: #2b3a5c; }
.tf-tempo i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p) * 100%); background: #3f6fd6; transition: width .25s linear; }
.tf-tempo b { position: relative; }
.tf-tempo.urgente i { background: #e23c3c; }
.tf-tempo[hidden] { display: none; }
.tf-quadro { flex: 1; min-height: 0; display: grid; place-items: center; container-type: size; }
.tf-quadro[hidden] { display: none; }
.tf-tela { display: block; width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); border-radius: 10px; touch-action: none; cursor: crosshair;
  background: #fbf6ea; box-shadow: 0 0 0 2px rgba(34, 48, 77, .25), 0 10px 22px -12px rgba(0, 0, 0, .6); }
.tf-quadro.so-ver .tf-tela, .telefone.feito .tf-tela { cursor: default; }
.tf-ferramentas { display: grid; gap: 6px; }
.tf-ferramentas[hidden] { display: none; }
.tf-linha-ferr { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tf-ferramentas .rb-ferr { color: var(--tf-tinta); background: rgba(34, 48, 77, .08); }
.tf-ferramentas .rb-ferr.on { color: #fff; background: var(--tf-tinta); }
.tf-ferramentas .rb-div { width: 1px; height: 24px; background: rgba(34, 48, 77, .2); margin: 0 3px; }
.tf-larg { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; cursor: pointer; background: rgba(34, 48, 77, .08); }
.tf-larg i { width: var(--w); height: var(--w); border-radius: 50%; background: var(--tf-tinta); }
.tf-larg.on { background: rgba(34, 48, 77, .25); box-shadow: inset 0 0 0 2px var(--tf-tinta); }
.tf-cores { padding: 2px; }
.tf-escrever { display: flex; gap: 8px; }
.tf-escrever[hidden] { display: none; }
.tf-escrever input { flex: 1; min-width: 0; height: 52px; padding: 0 14px; border: 2px solid rgba(34, 48, 77, .25); border-radius: 12px; outline: none;
  font: 800 19px "Marker Felt", "Chalkboard SE", "Comic Sans MS", var(--im-sans); color: var(--tf-tinta); background: rgba(255, 255, 255, .7);
  -webkit-user-select: text; user-select: text; }
.tf-escrever input:focus { border-color: #3f6fd6; }
.tf-escrever input:disabled { opacity: .7; }
.tf-ideia { flex: none; width: 52px; height: 52px; border: 0; border-radius: 12px; cursor: pointer; font-size: 22px; background: #ffe08a; box-shadow: 0 3px 0 #d9b44a; }
.tf-ideia[hidden] { display: none; }
.tf-acoes { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 48px; }
.tf-btn { height: 46px; padding: 0 22px; border: 0; border-radius: 13px; cursor: pointer; font: 800 15px var(--im-sans); color: var(--tf-tinta);
  background: rgba(34, 48, 77, .1); }
.tf-btn.ouro { flex: 1; max-width: 260px; color: #fff; background: linear-gradient(180deg, #ff8f8f, #e23c3c); box-shadow: 0 6px 16px -6px rgba(226, 60, 60, .9); }
.tf-btn:disabled { opacity: .45; cursor: default; }
.tf-esperando { flex: 1; font: 700 13.5px var(--im-sans); color: #2e8a5a; }
.telefone.jogando[data-tarefa="frase"] .tf-cartao, .telefone.jogando[data-tarefa="chute"] .tf-cartao { justify-content: center; }
.telefone.jogando[data-tarefa="frase"] .tf-cartao { flex: 0 1 auto; margin: auto 0; }

/* ----- a revelação: o álbum ----- */
.tf-album { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; width: min(100%, 620px); align-self: center; overflow-y: auto; padding: 2px 2px 20px; }
.tf-album-topo { display: grid; justify-items: center; text-align: center; line-height: 1.1; }
.tf-album-topo small { font: 800 10.5px var(--im-sans); letter-spacing: .16em; text-transform: uppercase; color: #ffb3b3; }
.tf-album-topo b { font: 400 clamp(24px, 7vw, 36px) var(--im-deco); }
.tf-paginas-album { display: flex; flex-direction: column; gap: 12px; }
.tf-pagina { position: relative; display: grid; gap: 8px; padding: 12px 14px 12px 28px; border-radius: 6px 16px 16px 6px; color: var(--tf-tinta);
  background: linear-gradient(90deg, transparent 16px, rgba(226, 60, 60, .45) 16px 18px, transparent 18px),
    repeating-linear-gradient(180deg, transparent 0 23px, var(--tf-pauta) 23px 24px), var(--tf-papel);
  box-shadow: 0 14px 28px -14px #000; animation: tf-pagina .5s cubic-bezier(.2, .9, .3, 1.15) both; }
.tf-pagina:nth-child(odd) { transform: rotate(-.6deg); }
.tf-pagina:nth-child(even) { transform: rotate(.5deg); }
@keyframes tf-pagina { from { transform: translateY(26px) rotate(-3deg); opacity: 0; } }
.tf-autor { display: flex; align-items: center; gap: 8px; font: 700 12.5px var(--im-sans); color: rgba(34, 48, 77, .75); }
.tf-autor .ava { width: 26px; height: 26px; font-size: 11px; }
.tf-texto-pag { margin: 0; font: 800 clamp(20px, 5.6vw, 28px)/1.25 "Marker Felt", "Chalkboard SE", "Comic Sans MS", var(--im-sans); }
.tf-texto-pag.auto { color: rgba(34, 48, 77, .5); font-style: italic; }
.tf-desenho { display: grid; place-items: center; }
.tf-desenho canvas { width: min(100%, 420px); aspect-ratio: 1; border-radius: 8px; background: #fbf6ea; box-shadow: 0 0 0 2px rgba(34, 48, 77, .2); }
.tf-vazio { padding: 30px 0; font-style: italic; color: rgba(34, 48, 77, .5); }
.tf-curtir { position: absolute; right: 10px; top: 8px; display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border: 0; border-radius: 99px;
  cursor: pointer; font: 800 13px var(--im-sans); color: var(--tf-tinta); background: rgba(34, 48, 77, .08); }
.tf-curtir.on { background: rgba(226, 60, 60, .14); }
.tf-curtir:disabled { cursor: default; opacity: .6; }
.tf-curtir:not(:disabled):active { transform: scale(.94); }
.tf-premios:empty, .tf-abas:empty { display: none; }
.tf-premios { display: grid; gap: 6px; padding: 12px; border-radius: 14px; background: rgba(255, 224, 138, .1); border: 1px solid rgba(255, 224, 138, .35); }
.tf-premios small { font: 800 10.5px var(--im-sans); letter-spacing: .14em; text-transform: uppercase; color: #ffe08a; }
.tf-premios div { display: grid; font-size: 13px; }
.tf-premios b { color: #ffe08a; }
.tf-abas { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.tf-abas button { height: 34px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 99px; cursor: pointer; font: 700 12.5px var(--im-sans);
  color: var(--im-marfim); background: rgba(255, 255, 255, .06); }
.tf-abas button.on { color: #1d1208; background: #ffe08a; border-color: transparent; }

/* ----- a folha da mesa ----- */
.tf-cfg { --cor: #ff6b6b; border-color: rgba(255, 107, 107, .35); background: radial-gradient(120% 50% at 50% 0%, #2a2f55, #121a30 70%); }
.tf-paginas { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tf-paginas button { display: grid; place-items: center; align-content: center; gap: 2px; height: 62px; }
.tf-paginas button small { font: 600 10.5px var(--im-sans); opacity: .75; }
#tf-aviso { bottom: calc(max(10px, var(--in-bottom, 0px)) + 20px); z-index: 7; background: rgba(16, 26, 48, .92); border: 1px solid rgba(255, 107, 107, .3); }
.telefone:not(.em-partida) #tf-aviso { display: none; }
body[data-layout="pc"] .tf-cartao { width: min(100%, 760px); }
body[data-layout="pc"] .tf-pessoa { width: 66px; }
body[data-layout="pc"] .tf-rosto .ava { width: 48px; height: 48px; }
