/* Alterações isoladas: início, favicon e ajustes móveis. O visual do editor permanece intacto. */

/* 1. Nenhuma sombra sob a barra de ferramentas, fixa ou solta. */
#floating-toolbar.is-docked,
#floating-toolbar.is-floating { box-shadow: none !important; }

/* 2. Início é uma tela real, não um pop-up sobre o editor. */
#zee-home { display: none; position: fixed; inset: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; background: #fafaf8; color: #191a18; z-index: 200; font-family: 'Inter', system-ui, sans-serif; }
html.zee-home-active #zee-home { display: block; }
html.zee-home-active body { overflow: hidden !important; }
html.zee-home-active #main-menu,
html.zee-home-active #main-wrapper,
html.zee-home-active #floating-toolbar,
html.zee-home-active #toc-sidebar { visibility: hidden !important; pointer-events: none !important; }
html.zee-home-active #confirm-modal { z-index: 250 !important; }

#zee-home * { box-sizing: border-box; }
#zee-home button { cursor: pointer; }
#zee-home button:focus-visible, #zee-home input:focus-visible { outline: 2px solid #282b25; outline-offset: 3px; }
#zee-home .zee-home-wrap { max-width: 1150px; padding: 0 38px; margin: 0 auto; min-height: 100%; }
#zee-home .zee-home-header { display:flex; align-items:center; justify-content:space-between; gap:16px; height:100px; border-bottom:1px solid #ecece8; }
#zee-home .zee-home-identity { display:flex; align-items:center; gap:13px; text-decoration:none; color:inherit; }
#zee-home .zee-home-logo { width:42px; height:42px; border-radius:10px; }
#zee-home .zee-home-brand { font-size:21px; letter-spacing:-.075em; font-weight:750; }
#zee-home .zee-home-brand span { color:#9c9f97; font-size:12px; letter-spacing:-.01em; font-weight:500; margin-left:9px; }
#zee-home .zee-home-label { color:#92948c; font-size:11px; letter-spacing:.10em; text-transform:uppercase; font-weight:600; }
#zee-home .zee-home-hero { padding:75px 0 68px; display:flex; align-items:end; justify-content:space-between; gap:42px; }
#zee-home .zee-home-kicker { display:flex; gap:11px; align-items:center; color:#777a73; font-size:11px; letter-spacing:.11em; text-transform:uppercase; font-weight:650; }
#zee-home .zee-home-kicker::before { content:''; display:block; width:20px; height:2px; background:#181a17; }
#zee-home h1 { font-size:clamp(43px,5.8vw,77px); line-height:1.08; letter-spacing:-.082em; font-weight:620; margin:19px 0 22px; max-width:725px; }
#zee-home .zee-home-subtitle { color:#777a73; max-width:430px; font-size:15px; line-height:1.7; letter-spacing:-.02em; }
#zee-home .zee-home-new { display:inline-flex; align-items:center; justify-content:center; white-space:nowrap; gap:11px; background:#181b18; color:white; border-radius:12px; padding:17px 22px; font-size:13px; font-weight:650; transition: transform .2s, background .2s; min-height:54px; }
#zee-home .zee-home-new:hover { background:#353a32; transform:translateY(-2px); }
#zee-home .zee-home-new svg { width:18px; height:18px; }
#zee-home .zee-home-continue { display:none; background:#efefeb; border:1px solid #e6e7e2; border-radius:16px; padding:25px 27px; align-items:center; gap:20px; justify-content:space-between; margin-bottom:56px; }
#zee-home .zee-home-continue[data-visible="true"] { display:flex; }
#zee-home .zee-home-continue-icon { width:46px; height:46px; border-radius:13px; flex:0 0 auto; display:grid; place-items:center; background:#fff; border:1px solid #e5e5df; }
#zee-home .zee-home-continue-icon svg { width:21px; height:21px; color:#5b5f57; }
#zee-home .zee-home-continue-text { flex:1; min-width:0; }
#zee-home .zee-home-continue-text > small { display:block; color:#8b8e85; font-size:10px; text-transform:uppercase; font-weight:750; letter-spacing:.1em; margin-bottom:7px; }
#zee-home .zee-home-continue-text strong { display:block; font-size:18px; font-weight:620; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; letter-spacing:-.04em; }
#zee-home .zee-home-resume { display:flex; gap:9px; align-items:center; color:#333630; font-size:12px; font-weight:650; padding:12px; border-radius:8px; }
#zee-home .zee-home-resume:hover { background:#e4e6df; }
#zee-home .zee-home-resume svg { width:17px; height:17px; }
#zee-home .zee-home-library-head { display:flex; align-items:center; justify-content:space-between; gap:20px; padding-bottom:20px; border-bottom:1px solid #e7e8e2; }
#zee-home .zee-home-library-title { display:flex; align-items:baseline; gap:14px; }
#zee-home h2 { font-size:23px; font-weight:650; letter-spacing:-.055em; }
#zee-home .zee-home-count { color:#8d8f87; font-size:12px; white-space:nowrap; }
#zee-home .zee-home-search { display:flex; align-items:center; gap:11px; padding:12px 15px; border:1px solid #e6e7e2; background:#fff; border-radius:10px; width:310px; max-width:100%; }
#zee-home .zee-home-search:focus-within { border-color:#aeb5a4; }
#zee-home .zee-home-search svg { width:16px; height:16px; color:#858a80; flex-shrink:0; }
#zee-home .zee-home-search input { min-width:0; border:0; outline:none!important; background:transparent; color:#1a1b19; font-size:12px; width:100%; }
#zee-home .zee-home-search input::placeholder { color:#999d94; }
#zee-home .zee-home-documents { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:15px; padding:23px 0 36px; }
#zee-home .zee-home-document { position:relative; display:flex; flex-direction:column; border:1px solid #e9eae5; background:#fff; border-radius:14px; padding:23px; min-height:198px; transition:border-color .16s, transform .16s, box-shadow .16s; }
#zee-home .zee-home-document:hover { border-color:#cacdc4; transform:translateY(-2px); box-shadow:0 12px 35px rgba(20,25,16,.035); }
#zee-home .zee-home-document-top { display:flex; justify-content:space-between; align-items:start; gap:12px; }
#zee-home .zee-home-document-icon { height:35px; width:35px; background:#f4f4f1; border-radius:10px; display:grid; place-items:center; color:#60645b; }
#zee-home .zee-home-document-icon svg { width:18px; height:18px; }
#zee-home .zee-home-document-delete { width:31px; height:31px; display:grid; place-items:center; border:1px solid transparent; border-radius:8px; color:#9a9e97; }
#zee-home .zee-home-document-delete:hover { color:#ac3535; background:#fdf0f0; border-color:#f4dcdc; }
#zee-home .zee-home-document-delete svg { width:15px; height:15px; }
#zee-home .zee-home-document-open { display:block; text-align:left; width:100%; margin-top:22px; color:#22241f; }
#zee-home .zee-home-document-title { display:block; font-size:15px; font-weight:650; line-height:1.4; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; letter-spacing:-.035em; }
#zee-home .zee-home-document-preview { display:block; color:#969b91; font-size:11px; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; margin:9px 0 0; }
#zee-home .zee-home-document-date { display:block; margin-top:auto; padding-top:22px; color:#a0a39b; font-size:10px; }
#zee-home .zee-home-empty { grid-column:1/-1; padding:64px 24px; border-radius:15px; border:1px dashed #d5d8cf; text-align:center; color:#82867e; background:#fdfdfa; }
#zee-home .zee-home-empty-icon { margin:0 auto 15px; display:grid; place-items:center; width:50px; height:50px; border-radius:14px; background:#f1f2ed; color:#686e62; }
#zee-home .zee-home-empty svg { width:21px; height:21px; }
#zee-home .zee-home-empty strong { color:#30332e; display:block; font-size:16px; font-weight:650; margin-bottom:9px; }
#zee-home .zee-home-empty p { font-size:12px; line-height:1.6; }
#zee-home .zee-home-footer { border-top:1px solid #e9eae6; margin-top:30px; padding:26px 0 42px; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:15px; color:#a0a399; font-size:11px; }
#zee-home .zee-home-footer strong { color:#363933; font-weight:750; letter-spacing:-.06em; }
#zee-back-home { display:inline-flex; align-items:center; justify-content:center; gap:7px; }
#zee-back-home svg { width:19px; height:19px; }
#zee-back-home:hover { background:var(--bg-tertiary); }

