/* =========================================================
   BrainDeck — 3 estilos: cosmos (default), neo (neobrutal pixel), frost
   ========================================================= */
:root, [data-theme="cosmos"] {
  --font: 'Outfit', system-ui, sans-serif;
  --font-h: 'Outfit', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --bg: #090614;
  --panel: rgba(255,255,255,.055);
  --panel2: rgba(255,255,255,.1);
  --border: rgba(255,255,255,.11);
  --text: #f4effd;
  --muted: #a79dc6;
  --accent: #ff5fae;
  --accent2: #8b6cff;
  --accent3: #3ee6ff;
  --good: #5df2b0;
  --bad: #ff6b7f;
  --on-accent: #fff;
  --input: rgba(255,255,255,.06);
  --radius: 24px;
  --radius-sm: 14px;
  --bw: 1px;
  --shadow: 0 24px 60px -24px rgba(0,0,0,.7);
  --blur: 22px;
  --glow: 0 0 18px rgba(255,95,174,.55), 0 0 50px rgba(139,108,255,.35);
  --h-weight: 600;
  color-scheme: dark;
}
[data-theme="neo"] {
  --font: 'Space Grotesk', system-ui, sans-serif;
  --font-h: 'Pixelify Sans', 'Space Grotesk', sans-serif;
  --bg: #dcf34b;
  --panel: #fffdf3;
  --panel2: #fff1bf;
  --border: #141414;
  --text: #141414;
  --muted: #55554a;
  --accent: #ff83b5;
  --accent2: #ffcf5c;
  --accent3: #8fd3ff;
  --good: #36b866;
  --bad: #ff4d5e;
  --on-accent: #141414;
  --input: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --bw: 2.5px;
  --shadow: 6px 6px 0 #141414;
  --blur: 0px;
  --glow: none;
  --h-weight: 700;
  color-scheme: light;
}
[data-theme="paper"] {
  --font: 'Courier Prime', 'Courier New', ui-monospace, monospace;
  --font-h: 'Silkscreen', 'Courier Prime', monospace;
  --mono: 'Courier Prime', 'Courier New', monospace;
  --bg: #ffffff;
  --panel: #ffffff;
  --panel2: #ececec;
  --border: #111111;
  --text: #111111;
  --muted: #555555;
  --accent: #111111;
  --accent2: #6a6a6a;
  --accent3: #d6d6d6;
  --good: #2f8f4e;
  --bad: #c62f3c;
  --on-accent: #ffffff;
  --input: #ffffff;
  --radius: 3px;
  --radius-sm: 3px;
  --bw: 2px;
  --shadow: 6px 6px 0 #111111;
  --blur: 0px;
  --glow: none;
  --h-weight: 400;
  color-scheme: light;
}
[data-theme="frost"] {
  --font: 'Inter', system-ui, sans-serif;
  --font-h: 'Inter', system-ui, sans-serif;
  --bg: #26303a;
  --panel: rgba(255,255,255,.09);
  --panel2: rgba(255,255,255,.16);
  --border: rgba(255,255,255,.16);
  --text: #ffffff;
  --muted: rgba(255,255,255,.62);
  --accent: #ffffff;
  --accent2: #c8d7e2;
  --accent3: #9fc8dc;
  --good: #9ef0c4;
  --bad: #ff9aa5;
  --on-accent: #1a232c;
  --input: rgba(255,255,255,.08);
  --radius: 22px;
  --radius-sm: 14px;
  --bw: 1px;
  --shadow: 0 30px 80px -30px rgba(0,0,0,.6);
  --blur: 34px;
  --glow: 0 0 0 1px rgba(255,255,255,.4);
  --h-weight: 800;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-h); font-weight: var(--h-weight); line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 .8em; }
/* Un título que viene después de otro bloque necesita aire arriba (más que abajo) para no quedar pegado a lo anterior.
   Las clases propias (.card h3, .cat-title h3, .stack…) tienen más especificidad y mantienen su espaciado. */
* + h3, * + h4 { margin-top: 24px; }
hr + h3, hr + h4 { margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }
::selection { background: var(--accent); color: var(--on-accent); }

