/* ============================================================
   GIGAWORKS OS — Gigaworks as an OS (Windows variant, v1)
   Dark acrylic + industrial orange. Evokes Windows 11, not a clone.
   ============================================================ */
:root { color-scheme: light dark; }
:root:has(> head > meta[name="color-scheme"][content="dark"]) { color-scheme: dark; }
:root:has(> head > meta[name="color-scheme"][content="light"]) { color-scheme: light; }
:root {
  --orange: #F66014; --orange-deep: #F66014; --amber: #FFB224; /* orange-deep = exact logo orange */
  --ink: #14161A; --ink-2: #1C1F25; --ink-3: #2A2E36;
  --line: rgba(255,255,255,.09); --text: #F4F4F1; --muted: #A7ABB4;
  --task-h: 52px; --chat-w: clamp(320px, 33vw, 480px); --radius: 8px;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: "Archivo Black", "Segoe UI", sans-serif;
}
/* Mobile: scale text up ~1.25x for readability (structural sizes stay in px). */
html.phone-root { font-size: 125%; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; overflow: hidden; font-family: var(--font-body); color: var(--text); background: var(--ink); }
button { font-family: inherit; }
[hidden] { display: none !important; }

/* ============ BOOT ============ */
.boot { position: fixed; inset: 0; z-index: 1000; background: #0B0C0F; display: grid; place-items: center; --muted: #A7ABB4; --line: rgba(255,255,255,.15); --ink-3: #2A2E36; }
.boot-inner { width: min(560px, 88vw); text-align: center; }
.boot-logo { width: min(560px, 82vw); height: auto; }
.boot-sub { margin-top: .4rem; font-size: .72rem; letter-spacing: .28em; color: var(--muted); }
.boot-lines { margin: 1.6rem auto 1.2rem; min-height: 9.5em; text-align: left; font-family: "Cascadia Code","Consolas",monospace; font-size: .78rem; color: #7EE0A3; white-space: pre-wrap; }
.boot-bar { height: 4px; background: var(--ink-3); border-radius: 2px; overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--orange), var(--amber)); }
.boot-skip { margin-top: 1.4rem; background: none; border: 1px solid var(--line); color: var(--muted); padding: .4rem 1rem; border-radius: 999px; cursor: pointer; font-size: .8rem; }
.boot-skip:hover { color: #fff; border-color: var(--orange); }

/* ============ DESKTOP ============ */
.desktop { position: fixed; inset: 0; background: var(--ink); }
.desktop::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(80% 80% at 50% 30%, #000 30%, transparent 100%); }
.desktop::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(700px 460px at 82% -10%, rgba(246,96,20,.22), transparent 65%); }
.wallpaper-mark { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: min(72vw, 1100px); height: auto;
  opacity: .17; pointer-events: none; user-select: none; }

/* desktop icons */
.desktop-icons { position: absolute; top: 1.1rem; left: 1rem; right: 1rem; bottom: calc(var(--task-h) + .6rem); z-index: 5; }
.dicon { position: absolute; display: grid; justify-items: center; gap: .5rem; width: 94px; padding: .55rem .25rem .5rem; background: none; border: 1px solid transparent; border-radius: 10px; cursor: grab; color: var(--text); touch-action: none; -webkit-user-select: none; user-select: none; }
.desktop-icons.dragging, .desktop-icons.dragging .dicon { cursor: grabbing; }
.dicon.dragging { z-index: 60; pointer-events: none; scale: 1.06; opacity: .95; }
.dicon.dragging .dock-ic { scale: 1; box-shadow: 0 16px 32px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.3); }
.drop-ring { position: fixed; z-index: 59; pointer-events: none; border: 2px dashed var(--orange); border-radius: 12px; background: rgba(246,96,20,.08); }
.drop-ring.swap { border-style: solid; border-color: var(--amber); background: rgba(255,178,36,.10); }
.desk-menu { position: fixed; z-index: 500; min-width: 216px; display: grid; gap: .1rem; padding: .35rem; background: rgba(28,31,37,.96); backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.5); }
.desk-menu button { display: flex; align-items: center; gap: .55rem; background: none; border: 0; color: var(--text); font: inherit; font-size: .8rem; padding: .5rem .6rem; border-radius: 7px; cursor: pointer; text-align: left; }
.desk-menu button:hover, .desk-menu button:focus-visible { background: rgba(255,255,255,.08); }
.dm-check { width: 1em; color: var(--orange); font-weight: 700; visibility: hidden; }
.desk-menu button[aria-checked="true"] .dm-check { visibility: visible; }
.desk-menu hr { border: 0; border-top: 1px solid var(--line); margin: .3rem .2rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dicon:hover { background: rgba(255,255,255,.06); border-color: var(--line); }
body:not(.reduce-motion) .dicon:hover .dock-ic { box-shadow: 0 12px 24px rgba(0,0,0,.5), 0 0 26px rgba(246,96,20,.4), inset 0 1px 0 rgba(255,255,255,.3); }
/* Pointer-tracked orange spotlight on the desktop (fine pointers, motion on) */
.cursor-glow { position: absolute; inset: 0; pointer-events: none; z-index: 2; opacity: 0; transition: opacity .3s ease; background: radial-gradient(300px circle at var(--gx, 50%) var(--gy, 40%), rgba(246,96,20,.128), transparent 65%); }
body.glow-on .cursor-glow { opacity: 1; }
[data-theme="light"] .cursor-glow { background: radial-gradient(300px circle at var(--gx, 50%) var(--gy, 40%), rgba(246,96,20,.096), transparent 65%); }
.dicon:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.dicon .dock-ic { width: 52px; height: 52px; border-radius: 14px; translate: 0 0; scale: 1;
  box-shadow: 0 6px 16px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.24);
  transition: translate .16s ease, box-shadow .16s ease, scale .1s ease; }
.dicon:hover .dock-ic { translate: 0 -3px; box-shadow: 0 12px 24px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.3); }
.dicon:active .dock-ic { scale: .93; }
.dicon span.lbl { font-size: .72rem; text-align: center; line-height: 1.25; text-shadow: 0 1px 3px rgba(0,0,0,.85); }

