/* GoudaOS — gwos runtime chrome.
   Design tokens (gradients, shadows) come from the win32.run donor repo.
   Donor scrollbar rules are appended below the marker at the end of this
   file by tooling — keep the marker line intact. */

#desktop-shell {
  --gwos-blue: #59aca6;
  --gwos-blue-highlight: #92ddd6;
  --gwos-blue-light: #74c9c2;
  --gwos-blue-mid: #59aca6;
  --gwos-blue-deep: #327b77;
  --gwos-blue-dark: #21615d;
  --gwos-blue-darker: #174a47;
  --gwos-blue-pale: #d8efed;
  --gwos-blue-soft: #bde2df;
  --gwos-blue-text: #0f504d;
  --gwos-start: #8cb8db;
  --gwos-start-light: #c8e6f7;
  --gwos-start-dark: #4f8ebe;
  --window-control-filter: hue-rotate(-40deg) saturate(0.76) brightness(1.14);
  --window-control-hover-filter: hue-rotate(-40deg) saturate(0.86) brightness(1.28);
  --window-control-active-filter: hue-rotate(-40deg) saturate(0.72) brightness(0.96);
  --gwos-gradient: #21615d 0px, #327b77 3%, #59aca6 6%,
    #74c9c2 10%, #59aca6 12%, #4aa09a 15%,
    #3f918b 18%, #37847f 20%, #327b77 23%,
    #2f7671 38%, #347f7a 54%, #3d928c 86%,
    #327b77 89%, #2b706b 92%, #21615d 95%,
    #174a47 98%;
  --titlebar-gradient: 180deg, #8fe0d9, #59aca6 8%, #4ca29c 40%, #327b77 88%,
    #327b77 93%, #3f918b 95%, #21615d 96%, #21615d;
  --titlebar-gradient-inactive: #a8d7d3 0%, #acd8d5 3%,
    #bee3e0 6%, #c4e8e5 8%, #afd9d6 14%,
    #a6d2ce 17%, #9ac9c5 25%, #9fcfcb 56%,
    #b5dfdc 81%, #a8d4d0 89%, #9dcac6 94%,
    #94c2be 97%, #c8d8d7 100%;
  --window-box-shadow: inset -1px -1px #174a47, inset 1px 1px #74c9c2,
    inset -2px -2px #21615d, inset 2px 2px #92ddd6, inset -3px -3px #327b77,
    inset 3px 3px #59aca6;
  --window-box-shadow-inactive: inset -1px -1px #9ac9c5,
    inset 1px 1px #9ac9c5, inset -2px -2px #9ac9c5,
    inset 2px 2px #9ac9c5, inset -3px -3px #9ac9c5,
    inset 3px 3px #9ac9c5;
  --tile-box-shadow: rgb(0 0 0 / 30%) -1px 0px inset,
    rgb(255 255 255 / 20%) 1px 1px 1px inset;
  --tile-box-shadow-focus: rgb(0 0 0 / 20%) 0px 0px 1px 1px inset,
    rgb(0 0 0 / 70%) 1px 0px 1px inset;

  font-family: Tahoma, "Segoe UI", "Microsoft Sans Serif", "MSSS", Arial, sans-serif;
  font-size: 11px;
  font-weight: 400;
  font-synthesis: none;
  font-kerning: none;
  letter-spacing: 0;
  color: #000;
  -webkit-font-smoothing: auto;
  font-smooth: auto;
  text-rendering: auto;
}

#desktop-shell,
#desktop-shell * {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

#desktop-shell img,
.os-menu img {
  -webkit-user-drag: none;
}

#desktop-shell textarea,
#desktop-shell input,
#desktop-shell [data-selectable] {
  user-select: text;
  -webkit-user-select: text;
}

#desktop-shell button {
  min-height: 0;
  color: inherit;
  font: inherit;
  font-weight: 400;
  letter-spacing: 0;
}

/* ------------------------------------------------------------ layout */

.os-root {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.os-workspace {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--gwos-blue);
  background-size: cover;
  background-position: center;
}

/* -------------------------------------------------------- desktop icons */

