:root {
  --desktop: #008080;
  --desktop-dark: #0b6b6b;
  --window: #c0c0c0;
  --window-light: #ffffff;
  --window-mid: #dfdfdf;
  --window-dark: #808080;
  --window-deep: #404040;
  --title-a: #000080;
  --title-b: #1084d0;
  --text: #111111;
  --muted: #444444;
  --button-face: #c0c0c0;
  --button-hover: #d8d8d8;
  --warm: #7a2f00;
}

:root {
  --cursor-arrow: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2716%27%20height%3D%2716%27%20shape-rendering%3D%27crispEdges%27%3E%3Crect%20width%3D%2716%27%20height%3D%2716%27%20fill%3D%27none%27/%3E%3Cpath%20d%3D%27M1%201h1v1H1zM2%202h1v1H2zM3%203h1v1H3zM4%204h1v1H4zM5%205h1v1H5zM6%206h1v1H6zM7%207h1v1H7zM8%208h1v1H8zM3%204h1v1H3zM3%205h1v1H3zM4%205h1v1H4zM4%206h1v1H4zM5%206h1v1H5zM5%207h1v1H5zM6%207h1v1H6zM6%208h1v1H6zM7%208h1v1H7zM7%209h1v1H7zM8%209h1v1H8zM4%208h1v1H4zM4%209h1v1H4zM4%2010h1v1H4zM5%2010h1v1H5zM5%2011h1v1H5zM6%2011h1v1H6zM6%2012h1v1H6zM7%2012h1v1H7z%27%20fill%3D%27%23000%27/%3E%3Cpath%20d%3D%27M2%201h1v1H2zM2%203h1v1H2zM3%202h1v1H3zM3%206h1v1H3zM4%203h1v1H4zM4%207h1v1H4zM5%204h1v1H5zM5%208h1v1H5zM6%205h1v1H6zM6%209h1v1H6zM7%206h1v1H7zM7%2010h1v1H7zM8%207h1v1H8zM8%2010h1v1H8zM5%209h1v1H5zM6%2010h1v1H6z%27%20fill%3D%27%23fff%27/%3E%3C/svg%3E") 0 0, default;
  --cursor-hand: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2716%27%20height%3D%2716%27%20shape-rendering%3D%27crispEdges%27%3E%3Crect%20width%3D%2716%27%20height%3D%2716%27%20fill%3D%27none%27/%3E%3Cpath%20d%3D%27M6%201h1v7H6zM8%202h1v6H8zM10%203h1v5h-1zM12%204h1v5h-1zM5%208h1v5H5zM6%208h7v5H6zM7%2013h5v1H7zM8%2014h3v1H8z%27%20fill%3D%27%23fff%27/%3E%3Cpath%20d%3D%27M5%201h1v7H5zM6%200h2v1H6zM8%201h2v1H8zM10%202h2v1h-2zM12%203h2v1h-2zM4%208h1v5H4zM5%207h8v1H5zM13%204h1v9h-1zM6%2013h1v1H6zM12%208h1v5h-1zM7%2014h1v1H7zM11%2014h1v1h-1zM8%2015h3v1H8z%27%20fill%3D%27%23000%27/%3E%3C/svg%3E") 5 0, pointer;
  --cursor-text: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2716%27%20height%3D%2716%27%20shape-rendering%3D%27crispEdges%27%3E%3Crect%20width%3D%2716%27%20height%3D%2716%27%20fill%3D%27none%27/%3E%3Cpath%20d%3D%27M6%201h4v1H6zM7%202h2v12H7zM6%2014h4v1H6z%27%20fill%3D%27%23000%27/%3E%3C/svg%3E") 8 8, text;
}

html, body {
  cursor: var(--cursor-arrow);
}

a, button, .desktop-icon, .task-button, .title-button, .icon, summary, label[for], [role="button"], .start-btn, .task-btn, .win-button, .btn, .about-trigger {
  cursor: var(--cursor-hand);
}

input, textarea, [contenteditable="true"] {
  cursor: var(--cursor-text);
}
* { box-sizing: border-box; }
html { background: var(--desktop); }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(255,255,255,.05), rgba(0,0,0,.08)),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(180deg, var(--desktop) 0%, var(--desktop-dark) 100%);
  background-size: auto, 24px 24px, 24px 24px, auto;
  padding-bottom: 38px;
}
.desktop-icons { position: fixed; top: 12px; left: 10px; display: grid; gap: 12px; z-index: 1; }
.desktop-icon { width: 78px; text-decoration: none; color: #fff; text-align: center; font-size: 12px; text-shadow: 1px 1px 0 #000; }
.icon-art { display:block; font-size: 28px; margin-bottom: 4px; }



.window {
  width: min(980px, calc(100vw - 130px));
  margin: 0 auto;
  background: var(--window);
  border-top: 2px solid var(--window-light);
  border-left: 2px solid var(--window-light);
  border-right: 2px solid var(--window-darker);
  border-bottom: 2px solid var(--window-darker);
  box-shadow: 2px 2px 0 rgba(0,0,0,0.28);
}

.title-bar {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 0 8px;
  background: linear-gradient(90deg, var(--title), var(--title-2));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.title-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.title-icon { font-size: 14px; }
.title-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.title-buttons {
  display: flex;
  gap: 2px;
}

.title-btn,
.start-btn,
.win-button,
.task-btn {
  font: inherit;
  background: var(--window);
  color: var(--text);
  text-decoration: none;
  border: none;
  border-top: 2px solid var(--window-light);
  border-left: 2px solid var(--window-light);
  border-right: 2px solid var(--window-darker);
  border-bottom: 2px solid var(--window-darker);
}

.title-btn {
  width: 22px;
  height: 20px;
  display: grid;
  place-items: center;
  line-height: 1;
  font-size: 12px;
  background: var(--window-mid);
}

.window-body {
  padding: 18px;
  background: var(--window);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.9fr;
  gap: 16px;
}

.sunken-panel {
  background: var(--window-mid);
  border-top: 2px solid var(--window-darker);
  border-left: 2px solid var(--window-darker);
  border-right: 2px solid var(--window-light);
  border-bottom: 2px solid var(--window-light);
}

.intro-panel,
.panel-card {
  padding: 14px;
}

.section-head {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.05;
}

p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
}

.side-panels {
  display: grid;
  gap: 14px;
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.win-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  text-decoration: none;
  color: #000;
  background: var(--window);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: 1px 1px 0 #808080;
  font: inherit;
  cursor: pointer;
}


.win-button.primary {
  font-weight: 700;
}

.win-button:active,
.start-btn:active,
.task-btn:active {
  border-top-color: var(--window-darker);
  border-left-color: var(--window-darker);
  border-right-color: var(--window-light);
  border-bottom-color: var(--window-light);
}


.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34px;
  background: var(--window);
  border-top: 2px solid var(--window-light);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  z-index: 30;
}

