/* laptop.css */
#laptop-os-screen {
  font-family: 'MS Sans Serif', Tahoma, sans-serif;
  font-size: 12px;
  color: black;
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100000;
  overflow: hidden;
  touch-action: none;
  background: #008080;
}

/* CRT Post-Processing Pipeline */
#laptop-os-screen::after {
  content: ' ';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background:
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
    linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  z-index: 30000;
  background-size:
    100% 3px,
    3px 100%;
  pointer-events: none;
}

#laptop-os-screen::before {
  content: ' ';
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background:
    radial-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 100%), rgba(18, 16, 16, 0);
  opacity: 0.15;
  z-index: 30001;
  pointer-events: none;
  animation: os98-flicker 0.15s infinite;
}

@keyframes os98-flicker {
  0% {
    opacity: 0.15;
  }
  50% {
    opacity: 0.18;
  }
  100% {
    opacity: 0.15;
  }
}

.os98-scanline {
  width: 100%;
  height: 100px;
  z-index: 30002;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  opacity: 0.1;
  position: absolute;
  bottom: 100%;
  pointer-events: none;
  animation: os98-scanline 6s linear infinite;
}

@keyframes os98-scanline {
  0% {
    bottom: 100%;
  }
  100% {
    bottom: -100%;
  }
}

#laptop-os-screen * {
  box-sizing: border-box;
}

.os98-start-wrap {
  position: relative;
  flex-shrink: 0;
  height: 100%;
  display: flex;
  align-items: center;
}

.os98-start-menu {
  position: absolute;
  left: 0;
  bottom: 100%;
  margin-bottom: 2px;
  min-width: 260px;
  max-height: min(70vh, 420px);
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 10050;
  background: #c0c0c0;
  border: 2px solid;
  border-top-color: #fff;
  border-left-color: #fff;
  border-right-color: #0a0a0a;
  border-bottom-color: #0a0a0a;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.45);
  padding: 4px;
}

.os98-start-menu-item {
  display: flex;
  width: 100%;
  text-align: left;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
  padding: 10px 12px;
  font-size: 17px;
  line-height: 1.25;
  font-weight: normal;
}

.os98-start-menu-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.os98-start-menu-sep {
  height: 0;
  margin: 6px 4px;
  border: 0;
  border-top: 1px solid #808080;
}

.os98-start-menu-shutdown {
  font-weight: bold;
  margin-top: 4px;
}

/* Win98 Button */
.os98-btn {
  background: #c0c0c0;
  border: 2px solid;
  border-top-color: #fff;
  border-left-color: #fff;
  border-right-color: #808080;
  border-bottom-color: #808080;
  padding: 4px 10px;
  font-family: 'Tahoma', sans-serif;
  font-size: 14px;
  cursor: pointer;
  box-shadow:
    inset -1px -1px #0a0a0a,
    inset 1px 1px #dfdfdf;
  outline: none;
  color: black;
}
.os98-btn:active,
.os98-btn.active {
  border-top-color: #0a0a0a;
  border-left-color: #0a0a0a;
  border-right-color: #fff;
  border-bottom-color: #fff;
  box-shadow:
    inset 1px 1px #808080,
    inset -1px -1px #dfdfdf;
  padding: 5px 9px 3px 11px;
}

/* Taskbar — высота синхронна с .os98-desktop height calc */
.os98-taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 46px;
  background: #c0c0c0;
  border-top: 2px solid #fff;
  display: flex;
  align-items: center;
  padding: 3px;
  z-index: 10000;
  font:
    14px/1.25 'MS Sans Serif',
    Tahoma,
    sans-serif;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1px,
    rgba(0, 0, 0, 0.04) 1px,
    rgba(0, 0, 0, 0.04) 2px
  );
}
.os98-start-btn {
  font-weight: bold;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  min-height: 38px;
  padding: 2px 12px 2px 8px;
  touch-action: manipulation;
}
.os98-start-icon {
  width: 18px;
  height: 18px;
  background: conic-gradient(red, yellow, green, blue, red);
  clip-path: polygon(
    0% 15%,
    15% 15%,
    15% 0%,
    85% 0%,
    85% 15%,
    100% 15%,
    100% 85%,
    85% 85%,
    85% 100%,
    15% 100%,
    15% 85%,
    0% 85%
  );
}

