/* Mavarch Ventures 98: layered on top of 98.css */

:root {
  --teal: #008080;
  --navy: #000080;
  --silver: #c0c0c0;
  --pixel: "Pixelated MS Sans Serif", Arial, sans-serif;
  --prose: Tahoma, Verdana, "Segoe UI", sans-serif;
  --tb: calc(30px + env(safe-area-inset-bottom, 0px));
}

* { box-sizing: border-box; }
html { background: var(--desk-bg, var(--teal)); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--desk-bg, var(--teal));
  background-attachment: fixed;
  color: #000;
  font-family: var(--pixel);
  font-size: 11px;
  -webkit-font-smoothing: none;
}
::selection { background: var(--navy); color: #fff; }
[hidden] { display: none !important; }
.muted { color: #555; }
svg.ti { width: 16px; height: 16px; flex: none; vertical-align: -3px; }

/* ---------- Desktop + layout ---------- */
.desktop { min-height: 100vh; padding: 16px 16px calc(24px + var(--tb)); }

.windows {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 22px;
  max-width: 1060px;
  margin: 0 auto;
  align-items: start;
}
.win-welcome, .win-portfolio { grid-column: 1 / -1; }
.win-edge { grid-column: 1; }
.stack { grid-column: 2; }
.stack { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

.window {
  position: relative;
  transform: translate(var(--dx, 0px), var(--dy, 0px));
  min-width: 0;
}
/* nested .window elements (tab panels) must not inherit the drag offset */
.window .window { transform: none; }
.window.is-closed, .window.is-min { display: none !important; }
.window.is-max {
  position: fixed !important;
  inset: 0 0 var(--tb) 0 !important;
  z-index: 900;
  transform: none !important;
  width: auto !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
}
.window.is-max > .window-body { flex: 1; overflow: auto; }
body.has-max { overflow: hidden; }

.title-bar { touch-action: none; user-select: none; }
.title-bar-text { display: flex; align-items: center; gap: 4px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dragging, .dragging * { cursor: move !important; user-select: none; }

/* Floating windows (Recycle Bin, message boxes) */
.window.floating {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(520px, calc(100vw - 24px));
  transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px)));
  z-index: 1000;
}
.window.dialog { width: min(380px, calc(100vw - 24px)); }

/* ---------- Desktop icons ---------- */
.icons {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin: 0 -16px 14px;
  padding: 0 12px 4px;
  scrollbar-width: none;
}
.icons::-webkit-scrollbar { display: none; }

button.icon {
  all: unset;
  box-sizing: border-box;
  flex: none;
  width: 76px;
  padding: 4px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}
button.icon svg { width: 32px; height: 32px; }
button.icon span {
  color: var(--desk-ink, #fff);
  font-family: var(--pixel);
  font-size: 11px;
  text-align: center;
  padding: 1px 3px;
  line-height: 13px;
  border: 1px dotted transparent;
}
button.icon.selected svg { filter: brightness(.55) sepia(1) hue-rotate(195deg) saturate(6); }
button.icon.selected span { background: var(--navy); border-color: #ff0; }
button.icon:focus-visible span { border-color: #fff; }

/* ---------- Generic button resets used in chrome ---------- */
.menu-btn, .menu-list button {
  min-width: 0;
  min-height: 0;
  box-shadow: none;
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  font-family: var(--pixel);
  font-size: 11px;
  color: #000;
}

/* ---------- Intro document ---------- */
.doc-wrap { margin: 3px; background: #fff; box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; padding: 2px; }
.ruler {
  height: 18px;
  background:
    repeating-linear-gradient(90deg, #000 0 1px, transparent 1px 96px) 40px 10px / 100% 8px no-repeat,
    repeating-linear-gradient(90deg, #000 0 1px, transparent 1px 48px) 40px 13px / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, #808080 0 1px, transparent 1px 12px) 40px 15px / 100% 3px no-repeat,
    var(--silver);
  border-bottom: 1px solid #808080;
}
.doc { padding: 44px 40px 36px; }
.doc-fig { display: none; margin: 0; }
.doc.has-fig {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 20px 40px;
  align-items: center;
}
.doc.has-fig .doc-fig { display: block; }
.stage { position: relative; width: 100%; aspect-ratio: 5 / 6; }
.stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.doc-title {
  margin: 0 0 28px;
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 44px;
  line-height: 48px;
  letter-spacing: 0;
}
.lede { font-family: var(--prose); font-size: 14px; line-height: 1.6; color: #222; margin: 0 0 12px; max-width: 60ch; }
.win-welcome .status-bar a { color: inherit; }
.doc-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 22px 0 0; }
.doc-links button {
  min-width: 0;
  min-height: 0;
  padding: 0;
  background: none;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--prose);
  font-size: 13px;
  color: #0000ee;
  text-decoration: underline;
  cursor: pointer;
}
.doc-links button:hover { color: #ee0000; }
.doc-links button:focus { outline: 1px dotted #000; outline-offset: 2px; }

/* ---------- Explorer / Portfolio ---------- */
.menubar { display: flex; gap: 0; padding: 2px 2px 3px; border-bottom: 1px solid #808080; box-shadow: 0 1px #fff; }
.menu { position: relative; }
.menu-btn { padding: 3px 7px; }
.menu-btn:focus { outline: none; }
.menu.open .menu-btn { box-shadow: inset 1px 1px #808080, inset -1px -1px #fff; }
.menu-btn:hover { box-shadow: inset -1px -1px #808080, inset 1px 1px #fff; }
.menu-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  list-style: none;
  margin: 0;
  padding: 3px;
  min-width: 170px;
  background: var(--silver);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px grey, inset 2px 2px #fff;
}
.menu.open .menu-list { display: block; }
.menu-list button { display: block; width: 100%; padding: 4px 20px; white-space: nowrap; position: relative; }
.menu-list button:hover, .menu-list button:focus { background: var(--navy); color: #fff; outline: none; }
.menu-list button[aria-checked="true"]::before { content: "•"; position: absolute; left: 8px; font-size: 14px; line-height: 10px; top: 5px; }
.menu-list .sep { height: 0; margin: 3px 1px; border-top: 1px solid #808080; border-bottom: 1px solid #fff; }

.addressbar { display: flex; align-items: center; gap: 6px; padding: 4px 6px 2px; }
.addr-field { position: relative; flex: 1; min-width: 0; }
.addr-field svg { position: absolute; left: 4px; top: 3px; pointer-events: none; }
.addr-field input { width: 100%; padding-left: 24px !important; }
.viewtoggle { display: flex; gap: 2px; }
.viewtoggle button { min-width: 0; padding: 0 8px; }
.viewtoggle button[aria-pressed="true"] {
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
  background-image: repeating-conic-gradient(#c0c0c0 0 25%, #fff 0 50%);
  background-size: 2px 2px;
}

.explorer { margin: 4px 6px 6px; }
.pf { background: #fff; }

.pf-grid {
  list-style: none;
  margin: 0;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 6px;
}
.pf-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  padding: 14px 12px 12px;
  color: #000;
  text-decoration: none;
  border: 1px dotted transparent;
}
/* the dotted border is always reserved (transparent), so showing it never shifts the logo */
.pf-item:hover, .pf-item:focus { outline: none; border-color: #000; }
.pf-logo {
  position: relative;
  height: 64px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pf-logo img { height: var(--h, 30px); width: auto; max-width: 88%; }
.pf-logo::after {
  content: "";
  position: absolute;
  inset: 6px 10%;
  background: var(--navy);
  mix-blend-mode: screen;
  opacity: 0;
}
.pf-desc {
  margin-top: 8px;
  font-family: var(--prose);
  font-size: 12.5px;
  line-height: 1.45;
  color: #333;
  max-width: 32ch;
}
.pf-url {
  margin-top: auto;
  padding-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #00f;
  text-decoration: underline;
}
.pf-item:hover .pf-logo::after, .pf-item:focus .pf-logo::after { opacity: .55; }
.pf-item:active .pf-logo img { transform: translate(1px, 1px); }

.pf-table { display: none; width: 100%; }
.pf[data-view="details"] .pf-grid { display: none; }
.pf[data-view="details"] .pf-table { display: table; }
.pf-table td { padding: 4px 8px; vertical-align: top; }
.pf-table td:nth-child(3) { white-space: normal; min-width: 240px; font-family: var(--prose); font-size: 12px; }
.pf-table th { padding: 2px 8px; }
.pf-table tbody tr { cursor: default; }
.pf-table tbody tr.highlighted a { color: #fff; }

.status-bar-field { display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Properties ---------- */
.tabs { margin-top: 4px; }
.tabs li a { font-family: var(--pixel); }
.tabpanel { margin-top: 0; }
.tabpanel > .window-body { margin: 10px 12px 12px; min-height: 230px; }
.tab p { font-family: var(--prose); font-size: 12px; line-height: 1.5; margin: 0 0 10px; }
.gen-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.gen-icon { width: 32px; height: 32px; }
hr.etched { border: 0; border-top: 1px solid #808080; border-bottom: 1px solid #fff; margin: 10px 0; }
.props { display: grid; grid-template-columns: 70px 1fr; gap: 6px 8px; margin: 0; }
.props dd { margin: 0; }
.tab fieldset { margin: 0; padding: 10px 12px 12px; }
.checks { display: grid; gap: 4px; }
.checks input:disabled + label { color: #000; text-shadow: none; }
.checks #c4 + label { color: #808080; text-decoration: line-through; }
.tab .tree-view { font-size: 11px; }
.meter { margin-top: 10px; }
.meter .progress-indicator { height: 22px; padding: 3px; }
.dialog-buttons { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- Copy dialog ---------- */
.copy-anim {
  position: relative;
  height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 6px;
  margin-bottom: 8px;
}
.copy-folder { width: 32px; height: 32px; }
.copy-paper {
  position: absolute;
  width: 22px;
  height: 22px;
  bottom: 10px;
  left: 30px;
  animation: fly 1.1s steps(12) infinite;
}
@keyframes fly {
  0%   { left: 30px; bottom: 12px; opacity: 0; }
  10%  { opacity: 1; }
  50%  { bottom: 26px; }
  90%  { opacity: 1; }
  100% { left: calc(100% - 56px); bottom: 12px; opacity: 0; }
}
.copy-file, .copy-route { margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.copy-route { margin-bottom: 8px; }
.win-copy .progress-indicator { height: 20px; padding: 3px; }
#copyBar { width: 0; }
.copy-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.copy-foot p { margin: 0; }

/* ---------- Pitch / New Message ---------- */

/* ---------- Recycle bin + message boxes ---------- */
.bin-panel { max-height: 50vh; }
.bin-panel table { width: 100%; }
.bin-panel td { padding: 2px 8px; }
.msg { display: flex; gap: 14px; align-items: flex-start; padding: 6px 4px 2px; }
.msg svg { width: 32px; height: 32px; flex: none; }
.msg p { margin: 6px 0 0; line-height: 1.5; }
.msg + .dialog-buttons { justify-content: center; }

/* ---------- Footer ---------- */
.foot {
  max-width: 1060px;
  margin: 26px auto 0;
  display: flex;
  justify-content: flex-end;
  color: var(--desk-ink, #fff);
}

/* ---------- Shutdown ---------- */
.shutdown { position: fixed; inset: 0; z-index: 6000; }

.shutdown {
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  text-align: center;
}
.shutdown p {
  margin: 0;
  color: #fff;
  font-family: var(--pixel);
  font-weight: 700;
  font-size: clamp(22px, 5vw, 44px);
  line-height: 1.3;
}

/* ---------- Responsive ---------- */
@media (min-width: 761px) and (max-width: 1000px) {
  .doc-title { font-size: 33px; line-height: 37px; }
}

/* Desktop: a real, non-scrolling desktop. Windows float and scroll inside themselves. */
@media (min-width: 900px) and (min-height: 560px) {
  body { overflow: hidden; }
  .desktop { height: 100vh; padding: 0; }
  .windows > .window:not(.floating), .stack > .window:not(.floating) {
    position: fixed;
    left: 120px;
    top: 24px;
    margin: 0;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--tb) - 16px);
  }
  .windows .window:not(.floating) > .window-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
  .win-welcome { width: min(960px, calc(100vw - 160px)); }
  .win-portfolio { width: min(940px, calc(100vw - 150px)); height: min(640px, calc(100vh - var(--tb) - 48px)); }
  .win-portfolio .explorer { display: flex; flex-direction: column; overflow: hidden !important; }
  .win-portfolio .pf { flex: 1; min-height: 0; overflow: auto; }
  .win-edge { width: 500px; }
  .win-copy { width: 420px; }
  .win-pitch { width: min(560px, calc(100vw - 160px)); }
  .foot { position: fixed; right: 12px; bottom: calc(var(--tb) + 8px); margin: 0; }
  .icons {
    position: fixed;
    top: 14px;
    left: 10px;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 0;
    overflow: visible;
    z-index: 1;
  }
}

@media (max-width: 760px) {
  .icons { justify-content: space-between; gap: 0; padding: 0 8px 4px; }
  button.icon { width: 66px; }
  .windows { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .win-welcome, .win-portfolio, .win-edge, .stack { grid-column: auto; }
  .stack { gap: 16px; }
  .doc { padding: 28px 18px 24px; }
  .doc.has-fig { grid-template-columns: 1fr; }
  .stage { aspect-ratio: 4 / 3; max-width: 360px; margin: 0 auto; }
  .doc-title { font-size: 22px; line-height: 26px; margin-bottom: 18px; }
  .lede { font-size: 13.5px; }
  .addressbar label { display: none; }
  .viewtoggle button { padding: 0 6px; }
  .pf-grid { grid-template-columns: 1fr; padding: 4px; gap: 0; }
  .pf-item { border-bottom: 1px solid #e4e4e4; }
  .pf-grid li:last-child .pf-item { border-bottom-color: transparent; }
  .tabs { flex-wrap: wrap; }
  .status-bar-field:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .copy-paper { animation: none; left: 50%; }
}

/* read-only fields that should still look live */
.addr-field input[readonly] { background: #fff; color: #000; }

/* ---------- Minesweeper ---------- */
.window.floating.win-mines { width: auto; max-width: calc(100vw - 16px); }
.win-mines .menubar { border-bottom: 0; box-shadow: none; padding-bottom: 0; }
.menu-list .kbd { float: right; margin-left: 24px; }
.ms {
  margin: 0 3px 3px;
  padding: 6px;
  border: 3px solid;
  border-color: #fff #808080 #808080 #fff;
  overflow-x: auto;
}
.ms-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  padding: 4px 5px;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
}
.ms-led { display: flex; background: #000; padding: 1px; border: 1px solid; border-color: #808080 #fff #fff #808080; }
.ms-led svg { width: 13px; height: 23px; display: block; }
button.ms-face {
  min-width: 0;
  min-height: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  display: grid;
  place-items: center;
}
.ms-face svg { width: 18px; height: 18px; }
.ms-face:active svg { transform: translate(1px, 1px); }
.ms-board {
  --cell: 16px;
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--cell));
  width: max-content;
  border: 3px solid;
  border-color: #808080 #fff #fff #808080;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
button.ms-cell {
  min-width: 0;
  min-height: 0;
  width: var(--cell);
  height: var(--cell);
  padding: 0;
  display: grid;
  place-items: center;
  background: silver;
  box-shadow: none;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  cursor: default;
}
button.ms-cell:focus { outline: none; }
button.ms-cell svg { width: 100%; height: 100%; }
button.ms-cell.open, .ms-board:not(.over) button.ms-cell:not(.open):active {
  border: 0;
  border-left: 1px solid #808080;
  border-top: 1px solid #808080;
}
button.ms-cell.boom { background: #f00; }
.ms-board.big button.ms-cell { font-family: Arial, sans-serif; font-size: calc(var(--cell) * .6); }
.ms-cell.n1 { color: #0000ff; }
.ms-cell.n2 { color: #008000; }
.ms-cell.n3 { color: #ff0000; }
.ms-cell.n4 { color: #000080; }
.ms-cell.n5 { color: #800000; }
.ms-cell.n6 { color: #008080; }
.ms-cell.n7 { color: #000; }
.ms-cell.n8 { color: #808080; }

@media (max-width: 760px) {
  .icons { gap: 2px; padding: 0 6px 4px; }
  button.icon { flex: 1 1 0; width: auto; min-width: 0; padding: 4px 0; }
  button.icon span { hyphens: manual; padding: 1px; }
}

.window.dialog { z-index: 4000 !important; }

/* ---------- "We built this brand" ---------- */
.pf-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 1px 6px 1px 3px;
  background: #ffffe1;
  border: 1px solid #000;
  white-space: nowrap;
}
.pf-badge svg.ti { width: 12px; height: 12px; vertical-align: 0; }
.pf-badge.spacer { visibility: hidden; }
.brand-cell { white-space: nowrap; }
.brand-cell svg.ti { width: 12px; height: 12px; margin-right: 4px; vertical-align: -1px; }
.pf-table tbody tr.highlighted .brand-cell.muted { color: #fff; }

/* ---------- Taskbar ---------- */
.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5000;
  height: var(--tb);
  padding: 2px 2px calc(2px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--silver);
  box-shadow: inset 0 1px #dfdfdf, inset 0 2px #fff;
}
.taskbar button { min-height: 0; height: 24px; }
.start-btn {
  min-width: 0;
  flex: none;
  padding: 0 6px 0 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.start-btn b { font-weight: 700; }
.start-btn[aria-expanded="true"] {
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
  padding: 1px 5px 0 5px;
}
.tb-grip {
  flex: none;
  width: 3px;
  height: 22px;
  margin: 0 2px 0 3px;
  border-left: 1px solid #808080;
  box-shadow: inset 1px 0 #fff;
}
.tasks { flex: 1; min-width: 0; display: flex; gap: 3px; overflow: hidden; }
button.task {
  flex: 0 1 160px;
  min-width: 0;
  padding: 0 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  text-align: left;
}
.task span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.task.on {
  font-weight: 700;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
  background-image: repeating-conic-gradient(#c0c0c0 0 25%, #fff 0 50%);
  background-size: 2px 2px;
}
.tray {
  flex: none;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px 0 4px;
  box-shadow: inset 1px 1px #808080, inset -1px -1px #fff;
}
.clock { white-space: nowrap; }

/* ---------- Start menu ---------- */
.startmenu {
  position: fixed;
  left: 2px;
  bottom: calc(var(--tb) - 2px);
  z-index: 5001;
  display: flex;
  min-width: 210px;
  max-height: calc(100vh - var(--tb));
  padding: 3px;
  background: var(--silver);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px grey, inset 2px 2px #fff;
}
.sm-banner {
  width: 24px;
  flex: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
  background: linear-gradient(0deg, #000080, #1084d0);
}
.sm-banner span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #c0c0c0;
  font-family: Arial, sans-serif;
  font-size: 17px;
  letter-spacing: .5px;
  white-space: nowrap;
}
.sm-banner b { color: #fff; font-weight: 900; }
.sm-list { list-style: none; margin: 0; padding: 0; flex: 1; overflow-y: auto; }
.sm-list button {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 18px 4px 6px;
  font-family: var(--pixel);
  font-size: 11px;
  color: #000;
  cursor: default;
}
.sm-list button svg { width: 32px; height: 32px; flex: none; }
.sm-list button:hover, .sm-list button:focus-visible { background: var(--navy); color: #fff; }
.sm-list .sep { height: 0; margin: 3px 2px; border-top: 1px solid #808080; border-bottom: 1px solid #fff; }

@media (max-width: 600px) {
  button.task { flex: 0 0 30px; padding: 0; justify-content: center; }
  .task span { display: none; }
}

/* ---------- Resize handles (desktop only) ---------- */
.rs { position: absolute; z-index: 4; display: none; touch-action: none; }
.rs-e { top: 8px; right: -3px; bottom: 16px; width: 7px; cursor: ew-resize; }
.rs-s { left: 8px; right: 16px; bottom: -3px; height: 7px; cursor: ns-resize; }
.rs-se {
  right: 2px;
  bottom: 2px;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
  background: repeating-linear-gradient(135deg, transparent 0 3px, #fff 3px 4px, #808080 4px 6px);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.window.is-max .rs { display: none !important; }
body.resizing, body.resizing * { user-select: none; }
body.resizing-e * { cursor: ew-resize !important; }
body.resizing-s * { cursor: ns-resize !important; }
body.resizing-se * { cursor: nwse-resize !important; }
@media (min-width: 900px) and (min-height: 560px) {
  .rs { display: block; }
}

/* ---------- Desktop right-click menu ---------- */
.menu-list.ctx { display: block; position: fixed; z-index: 5002; }

/* ---------- Display Properties ---------- */
.window.floating.win-display { width: min(380px, calc(100vw - 24px)); }
.dp-monitor { display: flex; flex-direction: column; align-items: center; margin: 6px 0 14px; }
.dp-screen {
  position: relative;
  width: 184px;
  height: 124px;
  border: 10px solid;
  border-color: #dfdfdf #808080 #808080 #dfdfdf;
  outline: 1px solid #000;
  background: #008080;
  overflow: hidden;
}
.dp-stand { width: 64px; height: 12px; background: #c0c0c0; box-shadow: inset 1px 0 #fff, inset -1px -1px #808080; }
.dp-stand::after {
  content: "";
  display: block;
  width: 110px;
  height: 8px;
  margin: 12px 0 0 -23px;
  background: #c0c0c0;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #000;
}
.dp-mini {
  position: absolute;
  left: 22px;
  top: 20px;
  width: 118px;
  padding: 2px;
  background: #c0c0c0;
  box-shadow: inset -1px -1px #000, inset 1px 1px #fff;
  font-size: 9px;
}
.dp-mini-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 3px;
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-weight: 700;
}
.dp-mini-title i { width: 8px; height: 7px; background: #c0c0c0; box-shadow: inset -1px -1px #000, inset 1px 1px #fff; }
.dp-mini-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 6px 4px 5px; }
.dp-mini-btn { align-self: center; padding: 1px 12px; background: #c0c0c0; box-shadow: inset -1px -1px #000, inset 1px 1px #fff, inset -2px -2px #808080; }
.dp-screen.modern .dp-mini {
  padding: 0;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 8px 18px -8px rgba(0, 0, 0, .45);
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #111;
}
.dp-screen.modern .dp-mini-title { background: none; color: #111; font-weight: 600; padding: 5px 7px; border-bottom: 1px solid #eee; }
.dp-screen.modern .dp-mini-title i { width: 6px; height: 6px; border-radius: 50%; background: #d4d4d4; box-shadow: none; }
.dp-screen.modern .dp-mini-body { padding: 7px; color: #555; }
.dp-screen.modern .dp-mini-btn { background: #111; color: #fff; border-radius: 4px; box-shadow: none; }
.win-display .tabpanel > .window-body { min-height: 0; }
.win-display select { width: 100%; }


/* =====================================================================
   Modern shell: the same desktop, redrawn for today.
   Applied by Display Properties → Appearance → Modern.
   ===================================================================== */
.theme-modern {
  --sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pixel: var(--sans);
  --prose: var(--sans);
  --ink: #111;
  --muted-ink: #8a8a8a;
  --hair: rgba(17, 17, 17, .08);
  --tb: calc(80px + env(safe-area-inset-bottom, 0px));
}
.theme-modern body { color: var(--ink); font-size: 13px; -webkit-font-smoothing: antialiased; }
.theme-modern :where(.title-bar, .window, button, input, label, legend, option, select, table, textarea) {
  font-family: var(--sans);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}
.theme-modern ::selection { background: #111; color: #fff; }
.theme-modern * { scrollbar-width: thin; scrollbar-color: rgba(17, 17, 17, .22) transparent; }
.theme-modern .muted { color: var(--muted-ink); }

/* windows */
.theme-modern .window {
  padding: 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(17, 17, 17, .07), 0 1px 2px rgba(17, 17, 17, .05), 0 28px 56px -20px rgba(17, 17, 17, .28);
}
.theme-modern .window .window { background: transparent; border-radius: 12px; box-shadow: none; }
.theme-modern .window.is-max { border-radius: 0; }
.theme-modern .title-bar,
.theme-modern .title-bar.inactive {
  min-height: 46px;
  padding: 8px 8px 8px 16px;
  background: transparent;
  border-bottom: 1px solid var(--hair);
  border-radius: 14px 14px 0 0;
}
.theme-modern .title-bar-text { gap: 8px; color: var(--ink); font-size: 13px; font-weight: 600; letter-spacing: -.01em; }
.theme-modern .title-bar.inactive .title-bar-text { color: var(--muted-ink); }
.theme-modern .title-bar-text svg.ti { opacity: .75; }

.theme-modern .title-bar-controls { display: flex; gap: 2px; }
.theme-modern .title-bar-controls button[aria-label] {
  position: relative;
  width: 30px;
  height: 30px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 8px;
  background: transparent none;
  box-shadow: none;
  color: #444;
}
.theme-modern .title-bar-controls button[aria-label]:hover { background-color: rgba(17, 17, 17, .06); }
.theme-modern .title-bar-controls button[aria-label]:focus { outline: none; }
.theme-modern .title-bar-controls button[aria-label]:focus-visible { box-shadow: 0 0 0 2px rgba(17, 17, 17, .25); }
.theme-modern .title-bar-controls button[aria-label]::before,
.theme-modern .title-bar-controls button[aria-label]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.theme-modern .title-bar-controls button[aria-label="Minimize"]::before { width: 10px; height: 1.5px; }
.theme-modern .title-bar-controls button[aria-label="Maximize"]::before,
.theme-modern .title-bar-controls button[aria-label="Restore"]::before { width: 9px; height: 9px; background: none; border: 1.5px solid currentColor; border-radius: 2.5px; }
.theme-modern .title-bar-controls button[aria-label="Close"]::before { width: 12px; height: 1.5px; transform: translate(-50%, -50%) rotate(45deg); }
.theme-modern .title-bar-controls button[aria-label="Close"]::after { width: 12px; height: 1.5px; transform: translate(-50%, -50%) rotate(-45deg); }
.theme-modern .title-bar-controls button[aria-label="Close"]:hover { background-color: #e5484d; color: #fff; }
.theme-modern .title-bar-controls button[aria-label="Help"]::before { content: "?"; background: none; font: 600 13px/1 var(--sans); }
.theme-modern .title-bar-controls button[aria-label="Help"]::after { display: none; }

/* menus */
.theme-modern .menubar { padding: 4px 8px; border-bottom: 1px solid var(--hair); box-shadow: none; }
.theme-modern .menu-btn { padding: 6px 10px; border-radius: 7px; font-size: 13px; }
.theme-modern .menu-btn:hover,
.theme-modern .menu.open .menu-btn { background: rgba(17, 17, 17, .06); box-shadow: none; }
.theme-modern .menu-list {
  min-width: 210px;
  padding: 6px;
  background: rgba(255, 255, 255, .96);
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(17, 17, 17, .08), 0 18px 44px -14px rgba(17, 17, 17, .35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.theme-modern .menu-list button { padding: 7px 12px 7px 28px; border-radius: 7px; font-size: 13px; color: var(--ink); }
.theme-modern .menu-list button:hover,
.theme-modern .menu-list button:focus-visible { background: rgba(17, 17, 17, .06); color: var(--ink); }
.theme-modern .menu-list button:focus:not(:focus-visible):not(:hover) { background: none; color: var(--ink); }
.theme-modern .menu-list button[aria-checked="true"]::before { left: 11px; top: 8px; }
.theme-modern .menu-list .sep { margin: 5px 8px; border-top-color: var(--hair); border-bottom: 0; }
.theme-modern .menu-list .kbd { color: var(--muted-ink); }

/* fields */
.theme-modern input[type=text],
.theme-modern input[type=email],
.theme-modern input[type=url],
.theme-modern textarea,
.theme-modern select {
  height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(17, 17, 17, .12);
  border-radius: 9px;
  background-color: #fff;
  box-shadow: none;
  color: var(--ink);
  font-size: 13px;
}
.theme-modern textarea { height: auto; padding: 10px 11px; line-height: 1.5; }
.theme-modern select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%23111' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.theme-modern select[size] { height: auto; padding: 4px; background-image: none; }
.theme-modern select[size] option { padding: 7px 8px; border-radius: 6px; }
.theme-modern :is(input[type=text], input[type=email], input[type=url], textarea, select):focus {
  outline: none;
  border-color: rgba(17, 17, 17, .35);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, .08);
}
.theme-modern label { color: #444; }
.theme-modern input[type=checkbox] + label::before {
  border-radius: 4px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, .25);
}
.theme-modern :disabled + label,
.theme-modern .checks input:disabled + label { color: #333; text-shadow: none; }

/* buttons */
.theme-modern :is(.dialog-buttons, .copy-foot, .shutdown) button {
  min-width: 84px;
  min-height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(17, 17, 17, .12), 0 1px 2px rgba(17, 17, 17, .05);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-shadow: none;
}
.theme-modern :is(.dialog-buttons, .copy-foot, .shutdown) button:hover { background: #f6f6f5; }
.theme-modern :is(.dialog-buttons, .copy-foot, .shutdown) button:active { background: #efefee; box-shadow: 0 0 0 1px rgba(17, 17, 17, .14); }
.theme-modern :is(.dialog-buttons, .copy-foot, .shutdown) button.default { background: #111; color: #fff; box-shadow: none; }
.theme-modern :is(.dialog-buttons, .copy-foot, .shutdown) button.default:hover { background: #2b2b2b; }
.theme-modern :is(.dialog-buttons, .copy-foot, .shutdown) button:disabled { opacity: .4; background: #fff; }
.theme-modern :is(.dialog-buttons, .copy-foot, .shutdown) button:focus { outline: none; }
.theme-modern :is(.dialog-buttons, .copy-foot, .shutdown) button:focus-visible { outline: 2px solid rgba(17, 17, 17, .35); outline-offset: 2px; }
.theme-modern .dialog-buttons { gap: 8px; margin-top: 16px; }

/* explorer / portfolio */
.theme-modern .addressbar { gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--hair); }
.theme-modern .addressbar label { color: var(--muted-ink); }
.theme-modern .addr-field svg { left: 10px; top: 9px; opacity: .6; }
.theme-modern .addr-field input { padding-left: 32px !important; }
.theme-modern .viewtoggle { gap: 2px; padding: 3px; background: rgba(17, 17, 17, .05); border-radius: 10px; }
.theme-modern .viewtoggle button {
  height: 28px;
  min-height: 0;
  padding: 0 12px;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: #666;
  font-size: 12px;
  font-weight: 500;
}
.theme-modern .viewtoggle button[aria-pressed="true"] {
  background: #fff;
  background-image: none;
  box-shadow: 0 0 0 1px rgba(17, 17, 17, .06), 0 1px 3px rgba(17, 17, 17, .1);
  color: var(--ink);
}
.theme-modern .viewtoggle button:focus { outline: none; }
.theme-modern .explorer { margin: 0; }
.theme-modern .pf { border: 0; border-image: none; border-radius: 0 0 14px 14px; }
.theme-modern .pf-grid { gap: 12px; padding: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.theme-modern .pf-item {
  padding: 26px 20px 20px;
  border: 1px solid rgba(17, 17, 17, .07);
  border-radius: 14px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.theme-modern .pf-item:hover,
.theme-modern .pf-item:focus-visible {
  border-color: rgba(17, 17, 17, .14);
  box-shadow: 0 16px 32px -18px rgba(17, 17, 17, .35);
  transform: translateY(-2px);
}
.theme-modern .pf-logo::after { display: none; }
.theme-modern .pf-badge {
  gap: 6px;
  margin-top: 10px;
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: #f3efe8;
  color: #4d4337;
  font-size: 11px;
  font-weight: 500;
}
.theme-modern .pf-desc { margin-top: 12px; color: #555; font-size: 13px; line-height: 1.55; }
.theme-modern .pf-url { gap: 6px; padding-top: 14px; color: var(--ink); font-weight: 500; text-decoration: none; }
.theme-modern .pf-url svg.ti { opacity: .55; }
.theme-modern .pf-item:hover .pf-url { text-decoration: underline; text-underline-offset: 3px; }

/* tables */
.theme-modern table > thead > tr > * {
  height: auto;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--hair);
  box-shadow: none;
  color: var(--muted-ink);
  font-size: 12px;
  font-weight: 500;
}
.theme-modern table > tbody > tr > * { padding: 12px 14px; border-bottom: 1px solid rgba(17, 17, 17, .05); }
.theme-modern table > tbody > tr.highlighted { background: #f4f4f3; color: var(--ink); }
.theme-modern .pf-table tbody tr.highlighted a { color: var(--ink); }
.theme-modern .pf-table tbody tr.highlighted .brand-cell.muted { color: var(--muted-ink); }
.theme-modern .bin-panel { border: 0; border-image: none; }

/* status bars */
.theme-modern .status-bar { gap: 0; margin: 0; padding: 0 8px; border-top: 1px solid var(--hair); }
.theme-modern .status-bar-field { margin: 0; padding: 9px 8px; box-shadow: none; color: var(--muted-ink); font-size: 12px; }
.theme-modern .status-bar a { color: inherit; }

/* tabs, fieldsets, trees, progress */
.theme-modern menu[role=tablist] {
  display: inline-flex;
  gap: 2px;
  margin: 2px 0 14px;
  padding: 3px;
  background: rgba(17, 17, 17, .05);
  border-radius: 10px;
}
.theme-modern menu[role=tablist] > li,
.theme-modern menu[role=tablist] > li[aria-selected=true] {
  top: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 8px;
  box-shadow: none;
}
.theme-modern menu[role=tablist] > li[aria-selected=true] { background: #fff; box-shadow: 0 0 0 1px rgba(17, 17, 17, .06), 0 1px 3px rgba(17, 17, 17, .1); }
.theme-modern menu[role=tablist] > li > a { margin: 0; padding: 6px 13px; color: #666; font: 500 13px var(--sans); }
.theme-modern menu[role=tablist] > li[aria-selected=true] > a { color: var(--ink); }
.theme-modern menu[role=tablist] > li > a:focus { outline: none; }
.theme-modern .tabpanel > .window-body { margin: 0; }
.theme-modern fieldset { padding: 16px 18px 18px; border: 1px solid var(--hair); border-image: none; border-radius: 12px; }
.theme-modern legend { padding: 0 6px; background: transparent; font-weight: 600; }
.theme-modern .tab p { color: #4a4a4a; font-size: 13px; line-height: 1.6; }
.theme-modern ul.tree-view { padding: 10px 14px; background: #fafaf9; border-radius: 10px; box-shadow: none; font: 13px var(--sans); }
.theme-modern hr.etched { border-top-color: var(--hair); border-bottom: 0; }
.theme-modern .props dt { color: var(--muted-ink); }
.theme-modern .gen-icon { width: 30px; height: 30px; color: var(--ink); }
.theme-modern .progress-indicator { height: 8px !important; padding: 0 !important; background: rgba(17, 17, 17, .08); border-radius: 99px; box-shadow: none; overflow: hidden; }
.theme-modern .progress-indicator.segmented > .progress-indicator-bar { background: #111; background-image: none; border-radius: 99px; }
.theme-modern #copyBar { transition: width .35s ease; }

/* intro document */
.theme-modern .doc-wrap { margin: 0; padding: 0; border-radius: 0 0 14px 14px; box-shadow: none; }
.theme-modern .ruler { display: none; }
.theme-modern .doc { padding: 60px 60px 48px; }
.theme-modern .doc-title {
  margin-bottom: 26px;
  font-family: var(--sans);
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -.045em;
}
.theme-modern .doc.has-fig .doc-title { font-size: clamp(36px, 4.4vw, 56px); }
.theme-modern .lede { max-width: 54ch; color: #4a4a4a; font-size: 16px; line-height: 1.6; }
.theme-modern .doc-links { gap: 8px; margin-top: 30px; }
.theme-modern .doc-links button {
  height: 38px;
  padding: 0 16px;
  gap: 8px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(17, 17, 17, .12);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s;
}
.theme-modern .doc-links button:hover { background: rgba(17, 17, 17, .05); color: var(--ink); }
.theme-modern .doc-links button:first-child { background: #111; color: #fff; box-shadow: none; }
.theme-modern .doc-links button:first-child:hover { background: #2b2b2b; }

/* deploy inputs + pitch */
.theme-modern .copy-folder, .theme-modern .copy-paper { color: var(--ink); }
.theme-modern .copy-paper { animation-timing-function: cubic-bezier(.45, 0, .2, 1); }
.theme-modern .copy-file { font-weight: 600; }
.theme-modern .copy-route, .theme-modern .copy-foot p { color: var(--muted-ink); }

/* message boxes */
.theme-modern .msg { gap: 14px; padding: 8px 6px 0; }
.theme-modern .msg p { color: #333; font-size: 13px; }

/* desktop icons */
.theme-modern button.icon { width: 84px; gap: 8px; }
.theme-modern button.icon svg {
  width: 52px;
  height: 52px;
  padding: 14px;
  border-radius: 15px;
  background: rgba(255, 255, 255, .9);
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(17, 17, 17, .06), 0 8px 20px -10px rgba(17, 17, 17, .4);
  transition: transform .15s;
}
.theme-modern button.icon:hover svg { transform: translateY(-2px); }
.theme-modern button.icon span { padding: 2px 7px; border: 0; border-radius: 6px; color: var(--desk-ink, #fff); font-size: 12px; font-weight: 500; }
.theme-modern button.icon.selected svg { filter: none; box-shadow: 0 0 0 2px var(--desk-ink, #fff), 0 8px 20px -10px rgba(17, 17, 17, .4); }
.theme-modern button.icon.selected span { background: rgba(127, 127, 127, .22); }

/* dock (taskbar) */
.theme-modern .taskbar {
  left: 50%;
  right: auto;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  height: 58px;
  max-width: calc(100vw - 24px);
  padding: 8px;
  gap: 6px;
  transform: translateX(-50%);
  border-radius: 18px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 0 0 1px rgba(17, 17, 17, .08), 0 20px 44px -18px rgba(17, 17, 17, .4);
  backdrop-filter: blur(22px) saturate(1.6);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
}
.theme-modern .taskbar button { height: 42px; }
.theme-modern .start-btn,
.theme-modern .start-btn[aria-expanded="true"] {
  width: 42px;
  padding: 0;
  justify-content: center;
  border-radius: 12px;
  background: #111;
  box-shadow: none;
  color: #fff;
}
.theme-modern .start-btn[aria-expanded="true"] { background: #2b2b2b; }
.theme-modern .start-btn svg.ti { width: 18px; height: 18px; }
.theme-modern .start-btn b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.theme-modern .start-btn:focus { outline: none; }
.theme-modern .tb-grip { width: 1px; height: 26px; margin: 0 3px; border: 0; background: var(--hair); box-shadow: none; }
.theme-modern .tasks { flex: 0 1 auto; gap: 4px; }
.theme-modern button.task,
.theme-modern button.task.on {
  position: relative;
  flex: 0 0 42px;
  width: 42px;
  padding: 0;
  justify-content: center;
  border-radius: 12px;
  background: transparent;
  background-image: none;
  box-shadow: none;
  color: var(--ink);
  font-weight: 400;
}
.theme-modern button.task:hover { background: rgba(17, 17, 17, .06); }
.theme-modern button.task.on { background: rgba(17, 17, 17, .08); }
.theme-modern button.task:focus { outline: none; }
.theme-modern button.task svg.ti { width: 20px; height: 20px; }
.theme-modern .task span { display: none; }
.theme-modern button.task::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(17, 17, 17, .3);
  transform: translateX(-50%);
}
.theme-modern button.task.on::after { background: #111; }
.theme-modern .tray { height: 42px; padding: 0 10px 0 6px; box-shadow: none; }
.theme-modern .clock { color: var(--ink); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* start menu */
.theme-modern .startmenu {
  left: 50%;
  bottom: calc(var(--tb) + 2px);
  min-width: 290px;
  padding: 8px;
  transform: translateX(-50%);
  border-radius: 18px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 0 0 1px rgba(17, 17, 17, .08), 0 28px 64px -24px rgba(17, 17, 17, .5);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
}
.theme-modern .sm-banner { display: none; }
.theme-modern .sm-list button { gap: 12px; padding: 7px 10px; border-radius: 10px; color: var(--ink); font-size: 13px; font-weight: 500; }
.theme-modern .sm-list button svg { width: 36px; height: 36px; padding: 9px; border-radius: 10px; background: #f2f2f0; color: var(--ink); }
.theme-modern .sm-list button:hover,
.theme-modern .sm-list button:focus-visible { background: rgba(17, 17, 17, .05); color: var(--ink); }
.theme-modern .sm-list .sep { margin: 6px 10px; border-top-color: var(--hair); border-bottom: 0; }
.theme-modern .sm-list u { text-decoration: none; }

/* display properties preview in the modern shell */
.theme-modern .dp-screen { border: 7px solid #1d1d1f; border-radius: 10px; outline: 0; }
.theme-modern .dp-stand { width: 34px; height: 14px; background: #d9d9d9; box-shadow: none; }
.theme-modern .dp-stand::after { width: 84px; height: 5px; margin: 14px 0 0 -25px; border-radius: 3px; background: #cfcfcf; box-shadow: none; }

/* everything else */
.theme-modern .foot { color: var(--desk-ink, #fff); opacity: .65; font-size: 12px; }
.theme-modern .shutdown p { font-family: var(--sans); font-weight: 500; letter-spacing: -.02em; }
.theme-modern .rs-se { background: none; }
.theme-modern ::-webkit-scrollbar { width: 12px; height: 12px; background: transparent; }
.theme-modern ::-webkit-scrollbar-track { background: transparent; background-image: none; box-shadow: none; }
.theme-modern ::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 99px; background: rgba(17, 17, 17, .2); background-clip: padding-box; box-shadow: none; }
.theme-modern ::-webkit-scrollbar-button { display: none !important; }
.theme-modern ::-webkit-scrollbar-corner { background: transparent; }

@media (max-width: 760px) {
  .theme-modern .doc { padding: 34px 22px 28px; }
  .theme-modern .doc-title { font-size: 38px; }
  .theme-modern .lede { font-size: 15px; }
  .theme-modern .pf-grid { padding: 10px; gap: 10px; }
  .theme-modern button.icon { width: auto; }
  .theme-modern button.icon svg { width: 46px; height: 46px; padding: 12px; }
}
@media (min-width: 900px) and (min-height: 560px) {
  .theme-modern button.icon span { white-space: nowrap; }
}

/* =====================================================================
   Modern shell, layer 2: dark-purple chrome, white content, gray hierarchy,
   Windows 11 style glass taskbar, and motion.
   ===================================================================== */
.theme-modern {
  --shell: #1c1c1f;          /* title bars, taskbar, menus */
  --shell-2: #2a2a2e;
  --shell-ink: #f3f0f7;
  --shell-muted: #a1a1aa;
  --shell-line: rgba(255, 255, 255, .08);
  --glass: rgba(28, 28, 31, .74);
  --surface: #ffffff;        /* content */
  --surface-2: #f4f4f5;      /* toolbars, status bars, secondary panels */
  --surface-3: #e9e9ec;      /* pressed, hover, chips */
  --line: #e4e4e7;
  --ink: #18181b;
  --muted-ink: #71717a;
  --focus: rgba(113, 113, 122, .45);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --tb: calc(48px + env(safe-area-inset-bottom, 0px));
}
.theme-modern ::selection { background: #3f3f46; color: #fff; }

/* ---------- windows ---------- */
.theme-modern .window {
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(10, 6, 16, .55), 0 2px 6px rgba(0, 0, 0, .18), 0 28px 60px -18px rgba(0, 0, 0, .6);
}
.theme-modern .window .window { box-shadow: none; }
.theme-modern .title-bar,
.theme-modern .title-bar.inactive {
  min-height: 42px;
  padding: 6px 6px 6px 14px;
  background: var(--shell);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}
.theme-modern .title-bar.inactive { background: var(--shell-2); }
.theme-modern .title-bar-text { color: var(--shell-ink); font-weight: 600; }
.theme-modern .title-bar.inactive .title-bar-text { color: var(--shell-muted); }
.theme-modern .title-bar-text svg.ti { width: 18px; height: 18px; opacity: 1; }
.theme-modern .window.is-max .title-bar { border-radius: 0; }

/* square window controls */
.theme-modern .title-bar-controls { gap: 2px; padding: 0; }
.theme-modern .title-bar-controls button[aria-label] {
  box-sizing: border-box;
  width: 34px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, .78);
}
.theme-modern .title-bar.inactive .title-bar-controls button[aria-label] { color: var(--shell-muted); }
.theme-modern .title-bar-controls button[aria-label]:hover { background-color: rgba(255, 255, 255, .1); color: #fff; }
.theme-modern .title-bar-controls button[aria-label]:active { background-color: rgba(255, 255, 255, .16); }
.theme-modern .title-bar-controls button[aria-label="Close"]:hover { background-color: #e5484d; color: #fff; }
.theme-modern .title-bar-controls button[aria-label]::before,
.theme-modern .title-bar-controls button[aria-label]::after { opacity: 1; }
.theme-modern .title-bar-controls button[aria-label="Minimize"]::before { width: 10px; height: 1.5px; }
.theme-modern .title-bar-controls button[aria-label="Maximize"]::before,
.theme-modern .title-bar-controls button[aria-label="Restore"]::before { width: 9px; height: 9px; border-width: 1.5px; border-radius: 2px; }
.theme-modern .title-bar-controls button[aria-label="Close"]::before,
.theme-modern .title-bar-controls button[aria-label="Close"]::after { width: 12px; height: 1.5px; }
.theme-modern .title-bar-controls button[aria-label="Help"]::before { font-size: 13px; font-weight: 600; }
.theme-modern .title-bar-controls button[aria-label]:focus-visible { box-shadow: 0 0 0 2px var(--focus); }

/* gray hierarchy: chrome rows and status bars sit on --surface-2 */
.theme-modern .menubar,
.theme-modern .addressbar { background: var(--surface-2); border-bottom: 1px solid var(--line); }
.theme-modern .menubar { border-bottom: 0; }
.theme-modern .status-bar { background: var(--surface-2); border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }
.theme-modern .window.is-max .status-bar { border-radius: 0; }
.theme-modern .status-bar-field { color: var(--muted-ink); }
.theme-modern .menu-btn:hover,
.theme-modern .menu.open .menu-btn { background: var(--surface-3); }
.theme-modern input[type=text],
.theme-modern input[type=email],
.theme-modern input[type=url],
.theme-modern textarea,
.theme-modern select { border-color: var(--line); }
.theme-modern :is(input[type=text], input[type=email], input[type=url], textarea, select):focus { border-color: #8a8a93; box-shadow: 0 0 0 3px rgba(113, 113, 122, .14); }
.theme-modern .viewtoggle { background: var(--surface-3); }
.theme-modern .viewtoggle button[aria-pressed="true"] { color: var(--ink); }

/* menus and the desktop context menu: dark glass */
.theme-modern .menu-list {
  padding: 5px;
  background: rgba(34, 34, 38, .9);
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 18px 40px -12px rgba(0, 0, 0, .6);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
}
.theme-modern .menu-list button { color: var(--shell-ink); border-radius: 6px; }
.theme-modern .menu-list button:hover,
.theme-modern .menu-list button:focus-visible { background: rgba(255, 255, 255, .1); color: #fff; }
.theme-modern .menu-list button:focus:not(:focus-visible):not(:hover) { background: none; color: var(--shell-ink); }
.theme-modern .menu-list .sep { border-top-color: rgba(255, 255, 255, .1); }
.theme-modern .menu-list .kbd { color: var(--shell-muted); }

/* buttons: dark primary, white secondary */
.theme-modern :is(.dialog-buttons, .copy-foot, .shutdown, .pitch-foot) button {
  min-width: 84px;
  min-height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(0, 0, 0, .04);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-shadow: none;
  transition: background .15s, box-shadow .15s;
}
.theme-modern :is(.dialog-buttons, .copy-foot, .shutdown, .pitch-foot) button:hover { background: var(--surface-2); }
.theme-modern :is(.dialog-buttons, .copy-foot, .shutdown, .pitch-foot) button.default,
.theme-modern .doc-links button:first-child { background: var(--shell); color: #fff; box-shadow: none; }
.theme-modern :is(.dialog-buttons, .copy-foot, .shutdown, .pitch-foot) button.default:hover,
.theme-modern .doc-links button:first-child:hover { background: #2e2e33; }
.theme-modern :is(.dialog-buttons, .copy-foot, .shutdown, .pitch-foot) button:focus { outline: none; }
.theme-modern :is(.dialog-buttons, .copy-foot, .shutdown, .pitch-foot) button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.theme-modern .doc-links button { box-shadow: 0 0 0 1px var(--line); }
.theme-modern .doc-links button:not(:first-child):hover { background: var(--surface-2); color: var(--ink); }

/* content details */
.theme-modern .pf-item { border-color: var(--line); border-radius: 12px; transition: border-color .2s, background .2s; }
.theme-modern .pf-item:hover,
.theme-modern .pf-item:focus-visible { border-color: #cfcfd4; background: #fbfbfb; box-shadow: none; transform: none; }
.theme-modern .pf-item:hover .pf-url { color: var(--ink); }
.theme-modern .pf-badge { background: var(--surface-3); color: #3f3f46; }
.theme-modern menu[role=tablist] { background: var(--surface-3); }
.theme-modern menu[role=tablist] > li[aria-selected=true] > a { color: var(--ink); }
.theme-modern table > tbody > tr.highlighted { background: var(--surface-3); }
.theme-modern .progress-indicator { background: var(--surface-3); }
.theme-modern .progress-indicator.segmented > .progress-indicator-bar { background: var(--shell); }
.theme-modern ul.tree-view { background: var(--surface-2); }
.dp-screen.modern .dp-mini-title { background: #1c1c1f; color: #fff; border-bottom: 0; }
.dp-screen.modern .dp-mini-title i { width: 7px; height: 2px; border-radius: 0; background: #fff; }
.dp-screen.modern .dp-mini-btn { background: #1c1c1f; }

/* ---------- desktop icons ---------- */
.theme-modern button.icon { padding: 6px 2px; border-radius: 10px; transition: background .15s; }
.theme-modern button.icon svg {
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .4));
  transition: scale .2s var(--ease);
}
.theme-modern button.icon:hover { background: rgba(255, 255, 255, .08); }
.theme-modern button.icon:hover svg { transform: none; scale: 1.06; }
.theme-modern button.icon:active svg { scale: .96; }
.theme-modern button.icon span { color: var(--desk-ink, #fff); text-shadow: var(--desk-shadow, none); }
.theme-modern button.icon.selected { background: rgba(255, 255, 255, .14); }
.theme-modern button.icon.selected svg { box-shadow: none; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .4)); }
.theme-modern button.icon.selected span { background: none; color: #fff; }
.theme-modern .foot { opacity: .75; text-shadow: var(--desk-shadow, none); }

/* ---------- taskbar: full-width dark glass, centered apps (Windows 11 style) ---------- */
.theme-modern .taskbar {
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--tb);
  max-width: none;
  padding: 4px 12px calc(4px + env(safe-area-inset-bottom, 0px));
  gap: 4px;
  justify-content: center;
  transform: none;
  border-radius: 0;
  background: var(--glass);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
}
.theme-modern .taskbar button { height: 40px; }
.theme-modern .tb-grip { display: none; }
.theme-modern .start-btn,
.theme-modern .start-btn[aria-expanded="true"] {
  width: 40px;
  border-radius: 6px;
  background: transparent;
  color: #e4e4e7;
  transition: background .15s;
}
.theme-modern .start-btn:hover,
.theme-modern .start-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .1); }
.theme-modern .start-btn svg.ti { width: 22px; height: 22px; transition: scale .2s var(--ease); }
.theme-modern .start-btn:active svg.ti { scale: .85; }
.theme-modern .tasks { flex: 0 1 auto; gap: 4px; }
.theme-modern button.task,
.theme-modern button.task.on {
  flex: 0 0 40px;
  width: 40px;
  border-radius: 6px;
  background: transparent;
  color: var(--shell-ink);
  transition: background .15s;
}
.theme-modern button.task:hover { background: rgba(255, 255, 255, .08); }
.theme-modern button.task.on { background: rgba(255, 255, 255, .1); }
.theme-modern button.task svg.ti { width: 24px; height: 24px; transition: scale .2s var(--ease); }
.theme-modern button.task:active svg.ti { scale: .85; }
.theme-modern button.task::after {
  bottom: 1px;
  width: 6px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .45);
  transition: width .2s var(--ease), background .2s;
}
.theme-modern button.task.on::after { width: 16px; background: #e4e4e7; }
.theme-modern .tray {
  position: absolute;
  right: 8px;
  top: 4px;
  height: 40px;
  padding: 0 10px;
  border-radius: 6px;
  box-shadow: none;
}
.theme-modern .clock { color: var(--shell-ink); font-size: 12px; font-weight: 500; }

/* ---------- start menu: dark glass, pinned grid ---------- */
.theme-modern .startmenu {
  left: 50%;
  bottom: calc(var(--tb) + 10px);
  width: min(540px, calc(100vw - 16px));
  min-width: 0;
  padding: 0;
  transform: translateX(-50%);
  border-radius: 12px;
  background: rgba(34, 34, 38, .84);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 70px -20px rgba(0, 0, 0, .7);
  backdrop-filter: blur(32px) saturate(1.6);
  -webkit-backdrop-filter: blur(32px) saturate(1.6);
}
.theme-modern .sm-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 22px 22px 0;
  overflow: visible;
}
.theme-modern .sm-list::before {
  content: "Pinned";
  grid-column: 1 / -1;
  padding: 0 6px 10px;
  color: var(--shell-ink);
  font-size: 13px;
  font-weight: 600;
}
.theme-modern .sm-list .sep { display: none; }
.theme-modern .sm-list button {
  flex-direction: column;
  gap: 8px;
  padding: 12px 4px 10px;
  border-radius: 8px;
  color: var(--shell-ink);
  font-size: 12px;
  font-weight: 400;
  text-align: center;
  transition: background .15s;
}
.theme-modern .sm-list button svg { width: 36px; height: 36px; padding: 0; background: none; border-radius: 0; transition: scale .2s var(--ease); }
.theme-modern .sm-list button:hover,
.theme-modern .sm-list button:focus-visible { background: rgba(255, 255, 255, .08); color: #fff; }
.theme-modern .sm-list button:hover svg { scale: 1.08; }
/* the last item (Shut Down) becomes the footer row */
.theme-modern .sm-list li:last-child {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px -22px 0;
  padding: 10px 16px 10px 28px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: rgba(0, 0, 0, .18);
  border-radius: 0 0 12px 12px;
}
.theme-modern .sm-list li:last-child::before { content: "Mavarch Ventures"; color: var(--shell-ink); font-size: 13px; font-weight: 500; }
.theme-modern .sm-list li:last-child button { flex-direction: row; width: auto; gap: 8px; padding: 6px 12px; }
.theme-modern .sm-list li:last-child svg { width: 22px; height: 22px; }

/* ---------- minesweeper ---------- */
.theme-modern .ms { margin: 0; padding: 14px; border: 0; background: var(--surface); border-radius: 0 0 12px 12px; }
.theme-modern .ms-head { margin-bottom: 12px; padding: 8px 10px; border: 0; border-radius: 10px; background: var(--surface-2); }
.theme-modern .ms-led { padding: 4px 6px; border: 0; border-radius: 6px; background: var(--shell); }
.theme-modern .ms-led svg { width: 11px; height: 19px; }
.theme-modern .ms-led rect[fill="#f00"] { fill: #f3f0f7; }
.theme-modern .ms-led rect[fill="#400"] { fill: rgba(255, 255, 255, .07); }
.theme-modern button.ms-face {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
  transition: scale .15s var(--ease);
}
.theme-modern button.ms-face:active { scale: .92; }
.theme-modern .ms-face svg { width: 20px; height: 20px; }
.theme-modern .ms-board { gap: 2px; border: 0; }
.theme-modern button.ms-cell {
  border: 0;
  border-radius: 4px;
  background: #dcdce0;
  box-shadow: inset 0 -2px rgba(24, 24, 27, .1);
  font-family: var(--sans);
  font-weight: 700;
  transition: background .12s;
}
.theme-modern button.ms-cell:hover { background: #cfcfd4; }
.theme-modern button.ms-cell.open,
.theme-modern .ms-board:not(.over) button.ms-cell:not(.open):active { border: 0; background: #f6f6f7; box-shadow: none; }
.theme-modern button.ms-cell.boom { background: #ff6b6b; }
.theme-modern .ms-cell.n1 { color: #3b6cf6; }
.theme-modern .ms-cell.n2 { color: #1f9d55; }
.theme-modern .ms-cell.n3 { color: #e5484d; }
.theme-modern .ms-cell.n4 { color: #3a4fd0; }
.theme-modern .ms-cell.n5 { color: #b4441c; }
.theme-modern .ms-cell.n6 { color: #0e8a8a; }

/* ---------- motion ---------- */
@keyframes mv-win-in { from { opacity: 0; scale: .96; translate: 0 10px; } }
@keyframes mv-win-out { to { opacity: 0; scale: .97; translate: 0 8px; } }
@keyframes mv-win-min { to { opacity: 0; scale: .55; translate: 0 45vh; } }
@keyframes mv-pop { from { opacity: 0; scale: .97; translate: 0 6px; } }
@keyframes mv-rise { from { opacity: 0; translate: 0 14px; } }
@keyframes mv-fade { from { opacity: 0; } }
@keyframes mv-bar-in { from { translate: 0 100%; } }

@media (prefers-reduced-motion: no-preference) {
  .theme-modern .window.win-in { animation: mv-win-in .26s var(--ease); }
  .theme-modern .window.win-out { animation: mv-win-out .16s ease-in forwards; pointer-events: none; }
  .theme-modern .window.win-min { animation: mv-win-min .26s cubic-bezier(.5, 0, .9, .4) forwards; pointer-events: none; }
  .theme-modern .startmenu:not([hidden]) { animation: mv-pop .22s var(--ease); }
  .theme-modern .menu.open .menu-list,
  .theme-modern .menu-list.ctx:not([hidden]) { animation: mv-pop .14s var(--ease); }
  .theme-modern .window.dialog { animation: mv-win-in .22s var(--ease); }
  .theme-modern .taskbar { animation: mv-bar-in .4s var(--ease); }
  .theme-modern button.icon { animation: mv-rise .5s var(--ease) both; }
  .theme-modern button.icon:nth-child(2) { animation-delay: .04s; }
  .theme-modern button.icon:nth-child(3) { animation-delay: .08s; }
  .theme-modern button.icon:nth-child(4) { animation-delay: .12s; }
  .theme-modern button.icon:nth-child(5) { animation-delay: .16s; }
  .theme-modern button.icon:nth-child(6) { animation-delay: .2s; }
  .theme-modern .doc-main > * { animation: mv-rise .6s var(--ease) both; }
  .theme-modern .doc-main > :nth-child(2) { animation-delay: .08s; }
  .theme-modern .doc-main > :nth-child(3) { animation-delay: .14s; }
  .theme-modern .doc-main > :nth-child(4) { animation-delay: .2s; }
  .theme-modern .doc-fig { animation: mv-fade .8s .25s var(--ease) both; }
  .theme-modern .pf-grid li { animation: mv-rise .45s var(--ease) both; }
  .theme-modern .pf-grid li:nth-child(2) { animation-delay: .04s; }
  .theme-modern .pf-grid li:nth-child(3) { animation-delay: .08s; }
  .theme-modern .pf-grid li:nth-child(4) { animation-delay: .12s; }
  .theme-modern .pf-grid li:nth-child(5) { animation-delay: .16s; }
  .theme-modern .pf-grid li:nth-child(6) { animation-delay: .2s; }
}

@media (max-width: 600px) {
  .theme-modern .taskbar { justify-content: flex-start; padding-left: 6px; padding-right: 76px; }
  .theme-modern .tasks { flex: 1 1 auto; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .theme-modern .tasks::-webkit-scrollbar { display: none; }
  .theme-modern button.task, .theme-modern button.task.on { flex: 0 0 38px; width: 38px; }
  .theme-modern .sm-list { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 18px 14px 0; }
  .theme-modern .sm-list li:last-child { margin: 14px -14px 0; padding-left: 20px; }
}

/* ---------- Wallpaper grid (Display Properties) ---------- */
.dp-label { margin: 0 0 6px; }
.dp-swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
button.swatch {
  min-width: 0;
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  box-shadow: none;
}
button.swatch:focus { outline: none; }
.swatch-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
  background-size: cover !important;
  background-position: center !important;
}
.swatch-name { padding: 0 3px; border: 1px dotted transparent; white-space: nowrap; }
.swatch[aria-checked="true"] .swatch-name { background: var(--navy); color: #fff; }
.swatch:focus-visible .swatch-name { border-color: #000; }

.theme-modern .dp-swatches { gap: 10px; }
.theme-modern .swatch-img { border-radius: 8px; box-shadow: 0 0 0 1px var(--line); transition: box-shadow .15s; }
.theme-modern .swatch:hover .swatch-img { box-shadow: 0 0 0 1px #cfcfd4; }
.theme-modern .swatch[aria-checked="true"] .swatch-img { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--shell); }
.theme-modern .swatch-name { border: 0; font-size: 12px; color: var(--muted-ink); }
.theme-modern .swatch[aria-checked="true"] .swatch-name { background: none; color: var(--ink); font-weight: 600; }
.theme-modern .swatch:focus-visible .swatch-img { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--focus); }

/* ---------- Tray: update icon + clock button ---------- */
.tray { gap: 2px; }
button.tray-btn,
button.clock-btn {
  min-width: 0;
  min-height: 0;
  height: 20px !important;
  padding: 0 3px;
  display: grid;
  place-items: center;
  background: none;
  box-shadow: none;
}
button.clock-btn { padding: 0 4px; }
button.tray-btn:focus, button.clock-btn:focus { outline: 1px dotted #000; outline-offset: -1px; }
.theme-modern #updateBtn { display: none; }
.theme-modern button.clock-btn { height: 40px !important; padding: 0 10px; border-radius: 6px; transition: background .15s; }
.theme-modern button.clock-btn:hover,
.theme-modern button.clock-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .1); }
.theme-modern button.clock-btn:focus { outline: none; }
.theme-modern .tray { padding: 0; }

/* ---------- Clock flyout ---------- */
.flyout {
  position: fixed;
  right: 2px;
  bottom: calc(var(--tb) - 1px);
  z-index: 5001;
  width: 268px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--silver);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px grey, inset 2px 2px #fff;
}
.fly-card { padding: 6px; background: #fff; box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; }
.fly-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-weight: 700; }
.fly-link, .cal-nav button {
  min-width: 0;
  min-height: 0;
  padding: 0 4px;
  background: none;
  box-shadow: none;
  font-weight: 400;
}
.fly-link { color: #00f; text-decoration: underline; }
.cal-nav { display: flex; gap: 2px; }
.cal-nav button { width: 20px; height: 18px; padding: 0; font-size: 14px; line-height: 1; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf; background: var(--silver); }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
button.note {
  min-width: 0;
  min-height: 0;
  width: 100%;
  padding: 5px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: none;
  box-shadow: none;
  text-align: left;
}
button.note svg { width: 24px; height: 24px; flex: none; }
button.note b { display: block; margin-bottom: 2px; }
button.note:hover, button.note:focus { background: var(--navy); color: #fff; outline: none; }
.notes-empty { padding: 6px 4px; color: #808080; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; text-align: center; }
.cal-h { padding: 2px 0; color: #808080; }
.cal-d { padding: 3px 0; }
.cal-d.out { color: #a0a0a0; }
.cal-d.today { background: var(--navy); color: #fff; }
.cal-today { margin: 6px 0 0; text-align: center; color: #555; }

.theme-modern .flyout {
  right: 8px;
  bottom: calc(var(--tb) + 10px);
  width: min(340px, calc(100vw - 16px));
  padding: 10px;
  gap: 10px;
  border-radius: 12px;
  background: rgba(34, 34, 38, .86);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 70px -20px rgba(0, 0, 0, .7);
  backdrop-filter: blur(32px) saturate(1.6);
  -webkit-backdrop-filter: blur(32px) saturate(1.6);
  color: var(--shell-ink);
}
.theme-modern .fly-card { padding: 14px; border-radius: 10px; background: rgba(255, 255, 255, .05); box-shadow: none; }
.theme-modern .fly-head { margin-bottom: 10px; font-size: 13px; font-weight: 600; }
.theme-modern .fly-link { color: var(--shell-muted); text-decoration: none; font-size: 12px; }
.theme-modern .fly-link:hover { color: #fff; }
.theme-modern .cal-nav button { width: 28px; height: 28px; border-radius: 6px; background: transparent; box-shadow: none; color: var(--shell-ink); font-size: 18px; }
.theme-modern .cal-nav button:hover { background: rgba(255, 255, 255, .1); }
.theme-modern button.note { padding: 10px; gap: 12px; border-radius: 8px; color: var(--shell-ink); font-size: 12px; transition: background .15s; }
.theme-modern button.note svg { width: 32px; height: 32px; }
.theme-modern button.note b { font-size: 13px; font-weight: 600; }
.theme-modern button.note span span { color: var(--shell-muted); }
.theme-modern button.note:hover, .theme-modern button.note:focus-visible { background: rgba(255, 255, 255, .08); color: #fff; }
.theme-modern .notes-empty { color: var(--shell-muted); font-size: 12px; }
.theme-modern .cal-grid { gap: 2px; font-size: 12px; }
.theme-modern .cal-h { color: var(--shell-muted); font-weight: 600; }
.theme-modern .cal-d { display: grid; place-items: center; height: 34px; border-radius: 50%; }
.theme-modern .cal-d.out { color: rgba(255, 255, 255, .28); }
.theme-modern .cal-d.today { background: #e4e4e7; color: #1c1c1f; font-weight: 700; }
.theme-modern .cal-today { margin-top: 10px; color: var(--shell-muted); font-size: 12px; }
@media (prefers-reduced-motion: no-preference) {
  .theme-modern .flyout:not([hidden]) { animation: mv-pop .2s var(--ease); }
}

/* ---------- Update balloon (classic) ---------- */
.balloon {
  position: fixed;
  right: 10px;
  bottom: calc(var(--tb) + 12px);
  z-index: 5001;
  width: 250px;
  padding: 8px 22px 9px 10px;
  background: #ffffe1;
  border: 1px solid #000;
  border-radius: 7px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .25);
}
.balloon::after {
  content: "";
  position: absolute;
  right: 62px;
  bottom: -12px;
  border: 6px solid transparent;
  border-top: 7px solid #000;
  border-right-width: 0;
}
.balloon::before {
  content: "";
  position: absolute;
  right: 63px;
  bottom: -10px;
  z-index: 1;
  border: 5px solid transparent;
  border-top: 6px solid #ffffe1;
  border-right-width: 0;
}
button.balloon-body {
  min-width: 0;
  min-height: 0;
  width: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
}
button.balloon-body:focus { outline: 1px dotted #000; }
.balloon-body b { display: flex; align-items: center; gap: 6px; }
button.balloon-x {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 0;
  min-height: 0;
  width: 15px;
  height: 14px;
  padding: 0;
  font-size: 12px;
  line-height: 1;
}

/* installer dialog */
.installer { width: 240px; height: 18px !important; padding: 3px !important; margin: 4px 0 6px; }
.installer .progress-indicator-bar { width: 0; transition: width .15s; }
.installer-step { margin: 0; color: #555; }

/* ---------- Modern: left-aligned taskbar + start menu ---------- */
.theme-modern .taskbar { justify-content: flex-start; padding-left: 8px; }
.theme-modern .startmenu { left: 8px; transform: none; }

/* ---------- Modern minesweeper: board centered, roomier cells ---------- */
.theme-modern .ms { display: flex; flex-direction: column; align-items: center; }
.theme-modern .ms-head { align-self: stretch; }
@media (pointer: fine) {
  .theme-modern .ms-board { --cell: 22px !important; }
}
.theme-modern button.ms-cell { background: #d4d4d8; box-shadow: inset 0 -2px rgba(24, 24, 27, .14); }
.theme-modern button.ms-cell:hover { background: #c7c7cc; }
.theme-modern button.ms-cell.open,
.theme-modern .ms-board:not(.over) button.ms-cell:not(.open):active { background: #f7f7f8; }

/* ---------- refinements ---------- */
.props { grid-template-columns: 78px 1fr; }
.theme-modern .doc-links button { border-radius: 8px; }
.theme-modern .cal-grid { justify-items: center; }
.theme-modern .cal-d { width: 34px; height: 34px; }
/* phones navigate with the taskbar and Start menu instead of desktop icons */
@media (max-width: 760px) {
  .icons { display: none; }
}

/* ---------- Modern: a touch sharper ---------- */
.theme-modern .window { border-radius: 8px; }
.theme-modern .title-bar, .theme-modern .title-bar.inactive { border-radius: 8px 8px 0 0; }
.theme-modern .status-bar,
.theme-modern .doc-wrap,
.theme-modern .pf,
.theme-modern .ms { border-radius: 0 0 8px 8px; }
.theme-modern .title-bar-controls button[aria-label] { border-radius: 4px; }
.theme-modern .menu-list,
.theme-modern .startmenu,
.theme-modern .flyout { border-radius: 8px; }
.theme-modern .sm-list li:last-child { border-radius: 0 0 8px 8px; }
.theme-modern .menu-list button,
.theme-modern .menu-btn,
.theme-modern .sm-list button,
.theme-modern button.note,
.theme-modern .cal-nav button,
.theme-modern button.task,
.theme-modern button.task.on,
.theme-modern .start-btn,
.theme-modern .start-btn[aria-expanded="true"],
.theme-modern button.clock-btn { border-radius: 4px; }
.theme-modern .fly-card,
.theme-modern .pf-item,
.theme-modern fieldset { border-radius: 6px; }
.theme-modern :is(.dialog-buttons, .copy-foot, .shutdown, .pitch-foot) button,
.theme-modern .doc-links button,
.theme-modern input[type=text],
.theme-modern input[type=email],
.theme-modern input[type=url],
.theme-modern textarea,
.theme-modern select,
.theme-modern ul.tree-view,
.theme-modern .ms-head,
.theme-modern button.ms-face,
.theme-modern .swatch-img { border-radius: 6px; }
.theme-modern menu[role=tablist],
.theme-modern .viewtoggle { border-radius: 6px; }
.theme-modern menu[role=tablist] > li,
.theme-modern menu[role=tablist] > li[aria-selected=true],
.theme-modern .viewtoggle button,
.theme-modern .ms-led,
.theme-modern .pf-badge { border-radius: 4px; }
.theme-modern button.ms-cell { border-radius: 3px; }
.theme-modern button.icon { border-radius: 6px; }

/* Browse the portfolio matches the other intro buttons (outline, not filled) */
.theme-modern .doc-links button:first-child { background: transparent; color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.theme-modern .doc-links button:first-child:hover { background: var(--surface-2); color: var(--ink); }

/* ---------- New Pitch: two-tone header over the form ---------- */
.win-pitch { container-type: inline-size; }
.win-pitch > .window-body.pitch { margin: 0; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.pitch-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(90deg, #000080 0%, #1084d0 100%);
  color: #fff;
}
.pitch-head h3 { margin: 0; font-family: var(--pixel); font-size: 22px; font-weight: 700; line-height: 1.1; }
.pitch-head p { margin: 4px 0 0; font-family: var(--prose); font-size: 12px; color: #dfe7ff; }
.pitch-main { min-width: 0; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.pitch-to { display: flex; align-items: center; gap: 6px; }
.to-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 4px;
  background: #fff;
  box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
}
.pitch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.field { display: flex; flex-direction: column; align-items: stretch; gap: 3px; }
.field input { width: 100%; }
.pitch textarea { width: 100%; min-height: 110px; resize: vertical; font-family: var(--prose); font-size: 12px; }
.pitch-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
@container (max-width: 440px) {
  .pitch-grid { grid-template-columns: 1fr; }
  .pitch-head { padding: 12px 14px; }
}

.theme-modern .win-pitch > .window-body.pitch { border-radius: 0 0 8px 8px; overflow: hidden; }
.theme-modern .pitch-head {
  gap: 14px;
  padding: 20px 22px;
  background: radial-gradient(120% 140% at 0% 0%, #3a3a40 0%, transparent 55%), var(--shell);
  color: var(--shell-ink);
}
.theme-modern .pitch-head h3 { font-family: var(--sans); font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.theme-modern .pitch-head p { color: var(--shell-muted); font-size: 13px; }
.theme-modern .pitch-main { padding: 18px 22px 20px; gap: 12px; }
.theme-modern .to-chip { padding: 4px 10px 4px 6px; gap: 6px; border-radius: 6px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line); font-weight: 500; }
.theme-modern .pitch-grid { gap: 10px 12px; }
.theme-modern .field span { color: var(--muted-ink); font-size: 12px; font-weight: 500; }
.theme-modern .pitch textarea { min-height: 120px; }
.theme-modern .pitch-foot .muted { font-size: 12px; }

/* ---------- Desktop drag-to-select ---------- */
.marquee { position: fixed; z-index: 3; pointer-events: none; border: 1px dotted #fff; }
body.selecting { user-select: none; }
.theme-modern .marquee { border: 1px solid rgba(255, 255, 255, .55); border-radius: 2px; background: rgba(255, 255, 255, .12); }

/* ---------- Modern Start menu: a list, not a grid ---------- */
.theme-modern .startmenu { width: min(320px, calc(100vw - 16px)); }
.theme-modern .sm-list { display: block; padding: 10px 8px 0; }
.theme-modern .sm-list::before { display: block; padding: 6px 10px 8px; }
.theme-modern .sm-list .sep { display: block; margin: 6px 10px; border-top: 1px solid rgba(255, 255, 255, .08); border-bottom: 0; }
.theme-modern .sm-list button { flex-direction: row; gap: 12px; padding: 7px 10px; text-align: left; font-size: 13px; }
.theme-modern .sm-list button svg { width: 26px; height: 26px; }
.theme-modern .sm-list li:last-child { margin: 8px -8px 0; padding: 8px 12px 8px 18px; }
@media (max-width: 600px) {
  .theme-modern .sm-list { padding: 10px 8px 0; }
  .theme-modern .sm-list li:last-child { margin: 8px -8px 0; padding-left: 18px; }
}

/* ---------- Classic: finger-sized window controls on touch / small screens ---------- */
@media (pointer: coarse), (max-width: 760px) {
  .title-bar { padding-top: 3px; padding-bottom: 3px; }
  .title-bar-controls { display: flex; gap: 4px; }
  .title-bar-controls button[aria-label] {
    min-width: 32px;
    min-height: 28px;
    margin-left: 0;
    background-position: center;
  }
  .title-bar-controls button[aria-label="Minimize"] { background-position: center bottom 9px; }
}

/* ---------- Classic: finger-sized taskbar on touch / small screens ---------- */
@media (pointer: coarse), (max-width: 760px) {
  :root { --tb: calc(42px + env(safe-area-inset-bottom, 0px)); }
  .taskbar button { height: 34px; }
  .start-btn { padding: 0 10px 0 8px; }
  .tb-grip { height: 30px; }
  button.task { flex: 0 0 auto; min-width: 44px; padding: 0 10px; }
  button.tray-btn, button.clock-btn { height: 30px !important; min-width: 30px; }
  .tray { height: 34px; }
}
/* task buttons scroll sideways instead of getting cut off (both schemes) */
.tasks { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; }
.tasks::-webkit-scrollbar { display: none; }
@media (max-width: 600px) {
  button.task { width: 44px; min-width: 44px; padding: 0; justify-content: center; }
}

/* ---------- Phones / small screens: every window in the page flow, nothing overlaps ---------- */
@media not all and (min-width: 900px) and (min-height: 560px) {
  .window.floating:not(.dialog) {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    max-width: none;
    transform: none;
    z-index: auto !important;
    grid-column: 1 / -1;
  }
  .window.floating.win-mines { justify-self: center; max-width: 100%; }
  .title-bar-controls button[aria-label="Maximize"],
  .title-bar-controls button[aria-label="Restore"] { display: none; }
}

/* Classic Start button: pressing it keeps its size; only the contents nudge 1px */
.start-btn[aria-expanded="true"] { padding: 0 6px 0 4px; }
.start-btn[aria-expanded="true"] > * { translate: 1px 1px; }
@media (pointer: coarse), (max-width: 760px) {
  .start-btn[aria-expanded="true"] { padding: 0 10px 0 8px; }
}
.theme-modern .start-btn[aria-expanded="true"] { padding: 0; }
.theme-modern .start-btn[aria-expanded="true"] > * { translate: none; }
