/* =========================================================
   Carrossel Rápido — Design System
   Paleta: papel quente + tinta suave + sálvia + amarelo manteiga
   ========================================================= */
:root {
  --bg: #F4F1EA;
  --bg-2: #ECE7DC;
  --surface: #FFFFFF;
  --surface-2: #FAF8F3;
  --ink: #23221F;
  --ink-2: #4A4842;
  --muted: #7A766D;
  --line: #E4DED2;
  --line-2: #D6CFC0;
  --accent: #2F5D50;        /* sálvia profunda */
  --accent-2: #3E7666;
  --accent-soft: #E3ECE7;
  --butter: #F2DE7C;        /* amarelo manteiga (ref. cicely) */
  --butter-soft: #FBF4D2;
  --coral: #E5795B;
  --coral-soft: #FBE6DE;
  --danger: #C2493B;
  --ok: #3B8457;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-1: 0 1px 2px rgba(35,34,31,.05), 0 2px 8px rgba(35,34,31,.05);
  --shadow-2: 0 4px 12px rgba(35,34,31,.07), 0 16px 40px rgba(35,34,31,.08);
  --font-ui: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Bricolage Grotesque", "Inter", sans-serif;
  --sidebar: 248px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
.hidden { display: none !important; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(0); }
.btn.accent { background: var(--accent); }
.btn.accent:hover { background: var(--accent-2); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--surface); }
.btn.soft { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.butter { background: var(--butter); color: var(--ink); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn.xs { height: 28px; padding: 0 10px; font-size: 12px; }
.btn.block { width: 100%; }
.btn.icon { width: 36px; height: 36px; padding: 0; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.icon-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-2);
}
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.icon-btn.on { background: var(--accent-soft); color: var(--accent); }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .lbl { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--surface); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 48px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.pw-eye:hover { background: var(--bg-2); color: var(--ink); }
.pw-eye:focus-visible { outline: 2px solid var(--accent); }
.hint { font-size: 12.5px; color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); font-size: 13px; cursor: pointer; font-weight: 500;
}
.chip:hover { border-color: var(--ink-2); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Auth ---------- */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
}
.auth-hero {
  position: relative; overflow: hidden; background: var(--butter);
  display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px;
}
.auth-hero .brand { font-family: var(--font-display); font-weight: 700; font-size: 22px; display: flex; gap: 10px; align-items: center; }
.auth-hero h1 { font-size: clamp(40px, 5vw, 68px); font-weight: 700; max-width: 12ch; }
.auth-hero p { max-width: 42ch; color: var(--ink-2); font-size: 17px; }
.arc { position: relative; height: 340px; margin: 10px 0; }
.arc .card {
  position: absolute; width: 150px; height: 188px; border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-2); background: #ddd; transform-origin: 50% 150%;
  animation: floaty 6s ease-in-out infinite;
}
.arc .card img { width: 100%; height: 100%; object-fit: cover; }
@keyframes floaty { 0%,100% { translate: 0 0; } 50% { translate: 0 -8px; } }
.auth-side { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h2 { font-size: 32px; margin-bottom: 6px; }
.auth-box .sub { color: var(--muted); margin: 0 0 26px; }
.auth-tabs { display: flex; gap: 6px; background: var(--bg-2); padding: 4px; border-radius: 999px; margin-bottom: 24px; }
.auth-tabs button { flex: 1; height: 36px; border: 0; border-radius: 999px; background: transparent; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--muted); }
.auth-tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.steps-mini { display: flex; gap: 8px; margin: 18px 0 0; }
.steps-mini div { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps-mini div.on { background: var(--accent); }
.demo-box { margin-top: 26px; padding: 14px 16px; border: 1px dashed var(--line-2); border-radius: 14px; font-size: 13px; color: var(--ink-2); background: var(--surface-2); }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 22px 14px; border-right: 1px solid var(--line);
  background: var(--surface-2); display: flex; flex-direction: column; gap: 4px;
}
.sidebar .brand { font-family: var(--font-display); font-weight: 700; font-size: 19px; padding: 4px 10px 20px; display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); display: grid; place-items: center; position: relative; }
.logo-mark::before, .logo-mark::after { content: ""; position: absolute; width: 12px; height: 16px; border-radius: 3px; }
.logo-mark::before { background: var(--butter); left: 6px; top: 7px; transform: rotate(-8deg); }
.logo-mark::after { background: #fff; left: 12px; top: 7px; transform: rotate(6deg); }
.nav-item {
  display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 12px;
  color: var(--ink-2); cursor: pointer; font-weight: 500; border: 0; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background: var(--bg-2); color: var(--ink); }
.nav-item.on { background: var(--ink); color: #fff; }
.nav-sep { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 16px 12px 6px; font-weight: 600; }
.sidebar .foot { margin-top: auto; padding: 12px; border-radius: 14px; background: var(--butter-soft); font-size: 13px; }
.sidebar .user { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 8px 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }

.main { min-width: 0; }
.page { padding: 32px 40px 80px; max-width: 1280px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: 38px; }
.page-head p { margin: 8px 0 0; color: var(--muted); max-width: 60ch; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; color: var(--accent); margin-bottom: 8px; }

.card-s { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

/* Home */
.hero-home {
  border-radius: 28px; padding: 36px; background: var(--ink); color: #fff; position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: center; margin-bottom: 22px;
}
.hero-home h1 { font-size: clamp(32px, 3.6vw, 50px); }
.hero-home p { color: #CFCBC2; max-width: 46ch; }
.hero-home .prompt-bar { display: flex; gap: 8px; background: #fff; border-radius: 999px; padding: 6px; margin-top: 22px; }
.hero-home .prompt-bar input { flex: 1; border: 0; outline: 0; padding: 0 16px; color: var(--ink); background: transparent; min-width: 0; }
.fan { position: relative; height: 260px; }
.fan .mini { position: absolute; width: 150px; border-radius: 14px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,.35); top: 30px; left: 50%; }
.quick {
  border-radius: 20px; padding: 20px; background: var(--surface); border: 1px solid var(--line); cursor: pointer;
  display: flex; flex-direction: column; gap: 10px; transition: transform .2s, box-shadow .2s; text-align: left;
}
.quick:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.quick .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }
.quick h3 { font-size: 18px; }
.quick p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* Templates gallery */
.tpl-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.tpl {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 10px; cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.tpl:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.tpl .thumb { border-radius: 12px; overflow: hidden; aspect-ratio: 4/5; max-height: 420px; margin: 0 auto; background: var(--bg-2); position: relative; }
.tpl .meta { padding: 12px 6px 6px; }
.tpl .meta h4 { margin: 0; font-size: 15px; font-family: var(--font-display); }
.tpl .meta p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.fmt-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.fmt-tab { display: flex; gap: 12px; align-items: center; text-align: left; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.fmt-tab:hover { border-color: var(--line-2); box-shadow: var(--shadow-1); }
.fmt-tab .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--bg-2); display: grid; place-items: center; font-size: 20px; flex: none; }
.fmt-tab b { font-family: var(--font-display); font-size: 16px; }
.fmt-tab small { color: var(--muted); font-size: 12px; }
.fmt-tab .sub { font-size: 12px; color: var(--muted); }
.fmt-tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.fmt-tab.on .ico { background: rgba(255,255,255,.14); }
.fmt-tab.on small, .fmt-tab.on .sub { color: #CFCBC2; }
@media (max-width: 1200px) { .fmt-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } } @media (max-width: 820px) { .fmt-tabs { grid-template-columns: 1fr; } }
.fmt-badge { position: absolute; right: 8px; top: 8px; z-index: 3; background: rgba(20,20,20,.72); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.tag.butter { background: var(--butter-soft); color: #7A6514; }
.tag.coral { background: var(--coral-soft); color: #9A3E25; }

/* Slide render (shared) */
.slide { position: relative; overflow: hidden; width: 1080px; height: 1350px; transform-origin: 0 0; background: #fff; }
.slide .bgimg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.slide .bgov { position: absolute; inset: 0; }
.slide .layer { position: absolute; box-sizing: border-box; }
.slide .layer.txt { white-space: pre-wrap; word-wrap: break-word; }
.slide .layer.img > .imgwrap { width: 100%; height: 100%; overflow: hidden; background: rgba(0,0,0,.06) center/cover no-repeat; }
.slide .layer.img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide .layer.hid { display: none; }
.scaler { position: relative; overflow: hidden; }
.scaler > .slide { position: absolute; left: 0; top: 0; }

/* ---------- Editor ---------- */
.editor { display: grid; grid-template-columns: 300px minmax(0, 1fr) 300px; grid-template-rows: 60px 1fr 150px; height: 100vh; }
.ed-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.ed-top .title-in { border: 0; background: transparent; font-weight: 700; font-family: var(--font-display); font-size: 17px; outline: none; padding: 6px 8px; border-radius: 8px; width: 260px; }
.ed-top .title-in:hover, .ed-top .title-in:focus { background: var(--bg-2); }
.ed-left, .ed-right { background: var(--surface); overflow: auto; }
.ed-left { border-right: 1px solid var(--line); grid-row: 2 / 4; }
.ed-right { border-left: 1px solid var(--line); grid-row: 2 / 4; grid-column: 3; padding: 16px; }
.ed-stage { grid-column: 2; grid-row: 2; position: relative; overflow: hidden; display: grid; place-items: center; background:
  radial-gradient(circle at 1px 1px, rgba(35,34,31,.08) 1px, transparent 0) 0 0/22px 22px, var(--bg); }
.ed-strip { grid-column: 2; grid-row: 3; border-top: 1px solid var(--line); background: var(--surface-2); display: flex; gap: 12px; padding: 14px; overflow-x: auto; align-items: center; }
.tabs { display: flex; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.tabs button { flex: 1; height: 46px; border: 0; background: none; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.panel { padding: 16px; }
.panel h5 { margin: 18px 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.panel h5:first-child { margin-top: 0; }
.add-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.add-btn { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); padding: 12px; cursor: pointer; text-align: left; font-size: 13px; font-weight: 600; display: flex; flex-direction: column; gap: 6px; }
.add-btn:hover { border-color: var(--ink-2); background: #fff; }
.add-btn small { font-weight: 400; color: var(--muted); font-size: 11.5px; }

.layers { display: flex; flex-direction: column; gap: 4px; }
.layer-row { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 10px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; font-size: 13px; }
.layer-row:hover { background: var(--bg); }
.layer-row.sel { background: var(--accent-soft); border-color: #C8DAD1; }
.layer-row .nm { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.layer-row .ty { width: 26px; height: 26px; border-radius: 7px; background: var(--bg-2); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--ink-2); flex: none; }
.layer-row .icon-btn { width: 26px; height: 26px; }
.layer-row .icon-btn svg { width: 15px; height: 15px; }

.stage-wrap { position: relative; box-shadow: var(--shadow-2); border-radius: 6px; }
.stage-wrap .slide .layer { cursor: move; }
.stage-wrap .slide .layer.locked { cursor: default; }
.sel-box { position: absolute; border: 2px solid #3D8BFD; pointer-events: none; z-index: 50; }
.sel-box .h { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid #3D8BFD; border-radius: 50%; pointer-events: auto; }
.sel-box .h.br { right: -8px; bottom: -8px; cursor: nwse-resize; }
.sel-box .h.r { right: -8px; top: calc(50% - 7px); cursor: ew-resize; }
.sel-box .h.b { bottom: -8px; left: calc(50% - 7px); cursor: ns-resize; }
.sel-box.bg-sel { inset: 0; border: 2px dashed #3D8BFD; border-radius: 6px; }
.pan-bar { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px; background: rgba(20,20,20,.88); color: #fff; padding: 8px 10px 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-2); white-space: nowrap; }
.fx-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fx { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 5px; font-size: 11px; font-weight: 600; cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.fx:hover { border-color: var(--ink-2); }
.fx-prev { width: 100%; aspect-ratio: 1; border-radius: 7px; background-size: cover; background-position: center; display: block; }
.zoom-ctl { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px; align-items: center; font-size: 12px; }
.paste-tip { position: absolute; left: 14px; bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 12px; color: var(--ink-2); display: flex; gap: 8px; align-items: center; }
kbd { font-family: var(--font-ui); font-size: 11px; background: var(--bg-2); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; }

.thumb-s { flex: none; border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: pointer; position: relative; box-shadow: var(--shadow-1); }
.thumb-s.on { border-color: var(--ink); }
.thumb-s .n { position: absolute; left: 4px; top: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; font-weight: 700; border-radius: 4px; padding: 1px 5px; z-index: 3; }
.thumb-add { flex: none; width: 82px; height: 102px; border-radius: 8px; border: 2px dashed var(--line-2); display: grid; place-items: center; cursor: pointer; color: var(--muted); background: none; }

.props .grp { margin-bottom: 18px; }
.props .grp > .lbl { display: block; margin-bottom: 8px; }
.mini-in { height: 34px; border-radius: 8px; border: 1px solid var(--line-2); padding: 0 8px; width: 100%; background: #fff; font-size: 13px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; }
input[type=color] { width: 34px; height: 34px; border: 1px solid var(--line-2); border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.seg { display: flex; background: var(--bg-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { flex: 1; height: 28px; border: 0; background: none; border-radius: 7px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--ink-2); display: grid; place-items: center; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-1); }
.empty-props { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 13.5px; }
.empty-props .big { font-size: 38px; margin-bottom: 8px; }

/* Help bubble */
.help-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 6px 12px; border-radius: 999px; cursor: pointer; border: 0; }

/* ---------- Create (IA) ---------- */
.create-grid { display: grid; grid-template-columns: minmax(300px, .85fr) minmax(0, 1.15fr); gap: 22px; align-items: start; }
.create-grid > *, .lessons > * { min-width: 0; }
.preview-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 14px; }
.gen-status { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); padding: 12px 14px; border-radius: 12px; background: var(--butter-soft); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--ink); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.out-box { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 16px; font-size: 14px; line-height: 1.6; min-height: 200px; }
.copy-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fff; margin-bottom: 10px; position: relative; }
.copy-card .n { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.copy-card .t { font-weight: 700; font-family: var(--font-display); font-size: 17px; margin: 4px 0; }
.copy-card .b { color: var(--ink-2); font-size: 14px; white-space: pre-wrap; }

/* ---------- Aulas ---------- */
.lessons { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 22px; align-items: start; }
.lesson-list { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 20px; }
.lesson-item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; cursor: pointer; border: 1px solid transparent; background: none; text-align: left; width: 100%; }
.lesson-item:hover { background: var(--surface); }
.lesson-item.on { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-1); }
.lesson-item .num { width: 34px; height: 34px; border-radius: 10px; background: var(--bg-2); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.lesson-item.done .num { background: var(--accent); color: #fff; }
.lesson-item .t { font-weight: 600; font-size: 14px; line-height: 1.3; }
.lesson-item .d { font-size: 12px; color: var(--muted); }
.player { border-radius: 24px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.player-top { padding: 28px 30px; background: linear-gradient(135deg, #2F5D50, #23443B); color: #fff; position: relative; }
.player-top h2 { font-size: 30px; margin: 6px 0 4px; }
.player-top p { margin: 0; color: #CFE0D8; }
.narrator { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.narrator .face { width: 54px; height: 54px; border-radius: 50%; background: var(--butter); display: grid; place-items: center; font-size: 24px; position: relative; flex: none; }
.narrator .face.talk::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(242,222,124,.6); animation: pulse 1.2s ease-out infinite; }
@keyframes pulse { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.wave { display: flex; gap: 3px; align-items: center; height: 26px; }
.wave i { width: 3px; border-radius: 2px; background: rgba(255,255,255,.7); height: 6px; }
.wave.on i { animation: wv 1s ease-in-out infinite; }
.wave i:nth-child(2n) { animation-delay: .15s; } .wave i:nth-child(3n) { animation-delay: .3s; } .wave i:nth-child(5n) { animation-delay: .45s; }
@keyframes wv { 0%,100% { height: 6px; } 50% { height: 24px; } }
.player-ctl { display: flex; align-items: center; gap: 10px; padding: 14px 30px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.progress { flex: 1; height: 6px; background: var(--bg-2); border-radius: 6px; overflow: hidden; min-width: 120px; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.lesson-body { padding: 26px 30px 34px; }
.para { padding: 12px 16px; border-radius: 12px; margin: 0 0 8px; transition: background .25s; color: var(--ink-2); font-size: 15.5px; line-height: 1.7; }
.para.speaking { background: var(--butter-soft); color: var(--ink); }
.step-box { border-left: 3px solid var(--accent); background: var(--surface-2); padding: 12px 16px; border-radius: 0 12px 12px 0; margin: 6px 0 12px; }
.step-box b { color: var(--ink); }

/* ---------- Modal / Toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(35,34,31,.45); display: grid; place-items: center; z-index: 1000; padding: 20px; backdrop-filter: blur(3px); }
.modal { background: var(--surface); border-radius: 24px; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-2); }
.modal-h { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-h h3 { font-size: 20px; }
.modal-b { padding: 22px 24px; }
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 2000; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; box-shadow: var(--shadow-2); animation: tin .25s ease; max-width: 90vw; }
.toast.ok { background: var(--accent); }
.toast.err { background: var(--danger); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* E-mail mock */
.email { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; font-size: 14px; }
.email-head { background: var(--surface-2); padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.email-body { padding: 28px; text-align: center; }
.email-body .code { font-family: var(--font-display); font-size: 40px; letter-spacing: .3em; font-weight: 700; margin: 14px 0; padding: 14px; background: var(--butter-soft); border-radius: 14px; }

/* Projects */
.proj { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 10px; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.proj:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.proj .thumb { border-radius: 10px; overflow: hidden; aspect-ratio: 4/5; background: var(--bg-2); }
.proj .meta { padding: 10px 4px 2px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.proj .meta b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); border: 2px dashed var(--line-2); border-radius: 24px; }

/* Responsivo */
@media (max-width: 1100px) {
  .editor { grid-template-columns: 260px minmax(0, 1fr); }
  .ed-right { position: fixed; right: 0; top: 60px; bottom: 0; width: 300px; z-index: 30; box-shadow: var(--shadow-2); transform: translateX(100%); transition: transform .2s; }
  .ed-right.open { transform: none; }
  .create-grid, .lessons { grid-template-columns: 1fr; }
  .lesson-list { position: static; }
  .hero-home { grid-template-columns: minmax(0, 1fr); }
  .fan { display: none; }
  .g4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { min-height: 340px; padding: 28px 20px; }
  .arc { display: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; bottom: 0; top: auto; height: auto; width: 100%; flex-direction: row; z-index: 40; padding: 6px; border-top: 1px solid var(--line); border-right: 0; overflow-x: auto; }
  .sidebar .brand, .sidebar .foot, .sidebar .user, .nav-sep { display: none; }
  .nav-item { flex-direction: column; height: 54px; gap: 2px; font-size: 10.5px; justify-content: center; min-width: 64px; padding: 0 6px; }
  .page { padding: 22px 16px 100px; }
  .page-head h1 { font-size: 30px; }
  .hero-home { padding: 24px 18px; border-radius: 22px; }
  .hero-home .prompt-bar { flex-direction: column; border-radius: 18px; padding: 8px; }
  .hero-home .prompt-bar input { height: 44px; }
  .grid > * { min-width: 0; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .editor { grid-template-columns: minmax(0, 1fr); grid-template-rows: 56px 1fr 120px; }
  .ed-top { gap: 4px; padding: 0 8px; overflow: hidden; }
  .ed-top .btn .lbl-m { display: none; }
  .hide-m { display: none !important; }
  .ed-left { position: fixed; left: 0; top: 56px; bottom: 0; width: 290px; z-index: 30; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-2); }
  .ed-left.open { transform: none; }
  .ed-stage, .ed-strip { grid-column: 1; }
  .ed-top .title-in { width: 120px; }
  .ed-top .hide-m { display: none; }
}

/* ---------- João ---------- */
.joao-av { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #1f4038); color: var(--butter); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 24px; flex: none; box-shadow: var(--shadow-1); }
.joao-av.sm { width: 34px; height: 34px; font-size: 15px; }
.joao-card { padding: 0; overflow: hidden; }
.joao-log { max-height: 52vh; overflow: auto; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.jb { display: flex; gap: 10px; align-items: flex-end; max-width: 80%; }
.jb.u { align-self: flex-end; flex-direction: row-reverse; }
.jt { padding: 12px 16px; border-radius: 18px; font-size: 15px; line-height: 1.5; background: var(--surface-2); border: 1px solid var(--line); white-space: pre-wrap; }
.jb.j .jt { border-bottom-left-radius: 4px; }
.jb.u .jt { background: var(--ink); color: #fff; border-color: var(--ink); border-bottom-right-radius: 4px; }
.joao-input { border-top: 1px solid var(--line); padding: 16px 22px 20px; background: var(--surface); }
.chip .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.1); }
.concept { display: flex; flex-direction: column; }
.concept.rec { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ds-list { display: grid; gap: 10px; margin-top: 12px; font-size: 14px; }
.ds-list > div { display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); }
.ds-list b { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ds-list.big { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; font-size: 16px; }
.joao-banner { width: 100%; display: flex; align-items: center; gap: 16px; text-align: left; padding: 18px 20px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(90deg, var(--accent-soft), var(--butter-soft)); cursor: pointer; margin: -12px 0 30px; }
.joao-banner small { display: block; color: var(--ink-2); margin-top: 2px; }
.joao-banner > span:nth-child(2) { flex: 1; }
.ds-doc { background: #fff; border: 1px solid var(--line); border-radius: 28px; overflow: hidden; }
.ds-cover { padding: 64px 56px; }
.ds-sec { padding: 40px 56px; border-top: 1px solid var(--line); }
.ds-sec h2 { font-size: 30px; margin-bottom: 20px; }
.ds-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-top: 16px; }
.ds-grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.ds-cell { border-top: 2px solid var(--ink); padding-top: 12px; font-size: 15px; line-height: 1.5; }
.ds-cell > b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.ds-cell ul { margin: 0; padding-left: 18px; }
.ds-cell.do { border-color: var(--ok); } .ds-cell.dont { border-color: var(--danger); }
.ds-pillars { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-top: 20px; }
.ds-pillars > div { background: var(--surface-2); border-radius: 16px; padding: 16px; display: grid; gap: 6px; font-size: 14px; }
.ds-pillars b { font-family: var(--font-display); font-size: 20px; }
.ds-concept > div { font-size: clamp(28px, 4vw, 48px); line-height: 1.05; }
.ds-concept p { color: var(--ink-2); max-width: 60ch; }
.ds-tone { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.ds-tone > div { border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 4px; font-size: 14px; }
.ds-tone b { font-family: var(--font-display); font-size: 18px; }
.ds-manifesto { margin: 22px 0 6px; font-size: 22px; line-height: 1.55; max-width: 62ch; color: var(--ink-2); }
.ds-manifesto strong { color: var(--ink); }
.ds-palette { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-height: 360px; }
.ds-sw { border-radius: 18px; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-height: 170px; border: 1px solid rgba(0,0,0,.06); }
.ds-sw b { font-family: var(--font-display); font-size: 22px; }
.ds-sw small { font-size: 12.5px; opacity: .9; }
.ds-sw.main { min-height: 360px; }
.ds-sw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ds-prop { display: flex; height: 140px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.ds-prop > div { padding: 12px; display: flex; flex-direction: column; justify-content: space-between; font-size: 13px; min-width: 0; }
.ds-prop span { font-family: var(--font-display); font-size: 26px; font-weight: 700; }
.ds-scale { display: grid; gap: 10px; margin-top: 16px; }
.ds-samples { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.ds-sample { flex: none; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-1); }
@media (max-width: 820px) { .ds-grid, .ds-grid.two, .ds-pillars, .ds-list.big, .ds-palette { grid-template-columns: 1fr; } .ds-sec, .ds-cover { padding: 28px 20px; } .jb { max-width: 92%; } }

/* ---------- Vídeo-aulas ---------- */
.va-wrap { padding: 0; background: #111; }
.va-frame { position: relative; width: 100%; overflow: hidden; background: #F4F1EA; }
.va-iframe { position: absolute; left: 0; top: 0; width: 1280px; height: 800px; border: 0; transform-origin: 0 0; pointer-events: none; }
.va-shield { position: absolute; inset: 0; display: none; }
.va-shield.on { display: block; cursor: not-allowed; }
.va-cursor { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; transition: none; filter: drop-shadow(0 3px 6px rgba(0,0,0,.35)); }
.va-ripple { position: absolute; z-index: 4; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 3px solid #F2DE7C; opacity: 0; pointer-events: none; }
.va-ripple.on { animation: varip .5s ease-out; }
@keyframes varip { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.va-caption { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 6; max-width: 86%; background: rgba(15,15,15,.82); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 15px; line-height: 1.45; text-align: center; opacity: 0; transition: opacity .25s; pointer-events: none; }
.va-caption.on { opacity: 1; }
.va-play { position: absolute; inset: 0; margin: auto; width: max-content; height: 64px; z-index: 7; display: flex; align-items: center; gap: 12px; padding: 0 28px; border-radius: 999px; border: 0; background: var(--butter); color: var(--ink); font-weight: 800; font-size: 17px; cursor: pointer; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.va-play svg { width: 24px; height: 24px; fill: currentColor; }
.va-frame:has(.va-play[style*="none"]) { }
.va-bar { height: 5px; background: #2a2a2a; }
.va-bar > div { height: 100%; width: 0; background: var(--butter); transition: width .4s; }

.up-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.up-th { width: 64px; height: 80px; border-radius: 10px; background: #eee center/cover; position: relative; border: 1px solid var(--line); }
.up-th button { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; cursor: pointer; font-size: 14px; line-height: 1; }
.shadow-grp .seg button { font-size: 12px; }

/* ---------- João · manual em páginas e conversa ---------- */
.bk-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 16px; align-items: start; margin-bottom: 18px; }
.bk-main { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px; }
.bk-stage { border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-1); }
.bk-strip { display: flex; flex-direction: column; gap: 10px; max-height: 76vh; overflow: auto; padding-right: 4px; }
.bk-th { border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: pointer; flex: none; box-shadow: var(--shadow-1); }
.bk-th.on { border-color: var(--ink); }
.jc-card { box-shadow: var(--shadow-1); }
.seg button { white-space: nowrap; padding: 0 10px; }
.jc-log { max-height: 220px; overflow: auto; display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }
.drop-hint { border: 2px dashed var(--line-2); border-radius: 14px; padding: 16px; text-align: center; color: var(--ink-2); margin-bottom: 10px; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
@media (max-width: 1000px) { .bk-wrap { grid-template-columns: 1fr; } .bk-strip { flex-direction: row; max-height: none; overflow-x: auto; } }