.os-icons {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.os-icon {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1px;
  width: 84px;
  height: 68px;
  padding: 2px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 400;
  line-height: 13px;
  cursor: default;
  touch-action: none;
}

.os-icon img {
  width: 32px;
  height: 32px;
  image-rendering: auto;
  pointer-events: none;
}

.os-icon span {
  max-width: 82px;
  padding: 0 2px;
  color: #fff;
  text-align: center;
  font-family: Tahoma, "Microsoft Sans Serif", Arial, sans-serif;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.92);
  font-size: 11px;
  font-weight: 400;
  line-height: 13px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.os-icon.selected span {
  background: var(--gwos-blue-dark);
  text-shadow: none;
}

.os-icon.selected img {
  filter: brightness(0.72) sepia(0.4) hue-rotate(180deg);
}

.os-selection-rect {
  position: absolute;
  z-index: 5;
  border: 1px dotted #f8f8f8;
  background: rgba(89, 172, 166, 0.2);
  pointer-events: none;
}

/* -------------------------------------------------------------- windows */

.os-windows {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.os-webamp-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.os-webamp-layer.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.os-webamp-layer > * {
  pointer-events: auto;
}

.os-webamp-status {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 300;
  padding: 8px 12px;
  border: 2px solid var(--gwos-blue-deep);
  background: #ece9d8;
  color: #000;
  font-size: 11px;
  box-shadow: 2px 4px 18px rgba(0, 0, 0, 0.32);
}

.os-task--winamp img {
  image-rendering: auto;
}

.osw {
  position: absolute;
  display: flex;
  flex-direction: column;
  min-width: 180px;
  min-height: 110px;
  pointer-events: auto;
  background: #ece9d8;
  border-radius: 6px 6px 0 0;
  box-shadow: var(--window-box-shadow), 1px 4px 12px rgba(0, 0, 0, 0.38);
}

.osw.inactive {
  box-shadow: var(--window-box-shadow-inactive), 1px 3px 9px rgba(0, 0, 0, 0.26);
}

.osw.maximized {
  border-radius: 0;
}

.osw.minimized {
  display: none;
}

.osw__titlebar {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  flex: none;
  padding: 0 3px 0 5px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(var(--titlebar-gradient));
  cursor: default;
  touch-action: none;
}

.osw.maximized .osw__titlebar {
  border-radius: 0;
}

.osw.inactive .osw__titlebar {
  background: linear-gradient(180deg, var(--titlebar-gradient-inactive));
}

.osw__titlebar img {
  width: 16px;
  height: 16px;
  flex: none;
}

.osw__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  line-height: 13px;
  font-family: "Trebuchet MS", "TrebuchetXP", Tahoma, sans-serif;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.48);
}

.osw__buttons {
  display: flex;
  gap: 1px;
  flex: none;
}

.osw__btn {
  width: 22px;
  height: 22px;
  padding: 0;
  min-height: 0;
  border: 1px solid #fff;
  border-radius: 3px;
  color: #fff;
  position: relative;
  background: linear-gradient(180deg, #2b71e0, #1451c7 45%, #1148b8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  cursor: pointer;
  font-family: inherit;
}

.osw__btn:hover {
  filter: brightness(1.2);
}

.osw__btn:active {
  filter: brightness(0.85);
}

.osw__btn--close {
  background: linear-gradient(180deg, #f1a476, #e0693c 40%, #c33d16);
}

.osw__btn--min::after {
  content: "";
  position: absolute;
  left: 4px;
  bottom: 4px;
  width: 8px;
  height: 3px;
  background: #fff;
}

.osw__btn--max::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 12px;
  height: 10px;
  border: 2px solid #fff;
  border-top-width: 3px;
}

.osw.maximized .osw__btn--max::after {
  width: 9px;
  height: 8px;
  left: 6px;
  top: 6px;
  box-shadow: -3px -3px 0 -1px #fff;
}

.osw__btn--close::before,
.osw__btn--close::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 12px;
  height: 2px;
  background: #fff;
}

.osw__btn--close::before {
  transform: rotate(45deg);
}

.osw__btn--close::after {
  transform: rotate(-45deg);
}

.osw__btn {
  width: 18px;
  height: 18px;
  margin-left: 1px;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  box-shadow: none;
  image-rendering: auto;
}

.osw__btn::before,
.osw__btn::after {
  content: none !important;
}

.osw__btn--min {
  background-image: var(--os-icon-minimize, none);
}

.osw__btn--max {
  background-image: var(--os-icon-maximize, none);
}

.osw.maximized .osw__btn--max {
  background-image: var(--os-icon-restore, none);
}

.osw__btn--min,
.osw__btn--max {
  filter: var(--window-control-filter);
}

.osw__btn--min:hover,
.osw__btn--max:hover {
  filter: var(--window-control-hover-filter);
}

.osw__btn--min:active,
.osw__btn--max:active {
  filter: var(--window-control-active-filter);
}

.osw__btn--close {
  background-image: var(--os-icon-exit, none);
}

.osw__btn:disabled {
  filter: grayscale(0.35) contrast(0.72);
  opacity: 0.72;
  pointer-events: none;
}