.start-btn,
.task-btn {
  min-height: 26px;
  padding: 0 12px;
  text-decoration: none;
  color: #000;
  background: var(--button-face);
  border-top: 2px solid var(--window-light);
  border-left: 2px solid var(--window-light);
  border-right: 2px solid var(--window-deep);
  border-bottom: 2px solid var(--window-deep);
  font: inherit;
  display: inline-flex;
  align-items: center;
}

.start-btn { font-weight: 700; }

.task-btn.active {
  box-shadow: inset 1px 1px 0 var(--window-dark);
  border-top-color: var(--window-deep);
  border-left-color: var(--window-deep);
  border-right-color: var(--window-light);
  border-bottom-color: var(--window-light);
}

.taskbar-clock {
  margin-left: auto;
  min-width: 64px;
  text-align: center;
  padding: 4px 8px;
  background: #dfdfdf;
  border-top: 2px solid var(--window-deep);
  border-left: 2px solid var(--window-deep);
  border-right: 2px solid var(--window-light);
  border-bottom: 2px solid var(--window-light);
  font-size: 12px;
}



@media (max-width: 920px) {
  .desktop-shell {
    padding-left: 18px;
    padding-right: 18px;
  }

  .window {
    width: min(980px, calc(100vw - 36px));
    margin-top: 72px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .desktop-icons {
    position: static;
    flex-direction: row;
    justify-content: center;
    padding: 16px 12px 0;
  }

  .desktop-shell {
    padding-top: 14px;
  }

  .window {
    margin-top: 18px;
    width: calc(100vw - 20px);
  }

  h1 { font-size: 26px; }
  .button-row { flex-direction: column; }
  .win-button { width: 100%; }
  .task-btn { min-width: 0; width: 100%; }
  .taskbar-clock { min-width: 58px; font-size: 12px; }
}


.win-button:hover,
.start-btn:hover,
.task-btn:hover {
  background: #d8d8d8;
}

.win-button:active,
.start-btn:active,
.task-btn:active {
  border-top-color: #404040;
  border-left-color: #404040;
  border-right-color: #fff;
  border-bottom-color: #fff;
  box-shadow: none;
}

.taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34px;
  background: var(--window);
  border-top: 2px solid var(--window-light);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  z-index: 30;
}

.start-btn,
.task-btn {
  min-height: 26px;
  padding: 0 12px;
  text-decoration: none;
  color: #000;
  background: var(--button-face);
  border-top: 2px solid var(--window-light);
  border-left: 2px solid var(--window-light);
  border-right: 2px solid var(--window-deep);
  border-bottom: 2px solid var(--window-deep);
  font: inherit;
  display: inline-flex;
  align-items: center;
}

.start-btn { font-weight: 700; }

.task-btn.active {
  box-shadow: inset 1px 1px 0 var(--window-dark);
  border-top-color: var(--window-deep);
  border-left-color: var(--window-deep);
  border-right-color: var(--window-light);
  border-bottom-color: var(--window-light);
}

.taskbar-clock {
  margin-left: auto;
  min-width: 64px;
  text-align: center;
  padding: 4px 8px;
  background: #dfdfdf;
  border-top: 2px solid var(--window-deep);
  border-left: 2px solid var(--window-deep);
  border-right: 2px solid var(--window-light);
  border-bottom: 2px solid var(--window-light);
  font-size: 12px;
}

/* blog-uniform-fix */
html {
  background: var(--desktop) !important;
}

body {
  background:
    linear-gradient(rgba(255,255,255,.05), rgba(0,0,0,.08)),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(180deg, var(--desktop) 0%, var(--desktop-dark) 100%) !important;
  background-size: auto, 24px 24px, 24px 24px, auto !important;
  padding-bottom: 38px !important;
}

.desktop-icons {
  position: fixed !important;
  top: 12px !important;
  left: 10px !important;
  display: grid !important;
  gap: 12px !important;
  z-index: 1 !important;
}

.desktop-icon {
  width: 78px !important;
  text-decoration: none !important;
  color: #fff !important;
  text-align: center !important;
  font-size: 12px !important;
  text-shadow: 1px 1px 0 #000 !important;
}

.icon-art {
  display: block !important;
  font-size: 28px !important;
  margin-bottom: 4px !important;
}

.taskbar {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: 34px !important;
  background: var(--window) !important;
  border-top: 2px solid var(--window-light) !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 6px !important;
  z-index: 30 !important;
}

.start-btn,
.task-btn {
  min-height: 26px !important;
  height: 26px !important;
  line-height: 1 !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  text-decoration: none !important;
  color: #000 !important;
  background: var(--button-face) !important;
  border-top: 2px solid var(--window-light) !important;
  border-left: 2px solid var(--window-light) !important;
  border-right: 2px solid var(--window-deep) !important;
  border-bottom: 2px solid var(--window-deep) !important;
  font-family: Tahoma, "MS Sans Serif", Arial, sans-serif !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
}

.start-btn {
  min-width: 74px !important;
  font-weight: 700 !important;
}

.task-btn {
  min-width: 128px !important;
}

.task-btn.active {
  box-shadow: inset 1px 1px 0 var(--window-dark) !important;
  border-top-color: var(--window-deep) !important;
  border-left-color: var(--window-deep) !important;
  border-right-color: var(--window-light) !important;
  border-bottom-color: var(--window-light) !important;
}

