/* Panthera Planner - planner.css
 * Identidad Carbon & GREEN: carbón #111315 / #1F2428 / #2A3036, turquesa #00829B (antes verde #00829B), lienzo #F4F5F6.
 * Oswald para títulos, Inter para texto. Todo con prefijo psp-. */

/* ==================================================================== tokens */
.psp-app {
	--psp-carbon: #111315;
	--psp-carbon-2: #1F2428;
	--psp-carbon-3: #2A3036;
	--psp-carbon-4: #363D45;
	--psp-green: #00829B;
	--psp-green-dark: #006B80;
	--psp-green-deep: #00596B;
	--psp-green-text: #2BB0C9;
	--psp-green-soft: rgba(0, 130, 155, .16);
	--psp-paper: #F4F5F6;
	--psp-text: #F2F4F5;
	--psp-text-2: #AFB8C0;
	--psp-text-3: #7C8791;
	--psp-line: rgba(255, 255, 255, .07);
	--psp-line-2: rgba(255, 255, 255, .13);
	--psp-red: #E05B4C;
	--psp-amber: #E0A53A;
	--psp-blue: #4FA3E0;
	--psp-r: 12px;
	--psp-r-sm: 9px;
	--psp-r-lg: 16px;
	--psp-t: 180ms cubic-bezier(.2, .7, .3, 1);
	--psp-t-slow: 240ms cubic-bezier(.2, .7, .3, 1);
	--psp-sh-1: 0 1px 2px rgba(0, 0, 0, .4);
	--psp-sh-2: 0 14px 34px -18px rgba(0, 0, 0, .85);
	--psp-sh-3: 0 30px 70px -28px rgba(0, 0, 0, .9);
	--psp-top-h: 60px;
	--psp-rail-w: 58px;
	--psp-panel-w: 360px;
	--psp-status-h: 40px;
}

/* ================================================================== esqueleto */
.psp-root { height: 100%; }
.psp-app {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	min-height: 420px;
	background: var(--psp-carbon);
	background-image: radial-gradient(1200px 500px at 20% -10%, rgba(0, 130, 155, .07), transparent 60%);
	color: var(--psp-text);
	font: 400 14px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
	overflow: hidden;
	isolation: isolate;
}
.psp-app *, .psp-app *::before, .psp-app *::after { box-sizing: border-box; }
.psp-app h1, .psp-app h2, .psp-app h3 { font-family: Oswald, Inter, system-ui, sans-serif; font-weight: 600; letter-spacing: .01em; margin: 0; }
.psp-app p { margin: 0; }
/* :where() no suma especificidad: los componentes de abajo mandan sobre este reinicio */
:where(.psp-app) :where(button, input, select, textarea) { font: inherit; color: inherit; }
.psp-app :focus { outline: none; }
.psp-app :focus-visible { outline: 2px solid var(--psp-green); outline-offset: 2px; border-radius: 6px; }
.psp-body {
	position: relative;
	flex: 1;
	display: grid;
	grid-template-columns: var(--psp-rail-w) minmax(0, 1fr) var(--psp-panel-w);
	min-height: 0;
}

