/* ============================================================================
   portfolioxp.com - "Windows XP VM" desktop theme (Luna)
   Bliss wallpaper, blue gradient title bars, green Start button, Start-menu
   Games fly-out, embedded games, and a phone-friendly layout.
   Content is identical to the editorial baseline; only the shell changed.
   ============================================================================ */

:root {
  --xp-blue:        #245edb;
  --title-grad:     linear-gradient(180deg,#0a64e6 0%,#2f7bf0 8%,#1f6ce0 42%,#0f5ad6 92%,#0a4fc6 100%);
  --title-inactive: linear-gradient(180deg,#9db4d6 0%,#8aa3c8 50%,#7e98be 100%);
  --face:           #ece9d8;
  --content-bg:     #ffffff;
  --ink:            #1a1a1a;
  --ink-soft:       #333333;
  --accent:         #0a3d91;
  --sans:           Tahoma, Verdana, "Segoe UI", Geneva, sans-serif;
  --serif:          Georgia, "Times New Roman", serif;
  --bar:            38px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  overflow: hidden;
  background: #5a8ed6 url('/assets/bliss-xp.webp') center / cover no-repeat fixed;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
@supports (height: 100dvh) { body { height: 100dvh; } }

/* Without JS: drop the desktop chrome, show the content as a plain document. */
.no-js .desktop-icons, .no-js .taskbar, .no-js .start-menu,
.no-js .boot, .no-js .xp-titlebar, .no-js .win-status { display: none !important; }
.no-js body { overflow: auto; background: #ece9d8; }
.no-js .xp-window {
  position: static !important; width: auto !important; height: auto !important;
  margin: 16px auto; max-width: 820px; box-shadow: none; border: 1px solid #888;
}
.js .xp-window { display: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
a { color: var(--accent); }
.ico { fill: currentColor; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------------------------------------------------------------- desktop -- */
#desktop { position: fixed; inset: 0; }
.desktop-icons {
  position: absolute; top: 14px; left: 12px;
  display: flex; flex-direction: column; flex-wrap: wrap;
  align-content: flex-start; gap: 6px; max-height: calc(100dvh - 60px);
}
.desktop-icon {
  width: 84px; padding: 6px 4px 8px; border: 1px solid transparent;
  background: none; cursor: pointer; color: #fff; font-family: var(--sans);
  font-size: 12px; text-align: center; border-radius: 2px;
}
.desktop-icon .ico { width: 36px; height: 36px; display: block; margin: 0 auto 5px; filter: drop-shadow(1px 1px 1px rgba(0,0,0,.45)); }
.desktop-icon span { display: inline-block; padding: 1px 3px; line-height: 1.25; text-shadow: 0 1px 2px rgba(0,0,0,.75); }
.desktop-icon:focus-visible { outline: none; }
.desktop-icon:focus-visible span, .desktop-icon.selected span { background: #0b3aa6; border: 1px dotted #aac4ff; text-shadow: none; }

/* ---------------------------------------------------------------- windows -- */
.xp-window {
  position: absolute; top: 56px; left: 96px;
  width: 660px; min-width: 300px; height: 460px;
  flex-direction: column; background: var(--face);
  border: 1px solid #0831d9; border-radius: 8px 8px 0 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.45); padding: 3px 4px 4px;
}
.js .xp-window.is-open { display: flex; }
.xp-window.is-max { top: 0 !important; left: 0 !important; width: 100vw !important; height: calc(100vh - var(--bar)) !important; border-radius: 0; }
.xp-window.minimized { display: none !important; }

.xp-titlebar {
  height: 28px; flex: 0 0 28px; display: flex; align-items: center; gap: 6px;
  padding: 0 4px 0 6px; cursor: default; border-radius: 6px 6px 0 0;
  background: var(--title-grad); color: #fff; font-weight: 700; font-size: 13px;
  text-shadow: 1px 1px 1px rgba(0,0,0,.5);
}
.xp-window:not(.focused) .xp-titlebar { background: var(--title-inactive); }
.xp-titlebar .ico { width: 16px; height: 16px; flex: 0 0 16px; filter: drop-shadow(1px 1px 0 rgba(0,0,0,.3)); }
.xp-title { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.xp-controls { display: flex; gap: 2px; }
.xp-controls button {
  width: 22px; height: 22px; border-radius: 3px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.65); color: #fff;
  font-family: var(--sans); font-size: 12px; font-weight: 700;
  display: grid; place-items: center; line-height: 1;
  background: linear-gradient(180deg,#5b97f2,#2f6fe0); text-shadow: 0 1px 1px rgba(0,0,0,.4);
}
.xp-controls button:hover { filter: brightness(1.12); }
.xp-controls .btn-close { background: linear-gradient(180deg,#f08a6c,#d8442a); }
.xp-controls .btn-close:hover { background: linear-gradient(180deg,#ff9d7e,#e8472a); }

.xp-body {
  flex: 1 1 auto; overflow: auto; background: var(--content-bg);
  border: 1px solid #335ea8; margin-top: 3px; padding: 22px 26px 28px;
  line-height: 1.55; color: var(--ink-soft);
  -webkit-user-select: text; user-select: text;
}
.win-status { flex: 0 0 20px; display: flex; align-items: center; gap: 14px; padding: 0 8px; font-size: 11px; color: #4a4a4a; background: var(--face); border-top: 1px solid #fff; }
.win-status .cell { border: 1px solid #c6c2b3; box-shadow: inset 1px 1px 0 #fff; padding: 1px 8px; height: 16px; display: flex; align-items: center; }

/* --------------------------------------------------------- window content -- */
.xp-body h1, .xp-body h2, .xp-body h3 { font-family: var(--serif); color: #0b2a66; line-height: 1.2; }
.xp-body h2 { font-size: 1.7rem; margin: 0 0 4px; }
.xp-body h3 { font-size: 1.12rem; margin: 0; color: #14306b; }
.xp-body p { margin: 0 0 12px; }
.xp-body a { color: #0a49c8; }
.win-eyebrow { font-family: var(--sans); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: #6a7a93; margin: 0 0 6px; }

.welcome { display: flex; gap: 22px; align-items: flex-start; }
.welcome img { width: 132px; height: 132px; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.25); border-radius: 3px; }
.welcome .creds { font-family: var(--sans); font-size: 12px; color: #46618f; font-weight: 700; margin-top: 4px; }
.welcome-tip { margin-top: 14px; background: #fbf7d8; border: 1px solid #e3d27a; padding: 10px 12px; font-size: 12px; color: #5a4a12; border-radius: 3px; }

.focus-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.focus-list li { border: 1px solid #d8d4c4; background: #faf9f4; padding: 12px 14px; border-radius: 3px; }
.focus-list h3 { font-size: 1rem; margin-bottom: 4px; }
.focus-list p { margin: 0; font-size: 12.5px; }

.exp-item { padding: 16px 0; border-top: 1px solid #e2ddcd; }
.exp-item:first-child { padding-top: 0; border-top: none; }
.exp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 6px; }
.exp-org { font-family: var(--sans); font-weight: 700; color: #1d4ea8; margin: 3px 0 0; font-size: 12.5px; }
.exp-when { font-family: var(--sans); font-size: 11px; color: #6a6a6a; white-space: nowrap; margin: 0; text-align: right; }
.exp-summary { margin: 0; }

.work-item { padding: 16px 0; border-top: 1px solid #e2ddcd; }
.work-item:first-child { padding-top: 0; border-top: none; }
.work-tech { font-family: var(--sans); font-size: 11px; color: #5a6b86; letter-spacing: .03em; margin: 2px 0 8px; }
.work-result { background: #eef4ff; border-left: 3px solid #2f6fe0; padding: 8px 12px; margin: 0; font-size: 12.5px; }
.work-result span { font-weight: 700; color: #0b3aa6; }
.section-lead { font-size: 1rem; color: #444; }

.caps { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 8px; }
.caps-col { border: 1px solid #d8d4c4; background: #faf9f4; padding: 12px 14px; border-radius: 3px; }
.caps-col h3 { font-size: .98rem; margin-bottom: 5px; }
.caps-col p { margin: 0; font-size: 12.5px; }

.cred-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 6px; }
.cred-col ul { list-style: none; margin: 8px 0 0; padding: 0; }
.cred-col li { margin-bottom: 12px; }
.cred-col li strong { display: block; color: #14306b; font-family: var(--sans); }
.cred-col li span { font-size: 12px; color: #555; }

.contact-list { list-style: none; margin: 14px 0 0; padding: 0; }
.contact-list li { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid #e2ddcd; align-items: baseline; }
.contact-label { flex: 0 0 84px; font-family: var(--sans); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #6a7a93; }

.btn-row { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.xp-btn {
  font-family: var(--sans); font-size: 12px; color: #1a1a1a; text-decoration: none;
  background: linear-gradient(180deg,#fdfdfd,#dcd8c8); border: 1px solid #8a8678;
  border-radius: 3px; padding: 5px 16px; box-shadow: inset 0 1px 0 #fff; cursor: pointer;
  display: inline-flex; align-items: center;
}
.xp-btn:hover { border-color: #f0a000; box-shadow: inset 0 0 0 1px #ffd27a, inset 0 1px 0 #fff; }

/* My Documents folder window */
.folder-bar { font-size: 12px; color: #4a4a4a; margin: 0 0 12px; }
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.folder-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 12px 6px; background: none; border: 1px solid transparent; border-radius: 3px;
  cursor: pointer; font: 12px var(--sans); color: #1a1a1a; text-align: center;
}
.folder-item .ico { width: 42px; height: 42px; }
.folder-item:hover { background: #e9f1fb; border-color: #bcd4ee; }
.folder-item:focus-visible { outline: 1px dotted #2f6fe0; }

/* ---------------------------------------------------------------- taskbar -- */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--bar); z-index: 9000;
  display: flex; align-items: stretch;
  background: linear-gradient(180deg,#3168d8 0,#2861d6 3%,#235bd2 6%,#2c6bdf 10%,#2d6ee0 88%,#1d50c4 96%,#1944b5 100%);
  border-top: 1px solid #0f3fb5; box-shadow: inset 0 1px 0 #5b8ff0;
}
.start-button {
  display: flex; align-items: center; gap: 7px; height: 100%; padding: 0 26px 4px 12px;
  border: none; cursor: pointer; font-family: var(--serif); font-style: italic; font-weight: 700;
  font-size: 18px; color: #fff; text-shadow: 1px 1px 1px rgba(0,0,0,.45); border-radius: 0 12px 12px 0;
  background: linear-gradient(180deg,#5cb338 0,#4ea22f 8%,#3f9426 45%,#368a20 90%,#2c7a18 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
}
.start-button .ico { width: 22px; height: 22px; }
.start-button:hover { filter: brightness(1.08); }
.start-button.active { background: linear-gradient(180deg,#3f8f24,#2c7a18); box-shadow: inset 1px 1px 4px rgba(0,0,0,.4); }

.task-buttons { flex: 1 1 auto; display: flex; align-items: center; gap: 4px; padding: 4px 6px; overflow: hidden; }
.task-button {
  display: flex; align-items: center; gap: 6px; height: 26px; min-width: 120px; max-width: 168px;
  padding: 0 8px; border: 1px solid #1b48b6; border-radius: 3px; cursor: pointer;
  color: #fff; font-family: var(--sans); font-size: 12px; text-align: left;
  background: linear-gradient(180deg,#4a86ec,#2f6cdf); box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
  white-space: nowrap; overflow: hidden;
}
.task-button .ico { width: 16px; height: 16px; flex: 0 0 16px; }
.task-button span { overflow: hidden; text-overflow: ellipsis; }
.task-button.active { background: linear-gradient(180deg,#1b4fc0,#3f79e6); box-shadow: inset 1px 1px 4px rgba(0,0,0,.4); }
.task-button:hover { filter: brightness(1.07); }

.systray {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px; margin-left: 4px;
  background: linear-gradient(180deg,#1c8adf 0,#149be0 6%,#1287d8 50%,#0e72c8 100%);
  border-left: 1px solid #0f5ec0; box-shadow: inset 1px 0 0 #4fb6ef; color: #fff; font-size: 12px;
}
.systray .tray-ico { width: 15px; height: 15px; opacity: .92; }
#clock { min-width: 56px; text-align: center; text-shadow: 0 1px 1px rgba(0,0,0,.3); }

/* ------------------------------------------------------------- start menu -- */
.start-menu {
  position: fixed; left: 0; bottom: var(--bar); z-index: 9500; width: 380px;
  display: none; flex-direction: column;
  border: 1px solid #0a246a; border-bottom: none; border-radius: 8px 8px 0 0;
  box-shadow: 4px 0 18px rgba(0,0,0,.4);
}
.start-menu.open { display: flex; }

.start-header {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: linear-gradient(180deg,#1b56c8,#2f72e6 60%,#1b56c8);
  border-bottom: 2px solid #ec8f1c; color: #fff; border-radius: 8px 8px 0 0;
}
.start-header img { width: 44px; height: 44px; border: 2px solid #fff; border-radius: 4px; }
.start-header .who b { display: block; font-size: 15px; }
.start-header .who small { font-size: 11px; opacity: .9; }

.start-cols { display: flex; }
.start-col { padding: 8px 6px; }
.start-col.left { flex: 1 1 56%; background: #fff; }
.start-col.right { flex: 1 1 44%; background: #d3e5f7; border-left: 1px solid #aac4e8; }

.start-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 6px 10px; border: none; background: none; cursor: pointer;
  font-family: var(--sans); font-size: 12px; text-align: left; color: #11264a;
  text-decoration: none; border-radius: 3px;
}
.start-item .ico { width: 24px; height: 24px; flex: 0 0 24px; }
.start-col.right .start-item { color: #0a2a5c; font-weight: 700; }
.start-item:hover { background: #2f72e6; color: #fff; }
.start-item b { font-weight: 700; }
.start-sep { height: 1px; background: #cfcabb; margin: 5px 8px; }
.start-col.right .start-sep { background: #aac4e8; }

/* Games fly-out */
.has-flyout { position: relative; }
.has-flyout > .start-item .arrow { margin-left: auto; font-size: 11px; opacity: .8; }
.start-flyout {
  position: absolute; left: calc(100% - 8px); bottom: 0; min-width: 188px;
  background: #fff; border: 1px solid #0a246a; border-radius: 0 6px 6px 0;
  box-shadow: 4px 2px 18px rgba(0,0,0,.4); padding: 4px; display: none; z-index: 20;
}
.has-flyout:hover > .start-flyout, .has-flyout.open > .start-flyout { display: block; }

.start-footer {
  display: flex; justify-content: flex-end; gap: 8px; padding: 7px 12px;
  background: linear-gradient(180deg,#2f72e6,#1b56c8); border-top: 2px solid #ec8f1c;
}
.start-footer button { display: flex; align-items: center; gap: 7px; background: none; border: none; color: #fff; font-family: var(--sans); font-size: 12px; cursor: pointer; padding: 4px 8px; border-radius: 3px; }
.start-footer button:hover { background: rgba(255,255,255,.18); }
.start-footer .ico { width: 22px; height: 22px; }

/* ----------------------------------------------------------------- games --- */
.xp-window[data-game] > .xp-body { padding: 0; background: var(--face); overflow: auto; }

/* Minesweeper */
.ms-app { padding: 8px; font-family: var(--sans); }
.ms-menu { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.ms-menu button { font: 12px var(--sans); background: linear-gradient(180deg,#fdfdfd,#dcd8c8); border: 1px solid #8a8678; border-radius: 3px; padding: 3px 8px; cursor: pointer; }
.ms-menu button.on, .ms-menu button:active { background: #cfd8ea; box-shadow: inset 1px 1px 2px rgba(0,0,0,.3); }
.ms-frame { display: inline-block; background: #c0c0c0; padding: 6px; border: 2px solid; border-color: #fff #808080 #808080 #fff; }
.ms-hud { display: flex; align-items: center; justify-content: space-between; padding: 5px 6px; margin-bottom: 6px; border: 2px solid; border-color: #808080 #fff #fff #808080; }
.ms-led { display: flex; gap: 1px; background: #000; padding: 2px 3px; }
.ms-led span { font: 700 18px "Courier New", monospace; color: #f00; background: #000; width: 12px; text-align: center; text-shadow: 0 0 2px #900; }
.ms-face { width: 28px; height: 28px; font-size: 16px; line-height: 1; background: #c0c0c0; border: 2px solid; border-color: #fff #808080 #808080 #fff; cursor: pointer; }
.ms-face:active { border-color: #808080 #fff #fff #808080; }
.ms-board { display: grid; gap: 0; }
.ms-cell {
  width: 24px; height: 24px; padding: 0; font: 700 14px var(--sans);
  background: #c0c0c0; border: 2px solid; border-color: #fff #808080 #808080 #fff;
  cursor: pointer; display: grid; place-items: center;
}
.ms-cell.rev { border: 1px solid #9c9c9c; background: #c8c8c8; cursor: default; }
.ms-cell.mine { background: #d83a2a; border-color: #d83a2a; }
.ms-cell.flag, .ms-cell.down { font-size: 13px; }
.ms-cell.m1 { color: #0000ff; } .ms-cell.m2 { color: #008000; } .ms-cell.m3 { color: #ff0000; }
.ms-cell.m4 { color: #000080; } .ms-cell.m5 { color: #800000; } .ms-cell.m6 { color: #008080; }
.ms-cell.m7 { color: #000000; } .ms-cell.m8 { color: #808080; }

/* Solitaire + FreeCell (shared card styles) */
.sol-app, .fc-app { font-family: var(--sans); }
.sol-bar { display: flex; align-items: center; gap: 10px; padding: 6px 8px; background: var(--face); }
.sol-bar button { font: 12px var(--sans); background: linear-gradient(180deg,#fdfdfd,#dcd8c8); border: 1px solid #8a8678; border-radius: 3px; padding: 4px 14px; cursor: pointer; }
.sol-bar button:active { box-shadow: inset 1px 1px 2px rgba(0,0,0,.3); }
.sol-hint { font-size: 11px; color: #444; }
.sol-felt, .fc-felt { position: relative; background: radial-gradient(120% 80% at 50% 0%, #2aa55f 0%, #1f8a4c 55%, #176b3a 100%); padding: 12px; min-height: 430px; }
.sol-top, .fc-top { display: flex; gap: 8px; margin-bottom: 16px; }
.sol-top .spacer { flex: 1 1 auto; background: none; }
.sol-tab, .fc-tab { display: flex; gap: 8px; align-items: flex-start; }
.pile { width: 52px; min-height: 72px; }
.sol-tab .pile.col, .fc-tab .pile.col { position: relative; min-height: 340px; }
.sol-tab .pile.col .card, .fc-tab .pile.col .card { position: absolute; left: 0; }
.card {
  width: 52px; height: 72px; border-radius: 6px; position: relative;
  background: linear-gradient(160deg,#ffffff,#eef1f6); border: 1px solid #4a4a4a;
  box-shadow: 0 1px 3px rgba(0,0,0,.4); cursor: grab; color: #111; user-select: none;
}
.card .cr { position: absolute; top: 3px; left: 5px; font: 700 13px var(--sans); line-height: 1; }
.card .cs { position: absolute; top: 17px; left: 6px; font-size: 11px; line-height: 1; }
.card .big { position: absolute; right: 5px; bottom: 3px; font-size: 23px; opacity: .85; }
.card.red { color: #d20000; }
.card.down { background: #1b6ec2 repeating-linear-gradient(45deg,#1b6ec2 0 5px,#1556a0 5px 10px); border-color: #0d3f78; }
.card.empty { background: rgba(255,255,255,.10); border: 1px dashed rgba(255,255,255,.6); box-shadow: none; cursor: pointer; color: rgba(255,255,255,.75); display: grid; place-items: center; font-size: 20px; }
.card.found-empty { color: rgba(255,255,255,.5); }
.card.dragging { opacity: .3; }
.sol-drag { position: fixed; z-index: 99800; pointer-events: none; width: 52px; }
.sol-drag .card { position: absolute; left: 0; box-shadow: 0 6px 14px rgba(0,0,0,.45); cursor: grabbing; }
.sol-win { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.5); color: #fff; text-align: center; font-size: 22px; font-weight: 700; z-index: 5; }
.sol-win button { display: block; margin: 12px auto 0; font: 13px var(--sans); padding: 5px 16px; background: var(--face); color: #000; border: 1px solid #8a8678; border-radius: 3px; cursor: pointer; }

/* Microsoft Paint */
.paint-app { display: flex; flex-direction: column; height: 100%; font-family: var(--sans); }
.paint-toolbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 5px 6px; background: var(--face); border-bottom: 1px solid #9a9a8a; }
.paint-tools, .paint-sizes { display: flex; gap: 3px; }
.pt-tool, .pt-size, .pt-clear { background: linear-gradient(180deg,#fdfdfd,#dcd8c8); border: 1px solid #8a8678; border-radius: 3px; cursor: pointer; font: 13px var(--sans); }
.pt-tool { width: 28px; height: 26px; display: grid; place-items: center; }
.pt-size { width: 26px; height: 26px; display: grid; place-items: center; }
.pt-size span { display: block; background: #000; border-radius: 50%; }
.pt-clear { padding: 4px 10px; }
.pt-tool.on, .pt-size.on, .pt-tool:active, .pt-size:active, .pt-clear:active { box-shadow: inset 1px 1px 3px rgba(0,0,0,.35); background: #cfd8ea; }
.pt-swatch { width: 24px; height: 24px; border: 1px solid #000; box-shadow: inset 0 0 0 1px #fff; margin-left: auto; }
.paint-palette { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px 6px; background: var(--face); border-bottom: 1px solid #9a9a8a; }
.pt-color { width: 18px; height: 18px; border: 1px solid #6a6a6a; cursor: pointer; padding: 0; }
.pt-color.on { outline: 2px solid #245edb; outline-offset: -1px; }
.paint-canvas-wrap { flex: 1 1 auto; overflow: auto; background: #808080; padding: 8px; display: flex; }
.paint-canvas { background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.5); touch-action: none; max-width: 100%; }

/* 3D Pinball */
.pin-app { display: flex; flex-direction: column; align-items: center; height: 100%; background: #06120c; }
.pin-hud { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 360px; color: #bfe; font: 700 15px Tahoma, sans-serif; padding: 5px 10px; }
.pin-balls { color: #f4b942; letter-spacing: 2px; }
.pin-canvas { touch-action: none; max-width: 100%; border-radius: 4px; }
.pin-controls { display: flex; gap: 8px; margin: 7px 0 2px; }
.pin-btn { background: linear-gradient(180deg,#3a72d6,#1f4fb0); color: #fff; border: 1px solid #163f8c; border-radius: 4px; padding: 7px 14px; font: 12px var(--sans); cursor: pointer; }
.pin-btn:active { box-shadow: inset 1px 1px 4px rgba(0,0,0,.5); }
.pin-tip { color: #9cb; font-size: 11px; margin-bottom: 6px; }

/* --------------------------------------------------------------- boot/off -- */
.boot {
  position: fixed; inset: 0; z-index: 99999; background: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; color: #fff;
}
.boot.hide { opacity: 0; pointer-events: none; transition: opacity .4s ease; }
.boot-logo { display: flex; align-items: center; gap: 16px; }
.boot-logo .ico { width: 54px; height: 54px; }
.boot-logo b { font-family: var(--sans); font-size: 38px; font-weight: 700; letter-spacing: .01em; }
.boot-logo b span { color: #ff8c00; }
.boot-logo i { display: block; font-style: normal; font-size: 13px; color: #9ab; letter-spacing: .35em; margin-top: 2px; }
.boot-bar { width: 230px; height: 16px; border: 1px solid #2a3550; border-radius: 9px; overflow: hidden; position: relative; background: #0a0f1c; }
.boot-bar::before {
  content: ""; position: absolute; top: 2px; bottom: 2px; left: -84px; width: 78px; border-radius: 7px;
  background: linear-gradient(90deg, rgba(60,200,90,0) 0%, #54e070 45%, #2aa84a 100%);
  animation: bootslide 1.15s linear infinite;
}
@keyframes bootslide { 0% { left: -84px; } 100% { left: 232px; } }

.shutdown {
  position: fixed; inset: 0; z-index: 99999; background: #1d4ea8; cursor: pointer; color: #fff;
  display: flex; align-items: center; justify-content: center; text-align: center; font-family: var(--sans);
}
.shutdown .msg { font-size: 15px; }
.shutdown .msg b { display: block; font-size: 24px; margin-bottom: 10px; }
.shutdown small { display: block; margin-top: 24px; font-size: 11px; opacity: .8; }

/* ----------------------------------------------------------- login/welcome */
.xplogin {
  position: fixed; inset: 0; z-index: 99000; color: #fff; font-family: var(--sans);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg,#143c8c 0%,#2c63c4 26%,#3f80de 50%,#2c63c4 74%,#143c8c 100%);
}
.xplogin[hidden] { display: none; }
.xplogin.hide { opacity: 0; pointer-events: none; transition: opacity .5s ease; }
.xplogin-top, .xplogin-bottom { flex: 0 0 auto; height: 78px; position: relative; }
.xplogin-top { border-bottom: 2px solid #fff; box-shadow: 0 2px 10px rgba(255,255,255,.5); }
.xplogin-bottom {
  border-top: 2px solid #fff; box-shadow: 0 -2px 10px rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: space-between; padding: 0 8% 0 6%;
}
.xplogin-mid { flex: 1 1 auto; display: flex; align-items: center; }
.xplogin-left { flex: 1 1 50%; text-align: right; padding-right: 34px; }
.xplogin-left .brand { display: inline-flex; align-items: center; gap: 12px; justify-content: flex-end; }
.xplogin-left .brand .ico { width: 46px; height: 46px; }
.xplogin-left .brand b { font-size: 30px; font-weight: 700; }
.xplogin-left .brand b span { color: #ff8c00; }
.xplogin-left p { font-size: 15px; color: #dce9ff; margin: 14px 0 0; }
.xplogin-divider { flex: 0 0 2px; align-self: stretch; margin: 12% 0; background: linear-gradient(180deg,rgba(255,255,255,0),rgba(255,255,255,.8),rgba(255,255,255,0)); }
.xplogin-right { flex: 1 1 50%; padding-left: 34px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

.user-tile {
  display: flex; align-items: center; gap: 14px; padding: 8px 16px 8px 8px;
  background: none; border: 2px solid transparent; border-radius: 6px; cursor: pointer;
  color: #fff; text-align: left; font-family: var(--sans); transition: background .12s;
}
.user-tile img { width: 56px; height: 56px; border: 2px solid #fff; border-radius: 5px; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.user-tile .ut-name { display: block; font-size: 20px; font-weight: 700; text-shadow: 1px 1px 1px rgba(0,0,0,.4); }
.user-tile .ut-title { display: block; font-size: 12px; color: #dce9ff; }
.user-tile:hover, .user-tile.hot { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.5); }

.xplogin-turnoff {
  display: inline-flex; align-items: center; gap: 9px; background: none; border: none; cursor: pointer;
  color: #fff; font-family: var(--sans); font-size: 13px;
}
.xplogin-turnoff .pwr { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(180deg,#e2563a,#b5311c); box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.xplogin-turnoff .pwr .ico { width: 18px; height: 18px; }
.xplogin-hint { font-size: 11px; color: #cfe0ff; text-align: right; margin: 0; line-height: 1.5; }

@media (max-width: 640px) {
  .xplogin-top, .xplogin-bottom { height: 56px; }
  .xplogin-mid { flex-direction: column; justify-content: center; gap: 18px; padding: 0 18px; }
  .xplogin-left { text-align: center; padding: 0; }
  .xplogin-left .brand { justify-content: center; }
  .xplogin-divider { flex: 0 0 2px; align-self: stretch; width: 70%; height: 2px; margin: 0 auto; background: linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.8),rgba(255,255,255,0)); }
  .xplogin-right { padding: 0; align-items: center; }
  .xplogin-hint { display: none; }
  .xplogin-bottom { justify-content: center; }
}

/* --------------------------------------------------------------- responsive */
@media (max-width: 760px) {
  .desktop-icon { width: 80px; }
  .xp-body { padding: 16px 16px 22px; }
  .focus-list, .caps, .cred-grid { grid-template-columns: 1fr; }
  .exp-head { flex-direction: column; gap: 2px; }
  .exp-when { text-align: left; }
  .welcome { flex-direction: column; align-items: center; text-align: center; }
  .welcome > div { width: 100%; min-width: 0; }
  .xp-body { overflow-wrap: break-word; }
  .task-button { min-width: 44px; }
  .task-button span { display: none; }
  .start-button { font-size: 16px; padding-right: 18px; }
}

/* phones: fullscreen windows, bigger tap targets, full-width stacked Start menu */
@media (max-width: 560px) {
  .desktop-icons { top: 8px; left: 6px; gap: 10px; max-height: calc(100dvh - 46px); }
  .desktop-icon { width: 82px; padding: 8px 4px 9px; }
  .desktop-icon .ico { width: 40px; height: 40px; }
  .desktop-icon span { font-size: 13px; }

  .js .xp-window.is-open { top: 0 !important; left: 0 !important; width: 100vw !important; height: calc(100dvh - var(--bar)) !important; border-radius: 0; }
  .xp-titlebar { height: 30px; flex-basis: 30px; font-size: 15px; }
  .xp-controls button { width: 30px; height: 26px; font-size: 13px; }
  .xp-controls .btn-max { display: none; }
  .xp-body { font-size: 14px; }
  .win-status { display: none; }
  .welcome img { width: 116px; height: 116px; }
  .btn-row .xp-btn { padding: 9px 16px; }

  .start-button { height: 26px; }
  .start-menu { left: 0 !important; right: 0; width: 100%; max-height: calc(100dvh - var(--bar) - 4px); overflow-y: auto; }
  .start-cols { flex-direction: column; }
  .start-col.right { border-left: none; border-top: 1px solid #aac4e8; }
  .start-item { padding: 11px 14px; font-size: 15px; }
  .start-item .ico { width: 28px; height: 28px; flex-basis: 28px; }
  /* fly-out becomes an inline expanding list on phones */
  .start-flyout { position: static; box-shadow: none; border: none; border-radius: 0; padding: 0 0 0 18px; min-width: 0; }
  .has-flyout:hover > .start-flyout { display: none; }
  .has-flyout.open > .start-flyout { display: block; }
}