.taskbar-clock {
  margin-left: auto !important;
  min-width: 64px !important;
  height: 26px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 8px !important;
  background: #dfdfdf !important;
  border-top: 2px solid var(--window-deep) !important;
  border-left: 2px solid var(--window-deep) !important;
  border-right: 2px solid var(--window-light) !important;
  border-bottom: 2px solid var(--window-light) !important;
  font-size: 12px !important;
}


/* persistent shell embedded mode */
body.embedded {
  padding-bottom: 0 !important;
}
body.embedded .desktop-icons,
body.embedded .taskbar,
body.embedded .start-menu,
body.embedded .shell-status {
  display: none !important;
}
body.embedded .window-shell,
body.embedded .blog-shell,
body.embedded .editor-shell,
body.embedded .container,
body.embedded .desktop-shell {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.embedded .inside-window {
  min-height: calc(100vh - 36px);
}


/* persistent shell polish */
.desktop-shell { padding: 14px 14px 0; }
.main-window.shell-window { width: min(1180px, calc(100vw - 120px)); }
.desktop-iframe { display:block; width:100%; height:min(78vh, 860px); border:0; background:#c0c0c0; }
.shell-status {
  height: 20px;
  display:flex;
  align-items:center;
  padding: 0 8px;
  background:#c0c0c0;
  border-top: 1px solid #fff;
  color:#333;
  font-size: 12px;
}
.start-menu {
  position: absolute;
  left: 6px;
  bottom: 38px;
  width: 320px;
  display: grid;
  grid-template-columns: 42px 1fr;
  background: #c0c0c0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: 2px 2px 0 rgba(0,0,0,.25);
  z-index: 40;
}
.start-menu[hidden] { display:none !important; }
.start-menu-banner {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  background: linear-gradient(180deg, #000080, #1084d0);
  color: #fff;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 8px 0;
  text-align: center;
  font-size: 13px;
}
.start-menu-window { padding: 8px; display:grid; gap:10px; }
.start-menu-title { font-size: 12px; font-weight:700; margin-bottom: 6px; color:#222; }
.start-menu-section {
  background: #c0c0c0;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
  padding: 8px;
}
.start-slider-row { display:grid; grid-template-columns: 82px 1fr 42px; gap:8px; align-items:center; font-size:12px; margin-bottom:8px; }
.start-slider-row:last-child { margin-bottom:0; }
.start-slider-row input[type="range"] { width: 100%; }
.start-link, .start-action {
  display:flex; align-items:center; gap:8px;
  min-height: 28px;
  padding: 0 8px;
  text-decoration:none;
  color:#000;
  background:#c0c0c0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  font-size: 12px;
}
.start-link + .start-link, .start-action + .start-link, .start-link + .start-action, .start-action + .start-action { margin-top: 6px; }
.start-link:active, .start-action:active {
  border-top-color:#404040;
  border-left-color:#404040;
  border-right-color:#fff;
  border-bottom-color:#fff;
}
.start-footer { display:grid; gap:6px; }
@media (max-width: 800px) {
  .main-window.shell-window { width: calc(100vw - 20px); }
  .desktop-iframe { height: calc(100vh - 110px); }
  .start-menu { width: min(320px, calc(100vw - 12px)); }
}



/* shell-iframe cleanup */
.main-window.shell-window {
  width: min(1120px, calc(100vw - 190px)) !important;
}

.desktop-shell-frame-wrap {
  padding-left: 88px !important;
  padding-right: 18px !important;
}

.shell-status {
  display: none !important;
}

.desktop-iframe {
  display: block;
  width: 100%;
  height: min(80vh, 860px);
  border: 0;
  background: #c0c0c0;
}

body.embedded,
body[data-app] {
  background: #c0c0c0;
}

body.embedded {
  padding-bottom: 0 !important;
}

body.embedded .desktop-icons,
body.embedded .taskbar,
body.embedded .start-menu,
body.embedded .shell-status {
  display: none !important;
}

body.embedded .title-bar,
body.embedded .win-titlebar,
body.embedded .game-titlebar,
body.embedded .title-buttons,
body.embedded .title-btn,
body.embedded .win-btn {
  display: none !important;
}

body.embedded .window,
body.embedded .window-shell,
body.embedded .blog-shell,
body.embedded .editor-shell,
body.embedded .container,
body.embedded .desktop-shell,
body.embedded .inside-window {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  box-shadow: none !important;
}

body.embedded .window,
body.embedded .window-shell,
body.embedded .blog-shell,
body.embedded .editor-shell,
body.embedded .container {
  border: 0 !important;
  background: #c0c0c0 !important;
}

body.embedded .window-body,
body.embedded .inside-window {
  padding: 14px !important;
  min-height: auto !important;
  background: #c0c0c0 !important;
}

body.embedded .desktop-shell {
  padding: 0 !important;
}

body.embedded .hero,
body.embedded .blog-header,
body.embedded .editor-header,
body.embedded .panel,
body.embedded .panel-box,
body.embedded .card,
body.embedded .quick-card,
body.embedded .notice {
  box-shadow: none !important;
}

@media (max-width: 1100px) {
  .main-window.shell-window {
    width: calc(100vw - 150px) !important;
  }
}

@media (max-width: 800px) {
  .desktop-shell-frame-wrap {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .main-window.shell-window {
    width: calc(100vw - 24px) !important;
  }
}



/* stronger embedded shell-home fix */
.desktop-shell-frame-wrap {
  padding-left: 108px !important;
  padding-right: 18px !important;
}

.main-window.shell-window {
  width: min(1100px, calc(100vw - 220px)) !important;
}

html.embedded-shell-app,
html.embedded-shell-app body,
html.embedded-shell-app body.embedded {
  background: #c0c0c0 !important;
  background-image: none !important;
}

html.embedded-shell-app body.embedded .desktop-shell,
html.embedded-shell-app body.embedded .window-body,
html.embedded-shell-app body.embedded .intro-panel,
html.embedded-shell-app body.embedded .side-panels,
html.embedded-shell-app body.embedded .sunken-panel,
html.embedded-shell-app body.embedded .panel-card {
  background: #c0c0c0 !important;
  background-image: none !important;
}

html.embedded-shell-app body.embedded .desktop-shell {
  min-height: 100vh !important;
  padding: 14px !important;
}

html.embedded-shell-app body.embedded .main-window {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

html.embedded-shell-app body.embedded .window-body {
  min-height: calc(100vh - 28px) !important;
}

@media (max-width: 1100px) {
  .desktop-shell-frame-wrap {
    padding-left: 96px !important;
  }
  .main-window.shell-window {
    width: calc(100vw - 200px) !important;
  }
}



/* no outer scroll shell fit */
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden !important;
}

body {
  min-height: 100vh;
}

.desktop-shell-frame-wrap {
  position: fixed !important;
  inset: 20px 18px 38px 96px !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.main-window.shell-window {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.desktop-iframe {
  flex: 1 1 auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: auto !important;
  display: block !important;
}

@media (max-width: 800px) {
  .desktop-shell-frame-wrap {
    inset: 10px 10px 38px 10px !important;
  }
}



/* shell fit + iframe internal scroll */
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden !important;
}

.desktop-shell-frame-wrap {
  position: fixed !important;
  inset: 20px 18px 38px 118px !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.main-window.shell-window {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.desktop-iframe {
  flex: 1 1 auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  display: block !important;
  border: 0 !important;
  background: #c0c0c0 !important;
}

html.embedded-shell-app,
html.embedded-shell-app body,
html.embedded-shell-app body.embedded {
  background: #c0c0c0 !important;
  background-image: none !important;
  overflow: auto !important;
  height: auto !important;
  min-height: 100% !important;
}

html.embedded-shell-app body.embedded .desktop-icons,
html.embedded-shell-app body.embedded .taskbar,
html.embedded-shell-app body.embedded .start-menu,
html.embedded-shell-app body.embedded .shell-status,
html.embedded-shell-app body.embedded .title-bar,
html.embedded-shell-app body.embedded .win-titlebar,
html.embedded-shell-app body.embedded .game-titlebar,
html.embedded-shell-app body.embedded .title-buttons,
html.embedded-shell-app body.embedded .title-btn,
html.embedded-shell-app body.embedded .win-btn {
  display: none !important;
}

html.embedded-shell-app body.embedded .window,
html.embedded-shell-app body.embedded .window-shell,
html.embedded-shell-app body.embedded .blog-shell,
html.embedded-shell-app body.embedded .editor-shell,
html.embedded-shell-app body.embedded .container,
html.embedded-shell-app body.embedded .desktop-shell,
html.embedded-shell-app body.embedded .inside-window {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: #c0c0c0 !important;
}

html.embedded-shell-app body.embedded .window-body,
html.embedded-shell-app body.embedded .inside-window {
  padding: 14px !important;
  background: #c0c0c0 !important;
  min-height: auto !important;
}

@media (max-width: 900px) {
  .desktop-shell-frame-wrap { inset: 10px 10px 38px 10px !important; }
}



/* shell window close/open animation */
.title-btn-close {
  appearance: none;
  padding: 0;
  font-family: inherit;
  cursor: var(--cursor-hand);
}
.desktop-window {
  transform-origin: top left;
  will-change: transform, opacity;
}
.desktop-window.is-closing {
  animation: win98Close 200ms steps(10, end) forwards;
}
.desktop-window.is-opening {
  animation: win98Open 220ms steps(12, end) forwards;
}
.desktop-window.is-closed {
  opacity: 0;
  transform: scale(0.12);
  pointer-events: none;
}
@keyframes win98Close {
  0% { opacity: 1; transform: scale(1); filter: brightness(1); }
  60% { opacity: 1; transform: scale(0.78); filter: brightness(1.02); }
  100% { opacity: 0; transform: scale(0.12); filter: brightness(0.92); }
}
@keyframes win98Open {
  0% { opacity: 0; transform: scale(0.12); filter: brightness(0.92); }
  55% { opacity: 1; transform: scale(0.86); filter: brightness(1.03); }
  100% { opacity: 1; transform: scale(1); filter: brightness(1); }
}



/* V4 desktop polish */
.desktop-icons {
  grid-auto-rows: min-content;
}
.desktop-icon {
  background: transparent;
  border: 0;
  font: inherit;
  padding: 0;
}
.utility-icon {
  appearance: none;
}
.desktop-context-menu {
  position: fixed;
  z-index: 90;
  width: 176px;
  background: var(--window);
  border-top: 2px solid var(--window-light);
  border-left: 2px solid var(--window-light);
  border-right: 2px solid var(--window-deep);
  border-bottom: 2px solid var(--window-deep);
  box-shadow: 2px 2px 0 rgba(0,0,0,.25);
  padding: 4px;
}
.desktop-context-menu[hidden] {
  display: none !important;
}
.context-item {
  width: 100%;
  min-height: 28px;
  text-align: left;
  background: var(--button-face);
  border: 0;
  padding: 0 8px;
  font: inherit;
  cursor: var(--cursor-hand);
}
.context-item:hover {
  background: #000080;
  color: #fff;
}
.system-window {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.18);
}
.system-window[hidden] {
  display: none !important;
}
.system-window-panel {
  width: min(420px, calc(100vw - 24px));
  background: var(--window);
  border-top: 2px solid var(--window-light);
  border-left: 2px solid var(--window-light);
  border-right: 2px solid var(--window-deep);
  border-bottom: 2px solid var(--window-deep);
  box-shadow: 2px 2px 0 rgba(0,0,0,.3);
}
.system-window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  background: linear-gradient(90deg, var(--title-a), var(--title-b));
  color: #fff;
  font-weight: 700;
}
.system-window-body {
  padding: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #111;
}
.system-window-actions {
  padding: 0 14px 14px;
  display: flex;
  justify-content: flex-end;
}
.selection-rect {
  position: fixed;
  z-index: 50;
  border: 1px dotted #fff;
  background: rgba(0,0,128,.18);
  pointer-events: none;
}
.start-menu-title.with-divider {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid #808080;
}
@media (max-width: 900px) {
  .desktop-icons {
    grid-template-columns: repeat(3, 78px);
    grid-auto-flow: row;
  }
}



/* V5 browser chrome + game launcher */
.browser-chrome {
  flex: 0 0 auto;
  background: var(--window);
  border-top: 2px solid var(--window-light);
  border-bottom: 2px solid var(--window-dark);
}
.browser-toolbar {
  display: grid;
  grid-template-columns: 28px 28px 28px 28px 1fr;
  gap: 6px;
  align-items: center;
  padding: 6px;
  background: var(--window-mid);
}
.browser-btn {
  min-width: 28px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--button-face);
  border-top: 2px solid var(--window-light);
  border-left: 2px solid var(--window-light);
  border-right: 2px solid var(--window-deep);
  border-bottom: 2px solid var(--window-deep);
  font: inherit;
  cursor: var(--cursor-hand);
}
.browser-address-wrap {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 6px;
  align-items: center;
}
.browser-label { font-size: 12px; }
.browser-address {
  width: 100%;
  min-width: 0;
  height: 26px;
  padding: 0 8px;
  background: #fff;
  border-top: 2px solid var(--window-deep);
  border-left: 2px solid var(--window-deep);
  border-right: 2px solid var(--window-light);
  border-bottom: 2px solid var(--window-light);
  font: inherit;
}
.browser-statusbar {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 6px;
  padding: 4px 6px;
  background: var(--window);
  font-size: 12px;
}
.browser-status-left,
.browser-status-right {
  min-height: 22px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  background: #dfdfdf;
  border-top: 2px solid var(--window-deep);
  border-left: 2px solid var(--window-deep);
  border-right: 2px solid var(--window-light);
  border-bottom: 2px solid var(--window-light);
}
.game-launcher {
  position: fixed;
  inset: 0;
  z-index: 96;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.2);
}
.game-launcher[hidden] { display:none !important; }
.game-launcher-panel {
  width: min(520px, calc(100vw - 24px));
  background: var(--window);
  border-top: 2px solid var(--window-light);
  border-left: 2px solid var(--window-light);
  border-right: 2px solid var(--window-deep);
  border-bottom: 2px solid var(--window-deep);
  box-shadow: 2px 2px 0 rgba(0,0,0,.3);
}
.game-launcher-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  background: linear-gradient(90deg, var(--title-a), var(--title-b));
  color: #fff;
  font-weight: 700;
}
.game-launcher-body {
  padding: 14px;
  font-size: 13px;
  line-height: 1.5;
}
.launcher-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.launcher-card {
  padding: 12px;
  background: var(--window-mid);
  border-top: 2px solid var(--window-light);
  border-left: 2px solid var(--window-light);
  border-right: 2px solid var(--window-dark);
  border-bottom: 2px solid var(--window-dark);
}
.launcher-card h4 {
  margin: 0 0 6px;
  font-size: 14px;
}
.launcher-actions {
  padding: 0 14px 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
@media (max-width: 900px) {
  .browser-toolbar { grid-template-columns: repeat(4, 28px) 1fr; }
  .browser-statusbar { grid-template-columns: 1fr; }
  .launcher-grid { grid-template-columns: 1fr; }
}



/* Fishing98 icon + splash */
.desktop-icon-image .desktop-app-icon {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  image-rendering: pixelated;
  margin: 0 auto 4px;
}

.game-launcher-body.with-splash {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: start;
}

.game-launcher-splash {
  width: 120px;
  height: 120px;
  object-fit: contain;
  image-rendering: pixelated;
  background: #000080;
  border-top: 2px solid var(--window-deep);
  border-left: 2px solid var(--window-deep);
  border-right: 2px solid var(--window-light);
  border-bottom: 2px solid var(--window-light);
  padding: 6px;
}

.game-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 97;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.26);
}

.game-loading-overlay[hidden] {
  display: none !important;
}

.game-loading-panel {
  width: min(420px, calc(100vw - 24px));
  background: var(--window);
  border-top: 2px solid var(--window-light);
  border-left: 2px solid var(--window-light);
  border-right: 2px solid var(--window-deep);
  border-bottom: 2px solid var(--window-deep);
  box-shadow: 2px 2px 0 rgba(0,0,0,.3);
}

.game-loading-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: linear-gradient(90deg, var(--title-a), var(--title-b));
  color: #fff;
  font-weight: 700;
}

.game-loading-body {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  padding: 14px;
  align-items: center;
}

.game-loading-art {
  width: 96px;
  height: 96px;
  object-fit: contain;
  image-rendering: pixelated;
  background: #000080;
  border-top: 2px solid var(--window-deep);
  border-left: 2px solid var(--window-deep);
  border-right: 2px solid var(--window-light);
  border-bottom: 2px solid var(--window-light);
  padding: 6px;
}

.game-loading-copy strong {
  display: block;
  margin-bottom: 6px;
}

.game-loading-progress {
  height: 18px;
  margin-top: 10px;
  background: #111;
  border-top: 2px solid var(--window-deep);
  border-left: 2px solid var(--window-deep);
  border-right: 2px solid var(--window-light);
  border-bottom: 2px solid var(--window-light);
  overflow: hidden;
}

.game-loading-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #000080, #1084d0);
  transition: width 120ms linear;
}