.osw__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0 3px 3px;
  background: #fff;
  border: 1px solid #7f9db9;
  overflow: auto;
  position: relative;
}

.os-local-only {
  display: flex;
  min-height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  box-sizing: border-box;
  text-align: center;
}

.os-local-only span {
  max-width: 30rem;
  color: #555;
}

.osw__body--tool {
  background: #ece9d8;
  border: none;
  overflow: hidden;
}

.osw__status {
  flex: none;
  display: flex;
  gap: 8px;
  margin: 0 3px 3px;
  padding: 3px 6px;
  background: #ece9d8;
  border: 1px solid #aca899;
  border-top: none;
  color: #333;
}

/* resize handles */
.osw__rs {
  position: absolute;
  z-index: 5;
}
.osw__rs--n { top: -3px; left: 8px; right: 8px; height: 6px; cursor: n-resize; }
.osw__rs--s { bottom: -3px; left: 8px; right: 8px; height: 6px; cursor: s-resize; }
.osw__rs--e { right: -3px; top: 8px; bottom: 8px; width: 6px; cursor: e-resize; }
.osw__rs--w { left: -3px; top: 8px; bottom: 8px; width: 6px; cursor: w-resize; }
.osw__rs--ne { top: -3px; right: -3px; width: 12px; height: 12px; cursor: ne-resize; }
.osw__rs--nw { top: -3px; left: -3px; width: 12px; height: 12px; cursor: nw-resize; }
.osw__rs--se { bottom: -3px; right: -3px; width: 14px; height: 14px; cursor: se-resize; }
.osw__rs--sw { bottom: -3px; left: -3px; width: 12px; height: 12px; cursor: sw-resize; }

/* -------------------------------------------------------------- taskbar */

