/* Diapo — estilos de la aplicación local */
:root {
  --ink: #20222a;
  --muted: #6f7280;
  --line: #e5e1d9;
  --paper: #faf8f4;
  --sidebar: #ffffff;
  --accent: #e4574e;
  --accent-soft: #fdece9;
  --teal: #1f8a8a;
  --radius: 12px;
  --shadow: 0 12px 34px rgba(32, 34, 42, .12);
  font-synthesis: none;
}

* { box-sizing: border-box; }

/* El atributo hidden debe ganar siempre: sin esto, un overlay con
   display:flex sigue interceptando clics aunque esté "oculto". */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .62; cursor: not-allowed; }

.app {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr) 300px;
  height: 100vh;
  width: 100vw;
}

/* ---------- Barra lateral ---------- */
.sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px 18px;
}

.brand-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
}
.brand-mark i {
  position: absolute;
  border: 2px solid var(--accent);
  border-radius: 50%;
  opacity: .95;
}
.brand-mark i:nth-child(1) { width: 28px; height: 28px; opacity: .35; }
.brand-mark i:nth-child(2) { width: 19px; height: 19px; opacity: .65; }
.brand-mark i:nth-child(3) { width: 9px; height: 9px; background: var(--accent); }
.brand-mark.small { transform: scale(.75); transform-origin: left center; }

.brand-name { font-size: 21px; font-weight: 750; letter-spacing: -.6px; }
.brand-tag {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--teal);
  background: #e6f4f2;
  padding: 3px 7px;
  border-radius: 20px;
}

.project-block { padding: 0 20px 18px; }
.project-block label,
.field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.project-block label small, .field label small { font-weight: 500; text-transform: none; letter-spacing: 0; }

#projectTitle {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fcfbf9;
  font-weight: 600;
}
#projectTitle:focus, .field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

