/* =========================================================
   AUDIÇÃO APP — ESTILO GERAL
========================================================= */
#audicao-app,
#audicao-app * { box-sizing: border-box; }

#audicao-app{
  --ink:#121416;
  --muted:#66707a;
  --line:#e7ebef;
  --panel:#f7f9fb;
  --accent:#12B3B6;
  --accent2:#F5C84C;
  --radius:16px;
  --shadow:0 10px 30px rgba(0,0,0,.07);

  color:var(--ink);
  background:transparent;
  margin:0 auto;
  max-width:1400px;
  padding:16px;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;

  /* DESKTOP / PROJEÇÃO */
  font-size:20px;
}

/* ============================================================
   TOC — BOTÃO
============================================================ */
#audicao-app #toc-btn{
  position:fixed;
  top:24px;
  left:24px;
  z-index:99998;

  width:40px;
  height:40px;

  background:var(--panel);
  color:var(--ink);
  font-size:24px;

  border:2px solid var(--accent);
  border-radius:12px;
  cursor:pointer;

  box-shadow:var(--shadow);
  transition:background .25s ease, color .25s ease;

  display:flex;
  align-items:center;
  justify-content:center;
}

#audicao-app #toc-btn:hover{
  background:var(--accent);
  color:#fff;
}

/* ============================================================
   TOC — PAINEL LATERAL
============================================================ */
#audicao-app .toc{
  position:fixed;
  top:50px;
  left:70px;
  width:550px;
  height:90vh;
  border-radius:12px;
	font-size: 0.95rem;

  background:var(--panel);
  border-right:3px solid var(--accent);
  box-shadow:0 0 40px rgba(0,0,0,.08);

  padding:28px 22px;
  overflow-y:auto;
  z-index:99997;

  transform:translateX(-100%);
  opacity:0;
  pointer-events:none;

  transition:opacity .25s ease, transform .25s ease;
}

#audicao-app .toc.open{
  transform:translateX(0);
  opacity:1;
  pointer-events:auto;
}

/* ============================================================
   TOC — LISTA
============================================================ */
#audicao-app #tocList{
  display:flex;
  flex-direction:column;
  gap:8px;
}

#audicao-app #tocList a{
  display:flex;
  align-items:center;
  gap:10px;

  text-decoration:none;
  color:var(--ink);

  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  padding:8px 10px;

  transition:border-color .2s ease, background .2s ease, transform .15s ease;
}

#audicao-app #tocList a:hover{
  border-color:var(--accent);
  background:#f4fefe;
  transform:translateX(1px);
}

#audicao-app #tocList a[aria-current="true"]{
  border-color:var(--accent);
  background:#e9fbfc;
}

#audicao-app #tocList .num{
  min-width:24px;
  height:24px;
  display:inline-grid;
  place-items:center;
  border-radius:8px;
  background:var(--accent2);
  color:#212529;
  font-weight:800;
  font-size:11px;
}

/* =========================================================
   TOC — PESQUISA
========================================================= */
#audicao-app .toc input[type="search"]{
  width:100%;
  font-size:18px;
  line-height:1.3;
  height:44px;
  padding:10px 14px;
  margin-bottom:16px;
  border-radius:12px;
  border:1px solid var(--line);
  color:var(--ink);
  background:#fff;
}

#audicao-app .toc input[type="search"]::placeholder{
  font-size:16px;
  color:var(--muted);
}

#audicao-app .toc input[type="search"]:focus{
  outline:none;
  border-color:var(--accent);
}

/* =========================================================
   CONTEÚDO PRINCIPAL
========================================================= */
#audicao-app .content{
  display:flex;
  flex-direction:column;
  gap:18px;
  max-width:1200px;
  margin:0 auto;
}

#audicao-app .card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}

#audicao-app .head{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  background:linear-gradient(#fff,#fafcfd);
  border-bottom:1px solid var(--line);
}

#audicao-app .badge{
  background:var(--accent2);
  color:#212529;
  font-weight:800;
  border-radius:10px;
  padding:4px 10px;
  font-size:12px;
}

/* =========================================================
   BODY — TEXTO E COMPOSIÇÃO
========================================================= */
#audicao-app .body{
  padding:16px;
  display:grid;
  gap:14px;
}

#audicao-app .body p{
  font-size:1.1em;
  line-height:1.6;
  margin:0 0 10px;

  text-align: justify;
  text-justify: inter-word;

  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;

  word-break: normal;
  overflow-wrap: break-word;
}

/* =========================================================
   LINKS — TEXTO CORRIDO (SUAVES / ACADÉMICOS)
========================================================= */
#audicao-app .body a{
  color:#0f7f82;
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:2px;

  transition:color .2s ease;
}

#audicao-app .body a:hover{
  color:var(--accent);
}

/* =========================================================
   TÍTULO — PROPORCIONAL AO TEXTO (JSON SAFE)
========================================================= */
#audicao-app .card h3{
  font-size:1.3em;
  line-height:1.25;
  margin:0;
}

#audicao-app .card h4{
  font-size:1.3em;
  font-weight:800;
  line-height:1.25;

  margin:32px 0 16px;
  padding:6px 0 6px 14px;

  border-left:5px solid var(--accent);
  background:linear-gradient(
    to right,
    rgba(18,179,182,0.08),
    transparent 70%
  );

  color:var(--ink);
  border-radius:4px;
}

/* =========================================================
   CITAÇÃO INLINE
========================================================= */
#audicao-app .quote{
  font-style:italic;
  color:var(--ink);

  padding:2px 6px;
  margin:0 2px;

  background:linear-gradient(
    to right,
    rgba(245,200,76,0.18),
    rgba(245,200,76,0.05)
  );

  border-radius:6px;
  box-decoration-break:clone;
  -webkit-box-decoration-break:clone;

  position:relative;
}

