/* =========================================================
   Win95 CSS  —  ITSG Interactive Concept
   System font stack, no external dependencies
   ========================================================= */

/* ---------- variables ---------- */
:root {
  --bg:      #c0c0c0;
  --desk:    #008080;
  --active:  #000080;
  --inactive:#808080;
  --ttext:   #ffffff;
  --dark:    #000000;
  --shadow:  #808080;
  --light:   #dfdfdf;
  --white:   #ffffff;
  --text:    #000000;
  --hl:      #000080;
  --hlt:     #ffffff;
  --font:    "MS Sans Serif", Tahoma, Arial, sans-serif;
  --fs:      11px;
  --taskbar-h: 30px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  font-size: var(--fs);
  color: var(--text);
  background: var(--dark);
  user-select: none;
  -webkit-user-select: none;
}

/* ---------- focus styles (Win95 dotted) ---------- */
:focus-visible {
  outline: 1px dotted var(--dark);
  outline-offset: -2px;
}
.titlebar button:focus-visible,
#start-btn:focus-visible,
.dicon:focus-visible {
  outline-color: var(--white);
}

/* =========================================================
   BOOT SPLASH
   ========================================================= */
#boot-splash {
  position: fixed;
  inset: 0;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease;
}
/* Author-level display:flex overrides the browser's default [hidden] rule. */
#boot-splash[hidden] { display: none !important; }
#boot-splash.fade-out { opacity: 0; pointer-events: none; }
#boot-inner { text-align: center; width: 320px; }
#boot-logo-text {
  color: var(--white);
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
#boot-os-line {
  color: var(--inactive);
  font-size: 12px;
  margin-bottom: 20px;
}
#boot-bar-wrap {
  width: 100%;
  height: 16px;
  border: 2px solid;
  border-top-color: var(--shadow);
  border-left-color: var(--shadow);
  border-bottom-color: var(--light);
  border-right-color: var(--light);
  background: var(--dark);
  margin-bottom: 8px;
}
#boot-bar {
  height: 100%;
  width: 0%;
  background: var(--active);
  transition: width 1.2s ease;
}
#boot-status { color: var(--inactive); font-size: 10px; }

/* =========================================================
   DESKTOP
   ========================================================= */
#desktop {
  position: fixed;
  inset: 0;
  bottom: var(--taskbar-h);
  background: var(--desk);
  overflow: hidden;
}

/* =========================================================
   DESKTOP ICONS
   ========================================================= */
#desktop-icons {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}
.dicon {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 72px;
  padding: 4px;
  background: transparent;
  border: 1px solid transparent;
  cursor: default;
  font-family: var(--font);
  font-size: var(--fs);
  color: var(--white);
  text-shadow: 1px 1px 0 var(--dark), -1px 1px 0 var(--dark),
               1px -1px 0 var(--dark), -1px -1px 0 var(--dark);
  text-align: center;
  line-height: 1.3;
  gap: 3px;
}
.dicon:hover,
.dicon:focus-visible {
  border-color: var(--white);
  outline: none;
}
.dicon.selected,
.dicon:active {
  background: var(--hl);
  border: 1px dotted var(--white);
}
.dicon-img {
  display: block;
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}
.dicon-label {
  font-size: 10px;
  max-width: 72px;
  word-break: break-word;
}

/* =========================================================
   WINDOWS  —  general chrome
   ========================================================= */
.win {
  position: absolute;
  background: var(--bg);
  border: 2px solid;
  border-top-color: var(--white);
  border-left-color: var(--white);
  border-right-color: var(--shadow);
  border-bottom-color: var(--shadow);
  box-shadow: 1px 1px 0 var(--dark);
  min-width: 200px;
  display: flex;
  flex-direction: column;
  z-index: 100;
}
.win.focused {
  z-index: 200;
}
.win.minimized { display: none !important; }