.os98-taskbar-tasks {
  flex-grow: 1;
  display: flex;
  gap: 4px;
  padding-left: 5px;
  overflow-x: auto;
}
.os98-task-btn {
  height: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: bold;
  padding: 2px 12px;
  font-size: 14px;
  white-space: nowrap;
  touch-action: manipulation;
}

.os98-tray {
  position: relative;
  border: 2px solid;
  border-top-color: #808080;
  border-left-color: #808080;
  border-right-color: #fff;
  border-bottom-color: #fff;
  padding: 2px 12px;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  font-size: 14px;
  background: #c0c0c0;
  cursor: default;
}

.os98-tray-clock {
  cursor: pointer;
  user-select: none;
  padding: 2px 6px;
  font-size: 14px;
  font-weight: 600;
}

/* Всплывающий календарь (клик по часам в трее), в духе Win98 */
.os98-calendar-pop {
  position: absolute;
  right: 0;
  bottom: 100%;
  margin-bottom: 4px;
  z-index: 12050;
  min-width: 220px;
  max-width: min(320px, 92vw);
  background: #c0c0c0;
  border: 2px solid;
  border-top-color: #fff;
  border-left-color: #fff;
  border-right-color: #0a0a0a;
  border-bottom-color: #0a0a0a;
  box-shadow:
    inset 1px 1px #dfdfdf,
    inset -1px -1px #808080,
    2px 2px 8px rgba(0, 0, 0, 0.45);
  font-family: 'Tahoma', sans-serif;
  color: #000;
}

.os98-cal-inner {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.os98-cal-head {
  display: flex;
  align-items: center;
  gap: 4px;
}

.os98-cal-nav {
  flex: 0 0 auto;
  min-width: 26px;
  height: 26px;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  font-weight: bold;
}

.os98-cal-title {
  flex: 1 1 auto;
  text-align: center;
  font-weight: bold;
  font-size: 12px;
  padding: 0 4px;
}

.os98-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  padding: 4px;
  background: #808080;
  border: 2px solid;
  border-top-color: #808080;
  border-left-color: #808080;
  border-right-color: #fff;
  border-bottom-color: #fff;
  box-shadow: inset 1px 1px 0 #404040;
}

.os98-cal-wd {
  text-align: center;
  font-size: 10px;
  font-weight: bold;
  background: #c0c0c0;
  padding: 2px 0;
  color: #000;
}

.os98-cal-day {
  text-align: center;
  font-size: 11px;
  background: #fff;
  padding: 4px 2px;
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.os98-cal-day--muted {
  background: #e8e8e8;
  color: #707070;
}

.os98-cal-day--today {
  background: #000080;
  color: #fff;
  font-weight: bold;
}

.os98-cal-time {
  font-size: 11px;
  text-align: center;
  padding: 6px 4px;
  border: 2px solid;
  border-top-color: #808080;
  border-left-color: #808080;
  border-right-color: #fff;
  border-bottom-color: #fff;
  background: #fff;
  line-height: 1.35;
}

/* Desktop */
.os98-desktop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% - 46px);
  padding: 10px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-sizing: border-box;
}
.os98-desktop-user-files {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px 4px;
  padding: 4px 0;
  min-height: 0;
}
.os98-desktop-file-icon .os98-icon-text {
  max-width: 72px;
  word-break: break-word;
}
.os98-desktop-file-icon--selected .os98-icon-text {
  background: #000080;
  color: #fff;
}
.os98-desktop-file-glyph {
  font-size: 32px;
  line-height: 1;
  text-align: center;
}

.os98-menu-sep {
  height: 1px;
  margin: 2px 2px;
  background: #808080;
  border-top: 1px solid #fff;
}
.os98-menu-row {
  position: relative;
}
.os98-menu-has-sub::after {
  content: '▶';
  float: right;
  font-size: 10px;
  margin-left: 12px;
}
.os98-submenu {
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 160px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #000 #000 #fff;
  box-shadow: 2px 2px 0 #404040;
  z-index: 9000;
  padding: 2px;
}
.os98-context-menu,
.os98-action-menu {
  z-index: 8500;
  min-width: 180px;
}
.os98-action-menu .os98-ie-dropdown-item {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 13px;
}