#audicao-app .quote::before{
  content:"“";
  color:var(--accent2);
  font-weight:700;
  margin-right:2px;
}

#audicao-app .quote::after{
  content:"”";
  color:var(--accent2);
  font-weight:700;
  margin-left:2px;
}

/* =========================================================
   MEDIA — VÍDEOS
========================================================= */
#audicao-app .media-video{
  display:flex;
  justify-content:center;
  margin:18px 0;
}

#audicao-app iframe.frame{
  width:100%;
  max-width:720px;
  aspect-ratio:16 / 9;
  border-radius:14px;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}

/* =========================================================
   MEDIA — IMAGENS
========================================================= */
#audicao-app .body img{
  display:block;
  margin:18px auto;
  width:100%;
  max-width:720px;
  height:auto;
  border-radius:14px;
  box-shadow:var(--shadow);
  cursor:zoom-in;
  transition:transform .25s ease, box-shadow .25s ease;
}

/* =========================================================
   MEDIA — FIGURE (IMAGENS COM LEGENDA)
========================================================= */
#audicao-app figure{
  margin:18px auto;
  max-width:720px;
}

#audicao-app figure img{
  display:block;
  width:100%;
  height:auto;
  border-radius:14px;
  box-shadow:var(--shadow);
}

#audicao-app figure figcaption{
  margin-top:10px;
  font-size:.9em;
  color:var(--muted);
  text-align:center;
  font-style:italic;
}

/* =========================================================
   MEDIA — ABC
========================================================= */

#audicao-app figure.abc-figure{
  width:100%;
  max-width:1000px;
  margin:24px auto;
}

#audicao-app .abc-paper{
  width:100%;
}

#audicao-app .abc-paper svg{
  display:block;
  width:100%;
  height:auto;
}


#audicao-app figure.abc-figure figcaption{
  margin-top:10px;
  font-size:.9em;
  color:var(--muted);
  max-width:none;
  width:100%;
}

/* =========================================================
   TABELAS — ANÁLISE / FORMA / AUDIÇÃO
========================================================= */
#audicao-app table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  margin:22px 0;

  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  box-shadow:var(--shadow);

  overflow:hidden;
}

/* CABEÇALHO */
#audicao-app table thead th{
  background:linear-gradient(
    to bottom,
    #ffffff,
    #f2f6f8
  );

  font-weight:800;
  font-size:.9em;
  text-align:left;
  color:var(--ink);

  padding:12px 14px;
  border-bottom:2px solid var(--accent);
  vertical-align:bottom;
}

/* CÉLULAS */
#audicao-app table td{
  padding:10px 14px;
  font-size:.95em;
  line-height:1.4;
  vertical-align:top;

  border-bottom:1px solid var(--line);
}

/* ÚLTIMA LINHA */
#audicao-app table tbody tr:last-child td{
  border-bottom:0;
}

/* ZEBRA SUAVE */
#audicao-app table tbody tr:nth-child(even){
  background:#fafcfd;
}

/* PRIMEIRA COLUNA (SECÇÃO / FUNÇÃO) */
#audicao-app table td:first-child{
  font-weight:700;
  color:var(--ink);
  white-space:nowrap;
}

/* COLUNA TONAL / TÉCNICA */
#audicao-app table td:nth-child(3){
  font-weight:600;
  color:var(--accent);
}

/* DESTAQUES SEMÂNTICOS */
#audicao-app table td strong{
  font-weight:800;
  color:var(--ink);
}

#audicao-app table td em{
  font-style:italic;
  color:#000;
}

/* HOVER — DESKTOP */
#audicao-app table tbody tr:hover{
  background:#eef9fb;
}

/* =========================================================
   VARIANTE ANALÍTICA (OPCIONAL)
   usar: <table class=\"analysis\">
========================================================= */
#audicao-app table.analysis td:first-child{
  background:rgba(18,179,182,.08);
  border-right:1px solid var(--line);
}

/* =========================================================
   HOVER IMAGENS — DESKTOP (SÓ EFEITO)
========================================================= */
@media (hover: hover) and (pointer: fine){
  #audicao-app .body img:hover{
    transform:scale(1.04);
    box-shadow:0 14px 36px rgba(0,0,0,.18);
  }
}

/* =========================================================
   TOC — MOBILE
========================================================= */
@media (max-width: 900px){

  /* MOBILE = 16px */
  #audicao-app{
    font-size:16px;
  }

  #audicao-app #toc-btn{ left:12px; }

  #audicao-app .toc{
    position:fixed;
    top:0;
    left:55px;
    width:calc(100% - 55px);
    height:100vh;
    overflow-y:auto;
    overflow-x:hidden;
    -webkit-overflow-scrolling:touch;
    background:var(--panel,#fff);
    border-right:3px solid var(--accent);
    box-shadow:0 0 40px rgba(0,0,0,.18);
    z-index:99999;
    transform:translateX(-100%);
    opacity:0;
    pointer-events:none;
  }

  #audicao-app .toc.open{
    transform:translateX(0);
    opacity:1;
    pointer-events:auto;
  }

  /* =========================================================
     TABELAS — MOBILE
  ========================================================= */
  #audicao-app table{
    display:block;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }

  #audicao-app table thead,
  #audicao-app table tbody,
  #audicao-app table tr{
    display:table;
    width:100%;
  }

  #audicao-app table th,
  #audicao-app table td{
    font-size:.9em;
    white-space:nowrap;
  }
}