/* ---------- title bar ---------- */
.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 2px 4px;
  background: var(--inactive);
  cursor: default;
  min-height: 22px;
  flex-shrink: 0;
  user-select: none;
}
.titlebar.active { background: var(--active); }
.titlebar-left {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  flex: 1;
}
.tb-icon { flex-shrink: 0; image-rendering: pixelated; }
.tb-title {
  color: var(--ttext);
  font-weight: bold;
  font-size: var(--fs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.titlebar-btns {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

/* ---------- title bar buttons ---------- */
.tbtn {
  width: 16px;
  height: 14px;
  background: var(--bg);
  border: 1px solid;
  border-top-color: var(--white);
  border-left-color: var(--white);
  border-right-color: var(--dark);
  border-bottom-color: var(--dark);
  font-family: var(--font);
  font-size: 8px;
  font-weight: bold;
  color: var(--text);
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}
.tbtn:active {
  border-top-color: var(--dark);
  border-left-color: var(--dark);
  border-right-color: var(--white);
  border-bottom-color: var(--white);
}

/* ---------- window body ---------- */
.win-body {
  flex: 1;
  overflow: auto;
  padding: 8px;
}

/* ---------- status bar ---------- */
.statusbar {
  display: flex;
  align-items: center;
  height: 20px;
  flex-shrink: 0;
  padding: 0 2px;
  gap: 2px;
}
.sb-field {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 4px;
  font-size: 10px;
  border: 1px solid;
  border-top-color: var(--shadow);
  border-left-color: var(--shadow);
  border-right-color: var(--white);
  border-bottom-color: var(--white);
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}
.sb-sep {
  width: 2px;
  height: 16px;
  border-left: 1px solid var(--shadow);
  border-right: 1px solid var(--white);
  flex-shrink: 0;
}
.concept-note {
  font-size: 9px;
  color: var(--shadow);
  flex: 2;
}

/* =========================================================
   WELCOME WINDOW
   ========================================================= */
.welcome-body { padding: 10px; }
.welcome-layout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.welcome-mascot-col { flex-shrink: 0; }
.mascot {
  width: 100px;
  height: auto;
  image-rendering: pixelated;
  display: block;
  border: 2px solid;
  border-top-color: var(--shadow);
  border-left-color: var(--shadow);
  border-right-color: var(--white);
  border-bottom-color: var(--white);
}
.welcome-content-col { flex: 1; min-width: 0; }
.win-h1 {
  font-size: 14px;
  font-weight: bold;
  line-height: 1.3;
  margin-bottom: 6px;
  color: var(--text);
}
.win-p {
  font-size: var(--fs);
  line-height: 1.5;
  margin-bottom: 8px;
  color: var(--text);
}

/* ---------- stats panel ---------- */
.stat-panel {
  border: 2px solid;
  border-top-color: var(--shadow);
  border-left-color: var(--shadow);
  border-right-color: var(--white);
  border-bottom-color: var(--white);
  background: var(--bg);
  padding: 4px 6px;
  margin-bottom: 10px;
}
.stat-panel-title {
  font-size: 10px;
  color: var(--shadow);
  margin-bottom: 3px;
}
.stat-row {
  display: flex;
  gap: 4px;
  font-size: var(--fs);
  padding: 1px 0;
}
.stat-key {
  color: var(--shadow);
  width: 90px;
  flex-shrink: 0;
}
.stat-val { color: var(--text); }

/* ---------- CTAs ---------- */
.cta-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.btn-primary, .btn-secondary {
  padding: 4px 12px;
  font-family: var(--font);
  font-size: var(--fs);
  cursor: default;
  border: 2px solid;
  border-top-color: var(--white);
  border-left-color: var(--white);
  border-right-color: var(--dark);
  border-bottom-color: var(--dark);
  background: var(--bg);
  box-shadow: inset 1px 1px 0 var(--light), inset -1px -1px 0 var(--shadow);
  text-decoration: none;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  min-height: 22px;
}
.btn-primary:active,
.btn-secondary:active {
  border-top-color: var(--dark);
  border-left-color: var(--dark);
  border-right-color: var(--white);
  border-bottom-color: var(--white);
  box-shadow: inset 1px 1px 0 var(--shadow), inset -1px -1px 0 var(--light);
  padding: 5px 11px 3px 13px;
}
.btn-primary { font-weight: bold; }

/* =========================================================
   FILE EXPLORER WINDOW
   ========================================================= */

/* --- menu bar --- */
.menubar {
  display: flex;
  background: var(--bg);
  padding: 2px 4px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--shadow);
}
.mb-item {
  padding: 1px 6px;
  font-size: var(--fs);
  cursor: default;
}
.mb-item:hover { background: var(--hl); color: var(--white); }
.mb-item:focus-visible { outline: 1px dotted var(--dark); }

/* --- explorer toolbar --- */
.exp-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  background: var(--bg);
  border-bottom: 1px solid var(--shadow);
  flex-shrink: 0;
}
.tbarbtn {
  padding: 2px 6px;
  font-family: var(--font);
  font-size: var(--fs);
  background: var(--bg);
  border: 2px solid;
  border-top-color: var(--white);
  border-left-color: var(--white);
  border-right-color: var(--dark);
  border-bottom-color: var(--dark);
  cursor: default;
  min-height: 20px;
  display: flex;
  align-items: center;
}
.tbarbtn:disabled {
  color: var(--shadow);
  border-top-color: var(--light);
  border-left-color: var(--light);
}
.tbarbtn:not(:disabled):active {
  border-top-color: var(--dark);
  border-left-color: var(--dark);
  border-right-color: var(--white);
  border-bottom-color: var(--white);
}
.toolbar-sep {
  width: 2px;
  height: 18px;
  border-left: 1px solid var(--shadow);
  border-right: 1px solid var(--white);
  margin: 0 2px;
}

/* --- address bar --- */
.addrbar {
  display: flex;
  align-items: center;
  padding: 2px 4px;
  gap: 4px;
  background: var(--bg);
  border-bottom: 1px solid var(--shadow);
  flex-shrink: 0;
}
.addr-label { font-size: var(--fs); white-space: nowrap; }
.addr-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 1px 4px;
  background: var(--white);
  border: 2px solid;
  border-top-color: var(--shadow);
  border-left-color: var(--shadow);
  border-right-color: var(--white);
  border-bottom-color: var(--white);
  font-size: var(--fs);
  overflow: hidden;
}
.addr-icon { flex-shrink: 0; }