/* 3. Menus do rodapé: conteúdo sempre centralizado imediatamente acima do menu. */
@media (max-width: 767px) {
  #main-menu .menu-dropdown { margin:0 !important; border-radius:13px; overscroll-behavior:contain; z-index:80; }
  /* Apenas a barra FIXA vira uma faixa horizontal arrastável, sem indicador visível. */
  #floating-toolbar.is-docked .tools-container { display:flex !important; flex-wrap:nowrap !important; justify-content:flex-start !important; gap:5px; overflow-x:auto !important; overflow-y:hidden !important; -webkit-overflow-scrolling:touch; overscroll-behavior-x:contain; scrollbar-width:none; touch-action:pan-x; }
  #floating-toolbar.is-docked .tools-container::-webkit-scrollbar { display:none; }
  #floating-toolbar.is-docked .tools-container > * { flex-shrink:0 !important; }
  #floating-toolbar.is-docked { overflow:hidden; }
  /* O modo móvel/solto mantém sua estrutura original. */
  #zee-home .zee-home-wrap { padding-inline:20px; }
  #zee-home .zee-home-header { height:79px; }
  #zee-home .zee-home-logo { width:37px; height:37px; }
  #zee-home .zee-home-brand { font-size:19px; }
  #zee-home .zee-home-brand span { display:none; }
  #zee-home .zee-home-label { font-size:9px; }
  #zee-home .zee-home-hero { display:block; padding:61px 0 44px; }
  #zee-home h1 { font-size:clamp(42px,10vw,57px); }
  #zee-home .zee-home-subtitle { font-size:13px; }
  #zee-home .zee-home-new { margin-top:28px; width:100%; }
  #zee-home .zee-home-continue { margin-bottom:40px; padding:19px; gap:12px; }
  #zee-home .zee-home-continue-text strong { font-size:14px; }
  #zee-home .zee-home-continue-icon { width:39px; height:39px; }
  #zee-home .zee-home-resume { font-size:0; padding:8px; }
  #zee-home .zee-home-library-head { flex-direction:column; align-items:stretch; }
  #zee-home .zee-home-search { width:100%; }
  #zee-home .zee-home-documents { grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
  #zee-home .zee-home-document { padding:16px; min-height:177px; }
  #zee-home .zee-home-document-open { margin-top:15px; }
  #zee-home .zee-home-document-title { font-size:13px; }
}
@media (max-width: 440px) {
  #zee-home .zee-home-documents { grid-template-columns:1fr; }
  #zee-home .zee-home-document { min-height:165px; }
  #zee-home .zee-home-document-open { margin-top:13px; }
}
@media (prefers-reduced-motion:reduce) {
  #zee-home *, #zee-home *::before, #zee-home *::after { transition:none !important; animation:none !important; }
}
@media print {
  #zee-home { display:none !important; }
  html.zee-home-active #main-menu, html.zee-home-active #main-wrapper, html.zee-home-active #floating-toolbar { visibility:visible !important; }
}