.os98-explorer-selection-bar {
  flex-shrink: 0;
  padding: 4px 8px;
  font-size: 11px;
  background: #000080;
  color: #fff;
}
.os98-desktop-create-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 25;
  min-height: 40px;
  padding: 6px 12px;
  font-size: 12px;
}
.os98-desktop-action-bar {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 52px;
  z-index: 24;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  box-sizing: border-box;
}
.os98-desktop-action-bar[hidden] {
  display: none !important;
}
.os98-desktop-action-btn {
  flex: 1;
  min-width: 72px;
  min-height: 40px;
  font-size: 12px;
}
.os98-explorer-toolbtn {
  min-height: 36px;
}

.os98-inline-rename {
  width: 100%;
  box-sizing: border-box;
  font:
    11px Tahoma,
    sans-serif;
  border: 1px solid #000;
  padding: 0 2px;
  margin: 0;
}

.os98-explorer-address-label {
  flex-shrink: 0;
  font-size: 11px;
  margin-right: 4px;
}
.os98-explorer-address {
  display: flex;
  align-items: center;
}

.os98-desktop-flow {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 15px;
  align-content: flex-start;
  min-height: 0;
  flex: 1;
  /* один столбец слева; снизу запас под корзину в углу */
  padding: 10px 10px 92px 10px;
}
.os98-icon--anchor-tl {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}
.os98-icon--anchor-br {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
}
.os98-icon {
  width: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  text-align: center;
}
.os98-icon-text {
  color: white;
  font-size: 11px;
  text-shadow: 1px 1px 0 #000;
  padding: 2px;
}
.os98-icon:active .os98-icon-text {
  background: #000080;
  border: 1px dotted #fff;
  text-shadow: none;
}

/* Window */
.os98-window {
  position: absolute;
  background: #c0c0c0;
  border: 2px solid;
  border-top-color: #fff;
  border-left-color: #fff;
  border-right-color: #0a0a0a;
  border-bottom-color: #0a0a0a;
  box-shadow:
    inset 1px 1px #dfdfdf,
    inset -1px -1px #808080,
    2px 2px 5px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  /* will-change: transform — снят. .os98-window двигается через style.left/top
     (см. window_manager.js:156), а не через transform. will-change впустую
     создавал GPU-слой на каждое окно. shell внутри получает реальный
     transform (perspective+rotateY/X) — там оставлено. */
}

.os98-window-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  position: relative;
  /* shell получает transform: perspective+rotateY/rotateX из window_manager.js:118
     (3D-tilt по mouse). Здесь will-change оправдан. */
  will-change: transform;
}

/* Верхняя кромка для ресайза по «северу» — без видимой полосы (не дублирует titlebar). */
.os98-frame-top {
  flex: 0 0 auto;
  height: 4px;
  margin: 0 6px;
  cursor: ns-resize;
  touch-action: none;
  box-sizing: border-box;
  background: transparent;
  border: none;
}
.os98-window.maximized .os98-frame-top,
.os98-window.os98-window-mobile .os98-frame-top {
  display: none !important;
}

.os98-window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: none;
  transform: none !important;
}

.os98-titlebar {
  position: relative;
  z-index: 30;
  background: linear-gradient(90deg, #000080, #1084d0);
  color: white;
  padding: 4px 4px 4px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-weight: bold;
  font-size: 15px;
  user-select: none;
  flex-shrink: 0;
  min-height: 44px;
}
.os98-titlebar-inactive {
  background: #808080;
}
.os98-titlebar-title {
  display: flex;
  align-items: center;
  gap: 4px;
}
.os98-titlebar-title img {
  width: 16px;
  height: 16px;
}
.os98-titlebar-controls {
  display: flex;
  gap: 3px;
  align-items: center;
  flex-shrink: 0;
  position: relative;
  z-index: 32;
}

/* Кнопки заголовка в духе Win98, крупнее под палец / стилус */
.os98-titlebar-controls .os98-title-btn {
  box-sizing: border-box;
  min-width: 40px;
  min-height: 34px;
  width: 40px;
  height: 34px;
  padding: 0;
  margin: 0;
  font-size: 16px;
  line-height: 1;
  font-weight: bold;
  font-family: 'Tahoma', 'Arial', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  color: #000;
  background: #c0c0c0;
  border: 2px solid;
  border-top-color: #fff;
  border-left-color: #fff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  box-shadow:
    inset -1px -1px #0a0a0a,
    inset 1px 1px #dfdfdf;
  outline: none;
}

.os98-titlebar-controls .os98-title-btn:active {
  border-top-color: #404040;
  border-left-color: #404040;
  border-right-color: #fff;
  border-bottom-color: #fff;
  box-shadow:
    inset 1px 1px #808080,
    inset -1px -1px #dfdfdf;
  padding: 0;
}

.os98-titlebar-controls .os98-title-btn.btn-close {
  font-size: 18px;
  line-height: 1;
}

.os98-titlebar-controls .os98-title-btn:disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}
.os98-task-btn.minimized {
  opacity: 0.75;
  font-style: italic;
}