@media (max-width: 900px) {
  .game-launcher-body.with-splash,
  .game-loading-body {
    grid-template-columns: 1fr;
  }

  .game-launcher-splash,
  .game-loading-art {
    margin: 0 auto;
  }
}



/* black Fishing98 loading screen */
.game-loading-overlay.black-loader {
  background: #000;
}

.game-loading-overlay.black-loader .game-loading-panel {
  width: min(520px, calc(100vw - 24px));
  background: #000;
  color: #d8d8d8;
  border: 2px solid #5a5a5a;
  box-shadow: 0 0 0 1px #bcbcbc inset;
}

.game-loading-overlay.black-loader .game-loading-titlebar {
  background: #000;
  color: #d8d8d8;
  border-bottom: 1px solid #333;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.game-loading-overlay.black-loader .game-loading-body {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  padding: 18px 18px 20px;
}

.game-loading-overlay.black-loader .game-loading-art {
  width: 180px;
  height: 180px;
  background: transparent;
  border: 0;
  padding: 0;
  image-rendering: pixelated;
  margin-bottom: 6px;
}

.game-loading-overlay.black-loader .game-loading-copy {
  width: 100%;
  max-width: 340px;
}

.game-loading-overlay.black-loader .game-loading-copy strong {
  font-size: 18px;
  margin-bottom: 8px;
  color: #fff;
}