.os-taskbar {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: stretch;
  height: 28px;
  flex: none;
  background: linear-gradient(180deg, var(--gwos-gradient));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.os-start {
  flex: none;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 93px;
  height: 28px;
  min-height: 0;
  border: 0;
  gap: 4px;
  border-radius: 0 8px 8px 0;
  padding: 0 11px 1px 8px;
  background: linear-gradient(
    180deg,
    #92ddd6 0%,
    #74c9c2 7%,
    #59aca6 20%,
    #4aa09a 62%,
    #327b77 88%,
    #21615d 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -2px 2px rgba(23, 74, 71, 0.58),
    inset -2px 0 3px rgba(23, 74, 71, 0.35),
    1px 0 2px rgba(0, 0, 0, 0.3);
  color: #fff;
  font-family: "Franklin Gothic Medium", "Trebuchet MS", "TrebuchetXP", Tahoma, sans-serif;
  font-size: 15px;
  font-style: italic;
  font-weight: 400;
  line-height: 1;
  text-shadow: 1px 1px 0 rgba(0, 45, 73, 0.85);
  cursor: pointer;
}

#desktop-shell .os-start {
  color: #fff;
  font-family: "Franklin Gothic Medium", "Trebuchet MS", "TrebuchetXP", Tahoma, sans-serif;
  font-size: 15px;
  font-style: italic;
  font-weight: 400;
  text-shadow: 1px 1px 0 rgba(0, 45, 73, 0.85);
}

.os-start img {
  display: block;
  width: 20px;
  height: 20px;
  flex: none;
  object-fit: contain;
  filter: none;
}

.os-start span {
  display: block;
  transform: translateY(-0.5px);
}

.os-start:active,
.os-start.open {
  filter: brightness(0.88);
}

.os-tasks {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 3px;
  overflow: hidden;
}

.os-task {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  height: 22px;
  min-height: 0;
  min-width: 0;
  max-width: 145px;
  flex: 0 1 145px;
  border: 0;
  border-radius: 2px;
  padding: 0 6px;
  background: var(--gwos-blue-light);
  box-shadow: var(--tile-box-shadow);
  color: #fff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.os-task img {
  width: 15px;
  height: 15px;
  flex: none;
}

.os-task span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.os-task.active {
  background: var(--gwos-blue-deep);
  box-shadow: var(--tile-box-shadow-focus);
}

.os-tray {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  background: linear-gradient(
    180deg,
    #174a47 1%,
    #3f918b 6%,
    #74c9c2 10%,
    #59aca6 14%,
    #4aa09a 19%,
    #3f918b 63%,
    #59aca6 81%,
    #4aa09a 88%,
    #3f918b 91%,
    #327b77 94%,
    #21615d 97%,
    #174a47 100%
  );
  border-left: 1px solid rgba(16, 77, 73, 0.62);
  box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 11px;
}

.os-tray-icon {
  display: flex;
  width: 16px;
  height: 16px;
  flex: none;
  align-items: center;
  justify-content: center;
}

.os-tray-icon img {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
  image-rendering: auto;
}

.os-welcome-tip {
  position: absolute;
  right: 10px;
  bottom: 38px;
  z-index: 78;
  width: min(390px, calc(100% - 20px));
  padding: 10px 28px 11px 12px;
  border: 1px solid #55522e;
  border-radius: 7px;
  background: linear-gradient(180deg, #fffde0 0%, #fff8b8 100%);
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, 0.92),
    2px 3px 7px rgba(0, 0, 0, 0.32);
  color: #000;
  font-family: "Microsoft Sans Serif", Arial, sans-serif;
  font-size: 9px;
  font-weight: 400;
  line-height: 11px;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.os-welcome-tip[hidden] {
  display: none;
}

.os-welcome-tip::before,
.os-welcome-tip::after {
  content: "";
  position: absolute;
  right: 46px;
  bottom: -7px;
  width: 13px;
  height: 13px;
  transform: rotate(45deg);
}

.os-welcome-tip::before {
  border-right: 1px solid #55522e;
  border-bottom: 1px solid #55522e;
  background: #fff8b8;
}

.os-welcome-tip::after {
  bottom: -5px;
  right: 47px;
  width: 11px;
  height: 11px;
  background: #fff8b8;
}

.os-welcome-tip p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #000;
  font-weight: 400;
}

.os-welcome-tip__close {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 2;
  width: 15px;
  height: 15px;
  border: 1px solid #8b8552;
  border-radius: 2px;
  padding: 0;
  background: #f4ed9a;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.75);
  color: #333;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 12px;
  text-align: center;
  cursor: pointer;
}

.os-welcome-tip__close:hover {
  background: #fff3a6;
}

/* ----------------------------------------------------------- start menu */

.os-startmenu {
  position: absolute;
  left: 0;
  bottom: 28px;
  z-index: 70;
  width: 350px;
  max-width: calc(100vw - 8px);
  display: flex;
  flex-direction: column;
  border-radius: 5px 5px 0 0;
  overflow: hidden;
  background: var(--gwos-blue);
  box-shadow: 1px -2px 10px rgba(0, 0, 0, 0.42), inset 0 0 0 1px var(--gwos-blue-dark);
}

.os-startmenu[hidden] {
  display: none;
}

.os-startmenu__header {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 48px;
  padding: 0 8px;
  background: linear-gradient(180deg, #74c9c2 0%, #59aca6 12%, #4aa09a 40%, #327b77 88%, #74c9c2 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: "Trebuchet MS", "TrebuchetXP", Tahoma, sans-serif;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.55);
}

.os-startmenu__header img {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  filter: none;
}

.os-startmenu__columns {
  display: grid;
  grid-template-columns: 1.16fr 1fr;
  min-height: 270px;
  border-top: 1px solid var(--gwos-blue-dark);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.18);
}

.os-startmenu__left {
  display: flex;
  flex-direction: column;
  background: #fff;
  padding: 3px 2px;
  border-right: 1px solid #cbd7e9;
}

.os-startmenu__right {
  display: flex;
  flex-direction: column;
  background: var(--gwos-blue-pale);
  padding: 3px 2px;
  color: var(--gwos-blue-text);
}

.os-sm-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-height: 0;
  border: 0;
  padding: 4px 7px;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 11px;
  text-align: left;
  cursor: default;
  border-radius: 0;
}

.os-sm-item img {
  width: 22px;
  height: 22px;
  flex: none;
}

.os-sm-item strong {
  display: block;
  font-weight: 700;
}

.os-sm-item:hover {
  background: var(--gwos-blue-dark);
  color: #fff;
}

#desktop-shell .os-startmenu__right .os-sm-item {
  font-weight: 700;
}

.os-sm-sep {
  height: 1px;
  margin: 2px 6px;
  background: #cbd7e9;
  border: 0;
}

.os-startmenu__right .os-sm-sep {
  background: var(--gwos-blue-soft);
}

.os-startmenu__footer {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  padding: 5px 7px;
  background: linear-gradient(180deg, #92ddd6 0%, #59aca6 12%, #3f918b 40%, #327b77 88%, #74c9c2 100%);
}

.os-startmenu__footer .os-sm-item {
  color: #fff;
  font-size: 10px;
}

.os-startmenu__footer .os-sm-item:hover {
  background: rgba(255, 255, 255, 0.18);
}

.os-startmenu__footer .os-sm-item img {
  width: 20px;
  height: 20px;
}

/* ---------------------------------------------------------- context menu */

.os-menu {
  position: fixed;
  z-index: 90;
  min-width: 168px;
  padding: 2px;
  background: #f8f8f8;
  border: 2px solid #f1f1f1;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.35);
  font-family: Tahoma, "Segoe UI", "Microsoft Sans Serif", Arial, sans-serif;
  font-size: 11px;
  font-weight: 400;
}

.os-menu__item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  min-height: 0;
  border: 0;
  padding: 2px 12px 2px 5px;
  background: transparent;
  color: #000;
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  line-height: 15px;
  text-align: left;
  cursor: default;
  border-radius: 0;
}