.os98-resize {
  position: absolute;
  z-index: 25;
  pointer-events: auto;
}
.os98-window.maximized .os98-resize {
  display: none !important;
}
.os98-window.os98-window-mobile .os98-resize {
  display: none !important;
}
.os98-frame-top.os98-resize {
  position: static;
  z-index: auto;
}
.os98-resize-s {
  bottom: 0;
  left: 8px;
  right: 8px;
  height: 8px;
  cursor: ns-resize;
}
.os98-resize-e {
  right: 0;
  top: 46px;
  bottom: 0;
  width: 8px;
  cursor: ew-resize;
}
.os98-resize-w {
  left: 0;
  top: 46px;
  bottom: 0;
  width: 8px;
  cursor: ew-resize;
}
.os98-resize-ne {
  top: 0;
  right: 0;
  width: 10px;
  height: 10px;
  cursor: nesw-resize;
}
.os98-resize-nw {
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  cursor: nwse-resize;
}
.os98-resize-se {
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  cursor: nwse-resize;
}
.os98-resize-sw {
  bottom: 0;
  left: 0;
  width: 10px;
  height: 10px;
  cursor: nesw-resize;
}

.os98-window-content {
  touch-action: pan-y;
  flex-grow: 1;
  padding: 2px;
  overflow: auto;
  position: relative;
  border: 2px solid;
  border-top-color: #808080;
  border-left-color: #808080;
  border-right-color: #fff;
  border-bottom-color: #fff;
  background: #fff;
  margin: 4px;
}

/* Boot Sequence */
#os98-boot-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  color: #c0c0c0;
  font-family: monospace;
  font-size: 14px;
  padding: 20px;
  z-index: 35000;
}

#os98-fake-cursor {
  position: absolute;
  width: 16px;
  height: 22px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="22" viewBox="0 0 16 22"><path fill="white" stroke="black" stroke-width="1" d="M1,1 L11,11 L6,11 L9,18 L6,19 L3,12 L1,14 Z"/></svg>')
    no-repeat;
  pointer-events: none;
  z-index: 99999;
  display: none;
}

/* Internet Explorer (ноутбук) — Win98: MS Sans Serif / Tahoma, чуть крупнее под тач */
.os98-ie-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  font:
    12px/1.3 'MS Sans Serif',
    Tahoma,
    sans-serif;
  background: #c0c0c0;
  color: #000;
  min-height: 0;
}
.os98-ie-menubar {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  padding: 5px 8px;
  border-bottom: 1px solid #808080;
  flex-shrink: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1px,
    rgba(0, 0, 0, 0.035) 1px,
    rgba(0, 0, 0, 0.035) 2px
  );
}
.os98-ie-menubar-group {
  display: inline-flex;
}
.os98-ie-menubar-item {
  background: transparent;
  border: none;
  font: inherit;
  font-size: 12px;
  padding: 5px 8px;
  min-height: 30px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  color: #000;
}
.os98-ie-menubar-item:hover {
  text-decoration: underline;
}
.os98-ie-rebar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 6px 8px;
  border-bottom: 1px solid #808080;
  align-items: center;
  flex-shrink: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1px,
    rgba(0, 0, 0, 0.035) 1px,
    rgba(0, 0, 0, 0.035) 2px
  );
}
.os98-ie-rebar .os98-ie-rebar-btn {
  box-sizing: border-box;
  min-width: 38px;
  min-height: 32px;
  width: 38px;
  height: 32px;
  padding: 0;
  margin: 0;
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.os98-ie-rebar .os98-ie-rebar-btn:active {
  padding: 0;
}
.os98-ie-rebar .os98-ie-rebar-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.os98-ie-rebar .os98-ie-rebar-btn--refreshing {
  animation: os98-ie-refresh-spin 0.65s linear infinite;
}

@keyframes os98-ie-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}

.os98-ie-client--refreshing .os98-ie-host {
  opacity: 0.55;
  filter: brightness(0.92);
  transition:
    opacity 0.15s ease,
    filter 0.15s ease;
}