.game-loading-overlay.black-loader .game-loading-progress {
  height: 16px;
  margin-top: 14px;
  background: #101010;
  border: 1px solid #666;
  box-shadow: 0 0 0 1px #1d1d1d inset;
}

.game-loading-overlay.black-loader .game-loading-progress-bar {
  background: linear-gradient(90deg, #1f4cff, #69a7ff);
}

.game-loading-overlay.black-loader .game-loading-subtext {
  margin-top: 10px;
  font-size: 12px;
  color: #a8a8a8;
  letter-spacing: 0.02em;
}



/* Fishing98 intro sequence */
.f98-sequence-overlay {
  position: fixed;
  inset: 0;
  z-index: 98;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #d8d8d8;
}

.f98-sequence-panel {
  width: min(560px, calc(100vw - 24px));
  background: #000;
  border: 2px solid #5a5a5a;
  box-shadow: 0 0 0 1px #bcbcbc inset;
}

.f98-sequence-titlebar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border-bottom: 1px solid #333;
  color: #d8d8d8;
  font-weight: 700;
  letter-spacing: .03em;
}

.f98-sequence-body {
  padding: 20px 18px 22px;
  text-align: center;
}

.f98-sequence-stage {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.f98-sequence-logo {
  width: 180px;
  height: 180px;
  object-fit: contain;
  image-rendering: pixelated;
  margin-bottom: 14px;
}

.f98-sequence-big {
  font-size: 30px;
  color: #fff;
  margin-bottom: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}

.f98-sequence-mid {
  font-size: 18px;
  color: #fff;
  margin-bottom: 6px;
  font-weight: 700;
}

.f98-sequence-small {
  font-size: 12px;
  color: #aaa;
  line-height: 1.5;
}

.f98-press-start {
  margin-top: 14px;
  color: #fff;
  font-size: 14px;
  letter-spacing: .08em;
  animation: f98Blink 1s steps(2, end) infinite;
}

.f98-sequence-progress {
  height: 16px;
  margin-top: 14px;
  background: #101010;
  border: 1px solid #666;
  box-shadow: 0 0 0 1px #1d1d1d inset;
  overflow: hidden;
}
.f98-sequence-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #1f4cff, #69a7ff);
  transition: width 160ms linear;
}