/* --- file table --- */
.exp-body { padding: 0; overflow: auto; }
.file-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs);
}
.fth {
  background: var(--bg);
  border: 1px solid;
  border-top-color: var(--white);
  border-left-color: var(--white);
  border-right-color: var(--dark);
  border-bottom-color: var(--dark);
  padding: 2px 6px;
  text-align: left;
  font-weight: normal;
  white-space: nowrap;
  cursor: default;
  position: sticky;
  top: 0;
}
.fth-name { width: 55%; }
.fth-type { width: 20%; }
.fth-date { width: 25%; }
.frow { cursor: default; }
.frow:hover { background: #316ac5; color: var(--white); }
.frow:hover .fcell { color: var(--white); }
.frow:hover svg line,
.frow:hover svg polygon { stroke: var(--white); }
.frow:focus-visible { background: var(--hl); color: var(--white); outline: none; }
.frow:focus-visible .fcell { color: var(--white); }
.fcell {
  padding: 3px 6px;
  border-bottom: 1px solid var(--light);
}
.fcell-name {
  display: flex;
  align-items: center;
  gap: 6px;
}
.file-icon { flex-shrink: 0; image-rendering: pixelated; }
.fcell-type, .fcell-date { font-size: 10px; color: var(--shadow); }

/* =========================================================
   ABOUT WINDOW
   ========================================================= */
.win-dialog { resize: none; }
.about-body { padding: 0; }

/* --- tab strip --- */
.tabstrip {
  display: flex;
  gap: 2px;
  padding: 4px 4px 0;
  background: var(--bg);
  flex-shrink: 0;
  border-bottom: 2px solid var(--shadow);
}
.tab {
  padding: 3px 10px;
  font-family: var(--font);
  font-size: var(--fs);
  background: var(--bg);
  border: 2px solid;
  border-top-color: var(--white);
  border-left-color: var(--white);
  border-right-color: var(--dark);
  border-bottom-color: var(--bg);
  cursor: default;
  position: relative;
  bottom: -2px;
  z-index: 1;
}
.tab:not(.active) {
  background: var(--light);
  bottom: 0;
  border-bottom-color: var(--shadow);
}
.tab.active {
  font-weight: bold;
  background: var(--bg);
  border-bottom-color: var(--bg);
}

/* --- tab panes --- */
.tabpane {
  padding: 10px;
  border: 2px solid;
  border-top-color: var(--shadow);
  border-left-color: var(--shadow);
  border-right-color: var(--white);
  border-bottom-color: var(--white);
  margin: 0 4px;
}
.tabpane.hidden { display: none; }

/* --- about content --- */
.about-logo-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.about-logo {
  width: 52px;
  height: 52px;
  background: var(--active);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid;
  border-top-color: var(--white);
  border-left-color: var(--white);
  border-right-color: var(--shadow);
  border-bottom-color: var(--shadow);
}
.about-logo-it { color: var(--white); font-size: 16px; font-weight: bold; }
.about-logo-sg { color: #4fc3f7; font-size: 16px; font-weight: bold; }
.about-info-block { flex: 1; }
.about-product { font-weight: bold; font-size: 12px; margin-bottom: 2px; }
.about-version { font-size: 10px; color: var(--shadow); margin-bottom: 4px; }
.about-tagline { font-size: var(--fs); }
.about-hr {
  height: 1px;
  background: var(--shadow);
  margin: 8px 0;
  box-shadow: 0 1px 0 var(--white);
}
.about-fields { display: flex; flex-direction: column; gap: 3px; }
.about-field-row {
  display: flex;
  gap: 8px;
  font-size: var(--fs);
}
.about-field-row span:first-child { color: var(--shadow); width: 130px; flex-shrink: 0; }

/* --- links tab --- */
.link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wlink {
  color: var(--hl);
  text-decoration: underline;
  font-size: var(--fs);
  cursor: pointer;
}
.wlink:visited { color: #800080; }
.wlink:active { color: var(--dark); }

/* --- dialog buttons --- */
.dlg-btns {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 6px 4px 4px;
}
.btn-dlg {
  padding: 3px 14px;
  font-family: var(--font);
  font-size: var(--fs);
  background: var(--bg);
  border: 2px solid;
  border-top-color: var(--white);
  border-left-color: var(--white);
  border-right-color: var(--dark);
  border-bottom-color: var(--dark);
  box-shadow: inset 1px 1px 0 var(--light), inset -1px -1px 0 var(--shadow);
  cursor: default;
  min-width: 75px;
  min-height: 24px;
  color: var(--text);
}
.btn-dlg:active {
  border-top-color: var(--dark);
  border-left-color: var(--dark);
  border-right-color: var(--white);
  border-bottom-color: var(--white);
  box-shadow: inset 1px 1px 0 var(--shadow), inset -1px -1px 0 var(--light);
  padding: 4px 13px 2px 15px;
}
.btn-ok { font-weight: bold; }
.btn-primary.btn-dlg { font-weight: bold; }

/* =========================================================
   MODAL OVERLAY
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  bottom: var(--taskbar-h);
  background: rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}
.modal-overlay[hidden] { display: none !important; }
.modal-overlay .win { position: relative; left: auto !important; top: auto !important; }

/* =========================================================
   NEWSLETTER DIALOG
   ========================================================= */
.nltr-body { padding: 12px; }
.nltr-icon-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.nltr-icon { flex-shrink: 0; image-rendering: pixelated; }
.nltr-headline { font-weight: bold; font-size: 12px; margin-bottom: 4px; }
.nltr-sub { font-size: var(--fs); line-height: 1.5; }
.nltr-form { display: flex; flex-direction: column; gap: 8px; }
.form-row { display: flex; flex-direction: column; gap: 3px; }
.win-label { font-size: var(--fs); }
.win-input {
  padding: 2px 4px;
  font-family: var(--font);
  font-size: var(--fs);
  border: 2px solid;
  border-top-color: var(--shadow);
  border-left-color: var(--shadow);
  border-right-color: var(--white);
  border-bottom-color: var(--white);
  box-shadow: inset 1px 1px 0 var(--dark);
  background: var(--white);
  color: var(--text);
  width: 100%;
  min-height: 22px;
}
.win-input:focus { outline: 1px dotted var(--dark); outline-offset: 0; }
.field-err {
  font-size: 10px;
  color: #cc0000;
  min-height: 14px;
}
.form-btns { display: flex; gap: 6px; justify-content: flex-end; }
.nltr-legal {
  font-size: 10px;
  color: var(--shadow);
  text-align: center;
}
.nltr-concept-note {
  font-size: 10px;
  color: var(--shadow);
  text-align: center;
  margin: 8px 0;
}

/* =========================================================
   RECYCLE BIN DIALOG
   ========================================================= */
.recycle-body { padding: 12px; }
.recycle-intro { font-size: var(--fs); margin-bottom: 8px; }
.recycle-list {
  list-style: disc;
  padding-left: 18px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.recycle-list li { font-size: var(--fs); line-height: 1.5; }

/* =========================================================
   TASKBAR
   ========================================================= */
#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--taskbar-h);
  background: var(--bg);
  border-top: 2px solid;
  border-top-color: var(--white);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 2px;
  z-index: 900;
  box-shadow: 0 -1px 0 var(--shadow);
}
#start-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-family: var(--font);
  font-size: var(--fs);
  font-weight: bold;
  background: var(--bg);
  border: 2px solid;
  border-top-color: var(--white);
  border-left-color: var(--white);
  border-right-color: var(--dark);
  border-bottom-color: var(--dark);
  box-shadow: inset 1px 1px 0 var(--light), inset -1px -1px 0 var(--shadow);
  cursor: default;
  min-height: 22px;
  flex-shrink: 0;
}
#start-btn:active,
#start-btn.open {
  border-top-color: var(--dark);
  border-left-color: var(--dark);
  border-right-color: var(--white);
  border-bottom-color: var(--white);
  box-shadow: inset 1px 1px 0 var(--shadow);
  padding: 3px 7px 1px 9px;
}
.start-flag { image-rendering: pixelated; flex-shrink: 0; }
#taskbar-sep {
  width: 2px;
  height: 20px;
  border-left: 1px solid var(--shadow);
  border-right: 1px solid var(--white);
  flex-shrink: 0;
  margin: 0 2px;
}
#taskbar-wins {
  display: flex;
  gap: 2px;
  flex: 1;
  overflow: hidden;
  min-width: 0;
}
.taskbtn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  font-family: var(--font);
  font-size: var(--fs);
  background: var(--bg);
  border: 2px solid;
  border-top-color: var(--white);
  border-left-color: var(--white);
  border-right-color: var(--dark);
  border-bottom-color: var(--dark);
  box-shadow: inset 1px 1px 0 var(--light);
  cursor: default;
  min-height: 22px;
  max-width: 160px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text);
  flex-shrink: 0;
}
.taskbtn.active {
  border-top-color: var(--dark);
  border-left-color: var(--dark);
  border-right-color: var(--white);
  border-bottom-color: var(--white);
  box-shadow: inset 1px 1px 0 var(--shadow);
  font-weight: bold;
}
.taskbtn-icon { image-rendering: pixelated; flex-shrink: 0; }
#sys-tray {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  border: 2px solid;
  border-top-color: var(--shadow);
  border-left-color: var(--shadow);
  border-right-color: var(--white);
  border-bottom-color: var(--white);
  margin-left: auto;
  flex-shrink: 0;
}
.tray-net { image-rendering: pixelated; }
#clock {
  font-size: var(--fs);
  white-space: nowrap;
  min-width: 50px;
  text-align: right;
}