.os98-ie-client--refreshing .os98-ie-host::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(255, 255, 255, 0.12) 8px,
    rgba(255, 255, 255, 0.12) 16px
  );
  animation: os98-ie-refresh-sweep 0.45s linear infinite;
}

@keyframes os98-ie-refresh-sweep {
  from {
    transform: translateX(-12px);
  }
  to {
    transform: translateX(12px);
  }
}

.legacy-browser-page--refreshing {
  animation: legacy-browser-page-flash 0.42s ease;
}

@keyframes legacy-browser-page-flash {
  0% {
    opacity: 0.35;
    filter: brightness(1.08);
  }
  100% {
    opacity: 1;
    filter: none;
  }
}
.os98-ie-address-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid #808080;
  flex-shrink: 0;
}
.os98-ie-address-label {
  flex-shrink: 0;
  font-weight: bold;
  font-size: 12px;
}
.os98-ie-address-input {
  flex: 1;
  min-width: 0;
  min-height: 26px;
  font:
    12px/1.2 Tahoma,
    'MS Sans Serif',
    sans-serif;
  border: 2px solid;
  border-top-color: #808080;
  border-left-color: #808080;
  border-right-color: #fff;
  border-bottom-color: #fff;
  background: #fff;
  box-sizing: border-box;
  padding: 3px 6px;
}
.os98-ie-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 6px 8px;
  border-bottom: 1px solid #808080;
  flex-shrink: 0;
  align-items: center;
}
.os98-ie-tabs .os98-ie-tab {
  min-height: 34px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: bold;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.os98-ie-tab.os98-ie-tab--active {
  border-top-color: #808080;
  border-left-color: #808080;
  border-right-color: #fff;
  border-bottom-color: #fff;
  box-shadow:
    inset 1px 1px #404040,
    inset -1px -1px #dfdfdf;
  background: #b8b8b8;
}
.os98-ie-client {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 4px;
  border: 2px solid;
  border-top-color: #808080;
  border-left-color: #808080;
  border-right-color: #fff;
  border-bottom-color: #fff;
  background: #fff;
  overflow: hidden;
}
.os98-ie-host {
  flex: 1;
  min-height: 0;
  overflow: auto;
  position: relative;
}
.os98-ie-status {
  flex-shrink: 0;
  min-height: 24px;
  padding: 4px 8px;
  font-size: 12px;
  border-top: 1px solid #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #c0c0c0;
}
.os98-ie-dropdown {
  position: fixed;
  z-index: 200100;
  min-width: 140px;
  background: #c0c0c0;
  border: 2px solid;
  border-top-color: #fff;
  border-left-color: #fff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
  padding: 2px 0;
  font:
    12px/1.2 'MS Sans Serif',
    Tahoma,
    sans-serif;
}
.os98-ie-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 14px;
  min-height: 34px;
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.os98-ie-dropdown-item:hover {
  background: #000080;
  color: #fff;
}

/* Проводник Win98 */
.os98-explorer-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: #c0c0c0;
}
.os98-explorer-menubar {
  flex-shrink: 0;
  padding: 2px 6px;
  border-bottom: 1px solid #808080;
}
.os98-explorer-menubar-btn {
  background: transparent;
  border: none;
  font: inherit;
  font-size: 11px;
  padding: 2px 6px;
  cursor: pointer;
}
.os98-explorer-toolbar {
  flex-wrap: wrap;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 6px;
  border-bottom: 1px solid #808080;
  flex-shrink: 0;
}
.os98-explorer-toolbtn {
  min-height: 44px;
}
.os98-explorer-address {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-bottom: 1px solid #808080;
  background: #c0c0c0;
}
.os98-explorer-address-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: bold;
}
.os98-explorer-address-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  background: #fff;
  border: 2px solid;
  border-top-color: #808080;
  border-left-color: #808080;
  border-right-color: #fff;
  border-bottom-color: #fff;
  box-sizing: border-box;
}
.os98-explorer-address-ico {
  flex-shrink: 0;
  display: block;
}
.os98-explorer-path {
  font-size: 11px;
  font-family: Tahoma, sans-serif;
  word-break: break-all;
  min-width: 0;
}
.os98-explorer-listhost--icons {
  padding: 8px;
}
.os98-explorer-iconview {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 12px 16px;
}
.os98-explorer-iconitem {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 76px;
  padding: 4px 2px 6px;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font:
    11px Tahoma,
    'MS Sans Serif',
    sans-serif;
  color: #000;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.os98-explorer-iconitem--selected .os98-sysicon-img {
  outline: 1px dotted #000;
  outline-offset: 1px;
}
.os98-explorer-iconitem--selected .os98-explorer-iconlabel {
  background: #000080;
  color: #fff;
}
.os98-explorer-iconlabel {
  margin-top: 4px;
  text-align: center;
  line-height: 1.2;
  max-width: 72px;
  word-break: break-word;
}
.os98-sysicon-img {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.os98-explorer-namecell {
  display: flex;
  align-items: center;
  gap: 6px;
}
.os98-explorer-listhost {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #fff;
  border: 1px solid #808080;
  margin: 4px;
}
.os98-explorer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.os98-explorer-th-name,
.os98-explorer-th-type,
.os98-explorer-th-size {
  text-align: left;
  padding: 4px 8px;
  background: #c0c0c0;
  border-bottom: 1px solid #808080;
  font-weight: normal;
}
.os98-explorer-row td {
  padding: 8px;
  border-bottom: 1px solid #eee;
}
.os98-explorer-row {
  cursor: pointer;
}
.os98-explorer-row-selected td {
  background: #000080;
  color: #fff;
}
.os98-explorer-empty {
  padding: 12px;
  color: #555;
}
.os98-explorer-status {
  flex-shrink: 0;
  min-height: 22px;
  padding: 2px 8px;
  font-size: 11px;
  border-top: 1px solid #fff;
  background: #c0c0c0;
}

.os98-vnimanie-root {
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  overflow: auto;
  background: #ffff00;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.os98-vnimanie-img {
  display: block;
  max-width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.os98-notepad-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  font-family: Tahoma, sans-serif;
  color: #000;
  background: #fff;
}
.os98-notepad-toolbar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-bottom: 1px solid #808080;
  background: #c0c0c0;
}
.os98-notepad-editor {
  flex: 1;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 4px;
  border: none;
  resize: none;
  outline: none;
  font-family: 'Lucida Console', 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.35;
  background: #fff;
  color: #000;
}
.os98-notepad-status {
  flex-shrink: 0;
  min-height: 20px;
  padding: 2px 8px;
  font-size: 11px;
  border-top: 1px solid #808080;
  background: #c0c0c0;
}