@keyframes f98Blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: .2; }
}



/* windowed Fishing98 intro */
.f98-sequence-overlay.windowed-intro {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.f98-sequence-overlay.windowed-intro .f98-sequence-panel {
  width: min(92%, 520px);
  max-height: 92%;
  overflow: hidden;
}

.f98-sequence-overlay.windowed-intro .f98-sequence-stage {
  min-height: 220px;
}

.f98-sequence-overlay.windowed-intro .f98-sequence-logo {
  width: 140px;
  height: 140px;
}

.game-loading-overlay.black-loader.windowed-loader {
  position: absolute;
  inset: 0;
  z-index: 29;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.game-loading-overlay.black-loader.windowed-loader .game-loading-panel {
  width: min(92%, 460px);
  max-height: 92%;
  overflow: hidden;
}

.game-loading-overlay.black-loader.windowed-loader .game-loading-art {
  width: 120px;
  height: 120px;
}

.desktop-window {
  position: relative;
}



/* Fishing98 windowed boot fix */
.desktop-window {
  position: relative;
}

.browser-chrome {
  position: relative;
  z-index: 2;
}

.desktop-iframe {
  position: relative;
  z-index: 1;
}

.game-loading-overlay.black-loader.windowed-loader,
.f98-sequence-overlay.windowed-intro {
  position: absolute !important;
  left: 0;
  right: 0;
  top: 66px; /* below title bar + browser chrome */
  bottom: 0;
  inset: auto 0 0 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}

.game-loading-overlay.black-loader.windowed-loader .game-loading-panel,
.f98-sequence-overlay.windowed-intro .f98-sequence-panel {
  width: min(92%, 520px);
  max-width: 520px;
  max-height: calc(100% - 20px);
  overflow: hidden;
}

.f98-sequence-overlay.windowed-intro .f98-sequence-stage {
  min-height: 180px;
}

.f98-sequence-overlay.windowed-intro .f98-sequence-logo {
  width: 128px;
  height: 128px;
}

.game-loading-overlay.black-loader.windowed-loader .game-loading-art {
  width: 112px;
  height: 112px;
}

.f98-sequence-overlay.windowed-intro .f98-sequence-body,
.game-loading-overlay.black-loader.windowed-loader .game-loading-body {
  padding: 16px;
}

.f98-sequence-overlay.windowed-intro .f98-sequence-big {
  font-size: 24px;
}

.f98-sequence-overlay.windowed-intro .f98-sequence-mid {
  font-size: 16px;
}

.f98-sequence-overlay.windowed-intro .f98-press-start {
  margin-top: 10px;
  font-size: 13px;
}



/* Fishing98 startup inside frame final fix */
.desktop-window {
  position: relative !important;
}

.game-loading-overlay.black-loader.windowed-loader,
.f98-sequence-overlay.windowed-intro {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 68px !important;
  bottom: 0 !important;
  z-index: 60 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #000 !important;
  overflow: hidden !important;
}

.game-loading-overlay.black-loader.windowed-loader .game-loading-panel,
.f98-sequence-overlay.windowed-intro .f98-sequence-panel {
  width: min(92%, 520px) !important;
  max-width: 520px !important;
  max-height: calc(100% - 24px) !important;
  overflow: hidden !important;
}

.game-loading-overlay.black-loader.windowed-loader .game-loading-body,
.f98-sequence-overlay.windowed-intro .f98-sequence-body {
  padding: 16px !important;
}

.game-loading-overlay.black-loader.windowed-loader .game-loading-art {
  width: 112px !important;
  height: 112px !important;
}

.f98-sequence-overlay.windowed-intro .f98-sequence-stage {
  min-height: 180px !important;
}

.f98-sequence-overlay.windowed-intro .f98-sequence-logo {
  width: 128px !important;
  height: 128px !important;
}

.f98-sequence-overlay.windowed-intro .f98-sequence-big {
  font-size: 24px !important;
}

.f98-sequence-overlay.windowed-intro .f98-sequence-mid {
  font-size: 16px !important;
}



/* V6 hide browser chrome for Fishing98 only */
.desktop-window.app-idle-fishing .browser-chrome {
  display: none !important;
}

.desktop-window.app-idle-fishing .desktop-iframe {
  height: 100% !important;
}

.desktop-window.app-idle-fishing .game-loading-overlay.black-loader.windowed-loader,
.desktop-window.app-idle-fishing .f98-sequence-overlay.windowed-intro {
  top: 0 !important;
}


/* Spotify window */
.spotify-window {
  position: fixed;
  left: 96px;
  top: 88px;
  width: min(320px, calc(100vw - 40px));
  background: #c0c0c0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: 2px 2px 0 rgba(0,0,0,.25);
  z-index: 42;
}
.spotify-window[hidden] { display: none !important; }
.spotify-window-titlebar {
  height: 26px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding: 0 4px 0 8px;
  background: linear-gradient(90deg, #000080, #1084d0);
  color:#fff;
  font-size:13px;
  font-weight:700;
  cursor: move;
}
.spotify-window-body {
  padding: 8px;
  background: #c0c0c0;
}
.spotify-window-meta {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-size:12px;
  margin-bottom: 6px;
}
.spotify-window-note {
  font-size: 11px;
  color: #333;
  margin-bottom: 8px;
}
.spotify-window iframe {
  display:block;
  width:100%;
  border:0;
  background:#fff;
}
.start-help-note {
  display:block;
  margin-top: 6px;
  font-size: 11px;
  color: #333;
  line-height: 1.35;
}
.start-slider-row input[disabled] {
  opacity: 0.65;
}
@media (max-width: 700px) {
  .spotify-window {
    left: 12px !important;
    top: 12px !important;
    width: calc(100vw - 24px);
  }
}


/* Resizable Spotify window */
.spotify-window {
  min-width: 260px;
  min-height: 180px;
  resize: none;
}
.spotify-window-body {
  min-height: 140px;
}
.spotify-window iframe {
  height: calc(100% - 0px);
  min-height: 180px;
}
.spotify-resize-handle {
  position: absolute;
  z-index: 3;
}
.spotify-resize-handle.resize-e {
  top: 26px;
  right: -1px;
  width: 8px;
  bottom: 0;
  cursor: ew-resize;
}
.spotify-resize-handle.resize-s {
  left: 0;
  right: 0;
  bottom: -1px;
  height: 8px;
  cursor: ns-resize;
}
.spotify-resize-handle.resize-se {
  width: 14px;
  height: 14px;
  right: -1px;
  bottom: -1px;
  cursor: nwse-resize;
  background:
    linear-gradient(135deg, transparent 0 45%, #808080 45% 55%, transparent 55% 100%);
}


/* Spotify no-gap inner layout */
.spotify-window {
  overflow: hidden;
}
.spotify-window-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  height: auto;
  overflow: hidden;
}
.spotify-window-meta {
  flex: 0 0 auto;
}
.spotify-window-note {
  flex: 0 0 auto;
}
.spotify-embed-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.spotify-window iframe {
  display: block;
  width: 100%;
  height: 100% !important;
  min-height: 180px;
  border: 0;
  background: #121212;
}
@media (max-height: 720px), (max-width: 520px) {
  .spotify-window-note {
    font-size: 10px;
    margin-bottom: 0;
  }
}
@media (max-height: 620px), (max-width: 420px) {
  .spotify-window-note {
    display: none;
  }
}


/* CRT overlay */
.crt-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.04), rgba(0,0,0,0.08)),
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.04) 0px,
      rgba(255,255,255,0.04) 1px,
      rgba(0,0,0,0.10) 2px,
      rgba(0,0,0,0.10) 3px
    ),
    linear-gradient(
      90deg,
      rgba(255, 0, 0, 0.035),
      rgba(0, 255, 0, 0.02),
      rgba(0, 80, 255, 0.035)
    );
  mix-blend-mode: multiply;
  opacity: 0.62;
}

