:root{
  --bg: #0a0a0b;
  --bg-soft: #121213;
  --surface: #18181a;
  --surface-2: #212123;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.20);
  --text: #f7f6f1;
  --text-muted: #b4b4ae;
  --text-faint: #a3a39e;
  --rec: #ff3b4e;
  --rec-soft: rgba(255,59,78,0.14);
  --amber: #ffd400;
  --amber-soft: rgba(255,212,0,0.14);
  --green: #33d17a;
  --green-soft: rgba(51,209,122,0.14);
  --blue: #3b9dff;
  --blue-soft: rgba(59,157,255,0.14);
  --danger: #ff5470;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-body: 'Inter', sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth; background:var(--bg);}
body{
  margin:0;
  min-height:100vh;
  min-height:100dvh;
  background:
    radial-gradient(ellipse 1000px 560px at 18% -12%, rgba(255,212,0,0.08), transparent 60%) no-repeat,
    var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
::selection{background:var(--amber); color:var(--bg);}
button{font-family:inherit;}
a{color:inherit;}
:focus-visible{outline:2px solid var(--amber); outline-offset:2px; border-radius:4px;}

.sprite{position:absolute; width:0; height:0; overflow:hidden;}
.icon{width:18px; height:18px; stroke:currentColor; stroke-width:1.6; fill:none; stroke-linecap:round; stroke-linejoin:round; display:block;}

[hidden]{display:none !important;}

/* ---------- AUTH STRIP ---------- */
.auth-strip{position:relative; z-index:50; display:flex; justify-content:space-between; align-items:center; gap:14px; padding:8px 20px; background:var(--bg-soft); border-bottom:1px solid var(--border); font-family:var(--font-mono); font-size:0.72rem;}
.auth-link{background:none; border:none; color:var(--text-muted); font-family:var(--font-body); font-size:0.875rem; cursor:pointer; text-decoration:none; padding:10px 2px; margin:-10px -2px; display:inline-block;}
.auth-link:hover{color:var(--text);}
.auth-email{color:var(--text-faint); margin-right:2px;}
#authStripLoggedIn{display:flex; align-items:center; gap:14px;}

/* ---------- IMPORT VIEW ---------- */
.import-view{min-height:100vh; display:flex; align-items:center; justify-content:center; padding:32px 20px;}
.import-wrap{width:100%; max-width:720px; display:flex; flex-direction:column; gap:36px;}
.hero-intro{text-align:center; position:relative;}
.hero-dismiss{position:absolute; top:-6px; right:-6px; width:26px; height:26px; border-radius:50%; border:1px solid var(--border-strong); background:transparent; color:var(--text-faint); font-size:0.8rem; cursor:pointer; display:flex; align-items:center; justify-content:center;}
.hero-dismiss:hover{color:var(--text); border-color:var(--amber);}
.hero-brand{display:flex; align-items:center; justify-content:center; gap:10px; margin-bottom:20px;}
.hero-mark{width:38px; height:38px; flex:0 0 auto;}
.hero-brand-name{font-family:var(--font-display); font-weight:700; font-size:1.05rem; letter-spacing:0.1em; color:var(--text-muted);}
.hero-title{font-family:var(--font-display); font-weight:700; font-size:1.8rem; line-height:1.25; margin:0 0 14px;}
.hero-sub{font-size:0.92rem; color:var(--text-muted); line-height:1.65; max-width:540px; margin:0 auto 30px;}
.hero-steps{display:flex; gap:18px; justify-content:center; flex-wrap:wrap;}
.hero-step{display:flex; gap:10px; align-items:flex-start; width:200px; text-align:left; font-size:0.8rem; color:var(--text-muted); line-height:1.5;}
.hero-step strong{color:var(--text); display:block; font-size:0.84rem; margin-bottom:2px;}
.hero-step-num{flex:0 0 auto; width:22px; height:22px; border-radius:50%; background:var(--amber-soft); border:1px solid rgba(255,212,0,0.35); color:var(--amber); font-family:var(--font-mono); font-size:0.72rem; font-weight:700; display:flex; align-items:center; justify-content:center; margin-top:1px;}
.import-card{width:100%; max-width:720px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:32px;}
.import-eyebrow{font-family:var(--font-mono); font-size:0.75rem; color:var(--text-faint); text-transform:uppercase; letter-spacing:0.1em;}
.import-title{font-family:var(--font-display); font-weight:700; font-size:1.6rem; margin:8px 0 6px;}
.import-sub{font-size:0.88rem; color:var(--text-muted); margin:0 0 22px; line-height:1.6;}
.import-textarea{width:100%; min-height:260px; background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius-sm); color:var(--text); font-family:var(--font-body); font-size:0.92rem; line-height:1.6; padding:16px; resize:vertical;}
.import-textarea:focus{outline:none; border-color:var(--amber);}
.import-actions{display:flex; gap:10px; margin-top:16px; flex-wrap:wrap;}
.btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; font-family:var(--font-body); font-size:0.875rem; font-weight:600; letter-spacing:0; text-decoration:none; padding:11px 18px; border-radius:999px; cursor:pointer; transition:.15s ease; border:1.5px solid var(--border-strong); background:transparent; color:var(--text-muted);}
.btn:hover{color:var(--text); border-color:var(--text-muted); transform:translateY(-1px);}
.btn:disabled{opacity:0.5; cursor:not-allowed; transform:none;}
.btn-primary{background:var(--amber); border-color:var(--amber); color:var(--bg); font-weight:700;}
.btn-primary:hover{background:#ffe14d; border-color:#ffe14d; color:var(--bg); box-shadow:0 6px 20px rgba(255,212,0,0.25);}
.btn-danger{border-color:rgba(255,84,112,0.35); color:var(--danger);}
.btn-danger:hover{background:var(--rec-soft); border-color:var(--danger); color:var(--danger);}
.btn-google{display:flex; align-items:center; justify-content:center; gap:10px; width:100%; background:#fff; border-color:#fff; color:#3c4043; padding:12px 18px;}
.btn-google:hover{background:#f4f4f4; border-color:#f4f4f4; color:#3c4043; box-shadow:0 4px 14px rgba(0,0,0,0.2);}
.btn-google-icon{width:18px; height:18px; flex:none;}
.login-divider{display:flex; align-items:center; gap:12px; margin:18px 0; color:var(--text-faint); font-family:var(--font-body); font-size:0.8125rem;}
.login-divider::before, .login-divider::after{content:''; flex:1; height:1px; background:var(--border);}
.import-error{margin-top:16px; background:var(--rec-soft); border:1px solid rgba(255,59,78,0.35); color:#ffb0ba; border-radius:var(--radius-sm); padding:12px 14px; font-size:0.82rem; line-height:1.5;}

/* ---------- PREVIEW / EDIT VIEW ---------- */
.preview-topbar{position:sticky; top:0; z-index:40; background:rgba(18,20,28,0.92); backdrop-filter:blur(14px); border-bottom:1px solid var(--border); padding:16px 20px;}
.preview-topbar-inner{max-width:900px; margin:0 auto; display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;}
.google-testing-note{max-width:900px; margin:10px auto 0; font-size:0.8rem; line-height:1.5; color:var(--amber); background:var(--amber-soft); border:1px solid rgba(255,212,0,0.3); border-radius:var(--radius-sm); padding:8px 14px;}
.preview-eyebrow{font-family:var(--font-mono); font-size:0.75rem; color:var(--text-faint); text-transform:uppercase; letter-spacing:0.1em;}
.preview-heading{font-family:var(--font-display); font-weight:700; font-size:1.1rem; margin-top:2px;}
.preview-view{max-width:900px; margin:0 auto; padding:28px 20px 90px;}
.preview-section-title{font-family:var(--font-display); font-weight:700; font-size:1.05rem; margin-bottom:14px;}

.field-label{font-family:var(--font-body); font-size:0.875rem; font-weight:600; color:var(--text-muted); display:block; margin-bottom:6px;}
/* Tela de criar/editar evento: labels de campo com mais destaque (maiores, brancos) */
#previewView .field-label{font-size:0.85rem; color:var(--text); font-weight:600;}
.field-input, .field-textarea, .field-select{width:100%; background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius-sm); color:var(--text); font-family:var(--font-body); font-size:0.85rem; padding:8px 10px; line-height:1.5;}
.field-input:focus, .field-textarea:focus, .field-select:focus{outline:none; border-color:var(--amber);}
.field-textarea{resize:vertical; min-height:60px; font-family:var(--font-mono); font-size:0.78rem;}
.field-row{margin-bottom:10px;}
.field-hint{display:block; margin-top:5px; font-family:var(--font-body); font-size:0.875rem; color:var(--text-faint); line-height:1.5;}
.field-hint code{background:var(--surface-2); border:1px solid var(--border); border-radius:4px; padding:1px 5px; color:var(--amber); font-size:0.94em;}
.field-checkbox-label{display:flex; align-items:center; gap:8px; font-family:var(--font-body); font-size:0.85rem; color:var(--text); cursor:pointer;}
.field-checkbox-label input[type="checkbox"]{width:16px; height:16px; accent-color:var(--amber); cursor:pointer; flex:none;}
.field-warning{background:var(--amber-soft); border:1px solid rgba(255,212,0,0.35); color:var(--amber); border-radius:var(--radius-sm); padding:8px 12px; font-size:0.78rem; line-height:1.4; margin-bottom:10px;}
.field-grid{display:grid; grid-template-columns:1fr 1fr; gap:10px;}

.icon-btn{background:none; border:1px solid var(--border); color:var(--text-faint); border-radius:8px; min-width:32px; height:32px; padding:0 8px; cursor:pointer; transition:.15s ease; display:inline-flex; align-items:center; justify-content:center; font-size:0.8rem;}
.icon-btn:hover{border-color:var(--border-strong); color:var(--text);}
.icon-btn.danger:hover{border-color:var(--danger); color:var(--danger);}
.icon-btn:disabled{opacity:0.3; cursor:not-allowed;}
.icon-btn:disabled:hover{border-color:var(--border); color:var(--text-faint);}

.preview-phase-block{margin-bottom:24px; border:1px solid var(--border); border-radius:var(--radius); padding:16px; background:var(--bg-soft);}
.preview-phase-head{display:flex; align-items:flex-end; gap:10px; margin-bottom:16px; flex-wrap:wrap;}
.preview-phase-head .field-row{flex:1 1 200px; margin-bottom:0;}
.preview-phase-actions{display:flex; gap:6px; padding-bottom:1px;}
.preview-scene-card{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); padding:14px; margin-bottom:12px;}
.preview-scene-top{display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:10px;}
.preview-scene-actions{display:flex; gap:6px;}
.add-btn{width:100%; border:1.5px dashed var(--border-strong); background:none; color:var(--text-muted); font-family:var(--font-body); font-size:0.875rem; font-weight:600; padding:10px; border-radius:var(--radius-sm); cursor:pointer; transition:.15s ease;}
.add-btn:hover{border-color:var(--amber); color:var(--amber);}
.preview-mission-block{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:14px; margin-bottom:14px;}

/* ---------- HISTORY ---------- */
.history-view-switch{display:flex; gap:8px; margin-bottom:20px; flex-wrap:wrap;}
.view-switch-btn.active{background:var(--amber); border-color:var(--amber); color:var(--bg); font-weight:700;}
.history-card{display:flex; align-items:center; justify-content:space-between; gap:14px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:16px 20px; margin-bottom:12px; flex-wrap:wrap;}
.history-card--saved{background:rgba(255,212,0,0.055); border-color:rgba(255,212,0,0.3);}
.history-title{font-family:var(--font-display); font-weight:700; font-size:0.98rem;}
.history-meta{font-family:var(--font-mono); font-size:0.8125rem; color:var(--text-faint); margin-top:4px;}
.history-actions{display:flex; gap:8px; flex:0 0 auto;}
.history-empty{color:var(--text-muted); font-size:0.88rem; padding:20px 0;}

#historyList.grid-mode{display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:16px;}
#historyList.grid-mode .history-card{flex-direction:column; align-items:flex-start; margin-bottom:0;}
#historyList.grid-mode .history-actions{width:100%;}

.cal-nav{display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; gap:12px;}
.cal-nav-label{font-family:var(--font-display); font-weight:700; font-size:1rem; text-transform:capitalize;}
.cal-grid{display:grid; grid-template-columns:repeat(7,1fr); gap:6px;}
.cal-day-label{font-family:var(--font-mono); font-size:0.75rem; color:var(--text-faint); text-align:center; padding-bottom:4px; text-transform:uppercase; letter-spacing:0.05em;}
.cal-cell{min-height:72px; min-width:0; border:1px solid var(--border); border-radius:var(--radius-sm); padding:5px; background:var(--surface);}
.cal-cell.empty{background:transparent; border-color:transparent;}
.cal-date{font-family:var(--font-mono); font-size:0.75rem; color:var(--text-faint); display:block; margin-bottom:3px;}
.cal-event{display:block; width:100%; text-align:left; background:var(--amber-soft); color:var(--amber); border:none; border-radius:4px; padding:3px 6px; margin-bottom:3px; min-height:24px; font-family:var(--font-body); font-size:0.75rem; cursor:pointer; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.cal-event:hover{background:var(--amber); color:var(--bg);}
.cal-nodata{margin-top:20px;}
.cal-nodata-title{font-family:var(--font-mono); font-size:0.8125rem; color:var(--text-faint); text-transform:uppercase; letter-spacing:0.08em; margin-bottom:10px;}

/* ---------- REPORT ---------- */
.report-content{max-width:760px; margin:0 auto; padding:32px 20px 80px; background:#fff; color:#1a1a1a; font-family:-apple-system,'Segoe UI',Arial,sans-serif; line-height:1.5;}
.report-content h1{font-size:1.5rem; margin:0 0 4px;}
.report-sub{color:#666; font-size:0.85rem; margin-bottom:24px;}
.report-stats{display:flex; gap:24px; margin:20px 0 32px; padding:16px 20px; background:#f7f7f5; border-left:4px solid #ffd400; border-radius:0 10px 10px 0;}
.report-stat b{display:block; font-size:1.4rem; color:#8a6a00;}
.report-stat span{font-size:0.78rem; color:#666; text-transform:uppercase; letter-spacing:0.04em;}
.report-content h3{font-size:1rem; margin:28px 0 8px; border-bottom:1px solid #ddd; padding-bottom:6px;}
.report-table-wrap{overflow-x:auto; margin-bottom:6px;}
.report-table{width:100%; min-width:560px; border-collapse:collapse; font-size:0.88rem;}
.report-table td, .report-table th{padding:6px 8px; border-bottom:1px solid #eee; text-align:left;}
.report-status{width:24px; text-align:center; font-weight:700;}
.report-muted{color:#888; font-size:0.82rem;}
.report-cat-label{font-weight:600; margin:16px 0 4px;}
.report-footer{margin-top:40px; color:#999; font-size:0.75rem; text-align:center;}

@media print{
  .no-print, .auth-strip{display:none !important;}
  body, .report-content{margin:0; padding:16px;}
}

/* ---------- HEADER ---------- */
/* Topo do checklist ao vivo: fixo e curto (título, sincronização, menu,
   progresso e fases). Fundo sólido: desfoque pesa no celular e quebraria o
   menu em posição fixa. */
.topbar{position:sticky; top:0; z-index:40; background:var(--bg-soft); border-bottom:1px solid var(--border);}
.topbar-inner{max-width:1180px; margin:0 auto; padding:10px 28px 6px;}
.topbar-row{position:relative; display:flex; align-items:center; gap:10px;}

.live-clock{display:flex; align-items:center; gap:8px; font-family:var(--font-mono); font-size:0.78rem; color:var(--text-muted); background:var(--surface); border:1px solid var(--border); border-radius:999px; padding:6px 12px 6px 10px;}
.live-dot{width:7px; height:7px; border-radius:50%; background:var(--rec); animation:pulseDot 1.6s ease-in-out infinite;}
@keyframes pulseDot{0%,100%{box-shadow:0 0 0 0 var(--rec-soft);} 50%{box-shadow:0 0 0 5px transparent;}}
.sync-status{display:flex; align-items:center; gap:8px; font-family:var(--font-body); font-size:0.8125rem; font-weight:600; color:var(--amber); background:var(--amber-soft); border:1px solid rgba(255,212,0,0.3); border-radius:999px; padding:6px 12px 6px 10px;}
.sync-status.sync-status--offline{color:var(--danger); background:var(--rec-soft); border-color:rgba(255,84,112,0.35);}
.sync-dot{width:7px; height:7px; border-radius:50%; background:currentColor; flex:none;}

.more-btn{flex:none; display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:0 16px 0 12px; border:1px solid var(--border-strong); border-radius:999px; background:var(--surface); color:var(--text); font-family:var(--font-body); font-size:.875rem; font-weight:600; cursor:pointer; transition:border-color .15s ease;}
.more-btn:hover,.more-btn[aria-expanded="true"]{border-color:var(--amber);}
.more-menu{position:absolute; top:calc(100% + 8px); right:0; z-index:70; width:min(360px, calc(100vw - 32px));}
.more-menu[hidden]{display:none;}
.more-menu-backdrop{display:none;}
.more-menu-panel{display:flex; flex-direction:column; gap:2px; padding:8px; background:var(--surface); border:1px solid var(--border-strong); border-radius:var(--radius); box-shadow:0 18px 40px rgba(0,0,0,0.5);}
.menu-item{display:flex; align-items:center; min-height:44px; padding:10px 12px; border:0; border-radius:var(--radius-sm); background:none; color:var(--text); font-family:var(--font-body); font-size:.9375rem; text-align:left; text-decoration:none; cursor:pointer;}
.menu-item[hidden]{display:none;}
.menu-item:hover{background:var(--surface-2);}
.menu-item--danger{position:relative; margin-top:9px; color:var(--danger);}
.menu-item--danger::before{content:''; position:absolute; left:4px; right:4px; top:-5px; border-top:1px solid var(--border);}
.confirm-dialog{width:min(92vw,420px); border:1px solid var(--border-strong); border-radius:var(--radius); background:var(--surface); color:var(--text); padding:22px 22px 18px;}
.confirm-dialog::backdrop{background:rgba(0,0,0,0.65);}
.confirm-dialog h2{font-family:var(--font-display); font-size:1.1rem; margin:0 0 10px;}
.confirm-dialog p{font-size:0.88rem; line-height:1.55; color:var(--text-muted); margin:0 0 18px;}
.confirm-actions{display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap;}
.app-toast{position:fixed; left:50%; bottom:calc(80px + env(safe-area-inset-bottom, 0px)); pointer-events:none; transform:translateX(-50%); z-index:50; display:flex; align-items:center; gap:12px; max-width:min(92vw,520px); background:var(--surface-2); border:1px solid var(--border-strong); border-radius:999px; padding:10px 14px 10px 18px; font-size:0.84rem; line-height:1.4; box-shadow:0 10px 30px rgba(0,0,0,0.4);}
.app-toast[hidden]{display:none;}
.app-toast .btn{pointer-events:auto; padding:7px 14px; font-size:0.74rem; flex:none;}

.event-label{display:block; margin-bottom:6px; font-family:var(--font-body); font-size:.8125rem; font-weight:600; color:var(--text-muted);}
.event-title{flex:1 1 0; min-width:0; margin:0; font-family:var(--font-display); font-weight:700; font-size:clamp(1.1rem,2.6vw,1.45rem); line-height:1.3; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.readonly-notice{margin:0; padding:10px 14px; border:1px solid var(--border-strong); border-radius:var(--radius-sm); background:var(--surface-2); color:var(--text); font-size:.9rem;}
.readonly-notice[hidden]{display:none;}
.event-sub{font-size:.9375rem; color:var(--text-muted);}

.event-link-row{padding:6px 6px 12px; margin-bottom:6px; border-bottom:1px solid var(--border);}
.event-link-box{display:flex; gap:8px; flex-wrap:wrap;}
.event-link-input{flex:1 1 auto; min-width:0; background:var(--surface-2); border:1px solid var(--border); border-radius:var(--radius-sm); color:var(--text-muted); font-family:var(--font-mono); font-size:0.8125rem; padding:8px 12px;}
.event-link-box .btn{flex:0 0 auto; padding:8px 16px; min-height:44px;}

.progress-wrap{display:flex; align-items:center; gap:12px; margin-top:4px;}
.progress-count{flex:none; font-family:var(--font-mono); font-size:.8125rem; color:var(--text-muted); white-space:nowrap;}
.progress-count b{color:var(--text); font-weight:600;}
.progress-pct{color:var(--amber);}
.progress-track{position:relative; flex:1 1 auto; height:6px; border-radius:999px; background:var(--surface-2); overflow:hidden;}
.progress-fill{height:100%; width:100%; border-radius:999px; background:var(--amber); transform:scaleX(0); transform-origin:left center; transition:transform .5s cubic-bezier(.16,1,.3,1); position:relative;}

.topbar-nav-row{display:flex; align-items:center; gap:8px; margin-top:6px;}
.phase-nav{position:relative; flex:1 1 auto; min-width:0; display:flex; gap:6px; overflow-x:auto; padding:2px 0 6px; scrollbar-width:thin; scrollbar-color:var(--border-strong) transparent;}
.phase-nav::-webkit-scrollbar{height:6px;}
.phase-nav::-webkit-scrollbar-track{background:transparent;}
.phase-nav::-webkit-scrollbar-thumb{background:var(--border-strong); border-radius:999px;}
.phase-nav::-webkit-scrollbar-thumb:hover{background:var(--amber);}
.phase-pill{flex:0 0 auto; display:flex; align-items:center; gap:8px; padding:6px 12px; border-radius:999px; border:1px solid var(--border); background:var(--surface); text-decoration:none; color:var(--text-muted); font-family:var(--font-body); font-size:.875rem; white-space:nowrap; transition:.15s ease;}
.phase-pill .icon{width:14px; height:14px;}
.phase-pill:hover{border-color:var(--border-strong); color:var(--text);}
.phase-pill b{color:var(--text); font-family:var(--font-mono); font-weight:600;}
.phase-pill.done{border-color:rgba(51,209,122,0.4); color:var(--green);}
.phase-pill.done b{color:var(--green);}
.phase-pill.is-current{border-color:var(--amber); background:var(--amber-soft); color:var(--text);}
.filter-btn{flex:none; min-height:44px; padding:0 14px; border:1px solid var(--border-strong); border-radius:999px; background:none; color:var(--text-muted); font-family:var(--font-body); font-size:.875rem; font-weight:600; white-space:nowrap; cursor:pointer; transition:.15s ease;}
.filter-btn:hover{color:var(--text);}
.filter-btn[aria-pressed="true"]{border-color:var(--amber); background:var(--amber-soft); color:var(--amber);}

/* Começo da página (rola junto): data e local, observações, resumo da equipe. */
.event-context{display:flex; flex-direction:column; gap:10px; margin-bottom:28px;}
.notes-preview{display:flex; align-items:center; gap:10px; width:100%; min-height:44px; padding:10px 14px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); color:var(--text); font:inherit; text-align:left; cursor:pointer; transition:border-color .15s ease;}
.notes-preview:hover{border-color:var(--border-strong);}
.notes-preview[hidden]{display:none;}
.notes-preview-label{flex:none; font-size:.875rem; font-weight:600; color:var(--amber);}
.notes-preview-text{flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.9rem; color:var(--text-muted);}
.publish-share{margin:8px 0 4px;}
.pending-empty{margin:0 0 28px; padding:22px; border:1.5px dashed var(--border-strong); border-radius:var(--radius); color:var(--text-muted); text-align:center;}

.next-scene-btn{position:fixed; right:16px; bottom:calc(16px + env(safe-area-inset-bottom, 0px)); z-index:30; display:inline-flex; align-items:center; gap:6px; min-height:48px; padding:0 16px 0 20px; border:0; border-radius:999px; background:var(--amber); color:#111; font-family:var(--font-body); font-size:.9375rem; font-weight:700; box-shadow:0 8px 24px rgba(0,0,0,0.45); cursor:pointer; transition:transform .15s ease;}
.next-scene-btn:active{transform:translateY(1px);}
.next-scene-btn[hidden]{display:none;}
.next-scene-btn .icon{stroke-width:2.2;}

main{max-width:1180px; margin:0 auto; padding:20px 28px 104px;}

/* ---------- PHASES ---------- */
.phase{margin-bottom:52px; scroll-margin-top:calc(var(--topbar-h, 150px) + 12px);}
.phase-header{display:flex; align-items:center; gap:14px; margin-bottom:22px; padding-bottom:14px; border-bottom:1px solid var(--border);}
.phase-icon{width:38px; height:38px; border-radius:10px; flex:0 0 auto; display:flex; align-items:center; justify-content:center; background:var(--surface); border:1px solid var(--border); color:var(--amber);}
.phase-icon .icon{width:19px; height:19px;}
.phase-titles{flex:1 1 auto; min-width:0;}
.phase-eyebrow{font-family:var(--font-mono); font-size:0.8125rem; color:var(--text-faint); text-transform:uppercase; letter-spacing:0.12em;}
.phase-name{margin:0; font-family:var(--font-display); font-weight:700; font-size:1.25rem;}
.phase-done-badge{display:none; flex:0 0 auto; padding:4px 10px; border-radius:999px; background:var(--green-soft); color:var(--green); font-size:.8125rem; font-weight:600;}
.pending-only .phase.is-complete .phase-done-badge{display:inline-flex;}
.pending-only .phase.is-complete .cards-grid{display:none;}
.pending-only .phase.is-complete{margin-bottom:24px;}
.pending-only .phase.is-complete .phase-header{margin-bottom:0;}
.phase-count{font-family:var(--font-mono); font-size:0.8rem; color:var(--text-muted); flex:0 0 auto;}
.phase-count b{color:var(--text);}

.cards-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(340px,1fr)); gap:20px;}

/* ---------- CARD ---------- */
.card{position:relative; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:22px 20px 20px; transition:border-color .25s ease, background .25s ease;}
.vf-corner{position:absolute; width:16px; height:16px; border-color:var(--border-strong); transition:border-color .3s ease, opacity .3s ease;}
.vf-corner.tl{top:8px; left:8px; border-top:2px solid; border-left:2px solid; border-radius:4px 0 0 0;}
.vf-corner.tr{top:8px; right:8px; border-top:2px solid; border-right:2px solid; border-radius:0 4px 0 0;}
.vf-corner.bl{bottom:8px; left:8px; border-bottom:2px solid; border-left:2px solid; border-radius:0 0 0 4px;}
.vf-corner.br{bottom:8px; right:8px; border-bottom:2px solid; border-right:2px solid; border-radius:0 0 4px 0;}

.card{scroll-margin-top:calc(var(--topbar-h, 150px) + 12px);}
.card.is-filtered{display:none;}
.pending-only .card.is-done:not(.is-filtered), .pending-only .card.is-posted:not(.is-filtered){opacity:.6;}
.card.is-highlight{animation:cardFlash 1.6s ease-out;}
@keyframes cardFlash{0%{outline:3px solid var(--amber); outline-offset:3px;} 100%{outline:3px solid transparent; outline-offset:3px;}}
.card-title:focus{outline:none;}
.card-head{display:flex; align-items:flex-start; gap:12px; margin-bottom:14px;}
.card-head-text{flex:1 1 auto; min-width:0;}
.card-title{font-family:var(--font-display); font-weight:700; font-size:1.05rem; line-height:1.3; margin:0;}
.card-meta{margin:3px 0 0; font-family:var(--font-mono); font-size:.8125rem; color:var(--text-muted);}
.card-icon{width:34px; height:34px; border-radius:9px; flex:0 0 auto; background:var(--surface-2); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; color:var(--text-muted);}
.card.is-done .card-icon{color:var(--green); border-color:rgba(51,209,122,0.35);}
.card.is-progress .card-icon{color:var(--amber); border-color:rgba(255,212,0,0.35);}
.card.is-posted .card-icon{color:var(--blue); border-color:rgba(59,157,255,0.35);}

.status-indicator{position:relative; width:16px; height:16px; flex:0 0 auto;}
.dot{position:absolute; inset:0; margin:auto; width:9px; height:9px; border-radius:50%; background:var(--rec); top:3.5px; left:3.5px;}
.check{display:none; align-items:center; justify-content:center; position:absolute; inset:0; color:var(--green);}
.check .icon{width:16px; height:16px; stroke-width:2.4;}
.card.is-done .dot{display:none;}
.card.is-done .check{display:flex;}
.card.is-posted .dot{display:none;}
.card.is-posted .check{display:flex; color:var(--blue);}



.capture-list{list-style:none; margin:14px 0 0; padding:0; display:flex; flex-direction:column; gap:6px;}
.capture-list li{font-size:0.9rem; color:var(--text-muted); padding-left:14px; position:relative; line-height:1.45;}
.capture-list li::before{content:''; position:absolute; left:0; top:0.55em; width:5px; height:5px; border-radius:50%; background:var(--text-faint);}

.speech-box{background:var(--bg-soft); border:1px solid var(--border); border-left:2px solid var(--amber); border-radius:0 var(--radius-sm) var(--radius-sm) 0; padding:10px 14px; margin-bottom:16px;}
.speech-label{font-family:var(--font-body); font-size:0.8125rem; font-weight:600; color:var(--amber); display:block; margin-bottom:5px;}
.speech-text{font-family:var(--font-body); font-size:0.9rem; color:#d9d7cf; font-style:italic; line-height:1.6; margin:0;}

.rules-grid{display:grid; grid-template-columns:1fr 1fr; gap:10px;}
.rules-col{border-radius:var(--radius-sm); padding:11px 12px; border:1px solid var(--border);}
.rules-col.full{grid-column:1 / -1;}
.rules-col.can{background:var(--green-soft); border-color:rgba(51,209,122,0.28);}
.rules-col.cannot{background:var(--rec-soft); border-color:rgba(255,59,78,0.28);}
.rules-title{display:flex; align-items:center; gap:5px; font-family:var(--font-body); font-size:0.8125rem; margin-bottom:7px; font-weight:600;}
.rules-col.can .rules-title{color:var(--green);}
.rules-col.cannot .rules-title{color:var(--danger);}
.rules-col .icon{width:12px; height:12px; stroke-width:2.4;}
.rules-col ul{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px;}
.rules-col li{font-size:0.74rem; color:var(--text-muted); line-height:1.4;}

.status-btn-group{display:grid; grid-template-columns:1fr 1fr; gap:8px;}
.status-btn{display:flex; align-items:center; justify-content:center; text-align:center; background:transparent; border:1.5px solid var(--border-strong); color:var(--text-muted); font-family:var(--font-body); font-weight:600; font-size:.875rem; letter-spacing:0.01em; line-height:1.25; padding:10px 6px; border-radius:var(--radius-sm); cursor:pointer; transition:.18s ease;}
.status-btn:hover{border-color:var(--text-muted); color:var(--text);}
.status-btn[data-status="nao_iniciado"].active{border-color:var(--rec); color:var(--rec); background:var(--rec-soft);}
.status-btn[data-status="andamento"].active{border-color:var(--amber); color:var(--amber); background:var(--amber-soft);}
.status-btn[data-status="feito"].active{border-color:var(--green); color:var(--green); background:var(--green-soft);}
.status-btn[data-status="postado"].active{border-color:var(--blue); color:var(--blue); background:var(--blue-soft);}
.status-times{margin-top:8px; font-family:var(--font-mono); font-size:.8125rem; color:var(--text-faint);}
.status-times:empty{display:none;}
.card-details{margin-top:12px; border-top:1px solid var(--border);}
.card-details>summary{list-style:none; display:flex; align-items:center; gap:8px; min-height:44px; padding-top:4px; color:var(--text-muted); font-size:.875rem; font-weight:600; cursor:pointer;}
.card-details>summary::-webkit-details-marker{display:none;}
.card-details>summary::before{content:''; flex:none; width:7px; height:7px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(-45deg); transition:transform .2s ease;}
.card-details[open]>summary::before{transform:rotate(45deg);}
.card-details>summary:hover{color:var(--text);}
.card-details-body{display:flex; flex-direction:column; gap:12px; padding:4px 0 6px;}
.card-details .speech-box{margin:0;}

.captured-stamp{display:none; align-items:center; gap:6px; position:absolute; top:-10px; right:16px; background:var(--green); color:#0c1710; font-family:var(--font-mono); font-weight:600; font-size:0.75rem; padding:4px 10px; border-radius:999px; letter-spacing:0.03em; box-shadow:0 4px 14px rgba(51,209,122,0.35);}
.card.is-done .captured-stamp{display:flex;}
.card.is-progress .captured-stamp{display:flex; background:var(--amber); color:#241d00; box-shadow:0 4px 14px rgba(255,212,0,0.35);}
.card.is-posted .captured-stamp{display:flex; background:var(--blue); color:#001a33; box-shadow:0 4px 14px rgba(59,157,255,0.35);}
.card.is-done{border-color:rgba(51,209,122,0.35); background:linear-gradient(180deg, rgba(51,209,122,0.05), var(--surface) 40%);}
.card.is-done .vf-corner{border-color:var(--green);}
.card.is-progress{border-color:rgba(255,212,0,0.35); background:linear-gradient(180deg, rgba(255,212,0,0.05), var(--surface) 40%);}
.card.is-progress .vf-corner{border-color:var(--amber);}
.card.is-posted{border-color:rgba(59,157,255,0.35); background:linear-gradient(180deg, rgba(59,157,255,0.05), var(--surface) 40%);}
.card.is-posted .vf-corner{border-color:var(--blue);}

/* ---------- MISSIONS ---------- */
.missions-section{margin-top:8px; padding-top:38px; border-top:1px solid var(--border);}
.missions-head{margin-bottom:22px;}
.missions-title{font-family:var(--font-display); font-weight:700; font-size:1.25rem; margin-top:2px;}
.missions-sub{font-family:var(--font-body); font-size:0.9rem; color:var(--text-muted); margin-top:6px;}
.missions-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(260px,1fr)); gap:16px;}
.mission-cat{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:16px 16px 14px;}
.mission-cat-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; gap:8px;}
.mission-cat-label{display:flex; align-items:center; gap:8px; font-family:var(--font-display); font-weight:600; font-size:0.86rem;}
.mission-cat-count{font-family:var(--font-mono); font-size:0.8125rem; color:var(--text-muted); white-space:nowrap;}
.mission-chips{display:flex; flex-wrap:wrap; gap:7px;}
.mission-chip{background:var(--surface-2); border:1px solid var(--border); color:var(--text-muted); font-size:0.875rem; padding:8px 14px; border-radius:999px; cursor:pointer; transition:.15s ease;}
.mission-chip:hover{border-color:var(--border-strong); color:var(--text);}
.mission-chip.done{background:var(--green-soft); border-color:rgba(51,209,122,0.4); color:var(--green); text-decoration:line-through; text-decoration-color:rgba(51,209,122,0.55);}

/* ---------- NOTES ---------- */
.notes-section{margin-top:8px; padding-top:38px; border-top:1px solid var(--border); scroll-margin-top:calc(var(--topbar-h, 150px) + 12px);}
.notes-head{margin-bottom:14px;}
.notes-title{font-family:var(--font-display); font-weight:700; font-size:1.25rem; margin-top:2px;}
.notes-sub{font-family:var(--font-body); font-size:0.9rem; color:var(--text-muted); margin-top:6px;}
.notes-box{width:100%; min-height:120px; resize:vertical; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); color:var(--text); font-family:var(--font-body); font-size:0.88rem; line-height:1.6; padding:14px 16px;}
.notes-box:focus{outline:none; border-color:var(--amber);}
.notes-box.readonly{background:var(--bg-soft); color:var(--text-muted); cursor:default;}
.notes-status{display:block; margin-top:6px; min-height:14px; font-family:var(--font-body); font-size:0.875rem; color:var(--text-faint);}

/* ---------- COMPLETION BANNER ---------- */
.completion-banner{position:fixed; left:50%; bottom:22px; transform:translate(-50%,140%); z-index:60; width:min(92vw,480px); background:linear-gradient(135deg, #182a1f, var(--surface)); border:1px solid rgba(51,209,122,0.4); border-radius:18px; padding:18px 22px; display:flex; align-items:center; gap:14px; box-shadow:0 20px 60px rgba(0,0,0,0.45); transition:transform .5s cubic-bezier(.16,1,.3,1);}
.completion-banner.visible{transform:translate(-50%,0);}
.completion-badge{width:46px; height:46px; border-radius:50%; background:var(--green-soft); border:1px solid rgba(51,209,122,0.5); display:flex; align-items:center; justify-content:center; flex:0 0 auto; color:var(--green); animation:ringPulse 2s ease-in-out infinite;}
@keyframes ringPulse{0%,100%{box-shadow:0 0 0 0 rgba(51,209,122,0.3);} 50%{box-shadow:0 0 0 8px rgba(51,209,122,0);}}
.completion-badge .icon{width:22px; height:22px; stroke-width:2.6;}
.completion-text b{font-family:var(--font-display); font-size:0.95rem; display:block;}
.completion-text span{font-family:var(--font-body); font-size:0.875rem; color:var(--text-muted);}

footer{max-width:1180px; margin:0 auto; padding:0 28px 50px; color:var(--text-faint); font-family:var(--font-body); font-size:0.8125rem; text-align:center;}

@media (prefers-reduced-motion: reduce){*{animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important;}}

@media (max-width:640px){
  main{padding:16px 16px 104px;}
  .topbar-inner{padding:8px 16px 4px;}
  .topbar-row{flex-wrap:wrap; row-gap:4px;}
  .topbar-row .sync-status{order:3;}
  .more-menu{position:fixed; inset:0; width:auto; display:flex; align-items:flex-end;}
  .more-menu-backdrop{display:block; position:absolute; inset:0; background:rgba(0,0,0,0.6);}
  .more-menu-panel{position:relative; width:100%; max-height:80vh; overflow-y:auto; border-radius:var(--radius) var(--radius) 0 0; border-bottom:0; padding:10px 10px calc(14px + env(safe-area-inset-bottom, 0px));}
  .filter-btn{padding:0 12px;}
  .cards-grid{grid-template-columns:1fr; gap:16px;}
  .missions-grid{grid-template-columns:1fr;}
  .rules-grid{grid-template-columns:1fr;}
  .phase-name{font-size:1.08rem;}
  .card{padding:18px 16px 16px;}
  .completion-banner{padding:14px 16px; bottom:14px;}
  .live-clock{font-size:0.7rem; padding:5px 10px 5px 8px;}
  .sync-status{font-size:0.7rem; padding:5px 10px 5px 8px;}
  .import-card{padding:22px;}
  .hero-title{font-size:1.4rem;}
  .hero-sub{margin-bottom:22px;}
  .hero-steps{gap:14px;}
  .hero-step{width:100%; max-width:280px;}
  .field-grid{grid-template-columns:1fr;}
  .cal-grid{gap:4px;}
  .cal-cell{min-height:52px; padding:3px;}
  .cal-day-label{font-size:0.75rem;}
  .cal-event{font-size:0.75rem; padding:3px 4px;}
  #historyList.grid-mode{grid-template-columns:1fr;}
  .preview-phase-head{align-items:stretch;}
  .auth-strip{padding:8px 16px; gap:10px; flex-wrap:wrap; justify-content:center; text-align:center;}
  .auth-email{max-width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:inline-block; vertical-align:bottom;}
  .history-card{padding:14px 16px;}
}
/* Autorizações recorrentes do Google Calendar */
/* Recolhida por padrão: uma linha no topo de "Meus eventos" avisa que a seção existe. */
.calendar-permissions-count{flex:none; font-size:.8125rem; color:var(--text-muted); white-space:nowrap;}
.calendar-permissions-count.has-people{color:var(--green);}
.history-loading{display:flex; flex-direction:column; gap:12px;}
.history-loading[hidden]{display:none;}
.skeleton-row,.skeleton-card{position:relative; overflow:hidden; border-radius:var(--radius); background:var(--surface); border:1px solid var(--border);}
.skeleton-row{height:60px; margin-bottom:8px;}
.skeleton-card{height:84px;}
.skeleton-row::after,.skeleton-card::after{content:''; position:absolute; inset:0; transform:translateX(-100%); background:linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent); animation:skeletonShine 1.4s ease-in-out infinite;}
@keyframes skeletonShine{to{transform:translateX(100%);}}
.calendar-permissions p { line-height: 1.6; }
.calendar-permissions form { display: grid; gap: 12px; max-width: 520px; }
.calendar-permission-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.calendar-permission-row span { overflow-wrap: anywhere; min-width: 0; }

/* Entrada compacta e controles legíveis em desktop e celular. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.import-view{min-height:0;padding:24px 20px;}
.import-wrap{gap:18px;}
.hero-brand{margin-bottom:12px;}
.hero-title{font-size:clamp(1.4rem,3vw,1.8rem);margin-bottom:8px;}
.hero-sub{margin-bottom:10px;}
.hero-steps{display:block;margin:0;color:var(--text-muted);font-size:.875rem;}
.hero-steps span{margin:0 6px;color:var(--amber);}
.import-card{padding:24px;}
.import-sub{margin-bottom:14px;}
.import-textarea{min-height:120px;height:120px;}
.import-actions{margin-top:12px;}
.btn-secondary{border-color:transparent;text-decoration:underline;text-underline-offset:4px;min-height:44px;}
.preview-heading{margin:0;}
.field-label,.field-hint,.field-warning,.history-meta,.notes-status,.import-eyebrow,.preview-eyebrow,.auth-link,.auth-email,.status-times{font-size:.875rem;}
.field-label{display:block;}
.btn,.field-input,.field-select,.field-textarea{font-size:1rem;}
.icon-btn,.hero-dismiss{min-width:44px;min-height:44px;}
.hero-dismiss{position:static;margin-left:auto;float:right;}
.status-btn,.mission-chip,.phase-pill,.auth-link{min-height:44px;}
.preview-topbar-inner,.history-actions{flex-wrap:wrap;}
.preview-topbar-inner>div:last-child{flex-wrap:wrap;}
input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--amber);outline-offset:3px;}
input::placeholder,textarea::placeholder{color:var(--text-faint);opacity:1;}
@media(max-width:600px){
  .import-view{padding:16px 12px;}
  .import-wrap{gap:14px;}
  .import-card{padding:16px;}
  .hero-brand{margin-bottom:8px;}
  .hero-sub{font-size:.9rem;margin-bottom:8px;}
  .import-title{font-size:1.3rem;}
  .import-actions>.btn{flex:1 1 140px;white-space:normal;padding:10px 12px;}
  .import-actions>.btn-secondary{flex-basis:100%;}
  .preview-topbar-inner>div:last-child{width:100%;}
  .preview-topbar-inner>div:last-child>.btn{flex:1 1 130px;}
  .auth-email{overflow-wrap:anywhere;}
  #authStripLoggedIn{flex-wrap:wrap;gap:8px;}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto;}*,*::before,*::after{transition:none!important;animation:none!important;}}

input[type="datetime-local"]:focus-within{outline:2px solid var(--amber);outline-offset:3px;}
.add-btn{min-height:44px;font-size:.875rem;}
@media(max-width:400px){.field-grid{grid-template-columns:minmax(0,1fr);} .preview-scene-top{flex-wrap:wrap;}}

/* ---------- inicialização offline / acesso ---------- */
.offline-events{list-style:none;margin:16px 0 0;padding:0;display:flex;flex-direction:column;gap:8px;}
.offline-events button{width:100%;text-align:left;}

/* ---------- resultado da publicação e convites ---------- */
.publish-summary{margin-top:14px;background:var(--surface-2);border:1px solid var(--border);border-left:3px solid var(--amber);border-radius:var(--radius-sm);padding:10px 14px;}
.publish-summary-head{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.publish-summary ul{margin:6px 0;padding-left:18px;font-size:.9rem;line-height:1.6;color:var(--text-muted);}
.publish-summary li.is-ok{color:var(--green);}
.publish-summary li.is-warn{color:var(--amber);}
.publish-summary li.is-error{color:#ffb0ba;}
.invites-section{margin-top:28px;padding-top:18px;border-top:1px solid var(--border);}
.invite-status{font-family:var(--font-body);font-size:.8125rem;font-weight:600;padding:2px 8px;border-radius:999px;border:1px solid var(--border);white-space:nowrap;}
.invite-status--ok{color:var(--green);border-color:rgba(51,209,122,.35);}
.invite-status--pending{color:var(--amber);border-color:rgba(255,212,0,.35);}
.invite-status--failed{color:var(--danger);border-color:rgba(255,84,112,.35);}

/* ---------- compartilhamento ---------- */
.share-settings{margin:6px 0 14px;padding:14px 16px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);}
.share-settings legend{padding:0 6px;}
.share-mode{display:flex;gap:10px;align-items:flex-start;padding:8px 0;cursor:pointer;}
.share-mode input{margin-top:5px;accent-color:var(--amber);width:18px;height:18px;flex:none;}
.share-mode strong{display:block;color:var(--text);}
.share-mode span{color:var(--text-muted);font-size:.9rem;line-height:1.5;}
.share-link{margin-top:10px;}
.share-link-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px;}
.event-link-hint{display:block;margin-top:6px;font-size:.85rem;color:var(--text-muted);}
.readonly-badge{display:inline-block;margin-left:8px;padding:2px 10px;border-radius:999px;border:1px solid rgba(255,212,0,.35);color:var(--amber);font-size:.8rem;}
.is-readonly .status-btn,.is-readonly .mission-chip{cursor:not-allowed;opacity:.55;}

/* ---------- conflito de edição ---------- */
.conflict-panel{margin-bottom:18px;padding:16px 18px;border:1px solid rgba(255,84,112,.45);background:var(--rec-soft);border-radius:var(--radius-sm);}
.conflict-panel h2{margin:0 0 6px;font-size:1.05rem;}
.conflict-panel p{margin:0 0 10px;color:var(--text-muted);font-size:.9rem;line-height:1.5;}
.conflict-actions{display:flex;gap:8px;flex-wrap:wrap;}
.conflict-diff{margin-top:12px;overflow-x:auto;}
.conflict-diff table{width:100%;border-collapse:collapse;font-size:.85rem;}
.conflict-diff th,.conflict-diff td{text-align:left;vertical-align:top;padding:6px 8px;border-bottom:1px solid var(--border);}
.conflict-diff td{overflow-wrap:anywhere;}
/* ---------- tela de criar/editar: seções recolhíveis ---------- */
/* Rótulos em frase normal (sem caixa alta mono) só nesta tela. */
#previewView .field-label{font-family:var(--font-body);text-transform:none;letter-spacing:0;font-size:.9375rem;font-weight:600;color:var(--text);margin-bottom:6px;}
#previewView .field-hint{font-family:var(--font-body);font-size:.875rem;color:var(--text-muted);line-height:1.5;}
#previewView .field-warning{font-size:.875rem;}
#previewView .field-textarea{font-family:var(--font-body);}
#previewView .field-checkbox-label{min-height:44px;font-size:.9375rem;}
#previewView .field-checkbox-label input[type="checkbox"]{width:20px;height:20px;}
.field-optional{margin-left:6px;font-weight:400;font-size:.8125rem;color:var(--text-faint);}
.edit-section{border-top:1px solid var(--border);}
.edit-section:last-of-type{border-bottom:1px solid var(--border);}
.edit-section>summary{list-style:none;display:flex;align-items:center;gap:12px;min-height:60px;padding:14px 4px;cursor:pointer;}
.edit-section>summary::-webkit-details-marker{display:none;}
.edit-section>summary::after{content:'';flex:none;width:9px;height:9px;margin-left:4px;border-right:2px solid var(--text-muted);border-bottom:2px solid var(--text-muted);transform:translateY(-3px) rotate(45deg);transition:transform .2s ease;}
.edit-section[open]>summary::after{transform:translateY(2px) rotate(-135deg);}
.edit-section>summary:hover .edit-section-title{color:var(--amber);}
.edit-section-title{margin:0;font-family:var(--font-display);font-weight:700;font-size:1.15rem;transition:color .15s ease;}
.edit-section-summary{flex:1;min-width:0;text-align:right;font-size:.9rem;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.edit-section[open] .edit-section-summary{visibility:hidden;}
.edit-section-body{padding:4px 4px 28px;}
.edit-subsection{margin-top:32px;}
.edit-subtitle{margin:0 0 4px;font-family:var(--font-display);font-weight:700;font-size:1rem;}
.edit-subsection>.field-hint{margin:0 0 14px;}
.edit-empty{margin-bottom:14px;padding:18px;border:1.5px dashed var(--border-strong);border-radius:var(--radius-sm);color:var(--text-muted);}
.edit-empty p{margin:0 0 12px;max-width:60ch;line-height:1.5;}
.preview-phase-block{border:0;background:none;padding:0;margin-bottom:32px;}
.preview-phase-head{margin-bottom:10px;}
.preview-phase-icon{margin-bottom:14px;}
.preview-scene-card{padding:0;}
.preview-scene-top{margin:0;padding:6px 8px 6px 6px;}
.preview-scene-card.is-open .preview-scene-top{border-bottom:1px solid var(--border);}
.preview-scene-body{padding:14px;}
.scene-toggle{flex:1;min-width:0;display:flex;align-items:center;gap:12px;min-height:48px;padding:6px 8px;background:none;border:0;border-radius:var(--radius-sm);color:var(--text);text-align:left;cursor:pointer;font:inherit;}
.scene-toggle:hover .scene-toggle-title{color:var(--amber);}
.scene-toggle-icon{flex:none;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;background:var(--surface-2);color:var(--amber);}
.scene-toggle-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;}
.scene-toggle-title{font-weight:600;font-size:.95rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition:color .15s ease;}
.scene-toggle-meta{font-size:.8125rem;color:var(--text-muted);}
.scene-toggle-chevron{flex:none;color:var(--text-muted);transform:rotate(-90deg);transition:transform .2s ease;}
.scene-toggle[aria-expanded="true"] .scene-toggle-chevron{transform:none;}
.preview-scene-actions .icon-btn{min-width:44px;height:44px;}
.icon-current{display:flex;align-items:center;gap:10px;min-height:44px;}
.icon-current-preview{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-2);color:var(--amber);}
.icon-current-name{min-width:0;font-size:.9rem;color:var(--text-muted);}
.btn-small{padding:8px 14px;min-height:44px;font-family:var(--font-body);font-size:.875rem;letter-spacing:0;}
.icon-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:6px;max-width:360px;margin:10px 0 0;padding:0;border:0;}
.icon-grid[hidden]{display:none;}
.icon-option{position:relative;display:flex;align-items:center;justify-content:center;height:44px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface-2);color:var(--text-muted);cursor:pointer;transition:border-color .15s ease,color .15s ease,background .15s ease;}
.icon-option:hover{border-color:var(--border-strong);color:var(--text);}
.icon-option input{position:absolute;inset:0;margin:0;opacity:0;cursor:pointer;}
.icon-option:has(input:checked){border-color:var(--amber);background:var(--amber-soft);color:var(--amber);}
.icon-option:has(input:focus-visible){outline:2px solid var(--amber);outline-offset:2px;}
@media(max-width:480px){
  .edit-section>summary{flex-wrap:wrap;row-gap:2px;}
  .edit-section-title{flex:1;}
  .edit-section-summary{order:3;flex-basis:100%;text-align:left;}
  .edit-section[open] .edit-section-summary{display:none;}
  .preview-scene-top{flex-wrap:wrap;}
  .preview-scene-actions{margin-left:auto;}
  .preview-scene-card:not(.is-open) .preview-scene-actions{display:none;}
  .preview-scene-card.is-open .scene-toggle{flex-basis:100%;}
}

/* ---------- ícones dentro de botões e textos ---------- */
.btn .icon,.icon-btn .icon,.hero-dismiss .icon{width:16px; height:16px; flex:none;}
.hero-dismiss{display:inline-flex; align-items:center; justify-content:center;}
.hero-steps .icon{display:inline-block; width:14px; height:14px; margin:0 6px; vertical-align:-2px; color:var(--amber);}
.import-actions--flush{margin-top:0;}

/* ---------- Minha conta ---------- */
.account-view{display:flex; flex-direction:column; gap:20px;}
.account-email{margin:0; color:var(--text-muted);}
.account-email strong{color:var(--text); overflow-wrap:anywhere;}
.account-section{padding:20px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface);}
.account-section h2{margin:0 0 10px; font-family:var(--font-display); font-size:1.1rem;}
.account-section p{margin:0 0 12px; line-height:1.6; color:var(--text-muted);}
.account-status{font-weight:600;}
.account-status.is-on{color:var(--green);}
.google-testing-note{display:flex; gap:10px; align-items:flex-start; margin:14px 0 0;}
.google-testing-note[hidden]{display:none;}
.google-testing-note .icon{flex:none; margin-top:2px;}

/* atalho no histórico: avisa que a seção existe e leva pra "Minha conta" */
.account-shortcut{display:flex; align-items:center; gap:14px; flex-wrap:wrap; min-height:60px; margin:0 0 20px; padding:14px 18px; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); color:var(--text); text-decoration:none; transition:border-color .15s ease;}
.account-shortcut:hover{border-color:var(--border-strong);}
.account-shortcut-text{flex:1 1 220px; min-width:0; display:flex; flex-direction:column; gap:2px;}
.account-shortcut-title{font-family:var(--font-display); font-weight:700;}
.account-shortcut-cta{display:inline-flex; align-items:center; gap:6px; font-size:.875rem; font-weight:600; color:var(--amber);}
.account-shortcut-cta .icon{width:16px; height:16px;}

/* estado do Google na seção Google da tela de edição */
.google-status{margin:0 0 14px; padding:10px 14px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); color:var(--text-muted); font-size:.875rem; line-height:1.5;}
.google-status[hidden]{display:none;}
.google-status.is-on{color:var(--green); border-color:rgba(51,209,122,0.3);}
.google-status a{color:var(--amber);}

/* ---------- telas de entrada (início, login, carregando, erro, acesso) ---------- */
/* Moldura de visor: o mesmo canto de câmera dos cards de cena. */
.vf-frame{position:relative; padding-bottom:34px;}
.vf-frame::before{content:''; position:absolute; inset:10px; pointer-events:none; --vf:var(--border-strong);
  background:
    linear-gradient(var(--vf),var(--vf)) left top/18px 2px no-repeat,
    linear-gradient(var(--vf),var(--vf)) left top/2px 18px no-repeat,
    linear-gradient(var(--vf),var(--vf)) right top/18px 2px no-repeat,
    linear-gradient(var(--vf),var(--vf)) right top/2px 18px no-repeat,
    linear-gradient(var(--vf),var(--vf)) left bottom/18px 2px no-repeat,
    linear-gradient(var(--vf),var(--vf)) left bottom/2px 18px no-repeat,
    linear-gradient(var(--vf),var(--vf)) right bottom/18px 2px no-repeat,
    linear-gradient(var(--vf),var(--vf)) right bottom/2px 18px no-repeat;}
.vf-frame:focus-within::before{--vf:var(--amber);}
.import-card--narrow{max-width:480px;}
.card-brand{display:flex; align-items:center; gap:8px; margin-bottom:16px; font-family:var(--font-display); font-weight:700; font-size:.95rem; letter-spacing:.08em; color:var(--text-muted);}
.card-brand-mark{width:26px; height:26px; flex:none;}
.import-card--narrow .import-sub{max-width:62ch;}
.login-reason{margin:0 0 14px; padding:10px 14px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface-2); color:var(--text); font-size:.9375rem; line-height:1.5;}
.login-reason[hidden]{display:none;}
.import-error--ok{background:var(--green-soft); border-color:rgba(51,209,122,0.35); color:var(--green);}
.import-note{margin:12px 0 0; font-size:.875rem; color:var(--text-muted); line-height:1.5;}
.import-note[hidden]{display:none;}
.import-alt{margin:18px 0 0; padding-top:16px; border-top:1px solid var(--border); font-size:.9rem; color:var(--text-muted);}
.import-alt[hidden]{display:none;}
.link-btn{display:inline; padding:10px 0; border:0; background:none; color:var(--amber); font:inherit; font-weight:600; text-decoration:underline; text-underline-offset:3px; cursor:pointer;}
.link-btn:hover{color:var(--text);}
.loading-screen{min-height:100vh; min-height:100dvh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; color:var(--text-muted); font-size:.9rem;}
.loading-mark{width:44px; height:44px; animation:apertureTurn 2.4s linear infinite;}
@keyframes apertureTurn{to{transform:rotate(360deg);}}
@media(min-width:900px){
  .import-wrap{max-width:1080px; display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:56px; align-items:center;}
  .import-wrap:has(> .hero-intro[hidden]){max-width:720px; grid-template-columns:minmax(0,1fr);}
  .hero-intro{text-align:left;}
  .hero-brand{justify-content:flex-start;}
  .hero-title{font-size:2rem;}
  .hero-sub{margin-left:0; margin-right:0;}
}
@media(max-width:600px){
  .import-actions>.btn-primary{flex-basis:100%;}
}
