/* ==========================================================
   METSIS OS · escritorio estilo Windows 11 con identidad Metsis
   ========================================================== */
.os {
  --os-font: "Segoe UI Variable Text", "Segoe UI", "Instrument Sans", system-ui, sans-serif;
  --mica: rgba(250, 252, 255, .78);
  --mica-strong: rgba(250, 252, 255, .92);
  --os-line: rgba(15, 39, 66, .1);
  --accent: var(--indigo);
  --tb-h: 52px;
  position: relative;
  height: 100%;
  overflow: hidden;
  font-family: var(--os-font);
  font-size: 14px;
  color: var(--ink);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  isolation: isolate;
}
.os:focus { outline: none; }

/* pantalla completa (API nativa o respaldo con posición fija) */
.os:fullscreen { height: 100vh; width: 100vw; border-radius: 0; }
.os.is-full { position: fixed; inset: 0; z-index: 300; height: 100vh; height: 100dvh; }
body.os-locked { overflow: hidden; }
body.os-locked .os-frame, body.os-locked .os-stage, body.os-locked .pin-spacer { transform: none !important; will-change: auto !important; filter: none !important; }
.os-full-btn {
  width: 36px; height: 36px; border: 0; border-radius: 6px; background: rgba(75, 79, 196, .12); color: var(--accent);
  display: grid; place-items: center; transition: background .2s, color .2s;
}
.os-full-btn:hover { background: var(--accent); color: #fff; }
.os[data-wall="1"] .os-full-btn { background: rgba(255, 255, 255, .12); color: #fff; }
.os-full-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.os-full-btn .i-exit { display: none; }
.os.is-fullscreen .os-full-btn .i-exit { display: block; }
.os.is-fullscreen .os-full-btn .i-enter { display: none; }

/* fondo: bloom inspirado en la pantalla del teléfono del logo */
.os-wallpaper { position: absolute; inset: 0; z-index: 0; transition: background 1s; }
.os[data-wall="0"] .os-wallpaper { background: radial-gradient(70% 70% at 50% 45%, #DDF3FA 0%, #C9D8F4 45%, #B5C2EC 100%); }
.os[data-wall="1"] .os-wallpaper { background: radial-gradient(70% 70% at 50% 45%, #22406A 0%, #13294A 55%, #0A1A31 100%); }
.os[data-wall="2"] .os-wallpaper { background: linear-gradient(135deg, #F3F6FB 0%, #E3E6FA 50%, #D6F1F6 100%); }
.os-bloom { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 30px 60px rgba(75, 79, 196, .35)); }
.os[data-wall="1"] .os-bloom { opacity: .85; filter: drop-shadow(0 0 80px rgba(25, 182, 210, .45)); }
.os[data-wall="2"] .os-bloom { opacity: .45; }

/* ---------- iconos ---------- */
.os-icons { position: absolute; inset: 0 0 var(--tb-h); z-index: 1; }
.dicon {
  position: absolute; left: 0; top: 0; width: 88px; padding: 6px 4px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border-radius: 6px; border: 1px solid transparent;
  cursor: default; will-change: transform; touch-action: none;
}
.dicon:hover { background: rgba(255, 255, 255, .28); border-color: rgba(255, 255, 255, .35); }
.dicon.is-selected { background: rgba(75, 79, 196, .2); border-color: rgba(75, 79, 196, .45); }
.dicon:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dicon.is-dragging { z-index: 5; opacity: .92; }
.dicon-art { width: 56px; height: 56px; display: grid; place-items: center; position: relative; pointer-events: none; }
.dicon-art svg { width: 100%; height: 100%; overflow: visible; }
.dicon-label {
  max-width: 84px; text-align: center; font-size: 12.5px; line-height: 1.25; color: #fff;
  text-shadow: 0 1px 2px rgba(10, 26, 49, .85), 0 0 8px rgba(10, 26, 49, .35);
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; pointer-events: none;
}
.os[data-wall="0"] .dicon-label, .os[data-wall="2"] .dicon-label { color: var(--ink); text-shadow: 0 1px 0 rgba(255, 255, 255, .7); font-weight: 500; }
.dicon.is-selected .dicon-label { -webkit-line-clamp: 4; }

/* miniatura de proyecto como icono */
.thumb { position: relative; width: 52px; height: 52px; border-radius: 9px; overflow: hidden; box-shadow: 0 6px 14px -6px rgba(10, 26, 49, .55), 0 0 0 1px rgba(255, 255, 255, .6) inset; }
.thumb-badge { position: absolute; right: -6px; bottom: -4px; padding: 1px 5px; border-radius: 5px; font: 700 9.5px/1.4 var(--os-font); color: #fff; background: var(--ink); box-shadow: 0 2px 6px rgba(10, 26, 49, .4); }
.thumb-badge.app { background: var(--indigo); }
.thumb-badge.web { background: #0E8EA6; }

/* ---------- mockups generados (web/app) ---------- */
.mock { position: absolute; inset: 0; background: var(--b); }
.mock-web .mw-bar { height: 14%; background: rgba(255, 255, 255, .85); display: flex; align-items: center; gap: 3%; padding: 0 6%; }
.mock-web .mw-bar i { width: 5%; aspect-ratio: 1; border-radius: 50%; background: var(--a); opacity: .5; }
.mock-web .mw-hero { position: absolute; left: 8%; top: 24%; width: 55%; }
.mock-web .mw-hero b { display: block; height: .55em; border-radius: 3px; background: var(--a); margin-bottom: .32em; }
.mock-web .mw-hero b:nth-child(2) { width: 70%; }
.mock-web .mw-hero span { display: inline-block; margin-top: .4em; width: 45%; height: .45em; border-radius: 99px; background: var(--a); opacity: .65; }
.mock-web .mw-img { position: absolute; right: 7%; top: 24%; width: 28%; height: 36%; border-radius: 6%; background: linear-gradient(140deg, var(--a), color-mix(in srgb, var(--a) 40%, #fff)); }
.mock-web .mw-cards { position: absolute; left: 8%; right: 7%; bottom: 8%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5%; height: 22%; }
.mock-web .mw-cards i { border-radius: 6%; background: color-mix(in srgb, var(--a) 22%, #fff); }
.mock-app { display: grid; place-items: center; background: linear-gradient(150deg, var(--b), color-mix(in srgb, var(--a) 30%, var(--b))); }
.mock-app .ma-phone { width: 46%; height: 84%; border-radius: 14% / 8%; background: #0F2742; padding: 3.5%; box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .5); }
.mock-app .ma-screen { width: 100%; height: 100%; border-radius: 11% / 6%; background: #fff; overflow: hidden; display: flex; flex-direction: column; gap: 6%; padding: 12% 9%; }
.mock-app .ma-head { height: 26%; border-radius: 10%; background: var(--a); }
.mock-app .ma-row { height: 10%; border-radius: 20%; background: color-mix(in srgb, var(--a) 22%, #fff); }
.mock-app .ma-row:nth-child(3) { width: 75%; }
.mock-app .ma-dock { margin-top: auto; height: 9%; border-radius: 30%; background: #EEF2F6; }
.mock-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- selección y snap ---------- */
.os-select { position: absolute; z-index: 2; border: 1px solid rgba(75, 79, 196, .8); background: rgba(75, 79, 196, .16); pointer-events: none; }
.os-snap { position: absolute; z-index: 3; border-radius: 10px; background: rgba(255, 255, 255, .28); border: 1px solid rgba(255, 255, 255, .7); backdrop-filter: blur(6px); box-shadow: 0 0 0 1px rgba(75, 79, 196, .3); transition: all .18s var(--ease); pointer-events: none; }

/* ---------- ventanas ---------- */
.os-windows { position: absolute; inset: 0 0 var(--tb-h); z-index: 4; pointer-events: none; }
.win {
  position: absolute; display: flex; flex-direction: column; min-width: 320px; min-height: 220px;
  background: var(--mica); border-radius: 10px; overflow: hidden; pointer-events: auto;
  backdrop-filter: blur(40px) saturate(1.6); -webkit-backdrop-filter: blur(40px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 0 0 1px rgba(15, 39, 66, .08), 0 30px 70px -20px rgba(10, 26, 49, .45), 0 10px 24px -14px rgba(10, 26, 49, .35);
  transform-origin: center;
}
.win.is-inactive { box-shadow: 0 0 0 1px rgba(15, 39, 66, .08), 0 14px 34px -18px rgba(10, 26, 49, .35); }
.win.is-inactive .win-title { color: var(--ink-3); }
.win.is-max { border-radius: 0; border: 0; }
.win.is-anim { transition: left .28s var(--ease), top .28s var(--ease), width .28s var(--ease), height .28s var(--ease), border-radius .28s; }
.win-bar { flex: none; height: 40px; display: flex; align-items: center; gap: 10px; padding-left: 14px; cursor: default; touch-action: none; }
.win-icon { width: 18px; height: 18px; flex: none; }
.win-icon svg, .win-icon img { width: 100%; height: 100%; }
.win-title { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-ctrls { margin-left: auto; display: flex; align-self: stretch; }
.win-ctrls button { width: 46px; border: 0; background: none; display: grid; place-items: center; color: var(--ink); transition: background .15s; }
.win-ctrls button:hover { background: rgba(15, 39, 66, .07); }
.win-ctrls button.close:hover { background: #C42B1C; color: #fff; }
.win-ctrls svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.1; }
.win-body { flex: 1; min-height: 0; overflow: auto; background: var(--mica-strong); border-top: 1px solid var(--os-line); user-select: text; -webkit-user-select: text; overscroll-behavior: contain; touch-action: pan-y; }
.win-resize { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none; }
.win-resize::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 7px; height: 7px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); opacity: .6; }
.win.is-max .win-resize { display: none; }
.win-body::-webkit-scrollbar { width: 10px; } .win-body::-webkit-scrollbar-thumb { background: rgba(15, 39, 66, .2); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }

/* ventana: explorador */
.xp { display: grid; grid-template-rows: auto 1fr; height: 100%; }
.xp-tools { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--os-line); background: rgba(255, 255, 255, .6); }
.xp-nav { width: 30px; height: 30px; border: 0; border-radius: 6px; background: none; display: grid; place-items: center; color: var(--ink-2); }
.xp-nav:hover:not(:disabled) { background: rgba(15, 39, 66, .07); }
.xp-nav:disabled { opacity: .35; cursor: default; }
.xp-nav svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.xp-path { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border-radius: 6px; background: #fff; border: 1px solid var(--os-line); font-size: 13px; white-space: nowrap; overflow: hidden; }
.xp-path button { border: 0; background: none; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.xp-path button:hover { background: rgba(15, 39, 66, .06); }
.xp-path .sep { color: var(--ink-3); }
.xp-find { width: 180px; height: 32px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--os-line); font: 13px var(--os-font); background: #fff; }
.xp-find:focus { outline: none; border-color: var(--accent); box-shadow: 0 -2px 0 var(--accent) inset; }
.xp-main { display: grid; grid-template-columns: 190px 1fr; min-height: 0; }
.xp-side { padding: 10px 8px; border-right: 1px solid var(--os-line); display: grid; gap: 2px; align-content: start; overflow: auto; }
.xp-side button { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 7px 10px; border-radius: 6px; text-align: left; font-size: 13px; position: relative; }
.xp-side button:hover { background: rgba(15, 39, 66, .06); }
.xp-side button.on { background: rgba(75, 79, 196, .12); }
.xp-side button.on::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--accent); }
.xp-side svg { width: 18px; height: 18px; flex: none; }
.xp-files { padding: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; align-content: start; overflow: auto; }
.xp-file { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px 10px; border-radius: 8px; border: 1px solid transparent; background: none; text-align: center; font-size: 12.5px; line-height: 1.3; }
.xp-file:hover { background: rgba(75, 79, 196, .08); }
.xp-file:focus-visible, .xp-file.is-selected { background: rgba(75, 79, 196, .16); border-color: rgba(75, 79, 196, .4); outline: none; }
.xp-file .thumb { width: 74px; height: 74px; border-radius: 12px; }
.xp-file small { color: var(--ink-3); font-size: 11.5px; }
.xp-empty { grid-column: 1 / -1; padding: 40px 10px; text-align: center; color: var(--ink-3); }
.xp-status { padding: 6px 14px; font-size: 12px; color: var(--ink-3); border-top: 1px solid var(--os-line); }

/* ventana: proyecto */
.pj { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-height: 100%; }
.pj-stage { position: relative; padding: 22px; display: grid; place-items: center; background: var(--b, #EEF2F6); min-height: 300px; }
.pj-switch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; padding: 3px; border-radius: 8px; background: rgba(255, 255, 255, .8); box-shadow: 0 2px 8px -4px rgba(10, 26, 49, .4); z-index: 2; }
.pj-switch button { border: 0; background: none; padding: 5px 12px; border-radius: 6px; font-size: 12px; }
.pj-switch button.on { background: var(--ink); color: #fff; }
.pj-device { position: relative; width: 100%; max-width: 460px; aspect-ratio: 16 / 11; border-radius: 12px; overflow: hidden; box-shadow: 0 30px 60px -28px rgba(10, 26, 49, .6), 0 0 0 1px rgba(15, 39, 66, .08); transition: max-width .5s var(--ease), aspect-ratio .5s var(--ease), border-radius .5s; background: #fff; }
.pj-device.is-phone { max-width: 210px; aspect-ratio: 9 / 18; border-radius: 30px; border: 8px solid #0F2742; }
.pj-device .mock-app { background: #fff; }
.pj-device .mock-app .ma-phone { width: 100%; height: 100%; padding: 0; border-radius: 0; background: none; box-shadow: none; }
.pj-device .mock-app .ma-screen { border-radius: 0; padding: 14% 8% 8%; gap: 4%; }
.pj-device .mock-app .ma-head { height: 22%; border-radius: 14px; }
.pj-device .mock-app .ma-row { height: 9%; border-radius: 10px; }
.pj-device .mock-app .ma-dock { border-radius: 14px; }
.pj-device.is-phone .mock-web .mw-img { display: none; }
.pj-device.is-phone .mock-web .mw-hero { width: 82%; }
.pj-device.is-phone .mock-web .mw-cards { grid-template-columns: 1fr; height: 40%; gap: 4%; }
.pj-info { padding: 26px 26px 22px; display: flex; flex-direction: column; gap: 16px; }
.pj-type { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--indigo-soft); color: var(--indigo); }
.pj-type.web { background: var(--cyan-soft); color: #0B6F82; }
.pj-info h3 { font: 700 30px/1.05 var(--f-display); letter-spacing: -.02em; }
.pj-info > p { font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.pj-meta { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 28px; margin: 0; }
.pj-meta dt { font-size: 11.5px; color: var(--ink-3); }
.pj-meta dd { margin: 0; font-size: 13.5px; font-weight: 600; grid-row: 2; }
.pj-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
.pj-list li { display: flex; gap: 10px; align-items: baseline; }
.pj-list li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 2px; background: var(--cyan); transform: translateY(-2px); }
.pj-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.pj-stack span { font-size: 12px; padding: 4px 9px; border-radius: 6px; background: #fff; border: 1px solid var(--os-line); }
.pj-info > .pj-result { color: #fff; }
.pj-result { padding: 12px 14px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 14px; line-height: 1.45; display: flex; gap: 10px; align-items: flex-start; }
.pj-result svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.pj-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.os-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 6px; font: 600 13px var(--os-font); text-decoration: none; border: 1px solid var(--os-line); background: #fff; color: var(--ink); }
.os-btn:hover { background: #F5F7FA; }
.os-btn.primary { background: var(--accent); color: #fff; border-color: transparent; }
.os-btn.primary:hover { background: #3E42AE; }

/* ventana: texto / formulario / papelera */
.note { padding: 22px 26px; font: 14.5px/1.7 "Cascadia Mono", Consolas, ui-monospace, monospace; color: var(--ink); white-space: pre-wrap; }
.note-menu { display: flex; gap: 2px; padding: 4px 8px; border-bottom: 1px solid var(--os-line); font-size: 13px; }
.note-menu span { padding: 3px 10px; border-radius: 4px; }
.note-menu span:hover { background: rgba(15, 39, 66, .06); }
.qform { padding: 22px; display: grid; gap: 14px; }
.qform .lead { font-size: 15px; color: var(--ink-2); }
.qform label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.qform input, .qform select, .qform textarea { font: 14px var(--os-font); color: var(--ink); padding: 8px 10px; border-radius: 5px; border: 1px solid rgba(15, 39, 66, .18); border-bottom-color: rgba(15, 39, 66, .45); background: #fff; width: 100%; resize: vertical; }
.qform input:focus, .qform select:focus, .qform textarea:focus { outline: none; border-bottom: 2px solid var(--accent); }
.qform .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qform .form-status { font-size: 13px; min-height: 1.2em; }
.bin-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--os-line); font-size: 13.5px; }
.bin-row small { color: var(--ink-3); }
.bin-row svg { width: 26px; height: 26px; }
.bin-foot { padding: 14px 18px; font-size: 13px; color: var(--ink-2); }

/* ---------- barra de tareas ---------- */
.os-taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 8; height: var(--tb-h);
  display: flex; align-items: center; justify-content: center; padding: 0 10px;
  background: rgba(240, 244, 250, .82); backdrop-filter: blur(40px) saturate(1.7); -webkit-backdrop-filter: blur(40px) saturate(1.7);
  border-top: 1px solid rgba(255, 255, 255, .6);
}
.os[data-wall="1"] .os-taskbar { background: rgba(28, 40, 62, .82); color: #fff; border-top-color: rgba(255, 255, 255, .08); }
.tb-center { display: flex; align-items: center; gap: 4px; }
.tb-apps { display: flex; gap: 4px; }
.tb-btn { position: relative; width: 42px; height: 42px; border: 0; border-radius: 6px; background: none; display: grid; place-items: center; color: inherit; transition: background .15s, transform .15s; }
.tb-btn:hover, .tb-btn.is-open { background: rgba(255, 255, 255, .65); }
.os[data-wall="1"] .tb-btn:hover, .os[data-wall="1"] .tb-btn.is-open { background: rgba(255, 255, 255, .1); }
.tb-btn:active { transform: scale(.92); }
.tb-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.tb-btn > img, .tb-btn .tb-art { width: 24px; height: 24px; }
.tb-btn .tb-art svg, .tb-btn .tb-art .thumb { width: 24px; height: 24px; border-radius: 5px; box-shadow: none; }
.tb-btn::after { content: ""; position: absolute; bottom: 2px; left: 50%; width: 6px; height: 3px; margin-left: -3px; border-radius: 3px; background: var(--ink-3); opacity: 0; transition: width .2s, margin .2s, opacity .2s, background .2s; }
.tb-btn.has-win::after { opacity: 1; }
.tb-btn.is-active::after { width: 16px; margin-left: -8px; background: var(--accent); }
.os[data-wall="1"] .tb-start img { filter: brightness(0) invert(1); }
.tb-tray { position: absolute; right: 10px; top: 0; bottom: 0; display: flex; align-items: center; gap: 10px; }
.tray-icons { display: flex; gap: 8px; padding: 0 6px; }
.tray-icons svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.tb-clock { display: grid; text-align: right; font-size: 12px; line-height: 1.3; padding: 0 6px; }
.gravity { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 12.5px; }
.gravity:hover { background: rgba(255, 255, 255, .55); }
.os[data-wall="1"] .gravity:hover { background: rgba(255, 255, 255, .1); }
.gravity input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gravity-track { width: 36px; height: 18px; border-radius: 9px; border: 1px solid currentColor; opacity: .85; position: relative; transition: background .2s, border-color .2s; }
.gravity-thumb { position: absolute; left: 3px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: currentColor; transition: transform .25s var(--ease), background .2s; }
.gravity input:checked + .gravity-track { background: var(--accent); border-color: var(--accent); opacity: 1; }
.gravity input:checked + .gravity-track .gravity-thumb { transform: translateX(18px); background: #fff; }
.gravity input:focus-visible + .gravity-track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- menú inicio ---------- */
.os-start {
  position: absolute; z-index: 9; left: 50%; bottom: calc(var(--tb-h) + 10px); width: min(620px, calc(100% - 20px)); margin-left: calc(min(620px, calc(100% - 20px)) / -2);
  max-height: calc(100% - var(--tb-h) - 24px); display: flex; flex-direction: column;
  background: rgba(244, 247, 252, .9); backdrop-filter: blur(50px) saturate(1.8); -webkit-backdrop-filter: blur(50px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, .7); border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(15, 39, 66, .08), 0 30px 70px -20px rgba(10, 26, 49, .5);
}
.start-search { margin: 26px 30px 6px; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 14px; border-radius: 99px; background: #fff; border: 1px solid var(--os-line); border-bottom: 2px solid var(--accent); }
.start-search svg { width: 16px; height: 16px; fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linecap: round; }
.start-search input { flex: 1; border: 0; outline: 0; font: 13.5px var(--os-font); color: var(--ink); background: none; min-width: 0; }
.start-section { padding: 14px 30px 4px; overflow: auto; }
.start-section h3 { font: 600 14px var(--os-font); letter-spacing: 0; margin-bottom: 10px; }
.start-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.start-app { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px 10px; border: 0; border-radius: 6px; background: none; font-size: 12px; text-align: center; line-height: 1.25; }
.start-app:hover, .start-item:hover { background: rgba(255, 255, 255, .8); }
.start-app .thumb, .start-app .start-art { width: 36px; height: 36px; border-radius: 8px; }
.start-app .start-art svg { width: 36px; height: 36px; }
.start-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.start-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 0; border-radius: 6px; background: none; text-align: left; }
.start-item .thumb { width: 32px; height: 32px; border-radius: 7px; flex: none; }
.start-item b { display: block; font-weight: 500; font-size: 13px; }
.start-item small { font-size: 11.5px; color: var(--ink-3); }
.start-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 12px 30px; border-top: 1px solid var(--os-line); background: rgba(232, 237, 245, .7); border-radius: 0 0 10px 10px; }
.start-user { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.start-user img { width: 30px; height: 30px; padding: 4px; border-radius: 50%; background: #fff; }
.start-power { width: 36px; height: 36px; border: 0; border-radius: 6px; background: none; display: grid; place-items: center; }
.start-power:hover { background: rgba(255, 255, 255, .8); }
.start-power svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.start-empty { grid-column: 1 / -1; padding: 10px; color: var(--ink-3); font-size: 13px; }

/* ---------- menú contextual ---------- */
.os-ctx { position: absolute; z-index: 10; min-width: 230px; padding: 4px; border-radius: 8px; background: rgba(249, 251, 254, .94); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); border: 1px solid rgba(255, 255, 255, .8); box-shadow: 0 0 0 1px rgba(15, 39, 66, .1), 0 16px 40px -14px rgba(10, 26, 49, .45); }
.os-ctx button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 8px 12px; border-radius: 5px; font-size: 13px; text-align: left; }
.os-ctx button:hover, .os-ctx button:focus-visible { background: rgba(75, 79, 196, .1); outline: none; }
.os-ctx button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.os-ctx hr { border: 0; border-top: 1px solid var(--os-line); margin: 4px 6px; }

/* ---------- notificaciones ---------- */
.os-toasts { position: absolute; right: 12px; bottom: calc(var(--tb-h) + 12px); z-index: 9; display: grid; gap: 8px; width: min(340px, calc(100% - 24px)); }
.toast { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: start; padding: 14px; border-radius: 8px; background: rgba(249, 251, 254, .95); backdrop-filter: blur(30px); border: 1px solid rgba(255, 255, 255, .8); box-shadow: 0 0 0 1px rgba(15, 39, 66, .08), 0 20px 40px -18px rgba(10, 26, 49, .5); }
.toast img { width: 26px; height: auto; }
.toast b { display: block; font-size: 13.5px; }
.toast span { font-size: 12.5px; color: var(--ink-2); }
.toast button { border: 0; background: none; padding: 2px 6px; border-radius: 4px; color: var(--ink-3); font-size: 16px; line-height: 1; }
.toast button:hover { background: rgba(15, 39, 66, .07); }

/* ---------- arranque ---------- */
.os-boot { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 46px; background: #0A1A31; color: #C9D6E6; }
.os-boot img { filter: brightness(0) invert(1); width: 84px; }
.os-boot p { font-size: 15px; letter-spacing: .02em; margin-top: -20px; }
.boot-dots { position: relative; width: 40px; height: 40px; }
.boot-dots i { position: absolute; inset: 0; animation: bootspin 2.6s infinite; }
.boot-dots i::before { content: ""; position: absolute; left: 50%; top: 0; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--cyan); }
.boot-dots i:nth-child(2) { animation-delay: .12s; } .boot-dots i:nth-child(3) { animation-delay: .24s; }
.boot-dots i:nth-child(4) { animation-delay: .36s; } .boot-dots i:nth-child(5) { animation-delay: .48s; }
@keyframes bootspin {
  0% { transform: rotate(0); opacity: 1; animation-timing-function: cubic-bezier(.5, 0, .7, .4); }
  30% { transform: rotate(200deg); animation-timing-function: linear; }
  60% { transform: rotate(320deg); animation-timing-function: cubic-bezier(.3, .6, .5, 1); }
  85% { transform: rotate(720deg); opacity: 1; }
  100% { transform: rotate(720deg); opacity: 0; }
}

/* ---------- responsive del escritorio ---------- */
@media (max-width: 760px) {
  .os { --tb-h: 56px; }
  .dicon { width: 78px; }
  .dicon-art { width: 50px; height: 50px; }
  .thumb { width: 46px; height: 46px; }
  .gravity-label, .tray-icons, .tb-clock { display: none; }
  .tb-center { margin-right: 96px; }
  .tb-tray { gap: 4px; right: 6px; }
  .os-stage .marks span { display: none; }
  .tb-apps .tb-btn:nth-child(n+3) { display: none; }
  .xp-main { grid-template-columns: 1fr; }
  .xp-side { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--os-line); padding: 6px; }
  .xp-side button { white-space: nowrap; }
  .xp-side button.on::before { left: 10px; right: 10px; top: auto; bottom: 0; width: auto; height: 3px; }
  .xp-find { display: none; }
  .pj { grid-template-columns: 1fr; }
  .pj-stage { min-height: 240px; }
  .start-grid { grid-template-columns: repeat(4, 1fr); }
  .start-list { grid-template-columns: 1fr; }
  .start-search, .start-section { margin-left: 16px; margin-right: 16px; padding-left: 0; padding-right: 0; }
  .start-foot { padding: 12px 16px; }
  .qform .row { grid-template-columns: 1fr; }
  .win-resize { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .boot-dots i { animation: none; }
}