.crt-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, transparent 52%, rgba(0,0,0,0.10) 78%, rgba(0,0,0,0.24) 100%);
  pointer-events: none;
}

.crt-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.05), rgba(255,255,255,0.00) 14%, rgba(0,0,0,0.08) 85%, rgba(0,0,0,0.16));
  opacity: 0.75;
  pointer-events: none;
}

body.crt-on .desktop-window,
body.crt-on .spotify-window,
body.crt-on .system-window-panel {
  filter: contrast(1.02) saturate(0.94);
}

.start-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  min-height: 28px;
}

.start-toggle-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
}

.start-slider-row.compact-note {
  grid-template-columns: 1fr;
  align-items: start;
}


/* Clock weather menu */
.clock-menu {
  position: absolute;
  right: 6px;
  bottom: 38px;
  width: 300px;
  background: #c0c0c0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: 2px 2px 0 rgba(0,0,0,.25);
  z-index: 41;
}
.clock-menu[hidden] { display: none !important; }
.clock-menu-head {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 8px;
}
.clock-menu-body {
  padding: 10px;
  display: grid;
  gap: 10px;
}
.clock-weather-panel {
  background: #dfdfdf;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  padding: 10px;
}
.clock-weather-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.clock-weather-temp {
  font-size: 32px;
  line-height: 1;
  font-weight: 700;
}
.clock-weather-code {
  font-size: 14px;
  color: #333;
}
.clock-weather-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
}
.clock-weather-chip {
  background: #c0c0c0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  padding: 6px 8px;
}
.clock-menu-note {
  font-size: 11px;
  color: #333;
  line-height: 1.35;
}
.taskbar-clock {
  cursor: var(--cursor-hand);
}