/* ---------- fondo ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.stars {
  position: absolute; inset: -50%;
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff9, transparent),
    radial-gradient(1px 1px at 120px 80px, #fff7, transparent),
    radial-gradient(1.5px 1.5px at 200px 160px, #fffb, transparent),
    radial-gradient(1px 1px at 60px 220px, #fff6, transparent),
    radial-gradient(1px 1px at 260px 40px, #fff8, transparent);
  background-size: 300px 260px;
  animation: drift 120s linear infinite;
}
@keyframes drift { to { transform: translate(300px, 260px); } }
.blob { position: absolute; border-radius: 50%; filter: blur(50px); opacity: .55; animation: float 18s ease-in-out infinite alternate; }
.b1 { width: 380px; height: 380px; background: radial-gradient(circle at 35% 30%, #ffc0e3, #ff5fae 45%, #8b6cff); top: -120px; right: -80px; }
.b2 { width: 300px; height: 300px; background: radial-gradient(circle at 35% 30%, #c6b5ff, #6b4dff 50%, #2a1670); bottom: -80px; left: -60px; animation-delay: -6s; }
.b3 { width: 180px; height: 180px; background: radial-gradient(circle at 35% 30%, #c9fbff, #3ee6ff 50%, #3b5bff); top: 40%; left: 45%; opacity: .25; animation-delay: -12s; }
.b4 { width: 120px; height: 120px; background: radial-gradient(circle, #ffd29b, #ff7a7a); top: 20%; left: 10%; opacity: .25; }
@keyframes float { to { transform: translate(40px, 30px) scale(1.08); } }
.doodle { display: none; position: absolute; font-size: 54px; color: #141414; }
.d1 { top: 8%; left: 3%; } .d2 { bottom: 10%; right: 4%; font-size: 70px; } .d3 { top: 55%; left: 2%; font-size: 40px; }

[data-theme="neo"] .stars, [data-theme="neo"] .blob { display: none; }
[data-theme="neo"] .doodle { display: block; }
[data-theme="neo"] .bg { background-image: radial-gradient(#14141422 1.2px, transparent 1.3px); background-size: 22px 22px; }

[data-theme="frost"] .stars { display: none; }
[data-theme="frost"] .blob { filter: blur(90px); opacity: .9; animation-duration: 30s; }
[data-theme="frost"] .b1 { background: #6f8796; width: 70vw; height: 70vw; top: -25vw; right: -20vw; }
[data-theme="frost"] .b2 { background: #4d5b3f; width: 60vw; height: 60vw; bottom: -25vw; left: -15vw; }
[data-theme="frost"] .b3 { background: #b0874e; width: 30vw; height: 30vw; top: 10%; left: 20%; opacity: .45; }
[data-theme="frost"] .b4 { background: #dfe8ee; width: 22vw; height: 22vw; top: 50%; left: 60%; opacity: .25; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 22px 16px; margin: 14px; height: calc(100vh - 28px); top: 14px;
  background: var(--panel); border: var(--bw) solid var(--border); border-radius: var(--radius);
  backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-h); font-size: 1.35rem; font-weight: 500; padding: 4px 10px 18px; }
.brand b { font-weight: 800; background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="neo"] .brand b { color: var(--text); background: none; }
.brand-logo { width: 30px; height: 30px; flex: none; display: block; }
[data-theme="cosmos"] .brand-logo { filter: drop-shadow(0 0 8px rgba(255,95,174,.6)); }
.brand-mobile { display: none; }

.side { scrollbar-width: thin; scrollbar-color: var(--muted) transparent; overscroll-behavior: contain; }
.side::-webkit-scrollbar { width: 6px; }
.side::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 6px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; padding: 2px 4px 4px 2px; } /* deja sitio al contorno del item activo */
/* Laptops (pantallas bajas): menú más compacto para que quepa entero sin hacer scroll */
@media (min-width: 901px) and (max-height: 860px) {
  .side { padding: 14px 12px; }
  .brand { padding-bottom: 10px; }
  .side-nav { gap: 2px; }
  .nav-label { padding: 8px 12px 4px; }
  .nav-item { padding: 4px 10px; font-size: .75rem; }
  .nav-item .ni { width: 28px; height: 28px; }
  .nav-item .ni .ic { width: 16px; height: 16px; }
}
/* Laptops muy bajas: las categorías se mantienen, solo más compactas */
@media (min-width: 901px) and (max-height: 680px) {
  .nav-label { padding: 6px 12px 2px; font-size: .58rem; }
  [data-theme="paper"] .nav-label { margin-bottom: 2px; }
  .nav-item { padding: 3px 10px; }
  .nav-item .ni { width: 24px; height: 24px; }
  .nav-item .ni .ic { width: 15px; height: 15px; }
  .nav-item .app-ic { --s: 22px; border-radius: 6px; }
}
.nav-label { font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 12px 12px 5px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 999px; font-size: .78rem; line-height: 1.25;
  text-decoration: none; color: var(--muted); font-weight: 500; transition: color .2s, background .2s, transform .15s;
}
.nav-item .ni { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--panel); flex: none; font-size: 1.05rem; transition: background .25s, box-shadow .25s; }
.nav-item:hover { color: var(--text); }
.nav-item.active { color: var(--text); }
.nav-item.active .ni { background: linear-gradient(160deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--accent2))); box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 60%, transparent); }
[data-theme="neo"] .nav-item { border-radius: 10px; color: var(--text); }
[data-theme="neo"] .nav-item .ni { border: 2px solid var(--border); border-radius: 8px; background: #fff; }
[data-theme="neo"] .nav-item.active { background: var(--accent2); outline: 2px solid var(--border); }
[data-theme="neo"] .nav-item.active .ni { background: var(--accent); box-shadow: 2px 2px 0 var(--border); }
[data-theme="frost"] .nav-item.active .ni { background: #fff; color: #1a232c; box-shadow: none; }

.main { min-width: 0; padding: 14px 24px 60px 10px; }
.top { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 8px 0 14px; }
.top-actions { display: flex; gap: 8px; }
.view { max-width: 1180px; margin: 0 auto; }
.view.enter > * { animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
.view.enter > *:nth-child(2) { animation-delay: .05s; }
.view.enter > *:nth-child(3) { animation-delay: .1s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.bottom-nav { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 8px 16px 110px; }
  /* barra fija con fondo: al hacer scroll el contenido ya no se ve por detrás */
  .top { justify-content: space-between; position: sticky; top: 0; z-index: 20; padding: 10px 16px; margin: 0 -16px;
    background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .brand-mobile { display: flex; padding: 0; }
  .bottom-nav {
    display: flex; justify-content: space-around; position: fixed; z-index: 30;
    left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    padding: 8px; border-radius: 999px;
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    border: var(--bw) solid var(--border); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    box-shadow: var(--shadow);
  }
  [data-theme="neo"] .bottom-nav { background: var(--panel); border-radius: 16px; }
  .bottom-nav .nav-item { flex-direction: column; gap: 2px; padding: 4px 6px; font-size: .7rem; border-radius: 16px; }
  .bottom-nav .nav-item .ni { width: 38px; height: 38px; }
  [data-theme="neo"] .bottom-nav .nav-item.active { outline: none; background: none; }
}

/* ---------- ventana (panel principal de cada herramienta) ---------- */
.win {
  background: var(--panel); border: var(--bw) solid var(--border); border-radius: var(--radius);
  backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow); margin-bottom: 22px; overflow: hidden;
}
.win-bar { display: flex; align-items: center; gap: 12px; padding: 18px 22px 0; }
.win-bar h1 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0; flex: 1; min-width: 0; }
.wb-deco { display: none; }
.win-body { padding: 24px; }
.win-sub { color: var(--muted); margin: 8px 24px 0; }

[data-theme="neo"] .win { box-shadow: 9px 9px 0 var(--accent), 9px 9px 0 var(--bw) var(--border); }
[data-theme="neo"] .win-bar { padding: 10px 14px; border-bottom: var(--bw) solid var(--border); background: #fff; }
[data-theme="neo"] .win-bar h1 { font-size: clamp(1.1rem, 2.6vw, 1.6rem); text-transform: uppercase; letter-spacing: .06em; }
[data-theme="neo"] .wb-deco { display: inline; color: var(--accent); font-size: 1.1rem; }
[data-theme="neo"] .win-sub { margin-top: 14px; }
[data-theme="frost"] .win-bar h1 { letter-spacing: -.02em; }

/* ---------- botones (glow) ---------- */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 .95rem var(--font); color: var(--text); cursor: pointer; text-decoration: none;
  padding: 11px 22px; border-radius: 999px; border: 1.5px solid var(--accent3); background: transparent;
  transition: color .25s, background .25s, box-shadow .25s, transform .12s;
}
.btn::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,.3), rgba(255,255,255,0) 70%);
  transform: scale(0); transition: transform .4s;
}
.btn:hover::before { transform: scale(1); }
.btn:hover { color: #001418; background: var(--accent3); box-shadow: 0 0 15px var(--accent3), 0 0 50px color-mix(in srgb, var(--accent3) 60%, transparent); }
.btn:active { transform: scale(.95); }
.btn.primary { border-color: transparent; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 8px 30px -8px var(--accent); }
.btn.primary:hover { box-shadow: 0 0 18px var(--accent), 0 0 60px color-mix(in srgb, var(--accent) 50%, transparent); color: #fff; }
.btn.ghost { border-color: var(--border); }
.btn.ghost:hover { background: var(--panel2); color: var(--text); box-shadow: none; }
.btn.sm { padding: 7px 14px; font-size: .85rem; }
.btn.danger:hover { background: var(--bad); box-shadow: 0 0 20px var(--bad); color: #fff; border-color: var(--bad); }
.btn:disabled { opacity: .45; pointer-events: none; }

[data-theme="neo"] .btn { border: var(--bw) solid var(--border); border-radius: 10px; background: #fff; box-shadow: 4px 4px 0 var(--border); color: var(--text); }
[data-theme="neo"] .btn::before { display: none; }
[data-theme="neo"] .btn:hover { background: var(--accent3); box-shadow: 2px 2px 0 var(--border); transform: translate(2px, 2px); color: var(--text); }
[data-theme="neo"] .btn:active { box-shadow: 0 0 0 var(--border); transform: translate(4px, 4px); }
[data-theme="neo"] .btn.primary { background: var(--bg); color: var(--text); }
[data-theme="neo"] .btn.primary:hover { background: var(--accent); }

[data-theme="frost"] .btn { border-color: rgba(255,255,255,.4); }
[data-theme="frost"] .btn:hover { background: #fff; color: #1a232c; box-shadow: 0 0 30px rgba(255,255,255,.35); }
[data-theme="frost"] .btn.primary { background: #fff; color: #1a232c; box-shadow: none; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer; flex: none;
  background: var(--panel); border: var(--bw) solid var(--border); color: var(--text); font-size: 1.05rem; text-decoration: none;
  backdrop-filter: blur(12px); transition: box-shadow .2s, transform .12s;
}
button.icon-btn { padding: 0; line-height: 1; font-family: inherit; }
.icon-btn .ic { width: 18px; height: 18px; }
.btn .ic { width: 16px; height: 16px; }
.icon-btn:hover { box-shadow: var(--glow); }
.icon-btn:active { transform: scale(.92); }
[data-theme="neo"] .icon-btn { border-radius: 8px; background: #fff; box-shadow: 3px 3px 0 var(--border); width: 34px; height: 34px; }
[data-theme="neo"] .icon-btn:hover { background: var(--accent); }

/* ---------- formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .label { font-size: .82rem; color: var(--muted); font-weight: 500; }
input[type=text], input[type=number], input[type=date], input[type=time], input[type=url], input[type=password], input[type=email], select, textarea {
  width: 100%; font: 500 .95rem var(--font); color: var(--text);
  background: var(--input); border: var(--bw) solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 14px; outline: none; transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
select option { background: #1b1430; color: #fff; }
[data-theme="neo"] select option { background: #fff; color: #141414; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
input[type=range] { width: 100%; accent-color: var(--accent); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; }
input[type=color] { width: 100%; height: 44px; border: var(--bw) solid var(--border); border-radius: var(--radius-sm); background: var(--input); padding: 4px; }
/* La casilla nunca se encoge y queda alineada con la primera línea cuando el texto ocupa varias */
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .95rem; line-height: 1.5; }
.check > input[type=checkbox], .check > input[type=radio] { flex: none; margin: 2px 0 0; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 22px; align-items: start; }
@media (max-width: 760px) { .g2, .g3, .split { grid-template-columns: 1fr; } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }
/* Separación vertical entre bloques apilados. !important a propósito: un style="margin:0" en línea
   (usado para quitar el margen inferior de un <p> o <h3>) no debe dejar un elemento pegado al anterior. */
.stack > * + * { margin-top: 16px !important; }

.card {
  background: var(--panel); border: var(--bw) solid var(--border); border-radius: calc(var(--radius) - 6px); padding: 18px;
}
[data-theme="neo"] .card { background: #fff; box-shadow: 4px 4px 0 var(--border); }
.card h3 { font-size: 1.05rem; }

.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--input); border: var(--bw) solid var(--border); flex-wrap: wrap; }
.seg button { font: 600 .88rem var(--font); color: var(--muted); background: none; border: 0; padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.seg button.on { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 50%, transparent); }
[data-theme="neo"] .seg { border-radius: 10px; }
[data-theme="neo"] .seg button { border-radius: 7px; color: var(--text); }
[data-theme="neo"] .seg button.on { background: var(--accent); color: var(--text); box-shadow: none; outline: 2px solid var(--border); }
[data-theme="frost"] .seg button.on { background: #fff; color: #1a232c; box-shadow: none; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--panel2); border: var(--bw) solid var(--border); }
[data-theme="neo"] .chip { background: var(--accent2); border-radius: 6px; }
.chip.good { color: var(--good); } .chip.bad { color: var(--bad); }
[data-theme="neo"] .chip.good, [data-theme="neo"] .chip.bad { color: var(--text); }
[data-theme="neo"] .chip.good { background: #b8f5c9; } [data-theme="neo"] .chip.bad { background: #ffc2c8; }

.bar { height: 10px; border-radius: 99px; background: var(--input); overflow: hidden; border: var(--bw) solid var(--border); }
.bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent2), var(--accent)); box-shadow: 0 0 12px var(--accent); transition: width .5s cubic-bezier(.2,.8,.2,1); }
[data-theme="neo"] .bar > i { background: var(--accent); box-shadow: none; border-right: 2px solid var(--border); }
[data-theme="frost"] .bar > i { background: #fff; box-shadow: none; }

.stat { padding: 16px 18px; text-align: center; }
.stat b { display: block; font-family: var(--font-h); font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
.stat span { font-size: .8rem; color: var(--muted); }

.drop {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 30px 18px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s; display: block;
}
.drop:hover, .drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.drop .big { font-size: 2.2rem; display: block; margin-bottom: 6px; }
.drop input { display: none; }
[data-theme="neo"] .drop { border-color: var(--border); background: #fff; }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.thumb { position: relative; border-radius: var(--radius-sm); overflow: hidden; border: var(--bw) solid var(--border); background: var(--input); aspect-ratio: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: #000a; color: #fff; cursor: pointer; }
.thumb .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; font-size: .7rem; background: linear-gradient(transparent, #000c); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 500; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll-x { overflow-x: auto; }

.result-big { font-family: var(--font-h); font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 700; line-height: 1; margin: 6px 0 12px;
  background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="neo"] .result-big, [data-theme="frost"] .result-big { background: none; color: var(--text); }
.lines { display: flex; flex-direction: column; gap: 6px; }
.line { display: flex; justify-content: space-between; gap: 10px; font-size: .92rem; }
.line span:first-child { color: var(--muted); }
.line.total { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; font-weight: 700; }

.toasts { position: fixed; z-index: 100; top: 16px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 10px 18px; border-radius: 999px; background: var(--panel2); border: var(--bw) solid var(--border); backdrop-filter: blur(20px); color: var(--text); font-weight: 600; font-size: .9rem; box-shadow: var(--shadow); animation: rise .3s both; }
[data-theme="neo"] .toast { background: #fff; border-radius: 10px; }
[data-theme="cosmos"] .toast, :root .toast { background: rgba(30,20,60,.85); }
[data-theme="neo"] .toast { background: #fff; }
.toast.bad { border-color: var(--bad); }

.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.empty .big { font-size: 2.4rem; display: block; }
.out { white-space: pre-wrap; font-family: var(--mono); font-size: .85rem; background: var(--input); border: var(--bw) solid var(--border); border-radius: var(--radius-sm); padding: 14px; max-height: 420px; overflow: auto; }
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
.note-box { font-size: .88rem; padding: 12px 14px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--accent2) 14%, transparent); border: var(--bw) solid color-mix(in srgb, var(--accent2) 40%, transparent); }
[data-theme="neo"] .note-box { background: var(--panel2); border-color: var(--border); }
.spin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: rot .7s linear infinite; vertical-align: -3px; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- inicio ---------- */
.hero { padding: 0 0 18px; }
/* En escritorio la barra superior solo tiene el botón de estilo: la imagen sube junto a él */
@media (min-width: 901px) { .hero { margin-top: -52px; } .top { position: relative; z-index: 2; } }
.hero-stats { margin-top: 22px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.02em; margin-bottom: .2em; }
.hero h1 { padding-top: 14px; }
.hero p { color: var(--muted); font-size: 1.05rem; padding-bottom: 16px; }
[data-theme="frost"] .hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 800; }
[data-theme="neo"] .hero h1 { text-transform: uppercase; }
/* banner de inicio + gatito que se asoma */
.hero-banner-wrap { position: relative; margin: 50px 0 30px; }
.hero-cat { position: absolute; bottom: calc(100% - 4px); right: 12%; width: 96px; z-index: 0; pointer-events: none; }
.hero-cat .eyes { transform-box: fill-box; transform-origin: center; animation: blink 6s infinite; }
.cat-body, .cat-pupil { fill: #141414; }
.cat-eye { fill: #f3ecd2; }
/* Cosmos: gatito blanco de ojos azules con un brillo suave */
[data-theme="cosmos"] .cat-body { fill: #f7f3ff; }
[data-theme="cosmos"] .cat-eye { fill: #7fd8ff; }
[data-theme="cosmos"] .cat-pupil { fill: #1b1430; }
[data-theme="cosmos"] .hero-cat { filter: drop-shadow(0 0 10px rgba(255,255,255,.35)); }
@keyframes blink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
.hero-banner {
  position: relative; z-index: 1; aspect-ratio: 21 / 9; overflow: hidden; border-radius: var(--radius);
  border: var(--bw) solid var(--border); box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--accent), var(--accent2) 55%, var(--accent3));
}
[data-theme="neo"] .hero-banner { box-shadow: 9px 9px 0 var(--accent), 9px 9px 0 var(--bw) var(--border); }
.hero-banner img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .35s ease; }
.hero-banner img.fading { opacity: 0; }
.hero-banner.missing img, .hero-banner.missing .hero-credit { visibility: hidden; }
.hero-credit { position: absolute; left: 12px; bottom: 10px; font-size: .7rem; color: #fff; background: rgba(0,0,0,.45); padding: 3px 9px; border-radius: 99px; }
@media (max-width: 760px) {
  .hero-banner { aspect-ratio: 16 / 10; }
  .hero-cat { width: 70px; right: 10%; }
}

.section-title { display: flex; align-items: baseline; gap: 12px; margin: 26px 4px 14px; }
.section-title h2 { margin: 0; font-size: 1.3rem; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.tool-card {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; text-decoration: none; padding: 24px 18px 20px;
  background: var(--panel); border: var(--bw) solid var(--border); border-radius: var(--radius);
  backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, border-color .25s; min-height: 210px;
}
.tool-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c1) 60%, transparent); box-shadow: 0 20px 50px -20px var(--c1); }
.tool-card h3 { margin: 10px 0 2px; font-size: 1.08rem; }
.tool-card p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.4; }
.tool-card .go { position: absolute; top: 16px; right: 16px; opacity: .4; transition: opacity .2s, transform .2s; }
.tool-card:hover .go { opacity: 1; transform: translateX(3px); }
[data-theme="neo"] .tool-card { background: #fff; box-shadow: 6px 6px 0 var(--border); }
[data-theme="neo"] .tool-card:hover { transform: translate(-2px, -2px); box-shadow: 9px 9px 0 var(--border); border-color: var(--border); }

.orb { width: 74px; height: 74px; border-radius: 22px; display: grid; place-items: center; position: relative; flex: none;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c1) 26%, transparent), color-mix(in srgb, var(--c2) 6%, transparent));
  border: 1px solid color-mix(in srgb, var(--c1) 40%, transparent); }
.orb::before { content: ''; position: absolute; width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff 0, var(--c1) 30%, var(--c2) 75%); box-shadow: 0 0 26px var(--c1), 0 0 50px color-mix(in srgb, var(--c2) 60%, transparent); }
.orb span { position: relative; display: grid; place-items: center; color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.45)); }
.orb .ic { width: 26px; height: 26px; }
[data-theme="neo"] .orb { border-radius: 12px; border: var(--bw) solid var(--border); background: var(--c1); width: 62px; height: 62px; box-shadow: 3px 3px 0 var(--border); }
[data-theme="neo"] .orb::before { display: none; }
[data-theme="neo"] .orb span { color: var(--text); filter: none; }
[data-theme="neo"] .orb .ic { width: 30px; height: 30px; stroke-width: 2.2; }
[data-theme="frost"] .orb span { color: #1a232c; filter: none; }
.ic { display: block; flex: none; }
.nav-item .ni .ic { width: 18px; height: 18px; }
.nav-item.active .ni { color: #fff; }
[data-theme="neo"] .nav-item.active .ni { color: var(--text); }
[data-theme="frost"] .nav-item.active .ni { color: #1a232c; }
[data-theme="frost"] .orb { border-radius: 50%; background: color-mix(in srgb, var(--c1) 18%, rgba(255,255,255,.06)); }
[data-theme="frost"] .orb::before { background: radial-gradient(circle at 32% 28%, #fff, color-mix(in srgb, var(--c1) 40%, #fff) 60%, color-mix(in srgb, var(--c2) 40%, #889)); box-shadow: none; opacity: .85; }

/* bubbles (selección tipo burbuja) */
.bubbles { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; padding: 10px 0; }
.bubble {
  --s: 108px; width: var(--s); height: var(--s); border-radius: 50%; border: 0; cursor: pointer; color: #fff; font: 600 .86rem var(--font);
  background: radial-gradient(circle at 35% 30%, #fff8, var(--c1) 45%, var(--c2)); padding: 8px; text-shadow: 0 1px 4px #0006;
  opacity: .72; transition: transform .25s cubic-bezier(.2,.8,.2,1), opacity .2s, box-shadow .25s;
}
.bubble:hover { transform: scale(1.06); opacity: .9; }
.bubble.on { opacity: 1; transform: scale(1.1); box-shadow: 0 0 30px var(--c1), 0 0 70px color-mix(in srgb, var(--c2) 60%, transparent); }
.bubble .e { display: block; font-size: 1.5rem; }
[data-theme="neo"] .bubble { border-radius: 14px; border: var(--bw) solid var(--border); background: var(--c1); color: var(--text); text-shadow: none; opacity: 1; box-shadow: 4px 4px 0 var(--border); }
[data-theme="neo"] .bubble.on { background: var(--accent); transform: translate(-2px,-2px); box-shadow: 7px 7px 0 var(--border); }

/* temas en ajustes */
.theme-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.theme-opt { cursor: pointer; border-radius: 18px; padding: 0; border: 2px solid transparent; background: none; text-align: left; color: var(--text); font: inherit; }
.theme-opt.on { border-color: var(--accent); box-shadow: var(--glow); }
.theme-opt .prev { height: 120px; border-radius: 16px; position: relative; overflow: hidden; }
.theme-opt .t { display: block; padding: 12px 12px 4px; font-weight: 600; }
.theme-opt > .muted { display: block; padding: 0 12px 12px; }
.prev.cosmos { background: radial-gradient(circle at 80% 10%, #ff5fae, transparent 40%), radial-gradient(circle at 10% 90%, #6b4dff, transparent 40%), #0b0718; }
.prev.cosmos::after { content: 'Botón'; position: absolute; left: 18px; bottom: 18px; padding: 6px 16px; border-radius: 99px; background: #3ee6ff; color: #001418; font-weight: 600; font-size: .8rem; box-shadow: 0 0 20px #3ee6ff; }
.prev.neo { background: radial-gradient(#1112 1px, transparent 1.2px) 0 0/12px 12px, #dcf34b; }
.prev.neo::after { content: 'BOTÓN'; font-family: 'Pixelify Sans'; position: absolute; left: 18px; bottom: 18px; padding: 6px 16px; border-radius: 8px; background: #ff83b5; color: #141414; border: 2.5px solid #141414; box-shadow: 4px 4px 0 #141414; font-size: .8rem; }
.prev.frost { background: radial-gradient(circle at 70% 20%, #6f8796, transparent 55%), radial-gradient(circle at 20% 80%, #4d5b3f, transparent 55%), #26303a; }
.prev.frost::after { content: 'Hello.'; position: absolute; left: 18px; bottom: 14px; font: 800 1.6rem 'Inter'; color: #fff; }

/* quiz */
.q-opts { display: grid; gap: 10px; margin-top: 14px; }
.q-opt { text-align: left; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--input); border: var(--bw) solid var(--border); color: var(--text); font: 500 .98rem var(--font); cursor: pointer; transition: border-color .2s, background .2s, transform .12s; }
.q-opt:hover { border-color: var(--accent); }
.q-opt:active { transform: scale(.98); }
.q-opt.ok { border-color: var(--good); background: color-mix(in srgb, var(--good) 18%, transparent); }
.q-opt.no { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 18%, transparent); }
[data-theme="neo"] .q-opt { background: #fff; box-shadow: 3px 3px 0 var(--border); }
.q-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.q-text { font-size: 1.2rem; font-weight: 600; }

/* heatmap */
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.heat i { width: 13px; height: 13px; border-radius: 3px; background: var(--input); border: 1px solid var(--border); }
.heat i[data-l="1"] { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.heat i[data-l="2"] { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.heat i[data-l="3"] { background: color-mix(in srgb, var(--accent) 80%, transparent); }
.heat i[data-l="4"] { background: var(--accent); box-shadow: 0 0 6px var(--accent); }

/* Ajustes: grupos de datos para importar/exportar */
.data-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.data-group { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; border: var(--bw) solid var(--border); background: var(--input); }
.data-group span:first-of-type { flex: 1; }

/* Tooltip al pasar el ratón (o al enfocar con teclado) */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translate(-50%, 4px);
  width: max-content; max-width: 240px; padding: 8px 11px; border-radius: 10px; font-size: .78rem; font-weight: 500; line-height: 1.35; text-align: left;
  background: var(--text); color: var(--bg); border: var(--bw) solid var(--border); box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 20;
}
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
/* en pantallas táctiles o angostas no hay sitio: el tooltip invisible ensanchaba la página */
@media (hover: none), (max-width: 600px) { [data-tip]::after { display: none; } }

/* Inicio: categorías y modo ordenar */
.cat-block + .cat-block { margin-top: 22px; }
.cat-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.cat-title h3 { margin: 0; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); flex: 1; }
.organizing .tool-grid { min-height: 90px; padding: 8px; border-radius: var(--radius); border: var(--bw) dashed var(--border); }
.tool-card.org { cursor: grab; user-select: none; }
.tool-card.org h3 { font-size: .95rem; }
.tool-card.org.dragging { opacity: .4; }
.tool-card.drop-on, .tool-grid.drop-on { outline: 3px dashed var(--accent); outline-offset: 3px; }
.org-ctl { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 8px; width: 100%; }
.org-ctl select { flex: 1; min-width: 0; padding: 4px 6px; font-size: .78rem; }
.org-ctl .icon-btn { width: 30px; height: 30px; flex: none; }

/* Ideas para crear / Art Unblock */
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--border); vertical-align: middle; }
.swatch.big { width: 34px; height: 34px; border-radius: 10px; border-width: var(--bw); }
.unblock { margin-top: 18px; padding: 34px 26px; border-radius: var(--radius); border: var(--bw) solid var(--border); text-align: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--panel)), color-mix(in srgb, var(--accent2) 22%, var(--panel))); box-shadow: var(--shadow); }
.unblock .row { justify-content: center; margin-top: 14px; }
.unblock-text { margin: 0; font-family: var(--font-h, var(--font)); font-size: clamp(1.25rem, 3vw, 1.9rem); line-height: 1.3; font-weight: 700; }

/* Paletas */
.pal-strip { display: flex; height: 260px; border-radius: var(--radius); overflow: hidden; border: var(--bw) solid var(--border); box-shadow: var(--shadow); }
.pal-sw { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; padding: 14px 6px; min-width: 0; transition: flex .25s; }
.pal-sw:hover { flex: 1.25; }
.pal-lock { border: 0; background: rgba(255,255,255,.25); border-radius: 50%; width: 36px; height: 36px; cursor: pointer; font-size: 1rem; }
.pal-hex { position: relative; font: 700 .95rem var(--mono); cursor: pointer; }
.pal-hex input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pal-mini { display: flex; width: 120px; height: 26px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); cursor: pointer; flex: none; }
.pal-mini i { flex: 1; }
@media (max-width: 600px) { .pal-strip { height: 200px; } .pal-hex { font-size: .7rem; writing-mode: vertical-rl; } }

/* Gesture drawing */
.gest-stage { position: relative; height: min(70vh, 720px); border-radius: var(--radius); border: var(--bw) solid var(--border); background: #111; overflow: hidden; display: grid; place-items: center; }
.gest-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gest-stage.flip img { transform: scaleX(-1); }
.gest-stage.gray img { filter: grayscale(1) contrast(1.1); }
.gest-grid { position: absolute; inset: 0; pointer-events: none; display: none;
  background-image: linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px); background-size: 33.33% 33.33%; }
.gest-stage.grid .gest-grid { display: block; }
.gest-bar { margin-top: 10px; }
#gClock.warn { color: var(--bad); }

/* Reto de 30 días */
.reto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.reto-day { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 14px; border: var(--bw) solid var(--border); background: var(--input); cursor: pointer; position: relative; }
.reto-day input { position: absolute; top: 10px; right: 10px; }
.reto-n { font: 700 .75rem var(--mono); color: var(--muted); }
.reto-p { font-weight: 600; line-height: 1.25; }
.reto-day.done { background: color-mix(in srgb, var(--good) 25%, var(--input)); }
.reto-day.done .reto-p { text-decoration: line-through; opacity: .7; }
.reto-day.today { outline: 3px solid var(--accent); outline-offset: 1px; }

/* Coach de inglés: botón de grabar */
.rec-btn { width: 78px; height: 78px; border-radius: 50%; border: var(--bw) solid var(--border); background: var(--panel2); cursor: pointer; display: grid; place-items: center; }
.rec-btn span { width: 30px; height: 30px; border-radius: 50%; background: var(--bad); transition: border-radius .2s, transform .2s; }
.rec-btn.on span { border-radius: 6px; transform: scale(.8); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .5; } }

/* Quitar fondo */
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.bg-item { display: flex; flex-direction: column; gap: 6px; }
.checker { aspect-ratio: 1; border-radius: 14px; border: var(--bw) solid var(--border); display: grid; place-items: center; overflow: hidden;
  background: repeating-conic-gradient(#e6e6e6 0 25%, #fff 0 50%) 0 0 / 18px 18px; }
.checker img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* Editar PDF */
.pdf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pdf-page { padding: 8px; border-radius: 12px; border: var(--bw) solid var(--border); background: var(--input); cursor: grab; }
.pdf-page.sel { outline: 3px solid var(--accent); }
.pdf-thumb { aspect-ratio: 3 / 4; display: grid; place-items: center; background: #fff; border-radius: 6px; overflow: hidden; margin-bottom: 6px; }
.pdf-thumb img { max-width: 100%; max-height: 100%; transition: transform .2s; }
.pdf-page .icon-btn { width: 30px; height: 30px; }
.sig-pad { width: 100%; height: auto; aspect-ratio: 3 / 1; background: #fff; border-radius: 10px; border: var(--bw) dashed var(--border); touch-action: none; cursor: crosshair; }

/* QR */
.qr-prev { width: min(100%, 340px); aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: repeating-conic-gradient(#e6e6e6 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.qr-prev svg { width: 100%; height: 100%; display: block; }

/* Find me on */
/* ---------- Páginas de texto (Privacidad, Guía): escala de espaciado 8 / 12 / 16 / 24 / 32 px ---------- */
.doc, .guide { display: flex; flex-direction: column; gap: 32px; }
.doc h3, .guide h3 { margin: 0 0 12px; }
.doc h4, .guide h4 { margin: 0 0 8px; font-size: 1rem; }
.doc p, .guide p { margin: 0 0 12px; line-height: 1.6; }
.doc-sec > :last-child, .guide-sec > :last-child, .doc-box > :last-child { margin-bottom: 0; }
.doc-box { padding: 24px; border: var(--bw) solid var(--border); border-radius: calc(var(--radius) - 6px); background: var(--panel); }
.doc-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.6; }
.doc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 16px; }
.doc-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: var(--bw) solid var(--border); border-radius: calc(var(--radius) - 6px); background: var(--panel); }
.doc-card h4 { margin: 0; }
.doc-card dl { margin: 0; display: grid; gap: 4px 0; font-size: .88rem; line-height: 1.5; }
.doc-card dt { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.doc-card dd { margin: 0 0 8px; }
.doc-card dd:last-child { margin-bottom: 0; }
.doc-card a { margin-top: auto; font-size: .88rem; }
[data-theme="paper"] .doc-box, [data-theme="paper"] .doc-card, [data-theme="paper"] .guide-card, [data-theme="paper"] .guide-row, [data-theme="paper"] .guide-item { border-radius: 2px; box-shadow: 3px 3px 0 #111; background: #fff; }
@media (max-width: 600px) { .doc, .guide { gap: 24px; } .doc-box { padding: 16px; } .doc-cards { grid-template-columns: 1fr; } }

/* Guía de stats e items */
.guide-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.guide-nav a { padding: 8px 12px; border: var(--bw) solid var(--border); border-radius: 999px; font-size: .88rem; text-decoration: none; color: var(--text); background: var(--panel); }
[data-theme="paper"] .guide-nav a { border-radius: 2px; }
.guide-sec { scroll-margin-top: 80px; }
.guide-list { display: grid; gap: 12px; }
.guide-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px 16px; border: var(--bw) solid var(--border); border-radius: 10px; background: var(--panel); }
.guide-abbr { font: 700 1rem 'Pixelify Sans', var(--mono); letter-spacing: .06em; text-align: center; }
.guide-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; line-height: 1.45; }
.guide-txt > span { font-size: .9rem; }
.guide-txt small { color: var(--muted); font-size: .78rem; }
.guide-val { font: 700 1.1rem var(--mono); min-width: 40px; text-align: right; }
.guide-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.guide-card { padding: 16px; border: var(--bw) solid var(--border); border-radius: 10px; background: var(--panel); }
.guide-card p { font-size: .92rem; }
.guide-xp { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .88rem; }
.guide-xp li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px dashed var(--border); }
.guide-xp li:last-child { border-bottom: 0; }
.guide-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.guide-item { display: flex; align-items: center; gap: 12px; padding: 12px; border: var(--bw) dashed var(--border); border-radius: 10px; background: var(--input); }
.guide-item.on { border-style: solid; background: var(--panel); }
.guide-px { flex: none; width: 48px; height: 48px; display: grid; place-items: center; }
.guide-px .px { width: 40px; height: 40px; }
@media (max-width: 600px) { .guide-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; padding: 12px; } .guide-items { grid-template-columns: 1fr; } }
.find-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px;
  border: var(--bw) solid var(--border); background: var(--input); color: var(--text); text-decoration: none; transition: transform .15s, background .2s; }
.find-link > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.find-link > span:last-child { flex: none; }
.find-ic { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--panel2); border: var(--bw) solid var(--border); }
.find-ic .ic { width: 18px; height: 18px; }
[data-theme="paper"] .find-ic { border-radius: 3px; background: #fff; box-shadow: 2px 2px 0 #111; }
[data-theme="neo"] .find-ic { border-radius: 8px; background: var(--accent2); }
[data-theme="cosmos"] .find-ic { background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 35%, transparent), color-mix(in srgb, var(--accent2) 35%, transparent)); }
.find-link:hover { background: var(--panel2); transform: translateX(3px); }
[data-theme="neo"] .find-link:hover { box-shadow: 3px 3px 0 var(--border); transform: translate(-2px, -2px); }

/* Progress Engine: calendario mensual y agenda */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-h { text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); padding: 2px 0; }
.cal-d { min-height: 74px; padding: 4px; border-radius: 10px; border: var(--bw) solid var(--border); background: var(--input); color: var(--text);
  font: inherit; text-align: left; display: flex; flex-direction: column; gap: 2px; overflow: hidden; cursor: pointer; }
.cal-d:disabled { cursor: default; opacity: .55; }
.cal-d.off { visibility: hidden; }
.cal-d b { font-size: .78rem; }
.cal-d.today { outline: 2px solid var(--accent); outline-offset: 1px; }
.cal-d.has { background: var(--panel2); }
.cal-d.all { background: color-mix(in srgb, var(--good) 22%, var(--input)); }
.cal-ev { font-style: normal; font-size: .62rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 1px 4px; border-radius: 5px;
  background: color-mix(in srgb, var(--accent) 30%, transparent); }
.cal-ev.eval, .cal-ev.final { background: color-mix(in srgb, var(--good) 40%, transparent); }
.cal-ev.review { background: color-mix(in srgb, var(--accent3) 40%, transparent); }
.cal-ev.done { text-decoration: line-through; opacity: .55; }
.cal-more { font-style: normal; font-size: .62rem; color: var(--muted); }
.agenda { max-height: 560px; overflow: auto; }
.agenda-day + .agenda-day { margin-top: 14px; }
.agenda-day h4 { margin: 0 0 6px; text-transform: capitalize; }
.agenda-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px dashed var(--border); cursor: pointer; }
.agenda-row.done b { text-decoration: line-through; opacity: .6; }
@media (max-width: 600px) { .cal-d { min-height: 46px; } .cal-ev { font-size: 0; padding: 0; height: 5px; } .cal-more { display: none; } }

/* ascii / juegos */
.ascii-grid { font-family: var(--mono); font-size: 14px; line-height: 1; user-select: none; touch-action: none; display: inline-block; background: var(--input); border: var(--bw) solid var(--border); border-radius: var(--radius-sm); padding: 10px; cursor: crosshair; max-width: 100%; overflow: auto; }
.ascii-grid .r { white-space: pre; height: 1em; }
.ascii-grid .r span { display: inline-block; width: .62em; text-align: center; }
.keys { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.keys button { width: 40px; height: 44px; border-radius: 10px; border: var(--bw) solid var(--border); background: var(--input); color: var(--text); font: 700 1rem var(--font); cursor: pointer; }
.keys button:disabled { opacity: .3; }
.keys button.ok { background: color-mix(in srgb, var(--good) 35%, transparent); opacity: 1; }
.word { font-family: var(--mono); font-size: clamp(1.4rem, 5vw, 2.2rem); letter-spacing: .3em; text-align: center; margin: 14px 0; word-break: break-all; }
.morse-out { font-family: var(--mono); font-size: 1.2rem; letter-spacing: .1em; word-break: break-word; }
.flash { width: 26px; height: 26px; border-radius: 50%; background: var(--input); border: var(--bw) solid var(--border); transition: background .05s, box-shadow .05s; }
.flash.on { background: var(--accent3); box-shadow: 0 0 20px var(--accent3); }
.story-text { font-size: 1.12rem; line-height: 1.7; max-width: 62ch; }
.flag { font-size: 5rem; line-height: 1; text-align: center; }

canvas.preview { max-width: 100%; border-radius: var(--radius-sm); border: var(--bw) solid var(--border); background: repeating-conic-gradient(#8882 0 25%, transparent 0 50%) 0 0/16px 16px; display: block; }
.chart-box { position: relative; height: 280px; }
.md { line-height: 1.65; }
.md h2 { font-size: 1.25rem; margin-top: 1em; }
.md h3 { font-size: 1.02rem; margin-top: 1em; color: var(--accent); }
[data-theme="neo"] .md h3, [data-theme="frost"] .md h3 { color: var(--text); text-decoration: underline; }
.md ul { padding-left: 1.2em; margin: .3em 0 .8em; }
.md blockquote { margin: .5em 0; padding-left: 12px; border-left: 3px solid var(--accent); color: var(--muted); }

/* =========================================================
   Tema Paper: papel cuadriculado + ventanas retro en blanco y negro
   ========================================================= */
[data-theme="paper"] .stars, [data-theme="paper"] .blob, [data-theme="paper"] .doodle { display: none; }
[data-theme="paper"] .bg { background:
  linear-gradient(#0000001a 1px, transparent 1px) 0 0 / 26px 26px,
  linear-gradient(90deg, #0000001a 1px, transparent 1px) 0 0 / 26px 26px, #fff; }
[data-theme="paper"] h1, [data-theme="paper"] h2, [data-theme="paper"] h3 { letter-spacing: .06em; }
[data-theme="paper"] .brand b { background: none; color: var(--text); }
[data-theme="paper"] .brand { font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; }
[data-theme="paper"] .brand-logo { filter: grayscale(1) contrast(1.4); }
[data-theme="paper"] .side { box-shadow: 6px 6px 0 #111; }
[data-theme="paper"] .nav-label { font-family: var(--font-h); letter-spacing: .14em; color: var(--text); border-bottom: 1px dashed #111; margin: 0 8px 4px; padding-left: 4px; }
[data-theme="paper"] .nav-item { border-radius: 3px; color: var(--text); }
[data-theme="paper"] .nav-item .ni { border: 2px solid #111; border-radius: 3px; background: #fff; }
[data-theme="paper"] .nav-item:hover { background: #ececec; }
[data-theme="paper"] .nav-item.active { background: #ececec; outline: 2px solid #111; }
[data-theme="paper"] .nav-item.active .ni { background: #111; color: #fff; box-shadow: none; }
[data-theme="paper"] .bottom-nav { background: #fff; border-radius: 3px; }
[data-theme="paper"] .bottom-nav .nav-item.active { outline: none; background: none; }

/* ventanas con barra de título gris y botones _ □ × */
[data-theme="paper"] .win { box-shadow: 7px 7px 0 #111; }
[data-theme="paper"] .win-bar { padding: 8px 12px; background: #d9d9d9; border-bottom: 2px solid #111; }
[data-theme="paper"] .win-bar h1 { font-size: clamp(.95rem, 2.2vw, 1.25rem); text-transform: uppercase; letter-spacing: .16em; }
[data-theme="paper"] .wb-deco { display: inline; font-size: .9rem; }
[data-theme="paper"] .win-sub { margin-top: 14px; }
[data-theme="paper"] .card { box-shadow: 4px 4px 0 #111; }
[data-theme="paper"] .note-box, [data-theme="paper"] .drop { background: #fff; border: 2px dashed #111; }
[data-theme="paper"] .icon-btn { border-radius: 3px; background: #fff; box-shadow: 2px 2px 0 #111; width: 32px; height: 32px; backdrop-filter: none; }
[data-theme="paper"] .icon-btn:hover { background: #ececec; }

/* botones tipo "ID button" */
[data-theme="paper"] .btn { border: 2px solid #111; border-radius: 3px; background: #fff; color: #111; box-shadow: 3px 3px 0 #111; }
[data-theme="paper"] .btn::before { display: none; }
[data-theme="paper"] .btn:hover { background: #ececec; color: #111; box-shadow: 1px 1px 0 #111; transform: translate(2px, 2px); }
[data-theme="paper"] .btn:active { box-shadow: none; transform: translate(3px, 3px); }
[data-theme="paper"] .btn.primary { background: #111; color: #fff; }
[data-theme="paper"] .btn.primary:hover { background: #333; color: #fff; }
[data-theme="paper"] .btn.danger:hover { background: var(--bad); color: #fff; }
[data-theme="paper"] .seg { border-radius: 3px; }
[data-theme="paper"] .seg button { border-radius: 2px; color: #111; }
[data-theme="paper"] .seg button.on { background: #111; color: #fff; box-shadow: none; }
[data-theme="paper"] .chip { border-radius: 3px; background: #ececec; }
[data-theme="paper"] .chip.good, [data-theme="paper"] .chip.bad { color: #111; }
[data-theme="paper"] .bar > i { background: #111; box-shadow: none; }
[data-theme="paper"] .result-big { background: none; color: #111; }
[data-theme="paper"] .md h3 { color: #111; text-decoration: underline; }
[data-theme="paper"] select option { background: #fff; color: #111; }
[data-theme="paper"] .toast { background: #fff; border-radius: 3px; box-shadow: 4px 4px 0 #111; }
[data-theme="paper"] .q-opt { box-shadow: 3px 3px 0 #111; }
[data-theme="paper"] .theme-opt.on { box-shadow: 4px 4px 0 #111; }

/* inicio */
[data-theme="paper"] .hero h1 { text-transform: uppercase; font-size: clamp(1.6rem, 4vw, 2.6rem); }
[data-theme="paper"] .hero-banner { box-shadow: 7px 7px 0 #111; }
[data-theme="paper"] .hero-banner img { filter: grayscale(1) contrast(1.08); }
[data-theme="paper"] .hero-credit { border-radius: 2px; background: #111; }
[data-theme="paper"] .tool-card { box-shadow: 5px 5px 0 #111; }
[data-theme="paper"] .tool-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 #111; border-color: #111; }
[data-theme="paper"] .tool-card h3 { font-size: .9rem; text-transform: uppercase; letter-spacing: .1em; }
[data-theme="paper"] .orb { width: 60px; height: 60px; border-radius: 3px; border: 2px solid #111; background: #ececec; }
[data-theme="paper"] .orb::before { display: none; }
[data-theme="paper"] .orb span { color: #111; filter: none; }
[data-theme="paper"] .orb .ic { width: 28px; height: 28px; }
[data-theme="paper"] .cat-title h3 { color: #111; }
[data-theme="paper"] .bubble { border-radius: 3px; border: 2px solid #111; background: #fff; color: #111; text-shadow: none; opacity: 1; box-shadow: 3px 3px 0 #111; }
[data-theme="paper"] .bubble.on { background: #111; color: #fff; }

/* vista previa en Ajustes */
.prev.paper { background: linear-gradient(#0000001f 1px, transparent 1px) 0 0/14px 14px, linear-gradient(90deg, #0000001f 1px, transparent 1px) 0 0/14px 14px, #fff; border: 2px solid #111; }
.prev.paper::before { content: '➪ WINDOW   _□×'; white-space: pre; position: absolute; left: 14px; right: 22px; top: 16px; padding: 4px 8px; font: 400 .62rem 'Silkscreen', monospace; letter-spacing: .1em; background: #d9d9d9; border: 2px solid #111; }
.prev.paper::after { content: 'ID BUTTON'; position: absolute; left: 18px; bottom: 18px; padding: 4px 12px; font: 700 .72rem 'Courier Prime', monospace; background: #fff; color: #111; border: 2px solid #111; box-shadow: 3px 3px 0 #111; }

/* =========================================================
   Radio (panel lateral derecho)
   ========================================================= */
.radio, .radio-mini {
  position: fixed; z-index: 40; color: var(--text);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border: var(--bw) solid var(--border); box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(1.3); -webkit-backdrop-filter: blur(28px) saturate(1.3);
}
.radio[hidden], .radio-mini[hidden] { display: none; }
.radio {
  bottom: 18px; right: 18px; width: 330px; max-height: min(620px, calc(100vh - 36px)); display: flex; flex-direction: column;
  border-radius: var(--radius); overflow: hidden; animation: rd-in .35s cubic-bezier(.2,.8,.2,1);
}
@keyframes rd-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
.rd-bar { display: flex; align-items: center; gap: 10px; padding: 12px 12px 4px 18px; }
.rd-bar b { font-family: var(--font-h); font-size: 1rem; letter-spacing: .04em; }
.rd-bar .icon-btn { width: 30px; height: 30px; font-size: .85rem; }
.rd-live { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: .6; flex: none; }
.radio.playing .rd-live { background: var(--bad); opacity: 1; box-shadow: 0 0 10px var(--bad); animation: pulse 1.6s infinite; }

.rd-now { display: flex; gap: 14px; align-items: center; padding: 10px 18px 2px; }
.rd-art {
  width: 76px; height: 76px; flex: none; position: relative; display: grid; place-items: center; overflow: hidden;
  border-radius: calc(var(--radius) - 6px);
  background: radial-gradient(circle at 28% 22%, rgba(255,255,255,.55), transparent 46%), linear-gradient(140deg, var(--c1), var(--c2));
  box-shadow: 0 12px 30px -12px var(--c1); transition: background .4s;
}
.rd-art .e { font-size: 1.7rem; line-height: 1; transform: translateY(-6px); filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.rd-art.sw .e { display: none; }
.rd-eq { display: flex; justify-content: center; align-items: flex-end; gap: 3px; height: 16px; }
.rd-art .rd-eq { position: absolute; left: 0; right: 0; bottom: 9px; }
.rd-eq i { width: 4px; height: 22%; border-radius: 2px; background: #fff; opacity: .92; }
.playing .rd-eq i, .rd-item .rd-eq i { animation: eq .9s ease-in-out infinite alternate; }
.rd-eq i:nth-child(2) { animation-duration: .7s; animation-delay: -.4s; }
.rd-eq i:nth-child(3) { animation-duration: 1.1s; animation-delay: -.2s; }
.rd-eq i:nth-child(4) { animation-duration: .8s; animation-delay: -.6s; }
.rd-eq i:nth-child(5) { animation-duration: 1s; animation-delay: -.1s; }
@keyframes eq { from { height: 18%; } to { height: 100%; } }
.rd-meta { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rd-tag { font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.rd-name { font-family: var(--font-h); font-weight: var(--h-weight); font-size: 1.08rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-sub { font-size: .8rem; color: var(--muted); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.rd-ctl { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 18px 4px; }
.rd-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; flex: none; transition: background .2s, transform .12s, box-shadow .2s; }
.rd-btn:hover { background: var(--panel2); }
.rd-btn:active { transform: scale(.9); }
.rd-btn svg { width: 20px; height: 20px; }
.rd-btn.sm { width: 32px; height: 32px; color: var(--muted); }
.rd-btn.sm svg { width: 18px; height: 18px; }
.rd-play { width: 58px; height: 58px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 10px 28px -8px var(--accent); }
.rd-play:hover { background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 0 18px var(--accent), 0 0 44px color-mix(in srgb, var(--accent2) 50%, transparent); }
.rd-play svg { width: 24px; height: 24px; }
.rd-vol { display: flex; align-items: center; gap: 8px; padding: 6px 20px 14px 14px; }
.rd-vol input[type=range] {
  -webkit-appearance: none; appearance: none; height: 6px; border-radius: 99px; cursor: pointer;
  background: linear-gradient(90deg, var(--accent) var(--p, 60%), var(--panel2) var(--p, 60%));
}
.rd-vol input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--text); border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.rd-vol input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--text); border: 0; }

.rd-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 12px 16px 10px; border-top: 1px solid var(--border); scrollbar-width: none; flex: none; }
.rd-tabs::-webkit-scrollbar { display: none; }
.rd-tab { flex: none; font: 600 .8rem var(--font); padding: 6px 13px; border-radius: 999px; border: var(--bw) solid var(--border); background: transparent; color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.rd-tab:hover { color: var(--text); }
.rd-tab.on { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border-color: transparent; }
.rd-list { overflow-y: auto; padding: 0 10px 10px; display: flex; flex-direction: column; gap: 2px; min-height: 110px; scrollbar-width: thin; scrollbar-color: var(--muted) transparent; overscroll-behavior: contain; }
.rd-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border-radius: var(--radius-sm); border: var(--bw) solid transparent; background: none; color: var(--text); text-align: left; font: inherit; cursor: pointer; transition: background .15s; }
.rd-item:hover { background: var(--panel2); }
.rd-item.on { background: color-mix(in srgb, var(--accent) 15%, transparent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.rd-ic { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; font-size: .95rem; font-weight: 700; color: #fff; background: linear-gradient(140deg, var(--c1), var(--c2)); }
.rd-ic .rd-eq { height: 14px; gap: 2px; }
.rd-ic .rd-eq i { width: 3px; }
.rd-ic.sw { border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.rd-item .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rd-item b { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-item small { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-badge { font-size: .58rem; font-weight: 700; letter-spacing: .08em; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border); color: var(--muted); flex: none; }
.rd-random { text-align: center; padding: 20px 8px 10px; }
.rd-random .btn svg { width: 18px; height: 18px; }
.rd-random p { margin: 12px 0 0; }
.rd-more { padding: 8px 10px; margin: 0; }
.rd-foot { font-size: .72rem; padding: 9px 18px 12px; margin: 0; border-top: 1px solid var(--border); flex: none; }

/* versión minimizada */
.radio-mini { right: 18px; bottom: 18px; display: flex; align-items: center; gap: 6px; padding: 6px; max-width: 320px; border-radius: 999px; animation: rd-in .3s cubic-bezier(.2,.8,.2,1); }
.rd-mini-open { display: flex; align-items: center; gap: 10px; min-width: 0; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0 4px 0 0; }
.radio-mini .rd-art { width: 38px; height: 38px; border-radius: 50%; box-shadow: none; }
.radio-mini .rd-art .e { display: none; }
.radio-mini .rd-art .rd-eq { bottom: auto; top: 50%; transform: translateY(-50%); height: 14px; gap: 2px; }
.radio-mini .rd-eq i { width: 3px; }
.radio-mini .rd-name { font-size: .88rem; max-width: 160px; }
.radio-mini .rd-play { width: 40px; height: 40px; }
.radio-mini .rd-play svg { width: 18px; height: 18px; }

@media (max-width: 900px) {
  .radio { left: 12px; right: 12px; width: auto; bottom: calc(96px + env(safe-area-inset-bottom)); max-height: 64vh; }
  .radio-mini { right: 14px; bottom: calc(100px + env(safe-area-inset-bottom)); }
}

/* radio en cada estilo */
[data-theme="neo"] .radio, [data-theme="neo"] .radio-mini { background: var(--panel); box-shadow: 7px 7px 0 var(--border); backdrop-filter: none; }
[data-theme="neo"] .radio-mini { border-radius: 14px; }
[data-theme="neo"] .rd-bar { background: #fff; border-bottom: var(--bw) solid var(--border); padding: 8px 10px 8px 14px; }
[data-theme="neo"] .rd-bar b { text-transform: uppercase; letter-spacing: .08em; }
[data-theme="neo"] .rd-art { background: var(--c1); border: var(--bw) solid var(--border); border-radius: 10px; box-shadow: 3px 3px 0 var(--border); }
[data-theme="neo"] .radio-mini .rd-art { border-radius: 8px; box-shadow: none; }
[data-theme="neo"] .rd-eq i { background: var(--text); }
[data-theme="neo"] .rd-btn { border-radius: 8px; }
[data-theme="neo"] .rd-play { background: var(--accent); color: var(--text); border: var(--bw) solid var(--border); border-radius: 12px; box-shadow: 4px 4px 0 var(--border); }
[data-theme="neo"] .rd-play:hover { background: var(--accent3); box-shadow: 2px 2px 0 var(--border); transform: translate(2px, 2px); }
[data-theme="neo"] .rd-vol input[type=range] { border: 2px solid var(--border); height: 10px; }
[data-theme="neo"] .rd-tabs { border-top: var(--bw) solid var(--border); }
[data-theme="neo"] .rd-tab { border-radius: 8px; color: var(--text); background: #fff; }
[data-theme="neo"] .rd-tab.on { background: var(--accent2); color: var(--text); border-color: var(--border); box-shadow: 2px 2px 0 var(--border); }
[data-theme="neo"] .rd-item.on { background: var(--accent2); border-color: var(--border); }
[data-theme="neo"] .rd-ic { background: var(--c1); color: var(--text); border: 2px solid var(--border); border-radius: 8px; }
[data-theme="neo"] .rd-foot { border-top: var(--bw) solid var(--border); }

[data-theme="frost"] .rd-art { background: radial-gradient(circle at 28% 22%, rgba(255,255,255,.6), transparent 50%), linear-gradient(140deg, color-mix(in srgb, var(--c1) 55%, #fff), color-mix(in srgb, var(--c2) 45%, #556)); box-shadow: none; }
[data-theme="frost"] .rd-play, [data-theme="frost"] .rd-play:hover { background: #fff; color: #1a232c; box-shadow: 0 0 30px rgba(255,255,255,.25); }
[data-theme="frost"] .rd-tab.on { background: #fff; color: #1a232c; }
[data-theme="frost"] .rd-item.on { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); }
[data-theme="frost"] .rd-vol input[type=range] { background: linear-gradient(90deg, #fff var(--p, 60%), rgba(255,255,255,.18) var(--p, 60%)); }

[data-theme="paper"] .radio, [data-theme="paper"] .radio-mini { background: #fff; box-shadow: 6px 6px 0 #111; backdrop-filter: none; }
[data-theme="paper"] .radio-mini { border-radius: 3px; }
[data-theme="paper"] .rd-bar { background: #d9d9d9; border-bottom: 2px solid #111; padding: 6px 8px 6px 14px; }
[data-theme="paper"] .rd-bar b { text-transform: uppercase; letter-spacing: .18em; font-size: .9rem; }
[data-theme="paper"] .rd-bar::before { content: '➪'; order: -1; }
[data-theme="paper"] .rd-art { background: #111; border-radius: 3px; box-shadow: none; }
[data-theme="paper"] .rd-art .e { filter: grayscale(1) brightness(1.6); }
[data-theme="paper"] .rd-name { font-size: .95rem; letter-spacing: .06em; }
[data-theme="paper"] .rd-btn { border-radius: 3px; }
[data-theme="paper"] .rd-play { background: #111; color: #fff; border-radius: 3px; box-shadow: 3px 3px 0 #9a9a9a; }
[data-theme="paper"] .rd-play:hover { background: #333; box-shadow: 1px 1px 0 #9a9a9a; transform: translate(2px, 2px); }
[data-theme="paper"] .rd-vol input[type=range] { border-radius: 0; border: 2px solid #111; height: 10px; background: linear-gradient(90deg, #111 var(--p, 60%), #fff var(--p, 60%)); }
[data-theme="paper"] .rd-vol input[type=range]::-webkit-slider-thumb { border-radius: 2px; background: #fff; border: 2px solid #111; box-shadow: none; }
[data-theme="paper"] .rd-tabs, [data-theme="paper"] .rd-foot { border-top: 2px dashed #111; }
[data-theme="paper"] .rd-tab { border-radius: 3px; color: #111; background: #fff; }
[data-theme="paper"] .rd-tab.on { background: #111; color: #fff; border-color: #111; }
[data-theme="paper"] .rd-item { border-radius: 3px; }
[data-theme="paper"] .rd-item:hover { background: #f1f1f1; }
[data-theme="paper"] .rd-item.on { background: #ececec; border: 2px dashed #111; }
[data-theme="paper"] .rd-ic { background: #fff; color: #111; border: 2px solid #111; border-radius: 3px; filter: grayscale(1); }
[data-theme="paper"] .rd-ic.sw { background: linear-gradient(140deg, var(--c1), var(--c2)); filter: grayscale(1); }
[data-theme="paper"] .rd-eq i { background: #fff; }
[data-theme="paper"] .rd-ic .rd-eq i { background: #111; }
[data-theme="paper"] .rd-badge { border-radius: 2px; border-color: #111; color: #111; }

/* =========================================================
   Iconos pixel de las apps
   ========================================================= */
.px { display: block; image-rendering: pixelated; }
.app-ic {
  --s: 60px; width: var(--s); height: var(--s); flex: none; display: grid; place-items: center;
  border-radius: 24%; background: var(--tile); box-shadow: inset 0 -3px 0 rgba(0,0,0,.14), 0 2px 0 rgba(0,0,0,.08);
}
.app-ic .px { width: 64%; height: 64%; }
.app-ic.big { --s: 70px; margin-bottom: 4px; }
.app-ic.sm { --s: 34px; border-radius: 9px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.14); }
.nav-item .ni:has(.app-ic) { background: none; border: 0; box-shadow: none; }
.nav-item .app-ic { --s: 28px; border-radius: 8px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.14); }
.nav-item.active .app-ic { outline: 2px solid var(--text); outline-offset: 1px; }
[data-theme="neo"] .nav-item .ni:has(.app-ic), [data-theme="paper"] .nav-item .ni:has(.app-ic) { border: 0; background: none; box-shadow: none; }
[data-theme="neo"] .app-ic, [data-theme="paper"] .app-ic { border: 2px solid var(--border); box-shadow: 3px 3px 0 var(--border); }
[data-theme="neo"] .nav-item .app-ic, [data-theme="paper"] .nav-item .app-ic, [data-theme="neo"] .app-ic.sm, [data-theme="paper"] .app-ic.sm { box-shadow: 2px 2px 0 var(--border); border-width: 1.5px; }
[data-theme="paper"] .app-ic { border-radius: 6px; }
[data-theme="cosmos"] .app-ic { box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 0 0 22px color-mix(in srgb, var(--tile) 45%, transparent); }
[data-theme="frost"] .app-ic { background: color-mix(in srgb, var(--tile) 70%, rgba(255,255,255,.5)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); }

/* =========================================================
   Dashboard de Inicio (ventanas)
   ========================================================= */
:root, [data-theme="cosmos"] {
  --dash-bg: rgba(255,255,255,.035); --dash-frame: rgba(255,255,255,.14); --dash-r: 28px;
  --dw-bg: rgba(255,255,255,.06); --dw-bar: linear-gradient(90deg, rgba(255,95,174,.35), rgba(139,108,255,.35)); --dw-bar-text: #fff;
  --dw-line: rgba(255,255,255,.14); --dw-shadow: 0 18px 40px -22px rgba(0,0,0,.8); --dw-r: 18px;
  --seg-on: linear-gradient(180deg, #ff5fae, #8b6cff); --seg-off: rgba(255,255,255,.09);
  --lock: rgba(255,255,255,.14); --heart-line: #1b1430; --heart-empty: rgba(255,255,255,.18);
  --av-cat: #f7f3ff; --av-eye: #7fd8ff; --av-line: #1b1430; --av-mouth: #1b1430;
  --av-bg: radial-gradient(circle at 50% 120%, #8b6cff, #2a1670 60%, #110a26);
  --dev-bezel: #140d29; --dev-screen: radial-gradient(1px 1px at 30px 40px, #fff9, transparent), radial-gradient(1px 1px at 120px 90px, #fff7, transparent), radial-gradient(1.5px 1.5px at 200px 20px, #fffb, transparent), linear-gradient(160deg, #2a1670, #0b0718 70%);
  --dev-label: #fff;
}
[data-theme="neo"] {
  --dash-bg: #ffd23f; --dash-frame: #ff83b5; --dash-r: 30px;
  --dw-bg: #fffdf3; --dw-bar: #ff83b5; --dw-bar-text: #141414; --dw-line: #141414; --dw-shadow: 6px 6px 0 #141414; --dw-r: 12px;
  --seg-on: #ff83b5; --seg-off: #fff; --lock: #14141433; --heart-line: #141414; --heart-empty: #fff;
  --av-cat: #1d1b2b; --av-eye: #dcf34b; --av-line: #141414; --av-mouth: #8b8b8b;
  --av-bg: linear-gradient(#8fd3ff 0 70%, #6fcf6f 70% 78%, #b07040 78%);
  --dev-bezel: #141414; --dev-screen: radial-gradient(#fff6 1.2px, transparent 1.4px) 0 0 / 34px 34px, linear-gradient(180deg, #6b5bd6, #4b3b9e);
  --dev-label: #fff;
}
[data-theme="frost"] {
  --dash-bg: rgba(255,255,255,.05); --dash-frame: rgba(255,255,255,.2); --dash-r: 28px;
  --dw-bg: rgba(255,255,255,.09); --dw-bar: rgba(255,255,255,.14); --dw-bar-text: #fff; --dw-line: rgba(255,255,255,.2);
  --dw-shadow: 0 24px 60px -30px rgba(0,0,0,.6); --dw-r: 18px;
  --seg-on: #fff; --seg-off: rgba(255,255,255,.14); --lock: rgba(255,255,255,.18); --heart-line: #1a232c; --heart-empty: rgba(255,255,255,.25);
  --av-cat: #eef3f6; --av-eye: #9fc8dc; --av-line: #1a232c; --av-mouth: #1a232c;
  --av-bg: linear-gradient(160deg, #6f8796, #4d5b3f);
  --dev-bezel: rgba(255,255,255,.16); --dev-screen: linear-gradient(160deg, rgba(111,135,150,.6), rgba(77,91,63,.6));
  --dev-label: #fff;
}
[data-theme="paper"] {
  --dash-bg: #fff; --dash-frame: #111; --dash-r: 6px;
  --dw-bg: #fff; --dw-bar: #d9d9d9; --dw-bar-text: #111; --dw-line: #111; --dw-shadow: 5px 5px 0 #111; --dw-r: 3px;
  --seg-on: #111; --seg-off: #fff; --lock: #00000024; --heart-line: #111; --heart-empty: #fff;
  --av-cat: #2a2a2a; --av-eye: #ffd36b; --av-line: #111; --av-mouth: #cfcfcf;
  --av-bg: linear-gradient(#0000001a 1px, transparent 1px) 0 0/10px 10px, linear-gradient(90deg, #0000001a 1px, transparent 1px) 0 0/10px 10px, #f4f4f4;
  --dev-bezel: #111; --dev-screen: linear-gradient(#00000014 1px, transparent 1px) 0 0/22px 22px, linear-gradient(90deg, #00000014 1px, transparent 1px) 0 0/22px 22px, #fff;
  --dev-label: #111;
}

.dash { position: relative; margin: 58px 0 26px; padding: 6px 18px 20px; border-radius: var(--dash-r); background: var(--dash-bg);
  border: var(--bw) solid var(--dash-frame); backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur)); }
[data-theme="neo"] .dash { border: 10px solid var(--dash-frame); box-shadow: 0 0 0 2.5px #141414, 9px 9px 0 2.5px #141414; }
[data-theme="paper"] .dash { border-width: 2px; box-shadow: 7px 7px 0 #111; }
/* el gato se apoya justo sobre el borde superior del marco (borde + 1px de solape) */
.dash-cat-wrap .hero-cat { right: 8%; bottom: calc(100% + var(--bw) - 1px); width: 84px; }
[data-theme="paper"] .dash-cat-wrap .hero-cat { bottom: calc(100% + 1px); }
[data-theme="neo"] .dash-cat-wrap .hero-cat { bottom: calc(100% + 11.5px); }
/* Escritorio/laptop: el marco sube junto a la barra superior (dejando sitio al gato)
   y el gato pasa a la izquierda para no tapar idioma, radio y tema */
@media (min-width: 901px) {
  .dash { margin-top: 5px; }
  /* sigue a la derecha, pero corrido lo justo para no quedar sobre idioma, radio y tema */
  .dash-cat-wrap .hero-cat { right: 190px; }
}
.dash-head { display: flex; align-items: center; gap: 14px; margin: 0 2px 10px; flex-wrap: wrap; }
.dash-lv { font: 700 1.9rem/1 'Pixelify Sans', var(--font-h); letter-spacing: .02em; color: var(--text); }
[data-theme="neo"] .dash-lv { color: #fff; -webkit-text-stroke: 1.5px #141414; text-shadow: 3px 3px 0 #141414; font-size: 2.2rem; }
[data-theme="cosmos"] .dash-lv { background: linear-gradient(90deg, var(--accent), var(--accent3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dash-title { font: 700 .78rem var(--mono); letter-spacing: .18em; color: var(--muted); }
.dash-date { font: 600 .8rem var(--font); padding: 5px 12px; border-radius: 999px; border: var(--bw) solid var(--dw-line); background: var(--dw-bg); text-transform: capitalize; }
[data-theme="paper"] .dash-date, [data-theme="neo"] .dash-date { border-radius: 4px; box-shadow: 3px 3px 0 var(--border); }
/* Botón "Instalar app": misma pastilla que la fecha, pero invertida para que se note que se puede pulsar */
.dash-install-w { position: relative; display: inline-flex; }
.dash-install { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; color: var(--dw-bg); background: var(--text); border-color: var(--text);
  text-transform: none; transition: transform .15s, box-shadow .15s; }
.dash-install .ic { width: 15px; height: 15px; }
.dash-install:hover { transform: translate(-1px, -1px); }
[data-theme="paper"] .dash-install:hover, [data-theme="neo"] .dash-install:hover { box-shadow: 4px 4px 0 var(--border); }
.dash-install:active { transform: translate(2px, 2px); box-shadow: none; }
[data-theme="neo"] .dash-install { background: var(--accent); color: #141414; border-color: #141414; }
[data-theme="cosmos"] .dash-install { background: linear-gradient(90deg, var(--accent), var(--accent2)); color: #fff; border-color: transparent; }
/* Frost: --dw-bg is a translucent white, so the default text vanished on the white pill. Same colors as Frost's .btn.primary. */
[data-theme="frost"] .dash-install { background: #fff; color: #1a232c; border-color: transparent; }
.dash-install-pop { position: absolute; top: calc(100% + 10px); right: 0; z-index: 30; width: min(300px, 80vw); padding: 12px 14px; font-size: .82rem; line-height: 1.45;
  background: var(--dw-bg); color: var(--text); border: var(--bw) solid var(--dw-line); border-radius: 12px; box-shadow: var(--shadow); }
[data-theme="paper"] .dash-install-pop, [data-theme="neo"] .dash-install-pop { border: 2px solid var(--border); border-radius: 4px; box-shadow: 5px 5px 0 var(--border); }
.dash-install-pop p { margin: 0 0 6px; } .dash-install-pop ol { margin: 0 0 8px; padding-left: 18px; } .dash-install-pop li { margin: 3px 0; }
@media (max-width: 600px) { .dash-install span { display: none; } .dash-install-pop { right: auto; left: 0; } }

.dash-grid { display: grid; gap: 16px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.dw-me { grid-column: span 5; } .dw-stats { grid-column: span 4; } .dw-data { grid-column: span 3; }
.dw-bag { grid-column: span 7; } .dw-act { grid-column: span 5; }
.dw-top { grid-column: span 5; } .dw-apps { grid-column: span 7; }
@media (max-width: 1180px) {
  .dw-me, .dw-bag, .dw-apps { grid-column: span 12; }
  .dw-stats, .dw-data, .dw-act, .dw-top { grid-column: span 6; }
}
@media (max-width: 680px) { .dash-grid > * { grid-column: span 12 !important; } .dash { padding: 12px; } }

.dw { display: flex; flex-direction: column; min-width: 0; background: var(--dw-bg); border: var(--bw) solid var(--dw-line); border-radius: var(--dw-r);
  box-shadow: var(--dw-shadow); }
.dw-bar { border-radius: calc(var(--dw-r) - 2px) calc(var(--dw-r) - 2px) 0 0; display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--dw-bar); color: var(--dw-bar-text);
  border-bottom: var(--bw) solid var(--dw-line); font: 700 .74rem var(--font-h); letter-spacing: .16em; text-transform: uppercase; }
.dw-bar span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dw-bar small { font: 600 .7rem var(--mono); letter-spacing: .05em; opacity: .75; margin-left: 6px; }
.dw-dots { display: flex; gap: 4px; }
.dw-dots b { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; }
[data-theme="paper"] .dw-dots b { border-radius: 1px; }
.dw-body { padding: 14px; flex: 1; min-width: 0; }

/* ME.EXE */
.me { display: flex; gap: 16px; align-items: center; }
.me-av { width: 128px; height: 128px; flex: none; display: grid; place-items: center; border-radius: calc(var(--dw-r) - 2px); background: var(--av-bg); border: var(--bw) solid var(--dw-line); }
.me-av .avatar { width: 84%; height: 84%; animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.me-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
/* globo de diálogo: dos triángulos (borde + relleno) para la colita */
.bubble-say { --bub: #2a1f4a; position: relative; padding: 9px 12px; border-radius: 12px; background: var(--bub); border: var(--bw) solid var(--dw-line); font-weight: 600; font-size: .9rem; line-height: 1.35; }
.bubble-say::before, .bubble-say::after { content: ''; position: absolute; top: 12px; width: 0; height: 0; border-style: solid; border-color: transparent; }
.bubble-say::before { left: -10px; border-width: 7px 10px 7px 0; border-right-color: var(--dw-line); }
.bubble-say::after { left: calc(-10px + var(--bw) + 1px); top: 13px; border-width: 6px 9px 6px 0; border-right-color: var(--bub); }
[data-theme="neo"] .bubble-say { --bub: #fff1bf; }
[data-theme="frost"] .bubble-say { --bub: #4b5862; }
[data-theme="paper"] .bubble-say { --bub: #fff; border-radius: 3px; }
.me-lv { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.me-lv b { font: 700 1.05rem 'Pixelify Sans', var(--font-h); }
.xp { height: 12px; border-radius: 99px; background: var(--seg-off); border: var(--bw) solid var(--dw-line); overflow: hidden; }
.xp i { display: block; height: 100%; background: var(--seg-on); border-radius: inherit; }
[data-theme="paper"] .xp, [data-theme="neo"] .xp { border-radius: 2px; }
.me-hearts { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 2px; max-width: 220px; }
.me-hearts .heart { width: 100%; height: auto; }
.heart { width: 18px; height: auto; }
.me-av { cursor: pointer; position: relative; padding: 0; font: inherit; color: inherit; transition: transform .15s; }
.me-av:hover { transform: rotate(-3deg) scale(1.03); }
.me-av::after { content: '✎'; position: absolute; right: 4px; bottom: 4px; width: 22px; height: 22px; display: grid; place-items: center; font-size: .75rem;
  border-radius: 50%; background: var(--dw-bg); border: 1.5px solid var(--dw-line); opacity: 0; transition: opacity .2s; }
.me-av:hover::after, .me-av:focus-visible::after { opacity: 1; }
[data-theme="paper"] .me-av::after { border-radius: 2px; }
.av-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--dw-line); }
.av-pick button { aspect-ratio: 1; padding: 4px; border-radius: 10px; border: var(--bw) solid var(--dw-line); background: var(--av-bg); cursor: pointer; transition: transform .15s; }
.av-pick button:hover { transform: translateY(-2px); }
.av-pick button.on { outline: 3px solid var(--accent); outline-offset: 1px; }
.av-pick .px { width: 100%; height: 100%; }
[data-theme="paper"] .av-pick button { border-radius: 2px; }
.jobs { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--dw-line); }
.jobs-h { font: 700 .66rem var(--font-h); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.jobs-list { display: flex; flex-wrap: wrap; gap: 8px; }
.job { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; border: var(--bw) solid var(--dw-line); background: var(--input); text-decoration: none; color: inherit; }
.job .app-ic { --s: 26px; border-radius: 50%; box-shadow: none; border-width: 1px; }
.job b { font-size: .82rem; }
.job small { font: 700 .68rem var(--mono); color: var(--muted); }
.job.main { background: var(--panel2); }
[data-theme="paper"] .job { border-radius: 2px; } [data-theme="paper"] .job .app-ic { border-radius: 2px; }
[data-theme="neo"] .job { border-radius: 8px; background: #fff; box-shadow: 2px 2px 0 #141414; } [data-theme="neo"] .job .app-ic { border-radius: 6px; }
.dw-stats .dw-body { display: flex; flex-direction: column; }
.dw-stats .rpg { margin-bottom: 14px; }
.dash-tip .ic { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--text); }
.dash-tip { display: flex; gap: 8px; align-items: flex-start; margin: auto 0 0; padding: 8px 10px; font-size: .74rem; line-height: 1.4; border: 1px dashed var(--dw-line); border-radius: calc(var(--dw-r) - 6px); color: var(--muted); }
.dash-tip a { color: var(--text); font-weight: 700; }
.lang-btn { font: 800 .72rem var(--font); letter-spacing: .04em; }

/* STATS tipo RPG */
.rpg { display: flex; flex-direction: column; gap: 9px; }
.rpg-row { display: grid; grid-template-columns: 36px 1fr 34px; align-items: center; gap: 8px; }
.rpg-row b { font: 700 .82rem 'Pixelify Sans', var(--mono); letter-spacing: .06em; }
.rpg-row > span:last-child { font: 600 .76rem var(--mono); text-align: right; color: var(--muted); }
.seg10 { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.seg10 i { height: 12px; background: var(--seg-off); border: 1px solid var(--dw-line); border-radius: 2px; }
.seg10 i.on { background: var(--seg-on); }
[data-theme="cosmos"] .seg10 i.on { box-shadow: 0 0 8px rgba(255,95,174,.6); }

/* DATA */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: calc(var(--dw-r) - 6px); border: var(--bw) solid var(--dw-line); background: var(--input); text-decoration: none; color: inherit; min-width: 0; }
.tile.wide { grid-column: span 2; }
.tile b { font: 700 1.25rem/1.1 var(--font-h); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.wide b { font-size: 1rem; }
.tile b small { font-size: .75em; color: var(--muted); }
.tile span { font-size: .7rem; color: var(--muted); }
a.tile:hover { border-color: var(--accent); }
[data-theme="paper"] .tile { border-radius: 2px; }
[data-theme="neo"] .tile { background: #fff; }

/* ITEM BAG */
/* Carrusel de la bolsa: cada página son 16 items (8 × 2; en móvil 4 × 4) */
.bag-car { display: grid; grid-template-columns: 32px minmax(0, 1fr) 32px; align-items: center; gap: 8px; }
.bag-track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.bag-track::-webkit-scrollbar { display: none; }
.bag-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.bag-arrow { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: var(--bw) solid var(--dw-line); border-radius: 50%; background: var(--panel2); color: var(--text); font: 700 1.2rem/1 var(--mono); cursor: pointer; }
.bag-arrow:disabled { opacity: .3; cursor: default; }
[data-theme="paper"] .bag-arrow { border-radius: 2px; background: #fff; box-shadow: 2px 2px 0 #111; }
.bag-pages { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.bag-pages i { width: 8px; height: 8px; border-radius: 50%; background: var(--lock); transition: background .2s; }
.bag-pages i.on { background: var(--text); }
[data-theme="paper"] .bag-pages i { border-radius: 1px; }
.bag { scroll-snap-align: start; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-auto-rows: min-content; align-content: start; gap: 8px; padding: 4px 4px 6px; }
@media (max-width: 680px) { .bag { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Botón «?» de las ventanas del inicio */
/* El «?» es un SVG (no una letra): así queda centrado exacto, sin depender de la línea base de la fuente */
.dw-help { flex: none; width: 20px; height: 20px; display: grid; place-items: center; padding: 0; border: 1.5px solid currentColor; border-radius: 50%; color: inherit; text-decoration: none; }
.dw-help svg { width: 14px; height: 14px; display: block; }
.dw-help:hover, .dw-help:focus-visible { transform: scale(1.12); }
[data-theme="paper"] .dw-help { border-radius: 2px; }
.bag-slot { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; border: var(--bw) dashed var(--dw-line); background: var(--input); }
.bag-slot .px { width: 70%; height: 70%; }
.bag-slot.on { border-style: solid; background: var(--panel2); }
.bag-slot.on .px { animation: bob 3s ease-in-out infinite; }
.bag-slot:nth-child(3n).on .px { animation-delay: -1s; } .bag-slot:nth-child(3n+1).on .px { animation-delay: -2s; }
.bag-slot em { position: absolute; font: 700 1.1rem 'Pixelify Sans', monospace; font-style: normal; color: var(--muted); }
.bag-slot.new { outline: 3px solid var(--accent); animation: pop .6s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(.6); } }
[data-theme="paper"] .bag-slot { border-radius: 2px; }
[data-theme="paper"] .bag-slot.on { background: #fff; box-shadow: 3px 3px 0 #111; }
[data-theme="neo"] .bag-slot.on { background: #fff; box-shadow: 3px 3px 0 #141414; }
[data-theme="cosmos"] .bag-slot.on { box-shadow: 0 0 18px rgba(139,108,255,.35); }

/* ACTIVIDAD */
.dash-heat { grid-template-rows: repeat(7, 12px); gap: 3px; }
.dash-heat i { width: 12px; height: 12px; }
[data-theme="paper"] .heat i { border-radius: 1px; border-color: #111; }
.dash-note { margin: 10px 0 0; }

/* TOP APPS y DATA de cada herramienta */
.top-apps, .tool-data { display: flex; flex-direction: column; gap: 6px; }
.tool-data { max-height: 300px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.top-row, .td-row { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 10px; text-decoration: none; color: inherit; min-width: 0; }
.top-row:hover, .td-row:hover { background: var(--panel2); }
.top-row .t { width: 110px; flex: none; font-size: .84rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-bar { flex: 1; height: 10px; border-radius: 99px; background: var(--seg-off); border: 1px solid var(--dw-line); overflow: hidden; }
.top-bar i { display: block; height: 100%; background: var(--seg-on); }
.top-row b { font: 700 .82rem var(--mono); min-width: 24px; text-align: right; }
.td-row .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.td-row .t b { font-size: .86rem; }
.td-row .t small { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-n { flex: none; text-align: right; font: 700 1rem var(--mono); line-height: 1; }
.td-n small { display: block; font: 500 .62rem var(--font); color: var(--muted); }
[data-theme="paper"] .top-row, [data-theme="paper"] .td-row { border-radius: 2px; border-bottom: 1px dashed #111; }

/* =========================================================
   Dispositivo con las apps
   ========================================================= */
.device { margin: 8px 0 30px; padding: 14px; border-radius: 40px; background: var(--dev-bezel); box-shadow: var(--shadow); }
[data-theme="paper"] .device { border-radius: 14px; padding: 10px; box-shadow: 8px 8px 0 #888; }
[data-theme="neo"] .device { box-shadow: 9px 9px 0 var(--accent); }
[data-theme="frost"] .device { backdrop-filter: blur(30px); border: 1px solid rgba(255,255,255,.25); }
.dev-screen { border-radius: 28px; background: var(--dev-screen); padding: 10px 22px 16px; overflow: hidden; }
[data-theme="paper"] .dev-screen { border-radius: 6px; border: 2px solid #111; }
.dev-status { display: flex; align-items: center; justify-content: space-between; font: 600 .78rem var(--mono); color: var(--dev-label); padding: 2px 4px 14px; }
.dev-status b { font: 700 .72rem 'Pixelify Sans', var(--mono); letter-spacing: .14em; opacity: .85; }
.dev-batt { position: relative; width: 30px; height: 13px; border: 2px solid currentColor; border-radius: 3px; padding: 1px; }
.dev-batt::after { content: ''; position: absolute; right: -5px; top: 2px; width: 3px; height: 5px; background: currentColor; border-radius: 0 1px 1px 0; }
.dev-batt i { display: block; height: 100%; min-width: 3px; background: currentColor; transition: width .4s; }
.dev-batt.low i { background: var(--bad); }
.dev-power { display: inline-flex; align-items: center; gap: 8px; }
.dev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 20px 8px; justify-items: center; }
.dev-app { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 92px; text-decoration: none; color: var(--dev-label); }
.dev-app .app-ic { transition: transform .2s cubic-bezier(.2,1.6,.4,1); }
.dev-app:hover .app-ic { transform: translateY(-4px) scale(1.06); }
.dev-app:active .app-ic { transform: scale(.94); }
.dev-label { font-size: .72rem; font-weight: 600; text-align: center; line-height: 1.2; max-width: 92px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
[data-theme="neo"] .dev-label { text-shadow: 1px 1px 0 #141414, -1px 1px 0 #141414, 1px -1px 0 #141414, -1px -1px 0 #141414; }
[data-theme="cosmos"] .dev-label, [data-theme="frost"] .dev-label { text-shadow: 0 1px 4px rgba(0,0,0,.6); }
[data-theme="paper"] .dev-label { font-family: var(--mono); }
.dev-dock { display: flex; justify-content: center; gap: 22px; margin: 22px auto 0; padding: 12px 22px; width: max-content; max-width: 100%; border-radius: 26px;
  background: rgba(255,255,255,.16); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.dev-dock .dev-label { display: none; }
[data-theme="paper"] .dev-dock { border-radius: 4px; background: #ececec; border: 2px solid #111; }
[data-theme="neo"] .dev-dock { background: #fff; border: 2.5px solid #141414; border-radius: 16px; }
@media (max-width: 600px) {
  .device { padding: 8px; border-radius: 28px; }
  .dev-screen { padding: 8px 10px 12px; border-radius: 22px; }
  .dev-grid { grid-template-columns: repeat(4, 1fr); gap: 16px 4px; }
  .dev-app { width: 72px; } .dev-app .app-ic { --s: 52px; } .dev-label { font-size: .64rem; max-width: 72px; }
}

/* =========================================================
   Notas rápidas (cuaderno estilo HyperCard, igual en todos los estilos)
   ========================================================= */
.hc { --hc-ink: #111; position: relative; margin: 18px 4px 6px; color: var(--hc-ink); font-family: Georgia, 'Times New Roman', serif; }
.hc-rings { position: absolute; left: 14px; right: 14px; top: -14px; height: 28px; display: flex; justify-content: space-between; z-index: 2; pointer-events: none; }
.hc-rings i { width: 9px; height: 26px; border: 2.5px solid var(--hc-ink); border-radius: 6px; background: #fff; }
.hc-rings i:nth-child(n+19) { display: none; }
@media (min-width: 700px) { .hc-rings i:nth-child(n+19) { display: block; } }
.hc-page { position: relative; display: grid; grid-template-columns: 230px 1fr; gap: 26px; min-height: 420px; padding: 34px 26px 22px;
  background: #fff; border: 2.5px solid var(--hc-ink); border-radius: 6px 6px 0 0; box-shadow: 4px 0 0 var(--hc-ink); }
.hc-menu { align-self: start; border: 2px solid var(--hc-ink); background: #fff; box-shadow: 3px 3px 0 var(--hc-ink); font: 700 .9rem 'Pixelify Sans', 'Chicago', system-ui, sans-serif; }
.hc-menu-h { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; text-align: left; cursor: default; font: inherit;
  background: var(--hc-ink); color: #fff; padding: 3px 10px; letter-spacing: .02em; }
.hc-menu-h small { font: inherit; opacity: .7; }
.hc-menu-h i { display: none; margin-left: auto; font-style: normal; transition: transform .2s; }
.hc-search { display: block; width: calc(100% - 16px); margin: 8px; padding: 5px 8px !important; border: 1.5px solid var(--hc-ink) !important; border-radius: 0 !important;
  font: 500 .82rem 'Pixelify Sans', system-ui, sans-serif !important; background: #fff !important; color: var(--hc-ink) !important; box-shadow: none !important; }
.hc-list { max-height: 260px; overflow-y: auto; scrollbar-width: thin; }
.hc-item, .hc-cmd { display: flex; justify-content: space-between; align-items: center; width: 100%; text-align: left; padding: 3px 12px; border: 0; background: none;
  color: var(--hc-ink); font: inherit; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-item:hover, .hc-cmd:hover, .hc-item.on { background: var(--hc-ink); color: #fff; }
.hc-cmd kbd { font: inherit; opacity: .8; }
.hc-cmds { padding: 4px 0 8px; }
.hc-sep { border-top: 2px solid var(--hc-ink); margin: 6px 0; }
.hc-empty { margin: 4px 12px 8px; font: 500 .8rem 'Pixelify Sans', sans-serif; opacity: .65; }
.hc-body { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hc-h { font: 700 1.35rem 'Pixelify Sans', sans-serif; margin: 0 0 6px; }
.hc-body p { font-size: 1rem; line-height: 1.55; max-width: 52ch; }
.hc-title { border: 0 !important; border-bottom: 2px solid var(--hc-ink) !important; border-radius: 0 !important; background: none !important; padding: 2px 0 6px !important;
  font: 700 1.35rem 'Pixelify Sans', sans-serif !important; color: var(--hc-ink) !important; box-shadow: none !important; }
.hc-text { flex: 1; min-height: 280px; border: 0 !important; border-radius: 0 !important; padding: 2px 0 !important; box-shadow: none !important; resize: vertical;
  font: 400 1.02rem/1.6 Georgia, 'Times New Roman', serif !important; color: var(--hc-ink) !important;
  background: repeating-linear-gradient(transparent 0 calc(1.6em - 1px), #0000001c calc(1.6em - 1px) 1.6em) !important; background-attachment: local !important; }
.hc-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hc-foot select { width: auto; padding: 3px 8px; border: 1.5px solid var(--hc-ink); border-radius: 0; background: #fff; color: var(--hc-ink); font: 600 .8rem 'Pixelify Sans', sans-serif; box-shadow: none; }
.hc-meta { flex: 1; font: 500 .78rem 'Pixelify Sans', sans-serif; opacity: .7; }
.hc-mini { width: 30px; height: 30px; border: 1.5px solid var(--hc-ink); background: #fff; color: var(--hc-ink); cursor: pointer; font-size: 1rem; }
.hc-mini.on { background: var(--hc-ink); color: #fff; }
.hc-return { margin-left: auto; width: 40px; height: 34px; border: 2px solid var(--hc-ink); border-radius: 6px; background: #fff; color: var(--hc-ink); font-size: 1.2rem; cursor: pointer; box-shadow: 2px 2px 0 var(--hc-ink); }
.hc-body > .hc-return { position: absolute; right: 0; bottom: 0; }
.hc-return:hover { background: var(--hc-ink); color: #fff; }
.hc-row { position: relative; display: flex; align-items: center; }
.hc-row .hc-item { flex: 1; min-width: 0; padding-right: 30px; }
.hc-x { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-width: 20px; height: 20px; padding: 0 5px; border: 1.5px solid var(--hc-ink);
  background: #fff; color: var(--hc-ink); font: 700 .7rem 'Pixelify Sans', sans-serif; cursor: pointer; opacity: 0; transition: opacity .15s; }
.hc-row:hover .hc-x, .hc-app-w:hover .hc-x, .hc-x:focus-visible, .hc-x.armed { opacity: 1; }
.hc-x:hover, .hc-x.armed { background: var(--hc-ink); color: #fff; }
.hc-app-w { position: relative; }
.hc-app-w .hc-x { top: -6px; right: 4px; transform: none; border-radius: 50%; }
.hc-app-w .hc-x.armed { border-radius: 4px; }
@media (hover: none) { .hc-x { opacity: 1; } }
.hc-h small { font: 600 .8rem var(--mono); opacity: .6; margin-left: 6px; }
.hc-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 18px 8px; justify-items: center; padding: 6px 0 4px; }
.hc-app { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 86px; padding: 0; border: 0; background: none; color: var(--hc-ink); cursor: pointer; font: inherit; }
.hc-app .app-ic { --s: 58px; border: 2px solid var(--hc-ink); border-radius: 12px; box-shadow: 3px 3px 0 var(--hc-ink); transition: transform .2s cubic-bezier(.2,1.6,.4,1); }
.hc-app:hover .app-ic { transform: translateY(-3px) scale(1.05); }
.hc-app > span:last-child { font: 600 .74rem 'Pixelify Sans', sans-serif; text-align: center; line-height: 1.2; max-width: 86px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hc-plus { --tile: #fff; font: 700 1.8rem 'Pixelify Sans', sans-serif; border-style: dashed !important; box-shadow: none !important; }
.hc-pin { position: absolute; top: -6px; left: 8px; font-style: normal; font-size: .8rem; background: var(--hc-ink); color: #fff; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; }
.hc-tabs { display: flex; gap: 3px; padding: 0 6px; overflow-x: auto; scrollbar-width: none; }
.hc-tab { flex: none; padding: 3px 14px 4px; border: 2px solid var(--hc-ink); border-top: 0; border-radius: 0 0 6px 6px; background: #d6d6d6; color: var(--hc-ink);
  font: 700 .82rem 'Pixelify Sans', sans-serif; cursor: pointer; box-shadow: 2px 2px 0 var(--hc-ink); }
.hc-tab.on { background: #fff; transform: translateY(-2px); padding-top: 5px; }
.hc-tab:hover { background: #fff; }
/* Celular: menú plegable arriba, comandos en botones grandes, nota a lo ancho y sin zoom de iOS al escribir */
@media (max-width: 760px) {
  .hc { margin: 18px 0 6px; }
  /* minmax(0, …): sin esto el contenido ensancha la columna y el cuaderno se sale de la pantalla */
  .hc-page { grid-template-columns: minmax(0, 1fr); padding: 26px 12px 14px; gap: 14px; min-height: 0; }
  .hc-menu-h { cursor: pointer; padding: 9px 12px; font-size: 1rem; }
  .hc-menu-h i { display: inline; }
  .hc-menu.closed .hc-menu-h i { transform: rotate(-90deg); }
  .hc-menu.closed .hc-menu-in { display: none; }
  .hc-search { font-size: 16px !important; padding: 8px 10px !important; }
  .hc-list { max-height: 34vh; }
  .hc-item { padding: 9px 12px; }
  .hc-row .hc-item { padding-right: 44px; }
  .hc-x { min-width: 30px; height: 30px; right: 6px; font-size: .8rem; }
  .hc-cmds { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 2px 8px 8px; }
  .hc-cmd { justify-content: center; padding: 9px 6px; border: 1.5px solid var(--hc-ink); white-space: normal; text-align: center; line-height: 1.2; }
  .hc-cmd[data-c="new"] { grid-column: span 2; background: var(--hc-ink); color: #fff; }
  .hc-cmd kbd { display: none; }
  .hc-sep { margin: 4px 0 8px; }
  .hc-title { font-size: 1.25rem !important; }
  .hc-text { min-height: 46vh; min-height: 46dvh; font-size: 16px !important; }
  .hc-foot { gap: 8px; }
  .hc-foot select { font-size: 16px; padding: 6px 8px; }
  .hc-mini { width: 40px; height: 40px; }
  .hc-return { width: 48px; height: 40px; }
  .hc-meta { order: 9; flex-basis: 100%; }
  .hc-body > .hc-return { position: static; align-self: flex-end; }
  .hc-apps { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 16px 4px; }
  .hc-app { width: 74px; } .hc-app .app-ic { --s: 50px; } .hc-app > span:last-child { max-width: 74px; }
  .hc-app-w .hc-x { min-width: 26px; height: 26px; top: -8px; right: 2px; }
  .hc-tabs { padding: 0 2px; }
  .hc-tab { padding: 7px 14px 8px; font-size: .86rem; }
}
@media (max-width: 430px) { .hc-rings i:nth-child(n+13) { display: none; } .hc-rings { left: 10px; right: 10px; } }

/* ---------- Comprimir imágenes: comparador antes/después ---------- */
.cp-ok { color: var(--good); font-weight: 700; }
.table tr.sel td { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.cmp { position: relative; border: var(--bw) solid var(--border); border-radius: calc(var(--radius) / 2); overflow: hidden; background:
  repeating-conic-gradient(#ccc 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.cmp img { display: block; width: 100%; max-height: 420px; object-fit: contain; }
.cmp .cmp-top { position: absolute; inset: 0; height: 100%; clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.cmp::after { content: ''; position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; background: #fff; box-shadow: 0 0 0 1px #0006; pointer-events: none; }
.cmp-tag { position: absolute; top: 8px; padding: 2px 8px; font: 600 .72rem var(--mono); background: #000a; color: #fff; border-radius: 4px; }
.cmp-tag.l { left: 8px; } .cmp-tag.r { right: 8px; }
.cmp-range { width: 100%; margin-top: 6px; }

/* ---------- Buscador de atajos ---------- */
.sc-head { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.sc-q { flex: 1 1 260px; font-size: 1rem; }
.sc-apps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.sc-chip { padding: 5px 12px; border-radius: 999px; border: var(--bw) solid var(--border); background: var(--panel2); color: var(--text); font: 600 .78rem var(--font, inherit); cursor: pointer; }
.sc-chip.on { background: var(--text); color: var(--bg); }
[data-theme="paper"] .sc-chip { border-radius: 3px; border-color: #111; }
.sc-group { margin-bottom: 18px; }
.sc-group h3 { margin: 0 0 8px; font-size: 1rem; }
.sc-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 6px; }
.sc-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: var(--bw) solid var(--border); border-radius: 10px; background: var(--panel); }
[data-theme="paper"] .sc-row { border-radius: 3px; }
.sc-keys { flex: none; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 3px; max-width: 55%; }
.sc-keys i { font-style: normal; opacity: .55; font-size: .75rem; }
.sc-keys .sc-then { margin: 0 3px; }
.sc-desc { flex: 1; min-width: 0; font-size: .85rem; }
kbd { display: inline-block; min-width: 1.6em; padding: 2px 6px; font: 600 .74rem var(--mono); text-align: center; color: var(--text);
  background: var(--panel2); border: 1.5px solid var(--border); border-bottom-width: 3px; border-radius: 6px; white-space: nowrap; }
.sc-gest { font: 600 .78rem var(--mono); padding: 2px 8px; border: 1.5px dashed var(--border); border-radius: 6px; }
.sc-star { flex: none; border: 0; background: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: 2px 4px; }
.sc-star.on { color: #f5b301; }
@media (max-width: 600px) { .sc-rows { grid-template-columns: 1fr; } .sc-keys { max-width: 60%; } }

/* ---------- Accesibilidad: foco visible con teclado en todo ---------- */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.dev-app:focus-visible, .nav-item:focus-visible, .hc-app:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 12px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 8px 14px; background: var(--text); color: var(--bg); border-radius: 8px; text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* =========================================================
   Celulares: ajustes generales
   ========================================================= */
@media (max-width: 760px) {
  /* iOS hace zoom al enfocar un campo con letra < 16px */
  input[type=text], input[type=number], input[type=date], input[type=time], input[type=url], input[type=password], input[type=email], input[type=search], select, textarea { font-size: 16px; }
  .win { margin-bottom: 16px; }
  .win-bar { padding: 12px 14px 0; gap: 8px; }
  [data-theme="neo"] .win-bar { padding: 8px 10px; }
  .win-bar h1 { font-size: 1.3rem; overflow-wrap: anywhere; }
  .win-sub { margin: 8px 16px 0; font-size: .92rem; }
  .win-body { padding: 16px; }
  .card { padding: 14px; }
  .split, .grid { gap: 14px; }
  .seg { display: flex; }
  .seg button { flex: 1 1 auto; padding: 9px 12px; }
  .btn { padding: 11px 18px; }
  .row > .btn { flex: 0 1 auto; }
  .toasts { left: 12px; right: 12px; transform: none; }
  .toast { max-width: 100%; text-align: center; border-radius: 16px; }
  .table { font-size: .84rem; }
  .table th, .table td { padding: 8px 6px; }
  .agenda { max-height: none; }
  .agenda-row { gap: 6px 8px; }
  .agenda-row input[type=checkbox] { width: 22px; height: 22px; }
  .q-text { font-size: 1.08rem; }
  .q-opt { padding: 13px 14px; }
  .me-av { width: 96px; height: 96px; }
  .top-row .t { width: 86px; }
  .stat b { font-size: 1.4rem; }
}
@media (max-width: 420px) {
  .main { padding-left: 12px; padding-right: 12px; }
  .top { padding-left: 12px; padding-right: 12px; margin: 0 -12px; }
  .bottom-nav { left: 8px; right: 8px; }
  .bottom-nav .nav-item { padding: 4px 2px; font-size: .64rem; }
  .bottom-nav .nav-item .ni { width: 34px; height: 34px; }
  .me { flex-direction: column; align-items: stretch; }
  .me-av { align-self: center; }
  .bubble-say::before, .bubble-say::after { display: none; }
  .g4 { gap: 10px; }
  .row > .btn.primary:only-child, .row > .btn.primary:first-child:last-child { width: 100%; }
}

/* =========================================================
   Tracker de progreso (web retro de los 2000: ventanitas con pestañas,
   terminal y paneles grises; misma paleta en todos los estilos)
   ========================================================= */
.tk { --ink: #1d1b2b; --cream: #fbf3df; --y: #f6c94c; --t: #5ccbd0; --p: #f59bbd; --g: #a6dc84; --l: #c4b2ff; --gr: #e4e4e4;
  position: relative; margin: 56px 0 30px; padding: 34px 26px 22px; color: var(--ink); font: 400 .95rem/1.5 'Space Grotesk', system-ui, sans-serif;
  background: linear-gradient(#1d1b2b12 1px, transparent 1px) 0 0 / 22px 22px, linear-gradient(90deg, #1d1b2b12 1px, transparent 1px) 0 0 / 22px 22px, var(--cream);
  border: 2.5px solid var(--ink); border-radius: 26px; box-shadow: 6px 6px 0 var(--ink); }
.tk a { color: inherit; }
/* barra superior igual que en el resto de herramientas (volver · título · enlace · cerrar) */
.tk-top { display: flex; align-items: center; gap: 12px; margin: 4px 0 0; }
.tk-top h1 { flex: 1; min-width: 0; margin: 0; font-size: clamp(1.3rem, 3vw, 1.9rem); overflow-wrap: anywhere; }
[data-theme="neo"] .tk-top h1 { text-transform: uppercase; letter-spacing: .06em; }
.tk ::selection { background: var(--y); color: var(--ink); }

/* pestañas de navegador (una por plan) */
.tk-tabs { position: absolute; left: 34px; right: 300px; bottom: 100%; display: flex; align-items: flex-end; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 6px; }
.tk-tabs::-webkit-scrollbar { display: none; }
.tk-tab { flex: none; max-width: 190px; padding: 4px 12px 3px; border: 2px solid var(--ink); border-bottom: 0; border-radius: 9px 9px 0 0; background: var(--c);
  color: var(--ink); font: 400 .7rem 'Silkscreen', monospace; letter-spacing: .03em; text-decoration: none; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-tab.on { padding-bottom: 7px; box-shadow: inset 0 -3px 0 #fff8; }
.tk-tab:hover { filter: brightness(1.05); transform: translateY(-1px); }
.tk-tab:focus-visible { outline: 3px solid var(--ink); outline-offset: -5px; }

/* ventanita flotante "constant evolution" */
.tk-float { position: absolute; right: 36px; top: -30px; width: 230px; z-index: 2; background: #fff; border: 2px solid var(--ink); border-radius: 8px; box-shadow: 3px 3px 0 var(--ink); }
.tk-float .tk-bar { padding: 3px 9px; font-size: .64rem; }
.tk-float-b { display: flex; align-items: center; gap: 8px; padding: 6px 9px; }
.tk-float-b b { font: 400 .7rem 'Silkscreen', monospace; }
.tk-mini { flex: 1; height: 12px; border: 2px solid var(--ink); border-radius: 3px; background: #fff; overflow: hidden; }
.tk-mini i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--t) 0 8px, #fff 8px 10px); }

.tk-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px; align-items: start; }
.tk-hero { grid-column: span 7; } .tk-focus { grid-column: span 5; }
.tk-stats, .tk-store, .tk-term { grid-column: span 4; }
.tk-week { grid-column: span 12; }
.tk-items { grid-column: span 7; } .tk-col { grid-column: span 5; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.tk-act { grid-column: span 7; }
.tk-foot { grid-column: span 5; }
/* sin planes: saludo a lo ancho y debajo tests + notas */
.tk-hero.tk-full { grid-column: span 12; }
.tk-grid > .tk-scores, .tk-grid > .tk-notes { grid-column: span 6; }
@media (max-width: 640px) { .tk-grid > .tk-scores, .tk-grid > .tk-notes { grid-column: span 12; } }

/* ventana */
.tk-w { position: relative; min-width: 0; background: #fff; border: 2px solid var(--ink); border-radius: 10px; box-shadow: 4px 4px 0 var(--ink); }
.tk-bar { display: flex; align-items: center; gap: 8px; padding: 5px 10px; background: var(--bar, var(--y)); border-bottom: 2px solid var(--ink); border-radius: 8px 8px 0 0;
  font: 400 .7rem 'Silkscreen', monospace; letter-spacing: .08em; text-transform: lowercase; }
.tk-bar span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-dots { display: flex; gap: 4px; flex: none; }
.tk-dots b { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--p); }
.tk-dots b:nth-child(2) { background: var(--y); } .tk-dots b:nth-child(3) { background: var(--g); }
.tk-body { padding: 16px; min-width: 0; }
.tk-body > :last-child { margin-bottom: 0; }
.tk-body > .tk-btn { margin-top: 4px; }
.tk-spark { position: absolute; z-index: 1; height: auto; pointer-events: none; animation: tk-tw 3.5s ease-in-out infinite; }
@keyframes tk-tw { 50% { transform: rotate(18deg) scale(.86); } }

.tk-h { font: 700 clamp(1.7rem, 4.4vw, 2.6rem)/1.05 'Pixelify Sans', monospace; margin: 4px 0 12px; letter-spacing: .01em; text-shadow: 3px 3px 0 var(--y); overflow-wrap: anywhere; }
.tk-caret { display: inline-block; width: .12em; height: .9em; margin-left: .12em; vertical-align: -.08em; background: var(--ink); animation: tk-blink 1s steps(1) infinite; }
@keyframes tk-blink { 50% { opacity: 0; } }
.tk-msg { margin: 0 0 10px; max-width: 62ch; }
.tk-late { margin: 0 0 10px; padding: 6px 10px; border: 2px dashed var(--ink); border-radius: 6px; background: #ffe6ef; font-size: .88rem; }
.tk-late a { font-weight: 700; }
.tk-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tk-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 2px solid var(--ink); border-radius: 6px; background: var(--c, #fff); color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink); font: 400 .72rem 'Silkscreen', monospace; letter-spacing: .03em; text-decoration: none; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.tk-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.tk-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.tk-btn.sm { padding: 4px 9px; font-size: .64rem; box-shadow: 2px 2px 0 var(--ink); }

/* stats */
.tk-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tk-tile { display: flex; flex-direction: column; min-width: 0; padding: 8px 10px; border: 2px solid var(--ink); border-radius: 7px; background: var(--c); }
.tk-tile.wide { grid-column: span 2; }
.tk-tile b { font: 700 1.45rem/1.1 'Pixelify Sans', monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-tile.wide b { font-size: 1.05rem; text-transform: capitalize; }
.tk-tile b small { font-size: .55em; margin-left: 2px; }
.tk-tile span { font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* storage */
.tk-store-h { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; margin-bottom: 8px; }
.tk-store-h b { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-store-h span { flex: none; font-family: 'JetBrains Mono', monospace; font-size: .8rem; }
.tk-store-bar { display: flex; height: 24px; border: 2px solid var(--ink); border-radius: 4px; overflow: hidden;
  background: repeating-linear-gradient(45deg, var(--gr) 0 6px, #f4f4f4 6px 12px); }
.tk-store-bar i { height: 100%; border-right: 2px solid var(--ink); }
.tk-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: .78rem; }
.tk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tk-legend i { width: 12px; height: 12px; border: 1.5px solid var(--ink); border-radius: 2px; }
.tk-legend small { font-family: 'JetBrains Mono', monospace; opacity: .7; }

/* terminal */
.tk-tty { font: 400 .8rem/1.65 'JetBrains Mono', monospace; overflow-wrap: anywhere; }
.tk-tty .ok { color: #2a9d5c; font-weight: 700; }
.tk-tty .dim { opacity: .55; }
.tk-block { display: inline-block; width: .6em; height: 1em; vertical-align: -.15em; background: var(--ink); animation: tk-blink 1s steps(1) infinite; }

/* semana */
.tk-week-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; font-size: .86rem; }
.tk-week-h > span:first-of-type { flex: 1; min-width: 150px; }
.tk-arrow { min-width: 34px; height: 30px; padding: 0 8px; border: 2px solid var(--ink); border-radius: 5px; background: #fff; color: var(--ink); cursor: pointer; box-shadow: 2px 2px 0 var(--ink); font: 400 .7rem 'Silkscreen', monospace; }
.tk-arrow:hover { background: var(--y); }
.tk-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.tk-day { min-width: 0; min-height: 120px; border: 2px solid var(--ink); border-radius: 7px; background: #fff; overflow: hidden; }
.tk-day.tk-empty { background: repeating-linear-gradient(-45deg, #fff 0 6px, #f6f6f6 6px 12px); }
.tk-day.today { box-shadow: 0 0 0 3px var(--p); }
.tk-day.all { background: #eefbe6; }
.tk-day-h { display: flex; align-items: baseline; gap: 6px; padding: 4px 8px; border-bottom: 2px solid var(--ink); background: var(--gr); }
.tk-day.today .tk-day-h { background: var(--p); }
.tk-day-h b { font: 400 .66rem 'Silkscreen', monospace; text-transform: lowercase; }
.tk-day-h span { font: 700 1rem 'Pixelify Sans', monospace; }
.tk-day-h em { margin-left: auto; font-style: normal; color: #2a9d5c; font-weight: 700; }
.tk-free { margin: 0; padding: 10px 8px; font: 400 .62rem 'Silkscreen', monospace; opacity: .45; }
.tk-ses { display: flex; gap: 6px; align-items: flex-start; padding: 6px 7px; border-left: 5px solid var(--c); cursor: pointer; }
.tk-ses + .tk-ses { border-top: 1px dashed #1d1b2b40; }
.tk-ses:hover { background: #fbf3df; }
.tk-ses input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--ink); }
.tk-ses span { min-width: 0; display: flex; flex-direction: column; }
.tk-ses small { font: 400 .66rem 'JetBrains Mono', monospace; opacity: .7; }
.tk-ses b { font-size: .78rem; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.tk-ses.done b { text-decoration: line-through; opacity: .55; }
.tk-ses.late small { color: #9a6200; opacity: 1; } /* ámbar, no rojo: "pendiente", no "fallaste" */

/* ahora.exe: una sola tarea según la energía */
.tk-energy { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.tk-energy span { font: 400 .66rem 'Silkscreen', monospace; margin-right: 2px; }
.tk-energy button { flex: 1 1 auto; min-height: 36px; padding: 5px 10px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink);
  font: 600 .82rem 'Space Grotesk', sans-serif; cursor: pointer; }
.tk-energy button.on { background: var(--ink); color: #fff; }
.tk-now { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 2px solid var(--ink); border-left: 8px solid var(--c); border-radius: 8px; background: #fffdf5; }
.tk-now small { font: 400 .72rem 'JetBrains Mono', monospace; opacity: .75; }
.tk-now b { font: 700 1.25rem/1.2 'Pixelify Sans', monospace; overflow-wrap: anywhere; }
.tk-now span { font-size: .86rem; }
.tk-now a { font-size: .84rem; font-weight: 700; }
.tk-tip { margin: 10px 0; font-size: .84rem; color: #444; }
.tk-calm-btn span { white-space: nowrap; }
.tk-goal { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.tk-goal span { font: 400 .62rem 'Silkscreen', monospace; }
.tk .tk-goal input { padding: 8px 10px; border: 2px solid var(--ink); border-radius: 6px; background: #fff; color: var(--ink); font: 500 .9rem 'Space Grotesk', sans-serif; box-shadow: none; }
.tk .tk-goal input:focus { box-shadow: 3px 3px 0 var(--y); border-color: var(--ink); }
/* cronómetro hacia arriba: tiempo visible, sin alarmas */
.tk-timer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; margin: 10px 0; padding: 8px 10px; border: 2px dashed var(--ink); border-radius: 8px; background: #fff; }
.tk-timer b { font: 700 1.5rem 'Pixelify Sans', monospace; min-width: 3.2em; }
.tk-timer small { grid-column: 1 / -1; font-size: .74rem; color: #555; }
.tk-timer .tk-mini i { width: 0; transition: width 1s linear; }
/* nivel de Inicio dentro del tracker */
.tk-xp { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2px 10px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed #1d1b2b55; text-decoration: none; }
.tk-xp b { font: 700 .95rem 'Pixelify Sans', monospace; }
.tk-xp small { grid-column: 1 / -1; font-size: .72rem; color: #555; }
.tk-xp .tk-mini i { background: repeating-linear-gradient(90deg, var(--p) 0 8px, #fff 8px 10px); }

/* Modo calma: solo lo esencial (saludo, ahora.exe, semana, elementos, notas) y sin animaciones */
.tk.calm :is(.tk-stats, .tk-store, .tk-term, .tk-act, .tk-scores, .tk-float) { display: none; }
.tk.calm :is(.tk-spark, .tk-caret, .tk-block) { animation: none; }
.tk.calm .tk-spark { display: none; }

/* paneles grises estilo 2000 */
.tk-r { min-width: 0; background: #f4f4f4; border: 1px solid #8f8f8f; box-shadow: 4px 4px 0 #c9c9c9; }
.tk-rh { padding: 3px 4px 2px; border-bottom: 1px solid #8f8f8f; font: 400 .6rem 'Silkscreen', monospace; letter-spacing: .06em; color: #555;
  background: radial-gradient(#8f8f8f 1px, transparent 1.2px) 0 0 / 4px 4px, #fff; }
.tk-rh span { background: #fff; padding: 0 6px 0 2px; }
.tk-rb { padding: 4px; }
.tk-entry { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 7px 10px 7px 0; border: 0; border-top: 1px solid #d2d2d2; background: none;
  color: var(--ink); font: inherit; text-align: left; }
.tk-entry:first-child { border-top: 0; }
.tk-ec { flex: none; align-self: stretch; display: grid; place-items: center; width: 34px; margin: -7px 0; border-right: 1px solid #d2d2d2; background: #e9e9e9; color: #6a6a6a; }
.tk-cube { width: 16px; height: 16px; }
.tk-et { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tk-et b { font-size: .86rem; font-weight: 700; color: #6b2a3a; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.tk-et b a { text-decoration: inherit; }
.tk-et small { font-size: .74rem; color: #666; }
.tk-tag { display: inline-block; margin-left: 4px; padding: 0 5px; border: 1px solid #8f8f8f; border-radius: 3px; background: #fff; font-size: .68rem; white-space: nowrap; }
.tk-tag.ok { background: #e3f6d6; }
.tk-pct { flex: none; width: 38px; text-align: right; font: 600 .76rem 'JetBrains Mono', monospace; }
.tk-entry.more { justify-content: flex-end; padding: 8px 10px; }
.tk-entry.more a, .tk-linkbtn { font: 700 .82rem 'Space Grotesk', sans-serif; color: #6b2a3a; background: none; border: 0; cursor: pointer; padding: 0; text-decoration: underline; }
.tk-nlink { cursor: pointer; }
.tk-nlink:hover { background: #fff; }
.tk-meter { flex: none; display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; width: 104px; }
.tk-meter i { height: 11px; border: 1px solid var(--ink); border-radius: 1px; background: #fff; }
.tk-meter i.on { background: var(--g); }

/* dominio de tests */
.tk-mast { display: flex; flex-direction: column; gap: 8px; }
.tk-mast > div { display: grid; grid-template-columns: minmax(0, 1fr) 90px 40px; align-items: center; gap: 8px; font-size: .82rem; }
.tk-mast > div > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-mast b { font: 600 .76rem 'JetBrains Mono', monospace; text-align: right; }
.tk-mb { height: 12px; border: 2px solid var(--ink); border-radius: 3px; background: #fff; overflow: hidden; }
.tk-mb i { display: block; height: 100%; background: var(--l); }
.tk-note { margin: 10px 0 0; font-size: .76rem; color: #555; }
.tk-note a { font-weight: 700; }

/* actividad */
.tk-heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); gap: 3px; overflow-x: auto; padding-bottom: 2px; }
.tk-heat i { width: 13px; height: 13px; border: 1.5px solid var(--ink); border-radius: 2px; background: #fff; }
.tk-heat i.off { visibility: hidden; }
.tk-heat i[data-l="1"] { background: #d7f0c6; } .tk-heat i[data-l="2"] { background: var(--g); } .tk-heat i[data-l="3"] { background: #4f9e3a; }

/* pie */
.tk-foot { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; background: #fff; border: 2px solid var(--ink); border-radius: 10px; box-shadow: 4px 4px 0 var(--ink);
  font: 400 .66rem 'Silkscreen', monospace; letter-spacing: .03em; }

@media (max-width: 1000px) {
  .tk-hero, .tk-focus, .tk-stats, .tk-store, .tk-term, .tk-items, .tk-col, .tk-act, .tk-foot { grid-column: span 12; }
  .tk-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tk-tile.wide { grid-column: span 4; }
  .tk-days { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .tk-float { display: none; }
  .tk-tabs { left: 18px; right: 18px; }
}
@media (max-width: 640px) {
  .tk { margin: 44px 0 20px; padding: 20px 12px 14px; border-radius: 18px; box-shadow: 4px 4px 0 var(--ink); background-size: 18px 18px, 18px 18px, auto; }
  .tk-tabs { left: 12px; right: 12px; }
  .tk-tab { max-width: 140px; padding: 6px 10px 4px; }
  /* en el celular solo la luna, en un botón cuadrado igual a los demás de la barra */
  .tk-calm-btn { width: 40px; height: 40px; padding: 0; flex: none; }
  .tk-calm-btn span { display: none; }
  .tk-energy span { flex-basis: 100%; }
  .tk-now b { font-size: 1.1rem; }
  .tk-tab.on { padding-bottom: 8px; }
  .tk-grid, .tk-col { gap: 16px; }
  .tk-body { padding: 12px; }
  .tk-tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tk-tile.wide { grid-column: span 2; }
  .tk-spark { transform: scale(.8); }
  .tk-row .tk-btn { flex: 1 1 auto; justify-content: center; padding: 9px 10px; }
  .tk-days { grid-template-columns: 1fr; gap: 6px; }
  /* cada día es una fila: fecha a la izquierda, sesiones a la derecha */
  .tk-day { min-height: 0; display: flex; }
  .tk-day-h { flex: none; width: 62px; flex-direction: column; align-items: center; justify-content: center; gap: 0; border-bottom: 0; border-right: 2px solid var(--ink); }
  .tk-day-h em { margin: 0; }
  .tk-day-l { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
  .tk-free { padding: 12px 10px; }
  /* cabecera de la semana: ◀ texto ▶ en una línea y la barrita debajo */
  .tk-week-h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .tk-wk-t { text-align: center; min-width: 0 !important; }
  .tk-week-h .tk-meter { grid-row: 2; grid-column: 1 / -1; width: 100%; }
  .tk-ses { padding: 10px 10px; }
  .tk-ses + .tk-ses { border-top: 1px dashed #1d1b2b40; }
  .tk-ses input { width: 22px; height: 22px; margin: 0; }
  .tk-ses b { font-size: .88rem; }
  .tk-meter { width: 64px; gap: 1px; }
  .tk-meter i { height: 9px; }
  .tk-pct { width: 34px; }
  .tk-entry { gap: 8px; }
  .tk-mast > div { grid-template-columns: minmax(0, 1fr) 70px 36px; }
  .tk-week-h { gap: 8px; }
  .tk-arrow { min-width: 40px; height: 36px; }
}
