/* PELP-CAA — estilos principais */
        :root {
            --col-w: 80px;
            --card-minh: 82px;
            --card-size: 88px;
            --card-h: 88px;
            --emoji-sz: 34px;
            --label-sz: 11px;
            --col-gap: 5px;
        }
        * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            background: #F0F4F8;
            /* As DUAS linhas são necessárias, nesta ordem.
               `dvh` só existe no Safari 15.4+. Num iPad mais antigo a segunda
               linha é DESCARTADA pelo navegador e o body ficava sem altura
               nenhuma — `height: auto`. Daí para baixo a cadeia inteira de
               `flex: 1` perdia referência. As telas comuns sobreviviam porque o
               conteúdo delas está no fluxo e gera altura própria; a arena da
               Etapa 3, cujos filhos são TODOS absolutos, não gera nenhuma e
               colapsava para ~10px — cartões de 28px numa faixa no topo.
               O `vh` fica como piso para quem não tem `dvh`; quem tem ignora a
               primeira linha e usa a segunda, que acompanha a barra do
               navegador ao rolar. */
            height: 100vh;
            height: 100dvh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            /* Não deixa o tabuleiro passar por baixo da barra de navegação do
               Android nem do recorte da câmera. Fora de app instalado esses
               valores são zero, então nada muda no navegador comum. */
            padding-bottom: env(safe-area-inset-bottom, 0px);
            padding-left:   env(safe-area-inset-left, 0px);
            padding-right:  env(safe-area-inset-right, 0px);
        }

        /* Aviso de e-mail não verificado (só telas do profissional) */
        .verify-banner {
            display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
            background: #FFF4E5; border: 1.5px solid #F0A868; border-radius: 12px;
            padding: 10px 14px; margin-bottom: 4px;
            font-size: 13px; line-height: 1.45; color: #8F3419;
        }
        .verify-banner strong { font-weight: 800; }
        .verify-banner button {
            border: none; background: #8F3419; color: #fff; cursor: pointer;
            padding: 7px 14px; border-radius: 9px; font-size: 12.5px; font-weight: 700;
            white-space: nowrap;
        }
        .verify-banner button:active { opacity: .85; }

        /* ── HEADER ── */
        .header {
            background: #1A2E4A;
            /* o azul do cabeçalho preenche a faixa da barra de status */
            padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px;
            display: flex; align-items: center;
            justify-content: space-between; gap: 8px;
            flex-shrink: 0;
        }
        .child-info { display: flex; align-items: center; gap: 8px; }
        .child-avatar {
            width: 30px; height: 30px; border-radius: 50%;
            background: #F39C12; display: flex; align-items: center;
            justify-content: center; font-size: 15px;
        }
        .child-name { color: rgba(255,255,255,0.9); font-size: 13px; font-weight: 600; }
        .mode-toggle {
            display: flex; background: rgba(255,255,255,0.12);
            border-radius: 20px; padding: 3px; gap: 2px;
        }
        .mode-btn {
            padding: 5px 13px; border: none; border-radius: 16px;
            font-size: 12px; cursor: pointer; transition: all 0.2s;
            background: transparent; color: rgba(255,255,255,0.65); font-weight: 600;
        }
        .mode-btn.active { background: white; color: #1A2E4A; }
        .header-right { display: flex; align-items: center; gap: 7px; }
        .stage-badge {
            background: rgba(255,255,255,0.15); color: white;
            padding: 4px 10px; border-radius: 12px;
            font-size: 11px; font-weight: 700; white-space: nowrap;
        }
        .manage-btn {
            width: 30px; height: 30px; border-radius: 50%;
            background: rgba(255,255,255,0.15); border: none;
            color: white; font-size: 14px; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
        }
        .manage-btn.active { background: rgba(255,200,0,0.35); }
        .keyboard-btn {
            display: flex; align-items: center; gap: 5px;
            padding: 5px 11px; border-radius: 16px; border: none;
            background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.85);
            font-size: 12px; font-weight: 600; cursor: pointer;
            transition: background .18s;
        }
        .keyboard-btn:hover { background: rgba(255,255,255,0.25); }
        .keyboard-btn.kb-active { background: rgba(255,255,255,0.92); color: #1A2E4A; }

        /* ══════════════════════════════════════════
           FASE 1 — LOGIN / SESSÃO / INTERLOCUTORES
           ══════════════════════════════════════════ */

        /* Login overlay */
        .login-overlay {
            position:fixed; inset:0;
            background:linear-gradient(160deg,#1A2E4A 0%,#0A1525 100%);
            z-index:2000; display:none; flex-direction:column;
            align-items:center; justify-content:center;
            gap:20px; padding:30px 20px; overflow-y:auto;
        }
        .login-overlay.open { display:flex; }
        .login-logo   { font-size:44px; }
        .login-title  { color:#fff; font-size:20px; font-weight:800; text-align:center; }
        .login-sub    { color:rgba(255,255,255,.5); font-size:13px; text-align:center; margin-top:-12px; }
        .login-grid   {
            display:grid; grid-template-columns:repeat(auto-fill,minmax(110px,1fr));
            gap:10px; width:100%; max-width:540px;
        }
        .login-int-card {
            background:rgba(255,255,255,.08); border-radius:18px; padding:16px 8px;
            display:flex; flex-direction:column; align-items:center; gap:8px;
            cursor:pointer; transition:background .15s; border:2px solid transparent;
        }
        .login-int-card:hover,.login-int-card:active {
            background:rgba(255,255,255,.17); border-color:rgba(255,255,255,.25);
        }
        .login-int-avatar {
            width:60px; height:60px; border-radius:50%;
            display:flex; align-items:center; justify-content:center;
            font-size:26px; overflow:hidden; flex-shrink:0;
        }
        .login-int-avatar img { width:100%; height:100%; object-fit:cover; border-radius:50%; }
        .login-int-name { color:#fff; font-size:13px; font-weight:700; text-align:center; }
        .login-int-role { color:rgba(255,255,255,.45); font-size:11px; text-align:center; }
        .login-no-int   { color:rgba(255,255,255,.5); font-size:13px; text-align:center; line-height:1.7; }

        /* PIN modal */
        .pin-modal {
            position:fixed; inset:0; background:rgba(0,0,0,.8);
            z-index:2100; display:none; flex-direction:column;
            align-items:center; justify-content:center;
        }
        .pin-modal.open { display:flex; }
        .pin-box {
            background:#fff; border-radius:24px; padding:28px 22px;
            width:min(320px,90vw); display:flex; flex-direction:column;
            align-items:center; gap:18px;
        }
        .pin-avatar {
            width:70px; height:70px; border-radius:50%;
            display:flex; align-items:center; justify-content:center;
            font-size:30px; overflow:hidden;
        }
        .pin-avatar img { width:100%; height:100%; object-fit:cover; }
        .pin-name  { font-size:17px; font-weight:800; color:#1A2E4A; }
        .pin-sub   { font-size:12.5px; color:#78909C; text-align:center; line-height:1.4; }

        /* Restrições do cabeçalho por perfil. Usamos classes no <body> com
           !important porque sessionChip, syncChip e forceSyncBtn têm o display
           controlado por JS em outros pontos — inline style perderia a disputa. */
        body.hdr-off-mode     #modeToggle,
        body.hdr-off-vsd      #vsdBtn,
        body.hdr-off-keyboard #keyboardBtn,
        body.hdr-off-session  #sessionChip,
        body.hdr-off-sync     #syncChip,
        body.hdr-off-force    #forceSyncBtn { display: none !important; }

        /* Modal de restrições */
        .hdr-modal { position:fixed; inset:0; background:rgba(16,24,40,.55);
                     display:none; align-items:center; justify-content:center; z-index:9000;
                     padding:18px; }
        .hdr-modal.open { display:flex; }
        .hdr-box { background:#fff; border-radius:18px; padding:20px 22px; width:min(430px,100%);
                   max-height:88vh; overflow:auto; box-shadow:0 18px 50px rgba(0,0,0,.25); }
        .hdr-box h3 { margin:0 0 3px; font-size:17px; color:#1A2E4A; }
        .hdr-box .hdr-sub { margin:0 0 14px; font-size:12.5px; color:#78909C; line-height:1.5; }
        .hdr-row { display:flex; align-items:center; justify-content:space-between; gap:14px;
                   padding:11px 0; border-top:1px solid #F0F4F8; }
        .hdr-row:first-of-type { border-top:0; }
        .hdr-row .lbl { font-size:14px; color:#1A2E4A; font-weight:600; }
        .hdr-row .dsc { font-size:11.5px; color:#78909C; margin-top:1px; line-height:1.4; }
        .hdr-sw { flex:0 0 auto; width:46px; height:27px; border-radius:99px; border:none;
                  background:#CFD8DC; position:relative; cursor:pointer; transition:background .15s; }
        .hdr-sw::after { content:""; position:absolute; top:3px; left:3px; width:21px; height:21px;
                         border-radius:50%; background:#fff; transition:transform .15s; }
        .hdr-sw.on { background:#27AE60; }
        .hdr-sw.on::after { transform:translateX(19px); }
        .hdr-fixo { font-size:11.5px; color:#78909C; background:#F0F4F8; border-radius:10px;
                    padding:10px 12px; margin-top:12px; line-height:1.5; }
        .hdr-close { width:100%; margin-top:14px; padding:12px; border-radius:12px; border:none;
                     background:#1A2E4A; color:#fff; font-weight:700; font-size:14px; cursor:pointer; }
        .pin-dots  { display:flex; gap:14px; }
        .pin-dot   {
            width:15px; height:15px; border-radius:50%;
            border:2.5px solid #90A4AE; background:transparent;
            transition:background .1s, border-color .1s;
        }
        .pin-dot.filled { background:#1A2E4A; border-color:#1A2E4A; }
        .pin-error { color:#E53935; font-size:13px; font-weight:600; display:none; margin-top:-10px; }
        .pin-numpad { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; width:100%; }
        .pin-key {
            aspect-ratio:1.35; border-radius:13px; border:none;
            background:#F0F4F8; color:#1A2E4A; font-size:21px; font-weight:700;
            cursor:pointer; transition:background .1s;
            display:flex; align-items:center; justify-content:center;
        }
        .pin-key:active { background:#D0D8E4; }
        .pin-key.zero   { grid-column:2; }
        .pin-key.del    { background:transparent; color:#90A4AE; font-size:17px; }
        .pin-cancel     {
            background:none; border:none; color:#90A4AE; font-size:13px;
            font-weight:600; cursor:pointer; padding:4px 12px;
        }
        @keyframes pinShake {
            0%,100%{transform:translateX(0)}
            20%{transform:translateX(-7px)}
            40%{transform:translateX(7px)}
            60%{transform:translateX(-4px)}
            80%{transform:translateX(4px)}
        }
        .pin-dots.shake { animation:pinShake .42s ease; }

        /* Session chip (header) */
        .session-chip {
            display:flex; align-items:center; gap:6px;
            padding:3px 10px 3px 3px; border-radius:20px; border:none;
            background:rgba(255,255,255,.14); cursor:pointer;
            transition:background .15s;
        }
        .session-chip:hover { background:rgba(255,255,255,.22); }
        .session-chip-av {
            width:24px; height:24px; border-radius:50%;
            display:flex; align-items:center; justify-content:center;
            font-size:13px; overflow:hidden;
        }
        .session-chip-av img { width:100%; height:100%; object-fit:cover; border-radius:50%; }
        .session-chip-name { color:rgba(255,255,255,.9); font-size:12px; font-weight:700; }
        /* Pending dot on ⚙️ */
        .manage-wrap { position:relative; display:inline-flex; }
        .pending-dot {
            position:absolute; top:-2px; right:-2px;
            width:10px; height:10px; border-radius:50%;
            background:#F39C12; display:none;
            border:2px solid #1A2E4A;
        }

        /* Interlocutor admin */
        .int-admin-list { display:flex; flex-direction:column; gap:9px; }
        .int-admin-card {
            background:#fff; border-radius:14px; padding:12px 14px;
            display:flex; align-items:center; gap:12px;
            box-shadow:0 1px 4px rgba(0,0,0,.1);
        }
        .int-admin-av {
            width:46px; height:46px; border-radius:50%; flex-shrink:0;
            display:flex; align-items:center; justify-content:center;
            font-size:20px; overflow:hidden;
        }
        .int-admin-av img { width:100%; height:100%; object-fit:cover; border-radius:50%; }
        .int-admin-info { flex:1; min-width:0; }
        .int-admin-name { font-size:14px; font-weight:700; color:#1A2E4A; }
        .int-admin-role { font-size:12px; color:#78909C; margin-top:2px; }
        .int-admin-btns { display:flex; gap:6px; flex-shrink:0; }
        .int-btn {
            width:34px; height:34px; border-radius:10px; border:none;
            font-size:15px; cursor:pointer;
            display:flex; align-items:center; justify-content:center;
        }
        .int-btn.edit { background:#E3F2FD; color:#1565C0; }
        .int-btn.del  { background:#FFEBEE; color:#C62828; }
        /* Editor de interlocutor */
        .int-editor-overlay {
            position:fixed; inset:0; background:rgba(0,0,0,.5);
            z-index:1600; display:none; align-items:flex-end; justify-content:center;
        }
        .int-editor-overlay.open { display:flex; }
        .int-editor-sheet {
            background:#fff; border-radius:22px 22px 0 0;
            width:100%; max-width:540px; padding:20px 20px 32px;
            display:flex; flex-direction:column; gap:13px;
            max-height:90vh; overflow-y:auto;
        }
        .int-ed-title { font-size:16px; font-weight:800; color:#1A2E4A; }
        .int-ed-field { display:flex; flex-direction:column; gap:5px; }
        .int-ed-lbl {
            font-size:11px; font-weight:700; color:#546E7A;
            text-transform:uppercase; letter-spacing:.6px;
        }
        .int-ed-in {
            padding:10px 12px; border-radius:11px;
            border:1.5px solid #CFD8DC; font-size:14px;
            background:#F7FAFC; color:#1A2E4A;
        }
        .int-ed-in:focus { outline:none; border-color:#1A2E4A; }
        .color-row { display:flex; gap:8px; flex-wrap:wrap; }
        .color-dot {
            width:28px; height:28px; border-radius:50%; cursor:pointer;
            border:3px solid transparent; transition:transform .1s;
        }
        .color-dot.sel { border-color:#1A2E4A; transform:scale(1.2); }
        .int-ed-actions { display:flex; gap:10px; margin-top:4px; }
        .int-ed-btn {
            flex:1; padding:12px; border-radius:12px; border:none;
            font-size:14px; font-weight:800; cursor:pointer;
        }
        .int-ed-btn.save   { background:#1A2E4A; color:#fff; }
        .int-ed-btn.cancel { background:#ECEFF1; color:#546E7A; }

        /* Pending changes */
        .pending-section-lbl {
            font-size:11px; font-weight:800; color:#E65100;
            text-transform:uppercase; letter-spacing:.6px;
            display:flex; align-items:center; gap:6px;
        }
        .pending-count-badge {
            background:#F39C12; color:#fff; border-radius:10px;
            padding:1px 7px; font-size:11px;
        }
        .pending-card {
            background:#FFF8E1; border-radius:12px; padding:11px 13px;
            display:flex; align-items:center; gap:10px;
            border-left:4px solid #F39C12;
        }
        .pending-card-info { flex:1; min-width:0; }
        .pending-card-who  { font-size:12px; font-weight:700; color:#E65100; }
        .pending-card-desc { font-size:13px; color:#1A2E4A; margin-top:1px; }
        .pending-card-time { font-size:11px; color:#78909C; margin-top:2px; }
        .pending-card-btns { display:flex; flex-direction:column; gap:4px; flex-shrink:0; }
        .pending-btn {
            padding:5px 11px; border-radius:8px; border:none;
            font-size:11px; font-weight:700; cursor:pointer; white-space:nowrap;
        }
        .pending-btn.ok  { background:#E8F5E9; color:#2E7D32; }
        .pending-btn.no  { background:#FFEBEE; color:#C62828; }
        /* Suggest-mode overlay on settings */
        .suggest-lock-banner {
            background:#FFF3E0; border:1.5px solid #FFB74D; border-radius:12px;
            padding:12px 16px; font-size:13px; color:#E65100; font-weight:600;
            display:none; margin-bottom:10px;
        }

        /* ══════════════════════════════════════════
           VSD — Visual Scene Display
           ══════════════════════════════════════════ */
        /* Scene Picker */
        .vsd-picker-overlay {
            position:fixed; inset:0; background:rgba(15,25,40,0.88);
            z-index:900; display:none; flex-direction:column;
            align-items:center; gap:16px; padding:20px 16px;
            overflow-y:auto;
        }
        .vsd-picker-overlay.open { display:flex; }
        .vsd-picker-header {
            width:100%; display:flex; align-items:center; justify-content:space-between;
        }
        .vsd-picker-title { color:#fff; font-size:18px; font-weight:800; }
        .vsd-picker-close {
            background:rgba(255,255,255,0.18); border:none; color:#fff;
            border-radius:50%; width:36px; height:36px; font-size:18px;
            cursor:pointer; display:flex; align-items:center; justify-content:center;
        }
        .vsd-scene-grid {
            width:100%; display:grid;
            grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:12px;
        }
        .vsd-scene-card {
            background:#fff; border-radius:16px; overflow:hidden; cursor:pointer;
            box-shadow:0 3px 12px rgba(0,0,0,0.35); transition:transform .12s;
        }
        .vsd-scene-card:active { transform:scale(0.94); }
        .vsd-scene-thumb {
            width:100%; aspect-ratio:4/3; background:#D0E4F5;
            display:flex; align-items:center; justify-content:center;
            font-size:44px; overflow:hidden;
        }
        .vsd-scene-thumb img { width:100%; height:100%; object-fit:cover; }
        .vsd-scene-name {
            padding:8px 10px; font-size:13px; font-weight:700;
            color:#1A2E4A; text-align:center;
        }
        .vsd-picker-empty {
            color:rgba(255,255,255,0.55); font-size:14px;
            text-align:center; padding:40px 20px; line-height:1.7;
        }

        /* Scene Viewer */
        .vsd-viewer-overlay {
            position:fixed; inset:0; background:#000;
            z-index:950; display:none; flex-direction:column;
        }
        .vsd-viewer-overlay.open { display:flex; }
        .vsd-viewer-topbar {
            background:rgba(0,0,0,0.72); padding:8px 14px;
            display:flex; align-items:center; gap:10px; flex-shrink:0;
            backdrop-filter:blur(6px);
        }
        .vsd-viewer-back {
            background:rgba(255,255,255,0.18); border:none; color:#fff;
            border-radius:20px; padding:5px 14px; font-size:13px;
            font-weight:600; cursor:pointer;
        }
        .vsd-viewer-name { color:#fff; font-size:15px; font-weight:700; flex:1; }
        .vsd-image-wrap {
            flex:1; position:relative; overflow:hidden;
            display:flex; align-items:center; justify-content:center;
        }
        .vsd-bg-img { width:100%; height:100%; object-fit:contain; display:block; }
        .vsd-bg-emoji {
            width:100%; height:100%; display:flex; align-items:center;
            justify-content:center; font-size:80px; background:#E8F0F8;
        }
        .vsd-hotspot {
            position:absolute; transform:translate(-50%,-50%);
            display:flex; flex-direction:column; align-items:center; gap:3px;
            cursor:pointer; background:rgba(255,255,255,0.93);
            border:3px solid #27AE60; border-radius:16px;
            padding:6px 10px; min-width:64px; max-width:110px;
            box-shadow:0 3px 12px rgba(0,0,0,0.4);
            transition:transform .1s;
            animation:vsd-pulse 2.8s infinite;
        }
        .vsd-hotspot:active { transform:translate(-50%,-50%) scale(0.88); }
        .vsd-hotspot { transition: transform .18s ease, box-shadow .18s ease; }
        .vsd-hotspot.vsd-hs-active {
            transform: translate(-50%,-50%) scale(1.5);
            box-shadow: 0 0 0 6px #F39C12, 0 10px 30px rgba(0,0,0,.55);
            z-index: 5;
            animation: none;
            border-color: #F39C12;
        }
        @keyframes vsd-pulse {
            0%,100% { box-shadow:0 3px 12px rgba(0,0,0,0.4),0 0 0 0 rgba(39,174,96,0.55); }
            55%      { box-shadow:0 3px 12px rgba(0,0,0,0.4),0 0 0 10px rgba(39,174,96,0); }
        }
        .vsd-hotspot-emoji { font-size:30px; line-height:1; }
        .vsd-hotspot-img   { width:44px; height:44px; object-fit:cover; border-radius:8px; }
        .vsd-hotspot-label {
            font-size:11px; font-weight:800; color:#1A2E4A;
            text-align:center; white-space:nowrap; text-transform:uppercase;
            letter-spacing:.3px;
        }

        /* Admin VSD view */
        .vsd-admin-wrap { display:flex; flex-direction:column; flex:1; overflow:hidden; }
        .vsd-admin-list {
            flex:1; overflow-y:auto; padding:14px; display:flex;
            flex-direction:column; gap:10px;
        }
        .vsd-admin-card {
            background:#fff; border-radius:14px; padding:12px 14px;
            display:flex; align-items:center; gap:12px;
            box-shadow:0 1px 5px rgba(0,0,0,0.1);
        }
        .vsd-admin-thumb {
            width:64px; height:44px; border-radius:10px; background:#D0E4F5;
            flex-shrink:0; display:flex; align-items:center;
            justify-content:center; font-size:24px; overflow:hidden;
        }
        .vsd-admin-thumb img { width:100%; height:100%; object-fit:cover; }
        .vsd-admin-info { flex:1; min-width:0; }
        .vsd-admin-name { font-size:14px; font-weight:700; color:#1A2E4A; }
        .vsd-admin-sub  { font-size:12px; color:#78909C; margin-top:2px; }
        .vsd-admin-btns { display:flex; gap:6px; flex-shrink:0; }
        .vsd-adm-btn {
            padding:5px 11px; border-radius:10px; border:none;
            font-size:12px; font-weight:700; cursor:pointer;
        }
        .vsd-adm-btn.edit { background:#E3F2FD; color:#1565C0; }
        .vsd-adm-btn.del  { background:#FFEBEE; color:#C62828; }
        .vsd-add-scene-btn {
            margin:0 14px 14px; padding:13px; border-radius:14px;
            border:2px dashed #90A4AE; background:transparent;
            color:#546E7A; font-size:14px; font-weight:700;
            cursor:pointer; display:flex; align-items:center;
            justify-content:center; gap:6px; flex-shrink:0;
        }
        .vsd-add-scene-btn:hover { background:#f0f4f8; }

        /* Scene Editor overlay */
        .vsd-editor-overlay {
            position:fixed; inset:0; background:#0D1B2A;
            z-index:1100; display:none; flex-direction:column;
        }
        .vsd-editor-overlay.open { display:flex; }
        .vsd-editor-topbar {
            background:#152337; padding:10px 14px;
            display:flex; align-items:center; gap:10px; flex-shrink:0;
        }
        .vsd-editor-title { color:#fff; font-size:15px; font-weight:700; flex:1; text-align:center; }
        .vsd-editor-action {
            padding:7px 16px; border-radius:12px; border:none;
            font-size:13px; font-weight:700; cursor:pointer; flex-shrink:0;
        }
        .vsd-editor-action.save   { background:#27AE60; color:#fff; }
        .vsd-editor-action.cancel { background:rgba(255,255,255,0.14); color:#c0d0e0; }
        .vsd-editor-fields {
            padding:10px 14px; display:flex; align-items:center; gap:8px;
            flex-shrink:0; background:rgba(255,255,255,0.04); flex-wrap:wrap;
        }
        .vsd-editor-input {
            flex:1; min-width:120px; padding:8px 12px; border-radius:10px; border:none;
            background:rgba(255,255,255,0.12); color:#fff; font-size:14px;
        }
        .vsd-editor-input::placeholder { color:rgba(255,255,255,0.35); }
        .vsd-editor-emoji-in {
            width:54px; padding:8px; border-radius:10px; border:none; text-align:center;
            background:rgba(255,255,255,0.12); color:#fff; font-size:20px;
        }
        .vsd-editor-upload-lbl {
            padding:8px 14px; border-radius:10px;
            background:#1E3A5C; color:#7FC3F0; font-size:13px;
            font-weight:600; cursor:pointer; white-space:nowrap;
        }
        .vsd-canvas-wrap {
            flex:1; position:relative; overflow:hidden;
            display:flex; align-items:center; justify-content:center;
            background:#050E18; cursor:crosshair;
        }
        .vsd-canvas-bg {
            max-width:100%; max-height:100%;
            object-fit:contain; pointer-events:none; display:block;
        }
        .vsd-canvas-hint {
            color:rgba(255,255,255,0.28); font-size:15px;
            text-align:center; pointer-events:none; line-height:1.8; padding:30px;
        }
        .vsd-editor-hs {
            position:absolute; transform:translate(-50%,-50%);
            background:rgba(255,255,255,0.92); border:2.5px solid #F39C12;
            border-radius:12px; padding:4px 8px;
            display:flex; flex-direction:column; align-items:center; gap:1px;
            cursor:default; min-width:52px; user-select:none;
        }
        .vsd-editor-hs-emoji { font-size:22px; }
        .vsd-editor-hs-lbl   { font-size:10px; font-weight:700; color:#1A2E4A; white-space:nowrap; }
        .vsd-editor-hs-del {
            position:absolute; top:-9px; right:-9px;
            background:#E53935; color:#fff; border:none; border-radius:50%;
            width:20px; height:20px; font-size:13px; cursor:pointer;
            display:flex; align-items:center; justify-content:center; line-height:1;
        }

        /* Vocabulary pictogram picker (inside hotspot modal) */
        .vsd-pic-picker {
            position:fixed; inset:0; background:rgba(0,0,0,0.65);
            z-index:1300; display:none; align-items:flex-end; justify-content:center;
        }
        .vsd-pic-picker.open { display:flex; }
        .vsd-pic-sheet {
            background:#fff; border-radius:22px 22px 0 0;
            width:100%; max-width:600px; max-height:75vh;
            display:flex; flex-direction:column; padding:0 0 16px;
            box-shadow:0 -4px 24px rgba(0,0,0,0.25);
        }
        .vsd-pic-sheet-bar {
            padding:14px 16px 10px; display:flex; align-items:center; gap:10px;
            border-bottom:1px solid #ECEFF1; flex-shrink:0;
        }
        .vsd-pic-sheet-title { font-size:15px; font-weight:800; color:#1A2E4A; flex:1; }
        .vsd-pic-sheet-close {
            background:#ECEFF1; border:none; color:#546E7A;
            border-radius:50%; width:30px; height:30px; font-size:16px;
            cursor:pointer; display:flex; align-items:center; justify-content:center;
        }
        .vsd-pic-search {
            margin:10px 16px 6px; padding:9px 13px; border-radius:12px;
            border:1.5px solid #CFD8DC; font-size:14px; background:#F7FAFC;
            color:#1A2E4A; flex-shrink:0;
        }
        .vsd-pic-search:focus { outline:none; border-color:#27AE60; }
        .vsd-pic-grid {
            flex:1; overflow-y:auto; padding:8px 12px;
            display:grid; grid-template-columns:repeat(auto-fill,minmax(72px,1fr));
            gap:8px; align-content:start;
        }
        .vsd-pic-item {
            display:flex; flex-direction:column; align-items:center; gap:4px;
            padding:8px 4px; border-radius:12px; cursor:pointer;
            background:#F7FAFC; border:2px solid transparent;
            transition:border-color .12s, background .12s;
        }
        .vsd-pic-item:hover  { background:#E8F5E9; border-color:#27AE60; }
        .vsd-pic-item.sel    { background:#E8F5E9; border-color:#27AE60; }
        .vsd-pic-item-vis    { font-size:30px; line-height:1; }
        .vsd-pic-item-vis img{ width:36px; height:36px; object-fit:contain; border-radius:6px; }
        .vsd-pic-item-lbl    { font-size:10px; font-weight:700; color:#37474F;
                                text-align:center; word-break:break-word; }
        .vsd-pic-empty       { color:#90A4AE; font-size:13px; text-align:center;
                                padding:24px; grid-column:1/-1; }
        .vsd-pic-section-lbl { grid-column:1/-1; font-size:11px; font-weight:800;
                                color:#78909C; text-transform:uppercase; letter-spacing:.8px;
                                padding:4px 2px 0; }

        /* Camera modal */
        .vsd-cam-modal {
            position:fixed; inset:0; background:rgba(0,0,0,0.88);
            z-index:1300; display:none; flex-direction:column;
            align-items:center; justify-content:center; gap:14px; padding:20px;
        }
        .vsd-cam-modal.open { display:flex; }
        .vsd-cam-video {
            max-width:min(640px,100%); width:100%; border-radius:14px;
            background:#000; display:block; aspect-ratio:4/3; object-fit:cover;
        }
        .vsd-cam-actions { display:flex; gap:12px; }
        .vsd-cam-btn {
            padding:12px 28px; border-radius:14px; border:none;
            font-size:15px; font-weight:700; cursor:pointer;
        }
        .vsd-cam-btn.shoot  { background:#27AE60; color:#fff; font-size:18px; }
        .vsd-cam-btn.cancel { background:rgba(255,255,255,0.18); color:#fff; }
        .vsd-cam-hint { color:rgba(255,255,255,0.55); font-size:13px; text-align:center; }
        canvas#vsdCamCanvas { display:none; }

        /* Hotspot config modal */
        .vsd-hs-modal {
            position:fixed; inset:0; background:rgba(0,0,0,0.65);
            z-index:1200; display:none; align-items:center; justify-content:center;
        }
        .vsd-hs-modal.open { display:flex; }
        .vsd-hs-modal-box {
            background:#fff; border-radius:20px; padding:22px;
            width:min(340px,90vw); display:flex; flex-direction:column; gap:14px;
            box-shadow:0 8px 32px rgba(0,0,0,0.35);
        }
        .vsd-hs-modal-title { font-size:16px; font-weight:800; color:#1A2E4A; }
        .vsd-hs-field { display:flex; flex-direction:column; gap:5px; }
        .vsd-hs-field-lbl { font-size:12px; font-weight:700; color:#546E7A; text-transform:uppercase; letter-spacing:.5px; }
        .vsd-hs-field-in {
            padding:10px 13px; border-radius:11px;
            border:1.5px solid #CFD8DC; font-size:14px; background:#F7FAFC;
            color:#1A2E4A;
        }
        .vsd-hs-field-in:focus { outline:none; border-color:#27AE60; }
        .vsd-hs-actions { display:flex; gap:10px; margin-top:2px; }
        .vsd-hs-modal-btn {
            flex:1; padding:11px; border-radius:12px; border:none;
            font-size:14px; font-weight:800; cursor:pointer;
        }
        .vsd-hs-modal-btn.ok  { background:#27AE60; color:#fff; }
        .vsd-hs-modal-btn.no  { background:#ECEFF1; color:#546E7A; }

        /* ══════════════════════════════════════════
           TECLADO PREDITIVO — full screen
           ══════════════════════════════════════════ */
        .kb-overlay {
            position: fixed; inset: 0;
            background: #1A2E4A;
            z-index: 1000; display: none;
            flex-direction: column;
        }
        .kb-overlay.open { display: flex; }

        /* ── Barra da frase ── */
        .kb-sentence-bar {
            background: #132237; flex-shrink: 0;
            padding: 6px 12px;
            display: flex; align-items: center; gap: 8px;
            border-bottom: 1px solid rgba(255,255,255,0.08);
            min-height: 64px;
        }
        .kb-sentence-strip {
            flex: 1; display: flex; gap: 6px;
            overflow-x: auto; align-items: center;
            padding: 2px 0;
        }
        .kb-sentence-strip::-webkit-scrollbar { height: 3px; }
        .kb-sentence-strip::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }
        .kb-sent-ph {
            color: rgba(255,255,255,0.3); font-size: 13px; font-style: italic; white-space: nowrap;
        }
        .kb-sym {
            display: flex; flex-direction: column; align-items: center;
            padding: 4px 7px; border-radius: 10px; flex-shrink: 0;
            cursor: pointer; transition: opacity .12s; min-width: 52px;
            border: 1.5px solid transparent;
        }
        .kb-sym:active { opacity: .6; }
        .kb-sym.verb     { background:#2D5A30; border-color:#4CAF50; }
        .kb-sym.verb-aux { background:#1A3A5C; border-color:#64B5F6; }
        .kb-sym.noun     { background:#5A4A1A; border-color:#FFD54F; }
        .kb-sym.adj      { background:#5A2030; border-color:#F48FB1; }
        .kb-sym.emotion  { background:#3A2050; border-color:#CE93D8; }
        .kb-sym.grammar  { background:#5A3A10; border-color:#FFCC80; }
        .kb-sym.pronoun  { background:#4A4A10; border-color:#FFF176; }
        .kb-sym .kb-sym-visual { font-size: 26px; line-height: 1; }
        .kb-sym img.kb-sym-img { width: 32px; height: 32px; object-fit: contain; }
        .kb-sym .kb-sym-lbl {
            font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.9);
            margin-top: 2px; text-align: center; white-space: nowrap;
        }
        .kb-sentence-actions {
            display: flex; gap: 5px; flex-shrink: 0;
        }
        .kb-act-btn {
            width: 34px; height: 34px; border-radius: 10px; border: none;
            background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8);
            font-size: 15px; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            transition: background .15s;
        }
        .kb-act-btn:hover { background: rgba(255,255,255,0.2); }
        .kb-act-btn.speak  { background: rgba(34,197,94,0.25); color: #86EFAC; }
        .kb-act-btn.danger { background: rgba(239,68,68,0.25); color: #FCA5A5; }
        .kb-done-bar {
            padding: 5px 12px; background: #132237; flex-shrink: 0;
            display: flex; align-items: center; gap: 8px;
            border-bottom: 1px solid rgba(255,255,255,0.08);
        }
        .kb-done-btn {
            flex: 1; padding: 8px 16px; border-radius: 10px; border: none;
            background: #22C55E; color: white; font-size: 13px; font-weight: 800;
            cursor: pointer; letter-spacing: .3px;
        }
        .kb-done-btn:disabled { background: #334155; color: #64748B; cursor: default; }
        .kb-speak-sentence-btn {
            padding: 8px 14px; border-radius: 10px; border: none;
            background: rgba(255,255,255,0.1); color: rgba(255,255,255,.8);
            font-size: 13px; font-weight: 600; cursor: pointer;
        }

        /* ── Barra de predição ── */
        .kb-pred-bar {
            flex-shrink: 0; background: #1E3552;
            padding: 7px 10px;
            display: flex; gap: 7px; overflow-x: auto; align-items: center;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            min-height: 78px;
        }
        .kb-pred-bar::-webkit-scrollbar { height: 3px; }
        .kb-pred-bar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); }
        .kb-pred-chip {
            display: flex; flex-direction: column; align-items: center;
            padding: 6px 10px; border-radius: 12px; flex-shrink: 0;
            cursor: pointer; min-width: 64px; max-width: 90px;
            transition: transform .1s, filter .1s;
            border: 1.5px solid transparent;
            position: relative;
        }
        .kb-pred-chip:active { transform: scale(.92); filter: brightness(1.15); }
        .kb-pred-chip.verb     { background:#2D5A30; border-color:#4CAF50; }
        .kb-pred-chip.verb-aux { background:#1A3A5C; border-color:#64B5F6; }
        .kb-pred-chip.noun     { background:#5A4A1A; border-color:#FFD54F; }
        .kb-pred-chip.adj      { background:#5A2030; border-color:#F48FB1; }
        .kb-pred-chip.emotion  { background:#3A2050; border-color:#CE93D8; }
        .kb-pred-chip.grammar  { background:#5A3A10; border-color:#FFCC80; }
        .kb-pred-chip.pronoun  { background:#4A4A10; border-color:#FFF176; }
        .kb-pred-chip.fallback { opacity: .6; border-style: dashed; }
        .kb-pred-visual { font-size: 28px; line-height: 1; }
        .kb-pred-chip img.kb-pred-img { width: 36px; height: 36px; object-fit: contain; }
        .kb-pred-lbl {
            font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.9);
            margin-top: 3px; text-align: center; word-break: break-word;
        }
        .kb-pred-new {
            position: absolute; top: 2px; right: 2px;
            background: #EF4444; color: white; font-size: 8px;
            font-weight: 800; padding: 1px 3px; border-radius: 4px;
        }
        .kb-pred-ph {
            color: rgba(255,255,255,0.25); font-size: 13px;
            font-style: italic; white-space: nowrap; margin: auto;
        }

        /* ── Input display ── */
        .kb-input-display {
            flex-shrink: 0; background: #243852;
            padding: 7px 16px;
            display: flex; align-items: center; gap: 6px;
            border-bottom: 2px solid rgba(255,255,255,0.10);
        }
        .kb-input-label {
            color: rgba(255,255,255,0.35); font-size: 11px; font-weight: 600;
            white-space: nowrap; text-transform: uppercase; letter-spacing: .5px;
        }
        .kb-input-text {
            flex: 1; color: white; font-size: 22px; font-weight: 700;
            letter-spacing: 2px; min-height: 28px;
        }
        .kb-cursor {
            display: inline-block; color: #64B5F6; font-size: 22px; font-weight: 300;
            animation: kb-blink 1s step-end infinite;
        }
        @keyframes kb-blink { 0%,100%{opacity:1} 50%{opacity:0} }
        .kb-input-backspace {
            width: 40px; height: 40px; border-radius: 10px; border: none;
            background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7);
            font-size: 18px; cursor: pointer; flex-shrink: 0;
            display: flex; align-items: center; justify-content: center;
        }
        .kb-input-backspace:active { background: rgba(239,68,68,0.3); }

        /* ── Teclas ── */
        .kb-keys-area {
            flex: 1; display: flex; flex-direction: column;
            justify-content: center;
            padding: 6px 10px 10px;
            gap: 5px; overflow: hidden;
            /* Largura de cada tecla calculada para 10 cols + 9 gaps de 5px por 100% */
            /* Piso de 26px: com 36px, 10 teclas não cabiam num celular em pé
               (iPhone ~390px) e as laterais ficavam cortadas (04/11/2026). */
            --kb-k: clamp(26px, calc((100vw - 20px - 9*5px) / 10), 70px);
            --kb-r: 9px;
        }
        .kb-row {
            display: flex; justify-content: center;
            gap: 5px; flex-shrink: 0;
        }
        /* Tecla padrão */
        .kb-key {
            width: var(--kb-k); height: var(--kb-k);
            border-radius: var(--kb-r); border: none;
            background: linear-gradient(180deg, #3C5F85 0%, #2B4A6E 100%);
            color: #E8F0F8;
            font-size: clamp(13px, 1.7vw, 19px); font-weight: 700;
            cursor: pointer; text-transform: uppercase;
            box-shadow: 0 3px 0 #152337, inset 0 1px 0 rgba(255,255,255,0.14);
            display: flex; align-items: center; justify-content: center;
            user-select: none; -webkit-user-select: none;
            flex-shrink: 0; transition: transform .06s;
            letter-spacing: .5px;
        }
        .kb-key:active {
            background: linear-gradient(180deg, #5592D4 0%, #3A75B8 100%);
            transform: translateY(2px);
            box-shadow: 0 1px 0 #152337;
        }
        /* Números (mesma largura, tom levemente distinto) */
        .kb-key-num {
            background: linear-gradient(180deg, #2E4F72 0%, #1E3A58 100%);
            color: #CBD9EC; font-size: clamp(13px, 1.6vw, 18px);
        }
        /* Pontuação */
        .kb-key-punct {
            background: linear-gradient(180deg, #2E4F72 0%, #1E3A58 100%);
            color: #CBD9EC; font-size: clamp(14px, 1.8vw, 20px); font-weight: 800;
        }
        /* Backspace */
        .kb-key-bs {
            background: linear-gradient(180deg, #253A52 0%, #18293C 100%);
            color: #94B4D4; font-size: clamp(15px, 1.8vw, 20px);
            box-shadow: 0 3px 0 #0D1B29, inset 0 1px 0 rgba(255,255,255,0.08);
        }
        .kb-key-bs:active { background: linear-gradient(180deg, #7F2020 0%, #5C1414 100%); }
        /* Espaço — stretch */
        .kb-key-space {
            width: auto; flex: 1;
            background: linear-gradient(180deg, #344F6C 0%, #243D59 100%);
            color: rgba(200,215,235,.7); font-size: clamp(11px, 1.3vw, 14px);
            letter-spacing: 1.5px; text-transform: uppercase;
        }
        /* Confirmar palavra — verde */
        .kb-key-enter {
            width: auto; flex: 0 0 auto; padding: 0 clamp(8px, 1.5vw, 18px);
            background: linear-gradient(180deg, #1E7A45 0%, #145530 100%);
            color: #A7F3C8; font-size: clamp(10px, 1.2vw, 13px);
            box-shadow: 0 3px 0 #0C3320, inset 0 1px 0 rgba(255,255,255,0.12);
            letter-spacing: .3px;
        }
        .kb-key-enter:active { background: linear-gradient(180deg, #25A357 0%, #1A7040 100%); }
        /* Fechar — vermelho */
        .kb-key-close {
            width: auto; flex: 0 0 auto; padding: 0 clamp(8px, 1.5vw, 18px);
            background: linear-gradient(180deg, #8B1A1A 0%, #641010 100%);
            color: #FFBDBD; font-size: clamp(10px, 1.2vw, 13px);
            box-shadow: 0 3px 0 #3D0808, inset 0 1px 0 rgba(255,255,255,0.10);
        }
        .kb-key-close:active { background: linear-gradient(180deg, #A82020 0%, #7A1414 100%); }
        /* Celular em pé: a última linha (pontuação + espaço + ações) também
           precisa caber — as ações viram só o símbolo. */
        @media (max-width: 560px) {
            .kb-keys-area { padding-left: 6px; padding-right: 6px; }
            .kb-key-enter .kb-txt, .kb-key-close .kb-txt { display: none; }
            .kb-key-enter, .kb-key-close { padding: 0; width: calc(var(--kb-k) * 1.3); font-size: 18px; }
            .kb-key-space { letter-spacing: .5px; min-width: 0; }
        }

        /* ── SENTENCE BAR ── */
        .sentence-bar {
            background: white; border-bottom: 2px solid #E0E7EF;
            padding: 10px 12px;
            display: flex; align-items: center; gap: 10px;
            min-height: var(--sbar-h, 96px); flex-shrink: 0;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            transition: min-height .2s ease;
            overflow: hidden;
            /* Distância da prancha (22/10/2026): crianças com mais dificuldade
               motora esbarravam na barra ao buscar um pictograma — e tocar num
               pictograma da barra o apaga, deixando a frase incompleta. */
            margin-bottom: 14px;
        }
        .sentence-bar.sbar-hidden { display: none; }
        /* Tamanhos via variável --sbar-h (aplicada no elemento) */
        .sentence-symbols {
            display: flex; gap: 6px; flex: 1;
            flex-wrap: nowrap; overflow-x: auto; align-items: center;
        }
        .sentence-symbol {
            display: flex; flex-direction: column; align-items: center;
            padding: 5px 9px; border-radius: 10px; border: 2px solid transparent;
            min-width: var(--sbar-sym-w, 62px); cursor: pointer; flex-shrink: 0;
        }
        .sentence-symbol:active { opacity: 0.6; }
        /* Toque longo para tirar (Modo de Acesso): sem menu do sistema e com
           um anel que enche enquanto a pessoa segura. */
        .sentence-symbol.tirar-longo { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
        .sentence-symbol.tirar-longo:active { opacity: 1; }
        .sentence-symbol.segurando { animation: barra-segurar 0.9s linear forwards; }
        @keyframes barra-segurar {
            from { box-shadow: 0 0 0 0 rgba(231,76,60,0.0); }
            to   { box-shadow: 0 0 0 4px rgba(231,76,60,0.9); opacity: 0.55; }
        }
        .sentence-symbol .sym-emoji { font-size: var(--sbar-emoji, 32px); line-height: 1; }
        .sentence-symbol .sym-img   { width: var(--sbar-emoji, 32px) !important; height: var(--sbar-emoji, 32px) !important; }
        .sentence-symbol .sym-label {
            font-size: var(--sbar-lbl, 10px); font-weight: 700; text-align: center;
            margin-top: 3px; text-transform: uppercase; letter-spacing: 0.3px;
        }
        .sentence-placeholder { color: #BCC5D0; font-size: 14px; font-style: italic; }
        .sentence-actions { display: flex; gap: 7px; flex-shrink: 0; }
        .action-btn {
            width:  var(--sbar-btn, 52px);
            height: var(--sbar-btn, 52px);
            border-radius: 50%; border: none;
            display: flex; align-items: center; justify-content: center;
            font-size: var(--sbar-btn-ico, 20px); cursor: pointer;
            transition: transform 0.1s, opacity 0.1s;
            flex-shrink: 0;
        }
        .action-btn:active { transform: scale(0.90); opacity: 0.8; }
        .speak-btn  { background: #27AE60; color: white; }
        /* Falar é a ação principal da barra: alvo bem maior que os outros. */
        .action-btn.speak-btn {
            width:  calc(var(--sbar-btn, 52px) * 1.45);
            height: calc(var(--sbar-btn, 52px) * 1.45);
            font-size: calc(var(--sbar-btn-ico, 20px) * 1.5);
            box-shadow: 0 3px 0 #1E8449;
        }
        .back-btn   { background: #E74C3C; color: white; }
        .clear-btn  { background: #95A5A6; color: white; }
        .plural-btn { background: #CBD5E1; color: #475569; }
        .plural-btn.active { background: #F59E0B; color: white; box-shadow: 0 0 0 3px rgba(245,158,11,.35); }
        .sentence-symbol.plural-active { outline: 2px solid rgba(245,158,11,.6); outline-offset: 1px; }

        /* ── COMMUNICATOR COLUMNS (child) ── */
        .communicator-columns {
            flex: 1;
            display: flex;
            flex-direction: row;
            align-items: stretch;
            overflow-x: auto;
            overflow-y: hidden;
            padding: var(--col-gap);
            gap: var(--col-gap);
            min-height: 0;
            -webkit-overflow-scrolling: touch;
        }
        .communicator-columns::-webkit-scrollbar { display: none; }
        .syntax-col {
            display: flex;
            flex-direction: column;
            gap: var(--col-gap);
            flex: 1;
            min-width: 44px;
            height: 100%;
            overflow-y: auto;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
        }
        .syntax-col::-webkit-scrollbar { display: none; }
        /* Coluna vazia — mantém posição fixa, invisível para o usuário */
        .syntax-col.empty-col { pointer-events: none; }
        /* Etapa 1: oculta barra de fala */
        #expressiveScreen.stage1-mode .sentence-bar { display: none !important; }
        /* Item ativo no painel admin */
        .stages-item-card.stage-item-active { border-color: #27AE60 !important; background: #F0FDF4 !important; }
        .si-active-badge {
            position: absolute; bottom: 2px; right: 2px;
            background: #27AE60; color: white; border-radius: 50%;
            width: 16px; height: 16px; font-size: 9px; font-weight: 900;
            display: flex; align-items: center; justify-content: center; pointer-events: none;
        }

        /* ══════════════════════════════════════════
           STAGE MODE — Etapas 1 e 2 PELP-TEA
           ══════════════════════════════════════════ */
        .stage-grid {
            width: 100%; height: 100%;
            display: grid;
            gap: 10px; padding: 10px;
            box-sizing: border-box;
        }
        .stage-grid[data-cols="1"] { grid-template-columns: 1fr; }
        .stage-grid[data-cols="2"] { grid-template-columns: 1fr 1fr; }
        .stage-grid[data-cols="3"] { grid-template-columns: 1fr 1fr 1fr; }
        .stage-grid[data-cols="4"] { grid-template-columns: 1fr 1fr 1fr 1fr; }
        .stage-grid[data-cols="5"] { grid-template-columns: 1fr 1fr 1fr 1fr 1fr; }
        .stage-card {
            border-radius: 18px;
            display: flex; flex-direction: column;
            align-items: center; justify-content: center;
            background: white; border: 3px solid #D0D8E4;
            cursor: pointer; overflow: hidden;
            transition: transform .1s, box-shadow .1s;
            user-select: none; -webkit-tap-highlight-color: transparent;
            padding: 8px;
        }
        .stage-card:active { transform: scale(.93); }
        /* #symbolGrid no seletor: precisa vencer os estilos dinâmicos de configuração
           (btnConfigStyle injeta regras '#symbolGrid .stage-card { … !important }') */
        #symbolGrid .stage-card.stage-card-pulse,
        #symbolGrid .stage3-card.stage-card-pulse {
            transform: scale(1.05) !important;
            box-shadow: 0 0 0 6px #F39C12, 0 8px 24px rgba(0,0,0,.25) !important;
            border-color: #F39C12 !important;
        }
        .stage-card img { max-width: 80%; max-height: 60%; object-fit: contain; border-radius: 10px; }
        .stage-card .st-emoji { font-size: clamp(30px, 6.5vw, 80px); line-height: 1.1; }
        .stage-card .st-label { font-size: clamp(11px, 2vw, 22px); font-weight: 800; color: #1A2E4A; margin-top: 6px; text-align: center; }
        .stage-choose-btn { background: #EDE7F6 !important; border-color: #B39DDB !important; }
        .stage-choose-btn .st-label { color: #6A1B9A; }
        .stage-choose-overlay {
            position: absolute; inset: 0; background: rgba(0,0,0,.5);
            display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
            z-index: 20; padding: 12px; box-sizing: border-box;
        }
        .stage-choose-overlay-title { color: white; font-size: 15px; font-weight: 800; }
        .stage-pool-grid {
            display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
            gap: 8px; width: 100%; max-height: 60vh; overflow-y: auto;
        }
        .stage-pool-card {
            border-radius: 12px; background: white; border: 3px solid #D0D8E4;
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            padding: 8px 4px; cursor: pointer; aspect-ratio: 1; transition: border-color .15s;
        }
        .stage-pool-card.chosen { border-color: #27AE60; background: #ECFDF5; }
        .stage-pool-card .sp-emoji { font-size: 28px; }
        .stage-pool-card .sp-label { font-size: 9px; font-weight: 700; text-align: center; color: #1A2E4A; margin-top: 3px; }
        .stage-choose-close { background: #E74C3C; color: white; border: none; border-radius: 10px; padding: 8px 20px; font-size: 13px; font-weight: 700; cursor: pointer; }

        /* ── Stages management panel ── */
        .stages-tabs { display: flex; gap: 6px; padding: 12px 12px 0; }
        .stages-tab-btn {
            flex: 1; padding: 9px 4px; border-radius: 10px;
            border: 2px solid #D0D8E4; background: white;
            font-size: 12px; font-weight: 700; color: #5D6D7E;
            cursor: pointer; transition: all .15s; text-align: center;
        }
        .stages-tab-btn.active { background: #1A2E4A; color: white; border-color: #1A2E4A; }
        .stages-tab-btn.soon { opacity: .45; cursor: default; }
        .stages-panel { padding: 12px; display: flex; flex-direction: column; gap: 14px; }
        .stages-section-lbl { font-size: 10px; font-weight: 800; color: #95A5A6; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
        .stages-activate-row {
            display: flex; align-items: center; gap: 10px;
            background: #F0F4F8; border-radius: 12px; padding: 10px 14px;
        }
        .stages-activate-info { flex: 1; }
        .stages-activate-title { font-size: 13px; font-weight: 700; color: #1A2E4A; }
        .stages-activate-sub   { font-size: 10px; color: #95A5A6; margin-top: 2px; }
        .stages-size-row { display: flex; gap: 6px; flex-wrap: wrap; }
        .stages-size-btn {
            padding: 6px 13px; border-radius: 20px; border: 2px solid #D0D8E4;
            background: white; font-size: 11px; font-weight: 700; color: #5D6D7E;
            cursor: pointer; transition: all .15s;
        }
        .stages-size-btn.active { background: #1A2E4A; color: white; border-color: #1A2E4A; }
        .stages-items-grid {
            display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px;
        }
        .stages-item-card {
            position: relative; border-radius: 6px; overflow: hidden;
            background: white; border: 2px solid #D0D8E4;
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            aspect-ratio: 1; transition: border-color .15s;
        }
        .stages-item-card .si-emoji { font-size: 14px; pointer-events: none; }
        .stages-item-card img { max-width: 65%; max-height: 55%; object-fit: contain; pointer-events: none; }
        .stages-item-card .si-label { font-size: 7px; font-weight: 700; color: #1A2E4A; text-align: center; padding: 0 2px; pointer-events: none; line-height: 1.1; }
        .stages-item-card .si-del {
            position: absolute; top: 1px; right: 1px;
            background: #E74C3C; color: white; border: none; border-radius: 50%;
            width: 12px; height: 12px; font-size: 7px; cursor: pointer;
            display: flex; align-items: center; justify-content: center; padding: 0;
        }
        .stages-item-card .si-img-btn {
            position: absolute; top: 1px; left: 1px;
            background: #1A2E4A88; color: white; border: none; border-radius: 50%;
            width: 12px; height: 12px; font-size: 7px; cursor: pointer;
            display: flex; align-items: center; justify-content: center; padding: 0;
        }
        .stages-add-card {
            border-radius: 6px; background: #F8FAFC; border: 2px dashed #CBD5E1;
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            aspect-ratio: 1; cursor: pointer; color: #95A5A6; font-size: 14px;
            transition: border-color .15s, color .15s;
        }
        .stages-add-card:hover { border-color: #1A2E4A; color: #1A2E4A; }
        .stages-add-bar {
            display: flex; gap: 8px; align-items: center;
        }
        .stages-add-bar input {
            border: 2px solid #D0D8E4; border-radius: 10px; padding: 8px 10px;
            font-size: 13px; font-family: inherit; outline: none; background: white;
        }
        .stages-add-bar input:focus { border-color: #1A2E4A; }
        .stages-add-bar .si-emoji-in { width: 50px; text-align: center; }
        .stages-add-bar .si-label-in { flex: 1; }
        .stages-add-btn {
            padding: 8px 14px; border-radius: 10px; background: #1A2E4A;
            color: white; border: none; font-size: 12px; font-weight: 700; cursor: pointer;
            white-space: nowrap;
        }
        .stages-pool-toggle {
            display: flex; align-items: center; justify-content: center;
            background: #EDE7F6; border: 2px solid #CE93D8; border-radius: 10px;
            padding: 6px 10px; font-size: 11px; font-weight: 700; color: #6A1B9A;
            cursor: pointer; gap: 4px;
        }
        .stages-item-card.pool-chosen { border-color: #27AE60; background: #F0FDF4; }

        /* ══════════════════════════════════════════
           STAGE 3 — Reforçador + Estímulo Neutro
           ══════════════════════════════════════════ */
        /* A Etapa 3 é a ÚNICA tela cujos cartões são posicionados e dimensionados
           em PORCENTAGEM da arena (`top`/`height` em %); em todas as outras eles
           estão no fluxo normal. Porcentagem de altura só resolve contra uma
           altura DEFINIDA — e, como todos os filhos aqui são absolutos, a arena
           não ganha altura do próprio conteúdo: ela depende inteiramente da
           cadeia de flex acima. Se essa cadeia resolver para `auto` num aparelho
           (o iPad é onde isso aparece), os cartões viram uma faixa fina no topo:
           visíveis, clicáveis, e o resto da tela vazio. O piso abaixo não deixa
           o caso degenerado acontecer; onde a cadeia funciona, ele não amarra. */
        #symbolGrid.stage3-arena { position: relative; overflow: hidden; min-height: 50vh; }
        /* Fundo da arena herda do body (responde a screen-white / screen-black) */
        .stage3-card {
            position: absolute;
            border-radius: 18px; background: white; border: 4px solid #D0D8E4;
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            cursor: pointer; overflow: hidden; padding: 10px;
            transition: left .45s cubic-bezier(.4,0,.2,1), top .45s cubic-bezier(.4,0,.2,1),
                        transform .1s;
            box-shadow: 0 6px 28px rgba(0,0,0,.14);
            user-select: none; -webkit-tap-highlight-color: transparent;
        }
        .stage3-card:active { transform: scale(.93) !important; }
        .stage3-card img { max-width: 80%; max-height: 62%; object-fit: contain; border-radius: 10px; }
        .stage3-card .st3-emoji { font-size: clamp(28px, 6vmin, 90px); line-height: 1.1; }
        .stage3-card .st3-label { font-size: clamp(12px, 3vmin, 26px); font-weight: 800; color: #1A2E4A; margin-top: 8px; text-align: center; }
        .stage3-randomize-btn {
            position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
            z-index: 20; background: #1A2E4A; color: white;
            border: none; border-radius: 50px; padding: 14px 32px;
            font-size: 16px; font-weight: 800; cursor: pointer; white-space: nowrap;
            box-shadow: 0 6px 24px rgba(26,46,74,.35);
            transition: transform .15s, opacity .15s;
            -webkit-tap-highlight-color: transparent;
        }
        .stage3-randomize-btn:active { transform: translateX(-50%) scale(.93); opacity: .85; }

        /* Stage 3 admin panel */
        .stage3-step-btns { display: flex; gap: 6px; }
        .stage3-step-btn {
            flex: 1; padding: 7px 4px; border-radius: 8px;
            border: 2px solid #D0D8E4; background: white;
            font-size: 11px; font-weight: 700; color: #5D6D7E;
            cursor: pointer; transition: all .15s; text-align: center;
        }
        .stage3-step-btn.active { background: #1A2E4A; color: white; border-color: #1A2E4A; }
        /* All 5 slots in a single row */
        .stage3-slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
        .stage3-slot {
            border-radius: 10px; background: #F8FAFC;
            border: 2px dashed #CBD5E1; padding: 8px 4px;
            display: flex; flex-direction: column; align-items: center; gap: 6px;
            transition: opacity .2s;
        }
        .stage3-slot.has-item { border-style: solid; border-color: #D0D8E4; background: white; }
        .stage3-slot.inactive { opacity: .38; }
        .stage3-slot-lbl { font-size: 9px; font-weight: 800; text-transform: uppercase;
            letter-spacing: .4px; color: #95A5A6; text-align: center; }
        .stage3-slot.s3-reinforcer-slot .stage3-slot-lbl { color: #2980B9; }
        .stage3-slot-card {
            width: 54px; height: 54px; border-radius: 10px;
            background: white; border: 2px solid #D0D8E4;
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            position: relative; overflow: hidden; cursor: pointer;
        }
        .stage3-slot-card img { max-width: 78%; max-height: 62%; object-fit: contain; }
        .stage3-slot-card .s3sc-emoji { font-size: 22px; }
        .stage3-slot-card .s3sc-label { font-size: 8px; font-weight: 700; color: #1A2E4A; margin-top: 2px; text-align: center; padding: 0 2px; line-height: 1.1; }
        .stage3-slot-card .si-img-btn { width:14px;height:14px;font-size:8px;position:absolute;top:1px;left:1px;background:#1A2E4A88;color:white;border:none;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0; }
        .stage3-slot-card .si-del { width:14px;height:14px;font-size:8px;position:absolute;top:1px;right:1px;background:#E74C3C;color:white;border:none;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0; }
        /* Shared add-form shown below the grid for whichever slot is empty & selected */
        .stage3-edit-area {
            background: #F0F4F8; border-radius: 10px; padding: 10px 12px;
            display: flex; flex-direction: column; gap: 6px;
        }
        .stage3-edit-area .s3ea-title { font-size: 10px; font-weight: 800; color: #1A2E4A; text-transform: uppercase; letter-spacing: .4px; }
        .stage3-add-bar { display: flex; gap: 6px; align-items: center; }
        .stage3-add-bar input { border: 2px solid #D0D8E4; border-radius: 8px; padding: 6px 8px; font-size: 12px; font-family: inherit; outline: none; background: white; }
        .stage3-add-bar input:focus { border-color: #1A2E4A; }
        .stage3-add-bar .s3-emoji-in { width: 42px; text-align: center; }
        .stage3-add-bar .s3-label-in { flex: 1; min-width: 0; }
        .stage3-add-bar .s3-add-btn { padding: 7px 12px; border-radius: 8px; background: #1A2E4A; color: white; border: none; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }

        /* Rectangular cards — height set dynamically by JS, width fills column */
        .syntax-col .symbol-card {
            flex-shrink: 0;
            width: 100%;
            height: var(--card-h);
            min-height: unset;
        }

        /* Folder cards */
        .folder-card { background: #FDE8F2 !important; border-color: #F0A8D0 !important; }
        .folder-card .label { color: #A0246A !important; }
        .pronoun-folder-card { background: #FFFDE7 !important; border-color: #FFD54F !important; }
        .pronoun-folder-card .label { color: #7A5C00 !important; }
        .gram-folder-card { background: #FFF3E0 !important; border-color: #FFAB40 !important; }
        .gram-folder-card .label { color: #E65100 !important; }
        /* Indicador DISCRETO de PASTA/CATEGORIA (comunicador): "»" pequeno e
           semitransparente no canto, sem fundo — sinaliza que abre outros itens
           sem poluir. */
        .folder-card::after,
        .pronoun-folder-card::after,
        .gram-folder-card::after {
            content: '»';
            position: absolute; top: 3px; right: 6px;
            font-size: 12px; font-weight: 900; line-height: 1;
            opacity: .4; pointer-events: none;
        }
        .folder-card::after         { color: #A0246A; }
        .pronoun-folder-card::after { color: #7A5C00; }
        .gram-folder-card::after    { color: #B4560F; }
        /* Right column: adjetivos / emoções / regulação */
        .right-folder-card { background: #F3E5F5 !important; border-color: #CE93D8 !important; }
        .right-folder-card .label { color: #6A1B9A !important; }
        .folder-back {
            background: #D63E8F; color: white;
            padding: 14px 6px; border-radius: 12px;
            font-size: 12px; font-weight: 800; text-align: center;
            cursor: pointer; line-height: 1.3; flex-shrink: 0;
            min-height: 44px;
            display: flex; align-items: center; justify-content: center;
        }
        .folder-back:active { opacity: 0.75; }

        /* ── SUB-FOLDER STRIP (horizontal pill row inside a column) ── */
        .sem-sub-strip {
            width: 100%; flex-shrink: 0;
            display: flex; flex-direction: row; flex-wrap: wrap;
            gap: 5px; padding: 3px 0;
        }
        .sem-sub-strip-btn {
            flex: 1 1 auto; min-width: 0;
            background: #FDE8F2; border: 2px solid #F0A8D0;
            border-radius: 20px; color: #A0246A;
            font-size: clamp(9px,1.8vw,12px); font-weight: 800;
            padding: 5px 8px; cursor: pointer;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
            text-align: center;
        }
        .sem-sub-strip-btn:active { opacity: .75; }
        .sem-sub-strip-btn.active {
            background: #D63E8F; border-color: #A0246A; color: white;
        }

        /* ── SYMBOL CARDS ── */
        .symbol-card {
            background: white; border-radius: 12px;
            padding: 8px 4px;
            display: flex; flex-direction: column;
            align-items: center; justify-content: center; gap: 4px;
            cursor: pointer; border: 2.5px solid transparent;
            transition: transform 0.1s, box-shadow 0.1s;
            box-shadow: 0 2px 6px rgba(0,0,0,0.07);
            min-height: var(--card-minh);
            width: 100%;
            user-select: none;
            position: relative;
        }
        .symbol-card:active { transform: scale(0.93); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

        /* ── SELECTION FEEDBACK flash overlay ── */
        .sel-fb {
            position: fixed; pointer-events: none; z-index: 9999;
            border-radius: 12px;
            animation: sel-fb-fade 0.28s ease-out forwards;
        }
        .sel-fb.fb-contrast { background: rgba(26,46,74,0.32); }
        .sel-fb.fb-border   { box-shadow: 0 0 0 3px #1A2E4A, 0 0 0 5px rgba(26,46,74,0.18); }
        @keyframes sel-fb-fade { 0% { opacity:1; } 100% { opacity:0; } }

        /* feedback chips */
        .feedback-chips { display: flex; gap: 6px; }
        .fb-chip {
            flex: 1; padding: 10px 4px; background: white; border-radius: 12px;
            border: 2px solid #E0E7EF; cursor: pointer; text-align: center;
            transition: all 0.15s;
        }
        .fb-chip .fb-icon  { font-size: 18px; display: block; margin-bottom: 3px; }
        .fb-chip .fb-label { font-size: 11px; font-weight: 700; color: #4A6580; display: block; }
        .fb-chip.active { border-color: #1A2E4A; background: #1A2E4A; }
        .fb-chip.active .fb-label { color: white; }
        .fb-chip:active { opacity: 0.75; }

        /* ── SYMBOL IMAGE (pictogram / url / photo) ── */
        .sym-img {
            width: var(--emoji-sz, 34px); height: var(--emoji-sz, 34px);
            object-fit: contain; border-radius: 4px; display: block;
        }
        #therapistGrid .sym-img { width: 38px; height: 38px; }
        .sentence-symbol .sym-img { width: 34px; height: 34px; }
        #therapistGrid .symbol-card > img { pointer-events: none; }

        /* Image swap button on therapist cards */
        .img-swap-btn {
            position: absolute; top: 4px; left: 5px; z-index: 2;
            width: 20px; height: 20px; border-radius: 6px;
            background: rgba(90,130,180,0.15); border: none;
            font-size: 11px; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            color: #5B8CB8; padding: 0; transition: background 0.15s;
        }
        .img-swap-btn:hover, .img-swap-btn:active { background: rgba(90,130,180,0.35); }
        .mic-rec-btn {
            position: absolute; top: 4px; left: 28px; z-index: 2;
            width: 20px; height: 20px; border-radius: 6px;
            background: rgba(90,130,180,0.15); border: none;
            font-size: 11px; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            color: #5B8CB8; padding: 0; transition: background 0.15s;
        }
        .mic-rec-btn:hover, .mic-rec-btn:active { background: rgba(90,130,180,0.35); }
        .mic-rec-btn.has-audio { background:rgba(16,185,129,.18); color:#059669; }
        /* Renomear / excluir — só nos símbolos ADICIONADOS pelo admin.
           Ficam num rodapé EM FLUXO dentro do card (não absoluto) p/ nunca colidir
           com o ✓/+ nem vazar do card estreito (grid de 4 colunas no celular). */
        .word-admin-actions {
            display: flex; gap: 8px; justify-content: center;
            margin-top: 3px; padding-bottom: 1px;
        }
        .word-rename-btn, .word-del-btn {
            width: 22px; height: 22px; border-radius: 6px;
            border: none; font-size: 12px; cursor: pointer; padding: 0; line-height: 1;
            display: flex; align-items: center; justify-content: center;
            transition: background 0.15s;
        }
        .word-rename-btn { background: rgba(90,130,180,0.15); color: #5B8CB8; }
        .word-rename-btn:hover, .word-rename-btn:active { background: rgba(90,130,180,0.35); }
        .word-del-btn { background: rgba(192,57,43,0.12); color: #C0392B; }
        .word-del-btn:hover, .word-del-btn:active { background: rgba(192,57,43,0.28); }
        /* ── Vocab Audio Modal ── */
        #vocabAudioBackdrop {
            position:fixed; inset:0; z-index:1100;
            background:rgba(0,0,0,.45); display:none;
        }
        #vocabAudioBackdrop.visible { display:block; }
        /* Crédito da fonte dos pictogramas (exigência de licença enquanto a
           biblioteca própria não entra). Discreto, mas legível. */
        .ip-credit {
            font-size:10.5px; line-height:1.4; color:#94A3B8; text-align:center;
            padding:8px 12px 2px; border-top:1px solid #EEF2F7; margin-top:8px;
        }

        .mgmt-help-link {
            display:block; margin:18px auto 8px; padding:7px 14px;
            border:1px solid rgba(255,255,255,.16); background:rgba(255,255,255,.05);
            border-radius:99px; color:rgba(255,255,255,.6);
            font-size:12px; font-weight:600; cursor:pointer;
        }
        .mgmt-help-link:hover { background:rgba(255,255,255,.11); color:#fff; }

        /* ── Dica contextual da tela (uma frase, dispensável) ── */
        #screenHint:empty { display:none; }
        .hint-strip {
            display:flex; align-items:flex-start; gap:10px;
            background:#EEF4FC; border-bottom:1px solid #DCE6F4;
            padding:11px 16px;
        }
        .hint-ico { font-size:14px; line-height:1.5; flex-shrink:0; }
        .hint-txt { flex:1; font-size:12.5px; line-height:1.5; color:#3A5573; }
        .hint-txt b { color:#1A2E4A; font-weight:700; }
        .hint-x {
            flex-shrink:0; border:none; background:transparent; color:#8FA3BD;
            font-size:13px; cursor:pointer; padding:1px 4px; border-radius:5px; line-height:1.4;
        }
        .hint-x:hover { background:#DCE6F4; color:#1A2E4A; }

        /* ── Primeiros passos (apoio ao iniciante, só na Gestão) ── */
        #onboardCard:empty { display:none; }
        /* Recolhido: só uma linha para reabrir */
        #onboardCard.ob-collapsed {
            background:transparent; border:none; box-shadow:none;
            padding:0; margin:0 0 12px;
        }
        .ob-reopen {
            border:1px solid rgba(255,255,255,.16); background:rgba(255,255,255,.06);
            color:rgba(255,255,255,.65); border-radius:99px;
            padding:5px 12px; font-size:11.5px; font-weight:600; cursor:pointer;
        }
        .ob-reopen:hover { background:rgba(255,255,255,.12); color:#fff; }
        .ob-reopen span { opacity:.6; margin-left:4px; }
        #onboardCard:not(.ob-collapsed) {
            background:#fff; border:1px solid #E3E8EF; border-radius:16px;
            padding:16px 18px; margin:0 0 18px;
            box-shadow:0 2px 10px rgba(26,46,74,.06);
        }
        .ob-head { display:flex; align-items:flex-start; gap:12px; margin-bottom:12px; }
        .ob-title { font-size:15px; font-weight:800; color:#1A2E4A; }
        .ob-sub   { font-size:12px; color:#7C8DA4; margin-top:2px; }
        .ob-close {
            margin-left:auto; border:none; background:transparent; color:#94A3B8;
            font-size:15px; cursor:pointer; padding:2px 4px; border-radius:6px; line-height:1;
        }
        .ob-close:hover { background:#F1F5FA; color:#1A2E4A; }
        .ob-bar { height:4px; background:#EDF2F8; border-radius:99px; overflow:hidden; margin-bottom:12px; }
        .ob-bar-fill { height:100%; background:#27AE60; border-radius:99px; transition:width .3s; }
        .ob-list { display:flex; flex-direction:column; gap:2px; }
        .ob-item {
            display:flex; align-items:flex-start; gap:11px; width:100%;
            padding:9px 10px; border:none; background:transparent; border-radius:9px;
            text-align:left; cursor:pointer; font:inherit;
        }
        .ob-item:hover { background:#F5F9FF; }
        /* Concluída continua CLICÁVEL: ao revisitar, a lista serve de índice para
           voltar a cada tela. Só o visual muda (visto + texto mais leve) — sem
           tachado, que faria a linha parecer inerte. */
        .ob-item.done { opacity:.72; }
        .ob-check {
            width:19px; height:19px; flex-shrink:0; margin-top:1px;
            border-radius:50%; border:1.5px solid #CBD5E1;
            display:flex; align-items:center; justify-content:center;
            font-size:11px; font-weight:900; color:#fff;
        }
        .ob-item.done .ob-check { background:#27AE60; border-color:#27AE60; }
        .ob-txt { flex:1; display:flex; flex-direction:column; gap:1px; min-width:0; }
        .ob-txt b { font-size:13.5px; font-weight:700; color:#1A2E4A; }
        .ob-item.done .ob-txt b { color:#5B7089; font-weight:600; }
        .ob-txt i { font-size:11.5px; font-style:normal; color:#7C8DA4; line-height:1.4; }
        .ob-go { color:#B6C6DA; font-size:17px; line-height:1; margin-top:1px; }

        /* Alternador de número no símbolo da frase ("+S" por item) */
        .sentence-symbol { position: relative; }
        .sent-pl-btn {
            position: absolute; top: 2px; right: 2px; z-index: 3;
            min-width: 20px; height: 17px; padding: 0 4px;
            border: 1px solid rgba(26,46,74,.18); border-radius: 5px;
            background: rgba(255,255,255,.82); color: #64748B;
            font-size: 9.5px; font-weight: 900; line-height: 1;
            cursor: pointer; letter-spacing: -.02em;
        }
        .sent-pl-btn:hover { background: #fff; color: #1A2E4A; }
        .sent-pl-btn.on {
            background: #1A2E4A; border-color: #1A2E4A; color: #fff;
        }

        /* ── Agenda: repetição de eventos ── */
        .aa-rep-box { border:1px solid #E3E8EF; border-radius:12px; padding:10px 12px; margin:12px 0; }
        .aa-rep-head { font-size:12.5px; font-weight:800; color:#1A2E4A; margin-bottom:8px; }
        .aa-rep-days { display:flex; gap:5px; margin-bottom:9px; }
        .aa-rep-day {
            flex:1; height:32px; border:2px solid #E3E8EF; border-radius:9px;
            background:#fff; color:#64748B; font-size:13px; font-weight:800; cursor:pointer;
        }
        .aa-rep-day.base { border-style:dashed; border-color:#B6C6DA; }
        .aa-rep-day.on { background:#1A2E4A; border-color:#1A2E4A; color:#fff; }
        .aa-rep-weeks-row { display:flex; align-items:center; gap:8px; font-size:12.5px; color:#64748B; }
        .aa-rep-weeks {
            flex:1; padding:7px 9px; border:1px solid #E3E8EF; border-radius:9px;
            font-size:12.5px; color:#1A2E4A; background:#fff;
        }
        .aa-rep-hint { font-size:11px; color:#94A3B8; margin-top:7px; line-height:1.4; }

        /* ── Imprimir pranchas (baixa tecnologia) ── */
        #printBoardsModal {
            position:fixed; inset:0; z-index:1200; display:none;
            background:rgba(15,23,38,.55); align-items:center; justify-content:center;
            padding:16px;
        }
        #printBoardsModal.open { display:flex; }
        .pb-sheet {
            background:#fff; border-radius:20px; overflow:hidden;
            width:min(560px,96vw); max-height:92vh; display:flex; flex-direction:column;
            box-shadow:0 12px 48px rgba(0,0,0,.28);
        }
        .pb-header { background:#1A2E4A; color:#fff; padding:14px 16px;
                     display:flex; align-items:center; gap:10px; }
        .pb-header-title { flex:1; font-size:15px; font-weight:800; }
        .pb-close-btn { background:rgba(255,255,255,.15); border:none; border-radius:8px;
                        color:#fff; width:28px; height:28px; font-size:14px; cursor:pointer; }
        .pb-body { padding:16px; overflow-y:auto; }
        .pb-sec { border:1px solid #E3E8EF; border-radius:14px; padding:14px; margin-bottom:14px; }
        .pb-sec:last-child { margin-bottom:0; }
        .pb-sec-title { font-size:14px; font-weight:800; color:#1A2E4A; margin-bottom:4px; }
        .pb-sec-desc  { font-size:12px; color:#64748B; line-height:1.45; margin-bottom:10px; }
        .pb-print-btn {
            width:100%; padding:11px; border:none; border-radius:10px;
            background:#1A2E4A; color:#fff; font-size:13px; font-weight:800; cursor:pointer;
        }
        .pb-print-btn:disabled { background:#CBD5E1; cursor:default; }
        .pb-grid-row { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:12px; }
        .pb-grid-btn {
            flex:1; min-width:56px; padding:8px 4px; border:2px solid #E3E8EF;
            border-radius:10px; background:#fff; cursor:pointer;
            font-size:15px; font-weight:900; color:#1A2E4A;
            display:flex; flex-direction:column; align-items:center; gap:1px;
        }
        .pb-grid-btn span { font-size:9px; font-weight:700; color:#94A3B8; }
        .pb-grid-btn.active { border-color:#1A2E4A; background:#EEF3F9; }
        .pb-cats-head { display:flex; align-items:center; justify-content:space-between;
                        font-size:11px; color:#64748B; margin-bottom:6px; gap:8px; }
        .pb-mini-btn { border:1px solid #E3E8EF; background:#fff; border-radius:7px;
                       padding:3px 8px; font-size:11px; cursor:pointer; color:#1A2E4A; margin-left:4px; }
        .pb-cats { max-height:34vh; overflow-y:auto; border:1px solid #EEF2F7;
                   border-radius:10px; margin-bottom:12px; }
        .pb-cat { display:flex; align-items:center; gap:8px; padding:8px 10px;
                  border-bottom:1px solid #F3F6FA; font-size:12.5px; cursor:pointer; color:#37474F; }
        .pb-cat:last-child { border-bottom:none; }
        .pb-cat.on { background:#F7FAFF; color:#1A2E4A; font-weight:600; }
        .pb-cat-name { flex:1; }
        .pb-cat-count { font-size:11px; color:#94A3B8; font-weight:700; }
        .pb-empty { padding:14px; text-align:center; color:#94A3B8; font-size:12px; }

        #vocabAudioModal {
            position:fixed; left:50%; top:50%; transform:translate(-50%,-50%);
            z-index:1101; background:white; border-radius:20px;
            box-shadow:0 12px 48px rgba(0,0,0,.28);
            width:min(340px, 92vw); display:none; flex-direction:column;
            overflow:hidden;
        }
        #vocabAudioModal.visible { display:flex; }
        .va-header {
            background:#1A2E4A; color:white; padding:14px 16px;
            display:flex; align-items:center; gap:10px;
        }
        .va-header-title { flex:1; font-size:14px; font-weight:800; }
        .va-close-btn {
            background:rgba(255,255,255,.15); border:none; border-radius:8px;
            color:white; font-size:16px; width:28px; height:28px;
            cursor:pointer; display:flex; align-items:center; justify-content:center;
        }
        .va-body { padding:18px 16px; display:flex; flex-direction:column; gap:14px; }
        .va-word-preview {
            display:flex; align-items:center; gap:10px;
            background:#F8FAFC; border-radius:12px; padding:10px 14px;
        }
        .va-word-emoji { font-size:28px; }
        .va-word-label { font-size:16px; font-weight:800; color:#1A2E4A; }
        .va-status {
            font-size:12px; text-align:center; color:#64748B;
            padding:6px; background:#F1F5F9; border-radius:8px;
        }
        .va-status.recording { background:#FEE2E2; color:#DC2626; font-weight:700;
            animation: vaRecPulse .7s infinite; }
        @keyframes vaRecPulse { 0%,100%{opacity:1} 50%{opacity:.55} }
        .va-status.has-audio { background:#ECFDF5; color:#059669; }
        .va-btn-row { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
        .va-btn {
            display:flex; align-items:center; gap:6px; padding:9px 16px;
            border-radius:12px; border:2px solid #E2E8F0;
            font-size:13px; font-weight:700; cursor:pointer;
            background:white; color:#1A2E4A; transition:background .15s;
        }
        .va-btn:active { opacity:.8; }
        .va-btn-record { border-color:#FB923C; background:#FFF7ED; color:#C2410C; }
        .va-btn-record.recording { border-color:#DC2626; background:#FEE2E2; color:#DC2626; }
        .va-btn-play   { border-color:#6EE7B7; background:#ECFDF5; color:#065F46; }
        .va-btn-remove { border-color:#FECACA; background:#FEF2F2; color:#DC2626; }

        /* ── IMAGE PICKER bottom sheet ── */
        #imgPickerBackdrop {
            position: fixed; inset: 0; z-index: 1400;
            background: rgba(0,0,0,0.45); display: none;
        }
        #imgPickerBackdrop.visible { display: block; }
        #imgPicker {
            position: fixed; bottom: 0; left: 0; right: 0; z-index: 1401;
            background: white; border-radius: 20px 20px 0 0;
            max-height: 74vh; display: flex; flex-direction: column;
            transform: translateY(100%);
            transition: transform 0.3s cubic-bezier(0.32,0,0,1);
            box-shadow: 0 -6px 32px rgba(0,0,0,0.18);
        }
        #imgPicker.visible { transform: translateY(0); }
        .ip-header {
            display: flex; align-items: center; gap: 10px;
            padding: 14px 16px 10px; flex-shrink: 0;
            border-bottom: 1px solid #E8EDF2;
        }
        .ip-word-preview { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
        .ip-word-emoji  { font-size: 24px; flex-shrink: 0; }
        .ip-word-label  { font-size: 14px; font-weight: 700; color: #1A2E4A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ip-close-btn   { background: none; border: none; font-size: 20px; cursor: pointer; color: #95A5A6; padding: 4px; flex-shrink: 0; }
        .ip-tabs {
            display: flex; gap: 0; flex-shrink: 0;
            border-bottom: 1px solid #E8EDF2; padding: 0 16px;
        }
        .ip-tab {
            flex: 1; padding: 10px 4px; border: none; background: none;
            font-size: 11px; font-weight: 700; color: #95A5A6;
            cursor: pointer; border-bottom: 2.5px solid transparent;
            margin-bottom: -1px; transition: all 0.15s;
        }
        .ip-tab.active { color: #1A2E4A; border-bottom-color: #1A2E4A; }
        #ipBody { flex: 1; overflow-y: auto; padding: 14px 14px 32px; }
        /* ARASAAC */
        .arasaac-search-row { display: flex; gap: 8px; margin-bottom: 12px; }
        .arasaac-search-input {
            flex: 1; padding: 9px 12px; border-radius: 10px;
            border: 2px solid #E0E7EF; font-size: 13px; outline: none;
        }
        .arasaac-search-input:focus { border-color: #1A2E4A; }
        .arasaac-search-btn {
            padding: 9px 14px; border-radius: 10px; border: none;
            background: #1A2E4A; color: white; font-size: 13px; font-weight: 700; cursor: pointer;
        }
        .arasaac-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
        .arasaac-item {
            background: #F5F8FB; border-radius: 10px; padding: 6px 4px;
            display: flex; flex-direction: column; align-items: center; gap: 4px;
            cursor: pointer; border: 2px solid transparent; transition: all 0.15s;
        }
        .arasaac-item:active, .arasaac-item.selected { border-color: #1A2E4A; background: #E4EDF8; }
        .arasaac-item img { width: 58px; height: 58px; object-fit: contain; border-radius: 4px; }
        .acervo-grupo + .acervo-grupo { margin-top: 12px; }
        .acervo-grupo-titulo { font-size: 12px; font-weight: 700; color: #1A2E4A; margin: 0 0 6px; }
        .arasaac-item span { font-size: 9px; color: #4A6580; text-align: center; line-height: 1.2; word-break: break-word; }
        .ip-loading { text-align: center; padding: 32px 0; color: #95A5A6; font-size: 13px; }
        /* URL tab */
        .ip-url-row { display: flex; flex-direction: column; gap: 10px; }
        .ip-section-label { font-size: 11px; font-weight: 800; color: #95A5A6; text-transform: uppercase; letter-spacing: 0.4px; }
        .ip-url-input {
            width: 100%; padding: 10px 12px; border-radius: 10px;
            border: 2px solid #E0E7EF; font-size: 13px; outline: none; box-sizing: border-box;
        }
        .ip-url-input:focus { border-color: #1A2E4A; }
        .ip-url-preview-wrap { display: flex; align-items: center; gap: 10px; min-height: 60px; }
        .ip-url-preview { width: 80px; height: 80px; object-fit: contain; border-radius: 8px; display: none; border: 2px solid #E0E7EF; }
        .ip-apply-btn {
            padding: 13px; border-radius: 12px; border: none;
            background: #1A2E4A; color: white; font-size: 13px; font-weight: 700;
            cursor: pointer; width: 100%; transition: opacity 0.15s;
        }
        .ip-apply-btn:active { opacity: 0.75; }
        /* Gallery tab */
        .ip-gallery-zone { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 20px 0; }
        .ip-gallery-hint { font-size: 12px; color: #95A5A6; text-align: center; }
        .ip-gallery-label {
            padding: 16px 28px; border-radius: 14px; border: 2px dashed #C5D3E0;
            background: #F5F8FB; color: #1A2E4A; font-size: 14px; font-weight: 700;
            cursor: pointer; display: flex; align-items: center; gap: 8px;
        }
        .ip-gallery-preview { max-width: 130px; max-height: 130px; border-radius: 10px; display: none; border: 2px solid #E0E7EF; }
        /* Emoji tab */
        .ip-emoji-zone { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px 0; }
        .ip-emoji-display { font-size: 72px; line-height: 1; min-height: 80px; }
        .ip-emoji-input-row {
            width: 100%; display: flex; flex-direction: column; gap: 6px;
        }
        .ip-emoji-input {
            width: 100%; box-sizing: border-box;
            border: 2px solid #D0D8E4; border-radius: 10px;
            padding: 10px 12px; font-size: 26px; text-align: center;
            outline: none; font-family: inherit;
        }
        .ip-emoji-input:focus { border-color: #1A2E4A; }
        .ip-revert-btn {
            padding: 13px 24px; border-radius: 12px; border: none;
            background: #F0F4F8; color: #1A2E4A; font-size: 13px; font-weight: 700; cursor: pointer;
        }

        /* ── ACTIVATION-MODE: selection cards ── */
        .sel-card { overflow: hidden; }

        /* ── Toque da criança ──────────────────────────────────────────
           .symbol-card tinha só `user-select: none` sem o prefixo -webkit-,
           que é o que o Safari/iOS lê. Por isso, ao arrastar um pouco o dedo,
           o iPad começava a SELECIONAR o texto do pictograma ou a arrastar a
           imagem em vez de ativar o card. */
        .symbol-card, .sel-card {
            -webkit-user-select: none; user-select: none;
            -webkit-touch-callout: none;      /* sem menu de toque longo */
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;       /* sem zoom de toque duplo nem atraso */
        }
        /* Filhos não recebem o toque: o alvo do evento é SEMPRE o card, então
           encostar no rótulo ou na figura nunca erra o destino. */
        .symbol-card > *, .sel-card > * { pointer-events: none; }
        /* …exceto os controles que o adulto usa na tela de gestão. */
        .symbol-card .img-swap-btn, .symbol-card .mic-rec-btn,
        .symbol-card .conj-access-btn, .symbol-card .word-admin-actions,
        .symbol-card .word-admin-actions *, .symbol-card .drag-handle {
            pointer-events: auto;
        }
        .symbol-card img, .sel-card img {
            -webkit-user-drag: none; user-drag: none; -webkit-touch-callout: none;
        }
        .sel-card.act-dwell::after {
            content: '';
            position: absolute; inset: 0;
            border-radius: inherit;
            background: rgba(26, 46, 74, 0.22);
            transform: scaleX(0);
            transform-origin: left center;
            animation: dwell-grow var(--dwell-ms, 2000ms) linear forwards;
            pointer-events: none;
        }
        @keyframes dwell-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
        .symbol-card .emoji { font-size: var(--emoji-sz); line-height: 1; }
        /* Capa de categoria com pictograma (em vez do emoji do rótulo) */
        .folder-cover-img { width: var(--emoji-sz); height: var(--emoji-sz);
            object-fit: contain; border-radius: 6px; }
        /* Botão de escolher a capa da categoria de topo (aba ativa) */
        .sub-cover-btn { border: none; background: #E3F2FD; color: #1565C0; cursor: pointer;
            font-size: 15px; padding: 4px 9px; border-radius: 8px; margin-left: -4px;
            vertical-align: middle; }
        .sub-cover-btn:active { transform: scale(0.94); }
        .symbol-card .label {
            font-size: var(--label-sz); font-weight: 700; text-align: center;
            text-transform: uppercase; letter-spacing: 0.3px;
        }
        .noun              { background: #FFF0F3; border-color: #FFB3C1; }
        .noun .label       { color: #B0274A; }
        .verb              { background: #F0FBF0; border-color: #86D986; }
        .verb .label       { color: #256B29; }
        .verb-aux          { background: #E8F5E9; border-color: #66BB6A; }
        .verb-aux .label   { color: #1B5E20; }
        .pronoun           { background: #FFFDE7; border-color: #FFD54F; }
        .pronoun .label    { color: #7A5C00; }
        .grammar           { background: #FFF3E0; border-color: #FFCC80; }
        .grammar .label    { color: #7A3D00; }
        .interrogative     { background: #E3F2FD; border-color: #90CAF9; }
        .interrogative .label { color: #1055A8; }
        .adj               { background: #EDE7F6; border-color: #CE93D8; }
        .adj .label        { color: #6A1B9A; }
        .emotion           { background: #FCE4EC; border-color: #F48FB1; }
        .emotion .label    { color: #880E4F; }

        /* Therapist grid: fixed sizes, immune to communicator CSS-var scale */
        #therapistGrid .symbol-card {
            min-height: 104px;
            padding: 28px 5px 6px;   /* top: clear img-swap/mic-rec/toggle; bottom: minimal */
            justify-content: flex-start;
            gap: 3px;
        }
        #therapistGrid .sym-img            { width: 30px; height: 30px; }
        #therapistGrid .symbol-card .emoji { font-size: 22px; }
        #therapistGrid .symbol-card .label { font-size: 10px; font-weight: 800; }

        /* Therapist: toggle state */
        .symbol-card.disabled { opacity: 0.32; filter: grayscale(0.5); }
        .toggle-icon {
            position: absolute; top: 5px; right: 5px;
            width: 20px; height: 20px; border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-size: 11px; font-weight: 900;
        }
        .symbol-card.enabled .toggle-icon  { background: #27AE60; color: white; }
        .symbol-card.disabled .toggle-icon { background: #D0D8E4; color: #95A5A6; }

        /* ── DRAG-TO-REORDER ── */
        .symbol-card.dragging {
            opacity: 0.35;
            outline: 2px dashed #5B9BD5;
            outline-offset: -3px;
        }
        .symbol-card.drag-over {
            outline: 3px solid #27AE60;
            outline-offset: -3px;
            background: rgba(39,174,96,0.08);
        }
        /* Prevent child spans from intercepting pointer events during drag.
           This stops dragenter/dragleave from firing on child elements,
           which would cause drag-over to flicker and drops to fail. */
        #therapistGrid .symbol-card > span { pointer-events: none; }
        #drag-ghost {
            position: fixed; pointer-events: none; z-index: 9999;
            border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.28);
            transform: scale(1.08) rotate(2deg);
            transition: transform 0.1s;
            opacity: 0.9;
        }
        .drag-handle {
            position: absolute; bottom: 4px; right: 5px;
            font-size: 13px; color: rgba(0,0,0,0.22);
            cursor: grab; line-height: 1; user-select: none;
            -webkit-user-select: none;
        }
        .symbol-card:active .drag-handle { cursor: grabbing; }

        /* ── THERAPIST GRID (css-grid) ── */
        .symbol-grid {
            flex: 1;
            padding: 8px 8px 0;
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 7px;
            overflow-y: auto;
            align-content: start;
        }
        /* A grade da Gestão para em LINHAS INTEIRAS ao rolar.
           Sem isto a rolagem para em qualquer ponto e a primeira linha visível
           fica cortada ao meio — foi o que impediu uma usuária de clicar nos
           pictogramas no computador. `proximity`, e não `mandatory`: só alinha
           quando a parada já está perto, então não briga com quem rola devagar
           no touchpad nem atrapalha o arraste de reordenação. */
        #therapistVocabView .symbol-grid { scroll-snap-type: y proximity; }
        #therapistVocabView .symbol-grid > * { scroll-snap-align: start; }

        @media (min-width: 540px) { .symbol-grid { grid-template-columns: repeat(5, 1fr); } }
        @media (min-width: 800px) { .symbol-grid { grid-template-columns: repeat(6, 1fr); } }

        /* ── SYNTAX NAV (therapist) ── */
        .syntax-nav {
            display: flex; flex-shrink: 0;
            border-bottom: 2px solid #D0D8E4;
            height: 56px; overflow-x: auto;
        }
        .syntax-nav::-webkit-scrollbar { display: none; }
        .syntax-btn {
            flex: 1;
            display: flex; flex-direction: column;
            align-items: center; justify-content: center;
            padding: 3px 4px; border: none; cursor: pointer;
            font-size: 8px; font-weight: 800;
            text-align: center; line-height: 1.25;
            border-bottom: 3px solid transparent;
            transition: filter 0.15s;
        }
        .syntax-btn:active { filter: brightness(0.88); }
        .syntax-btn.active { border-bottom-color: rgba(0,0,0,0.35); filter: brightness(0.93); }
        .btn-interrog  { background: #5B9BD5; color: white; }
        .btn-pronoun   { background: #E8D44D; color: #4A3A00; }
        .btn-verb-aux  { background: #43A047; color: white; }
        .btn-verb-main { background: #8BC34A; color: #2A4A00; }
        .btn-grammar   { background: #FB8C00; color: white; }
        .btn-semantic  { background: #D63E8F; color: white; }
        .btn-adj-apoio { background: #7B1FA2; color: white; }
        .adj-apoio-folder-card { background: #EDE7F6 !important; border-color: #B39DDB !important; }
        .adj-apoio-folder-card .label { color: #4A148C !important; }
        .nav-count {
            font-size: 9px; background: rgba(0,0,0,0.18);
            border-radius: 8px; padding: 1px 5px; margin-top: 2px; font-weight: 700;
        }

        /* ── SUB-NAV ── */
        .sub-nav {
            display: none; background: #FDE8F2;
            border-bottom: 2px solid #F0A8D0;
            flex-shrink: 0; padding: 5px 8px; gap: 6px; overflow-x: auto;
            align-items: center;
        }
        .sub-nav.visible { display: flex; }
        .sub-nav.grammar-sub { background: #FFF3E0; border-bottom-color: #FFCC80; }
        .sub-btn {
            padding: 5px 11px; border: 2px solid #F0A8D0;
            border-radius: 20px; background: white;
            font-size: 11px; font-weight: 700; color: #A0246A;
            cursor: pointer; white-space: nowrap; flex-shrink: 0;
        }
        .sub-nav.grammar-sub .sub-btn { border-color: #FFCC80; color: #7A3D00; }
        .sub-nav.grammar-sub .sub-btn.active { background: #FB8C00; color: white; border-color: #FB8C00; }
        .sub-btn.active { background: #D63E8F; color: white; border-color: #D63E8F; }
        .sub-btn.add-folder-btn {
            background: rgba(214,62,143,0.1); border-style: dashed;
            color: #D63E8F; font-size: 12px;
        }
        .sub-btn.reorder-btn {
            background: rgba(26,46,74,0.07); border-style: dashed;
            color: #1A2E4A; font-size: 12px; flex-shrink: 0;
        }
        .sub-btn.reorder-btn.active {
            background: #27AE60; color: white; border-color: #27AE60; border-style: solid;
        }

        /* ── SECOND-TIER SUB-NAV (semantic sub-folders) ── */
        .sub-subnav {
            display: none; background: #EBF5FB;
            border-bottom: 2px solid #AED6F1;
            flex-shrink: 0; padding: 5px 8px; gap: 6px;
            overflow-x: auto; align-items: center; flex-wrap: nowrap;
        }
        .sub-subnav.visible { display: flex; }

        /* ── Barra de layout da categoria (gestão do vocabulário) ── */
        .vl-toolbar {
            display: none; background: #FDF6FA;
            border-bottom: 2px solid #F0C8DF;
            flex-shrink: 0; padding: 6px 10px; gap: 8px;
            align-items: center; flex-wrap: wrap;
        }
        .vl-toolbar.visible { display: flex; }
        .vl-label { font-size: 11px; font-weight: 800; color: #8B2A63; }
        .vl-cols { display: inline-flex; gap: 3px; }
        .vl-col-btn {
            min-width: 34px; padding: 4px 8px;
            border: 2px solid #F0C8DF; border-radius: 20px; background: white;
            font-size: 11px; font-weight: 700; color: #8B2A63; cursor: pointer;
        }
        .vl-col-btn.active { background: #D63E8F; border-color: #A0246A; color: white; }
        .vl-check {
            display: inline-flex; align-items: center; gap: 5px;
            padding: 4px 10px; border: 2px solid #F0C8DF; border-radius: 20px;
            background: white; font-size: 11px; font-weight: 700;
            color: #8B2A63; cursor: pointer;
        }
        .vl-check .vl-box {
            width: 14px; height: 14px; border: 2px solid #D63E8F; border-radius: 4px;
            display: inline-flex; align-items: center; justify-content: center;
            font-size: 10px; line-height: 1; color: white;
        }
        .vl-check.on { background: #D63E8F; border-color: #A0246A; color: white; }
        .vl-check.on .vl-box { background: #A0246A; border-color: white; }
        .vl-check.disabled { opacity: .45; cursor: not-allowed; }
        .vl-reset {
            padding: 4px 10px; border: 2px solid #D5DBDB; border-radius: 20px;
            background: white; font-size: 11px; font-weight: 700;
            color: #7F8C8D; cursor: pointer;
        }
        .vl-hint { font-size: 10px; color: #A0246A; opacity: .85; flex: 1; min-width: 160px; }
        .vl-edit {
            padding: 4px 10px; border: 2px solid #D63E8F; border-radius: 20px;
            background: white; font-size: 11px; font-weight: 800;
            color: #A0246A; cursor: pointer;
        }
        .vl-edit.disabled { opacity: .45; cursor: not-allowed; border-color: #D5DBDB; color: #7F8C8D; }

        /* ── Editor de layout: prévia do tabuleiro, edição por toque ── */
        #vlEditorBackdrop {
            position: fixed; inset: 0; z-index: 3199;
            background: rgba(0,0,0,0.35); display: none;
        }
        #vlEditorBackdrop.visible { display: block; }
        #vlEditor {
            position: fixed; inset: 5% 4%; z-index: 3200;
            background: white; border-radius: 18px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.25);
            padding: 14px 16px 12px;
            display: none; flex-direction: column;
        }
        #vlEditor.visible { display: flex; }
        .vl-editor-head {
            display: flex; align-items: center; gap: 10px; flex-shrink: 0;
            padding-bottom: 10px; margin-bottom: 10px;
            border-bottom: 2px solid #F0C8DF;
        }
        .vl-editor-title { font-size: 16px; font-weight: 800; color: #8B2A63; flex: 1; }
        .vl-editor-body {
            display: grid; gap: 8px; align-content: start;
            overflow: auto; flex: 1; padding-bottom: 4px;
        }
        .vl-editor-vazio { font-size: 12px; color: #7F8C8D; }
        .vl-editor-foot {
            display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
            flex-shrink: 0; padding-top: 10px; margin-top: 8px;
            border-top: 2px solid #F5F5F5;
        }
        .vl-cell {
            position: relative; min-height: 62px; border-radius: 12px;
            display: flex; flex-direction: column; align-items: center;
            justify-content: center; text-align: center; padding: 8px 4px;
            font-size: 11px; font-weight: 800; line-height: 1.15;
        }
        .vl-word { background: #FFF0F3; border: 2px solid #FFB3C1; color: #8B0000; }
        .vl-cell-label { display: block; margin-top: 2px; word-break: break-word; }
        .vl-gap {
            background: #FAFAFA; border: 2px dashed #D5DBDB; color: #B0B8B8;
            font-size: 16px; cursor: pointer;
        }
        .vl-gap-quebra { border-color: #F0C8DF; color: #D63E8F; background: #FDF6FA; }
        .vl-gap-reserva { border-style: dotted; cursor: default; opacity: .6; }
        .vl-mini {
            position: absolute; top: 2px; width: 28px; height: 24px;
            border: 1px solid #F0C8DF; border-radius: 6px; background: rgba(255,255,255,.95);
            font-size: 11px; font-weight: 800; color: #8B2A63;
            cursor: pointer; padding: 0; line-height: 1;
        }
        .vl-mini:first-child { left: 2px; }
        .vl-mini-qbr { right: 2px; left: auto; }
        .vl-mini-qbr.on { background: #D63E8F; color: white; }
        .sub-sub-btn {
            padding: 4px 10px; border: 2px solid #AED6F1;
            border-radius: 20px; background: white;
            font-size: 11px; font-weight: 700; color: #1A5276;
            cursor: pointer; white-space: nowrap; flex-shrink: 0;
            display: flex; align-items: center; gap: 4px;
        }
        .sub-sub-btn.active { background: #2980B9; color: white; border-color: #2980B9; }
        .sub-sub-btn.add-sub-btn {
            background: rgba(41,128,185,0.1); border-style: dashed;
            color: #2980B9; font-size: 12px;
        }
        .sub-sub-btn.sub-drop-target {
            background: #1A5276; color: white; border-color: #1A5276; border-style: solid;
            transform: scale(1.12);
            box-shadow: 0 2px 10px rgba(26,82,118,.45);
            transition: transform .12s, background .12s;
        }
        .del-sub-btn {
            background: none; border: none; color: #E74C3C;
            cursor: pointer; font-size: 11px; padding: 0 2px;
            font-weight: 900; line-height: 1;
        }
        /* wrapper that groups the 🖼 button + sub button together */
        .sub-sub-item {
            display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0;
        }
        /* small image-pick button beside each sub */
        .sub-img-pick-btn {
            background: white; border: 2px solid #AED6F1;
            border-radius: 8px; font-size: 11px; padding: 3px 5px;
            cursor: pointer; flex-shrink: 0; line-height: 1;
            color: #1A5276;
        }
        .sub-img-pick-btn:active { background: #D6EAF8; }

        /* ── ADD ITEM BAR (therapist) ── */
        .add-item-bar {
            flex-shrink: 0;
            padding: 8px;
            background: #F8FAFC;
            border-top: 2px dashed #D0D8E4;
            display: flex; gap: 6px; align-items: center;
        }
        .add-input {
            border: 2px solid #D0D8E4; border-radius: 8px;
            padding: 7px 9px; font-size: 13px;
            font-family: inherit; outline: none; color: #1A2E4A;
            background: white;
        }
        .add-input:focus { border-color: #27AE60; }
        .add-input-emoji { width: 56px; text-align: center; font-size: 20px; }
        .add-input-label { flex: 1; }
        .add-confirm-btn {
            padding: 7px 14px; border: none; border-radius: 8px;
            background: #27AE60; color: white;
            font-size: 13px; font-weight: 700; cursor: pointer; flex-shrink: 0;
        }
        .add-confirm-btn:active { opacity: 0.8; }

        /* ── THERAPIST SCREEN ── */
        .therapist-header {
            background: #2C4A6E; padding: 10px 14px;
            display: flex; align-items: center; gap: 10px; flex-shrink: 0;
        }
        .therapist-header-info { flex: 1; }
        .therapist-header-title { color: white; font-size: 14px; font-weight: 700; }
        .therapist-header-subtitle { color: rgba(255,255,255,0.55); font-size: 11px; margin-top: 1px; }
        .therapist-close-btn {
            background: rgba(255,255,255,0.15); border: none;
            color: white; border-radius: 10px;
            padding: 7px 14px; font-size: 12px; font-weight: 700; cursor: pointer;
        }
        .therapist-close-btn:active { background: rgba(255,255,255,0.25); }


        /* ── GRID SIZE ROW ── */
        .grid-row {
            background: #1E3A5F; padding: 7px 14px;
            display: flex; align-items: center; gap: 7px; flex-shrink: 0;
        }
        .grid-row-label {
            color: rgba(255,255,255,0.65); font-size: 10px;
            font-weight: 700; flex-shrink: 0; text-transform: uppercase;
            letter-spacing: 0.4px;
        }
        .grid-btn {
            flex: 1; padding: 5px 2px; border-radius: 7px;
            border: 2px solid rgba(255,255,255,0.2);
            background: transparent; color: rgba(255,255,255,0.55);
            font-size: 10px; font-weight: 800; cursor: pointer;
            text-align: center; line-height: 1.4;
        }
        .grid-btn .grid-lbl { display: block; font-size: 12px; }
        .grid-btn .grid-sub { display: block; font-size: 8px; opacity: 0.75; }
        .grid-btn.active { background: white; color: #1A2E4A; border-color: white; }
        .grid-btn:active { opacity: 0.75; }

        .std-img-bar {
            display: flex; align-items: center; gap: 8px;
            padding: 8px 14px; background: #E8EEF5; flex-shrink: 0;
            border-bottom: 1px solid #D5DEE8;
            /* Em tela estreita as ações voltam a ocupar duas linhas — o ganho
               de altura é só onde há largura sobrando para ele. */
            flex-wrap: wrap; row-gap: 6px;
        }
        .std-img-sep {
            width: 1px; align-self: stretch; min-height: 20px;
            background: #C6D2E0; margin: 0 4px;
        }
        .std-img-lbl { font-size: 12px; font-weight: 700; color: #546E7A; }
        .std-img-btn {
            padding: 7px 14px; border-radius: 10px; border: 1.5px solid #B0BEC5;
            background: #fff; color: #1A2E4A; font-size: 12px; font-weight: 700;
            cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
            transition: transform .1s;
        }
        .std-img-btn:active { transform: scale(.94); }
        .std-progress-overlay {
            position: fixed; inset: 0; background: rgba(0,0,0,.65);
            z-index: 2600; display: none; align-items: center; justify-content: center;
        }
        .std-progress-overlay.open { display: flex; }
        .std-progress-box {
            background: #fff; border-radius: 20px; padding: 26px 24px;
            width: min(340px, 90vw); display: flex; flex-direction: column;
            align-items: center; gap: 12px;
        }
        .std-progress-title { font-size: 16px; font-weight: 800; color: #1A2E4A; }
        .std-progress-word  { font-size: 14px; color: #78909C; min-height: 20px; }
        .std-progress-track {
            width: 100%; height: 10px; border-radius: 5px; background: #ECEFF1; overflow: hidden;
        }
        .std-progress-fill {
            height: 100%; width: 0%; background: #1A2E4A; border-radius: 5px;
            transition: width .2s ease;
        }
        .std-progress-count { font-size: 12px; color: #90A4AE; }
        .std-progress-cancel {
            margin-top: 4px; padding: 9px 22px; border-radius: 11px; border: none;
            background: #FFEBEE; color: #C62828; font-size: 13px; font-weight: 700; cursor: pointer;
        }
        .therapist-hint {
            background: #EBF2FA; padding: 7px 14px; flex-shrink: 0;
            font-size: 11px; color: #3A5F8A; font-weight: 600;
            border-bottom: 1px solid #C8D8F0;
        }

        /* ── BOTTOM BAR ── */
        .bottom-bar {
            background: white; border-top: 2px solid #E0E7EF;
            padding: 7px 12px;
            display: flex; gap: 8px; align-items: center;
            flex-shrink: 0; overflow-x: auto;
        }
        .bottom-resource {
            display: flex; flex-direction: column; align-items: center;
            padding: 6px 12px; border: 2px solid #E0E7EF;
            border-radius: 10px; background: #F8FAFC;
            cursor: pointer; gap: 3px; flex-shrink: 0; opacity: 0.5;
        }
        .bottom-resource .res-emoji { font-size: 17px; }
        .bottom-resource .res-label {
            font-size: 9px; font-weight: 700; color: #95A5A6;
            text-transform: uppercase;
        }
        .bottom-legend {
            margin-left: auto; flex-shrink: 0;
            padding: 6px 12px; border: none;
            border-radius: 10px; background: #F8FAFC;
            cursor: pointer; font-size: 11px; font-weight: 700; color: #95A5A6;
        }

        /* ── SCREENS ── */
        .screen { display: none; flex-direction: column; flex: 1; overflow: hidden; }
        .screen.active { display: flex; }

        /* ── RECEPTIVE ── */
        .receptive-display {
            flex: 1; padding: 14px; background: white; margin: 10px;
            border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.08);
            display: flex; flex-wrap: nowrap;
            align-items: center; justify-content: flex-start;
            gap: 16px; overflow-x: auto; overflow-y: hidden;
            -webkit-overflow-scrolling: touch;
        }
        .receptive-placeholder { text-align: center; color: #BCC5D0; margin: auto; }
        .receptive-listening-state { margin: auto; }
        .receptive-placeholder .icon { font-size: 52px; display: block; margin-bottom: 10px; }
        .receptive-placeholder .text { font-size: 15px; line-height: 1.6; }
        .receptive-listening-state {
            display: flex; flex-direction: column;
            align-items: center; justify-content: center; gap: 16px;
        }
        .listening-waves { display: flex; gap: 7px; align-items: center; height: 44px; }
        .listening-waves span {
            width: 7px; border-radius: 4px; background: #C0392B;
            animation: wave 1s ease-in-out infinite;
        }
        .listening-waves span:nth-child(1) { height: 18px; animation-delay: 0s; }
        .listening-waves span:nth-child(2) { height: 38px; animation-delay: 0.15s; }
        .listening-waves span:nth-child(3) { height: 26px; animation-delay: 0.3s; }
        .listening-waves span:nth-child(4) { height: 38px; animation-delay: 0.45s; }
        .listening-waves span:nth-child(5) { height: 18px; animation-delay: 0.6s; }
        @keyframes wave {
            0%,100% { transform: scaleY(0.45); opacity: 0.6; }
            50%     { transform: scaleY(1);    opacity: 1; }
        }
        .listening-label { font-size: 17px; font-weight: 700; color: #C0392B; }
        /* ── Frases guardadas ──────────────────────────────────────
           Uma linha só, rolável: a barra não pode roubar altura dos
           pictogramas, que são o que a criança lê. Vazia, não ocupa nada. */
        .receptive-frases {
            display: flex; gap: 8px; flex-shrink: 0;
            overflow-x: auto; overflow-y: hidden;
            padding: 0 16px; scrollbar-width: none;
        }
        .receptive-frases:not(:empty) { padding: 6px 16px 2px; }
        .receptive-frases::-webkit-scrollbar { display: none; }
        .rf-chip {
            display: inline-flex; align-items: stretch; flex-shrink: 0;
            border: 2px solid #CBD5E1; border-radius: 999px;
            background: #F8FAFC; overflow: hidden;
        }
        .rf-chip.fixa { border-color: #F39C12; background: #FFF8EC; }
        .rf-chip-t {
            border: 0; background: none; cursor: pointer;
            padding: 7px 4px 7px 14px; font: inherit; font-size: 13px; font-weight: 600;
            color: #334155; white-space: nowrap; max-width: 42vw;
            overflow: hidden; text-overflow: ellipsis;
        }
        .rf-chip-x {
            border: 0; background: none; cursor: pointer;
            padding: 0 10px 0 6px; font-size: 11px; color: #94A3B8; line-height: 1;
        }
        .rf-chip-x:hover { color: #C0392B; }
        .rf-chip-t:active { background: #E2E8F0; }
        .rf-guardar-btn {
            border: 1.5px solid #CBD5E1; background: #fff; border-radius: 999px;
            padding: 3px 10px; font-size: 11.5px; font-weight: 700; color: #64748B;
            cursor: pointer; white-space: nowrap; flex-shrink: 0;
        }
        .rf-guardar-btn.on { border-color: #F39C12; background: #FFF8EC; color: #B9770E; }
        .rf-chip-t:focus-visible, .rf-chip-x:focus-visible,
        .rf-guardar-btn:focus-visible { outline: 2px solid #2563EB; outline-offset: 2px; }
        /* Ocupado (escutando/processando) COM frase na tela: os pictogramas
           anteriores ficam, apenas atenuados, para a criança ter onde sustentar
           a atenção durante a espera. Sem transição de saída: a frase nova
           precisa aparecer no instante em que chega. */
        .receptive-display.r-ocupado { opacity: 0.45; }
        .r-ocupado-aviso {
            display: inline-flex; align-items: center; gap: 8px;
            font-size: 12px; font-weight: 700; color: #C0392B;
        }
        .listening-waves.sm { gap: 4px; height: 14px; }
        .listening-waves.sm span { width: 4px; border-radius: 3px; }
        .listening-waves.sm span:nth-child(1) { height: 7px; }
        .listening-waves.sm span:nth-child(2) { height: 14px; }
        .listening-waves.sm span:nth-child(3) { height: 10px; }
        @media (prefers-reduced-motion: reduce) {
            .listening-waves span { animation: none; }
        }
        @keyframes popIn {
            from { transform: scale(0.6); opacity: 0; }
            to   { transform: scale(1);   opacity: 1; }
        }
        .receptive-symbol:first-child { margin-left: auto; }
        .receptive-symbol:last-child  { margin-right: auto; }
        .receptive-symbol {
            display: flex; flex-direction: column; align-items: center;
            gap: calc(var(--rcw, 150px) * 0.08);
            padding: calc(var(--rcw, 150px) * 0.13) calc(var(--rcw, 150px) * 0.10);
            border-radius: 22px;
            border: 3.5px solid #E0E7EF; background: #F8FAFC;
            animation: popIn 0.25s ease-out backwards;
            width: var(--rcw, 150px); min-width: 0; flex-shrink: 0;
            position: relative;
        }
        .receptive-symbol.noun        { background: #FFF0F3; border-color: #FFB3C1; }
        .receptive-symbol.verb        { background: #F0FBF0; border-color: #86D986; }
        .receptive-symbol.verb-aux    { background: #E8F5E9; border-color: #66BB6A; }
        .receptive-symbol.pronoun     { background: #FFFDE7; border-color: #FFD54F; }
        .receptive-symbol.grammar     { background: #FFF3E0; border-color: #FFCC80; }
        .receptive-symbol.interrogative { background: #E3F2FD; border-color: #90CAF9; }
        /* Numeral: o dígito é o símbolo, então ele ocupa o lugar do pictograma */
        .receptive-symbol.number      { background: #F3E9F6; border-color: #C79BD4; }
        .r-numeral-glyph {
            font-size: calc(var(--rcw, 150px) * 0.46);
            font-weight: 800; color: #5A2168; line-height: 1;
            font-variant-numeric: tabular-nums; letter-spacing: -.02em;
        }
        /* Marcação de PERGUNTA: realce do painel + card "?" no fim (sim/não) */
        .receptive-display.receptive-question {
            box-shadow: inset 0 0 0 3px #90CAF9;
            border-radius: 18px;
        }
        .receptive-symbol.r-qmark { background: #E3F2FD; border-color: #64B5F6; }
        .receptive-symbol.r-qmark .r-emoji { font-size: calc(var(--rcw, 150px) * 0.42); }
        .receptive-symbol.r-qmark .r-label { color: #1565C0; }
        /* ── NÍVEL 2 (expandido): chip gramatical atenuado — artigo/preposição/
              cópula. Pequeno, esmaecido e sem pictograma: recompõe o frame
              sintático sem competir com a saliência dos pictogramas de conteúdo. */
        .receptive-symbol.r-fn {
            width: auto; min-width: 0; flex-shrink: 1; align-self: center;
            padding: calc(var(--rcw,150px)*0.05) calc(var(--rcw,150px)*0.08);
            border: 2px dashed #D8C6A8; background: #FBF6EC;
            opacity: 0.66; box-shadow: none;
        }
        .receptive-symbol.r-fn .r-fn-label {
            font-size: calc(var(--rcw,150px)*0.16); font-weight: 700;
            color: #9A7B45; line-height: 1.1;
        }
        .receptive-symbol.r-fn.speaking { opacity: 1; transform: scale(1.04); }
        /* ── NÍVEL 3 (completo): badge de morfologia no canto do pictograma.
              Plural (＋, verde), passado (◀, âmbar), futuro (▶, azul). Só o
              marcado ganha selo; singular/presente são a forma-base. */
        .receptive-symbol .r-morph {
            position: absolute; top: -8px; left: -4px; z-index: 3;
            min-width: 22px; height: 22px; padding: 0 5px; border-radius: 12px;
            display: flex; align-items: center; justify-content: center;
            font-size: 13px; font-weight: 900; color: #fff; line-height: 1;
            box-shadow: 0 1px 4px rgba(0,0,0,.28); border: 2px solid #fff;
        }
        .r-morph.m-num  { background: #2E7D32; }
        .r-morph.m-past { background: #B45309; }
        .r-morph.m-fut  { background: #1565C0; }
        /* Seletor de nível de linguagem (por perfil) */
        .receptive-level {
            display: flex; align-items: center; justify-content: center;
            gap: 10px; padding: 8px 0 2px;
        }
        .receptive-level .rl-cap {
            font-size: 11.5px; font-weight: 800; color: #78909C;
            text-transform: uppercase; letter-spacing: .05em;
        }
        .rl-seg {
            display: inline-flex; background: #E8EDF2; border-radius: 10px;
            padding: 3px; gap: 2px;
        }
        .rl-opt {
            border: none; background: transparent; cursor: pointer;
            font-size: 12.5px; font-weight: 700; color: #607D8B;
            padding: 6px 13px; border-radius: 8px; transition: all .15s;
        }
        .rl-opt.active {
            background: #1A2E4A; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2);
        }
        .rl-auto-hint {
            font-size: 12px; font-weight: 700; color: #3B82C4; letter-spacing: .02em;
        }
        /* Entitlements — trava de recurso premium no receptivo */
        .premium-lock { margin: auto; text-align: center; max-width: 460px; padding: 24px; }
        .premium-lock .pl-badge {
            display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .04em;
            color: #7A5A00; background: #FFF3D6; border: 1px solid #F2D98A;
            padding: 5px 12px; border-radius: 20px; margin-bottom: 16px; }
        .premium-lock .pl-title { font-size: 22px; font-weight: 800; color: #2B3552; margin-bottom: 8px; }
        .premium-lock .pl-sub { font-size: 15px; color: #64748B; line-height: 1.6; }
        .premium-lock .pl-note { font-size: 13px; color: #90A4AE; margin-top: 18px; }
        /* Contador do trial na home do terapeuta */
        .ent-trial-banner {
            display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
            background: #EAF2FF; border: 1px solid #BBD4F5; border-radius: 12px;
            padding: 10px 14px; margin-bottom: 10px; }
        .ent-trial-banner .etb-pill {
            font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
            color: #fff; background: #3B82C4; padding: 4px 10px; border-radius: 20px; }
        .ent-trial-banner .etb-txt { font-size: 13px; color: #1E3A5F; }
        /* Instalar na tela inicial (js/instalar.js) */
        .instalar-banner {
            display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
            background: #EAF2FF; border: 1px solid #BBD4F5; border-radius: 12px;
            padding: 10px 14px; margin-bottom: 10px; }
        .instalar-banner .ib-txt { flex: 1 1 220px; font-size: 13px; color: #1E3A5F; line-height: 1.45; }
        .instalar-banner .ib-btn { border: none; background: #1A2E4A; color: #fff; font-weight: 700;
            font-size: 13px; border-radius: 10px; padding: 7px 16px; cursor: pointer; }
        .instalar-banner .ib-depois { border: none; background: transparent; color: #5A7090;
            font-size: 12.5px; cursor: pointer; padding: 4px 6px; }
        /* Aviso do lançamento dos planos (24/10 a 06/11/2026) */
        .aviso-lancamento {
            display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
            background: #FDF2F8; border: 1px solid #F3C4DD; border-radius: 12px;
            padding: 10px 14px; margin-bottom: 10px; }
        .aviso-lancamento .al-txt { flex: 1 1 220px; font-size: 13px; color: #4A1D36; line-height: 1.45; }
        .aviso-lancamento .al-mais { border: none; background: #C0357C; color: #fff; font-weight: 700;
            font-size: 13px; border-radius: 10px; padding: 7px 14px; cursor: pointer; }
        .premium-modal .pm-sub p { margin: 0 0 10px; }
        /* Modal de recurso premium (gate genérico) */
        .premium-modal { position: fixed; inset: 0; z-index: 10000; display: none;
            align-items: center; justify-content: center; padding: 20px;
            background: rgba(20, 28, 44, 0.55); }
        .premium-modal.open { display: flex; }
        .premium-modal .pm-card { background: #fff; border-radius: 20px; padding: 30px 26px;
            max-width: 380px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
        .premium-modal .pl-badge { margin-bottom: 14px; }
        .premium-modal .pm-title { font-size: 21px; font-weight: 800; color: #2B3552; margin-bottom: 10px; }
        .premium-modal .pm-sub { font-size: 14.5px; color: #64748B; line-height: 1.6; }
        .premium-modal .pm-close { margin-top: 22px; border: none; background: #4F6BED; color: #fff;
            font-size: 15px; font-weight: 700; padding: 12px 28px; border-radius: 12px; cursor: pointer; }
        .premium-modal .pm-close:active { transform: scale(0.97); }
        .receptive-symbol.adj         { background: #EDE7F6; border-color: #CE93D8; }
        .receptive-symbol.emotion     { background: #FCE4EC; border-color: #F48FB1; }
        .receptive-symbol .r-emoji { font-size: calc(var(--rcw, 150px) * 0.60); line-height: 1; }
        .receptive-symbol .r-label {
            /* Fonte encolhe conforme o comprimento da palavra (--llen), para
               caber sempre numa ÚNICA linha. Base = 0.15·largura do card; teto
               por caractere ≈ 1.35·largura / nº de letras; piso de 10px. */
            font-size: max(10px, min(calc(var(--rcw, 150px) * 0.15),
                                     calc(var(--rcw, 150px) * 0.92 / var(--llen, 6))));
            font-weight: 800; text-align: center;
            text-transform: uppercase; letter-spacing: 0.3px;
            white-space: nowrap; max-width: 100%;
        }
        .receptive-symbol.noun .r-label { color: #B0274A; }
        .receptive-symbol.verb .r-label { color: #256B29; }
        .receptive-symbol.verb-aux .r-label { color: #1B5E20; }
        .receptive-symbol.pronoun .r-label { color: #7A5C00; }
        .receptive-symbol.grammar .r-label { color: #7A3D00; }
        .receptive-symbol.interrogative .r-label { color: #1055A8; }
        .receptive-symbol.adj .r-label { color: #6A1B9A; }
        .receptive-symbol.emotion .r-label { color: #880E4F; }
        /* fallback (palavra não adquirida pelo usuário) */
        .receptive-symbol.r-fallback { opacity: 0.72; border-style: dashed !important; }
        /* Palavra de conteúdo sem picto no repertório (pictograma ARASAAC buscado na hora) */
        .receptive-symbol.r-unmatched { border-style: dashed !important; border-color: #B7C4D0; }
        .receptive-symbol.speaking {
            transform: scale(1.13);
            box-shadow: 0 0 0 4px #F39C12, 0 8px 24px rgba(0,0,0,.25);
            z-index: 2;
        }
        .receptive-symbol { transition: transform .18s ease, box-shadow .18s ease; }
        .r-new-badge { position: absolute; top: -7px; right: -2px; background: #E67E22;
            color: white; font-size: 7px; font-weight: 800; padding: 2px 6px;
            border-radius: 10px; letter-spacing: .4px; text-transform: uppercase; }
        .receptive-transcript {
            padding: 6px 16px 0; min-height: 26px; flex-shrink: 0;
            display: flex; align-items: center; justify-content: space-between; gap: 10px;
        }
        .transcript-text {
            font-size: 12px; color: #95A5A6; font-style: italic;
            flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .new-phrase-btn {
            background: #fff; border: 2px solid #CFD8DC; border-radius: 12px;
            padding: 11px 18px; font-size: 14px; font-weight: 800;
            color: #546E7A; cursor: pointer; flex-shrink: 0;
            display: inline-flex; align-items: center; gap: 6px;
            transition: transform .1s, opacity .1s;
            box-shadow: 0 2px 6px rgba(0,0,0,.08);
        }
        .new-phrase-btn:active { transform: scale(.93); opacity: .8; }
        /* Correção afirmação | pergunta (receptivo) — toque no estado que quer */
        .rq-seg {
            display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
            background: #fff; border: 2px solid #CFD8DC; border-radius: 12px;
            padding: 5px 8px 5px 12px; box-shadow: 0 2px 6px rgba(0,0,0,.08);
        }
        .rq-cap { font-size: 12px; font-weight: 800; color: #90A4AE;
            text-transform: uppercase; letter-spacing: .04em; }
        .rq-opt {
            background: #ECEFF1; border: none; border-radius: 9px;
            padding: 8px 13px; font-size: 13.5px; font-weight: 800;
            color: #607D8B; cursor: pointer; transition: all .12s;
        }
        .rq-opt:active { transform: scale(.94); }
        .rq-opt.active   { background: #546E7A; color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
        .rq-opt.q.active { background: #1565C0; }
        .receptive-display { cursor: pointer; }
        .receptive-symbol { cursor: pointer; }
        .receptive-symbol:active { transform: scale(0.94); }
        .receptive-controls { padding: 10px 12px 16px; display: flex; gap: 9px; }
        .receptive-btn {
            flex: 1; padding: 14px 10px; border: none; border-radius: 14px;
            font-size: 14px; font-weight: 700; cursor: pointer;
            display: flex; align-items: center; justify-content: center; gap: 7px;
            transition: transform 0.1s, opacity 0.1s;
        }
        .receptive-btn:active { transform: scale(0.95); opacity: 0.85; }
        .btn-mic { background: #C0392B; color: white; }
        .btn-mic.listening { background: #A93226; }
        .btn-simplify { background: #7D3C98; color: white; }

        /* ── MODALS ── */
        .modal-overlay {
            position: fixed; inset: 0; background: rgba(0,0,0,0.55);
            display: none; align-items: flex-end; z-index: 100;
        }
        .modal-overlay.visible { display: flex; }
        .ditado-dica { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #FFF4E5;
            color: #7A4A00; font-size: 13.5px; line-height: 1.45; }
        .modal {
            background: white; border-radius: 22px 22px 0 0;
            padding: 20px 18px 28px; width: 100%; max-height: 75vh;
        }
        .modal-title    { font-size: 17px; font-weight: 800; color: #1A2E4A; margin-bottom: 4px; }
        .modal-subtitle { font-size: 13px; color: #7F8C8D; margin-bottom: 14px; line-height: 1.4; }
        .modal textarea {
            width: 100%; border: 2px solid #E0E7EF; border-radius: 12px;
            padding: 11px; font-size: 15px; resize: none; height: 84px;
            font-family: inherit; outline: none; color: #1A2E4A;
        }
        .modal textarea:focus { border-color: #7D3C98; }
        .simplified-result {
            margin-top: 12px; padding: 12px; background: #F5EEF8;
            border-radius: 12px; border: 2px solid #C39BD3; display: none;
        }
        .simplified-result.visible { display: block; }
        .simplified-label { font-size: 10px; font-weight: 800; color: #7D3C98; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
        .simplified-chips { display: flex; flex-wrap: wrap; gap: 8px; }
        .simplified-chip {
            display: flex; align-items: center; gap: 5px;
            background: white; border-radius: 8px; padding: 5px 9px;
            font-size: 13px; font-weight: 700; border: 2px solid #C39BD3;
        }
        .modal-actions { display: flex; gap: 9px; margin-top: 12px; }
        .modal-btn { flex: 1; padding: 13px; border: none; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; }
        .modal-btn-cancel  { background: #ECF0F1; color: #7F8C8D; }
        .modal-btn-confirm { background: #7D3C98; color: white; }
        .modal-apply-btn {
            width: 100%; padding: 14px; border: none; border-radius: 12px;
            font-size: 15px; font-weight: 800; cursor: pointer;
            background: #7D3C98; color: white; margin-top: 10px; display: none;
        }
        .modal-apply-btn.visible { display: block; }

        /* Add-item/add-folder modal fields */
        .field-row { display: flex; gap: 8px; margin-bottom: 10px; align-items: center; }
        .field-label { font-size: 12px; font-weight: 700; color: #7F8C8D; width: 60px; flex-shrink: 0; }
        .field-input {
            flex: 1; border: 2px solid #E0E7EF; border-radius: 10px;
            padding: 10px 12px; font-size: 15px; font-family: inherit;
            outline: none; color: #1A2E4A;
        }
        .field-input:focus { border-color: #27AE60; }
        .field-input-sm { width: 64px; flex: none; text-align: center; font-size: 22px; }
        .field-info { font-size: 11px; color: #95A5A6; margin-bottom: 14px; }

        /* ── LEGEND ── */
        .legend {
            position: fixed; bottom: 60px; right: 10px;
            background: white; border-radius: 12px;
            padding: 10px 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.15);
            display: none; z-index: 50; min-width: 190px;
        }
        .legend.visible { display: block; }
        .legend-title { font-size: 10px; font-weight: 800; color: #7F8C8D; margin-bottom: 8px; text-transform: uppercase; }
        .legend-item { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
        .legend-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
        .legend-text { font-size: 11px; font-weight: 600; color: #2C3E50; }

        ::-webkit-scrollbar { width: 3px; height: 3px; }
        ::-webkit-scrollbar-thumb { background: #C5CDD8; border-radius: 2px; }

        /* ── Gestão do vocabulário: barra de rolagem para MOUSE ──
           A regra global acima deixa toda barra com 3px. No toque isso é certo
           (rola-se arrastando o conteúdo; a barra é só um indicador), mas com
           mouse a barra É o alvo que se precisa acertar — e 3px é um alvo
           ruim, principalmente numa lista longa como a do vocabulário.

           (hover: hover) + (pointer: fine) é o que separa mouse de dedo. Um
           tablet, mesmo com teclado acoplado, continua com a barra fina: lá o
           dedo é o ponteiro e a barra larga só roubaria espaço dos cartões. */
        @media (hover: hover) and (pointer: fine) {
            #therapistVocabView .symbol-grid::-webkit-scrollbar { width: 14px; }
            #therapistVocabView .symbol-grid::-webkit-scrollbar-track {
                background: #EDF1F6; border-radius: 8px;
            }
            #therapistVocabView .symbol-grid::-webkit-scrollbar-thumb {
                background: #A8B5C6; border-radius: 8px;
                /* A borda da cor da pista afina o polegar visualmente sem
                   reduzir a área clicável — o alvo continua com os 14px. */
                border: 3px solid #EDF1F6;
            }
            #therapistVocabView .symbol-grid::-webkit-scrollbar-thumb:hover { background: #8496AC; }

            /* A home da Gestão é outra lista longa e rolável, com o mesmo
               problema. Cores PRÓPRIAS porque o fundo dela é azul-escuro
               (#1E3A5F): as claras da lista de vocabulário virariam duas
               faixas acesas sobre o escuro. */
            .therapist-home-scroll::-webkit-scrollbar { width: 14px; }
            .therapist-home-scroll::-webkit-scrollbar-track {
                background: #17304F; border-radius: 8px;
            }
            .therapist-home-scroll::-webkit-scrollbar-thumb {
                background: #6A86AC; border-radius: 8px;
                border: 3px solid #17304F;
            }
            .therapist-home-scroll::-webkit-scrollbar-thumb:hover { background: #8AA3C4; }

            /* Painel da Conta: passou a rolar por dentro (14/10/2026) e, com a
               barra global de 3px, quem usa mouse mal a acertava. Fundo branco:
               as mesmas cores claras da lista de vocabulário. */
            .fb-account-sheet::-webkit-scrollbar { width: 14px; }
            .fb-account-sheet::-webkit-scrollbar-track {
                background: #EDF1F6; border-radius: 8px;
            }
            .fb-account-sheet::-webkit-scrollbar-thumb {
                background: #A8B5C6; border-radius: 8px;
                border: 3px solid #EDF1F6;
            }
            .fb-account-sheet::-webkit-scrollbar-thumb:hover { background: #8496AC; }

            /* Firefox não entende ::-webkit-scrollbar; para ele, as
               propriedades padrão (`auto` devolve a barra do sistema, larga o
               bastante). SÓ para ele: desde o Chrome 121, quando scrollbar-color
               está definida, o Chrome IGNORA o ::-webkit-scrollbar e usa a barra
               do sistema — no Mac com trackpad, invisível até rolar. Medido em
               14/10/2026 no Chrome 152: 0px com a propriedade, 14px sem ela. */
            @supports not selector(::-webkit-scrollbar) {
                #therapistVocabView .symbol-grid { scrollbar-width: auto; scrollbar-color: #A8B5C6 #EDF1F6; }
                .therapist-home-scroll           { scrollbar-width: auto; scrollbar-color: #6A86AC #17304F; }
                .fb-account-sheet                { scrollbar-width: auto; scrollbar-color: #A8B5C6 #EDF1F6; }
            }
        }

        /* ══ CONJUGAÇÕES — therapist card button ══ */
        .conj-access-btn {
            display: block;
            width: calc(100% - 18px); /* leave right gap for drag-handle */
            margin-top: 5px;
            padding: 4px 6px; border: none; border-radius: 6px;
            background: rgba(0,0,0,0.05); color: #aab4bd;
            font-size: 10px; font-weight: 700; cursor: pointer;
            text-align: center; line-height: 1.3;
        }
        .conj-access-btn:active { background: rgba(0,0,0,0.12); }
        .conj-access-btn.conj-has-active {
            background: rgba(39,174,96,0.12); color: #27AE60;
        }

        /* ══ CONJUGAÇÕES — management modal ══ */
        #conjModal .modal { max-width: 440px; max-height: 80vh; overflow-y: auto; }
        #conjModal .modal-title { font-size: 17px; }
        .conj-row {
            display: flex; align-items: center; gap: 10px;
            padding: 9px 0; border-bottom: 1px solid #F0F4F8;
        }
        .conj-row:last-child { border-bottom: none; }
        .conj-slot-label { flex: 0 0 108px; font-size: 12px; font-weight: 700; color: #5D6D7E; }
        .conj-form-input {
            flex: 1; border: 2px solid #E0E7EF; border-radius: 8px;
            padding: 6px 9px; font-size: 13px; font-family: inherit;
            text-transform: uppercase; font-weight: 700; color: #1A2E4A; outline: none;
        }
        .conj-form-input:focus { border-color: #5B9BD5; }
        /* toggle switch */
        .conj-toggle { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
        .conj-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
        .conj-slider {
            position: absolute; inset: 0; background: #D0D8E4;
            border-radius: 20px; cursor: pointer; transition: background .2s;
        }
        .conj-slider:before {
            content: ''; position: absolute;
            width: 14px; height: 14px; left: 3px; bottom: 3px;
            background: white; border-radius: 50%; transition: transform .2s;
        }
        .conj-toggle input:checked ~ .conj-slider { background: #27AE60; }
        .conj-toggle input:checked ~ .conj-slider:before { transform: translateX(16px); }

        /* ══ CONJUGAÇÕES — communicator card indicator ══ */
        .symbol-card.has-conj::after {
            content: '▾'; position: absolute;
            bottom: 2px; right: 4px; left: auto; transform: none;
            width: 16px; height: 16px; border-radius: 50%;
            background: #2E7D32; color: #fff;
            font-size: 11px; font-weight: 900; line-height: 16px;
            text-align: center;
            box-shadow: 0 1px 3px rgba(0,0,0,.3);
        }

        /* ══ CONJUGAÇÕES — picker (communicator bottom sheet) ══ */
        #conjPickerBackdrop {
            position: fixed; inset: 0; z-index: 2999;
            background: rgba(0,0,0,0.35); display: none;
        }
        #conjPickerBackdrop.visible { display: block; }
        #conjPicker {
            position: fixed; bottom: 0; left: 0; right: 0; z-index: 3000;
            background: white; border-radius: 20px 20px 0 0;
            box-shadow: 0 -6px 32px rgba(0,0,0,0.18);
            padding: 18px 16px 36px;
            transform: translateY(100%);
            transition: transform .3s cubic-bezier(.34,1.1,.64,1);
        }
        #conjPicker.visible { transform: translateY(0); }
        .conj-picker-header {
            display: flex; align-items: center; gap: 10px;
            margin-bottom: 16px; padding-bottom: 14px;
            border-bottom: 2px solid #F0F4F8;
        }
        .conj-picker-emoji { font-size: 30px; }
        .conj-picker-title { font-size: 18px; font-weight: 800; color: #1A2E4A; flex: 1; }
        .conj-picker-close {
            width: 32px; height: 32px; border-radius: 50%; border: none;
            background: #ECF0F1; color: #7F8C8D; font-size: 16px;
            cursor: pointer; display: flex; align-items: center; justify-content: center;
        }
        /* Pictogramas em colunas iguais: a última linha não estica, alinha à esquerda */
        .conj-picker-chips {
            display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            align-content: start; justify-items: stretch;
            /* Mesmo espaçamento da prancha, escolhido no Modo de Acesso (19/10/2026) */
            gap: var(--col-gap, 10px); overflow-y: auto; max-height: 52vh;
        }
        /* Conjugações: chips de texto, largura pelo conteúdo */
        .conj-picker-chips.cp-flow { display: flex; flex-wrap: wrap; }
        /* Grade congelada pelo ADM: mantém as colunas e rola na horizontal
           em vez de reorganizar — reorganizar destruiria o mapa motor. */
        .conj-picker-chips.vl-fixed { overflow-x: auto; }
        /* Lugar reservado de uma palavra desativada: ocupa a célula, invisível */
        .cp-hole { display: block; visibility: hidden; }
        @media (max-width: 600px) {
            .conj-picker-chips { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
        }
        /* Subcategory strip at bottom of dialog */
        .cp-subs-strip {
            display: none; margin-top: 14px;
            padding-top: 12px; border-top: 2px solid #F0F4F8;
            flex-wrap: wrap; gap: 6px;
        }
        .cp-subs-strip.visible { display: flex; }
        .cp-subs-btn {
            flex: 1 1 auto; padding: 8px 12px;
            border: 2px solid #F0A8D0; border-radius: 20px;
            background: #FDE8F2; color: #A0246A;
            font-size: 13px; font-weight: 800; cursor: pointer;
            white-space: nowrap; text-align: center;
            display: flex; align-items: center; gap: 6px; justify-content: center;
        }
        .cp-subs-btn:active { opacity: .75; }
        .cp-subs-btn.active { background: #D63E8F; border-color: #A0246A; color: white; }
        .cp-subs-btn img { width: 20px; height: 20px; object-fit: contain; border-radius: 4px; }
        .conj-picker-chip {
            flex: 1 1 140px; padding: 16px 12px; border: none;
            border-radius: 14px; font-size: 15px; font-weight: 800;
            cursor: pointer; text-align: center; line-height: 1.2;
            border: 2px solid transparent;
            transition: transform .1s, box-shadow .1s;
        }
        .conj-picker-chip:active { transform: scale(0.94); }
        .conj-picker-chip.verb     { background: #F0FBF0; border-color: #86D986; color: #1B5E20; }
        .conj-picker-chip.verb-aux { background: #E8F5E9; border-color: #66BB6A; color: #1B5E20; }
        .conj-picker-chip.chip-infinitive {
            flex: 1 1 100%; background: #F5F7FA !important;
            border-color: #D0D8E4 !important; color: #7F8C8D !important;
            font-size: 13px;
        }
        .conj-slot-hint {
            font-size: 10px; font-weight: 600; opacity: 0.65;
            display: block; margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.3px;
        }
        /* ── SEMANTIC DIALOG CHIPS ── */
        .conj-picker-chip.noun    { background: #FFF0F3; border-color: #FFB3C1; color: #8B0000; }
        .conj-picker-chip.adj     { background: #EDE7F6; border-color: #CE93D8; color: #4A148C; }
        .conj-picker-chip.grammar { background: #FFF3E0; border-color: #FFAB40; color: #E65100; }
        .conj-picker-chip.emotion { background: #FFF8E1; border-color: #FFD54F; color: #7B4700; }
        .conj-picker-chip.pronoun { background: #FFFDE7; border-color: #FFD54F; color: #7A5C00; }
        .conj-picker-chip.sem-chip { flex: 1 1 110px; padding: 12px 8px; }
        .sem-chip-emoji { font-size: 24px; display: block; margin-bottom: 4px; line-height: 1; }
        .sem-chip-img { width: 38px; height: 38px; object-fit: contain; display: block; margin: 0 auto 4px; }
        /* ── MORE-VERBS card (communicator, dialog mode) ── */
        .more-verbs-card {
            background: #F0FBF0 !important; border-color: #86D986 !important;
            cursor: pointer;
        }
        .more-verbs-card .emoji { font-size: 22px !important; }
        .more-verbs-card .label { color: #1B5E20 !important; }

        /* ── MORE-SEMANTIC card (communicator, dialog mode) ── */
        .more-semantic-card {
            background: #FDE8F2 !important; border-color: #F0A8D0 !important;
            cursor: pointer;
        }
        .more-semantic-card .emoji { font-size: 22px !important; }
        .more-semantic-card .label { color: #A0246A !important; }

        /* ── VERB DIALOG CHIPS ── */
        .conj-picker-chip.verb     { background: #F0FBF0; border-color: #86D986; color: #1B5E20; }
        .conj-picker-chip.verb-aux { background: #E8F5E9; border-color: #66BB6A; color: #1B5E20; }

        /* ══ THERAPIST VIEWS ══ */
        .therapist-view { display: none; flex-direction: column; flex: 1; overflow: hidden; }
        .therapist-view.active { display: flex; }

        /* Home view */
        .therapist-home-scroll {
            flex: 1; overflow-y: auto; background: #1E3A5F; padding: 8px 0 28px;
        }
        .mgmt-section-label {
            color: rgba(255,255,255,0.45); font-size: 10px; font-weight: 800;
            text-transform: uppercase; letter-spacing: 0.5px; padding: 16px 16px 7px;
        }
        .mgmt-cards { padding: 0 12px; display: flex; flex-direction: column; gap: 8px; }
        .mgmt-card {
            background: rgba(255,255,255,0.09); border: none; border-radius: 14px;
            padding: 16px; display: flex; align-items: center; gap: 14px;
            cursor: pointer; text-align: left; width: 100%; transition: background 0.15s;
        }
        .mgmt-card:active { background: rgba(255,255,255,0.18); }
        .mgmt-card-icon { font-size: 28px; flex-shrink: 0; }
        .mgmt-card-info { flex: 1; }
        .mgmt-card-title { color: white; font-size: 15px; font-weight: 700; }
        .mgmt-card-desc { color: rgba(255,255,255,0.5); font-size: 12px; margin-top: 2px; line-height: 1.4; }
        .mgmt-card-arrow { color: rgba(255,255,255,0.3); font-size: 22px; font-weight: 300; }

        /* ══════════════════════════════════════════
           PERFIL PELP-TEA
           ══════════════════════════════════════════ */
        .pelp-scroll { flex: 1; overflow-y: auto; background: #F0F4F8; padding: 12px 12px 32px; }
        .pelp-scroll > * { margin-bottom: 10px; }
        .pelp-scroll > *:last-child { margin-bottom: 0; }

        /* Domain summary bar */
        .pelp-summary-card { background: white; border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
        .pelp-summary-row { display: grid; grid-template-columns: 12px max-content 1fr auto; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid #F1F5F9; }
        .pelp-summary-row:last-child { border-bottom: none; }
        .pelp-domain-dot { width: 10px; height: 10px; border-radius: 50%; }
        .pelp-summary-name { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; color: #1A2E4A; }
        .pelp-summary-chips { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 4px; }
        .pelp-summary-chip { font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 20px; }
        .pelp-summary-none { font-size: 10px; color: #CBD5E1; font-style: italic; padding-left: 2px; }
        .pelp-summary-actions { display: flex; gap: 4px; }
        .pelp-sum-btn { font-size: 10px; font-weight: 700; padding: 4px 9px; border-radius: 8px; border: 1.5px solid #D0D8E4; background: white; color: #5D6D7E; cursor: pointer; transition: all .15s; white-space: nowrap; }
        .pelp-sum-btn.fill-prag { background: #2980B9; border-color: #2980B9; color: white; }
        .pelp-sum-btn.fill-morf { background: #27AE60; border-color: #27AE60; color: white; }
        .pelp-sum-btn.fill-lex  { background: #D35400; border-color: #D35400; color: white; }

        /* Age group header */
        .pelp-age-hdr { background: #1A2E4A; color: white; border-radius: 10px; padding: 7px 14px; font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }

        /* Stage card */
        .pelp-stage-card { background: white; border-radius: 12px; border: 2px solid #E2E8F0; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
        .pelp-stage-hdr { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: #F8FAFC; border-bottom: 1px solid #E8EEF4; }
        .pelp-num-badge { width: 28px; height: 28px; border-radius: 50%; background: #1A2E4A; color: white; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .pelp-stage-hdr-info { flex: 1; }
        .pelp-stage-title { font-size: 12px; font-weight: 700; color: #1A2E4A; }
        .pelp-stage-age-lbl { font-size: 9px; color: #95A5A6; margin-top: 1px; }
        .pelp-all-btn { font-size: 10px; padding: 4px 9px; border-radius: 8px; border: 1.5px solid #D0D8E4; background: white; color: #5D6D7E; cursor: pointer; font-weight: 700; white-space: nowrap; transition: all .15s; flex-shrink: 0; }
        .pelp-all-btn.all-on { background: #1A2E4A; border-color: #1A2E4A; color: white; }

        /* Domain rows */
        .pelp-domain-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 14px; border-bottom: 1px solid #F1F5F9; transition: background .15s; }
        .pelp-domain-row:last-child { border-bottom: none; }
        .pelp-domain-row.sel-prag { background: #EBF5FB; }
        .pelp-domain-row.sel-morf { background: #EAFAF1; }
        .pelp-domain-row.sel-lex  { background: #FEF5EC; }
        .pelp-row-accent { width: 3px; border-radius: 4px; align-self: stretch; flex-shrink: 0; margin-top: 1px; }
        .pelp-row-body { flex: 1; min-width: 0; }
        .pelp-row-domain { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
        .pelp-row-phase { font-size: 9px; color: #B0BEC5; font-style: italic; margin-bottom: 2px; }
        .pelp-row-text { font-size: 11px; color: #334155; line-height: 1.4; }
        .pelp-toggle { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #D0D8E4; background: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; transition: all .15s; margin-top: 2px; color: transparent; }
        .pelp-toggle.on { color: white; border-width: 0; }
        .pelp-toggle.on-prag { background: #2980B9; }
        .pelp-toggle.on-morf { background: #27AE60; }
        .pelp-toggle.on-lex  { background: #D35400; }

        /* ── Diagrama horizontal PELP ─────────────────────── */
        .pelp-diagram { background: white; border-radius: 14px; padding: 14px 14px 12px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
        .pelp-diag-label { font-size: 10px; font-weight: 800; color: #1A2E4A; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px; }
        .pelp-diag-scroll { overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
        .pelp-diag-track { min-width: 580px; display: flex; flex-direction: column; gap: 2px; }

        /* Age spans row — 7 : 2 : 1 : 2 columns */
        .pelp-diag-ages { display: grid; grid-template-columns: 7fr 2fr 1fr 2fr; gap: 3px; }
        .pelp-diag-age-lbl { background: #1A2E4A; color: white; border-radius: 6px 6px 0 0; padding: 5px 6px; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

        /* Phase spans row — 4 : 2 : 1 : 1 : 1 : 1 : 1 : 1 columns */
        .pelp-diag-phases { display: grid; grid-template-columns: 4fr 2fr 1fr 1fr 1fr 1fr 1fr 1fr; gap: 3px; }
        .pelp-diag-phase-lbl { border-radius: 0 0 4px 4px; padding: 4px 4px 5px; text-align: center; line-height: 1.25; overflow: hidden; }
        .pelp-diag-phase-title { font-size: 9px; font-weight: 800; display: block; }
        .pelp-diag-phase-sub   { font-size: 8px; font-weight: 600; opacity: .75; display: block; }

        /* Stage nodes row — 12 equal columns */
        .pelp-diag-nodes-wrap { position: relative; padding: 10px 0 6px; }
        .pelp-diag-connector { position: absolute; left: 0; right: 0; top: 28px; height: 2px; background: linear-gradient(to right, transparent 1%, #E2E8F0 6%, #E2E8F0 94%, transparent 99%); pointer-events: none; }
        .pelp-diag-nodes { display: grid; grid-template-columns: repeat(12, 1fr); position: relative; z-index: 1; }
        .pelp-diag-node { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: default; }
        .pelp-diag-num { width: 36px; height: 36px; border-radius: 50%; border: 2.5px solid #E2E8F0; background: white; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #CBD5E1; transition: all .2s; }
        .pelp-diag-num.has-some { border-color: #64748B; color: #334155; background: #F8FAFC; }
        .pelp-diag-num.has-all  { background: #1A2E4A; border-color: #1A2E4A; color: white; box-shadow: 0 2px 8px rgba(26,46,74,.35); }
        .pelp-diag-dots { display: flex; gap: 3px; }
        .pelp-diag-dot { width: 7px; height: 7px; border-radius: 50%; background: #E2E8F0; transition: background .2s; }
        .pelp-diag-dot.on-prag { background: #2980B9; }
        .pelp-diag-dot.on-morf { background: #27AE60; }
        .pelp-diag-dot.on-lex  { background: #D35400; }

        /* Legend */
        .pelp-diag-legend { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 10px; padding-top: 8px; border-top: 1px solid #F1F5F9; }
        .pelp-diag-leg-item { display: flex; align-items: center; gap: 5px; font-size: 10px; color: #64748B; font-weight: 600; }
        .pelp-diag-leg-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
        .pelp-diag-leg-circle { width: 14px; height: 14px; border-radius: 50%; background: #1A2E4A; flex-shrink: 0; }

        /* Access mode view */
        .access-mode-scroll { flex: 1; overflow-y: auto; background: #F0F4F8; padding: 12px 12px 28px; }
        .access-section { margin-bottom: 22px; }
        .access-section-title {
            font-size: 10px; font-weight: 800; text-transform: uppercase;
            letter-spacing: 0.5px; color: #7F8C8D; margin-bottom: 8px; padding: 0 2px;
        }
        .access-grid-btns { display: flex; gap: 6px; }
        .access-gap-btns  { display: flex; gap: 6px; margin-top: 8px; }
        .gap-btn {
            flex: 1; padding: 8px 4px; border-radius: 10px;
            border: 2px solid #E0E7EF; background: #EEF3F8;
            cursor: pointer; text-align: center; transition: all 0.15s;
        }
        .gap-btn .gap-visual {
            display: flex; align-items: center; justify-content: center;
            gap: var(--gb, 2px); margin-bottom: 4px;
        }
        .gap-btn .gap-bar {
            width: 8px; height: 22px; border-radius: 3px; background: #C5D3E0;
        }
        .gap-btn .gap-label { font-size: 10px; font-weight: 700; color: #4A6580; display: block; }
        .gap-btn.active { border-color: #1A2E4A; background: #1A2E4A; }
        .gap-btn.active .gap-bar   { background: rgba(255,255,255,0.7); }
        .gap-btn.active .gap-label { color: white; }
        /* Speak toggle & activation mode buttons */
        .speak-toggle-row { display: flex; align-items: center; gap: 10px;
            background: white; border-radius: 14px; padding: 14px;
            box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
        .speak-toggle-info { flex: 1; }
        .speak-toggle-title { font-size: 13px; font-weight: 700; color: #1A2E4A; }
        .speak-toggle-sub   { font-size: 10px; color: #95A5A6; margin-top: 2px; }
        .speak-toggle-btn {
            width: 46px; height: 26px; border-radius: 13px; border: none;
            background: #D0DCE8; cursor: pointer; position: relative;
            flex-shrink: 0; transition: background 0.2s;
        }
        .speak-toggle-btn::after {
            content: ''; position: absolute;
            width: 20px; height: 20px; border-radius: 50%;
            background: white; top: 3px; left: 3px;
            transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.25);
        }
        .speak-toggle-btn.on { background: #1A2E4A; }
        .speak-toggle-btn.on::after { transform: translateX(20px); }
        /* ── ElevenLabs config ── */
        .el-config-row { display:flex; flex-direction:column; gap:4px; margin-top:10px; }
        .el-config-label { font-size:10px; font-weight:800; color:#95A5A6; text-transform:uppercase; letter-spacing:.4px; }
        .el-config-input {
            width:100%; box-sizing:border-box;
            border:2px solid #D0D8E4; border-radius:10px;
            padding:9px 12px; font-size:13px; font-family:inherit; outline:none;
            background:white; color:#1A2E4A;
        }
        .el-config-input:focus { border-color:#1A2E4A; }
        .el-key-wrap { position:relative; }
        .el-key-wrap .el-config-input { padding-right:38px; }
        .el-key-show {
            position:absolute; right:6px; top:50%; transform:translateY(-50%);
            background:none; border:none; cursor:pointer; font-size:16px; padding:2px 4px;
            color:#95A5A6; line-height:1;
        }
        .el-voice-grid { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
        .el-voice-btn {
            padding:5px 10px; border-radius:20px; border:2px solid #D0D8E4;
            background:white; font-size:11px; font-weight:700; color:#5D6D7E;
            cursor:pointer; transition:all .15s;
        }
        .el-voice-btn.active { background:#1A2E4A; color:white; border-color:#1A2E4A; }
        .el-action-row { display:flex; gap:8px; margin-top:12px; }
        .el-test-btn {
            flex:1; padding:10px; border-radius:10px; border:2px solid #27AE60;
            background:#ECFDF5; color:#065F46; font-size:12px; font-weight:700; cursor:pointer;
        }
        .el-test-btn:active { opacity:.75; }
        .el-test-btn.testing { background:#FEF3C7; border-color:#F59E0B; color:#92400E; }
        .el-link {
            display:block; text-align:center; font-size:11px; color:#5B9BD5;
            text-decoration:none; margin-top:8px;
        }

        .activ-grid { display: flex; gap: 6px; }
        .activ-opt {
            flex: 1; background: white; border-radius: 12px; padding: 10px 4px;
            border: 2px solid #E0E7EF; cursor: pointer; text-align: center;
            transition: all 0.15s;
        }
        .activ-opt .activ-icon  { font-size: 18px; display: block; margin-bottom: 3px; }
        .activ-opt .activ-label { font-size: 11px; font-weight: 700; color: #4A6580; display: block; }
        .activ-opt .activ-sub   { font-size: 9px; color: #95A5A6; display: block; margin-top: 2px; line-height: 1.3; }
        .activ-opt.active { border-color: #1A2E4A; background: #1A2E4A; }
        .activ-opt.active .activ-label { color: white; }
        .activ-opt.active .activ-sub   { color: rgba(255,255,255,0.55); }
        .activ-opt:active { opacity: 0.75; }

        /* ── Idioma / Tradução ── */
        .lang-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
            gap: 6px;
        }
        .lang-btn {
            display: flex; flex-direction: column; align-items: center; gap: 3px;
            padding: 8px 4px; border-radius: 10px; border: 2px solid #E0E7EF;
            background: white; cursor: pointer; transition: all .15s;
        }
        .lang-btn .lang-flag  { font-size: 20px; line-height: 1; }
        .lang-btn .lang-name  { font-size: 9px; font-weight: 700; color: #4A6580; text-align: center; }
        .lang-btn.active      { border-color: #1A2E4A; background: #1A2E4A; }
        .lang-btn.active .lang-name { color: white; }
        .lang-btn:active      { opacity: .75; }
        .trans-action-row     { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
        .trans-btn {
            flex: 1; min-width: 140px; padding: 10px 12px; border-radius: 12px;
            border: none; font-size: 13px; font-weight: 700; cursor: pointer;
            display: flex; align-items: center; justify-content: center; gap: 6px;
            transition: opacity .15s;
        }
        .trans-btn:active { opacity: .75; }
        .trans-btn-go     { background: #1A2E4A; color: white; }
        .trans-btn-reset  { background: #F1F5F9; color: #64748B; }
        .trans-btn:disabled { opacity: .4; pointer-events: none; }
        .trans-progress-wrap {
            margin-top: 8px; height: 8px; border-radius: 4px;
            background: #E2E8F0; overflow: hidden; display: none;
        }
        .trans-progress-wrap.visible { display: block; }
        .trans-progress-bar {
            height: 100%; border-radius: 4px;
            background: linear-gradient(90deg, #3B82F6, #06B6D4);
            transition: width .3s ease; width: 0%;
        }
        .trans-status {
            font-size: 11px; color: #64748B; margin-top: 5px;
            min-height: 16px; line-height: 1.4;
        }
        .trans-status.error { color: #DC2626; }
        .trans-status.ok    { color: #059669; }

        /* ── Aparência dos Botões (btn config) ── */
        .bc-row-label {
            font-size: 11px; font-weight: 700; color: #64748B; margin-bottom: 6px;
        }
        .bc-seg { display: flex; gap: 4px; }
        .bc-seg-btn {
            flex: 1; padding: 8px 4px; border-radius: 10px;
            border: 2px solid #E0E7EF; background: white;
            font-size: 13px; font-weight: 800; color: #4A6580;
            cursor: pointer; text-align: center; transition: all .15s;
        }
        .bc-seg-btn.active { border-color: #1A2E4A; background: #1A2E4A; color: white; }
        .bc-seg-btn:active { opacity: .75; }
        .bc-option-row { display: flex; gap: 6px; }
        .bc-opt-btn {
            flex: 1; padding: 9px 8px; border-radius: 10px;
            border: 2px solid #E0E7EF; background: white;
            font-size: 12px; font-weight: 700; color: #4A6580;
            cursor: pointer; text-align: center; transition: all .15s;
            white-space: nowrap;
        }
        .bc-opt-btn.active { border-color: #1A2E4A; background: #1A2E4A; color: white; }
        .bc-opt-btn:active { opacity: .75; }
        .bc-bg-row { display: flex; gap: 6px; }
        .bc-bg-btn {
            flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
            padding: 8px 6px; border-radius: 12px;
            border: 2.5px solid #E0E7EF; background: white;
            font-size: 11px; font-weight: 700; color: #4A6580;
            cursor: pointer; transition: all .15s;
        }
        .bc-bg-btn.active { border-color: #1A2E4A; background: #F0F4FF; box-shadow: 0 0 0 2px rgba(26,46,74,.12); }
        .bc-bg-btn:active { opacity: .75; }
        .bc-bg-swatch {
            width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
        }
        .bc-preview-wrap {
            margin-top: 12px; padding: 10px; border-radius: 14px;
            background: #F1F5F9; display: flex; gap: 6px;
            justify-content: center; align-items: flex-end;
        }
        .bc-preview-card {
            width: 58px; display: flex; flex-direction: column;
            align-items: center; justify-content: center; gap: 4px;
            border-radius: 10px; padding: 6px 4px;
            border: 2.5px solid transparent; box-shadow: 0 2px 6px rgba(0,0,0,.08);
            min-height: 60px;
        }
        .bc-preview-card .bc-p-img { font-size: 22px; line-height: 1; }
        .bc-preview-card .bc-p-lbl {
            font-size: 9px; text-align: center; letter-spacing: .2px;
            max-width: 100%; overflow: hidden; line-height: 1.2;
        }

        /* Grid buttons inside access-mode view (light background) */
        .access-mode-scroll .grid-btn {
            border-color: #C5D3E0;
            background: #EEF3F8;
            color: #4A6580;
        }
        .access-mode-scroll .grid-btn.active {
            background: #1A2E4A;
            color: white;
            border-color: #1A2E4A;
        }
        .access-col-card {
            background: white; border-radius: 14px; padding: 12px 14px;
            margin-bottom: 8px; box-shadow: 0 2px 6px rgba(0,0,0,0.06);
            display: flex; align-items: center; gap: 10px;
        }
        .access-col-badge {
            width: 30px; height: 30px; border-radius: 8px;
            display: flex; align-items: center; justify-content: center;
            font-size: 16px; flex-shrink: 0;
        }
        .access-col-info { flex: 1; min-width: 0; }
        .access-col-name { font-size: 13px; font-weight: 700; color: #1A2E4A; }
        .access-col-sub { font-size: 10px; color: #95A5A6; margin-top: 1px; }
        .access-mode-btns { display: flex; gap: 6px; flex-shrink: 0; }
        .access-mode-opt {
            padding: 6px 12px; border-radius: 8px;
            border: 2px solid #E0E7EF; background: white;
            font-size: 11px; font-weight: 700; color: #95A5A6;
            cursor: pointer; text-align: center; line-height: 1.3; transition: all 0.15s;
            display: flex; align-items: center; gap: 5px;
        }
        .access-mode-opt .opt-icon { font-size: 14px; }
        .access-mode-opt.active { border-color: #1A2E4A; background: #1A2E4A; color: white; }
        .access-mode-opt:active { opacity: 0.75; }
        /* ══ AGENDA VISUAL ══ */
        #agendaScreen {
            position: fixed; inset: 0; z-index: 800;
            background: #F0F4F8; display: none;
            flex-direction: column; overflow: hidden;
        }
        #agendaScreen.active { display: flex; }
        .ag-header { background:#1A2E4A; flex-shrink:0; padding-bottom:0; }
        .ag-header-top { display:flex; align-items:center; gap:10px; padding:10px 14px 8px; }
        .ag-back-btn { background:rgba(255,255,255,0.12); border:none; border-radius:8px; padding:6px 11px; color:white; font-size:12px; font-weight:700; cursor:pointer; }
        .ag-edit-mode-btn { background:rgba(255,255,255,0.12); border:none; border-radius:8px; padding:6px 10px; color:rgba(255,255,255,0.7); font-size:13px; font-weight:600; cursor:pointer; transition:all .2s; flex-shrink:0; }
        .ag-edit-mode-btn.active { background:#F39C12; color:white; box-shadow:0 0 0 2px rgba(243,156,18,0.4); }
        /* Edit-mode visual cues on cards */
        .ag-edit-mode .ag-event { outline:2px dashed rgba(243,156,18,0.6); outline-offset:1px; cursor:pointer; }
        .ag-edit-mode .ag-day-event-card { outline:2px dashed rgba(243,156,18,0.6); cursor:pointer; }
        .ag-event-edit-hint { font-size:10px; margin-left:auto; opacity:0.55; flex-shrink:0; }
        /* Speak pulse animation */
        @keyframes ag-speak-pulse { 0%{transform:scale(1)} 40%{transform:scale(1.08)} 100%{transform:scale(1)} }
        .ag-speaking { animation:ag-speak-pulse .38s ease; }
        .ag-title    { color:white; font-size:16px; font-weight:800; flex:1; }
        .ag-view-tabs { display:flex; padding:0 14px; }
        .ag-view-tab  { flex:1; padding:9px 4px; border:none; background:none; font-size:11px; font-weight:700; color:rgba(255,255,255,0.45); cursor:pointer; border-bottom:2.5px solid transparent; margin-bottom:0; transition:all .15s; }
        .ag-view-tab.active { color:white; border-bottom-color:white; }
        .ag-nav-bar { background:#F0F4F8; display:flex; align-items:center; padding:8px 12px; gap:6px; flex-shrink:0; border-bottom:1px solid #DDE4EC; }
        .ag-nav-btn  { width:34px; height:34px; border-radius:9px; border:none; background:white; box-shadow:0 1px 4px rgba(0,0,0,0.1); font-size:18px; font-weight:300; cursor:pointer; display:flex; align-items:center; justify-content:center; color:#1A2E4A; flex-shrink:0; }
        .ag-nav-label { flex:1; text-align:center; font-size:13px; font-weight:700; color:#1A2E4A; cursor:pointer; }
        .ag-nav-today-btn { padding:5px 12px; border-radius:20px; border:none; background:#1A2E4A; color:white; font-size:10px; font-weight:800; cursor:pointer; flex-shrink:0; }
        .ag-body { flex:1; overflow:hidden; display:flex; flex-direction:column; min-height:0; }

        /* Week view */
        .ag-week-scroll { flex:1; display:flex; overflow-x:auto; overflow-y:hidden; gap:6px; padding:8px; -webkit-overflow-scrolling:touch; justify-content:center; min-width:0; }
        .ag-week-scroll::-webkit-scrollbar { display:none; }
        .ag-day-col { display:flex; flex-direction:column; min-width:96px; max-width:120px; flex-shrink:0; border-radius:14px; overflow:hidden; background:white; box-shadow:0 2px 8px rgba(0,0,0,0.07); }
        .ag-day-col.ag-today { min-width:108px; box-shadow:0 4px 18px rgba(26,46,74,0.2); }
        .ag-day-col.ag-past  { opacity:0.6; }
        .ag-day-header { padding:10px 8px 8px; background:#F5F8FB; border-bottom:1px solid #E8EDF2; display:flex; flex-direction:column; align-items:center; gap:2px; flex-shrink:0; }
        .ag-today .ag-day-header { background:#1A2E4A; }
        .ag-day-name { font-size:10px; font-weight:800; text-transform:uppercase; color:#7F8C8D; letter-spacing:.5px; }
        .ag-today .ag-day-name { color:rgba(255,255,255,.55); }
        .ag-day-num  { font-size:22px; font-weight:900; color:#1A2E4A; line-height:1; }
        .ag-today .ag-day-num { color:white; }
        .ag-badge { font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.3px; padding:2px 7px; border-radius:10px; margin-top:2px; }
        .ag-badge-today     { background:#27AE60; color:white; }
        .ag-badge-yesterday { background:#E67E22; color:white; }
        .ag-badge-tomorrow  { background:#3498DB; color:white; }
        .ag-day-events { flex:1; overflow-y:auto; padding:6px; display:flex; flex-direction:column; gap:5px; min-height:0; }
        .ag-day-events::-webkit-scrollbar { display:none; }
        .ag-event { border-radius:10px; padding:6px 5px; display:flex; flex-direction:column; align-items:center; gap:3px; cursor:pointer; border:2px solid transparent; transition:opacity .1s; position:relative; }
        .ag-event:active { opacity:.7; }
        .ag-event-img-wrap { width:52px; height:52px; border-radius:8px; background:rgba(255,255,255,.5); display:flex; align-items:center; justify-content:center; overflow:hidden; flex-shrink:0; }
        .ag-event-img-wrap img { width:100%; height:100%; object-fit:contain; }
        .ag-event-emoji { font-size:28px; line-height:1; }
        .ag-event-label { font-size:10px; font-weight:700; text-align:center; color:#1A2E4A; line-height:1.2; word-break:break-word; }
        .ag-event-time  { font-size:9px; color:rgba(26,46,74,.5); font-weight:600; }
        .ag-add-btn { margin:5px 6px 8px; border:2px dashed #C5D3E0; border-radius:10px; background:none; cursor:pointer; padding:8px; font-size:18px; color:#B0BEC5; width:calc(100% - 12px); transition:all .15s; flex-shrink:0; }
        .ag-add-btn:active { border-color:#1A2E4A; color:#1A2E4A; }

        /* Day view */
        .ag-day-view-scroll { flex:1; overflow-y:auto; padding:10px; display:flex; flex-direction:column; gap:8px; align-items:center; }
        .ag-day-view-scroll > * { width:100%; max-width:520px; }
        .ag-day-view-header { background:white; border-radius:14px; padding:18px; text-align:center; box-shadow:0 2px 8px rgba(0,0,0,0.07); flex-shrink:0; }
        .ag-day-view-name   { font-size:22px; font-weight:900; color:#1A2E4A; }
        .ag-day-view-date   { font-size:13px; color:#95A5A6; margin-top:4px; }
        .ag-day-view-badge  { margin:8px auto 0; display:inline-block; padding:4px 14px; border-radius:12px; font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.3px; }
        .ag-day-event-card  { background:white; border-radius:14px; padding:12px 14px; display:flex; align-items:center; gap:12px; box-shadow:0 2px 6px rgba(0,0,0,0.07); cursor:pointer; border-left:4px solid; }
        .ag-day-event-card:active { opacity:.75; }
        .ag-day-event-img   { width:60px; height:60px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:32px; flex-shrink:0; overflow:hidden; background:#F5F8FB; }
        .ag-day-event-img img { width:100%; height:100%; object-fit:contain; }
        .ag-day-event-info  { flex:1; min-width:0; }
        .ag-day-event-label { font-size:15px; font-weight:700; color:#1A2E4A; }
        .ag-day-event-time  { font-size:12px; color:#95A5A6; margin-top:3px; }
        .ag-day-add-btn { border:2px dashed #C5D3E0; border-radius:14px; background:none; cursor:pointer; padding:16px; font-size:14px; color:#95A5A6; width:100%; flex-shrink:0; transition:all .15s; }
        .ag-day-add-btn:active { border-color:#1A2E4A; color:#1A2E4A; }
        /* ── Period dividers ── */
        .ag-period-header {
            display: flex; align-items: center; gap: 8px;
            padding: 6px 4px 2px; flex-shrink: 0;
        }
        .ag-period-pill {
            padding: 4px 12px; border-radius: 20px;
            font-size: 12px; font-weight: 800; letter-spacing: .3px;
            white-space: nowrap;
        }
        .ag-period-line { flex:1; height:2px; border-radius:2px; opacity:.35; }
        /* Manhã – amber */
        .ag-period-manha .ag-period-pill  { background:#FEF3C7; color:#92400E; }
        .ag-period-manha .ag-period-line  { background:#F59E0B; }
        .ag-event-card-manha  { background:#FFFBEB !important; border-left-color:#F59E0B !important; }
        /* Tarde – sky blue */
        .ag-period-tarde .ag-period-pill  { background:#DBEAFE; color:#1E40AF; }
        .ag-period-tarde .ag-period-line  { background:#3B82F6; }
        .ag-event-card-tarde  { background:#EFF6FF !important; border-left-color:#3B82F6 !important; }
        /* Noite – indigo */
        .ag-period-noite .ag-period-pill  { background:#EDE9FE; color:#4C1D95; }
        .ag-period-noite .ag-period-line  { background:#7C3AED; }
        .ag-event-card-noite  { background:#F5F3FF !important; border-left-color:#7C3AED !important; }

        /* Month view */
        .ag-month-scroll { flex:1; overflow-y:auto; padding:8px; }
        .ag-month-grid-header { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; margin-bottom:4px; }
        .ag-week-day-label { text-align:center; font-size:10px; font-weight:800; color:#95A5A6; text-transform:uppercase; padding:4px 0; }
        .ag-month-grid   { display:grid; grid-template-columns:repeat(7,1fr); gap:3px; }
        .ag-month-cell   { background:white; border-radius:8px; padding:4px; min-height:52px; cursor:pointer; border:2px solid transparent; transition:all .15s; }
        .ag-month-cell:active { opacity:.75; }
        .ag-month-cell.ag-other-month  { opacity:.3; }
        .ag-month-cell.ag-today-cell   { border-color:#1A2E4A; background:#EEF3FA; }
        .ag-cell-day  { font-size:12px; font-weight:800; color:#1A2E4A; }
        .ag-cell-dots { display:flex; flex-wrap:wrap; gap:2px; margin-top:3px; align-items:center; }
        .ag-cell-emoji { font-size:14px; line-height:1; }
        .ag-cell-img   { width:20px; height:20px; object-fit:contain; border-radius:3px; }

        /* Year view */
        .ag-year-scroll { flex:1; overflow-y:auto; padding:10px; }
        .ag-year-grid   { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
        .ag-year-month  { background:white; border-radius:12px; padding:12px 8px; text-align:center; cursor:pointer; border:2px solid transparent; box-shadow:0 2px 6px rgba(0,0,0,.06); transition:all .15s; }
        .ag-year-month:active { opacity:.75; }
        .ag-year-month.ag-current-month { border-color:#1A2E4A; }
        .ag-year-month-name  { font-size:13px; font-weight:800; color:#1A2E4A; }
        .ag-year-event-count { font-size:10px; color:#95A5A6; margin-top:3px; }
        .ag-year-preview     { margin-top:6px; font-size:24px; }

        /* Add/edit event sheet */
        #agendaAddBackdrop { position:fixed; inset:0; z-index:1200; background:rgba(0,0,0,.45); display:none; }
        #agendaAddBackdrop.visible { display:block; }
        #agendaAddSheet { position:fixed; bottom:0; left:0; right:0; z-index:1201; background:white; border-radius:20px 20px 0 0; max-height:82vh; display:flex; flex-direction:column; transform:translateY(100%); transition:transform .3s cubic-bezier(.32,0,0,1); box-shadow:0 -6px 32px rgba(0,0,0,.18); }
        #agendaAddSheet.visible { transform:translateY(0); }
        .aa-header   { display:flex; align-items:center; padding:14px 16px 12px; border-bottom:1px solid #E8EDF2; flex-shrink:0; }
        .aa-title    { flex:1; font-size:16px; font-weight:800; color:#1A2E4A; }
        .aa-close-btn { background:none; border:none; font-size:20px; cursor:pointer; color:#95A5A6; }
        .aa-body     { flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:14px; }
        .aa-date-chip { display:inline-flex; align-items:center; gap:6px; background:#EEF3FA; border-radius:20px; padding:6px 14px; font-size:12px; font-weight:700; color:#1A2E4A; align-self:flex-start; }
        .aa-image-row  { display:flex; align-items:center; gap:14px; }
        .aa-image-preview { width:76px; height:76px; border-radius:14px; background:#F5F8FB; border:2px dashed #C5D3E0; display:flex; align-items:center; justify-content:center; font-size:34px; cursor:pointer; flex-shrink:0; overflow:hidden; transition:all .15s; }
        .aa-image-preview img { width:100%; height:100%; object-fit:contain; }
        .aa-image-hint { font-size:12px; color:#95A5A6; line-height:1.5; }
        .aa-image-hint strong { color:#1A2E4A; display:block; margin-bottom:2px; }
        .aa-label-input { width:100%; padding:13px 14px; border-radius:12px; border:2px solid #E0E7EF; font-size:15px; outline:none; font-family:inherit; box-sizing:border-box; }
        .aa-label-input:focus { border-color:#1A2E4A; }
        .aa-time-row  { display:flex; align-items:center; gap:10px; }
        .aa-time-label { font-size:12px; font-weight:700; color:#4A6580; white-space:nowrap; }
        .aa-time-input { flex:1; padding:10px 12px; border-radius:10px; border:2px solid #E0E7EF; font-size:14px; outline:none; font-family:inherit; }
        .aa-time-input:focus { border-color:#1A2E4A; }
        .aa-color-row  { display:flex; gap:10px; align-items:center; }
        /* O container das bolinhas precisa ser flex: sem isto os swatches
           (divs) empilhavam na vertical em vez de ficarem lado a lado. */
        #aaColorRow { display:flex; gap:10px; align-items:center; flex-wrap:wrap; flex:1; }
        .aa-color-label { font-size:12px; font-weight:700; color:#4A6580; flex-shrink:0; }
        .aa-color-swatch { width:28px; height:28px; border-radius:50%; cursor:pointer; border:3px solid transparent; transition:all .15s; }
        .aa-color-swatch.selected { border-color:#1A2E4A; transform:scale(1.2); }
        .aa-save-btn   { padding:14px; border-radius:14px; border:none; background:#1A2E4A; color:white; font-size:15px; font-weight:700; cursor:pointer; width:100%; }
        .aa-save-btn:active { opacity:.8; }
        .aa-delete-btn { padding:12px; border-radius:14px; border:2px solid #E74C3C; background:none; color:#E74C3C; font-size:14px; font-weight:700; cursor:pointer; width:100%; display:none; }
        .aa-delete-btn.show { display:block; }

        /* ══════════════════════════════════════════
           TIMER VISUAL
        ══════════════════════════════════════════ */
        #timerScreen {
            position:fixed; inset:0; z-index:850; display:none;
            flex-direction:column; align-items:center; justify-content:space-between;
            overflow:hidden; transition:background .6s ease;
        }
        #timerScreen.active { display:flex; }
        .timer-top-bar {
            width:100%; display:flex; align-items:center; justify-content:space-between;
            padding:12px 16px; flex-shrink:0; position:relative; z-index:2;
        }
        .timer-close-btn {
            width:38px; height:38px; border-radius:50%; border:none;
            background:rgba(255,255,255,0.18); color:white; font-size:18px;
            cursor:pointer; display:flex; align-items:center; justify-content:center;
        }
        .timer-design-label {
            color:rgba(255,255,255,0.7); font-size:12px; font-weight:700;
            text-transform:uppercase; letter-spacing:.8px;
        }
        /* display area */
        .timer-display {
            flex:1; display:flex; align-items:center; justify-content:center;
            padding:10px 20px; width:100%; position:relative; overflow:hidden;
        }
        /* controls */
        .timer-controls {
            width:100%; padding:14px 20px 20px;
            display:flex; align-items:center; justify-content:center; gap:18px;
            background:rgba(0,0,0,0.22); backdrop-filter:blur(10px); flex-shrink:0;
        }
        .timer-ctrl-btn {
            width:58px; height:58px; border-radius:50%; border:none; font-size:22px;
            cursor:pointer; display:flex; align-items:center; justify-content:center;
            transition:transform .1s, box-shadow .1s;
        }
        .timer-ctrl-btn:active { transform:scale(.88); }
        .timer-play-btn  { background:#27AE60; color:white; box-shadow:0 4px 16px rgba(39,174,96,.45); }
        .timer-pause-btn { background:#F39C12; color:white; box-shadow:0 4px 16px rgba(243,156,18,.45); }
        .timer-stop-btn  { background:rgba(255,255,255,.2); color:white; font-size:16px; }
        .timer-sound-btn {
            width:42px; height:42px; border-radius:50%; border:none; font-size:20px;
            cursor:pointer; background:rgba(255,255,255,.15); color:white;
            display:flex; align-items:center; justify-content:center;
            transition:transform .1s, background .2s;
        }
        .timer-sound-btn.muted { background:rgba(220,50,50,.35); }
        .timer-sound-btn:active { transform:scale(.88); }
        .timer-time-disp {
            color:white; font-size:30px; font-weight:900; min-width:88px;
            text-align:center; letter-spacing:1px;
            text-shadow:0 2px 10px rgba(0,0,0,.5);
        }

        /* ── Design 1: Torta ── */
        .td-torta-wrap { display:flex; flex-direction:column; align-items:center; gap:14px; }
        .td-torta-sub  { color:rgba(255,255,255,.5); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.8px; }

        /* ── Design 2: Ampulheta ── */
        /* ── Design 2: Ampulheta ── */
        .td-hg-scene { width:100%; height:100%; display:flex; flex-direction:column;
                       align-items:center; justify-content:center; gap:10px; }
        .td-hg-time  { color:white; font-size:clamp(44px,13vw,72px); font-weight:900;
                       text-shadow:0 4px 18px rgba(0,0,0,.5); letter-spacing:-1px; }
        .td-hg-sub   { color:rgba(255,255,255,.5); font-size:12px; font-weight:700;
                       text-transform:uppercase; letter-spacing:.8px; }
        /* falling sand grain animation */
        @keyframes hgGrainFall {
            0%   { transform:translateY(0px);   opacity:.95; }
            85%  { opacity:.7; }
            100% { transform:translateY(22px);  opacity:0; }
        }
        .hg-grain { animation:hgGrainFall .6s linear infinite; }
        .hg-grain:nth-child(2) { animation-delay:-.15s; }
        .hg-grain:nth-child(3) { animation-delay:-.30s; }
        .hg-grain:nth-child(4) { animation-delay:-.45s; }
        .hg-stream-paused .hg-grain { animation-play-state:paused; }

        /* ── Design 3: Estrelas ── */
        .td-stars-wrap  { display:flex; flex-direction:column; align-items:center; gap:22px; }
        .td-stars-time  { color:white; font-size:clamp(46px,13vw,72px); font-weight:900;
                          text-shadow:0 4px 20px rgba(0,0,0,.5); }
        .td-stars-row   { display:flex; flex-wrap:nowrap; gap:3px; justify-content:center;
                          width:100%; padding:0 6px; box-sizing:border-box; }
        .td-star        { font-size:clamp(20px,6.8vw,34px); flex:0 0 auto; line-height:1;
                          transition:filter .5s cubic-bezier(.34,1.56,.64,1),
                                     transform .5s cubic-bezier(.34,1.56,.64,1);
                          filter:drop-shadow(0 0 10px gold); }
        .td-star.dim    { filter:grayscale(1) brightness(.2); transform:scale(.78); }
        .td-stars-sub   { color:rgba(255,255,255,.6); font-size:13px; font-weight:700; }

        /* ── Design 4: Trilho ── */
        .td-track-card {
            background:white; border-radius:22px; padding:24px 20px 20px;
            box-shadow:0 8px 32px rgba(0,0,0,.18); width:100%; max-width:380px;
        }
        .td-track-title { font-size:20px; font-weight:900; color:#1A2E4A; text-align:center; margin-bottom:18px; }
        .td-track-road  {
            position:relative; height:84px;
            background:linear-gradient(90deg,#66BB6A,#CDDC39,#FFC107,#FF7043);
            border-radius:42px; overflow:visible;
            box-shadow:inset 0 4px 10px rgba(0,0,0,.15);
        }
        .td-track-dashes {
            position:absolute; top:50%; left:8%; right:8%; height:3px;
            background:repeating-linear-gradient(90deg,rgba(255,255,255,.5) 0,rgba(255,255,255,.5) 12px,transparent 12px,transparent 24px);
            transform:translateY(-50%);
        }
        .td-track-flag   { position:absolute; left:6px;  top:50%; transform:translateY(-50%); font-size:24px; }
        .td-track-star   { position:absolute; right:4px; top:50%; transform:translateY(-55%); font-size:30px; filter:drop-shadow(0 0 8px gold); }
        .td-track-char   {
            position:absolute; top:50%; transform:translateY(-55%);
            transition:left .8s cubic-bezier(.34,1.4,.64,1);
            display:flex; align-items:center; justify-content:center;
        }
        .td-track-char img   { width:60px; height:60px; border-radius:50%; object-fit:cover; border:3px solid white; box-shadow:0 3px 10px rgba(0,0,0,.25); }
        .td-track-char span  { font-size:42px; line-height:1; filter:drop-shadow(0 3px 6px rgba(0,0,0,.3)); }
        .td-track-time  { font-size:36px; font-weight:900; color:#1A2E4A; text-align:center; margin-top:16px; }
        .td-track-prog  { font-size:12px; color:#95A5A6; text-align:center; margin-top:3px; }

        /* ── Design 5: Balões ── */
        .td-balloons-scene { display:flex; flex-direction:column; align-items:center; gap:14px; }
        .td-balloons-row   { display:flex; gap:8px; flex-wrap:wrap; justify-content:center; max-width:320px; }
        .td-balloon        { display:flex; flex-direction:column; align-items:center; transition:all .4s; }
        .td-balloon.popped { opacity:.15; transform:scale(.55); }
        .td-balloon-body   {
            width:44px; height:54px; border-radius:52% 52% 50% 50% / 55% 55% 45% 45%;
            display:flex; align-items:center; justify-content:center; font-size:18px;
            box-shadow:inset -4px -4px 8px rgba(0,0,0,.15), inset 3px 3px 6px rgba(255,255,255,.3);
        }
        .td-balloon-knot   { width:7px; height:9px; border-radius:0 0 50% 50% / 0 0 100% 100%; margin-top:1px; opacity:.6; }
        .td-balloon-str    { width:1px; height:18px; background:rgba(255,255,255,.35); }
        .td-char-wrap      { display:flex; flex-direction:column; align-items:center; gap:4px; }
        .td-char-wrap img  { width:70px; height:70px; border-radius:50%; object-fit:cover; border:4px solid white; box-shadow:0 4px 16px rgba(0,0,0,.2); }
        .td-char-wrap span { font-size:54px; line-height:1; }
        .td-balloons-time  { font-size:32px; font-weight:900; color:white; text-shadow:0 3px 12px rgba(0,0,0,.45); }

        /* ── Design 6: Foguete ── */
        .td-rocket-scene  { position:relative; width:220px; height:min(420px,60vh); }
        .td-rocket-stars  { position:absolute; inset:0; overflow:hidden; pointer-events:none; }
        .td-rocket-starbg { position:absolute; background:white; border-radius:50%;
                            animation:timerTwinkle 2s ease-in-out infinite alternate; }
        @keyframes timerTwinkle { from{opacity:.15;transform:scale(.7)} to{opacity:1;transform:scale(1.3)} }
        .td-rocket-track  {
            position:absolute; left:50%; transform:translateX(-50%);
            width:7px; top:20px; bottom:70px;
            background:rgba(255,255,255,.12); border-radius:4px; overflow:hidden;
        }
        .td-rocket-fuel   {
            position:absolute; left:0; bottom:0; width:100%;
            background:linear-gradient(to top,#F39C12,#E74C3C);
            border-radius:4px; transition:height .8s ease;
        }
        .td-rocket-char   {
            position:absolute; left:50%; transform:translateX(-50%);
            transition:bottom .8s cubic-bezier(.34,1.2,.64,1);
            display:flex; flex-direction:column; align-items:center;
            filter:drop-shadow(0 4px 14px rgba(243,156,18,.7));
        }
        .td-rocket-char img   { width:50px; height:50px; border-radius:50%; border:3px solid #F39C12; object-fit:cover; }
        .td-rocket-char .rkt  { font-size:52px; line-height:1; }
        .td-rocket-flame      { font-size:26px; margin-top:-6px; }
        .td-rocket-time       {
            position:absolute; bottom:8px; left:0; right:0; text-align:center;
            color:white; font-size:28px; font-weight:900;
            text-shadow:0 2px 10px rgba(0,0,0,.6);
        }

        /* ── REWARD SCENE ── */
        #rewardScene {
            position:fixed; inset:0; z-index:950; display:none;
            flex-direction:column; align-items:center; justify-content:center;
            overflow:hidden;
        }
        #rewardScene.active { display:flex; }
        .reward-bg {
            position:absolute; inset:0;
            background:linear-gradient(135deg,#0F2027 0%,#5B2C6F 45%,#1A2E4A 100%);
            animation:rewardBgPulse 3s ease-in-out infinite alternate;
        }
        @keyframes rewardBgPulse { from{filter:brightness(1)} to{filter:brightness(1.15)} }
        .reward-confetti { position:absolute; inset:0; pointer-events:none; overflow:hidden; }
        .confetti-piece  { position:absolute; top:-20px; border-radius:2px;
                           animation:confettiFall linear forwards; }
        @keyframes confettiFall {
            0%   { transform:translateY(0) rotate(0deg) scaleX(1); opacity:1; }
            50%  { transform:translateY(50vh) rotate(360deg) scaleX(-1); opacity:.9; }
            100% { transform:translateY(115vh) rotate(720deg) scaleX(1); opacity:.2; }
        }
        .reward-body {
            position:relative; z-index:1;
            display:flex; flex-direction:column; align-items:center; gap:16px;
            text-align:center; padding:24px 32px;
        }
        .reward-main-emoji { font-size:88px; animation:rewardPop .55s cubic-bezier(.34,1.56,.64,1); }
        @keyframes rewardPop { from{transform:scale(0) rotate(-30deg);opacity:0} to{transform:scale(1) rotate(0);opacity:1} }
        .reward-title    {
            font-size:52px; font-weight:900; color:white; letter-spacing:-1px;
            text-shadow:0 4px 24px rgba(0,0,0,.4);
            animation:rewardSlideUp .45s ease-out .2s both;
        }
        .reward-subtitle {
            font-size:20px; font-weight:700; color:rgba(255,255,255,.85);
            animation:rewardSlideUp .45s ease-out .4s both;
        }
        @keyframes rewardSlideUp {
            from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:translateY(0)}
        }
        .reward-stars-row { display:flex; gap:10px; animation:rewardSlideUp .45s ease-out .6s both; }
        .reward-star-spin { font-size:40px; animation:rewardStarIn .4s cubic-bezier(.34,1.56,.64,1) both; }
        .reward-star-spin:nth-child(1){animation-delay:.7s}
        .reward-star-spin:nth-child(2){animation-delay:.88s}
        .reward-star-spin:nth-child(3){animation-delay:1.06s}
        @keyframes rewardStarIn {
            from{transform:scale(0) rotate(-180deg);opacity:0} to{transform:scale(1) rotate(0);opacity:1}
        }
        .reward-tap-hint {
            color:rgba(255,255,255,.55); font-size:14px; font-weight:600;
            animation:rewardSlideUp .45s ease-out 1.4s both;
            margin-top:8px;
        }

        /* ── Space reward (Foguete timer) ── */
        #rewardScene.space-theme .reward-bg {
            background:radial-gradient(ellipse at 40% 50%, #0B1E4A 0%, #050D20 55%, #000308 100%);
            animation:spaceBgPulse 4s ease-in-out infinite alternate;
        }
        @keyframes spaceBgPulse {
            from { filter:brightness(1); }
            to   { filter:brightness(1.18) hue-rotate(10deg); }
        }
        /* nebula blobs */
        .space-nebula {
            position:absolute; border-radius:50%; filter:blur(60px);
            pointer-events:none; opacity:.25; mix-blend-mode:screen;
        }
        /* twinkling stars */
        .space-star {
            position:absolute; border-radius:50%; background:white;
            animation:spaceTwinkle var(--tw-dur,2s) ease-in-out infinite;
        }
        @keyframes spaceTwinkle {
            0%,100% { opacity:.15; transform:scale(1); }
            50%      { opacity:1;   transform:scale(1.6); }
        }
        /* shooting comets */
        .space-comet {
            position:absolute; left:-220px;
            height:2px; border-radius:2px; transform:rotate(-22deg);
            transform-origin:left center;
            background:linear-gradient(90deg, transparent 0%, rgba(180,230,255,.7) 50%, white 100%);
            box-shadow:0 0 6px 2px rgba(160,210,255,.4);
            animation:spaceComet linear infinite;
        }
        @keyframes spaceComet {
            0%   { left:-220px; opacity:0; }
            6%   { opacity:1; }
            92%  { opacity:.9; }
            100% { left:calc(100vw + 220px); opacity:0; }
        }
        /* space reward body styles */
        #rewardScene.space-theme .reward-title {
            color:#E3F2FD;
            text-shadow:0 0 18px #29B6F6, 0 0 40px rgba(41,182,246,.5);
        }
        #rewardScene.space-theme .reward-subtitle { color:#B3E5FC; }
        #rewardScene.space-theme .reward-tap-hint  { color:rgba(179,229,252,.55); }

        /* ── Animal Timer Scenes (Ratinho / Esquilo) ── */
        .td-animal-scene {
            width:100%; height:100%; display:flex; flex-direction:column;
            align-items:center; justify-content:flex-start;
            gap:6px; padding:6px 14px 8px; position:relative; overflow:hidden;
        }
        .td-ratinho-theme {
            background:radial-gradient(ellipse at 50% 0%, #3D1A08 0%, #1A0C06 60%, #0E0604 100%);
        }
        .td-esquilo-theme {
            background:radial-gradient(ellipse at 50% 0%, #2D1A06 0%, #150E05 60%, #0A0800 100%);
        }
        .td-dino-theme {
            background:radial-gradient(ellipse at 50% 0%, #1A3A10 0%, #071408 60%, #030B03 100%);
        }
        .td-animal-decor { font-size:20px; opacity:.6; letter-spacing:8px; text-align:center; }
        .td-tiny-star { font-size:10px; opacity:.5; vertical-align:middle; }
        .td-animal-title {
            font-size:14px; font-weight:800; color:rgba(255,255,255,.6);
            text-transform:uppercase; letter-spacing:.6px; text-align:center;
        }
        .td-animal-big-time {
            font-size:clamp(52px,15vw,82px); font-weight:900; color:white;
            line-height:1; text-shadow:0 4px 28px rgba(0,0,0,.7);
            font-variant-numeric:tabular-nums; letter-spacing:-2px;
        }
        /* Food grid */
        .td-food-grid {
            display:grid;
            grid-template-columns:repeat(var(--td-cols,6), 1fr);
            grid-template-rows:repeat(var(--td-rows,4), 1fr);
            gap:clamp(3px,1vw,8px);
            width:100%;
            flex:1; min-height:0;
            container-type:size;
        }
        .td-food-slot {
            position:relative; min-height:0; min-width:0;
            display:flex; align-items:center; justify-content:center;
            border-radius:10px; border:2px solid transparent;
            overflow:visible;
            transition:background .3s, border-color .3s, opacity .3s, transform .3s;
        }
        /* intact: soft glow pulse */
        .td-food-slot.intact {
            background:rgba(255,255,255,.09); border-color:rgba(255,255,255,.13);
            animation:tdFoodPulse 2s ease-in-out infinite alternate;
        }
        @keyframes tdFoodPulse {
            from{transform:scale(.93);filter:brightness(.85)}
            to  {transform:scale(1.05);filter:brightness(1.2)}
        }
        /* eating: golden glow, food shrinks inside */
        .td-food-slot.eating {
            background:rgba(255,215,60,.2); border-color:rgba(255,215,60,.5);
            box-shadow:0 0 16px rgba(255,215,60,.3); animation:none;
        }
        /* eaten: faded crumbs */
        .td-food-slot.eaten {
            background:rgba(255,255,255,.03); border-color:transparent;
            opacity:.18; transform:scale(.6); animation:none;
        }
        /* food emoji inside slot — size adapts to grid cell via container query */
        .td-slot-food {
            font-size:min(
                calc(100cqw / var(--td-cols) * 0.52),
                calc(100cqh / var(--td-rows) * 0.52)
            );
            display:block; line-height:1;
            transition:transform .08s linear;
            user-select:none;
        }
        /* animal overlaid on eating slot — larger than the food */
        .td-slot-animal {
            position:absolute;
            inset:-32% -24%;          /* overflow slot bounds */
            display:flex; align-items:center; justify-content:center;
            font-size:min(
                calc(100cqw / var(--td-cols) * 0.88),
                calc(100cqh / var(--td-rows) * 0.88)
            );
            line-height:1; z-index:3;
            pointer-events:none; user-select:none;
            filter:drop-shadow(0 3px 12px rgba(0,0,0,.6));
            animation:tdAnimalArrive .42s cubic-bezier(.34,1.56,.64,1) both;
        }
        @keyframes tdAnimalArrive {
            0%   { transform:translateX(-80%) scale(.45) rotate(-18deg); opacity:.2; }
            55%  { transform:translateX(7%)   scale(1.13) rotate(4deg);  opacity:1;  }
            75%  { transform:translateX(-3%)  scale(.97) rotate(-1deg);  }
            100% { transform:translateX(0)    scale(1)   rotate(0deg);   opacity:1;  }
        }
        .td-slot-animal.is-eating {
            animation:tdAnimalChew .5s ease-in-out infinite;
        }
        @keyframes tdAnimalChew {
            0%   { transform:scale(1.00) rotate(-5deg)  translateY(0%);   }
            18%  { transform:scale(1.18) rotate(-20deg) translateY(-11%); }
            38%  { transform:scale(1.08) rotate(-3deg)  translateY(-5%);  }
            55%  { transform:scale(1.16) rotate(-16deg) translateY(-9%);  }
            72%  { transform:scale(1.04) rotate(4deg)   translateY(-3%);  }
            88%  { transform:scale(1.10) rotate(-8deg)  translateY(-6%);  }
            100% { transform:scale(1.00) rotate(-5deg)  translateY(0%);   }
        }
        .td-animal-caption {
            font-size:13px; font-weight:700; color:rgba(255,255,255,.6); text-align:center;
        }

        /* ── Unit Toggle (duration config) ── */
        .tc-unit-toggle {
            display:flex; background:#F1F5F9; border-radius:10px; padding:3px; gap:2px;
            align-self:flex-start; margin-bottom:10px;
        }
        .tc-unit-btn {
            padding:7px 18px; border:none; border-radius:8px; font-size:13px; font-weight:700;
            cursor:pointer; transition:all .15s; background:transparent; color:#64748B;
        }
        .tc-unit-btn.active { background:white; color:#1A2E4A; box-shadow:0 1px 4px rgba(0,0,0,.1); }

        /* ── TIMER CONFIG SHEET ── */
        #timerConfigBackdrop { position:fixed; inset:0; z-index:1300; background:rgba(0,0,0,.5); display:none; }
        #timerConfigBackdrop.visible { display:block; }
        #timerConfigSheet {
            position:fixed; bottom:0; left:0; right:0; z-index:1301;
            background:white; border-radius:22px 22px 0 0; max-height:90vh;
            display:flex; flex-direction:column;
            transform:translateY(100%); transition:transform .3s cubic-bezier(.32,0,0,1);
            box-shadow:0 -6px 32px rgba(0,0,0,.22);
        }
        #timerConfigSheet.visible { transform:translateY(0); }
        .tc-handle { width:40px; height:4px; background:#DDE4EC; border-radius:2px; margin:10px auto 0; flex-shrink:0; }
        .tc-header {
            padding:12px 18px 10px; display:flex; align-items:center;
            justify-content:space-between; border-bottom:1px solid #EEF2F7; flex-shrink:0;
        }
        .tc-title { font-size:17px; font-weight:900; color:#1A2E4A; }
        .tc-close  { background:none; border:none; font-size:22px; cursor:pointer; color:#B0BBC8; padding:4px; }
        .tc-body   { flex:1; overflow-y:auto; display:flex; flex-direction:row; gap:0; align-items:stretch; }
        .tc-left-col {
            flex:0 0 50%; width:50%; padding:14px 12px 24px 16px;
            display:flex; flex-direction:column; gap:16px;
            border-right:1px solid #EEF2F7;
        }
        .tc-right-col {
            flex:0 0 50%; width:50%; padding:14px 16px 24px 12px;
            display:flex; flex-direction:column; gap:6px;
            overflow-y:auto;
        }
        .tc-sec-lbl{ font-size:10px; font-weight:800; color:#95A5A6; text-transform:uppercase; letter-spacing:.6px; margin-bottom:6px; }
        /* Design grid — 2 columns filling the right half */
        .tc-designs-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
        .tc-design-card  {
            border:2px solid #E8EDF3; border-radius:12px; padding:10px 6px 8px;
            display:flex; flex-direction:column; align-items:center; gap:3px;
            cursor:pointer; transition:all .15s; text-align:center;
        }
        .tc-design-card.active { border-color:#3B82F6; background:#EFF6FF; }
        .tc-d-emoji  { font-size:24px; }
        .tc-d-label  { font-size:10px; font-weight:700; color:#1A2E4A; }
        .tc-d-badge  { font-size:8px; font-weight:800; padding:2px 5px; border-radius:4px; background:#FEF9C3; color:#92400E; }
        /* Duration chips */
        .tc-dur-chips { display:flex; gap:7px; flex-wrap:wrap; }
        .tc-dur-chip  {
            padding:8px 15px; border-radius:20px; border:2px solid #E0E7EF;
            font-size:13px; font-weight:700; color:#64748B; cursor:pointer; transition:all .15s;
        }
        .tc-dur-chip.active { background:#1A2E4A; border-color:#1A2E4A; color:white; }
        .tc-custom-row { display:flex; align-items:center; gap:8px; margin-top:6px; }
        .tc-custom-row input {
            width:68px; padding:8px 10px; border:2px solid #E0E7EF; border-radius:10px;
            font-size:16px; font-weight:700; text-align:center; color:#1A2E4A; outline:none; font-family:inherit;
        }
        .tc-custom-row input:focus { border-color:#3B82F6; }
        .tc-custom-row label { font-size:13px; color:#64748B; font-weight:600; }
        /* Char picker */
        .tc-char-row  {
            display:flex; align-items:center; gap:12px;
            background:#F8FAFC; border-radius:14px; padding:12px 14px;
        }
        .tc-char-preview {
            width:58px; height:58px; border-radius:50%; border:3px solid #DDE4EC;
            background:#EEF2FF; display:flex; align-items:center; justify-content:center;
            font-size:32px; overflow:hidden; flex-shrink:0; cursor:pointer;
        }
        .tc-char-preview img { width:100%; height:100%; object-fit:cover; }
        .tc-char-info  { flex:1; }
        .tc-char-name  { font-size:14px; font-weight:700; color:#1A2E4A; }
        .tc-char-hint  { font-size:11px; color:#95A5A6; margin-top:2px; }
        .tc-char-btn   {
            background:#EEF2FF; border:none; border-radius:10px; padding:8px 13px;
            font-size:12px; font-weight:700; color:#4F46E5; cursor:pointer;
        }
        /* Start button */
        .tc-start-btn {
            width:100%; padding:16px; border-radius:16px; border:none;
            background:linear-gradient(135deg,#1A2E4A 0%,#3B82F6 100%);
            color:white; font-size:18px; font-weight:900; cursor:pointer;
            box-shadow:0 4px 18px rgba(59,130,246,.4); transition:opacity .15s;
        }
        .tc-start-btn:active { opacity:.85; }

        /* ══════════════════════════════════════
           TOKEN ECONOMY SCREEN  (Fichas)
        ══════════════════════════════════════ */
        #tokenScreen {
            position:fixed; inset:0; z-index:880;
            background:#FFFBF0; display:none; flex-direction:column;
            overflow:hidden; font-family:inherit;
        }
        #tokenScreen.active { display:flex; }
        #tokenBody { flex:1; display:flex; flex-direction:column; overflow:hidden; }

        /* ── Home grid ── */
        .tk-home-body {
            flex:1; overflow-y:auto; padding:16px;
            display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
            gap:12px; align-content:start;
        }
        .tk-board-card {
            background:white; border-radius:18px;
            box-shadow:0 2px 12px rgba(0,0,0,.08);
            display:flex; flex-direction:column; align-items:center;
            padding:16px 12px 14px; gap:6px; cursor:pointer;
            border:3px solid transparent;
            transition:transform .13s, box-shadow .13s; position:relative;
        }
        .tk-board-card:active { transform:scale(.96); }
        .tk-board-icon { font-size:36px; line-height:1; }
        .tk-board-icon img { width:52px; height:52px; object-fit:contain; border-radius:10px; }
        .tk-board-name { font-size:13px; font-weight:800; color:#1A2E4A; text-align:center; line-height:1.3; }
        .tk-board-meta { font-size:10px; color:#94A3B8; font-weight:600; }
        .tk-board-del {
            position:absolute; top:6px; right:8px; background:none; border:none;
            font-size:14px; cursor:pointer; color:#CBD5E1; padding:2px; display:none;
        }
        .tk-managing .tk-board-del { display:block; }
        .tk-board-del:hover { color:#EF4444; }

        /* ── Add board card ── */
        .tk-add-card {
            border-radius:18px; border:3px dashed #CBD5E1; background:transparent;
            display:flex; flex-direction:column; align-items:center; justify-content:center;
            gap:6px; padding:16px 12px; cursor:pointer; color:#94A3B8; min-height:120px;
            transition:border-color .15s, color .15s;
        }
        .tk-add-card:hover { border-color:#F59E0B; color:#F59E0B; }
        .tk-add-icon  { font-size:28px; }
        .tk-add-label { font-size:12px; font-weight:700; }

        /* ── Board view ── */
        .tk-board-body {
            flex:1; display:flex; flex-direction:column;
            align-items:center; justify-content:center;
            padding:16px 12px; gap:16px; overflow:hidden;
        }
        .tk-progress-label {
            font-size:clamp(15px,4vw,20px); font-weight:800; color:#92400E;
            letter-spacing:.5px;
        }
        /* Token grid — tap the whole thing */
        .tk-grid-wrap {
            flex:1; display:flex; align-items:center; justify-content:center;
            width:100%; cursor:pointer; position:relative; max-height:70vh;
        }
        .tk-token-grid {
            display:grid;
            gap:clamp(6px,2vw,14px);
            padding:8px;
        }
        .tk-token-slot {
            border-radius:clamp(10px,2vw,18px);
            display:flex; align-items:center; justify-content:center;
            overflow:hidden; background:#FEF3C7; border:3px solid #FDE68A;
            transition:all .25s cubic-bezier(.34,1.56,.64,1);
            aspect-ratio:1;
        }
        .tk-token-slot.earned {
            background:white; border-color:#F59E0B;
            box-shadow:0 2px 12px rgba(245,158,11,.35);
            animation:tkEarnPop .35s cubic-bezier(.34,1.56,.64,1);
        }
        @keyframes tkEarnPop {
            0%   { transform:scale(.6) rotate(-10deg); opacity:.3; }
            60%  { transform:scale(1.15) rotate(3deg); }
            100% { transform:scale(1) rotate(0deg); opacity:1; }
        }
        .tk-token-slot.empty .tk-empty-dot {
            width:35%; height:35%; border-radius:50%; background:#FDE68A;
        }
        .tk-token-img  { width:82%; height:82%; object-fit:contain; }
        .tk-token-emoji { font-size:clamp(22px,8cqw,52px); line-height:1; }

        /* ── Reward overlay ── */
        .tk-reward-overlay {
            position:absolute; inset:0; border-radius:inherit;
            background:rgba(255,251,235,.96);
            display:flex; flex-direction:column;
            align-items:center; justify-content:center; gap:12px;
            z-index:2; animation:tkRewardIn .45s cubic-bezier(.34,1.56,.64,1);
            cursor:pointer;
        }
        @keyframes tkRewardIn {
            from { transform:scale(.7); opacity:0; }
            to   { transform:scale(1); opacity:1; }
        }
        .tk-reward-img   { font-size:80px; line-height:1; }
        .tk-reward-img img { width:120px; height:120px; object-fit:contain; border-radius:20px; }
        .tk-reward-text  { font-size:28px; font-weight:900; color:#92400E; text-align:center; }
        .tk-reward-hint  { font-size:13px; color:#B45309; font-weight:600; }

        /* ── Earn button (for when counter is bottom-centered) ── */
        .tk-earn-btn {
            background:linear-gradient(135deg,#F59E0B,#D97706);
            color:white; border:none; border-radius:60px;
            padding:14px 44px; font-size:18px; font-weight:900;
            cursor:pointer; box-shadow:0 4px 16px rgba(245,158,11,.45);
            transition:transform .12s, box-shadow .12s; flex-shrink:0;
            letter-spacing:.3px;
        }
        .tk-earn-btn:active  { transform:scale(.95); box-shadow:0 2px 8px rgba(245,158,11,.3); }
        .tk-earn-btn:disabled { opacity:.35; cursor:default; }

        /* ── Edit / config panel ── */
        .tk-config-body {
            flex:1; overflow-y:auto; padding:16px;
            display:flex; flex-direction:column; gap:16px;
        }
        .tk-config-section {
            background:white; border-radius:16px; padding:16px;
            box-shadow:0 2px 8px rgba(0,0,0,.06);
            display:flex; flex-direction:column; gap:12px;
        }
        .tk-config-label { font-size:11px; font-weight:800; color:#92400E; text-transform:uppercase; letter-spacing:.7px; }
        .tk-name-input {
            border:2px solid #FDE68A; border-radius:10px; padding:9px 12px;
            font-size:15px; font-weight:700; color:#1A2E4A; font-family:inherit;
            outline:none; width:100%; box-sizing:border-box;
        }
        .tk-name-input:focus { border-color:#F59E0B; }
        /* count picker */
        .tk-count-row { display:flex; align-items:center; gap:14px; justify-content:center; }
        .tk-count-btn {
            width:42px; height:42px; border-radius:50%; border:none;
            background:#FEF3C7; color:#92400E; font-size:22px; font-weight:700;
            cursor:pointer; transition:background .15s;
        }
        .tk-count-btn:hover { background:#FDE68A; }
        .tk-count-val { font-size:32px; font-weight:900; color:#92400E; min-width:48px; text-align:center; }
        /* image picker rows */
        .tk-img-row { display:flex; align-items:center; gap:12px; }
        .tk-img-pick-btn {
            width:64px; height:64px; border-radius:14px; border:2px dashed #FDE68A;
            background:#FFFBF0; cursor:pointer; display:flex; align-items:center;
            justify-content:center; font-size:30px; flex-shrink:0; overflow:hidden;
            transition:border-color .15s;
        }
        .tk-img-pick-btn:hover { border-color:#F59E0B; }
        .tk-img-pick-btn img { width:100%; height:100%; object-fit:contain; }
        .tk-img-desc { font-size:13px; color:#92400E; font-weight:600; line-height:1.5; }
        /* mini token preview */
        .tk-mini-preview {
            display:flex; flex-wrap:wrap; gap:5px; padding:4px 0;
        }
        .tk-mini-dot {
            width:24px; height:24px; border-radius:6px; background:#FDE68A;
            display:flex; align-items:center; justify-content:center; font-size:14px;
        }

        /* ══════════════════════════════════════
           ROUTINE SCREEN  (Rotina)
        ══════════════════════════════════════ */
        #routineScreen {
            position:fixed; inset:0; z-index:870;
            background:#F0F4F0; display:none; flex-direction:column;
            overflow:hidden; font-family:inherit;
        }
        #routineScreen.active { display:flex; }
        #routineBody { flex:1; display:flex; flex-direction:column; overflow:hidden; }

        /* ── Routine home grid ── */
        .rt-home-body {
            flex:1; overflow-y:auto; padding:16px;
            display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr));
            gap:12px; align-content:start;
        }
        .rt-routine-card {
            background:white; border-radius:18px;
            box-shadow:0 2px 10px rgba(0,0,0,.08);
            display:flex; flex-direction:column; align-items:center;
            padding:18px 12px 14px; gap:8px; cursor:pointer;
            border:3px solid transparent;
            transition:transform .13s, box-shadow .13s;
            position:relative;
        }
        .rt-routine-card:active { transform:scale(.96); box-shadow:0 1px 5px rgba(0,0,0,.1); }
        .rt-routine-icon { font-size:38px; line-height:1; }
        .rt-routine-name {
            font-size:13px; font-weight:800; color:#1A2E4A;
            text-align:center; line-height:1.3;
        }
        .rt-routine-count { font-size:10px; color:#94A3B8; font-weight:600; }
        .rt-card-del {
            position:absolute; top:6px; right:8px;
            background:none; border:none; font-size:14px;
            cursor:pointer; color:#CBD5E1; padding:2px;
            display:none;
        }
        .rt-editing-list .rt-card-del { display:block; }
        .rt-card-del:hover { color:#EF4444; }

        /* ── add new card ── */
        .rt-add-card {
            background:transparent; border-radius:18px;
            border:3px dashed #CBD5E1; display:flex; flex-direction:column;
            align-items:center; justify-content:center; gap:6px;
            padding:18px 12px 14px; cursor:pointer; color:#94A3B8;
            transition:border-color .15s, color .15s; min-height:120px;
        }
        .rt-add-card:hover { border-color:#3B82F6; color:#3B82F6; }
        .rt-add-icon { font-size:28px; }
        .rt-add-label { font-size:12px; font-weight:700; }

        /* ── layout toggle ── */
        .rt-layout-toggle {
            display:flex; gap:0; background:#E2E8F0; border-radius:10px;
            padding:3px; flex-shrink:0;
        }
        .rt-layout-btn {
            border:none; background:transparent; border-radius:7px;
            padding:5px 10px; font-size:14px; cursor:pointer;
            transition:background .15s;
        }
        .rt-layout-btn.active { background:white; box-shadow:0 1px 4px rgba(0,0,0,.12); }

        /* ── step display — VERTICAL ── */
        .rt-view-body {
            flex:1; overflow-y:auto; padding:14px 16px;
            display:flex; flex-direction:column; gap:10px;
            align-items:center;   /* centra os cards horizontalmente */
        }
        .rt-step-card-v {
            display:flex; align-items:center; gap:12px;
            background:white; border-radius:16px; padding:10px 14px;
            box-shadow:0 2px 8px rgba(0,0,0,.07);
            border:3px solid transparent;
            transition:border-color .2s, opacity .2s;
            cursor:pointer;
            width:100%; max-width:620px;  /* limita largura e centra */
        }
        .rt-step-card-v.speaking { border-color:#3B82F6; animation:bhPulse .55s ease-in-out infinite; }
        .rt-step-card-v.hidden-step { opacity:.3; }
        .rt-step-num-v {
            width:30px; height:30px; border-radius:50%; background:#1A2E4A;
            color:white; font-size:12px; font-weight:800;
            display:flex; align-items:center; justify-content:center; flex-shrink:0;
        }
        .rt-step-img-v {
            width:52px; height:52px; border-radius:10px; overflow:hidden;
            background:#F8FAFC; display:flex; align-items:center; justify-content:center;
            flex-shrink:0;
        }
        .rt-step-img-v img { width:100%; height:100%; object-fit:contain; }
        .rt-step-emoji-v { font-size:28px; }
        .rt-step-label-v { font-size:15px; font-weight:700; color:#1A2E4A; flex:1; }
        .rt-step-edit-v {
            display:none; flex-shrink:0; gap:6px; align-items:center;
        }
        .rt-editing .rt-step-edit-v { display:flex; }
        .rt-step-eye-btn, .rt-step-del-btn {
            border:none; border-radius:8px; width:30px; height:30px;
            cursor:pointer; font-size:14px;
            display:flex; align-items:center; justify-content:center;
        }
        .rt-step-eye-btn { background:#E0F2FE; color:#0288D1; }
        .rt-step-del-btn { background:#FEE2E2; color:#EF4444; }

        /* ── step display — HORIZONTAL ── */
        .rt-view-body-h {
            flex:1; overflow:hidden; display:flex;
            align-items:center; justify-content:center;
            padding:10px;
        }
        .rt-h-strip {
            display:flex; flex-direction:row; flex-wrap:nowrap;
            gap:clamp(4px,1.2vw,10px); width:100%; align-items:stretch;
        }
        .rt-step-card-h {
            flex:1; min-width:0; border-radius:clamp(8px,2vw,14px);
            background:white; box-shadow:0 2px 8px rgba(0,0,0,.08);
            display:flex; flex-direction:column; align-items:center;
            overflow:hidden; cursor:pointer;
            border:3px solid transparent;
            transition:border-color .2s, opacity .2s, transform .15s;
        }
        .rt-step-card-h:active { transform:scale(.95); }
        .rt-step-card-h.speaking { border-color:#3B82F6; animation:bhPulse .55s ease-in-out infinite; }
        .rt-step-card-h.hidden-step { opacity:.3; }
        .rt-step-num-h {
            width:100%; background:#1A2E4A; color:white;
            font-size:clamp(7px,1.8vw,10px); font-weight:800;
            text-align:center; padding:3px 2px; flex-shrink:0;
        }
        .rt-step-img-h {
            width:100%; aspect-ratio:1; display:flex;
            align-items:center; justify-content:center;
            background:#F8FAFC; overflow:hidden; flex-shrink:0;
        }
        .rt-step-img-h img { width:100%; height:100%; object-fit:contain; }
        .rt-step-emoji-h { font-size:clamp(16px,5vw,42px); }
        .rt-step-label-h {
            width:100%; padding:clamp(3px,1vw,6px) 4px;
            font-size:clamp(8px,2vw,12px); font-weight:700;
            color:#1A2E4A; text-align:center; line-height:1.3;
            word-break:break-word; flex:1; background:white;
        }

        /* ── edit overlay controls ── */
        .rt-step-card-h .rt-h-edit-btns {
            display:none; flex-direction:row; gap:3px;
            padding:3px 3px 4px; background:#F8FAFC; width:100%;
            justify-content:center; flex-shrink:0;
        }
        .rt-editing .rt-step-card-h .rt-h-edit-btns { display:flex; }
        .rt-h-btn {
            border:none; border-radius:6px; padding:3px 5px;
            font-size:11px; cursor:pointer;
        }
        .rt-h-btn.eye  { background:#E0F2FE; color:#0288D1; }
        .rt-h-btn.del  { background:#FEE2E2; color:#EF4444; }

        /* ── edit sidebar / panel ── */
        .rt-edit-step-panel {
            background:white; border-top:1px solid #E2E8F0;
            padding:12px 14px; flex-shrink:0; display:flex;
            flex-direction:column; gap:10px;
        }
        .rt-edit-panel-title { font-size:12px; font-weight:800; color:#64748B; text-transform:uppercase; letter-spacing:.5px; }
        .rt-edit-row { display:flex; gap:8px; align-items:center; }
        .rt-edit-img-btn {
            width:52px; height:52px; border-radius:10px; border:2px dashed #CBD5E1;
            background:#F8FAFC; cursor:pointer; display:flex; align-items:center;
            justify-content:center; font-size:24px; flex-shrink:0;
        }
        .rt-edit-img-btn img { width:100%; height:100%; object-fit:contain; border-radius:8px; }
        .rt-edit-label-input {
            flex:1; border:2px solid #E0E7EF; border-radius:10px;
            padding:8px 10px; font-size:14px; font-weight:700;
            color:#1A2E4A; font-family:inherit; outline:none;
        }
        .rt-edit-label-input:focus { border-color:#3B82F6; }
        .rt-add-step-btn {
            background:#EFF6FF; border:2px dashed #93C5FD; border-radius:10px;
            color:#3B82F6; font-size:13px; font-weight:800; padding:9px;
            cursor:pointer; text-align:center; transition:background .15s;
        }
        .rt-add-step-btn:hover { background:#DBEAFE; }

        /* ══════════════════════════════════════
           BEHAVIOR SCREEN  (Comportamento)
        ══════════════════════════════════════ */
        #behaviorScreen {
            position:fixed; inset:0; z-index:860;
            background:#EFF3F8; display:none; flex-direction:column;
            overflow:hidden; font-family:inherit;
        }
        #behaviorScreen.active { display:flex; }
        #behaviorBody {
            flex:1; display:flex; flex-direction:column; overflow:hidden;
        }

        /* shared header */
        .bh-header {
            display:flex; align-items:center; gap:10px;
            padding:12px 16px; background:white; flex-shrink:0;
            border-bottom:1px solid #E2E8F0;
        }
        .bh-back-btn {
            background:none; border:none; font-size:13px; font-weight:700;
            color:#64748B; cursor:pointer; padding:6px 8px; border-radius:8px;
            white-space:nowrap;
        }
        .bh-title { flex:1; font-size:17px; font-weight:900; color:#1A2E4A; text-align:center; }
        .bh-action-btn {
            background:#EEF2FF; border:none; border-radius:10px; white-space:nowrap;
            padding:7px 12px; font-size:12px; font-weight:700; color:#3B82F6; cursor:pointer;
        }
        .bh-action-btn.active { background:#3B82F6; color:white; }

        /* ── Home ── */
        .bh-home-body {
            flex:1; overflow-y:auto; padding:28px 20px;
            display:flex; flex-direction:column; gap:16px; align-items:center;
        }
        .bh-home-subtitle {
            font-size:13px; color:#94A3B8; font-weight:600; text-align:center;
            margin-bottom:4px;
        }
        .bh-feature-card {
            width:100%; max-width:420px; background:white; border-radius:20px;
            padding:18px 20px; display:flex; align-items:center; gap:16px;
            box-shadow:0 2px 12px rgba(0,0,0,.07); cursor:pointer;
            transition:transform .12s, box-shadow .12s;
        }
        .bh-feature-card:active { transform:scale(.97); }
        .bh-feature-icon { font-size:38px; flex-shrink:0; }
        .bh-feature-info { flex:1; }
        .bh-feature-name { font-size:15px; font-weight:800; color:#1A2E4A; }
        .bh-feature-desc { font-size:11px; color:#64748B; margin-top:3px; line-height:1.4; }
        .bh-feature-arrow { font-size:20px; color:#CBD5E1; }

        /* ── Primeiro e Depois ── */
        .pd-body {
            flex:1; display:flex; align-items:center; justify-content:center;
            padding:16px 12px; overflow:hidden;
        }
        .pd-pair {
            display:flex; align-items:stretch; gap:0;
            width:100%; max-width:540px; height:100%; max-height:480px;
        }
        .pd-card {
            flex:1; border-radius:22px; display:flex; flex-direction:column;
            overflow:hidden; box-shadow:0 6px 24px rgba(0,0,0,.13);
        }
        .pd-card-header {
            padding:13px 12px; text-align:center; font-size:12px; font-weight:900;
            color:white; text-transform:uppercase; letter-spacing:1.4px; flex-shrink:0;
        }
        .pd-card-primeiro .pd-card-header { background:#3B82F6; }
        .pd-card-depois   .pd-card-header { background:#10B981; }
        .pd-image-wrap {
            flex:1; background:#F8FAFC; display:flex; align-items:center;
            justify-content:center; position:relative; cursor:pointer; overflow:hidden;
        }
        .pd-image-wrap img { width:100%; height:100%; object-fit:contain; }
        .pd-img-placeholder {
            display:flex; flex-direction:column; align-items:center; gap:6px; color:#C0CCDA;
        }
        .pd-img-placeholder .pd-ph-icon { font-size:44px; }
        .pd-img-placeholder .pd-ph-hint { font-size:11px; font-weight:600; }
        .pd-img-edit-badge {
            position:absolute; bottom:8px; right:8px; background:rgba(0,0,0,.35);
            border-radius:8px; padding:3px 7px; font-size:11px; color:white; font-weight:600;
        }
        .pd-card-foot {
            background:white; padding:10px 12px; flex-shrink:0;
        }
        .pd-label-view {
            text-align:center; font-size:16px; font-weight:800; color:#1A2E4A;
            min-height:22px; line-height:1.3;
        }
        .pd-label-input {
            width:100%; border:2px solid #E0E7EF; border-radius:10px; box-sizing:border-box;
            padding:7px 10px; font-size:14px; font-weight:700; color:#1A2E4A;
            font-family:inherit; outline:none; text-align:center;
        }
        .pd-label-input:focus { border-color:#3B82F6; }
        .pd-arrow-col {
            display:flex; align-items:center; justify-content:center;
            padding:0 10px; flex-shrink:0;
        }
        .pd-arrow-icon {
            font-size:36px; color:#94A3B8;
            filter:drop-shadow(0 2px 4px rgba(0,0,0,.1));
        }

        /* ── Combinados Visuais ── */
        .cb-body {
            flex:1; display:flex; flex-direction:column; overflow:hidden;
        }
        .cb-strip-wrap {
            flex-shrink:0; background:white; border-bottom:1px solid #E2E8F0;
            padding:10px 0;
        }
        .cb-strip {
            display:flex; gap:8px; padding:0 14px;
            overflow-x:auto; overflow-y:hidden;
            -webkit-overflow-scrolling:touch; scrollbar-width:none;
        }
        .cb-strip::-webkit-scrollbar { display:none; }
        .cb-step-thumb {
            flex:0 0 90px; border-radius:14px; background:#F8FAFC;
            border:3px solid transparent; display:flex; flex-direction:column;
            overflow:hidden; cursor:pointer;
            transition:border-color .15s, transform .15s, box-shadow .15s;
            position:relative;
        }
        .cb-step-thumb.active {
            border-color:#3B82F6;
            box-shadow:0 3px 12px rgba(59,130,246,.3);
            transform:translateY(-2px);
        }
        .cb-step-thumb.done { opacity:.45; }
        .cb-thumb-num {
            background:#1A2E4A; color:white; font-size:9px; font-weight:800;
            text-align:center; padding:3px 4px; letter-spacing:.4px;
        }
        .cb-step-thumb.active .cb-thumb-num { background:#3B82F6; }
        .cb-step-thumb.done  .cb-thumb-num  { background:#10B981; }
        .cb-thumb-img {
            height:60px; display:flex; align-items:center; justify-content:center;
            background:#F8FAFC; position:relative; overflow:hidden;
        }
        .cb-thumb-img img { width:100%; height:100%; object-fit:contain; }
        .cb-thumb-emoji { font-size:28px; }
        .cb-thumb-label {
            padding:4px 5px; text-align:center; font-size:9px; font-weight:700;
            color:#1A2E4A; line-height:1.3; min-height:24px;
            background:white;
        }
        .cb-del-btn {
            position:absolute; top:22px; right:2px; width:18px; height:18px;
            border-radius:50%; background:rgba(239,68,68,.9); border:none;
            color:white; font-size:10px; cursor:pointer;
            display:none; align-items:center; justify-content:center; z-index:3;
        }
        .cb-editing .cb-del-btn { display:flex; }
        .cb-add-thumb {
            flex:0 0 90px; border-radius:14px; border:3px dashed #CBD5E1;
            background:transparent; display:flex; flex-direction:column;
            align-items:center; justify-content:center; gap:4px;
            cursor:pointer; color:#94A3B8; min-height:100px;
            font-size:11px; font-weight:700; transition:border-color .15s, color .15s;
        }
        .cb-add-thumb:hover, .cb-add-thumb:active { border-color:#3B82F6; color:#3B82F6; }
        .cb-add-thumb-icon { font-size:24px; }
        /* Active step — large display */
        .cb-focus {
            flex:1; display:flex; flex-direction:column;
            align-items:center; justify-content:center; gap:12px; padding:16px 20px;
            overflow:hidden;
        }
        .cb-focus-counter {
            font-size:11px; font-weight:800; color:#94A3B8;
            text-transform:uppercase; letter-spacing:.8px;
        }
        .cb-focus-img {
            flex:1; max-height:220px; width:100%; max-width:280px;
            display:flex; align-items:center; justify-content:center;
            background:white; border-radius:20px; overflow:hidden;
            box-shadow:0 4px 20px rgba(0,0,0,.10); cursor:pointer;
        }
        .cb-focus-img img { width:100%; height:100%; object-fit:contain; }
        .cb-focus-emoji { font-size:72px; }
        .cb-focus-label {
            font-size:clamp(20px,6vw,32px); font-weight:900; color:#1A2E4A;
            text-align:center; line-height:1.2;
        }
        .cb-focus-label-input {
            font-size:22px; font-weight:900; color:#1A2E4A; text-align:center;
            border:2px solid #E0E7EF; border-radius:12px; padding:8px 14px;
            font-family:inherit; outline:none; width:100%; max-width:300px; box-sizing:border-box;
        }
        .cb-focus-label-input:focus { border-color:#3B82F6; }
        .cb-nav-row { display:flex; gap:16px; align-items:center; flex-shrink:0; }
        .cb-nav-btn {
            width:56px; height:56px; border-radius:50%; border:2px solid #E2E8F0;
            background:white; font-size:26px; cursor:pointer; color:#1A2E4A;
            display:flex; align-items:center; justify-content:center;
            box-shadow:0 2px 10px rgba(0,0,0,.08); transition:all .15s;
        }
        .cb-nav-btn:disabled { opacity:.25; cursor:default; }
        .cb-nav-btn.next { background:#3B82F6; border-color:#3B82F6; color:white;
                           box-shadow:0 4px 14px rgba(59,130,246,.4); }
        .cb-done-btn {
            background:#10B981; color:white; border:none; border-radius:28px;
            padding:12px 28px; font-size:15px; font-weight:800; cursor:pointer;
            box-shadow:0 4px 14px rgba(16,185,129,.4);
        }

        /* ── Speaking animation ── */
        @keyframes bhPulse {
            0%,100% { box-shadow:0 0 0 3px rgba(59,130,246,.8); }
            50%      { box-shadow:0 0 0 8px rgba(59,130,246,.2); }
        }
        .pd-card-speaking {
            animation:bhPulse .55s ease-in-out infinite;
        }
        .cb-step-speaking {
            border-color:#3B82F6 !important;
            animation:bhPulse .55s ease-in-out infinite;
        }
        .cb-present-step.cb-step-speaking .cb-present-img {
            box-shadow:0 0 0 4px #3B82F6;
        }

        /* ── List views ── */
        .bh-list-body {
            flex:1; overflow-y:auto; padding:16px;
            display:flex; flex-direction:column; gap:12px;
        }
        .bh-list-empty {
            text-align:center; color:#94A3B8; font-size:14px;
            margin-top:40px; line-height:1.8;
        }
        .bh-sequence-card {
            background:white; border-radius:16px;
            box-shadow:0 2px 10px rgba(0,0,0,.07);
            padding:12px 14px; cursor:pointer; position:relative;
            display:flex; flex-direction:column; gap:8px;
            transition:transform .12s, box-shadow .12s;
        }
        .bh-sequence-card:active { transform:scale(.98); box-shadow:0 1px 5px rgba(0,0,0,.1); }
        .bh-seq-name {
            font-size:14px; font-weight:800; color:#1A2E4A;
            display:flex; align-items:center; gap:8px;
        }
        .bh-seq-count { font-size:11px; color:#94A3B8; font-weight:600; }
        .bh-seq-preview {
            display:flex; align-items:center; gap:8px;
        }
        .bh-seq-preview-cb { flex-wrap:wrap; }
        .bh-seq-mini {
            flex:1; min-width:0; border-radius:10px; overflow:hidden;
            background:#F8FAFC; display:flex; flex-direction:column;
            align-items:center; padding:6px 4px; gap:4px; max-width:90px;
        }
        .bh-seq-mini-cb { flex:0 0 64px; max-width:64px; }
        .bh-seq-mini img { width:40px; height:40px; object-fit:contain; }
        .bh-seq-mini span { font-size:22px; }
        .bh-seq-mini div { font-size:10px; font-weight:700; color:#1A2E4A;
            text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; width:100%; }
        .bh-seq-arrow { font-size:20px; color:#CBD5E1; flex-shrink:0; }
        .bh-seq-more {
            flex:0 0 36px; height:36px; border-radius:8px; background:#E2E8F0;
            display:flex; align-items:center; justify-content:center;
            font-size:11px; font-weight:800; color:#64748B;
        }
        .bh-seq-del {
            position:absolute; top:10px; right:10px;
            background:none; border:none; font-size:15px; cursor:pointer;
            color:#CBD5E1; padding:4px;
        }
        .bh-seq-del:hover { color:#EF4444; }

        /* ── Combinados — name input in header ── */
        .cb-header-name-input {
            flex:1; min-width:0; border:none; outline:none;
            background:transparent; font-family:inherit;
            font-size:15px; font-weight:900; color:#1A2E4A;
            text-align:center; padding:4px 6px;
            border-bottom:2px solid #E2E8F0;
            transition:border-color .15s;
        }
        .cb-header-name-input:focus { border-bottom-color:#3B82F6; }
        .cb-header-name-input::placeholder { color:#C0CCDA; font-weight:600; }

        /* ── Combinados — presentation grid ── */
        .cb-present-body {
            flex:1; overflow:hidden; display:flex; flex-direction:column;
            align-items:stretch; justify-content:center;
            padding:16px 10px; gap:10px;
        }
        .cb-present-title {
            font-size:16px; font-weight:900; color:#1A2E4A;
            text-align:center; flex-shrink:0;
        }
        /* Single horizontal row — all cards share equal width */
        .cb-present-grid {
            display:flex; flex-direction:row; flex-wrap:nowrap;
            gap:clamp(4px, 1.2vw, 10px);
            width:100%; align-items:stretch;
        }
        .cb-present-step {
            flex:1; min-width:0;          /* equal share, never overflow */
            border-radius:clamp(8px,2vw,14px); background:white;
            box-shadow:0 2px 8px rgba(0,0,0,.08);
            display:flex; flex-direction:column; align-items:center;
            overflow:hidden; cursor:pointer;
            border:3px solid transparent;
            transition:border-color .2s, transform .15s;
        }
        .cb-present-step:active { transform:scale(.95); }
        .cb-present-num {
            width:100%; background:#1A2E4A; color:white;
            font-size:clamp(7px, 1.8vw, 11px); font-weight:800;
            text-align:center; padding:3px 2px; letter-spacing:.3px;
            flex-shrink:0;
        }
        .cb-present-step.cb-step-speaking .cb-present-num { background:#3B82F6; }
        /* Done step */
        .cb-present-step.cb-step-done {
            opacity: .38;
            pointer-events: none;   /* disable tap-to-speak */
            position: relative;
        }
        .cb-present-step.cb-step-done .cb-present-num { background:#10B981; }
        .cb-present-step.cb-step-done .cb-done-badge {
            display: flex;
        }
        .cb-done-badge {
            display: none;
            position: absolute; inset: 0;
            align-items: center; justify-content: center;
            font-size: clamp(22px, 7vw, 56px);
            pointer-events: none;
        }
        /* "✓ Concluído" button overlaid on each card (therapist use) */
        .cb-done-btn {
            position: absolute; bottom: 4px; right: 4px;
            background: rgba(16,185,129,.15); border: 2px solid #10B981;
            border-radius: 50%; width: clamp(22px,4vw,32px); height: clamp(22px,4vw,32px);
            font-size: clamp(11px,2.5vw,16px); font-weight: 900; color: #10B981;
            cursor: pointer; display: flex; align-items: center; justify-content: center;
            transition: background .15s, transform .1s;
            z-index: 2;
        }
        .cb-done-btn:active { transform: scale(.88); }
        .cb-present-step.cb-step-done .cb-done-btn {
            background: #10B981; color: white; pointer-events: auto;
        }
        .cb-present-img {
            width:100%; aspect-ratio:1; display:flex;
            align-items:center; justify-content:center;
            background:#F8FAFC; overflow:hidden;
            transition:box-shadow .2s; flex-shrink:0;
        }
        .cb-present-img img { width:100%; height:100%; object-fit:contain; }
        .cb-present-emoji { font-size:clamp(18px, 5vw, 48px); }
        .cb-present-lbl {
            width:100%; padding:clamp(3px,1vw,7px) 4px; background:white;
            font-size:clamp(8px, 2vw, 13px); font-weight:700;
            color:#1A2E4A; text-align:center; line-height:1.3;
            word-break:break-word; flex:1;
        }

        /* ════════════════════════════════════════
           HISTÓRIA SOCIAL
           ════════════════════════════════════════ */
        #socialStoryScreen {
            position:fixed; inset:0; z-index:875;
            background:#FFF8F0; display:none; flex-direction:column;
            overflow:hidden; font-family:inherit;
        }
        #socialStoryScreen.active { display:flex; }
        #socialStoryBody { flex:1; display:flex; flex-direction:column; overflow:hidden; }

        /* ── home / list ── */
        .ss-home-body {
            flex:1; overflow-y:auto; padding:16px;
            display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
            gap:12px; align-content:start;
        }
        .ss-story-card {
            background:white; border-radius:18px; box-shadow:0 2px 10px rgba(0,0,0,.08);
            display:flex; flex-direction:column; align-items:center;
            padding:18px 12px 14px; gap:8px; cursor:pointer;
            border:3px solid transparent; transition:transform .13s;
            position:relative;
        }
        .ss-story-card:active { transform:scale(.96); }
        .ss-story-icon { font-size:38px; line-height:1; }
        .ss-story-name { font-size:13px; font-weight:800; color:#1A2E4A; text-align:center; }
        .ss-story-count { font-size:10px; color:#94A3B8; font-weight:600; }
        .ss-del-card-btn {
            position:absolute; top:6px; right:6px;
            background:#FEE2E2; border:none; border-radius:50%;
            width:22px; height:22px; font-size:11px; color:#DC2626;
            cursor:pointer; display:flex; align-items:center; justify-content:center;
        }
        .ss-print-card-btn {
            position:absolute; top:6px; left:6px;
            background:#EFF6FF; border:none; border-radius:50%;
            width:22px; height:22px; font-size:11px; color:#3B82F6;
            cursor:pointer; display:flex; align-items:center; justify-content:center;
        }
        .ss-print-card-btn:active { background:#DBEAFE; }
        /* Vídeo na edição (miniatura) */
        .ss-video-thumb {
            height:56px; border-radius:6px; object-fit:contain;
            background:#000; flex-shrink:0;
        }
        /* Vídeo na apresentação */
        .ss-page-video {
            width:100%; height:100%; object-fit:contain;
            background:#000; border-radius:8px; display:block;
        }
        .ss-new-card {
            background:rgba(251,146,60,.08); border:2px dashed #FB923C;
            color:#EA580C; cursor:pointer; border-radius:18px;
            display:flex; flex-direction:column; align-items:center;
            justify-content:center; gap:8px; padding:24px 12px;
            font-size:13px; font-weight:800; min-height:110px;
            transition:background .15s;
        }
        .ss-new-card:active { background:rgba(251,146,60,.18); }

        /* ── edit view ── */
        .ss-edit-body { flex:1; display:flex; flex-direction:column; overflow:hidden; }
        .ss-step-strip {
            display:flex; flex-direction:row; gap:8px;
            padding:10px 12px; overflow-x:auto; flex-shrink:0;
            background:#FFF0E6; border-bottom:2px solid #FCD5A8;
        }
        .ss-step-strip::-webkit-scrollbar { display:none; }
        .ss-step-thumb {
            flex-shrink:0; width:72px; border-radius:10px;
            border:2.5px solid transparent; cursor:pointer;
            background:white; overflow:hidden; position:relative;
            display:flex; flex-direction:column; align-items:center;
            transition:border-color .15s;
        }
        .ss-step-thumb.active { border-color:#FB923C; }
        .ss-step-thumb-num {
            width:100%; background:#1A2E4A; color:white;
            font-size:9px; font-weight:800; text-align:center; padding:2px;
        }
        .ss-step-thumb.active .ss-step-thumb-num { background:#FB923C; }
        .ss-step-thumb-img {
            width:100%; aspect-ratio:1; display:flex; align-items:center;
            justify-content:center; font-size:22px; background:#F8FAFC; overflow:hidden;
        }
        .ss-step-thumb-img img { width:100%; height:100%; object-fit:cover; }
        .ss-step-thumb-lbl {
            font-size:8px; font-weight:700; color:#1A2E4A;
            padding:2px 3px; text-align:center; line-height:1.2;
            white-space:nowrap; overflow:hidden; text-overflow:ellipsis; width:100%;
        }
        .ss-step-del {
            position:absolute; top:14px; right:1px;
            background:#FEE2E2; border:none; border-radius:50%;
            width:16px; height:16px; font-size:9px; color:#DC2626;
            cursor:pointer; display:flex; align-items:center; justify-content:center;
        }
        .ss-add-thumb {
            flex-shrink:0; width:60px; border:2px dashed #FB923C;
            border-radius:10px; background:none; cursor:pointer;
            display:flex; flex-direction:column; align-items:center;
            justify-content:center; gap:2px; color:#FB923C;
            font-size:11px; font-weight:800; padding:8px 4px;
        }
        /* focus pane */
        .ss-edit-focus { flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:12px; }
        .ss-field-row { display:flex; flex-direction:column; gap:6px; }
        .ss-field-label { font-size:11px; font-weight:800; color:#92400E; text-transform:uppercase; letter-spacing:.4px; }
        .ss-img-pick-area {
            width:100%; aspect-ratio:16/7; border:2px dashed #FCD5A8;
            border-radius:14px; background:#FFF8F0; display:flex;
            align-items:center; justify-content:center; cursor:pointer;
            overflow:hidden; position:relative; transition:background .15s;
        }
        .ss-img-pick-area:active { background:#FEF3C7; }
        .ss-img-pick-area img { width:100%; height:100%; object-fit:contain; }
        .ss-img-pick-area .ss-img-placeholder { font-size:32px; opacity:.4; }
        .ss-text-input {
            width:100%; border:2px solid #FCD5A8; border-radius:12px;
            padding:10px 12px; font-size:15px; font-family:inherit;
            resize:none; min-height:80px; background:white; color:#1A2E4A;
            box-sizing:border-box;
        }
        .ss-text-input:focus { outline:none; border-color:#FB923C; }
        /* audio controls */
        .ss-audio-row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
        .ss-audio-btn {
            display:flex; align-items:center; gap:5px; padding:8px 14px;
            border-radius:20px; border:2px solid #FCD5A8; background:white;
            font-size:12px; font-weight:800; color:#92400E; cursor:pointer;
        }
        .ss-audio-btn:active { background:#FEF3C7; }
        .ss-audio-btn.recording { background:#FEE2E2; border-color:#DC2626; color:#DC2626; animation:ssRecPulse .8s infinite; }
        .ss-audio-play { background:#ECFDF5; border-color:#6EE7B7; color:#065F46; }
        .ss-audio-clear { background:#FEE2E2; border-color:#FECACA; color:#DC2626; padding:8px 10px; }
        @keyframes ssRecPulse { 0%,100%{opacity:1} 50%{opacity:.5} }

        /* ── presentation view ── */
        .ss-present-wrap {
            flex:1; display:flex; flex-direction:column;
            align-items:center; justify-content:center;
            padding:12px; position:relative; overflow:hidden;
            background:#FFF8F0; cursor:grab; user-select:none;
        }
        .ss-present-wrap:active { cursor:grabbing; }
        .ss-page-card {
            width:100%; max-width:580px; max-height:100%;
            background:white; border-radius:24px;
            box-shadow:0 8px 40px rgba(0,0,0,.14);
            display:flex; flex-direction:column; overflow:hidden;
            animation:ssPageIn .35s cubic-bezier(.34,1.1,.64,1);
        }
        @keyframes ssPageIn {
            from { opacity:0; transform:translateX(60px) scale(.96); }
            to   { opacity:1; transform:translateX(0)    scale(1);   }
        }
        @keyframes ssPageInRev {
            from { opacity:0; transform:translateX(-60px) scale(.96); }
            to   { opacity:1; transform:translateX(0)     scale(1);   }
        }
        .ss-page-card.rev { animation-name:ssPageInRev; }
        .ss-page-img-area {
            flex:1; min-height:0; display:flex; align-items:center;
            justify-content:center; background:#F8FAFC; overflow:hidden;
            position:relative;
        }
        .ss-page-img-area img { width:100%; height:100%; object-fit:contain; }
        .ss-page-img-area .ss-page-emoji { font-size:80px; opacity:.35; }
        .ss-page-img-area.tappable { cursor:pointer; }
        .ss-page-img-area.tappable:active { opacity:.85; }
        .ss-sound-badge {
            position:absolute; bottom:8px; right:10px;
            font-size:22px; opacity:.65; pointer-events:none;
            filter:drop-shadow(0 1px 2px rgba(0,0,0,.25));
        }
        .ss-page-text-area {
            padding:16px 20px 10px; flex-shrink:0;
            font-size:clamp(15px,3.5vw,22px); font-weight:700;
            color:#1A2E4A; text-align:center; line-height:1.5;
            background:white; max-height:35%;  overflow-y:auto;
        }
        /* nav arrows */
        .ss-nav-prev, .ss-nav-next {
            position:absolute; top:50%; transform:translateY(-50%);
            width:44px; height:44px; border-radius:50%;
            background:rgba(255,255,255,.9); border:none;
            box-shadow:0 2px 10px rgba(0,0,0,.15);
            font-size:22px; cursor:pointer; display:flex;
            align-items:center; justify-content:center;
            color:#1A2E4A; transition:background .15s;
        }
        .ss-nav-prev { left:6px; }
        .ss-nav-next { right:6px; }
        .ss-nav-prev:active,.ss-nav-next:active { background:white; }
        .ss-nav-prev:disabled,.ss-nav-next:disabled { opacity:.25; pointer-events:none; }
        /* dots */
        .ss-dots { display:flex; gap:6px; justify-content:center; padding:8px 0 4px; flex-shrink:0; }
        .ss-dot { width:8px; height:8px; border-radius:50%; background:#D1D5DB; transition:background .2s; }
        .ss-dot.active { background:#FB923C; width:20px; border-radius:4px; }
        /* page counter badge */
        .ss-page-counter {
            position:absolute; top:10px; right:14px;
            background:rgba(26,46,74,.55); color:white;
            border-radius:20px; padding:3px 10px;
            font-size:11px; font-weight:800;
        }

        /* ── grid / final view ── */
        .ss-grid-body { flex:1; overflow-y:auto; padding:16px; }
        .ss-grid-title {
            font-size:18px; font-weight:900; color:#1A2E4A;
            text-align:center; margin-bottom:14px;
        }
        .ss-grid {
            display:grid;
            grid-template-columns:repeat(auto-fill,minmax(130px,1fr));
            gap:10px;
        }
        .ss-grid-cell {
            background:white; border-radius:14px; overflow:hidden;
            box-shadow:0 2px 8px rgba(0,0,0,.08); cursor:pointer;
            display:flex; flex-direction:column;
            border:2.5px solid transparent; transition:border-color .15s;
        }
        .ss-grid-cell:active { opacity:.8; }
        .ss-grid-cell-num {
            background:#1A2E4A; color:white;
            font-size:9px; font-weight:800; text-align:center; padding:2px;
        }
        .ss-grid-cell-img {
            aspect-ratio:1; display:flex; align-items:center;
            justify-content:center; font-size:32px; background:#F8FAFC; overflow:hidden;
        }
        .ss-grid-cell-img img { width:100%; height:100%; object-fit:contain; }
        .ss-grid-cell-lbl {
            padding:5px 6px; font-size:10px; font-weight:700; color:#1A2E4A;
            text-align:center; line-height:1.3; flex:1;
        }
        .ss-grid-cell-audio {
            padding:0 6px 5px; text-align:center; font-size:10px; color:#065F46;
        }

        /* ══ DESKTOP — História Social ══════════════════════════════ */
        @media (min-width: 768px) {
            /* Overlay com fundo escurecido e card centralizado */
            #socialStoryScreen {
                background:rgba(15,23,42,.55);
                align-items:center; justify-content:center;
                padding:24px;
            }
            #socialStoryBody {
                width:100%; max-width:900px;
                max-height:calc(100vh - 48px);
                background:#FFF8F0; border-radius:24px;
                overflow:hidden; box-shadow:0 24px 80px rgba(0,0,0,.35);
            }

            /* Header interno com padding maior */
            #socialStoryBody .bh-header {
                padding:14px 24px;
            }
            #socialStoryBody .bh-title { font-size:19px; }

            /* ── Home: grid com mais colunas e cards maiores ── */
            .ss-home-body {
                padding:24px;
                grid-template-columns:repeat(auto-fill,minmax(170px,1fr));
                gap:16px;
            }
            .ss-story-card { padding:24px 16px 18px; }
            .ss-story-icon { font-size:48px; }
            .ss-story-name { font-size:14px; }

            /* ── Edição: strip lateral + foco lado a lado ── */
            .ss-edit-body { flex-direction:row; }
            .ss-step-strip {
                flex-direction:column; overflow-x:hidden; overflow-y:auto;
                width:110px; flex-shrink:0; padding:12px 8px;
                border-bottom:none; border-right:2px solid #FCD5A8;
            }
            .ss-step-thumb { width:100%; }
            .ss-add-thumb { width:100%; }
            .ss-edit-focus { padding:20px 24px; }

            /* Área de imagem na edição: proporção melhor */
            .ss-img-pick-area { aspect-ratio:16/9; }

            /* ── Apresentação: card com altura generosa ── */
            .ss-present-wrap { padding:20px 70px; }
            .ss-page-card {
                max-width:640px;
                height:min(75vh, 560px);
            }
            .ss-page-text-area {
                font-size:clamp(16px,2vw,24px);
                padding:18px 28px 14px;
            }
            /* Setas maiores e fora do card */
            .ss-nav-prev, .ss-nav-next {
                width:52px; height:52px; font-size:26px;
            }
            .ss-nav-prev { left:8px; }
            .ss-nav-next { right:8px; }
            .ss-sound-badge { font-size:28px; bottom:12px; right:14px; }
            .ss-page-counter { font-size:12px; padding:4px 12px; }

            /* ── Grid final: mais colunas ── */
            .ss-grid-body { padding:20px 28px; }
            .ss-grid {
                grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
                gap:14px;
            }
            .ss-grid-cell-lbl { font-size:12px; padding:7px 8px; }
            .ss-grid-title { font-size:22px; }
            .ss-dots { padding:10px 0 6px; gap:8px; }
            .ss-dot { width:10px; height:10px; }
            .ss-dot.active { width:26px; }
        }

        @media (min-width: 1100px) {
            #socialStoryBody { max-width:1000px; }
            .ss-page-card {
                max-width:720px;
                height:min(78vh, 620px);
            }
            .ss-edit-focus { padding:24px 32px; }
            .ss-step-strip { width:130px; }
            .ss-step-thumb { width:100%; }
            .ss-present-wrap { padding:20px 90px; }
        }
        /* ══ Fundo da tela ══════════════════════════════════════ */
        body.screen-white {
            background: #FFFFFF !important;
        }
        body.screen-black {
            background: #0F172A !important;
        }
        body.screen-black .sentence-bar {
            background: #1E293B !important;
            border-bottom-color: #334155 !important;
        }
        body.screen-black .bottom-bar {
            background: #1E293B !important;
            border-top-color: #334155 !important;
        }
        body.screen-black .bottom-resource {
            background: #263548 !important;
            border-color: #3D5068 !important;
        }
        body.screen-black .bottom-resource .res-label { color: #94A3B8 !important; }
        body.screen-black .sentence-placeholder { color: #475569 !important; }
        body.screen-black .action-btn.speak-btn,
        body.screen-black .action-btn.back-btn,
        body.screen-black .action-btn.clear-btn {
            background: #263548 !important;
            color: #E2E8F0 !important;
        }
        /* ── Etapas PELP-TEA — fundo de tela escuro ── */
        body.screen-black #symbolGrid .stage-card,
        body.screen-black #symbolGrid .stage3-card {
            background: #1E293B !important;
            /* #334155 dava 1,72:1 contra o fundo — abaixo do mínimo de 3:1 que
               a WCAG pede para o contorno de um componente. Ninguém reclamou
               porque aqui o rótulo é claro e o emoji tem sombra; ainda assim é
               o mesmo defeito do modo branco, medido da mesma forma. */
            border-color: #64748B !important;
        }
        body.screen-black #symbolGrid .stage-card .st-label,
        body.screen-black #symbolGrid .stage3-card .st3-label {
            color: #E2E8F0 !important;
        }
        body.screen-black #symbolGrid .stage-card .st-emoji,
        body.screen-black #symbolGrid .stage3-card .st3-emoji {
            /* emojis are colorful — keep them, only tweak shadow if needed */
            filter: drop-shadow(0 0 4px rgba(0,0,0,.6));
        }
        body.screen-black .stage3-randomize-btn {
            background: #2D4A6B !important;
            box-shadow: 0 6px 24px rgba(0,0,0,.55) !important;
        }
        /* ── Etapas PELP-TEA — fundo de tela BRANCO ──
           O cartão das etapas é branco com borda #D0D8E4. Sobre o fundo padrão
           (#F0F4F8) isso se lê; sobre o fundo BRANCO o contraste vai a ZERO e o
           cartão some — na Etapa 3, que é discriminação de imagens em posições
           livres, a tela fica aparentemente vazia. O fundo escuro tinha
           tratamento; o branco foi esquecido.
           A correção escurece a BORDA e mantém o cartão branco: quem escolhe
           fundo branco quer menos ruído visual atrás do estímulo, então tingir
           o cartão competiria com a imagem que a criança precisa discriminar. */
        body.screen-white #symbolGrid .stage-card,
        body.screen-white #symbolGrid .stage3-card {
            /* #94A3B8 (a 1ª tentativa) dava só 2,56:1 — parecia muito melhor
               que os 1,44 de antes quando medido somando canais RGB, mas essa
               não é a medida de contraste. Pela WCAG continuava abaixo de 3:1,
               e a profissional relatou que o problema seguia. #64748B dá 4,76:1
               no branco e 3,75:1 no preto: a MESMA cor serve nos dois extremos. */
            border-color: #64748B !important;
        }
        body.screen-white #symbolGrid .stage3-card {
            box-shadow: 0 6px 22px rgba(15, 23, 42, .18) !important;
        }
        body.screen-white .stage3-randomize-btn {
            box-shadow: 0 6px 20px rgba(15, 23, 42, .28) !important;
        }

        /* ══════════════════════════════════════════════════════════
           ACESSIBILIDADE
        ══════════════════════════════════════════════════════════ */
        /* Foco visível por teclado em todos os controles interativos */
        button:focus-visible,
        [role="button"]:focus-visible,
        a:focus-visible,
        input:focus-visible,
        select:focus-visible,
        textarea:focus-visible,
        [tabindex]:focus-visible,
        .symbol-card:focus-visible {
            outline: 3px solid #1565C0;
            outline-offset: 2px;
            border-radius: 6px;
        }
        /* Respeita quem pede menos movimento (vestibular, TEA, foto-sensibilidade) */
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation-duration: 0.001ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.001ms !important;
                scroll-behavior: auto !important;
            }
        }

        /* ════════════════════════════════════════════════════════════
           MOBILE (celular ≤ 480px) — otimização de usabilidade
           ════════════════════════════════════════════════════════════ */
        @media (max-width: 480px) {
            html, body { overflow-x: hidden; }

            /* ── HEADER: cabe em uma linha, todos os controles acessíveis ── */
            /* A faixa do relógio/bateria (safe-area) TEM de ficar aqui também:
               sem ela o cabeçalho ia para baixo da barra de status do iPhone e a
               engrenagem ficava inacessível (20/10/2026). */
            .header { padding: calc(6px + env(safe-area-inset-top, 0px)) 8px 6px; gap: 4px; }
            /* engrenagem nunca sai da tela: ver a rede de segurança no fim do arquivo */
            .mode-toggle { min-width: 0; }
            .child-avatar { width: 26px; height: 26px; font-size: 13px; }
            .child-name { display: none; }                 /* avatar já identifica */
            .mode-toggle { padding: 2px; }
            .mode-btn { padding: 5px 9px; font-size: 11px; }
            .header-right { gap: 4px; }
            .keyboard-btn { padding: 5px 8px; gap: 0; }  /* só o ícone: o emoji é texto, então NÃO zerar a fonte */
            .keyboard-btn .kb-txt { display: none; }
            .stage-badge { display: none; }                /* secundário no celular */
            .session-chip { padding: 3px 6px; }
            .session-chip-name { display: none; }
            .sync-chip #syncChipLabel { display: none; }
            .sync-chip { padding: 4px 6px; }
            .manage-btn { width: 28px; height: 28px; }

            /* ── COMUNICADOR: cards mais largos (rola na horizontal) e rótulo cabe ── */
            .syntax-col { min-width: 62px; }
            .symbol-card .label {
                font-size: max(9px, calc(var(--label-sz) * 0.9)) !important;
                overflow-wrap: anywhere; word-break: break-word;
                line-height: 1.05; letter-spacing: 0;
            }

            /* ── BARRA INFERIOR: rola na horizontal, itens legíveis ── */
            .bottom-bar {
                padding: 4px 2px; gap: 2px;
                overflow-x: auto; -webkit-overflow-scrolling: touch;
                justify-content: flex-start;
            }
            .bottom-bar::-webkit-scrollbar { display: none; }
            .bottom-resource { padding: 5px 3px; min-width: 60px; flex: 0 0 auto; }
            .bottom-resource .res-emoji { font-size: 16px; }
            .bottom-resource .res-label { font-size: 9px; white-space: nowrap; }

            /* ── RECEPTIVO: seletor de nível quebra em vez de transbordar ── */
            .receptive-level { flex-wrap: wrap; gap: 6px; padding: 6px 8px 2px; }
            .rl-cap { font-size: 10.5px; }
            .rl-opt { padding: 6px 9px; font-size: 12px; }
            .receptive-controls { gap: 8px; }
            .receptive-btn { padding: 12px 8px; font-size: 14px; }
            .rq-seg { padding: 4px 6px 4px 8px; gap: 5px; }
            .rq-cap { font-size: 10px; }
            .rq-opt { padding: 7px 9px; font-size: 12px; }
        }

        /* ════════════════════════════════════════════════════════════
           VIEWPORT BAIXO (paisagem no celular ≤ 500px de altura) —
           compacta os controles p/ sobrar espaço aos pictogramas
           ════════════════════════════════════════════════════════════ */
        @media (max-height: 500px) {
            .header { padding: calc(4px + env(safe-area-inset-top, 0px)) 10px 4px; gap: 6px; }
            .child-avatar { width: 24px; height: 24px; font-size: 12px; }
            /* Celular DEITADO tem mais de 480px de largura e escapava das regras
               compactas: todos os rótulos apareciam e a engrenagem saía da tela
               (20/10/2026). Mesma compactação do celular em pé. */
            .child-name { max-width: 110px; }
            .mode-btn { padding: 5px 10px; font-size: 12px; }
            .header-right { gap: 5px; }
            .keyboard-btn { padding: 5px 8px; gap: 0; }  /* só o ícone: o emoji é texto, então NÃO zerar a fonte */
            .keyboard-btn .kb-txt { display: none; }
            .stage-badge { display: none; }
            .session-chip { padding: 3px 6px; }
            .session-chip-name { display: none; }
            .sync-chip #syncChipLabel { display: none; }
            .sync-chip { padding: 4px 6px; }
            .manage-btn { width: 30px; height: 30px; }
            /* Expressivo: barra de fala baixa → sobra para os pictogramas */
            .sentence-bar { min-height: 50px !important; padding: 5px 10px; }
            .action-btn { width: 42px; height: 42px; font-size: 14px; }
            .action-btn.speak-btn { width: 60px; height: 60px; font-size: 24px; }
            .sentence-bar { margin-bottom: 10px; }
            .sentence-placeholder { font-size: 13px; line-height: 1.2; }
            /* Receptivo: controles compactos → mais ALTURA para o display */
            .receptive-display { margin: 6px 8px; padding: 8px; }
            .receptive-transcript { padding: 2px 10px; font-size: 12px; }
            .receptive-controls { padding: 6px 10px 8px; gap: 8px; }
            .receptive-btn { padding: 9px 8px; font-size: 13px; }
            .receptive-level { padding: 3px 8px 2px; gap: 6px; }
            /* Paisagem no celular: a altura é dos pictogramas. A pausa é
               ajuste de calibração, feito uma vez — sai de cena aqui; o
               modelo de linguagem, que se troca durante a sessão, fica. */
            #sttPausaSel { display: none; }
            .rl-cap { font-size: 10px; }
            .rl-opt { padding: 4px 9px; font-size: 11px; }
            .rq-seg { padding: 3px 6px; }
            .rq-opt { padding: 5px 8px; font-size: 11px; }
            /* Barra inferior menor */
            .bottom-bar { padding: 2px; }
            .bottom-resource { padding: 3px 6px; }
            .bottom-resource .res-emoji { font-size: 14px; }
            .bottom-resource .res-label { font-size: 8px; }

            /* ── GESTÃO DO VOCABULÁRIO: a tela INTEIRA rola (cabeçalhos rolam
                 junto e revelam a grade) — em vez da grade rolar num espaço
                 minúsculo espremida pelos controles fixos. ── */
            #therapistVocabView { overflow-y: auto; -webkit-overflow-scrolling: touch; }
            #therapistVocabView .symbol-grid {
                flex: none; overflow: visible; min-height: 200px;
            }
            #therapistVocabView .add-item-bar { position: sticky; bottom: 0; z-index: 2; }
            .therapist-header { padding-top: 8px; padding-bottom: 8px; }
            .therapist-hint { padding: 6px 12px; font-size: 12px; }
            .std-img-bar { padding: 5px 10px; }
        }

/* ══════════════════════════════════════════════════════════════════
   BARRAS DO SISTEMA (Android/iOS) — camadas fixas
   ══════════════════════════════════════════════════════════════════
   No app instalado, o Android desenha o conteúdo POR BAIXO da barra de
   navegação (edge-to-edge). O padding de área segura do <body> resolve o
   tabuleiro, mas não alcança quem é `position: fixed` — essas camadas se
   posicionam pela viewport, não pelo body. Cada uma reserva a faixa por
   conta própria. No navegador comum os insets são 0 e nada muda.       */

/* Telas cheias de recurso */
.kb-overlay,
#agendaScreen, #socialStoryScreen, #tokenScreen, #routineScreen, #behaviorScreen,
#vlEditor {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Topo (23/10/2026): no app instalado no iPad/iPhone, a barra de status
   (hora, bateria) fica POR CIMA do conteúdo — black-translucent +
   viewport-fit=cover. A tela principal já reservava a faixa; estas telas
   cheias não, e o "‹ Voltar" delas ficava escondido sob a hora — a pessoa
   precisava fechar o app para sair. No navegador comum o inset é 0.        */
.kb-overlay, .vsd-viewer-overlay, .vsd-editor-overlay,
#agendaScreen, #tokenScreen, #routineScreen, #behaviorScreen, #timerScreen,
#socialStoryScreen {
    padding-top: env(safe-area-inset-top, 0px);
}
@media (min-width: 768px) {
    /* No iPad a História Social é um cartão centralizado com 24px de respiro */
    #socialStoryScreen { padding-top: calc(24px + env(safe-area-inset-top, 0px)); }
}

/* Folhas ancoradas na base — somam ao respiro que já tinham */
#conjPicker { padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px)); }
#imgPicker  { padding-bottom: env(safe-area-inset-bottom, 0px); }
.modal-overlay .modal { padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }

/* Sobreposições que centralizam um cartão */
.premium-modal, .std-progress-overlay {
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

/* Card de gestão que é um interruptor, não uma porta para outra tela */
.mgmt-card-toggle { cursor: default; }
.mgmt-card-toggle .hdr-sw { margin-left: auto; }
.hdr-sw.hdr-sw-off { opacity: .4; cursor: not-allowed; }

/* ── Novidades do repertório (Gestão) ──────────────────────────────
   Vocabulário que chegou com uma atualização. Fica visualmente à parte
   do que a profissional já organizou: é oferta, não mudança feita. */
.sub-btn.novidades-btn { border-color:#C0A200; color:#7A6500; background:#FFFBEA; }
.sub-btn.novidades-btn.active { background:#FFE9A8; color:#5C4B00; }
.novidades-badge {
    display:inline-block; min-width:18px; padding:0 5px; margin-left:5px;
    border-radius:9px; background:#C0A200; color:#fff;
    font-size:11px; font-weight:800; line-height:18px; text-align:center;
}
.novidades-intro {
    grid-column:1/-1; padding:12px 14px; margin-bottom:10px;
    border:1px solid #E8D48A; border-radius:12px; background:#FFFBEA;
    color:#5C4B00; font-size:13px; line-height:1.5;
}
.novidades-intro b { display:block; margin-bottom:2px; }
.novidades-concluir {
    margin-top:10px; padding:8px 14px; border:none; border-radius:10px;
    background:#7A6500; color:#fff; font-size:13px; font-weight:700; cursor:pointer;
}
.novidades-concluir:hover { background:#5C4B00; }
.novidades-grupo { grid-column:1/-1; margin-bottom:14px; }
.novidades-cat {
    font-size:12px; font-weight:800; letter-spacing:.04em; text-transform:uppercase;
    color:#7A6500; margin-bottom:8px;
}
.novidades-cards { display:flex; flex-wrap:wrap; gap:10px; }
.novidades-cards .symbol-card { width:110px; }
@media (prefers-color-scheme: dark) {
    .sub-btn.novidades-btn { background:#2E2A12; color:#E8D48A; border-color:#6B5A15; }
    .sub-btn.novidades-btn.active { background:#4A3F15; color:#FFE9A8; }
    .novidades-intro { background:#2E2A12; border-color:#6B5A15; color:#E8D48A; }
    .novidades-concluir { background:#C0A200; color:#231F08; }
    .novidades-cat { color:#E8D48A; }
}

/* Rodapé de ajuda da Gestão: rever dicas + falar com o suporte. Lado a lado,
   porque empilhados herdariam a margem de 18px de cada um e o fim da tela
   ficaria com um vão maior que as próprias seções. */
.mgmt-help-links {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 8px; margin: 18px 0 8px;
}
.mgmt-help-links .mgmt-help-link { margin: 0; }

/* Capa da categoria na faixa da Gestão. Mesmo tamanho da capa de sub-pasta,
   que já aparecia ali — a de topo faltava, e era a única confirmação visual
   possível para uma categoria recém-criada (vazia, ela não aparece na prancha). */
.sub-btn-cover {
    width: 20px; height: 20px; object-fit: contain;
    border-radius: 4px; vertical-align: middle; margin-right: 4px;
}

/* Capa da pasta no diálogo "Mais categorias": mesmo tamanho e mesmo espaço
   do emoji que ela substitui (.sem-chip-emoji, 24px em bloco). */
.sem-chip-cover {
    width: 24px; height: 24px; object-fit: contain;
    border-radius: 6px; display: block; margin: 0 auto 4px;
}

/* Capas de sub-pasta — mesmas medidas que antes estavam em style inline.
   Passaram para o helper _folderCoverHtml junto com as demais: uma cópia
   solta da regra "capa ou emoji" é uma tela onde a capa não aparece. */
.sem-sub-strip-cover {
    width: 18px; height: 18px; object-fit: contain;
    border-radius: 3px; vertical-align: middle; margin-right: 3px;
}
.sem-sub-strip-emoji { margin-right: 3px; }
/* Capa da sub-pasta (cartão dentro de uma categoria aberta): segue o tamanho
   escolhido para os pictogramas, como as pastas da tela inicial
   (.folder-cover-img). Antes era 70% × 55% do cartão e ignorava a escolha
   P/M/G/GG (pedido de 19/10/2026). */
.sem-sub-card-cover {
    width: var(--emoji-sz); height: var(--emoji-sz);
    object-fit: contain; border-radius: 6px;
}

/* Opções do suporte (WhatsApp / e-mail) */
.sup-op {
    display: block; width: 100%; margin: 8px 0 0;
    padding: 13px; border-radius: 12px; border: 2px solid #1A2E4A;
    background: #fff; color: #1A2E4A; font-size: 14px; font-weight: 700;
    cursor: pointer; word-break: break-all;
}
.sup-op:active { transform: scale(.98); }

/* Rodapé do painel da conta — contato comercial, discreto */
.fb-account-rodape {
    margin-top: 14px; padding-top: 12px;
    border-top: 1px solid #E4E8EC;
    font-size: 12px; color: #78909C; text-align: center;
}
.fb-account-rodape a { color: #5C6BC0; text-decoration: none; font-weight: 600; }
.fb-account-rodape a:focus-visible { outline: 2px solid #5C6BC0; outline-offset: 2px; }

        /* A dica fixa ganhou botão de dispensar: vira linha com o ✕ à direita. */
        .therapist-hint {
            display: flex; align-items: center; gap: 10px; justify-content: space-between;
        }

/* Mover o passo selecionado (rotinas e combinados visuais) */
.mover-passo { display:flex; gap:8px; justify-content:center; margin:8px 0; }
.mover-passo-btn { border:1.5px solid #CBD5E1; background:#fff; color:#1E293B; border-radius:10px;
                   padding:8px 14px; font-weight:700; font-size:14px; cursor:pointer; min-width:110px; }
.mover-passo-btn:disabled { opacity:.4; cursor:default; }
.mover-passo-btn:not(:disabled):active { transform:scale(.97); background:#F1F5F9; }

/* ── Agenda semanal em faixas: Manhã / Tarde / Noite (15/10/2026) ──
   As faixas ficam alinhadas entre os dias (altura igualada em JS); a semana
   rola inteira na vertical, para as linhas não se desencontrarem. */
.ag-week-faixas { overflow-y:auto; align-items:flex-start; }
.ag-week-faixas .ag-day-col { overflow:visible; }
.ag-week-faixas .ag-day-events { overflow:visible; flex:none; padding:0; gap:0; }
.ag-band { display:flex; flex-direction:column; gap:5px; padding:6px; min-height:56px; box-sizing:border-box;
           border-top:3px solid transparent; }
.ag-band-manha    { background:#FFFBEB; border-top-color:#F59E0B; }
.ag-band-tarde    { background:#EFF6FF; border-top-color:#3B82F6; }
.ag-band-noite    { background:#F5F3FF; border-top-color:#7C3AED; }
.ag-band-sem_hora { background:#F8FAFC; border-top-color:#CBD5E1; }
.ag-band-labels { display:flex; flex-direction:column; min-width:58px; max-width:64px; flex-shrink:0;
                  border-radius:14px; overflow:hidden; }
.ag-band-labels-head { visibility:hidden; }
.ag-band-labels .ag-band { justify-content:center; align-items:center; }
.ag-band-emoji { font-size:26px; line-height:1; }
.ag-band-pill { font-size:12px; font-weight:800; text-align:center; line-height:1.3; color:#1A2E4A; }
.ag-band-labels .ag-band-manha .ag-band-pill { color:#92400E; }
.ag-band-labels .ag-band-tarde .ag-band-pill { color:#1E40AF; }
.ag-band-labels .ag-band-noite .ag-band-pill { color:#4C1D95; }

/* Gestão do vocabulário: seções "Na prancha" / "Disponíveis" e busca (19/10/2026) */
.gestao-busca { flex: 1 1 220px; max-width: 360px; padding: 8px 12px; border: 2px solid #E8B4D2;
                border-radius: 10px; font-size: 14px; background: #fff; color: #1A2E4A; }
.gestao-busca:focus { outline: none; border-color: #D63E8F; }
.gestao-sec { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
              padding: 10px 4px 2px; border-bottom: 2px solid #F0E4EC; color: #1A2E4A; }
.gestao-sec strong { font-size: 14px; font-weight: 900; }
.gestao-sec-n { font-size: 11px; font-weight: 800; background: #F0E4EC; color: #8B2A63; border-radius: 10px; padding: 1px 8px; }
.gestao-sec-dica { font-size: 11px; color: #7F8C8D; }
.gestao-vazio { grid-column: 1 / -1; font-size: 12px; color: #90A4AE; padding: 6px 4px 10px; }
#therapistGrid .symbol-card.recem { animation: gestao-recem 1.6s ease-out; }
@keyframes gestao-recem { 0%, 40% { box-shadow: 0 0 0 4px #D63E8F; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ── Cabeçalho: rede de segurança para QUALQUER tela (20/10/2026) ──
   Se os controles não couberem, a parte direita rola na horizontal e a
   engrenagem fica presa no canto — a Gestão nunca fica inacessível. */
.header { min-width: 0; }
.child-info { min-width: 0; flex-shrink: 1; }
.child-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-right { min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.header-right::-webkit-scrollbar { display: none; }
.header-right > * { flex-shrink: 0; }
.manage-wrap { position: sticky; right: 0; background: #1A2E4A; padding-left: 4px; }