/* Acordeón «Tema» en la barra izquierda */
.theme-acc { padding: 0 20px 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.theme-acc .acc-head { padding: 12px 0 9px; }
.theme-acc .acc-panel { padding-bottom: 2px; }
#themeSelect {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fcfbf9;
  font-size: 13px;
}
.theme-preview {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 10px 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fcfbf9;
  overflow: hidden;
}
.theme-swatch { width: 16px; height: 16px; flex: 0 0 auto; border-radius: 5px; }
.theme-sample {
  margin-left: 6px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#applyTheme { width: 100%; }
.theme-hint { margin: 8px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.4; }

/* Acordeón «Encabezado y pie» en la barra izquierda */
.chrome-acc { padding: 0 20px 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.chrome-acc .acc-head { padding: 12px 0 9px; }
.chrome-acc .acc-panel { padding-bottom: 2px; }
.chrome-acc .field { margin-bottom: 11px; }
.chrome-acc textarea { min-height: 54px; }
.mini-btn {
  margin-top: 7px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #4a4d58;
  font-size: 11px;
}
.mini-btn:hover { border-color: var(--accent); color: var(--accent); }
.chrome-actions { display: flex; gap: 7px; margin-top: 10px; }
.chrome-actions .tool-btn { flex: 1; padding: 8px 6px; font-size: 11.5px; }
.check-line {
  display: flex; align-items: center; gap: 7px;
  margin-top: 10px;
  color: #4a4d58;
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
}
.check-line input { accent-color: var(--accent); }
#headerControls .image-controls-select, #headerImageFit { margin-top: 6px; }

.outline-block {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  padding-top: 14px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 18px;
  line-height: 1;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

.outline {
  list-style: none;
  margin: 0;
  padding: 0 12px 12px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.outline li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
  color: #4a4d58;
}
.outline li:hover { background: #f5f3ef; }
.outline li.active { background: var(--accent-soft); color: #a23228; font-weight: 650; }
.outline .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 7px;
  background: #eeece7;
  font-size: 11px;
  font-weight: 700;
}
.outline li.active .num { background: #fff; }
.outline .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outline-empty { padding: 0 20px; color: var(--muted); line-height: 1.5; }

.sidebar-footer { border-top: 1px solid var(--line); padding: 14px 20px 16px; }
.pdf-ai-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin-bottom: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(31, 138, 138, .35);
  border-radius: 9px;
  background: linear-gradient(135deg, #eef9f8 0%, #f6f3ff 100%);
  color: #156767;
  font-size: 12.5px;
  font-weight: 700;
  transition: border-color .16s ease, transform .12s ease;
}
.pdf-ai-btn:hover { border-color: var(--teal); color: #0e4f4f; }
.pdf-ai-btn .sparkle { color: var(--accent); font-size: 13px; }
.primary-btn {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 11px 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(228, 87, 78, .25);
}
.primary-btn:hover { filter: brightness(.96); }
.primary-btn kbd {
  float: right;
  font: inherit;
  font-size: 11px;
  opacity: .75;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 5px;
  padding: 0 5px;
}
.primary-btn.small {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  padding: 8px 14px;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(228, 87, 78, .22);
}
.primary-btn.small kbd { float: none; }
.mini-actions { display: flex; gap: 6px; margin-top: 0; }
.mini-actions button {
  flex: 1;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 7px 4px;
  font-size: 12px;
}
.mini-actions button:hover { border-color: var(--accent); color: var(--accent); }
.autosave { margin: 12px 0 0; font-size: 11px; color: #9a9ca6; text-align: center; }

/* ---------- Escenario ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }
.toolbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  flex: 0 0 54px;
  padding: 0 18px;
  background: rgba(255,255,255,.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  z-index: 15;
}
.top-menu { position: relative; }
.top-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
}
.menu-bars {
  position: relative;
  width: 13px;
  height: 10px;
  border-top: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
}
.menu-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 2.3px;
  border-top: 1.8px solid currentColor;
}
.menu-caret { font-size: 11px; color: var(--muted); transition: transform .16s ease; }
.top-menu.open .top-menu-btn { border-color: var(--accent); color: var(--accent); }
.top-menu.open .menu-caret { transform: rotate(180deg); color: var(--accent); }
.top-menu-panel {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  min-width: 206px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 38px rgba(32, 34, 42, .16);
  z-index: 40;
}
.top-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}
.top-menu-item:hover { background: #f6f4ef; color: var(--accent); }
.top-menu-item.danger:hover { background: #fff5f4; color: #c0392b; }
.top-menu-sep { margin: 5px 4px; border: 0; border-top: 1px solid var(--line); }
.tool-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 7px 11px;
  font-size: 13px;
}
.tool-btn:hover { border-color: var(--accent); color: var(--accent); }
.tool-btn.danger:hover { border-color: #c0392b; color: #c0392b; background: #fff5f4; }
.toolbar-sep { width: 1px; height: 22px; background: var(--line); }
.toolbar-spacer { flex: 1; }
.zoom-group { display: flex; align-items: center; gap: 6px; }
.zoom-group span { min-width: 56px; text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
.hint { font-size: 11px; color: #a2a4ad; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  cursor: grab;
  background: #f7f4ee;
  touch-action: none;
}
.stage.panning { cursor: grabbing; }

/* Encabezado y pie dibujados sobre el lienzo del editor */
.canvas-chrome { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.canvas-chrome-header {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: min(84%, 900px);
  text-align: center;
}
.canvas-chrome-header img {
  width: var(--hsize, 36%);
  max-width: 150px;
  max-height: 80px;
  flex: 0 0 auto;
  object-fit: var(--hfit, contain);
  opacity: var(--hopacity, 1);
  transform: translate(var(--hx, 0%), var(--hy, 0%));
  border-radius: 10px;
}
.canvas-chrome-header h1 {
  margin: 0;
  font-family: var(--htfont, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: min(var(--htsize, 44px), 30px);
  line-height: 1.2;
  letter-spacing: -.4px;
  color: #20222a;
  text-shadow: 0 1px 0 rgba(255,255,255,.9);
}
.canvas-chrome-footer {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(84%, 900px);
  padding: 5px 12px;
  border-radius: 9px;
  background: rgba(255,255,255,.82);
  color: #5c5f69;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  white-space: pre-line;
}
.grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(32,34,42,.13) 1px, transparent 1.2px);
  background-size: 40px 40px;
  pointer-events: none;
}
.world {
  position: absolute;
  left: 0; top: 0;
  transform-origin: 0 0;
  will-change: transform;
}
.stage-badge {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  background: rgba(32,34,42,.82);
  color: #fff;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
}

/* ---------- Temas en el lienzo ---------- */
.topic {
  position: absolute;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(32,34,42,.16);
  cursor: pointer;
  user-select: none;
  font-family: var(--font, inherit);
  transition: box-shadow .18s ease;
}
.topic::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 7px;
  background: var(--accent);
  z-index: 4;
}
.topic.selected { box-shadow: 0 0 0 3px var(--accent), 0 22px 52px rgba(32,34,42,.22); }
.topic.shape-note { border-radius: 24px 24px 4px 24px; }
/* Pliegue muy pequeño en la esquina inferior derecha: distingue una «Nota»
   de una tarjeta normal sin tapar contenido (translúcido, funciona con cualquier color). */
.topic.shape-note::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 15px;
  height: 15px;
  background: linear-gradient(135deg, rgba(0,0,0,.13) 0 47%, rgba(255,255,255,.5) 48% 52%, rgba(0,0,0,.03) 53% 100%);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  pointer-events: none;
  z-index: 5;
}
.topic.shape-circle { border-radius: 50%; }
.topic.shape-circle::before { display: none; }
.topic.shape-plain { background: transparent; box-shadow: none; }
.topic.shape-plain::before { display: none; }

.topic-content { position: relative; z-index: 2; flex: 1 1 auto; min-height: 0; padding: 26px 28px 24px 32px; width: 100%; overflow: hidden; }
.topic.shape-circle .topic-content { padding: 18% 15%; text-align: center; }
.topic.has-source .topic-content { padding-bottom: 42px; }
.topic.shape-circle.has-source .topic-content { padding-bottom: calc(18% + 24px); }
.topic-source {
  position: absolute;
  left: 32px; right: 28px; bottom: 8px;
  z-index: 3;
  font-size: 10px;
  line-height: 1.3;
  color: var(--ink-color);
  opacity: .58;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.topic-source::before { content: "Fuente: "; font-weight: 700; opacity: .8; }
.topic.shape-circle .topic-source { left: 15%; right: 15%; text-align: center; }
.topic.shape-plain .topic-source { left: 32px; right: 28px; }
.topic-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.topic h2 {
  margin: 0 0 12px;
  font-size: calc(var(--tsize) * 1.45px);
  line-height: 1.12;
  letter-spacing: -.6px;
  color: var(--ink-color);
}
.topic-subtitle {
  margin: -4px 0 12px;
  font-size: calc(var(--tsize) * 1.08px);
  font-weight: 650;
  line-height: 1.32;
  color: var(--ink-color);
  opacity: .94;
  text-decoration: underline;
  text-decoration-thickness: 1.8px;
  text-underline-offset: 4px;
}
.topic-body { font-size: calc(var(--tsize) * 1px); line-height: 1.48; color: var(--ink-color); opacity: .88; }
.topic-body p { margin: 0 0 7px; }
.topic-body p.bullet { position: relative; padding-left: 16px; }
.topic-body p.bullet::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.topic-bg-img {
  position: absolute;
  left: -30%;
  top: -30%;
  width: 160%;
  height: 160%;
  object-fit: cover;
  opacity: var(--bgopacity, 1);
  transform: translate(var(--bgx, 0%), var(--bgy, 0%)) scale(var(--bgzoom, 1));
  transform-origin: center;
  pointer-events: none;
  z-index: 0;
}
.topic-bg-scrim {
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background: rgba(0, 0, 0, var(--bgdim, 0));
}
.topic-image-wrap {
  position: absolute;
  left: var(--imgx, 0%);
  top: var(--imgy, 0%);
  width: var(--imgw, 100%);
  height: var(--imgsize, 32%);
  z-index: 2;
  cursor: move;
}
.topic-image-wrap.selected { outline: 2px solid var(--accent); outline-offset: -1px; z-index: 4; }
.topic-image {
  width: 100%;
  height: 100%;
  object-fit: var(--imgfit, cover);
  object-position: center;
  display: block;
  background: rgba(0,0,0,.05);
  pointer-events: none;
}
.topic-image.fit-contain { background: transparent; }
.img-handle {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--accent);
  box-shadow: 0 1px 4px rgba(0,0,0,.28);
  z-index: 5;
}
.img-handle.dir-nw { left: -6px; top: -6px; cursor: nwse-resize; }
.img-handle.dir-n  { left: calc(50% - 5.5px); top: -6px; cursor: ns-resize; }
.img-handle.dir-ne { right: -6px; top: -6px; cursor: nesw-resize; }
.img-handle.dir-e  { right: -6px; top: calc(50% - 5.5px); cursor: ew-resize; }
.img-handle.dir-se { right: -6px; bottom: -6px; cursor: nwse-resize; }
.img-handle.dir-s  { left: calc(50% - 5.5px); bottom: -6px; cursor: ns-resize; }
.img-handle.dir-sw { left: -6px; bottom: -6px; cursor: nesw-resize; }
.img-handle.dir-w  { left: -6px; top: calc(50% - 5.5px); cursor: ew-resize; }
body.presenting .topic-image-wrap { cursor: pointer; }
body.presenting .topic-image-wrap.selected { outline: none; }
body.presenting .img-handle { display: none; }

/* Figuras simples dentro de una tarjeta */
.topic-shape {
  position: absolute;
  z-index: 3;
  cursor: move;
}
.topic-shape .shape-visual {
  width: 100%; height: 100%;
  background: var(--shape-color, #e4574e);
}
.topic-shape.selected { outline: 2px solid #fff; box-shadow: 0 0 0 4px var(--accent); }
.topic-shape .shape-handle {
  position: absolute; right: -9px; bottom: -9px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  cursor: nwse-resize;
}
.shape-circle .shape-visual { border-radius: 50%; }
.shape-triangle .shape-visual { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.shape-arrow-right .shape-visual { clip-path: polygon(0 34%, 55% 34%, 55% 8%, 100% 50%, 55% 92%, 55% 66%, 0 66%); }
.shape-arrow-left .shape-visual { clip-path: polygon(100% 34%, 45% 34%, 45% 8%, 0 50%, 45% 92%, 45% 66%, 100% 66%); }
.shape-arrow-up .shape-visual { clip-path: polygon(50% 0, 100% 55%, 66% 55%, 66% 100%, 34% 100%, 34% 55%, 0 55%); }
.shape-arrow-down .shape-visual { clip-path: polygon(50% 100%, 0 45%, 34% 45%, 34% 0, 66% 0, 66% 45%, 100% 45%); }
body.presenting .topic-shape { cursor: pointer; }

.resize-handle {
  position: absolute;
  right: -7px; bottom: -7px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
  cursor: nwse-resize;
  opacity: 0;
}
.topic:hover .resize-handle, .topic.selected .resize-handle { opacity: 1; }

/* ---------- Inspector ---------- */
.inspector {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #fff;
  border-left: 1px solid var(--line);
  z-index: 5;
}
.inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px 14px;
  border-bottom: 1px solid var(--line);
}
.inspector-head h2 { margin: 0; font-size: 15px; }
.pill {
  background: #eeece7;
  border-radius: 20px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.inspector-body { flex: 1 1 auto; min-height: 0; padding: 0 18px 18px; overflow-y: auto; overscroll-behavior: contain; }

/* Acordeón del inspector */
.acc { border-bottom: 1px solid var(--line); }
.acc-head {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 14px 0;
  border: 0; background: transparent;
  font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  color: #4a4d58; text-align: left;
}
.acc-head:hover { color: var(--accent); }
.acc-head .acc-title { flex: 1; }
.acc-head .acc-arrow { font-size: 12px; transition: transform .18s ease; color: var(--muted); }
.acc.open .acc-head { color: var(--accent); }
.acc.open .acc-head .acc-arrow { transform: rotate(180deg); }
.acc-panel { display: none; padding: 0 0 16px; }
.acc.open .acc-panel { display: block; }
.acc .pill { text-transform: none; letter-spacing: 0; }

.image-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.image-item {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 9px; padding: 5px;
  background: #fcfbf9; cursor: pointer;
}
.image-item:hover { border-color: var(--accent); }
.image-item.selected { border-color: var(--accent); background: var(--accent-soft); }
.image-item img { width: 42px; height: 42px; object-fit: cover; border-radius: 6px; background: #eee; }
.image-item .image-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.image-item .image-del { border: 0; background: transparent; color: var(--muted); font-size: 17px; padding: 2px 6px; }
.image-item .image-del:hover { color: #c0392b; }
.image-empty { color: var(--muted); font-size: 12px; margin: 0 0 10px; }
.field { margin-bottom: 17px; min-width: 0; }
.field input[type="text"], .field textarea, .field select, .field input[type="number"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 10px;
  background: #fcfbf9;
}
.field textarea { resize: vertical; line-height: 1.45; }
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }
.field input[type="color"] {
  width: 100%;
  height: 36px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fcfbf9;
}
.field input[type="range"] { width: 100%; accent-color: var(--accent); }
.size-pair { display: flex; align-items: center; gap: 4px; }
.size-pair input { min-width: 0; }
.size-pair span { color: var(--muted); }
.image-row { display: flex; gap: 7px; }
.image-row .tool-btn { flex: 1; padding: 8px 6px; font-size: 12px; }
.image-preview { margin-top: 9px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.image-preview img { display: block; width: 100%; height: 90px; object-fit: cover; }
.inspector-actions { display: flex; flex-wrap: wrap; gap: 7px; border-top: 1px solid var(--line); padding-top: 16px; }
.inspector-actions .tool-btn { flex: 1; padding: 9px 6px; font-size: 12px; }
.inspector-empty {
  margin: auto 24px;
  text-align: center;
  color: var(--muted);
  line-height: 1.5;
}
.inspector-empty p { font-weight: 600; color: #555863; }
.inspector-empty small { font-size: 12px; }
.empty-illustration { display: flex; justify-content: center; gap: 5px; margin-bottom: 16px; }
.empty-illustration i { width: 14px; height: 14px; border: 2px solid #d8d5ce; border-radius: 50%; }
.empty-illustration i:nth-child(2) { width: 22px; height: 22px; }
.empty-illustration i:nth-child(3) { width: 30px; height: 30px; }

/* ---------- Modo presentación ---------- */
/* Con sidebar e inspector en display:none, .main es el único hijo del grid:
   usar una sola columna evita que caiga en una columna de ancho 0. */
body.presenting .app { grid-template-columns: minmax(0, 1fr); }
body.presenting .sidebar,
body.presenting .inspector,
body.presenting .toolbar,
body.presenting .canvas-chrome { display: none; }
body.presenting .stage { background: #16171c; }
body.presenting .grid { opacity: .22; }
body.presenting .topic { cursor: grab; }
body.presenting .stage.panning .topic { cursor: grabbing; }
body.presenting .stage-badge { display: none; }
body.presenting .resize-handle { display: none; }

.present-ui { position: fixed; inset: 0; pointer-events: none; z-index: 20; }
.present-top { display: flex; align-items: center; gap: 16px; padding: 20px 26px; }
.present-brand { display: flex; align-items: center; gap: 6px; color: #fff; font-weight: 700; }
.present-counter { margin-left: auto; color: rgba(255,255,255,.65); font-variant-numeric: tabular-nums; }
.present-exit {
  pointer-events: auto;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.1);
  color: #fff;
  border-radius: 9px;
  padding: 7px 11px;
}
.present-exit kbd { font: inherit; font-size: 11px; opacity: .6; }
.present-bottom {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: auto;
}
.present-nav {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 18px;
}
.present-nav:hover { background: rgba(255,255,255,.2); }
.progress { width: min(42vw, 420px); height: 4px; border-radius: 4px; background: rgba(255,255,255,.18); overflow: hidden; }
#progressFill { height: 100%; width: 0; background: var(--accent); transition: width .5s ease; }
.present-tip { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.35); font-size: 11px; }

/* Encabezado y pie del proyecto: ambos fijos durante todo el modo Presentar */
.present-header {
  position: absolute;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: min(86vw, 900px);
  pointer-events: none;
  z-index: 21;
}
.present-header-img {
  width: var(--hsize, 36%);
  max-width: 180px;
  max-height: 96px;
  flex: 0 0 auto;
  object-fit: var(--hfit, contain);
  opacity: var(--hopacity, 1);
  transform: translate(var(--hx, 0%), var(--hy, 0%));
  border-radius: 12px;
}
.present-header-title {
  margin: 0;
  color: #fff;
  font-family: var(--htfont, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: min(var(--htsize, 44px), 7vw);
  line-height: 1.1;
  letter-spacing: -.8px;
  text-shadow: 0 2px 18px rgba(0,0,0,.6);
}
/* Al navegar tarjetas, el encabezado se compacta para no cubrir el contenido */
body.present-slide .present-header {
  top: 10px;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 12px;
  background: rgba(0,0,0,.28);
}
body.present-slide .present-header-img { max-height: 42px; max-width: 90px; }
body.present-slide .present-header-title {
  font-size: min(var(--htsize, 44px), 26px);
  letter-spacing: 0;
}

.present-footer {
  position: absolute;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(86vw, 900px);
  color: rgba(255,255,255,.78);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  text-shadow: 0 1px 10px rgba(0,0,0,.55);
  pointer-events: none;
  z-index: 21;
}
@media (max-width: 700px) {
  .present-header { top: 66px; flex-direction: column; gap: 8px; }
  .present-footer { bottom: 80px; font-size: 12px; }
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #20222a;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 50;
  font-size: 13px;
}

@media (max-width: 1180px) {
  .app { grid-template-columns: 224px minmax(0,1fr) 260px; }
  .hint { display: none; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 200px minmax(0,1fr); }
  .inspector { display: none; }
}

/* ---------- Añadidos: biblioteca, acceso y controles ---------- */
.library-btn {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 600;
}
.library-btn:hover { border-color: var(--teal); color: var(--teal); }
.inline-pair { display: flex; gap: 7px; align-items: stretch; }
.inline-pair select { flex: 1; min-width: 0; }
.inline-pair .tool-btn { padding: 8px 9px; white-space: nowrap; font-size: 12px; }
.image-controls { background: #f8f7f4; border: 1px solid var(--line); border-radius: 9px; padding: 10px; }
.image-controls label { margin-bottom: 6px; }
.image-controls select { margin-top: 8px; }
#bgApplyAll { width: 100%; margin-top: 12px; }
.field-hint { display: block; color: var(--muted); font-size: 11px; line-height: 1.4; margin-top: 8px; }
.shape-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.shape-grid .tool-btn { padding: 8px 6px; font-size: 12px; }
.shape-grid .tool-btn:hover { border-color: var(--accent); color: var(--accent); }
#shapeControls { margin-top: 10px; }
#shapeControls input[type="color"] { width: 100%; height: 38px; padding: 3px; }
#shapeControls .tool-btn { margin-top: 10px; width: 100%; }
.toast button {
  margin-left: 12px;
  border: 1px solid rgba(255,255,255,.4);
  background: transparent;
  color: #fff;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
}

/* Acceso local */
.auth-overlay, .modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(24, 26, 32, .62);
  backdrop-filter: blur(4px);
}
.auth-card, .library-card {
  width: min(430px, 100%);
  max-height: min(90vh, 820px);
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
  padding: 30px;
}
.auth-brand { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.auth-card h1 { font-size: 21px; margin: 20px 0 6px; letter-spacing: -.4px; }
.auth-sub { color: var(--muted); margin: 0 0 22px; line-height: 1.45; }
.auth-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.auth-tab {
  border: 0; background: transparent; padding: 9px 12px;
  font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent;
}
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.google-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 650;
  transition: border-color .15s ease, background .15s ease;
}
.google-auth-btn:hover { border-color: #c5c1b8; background: #faf9f6; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 4px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
#authForm label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
#authForm input {
  width: 100%; border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 11px; background: #fcfbf9;
}
#authForm .primary-btn { margin-top: 22px; }
.auth-error { background: var(--accent-soft); color: #9c2f26; border-radius: 8px; padding: 9px 11px; font-size: 13px; }
.auth-note { color: #999ba4; font-size: 11px; line-height: 1.5; margin: 18px 0 0; }

/* Biblioteca */
.library-card { width: min(760px, 100%); padding: 26px; }
.library-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.library-head h2 { margin: 0; font-size: 20px; }
.library-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.library-head-actions { display: flex; gap: 8px; }
.library-card > .primary-btn { width: auto; padding: 10px 16px; margin-bottom: 18px; }
.lib-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.lib-item { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fcfbf9; }
.lib-item.current { border-color: var(--accent); background: var(--accent-soft); }
.lib-item h3 { margin: 0 0 4px; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-item p { margin: 0 0 12px; color: var(--muted); font-size: 11px; }
.lib-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.lib-actions button { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 6px 9px; font-size: 12px; }
.lib-actions button:hover { border-color: var(--accent); color: var(--accent); }
.lib-actions .danger:hover { border-color: #c0392b; color: #c0392b; }
.library-note { color: #9a9ca6; font-size: 11px; line-height: 1.5; margin: 20px 0 0; }

/* ---------- Guardar, cierre de sesión y diálogo de duplicados ---------- */
.save-btn {
  border: 0;
  border-radius: 9px;
  padding: 7px 14px;
  background: var(--teal);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(31, 138, 138, .22);
}
.save-btn:hover { filter: brightness(.94); }
.auth-home {
  display: block;
  margin: 16px auto 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-home:hover { color: var(--accent); }
.dialog-card {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
}
.dialog-card h2 { margin: 0 0 10px; font-size: 19px; letter-spacing: -.3px; }
.dialog-card p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 13px; }
.dialog-card p b { color: var(--ink); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.compact-modal-overlay { background: rgba(24, 26, 32, .34); cursor: pointer; }
.compact-dialog-card {
  width: min(360px, 92%);
  padding: 22px 24px 18px;
  text-align: center;
  cursor: default;
}
.compact-modal-icon {
  width: 38px;
  height: 38px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 19px;
}
.compact-modal-msg {
  margin: 0 !important;
  color: var(--ink) !important;
  font-size: 14px !important;
  font-weight: 650;
  line-height: 1.45 !important;
}
.compact-modal-bar {
  margin-top: 16px;
  height: 3px;
  border-radius: 3px;
  background: #eeece7;
  overflow: hidden;
}
.compact-modal-bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform-origin: left center;
}
@keyframes modalCountdown5s {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}
.compact-modal-bar span.running { animation: modalCountdown5s 5s linear forwards; }

/* Modal PDF con IA */
.pdf-ai-card { width: min(510px, 95%); text-align: left; }
.pdf-ai-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.pdf-ai-badge {
  display: inline-block;
  margin-bottom: 5px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--teal);
  background: #e6f4f2;
  padding: 3px 8px;
  border-radius: 20px;
}
.pdf-ai-desc { margin: 0 0 16px !important; }
.pdf-dropzone {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  background: #fcfbf9;
}
.pdf-dropzone.dragover { border-color: var(--teal); background: #eef9f8; }
.pdf-file-name {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pdf-file-name.ready { color: var(--ink); font-weight: 600; }
.pdf-illust-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #faf9f6;
  cursor: pointer;
}
.pdf-illust-option input { margin-top: 3px; accent-color: var(--teal); }
.pdf-illust-option strong { display: block; font-size: 13px; color: var(--ink); margin-bottom: 3px; }
.pdf-illust-option small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.42; }
.pdf-ai-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #eef9f8;
  color: #135c5c;
  font-size: 12.5px;
  font-weight: 600;
}
.pdf-ai-status.error { background: var(--accent-soft); color: #9c2f26; }
.pdf-spinner {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: pdfSpin .75s linear infinite;
}
.pdf-ai-status.error .pdf-spinner { display: none; }
@keyframes pdfSpin { to { transform: rotate(360deg); } }

/* ---------- Landing pública ---------- */
.landing {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
}
.landing-top {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255,255,255,.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.landing-brand { gap: 8px; }
.landing-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.landing-link, .landing-ghost, .landing-login {
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.landing-link { color: var(--muted); }
.landing-link:hover { color: var(--ink); background: var(--accent-soft); }
.landing-ghost { border: 1px solid var(--line); background: #fff; }
.landing-ghost:hover { border-color: var(--accent); color: var(--accent); }
.landing-login { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(228,87,78,.25); }
.landing-login span { margin-left: 5px; }
.landing-login:hover { filter: brightness(.96); }
.landing-scroll { flex: 1; min-height: 0; overflow-y: auto; scroll-behavior: smooth; }
.landing section { position: relative; padding: clamp(40px, 7vw, 88px) clamp(18px, 6vw, 88px); }
.landing-kicker {
  display: inline-block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  margin-bottom: 14px;
}
.landing h1, .landing h2, .landing h3 { letter-spacing: -.9px; }
.landing-cta {
  border: 0;
  border-radius: 11px;
  padding: 13px 20px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(228,87,78,.24);
}
.landing-cta span { margin-left: 8px; }
.landing-cta:hover { filter: brightness(.96); }
.landing-cta.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.landing-cta.ghost:hover { border-color: var(--accent); color: var(--accent); }

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  min-height: clamp(520px, 78vh, 760px);
  overflow: hidden;
}
.landing-hero::before {
  content: '';
  position: absolute;
  width: 560px; height: 560px;
  right: -160px; top: -180px;
  background: radial-gradient(circle, rgba(228,87,78,.10), transparent 66%);
  pointer-events: none;
}
.hero-copy h1 { margin: 0 0 18px; font-size: clamp(36px, 5vw, 66px); line-height: 1.03; }
.hero-copy h1 em { color: var(--accent); font-style: normal; }
.hero-sub { margin: 0 0 28px; max-width: 540px; color: var(--muted); font-size: clamp(15px, 1.4vw, 18px); line-height: 1.6; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-note { margin: 22px 0 0; color: #a2a4ad; font-size: 12px; }
.hero-visual { position: relative; height: clamp(320px, 38vw, 480px); }
.hero-orbit {
  position: absolute;
  left: 50%; top: 50%;
  border: 1px dashed rgba(31,138,138,.35);
  border-radius: 50%;
  transform: translate(-50%,-50%);
}
.orbit-1 { width: 88%; height: 88%; }
.orbit-2 { width: 56%; height: 56%; border-color: rgba(228,87,78,.35); }
.hero-card {
  position: absolute;
  width: 190px;
  min-height: 120px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transform: rotate(-6deg);
}
.hero-card i { display: block; height: 7px; border-radius: 6px; background: var(--line); margin-bottom: 9px; }
.hero-card i:nth-child(2) { width: 72%; }
.hero-card i:nth-child(3) { width: 48%; }
.hero-card b { display: block; margin-top: 10px; font-size: 13px; }
.hero-card-a { left: 4%; top: 16%; }
.hero-card-b { right: 2%; top: 42%; transform: rotate(7deg); border-top: 4px solid var(--teal); }
.hero-card-c { left: 24%; bottom: 6%; transform: rotate(-2deg); border-top: 4px solid var(--accent); }
.hero-plus { position: absolute; color: var(--accent); font-size: 28px; font-weight: 300; }
.plus-1 { left: 48%; top: 30%; }
.plus-2 { right: 22%; bottom: 18%; color: var(--teal); }

.landing-section-head { max-width: 680px; margin: 0 auto 28px; text-align: center; }
.landing-section-head h2 { margin: 0 0 10px; font-size: clamp(25px, 3vw, 38px); }
.landing-section-head p { margin: 0; color: var(--muted); }
.landing-carousel-section { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lc-stage {
  position: relative;
  height: clamp(340px, 40vw, 470px);
  perspective: 1300px;
  perspective-origin: 50% 42%;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
}
.lc-stage.dragging { cursor: grabbing; }
.lc-ring { position: absolute; inset: 0; transform-style: preserve-3d; }
.lc-slide {
  position: absolute;
  left: 50%; top: 50%;
  width: min(330px, 62vw);
  min-height: 310px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 20px 50px rgba(32,34,42,.16);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transition: transform .55s cubic-bezier(.2,.8,.2,1), opacity .55s ease;
  will-change: transform;
}
.lc-slide h3 { margin: 16px 0 7px; font-size: 18px; }
.lc-slide p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.lc-num { font-size: 11px; font-weight: 800; letter-spacing: 1.5px; color: var(--accent); }
.lc-visual {
  position: relative;
  height: 118px;
  margin-top: 12px;
  border-radius: 11px;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}
.visual-zoom .mini-card {
  position: absolute; top: 34px; padding: 10px 12px; border-radius: 8px;
  background: var(--paper); border: 1px solid var(--line); font-size: 11px; color: var(--muted);
}
.visual-zoom .mini-card:nth-child(1) { left: 10px; }
.visual-zoom .mini-card:nth-child(2) { left: 50%; transform: translateX(-50%); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.visual-zoom .mini-card:nth-child(3) { right: 10px; }
.visual-zoom .lens {
  position: absolute; right: 18px; top: 14px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 22px; font-weight: 300;
}
.visual-images .ph { position: absolute; border-radius: 8px; }
.ph-a { left: 12px; top: 16px; width: 52%; height: 82px; background: linear-gradient(135deg,#e4574e,#f5b09f); }
.ph-b { right: 12px; top: 30px; width: 32%; height: 60px; background: linear-gradient(135deg,#1f8a8a,#9fd6cf); }
.ph-c { right: 60px; top: 12px; width: 28px; height: 28px; background: #f2c96b; border-radius: 50% !important; }
.visual-theme { display: flex; align-items: center; justify-content: center; gap: 12px; }
.visual-theme .sw { width: 40px; height: 66px; border-radius: 8px; box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.sw.s1 { background: var(--accent); } .sw.s2 { background: var(--teal); }
.sw.s3 { background: #20222a; } .sw.s4 { background: #f2c96b; }
.visual-present { display: grid; place-items: center; }
.visual-present .screen { display: flex; gap: 6px; padding: 12px; border-radius: 8px; background: #20222a; }
.visual-present .screen i { display: block; width: 34px; height: 60px; border-radius: 4px; background: #4a4d59; }
.visual-present .screen i:nth-child(2) { background: var(--accent); }
.visual-present .play { position: absolute; font-size: 26px; color: #fff; }
.visual-save { display: flex; align-items: center; justify-content: center; gap: 14px; }
.visual-save .disk { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: #fff; font-size: 26px; }
.visual-save .file { padding: 9px 12px; border: 1px dashed var(--teal); border-radius: 8px; color: var(--teal); font-size: 12px; }
.lc-nav {
  position: absolute; top: 50%; z-index: 200;
  width: 44px; height: 44px; margin-top: -22px;
  border: 1px solid var(--line); border-radius: 50%;
  background: #fff; color: var(--ink); font-size: 27px; line-height: 1;
  box-shadow: var(--shadow); cursor: pointer;
}
.lc-nav:hover { border-color: var(--accent); color: var(--accent); }
.lc-nav.prev { left: clamp(8px, 3vw, 40px); }
.lc-nav.next { right: clamp(8px, 3vw, 40px); }
.lc-dots { display: flex; justify-content: center; gap: 9px; margin-top: 12px; }
.lc-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: #d8d2c8; cursor: pointer; }
.lc-dots button.active { width: 26px; border-radius: 8px; background: var(--accent); }
.lc-hint { margin: 12px 0 0; text-align: center; color: #a2a4ad; font-size: 11px; }

.landing-demo {
  display: grid;
  grid-template-columns: minmax(240px, .75fr) minmax(0, 1.25fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
.demo-copy h2 { margin: 0 0 14px; font-size: clamp(26px, 3vw, 40px); }
.demo-copy p { margin: 0 0 24px; color: var(--muted); line-height: 1.65; }
.demo-wrap { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.demo-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9);
}
.demo-badge { color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.demo-tools { display: flex; align-items: center; gap: 6px; }
.demo-tools button {
  border: 1px solid var(--line); background: #fff; border-radius: 7px;
  padding: 5px 8px; font-size: 12px; cursor: pointer;
}
.demo-tools button:hover { border-color: var(--accent); color: var(--accent); }
.demo-tools span { min-width: 44px; text-align: center; color: var(--muted); font-size: 11px; }
.demo-stage { position: relative; height: 340px; overflow: hidden; background: #f7f4ee; touch-action: none; cursor: grab; }
.demo-stage:active { cursor: grabbing; }
.demo-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(32,34,42,.14) 1px, transparent 1.2px);
  background-size: 26px 26px;
}
.demo-world { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.demo-card {
  position: absolute;
  width: 150px;
  padding: 12px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(32,34,42,.12);
  cursor: grab;
  user-select: none;
}
.demo-card b { display: block; font-size: 12px; margin-bottom: 5px; }
.demo-card span { color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.demo-card.dragging { cursor: grabbing; box-shadow: var(--shadow); }
.dc-1 { left: 8%; top: 18%; transform: rotate(-4deg); }
.dc-2 { left: 42%; top: 12%; border-top-color: var(--teal); transform: rotate(3deg); }
.dc-3 { left: 22%; top: 54%; border-top-color: #f2c96b; transform: rotate(-2deg); }
.dc-4 { right: 6%; bottom: 12%; border-top-color: #20222a; transform: rotate(5deg); }
.demo-hint { margin: 0; padding: 8px 14px; color: #a2a4ad; font-size: 11px; text-align: center; }

.landing-pricing { background: #fff; border-top: 1px solid var(--line); text-align: center; }
.price-card { max-width: 600px; margin: 0 auto; }
.price-card h2 { margin: 0 0 22px; font-size: clamp(26px, 3vw, 38px); }
.price { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin-bottom: 22px; }
.price-amount { color: var(--ink); font-size: clamp(46px, 7vw, 76px); font-weight: 800; letter-spacing: -3px; }
.price-period { color: var(--muted); font-size: 16px; }
.price-list { list-style: none; padding: 0; margin: 0 0 28px; text-align: left; display: grid; gap: 10px; }
.price-list li { position: relative; padding-left: 26px; color: var(--muted); font-size: 14px; }
.price-list li::before {
  content: '✓'; position: absolute; left: 0; top: -1px;
  width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); display: grid; place-items: center; font-size: 11px; font-weight: 800;
}
.landing-footer {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 16px clamp(18px, 4vw, 56px);
  background: #20222a; color: rgba(255,255,255,.72); font-size: 12px;
}
.landing-footer .brand-mark i:nth-child(3) { background: var(--accent); }
.landing-footer strong { color: #fff; }
.landing-footer span:last-child { margin-left: auto; }

@media (max-width: 900px) {
  .landing-hero, .landing-demo { grid-template-columns: 1fr; }
  .hero-visual { min-height: 320px; }
  .landing-nav .landing-link { display: none; }
  .lc-slide { width: min(300px, 78vw); }
}
@media (max-width: 560px) {
  .landing-top { flex-wrap: wrap; }
  .landing-nav { width: 100%; justify-content: space-between; }
  .landing-footer span:last-child { margin-left: 0; width: 100%; }
}
