:root {
  --cream: #FBF5F0;
  --paper: #FFFDFB;
  --blush: #F8DDE4;
  --pink: #EBA9BC;
  --pink-deep: #C8718B;
  --gold: #C49A3A;
  --gold-soft: #E9D08E;
  --ink: #1A1414;
  --muted: #7C6A6C;
  --line: #EEDFD8;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(120, 70, 60, .10);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: 'Outfit', system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(120% 60% at 100% 0%, #FBE3EA 0%, transparent 60%), var(--cream);
  min-height: 100dvh;
}
body.tracing { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
.muted { color: var(--muted); }
.app { max-width: 520px; margin: 0 auto; padding: 0 16px 110px; }

/* Header */
.top { display: flex; align-items: center; gap: 8px; padding: 14px 0 10px; padding-top: max(14px, env(safe-area-inset-top)); }
.logo { width: 54px; height: 54px; object-fit: contain; flex: none; }
.brand { flex: 1; min-width: 0; }
.brand h1 { font-family: 'Rye', serif; font-weight: 400; font-size: clamp(19px, 5.4vw, 23px); white-space: nowrap; margin: 0; line-height: 1; letter-spacing: .5px; }
.brand p { margin: 3px 0 0; font-size: 11px; letter-spacing: 2px; white-space: nowrap; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.icon-btn {
  min-width: 38px; height: 38px; padding: 0 8px; border-radius: 12px;
  background: var(--paper); border: 1px solid var(--line); font-weight: 600; font-size: 14px;
  display: inline-grid; place-items: center;
}
.icon-btn:active { transform: scale(.96); }

/* Escenario */
.stage-wrap { position: relative; margin-top: 6px; }
.stage {
  height: min(46dvh, 420px); min-height: 280px; border-radius: 24px; overflow: hidden;
  display: grid; place-items: center; touch-action: none; user-select: none;
  background-color: #fff;
  background-image:
    linear-gradient(to right, #F2E9E4 1px, transparent 1px),
    linear-gradient(to bottom, #F2E9E4 1px, transparent 1px);
  background-position: center center;
  border: 1.5px solid var(--gold-soft);
  box-shadow: var(--shadow), inset 0 0 0 6px #fff;
}
.stage svg { display: block; flex: none; }
.stage-chip {
  position: absolute; left: 14px; top: 14px; pointer-events: none;
  background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 11px; font-size: 12px; font-weight: 600; color: var(--muted);
}
.lock-btn {
  position: absolute; right: 12px; top: 12px; display: inline-flex; gap: 6px; align-items: center;
  background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 11px; font-size: 12px; font-weight: 600; color: var(--muted);
}
.lock-btn.on { background: var(--ink); color: var(--gold-soft); border-color: var(--ink); }
.lock-btn.pulse { animation: pulse .5s; }
@keyframes pulse { 30% { transform: scale(1.12); } }
.stage-hint { text-align: center; font-size: 12px; color: var(--muted); margin: 8px 0 0; }

/* Tabs */
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 4px; margin: 14px 0 12px; }
.tab { padding: 10px 0; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); }
.tab.active { background: var(--blush); color: var(--ink); }
.panel { display: none; }
.panel.active { display: block; animation: fade .2s; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.panel h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; margin: 16px 0 8px; font-weight: 700; }
.panel h3:first-child { margin-top: 4px; }
.panel h3 small { text-transform: none; letter-spacing: 0; font-weight: 500; }

/* Diseños */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile {
  position: relative; aspect-ratio: 3 / 4; border-radius: 16px; background: var(--paper);
  border: 1.5px solid var(--line); display: grid; place-items: center; overflow: hidden; padding: 10px 10px 26px;
}
.tile svg, .tile img { width: 100%; height: 100%; object-fit: contain; }
.tile.sel { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(196, 154, 58, .22); }
.tile.locked svg { opacity: .35; }
.tile .name { position: absolute; bottom: 7px; left: 0; right: 0; font-size: 12px; font-weight: 600; text-align: center; }
.tile .badge { position: absolute; top: 7px; left: 7px; font-size: 10px; font-weight: 700; background: var(--ink); color: var(--gold-soft); padding: 2px 7px; border-radius: 99px; }
.tile .del { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 50%; background: rgba(26, 20, 20, .75); color: #fff; font-size: 15px; line-height: 21px; }
.tile.upload { background: linear-gradient(160deg, var(--blush), #fff); border-style: dashed; border-color: var(--pink); gap: 4px; align-content: center; padding: 10px; color: var(--pink-deep); font-weight: 600; font-size: 13px; }
.tile.upload .plus { font-size: 30px; line-height: 1; }

/* Uña */
.shapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.shape { background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; padding: 8px 4px 6px; display: grid; justify-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.shape svg { width: 26px; height: 38px; }
.shape.active { border-color: var(--gold); color: var(--ink); background: #FFF8EA; }
.sizes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.size { background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: 7px 0 5px; display: grid; line-height: 1.1; }
.size b { font-size: 17px; }
.size small { font-size: 10px; color: var(--muted); }
.size.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.size.active small { color: var(--gold-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 16px; border-radius: 999px; background: var(--paper); border: 1.5px solid var(--line); font-weight: 600; font-size: 14px; color: var(--muted); }
.chip.active { background: var(--blush); border-color: var(--pink); color: var(--ink); }

/* Sliders y toggles */
.slider { display: block; margin: 14px 0 4px; }
.slider span { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.slider em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--pink-deep); height: 28px; }
.toggles { display: grid; gap: 8px; margin: 16px 0; }
.toggle { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 14px; font-weight: 500; }
.toggle input { width: 20px; height: 20px; accent-color: var(--pink-deep); }
.row { display: flex; gap: 10px; margin-top: 14px; }
.row .btn { flex: 1; }

/* Botones */
.btn { padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 15px; }
.btn.primary { background: linear-gradient(135deg, #2A1F1F, var(--ink)); color: #fff; box-shadow: 0 6px 18px rgba(26, 20, 20, .25); }
.btn.primary span { color: #fff; }
.btn.ghost { background: var(--paper); border: 1.5px solid var(--line); }
.btn.big { width: 100%; padding: 16px; font-size: 17px; }
.btn:active { transform: scale(.98); }
.link { text-decoration: underline; color: var(--muted); font-size: 14px; padding: 8px; }
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--cream) 70%, transparent);
}
.cta-bar .btn { max-width: 488px; margin: 0 auto; display: block; }
.cta-bar .btn::first-letter { color: var(--gold-soft); }

/* Modo calco */
.trace {
  position: fixed; inset: 0; z-index: 50; background: #fff; touch-action: none; user-select: none; -webkit-user-select: none;
  display: grid; grid-template-rows: auto 1fr auto;
}
.trace[hidden] { display: none; }
.trace-top { display: flex; justify-content: space-between; gap: 10px; padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); font-size: 11px; color: #b5b5b5; }
.trace-canvas { display: grid; place-items: center; overflow: hidden; }
.trace-bottom { display: flex; align-items: center; gap: 12px; padding: 14px 16px; padding-bottom: max(14px, env(safe-area-inset-bottom)); color: #b5b5b5; font-size: 12px; }
.trace-bottom p { margin: 0; }
.unlock { position: relative; width: 52px; height: 52px; border-radius: 50%; background: #f5f5f5; color: #999; display: grid; place-items: center; flex: none; }
.unlock .ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.unlock .ring circle { fill: none; stroke: var(--pink-deep); stroke-width: 3; stroke-dasharray: 126; stroke-dashoffset: 126; }
.unlock.holding .ring circle { stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s linear; }

/* Hojas modales */
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(26, 20, 20, .45); display: grid; align-items: end; justify-items: center; overflow-y: auto; overflow-x: hidden; }
.sheet[hidden] { display: none; }
.sheet-card {
  width: 100%; max-width: 520px; background: var(--cream); border-radius: 26px 26px 0 0; padding: 22px 18px;
  padding-bottom: max(22px, env(safe-area-inset-bottom)); animation: up .25s ease-out;
}
.sheet-card.center { text-align: center; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet-card h2 { font-family: 'Rye', serif; font-weight: 400; margin: 0 0 6px; font-size: 22px; }
.sheet-card p { margin: 0 0 12px; font-size: 14px; line-height: 1.45; }
.card-area { display: grid; place-items: center; padding: 8px 0; overflow: hidden; }
.card-rect {
  border: 2px dashed var(--gold); background: linear-gradient(160deg, #FFF8EA, var(--blush));
  display: grid; place-items: center; color: var(--gold); font-weight: 700; letter-spacing: 1px; font-size: 13px; flex: none;
}
.ruler-wrap { display: grid; justify-items: center; gap: 4px; margin: 8px 0; color: var(--muted); }
.ruler {
  height: 16px; border-left: 1.5px solid var(--ink); border-right: 1.5px solid var(--ink);
  background-image:
    linear-gradient(to right, var(--ink) 1px, transparent 1px),
    linear-gradient(to right, var(--ink) 1.5px, transparent 1.5px),
    linear-gradient(to right, var(--ink) 1.5px, transparent 1.5px);
  background-repeat: repeat-x; background-position: 0 0;
}
.calib-ctl { display: flex; align-items: center; gap: 10px; }
.calib-ctl input { flex: 1; }
.photo-preview { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; place-items: center; height: 240px; margin-bottom: 12px; }
.photo-preview canvas { max-width: 100%; max-height: 214px; width: auto; height: auto; }
.pro-logo { width: 120px; height: 120px; object-fit: contain; margin: 0 auto 8px; display: block; }
.price { font-size: 22px !important; font-weight: 700; color: var(--pink-deep); }
.sheet-card.center .btn { margin-top: 8px; width: 100%; }

.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); opacity: 0; z-index: 80;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; transition: .25s; pointer-events: none;
  max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 560px) { .sizes { grid-template-columns: repeat(12, 1fr); } }

/* Texto */
.small { font-size: 12px; margin: 8px 0 10px; }
.text-add { display: flex; gap: 8px; }
.text-add input, .text-edit-in {
  flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
}
.text-add input:focus, .text-edit-in:focus { outline: none; border-color: var(--pink); }
.text-edit-in { width: 100%; margin-top: 12px; }
.fonts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.font { background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 4px; font-size: 20px; line-height: 1.2; white-space: nowrap; overflow: hidden; }
.font.active { border-color: var(--gold); background: #FFF8EA; }

/* Ajustar a mi tip */
.fit-open { width: 100%; background: linear-gradient(135deg, #FFF8EA, var(--blush)); border: 1.5px solid var(--gold-soft); color: var(--ink); margin-bottom: 4px; }
.fit .trace-top { color: var(--pink-deep); font-size: 14px; justify-content: center; }
.fit-panel { background: var(--cream); border-radius: 22px 22px 0 0; padding: 14px 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(0, 0, 0, .06); }
.fit-panel p { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.fit-panel .slider { margin: 8px 0; }
.fit-panel .btn { margin-top: 6px; }

/* Categorías */
.cats { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 12px; padding: 2px 16px 4px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats .chip { flex: none; padding: 7px 14px; font-size: 13px; }
.tile.upload .badge { top: 7px; left: 7px; }

/* Favoritos */
.tile .fav {
  position: absolute; top: 5px; right: 5px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); border: 1px solid var(--line); color: var(--pink-deep);
  font-size: 16px; line-height: 26px; text-align: center;
}
.tile .fav.on { background: var(--blush); border-color: var(--pink); }
.tile .del { right: auto; left: 5px; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 28px 12px; font-size: 14px; }
.demo-note { color: var(--muted); font-size: 13px !important; margin: 10px 0 0 !important; }
.demo-note:empty { display: none; }

/* Cuenta */
#accountBtn { position: relative; }
#accountBtn .dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #3BB273; border: 2px solid var(--paper); }
.acc-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.acc-row b { overflow: hidden; text-overflow: ellipsis; }
#account .btn.big { margin-top: 10px; }
.install-row { width: 100%; margin-top: 14px; }
#account .link { display: block; margin: 8px auto 0; }
a.btn { text-align: center; text-decoration: none; color: inherit; }

/* Buscador, estilo de calco y diseños a color */
.search {
  width: 100%; font: inherit; font-size: 15px; padding: 11px 14px; border-radius: 14px; margin-bottom: 10px;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
}
.search:focus { outline: none; border-color: var(--pink); }
.style-bar { background: linear-gradient(160deg, #FFF8EA, var(--paper)); border: 1.5px solid var(--gold-soft); border-radius: 16px; padding: 12px; margin-bottom: 12px; }
.style-bar > b { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.style-bar .chip { padding: 7px 12px; font-size: 13px; }
.style-bar .slider { margin: 10px 0 0; }
.tile.color { padding: 6px 6px 26px; }
.tile.color img { border-radius: 10px; }
.tile.locked img { opacity: .45; }
.trace-ref {
  position: absolute; right: 12px; bottom: 84px; width: 22vw; max-width: 110px; border-radius: 14px;
  background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); pointer-events: none;
}
.trace { position: fixed; }
.tile.color .name { background: rgba(255, 253, 251, .92); bottom: 0; padding: 5px 4px 7px; }
.code-in { text-align: center; font-size: 26px !important; letter-spacing: 8px; font-weight: 700; }
.code-box .btn { margin-top: 10px; }
.acc-hello { font-size: 22px !important; font-weight: 700; margin: 6px 0 2px !important; }
.acc-email { color: var(--muted); font-size: 13px !important; margin: 0 0 12px !important; overflow: hidden; text-overflow: ellipsis; }
.acc-name { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.acc-name input { margin-top: 6px; }

/* Recordatorio diario */
.nudge {
  position: fixed; left: 12px; right: 12px; bottom: 92px; z-index: 40; max-width: 496px; margin: 0 auto;
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 14px 10px;
  background: linear-gradient(160deg, #FFF8EA, var(--blush)); border: 1.5px solid var(--pink); border-radius: 20px;
  box-shadow: 0 12px 32px rgba(120, 60, 70, .22); animation: up .35s ease-out;
}
.nudge-heart { font-size: 30px; animation: beat 1.2s ease-in-out infinite; }
.nudge-body b { display: block; font-size: 16px; }
.nudge-body p { margin: 4px 0 8px; font-size: 14px; line-height: 1.4; color: #4a3d3f; }
.nudge-actions { display: flex; align-items: center; gap: 8px; }
.nudge-actions .btn { padding: 9px 14px; font-size: 14px; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.18); } 30% { transform: scale(1); } 45% { transform: scale(1.12); } }
.hint-fav .tile .fav { animation: beat 1s ease-in-out 4; border-color: var(--pink-deep); }
.nudge[hidden] { display: none; }
.tile .badge.new { top: auto; bottom: 30px; left: 7px; background: var(--pink-deep); color: #fff; }

/* Barra para instalar la app */
.install-bar {
  display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 10px 10px 12px;
  background: linear-gradient(160deg, #FFF8EA, var(--blush)); border: 1.5px solid var(--gold-soft); border-radius: 16px;
}
.install-bar[hidden] { display: none; }
.ib-ico { font-size: 24px; }
.ib-txt { flex: 1; min-width: 0; line-height: 1.25; }
.ib-txt b { display: block; font-size: 14px; }
.ib-txt small { color: var(--muted); font-size: 12px; }
.install-bar .btn { padding: 9px 14px; font-size: 14px; flex: none; }
.ib-x { color: var(--muted); font-size: 16px; padding: 6px; }
.ih-steps { padding-left: 20px; margin: 8px 0 16px; }
.ih-steps li { margin-bottom: 10px; font-size: 15px; line-height: 1.45; }

/* No ofrecer "guardar imagen" al mantener presionado un diseño */
.tile img, .tile svg, .stage, .stage *, .trace, .trace *, .trace-ref, .photo-preview canvas {
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}
.tile img, .tile svg { pointer-events: none; } /* el toque lo recibe la tarjeta, no la imagen */

/* ---------- Sumi Crystals ---------- */
.tabs { grid-template-columns: repeat(5, 1fr); }
.tab { font-size: 12.5px; padding: 10px 0; white-space: nowrap; }
.cr-lock { background: linear-gradient(160deg, #F3ECFF, var(--blush)); border: 1.5px solid #C7A6EF; border-radius: 16px; padding: 14px; margin-bottom: 8px; }
.cr-lock[hidden] { display: none; }
.cr-lock b { display: block; font-size: 15px; }
.cr-lock .btn { margin-top: 4px; }
.cr-shapes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.cr-shape { background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: 6px 2px; display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); }
.cr-shape svg { width: 24px; height: 24px; }
.cr-shape.active { border-color: #9B6FD8; color: var(--ink); background: #F6F0FF; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--line); }
.swatch.active { box-shadow: 0 0 0 2.5px #9B6FD8; }
.cr-sel { background: #F6F0FF; border: 1.5px solid #C7A6EF; border-radius: 16px; padding: 12px; margin: 12px 0; }
.cr-sel[hidden] { display: none; }
.cr-sel > b { display: block; font-size: 14px; margin-bottom: 8px; }
.cr-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tool { background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 8px 4px; font-size: 13px; font-weight: 600; }
.tool.danger { color: #B3261E; }
.cr-xy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; }
.cr-xy label { font-size: 12px; font-weight: 600; color: var(--muted); }
.cr-xy input { width: 100%; margin-top: 3px; font: inherit; font-size: 15px; padding: 8px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; }
.cr-sel .toggle { margin-top: 4px; }
#crView { margin-top: 10px; }
.cr-mat { list-style: none; padding: 0; margin: 0; }
.cr-mat li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cr-mat li b { color: #7650B3; margin-right: 4px; }
.cr-mat li.total { font-weight: 700; border-bottom: 0; }
.cr-tile svg { width: 100%; height: 100%; }
.cr-set { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cr-set span { flex: 1; font-weight: 600; font-size: 14px; }
.cr-set .tool { padding: 6px 10px; }
#crPublish { width: 100%; margin-top: 14px; }

/* Planes Pro / Premium */
.plans { display: grid; gap: 10px; margin: 6px 0 4px; text-align: left; }
.plan-card { border: 1.5px solid var(--line); border-radius: 18px; padding: 14px; background: #fff; position: relative; }
.plan-card b { font-size: 17px; }
.plan-price { font-size: 20px !important; font-weight: 700; color: var(--pink-deep); margin: 2px 0 4px !important; }
.plan-txt { font-size: 13px !important; color: var(--muted); margin: 0 0 10px !important; }
.plan-card .btn { width: 100%; margin: 0 !important; }
.plan-card.premium { border-color: #9B6FD8; background: linear-gradient(170deg, #F6F0FF, #fff 60%); }
.plan-card.premium .plan-price { color: #7650B3; }
.plan-card.focus { box-shadow: 0 0 0 3px rgba(155, 111, 216, .35); }
.plan-tag { position: absolute; top: -10px; right: 14px; background: #7650B3; color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }

/* Ventana emergente para instalar */
.pop-icon { width: 76px; height: 76px; border-radius: 20px; display: block; margin: 0 auto 8px; box-shadow: 0 6px 18px rgba(120, 70, 60, .18); }
.pop-list { list-style: none; padding: 0; margin: 6px 0 14px; text-align: left; }
.pop-list li { padding: 7px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.pop-list li:last-child { border-bottom: 0; }
#installPop .link { display: block; margin: 8px auto 0; }

.cr-bg { margin: 2px 0 6px; background: #F6F0FF; border-color: #C7A6EF; font-weight: 600; }

/* ---------- Cotizador ---------- */
.tabs { display: flex; gap: 2px; padding: 3px; }
.tab { flex: 1 1 auto; min-width: 0; padding: 10px 3px; font-size: clamp(10.5px, 3.1vw, 12.5px); }
body.quote-mode .stage-wrap, body.quote-mode .cta-bar { display: none; }
body.quote-mode .tabs { margin-top: 4px; }
#panel-quote { padding-bottom: 40px; }
.q-brand { display: flex; align-items: center; gap: 14px; margin: 4px 0 12px; }
.q-logo { position: relative; flex: none; width: 76px; height: 76px; border-radius: 50%; border: 1.5px dashed var(--pink); background: var(--paper); display: grid; place-items: center; font-size: 26px; }
.q-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; background: #fff; }
.q-logo i { position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%; background: var(--pink-deep); color: #fff; font-style: normal; font-size: 13px; display: grid; place-items: center; }
.q-brand-txt { flex: 1; min-width: 0; }
.q-biz { width: 100%; font: inherit; font-size: 19px; font-weight: 700; border: 0; border-bottom: 1.5px solid var(--line); background: transparent; padding: 4px 0; color: var(--ink); }
.q-biz:focus { outline: none; border-color: var(--pink); }
.q-brand-txt .link { padding: 6px 0; color: var(--pink-deep); text-decoration: none; font-weight: 600; }
.q-prices { width: 100%; }
.q-sys { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; }
.q-opt { background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; padding: 9px 6px; display: grid; gap: 2px; text-align: center; }
.q-opt b { font-size: 13px; line-height: 1.15; }
.q-opt small { font-size: 12px; color: var(--muted); font-weight: 600; }
.q-opt.active { border-color: var(--pink-deep); background: var(--blush); }
.q-opt.add { border-style: dashed; color: var(--pink-deep); align-content: center; }
.q-sizes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.q-size { background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: 7px 0 5px; display: grid; line-height: 1.15; }
.q-size small { font-size: 10px; color: var(--muted); }
.q-size.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.q-size.active small { color: var(--gold-soft); }
.q-rows { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 2px 12px; }
.q-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.q-row:last-child { border-bottom: 0; }
.q-row > span { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; }
.q-row small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 1px; }
.q-tog input { width: 22px; height: 22px; accent-color: var(--pink-deep); }
.q-step { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; flex: none; }
.q-step button { width: 36px; height: 36px; font-size: 20px; color: var(--ink); }
.q-step b, .q-step input { width: 46px; text-align: center; font: inherit; font-weight: 700; font-size: 15px; border: 0; border-inline: 1.5px solid var(--line); height: 36px; line-height: 36px; background: #fff; color: var(--ink); padding: 0; }
.q-step input { -moz-appearance: textfield; }
.q-step input::-webkit-inner-spin-button { -webkit-appearance: none; }
.q-mini { color: var(--pink-deep); font-weight: 700; font-size: 12px; text-decoration: underline; padding: 0; }
.q-in { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); margin-bottom: 8px; resize: vertical; }
.q-in:focus { outline: none; border-color: var(--pink); }
.q-in[hidden] { display: none; }
.q-reset { display: block; margin: 0 auto; }
.q-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); background: rgba(255, 253, 251, .97); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(120, 70, 60, .08); }
.q-bar > div { flex: 1; min-width: 0; }
.q-bar small { display: block; font-size: 12px; color: var(--muted); }
.q-bar b { font-size: 26px; font-weight: 700; color: #7650B3; white-space: nowrap; }
.q-bar .btn { flex: none; }
@media (min-width: 560px) { .q-bar { left: 50%; right: auto; width: 520px; transform: translateX(-50%); border-radius: 18px 18px 0 0; } }
/* editor de precios */
.q-edit h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; margin: 18px 0 8px; }
.q-edit h3 small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.q-lbl { display: grid; gap: 6px; font-size: 13px; font-weight: 700; margin: 8px 0; }
.q-edit select { font: inherit; font-size: 15px; padding: 11px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); max-width: 100%; }
.qe-row { display: grid; grid-template-columns: 1fr 64px 64px 34px; gap: 6px; align-items: center; margin-bottom: 6px; }
.qe-row.two { grid-template-columns: 1fr 74px 34px; }
#qeEx .qe-row { grid-template-columns: 1fr 60px 84px 34px; }
.qe-row.fixed { grid-template-columns: 1fr 84px; font-size: 14px; font-weight: 600; }
.qe-row select { padding: 9px 4px; font-size: 13px; }
.qe-name, .qe-num { min-width: 0; width: 100%; font: inherit; font-size: 15px; padding: 9px 10px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); }
.qe-num { text-align: center; padding: 9px 4px; }
.qe-name:focus, .qe-num:focus { outline: none; border-color: var(--pink); }
.qe-del { height: 38px; border-radius: 10px; color: #B3261E; font-weight: 700; }
.qe-sizes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.qe-sizes label { display: grid; gap: 3px; text-align: center; font-size: 12px; }
.q-edit .link { color: var(--pink-deep); font-weight: 600; text-decoration: none; padding: 6px 0; }
.q-edit .btn.big { margin-top: 18px; }
.qe-cancel { display: block; margin: 6px auto 0; }
/* revisar cotización */
.q-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.q-head img { width: 56px; height: 56px; border-radius: 50%; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.q-head b { display: block; font-size: 17px; }
.q-head small { color: var(--muted); font-size: 12px; }
.q-review h2 { color: var(--pink-deep); }
.q-lines { list-style: none; padding: 0; margin: 8px 0; }
.q-lines li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.q-lines b { white-space: nowrap; }
.q-totalrow { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0 4px; }
.q-totalrow span { font-weight: 700; font-size: 17px; }
.q-totalrow b { font-size: 30px; color: #7650B3; }
.q-note { background: #F6F0FF; border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.q-review .btn.big { margin-top: 8px; }
.q-wa { background: linear-gradient(135deg, #25D366, #128C4A) !important; }
.q-review .link { display: block; margin: 8px auto 0; }

/* ds-allow-hardcode: styles.css usa px y colores directos en todo el archivo; se mantiene el mismo estilo */

/* ---------- Agenda ---------- */
.q-seg { margin: 0 0 12px; flex-wrap: nowrap; }
.q-seg .chip { flex: 1; padding: 9px 6px; font-size: 13px; text-align: center; }
#qAgenda[hidden], #qQuote[hidden] { display: none; }
.g-banner { display: flex; align-items: center; gap: 10px; background: #FFF8EA; border: 1.5px solid var(--gold-soft); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.g-banner span { flex: 1; }
.g-banner .btn { padding: 8px 14px; font-size: 14px; }
.g-days { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.g-days::-webkit-scrollbar { display: none; }
.g-day { flex: none; width: 50px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; padding: 6px 0 5px; display: grid; justify-items: center; gap: 1px; }
.g-day small { font-size: 11px; color: var(--muted); text-transform: capitalize; }
.g-day b { font-size: 18px; }
.g-day i { min-width: 18px; height: 18px; border-radius: 9px; background: var(--pink-deep); color: #fff; font-style: normal; font-size: 11px; font-weight: 700; line-height: 18px; padding: 0 4px; }
.g-day i.none { background: transparent; }
.g-day.today { border-color: var(--pink); }
.g-day.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.g-day.active small { color: var(--gold-soft); }
#qAgenda h3.g-dayname { text-transform: none; letter-spacing: .3px; }
.g-empty { text-align: center; padding: 18px 0; }
.g-card { background: #fff; border: 1.5px solid var(--line); border-left: 5px solid var(--pink); border-radius: 16px; padding: 12px; margin-bottom: 8px; }
.g-card.st-ok { border-left-color: #2E9E5B; }
.g-card.st-done { border-left-color: #9B6FD8; opacity: .8; }
.g-card.st-cancel { border-left-color: #B3261E; opacity: .55; }
.g-card-top { display: flex; align-items: flex-start; gap: 10px; }
.g-time { font-size: 15px; white-space: nowrap; padding-top: 1px; }
.g-who { flex: 1; min-width: 0; }
.g-who b { display: block; font-size: 15px; }
.g-who small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.g-edit { width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid var(--line); flex: none; }
.g-card-st { display: flex; gap: 6px; margin: 8px 0 0; }
.g-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--blush); }
.st-ok .g-badge { background: #DDF3E5; color: #1D6B3C; }
.st-done .g-badge { background: #EEE5FB; color: #5B3A92; }
.st-cancel .g-badge { background: #FBE2E0; color: #8C1D18; }
.g-badge.soft { background: #F1ECE9 !important; color: var(--muted) !important; }
.g-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 10px; }
.g-actions.three { grid-template-columns: repeat(3, 1fr); margin: 10px 0 4px; }
.g-actions .tool { font-size: 13px; }
.tool.wa { background: #E7F8EE; border-color: #A6DDBA; color: #146C3A; }
.g-add { margin-top: 12px; }
.g-set { display: block; margin: 8px auto 0; }
.g-client { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line); }
.g-client:last-child { border-bottom: 0; }
.g-client > span:first-child { flex: 1; min-width: 0; }
.g-client b { display: block; font-size: 15px; }
.g-client small { display: block; font-size: 12px; color: var(--muted); }
.g-stamps { display: flex; flex-wrap: wrap; gap: 3px; max-width: 110px; justify-content: flex-end; }
.g-stamps i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--pink); }
.g-stamps i.on { background: var(--pink-deep); border-color: var(--pink-deep); }
.g-stamps.big { max-width: none; justify-content: flex-start; gap: 6px; margin-bottom: 8px; }
.g-stamps.big i { width: 22px; height: 22px; }
.g-form .q-lbl input, .g-form .q-lbl textarea { margin: 0; font-weight: 400; }
.g-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.g-form .btn.big { margin-top: 10px; }
.g-form .g-del { color: #B3261E; }
.g-form > .link { display: block; margin: 8px auto 0; }
.g-form h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 1.2px; margin: 16px 0 8px; }
.g-form h3 small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.g-form .q-row { border: 0; }

.g-cardlink { display: inline-block; color: var(--pink-deep) !important; font-weight: 700; text-decoration: none !important; margin: 4px 0 0; }

/* ds-allow-hardcode: mismo estilo que el resto de styles.css */
.q-seg { overflow-x: auto; scrollbar-width: none; }
.q-seg::-webkit-scrollbar { display: none; }
.q-seg { gap: 5px; }
.q-seg .chip { flex: 1 1 auto; min-width: 0; padding: 9px 4px; font-size: clamp(10.5px, 3.05vw, 12.5px); white-space: nowrap; }
.g-form.center { text-align: center; }
.g-paid { font-size: 28px !important; font-weight: 700; text-align: center; margin: 6px 0 4px; }

/* ---------- Finanzas ---------- */
/* ds-allow-hardcode: mismo estilo que el resto de styles.css */
.f-month-nav { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 10px; }
.f-month-nav b { font-size: 17px; }
.f-month-nav .g-edit[disabled] { opacity: .3; }
.f-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.f-tile { background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 12px; min-width: 0; }
.f-tile small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.f-tile b { display: block; font-size: 22px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-tile em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.f-tile.in b { color: #7650B3; }
.f-tile.profit { background: linear-gradient(160deg, #F6F0FF, #fff); border-color: #C7A6EF; }
.f-tile.neg b { color: #B3261E; }
.f-chart { background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 10px 6px; margin-top: 10px; }
.f-chart svg { width: 100%; height: auto; display: block; }
.f-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12.5px; font-weight: 600; margin: 0 0 6px 4px; }
.f-legend span { display: inline-flex; align-items: center; gap: 5px; }
.f-legend i { width: 10px; height: 10px; border-radius: 3px; }
.f-legend small { margin-left: auto; font-weight: 500; font-size: 11px; }
.f-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 3; }
.f-base { stroke: #D9C9C2; stroke-width: 1; }
.f-axis { font: 500 9.5px Outfit, sans-serif; fill: var(--muted); }
.f-axis.sel { fill: var(--ink); font-weight: 700; }
.f-hit { fill: transparent; }
.f-month { cursor: pointer; }
.f-month.sel .f-hit { fill: rgba(235, 169, 188, .14); }
.f-exp li { align-items: center; }
.f-exp .qe-del { height: 30px; width: 30px; flex: none; }
.f-cats .chip { padding: 7px 12px; font-size: 13px; }

/* ---------- Reservas en línea ---------- */
/* ds-allow-hardcode: mismo estilo que el resto de styles.css */
.r-banner.off { background: #F6F0FF; border-color: #C7A6EF; }
.r-banner .g-edit { flex: none; }
.g-badge.web { background: #E7F0FF !important; color: #1F4E9E !important; }
.r-link { background: #F6F0FF; border: 1.5px solid #C7A6EF; border-radius: 14px; padding: 10px 12px; margin: 10px 0; }
.r-link small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.r-link b { display: block; font-size: 13px; word-break: break-all; margin: 2px 0 6px; }
.r-link .g-actions { margin-top: 4px; }
.r-link a.tool { text-align: center; text-decoration: none; color: var(--ink); }
.r-form .toggle { margin: 6px 0; }
#rSvcs .qe-row { grid-template-columns: 1fr 60px 52px 34px; }
.r-hours { display: grid; gap: 6px; }
.r-day { display: grid; grid-template-columns: 80px 1fr auto 1fr; gap: 6px; align-items: center; font-size: 14px; }
.r-day label { display: flex; align-items: center; gap: 6px; }
.r-day input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--pink-deep); }
.r-day input[type=time] { min-width: 0; width: 100%; font: inherit; font-size: 14px; padding: 7px 6px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; }
.r-day em { grid-column: 2 / -1; font-style: normal; font-size: 13px; }
.r-form select.q-in { padding: 11px 10px; }

/* ---------- Sumi Agenda ---------- */
:root { --accent: #7650B3; --accent-soft: #F3ECFF; --nav-h: 64px; }
.app { padding-bottom: calc(var(--nav-h) + 96px); }
.top { padding-bottom: 6px; }
.install-bar { position: static; margin: 4px 0 10px; }
#panel-quote { display: block; padding-bottom: 0; animation: none; } /* con animación, la barra fija de abajo se movería con el panel */
/* barra de secciones abajo, como en una app */
.q-seg { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px;
  padding: 6px 8px; padding-bottom: max(6px, env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(120, 70, 60, .08); overflow: visible; }
.q-seg .chip { border: 0; border-radius: 12px; background: none; padding: 8px 2px; font-size: clamp(11px, 3.2vw, 13px); line-height: 1.25; white-space: normal; min-height: 48px; }
.q-seg .chip.active { background: var(--accent-soft); color: var(--accent); }
.q-bar { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: 12px; box-shadow: none; }
.q-bar b { color: var(--accent); }
.toast { bottom: calc(var(--nav-h) + 90px); }
@media (min-width: 560px) { .q-seg { left: 50%; right: auto; width: 520px; transform: translateX(-50%); border-radius: 18px 18px 0 0; } .q-bar { border-radius: 0; } }
/* primer uso: elegir rubros */
.q-setup { background: var(--paper); border: 1.5px solid var(--line); border-radius: 18px; padding: 16px; }
.q-setup h3 { margin-top: 0; }
.q-setup .chips { margin: 4px 0 14px; }
.q-setup .chip.active, .q-edit .chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
/* editor de servicios por categoría */
.qe-cat { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px; margin: 12px 0; background: #fff; }
.qe-cat-head { display: grid; grid-template-columns: 1fr 34px; gap: 6px; margin-bottom: 4px; }
.qe-catname { font-weight: 700; }
.qe-cat > small { display: block; text-align: right; margin: 0 40px 4px 0; font-size: 11px; }
.qe-cat .qe-row { grid-template-columns: 1fr 64px 52px 34px; }
/* vista día/semana, bloqueos, cumpleaños, cobros y QR */
.g-view { margin: 4px 0 10px; }
.g-view .chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.g-wday { display: grid; gap: 3px; width: 100%; text-align: left; background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; font-size: 14px; }
.g-wday.today { border-color: var(--accent); }
.g-wday span { color: var(--ink); }
.g-wday span.blk { color: var(--muted); }
.g-card.st-block { background: repeating-linear-gradient(135deg, var(--paper), var(--paper) 8px, var(--cream) 8px, var(--cream) 16px); border-style: dashed; }
.g-add2 { margin-top: 8px; }
.g-banner.bday { background: #FFF6E5; border-color: var(--gold-soft); }
.g-badge.debt { background: #FDECEC; color: #9F1D16; border: 0; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.g-debt { color: #9F1D16; font-style: normal; font-weight: 700; }
.g-banner.debt { background: #FDECEC; border-color: #F3B8B4; }
.g-client-row { display: flex; align-items: center; gap: 6px; }
.g-client-row .g-client { flex: 1; min-width: 0; }
.g-client-row .tool { flex: none; padding: 8px 10px; }
.g-pm { margin: 4px 0 12px; }
.g-pm .chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.r-qr { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.r-qr img { width: 112px; height: 112px; border-radius: 10px; border: 1px solid var(--line); background: #fff; image-rendering: pixelated; flex: none; }
.r-qr p { margin: 2px 0 6px; }
.f-owed b { color: #9F1D16; }
/* dorado más oscuro para textos chicos (el dorado claro no se lee sobre el rosado) */
:root { --gold-ink: #7E5F14; }
.brand p { color: var(--gold-ink); }
.q-lbl[hidden], .q-in[hidden] { display: none; } /* que [hidden] gane sobre el display de las etiquetas */