/* Выключение ноутбука — только на рабочем столе (ниже окон, скрывается при открытых окнах) */
.os98-power-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 20;
  box-sizing: border-box;
  min-width: 40px;
  min-height: 34px;
  width: 40px;
  height: 34px;
  padding: 0;
  margin: 0;
  font-size: 18px;
  line-height: 1;
  font-weight: bold;
  font-family: 'Tahoma', 'Arial', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  color: #000;
  background: #c0c0c0;
  border: 2px solid;
  border-top-color: #fff;
  border-left-color: #fff;
  border-right-color: #404040;
  border-bottom-color: #404040;
  box-shadow:
    inset -1px -1px #0a0a0a,
    inset 1px 1px #dfdfdf;
  outline: none;
  pointer-events: auto;
}

.os98-power-close-btn:active {
  border-top-color: #404040;
  border-left-color: #404040;
  border-right-color: #fff;
  border-bottom-color: #fff;
  box-shadow:
    inset 1px 1px #808080,
    inset -1px -1px #dfdfdf;
}

/* Диалог подтверждения выключения */
.os98-shutdown-overlay {
  position: absolute;
  inset: 0;
  z-index: 31000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

.os98-shutdown-dialog {
  min-width: min(360px, 92vw);
  max-width: 420px;
  background: #c0c0c0;
  border: 2px solid;
  border-top-color: #fff;
  border-left-color: #fff;
  border-right-color: #0a0a0a;
  border-bottom-color: #0a0a0a;
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.5);
}

.os98-shutdown-titlebar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-weight: bold;
  padding: 4px 8px;
  font-size: 12px;
}

.os98-shutdown-body {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 14px 12px;
}

.os98-shutdown-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #000080;
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  font-family: 'Times New Roman', serif;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.os98-shutdown-text {
  margin: 0;
  padding-top: 6px;
  font-size: 12px;
  line-height: 1.35;
}

.os98-shutdown-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 14px 14px;
}

.os98-shutdown-confirm {
  min-width: 72px;
}