/* Wave Cam window */
.wavecam-window {
  position: fixed;
  left: 160px;
  top: 110px;
  width: min(460px, calc(100vw - 40px));
  min-width: 320px;
  background: #c0c0c0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: 2px 2px 0 rgba(0,0,0,.25);
  z-index: 43;
  overflow: hidden;
}
.wavecam-window[hidden] { display:none !important; }
.wavecam-window-titlebar {
  height: 26px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding: 0 4px 0 8px;
  background: linear-gradient(90deg, #000080, #1084d0);
  color:#fff;
  font-size:13px;
  font-weight:700;
  cursor: move;
}
.wavecam-window-body {
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:8px;
  background:#c0c0c0;
}
.wavecam-meta {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-size:12px;
}
.wavecam-note {
  font-size: 11px;
  color: #333;
}
.wavecam-embed-wrap {
  overflow: hidden;
  background: #000;
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
}
.wavecam-window iframe {
  display:block;
  width:100%;
  border:0;
  background:#000;
}
@media (max-width: 700px) {
  .wavecam-window {
    left: 12px !important;
    top: 12px !important;
    width: calc(100vw - 24px);
  }
}


/* Resizable Wave Cam */
.wavecam-window {
  min-width: 320px;
  min-height: 220px;
}
.wavecam-window-body {
  min-height: 0;
  overflow: hidden;
}
.wavecam-embed-wrap {
  flex: 1 1 auto;
  min-height: 0;
}
.wavecam-window iframe {
  min-height: 180px;
}
.wavecam-resize-handle {
  position: absolute;
  z-index: 3;
}
.wavecam-resize-handle.resize-e {
  top: 26px;
  right: -1px;
  width: 8px;
  bottom: 0;
  cursor: ew-resize;
}
.wavecam-resize-handle.resize-s {
  left: 0;
  right: 0;
  bottom: -1px;
  height: 8px;
  cursor: ns-resize;
}
.wavecam-resize-handle.resize-se {
  width: 14px;
  height: 14px;
  right: -1px;
  bottom: -1px;
  cursor: nwse-resize;
  background:
    linear-gradient(135deg, transparent 0 45%, #808080 45% 55%, transparent 55% 100%);
}


.taskbar-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.taskbar-buttons .task-btn {
  min-width: 0;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Aquarium Buddy */
.aquarium-window {
  position: fixed;
  left: 96px;
  top: 96px;
  width: min(340px, calc(100vw - 40px));
  background: #c0c0c0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: 2px 2px 0 rgba(0,0,0,.25);
  z-index: 44;
  overflow: hidden;
}
.aquarium-window[hidden] { display:none !important; }
.aquarium-window-titlebar {
  height: 26px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding: 0 4px 0 8px;
  background: linear-gradient(90deg, #000080, #1084d0);
  color:#fff;
  font-size:13px;
  font-weight:700;
  cursor: move;
}
.aquarium-window-body {
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:8px;
  background:#c0c0c0;
}
.aquarium-meta {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-size:12px;
}
.aquarium-controls {
  display:flex;
  align-items:end;
  gap:8px;
}
.aquarium-select-wrap {
  display:grid;
  gap:4px;
  flex:1 1 auto;
  font-size:12px;
}
.aquarium-select-wrap select {
  width:100%;
  min-width:0;
  padding:4px 6px;
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background:#fff;
  font: inherit;
}
.aquarium-feed-btn {
  min-width: 72px;
}
.aquarium-tank {
  position: relative;
  height: 190px;
  overflow: hidden;
  background:
    linear-gradient(180deg, #b8efff 0%, #6fd0ff 25%, #2c9fe3 70%, #1771b8 100%);
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
}
.aquarium-waterline {
  position:absolute;
  left:0; right:0; top:18px;
  height:3px;
  background: rgba(255,255,255,0.45);
}
.aquarium-fish {
  position:absolute;
  left:20px;
  top:82px;
  font-size: 40px;
  line-height:1;
  will-change: transform;
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,.18));
}
.aquarium-bubble {
  position:absolute;
  bottom:-16px;
  width:10px;
  height:10px;
  border-radius:50%;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.7);
  animation: aquariumBubble linear forwards;
}
@keyframes aquariumBubble {
  from { transform: translateY(0); opacity: .75; }
  to { transform: translateY(-180px); opacity: 0; }
}
.aquarium-status,
.aquarium-note {
  font-size:11px;
  color:#333;
  line-height:1.35;
}
@media (max-width: 700px) {
  .aquarium-window {
    left: 12px !important;
    top: 12px !important;
    width: calc(100vw - 24px);
  }
}


/* Screensaver */
.screensaver-overlay {
  position: fixed;
  inset: 0;
  z-index: 170;
  overflow: hidden;
  pointer-events: auto;
  background:
    radial-gradient(circle at 50% 40%, rgba(39,108,183,0.26), transparent 30%),
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.06), transparent 18%),
    linear-gradient(180deg, #06111f 0%, #0a1b32 40%, #031121 100%);
}
.screensaver-overlay[hidden] {
  display: none !important;
}
.screensaver-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.02) 0px,
      rgba(255,255,255,0.02) 1px,
      rgba(0,0,0,0.06) 2px,
      rgba(0,0,0,0.06) 3px
    );
  pointer-events: none;
}
.screensaver-aquarium {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.screensaver-fish {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  line-height: 1;
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,0.35));
  will-change: transform;
}
.screensaver-fish.big { font-size: 52px; }
.screensaver-fish.small { font-size: 24px; }
.screensaver-logo {
  position: absolute;
  left: 28px;
  top: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  background: rgba(192,192,192,0.92);
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.25);
  color: #000;
  font-size: 28px;
  font-weight: 700;
}
.screensaver-logo img {
  width: 56px;
  height: 56px;
  image-rendering: pixelated;
  display: block;
}
.screensaver-hint {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  color: #d6ecff;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-shadow: 1px 1px 0 #000;
  opacity: 0.85;
}


.documents-archive {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.documents-link-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  background: #dfdfdf;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
}
.documents-link-url {
  font-size: 11px;
  color: #333;
  word-break: break-all;
  margin-top: 3px;
}
.documents-link-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.documents-add-row {
  margin-top: 10px;
}








/* Roaming pixel cat */
.desktop-cat {
  position: fixed;
  left: 0;
  top: 0;
  width: 110px;
  height: 70px;
  z-index: 35;
  pointer-events: none;
  will-change: transform;
}
.desktop-cat-sprite {
  position: absolute;
  left: 0;
  top: 0;
  width: 80px;
  height: 64px;
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: auto 64px;
  image-rendering: pixelated;
  transform-origin: center center;
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,.22));
}
.desktop-cat-shadow {
  display: none;
}
body.crt-on .desktop-cat-sprite {
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,.22)) saturate(.9);
}

