/* ============ BOWMAN.EXE — Windows 95 core theme ============ */

:root {
  --face: #c0c0c0;
  --face-light: #dfdfdf;
  --hilite: #ffffff;
  --shadow: #808080;
  --dark: #404040;
  --title-a: #000080;
  --title-b: #1084d0;
  --title-inactive-a: #808080;
  --title-inactive-b: #b5b5b5;
  --desktop: #008080;
  --sel: #000080;
  --sel-text: #ffffff;
  --font: "Tahoma", "MS Sans Serif", "Segoe UI", Verdana, sans-serif;
  --title-font: "Tahoma", "MS Sans Serif", sans-serif;
  --mono: "Lucida Console", "Courier New", monospace;
  --bevel-out: inset -1px -1px 0 var(--dark), inset 1px 1px 0 var(--hilite),
               inset -2px -2px 0 var(--shadow), inset 2px 2px 0 var(--face-light);
  --bevel-in:  inset 1px 1px 0 var(--dark), inset -1px -1px 0 var(--hilite),
               inset 2px 2px 0 var(--shadow), inset -2px -2px 0 var(--face-light);
  --bevel-field: inset 1px 1px 0 var(--shadow), inset -1px -1px 0 var(--face-light),
                 inset 2px 2px 0 var(--dark), inset -2px -2px 0 var(--hilite);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  font-size: 13px;
  background: #000;
  -webkit-font-smoothing: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font);
  font-size: 13px;
  background: var(--face);
  color: #000;
  border: none;
  border-radius: 0;
  box-shadow: var(--bevel-out);
  padding: 5px 14px;
  min-height: 28px;
  cursor: pointer;
  white-space: nowrap;
}
.btn:active, .btn.pressed {
  box-shadow: var(--bevel-in);
  padding: 6px 13px 4px 15px;
}
.btn:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }
.btn[disabled] { color: var(--shadow); text-shadow: 1px 1px 0 var(--hilite); cursor: default; }

/* ---------- window chrome ---------- */
.win {
  position: absolute;
  background: var(--face);
  border: none;
  border-radius: 0;
  box-shadow: var(--bevel-out), 4px 4px 0 rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  min-width: 220px;
  min-height: 120px;
  padding: 4px;
  overflow: visible;
}
.win.minimized { display: none; }
.win.maximized { box-shadow: var(--bevel-out); }

.win-title {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  margin: 0;
  padding: 2px 4px 2px 8px;
  background: linear-gradient(90deg, var(--title-a), var(--title-b));
  color: #fff;
  font-family: var(--title-font);
  font-weight: bold;
  font-size: 13px;
  text-shadow: none;
  cursor: move;
  touch-action: none;
  flex: 0 0 auto;
  overflow: hidden;
}
.win:not(.focused) { border: none; }
.win:not(.focused) .win-title {
  background: linear-gradient(90deg, var(--title-inactive-a), var(--title-inactive-b));
  color: #d8d8d8;
}
.win-title .t-icon { font-size: 15px; line-height: 1; flex: 0 0 auto; }
.win-title .t-text {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: .2px;
}
.win-title .t-btns { display: flex; gap: 3px; flex: 0 0 auto; }
.win-title .t-btns .btn {
  width: 26px; height: 24px; min-height: 24px;
  padding: 0;
  font-size: 12px;
  font-family: var(--mono);
  font-weight: bold;
  display: grid;
  place-items: center;
  color: #000;
  background: var(--face);
  border: none;
  border-radius: 0;
  box-shadow: var(--bevel-out);
}
.win-title .t-btns .btn:active { box-shadow: var(--bevel-in); }
.win-title .t-btns .b-close { background: var(--face); }

.win-body {
  flex: 1 1 auto;
  margin: 4px 0 0;
  overflow: auto;
  position: relative;
  background: var(--face);
}
.win-body.sunken {
  box-shadow: var(--bevel-field);
  border: none;
  background: #fff;
  padding: 8px;
  user-select: text;
}

.win-resize {
  position: absolute;
  right: 2px; bottom: 2px;
  width: 18px; height: 18px;
  cursor: nwse-resize;
  touch-action: none;
  background:
    linear-gradient(135deg, transparent 0 50%, var(--shadow) 50% 57%, var(--hilite) 57% 64%,
      transparent 64% 71%, var(--shadow) 71% 78%, var(--hilite) 78% 85%,
      transparent 85% 92%, var(--shadow) 92% 100%);
}