.os-menu__item img {
  width: 16px;
  height: 16px;
}

.os-menu__item.noicon {
  padding-left: 29px;
}

.os-menu__item:hover:not(:disabled) {
  background: var(--gwos-blue-dark, #21615d);
  color: #fff;
}

.os-menu__item:disabled {
  color: #aca899;
}

.os-menu__item.bold {
  font-weight: 500;
}

.os-menu__sep {
  height: 1px;
  margin: 2px 3px;
  background: #aca899;
  border: 0;
}

/* -------------------------------------------------------------- explorer */

.os-explorer {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: #ece9d8;
}

.os-explorer__menubar {
  flex: none;
  display: flex;
  align-items: center;
  height: 22px;
  border-bottom: 1px solid #c8c4b0;
  background: #ece9d8;
}

.os-explorer__menubar button {
  height: 20px;
  min-height: 0;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 0 7px;
  color: #000;
  font: inherit;
  text-align: left;
  justify-content: flex-start;
}

.os-explorer__menubar button:hover {
  border-color: #aca899;
  background: #f7f5ea;
}

.os-explorer__ms {
  margin-left: auto;
  width: 36px;
  height: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f8f8;
  border-left: 1px solid #d8d2bd;
}

.os-explorer__ms img {
  width: 18px;
  height: 18px;
}

.os-explorer__toolbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 32px;
  padding: 2px 4px;
  background: #ece9d8;
  border-bottom: 1px solid #c8c4b0;
}

.os-tool {
  min-height: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 24px;
  height: 27px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 2px 5px;
  color: #000;
  font: inherit;
  cursor: pointer;
  justify-content: flex-start;
}

.os-tool img {
  width: 22px;
  height: 22px;
  flex: none;
}

.os-tool.icon-only {
  padding-inline: 3px;
}

.os-tool:hover:not(:disabled) {
  border-color: #aca899;
  background: #f7f5ea;
}

.os-tool:disabled {
  color: #aca899;
  filter: grayscale(0.55);
}

.os-explorer__divider {
  width: 1px;
  height: 24px;
  margin: 0 3px;
  border-left: 1px solid #aca899;
  border-right: 1px solid #fff;
}

.os-explorer__addressbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 25px;
  padding: 2px 4px;
  border-bottom: 1px solid #c8c4b0;
  background: #ece9d8;
  color: #333;
}

.os-explorer__addressbar > span {
  padding: 0 4px;
  color: #555;
}

.os-explorer__address {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  border: 1px solid #7f9db9;
  background: #fff;
  padding: 1px 5px;
  overflow: hidden;
  white-space: nowrap;
}

.os-explorer__address img {
  width: 14px;
  height: 14px;
}

.os-explorer__addressbar button {
  width: 28px;
  height: 20px;
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 0;
}

.os-explorer__addressbar button img {
  width: 23px;
  height: 16px;
}