/* =========================================================
   START MENU
   ========================================================= */
#start-menu {
  position: fixed;
  bottom: var(--taskbar-h);
  left: 0;
  display: flex;
  background: var(--bg);
  border: 2px solid;
  border-top-color: var(--white);
  border-left-color: var(--white);
  border-right-color: var(--dark);
  border-bottom-color: var(--dark);
  box-shadow: 2px 2px 0 var(--dark);
  z-index: 1000;
  min-width: 200px;
}
#start-menu[hidden] { display: none; }
#sm-sidebar {
  width: 26px;
  background: var(--active);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 6px 0;
  flex-shrink: 0;
}
#sm-sidebar-text {
  color: var(--light);
  font-size: 10px;
  font-weight: bold;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  letter-spacing: 1px;
}
#sm-items {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2px 0;
  position: relative;
}
.sm-sep {
  height: 1px;
  background: var(--shadow);
  box-shadow: 0 1px 0 var(--white);
  margin: 2px 4px;
}
.sm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 8px;
  font-family: var(--font);
  font-size: 12px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: default;
  text-align: left;
  text-decoration: none;
  width: 100%;
  white-space: nowrap;
  position: relative;
}
.sm-item:hover,
.sm-item:focus-visible {
  background: var(--hl);
  color: var(--white);
  outline: none;
}
.sm-icon { image-rendering: pixelated; flex-shrink: 0; }
.sm-arrow {
  margin-left: auto;
  font-size: 8px;
}
/* submenu */
.sm-submenu {
  position: absolute;
  left: 100%;
  background: var(--bg);
  border: 2px solid;
  border-top-color: var(--white);
  border-left-color: var(--white);
  border-right-color: var(--dark);
  border-bottom-color: var(--dark);
  box-shadow: 2px 2px 0 var(--dark);
  z-index: 1001;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  padding: 2px 0;
}
.sm-submenu[hidden] { display: none; }
/* dynamically positioned via JS */