/* ---------- menus ---------- */
.menu {
  position: fixed;
  z-index: 9000;
  background: var(--face);
  border: none;
  box-shadow: var(--bevel-out), 3px 3px 0 rgba(0,0,0,.4);
  padding: 3px;
  min-width: 190px;
}
.menu .mi {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px 7px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.menu .mi .mi-ico { width: 18px; text-align: center; }
.menu .mi:hover, .menu .mi.hot { background: var(--sel); color: var(--sel-text); }
.menu .mi.disabled { color: var(--shadow); pointer-events: none; }
.menu .msep { height: 2px; margin: 3px 2px; background: none; border-top: 1px solid var(--shadow); border-bottom: 1px solid var(--hilite); }

.menu.start { display: flex; padding: 3px; border: none; border-radius: 0; overflow: visible; }
.menu.start .side {
  width: 26px;
  background: linear-gradient(180deg, var(--title-a), var(--title-b));
  color: #fff;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-weight: bold;
  font-style: normal;
  font-size: 15px;
  letter-spacing: 2px;
  padding: 8px 2px;
  display: flex;
  align-items: center;
  text-shadow: none;
}
.menu.start .items { flex: 1; background: var(--face); padding: 0; }

/* ---------- taskbar ---------- */
#taskbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 40px;
  background: var(--face);
  border: none;
  box-shadow: inset 0 1px 0 var(--hilite), inset 0 2px 0 var(--face-light);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  z-index: 8000;
}
.start-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font);
  font-weight: bold;
  font-style: normal;
  font-size: 13px;
  color: #000;
  text-shadow: none;
  background: var(--face);
  border: none;
  border-radius: 0;
  box-shadow: var(--bevel-out);
  padding: 5px 14px;
  min-height: 28px;
  cursor: pointer;
}
.start-btn:hover { filter: none; }
.start-btn:active { box-shadow: var(--bevel-in); filter: none; }
.start-logo {
  width: 16px; height: 16px;
  background:
    conic-gradient(from 0deg at 50% 50%, #f25022 0 25%, #7fba00 0 50%, #00a4ef 0 75%, #ffb900 0);
  border-radius: 0;
  box-shadow: none;
  transform: none;
}
.task-sep { width: 2px; align-self: stretch; background: none; border-left: 1px solid var(--shadow); border-right: 1px solid var(--hilite); margin: 2px 2px; }
#task-buttons {
  flex: 1;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
#task-buttons::-webkit-scrollbar { display: none; }
#task-buttons .btn {
  max-width: 170px;
  min-width: 60px;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  font-weight: normal;
  color: #000;
  background: var(--face);
  border: none;
  border-radius: 0;
  box-shadow: var(--bevel-out);
  text-shadow: none;
}
#task-buttons .btn:hover { filter: none; }
#task-buttons .btn.active {
  box-shadow: var(--bevel-in);
  background: repeating-conic-gradient(var(--face-light) 0 25%, var(--face) 0 50%) 0 0/4px 4px;
  font-weight: bold;
}
#tray {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--face);
  border: none;
  box-shadow: var(--bevel-field);
  border-radius: 0;
  padding: 3px 8px;
  min-height: 30px;
  margin: 0;
  align-self: center;
}
.tray-btn { background: none; border: none; cursor: pointer; font-size: 15px; padding: 2px; }
.tray-btn.off { filter: grayscale(1) opacity(.45); }
#tray-clock { font-size: 12px; min-width: 52px; text-align: center; color: #000; text-shadow: none; }

/* ---------- form bits ---------- */
.field, input[type="text"], select, textarea {
  font-family: var(--font);
  font-size: 13px;
  background: #fff;
  border: none;
  border-radius: 0;
  box-shadow: var(--bevel-field);
  padding: 6px 8px;
  min-height: 30px;
  user-select: text;
}
input[type="range"] { accent-color: var(--title-a); }
fieldset {
  border: none;
  border-radius: 0;
  box-shadow: inset -1px -1px 0 var(--hilite), inset 1px 1px 0 var(--shadow),
              -1px -1px 0 var(--shadow), 1px 1px 0 var(--hilite);
  margin: 8px;
  padding: 10px;
}
legend { padding: 0 4px; color: #000; }

.progress {
  border: none;
  border-radius: 0;
  box-shadow: var(--bevel-field);
  background: #fff;
  height: 20px;
  position: relative;
  overflow: hidden;
}
.progress > i {
  position: absolute;
  inset: 3px auto 3px 3px;
  width: 0%;
  background: repeating-linear-gradient(90deg, var(--title-a) 0 9px, transparent 9px 12px);
  transition: width .2s;
}

/* ---------- toast ---------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
  background: #ffffe1;
  border: 1px solid #000;
  border-radius: 0;
  box-shadow: 2px 2px 0 rgba(0,0,0,.4);
  padding: 8px 14px;
  z-index: 9500;
  font-size: 12px;
  max-width: 90vw;
}

/* ---------- scrollbars (WebKit) ---------- */
::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track { background: repeating-conic-gradient(#fff 0 25%, var(--face) 0 50%) 0 0/4px 4px; }
::-webkit-scrollbar-thumb { background: var(--face); border: none; border-radius: 0; box-shadow: var(--bevel-out); }
::-webkit-scrollbar-button { display: block; background: var(--face); box-shadow: var(--bevel-out); height: 16px; width: 16px; }

@media (max-width: 700px) {
  html, body { font-size: 14px; }
  .win-title { height: 36px; }
  .win-title .t-btns .btn { width: 34px; height: 30px; min-height: 30px; }
  #taskbar { height: 46px; }
}