.os-explorer__main {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.os-explorer__sidebar {
  flex: none;
  width: 200px;
  overflow: auto;
  padding: 5px 6px 8px;
  background: linear-gradient(var(--gwos-blue-light) 0%, var(--gwos-blue-deep) 100%);
}

.os-sidebox {
  overflow: hidden;
  margin-top: 5px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(#f6fbfb 0%, var(--gwos-blue-pale) 100%);
}

.os-sidebox h3 {
  height: 24px;
  margin: 0;
  padding: 6px 7px 0 10px;
  background: linear-gradient(90deg, var(--gwos-blue), var(--gwos-blue-dark));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.os-sidebox > div {
  padding: 5px 7px 7px;
}

.os-sideitem {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 2px 0;
  color: var(--gwos-blue-text);
  font: inherit;
  font-size: 11px;
  line-height: 1.1;
  text-align: left;
  justify-content: flex-start;
}

.os-sideitem img {
  width: 18px;
  height: 18px;
  flex: none;
}

.os-explorer__grid {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #f8fbff;
  color: #000;
}

.os-explorer__items {
  min-height: 100%;
  padding: 7px;
}

.os-explorer__group {
  padding: 5px 8px 8px;
}

.os-explorer__group h2 {
  position: relative;
  margin: 0 0 10px;
  color: #000;
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
}

.os-explorer__group h2::after {
  content: "";
  position: absolute;
  left: 0;
  right: 20px;
  bottom: -5px;
  height: 2px;
  background: linear-gradient(90deg, var(--gwos-blue-light), rgba(89, 172, 166, 0));
}

.os-explorer__group > div,
.os-explorer__items {
  display: flex;
  flex-flow: row wrap;
  align-content: flex-start;
  gap: 7px 15px;
}

.os-fileitem {
  display: inline-flex;
  align-items: center;
  width: 140px;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 2px 4px;
  color: #000;
  font: inherit;
  font-size: 11px;
  line-height: 1.1;
  text-align: left;
  cursor: default;
  justify-content: flex-start;
}

.os-fileitem img {
  width: 44px;
  height: 44px;
  flex: none;
  object-fit: contain;
  image-rendering: auto;
}

.os-fileitem span {
  margin-left: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.os-fileitem.selected span {
  background: var(--gwos-blue-dark);
  color: #fff;
}

/* -------------------------------------------------------------- dialogs */

.os-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  flex: 1;
}

.os-progress {
  height: 15px;
  border: 1px solid #686868;
  border-radius: 2px;
  padding: 1px;
  overflow: hidden;
}

.os-progress__bar {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(
    90deg,
    var(--gwos-blue-deep) 0 8px,
    var(--gwos-blue-light) 8px 10px,
    transparent 10px 12px
  );
  transition: width 120ms linear;
}

.os-btn {
  min-height: 0;
  min-width: 68px;
  border: 1px solid #003c74;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff, #ece9d8 85%, #d8d2bd);
  box-shadow: none;
  padding: 3px 10px;
  color: #000;
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}

.os-btn:hover {
  box-shadow: inset 0 0 0 2px rgba(251, 176, 3, 0.35);
}

.os-btn:active {
  background: #ece9d8;
}

.os-btn:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -4px;
}

/* ---------------------------------------------------- exclusive zip gate */

.os-access {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #ece9d8;
}

.os-access [hidden] {
  display: none !important;
}

.os-access__form,
.os-access__success {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  padding: 14px 15px 12px;
}

.os-access__intro {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.os-access__icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
}

.os-access__message {
  margin: 1px 0 12px;
  color: #000;
  font-size: 11px;
  line-height: 1.4;
}

.os-access__label {
  display: block;
  margin: 0 0 3px 48px;
}

.os-access__input {
  width: calc(100% - 48px);
  height: 23px;
  margin-left: 48px;
  border: 1px solid #7f9db9;
  border-radius: 0;
  outline: none;
  background: #fff;
  padding: 2px 5px;
  color: #000;
  font: inherit;
  line-height: 17px;
}

.os-access__input:focus {
  border-color: #315cba;
  box-shadow: inset 0 0 0 1px #b7cff5;
}

.os-access__input[aria-invalid="true"] {
  border-color: #a40000;
}

.os-access__input:disabled {
  background: #f5f4ed;
  color: #777;
}

.os-access__error {
  min-height: 14px;
  margin: 3px 0 0 48px;
  color: #a40000;
  font-size: 11px;
  line-height: 1.25;
}

.os-access__consent {
  margin: auto 0 8px 48px;
  color: #555;
  font-size: 10px;
  line-height: 1.35;
}

.os-access__actions {
  display: flex;
  flex: none;
  justify-content: flex-end;
  gap: 7px;
}

.os-access__actions .os-btn:disabled {
  border-color: #aca899;
  color: #777;
  cursor: default;
}

.os-access__success {
  justify-content: space-between;
}

.os-access__success-title {
  margin: 0 0 5px;
  font: inherit;
  font-size: 12px;
  font-weight: 400;
}

.os-access__success .os-access__message {
  overflow-wrap: anywhere;
  user-select: text;
  -webkit-user-select: text;
}

.os-access__preview-note {
  margin: 8px 0 auto 48px;
  border: 1px solid #aca899;
  background: #ffffe1;
  padding: 7px 8px;
  color: #333;
  font-size: 11px;
  line-height: 1.35;
}

/* --------------------------------------------------- display properties */

.os-display {
  display: flex;
  flex-direction: column;
  padding: 8px 8px 6px;
  flex: 1;
  min-height: 0;
  background: #ece9d8;
}

.os-tabs {
  display: flex;
  align-items: flex-end;
  height: 24px;
  flex: none;
  padding-left: 4px;
}

.os-tabs button {
  position: relative;
  min-height: 0;
  height: 22px;
  border: 1px solid #aca899;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background: #ece9d8;
  padding: 2px 7px 1px;
  color: #000;
  font: inherit;
  font-size: 11px;
}

.os-tabs button.selected {
  z-index: 2;
  height: 24px;
  margin-bottom: -1px;
  background: #fafaf9;
}

.os-display__panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 10px;
  border: 1px solid #aca899;
  background: #fafaf9;
}

.os-display__preview {
  position: relative;
  align-self: center;
  width: 190px;
  height: 190px;
  flex: none;
  margin: 8px 0 12px;
  background: var(--os-display-monitor, none) center / contain no-repeat;
}

.os-display__screen {
  position: absolute;
  left: 17.6%;
  top: 17.4%;
  width: 66.2%;
  height: 48.9%;
  background-color: var(--gwos-blue);
  background-size: cover;
  background-position: center;
}

.os-display__label {
  margin-bottom: 4px;
  color: #222;
  font-size: 12px;
}

.os-display__list {
  flex: 1;
  min-height: 110px;
  overflow: auto;
  border: 1px solid #333;
  background: #fff;
}

.os-display__list button {
  display: flex;
  width: 100%;
  min-height: 0;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 3px 6px;
  color: #000;
  font-family: inherit;
  font-size: 11px;
  text-align: left;
  cursor: default;
  justify-content: flex-start;
}

.os-display__list button.selected {
  background: var(--gwos-blue-dark);
  color: #fff;
}

.os-display__actions {
  display: flex;
  justify-content: flex-end;
  flex: none;
  gap: 6px;
  padding-top: 8px;
}

/* ---------------------------------------------------------- media player */

.os-wmp {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: #000;
}

.os-wmp__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.os-wmp__stage video {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.os-wmp__stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.os-wmp__controls {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: linear-gradient(180deg, #4867a6 0%, #2c4a86 20%, #16295c 75%, #0d1d49 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.os-wmp__controls button {
  width: 30px;
  height: 30px;
  min-height: 0;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #7ea4e8, #2b4d97 70%, #16295c);
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
}

.os-wmp__controls button:hover {
  filter: brightness(1.25);
}

.os-wmp__controls button.big {
  width: 38px;
  height: 38px;
  font-size: 14px;
}

.os-wmp__seek {
  flex: 1;
  min-width: 40px;
  accent-color: #4ade80;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.os-wmp__vol {
  width: 64px;
  flex: none;
  accent-color: #4ade80;
  cursor: pointer;
}

.os-wmp__time {
  flex: none;
  color: #9fd79f;
  font-size: 10px;
  font-family: Tahoma, monospace;
  min-width: 74px;
  text-align: right;
}

/* ------------------------------------------------------------ app menu */

.os-app-menubar {
  flex: none;
  display: flex;
  align-items: center;
  height: 22px;
  border-bottom: 1px solid #c8c4b0;
  background: #ece9d8;
}

.os-app-menubar button {
  height: 20px;
  min-height: 0;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 0 7px;
  color: #000;
  font: inherit;
  justify-content: flex-start;
}

.os-app-menubar button:hover {
  border-color: #aca899;
  background: #f7f5ea;
}

.os-game {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #bebfc0;
}

/* ------------------------------------------------------------ minesweeper */

.os-mine {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: #c0c0c0;
  border: 3px solid;
  border-color: #fff #808080 #808080 #fff;
  margin: 4px;
}

.os-mine__hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  padding: 4px 6px;
}

.os-mine__lcd {
  min-width: 52px;
  background: #000;
  color: #f00;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  padding: 0 2px;
}

.os-mine__face {
  width: 30px;
  height: 30px;
  min-height: 0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  background: #c0c0c0;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.os-mine__grid {
  display: grid;
  border: 3px solid;
  border-color: #808080 #fff #fff #808080;
  touch-action: manipulation;
}

.os-mine__cell {
  width: 24px;
  height: 24px;
  min-height: 0;
  padding: 0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  background: #c0c0c0;
  font-family: Tahoma, sans-serif;
  font-size: 13px;
  font-weight: bold;
  line-height: 1;
  cursor: default;
  border-radius: 0;
}

.os-mine__cell.open {
  border: 1px solid #9a9a9a;
  background: #c8c8c8;
}

.os-mine__cell.boom {
  background: #ff0000;
}

.os-mine__cell[data-n="1"] { color: #0000ff; }
.os-mine__cell[data-n="2"] { color: #008000; }
.os-mine__cell[data-n="3"] { color: #ff0000; }
.os-mine__cell[data-n="4"] { color: #000080; }
.os-mine__cell[data-n="5"] { color: #800000; }
.os-mine__cell[data-n="6"] { color: #008080; }
.os-mine__cell[data-n="7"] { color: #000; }
.os-mine__cell[data-n="8"] { color: #808080; }

/* -------------------------------------------------------- text documents */

.os-textdoc {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: 0;
  resize: none;
  outline: none;
  background: #fff;
  color: #000;
  padding: 6px;
  font-family: "Lucida Console", Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
}

.os-imageview {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #7f9db9;
  overflow: auto;
}

.os-imageview img {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.5);
}

.os-iframe {
  flex: 1;
  min-height: 0;
  width: 100%;
  border: 0;
  background: #fff;
}

/* -------------------------------------------------------------- welcome */

.os-welcome {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--gwos-blue);
  font-family: "TrebuchetXP", "Trebuchet MS", Tahoma, sans-serif;
  opacity: 1;
  transition: opacity 900ms ease;
}

.os-welcome.fading {
  opacity: 0;
  pointer-events: none;
}

.os-welcome__top {
  height: 70px;
  flex: none;
  background: var(--gwos-blue-dark);
}

.os-welcome__line-top {
  height: 2px;
  flex: none;
  background: linear-gradient(45deg, var(--gwos-blue-deep), #d8efed, var(--gwos-blue-soft), var(--gwos-blue));
}

.os-welcome__body {
  flex: 1;
  position: relative;
  overflow: hidden;
  --welcome-logo-size: 128px;
  --welcome-logo-center-y: 40%;
  --welcome-text-offset-x: 162px;
  background: radial-gradient(circle at 5% 5%, var(--gwos-blue-highlight) 0, var(--gwos-blue-light) 6%, var(--gwos-blue) 12%);
}

.os-welcome__text {
  position: absolute;
  top: var(--welcome-logo-center-y);
  left: calc(50% + var(--welcome-text-offset-x));
  color: #f8fafc;
  transform: translateY(-50%);
  font-family: "Franklin Gothic Medium", "Franklin Gothic", "Segoe UI", Tahoma,
    sans-serif;
  font-size: 42px;
  font-style: italic;
  font-weight: 350;
}

.os-welcome__logo {
  position: absolute;
  top: var(--welcome-logo-center-y);
  left: 50%;
  height: var(--welcome-logo-size);
  width: auto;
  transform: translate(-50%, -50%);
}

.os-welcome__line-bottom {
  height: 2px;
  flex: none;
  background: linear-gradient(45deg, var(--gwos-blue-dark), var(--gwos-start-light), var(--gwos-start-dark), var(--gwos-blue-dark));
}

.os-welcome__bottom {
  height: 70px;
  flex: none;
  background: linear-gradient(90deg, var(--gwos-blue-deep), var(--gwos-blue-dark));
}

/* --------------------------------------------------------------- mobile */

@media (max-width: 640px), (max-aspect-ratio: 86 / 100) {
  .os-welcome__top,
  .os-welcome__bottom {
    height: clamp(48px, 11dvh, 70px);
  }

  .os-welcome__body {
    --welcome-logo-size: clamp(88px, 30vw, 128px);
  }

  .os-welcome__logo {
    top: calc(50% - clamp(34px, 10vw, 48px));
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .os-welcome__text {
    top: calc(50% + clamp(48px, 14vw, 68px));
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(30px, 10vw, 42px);
    line-height: 1;
    white-space: nowrap;
  }

  .os-startmenu {
    width: calc(100vw - 8px);
  }

  .os-startmenu__columns {
    grid-template-columns: 1fr;
    min-height: 240px;
  }

  .os-startmenu__right {
    display: none;
  }

  .os-icon {
    width: 76px;
    height: 64px;
    padding-top: 2px;
  }

  .os-icon img {
    width: 32px;
    height: 32px;
  }

  .os-icon span {
    max-width: 74px;
    font-size: 10px;
  }

  .os-start {
    width: 88px;
    gap: 3px;
    padding-inline: 7px 9px;
    font-size: 14px;
  }

  .os-start img {
    width: 18px;
    height: 18px;
  }

  .os-task {
    flex-basis: 100px;
    max-width: 112px;
    padding-inline: 5px;
  }

  .os-tray {
    gap: 3px;
    padding-inline: 5px;
  }

  .os-welcome-tip {
    right: 6px;
    bottom: 36px;
    width: min(312px, calc(100% - 12px));
    padding: 9px 27px 10px 10px;
  }

  .os-explorer__sidebar {
    display: none;
  }

  .os-explorer__toolbar {
    overflow: hidden;
  }

  .os-tool span {
    display: none;
  }

  .os-explorer__ms {
    display: none;
  }

 
