/* ============================================================
   COMPUTER — desktop simulator (computer.html)
   ============================================================ */
.desktop-page { overflow: hidden; height: 100vh; height: 100dvh; }
.desktop { position: fixed; inset: 0; z-index: 1; }
.desktop .glow { top: auto; bottom: -30%; }

/* ---------- icons ---------- */
/* the icon layer covers the desktop; desktop.js places every icon on a 98×102 grid and lets you drag it around */
.icons { position: absolute; top: 12px; left: 12px; right: 12px; bottom: 44px; z-index: 2; pointer-events: none; }
/* desktop icons and the taskbar are drawn at ~65 % of their original size */
.icon { position: absolute; width: 62px; min-height: 64px; padding: 7px 3px 5px; border-radius: 9px; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: auto; touch-action: none;
  background: transparent; border: 1px solid transparent; color: var(--ink); font-family: var(--sans); font-size: 9.5px; cursor: pointer; transition: background .15s, border-color .15s, left .25s cubic-bezier(.22,.61,.36,1), top .25s cubic-bezier(.22,.61,.36,1); user-select: none; }
.icon.dragging { transition: none; z-index: 30; opacity: .9; cursor: grabbing; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); box-shadow: 0 20px 40px -18px rgba(0,0,0,.9); }
.icon.dragging .tile { transform: scale(1.06); }
.icon.drop-over { background: rgba(255,59,59,.14); border-color: rgba(255,59,59,.45); }
.icon.drop-over .tile { transform: scale(1.12); }
.icon .tile { transition: transform .15s; }
.icon:hover { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.08); }
.icon:active { background: rgba(255,59,59,.12); border-color: rgba(255,59,59,.3); }
.icon .tile { width: 31px; height: 31px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; box-shadow: 0 5px 12px -5px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.12); }
.icon .tile img { width: 22px; height: 22px; object-fit: contain; }
/* purple = the computer's own apps; his projects keep their brand look */
.tile.term, .tile.projects, .tile.youtube, .tile.aboutme, .tile.thispc { background: linear-gradient(135deg, #8b5cf6, #4c1d95); border: 1px solid rgba(255,255,255,.08); }
.tile.folder { background: linear-gradient(135deg, #f7c04a, #b8760a); border: 1px solid rgba(255,255,255,.12); }
.icon .tile.folder { font-size: 17px; }
.tile.music { background: linear-gradient(135deg, #ec4899, #7e1d54); border: 1px solid rgba(255,255,255,.12); }
.tile.bin { background: linear-gradient(135deg, #4b5563, #1f2937); border: 1px solid rgba(255,255,255,.1); position: relative; }
.tile.bin.full::after { content: attr(data-count); position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-family: var(--mono); font-size: 10px; font-weight: 600; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.6); }
.tile.term { color: #fff; font-family: var(--mono); font-weight: 600; font-size: 20px; }
.tile.lunamc { background: linear-gradient(135deg, #123544, #0a1a22); border: 1px solid rgba(46,230,255,.25); }
.tile.clutchping { background: radial-gradient(circle at 50% 40%, rgba(46,230,255,.35), rgba(10,20,26,1) 70%); border: 1px solid rgba(46,230,255,.25); }
.tile.snake { background: linear-gradient(135deg, #1f6f3a, #0d3b1e); border: 1px solid rgba(63,185,80,.3); }
.tile.tetris { background: linear-gradient(135deg, #2b4c8c, #141f3d); border: 1px solid rgba(88,166,255,.3); }
.tile.minicraft { background: linear-gradient(180deg, #5f9f35 0 38%, #86604a 38%); border: 1px solid rgba(255,255,255,.1); }
.tile.calc { background: linear-gradient(135deg, #3a3f4c, #1a1d26); border: 1px solid var(--line); }
.tile.calendar { background: linear-gradient(135deg, #b42323, #5a0f0f); border: 1px solid rgba(255,59,59,.35); }
.tile.skin { background: linear-gradient(135deg, #0f6b6b, #072a2a); border: 1px solid rgba(46,230,255,.3); }
.tile.skined { background: linear-gradient(135deg, #d9480f, #6b1d5c); border: 1px solid rgba(255,255,255,.14); }
/* Hypixel Tools folder + its apps, CPS test, Notepad */
.tile.hyp { background: linear-gradient(135deg, #f2b632, #8a5a00); border: 1px solid rgba(255,220,120,.35); color: #1a1200; }
.tile.hyp svg { fill: #1a1200; } .icon .tile.hyp svg { width: 22px; height: 22px; } .ex-item .tile.hyp svg { fill: #1a1200; }
.tile.prestige { background: linear-gradient(135deg, #5b3fb3, #23164f); border: 1px solid rgba(180,150,255,.3); color: #ffd866; font-weight: 700; }
.tile.ratio { background: linear-gradient(135deg, #1f6f6f, #0c2e2e); border: 1px solid rgba(46,230,255,.25); color: #fff; font-family: var(--mono); font-weight: 700; }
.tile.compare { background: linear-gradient(135deg, #8c2b2b, #3a0f0f); border: 1px solid rgba(255,90,90,.3); color: #fff; }
.tile.status { background: linear-gradient(135deg, #1e5a8a, #0b2438); border: 1px solid rgba(88,166,255,.3); }
.tile.guildboard { background: linear-gradient(135deg, #a8741a, #4a2f05); border: 1px solid rgba(255,200,60,.3); }
.tile.cps { background: linear-gradient(135deg, #2d2f3a, #101218); border: 1px solid rgba(255,255,255,.12); }
.tile.notepad { background: linear-gradient(135deg, #e9c46a, #a87a1c); border: 1px solid rgba(255,255,255,.14); }
.icon .tile svg { width: 26px; height: 26px; fill: #fff; }
.tile img.logo { width: 68%; height: 68%; object-fit: contain; border-radius: 22%; }
.tile img.logo + .fb { display: none; }
.tile .fb { display: contents; }
/* real app / game icons (assets/icons): the picture is the whole tile, no gradient behind it */
.tile.pic, .icon .tile.pic { background: none; border: 0; box-shadow: none; }
.tile.pic img.pic { width: 100%; height: 100%; object-fit: contain; border-radius: 0; filter: drop-shadow(0 4px 6px rgba(0,0,0,.45)); }
.ex-item .f-ico img.pic { width: 70%; height: 70%; object-fit: contain; }
.ex-item .f-ico.tile.pic img.pic { width: 80%; height: 80%; }
.icon span { text-shadow: 0 1px 3px rgba(0,0,0,.9); text-align: center; line-height: 1.15; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ---------- windows ---------- */
.windows { position: absolute; inset: 0 0 32px 0; z-index: 3; pointer-events: none; }
.win { position: absolute; min-width: 320px; min-height: 200px; display: flex; flex-direction: column; pointer-events: auto;
  background: var(--term-bg); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(255,59,59,.04); transform-origin: center; }
@keyframes winIn { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
.win.focus { border-color: rgba(255,59,59,.35); box-shadow: 0 40px 90px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(255,59,59,.12); }
.win.max { border-radius: 0; }
.win.snap { transition: left .32s cubic-bezier(.22,.61,.36,1), top .32s cubic-bezier(.22,.61,.36,1), width .32s cubic-bezier(.22,.61,.36,1), height .32s cubic-bezier(.22,.61,.36,1), border-radius .32s ease; }
.win.min { display: none; }
.win.dragging, .win.resizing { transition: none; user-select: none; }
.win.dragging { box-shadow: 0 40px 90px -20px rgba(0,0,0,.95), 0 0 0 1px rgba(255,59,59,.12); }
/* preview shown while a window is dragged against the top edge (release → fullscreen) */
.snap-hint { position: absolute; inset: 6px; z-index: 1; border: 2px solid rgba(255,59,59,.45); border-radius: 14px; background: rgba(255,59,59,.05);
  backdrop-filter: blur(2px); opacity: 0; transform: scale(.985); transition: opacity .18s ease, transform .18s cubic-bezier(.22,.61,.36,1); pointer-events: none; }
.snap-hint.on { opacity: 1; transform: none; }
.wm-busy iframe { pointer-events: none; }
.win-rs { position: absolute; z-index: 6; }
.win-rs.e { top: 0; right: 0; bottom: 16px; width: 7px; cursor: ew-resize; }
.win-rs.s { left: 0; right: 16px; bottom: 0; height: 7px; cursor: ns-resize; }
.win-rs.se { right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.18) 60%, transparent 60%, transparent 75%, rgba(255,255,255,.18) 75%, rgba(255,255,255,.18) 85%, transparent 85%); border-bottom-right-radius: 13px; }
.win.max .win-rs { display: none; }
.win-chrome { background: var(--term-chrome); padding: 10px 14px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid rgba(255,255,255,.05); cursor: grab; flex: none; }
.win.dragging .win-chrome { cursor: grabbing; }
.win-chrome .dot { cursor: pointer; transition: transform .15s, filter .15s; position: relative; }
.win-chrome .dot:hover { transform: scale(1.15); filter: brightness(1.2); }
.win-chrome .dot::after { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: rgba(0,0,0,.6); opacity: 0; transition: opacity .15s; }
.win-chrome:hover .dot::after { opacity: 1; }
.win-chrome .dot.r::after { content: '×'; } .win-chrome .dot.y::after { content: '–'; } .win-chrome .dot.g::after { content: '+'; }
.win-title { margin-left: 8px; font-family: var(--mono); font-size: 12px; color: var(--term-dim); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-body { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.win-body iframe { flex: 1; width: 100%; border: 0; background: var(--bg); }

/* terminal window — reuse the terminal styles, but let the window own size/position */
.win.terminal { width: auto; max-width: none; text-align: left; font-family: var(--mono); }
.win.terminal .win-body { position: relative; }
.win.terminal .term-bg { border-radius: 0; }
.win.terminal .term-body { flex: 1; height: auto; font-size: 14px; position: relative; z-index: 1; }
.win.terminal .input-row { border-top: 1px solid rgba(255,255,255,.05); padding-top: 12px; position: relative; z-index: 1; }
.win.terminal .term-caption { width: auto; margin: 0; padding: 8px 18px 12px; font-size: 12px; text-align: left; position: relative; z-index: 1; border-top: 1px solid rgba(255,255,255,.04); }

/* app card windows (external sites) */
.app-card { padding: 30px 32px; display: flex; flex-direction: column; gap: 16px; }
.app-card .card-cover { display: block; width: 96px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); transition: border-color .2s, transform .2s; }
.app-card .card-cover:hover { border-color: rgba(255,255,255,.25); transform: translateY(-2px); }
.app-card .card-cover img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.app-card .head { display: flex; align-items: center; gap: 16px; }
.app-card .tile { width: 64px; height: 64px; border-radius: 16px; font-size: 32px; display: flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 12px 24px -10px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.12); }
.app-card .tile svg { width: 34px; height: 34px; fill: #fff; }
.app-card .tile img { width: 44px; height: 44px; object-fit: contain; }
.app-card h2 { font-size: 24px; letter-spacing: -.5px; }
.app-card .sub { font-family: var(--mono); font-size: 12px; color: var(--accent); margin-top: 3px; }
.app-card p { color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 52ch; }
.app-card .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.app-card .btn { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.app-card .btn .bi { display: inline-flex; width: 16px; height: 16px; flex: none; }
.app-card .btn .bi svg { width: 100%; height: 100%; fill: currentColor; }
.app-card .btn.disabled { opacity: .45; pointer-events: none; }
.app-card .meta { font-family: var(--mono); font-size: 12px; color: var(--term-dim); }

/* ---------- This PC (explorer) ---------- */
.explorer { flex: 1; min-height: 0; display: flex; }
.ex-side { width: 200px; flex: none; border-right: 1px solid var(--line); padding: 12px 10px; overflow-y: auto; background: rgba(255,255,255,.015); }
.ex-side .ex-head { font-family: var(--mono); font-size: 11px; color: var(--term-dim); letter-spacing: .5px; text-transform: uppercase; padding: 4px 8px 8px; }
.ex-drive { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px; border-radius: 9px; background: transparent; border: 1px solid transparent; color: var(--ink); font-family: var(--sans); font-size: 13px; cursor: pointer; transition: background .15s, border-color .15s; }
.ex-drive:hover { background: rgba(255,255,255,.05); }
.ex-drive.on { background: rgba(139,92,246,.14); border-color: rgba(139,92,246,.35); }
.ex-drive .d-ico { font-size: 18px; width: 26px; text-align: center; }
.ex-drive .d-txt { flex: 1; min-width: 0; }
.ex-drive .d-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-drive .d-letter { font-family: var(--mono); font-size: 11px; color: var(--term-dim); }
.ex-drive .bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,.08); margin-top: 5px; overflow: hidden; }
.ex-drive .bar i { display: block; height: 100%; background: linear-gradient(90deg, #8b5cf6, #c4b5fd); }
.ex-main { flex: 1; min-width: 0; overflow-y: auto; padding: 16px 18px; }
.ex-crumb { font-family: var(--mono); font-size: 12px; color: var(--term-dim); margin-bottom: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ex-crumb button { background: transparent; border: 0; color: var(--muted); font-family: var(--mono); font-size: 12px; cursor: pointer; padding: 0; }
.ex-crumb button:hover { color: var(--accent-soft); }
.ex-crumb b { color: var(--ink); font-weight: 500; }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.ex-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; border-radius: 10px; background: transparent; border: 1px solid transparent; color: var(--ink); font-family: var(--sans); font-size: 12px; cursor: pointer; text-align: center; text-decoration: none; transition: background .15s, border-color .15s; }
.ex-item:hover { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.08); }
.ex-item .f-ico { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 28px; background: rgba(255,255,255,.04); overflow: hidden; }
.ex-item .f-ico img { width: 100%; height: 100%; object-fit: cover; }
.ex-item .f-name { line-height: 1.25; word-break: break-word; }
.ex-item .f-sub { font-family: var(--mono); font-size: 10px; color: var(--term-dim); }
.ex-drives { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ex-dcard { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-family: var(--sans); text-align: left; cursor: pointer; transition: border-color .2s, transform .2s; }
.ex-dcard:hover { border-color: rgba(139,92,246,.45); transform: translateY(-2px); }
.ex-dcard .d-ico { font-size: 30px; }
.ex-dcard .d-txt { flex: 1; min-width: 0; }
.ex-dcard .d-name { font-size: 14px; font-weight: 500; }
.ex-dcard .d-letter { font-family: var(--mono); font-size: 11px; color: var(--term-dim); }
.ex-dcard .bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); margin-top: 8px; overflow: hidden; }
.ex-dcard .bar i { display: block; height: 100%; background: linear-gradient(90deg, #8b5cf6, #c4b5fd); }
.ex-dcard .d-free { font-family: var(--mono); font-size: 10px; color: var(--term-dim); margin-top: 4px; }
.ex-note { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: rgba(139,92,246,.08); border: 1px solid rgba(139,92,246,.25); font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: pre-wrap; line-height: 1.6; }
.ex-note[hidden] { display: none; }
@media (max-width: 760px) { .ex-side { display: none; } }

/* ---------- taskbar ---------- */
.taskbar { position: absolute; left: 0; right: 0; bottom: 0; height: 32px; z-index: 5; display: flex; align-items: center; gap: 5px; padding: 0 7px; overflow: hidden;
  background: rgba(10,11,14,.78); backdrop-filter: saturate(160%) blur(14px); border-top: 1px solid var(--line); }
.taskbar > * { flex: none; }
.start { font-family: var(--mono); font-weight: 600; font-size: 11px; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 3px 8px 3px 6px; cursor: pointer; transition: background .15s, border-color .15s; display: inline-flex; align-items: center; }
.start:hover, .start.on { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.1); }
.start small { color: var(--muted); font-weight: 400; }
.start-logo { width: 14px; height: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; transition: transform .2s; margin-right: 6px; }
html.fa .start-logo { margin-right: 0; margin-left: 6px; }
.start-logo i { display: block; border-radius: 2px; background: var(--accent); }
.start-logo i:nth-child(2) { background: #ff9f43; } .start-logo i:nth-child(3) { background: #ff6a6a; } .start-logo i:nth-child(4) { background: #ffd166; }
.start:hover .start-logo, .start.on .start-logo { transform: scale(1.1); }

/* ---------- start menu (Windows 11 style) ---------- */
.start-menu { position: absolute; left: 7px; bottom: 40px; z-index: 6; width: 500px; max-width: calc(100% - 14px); height: 580px; max-height: calc(100% - 52px); display: flex; flex-direction: column; background: rgba(17,19,25,.88); backdrop-filter: blur(28px) saturate(1.4); -webkit-backdrop-filter: blur(28px) saturate(1.4); border: 1px solid rgba(255,255,255,.09); border-radius: 12px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(0,0,0,.4); overflow: hidden; animation: smIn .18s ease-out; font-family: var(--sans); }
.start-menu[hidden] { display: none; }
.start-menu section { padding: 0; margin: 0; }
@keyframes smIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.sm-search { margin: 22px 30px 8px; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 38px; border-radius: 20px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-bottom-color: var(--accent); }
.sm-search .sm-glass { color: var(--muted); font-size: 16px; }
.sm-search input { flex: 1; background: transparent; border: 0; outline: none; color: var(--ink); font-family: var(--sans); font-size: 13.5px; }
.sm-search input::placeholder { color: var(--muted); }
.sm-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 30px 10px; }
.sm-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--ink); padding: 14px 4px 8px; }
.sm-link { font-family: var(--sans); font-size: 11.5px; color: var(--ink); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); border-radius: 6px; padding: 4px 9px; cursor: pointer; transition: background .15s; display: inline-flex; align-items: center; gap: 4px; }
.sm-link:hover { background: rgba(255,255,255,.1); }
.sm-link b { font-weight: 600; color: var(--muted); }
/* pinned grid: pages stacked vertically, one visible at a time, dots on the side */
.sm-pinned { display: grid; grid-template-columns: 1fr 14px; gap: 6px; align-items: center; }
.sm-pages { height: 176px; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; }
.sm-pages::-webkit-scrollbar { display: none; }
.sm-page { height: 176px; scroll-snap-align: start; display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: 1fr 1fr; gap: 2px; align-content: start; }
.sm-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 8px 4px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink); font-family: var(--sans); font-size: 11px; cursor: pointer; transition: background .12s, border-color .12s; min-width: 0; }
.sm-tile:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.06); }
.sm-tile:active { transform: scale(.96); }
.sm-tile .sm-name { max-width: 100%; text-align: center; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sm-ico { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex: none; box-shadow: 0 4px 10px -4px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.1); }
.sm-ico img { width: 22px; height: 22px; object-fit: contain; }
.sm-ico svg { width: 18px; height: 18px; fill: #fff; }
.sm-ico.tile.term { font-size: 18px; }
.sm-ico.site { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); color: var(--accent-soft); }
.sm-dots { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.sm-dots button { width: 4px; height: 4px; border-radius: 2px; border: 0; padding: 0; background: rgba(255,255,255,.28); cursor: pointer; transition: height .15s, background .15s; }
.sm-dots button.on { height: 12px; background: var(--ink); }
/* recommended + all apps + results: rows */
.sm-rec, .sm-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.sm-list { grid-template-columns: 1fr; }
.sm-row-btn { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink); font-family: var(--sans); font-size: 12.5px; text-align: start; cursor: pointer; text-decoration: none; min-width: 0; transition: background .12s; }
.sm-row-btn:hover { background: rgba(255,255,255,.07); }
.sm-row-btn .sm-ico { width: 30px; height: 30px; font-size: 15px; }
.sm-row-btn .sm-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sm-row-btn .sm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-row-btn .sm-sub { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.sm-letter { font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--accent-soft); padding: 10px 8px 4px; }
.sm-empty { padding: 30px 10px; text-align: center; color: var(--muted); font-size: 13px; }
.sm-foot { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 12px 34px; background: rgba(0,0,0,.25); border-top: 1px solid rgba(255,255,255,.06); }
.sm-user { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--ink); padding: 4px 8px 4px 4px; border-radius: 8px; }
.sm-user img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.sm-power-wrap { position: relative; }
.sm-power { width: 36px; height: 36px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink); font-size: 16px; cursor: pointer; transition: background .12s; }
.sm-power:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.08); }
.sm-power-menu { position: absolute; right: 0; bottom: 42px; min-width: 150px; background: rgba(22,25,33,.98); border: 1px solid rgba(255,255,255,.1); border-radius: 8px; padding: 4px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.9); display: flex; flex-direction: column; }
.sm-power-menu[hidden] { display: none; }
.sm-power-menu button, .sm-power-menu a { display: block; width: 100%; text-align: start; padding: 8px 10px; border-radius: 6px; border: 0; background: transparent; color: var(--ink); font-family: var(--sans); font-size: 12.5px; cursor: pointer; text-decoration: none; }
.sm-power-menu button:hover, .sm-power-menu a:hover { background: rgba(255,255,255,.08); }
html.fa .sm-power-menu { right: auto; left: 0; }
.pinned { display: flex; gap: 3px; padding-right: 6px; margin-right: 3px; border-right: 1px solid var(--line); }
.pinned .task { padding: 3px 7px; position: relative; }
.pinned .task.open::after { content: ''; position: absolute; left: 9px; right: 9px; bottom: 1px; height: 2px; border-radius: 1px; background: #a78bfa; }
/* running apps: like Windows, buttons share the space and shrink (label → ellipsis → icon only) instead of scrolling */
.tasks { flex: 1 1 0; min-width: 0; display: flex; gap: 6px; overflow: hidden; }
.tasks .task { flex: 1 1 0; max-width: 116px; min-width: 26px; justify-content: flex-start; padding-left: 7px; padding-right: 7px; container-type: inline-size; }
@container (max-width: 70px) { .task .lbl { display: none; } .task .mini { margin: 0 auto; } }   /* too narrow for a label → icon only */
.task { font-family: var(--sans); font-size: 10px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 3px 8px; cursor: pointer; display: flex; align-items: center; gap: 5px; white-space: nowrap; min-width: 0; transition: background .15s, color .15s, border-color .15s; }
.task .lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.task .mini { flex: none; width: 13px; height: 13px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 8px; }
.task .mini img { width: 10px; height: 10px; object-fit: contain; }
.task .mini svg { width: 8px; height: 8px; fill: #fff; }
.task:hover { background: rgba(255,255,255,.05); color: var(--ink); }
.task.on { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.1); color: var(--ink); }
.task.min { opacity: .55; }
.clock { font-family: var(--mono); font-size: 10px; color: var(--muted); padding: 0 5px; text-align: right; line-height: 1.2; white-space: nowrap; cursor: default; }
.clock .tz { font-size: 8px; color: var(--accent-soft); margin-left: 5px; letter-spacing: .5px; vertical-align: 1px; }
.clock small { display: block; font-size: 8px; color: var(--term-dim); }
.clock .jal { color: var(--muted); }
html.fa .clock .tz { margin-left: 0; margin-right: 5px; font-family: var(--fa); }
html.fa .clock small { font-family: var(--fa); }

/* start menu */
/* two columns so ~20 apps fit on a laptop screen; scrolls instead of growing past the top when it still doesn't fit */

/* right-click menu on desktop icons */
.ctx { position: absolute; z-index: 40; min-width: 180px; padding: 6px; border-radius: 10px; background: rgba(15,17,22,.97); border: 1px solid var(--line); box-shadow: 0 20px 50px -18px rgba(0,0,0,.9); animation: winIn .12s ease both; }
.ctx[hidden] { display: none; }
.ctx button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 7px; border: 0; background: transparent; color: var(--ink); font-family: var(--sans); font-size: 13px; cursor: pointer; }
.ctx button:hover { background: rgba(255,59,59,.12); }
html.fa .ctx button { text-align: right; font-family: var(--fa); }

/* desktop folder + recycle bin windows reuse the explorer grid */
.folder-view, .bin-view { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px; }
.folder-view .ex-item .f-ico, .bin-view .ex-item .f-ico { font-size: 26px; }
.folder-view .ex-item .f-ico img, .bin-view .ex-item .f-ico img { width: 34px; height: 34px; object-fit: contain; }
.folder-view .ex-item .f-ico svg, .bin-view .ex-item .f-ico svg { width: 26px; height: 26px; fill: #fff; }
.ex-crumb .sp { flex: 1; }
/* small buttons inside the bin window (same look as the apps' .abtn, which computer.html doesn't load) */
.bin-view .abtn { font-family: var(--mono); font-size: 12px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.bin-view .abtn:hover { border-color: rgba(255,59,59,.45); background: rgba(255,59,59,.1); }
.bin-view .ex-crumb .abtn + .abtn { margin-left: 6px; }
.bin-item { cursor: default; }
.bin-item:hover { background: transparent; border-color: transparent; }
.bin-empty { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 14px; }
.bin-empty .big { font-size: 46px; opacity: .5; margin-bottom: 10px; }
.bin-empty .dim { font-family: var(--mono); font-size: 12px; color: var(--term-dim); max-width: 44ch; margin: 8px auto 0; line-height: 1.6; }

/* ---------- mobile: a phone home screen (big clock, app grid, dock), full-screen windows ---------- */
.m-head { display: none; }
@media (max-width: 760px) {
  .m-head { display: block; position: absolute; top: calc(18px + env(safe-area-inset-top)); left: 0; right: 0; z-index: 2; text-align: center; pointer-events: none; }
  .m-head .m-time { font-family: var(--mono); font-size: 54px; font-weight: 600; letter-spacing: -2px; line-height: 1; color: var(--ink); text-shadow: 0 6px 30px rgba(255,59,59,.25); }
  .m-head .m-date { margin-top: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
  .m-head .m-sub { margin-top: 4px; font-family: var(--mono); font-size: 10.5px; color: var(--term-dim); }
  html.fa .m-head .m-date, html.fa .m-head .m-sub { font-family: var(--fa); }
  .icons { top: calc(126px + env(safe-area-inset-top)); left: 14px; right: 14px; bottom: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 6px; pointer-events: auto; }
  .icon { position: static; width: auto; height: auto; padding: 6px 2px; gap: 7px; font-size: 11px; border-radius: 14px; }
  .icon .tile { width: 56px; height: 56px; border-radius: 16px; font-size: 26px; box-shadow: 0 10px 22px -10px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.14); }
  .icon .tile img { width: 38px; height: 38px; }
  .icon .tile.folder { font-size: 28px; }
  .icon .tile svg { width: 28px; height: 28px; }
  .icon[data-app="bin"] { display: none; }      /* no drag & drop on phones → nothing to recycle */
  .icon span { font-size: 11px; line-height: 1.15; }
  /* windows fill the screen; bigger, easier controls */
  .windows { inset: 0 0 calc(48px + env(safe-area-inset-bottom)) 0; }
  .win { inset: 0 !important; width: auto !important; height: auto !important; border-radius: 0; min-width: 0; border-left: 0; border-right: 0; border-top: 0; }
  .win-chrome { cursor: default; padding: 12px 14px; gap: 12px; }
  .win-chrome .dot { width: 18px; height: 18px; }
  .win-chrome .dot.g { display: none; }        /* already full screen */
  .win-chrome .dot::after { font-size: 12px; opacity: 1; }
  .win-title { font-size: 13px; }
  .win-rs { display: none; }
  .win.terminal .term-caption { display: none; }
  .win.terminal .term-body { font-size: 13px; }
  /* dock */
  .taskbar { height: calc(48px + env(safe-area-inset-bottom)); padding: 0 10px env(safe-area-inset-bottom); gap: 8px; }
  .start { font-size: 12px; padding: 6px 10px; }
  .start-menu { left: 8px; right: 8px; width: auto; height: auto; bottom: calc(56px + env(safe-area-inset-bottom)); max-height: 78vh; border-radius: 16px; }
  .sm-search { margin: 14px 14px 4px; }
  .sm-body { padding: 0 14px 8px; }
  .sm-pinned { grid-template-columns: 1fr; }
  .sm-dots { display: none; }
  .sm-pages { height: auto; overflow: visible; scroll-snap-type: none; }
  .sm-page { height: auto; grid-template-columns: repeat(4, 1fr); grid-template-rows: auto; }
  .sm-rec { grid-template-columns: 1fr; }
  .sm-foot { padding: 10px 16px; }
  .task { font-size: 12px; padding: 6px 10px; }
  .task .mini { width: 18px; height: 18px; font-size: 10px; }
  .task .mini img { width: 14px; height: 14px; } .task .mini svg { width: 11px; height: 11px; }
  .clock { font-size: 12px; }
  .clock small { display: none; }
  .taskbar .lang-toggle { font-size: 11px; padding: 4px 8px; }
  /* start menu becomes a bottom sheet that scrolls */
  .app-card { padding: 22px 18px; }
  .ctx { display: none !important; }
}

/* ---------- RTL / taskbar toggle ---------- */
.taskbar .lang-toggle { margin: 0 3px; padding: 2px 7px; font-size: 9px; }
html.fa .start-menu { left: auto; right: 10px; }
html.fa .pinned { border-right: 0; border-left: 1px solid var(--line); padding-right: 0; padding-left: 8px; margin-right: 0; margin-left: 4px; }
html.fa .clock { text-align: left; }
html.fa .ex-side { border-right: 0; border-left: 1px solid var(--line); }
html.fa .win-title { margin-left: 0; margin-right: 8px; }
html.fa .win.terminal .term-caption { font-family: var(--fa); direction: rtl; text-align: right; }
html.fa #cmdInput::placeholder { font-family: var(--fa); }
html.fa .icon span, html.fa .task, html.fa .win-title { font-family: var(--fa); }
html.fa .app-card, html.fa .explorer, html.fa .start-menu { font-family: var(--fa); }