/* Keep the return action out of the initial home header until an editor session exists. */
#zee-home #zee-home-return[hidden] { display: none !important; }

/* HOME THEME ADAPTER
   Read the editor's real palette. No separate light/dark theme setting or hard-coded
   home colors: every element updates automatically with the selected editor theme. */
#zee-home {
  --zee-h-bg: var(--bg-primary);
  --zee-h-surface: var(--bg-secondary);
  --zee-h-raised: var(--bg-tertiary);
  --zee-h-text: var(--text-primary);
  --zee-h-muted: var(--text-secondary);
  --zee-h-line: var(--border-color);
  --zee-h-accent: var(--accent-primary);
  --zee-h-on-accent: #ffffff;
  background: var(--zee-h-bg);
  color: var(--zee-h-text);
  transition: background-color .3s ease, color .3s ease;
  color-scheme: dark;
}
#zee-home .zee-home-header,
#zee-home .zee-home-library-head,
#zee-home .zee-home-footer { border-color: var(--zee-h-line); }
#zee-home .zee-home-identity { color: var(--zee-h-text); }
#zee-home .zee-home-brand,
#zee-home h1,
#zee-home h2,
#zee-home .zee-home-continue-text strong,
#zee-home .zee-home-document-title,
#zee-home .zee-home-empty strong,
#zee-home .zee-home-footer strong { color: var(--zee-h-text); }
#zee-home .zee-home-label,
#zee-home .zee-home-brand span,
#zee-home .zee-home-kicker,
#zee-home .zee-home-subtitle,
#zee-home .zee-home-count,
#zee-home .zee-home-document-preview,
#zee-home .zee-home-document-date,
#zee-home .zee-home-continue-text > small,
#zee-home .zee-home-empty p,
#zee-home .zee-home-footer,
#zee-home .zee-home-document-delete { color: var(--zee-h-muted); }
#zee-home .zee-home-kicker::before { background: var(--zee-h-accent); }
#zee-home .zee-home-continue,
#zee-home .zee-home-document,
#zee-home .zee-home-search { background: var(--zee-h-surface); border-color: var(--zee-h-line); }
#zee-home .zee-home-continue-icon,
#zee-home .zee-home-document-icon,
#zee-home .zee-home-empty-icon { background: var(--zee-h-raised); border-color: var(--zee-h-line); color: var(--zee-h-text); }
#zee-home .zee-home-document:hover { border-color: var(--zee-h-accent); box-shadow: 0 12px 35px rgba(0,0,0,.08); }
#zee-home .zee-home-resume { color: var(--zee-h-text); }
#zee-home .zee-home-resume:hover { background: var(--zee-h-raised); }
#zee-home .zee-home-document-open { color: var(--zee-h-text); }
#zee-home .zee-home-document-delete:hover {
  color: #e25757;
  border-color: color-mix(in srgb, #e25757 45%, transparent);
  background: color-mix(in srgb, #e25757 10%, var(--zee-h-surface));
}
#zee-home .zee-home-search:focus-within { border-color: var(--zee-h-accent); }
#zee-home .zee-home-search svg { color: var(--zee-h-muted); }
#zee-home .zee-home-search input { background: transparent; color: var(--zee-h-text); }
#zee-home .zee-home-search input::placeholder { color: var(--zee-h-muted); opacity: .85; }
#zee-home .zee-home-empty {
  background: var(--zee-h-surface);
  border-color: var(--zee-h-line);
  color: var(--zee-h-muted);
}
#zee-home .zee-home-new {
  background: var(--zee-h-accent);
  color: var(--zee-h-on-accent);
  box-shadow: none;
}
#zee-home .zee-home-new:hover {
  background: color-mix(in srgb, var(--zee-h-accent) 88%, var(--zee-h-text));
}
#zee-home .zee-home-new:focus-visible,
#zee-home button:focus-visible,
#zee-home input:focus-visible {
  outline: 2px solid var(--zee-h-accent) !important;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  #zee-home { transition: none; }
}

/* Native search controls and scrollbars follow the editor's actual light base. */
body.theme-light-mode #zee-home { color-scheme: light; }