/* =================================================================== botones */
.psp-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 12px;
	border: 1px solid transparent;
	border-radius: var(--psp-r-sm);
	background: transparent;
	color: var(--psp-text-2);
	font-size: 13.5px;
	font-weight: 500;
	white-space: nowrap;
	cursor: pointer;
	transition: background var(--psp-t), color var(--psp-t), border-color var(--psp-t), transform var(--psp-t), box-shadow var(--psp-t);
}
.psp-btn svg { flex: none; }
.psp-btn:hover { background: rgba(255, 255, 255, .07); color: var(--psp-text); }
.psp-btn:active { transform: translateY(1px); }
.psp-btn[disabled] { opacity: .35; cursor: not-allowed; pointer-events: none; }
.psp-btn--icon { width: 36px; padding: 0; justify-content: center; }
.psp-btn--wide { width: 100%; justify-content: center; }
.psp-btn--primary {
	background: var(--psp-green);
	color: #FFFFFF;
	font-weight: 600;
	border-color: rgba(0, 0, 0, .18);
	box-shadow: 0 6px 18px -8px rgba(0, 130, 155, .8);
}
.psp-btn--primary:hover { background: #006B80; color: #FFFFFF; }
.psp-btn--solid { background: var(--psp-carbon-3); color: var(--psp-text); border-color: var(--psp-line-2); }
.psp-btn--solid:hover { background: var(--psp-carbon-4); }
.psp-btn--ghost { }
.psp-btn--chip {
	height: 28px;
	padding: 0 10px;
	font-size: 12.5px;
	border: 1px solid var(--psp-line);
	border-radius: 999px;
	background: rgba(255, 255, 255, .03);
}
.psp-btn--chip.is-active { background: var(--psp-green-soft); border-color: rgba(0, 130, 155, .5); color: #B3E3EC; }
.psp-btn--danger { background: var(--psp-red); color: #fff; }
.psp-btn--danger-ghost { color: #F0A79C; }
.psp-btn--danger-ghost:hover { background: rgba(224, 91, 76, .14); color: #FFC7BF; }
.psp-btn--add {
	position: absolute;
	right: 8px;
	bottom: 8px;
	width: 30px;
	height: 30px;
	padding: 0;
	justify-content: center;
	border-radius: 8px;
	background: var(--psp-green);
	color: #FFFFFF;
	opacity: 0;
	transform: translateY(4px);
	box-shadow: var(--psp-sh-1);
}
.psp-btn__badge {
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: rgba(0, 0, 0, .28);
	font-size: 11.5px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}
/* con 0 no se enseña: no es el presupuesto de la tienda sino las máquinas del plano, y un «0»
   junto a «Tu presupuesto 12» hacía pensar que el presupuesto no había llegado */
.psp-btn__badge.is-zero { display: none; }
.psp-btn.is-open { background: rgba(255, 255, 255, .09); color: var(--psp-text); }
.psp-btn.is-dirty::after {
	content: "";
	width: 6px;
	height: 6px;
	margin-left: -2px;
	border-radius: 50%;
	background: var(--psp-green);
}

/* ================================================================= tooltips */
.psp-tip { position: relative; }
.psp-tip::after {
	content: attr(data-tip) " " attr(data-key);
	position: absolute;
	z-index: 40;
	left: 50%;
	top: calc(100% + 8px);
	transform: translate(-50%, 4px);
	padding: 5px 9px;
	border-radius: 7px;
	border: 1px solid var(--psp-line-2);
	background: #0B0D0E;
	color: var(--psp-text);
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
	letter-spacing: .01em;
	opacity: 0;
	pointer-events: none;
	box-shadow: var(--psp-sh-2);
	transition: opacity var(--psp-t), transform var(--psp-t);
}
.psp-tip--right::after { left: calc(100% + 10px); top: 50%; transform: translate(-4px, -50%); }
.psp-tip--top::after { top: auto; bottom: calc(100% + 8px); transform: translate(-50%, -4px); }
.psp-tip:hover::after, .psp-tip:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.psp-tip--right:hover::after, .psp-tip--right:focus-visible::after { transform: translate(0, -50%); }
.psp-tip--top:hover::after, .psp-tip--top:focus-visible::after { transform: translate(-50%, 0); }

/* ============================================================ barra superior */
.psp-topbar {
	position: relative;
	z-index: 20;
	flex: none;
	display: flex;
	align-items: center;
	gap: 8px;
	height: var(--psp-top-h);
	min-height: var(--psp-top-h);
	padding: 0 14px;
	background: linear-gradient(180deg, #16191B, #111315);
	border-bottom: 1px solid var(--psp-line);
	box-shadow: 0 1px 0 rgba(255, 255, 255, .03), 0 10px 26px -20px #000;
}
.psp-topbar__flex { flex: 1; }
.psp-topbar__sep { width: 1px; height: 26px; background: var(--psp-line); margin: 0 4px; }
.psp-topbar__group { display: flex; align-items: center; gap: 2px; }
.psp-topbar__actions { display: flex; align-items: center; gap: 4px; }
.psp-brand { display: flex; align-items: center; gap: 10px; }
.psp-brand__svg { display: block; border-radius: 9px; }
.psp-brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.psp-brand__name { font-family: Oswald, Inter, sans-serif; font-size: 17px; font-weight: 600; letter-spacing: .14em; color: #fff; }
.psp-brand__claim { font-size: 11.5px; color: var(--psp-text-3); letter-spacing: .02em; }
.psp-project { min-width: 0; }
.psp-project__btn {
	display: flex;
	align-items: center;
	gap: 7px;
	max-width: 230px;
	height: 34px;
	padding: 0 10px;
	border: 1px solid transparent;
	border-radius: var(--psp-r-sm);
	background: transparent;
	color: var(--psp-text);
	font-weight: 600;
	cursor: text;
	transition: background var(--psp-t), border-color var(--psp-t);
}
.psp-project__btn:hover { background: rgba(255, 255, 255, .05); border-color: var(--psp-line); }
.psp-project__btn svg { color: var(--psp-text-3); flex: none; }
.psp-project__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psp-project__input {
	width: 230px;
	height: 34px;
	padding: 0 10px;
	border: 1px solid var(--psp-green);
	border-radius: var(--psp-r-sm);
	background: var(--psp-carbon-2);
	color: #fff;
	font-weight: 600;
}

/* ===================================================== conmutador segmentado */
.psp-seg {
	display: inline-flex;
	padding: 3px;
	gap: 2px;
	border: 1px solid var(--psp-line);
	border-radius: 11px;
	background: rgba(0, 0, 0, .3);
}
.psp-seg__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 30px;
	padding: 0 14px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--psp-text-2);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background var(--psp-t), color var(--psp-t);
}
.psp-seg__btn:hover { color: var(--psp-text); background: rgba(255, 255, 255, .05); }
.psp-seg__btn.is-active { background: var(--psp-green); color: #FFFFFF; }
.psp-seg--sm .psp-seg__btn { height: 26px; padding: 0 11px; font-size: 12.5px; }
.psp-seg--full { display: flex; width: 100%; }
.psp-seg--full .psp-seg__btn { flex: 1; justify-content: center; padding: 0 6px; }

/* ================================================= carril de herramientas */
.psp-rail {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 10px 0;
	background: var(--psp-carbon-2);
	border-right: 1px solid var(--psp-line);
	overflow: visible;
	z-index: 12;
}
.psp-rail__sep { width: 26px; height: 1px; background: var(--psp-line); margin: 5px 0; }
.psp-rail__grow { flex: 1; }
.psp-tool {
	position: relative;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid transparent;
	border-radius: 10px;
	background: transparent;
	color: var(--psp-text-2);
	cursor: pointer;
	transition: background var(--psp-t), color var(--psp-t), border-color var(--psp-t);
}
.psp-tool:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.psp-tool.is-active { background: var(--psp-green-soft); border-color: rgba(0, 130, 155, .45); color: #7FD3E4; }
.psp-tool.is-active::before {
	content: "";
	position: absolute;
	left: -10px;
	top: 50%;
	transform: translateY(-50%);
	width: 3px;
	height: 20px;
	border-radius: 0 3px 3px 0;
	background: var(--psp-green);
}

/* ==================================================== escenario 2D / 3D */
/* z-index explícito: sin él, el lienzo (capa compuesta) puede pintarse sobre el panel */
.psp-main { position: relative; z-index: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.psp-stage {
	position: relative;
	flex: 1;
	min-height: 0;
	background: var(--psp-paper);
	overflow: hidden;
}
.psp-stage__layer { position: absolute; inset: 0; transition: opacity var(--psp-t-slow); }
.psp-stage__layer canvas { display: block; }
.psp-stage__layer.is-hidden { opacity: 0; pointer-events: none; }
.psp-stage__layer--3d { z-index: 2; background: linear-gradient(180deg, #DDE3E8, #F4F5F6); }
.psp-stage.is-drop::after {
	content: "";
	position: absolute;
	inset: 10px;
	z-index: 5;
	border: 2px dashed var(--psp-green);
	border-radius: var(--psp-r-lg);
	background: rgba(0, 130, 155, .08);
	pointer-events: none;
}
.psp-readonly { display: none; }

/* estado vacío */
.psp-empty {
	position: absolute;
	inset: 0;
	z-index: 6;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: radial-gradient(60% 60% at 50% 45%, rgba(255, 255, 255, .9), rgba(244, 245, 246, .96));
	/* ⚠️ La capa cubre el lienzo entero: si se tragara los clics, nadie podría
	   dibujar su primera pared con el plano vacío. Solo la tarjeta recibe. */
	pointer-events: none;
}
.psp-empty__card { pointer-events: auto; }
.psp-app--empty[data-view="2d"] .psp-empty { display: flex; }
.psp-empty__card {
	max-width: 480px;
	padding: 26px 30px 30px;
	text-align: center;
	background: #fff;
	border: 1px solid #E3E6E9;
	border-radius: var(--psp-r-lg);
	box-shadow: 0 30px 60px -34px rgba(17, 19, 21, .5);
}
.psp-empty__svg { display: block; margin: 0 auto 14px; max-width: 100%; }
.psp-empty__title { font-size: 26px; color: #111315; margin-bottom: 8px; letter-spacing: .01em; }
.psp-empty__text { color: #5B6470; font-size: 14px; line-height: 1.5; margin-bottom: 18px; }
.psp-empty__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.psp-empty__actions .psp-btn--ghost { color: #5B6470; border: 1px solid #DDE1E5; }
.psp-empty__actions .psp-btn--ghost:hover { background: #F1F3F4; color: #111315; }

/* barra flotante de la vista 3D */
.psp-3dbar {
	position: absolute;
	z-index: 7;
	left: 50%;
	bottom: 18px;
	transform: translate(-50%, 14px);
	display: none;
	align-items: center;
	gap: 8px;
	padding: 8px;
	border: 1px solid var(--psp-line-2);
	border-radius: 14px;
	background: rgba(17, 19, 21, .92);
	backdrop-filter: blur(8px);
	box-shadow: var(--psp-sh-3);
	opacity: 0;
	transition: opacity var(--psp-t-slow), transform var(--psp-t-slow);
}
/* aviso de controles del Paseo 3D (40-view3d.js): arriba, discreto, se atenúa a los 6 s */
.psp-walkhint {
	position: absolute;
	z-index: 6;
	left: 0;
	right: 0;
	top: 14px;
	margin: 0 auto;
	width: max-content;
	transform: translateY(-6px);
	display: flex;
	align-items: center;
	gap: 6px;
	max-width: calc(100% - 32px);
	padding: 6px 6px 6px 14px;
	border: 1px solid var(--psp-line-2, rgba(255, 255, 255, .14));
	border-radius: 12px;
	background: rgba(17, 19, 21, .88);
	backdrop-filter: blur(8px);
	color: #E8ECEF;
	font: 500 12.5px/1.35 Inter, system-ui, sans-serif;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s;
}
.psp-walkhint.is-on { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity .35s ease, transform .35s ease; }
.psp-walkhint.is-dim { opacity: .38; }
.psp-walkhint.is-dim:hover { opacity: 1; }
.psp-walkhint__x {
	flex: none;
	width: 24px;
	height: 24px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #AEB6BD;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
}
.psp-walkhint__x:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.psp-walkhint__x:focus-visible { outline: 2px solid var(--psp-green, #00829B); outline-offset: 1px; }
@media (hover: none) and (pointer: coarse) { .psp-walkhint__x { width: 36px; height: 36px; } }
.psp-app[data-view="3d"] .psp-3dbar { display: flex; opacity: 1; transform: translate(-50%, 0); }
.psp-app--no3d .psp-3dbar > *:not(:last-child) { display: none; }
.psp-no3d {
	position: absolute;
	inset: 0;
	z-index: 4;
	display: none;
	align-items: center;
	justify-content: center;
	background: linear-gradient(180deg, #DDE3E8, #F4F5F6);
}
.psp-app--no3d[data-view="3d"] .psp-no3d { display: flex; }
.psp-no3d__t { color: #5B6470; font-size: 14px; }

/* ================================================== barra inferior de estado */
.psp-status {
	position: relative;
	flex: none;
	display: flex;
	align-items: center;
	gap: 10px;
	height: var(--psp-status-h);
	min-height: var(--psp-status-h);
	padding: 0 10px;
	background: var(--psp-carbon-2);
	border-top: 1px solid var(--psp-line);
	font-size: 12.5px;
	color: var(--psp-text-2);
	z-index: 11;
}
.psp-status__grp { display: flex; align-items: center; gap: 4px; }
.psp-status__sep { width: 1px; height: 18px; background: var(--psp-line); margin: 0 4px; }
.psp-status .psp-btn { height: 28px; }
.psp-status .psp-btn--icon { width: 28px; }
.psp-zoom__v {
	min-width: 62px;
	height: 28px;
	padding: 0 8px;
	border: 1px solid var(--psp-line);
	border-radius: 7px;
	background: rgba(0, 0, 0, .25);
	color: var(--psp-text);
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	font-size: 12.5px;
	cursor: pointer;
	transition: border-color var(--psp-t), background var(--psp-t);
}
.psp-zoom__v:hover { border-color: var(--psp-line-2); background: rgba(0, 0, 0, .4); }
.psp-coords { display: flex; align-items: center; gap: 6px; color: var(--psp-text-3); font-variant-numeric: tabular-nums; }
.psp-coords__ico { display: inline-flex; opacity: .7; }
.psp-coords__v { min-width: 150px; }

/* ================================================================== panel */
.psp-panel {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 0;
	background: var(--psp-carbon-2);
	border-left: 1px solid var(--psp-line);
	z-index: 13;
}
.psp-panel__head { flex: none; display: flex; align-items: center; gap: 4px; padding: 8px 8px; border-bottom: 1px solid var(--psp-line); overflow: hidden; }
.psp-panel__close { display: none; }
/* Seis pestañas (Catálogo, Tu presupuesto, Estética, Plantillas, Propiedades, Resumen): en una
   fila de 360 px el texto solo ya suma unos 420 px y se cortaban. Van en una rejilla de dos filas
   de tres; la columna del centro es más ancha porque ahí caen «Tu presupuesto» (con su insignia)
   y «Propiedades». La pestaña activa se marca como los chips (fondo verde suave), que en rejilla
   se lee mejor que un subrayado. */
.psp-tabs {
	display: grid;
	flex: 1;
	min-width: 0;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr);
	gap: 4px;
}
.psp-tab {
	position: relative;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	height: 34px;
	padding: 0 6px;
	border: 1px solid transparent;
	background: rgba(255, 255, 255, .025);
	color: var(--psp-text-2);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: -.01em;
	cursor: pointer;
	transition: color var(--psp-t), border-color var(--psp-t), background var(--psp-t);
	border-radius: 8px;
}
.psp-tab:hover { color: var(--psp-text); background: rgba(255, 255, 255, .07); }
.psp-tab.is-active { color: #fff; background: var(--psp-green-soft); border-color: rgba(0, 130, 155, .5); }
.psp-tab svg { opacity: .85; }
.psp-tab__t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psp-tab__dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: transparent; }
.psp-tab__dot.is-on { background: var(--psp-red); box-shadow: 0 0 0 3px rgba(224, 91, 76, .18); }
/* insignia de «Tu presupuesto» (y del botón del cajón): el número del icono de presupuesto de
   la cabecera de la web (verde como él); con 0 no se enseña, como allí */
.psp-tab__n {
	flex: none;
	min-width: 19px;
	height: 19px;
	padding: 0 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: var(--psp-green);
	color: #FFFFFF;
	font-size: 11px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}
.psp-tab__n[hidden] { display: none; }
.psp-panel__body { position: relative; flex: 1 1 auto; min-height: 0; }
.psp-pane { position: absolute; inset: 0; display: none; flex-direction: column; min-height: 0; }
.psp-pane.is-active { display: flex; }
.psp-pane__head { flex: none; padding: 12px 14px 10px; border-bottom: 1px solid var(--psp-line); }
.psp-pane__lead { color: var(--psp-text-3); font-size: 12.5px; line-height: 1.45; }
.psp-pane__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 14px 26px; }
.psp-pane__scroll::-webkit-scrollbar { width: 10px; }
.psp-pane__scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 8px; border: 3px solid var(--psp-carbon-2); }
.psp-pane__scroll::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .2); }
.psp-pane__scroll::-webkit-scrollbar-track { background: transparent; }

/* botón de cajón (tablet) */
.psp-drawerbtn {
	position: absolute;
	z-index: 14;
	right: 0;
	top: 96px;
	display: none;
	align-items: center;
	gap: 8px;
	height: 42px;
	padding: 0 14px 0 12px;
	border: 1px solid var(--psp-line-2);
	border-right: 0;
	border-radius: 12px 0 0 12px;
	background: var(--psp-carbon-3);
	color: var(--psp-text);
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	box-shadow: var(--psp-sh-2);
}

/* ================================================================ catálogo */
.psp-search { position: relative; display: flex; align-items: center; }
.psp-search__ico { position: absolute; left: 11px; display: inline-flex; color: var(--psp-text-3); pointer-events: none; }
.psp-search__i {
	width: 100%;
	height: 38px;
	padding: 0 36px 0 36px;
	border: 1px solid var(--psp-line);
	border-radius: 10px;
	background: rgba(0, 0, 0, .28);
	color: var(--psp-text);
	transition: border-color var(--psp-t), background var(--psp-t);
}
.psp-search__i::placeholder { color: var(--psp-text-3); }
.psp-search__i:focus { border-color: rgba(0, 130, 155, .6); background: rgba(0, 0, 0, .4); }
.psp-search__i::-webkit-search-cancel-button { display: none; }
.psp-search__clear { position: absolute; right: 3px; width: 32px; height: 32px; }
.psp-chips {
	display: flex;
	gap: 6px;
	margin-top: 10px;
	padding-bottom: 4px;
	overflow-x: auto;
	scrollbar-width: thin;
	-webkit-mask-image: linear-gradient(90deg, #000 90%, transparent 100%);
	mask-image: linear-gradient(90deg, #000 90%, transparent 100%);
}
.psp-chips::-webkit-scrollbar { height: 6px; }
.psp-chips::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .13); border-radius: 6px; }
.psp-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 28px;
	padding: 0 10px;
	flex: none;
	border: 1px solid var(--psp-line);
	border-radius: 999px;
	background: rgba(255, 255, 255, .03);
	color: var(--psp-text-2);
	font-size: 12.5px;
	font-weight: 500;
	cursor: pointer;
	transition: background var(--psp-t), color var(--psp-t), border-color var(--psp-t);
}
.psp-chip:hover { background: rgba(255, 255, 255, .08); color: var(--psp-text); }
.psp-chip.is-active { background: var(--psp-green-soft); border-color: rgba(0, 130, 155, .5); color: #B3E3EC; }
.psp-chip__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.psp-chip__n { font-variant-numeric: tabular-nums; opacity: .65; font-size: 11.5px; }
.psp-cat__count { margin-top: 8px; font-size: 11.5px; color: var(--psp-text-3); }
.psp-cat__scroll { padding-top: 12px; }
.psp-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.psp-card {
	position: relative;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--psp-line);
	border-radius: var(--psp-r);
	background: var(--psp-carbon-3);
	overflow: hidden;
	cursor: grab;
	transition: transform var(--psp-t), border-color var(--psp-t), box-shadow var(--psp-t), background var(--psp-t);
}
.psp-card:hover { transform: translateY(-2px); border-color: rgba(0, 130, 155, .45); box-shadow: var(--psp-sh-2); background: #30373E; }
.psp-card:hover .psp-btn--add { opacity: 1; transform: translateY(0); }
/* En pantallas tactiles no hay «hover»: el boton + tiene que verse siempre,
   o en una tableta no hay forma de saber como se coloca una maquina. */
@media (hover: none) {
	.psp-card .psp-btn--add { opacity: 1; transform: translateY(0); }
}
.psp-card.is-dragging { opacity: .5; cursor: grabbing; }
/* Pastilla de arrastre (ver dragChip en 50-ui.js): elemento de la página que sigue al puntero,
   desplazado abajo a la derecha para que se vea dónde cae la pieza. Opaca y nítida. */
.psp-dragchip { position: fixed; left: 0; top: 0; z-index: 2147483000; pointer-events: none; opacity: 0; will-change: transform; }
.psp-dragchip.is-on { opacity: 1; }
.psp-dragchip__in { display: flex; align-items: center; gap: 10px; max-width: 250px; padding: 6px 14px 6px 6px; border: 1px solid rgba(0, 130, 155, .65); border-radius: 12px; background: #23292F; box-shadow: 0 8px 22px rgba(0, 0, 0, .35); color: #F4F6F7; font-family: 'Inter', sans-serif; }
.psp-dragchip__thumb { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: #fff; overflow: hidden; }
.psp-dragchip__thumb canvas, .psp-dragchip__thumb .psp-card__sym { width: 40px !important; height: 40px !important; }
.psp-dragchip__thumb img { width: 44px; height: 44px; object-fit: cover; display: block; }
.psp-dragchip__txt { display: flex; flex-direction: column; min-width: 0; }
.psp-dragchip__name { font-size: 13px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psp-dragchip__dims { font-size: 11.5px; color: #7FD3E4; font-variant-numeric: tabular-nums; }
.psp-card__thumb {
	position: relative;
	height: 96px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	overflow: hidden;
}
.psp-card__img { max-width: 100%; max-height: 100%; object-fit: contain; }
.psp-card__sym { display: block; }
.psp-card__fallback { color: #98A0A8; }
.psp-card__body { padding: 9px 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.psp-card__name {
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--psp-text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 32px;
}
.psp-card__meta { font-size: 11px; color: var(--psp-text-3); letter-spacing: .02em; }
.psp-card__dims { font-size: 11.5px; color: #2BB0C9; font-variant-numeric: tabular-nums; }
.psp-badge {
	align-self: flex-start;
	margin-top: 4px;
	padding: 2px 7px;
	border-radius: 999px;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .01em;
}
.psp-badge--est { background: rgba(224, 165, 58, .16); color: #E9BE6E; border: 1px solid rgba(224, 165, 58, .3); }
.psp-badge--nodims { display: flex; align-items: flex-start; gap: 5px; margin-top: 6px; font-size: 11px; font-weight: 600; line-height: 1.35; color: #E9BE6E; }
.psp-badge--nodims svg { flex: none; margin-top: 1px; }

/* ============================================================ tu presupuesto */
/* Pestaña con las máquinas que el cliente añadió a su presupuesto en la tienda (mismas tarjetas
   del Catálogo, más cuántas hay ya en el plano). */
.psp-card__onplan {
	align-self: flex-start;
	margin-top: 6px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--psp-green-soft);
	color: #B3E3EC;
	font-size: 11px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
.psp-card__onplan.is-zero { background: transparent; color: var(--psp-text-3); padding-left: 0; font-weight: 500; }
.psp-card--nodims { cursor: default; }
.psp-card--nodims:hover { transform: none; border-color: var(--psp-line-2); box-shadow: none; background: var(--psp-carbon-3); }
.psp-card--nodims .psp-card__thumb img { opacity: .9; }
.psp-card__name--wait { color: var(--psp-text-3); font-weight: 500; }
.psp-card__link { margin-top: 8px; gap: 3px; font-size: 12px; font-weight: 600; }
.psp-pre__links { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; }
.psp-pre__quote { font-weight: 600; }
.psp-pre__count { font-size: 11.5px; color: var(--psp-text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.psp-pre__scroll { padding-top: 12px; }
.psp-app .psp-pre__note { margin-top: 14px; }
/* móvil: la cabecera va dentro de la lista y se desplaza con ella */
.psp-pre__head--inline { padding: 0 0 12px; margin-bottom: 12px; }
.psp-pre__more { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--psp-line); }
.psp-pre__moret { font-size: 12.5px; color: var(--psp-text-3); }
.psp-pre__more .psp-btn { border: 1px solid var(--psp-line-2); }
/* sin conexión: un aviso discreto, no un error a toda pantalla */
.psp-pre__err { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 10px; border: 1px solid rgba(224, 165, 58, .28); background: rgba(224, 165, 58, .07); }
.psp-pre__err--soft { margin-top: 10px; padding-top: 6px; padding-bottom: 6px; }
.psp-pre__errico { display: inline-flex; flex: none; color: #E9BE6E; }
.psp-pre__errt { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.45; color: var(--psp-text-2); }
.psp-pre__err .psp-btn { flex: none; border: 1px solid var(--psp-line-2); }
/* presupuesto vacío: cómo se añaden máquinas, en tres pasos */
.psp-pre__empty { padding: 22px 8px 8px; text-align: center; }
.psp-pre__emptyico { display: inline-flex; padding: 14px; border-radius: 50%; background: var(--psp-green-soft); color: var(--psp-green-text); margin-bottom: 12px; }
.psp-app .psp-pre__emptyt { font-size: 18px; color: var(--psp-text); }
.psp-app .psp-pre__emptys { margin: 8px auto 0; max-width: 34ch; font-size: 12.5px; line-height: 1.55; color: var(--psp-text-3); }
.psp-pre__steps { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.psp-pre__steps li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, .035); border: 1px solid var(--psp-line); font-size: 12.5px; color: var(--psp-text-2); }
.psp-pre__steps li > span { flex: none; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--psp-green); color: #FFFFFF; font-size: 11.5px; font-weight: 700; }
.psp-pre__shop { margin-top: 18px; text-decoration: none; }

/* esqueletos de carga */
.psp-skel { background: linear-gradient(90deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .12), rgba(255, 255, 255, .05)); background-size: 200% 100%; animation: psp-shine 1.4s linear infinite; border-radius: 6px; }
.psp-skel--line { height: 11px; display: block; margin-bottom: 7px; }
.psp-skel--short { width: 55%; }
.psp-card--skel { pointer-events: none; }
.psp-card--skel .psp-card__thumb { background: rgba(255, 255, 255, .05); }
@keyframes psp-shine { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ================================================================= estética */
/* Pestaña de decoración: secciones con las mismas tarjetas del catálogo y, al final,
   la tarjeta de marca «Imagen Panthera» (negro de pared de marca + línea de luz verde,
   como las tiras LED del techo del club). */
.psp-card__meta--led { display: flex; align-items: center; gap: 6px; }
.psp-card__led { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.psp-est__nav { margin-top: 10px; }
/* la tira de secciones se difumina por el lado donde quedan chips fuera de la vista */
.psp-est__nav.is-end { -webkit-mask-image: none; mask-image: none; }
.psp-est__nav.is-scrolled { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 90%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 90%, transparent 100%); }
.psp-est__nav.is-scrolled.is-end { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px); mask-image: linear-gradient(90deg, transparent 0, #000 28px); }
.psp-est__chip { gap: 5px; }
.psp-est__chipico { display: inline-flex; opacity: .75; }
.psp-est__chip.is-active .psp-est__chipico { opacity: 1; }
.psp-est__chip--brand { border-color: rgba(0, 130, 155, .32); color: #B3E3EC; }
.psp-est__scroll { padding-top: 14px; }
.psp-est { position: relative; display: flex; flex-direction: column; gap: 24px; }
.psp-est__sechead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 10px; margin-bottom: 11px; }
.psp-est__ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: rgba(0, 130, 155, .13);
	border: 1px solid rgba(0, 130, 155, .3);
	color: #57C5DB;
}
.psp-est__title { font-size: 15px; line-height: 1.2; color: #fff; text-transform: uppercase; letter-spacing: .06em; }
.psp-est__desc { margin-top: 3px; font-size: 12px; line-height: 1.4; color: var(--psp-text-3); }
.psp-est__n {
	margin-top: 5px;
	padding: 1px 8px;
	border: 1px solid var(--psp-line-2);
	border-radius: 999px;
	font-size: 11.5px;
	color: var(--psp-text-3);
	font-variant-numeric: tabular-nums;
}
.psp-est__more {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 10px;
	padding: 9px 10px 9px 12px;
	border: 1px dashed var(--psp-line-2);
	border-radius: var(--psp-r-sm);
}
.psp-est__moret { font-size: 12.5px; color: var(--psp-text-2); }
.psp-est__brand {
	position: relative;
	padding: 16px 14px 14px;
	border: 1px solid rgba(0, 130, 155, .34);
	border-radius: var(--psp-r-lg);
	background:
		radial-gradient(380px 150px at 100% 0%, rgba(0, 130, 155, .17), transparent 70%),
		linear-gradient(180deg, #181B1E, #111315);
	box-shadow: inset 0 0 0 1px rgba(0, 130, 155, .06), 0 20px 44px -26px rgba(0, 130, 155, .6);
	overflow: hidden;
}
.psp-est__brand::before {
	content: "";
	position: absolute;
	left: 14px;
	right: 14px;
	top: 0;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, transparent, #00829B 22%, #8FE3F2 50%, #00829B 78%, transparent);
	box-shadow: 0 0 12px 1px rgba(0, 130, 155, .75);
}
.psp-est__brand .psp-est__title { color: #E0F2F5; }
.psp-est__ico--brand { background: var(--psp-green); border-color: transparent; color: #FFFFFF; box-shadow: 0 0 16px rgba(0, 130, 155, .55); }
.psp-est__brandbody { display: flex; flex-direction: column; gap: 10px; }
.psp-est__soon { display: flex; align-items: flex-start; gap: 8px; }
.psp-est__soon > span:first-child { display: inline-flex; margin-top: 2px; color: #2BB0C9; }
.psp-est__ro { display: flex; flex-direction: column; gap: 10px; }
.psp-est__state, .psp-est__sumbrand {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border: 1px solid var(--psp-line);
	border-radius: var(--psp-r-sm);
	background: rgba(255, 255, 255, .04);
	font-size: 13px;
	color: var(--psp-text-2);
}
.psp-est__state.is-on, .psp-est__sumbrand { background: var(--psp-green-soft); border-color: rgba(0, 130, 155, .4); color: #B3E3EC; }
.psp-est__stateico, .psp-est__sumico { display: inline-flex; flex: none; color: #2BB0C9; }
.psp-sum__est .psp-fam { border-bottom: 0; }
@media (max-width: 1279px) {
	/* táctil: ningún texto por debajo de 12 px */
	.psp-est__n { font-size: 12px; }
	.psp-est__more .psp-btn { height: 44px; }
}

/* =============================================================== plantillas */
.psp-tpl {
	margin-bottom: 12px;
	border: 1px solid var(--psp-line);
	border-radius: var(--psp-r);
	background: var(--psp-carbon-3);
	overflow: hidden;
	transition: border-color var(--psp-t), box-shadow var(--psp-t);
}
.psp-tpl:hover { border-color: rgba(0, 130, 155, .4); box-shadow: var(--psp-sh-2); }
.psp-tpl__plan { background: #fff; border-bottom: 1px solid var(--psp-line); }
.psp-tpl__canvas { display: block; width: 100%; height: 128px; }
.psp-tpl__body { padding: 11px 12px 12px; }
.psp-tpl__head { display: flex; align-items: center; gap: 8px; }
.psp-tpl__ico { display: inline-flex; color: var(--psp-green-text); }
.psp-tpl__name { font-size: 15px; color: #fff; }
.psp-tpl__desc { margin-top: 5px; font-size: 12.5px; color: var(--psp-text-3); line-height: 1.45; }
.psp-tpl__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; }
.psp-tpl__size { font-size: 12px; color: #2BB0C9; font-variant-numeric: tabular-nums; }

/* ============================================================== propiedades */
.psp-props__head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.psp-props__dot { width: 12px; height: 12px; margin-top: 5px; border-radius: 4px; flex: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .06); }
.psp-props__title { font-size: 17px; color: #fff; line-height: 1.25; }
.psp-props__sub { font-size: 12px; color: var(--psp-text-3); margin-top: 2px; }
.psp-sec {
	margin-bottom: 12px;
	border: 1px solid var(--psp-line);
	border-radius: var(--psp-r);
	background: rgba(255, 255, 255, .025);
	overflow: hidden;
}
.psp-sec__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--psp-line); background: rgba(0, 0, 0, .16); }
.psp-sec__title { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--psp-text-2); font-weight: 600; }
.psp-sec__aside { font-size: 11.5px; color: var(--psp-text-3); font-variant-numeric: tabular-nums; }
.psp-sec__body { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.psp-field { display: flex; flex-direction: column; gap: 5px; }
.psp-field--inline { flex-direction: row; align-items: center; justify-content: space-between; }
.psp-field__label { font-size: 11.5px; color: var(--psp-text-3); font-weight: 500; }
.psp-field__hint { font-size: 11px; color: var(--psp-text-3); }
.psp-fields--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.psp-input, .psp-select {
	width: 100%;
	height: 34px;
	padding: 0 10px;
	border: 1px solid var(--psp-line);
	border-radius: 8px;
	background: rgba(0, 0, 0, .3);
	color: var(--psp-text);
	transition: border-color var(--psp-t), background var(--psp-t);
}
.psp-input:focus, .psp-select:focus { border-color: rgba(0, 130, 155, .65); background: rgba(0, 0, 0, .42); }
.psp-select { appearance: none; padding-right: 26px; background-image: linear-gradient(45deg, transparent 50%, var(--psp-text-3) 50%), linear-gradient(135deg, var(--psp-text-3) 50%, transparent 50%); background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.psp-num { position: relative; display: flex; align-items: center; }
.psp-num__i {
	width: 100%;
	height: 34px;
	padding: 0 32px 0 10px;
	border: 1px solid var(--psp-line);
	border-radius: 8px;
	background: rgba(0, 0, 0, .3);
	color: var(--psp-text);
	font-variant-numeric: tabular-nums;
	transition: border-color var(--psp-t), background var(--psp-t);
}
.psp-num__i:focus { border-color: rgba(0, 130, 155, .65); background: rgba(0, 0, 0, .42); }
.psp-num__u { position: absolute; right: 10px; font-size: 11.5px; color: var(--psp-text-3); pointer-events: none; }
.psp-color { width: 100%; height: 34px; padding: 3px; border: 1px solid var(--psp-line); border-radius: 8px; background: rgba(0, 0, 0, .3); cursor: pointer; }
.psp-field--inline .psp-color { width: 64px; }
.psp-switch {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 34px;
	padding: 0 10px;
	border: 1px solid var(--psp-line);
	border-radius: 8px;
	background: rgba(0, 0, 0, .2);
	cursor: pointer;
	user-select: none;
	transition: border-color var(--psp-t), background var(--psp-t);
}
.psp-switch:hover { background: rgba(255, 255, 255, .05); }
.psp-switch__i { position: absolute; opacity: 0; width: 0; height: 0; }
.psp-switch__track {
	position: relative;
	flex: none;
	width: 34px;
	height: 19px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .13);
	transition: background var(--psp-t);
}
.psp-switch__knob {
	position: absolute;
	top: 2.5px;
	left: 2.5px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #C8CFD5;
	transition: transform var(--psp-t), background var(--psp-t);
}
.psp-switch__i:checked + .psp-switch__track { background: var(--psp-green); }
.psp-switch__i:checked + .psp-switch__track .psp-switch__knob { transform: translateX(15px); background: #10140A; }
.psp-switch__i:focus-visible + .psp-switch__track { outline: 2px solid var(--psp-green); outline-offset: 2px; }
.psp-switch__t { font-size: 13px; color: var(--psp-text-2); }
.psp-switch--compact { min-height: 28px; border: 0; background: transparent; padding: 0; }
.psp-kv { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; font-size: 12.5px; }
.psp-kv__k { color: var(--psp-text-3); }
.psp-kv__v { color: var(--psp-text); text-align: right; word-break: break-word; }
.psp-link { display: inline-flex; align-items: center; gap: 7px; color: #2BB0C9; font-size: 12.5px; font-weight: 500; text-decoration: none; }
.psp-link:hover { text-decoration: underline; }
.psp-quick { display: flex; flex-direction: column; gap: 7px; }
.psp-quick .psp-btn { justify-content: flex-start; border: 1px solid var(--psp-line); }
.psp-quick .psp-btn--wide { justify-content: flex-start; }
.psp-status-pill {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 12px;
	padding: 8px 11px;
	border-radius: 10px;
	font-size: 12.5px;
	font-weight: 500;
	border: 1px solid transparent;
}
.psp-status-pill--ok { background: rgba(0, 130, 155, .13); border-color: rgba(0, 130, 155, .3); color: #7FD3E4; }
.psp-status-pill--warn { background: rgba(224, 165, 58, .13); border-color: rgba(224, 165, 58, .3); color: #E9BE6E; }
.psp-status-pill--bad { background: rgba(224, 91, 76, .13); border-color: rgba(224, 91, 76, .32); color: #F0A79C; }
.psp-status-pill__zone { color: var(--psp-text-3); font-weight: 400; }
.psp-zonechips { display: flex; flex-wrap: wrap; gap: 6px; }
.psp-zonechip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 27px;
	padding: 0 9px;
	border: 1px solid var(--psp-line);
	border-radius: 999px;
	background: rgba(255, 255, 255, .03);
	color: var(--psp-text-2);
	font-size: 12px;
	cursor: pointer;
	transition: background var(--psp-t), border-color var(--psp-t), color var(--psp-t);
}
.psp-zonechip:hover { background: rgba(255, 255, 255, .08); color: var(--psp-text); }
.psp-zonechip.is-active { background: rgba(255, 255, 255, .1); border-color: var(--psp-line-2); color: #fff; }
.psp-zonechip__dot { width: 9px; height: 9px; border-radius: 3px; }
.psp-rotrow { display: flex; gap: 12px; align-items: flex-start; }
.psp-rotrow__fields { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.psp-rotquick { display: flex; gap: 6px; }
.psp-rotquick .psp-btn { flex: 1; justify-content: center; border: 1px solid var(--psp-line); height: 30px; }
.psp-dial { position: relative; width: 92px; flex: none; cursor: grab; user-select: none; }
.psp-dial.is-drag { cursor: grabbing; }
.psp-dial__svg { display: block; touch-action: none; }
.psp-dial__v {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	font-size: 12px;
	font-weight: 700;
	color: #fff;
	font-variant-numeric: tabular-nums;
	pointer-events: none;
	background: rgba(17, 19, 21, .7);
	padding: 1px 5px;
	border-radius: 5px;
}

/* ================================================================= resumen */
.psp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.psp-stat {
	padding: 11px 12px;
	border: 1px solid var(--psp-line);
	border-radius: var(--psp-r);
	background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
}
.psp-stat__v { display: block; font-family: Oswald, Inter, sans-serif; font-size: 20px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.psp-stat__k { display: block; margin-top: 2px; font-size: 11px; color: var(--psp-text-3); letter-spacing: .02em; }
.psp-bar { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.psp-bar__fill { display: block; height: 100%; border-radius: 999px; background: var(--psp-green); transition: width var(--psp-t-slow); }
.psp-bar--warn .psp-bar__fill { background: var(--psp-amber); }
.psp-bar--bad .psp-bar__fill { background: var(--psp-red); }
.psp-zrow {
	display: block;
	width: 100%;
	text-align: left;
	padding: 9px 10px;
	margin-bottom: 7px;
	border: 1px solid var(--psp-line);
	border-radius: 10px;
	background: rgba(255, 255, 255, .025);
	cursor: pointer;
	transition: background var(--psp-t), border-color var(--psp-t);
}
.psp-zrow:hover { background: rgba(255, 255, 255, .06); border-color: var(--psp-line-2); }
.psp-zrow__top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.psp-zrow__dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.psp-zrow__dot--out { background: repeating-linear-gradient(45deg, #7C8791, #7C8791 2px, transparent 2px, transparent 4px); }
.psp-zrow__n { flex: 1; font-size: 13px; font-weight: 600; color: var(--psp-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psp-zrow__a { font-size: 12px; color: var(--psp-text-3); font-variant-numeric: tabular-nums; }
.psp-zrow__bot { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11.5px; color: var(--psp-text-3); }
.psp-fam { border-bottom: 1px solid var(--psp-line); }
.psp-fam:last-child { border-bottom: 0; }
.psp-fam__sum { display: flex; align-items: center; gap: 8px; padding: 9px 2px; cursor: pointer; list-style: none; }
.psp-fam__sum::-webkit-details-marker { display: none; }
.psp-fam__sum::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--psp-text-3); border-bottom: 2px solid var(--psp-text-3); transform: rotate(-45deg); transition: transform var(--psp-t); }
.psp-fam[open] .psp-fam__sum::after { transform: rotate(45deg); }
.psp-fam__dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.psp-fam__n { flex: 1; font-size: 13px; font-weight: 600; }
.psp-fam__q { font-size: 12px; font-weight: 700; color: #2BB0C9; font-variant-numeric: tabular-nums; }
.psp-fam__list { margin: 0 0 8px; padding: 0 0 0 18px; list-style: none; }
.psp-fam__i { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 12px; color: var(--psp-text-2); }
.psp-fam__c { color: var(--psp-text-3); font-variant-numeric: tabular-nums; }
.psp-alert {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 8px 9px;
	margin-bottom: 7px;
	border: 1px solid transparent;
	border-radius: 10px;
	font-size: 12.5px;
	line-height: 1.35;
}
.psp-alert__t { flex: 1; }
.psp-alert__ico { display: inline-flex; flex: none; }
.psp-alert .psp-btn { height: 26px; padding: 0 9px; border: 1px solid currentColor; font-size: 12px; }
.psp-alert--error { background: rgba(224, 91, 76, .12); border-color: rgba(224, 91, 76, .3); color: #F0A79C; }
.psp-alert--warn { background: rgba(224, 165, 58, .1); border-color: rgba(224, 165, 58, .26); color: #E9BE6E; }
.psp-alert--info { background: rgba(79, 163, 224, .1); border-color: rgba(79, 163, 224, .25); color: #9BCDF0; }
.psp-note { font-size: 12.5px; color: var(--psp-text-3); line-height: 1.5; }
.psp-note--ok { display: flex; align-items: center; gap: 8px; color: #7FD3E4; }
.psp-sum__cta { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--psp-line); }
.psp-sum__cta .psp-btn--primary { height: 44px; font-size: 14.5px; }
.psp-sum__legal { margin-top: 8px; font-size: 11px; color: var(--psp-text-3); text-align: center; line-height: 1.45; }

/* ¿cuántas caben? */
.psp-cap { border-color: rgba(0, 130, 155, .3); background: linear-gradient(160deg, rgba(0, 130, 155, .09), rgba(255, 255, 255, .02)); }
.psp-cap .psp-sec__head { background: rgba(0, 130, 155, .12); border-bottom-color: rgba(0, 130, 155, .2); }
.psp-cap .psp-sec__title { color: #7FD3E4; }
.psp-cap__pick { position: relative; }
.psp-cap__results { position: absolute; z-index: 15; left: 0; right: 0; top: calc(100% + 4px); background: var(--psp-carbon-3); border: 1px solid var(--psp-line-2); border-radius: 10px; overflow: hidden; box-shadow: var(--psp-sh-2); }
.psp-cap__results:empty { display: none; }
.psp-cap__opt { display: flex; flex-direction: column; gap: 1px; width: 100%; padding: 7px 10px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.psp-cap__opt:hover { background: rgba(0, 130, 155, .15); }
.psp-cap__optn { font-size: 12.5px; font-weight: 600; color: var(--psp-text); }
.psp-cap__optd { font-size: 11px; color: var(--psp-text-3); }
.psp-cap__pill { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 11px; border: 1px solid var(--psp-line-2); border-radius: 10px; background: rgba(0, 0, 0, .25); }
.psp-cap__pillname { flex: 1; font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psp-cap__pilldim { font-size: 11px; color: #2BB0C9; font-variant-numeric: tabular-nums; }
.psp-cap__pill .psp-btn--icon { width: 26px; height: 26px; }
.psp-cap__res { text-align: center; padding: 10px 0 2px; overflow: visible; }
.psp-cap__big { display: flex; align-items: baseline; justify-content: center; gap: 8px; line-height: 1.2; }
.psp-cap__big strong { font-family: Oswald, Inter, sans-serif; font-size: 40px; font-weight: 700; color: var(--psp-green-text); line-height: 1.15; }
.psp-cap__big span { font-size: 13px; color: var(--psp-text-2); }
.psp-cap__hint { margin: 6px 0 10px; font-size: 11.5px; color: var(--psp-text-3); }
.psp-cap__res--none { display: flex; align-items: center; gap: 9px; text-align: left; color: #E9BE6E; font-size: 12.5px; }

/* estado vacío del panel */
.psp-blank { padding: 26px 16px; text-align: center; }
.psp-blank__ico { display: inline-flex; padding: 12px; border-radius: 50%; background: rgba(255, 255, 255, .05); color: var(--psp-text-3); margin-bottom: 10px; }
.psp-blank__t { font-size: 14px; font-weight: 600; color: var(--psp-text); }
.psp-blank__s { margin-top: 5px; font-size: 12.5px; color: var(--psp-text-3); line-height: 1.5; }
.psp-blank .psp-btn { margin-top: 12px; border: 1px solid var(--psp-line); }

/* ================================================================== menús */
.psp-menu {
	position: absolute;
	z-index: 60;
	min-width: 224px;
	padding: 6px;
	border: 1px solid var(--psp-line-2);
	border-radius: var(--psp-r);
	background: #191D20;
	box-shadow: var(--psp-sh-3);
	animation: psp-pop var(--psp-t) both;
}
.psp-menu__item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	height: 34px;
	padding: 0 10px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--psp-text-2);
	font-size: 13px;
	text-align: left;
	cursor: pointer;
	transition: background var(--psp-t), color var(--psp-t);
}
.psp-menu__item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.psp-menu__item--danger:hover { background: rgba(224, 91, 76, .16); color: #F0A79C; }
.psp-menu__t { flex: 1; }
.psp-menu__gap { width: 17px; }
.psp-menu__sep { height: 1px; margin: 5px 6px; background: var(--psp-line); }
@keyframes psp-pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

/* ================================================================= modales */
.psp-modals { position: absolute; inset: 0; z-index: 70; pointer-events: none; }
.psp-modalback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(8, 10, 11, .66);
	backdrop-filter: blur(3px);
	pointer-events: auto;
	animation: psp-fade var(--psp-t) both;
}
.psp-modalback.is-out { animation: psp-fade var(--psp-t) reverse both; }
.psp-modal {
	display: flex;
	flex-direction: column;
	width: min(640px, 100%);
	max-height: 100%;
	border: 1px solid var(--psp-line-2);
	border-radius: var(--psp-r-lg);
	background: #191D20;
	box-shadow: var(--psp-sh-3);
	animation: psp-rise var(--psp-t-slow) both;
	overflow: hidden;
}
.psp-modalback--sm .psp-modal { width: min(440px, 100%); }
.psp-modalback--lg .psp-modal { width: min(880px, 100%); }
.psp-modal__head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 18px 12px; }
.psp-modal__titles { flex: 1; }
.psp-modal__title { font-size: 21px; color: #fff; }
.psp-modal__sub { margin-top: 3px; font-size: 13px; color: var(--psp-text-3); }
.psp-modal__body { padding: 0 18px 4px; overflow-y: auto; }
.psp-modal__text { font-size: 14px; color: var(--psp-text-2); line-height: 1.55; margin-bottom: 12px; }
.psp-modal__foot { display: flex; align-items: center; gap: 8px; padding: 14px 18px 18px; }
.psp-modal__foot:empty { display: none; }
.psp-modal--ask .psp-modal__foot { justify-content: flex-end; }
@keyframes psp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes psp-rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

/* atajos */
.psp-keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; padding-bottom: 8px; }
.psp-keys__t { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--psp-green-text); margin-bottom: 8px; }
.psp-keys__list { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; margin: 0; }
.psp-keys__k { margin: 0; }
.psp-keys__d { margin: 0; font-size: 12.5px; color: var(--psp-text-2); align-self: center; }
.psp-app kbd {
	display: inline-block;
	min-width: 22px;
	padding: 2px 6px;
	border: 1px solid var(--psp-line-2);
	border-bottom-width: 2px;
	border-radius: 6px;
	background: rgba(0, 0, 0, .3);
	font-family: inherit;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--psp-text);
	text-align: center;
}

/* =============================================================== asistente */
.psp-wiz { padding-bottom: 6px; }
.psp-wiz__bar { margin-bottom: 14px; }
.psp-wiz__dots { display: flex; gap: 22px; margin: 0 0 16px; padding: 0; list-style: none; }
.psp-wiz__dot { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--psp-text-3); }
.psp-wiz__dotn {
	width: 22px;
	height: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: 1px solid var(--psp-line-2);
	font-size: 11.5px;
	font-weight: 700;
}
.psp-wiz__dot.is-active { color: #fff; }
.psp-wiz__dot.is-active .psp-wiz__dotn { background: var(--psp-green); color: #FFFFFF; border-color: transparent; }
.psp-wiz__dot.is-done .psp-wiz__dotn { background: rgba(0, 130, 155, .22); color: #7FD3E4; border-color: rgba(0, 130, 155, .4); }
.psp-wiz__cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.psp-wiz__steps { display: flex; flex-direction: column; gap: 12px; }
.psp-wiz__h { font-size: 16px; color: #fff; }
.psp-wiz__p { font-size: 12.5px; color: var(--psp-text-3); line-height: 1.5; }
.psp-wiz__preview { border: 1px solid var(--psp-line); border-radius: var(--psp-r); overflow: hidden; background: #fff; }
.psp-wiz__canvas { display: block; width: 100%; height: 230px; }
.psp-wiz__caption { padding: 7px 10px; font-size: 11px; color: var(--psp-text-3); background: var(--psp-carbon-3); border-top: 1px solid var(--psp-line); }
.psp-shapes { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 9px; }
.psp-shape {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
	padding: 12px;
	border: 1px solid var(--psp-line);
	border-radius: var(--psp-r);
	background: rgba(255, 255, 255, .025);
	color: var(--psp-text-3);
	cursor: pointer;
	text-align: left;
	transition: border-color var(--psp-t), background var(--psp-t), transform var(--psp-t);
}
.psp-shape:hover { background: rgba(255, 255, 255, .06); transform: translateY(-2px); }
.psp-shape.is-active { border-color: var(--psp-green); background: var(--psp-green-soft); color: var(--psp-green-text); }
.psp-shape__svg { margin-bottom: 6px; }
.psp-shape__n { font-size: 13.5px; font-weight: 600; color: var(--psp-text); }
.psp-shape__d { font-size: 11.5px; color: var(--psp-text-3); }
.psp-modal--wizard .psp-stats { margin-bottom: 0; grid-template-columns: repeat(3, 1fr); }

/* =================================================================== avisos */
.psp-toasts {
	position: absolute;
	z-index: 80;
	right: 16px;
	bottom: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: flex-end;
	pointer-events: none;
}
.psp-toast {
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 380px;
	padding: 10px 8px 10px 12px;
	border: 1px solid var(--psp-line-2);
	border-left: 3px solid var(--psp-text-3);
	border-radius: var(--psp-r);
	background: #191D20;
	color: var(--psp-text);
	font-size: 13px;
	line-height: 1.4;
	box-shadow: var(--psp-sh-3);
	pointer-events: auto;
	animation: psp-slide var(--psp-t-slow) both;
}
.psp-toast.is-out { animation: psp-slide var(--psp-t) reverse both; }
.psp-toast__t { flex: 1; }
.psp-toast__ico { display: inline-flex; flex: none; }
.psp-toast .psp-btn--icon { width: 28px; height: 28px; }
.psp-toast--success { border-left-color: var(--psp-green); }
.psp-toast--success .psp-toast__ico { color: var(--psp-green-text); }
.psp-toast--warn { border-left-color: var(--psp-amber); }
.psp-toast--warn .psp-toast__ico { color: var(--psp-amber); }
.psp-toast--error { border-left-color: var(--psp-red); }
.psp-toast--error .psp-toast__ico { color: var(--psp-red); }
.psp-toast--info .psp-toast__ico { color: var(--psp-blue); }
@keyframes psp-slide { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* ocupado */
.psp-busy {
	position: absolute;
	inset: 0;
	z-index: 90;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(8, 10, 11, .6);
	backdrop-filter: blur(2px);
}
.psp-busy.is-on { display: flex; }
.psp-busy__box { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border: 1px solid var(--psp-line-2); border-radius: var(--psp-r); background: #191D20; box-shadow: var(--psp-sh-3); }
.psp-busy__t { font-size: 13.5px; }
.psp-spinner {
	width: 20px;
	height: 20px;
	border: 2.5px solid rgba(255, 255, 255, .15);
	border-top-color: var(--psp-green);
	border-radius: 50%;
	animation: psp-spin .8s linear infinite;
}
@keyframes psp-spin { to { transform: rotate(360deg); } }

/* ============================================================== responsive */
/* Tres tramos (SPEC §2): ≥1280 interfaz completa · 768–1279 cajón + carril compacto ·
   <768 modo lectura. Por debajo de 1280 se supone pantalla táctil: todos los objetivos
   pasan a 44 px de lado y ningún texto baja de 12 px. */

/* ------------------------------------------------- tablet: 768 – 1279 px */
@media (max-width: 1279px) {
	.psp-app {
		/* el cajón lleva además el botón de cerrar (44 px): con cinco pestañas a 12 px
		   hacen falta unos 392 px para que ninguna se corte */
		--psp-panel-w: 392px;
		--psp-rail-w: 52px;
		--psp-status-h: 48px;
		/* sin zoom de doble toque ni rebotes del navegador sobre la interfaz */
		touch-action: manipulation;
	}
	.psp-body { grid-template-columns: var(--psp-rail-w) minmax(0, 1fr); }
	/* el lienzo se queda los gestos de uno y dos dedos: la página no hace zoom ni rebota */
	.psp-stage, .psp-stage__layer { touch-action: none; }
	.psp-panel {
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		width: var(--psp-panel-w);
		max-width: 92vw;
		transform: translateX(101%);
		box-shadow: var(--psp-sh-3);
		transition: transform var(--psp-t-slow);
		/* capa propia: evita que el lienzo (compuesto) se cuele por encima del cajón */
		will-change: transform;
	}
	.psp-app--drawer .psp-panel { transform: translateX(0); }
	.psp-panel__close { display: inline-flex; width: 44px; height: 44px; }
	.psp-drawerbtn { display: flex; height: 52px; padding: 0 16px 0 14px; }
	.psp-drawerbtn__ico { display: inline-flex; }
	.psp-app--drawer .psp-drawerbtn { opacity: 0; visibility: hidden; pointer-events: none; }
	.psp-brand__claim { display: none; }
	/* el carril se compacta pero sus botones siguen siendo cómodos con el dedo */
	.psp-rail { padding: 6px 0; gap: 2px; }
	.psp-rail__sep { width: 22px; margin: 3px 0; }
	.psp-tool { width: 44px; height: 44px; border-radius: 12px; }
	.psp-tool.is-active::before { left: -7px; }
	/* cajón: dos filas de pestañas de 44 px (objetivo táctil) y la X a la derecha */
	.psp-tabs { gap: 5px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) minmax(0, 1fr); }
	.psp-tab { font-size: 12.5px; padding: 0 6px; height: 44px; }
	.psp-panel__head { padding: 8px 6px 8px 8px; align-items: flex-start; }
	.psp-topbar .psp-btn--ghost .psp-btn__t { display: none; }
	.psp-topbar .psp-btn--ghost { width: 44px; height: 44px; padding: 0; justify-content: center; }
	.psp-topbar .psp-btn--primary { height: 44px; }
	.psp-seg__btn { height: 44px; }
	.psp-project__btn, .psp-project__input { max-width: 170px; width: 170px; height: 44px; }
	.psp-status .psp-btn { height: 44px; }
	.psp-status .psp-btn--icon { width: 44px; }
	.psp-zoom__v { height: 44px; min-width: 66px; }
	.psp-status__sep { height: 22px; }
	/* la barra inferior no cabe entera: fuera las coordenadas y la ayuda de atajos */
	.psp-coords { display: none; }

	/* --- objetivos táctiles de 44 px en todo lo que se toca --- */
	.psp-modal__head .psp-btn, .psp-search__clear, .psp-color { width: 44px; height: 44px; }
	.psp-search__clear { right: 1px; }
	.psp-color { width: 100%; }
	.psp-field--inline .psp-color { width: 64px; }
	.psp-input, .psp-select, .psp-num__i, .psp-search__i { height: 46px; font-size: 16px; }
	.psp-chip { height: 44px; padding: 0 12px; }
	.psp-chips { gap: 7px; padding-bottom: 8px; }
	.psp-zrow { padding: 12px; }
	.psp-fam__sum { padding: 13px 2px; }
	.psp-alert .psp-btn { height: 44px; min-width: 48px; justify-content: center; }
	.psp-modal__foot .psp-btn { height: 44px; }
	.psp-empty__actions .psp-btn { height: 46px; }
	.psp-rotquick .psp-btn, .psp-quick .psp-btn, .psp-btn--solid, .psp-btn--wide { height: 44px; }
	/* la barra flotante del 3D: botones grandes y deslizante si no cabe */
	.psp-3dbar { max-width: calc(100% - 24px); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
	.psp-3dbar::-webkit-scrollbar { display: none; }
	.psp-3dbar > * { flex: none; }
	.psp-3dbar .psp-btn { height: 44px; }
	.psp-3dbar .psp-seg__btn { height: 44px; padding: 0 14px; font-size: 13px; }

	/* --- ningún texto por debajo de 12 px --- */
	.psp-readonly__t, .psp-stat__k, .psp-card__meta, .psp-card__dims, .psp-cat__count,
	.psp-chip__n, .psp-sec__aside, .psp-sec__title, .psp-zrow__a, .psp-zrow__bot, .psp-fam__c,
	.psp-fam__i, .psp-sum__legal, .psp-badge, .psp-badge--nodims, .psp-field__label, .psp-field__hint, .psp-num__u,
	.psp-btn__badge, .psp-wiz__caption, .psp-wiz__dot, .psp-shape__d, .psp-kv, .psp-note,
	.psp-pane__lead, .psp-props__sub, .psp-tpl__size, .psp-tpl__desc, .psp-status-pill,
	.psp-keys__d, .psp-keys__t, .psp-modal__sub, .psp-alert, .psp-zonechip, .psp-switch__t,
	.psp-app kbd, .psp-menu__i, .psp-toast__t, .psp-coords, .psp-cap__opt { font-size: 12px; }
	.psp-card__name { font-size: 13px; }
	/* el botón verde de presupuesto siempre a mano al final del Resumen: se queda pegado
	   abajo del panel (sin relleno inferior, para que "bottom: 0" case con el borde) */
	.psp-pane[data-pane="resumen"] .psp-pane__scroll { padding-bottom: 0; }
	.psp-sum__cta {
		position: sticky;
		bottom: 0;
		z-index: 2;
		margin-top: 20px;
		padding: 12px 0 12px;
		background: var(--psp-carbon-2);
	}
}
@media (max-width: 1099px) {
	.psp-status [data-act="shortcuts"] { display: none; }
	.psp-status__grp:last-child .psp-status__sep { display: none; }
}
/* Tablet estrecha: la barra superior no cabe con los objetivos táctiles grandes,
   así que se queda solo la marca en símbolo y el nombre del proyecto más corto. */
@media (max-width: 1023px) {
	.psp-topbar { gap: 4px; padding: 0 10px; }
	.psp-brand__name { display: none; }
	.psp-topbar .psp-btn--primary .psp-btn__t { display: none; }
	.psp-project__btn, .psp-project__input { max-width: 150px; width: 150px; }
}

/* --------------------------------------- móvil: < 768 px · modo lectura */
@media (max-width: 767px) {
	.psp-app { --psp-top-h: 56px; --psp-status-h: 52px; }
	.psp-rail { display: none; }
	.psp-body { grid-template-columns: minmax(0, 1fr); }
	.psp-readonly {
		display: flex;
		align-items: flex-start;
		gap: 8px;
		padding: 10px 12px;
		background: rgba(224, 165, 58, .12);
		border-bottom: 1px solid rgba(224, 165, 58, .25);
		color: #E9BE6E;
		font-size: 12.5px;
		line-height: 1.4;
	}
	.psp-readonly__ico { flex: none; margin-top: 1px; }

	/* barra superior mínima: marca, 2D|3D y el botón verde de presupuesto */
	.psp-topbar { padding: 0 10px; gap: 6px; }
	.psp-topbar__sep, .psp-project, .psp-topbar__group, .psp-coords { display: none; }
	.psp-topbar .psp-btn--ghost { display: none; }
	/* La pantalla completa sí se queda: en un teléfono es donde más alto gana. */
	.psp-topbar .psp-btn--ghost[data-act="fullscreen"] { display: inline-flex; width: 44px; height: 44px; padding: 0; }
	.psp-topbar .psp-btn--primary { height: 44px; min-width: 52px; padding: 0 12px; }
	.psp-seg__btn { height: 44px; padding: 0 16px; font-size: 14px; }
	.psp-brand__name { font-size: 15px; letter-spacing: .1em; }

	/* barra inferior: solo zoom y encuadrar, con objetivos grandes */
	.psp-status { gap: 6px; padding: 0 8px; }
	.psp-status__grp:last-child { display: none; }
	.psp-status .psp-btn { height: 44px; }
	.psp-status .psp-btn--icon { width: 44px; }
	.psp-zoom__v { height: 44px; min-width: 70px; font-size: 13px; }

	/* cajón desde abajo */
	.psp-panel {
		width: 100%;
		max-width: none;
		height: 82%;
		top: auto;
		border-radius: 18px 18px 0 0;
		border-left: 0;
		border-top: 1px solid var(--psp-line-2);
		transform: translateY(101%);
	}
	.psp-app--drawer .psp-panel { transform: translateY(0); }
	.psp-panel__head { padding: 10px 8px 10px 10px; }
	.psp-tab { height: 44px; font-size: 13.5px; padding: 0 10px; }
	/* quedan cuatro pestañas (Catálogo, Tu presupuesto, Estética y Resumen): rejilla de 2 × 2 */
	.psp-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
	/* de las seis pestañas se ocultan Plantillas y Propiedades (en el móvil no se edita) */
	.psp-app--read .psp-tab[data-tab="plantillas"], .psp-app--read .psp-tab[data-tab="propiedades"] { display: none; }
	/* nada de colocar ni de auto-rellenar desde el móvil */
	.psp-app--read .psp-btn--add, .psp-app--read .psp-cap { display: none; }
	.psp-app--read .psp-empty__actions [data-act="templates"] { display: none; }
	.psp-cat__lead { margin-top: 10px; }
	.psp-card { cursor: default; }
	.psp-card:hover { transform: none; }

	/* botón del cajón: por encima de la barra inferior y de la barra 3D */
	.psp-drawerbtn {
		top: auto;
		bottom: calc(var(--psp-status-h) + 14px);
		right: 12px;
		height: 52px;
		border-radius: 14px;
		border-right: 1px solid var(--psp-line-2);
	}
	.psp-app[data-view="3d"] .psp-drawerbtn { bottom: calc(var(--psp-status-h) + 84px); }

	/* barra flotante del 3D: una tira a lo ancho que se desliza si no cabe */
	.psp-3dbar {
		left: 8px;
		right: 8px;
		bottom: 10px;
		max-width: none;
		transform: translate(0, 14px);
		gap: 6px;
		padding: 7px;
		border-radius: 14px;
	}
	.psp-app[data-view="3d"] .psp-3dbar { transform: translate(0, 0); }
	/* en el móvil solo las vistas y la vuelta a 2D: lo demás no cabe y no hace falta */
	.psp-3dbar .psp-btn--chip { display: none; }

	/* rejilla del catálogo y modales */
	.psp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.psp-wiz__cols { grid-template-columns: minmax(0, 1fr); }
	.psp-wiz__canvas { height: 170px; }
	.psp-wiz__dots { gap: 14px; }
	/* arriba, no abajo: con el teclado del móvil abierto los campos siguen a la vista */
	.psp-modalback { padding: 8px; align-items: flex-start; }
	.psp-modal { max-height: 100%; border-radius: 18px; }
	.psp-modal__head { padding: 16px 14px 10px; }
	.psp-modal__body { padding: 0 14px 4px; }
	.psp-modal__foot { padding: 12px 14px 16px; gap: 6px; flex-wrap: wrap; }
	.psp-modal__title { font-size: 19px; }
	.psp-toasts { left: 12px; right: 12px; bottom: 12px; align-items: stretch; }
	.psp-toast { max-width: none; }
	.psp-empty__card { padding: 20px; }
	.psp-empty__title { font-size: 21px; }
	.psp-keys { grid-template-columns: minmax(0, 1fr); }
	.psp-shape { padding: 12px; }
	.psp-stat__v { font-size: 19px; }
}

/* ------------------------------------------- móvil estrecho: < 380 px */
@media (max-width: 379px) {
	.psp-app { --psp-top-h: 54px; }
	.psp-brand__name { display: none; }
	.psp-seg__btn { padding: 0 12px; }
	.psp-topbar .psp-btn--primary { padding: 0 10px; }
	.psp-status .psp-btn--ghost .psp-btn__t { display: none; }
	.psp-status .psp-btn--ghost { width: 44px; padding: 0; justify-content: center; }
}

/* ======================================================= movimiento reducido */
@media (prefers-reduced-motion: reduce) {
	.psp-app *, .psp-app *::before, .psp-app *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
	}
}

/* ===========================================================================
   Armadura contra el tema de la tienda (Woodmart)
   ---------------------------------------------------------------------------
   Woodmart inyecta base.css DESPUÉS de nuestras hojas con reglas del tipo
   :is(.btn,.button,button,[type=submit]) — misma especificidad que las nuestras,
   así que ganaba por orden y nos ponía los botones en MAYÚSCULAS, con otra
   tipografía y otros radios. Aquí se reafirma lo nuestro con el id del
   contenedor por delante (gana siempre), sin tocar el resto del diseño.
   =========================================================================== */
#ps-planner button,
#ps-planner .psp-btn,
#ps-planner .psp-tool,
#ps-planner .psp-tab,
#ps-planner .psp-chip,
#ps-planner .psp-seg__btn,
#ps-planner .psp-shape,
#ps-planner input,
#ps-planner select,
#ps-planner textarea {
	text-transform: none;
	letter-spacing: normal;
	font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	line-height: normal;
	text-shadow: none;
	min-height: 0;
}
/* Los dos rótulos que sí van en mayúsculas por diseño propio. */
#ps-planner .psp-sec__title,
#ps-planner .psp-keys__t {
	text-transform: uppercase;
}
#ps-planner input,
#ps-planner select,
#ps-planner textarea {
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
}
#ps-planner button:hover,
#ps-planner .psp-btn:hover {
	text-decoration: none;
}
/* Enlaces de «Tu presupuesto» (a la tienda y a la ficha): el tema les pone su color y subrayado. */
#ps-planner a.psp-link { color: #2BB0C9; text-decoration: none; }
#ps-planner a.psp-link:hover { color: #7FD3E4; text-decoration: underline; }
#ps-planner a.psp-btn { text-decoration: none; }
/* Muestras de estilo de la imagen Panthera (Estética y Propiedades del logo del suelo): el tema
   las ponía en fila (display:flex) y el nombre salía cortado al lado de la miniatura. */
#ps-planner .psp-marca__muestra {
	display: block;
	width: 100%;
	height: auto;
	text-align: center;
}

/* Geometría de los campos: el tema los deja a 15px de relleno, sin radio y sin
   fondo, y el texto se montaba encima de la lupa del buscador. Se reafirma. */
#ps-planner .psp-input,
#ps-planner .psp-select {
	height: 34px;
	padding: 0 10px;
	border: 1px solid var(--psp-line);
	border-radius: 8px;
	background-color: rgba(0, 0, 0, .3);
}
#ps-planner .psp-select { padding-right: 26px; }
#ps-planner .psp-num__i {
	height: 34px;
	padding: 0 32px 0 10px;
	border: 1px solid var(--psp-line);
	border-radius: 8px;
	background-color: rgba(0, 0, 0, .3);
}
#ps-planner .psp-search__i {
	height: 38px;
	padding: 0 36px;
	border: 1px solid var(--psp-line);
	border-radius: 10px;
	background-color: rgba(0, 0, 0, .28);
}
#ps-planner .psp-color { height: 34px; padding: 3px; border-radius: 8px; }
#ps-planner .psp-input:focus,
#ps-planner .psp-select:focus,
#ps-planner .psp-num__i:focus,
#ps-planner .psp-search__i:focus {
	border-color: rgba(0, 130, 155, .65);
	background-color: rgba(0, 0, 0, .42);
}
/* En táctil los campos también crecen: esta armadura lleva el id delante y ganaría
   a las consultas de medios de arriba, así que hay que repetirlas aquí. */
@media (max-width: 1279px) {
	#ps-planner .psp-input,
	#ps-planner .psp-select,
	#ps-planner .psp-num__i,
	#ps-planner .psp-search__i { height: 46px; font-size: 16px; }
	#ps-planner .psp-color { height: 44px; }
	#ps-planner .psp-search__i { padding: 0 44px; }
}
@media (max-width: 767px) {
	#ps-planner .psp-input,
	#ps-planner .psp-select,
	#ps-planner .psp-num__i,
	#ps-planner .psp-search__i { height: 46px; font-size: 16px; }
}
/* Foco: el tema pinta un contorno de puntos; el nuestro es un aro verde.
   Woodmart lo impone desde base-deferred.css con «!important» sobre el selector
   button, así que además de nuestra regla se le cambian sus propias variables:
   así, gane quien gane, el aro sale verde y continuo. */
#ps-planner .psp-app {
	--wd-otl-color: var(--psp-green);
	--wd-otl-style: solid;
	--wd-otl-width: 2px;
	--wd-otl-offset: 2px;
}
#ps-planner :focus { outline: none; }
#ps-planner :focus-visible {
	outline: 2px solid var(--psp-green) !important;
	outline-offset: 2px !important;
	border-radius: 6px;
}

/* ⚠️ Herramientas del carril: no llevaban «padding» propio, así que se colaba
   el del tema (5px 20px) y en un botón de 40 px el icono se quedaba en 0 px de
   ancho: la columna de herramientas se veía como una fila de puntitos. */
#ps-planner .psp-tool {
	padding: 0;
	gap: 0;
}
#ps-planner .psp-tool svg,
#ps-planner .psp-btn svg,
#ps-planner .psp-tab svg,
#ps-planner .psp-chip svg,
#ps-planner .psp-seg__btn svg {
	flex: none;
}

/* ===========================================================================
   Pantalla completa
   ---------------------------------------------------------------------------
   El contenedor lleva un alto en píxeles puesto por el script de la página, así
   que aquí hace falta «!important» para que el estilo gane al atributo style.
   Dos caminos: la pantalla completa del navegador (:fullscreen) y, cuando no
   está disponible (Safari en iPhone), el mismo efecto fijando el armazón.
   =========================================================================== */
#ps-planner:fullscreen,
#ps-planner:-webkit-full-screen {
	width: 100% !important;
	height: 100% !important;
	min-height: 0 !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: var(--psp-carbon, #111315);
}
#ps-planner.psp-fs-css {
	position: fixed !important;
	inset: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	height: 100dvh !important;
	min-height: 0 !important;
	max-height: none !important;
	margin: 0 !important;
	z-index: 2147483000 !important;
	background: var(--psp-carbon, #111315);
}
body.psp-fs-body { overflow: hidden !important; }
/* El botón, encendido mientras se está a pantalla completa. */
#ps-planner .psp-btn[data-act="fullscreen"].is-active {
	background: var(--psp-green-soft);
	color: #7FD3E4;
}

/* 01-10-2026 plegar el panel lateral */
.psp-body.psp-sin-panel{grid-template-columns:var(--psp-rail-w) minmax(0,1fr) 0px}
.psp-body.psp-sin-panel .psp-panel{display:none}
.psp-plegar{position:absolute;top:12px;right:calc(var(--psp-panel-w) + 12px);z-index:30;padding:9px 14px;border-radius:999px;border:1px solid rgba(255,255,255,.2);background:#1C2024;color:#F3F5F6;font:600 13px Inter,system-ui,sans-serif;cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,.35)}
.psp-plegar:hover{background:#00829B;color:#FFFFFF}
.psp-body.psp-sin-panel .psp-plegar{right:12px}
@media (max-width:1023px){.psp-plegar{display:none}}

/* 01-10-2026 cargar plano json en el asistente */
.psp-cargar-json{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 16px;padding:12px 14px;border:1px dashed rgba(0,130,155,.55);border-radius:12px;background:rgba(0,130,155,.07);font:500 14px Inter,system-ui,sans-serif}
.psp-cargar-json button{padding:9px 14px;border-radius:999px;border:0;background:#00829B;color:#FFFFFF;font:700 13px Inter,system-ui,sans-serif;cursor:pointer}
.psp-cargar-json button:hover{background:#006B80}