/* =========================================================
   SHUT DOWN SCREEN
   ========================================================= */
#shutdown-overlay {
  position: fixed;
  inset: 0;
  background: var(--dark);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
}
#shutdown-overlay[hidden] { display: none; }
#shutdown-screen { text-align: center; }
#shutdown-text {
  color: var(--light);
  font-size: 16px;
  font-weight: bold;
  line-height: 1.7;
  margin-bottom: 20px;
}
#shutdown-cancel {
  margin: auto;
}

/* =========================================================
   RESPONSIVE  —  MOBILE
   ========================================================= */
@media (max-width: 767px) {
  :root {
    --fs: 15px;
    --taskbar-h: 52px;
  }
  html, body {
    font-size: 15px;
  }
  #desktop {
    overflow-y: auto;
    padding-bottom: 10px;
    overscroll-behavior: contain;
  }
  #desktop-icons {
    position: static;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px 8px 8px;
    gap: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  #desktop-icons::-webkit-scrollbar { display: none; }
  .dicon {
    width: 78px;
    min-width: 78px;
    min-height: 76px;
    padding: 6px 4px;
  }
  .dicon-img { width: 36px; height: 36px; }
  .dicon-label {
    max-width: 76px;
    font-size: 12px;
    line-height: 1.2;
  }
  .win {
    position: static !important;
    width: calc(100% - 12px) !important;
    min-width: 0;
    margin: 0 6px 10px;
    border-width: 2px;
    box-shadow: 2px 2px 0 var(--dark);
  }
  .win.minimized { display: none !important; }
  .titlebar {
    min-height: 40px;
    padding: 4px 4px 4px 8px;
  }
  .tb-icon { width: 20px; height: 20px; }
  .tb-title { font-size: 15px; }
  .titlebar-btns { gap: 4px; }
  .tbtn {
    width: 34px;
    height: 30px;
    font-size: 14px;
    border-width: 2px;
  }
  .tbtn-max { display: none; }
  .win-body { padding: 14px; }
  .welcome-layout {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .welcome-body { padding: 14px; }
  .mascot { width: 104px; }
  .welcome-content-col { width: 100%; }
  .win-h1 {
    font-size: 23px;
    line-height: 1.18;
    margin-bottom: 10px;
    text-align: center;
  }
  .win-p {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 14px;
  }
  .stat-panel {
    font-size: 15px;
    margin-bottom: 14px;
  }
  .stat-panel-title {
    font-size: 14px;
    padding: 7px 9px;
  }
  .stat-row {
    padding: 7px 9px;
    line-height: 1.35;
  }
  .stat-key { min-width: 104px; }
  .cta-row {
    flex-direction: column;
    gap: 8px;
  }
  .cta-row .btn-primary,
  .cta-row .btn-secondary {
    width: 100%;
    justify-content: center;
    min-height: 50px;
    font-size: 16px;
    padding: 10px 12px;
  }
  .statusbar { height: 30px; }
  .sb-field { font-size: 12px; }
  .concept-note { display: none; }
  .menubar {
    min-height: 42px;
    padding: 3px 5px;
  }
  .mb-item {
    min-height: 36px;
    padding: 9px 10px;
    font-size: 14px;
  }
  .exp-toolbar { min-height: 46px; padding: 4px 6px; }
  .tbarbtn { min-width: 42px; min-height: 38px; font-size: 13px; }
  .addrbar { min-height: 44px; padding: 5px 7px; gap: 6px; }
  .addr-label { font-size: 13px; }
  .addr-field { min-height: 34px; font-size: 13px; }
  #taskbar { padding: 3px 4px; gap: 4px; }
  #taskbar-wins { overflow-x: auto; }
  .taskbtn {
    width: 48px;
    max-width: 48px;
    min-width: 48px;
    min-height: 44px;
    justify-content: center;
    font-size: 0;
    padding: 4px;
  }
  .taskbtn-icon { width: 20px !important; height: 20px !important; }
  #start-btn {
    min-height: 44px;
    min-width: 76px;
    font-size: 15px;
  }
  #sys-tray { min-height: 44px; padding: 3px 7px; }
  #clock { font-size: 13px; min-width: 58px; }
  .tray-net { display: none; }
  .frow td { font-size: 15px; padding: 13px 8px; line-height: 1.3; }
  .fcell-type, .fcell-date { display: none; }
  .fth-type, .fth-date { display: none; }
  .fth-name { width: 100%; }
  .fth { font-size: 14px; padding: 9px 8px; }
  .file-icon { width: 22px; height: 22px; flex-shrink: 0; }
  .tabstrip { gap: 2px; }
  .tab {
    min-height: 44px;
    padding: 9px 12px;
    font-size: 14px;
  }
  .tabpane { font-size: 15px; padding: 14px; line-height: 1.45; }
  .about-fields { font-size: 14px; }
  .about-field-row { padding: 6px 0; gap: 8px; }
  .about-product { font-size: 17px; }
  .about-version, .about-tagline { font-size: 13px; line-height: 1.4; }
  .about-logo { width: 68px; height: 68px; font-size: 19px; }
  .dialog-p, .nltr-copy { font-size: 16px; line-height: 1.5; }
  input[type="email"], .win-input {
    min-height: 48px;
    font-size: 16px;
    padding: 8px;
  }
  .btn95, .dialog-btn-row button {
    min-height: 46px;
    font-size: 15px;
    padding: 8px 14px;
  }
  /* Make file rows tappable */
  .frow { min-height: 56px; }
  /* modal fills screen on mobile */
  .modal-overlay .win {
    width: calc(100vw - 12px) !important;
    max-width: 420px;
    margin: 0;
  }
  #start-menu {
    width: calc(100vw - 8px);
    min-width: 0;
    max-height: calc(100vh - var(--taskbar-h) - 8px);
    overflow-y: auto;
  }
  .sm-item {
    min-height: 50px;
    padding: 9px 12px;
    font-size: 16px;
  }
  .sm-icon { width: 28px; height: 28px; }
  .sm-submenu {
    max-width: calc(100vw - 16px);
    min-width: 210px;
  }
}

@media (max-width: 480px) {
  .win-h1 { font-size: 21px; }
  .mascot { width: 92px; }
  .stat-row { align-items: flex-start; }
  .stat-key { min-width: 96px; }
  #sm-sidebar { display: none; }
  #start-menu { min-width: 0; }
  .taskbtn { max-width: 86px; }
  #sys-tray { padding-inline: 5px; }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  #boot-bar { transition: none !important; }
  #boot-splash { transition: none !important; }
}