/* ============ TASKBAR ============ */
.taskbar { position: absolute; left: 0; right: 0; bottom: 0; height: var(--task-h); z-index: 500; display: flex; align-items: center; gap: .4rem; padding: 0 .7rem; background: rgba(24,26,31,.85); backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
.start-btn { width: 40px; height: 40px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; display: grid; place-items: center; }
.start-btn:hover { background: rgba(255,255,255,.08); }
.start-glyph { width: 20px; height: 20px; display: block;
  background: linear-gradient(var(--orange),var(--orange)) 0 0/9px 9px no-repeat, linear-gradient(var(--amber),var(--amber)) 11px 0/9px 9px no-repeat, linear-gradient(var(--amber),var(--amber)) 0 11px/9px 9px no-repeat, linear-gradient(var(--orange),var(--orange)) 11px 11px/9px 9px no-repeat; }
.task-apps { display: flex; align-items: center; gap: .25rem; flex: 1; }
.task-app { position: relative; width: 42px; height: 40px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; display: grid; place-items: center; }
.task-app:hover { background: rgba(255,255,255,.08); }
.task-app .dock-ic { width: 24px; height: 24px; }
.task-app.running::after { content: ""; position: absolute; bottom: 3px; left: 50%; translate: -50% 0; width: 5px; height: 3px; border-radius: 2px; background: var(--muted); }
.task-app.active { background: rgba(255,255,255,.10); }
.task-app.active::after { width: 16px; background: var(--orange); }
.task-tray { display: flex; align-items: center; gap: .8rem; }
.tray-chat { display: inline-flex; align-items: center; gap: .4rem; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: .35rem .8rem; font-size: .8rem; cursor: pointer; }
.tray-chat:hover { border-color: var(--orange); }
.tray-chat[aria-pressed="true"] { background: var(--orange); color: var(--ink); border-color: var(--orange); }
.chat-dot { width: 7px; height: 7px; border-radius: 50%; background: #34D399; display: inline-block; }
.top-classic { color: var(--muted); text-decoration: none; font-size: .8rem; }
.top-classic:hover { color: var(--orange); }
.clock { font-size: .82rem; font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }

/* ============ START MENU ============ */
.start-menu { position: absolute; left: .7rem; bottom: calc(var(--task-h) + .6rem); z-index: 600; width: min(360px, 92vw); padding: 1rem; background: rgba(28,30,37,.94); backdrop-filter: blur(22px); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.start-head { margin: 0 0 .7rem; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.start-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.start-grid button { display: grid; justify-items: center; gap: .4rem; padding: .7rem .3rem; background: transparent; border: 0; border-radius: 8px; color: var(--text); cursor: pointer; font-size: .74rem; }
.start-grid button:hover { background: rgba(255,255,255,.08); }
.start-grid .dock-ic { width: 30px; height: 30px; }
/* Desktop: keep the Start menu inside the viewport at 100% zoom */
body:not(.phone) .start-menu { width: min(420px, 94vw); max-height: calc(100vh - var(--task-h) - 1.4rem); overflow-y: auto; padding: .9rem; }
body:not(.phone) .start-grid { grid-template-columns: repeat(4, 1fr); gap: .3rem; }
body:not(.phone) .start-grid button { gap: .3rem; padding: .5rem .25rem; font-size: .72rem; }
body:not(.phone) .start-grid .dock-ic { width: 26px; height: 26px; }
.start-menu hr { border: 0; border-top: 1px solid var(--line); margin: .8rem 0; }
.start-menu a { color: var(--muted); text-decoration: none; font-size: .85rem; }
.start-menu a:hover { color: var(--orange); }

/* ============ APP ICONS ============ */
.dock-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; color: #fff; flex: none; }
.dock-ic svg { width: 62%; height: 62%; display: block; }
.ic-browser { background: linear-gradient(135deg, #38BDF8, #0369A1); }
.ic-audit { background: linear-gradient(135deg, #FBBF24, #B45309); }
.ic-hardware { background: linear-gradient(135deg, var(--orange), var(--orange-deep)); }
.ic-security { background: linear-gradient(135deg, #EF4444, #991B1B); }
.ic-connectivity { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.ic-software { background: linear-gradient(135deg, #8B5CF6, #6D28D9); }
.ic-support { background: linear-gradient(135deg, #10B981, #047857); }
.ic-cctv { background: linear-gradient(135deg, #6366F1, #4338CA); }
.ic-conference { background: linear-gradient(135deg, #06B6D4, #0E7490); }
.ic-ai { background: linear-gradient(135deg, #8B5CF6, #6D28D9); }
.ic-webdev { background: linear-gradient(135deg, #EC4899, #BE185D); }
.ic-hosted { background: linear-gradient(135deg, #14B8A6, #0F766E); }
.ic-opensource { background: linear-gradient(135deg, #84CC16, #4D7C0F); }
.ic-contact { background: linear-gradient(135deg, var(--amber), #E08900); }
.ic-about { background: linear-gradient(135deg, #64748B, #334155); }

/* ============ WINDOWS ============ */
.windows { position: absolute; inset: 0 0 var(--task-h) 0; }
/* Docked assistant: when chat is open the app workspace makes room for it,
   so maximised windows never slide under the chat and hide their controls. */
body.chat-open:not(.phone) .windows { right: var(--chat-w); }
body.chat-open:not(.phone) .desktop-icons { right: calc(var(--chat-w) + 1rem); }
.win { position: absolute; display: flex; flex-direction: column; min-width: 300px; min-height: 200px; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0,0,0,.5); overflow: hidden; }
.win.active { border-color: rgba(246,96,20,.5); }
.win.maximized { border-radius: 0; }
.win-title { display: flex; align-items: center; gap: .6rem; height: 38px; padding: 0 .5rem 0 .8rem; background: var(--ink-3); cursor: grab; user-select: none; flex: none; }
.win.active .win-title { background: #31353F; }
.win-title .dock-ic { width: 18px; height: 18px; border-radius: 5px; }
.win-name { font-size: .82rem; font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-controls { display: flex; }
.win-btn { width: 40px; height: 38px; border: 0; background: transparent; color: var(--text); cursor: pointer; display: grid; place-items: center; font-size: .9rem; }
.win-btn:hover { background: rgba(255,255,255,.10); }
.win-btn.close:hover { background: var(--orange-deep); filter: brightness(1.08); color: #fff; }
.win-body { flex: 1; overflow: auto; padding: 1.2rem 1.3rem; }
/* Clean OS surfaces: no chunky scrollbars (wheel/touch/trackpad still scroll) */
.win-body, .chat-msgs, .chat-chips, .mc-list, .mc-main, .mc-side, .start-menu, .pres-slide { scrollbar-width: none; }
.win-body::-webkit-scrollbar, .chat-msgs::-webkit-scrollbar, .chat-chips::-webkit-scrollbar, .mc-list::-webkit-scrollbar, .mc-main::-webkit-scrollbar, .mc-side::-webkit-scrollbar, .start-menu::-webkit-scrollbar, .pres-slide::-webkit-scrollbar { display: none; }
.win-body h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; margin: 0 0 .6rem; }
.win-lede { color: var(--muted); font-size: .92rem; margin: 0 0 1rem; }

/* browser app */
.browser-bar { display: flex; align-items: center; gap: .5rem; padding: .5rem .7rem; background: var(--ink-3); border-bottom: 1px solid var(--line); }
.browser-bar .nav-btn { width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.browser-bar .nav-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.browser-url { flex: 1; background: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: .35rem .9rem; font-size: .8rem; color: var(--muted); }
.browser-frame { flex: 1; width: 100%; border: 0; background: #fff; }
.win.browser-win .win-body { padding: 0; display: flex; flex-direction: column; }

/* presentation app */
.pres { display: flex; flex-direction: column; height: 100%; }
.pres-slide { flex: 1; overflow: hidden; padding: 1.2rem 1.5rem; touch-action: pan-y; position: relative; }
.pres-slide-inner { transform-origin: top center; }
.pres-img { width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: 300px; object-fit: cover; border-radius: 10px; margin: .2rem 0 1rem; display: block; }
.msg.pitch { max-width: 94%; padding: .7rem; }
.pitch-img { width: 100%; height: 150px; object-fit: cover; border-radius: 8px; display: block; margin-bottom: .55rem; }
.msg.pitch strong { display: block; font-size: .92rem; margin-bottom: .35rem; }
.msg.pitch ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .28rem; font-size: .8rem; }
.pres-kicker { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--orange); margin: 0 0 .5rem; }
.pres-slide h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; margin: 0 0 .8rem; }
.pres-slide p { color: var(--muted); font-size: .95rem; line-height: 1.6; }
.pres-slide ul { margin: .6rem 0 0; padding-left: 1.1rem; display: grid; gap: .5rem; font-size: .92rem; }
.pres-slide li strong { color: var(--amber); }
.pres-nav { display: flex; align-items: center; gap: .8rem; padding: .8rem 1.2rem; border-top: 1px solid var(--line); background: var(--ink-3); }
.pres-nav button { display: inline-flex; align-items: center; gap: .4rem; background: var(--ink); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: .45rem .9rem; cursor: pointer; font-size: .85rem; }
.pres-nav button:hover:not(:disabled) { border-color: var(--orange); }
.pres-nav button:disabled { opacity: .4; cursor: default; }
.pres-dots { display: flex; gap: .35rem; flex: 1; justify-content: center; }
.pres-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); border: 1px solid var(--line); }
.pres-dots span.on { background: var(--orange); border-color: var(--orange); }
.pres-count { font-size: .78rem; color: var(--muted); }

/* contact / about content */
.contact-os { display: grid; gap: 1.2rem; }
.contact-os-info p { margin: 0 0 .7rem; font-size: .88rem; }
.contact-os-info em { color: var(--muted); font-style: normal; font-size: .75rem; }
.about-list { margin: 0; padding-left: 1.1rem; display: grid; gap: .6rem; font-size: .92rem; }

/* ============ ASSISTANT CHAT ============ */
.chat { position: absolute; top: 0; right: 0; bottom: var(--task-h); width: var(--chat-w); z-index: 450; display: flex; flex-direction: column; background: rgba(24,26,31,.94); backdrop-filter: blur(20px); border-left: 1px solid var(--line); }
.chat-head { display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
.chat-avatar { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--orange), var(--orange-deep)); display: grid; place-items: center; font-family: var(--font-display); color: #fff; }
.chat-head-txt { flex: 1; display: grid; }
.chat-head-txt strong { font-size: .9rem; }
.chat-status { font-size: .72rem; color: var(--muted); display: inline-flex; align-items: center; gap: .35rem; }
.chat-close { width: 30px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.1rem; }
.chat-close:hover { background: rgba(255,255,255,.08); color: #fff; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .7rem; }
.msg { max-width: 86%; padding: .6rem .8rem; border-radius: 12px; font-size: .86rem; line-height: 1.45; white-space: pre-wrap; }
.msg.agent { align-self: flex-start; background: var(--ink-3); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.user { align-self: flex-end; background: var(--orange); color: var(--ink); border-bottom-right-radius: 4px; font-weight: 500; }
.msg .lead-card { display: grid; gap: .25rem; margin-top: .4rem; font-size: .8rem; }
.msg .lead-card b { color: var(--amber); }
.typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: .7rem .9rem; background: var(--ink-3); border: 1px solid var(--line); border-radius: 12px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,100% { opacity: .3; } 50% { opacity: 1; } }
.chat-chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1rem .6rem; }
.chip { background: var(--ink); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: .4rem .8rem; font-size: .78rem; cursor: pointer; }
.chip:hover { border-color: var(--orange); color: var(--orange); }
.chip.primary { background: var(--orange); color: var(--ink); border-color: var(--orange); font-weight: 600; }
.chat-input { display: flex; gap: .5rem; padding: .7rem 1rem; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; background: var(--ink); border: 1px solid var(--line); border-radius: 999px; color: var(--text); padding: .55rem .9rem; font-family: inherit; font-size: .86rem; }
.chat-input input:focus { outline: 2px solid var(--orange); outline-offset: 1px; }
.chat-input button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--orange); color: var(--ink); cursor: pointer; }
.chat-input button:hover { background: var(--orange-deep); filter: brightness(1.08); color: #fff; }
/* spacing utilities (replace inline style attrs so CSP style-src needs no unsafe-inline) */
.mt-1 { margin-top: 1rem; }
.mt-08 { margin-top: .8rem; }

/* ============ FILES EXPLORER + VIEWERS ============ */
.ic-files { background: linear-gradient(135deg, #FFB224, #E08900); }
.ic-folder { background: linear-gradient(135deg, #FFB224, #E08900); }
.ic-video { background: linear-gradient(135deg, #EC4899, #BE185D); }
.file-ic.video { background: linear-gradient(135deg, #EC4899, #BE185D); }
.photo-stage video { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.5); background: #000; }
.ic-doc { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.ic-sheet { background: linear-gradient(135deg, #10B981, #047857); }
.ic-photo { background: linear-gradient(135deg, #8B5CF6, #6D28D9); }
.files-body { padding: 0; display: flex; flex-direction: column; }
.files-bar { display: flex; gap: .6rem; align-items: center; padding: .7rem .9rem; border-bottom: 1px solid var(--line); }
.files-up { flex: none; }
.files-up:disabled { opacity: .4; cursor: default; }
.files-crumb { display: flex; gap: .15rem; align-items: center; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.files-crumb button { background: none; border: 0; color: var(--text); cursor: pointer; font: inherit; font-size: .8rem; padding: .2rem .45rem; border-radius: 6px; }
.files-crumb button:hover { background: rgba(255,255,255,.08); color: var(--orange); }
.files-grid { flex: 1; overflow: auto; padding: 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: .8rem; align-content: start; }
.files-empty { flex: 1; display: grid; place-items: center; padding: 2rem 1rem; color: var(--muted); text-align: center; font-size: .85rem; }
.file-tile { display: grid; justify-items: center; gap: .45rem; padding: 1rem .6rem; background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; color: var(--text); font: inherit; text-align: center; }
.file-tile:hover { border-color: var(--orange); translate: 0 -2px; }
.file-ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.file-ic svg { width: 26px; height: 26px; }
.file-ic.folder { background: linear-gradient(135deg, #FFB224, #E08900); }
.file-ic.doc { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.file-ic.sheet { background: linear-gradient(135deg, #10B981, #047857); }
.file-ic.photo { background: linear-gradient(135deg, #8B5CF6, #6D28D9); }
.file-name { font-size: .78rem; font-weight: 600; word-break: break-word; line-height: 1.3; }
.file-meta { font-size: .66rem; color: var(--muted); }
.viewer-body { padding: 0; display: flex; flex-direction: column; }
.doc-toolbar { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); font-size: .85rem; }
.doc-toolbar .file-ic { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.doc-toolbar .file-ic svg { width: 18px; height: 18px; }
.doc-toolbar strong { word-break: break-word; }
.doc-meta { margin-left: auto; font-size: .72rem; color: var(--muted); flex: none; }
.doc-text { flex: 1; overflow: auto; margin: 0; padding: 1.1rem 1.3rem; font-family: 'Cascadia Code', 'Consolas', monospace; font-size: .82rem; line-height: 1.6; white-space: pre-wrap; color: var(--text); }
.sheet-wrap { flex: 1; overflow: auto; padding: .6rem; }
.sheet { border-collapse: collapse; width: 100%; font-size: .8rem; }
.sheet th, .sheet td { border: 1px solid var(--line); padding: .45rem .6rem; text-align: left; white-space: nowrap; }
.sheet th { background: var(--ink-3); position: sticky; top: 0; font-weight: 700; }
.sheet tbody tr:nth-child(even) { background: rgba(255,255,255,.03); }
.photo-stage { flex: 1; overflow: auto; display: grid; place-items: center; padding: 1rem; background: #0B0C0F; }
.photo-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
[data-theme="light"] .files-crumb button:hover { background: rgba(20,22,26,.06); }
[data-theme="light"] .sheet tbody tr:nth-child(even) { background: rgba(20,22,26,.035); }

/* ============ SETTINGS ============ */
.ic-settings { background: linear-gradient(135deg, #64748B, #334155); }
.settings-body { padding: 0; overflow: auto; }
.set-section { padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); }
.set-section h3 { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 .7rem; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 0; }
.set-txt { display: grid; gap: .15rem; }
.set-txt strong { font-size: .88rem; }
.set-txt span { font-size: .74rem; color: var(--muted); }
.set-seg { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; flex: none; }
.set-seg button { background: none; border: 0; color: var(--muted); padding: .45rem .95rem; font: inherit; font-size: .8rem; cursor: pointer; }
.set-seg button.on { background: var(--orange); color: var(--ink); font-weight: 600; }
.set-switch { width: 46px; height: 26px; border-radius: 999px; border: 1px solid var(--line); background: var(--ink-3); position: relative; cursor: pointer; flex: none; }
.set-switch span { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: left .2s, background .2s; }
.set-switch.on { background: var(--orange); border-color: var(--orange); }
.set-switch.on span { left: 22px; background: #fff; }
.set-about { display: grid; gap: .3rem; font-size: .85rem; }
.set-about > span { color: var(--muted); font-size: .76rem; }
.set-links { display: flex; gap: 1.2rem; margin-top: .5rem; }
.set-links a { color: var(--orange); font-size: .8rem; text-decoration: none; }
.set-links a:hover { text-decoration: underline; }

/* Manual "reduce animations" preference */
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation: none !important; transition: none !important; }

/* ============ MOTION / RESPONSIVE ============ */
@media (prefers-reduced-motion: no-preference) {
  .win { animation: win-in .18s ease-out; }
  @keyframes win-in { from { opacity: 0; scale: .97; } }
  @keyframes win-fade { from { opacity: 0; } }
  .boot-bar span { transition: width .25s ease; }
}
@media (prefers-reduced-motion: reduce) { .typing i { animation: none; } }
.navbar, .hotseat, .phone-hero, .chat-back { display: none; }
/* Heads-up nudge (desktop): bottom-left, mirrors the phone banner; FAB stays bottom-right. */
.heads-up { display: flex; align-items: center; gap: .6rem; position: absolute; bottom: calc(var(--task-h) + 1.1rem); left: 1.1rem; right: auto; max-width: 400px; z-index: 470; padding: .6rem .8rem; background: rgba(28,31,37,.95); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 16px; color: var(--text); font: inherit; font-size: .78rem; text-align: left; cursor: pointer; box-shadow: 0 10px 26px rgba(0,0,0,.45); }
/* Chat bubble: lower right of the desktop, above the taskbar. Hidden while chat
   is open or a window is maximised (so it never covers window controls). */
.chat-fab { display: grid; place-items: center; position: absolute; right: 1.1rem; bottom: calc(var(--task-h) + 1.1rem); width: 56px; height: 56px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--orange), var(--orange-deep)); color: #fff; cursor: pointer; z-index: 7; box-shadow: 0 10px 26px rgba(246,96,20,.35); }
.chat-fab:hover { filter: brightness(1.08); }
.chat-fab svg { width: 26px; height: 26px; }
.fab-dot { position: absolute; top: 3px; right: 3px; width: 13px; height: 13px; border-radius: 50%; background: #22C55E; border: 2.5px solid #14161A; }
body.chat-open .chat-fab, body.has-max .chat-fab { display: none; }
@media (max-width: 720px) {
  /* ---- Android phone mode ---- */
  .taskbar { display: none; }
  .navbar { display: flex; position: absolute; bottom: 0; left: 0; right: 0; height: 44px; align-items: center; justify-content: space-around; background: rgba(20,22,26,.6); backdrop-filter: blur(10px); z-index: 460; }
  .navbar button { background: none; border: 0; color: var(--text); font-size: 1.05rem; padding: .4rem 1.2rem; cursor: pointer; }
  .nav-home span { display: block; width: 108px; height: 5px; border-radius: 999px; background: var(--text); opacity: .85; }
  .hotseat { display: flex; position: absolute; bottom: 44px; left: 0; right: 0; height: 78px; align-items: center; justify-content: space-around; padding: 0 .4rem; z-index: 455; }
  .hotseat button { background: none; border: 0; display: grid; justify-items: center; gap: .25rem; color: var(--text); font-size: .62rem; cursor: pointer; }
  .hotseat .dock-ic { width: 46px; height: 46px; border-radius: 14px; }
  .desktop-icons { top: 12px; left: .6rem; right: .6rem; bottom: 126px; }
  .windows { inset: 0; }
  .dicon { width: 33.3334%; padding: .4rem .1rem; gap: .35rem; touch-action: manipulation; cursor: pointer; }
  .dicon .dock-ic { width: 52px; height: 52px; border-radius: 15px; }
  .dicon span.lbl { font-size: .66rem; }
  .win { left: 0 !important; top: 0 !important; width: 100% !important; height: calc(100% - 44px) !important; border-radius: 0; border-left: 0; border-right: 0; animation: win-fade .16s ease-out; }
  .win-btn.min, .win-btn.max { display: none; }
  .win-btn.close { font-size: 0; }
  .win-btn.close::before { content: '←'; font-size: 1.05rem; }
  .win-title { cursor: default; }
  .chat { top: 0; bottom: 44px; width: 100%; }
  .start-menu { left: 0; right: 0; top: auto; bottom: 44px; max-height: 72%; overflow-y: auto; border-radius: 18px 18px 0 0; }
  .start-grid { grid-template-columns: repeat(4, 1fr); }
  .heads-up { display: flex; align-items: center; gap: .6rem; position: absolute; bottom: 130px; left: .6rem; right: .6rem; max-width: none; z-index: 470; padding: .6rem .8rem; background: rgba(28,31,37,.95); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 16px; color: var(--text); font: inherit; font-size: .78rem; text-align: left; cursor: pointer; box-shadow: 0 10px 26px rgba(0,0,0,.45); }
  .heads-up .dock-ic { width: 34px; height: 34px; border-radius: 10px; flex: none; }
  .hu-txt { display: grid; gap: .1rem; }
  .wallpaper-mark { width: 94vw; top: 64%; opacity: .18; }
[data-theme="light"] body.phone .mark-light { opacity: .16; }

  /* Slide nav: small subtle arrows instead of chunky buttons */
  .pres-nav { padding: .35rem .6rem; background: transparent; gap: .4rem; }
  .pres-nav button { background: none; border: 0; border-radius: 8px; color: var(--muted); font-size: 1.05rem; padding: .45rem .7rem; }
  .pres-nav button .pn-lbl { display: none; }
  .pres-nav button:hover:not(:disabled) { color: var(--orange); background: rgba(255,255,255,.05); }
  .pres-nav button:disabled { opacity: .25; }
  .pres-count { font-size: .7rem; }

  /* ---- Marketing hero widget ---- */
  .phone-hero { display: block; position: absolute; top: 12px; left: .8rem; right: .8rem; z-index: 5; padding: .65rem .85rem .75rem; border-radius: 16px; background: linear-gradient(150deg, #1C1F25 0%, #14161A 72%); border: 1px solid rgba(255,255,255,.08); box-shadow: 0 8px 20px rgba(0,0,0,.35); overflow: hidden; }
  .phone-hero::before { content: ''; position: absolute; top: -45px; right: -35px; width: 170px; height: 170px; background: radial-gradient(circle, rgba(246,96,20,.3), transparent 70%); pointer-events: none; }
  .ph-logo { width: 104px; height: auto; display: block; margin-bottom: .3rem; position: relative; }
  .phone-hero h1 { font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; line-height: 1.05; margin: 0 0 .45rem; color: #F4F4F1; position: relative; }
  .phone-hero h1 span { color: var(--orange); }
  .phone-hero p { display: none; }
  .ph-cta { display: flex; gap: .45rem; flex-wrap: wrap; position: relative; }
  .ph-cta .chip { font-size: .72rem; padding: .38rem .8rem; }
  .ph-cta .chip:not(.primary) { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.2); color: #F4F4F1; }

  /* ---- Floating chat button ---- */
  .chat-fab { display: grid; place-items: center; position: absolute; right: .9rem; bottom: 132px; width: 56px; height: 56px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--orange), var(--orange-deep)); color: #fff; cursor: pointer; z-index: 456; box-shadow: 0 10px 24px rgba(246,96,20,.42); }
  .chat-fab svg { width: 26px; height: 26px; }
  .fab-dot { position: absolute; top: 3px; right: 3px; width: 13px; height: 13px; border-radius: 50%; background: #22C55E; border: 2.5px solid #14161A; }
  body.phone.apps-open .chat-fab, body.phone.chat-open .chat-fab { display: none; }
  body.phone.chat-open .hotseat { display: none; }

  /* ---- Native-style mobile chat ---- */
  .chat { top: 0; bottom: 44px; width: 100%; background: var(--ink); border-left: 0; }
  .chat-head { background: var(--ink-2); padding: .6rem .7rem; gap: .55rem; }
  .chat-back { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font-size: 1.25rem; cursor: pointer; flex: none; }
  .chat-back:hover { background: rgba(255,255,255,.08); }
  .chat-close { display: none; }
  .chat-avatar { width: 38px; height: 38px; border-radius: 50%; }
  .chat-head-txt strong { font-size: .95rem; }
  .chat-msgs { padding: 1rem .9rem; gap: .6rem; }
  .msg { font-size: .9rem; max-width: 88%; padding: .65rem .85rem; }
  .chat-chips { flex-wrap: wrap; overflow-y: auto; max-height: 42%; padding: .5rem .9rem .6rem; gap: .5rem; }
  .chip { flex: none; padding: .65rem 1rem; font-size: .85rem; }
  .chat-input { padding: .6rem .8rem; background: var(--ink-2); }
  .chat-input input { font-size: .95rem; padding: .7rem 1.1rem; }
  .chat-input button { width: 46px; height: 46px; flex: none; font-size: 1.1rem; }
}

/* ---- Email app ---- */
.ic-email { background: linear-gradient(135deg, #2DD4BF, #0D9488); }
.mail-form { display: grid; gap: .7rem; }
.mail-form label { display: grid; gap: .3rem; font-size: .78rem; font-weight: 600; color: var(--muted); }
.mail-form input, .mail-form textarea { font: inherit; font-size: .85rem; color: var(--text); background: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .6rem; resize: vertical; }
.mail-form input:focus-visible, .mail-form textarea:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
.mail-to { font-size: .85rem; background: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .6rem; }
.mail-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.mail-note { font-size: .72rem; color: var(--muted); }
.mail-status { font-size: .78rem; color: var(--amber); min-height: 1em; }

/* ---- Mail client (Contact app) ---- */
.win-body.mc-body { padding: 0; overflow: hidden; }
.mc { display: grid; grid-template-columns: 190px minmax(210px, 260px) 1fr; height: 100%; container-type: inline-size; background: var(--ink); }
.mc-side { display: flex; flex-direction: column; gap: .8rem; padding: .9rem .7rem; background: var(--ink-2); border-right: 1px solid var(--line); overflow-y: auto; }
.mc-new { background: var(--orange); color: var(--ink); border: 0; border-radius: 999px; padding: .55rem .8rem; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.mc-new:hover { background: var(--amber); }
.mc-folders { display: grid; gap: .2rem; }
.mc-folders button { display: flex; justify-content: space-between; align-items: center; gap: .5rem; background: none; border: 0; color: var(--muted); padding: .5rem .6rem; border-radius: 8px; cursor: pointer; font: inherit; font-size: .82rem; text-align: left; }
.mc-folders button:hover { background: rgba(255,255,255,.06); color: var(--text); }
.mc-folders button[aria-current='true'] { background: rgba(246,96,20,.16); color: var(--text); font-weight: 600; }
.mc-badge { background: var(--orange); color: var(--ink); border-radius: 999px; font-size: .68rem; font-weight: 700; padding: .1rem .45rem; }
.mc-badge:empty { display: none; }
.mc-card { margin-top: auto; display: grid; gap: .3rem; font-size: .72rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .8rem; }
.mc-card strong { color: var(--text); font-size: .8rem; }
.mc-card .chip { justify-self: start; margin-top: .3rem; }
.mc-list { border-right: 1px solid var(--line); overflow-y: auto; }
.mc-list-head { padding: .8rem .9rem .5rem; font-weight: 700; font-size: .85rem; position: sticky; top: 0; background: var(--ink); border-bottom: 1px solid var(--line); }
.mc-item { display: grid; gap: .15rem; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; padding: .65rem .9rem; cursor: pointer; color: var(--text); font: inherit; }
.mc-item:hover { background: rgba(255,255,255,.05); }
.mc-item.on, .mc-item:focus-visible { background: rgba(246,96,20,.12); }
.mc-item.unread { border-left-color: var(--orange); }
.mc-item .who { font-size: .78rem; font-weight: 600; display: flex; justify-content: space-between; gap: .5rem; }
.mc-item .who time { color: var(--muted); font-weight: 400; font-size: .68rem; flex: none; }
.mc-item .subj { font-size: .8rem; }
.mc-item.unread .subj { font-weight: 700; }
.mc-item .prev { font-size: .72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-empty { padding: 1.2rem .9rem; color: var(--muted); font-size: .8rem; }
.mc-main { overflow-y: auto; padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .8rem; }
.mc-placeholder { margin: auto; text-align: center; display: grid; gap: .9rem; justify-items: center; color: var(--muted); font-size: .85rem; }
.mc-read-head h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.mc-meta { font-size: .75rem; color: var(--muted); display: grid; gap: .15rem; }
.mc-body-text { white-space: pre-wrap; font-size: .85rem; line-height: 1.55; }
.mc-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: auto; padding-top: .8rem; }
.mc-flash { font-size: .78rem; color: var(--amber); min-height: 1em; }
.mc-compose { display: grid; gap: .6rem; }
.mc-compose label { display: grid; gap: .25rem; font-size: .75rem; font-weight: 600; color: var(--muted); }
.mc-compose input, .mc-compose textarea { font: inherit; font-size: .85rem; color: var(--text); background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .6rem; }
.mc-compose input:focus-visible, .mc-compose textarea:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
.mc-compose textarea { resize: vertical; min-height: 110px; }
.mc-to { font-size: .8rem; background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .6rem; }
.mc-back { display: none; justify-self: start; }
/* Gmail-style rows (avatar + text), used on desktop and mobile */
.mc-item { display: flex; gap: .7rem; align-items: flex-start; }
.mc-av { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--orange), var(--orange-deep)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; flex: none; }
.mc-item-txt { flex: 1; min-width: 0; display: grid; gap: .15rem; }
.mc-mhead, .mc-fab { display: none; }
/* ---- Mobile mail client (phone) ---- */
body.phone .mc { display: flex; flex-direction: column; position: relative; height: 100%; }
body.phone .mc-side { display: none; }
body.phone .mc-list { flex: 1; min-height: 0; overflow-y: auto; border-right: 0; }
body.phone .mc-list-head { display: none; }
body.phone .mc-mhead { display: block; position: sticky; top: 0; background: var(--ink-2); border-bottom: 1px solid var(--line); padding: .8rem .9rem .6rem; z-index: 2; }
body.phone .mc-mtitle { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: .55rem; }
body.phone .mc-mfolders { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; }
body.phone .mc-mfolders::-webkit-scrollbar { display: none; }
.mc-mfolder { flex: none; background: var(--ink); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: .4rem .85rem; font: inherit; font-size: .78rem; cursor: pointer; }
.mc-mfolder.on { background: var(--orange); border-color: var(--orange); color: var(--ink); font-weight: 600; }
body.phone .mc-item { padding: .8rem .9rem; }
body.phone .mc-item .subj { font-size: .88rem; }
body.phone .mc-fab { display: grid; place-items: center; position: absolute; right: 1rem; bottom: 1rem; width: 56px; height: 56px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--orange), var(--orange-deep)); color: #fff; font-size: 1.9rem; line-height: 1; cursor: pointer; box-shadow: 0 8px 20px rgba(246,96,20,.45); z-index: 5; }
body.phone .mc.mc-reading .mc-fab { display: none; }
body.phone .mc.mc-reading .mc-list { display: none; }
body.phone .mc-main { display: none; }
body.phone .mc.mc-reading .mc-main { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; padding: 0; gap: .8rem; }
body.phone .mc-back { display: inline-flex; position: sticky; top: .6rem; align-self: flex-start; margin: .6rem .9rem 0; z-index: 2; }
body.phone .mc-read-head, body.phone .mc-body-text, body.phone .mc-flash { padding-left: .9rem; padding-right: .9rem; }
body.phone .mc-actions { position: sticky; bottom: 0; background: var(--ink-2); border-top: 1px solid var(--line); padding: .7rem .9rem; margin-top: auto; }
body.phone .mc-compose { padding: .3rem .9rem .9rem; }
body.phone .mc-placeholder { padding: 1.5rem 1.2rem; }
@container (max-width: 700px) {
  .mc { grid-template-columns: 160px 1fr; }
  .mc-main { display: none; }
  .mc.mc-reading .mc-list { display: none; }
  .mc.mc-reading .mc-main { display: flex; }
  .mc-back { display: inline-flex; }
}
@container (max-width: 480px) {
  .mc { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .mc-side { flex-direction: row; align-items: center; gap: .5rem; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--line); padding: .5rem .6rem; }
  .mc-new { flex: none; }
  .mc-folders { display: flex; gap: .2rem; }
  .mc-folders button { white-space: nowrap; }
  .mc-card { display: none; }
  .mc-list { border-right: 0; }
}

/* ---- Light theme ---- */
[data-theme="light"] { --ink: #F4F4F1; --ink-2: #FFFFFF; --ink-3: #E6E6E1; --text: #14161A; --muted: #5B6068; --line: rgba(20,22,26,.14); }
[data-theme="light"] .desktop::before { background-image: linear-gradient(rgba(20,22,26,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(20,22,26,.06) 1px, transparent 1px); }
[data-theme="light"] .taskbar, [data-theme="light"] .start-menu, [data-theme="light"] .chat, [data-theme="light"] .navbar, [data-theme="light"] .heads-up, [data-theme="light"] .desk-menu { background: rgba(255,255,255,.92); }
.boot-logo-light { display: none; }
[data-theme="light"] .mark-light { display: block; opacity: .14; }
[data-theme="light"] .wallpaper-mark:not(.mark-light) { display: none; }
[data-theme="light"] .msg.user, [data-theme="light"] .chip.primary, [data-theme="light"] .mc-new, [data-theme="light"] .p-tabs button.on, [data-theme="light"] .mc-badge { color: #14161A; }
[data-theme="light"] .dicon span.lbl { text-shadow: 0 1px 2px rgba(255,255,255,.7); }
[data-theme="light"] .win.active .win-title { background: #DBDBD5; }
[data-theme="light"] .win-btn:hover { background: rgba(20,22,26,.08); }
[data-theme="light"] .p-badge.st-resolved, [data-theme="light"] .p-badge.st-paid, [data-theme="light"] .p-badge.st-completed, [data-theme="light"] .p-badge.st-accepted { color: #177245; }
[data-theme="light"] .p-demo-code, [data-theme="light"] .mc-flash, [data-theme="light"] .p-msg, [data-theme="light"] .mail-status { color: #9A6A00; }
[data-theme="light"] .portal-banner { color: #9A4A00; background: rgba(246,96,20,.10); }
.start-theme { justify-self: start; margin-bottom: .6rem; }

/* ---- Phone shell defaults + crispness ---- */
body { -webkit-font-smoothing: antialiased; }
.heads-up[hidden] { display: none; }
/* Android-faithful: hotseat is a launcher element — hide it inside apps so
   window controls (pres Back/Next, mail toolbars) are never covered. */
body.phone.apps-open .hotseat { display: none; }
.ic-chat { background: linear-gradient(135deg, var(--orange), var(--orange-deep)); }
.ic-drawer { background: linear-gradient(135deg, #64748B, #334155); }
.start-open { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .7rem; }
.start-open button { background: var(--ink-3); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: .35rem .8rem; font-size: .75rem; cursor: pointer; }
.start-open .so-empty { font-size: .72rem; color: var(--muted); }

/* ---- Client portal ---- */
.ic-login { background: linear-gradient(135deg, #94A3B8, #475569); }
.ic-tickets { background: linear-gradient(135deg, #F43F5E, #BE123C); }
.ic-quotes { background: linear-gradient(135deg, #FFB224, #D97706); }
.ic-orders { background: linear-gradient(135deg, #22C55E, #15803D); }
.ic-setups { background: linear-gradient(135deg, #06B6D4, #0E7490); }
.ic-docs { background: linear-gradient(135deg, #EAB308, #A16207); }
.ic-account { background: linear-gradient(135deg, #EC4899, #BE185D); }
.ic-approvals { background: linear-gradient(135deg, var(--orange), var(--orange-deep)); }
.portal-banner { position: absolute; top: 0; left: 0; right: 0; z-index: 445; padding: .35rem .9rem; font-size: .72rem; font-weight: 600; color: var(--amber); background: rgba(246,96,20,.14); border-bottom: 1px solid rgba(246,96,20,.4); backdrop-filter: blur(8px); }
.portal-banner:not([hidden]) ~ .desktop-icons { top: 2.9rem; }
.p-body { padding: 1.1rem 1.2rem; }
.p-head h2 { font-size: 1.05rem; }
.p-head p { font-size: .78rem; color: var(--muted); margin-top: .2rem; }
.p-login { max-width: 340px; margin: 0 auto; display: grid; gap: .7rem; justify-items: stretch; }
.p-login h2 { text-align: center; }
.p-sub { font-size: .78rem; color: var(--muted); text-align: center; }
.p-lock { width: 54px; height: 54px; margin: 0 auto; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--orange), var(--orange-deep)); box-shadow: 0 8px 20px rgba(0,0,0,.4); }
.p-lock svg { width: 60%; height: 60%; }
.p-tabs { display: flex; gap: .4rem; }
.p-tabs button { flex: 1; background: var(--ink-2); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: .45rem .6rem; font: inherit; font-size: .76rem; cursor: pointer; }
.p-tabs button.on { background: var(--orange); border-color: var(--orange); color: var(--ink); font-weight: 700; }
.p-form { display: grid; gap: .6rem; }
.p-form label { display: grid; gap: .25rem; font-size: .75rem; font-weight: 600; color: var(--muted); }
.p-form input, .p-form textarea, .p-form select { font: inherit; font-size: .85rem; color: var(--text); background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; padding: .5rem .6rem; }
.p-form input:focus-visible, .p-form textarea:focus-visible, .p-form select:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
.p-form h3 { font-size: .9rem; }
.p-demo-code { font-size: .78rem; font-weight: 700; color: var(--amber); background: rgba(255,178,36,.10); border: 1px dashed rgba(255,178,36,.5); border-radius: 10px; padding: .55rem .8rem; }
.p-msg { font-size: .78rem; color: var(--amber); min-height: 1em; }
.p-hint { font-size: .72rem; color: var(--muted); }
.p-demo { font-size: .68rem; color: var(--muted); margin-top: .9rem; border-top: 1px solid var(--line); padding-top: .5rem; }
.p-list { display: grid; gap: .4rem; margin-top: .8rem; }
.p-row { display: grid; gap: .2rem; text-align: left; background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; color: var(--text); font: inherit; font-size: .8rem; cursor: pointer; }
.p-row.static { cursor: default; }
.p-row:hover:not(.static) { border-color: var(--orange); }
.p-row-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .78rem; }
.p-row-top time { color: var(--muted); font-size: .68rem; }
.p-badge { border-radius: 999px; padding: .1rem .5rem; font-size: .66rem; font-weight: 700; background: var(--ink-3); color: var(--muted); }
.p-badge.st-open, .p-badge.st-requested { background: rgba(246,96,20,.18); color: var(--amber); }
.p-badge.st-resolved, .p-badge.st-paid, .p-badge.st-completed, .p-badge.st-accepted { background: rgba(34,197,94,.16); color: #6EE7A0; }
.p-table { width: 100%; border-collapse: collapse; font-size: .78rem; margin-top: .8rem; }
.p-table th { text-align: left; color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; padding: .3rem .4rem; }
.p-table td { padding: .5rem .4rem; border-top: 1px solid var(--line); vertical-align: top; }
.p-thread { display: grid; gap: .5rem; margin: .6rem 0; }
.p-msg-b { background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; font-size: .8rem; }
.p-msg-b.gigaworks { border-left: 3px solid var(--orange); }
.p-msg-b strong { font-size: .75rem; }
.p-msg-b time { color: var(--muted); font-size: .65rem; margin-left: .5rem; }
.p-msg-b p { margin: .3rem 0 0; white-space: pre-wrap; }
.p-docs { display: grid; gap: .5rem; margin-top: .8rem; }
.p-doc { display: flex; align-items: center; gap: .7rem; background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; color: var(--text); text-decoration: none; }
.p-doc:hover { border-color: var(--orange); }
.p-doc-ic { width: 40px; height: 40px; flex: none; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #EAB308, #A16207); }
.p-doc-ic svg { width: 60%; height: 60%; }
.p-doc-t { display: grid; gap: .15rem; flex: 1; }
.p-doc-t strong { font-size: .82rem; }
.p-doc-t span { font-size: .68rem; color: var(--muted); }
.p-dl { color: var(--amber); }
.p-kv { display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; font-size: .8rem; margin-top: .6rem; }
.p-kv span { color: var(--muted); }
.p-actions { display: flex; gap: .4rem; margin-top: .3rem; }
.p-empty { color: var(--muted); font-size: .8rem; padding: .6rem 0; }
.p-detail h3 { font-size: .95rem; margin: .6rem 0 .3rem; }
@media (max-width: 720px) { .portal-banner { top: 0; } .portal-banner:not([hidden]) ~ .desktop-icons { top: 34px; } }

/* New icon pack: full tiles for launcher, monochrome glyphs for small UI */
.app-ic { width: 88%; height: 88%; display: block; }
.dock-ic.glyph { background: none; color: var(--text); }

/* ===== Function map: intro / store / task manager / flyout / print ===== */
.intro-body { padding: 1.1rem 1.2rem; }
.intro { display: flex; flex-direction: column; gap: .6rem; }
.intro-ic { width: 40px; height: 40px; color: var(--orange); }
.intro h3 { margin: 0; font-size: 1.05rem; }
.intro p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.intro-img { width: 100%; height: 150px; object-fit: cover; border-radius: 10px; }
.intro-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.intro-links { display: flex; flex-wrap: wrap; gap: .4rem; }
.intro-link { font-size: .8rem; }
.recycle-intro { margin-top: .8rem; }
.store-body { padding: 1.1rem 1.2rem; overflow: auto; }
.store-lede { color: var(--muted); font-size: .9rem; margin: 0 0 1rem; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .9rem; }
.store-card { display: flex; flex-direction: column; gap: .5rem; background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; padding: .7rem; }
.store-card img { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; }
.store-img { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 8px; }
.store-img:hover img, .store-img:focus-visible img { outline: 2px solid var(--orange); outline-offset: 1px; }
.store-label { font-weight: 600; font-size: .9rem; }
.store-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.store-actions .chip { font-size: .75rem; padding: .35rem .7rem; }
.taskmgr-body { padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .7rem; }
.tm-head { display: flex; justify-content: space-between; align-items: baseline; }
.tm-example { font-size: .72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .1rem .6rem; }
.tm-tabs { display: flex; gap: .4rem; }
.tm-tab { background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); padding: .3rem .8rem; font-size: .8rem; cursor: pointer; }
.tm-tab.on { color: var(--orange); border-color: var(--orange); }
.tm-graph { width: 100%; height: 120px; color: var(--orange); background: var(--ink-2); border-radius: 10px; }
.tm-foot { color: var(--muted); font-size: .82rem; line-height: 1.5; margin: 0; }
.flyout { position: fixed; z-index: 600; width: 300px; max-width: calc(100vw - 16px); background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.45); padding: .9rem 1rem; }
.flyout h4 { margin: 0 0 .5rem; font-size: .95rem; }
.flyout p { margin: 0 0 .6rem; color: var(--muted); font-size: .85rem; line-height: 1.45; }
.flyout .chip { font-size: .78rem; margin: .15rem .2rem .15rem 0; }
.print-list { display: flex; flex-direction: column; gap: .4rem; }
.print-opt { text-align: left; background: var(--ink-2); border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: .6rem .8rem; font-size: .85rem; cursor: pointer; }
.print-opt.sel { border-color: var(--orange); color: var(--orange); }
@media print { body.printing > :not(#printArea) { display: none !important; } #printArea { display: block !important; } }

.set-gw { display: flex; align-items: center; gap: .5rem; }
.gw-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); display: inline-block; }
.set-link { width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); cursor: pointer; color: var(--text); font: inherit; }
.set-link:hover { background: var(--ink-2); }
.set-chev { color: var(--muted); font-size: 1.2rem; }
.set-back { margin-bottom: .8rem; }
.set-card { background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.set-card p { margin: 0; color: var(--muted); font-size: .88rem; }

.tray-ic { background: none; border: 0; color: var(--text); cursor: pointer; display: grid; place-items: center; padding: .2rem; }
.tray-ic .dock-ic { width: 20px; height: 20px; }
.tray-ic:hover { color: var(--orange); }
.hs-phone .dock-ic { box-shadow: 0 0 0 2px rgba(34,160,90,.5); }
button.clock { background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; }
.doc-print { margin-left: auto; font-size: .75rem; padding: .3rem .7rem; }
.pres-print { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; padding: .2rem .5rem; }
.pres-print:hover { color: var(--orange); }
.start-pinned { display: flex; flex-wrap: wrap; gap: .3rem; padding: .5rem .8rem; border-bottom: 1px solid var(--line); }
.start-pinned button { display: inline-flex; align-items: center; gap: .4rem; background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-size: .78rem; padding: .35rem .6rem; cursor: pointer; }
.start-pinned button:hover { border-color: var(--orange); color: var(--orange); }
.start-pinned .dock-ic { width: 18px; height: 18px; }

.files-places { display: flex; flex-wrap: wrap; gap: .4rem; padding: .8rem 1rem; border-top: 1px solid var(--line); }
.files-places .chip { font-size: .75rem; }
.term-body { background: #0B0C0F; color: #D6D8DC; font-family: ui-monospace, Consolas, monospace; font-size: .82rem; display: flex; flex-direction: column; padding: .8rem; }
.term-out { flex: 1; overflow: auto; white-space: pre-wrap; display: flex; flex-direction: column; gap: .2rem; }
.term-in { display: flex; gap: .5rem; align-items: center; margin-top: .5rem; }
.term-prompt { color: #F66014; }
.term-input { flex: 1; background: none; border: 0; color: #D6D8DC; font: inherit; outline: none; }
.lock-screen { position: fixed; inset: 0; z-index: 900; background: linear-gradient(160deg, #1C1F25, #0B0C0F); display: grid; place-items: center; }
.lock-screen[hidden] { display: none; }
.lock-inner { text-align: center; display: flex; flex-direction: column; gap: .8rem; align-items: center; }
.lock-time { font-size: 3rem; font-weight: 700; color: #F4F4F1; }
.lock-date { color: #A7ABB4; }
.lock-note { color: #A7ABB4; font-size: .85rem; max-width: 280px; }
.vol-slider { width: 100%; margin: .4rem 0; }

/* v2 icons */
.glyph-img { width: 100%; height: 100%; display: block; }
.dock-ic { background: none; box-shadow: none; }
body.phone .dicon .dock-ic, .hotseat .dock-ic { background: none; border-radius: 0; box-shadow: none; }

/* WC-13 layout split */
#desktopIcons.grouped { display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: flex-start; overflow: auto; padding: 1rem 1.2rem; }
.dgroup { margin-bottom: 1.3rem; }
.dgroup-h { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 .6rem; }
.dgroup-icons { display: grid; gap: .35rem; }
#desktopIcons.grouped .dicon { position: static; width: 84px; }
#desktopIcons.grouped .dicon.recycle { position: absolute; bottom: 1rem; right: 1.2rem; }
.taskbar { justify-content: center; gap: .4rem; }
.task-tray { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); }
.task-apps { justify-content: center; }
.folder-pop { position: fixed; inset: 0; z-index: 700; background: rgba(0,0,0,.45); display: grid; place-items: center; }
.folder-pop[hidden] { display: none; }
.folder-bubble { background: var(--ink-2); border: 1px solid var(--line); border-radius: 16px; padding: 1rem; width: min(90vw, 340px); }
.folder-bubble h4 { margin: 0 0 .8rem; font-size: .95rem; }
.folder-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.folder-apps button { background: none; border: 0; display: grid; justify-items: center; gap: .3rem; color: var(--text); font-size: .68rem; cursor: pointer; text-align: center; }
.folder-apps .dock-ic { width: 46px; height: 46px; }
.chat-fab { display: none !important; }
.phone-hero.compact { padding: .6rem .8rem; }
.pw-search { display: block; width: 100%; text-align: left; background: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .8rem; padding: .55rem .9rem; margin-bottom: .6rem; cursor: pointer; }
.pw-card { display: flex; flex-direction: column; gap: .4rem; }
.pw-card strong { font-size: 1.05rem; }
.pw-card strong span { color: var(--orange); }
.pw-hours { font-size: .72rem; color: var(--muted); }
.phone-hero.compact .ph-cta { margin-top: .2rem; }

/* Mobile tiles: larger readable text, smaller image, no scroll */
body.phone .pres-slide { padding: .7rem .9rem; }
body.phone .pres-img { max-height: 120px; margin: .1rem 0 .5rem; }
body.phone .pres-kicker { margin: 0 0 .3rem; }
body.phone .pres-slide-inner h3 { font-size: 1.2rem; margin: .1rem 0 .4rem; }
body.phone .pres-slide-inner p { font-size: .98rem; line-height: 1.4; }
body.phone .pres-slide-inner ul { margin: .3rem 0; padding-left: 1.1rem; }
body.phone .pres-slide-inner li { font-size: .92rem; line-height: 1.35; margin-bottom: .25rem; }
body.phone .pres-slide-inner .mt-1 { margin-top: .5rem; }

body.phone .wallpaper-mark { top: 6px; translate: -50% 0; opacity: .1; }
