/* Pronunciation Lab 1.1.12 — experiência no celular.
   Carregado depois de pronunciation.css. Só age em telas de até 900px. */

.gfpl-sheet-bar,.gfpl-sheet-backdrop{display:none}

@media (max-width:900px){

  /* ---------- Abas e sotaque: maiores e presas no topo ao rolar a tabela ---------- */
  html body .gfp-pronunciation .gfpl-controls-row{
    position:sticky!important;top:0;z-index:40;
    display:grid!important;grid-template-columns:1fr;gap:6px!important;
    margin:0 -4px 14px!important;padding:8px!important;
    background:rgba(245,248,255,.94);
    -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
    border:1px solid #dfe7f5;border-radius:16px;
    box-shadow:0 8px 24px rgba(10,35,90,.08);
  }
  html body.admin-bar .gfp-pronunciation .gfpl-controls-row{top:0}
  html body .gfp-pronunciation .gfpl-controls-row{transition:opacity .2s ease,transform .2s ease}
  html body .gfp-pronunciation .gfpl-controls-row.gfpl-controls-past{opacity:0;transform:translateY(-8px);pointer-events:none}
  html body .gfp-pronunciation .gfpl-controls-row .gfpl-type-tabs,
  html body .gfp-pronunciation .gfpl-controls-row .gfpl-accent-switch{
    display:grid!important;width:100%!important;margin:0!important;gap:4px!important;padding:4px!important;
    order:initial!important;
  }
  html body .gfp-pronunciation .gfpl-controls-row .gfpl-type-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}
  html body .gfp-pronunciation .gfpl-controls-row .gfpl-accent-switch{grid-template-columns:1fr 1fr}
  html body .gfp-pronunciation .gfpl-controls-row .gfpl-type-tabs button,
  html body .gfp-pronunciation .gfpl-controls-row .gfpl-accent-switch button{
    min-height:42px;padding:8px 6px!important;font-size:13px!important;line-height:1.15;
    display:flex;align-items:center;justify-content:center;text-align:center;white-space:nowrap;
    -webkit-tap-highlight-color:transparent;
  }

  /* ---------- Tabela: toque mais confortável ---------- */
  html body .gfp-pronunciation .sound-btn{min-height:84px;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
  html body .gfp-pronunciation .sound-btn:active{transform:scale(.97)}
  .gfp-pronunciation .gfpl-chart-instructions::before{content:"👆 ";}

  /* ---------- Painel "Explore this sound" como bottom sheet ---------- */
  html body .gfp-pronunciation .gfpl-main-layout .detail-card[data-gfpl-sheet]{
    position:fixed!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;
    width:auto!important;max-width:none!important;margin:0!important;
    max-height:min(86vh,760px);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
    padding:0 16px calc(20px + env(safe-area-inset-bottom))!important;
    border-radius:24px 24px 0 0!important;border:0!important;
    background:#fff!important;
    box-shadow:0 -18px 50px rgba(6,18,46,.30)!important;
    z-index:100002;
    transform:translateY(105%);visibility:hidden;
    transition:transform .34s cubic-bezier(.2,.75,.2,1),visibility 0s linear .34s;
  }
  html.gfpl-sheet-open body .gfp-pronunciation .gfpl-main-layout .detail-card[data-gfpl-sheet]{
    transform:none;visibility:visible;
    transition:transform .34s cubic-bezier(.2,.75,.2,1),visibility 0s;
  }
  .gfpl-sheet-bar{
    display:flex;align-items:center;justify-content:flex-end;position:sticky;top:0;z-index:2;
    margin:0 -16px 6px;padding:14px 12px 8px;background:#fff;border-radius:24px 24px 0 0;
  }
  .gfpl-sheet-handle{position:absolute;left:50%;top:7px;width:44px;height:5px;margin-left:-22px;border-radius:9px;background:#d5ddec}
  .gfpl-sheet-close{
    display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:8px 14px;
    border:1px solid #dbe4f3;border-radius:999px;background:#f3f6fc;color:#0c2a6b;
    font:700 13px/1 Inter,system-ui,sans-serif;cursor:pointer;
  }
  .gfpl-sheet-close span{font-size:15px}
  .gfpl-sheet-close:focus-visible{outline:3px solid #2563ff;outline-offset:2px}
  .gfpl-sheet-backdrop{
    display:block;position:fixed;inset:0;z-index:100001;background:rgba(6,18,46,.48);
    opacity:0;pointer-events:none;transition:opacity .25s ease;
  }
  html.gfpl-sheet-open .gfpl-sheet-backdrop{opacity:1;pointer-events:auto}
  html.gfpl-sheet-open,html.gfpl-sheet-open body{overflow:hidden}

  /* Dentro do painel: símbolo um pouco menor e botões de áudio lado a lado */
  html body .gfp-pronunciation .detail-card[data-gfpl-sheet] .detail-symbol{font-size:clamp(52px,16vw,74px)}
  html body .gfp-pronunciation .detail-card[data-gfpl-sheet] .gfpl-sound-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  html body .gfp-pronunciation .detail-card[data-gfpl-sheet] .gfpl-sound-actions .btn{min-height:48px;margin:0;width:100%}
  html body .gfp-pronunciation .detail-card[data-gfpl-sheet] .detail-examples button{min-height:42px}
}

@media (max-width:900px) and (prefers-reduced-motion:reduce){
  html body .gfp-pronunciation .gfpl-main-layout .detail-card[data-gfpl-sheet],
  .gfpl-sheet-backdrop{transition:none!important}
  html body .gfp-pronunciation .sound-btn:active{transform:none}
}
