/* 1333 University — style.css
   Aesthetic: hhroses.art Windows 98 clone
   Fonts: Fixedsys (body/UI), 8bitfont (headings), basiic (decorative)
   NO Google Fonts. NO emojis. NO modern frameworks.
*/

/* ── FONTS ─────────────────────────────────────────────────────────── */
@font-face {
  font-family: '8bitfont';
  src: url('https://hhroses.neocities.org/font/PixelatedEleganceRegular-ovyAA.woff2') format('woff2'),
       url('https://hhroses.neocities.org/font/PixelatedEleganceRegular-ovyAA.woff') format('woff'),
       url('https://hhroses.neocities.org/font/PixelatedEleganceRegular-ovyAA.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'basiic';
  src: url(https://cinni.net/fonts/basiic.ttf);
}
@font-face {
  font-family: 'Fixedsys';
  src: url('https://hhroses.neocities.org/font/Fixedsys.ttf') format('truetype');
}

/* ── CRT VARIABLES ──────────────────────────────────────────────────── */
:root {
  --crt-red:   rgb(218, 49,  49);
  --crt-green: rgb(112, 159, 115);
  --crt-blue:  rgb(40,  129, 206);
}

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

/* ── BODY / BACKGROUND ──────────────────────────────────────────────── */
body {
  background: url('https://hhroses.neocities.org/images/backgrounds/pink_clouds.jpg') bottom left repeat;
  background-color: #ffb6c1;
  margin: 0;
  padding: 0;
  font-family: 'Fixedsys', 'Courier New', monospace;
  font-size: 13px;
  color: #2d1b44;
  min-height: 100vh;
  cursor: default;
}

/* ── CRT OVERLAY (from roses.html) ─────────────────────────────────── */
body:before {
  content: "";
  pointer-events: none;
  opacity: .08;
  mix-blend-mode: overlay;
  position: fixed;
  height: 100%; width: 100%;
  left: 0; top: 0;
  z-index: 9000;
  background: repeating-linear-gradient(
    var(--crt-red)   0px,
    var(--crt-green) 2px,
    var(--crt-blue)  4px
  );
}
body:after {
  content: "";
  pointer-events: none;
  opacity: .08;
  mix-blend-mode: overlay;
  position: fixed;
  height: 100%; width: 100%;
  left: 0; top: 0;
  z-index: 9000;
  background: repeating-linear-gradient(90deg,
    var(--crt-red)   1px,
    var(--crt-green) 2px,
    var(--crt-blue)  3px
  );
}

/* ── SCROLLBAR ──────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 16px; background: #c0c0c0; }
::-webkit-scrollbar-track { background: #c0c0c0; }
::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border-top:    2px solid #ffffff;
  border-left:   2px solid #ffffff;
  border-right:  2px solid #808080;
  border-bottom: 2px solid #808080;
}
::-webkit-scrollbar-button { background: #c0c0c0; height: 16px; }

/* ── MARQUEE TICKER ─────────────────────────────────────────────────── */
.marquee-wrap {
  background: #6f4bc5;
  color: #f8f0ff;
  font-family: 'Fixedsys', monospace;
  font-size: 12px;
  padding: 2px 0;
  position: sticky;
  top: 0;
  z-index: 8000;
  border-bottom: 2px solid #d8b7ff;
}

/* ── WIN98 WINDOW CHROME ────────────────────────────────────────────── */
.window {
  background: #f4e8ff;
  border-top:    2px solid #ffffff;
  border-left:   2px solid #ffffff;
  border-right:  2px solid #d6b8ff;
  border-bottom: 2px solid #d6b8ff;
  box-shadow: 0 2px 6px rgba(111, 64, 173, 0.16);
  border-radius: 14px;
  display: block;
  position: relative;
}
.title-bar {
  background: linear-gradient(90deg, #8a62d9, #bf85ff);
  color: #f7f1ff;
  font-family: 'Fixedsys', Arial;
  font-size: 11px;
  padding: 4px 6px 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  cursor: default;
  gap: 4px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.title-bar-text {
  font-family: 'Fixedsys', Arial;
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}
.title-bar-text img {
  width: 14px; height: 14px;
  image-rendering: pixelated;
  vertical-align: middle;
}
.title-bar-controls { display: flex; gap: 2px; flex-shrink: 0; }
.title-bar-controls button {
  width: 16px; height: 14px;
  border-top:    1px solid #ffffff;
  border-left:   1px solid #ffffff;
  border-right:  1px solid #b58eff;
  border-bottom: 1px solid #b58eff;
  background: #f6eeff;
  font-size: 9px;
  padding: 0; line-height: 1;
  font-family: 'Fixedsys', Arial;
  cursor: pointer;
  color: #3c1b6d;
}
.title-bar-controls button:active {
  border-top:    1px solid #b58eff;
  border-left:   1px solid #b58eff;
  border-right:  1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
}
.window-body {
  padding: 10px;
  background: #fff8ff;
  border-top:    2px solid #d9c1ff;
  border-left:   2px solid #d9c1ff;
  border-right:  2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  margin: 2px;
  font-family: 'Fixedsys', monospace;
  font-size: 13px;
  overflow: auto;
  border-radius: 0 0 12px 12px;
}
.window-body.gray { background: #f0e6ff; }

/* ── STATUS BAR ─────────────────────────────────────────────────────── */
.status-bar {
  background: #f3e7ff;
  border-top: 1px solid #f2d7ff;
  padding: 4px 6px;
  font-family: 'Fixedsys', Arial;
  font-size: 11px;
  display: flex;
  gap: 4px;
}
.status-bar-field {
  border-top:    1px solid #e9d0ff;
  border-left:   1px solid #e9d0ff;
  border-right:  1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  background: rgba(255, 255, 255, 0.8);
  padding: 1px 8px;
  white-space: nowrap;
  border-radius: 6px;
}

/* ── DESKTOP ICONS ──────────────────────────────────────────────────── */
.desktop-icons {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}
.deskicon {
  position: absolute;
  width: 74px;
  text-align: center;
  cursor: pointer;
  padding: 2px;
  pointer-events: auto;
}
.deskicon img {
  width: 48px; height: 48px;
  image-rendering: pixelated;
  display: block;
  margin: 0 auto;
}
.deskicon span {
  display: block;
  font-family: 'Fixedsys', Arial;
  font-size: 11px;
  color: #ffffff;
  text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
  padding: 1px 2px;
  margin-top: 2px;
  word-break: break-word;
  line-height: 1.2;
}
.deskicon:hover span {
  background: #a076ff;
  color: #ffffff;
  text-shadow: none;
}

/* ── PAGE LAYOUT ────────────────────────────────────────────────────── */
.page-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 8px 8px 90px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.sidebar-window { width: 185px; flex-shrink: 0; }
.main-window { flex: 1; min-width: 0; }
.right-sidebar { width: 155px; flex-shrink: 0; }

/* ── NAVIGATION LIST ────────────────────────────────────────────────── */
.nav-section-label {
  font-family: 'Fixedsys', monospace;
  font-size: 11px;
  color: #808080;
  padding: 4px 2px 2px;
  border-bottom: 1px solid #808080;
  margin-bottom: 2px;
}
.nav-list { list-style: none; padding: 0; margin: 0 0 4px; }
.nav-list li a {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Fixedsys', monospace;
  font-size: 12px;
  color: #000080;
  text-decoration: none;
  padding: 1px 4px;
}
.nav-list li a:hover,
.nav-list li a.active {
  background: #a076ff;
  color: #ffffff;
}
.nav-list li a img {
  width: 16px; height: 16px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

/* ── HEADINGS ───────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: '8bitfont', 'Fixedsys', monospace;
  color: #4b2b7b;
  margin: 4px 0 6px;
}
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
h4 { font-size: 13px; }

/* ── RESOURCE LISTS ─────────────────────────────────────────────────── */
.resource-list { list-style: none; padding: 0; margin: 0; }
.resource-list li {
  padding: 4px 0;
  border-bottom: 1px dotted #d6b8ff;
  font-family: 'Fixedsys', monospace;
  font-size: 13px;
  line-height: 1.4;
}
.resource-list li:last-child { border-bottom: none; }
.resource-list li:before { content: "> "; color: #5d3a9c; font-weight: bold; }
.resource-list a { color: #5d3a9c; text-decoration: underline; }
.resource-list a:hover { color: #d65cf8; }
.resource-list a:visited { color: #7b57b5; }
.resource-why {
  display: block;
  color: #5a3d7a;
  font-size: 11px;
  padding-left: 14px;
  font-family: 'Fixedsys', monospace;
  line-height: 1.3;
}

/* ── BUTTONS ────────────────────────────────────────────────────────── */
.btn {
  background: #f6e0ff;
  border-top:    2px solid #ffffff;
  border-left:   2px solid #ffffff;
  border-right:  2px solid #d9b8ff;
  border-bottom: 2px solid #d9b8ff;
  font-family: 'Fixedsys', Arial;
  font-size: 13px;
  padding: 5px 16px;
  cursor: pointer;
  color: #3c1b6d;
  text-decoration: none;
  display: inline-block;
  user-select: none;
  border-radius: 10px;
}
.btn:hover { background: #ffd9ff; }
.btn:active {
  border-top:    2px solid #d9b8ff;
  border-left:   2px solid #d9b8ff;
  border-right:  2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}
.btn-lg {
  font-size: 17px;
  padding: 10px 32px;
  letter-spacing: 2px;
  border-radius: 14px;
}
/* Pure-decoration window (no content, just GIFs/links) */
.decor-win { text-align: center; }
.decor-win .window-body { padding: 8px 6px; }
.covenant-links a {
  display: flex; align-items: center; gap: 6px;
  font-family: 'Fixedsys', monospace; font-size: 12px;
  color: #3c1b6d; text-decoration: none;
  padding: 3px 6px;
}
.covenant-links a:hover { background: #a076ff; color: #fff; }

/* ── FIXED DECORATIVE GIFS ──────────────────────────────────────────── */
.float-decor {
  position: fixed;
  pointer-events: none;
  z-index: 50;
}
.float-decor.bottom-right { bottom: 20px; right: 16px; }
.float-decor.top-right    { top: 30px;    right: 16px; }
.float-decor.bottom-left  { bottom: 20px; left: 90px;  }
.float-decor.top-left     { top: 30px;    left: 90px;  }

/* ── SUBJECT CARD GRID ──────────────────────────────────────────────── */
.subject-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.subject-card { text-decoration: none; color: #000000; display: block; }
.subject-card:hover .title-bar { background: linear-gradient(to right, #c57cff, #ff9bee); }
.subject-card-body {
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fixedsys', monospace;
  font-size: 12px;
  line-height: 1.4;
}
.subject-card-body img { width: 36px; height: 36px; image-rendering: pixelated; flex-shrink: 0; }
.subject-card-name {
  font-family: '8bitfont', 'Fixedsys', monospace;
  font-size: 14px;
  color: #4a238c;
  display: block;
  margin-bottom: 2px;
}
.subject-card-desc { font-size: 11px; color: #5b3f7f; font-family: 'Fixedsys', monospace; }
.tips-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tip-box {
  background: #fffff0;
  border-top:    2px solid #ffffff;
  border-left:   2px solid #ffffff;
  border-right:  2px solid #808080;
  border-bottom: 2px solid #808080;
  padding: 6px;
  font-family: 'Fixedsys', monospace;
  font-size: 12px;
  line-height: 1.4;
}
.tip-number {
  color: #000080; font-weight: bold;
  display: block; margin-bottom: 3px;
  font-family: '8bitfont', 'Fixedsys', monospace;
}

/* ── STEPS LIST ─────────────────────────────────────────────────────── */
.steps-list { padding-left: 18px; margin: 0; }
.steps-list li {
  font-family: 'Fixedsys', monospace;
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 1px dotted #c0c0c0;
  line-height: 1.4;
}
.steps-list li:last-child { border-bottom: none; }
.steps-list li strong { color: #000080; display: block; }

/* ── DISCLAIMER ─────────────────────────────────────────────────────── */
.disclaimer {
  background: #ffffc0;
  border-top:    2px solid #ffffff;
  border-left:   2px solid #ffffff;
  border-right:  2px solid #808080;
  border-bottom: 2px solid #808080;
  padding: 6px 10px;
  font-family: 'Fixedsys', monospace;
  font-size: 12px;
  margin-bottom: 8px;
  line-height: 1.4;
}

/* ── CARD ───────────────────────────────────────────────────────────── */
.card {
  background: #ffffff;
  border-top:    2px solid #808080;
  border-left:   2px solid #808080;
  border-right:  2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  padding: 8px;
  margin-bottom: 8px;
  font-family: 'Fixedsys', monospace;
  font-size: 13px;
  line-height: 1.5;
}

/* ── BADGES ─────────────────────────────────────────────────────────── */
.badge-row { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; }
.badge-row a { display: block; line-height: 0; }
.badge-row img { image-rendering: pixelated; display: block; }

/* ── PAGE HEADER ────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid #808080;
}
.page-header img.subject-icon {
  width: 48px; height: 48px;
  image-rendering: pixelated;
  flex-shrink: 0;
}
.page-header-title { flex: 1; }
.page-header-title h1 { margin: 0 0 2px; }
.page-header-sub {
  font-family: 'basiic', 'Fixedsys', monospace;
  font-size: 15px;
  color: #808080;
}
.breadcrumb {
  font-family: 'Fixedsys', monospace;
  font-size: 11px;
  color: #808080;
  text-align: right;
  white-space: nowrap;
}
.breadcrumb a { color: #000080; }
.breadcrumb a:hover { color: #cc0000; }

/* ── DIVIDERS ───────────────────────────────────────────────────────── */
.pixel-divider {
  height: 0;
  border-top: 2px solid #808080;
  border-bottom: 2px solid #ffffff;
  margin: 8px 0;
}
.decor-divider { text-align: center; padding: 4px 0; }
.decor-divider img { image-rendering: pixelated; max-width: 100%; }

/* ── GLOBAL DEFAULTS ────────────────────────────────────────────────── */
a { color: #000080; }
a:hover { color: #cc0000; }
a:visited { color: #800080; }
p { margin: 4px 0 8px; line-height: 1.5; font-family: 'Fixedsys', monospace; }
ul, ol { font-family: 'Fixedsys', monospace; }
strong { color: #000080; }
hr {
  border: none;
  border-top: 2px solid #808080;
  border-bottom: 2px solid #ffffff;
  margin: 8px 0;
}
img { image-rendering: pixelated; }

/* ── MOBILE NAV ─────────────────────────────────────────────────────── */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 28px; left: 4px;
  z-index: 8500;
  background: #c0c0c0;
  border-top:    2px solid #ffffff;
  border-left:   2px solid #ffffff;
  border-right:  2px solid #808080;
  border-bottom: 2px solid #808080;
  font-family: 'Fixedsys', monospace;
  font-size: 12px;
  padding: 3px 8px;
  cursor: pointer;
}
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 7000;
}
.mobile-overlay.open { display: block; }

/* ── FADE-IN ANIMATION ──────────────────────────────────────────────── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in {
  animation: fadeIn 0.4s ease-in-out;
}

@media (max-width: 900px) {
  .mobile-nav-toggle { display: block; }
  .desktop-icons { display: none; }
  .page-wrap {
    flex-direction: column;
    padding-left: 8px;
    padding-right: 8px;
    padding-top: 50px;
  }
  .sidebar-window {
    width: 100%;
    position: fixed;
    top: 0; left: 0;
    z-index: 7500;
    transform: translateX(-100%);
    transition: transform 0.2s;
    max-height: 100vh;
    overflow-y: auto;
  }
  .sidebar-window.open { transform: translateX(0); }
  .right-sidebar { width: 100%; }
  .tips-grid { grid-template-columns: 1fr; }
  .subject-grid { grid-template-columns: 1fr; }
  .float-decor { display: none; }
  .bob-decor   { display: none; }
  .spin-decor  { display: none; }
  /* Mini app windows: not accessible on mobile (no desktop icons), force hidden */
  #app-calculator, #app-connectfour, #app-snake, #app-notepad { display: none !important; }
}
@media (max-width: 480px) {
  .page-header { flex-direction: column; align-items: flex-start; }
  .breadcrumb { text-align: left; }
  /* Marquee bar: shrink logo on very small screens */
  .logo-bar-img { height: 14px; }
  marquee { font-size: 11px; }
}

/* ── SUBJECT PAGE LAYOUT (.layout-wrapper variant) ──────────────────── */
.layout-wrapper {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.sidebar-left {
  width: 185px;
  flex-shrink: 0;
  background: #f4e8ff;
  border-top:    2px solid #ffffff;
  border-left:   2px solid #ffffff;
  border-right:  2px solid #d6b8ff;
  border-bottom: 2px solid #d6b8ff;
  box-shadow: 0 2px 6px rgba(111, 64, 173, 0.16);
  border-radius: 14px;
}
.sidebar-left nav {
  padding: 6px 4px;
  background: #fff8ff;
  border-top:    2px solid #d9c1ff;
  border-left:   2px solid #d9c1ff;
  border-right:  2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  margin: 2px;
}

.main-content { flex: 1; min-width: 0; }

.sidebar-right {
  width: 155px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── SITE HEADER (subject pages) ────────────────────────────────────── */
.site-header {
  max-width: 1080px;
  margin: 8px auto 0;
  padding: 8px 12px;
  background: #f4e8ff;
  border-top:    2px solid #ffffff;
  border-left:   2px solid #ffffff;
  border-right:  2px solid #d6b8ff;
  border-bottom: 2px solid #d6b8ff;
  box-shadow: 0 2px 6px rgba(111, 64, 173, 0.16);
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
}
.header-logo {
  grid-column: 1;
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
}
.header-logo-img {
  width: 48px; height: 48px;
  image-rendering: pixelated;
  display: block;
}
.site-title {
  grid-column: 2; grid-row: 1;
  font-family: '8bitfont', 'Fixedsys', monospace;
  font-size: 20px;
  color: #4b2b7b;
  margin: 0;
}
.site-subtitle {
  grid-column: 2; grid-row: 2;
  font-family: 'Fixedsys', monospace;
  font-size: 11px;
  color: #808080;
}
.site-header .breadcrumb {
  grid-column: 3; grid-row: 1 / 3;
  align-self: center;
}

/* ── NAV SECTIONS (.nav-section / .nav-section-title) ───────────────── */
.nav-section { margin-bottom: 4px; }
.nav-section-title {
  font-family: 'Fixedsys', monospace;
  font-size: 11px;
  color: #808080;
  padding: 4px 2px 2px;
  border-bottom: 1px solid #808080;
  margin-bottom: 2px;
}

/* ── SECTION PANELS (Win98 window chrome for content sections) ───────── */
.section-panel {
  background: #f4e8ff;
  border-top:    2px solid #ffffff;
  border-left:   2px solid #ffffff;
  border-right:  2px solid #d6b8ff;
  border-bottom: 2px solid #d6b8ff;
  box-shadow: 0 2px 6px rgba(111, 64, 173, 0.16);
  margin-bottom: 8px;
  border-radius: 14px;
}
.section-panel-header {
  background: linear-gradient(90deg, #8a62d9, #bf85ff);
  color: #f7f1ff;
  font-family: 'Fixedsys', Arial;
  font-size: 11px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.section-panel-header h2 {
  font-family: '8bitfont', 'Fixedsys', monospace;
  font-size: 13px;
  color: #f7f1ff;
  margin: 0;
}
.section-icon {
  width: 16px; height: 16px;
  image-rendering: pixelated;
  flex-shrink: 0;
}
.section-panel-body {
  padding: 10px;
  background: #fff8ff;
  border-top:    2px solid #d9c1ff;
  border-left:   2px solid #d9c1ff;
  border-right:  2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  margin: 2px;
  font-family: 'Fixedsys', monospace;
  font-size: 13px;
  overflow: auto;
  border-radius: 0 0 12px 12px;
}

/* ── WIDGETS (right sidebar) ────────────────────────────────────────── */
.widget {
  background: #f4e8ff;
  border-top:    2px solid #ffffff;
  border-left:   2px solid #ffffff;
  border-right:  2px solid #d6b8ff;
  border-bottom: 2px solid #d6b8ff;
  box-shadow: 0 2px 6px rgba(111, 64, 173, 0.16);
  border-radius: 14px;
}
.widget-header {
  background: linear-gradient(90deg, #8a62d9, #bf85ff);
  color: #f7f1ff;
  font-family: 'Fixedsys', Arial;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 8px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.widget-body {
  padding: 8px;
  background: #fff8ff;
  border-top:    2px solid #d9c1ff;
  border-left:   2px solid #d9c1ff;
  border-right:  2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  margin: 2px;
  font-family: 'Fixedsys', monospace;
  font-size: 12px;
  border-radius: 0 0 12px 12px;
}

/* ── SITE FOOTER ────────────────────────────────────────────────────── */
.site-footer {
  max-width: 1080px;
  margin: 8px auto;
  padding: 8px 12px;
  background: #f4e8ff;
  border-top:    2px solid #ffffff;
  border-left:   2px solid #ffffff;
  border-right:  2px solid #d6b8ff;
  border-bottom: 2px solid #d6b8ff;
  font-family: 'Fixedsys', monospace;
  font-size: 12px;
  text-align: center;
  color: #5d3a9c;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  justify-content: center;
  margin-bottom: 6px;
}
.footer-nav a {
  font-family: 'Fixedsys', monospace;
  font-size: 12px;
  color: #000080;
  text-decoration: none;
}
.footer-nav a:hover { color: #cc0000; }

/* ── TWIST ANIMATION ────────────────────────────────────────────────── */
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-3px); }
}
.twist { animation: bob 2s ease-in-out infinite; }

/* ── MOBILE: layout-wrapper variant ────────────────────────────────── */
@media (max-width: 900px) {
  .site-header {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    margin: 50px 8px 0;
    padding: 6px 8px;
  }
  .site-header .breadcrumb { grid-column: 1 / 3; grid-row: 3; text-align: left; }
  .layout-wrapper {
    flex-direction: column;
    padding: 8px;
  }
  .sidebar-left {
    width: 100%;
    position: fixed;
    top: 0; left: 0;
    z-index: 7500;
    transform: translateX(-100%);
    transition: transform 0.2s;
    max-height: 100vh;
    overflow-y: auto;
  }
  .sidebar-left.open { transform: translateX(0); }
  .sidebar-right { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .widget { flex: 1 1 140px; }
  /* Subject pages: hide fixed decoratives that overflow on mobile */
  .float-decor, .bob-decor, .brand-decor, .spin-decor { display: none; }
  /* Section panels: allow scroll on mobile */
  .section-panel-body { overflow-x: auto; }
  /* Resource lists: wrap comfortably */
  .resource-list li { word-break: break-word; }
}
@media (max-width: 480px) {
  .site-title { font-size: 16px; }
  .sidebar-right { flex-direction: column; }
  .widget { flex: unset; }
}

/* ── WIN98 TASKBAR ──────────────────────────────────────────────────────── */
body { padding-bottom: 32px; }

#win98-taskbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 30px;
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  display: flex;
  align-items: center;
  padding: 2px 4px;
  gap: 4px;
  z-index: 9990;
  font-family: 'Fixedsys', monospace;
  font-size: 12px;
}

#tb-start {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #c0c0c0;
  border-top:    2px solid #ffffff;
  border-left:   2px solid #ffffff;
  border-right:  2px solid #808080;
  border-bottom: 2px solid #808080;
  padding: 2px 10px 2px 6px;
  font-family: 'Fixedsys', monospace;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  color: #000000;
  flex-shrink: 0;
}
#tb-start.pressed {
  border-top:    2px solid #808080;
  border-left:   2px solid #808080;
  border-right:  2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}

/* Start Menu */
#tb-startmenu {
  display: none;
  position: absolute;
  bottom: 30px;
  left: 0;
  min-width: 200px;
  background: #c0c0c0;
  border-top:    2px solid #ffffff;
  border-left:   2px solid #ffffff;
  border-right:  2px solid #808080;
  border-bottom: 2px solid #808080;
  box-shadow: 2px 2px 0 #000000;
  z-index: 10001;
  flex-direction: row;
}
#tb-startmenu.open { display: flex; }

.sm-banner {
  background: linear-gradient(180deg, #4b2b7b, #8a62d9, #bf85ff);
  color: #ffffff;
  font-family: '8bitfont', 'Fixedsys', monospace;
  font-size: 16px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 8px 4px;
  letter-spacing: 4px;
  min-height: 160px;
  user-select: none;
  flex-shrink: 0;
}

.sm-items {
  display: flex;
  flex-direction: column;
  padding: 2px 0;
  flex: 1;
}
.sm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  font-family: 'Fixedsys', monospace;
  font-size: 12px;
  color: #000000;
  text-decoration: none;
  white-space: nowrap;
}
.sm-item:hover {
  background: #000080;
  color: #ffffff;
}
.sm-item img { flex-shrink: 0; image-rendering: pixelated; }
.sm-sep {
  border-top: 1px solid #808080;
  border-bottom: 1px solid #ffffff;
  margin: 3px 4px;
}

/* Taskbar window buttons */
#tb-windows {
  flex: 1;
  display: flex;
  gap: 2px;
  overflow: hidden;
  min-width: 0;
}
.tb-win-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #c0c0c0;
  border-top:    1px solid #808080;
  border-left:   1px solid #808080;
  border-right:  1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  font-family: 'Fixedsys', monospace;
  font-size: 11px;
  padding: 1px 8px;
  cursor: pointer;
  max-width: 130px;
  min-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #000000;
}
.tb-win-btn img { image-rendering: pixelated; flex-shrink: 0; }
.tb-win-btn.active {
  border-top:    1px solid #ffffff;
  border-left:   1px solid #ffffff;
  border-right:  1px solid #808080;
  border-bottom: 1px solid #808080;
}

/* Tray (clock + icons) */
#tb-tray {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #c0c0c0;
  border-top:    1px solid #808080;
  border-left:   1px solid #808080;
  border-right:  1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  padding: 1px 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
#tb-clock {
  font-family: 'Fixedsys', monospace;
  font-size: 12px;
  color: #000000;
}

/* ── FLOATING / DETACHED WINDOWS ────────────────────────────────────────── */
.floating,
.section-panel[data-floating="1"],
.window[data-floating="1"] {
  box-shadow: 4px 4px 0 rgba(0,0,0,0.5), 6px 6px 12px rgba(0,0,0,0.3);
}

.win-placeholder {
  border: 2px dashed #d6b8ff;
  background: rgba(160, 110, 220, 0.06);
  margin-bottom: 8px;
  box-sizing: border-box;
}

/* Section panel window controls (minimize/close) */
.sp-controls {
  margin-left: auto;
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.sp-btn {
  width: 16px; height: 14px;
  border-top:    1px solid #ffffff;
  border-left:   1px solid #ffffff;
  border-right:  1px solid #9060d0;
  border-bottom: 1px solid #9060d0;
  background: #e8d8ff;
  font-size: 9px;
  padding: 0; line-height: 1;
  font-family: 'Fixedsys', Arial;
  cursor: pointer;
  color: #3c1b6d;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-btn:active {
  border-top:    1px solid #9060d0;
  border-left:   1px solid #9060d0;
  border-right:  1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
}

/* ── DECORATIVE FLOAT GIFs — extra positions ────────────────────────────── */
.float-decor.bottom-left2 { bottom: 50px; left: 100px; }
.float-decor.top-left2    { top:  50px;  left: 100px; }
.float-decor.mid-right    { top:  50%;   right: 16px; transform: translateY(-50%); }

/* ── 13 33 BRAND WATERMARK ──────────────────────────────────────────────── */
.brand-decor {
  position: fixed;
  pointer-events: none;
  z-index: 50;
  opacity: 0.18;
  image-rendering: pixelated;
}
.brand-decor.br { bottom: 38px; right: 12px; }
.brand-decor.bl { bottom: 38px; left:  12px; }
.brand-decor.tr { top: 34px;   right: 12px; }
.brand-decor.tl { top: 34px;   left:  12px; }

@media (max-width: 900px) {
  .brand-decor { display: none; }
  #win98-taskbar { height: 26px; }
  body { padding-bottom: 28px; }
  #tb-start { padding: 1px 8px 1px 4px; font-size: 11px; }
  .sm-banner { font-size: 13px; padding: 6px 3px; min-height: 120px; }
  .index-desktop { display: none; }
}

/* ── ENTRANCE ANIMATIONS (index.html desktop sim) ───────────────────────── */
@keyframes slideInTop {
  from { transform: translateY(-60px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
@keyframes slideInBottom {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes slideInLeft {
  from { transform: translateX(-60px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
@keyframes slideInRight {
  from { transform: translateX(60px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(180, 100, 255, 0.3); }
  50%       { box-shadow: 0 0 20px rgba(180, 100, 255, 0.7); }
}

.anim-slide-top    { animation: slideInTop    0.9s cubic-bezier(0.22,1,0.36,1) forwards; opacity: 0; }
.anim-slide-bottom { animation: slideInBottom 0.9s cubic-bezier(0.22,1,0.36,1) forwards; opacity: 0; }
.anim-slide-left   { animation: slideInLeft   0.9s cubic-bezier(0.22,1,0.36,1) forwards; opacity: 0; }
.anim-slide-right  { animation: slideInRight  0.9s cubic-bezier(0.22,1,0.36,1) forwards; opacity: 0; }
.anim-delay-1 { animation-delay: 0.15s; }
.anim-delay-2 { animation-delay: 0.3s;  }
.anim-delay-3 { animation-delay: 0.45s; }
.anim-delay-4 { animation-delay: 0.6s;  }
.anim-delay-5 { animation-delay: 0.8s;  }

/* Spin corner element (like hhroses CD) */
.spin-decor {
  position: fixed;
  pointer-events: none;
  z-index: 40;
  animation: spinSlow 8s linear infinite;
}

/* Bobbing float element */
.bob-decor {
  position: fixed;
  pointer-events: none;
  z-index: 50;
  animation: bob 3s ease-in-out infinite;
}

/* Tilt variants for decorative windows */
.tilt-left  { transform: rotate(-2deg); }
.tilt-right { transform: rotate(2deg); }
.window.tilt-left:hover,
.window.tilt-right:hover { transform: rotate(0deg); transition: transform 0.2s ease; }

/* Glow on active/floating window — only after dragged (.floating added by JS) */
.window.floating,
.section-panel.floating {
  animation: glowPulse 2s ease-in-out infinite;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.5), 0 0 18px rgba(180,100,255,0.35);
}

/* Desktop simulation body (index.html) */
body.index-desktop-mode {
  overflow: hidden;
  height: 100vh;
}

/* Win98-style inset text for index title area */
.index-title-wrap {
  position: fixed;
  left: 50%;
  top: 36px;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 16px;
  pointer-events: none;
}

/* Notebook/chain divider in sidebar */
.sidebar-gif-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 4px 0;
  flex-wrap: wrap;
}

/* ── SITE LOGO (top of marquee bar) ────────────────────────────────────── */
.marquee-wrap { display: flex; align-items: center; gap: 0; padding-left: 4px; }
.marquee-wrap marquee { flex: 1; min-width: 0; }
.logo-bar-img {
  height: 18px;
  width: auto;
  flex-shrink: 0;
  margin-right: 6px;
  image-rendering: pixelated;
  opacity: 0.95;
}

/* ── FOOTER WATERMARK (1333subtle) ─────────────────────────────────────── */
.logo-watermark {
  position: fixed;
  bottom: 38px;
  left: 8px;
  width: 88px;
  opacity: 0.09;
  z-index: 60;
  pointer-events: none;
  image-rendering: pixelated;
}

/* ── BIOS STARTUP OVERLAY ───────────────────────────────────────────────── */
#bios-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.6s ease;
  cursor: pointer;
}
#bios-gif {
  max-width: 90vw;
  max-height: 75vh;
  image-rendering: auto;
}
#bios-prompt {
  color: #ffffff;
  font-family: 'Fixedsys', 'Courier New', monospace;
  font-size: 14px;
  letter-spacing: 0.08em;
  pointer-events: none;
}
@keyframes bios-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.bios-blink {
  animation: bios-blink 0.9s step-start infinite;
}
#bios-overlay.bios-fade-out {
  opacity: 0;
  pointer-events: none;
}

/* ── MINI APP WINDOWS ───────────────────────────────────────────────────── */

/* Calculator */
.app-calc-display {
  background: #000;
  color: #00ff00;
  font-family: 'Fixedsys', monospace;
  font-size: 15px;
  text-align: right;
  padding: 4px 6px;
  margin-bottom: 5px;
  border-top:    2px solid #808080;
  border-left:   2px solid #808080;
  border-right:  2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  min-height: 1.5em;
  word-break: break-all;
  max-width: 100%;
}
.app-calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(5, 30px);
  gap: 3px;
}
.app-calc-btn {
  border-top:    2px solid #ffffff;
  border-left:   2px solid #ffffff;
  border-right:  2px solid #808080;
  border-bottom: 2px solid #808080;
  background: #c0c0c0;
  font-family: 'Fixedsys', monospace;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  box-sizing: border-box;
  color: #000;
}
.app-calc-btn:active {
  border-top:    2px solid #808080;
  border-left:   2px solid #808080;
  border-right:  2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}
.app-calc-op   { color: #800000; font-weight: bold; }
.app-calc-zero { grid-column: span 2; }

/* Connect Four */
.app-c4-status {
  text-align: center;
  font-family: 'Fixedsys', monospace;
  font-size: 13px;
  margin-bottom: 5px;
  min-height: 1.2em;
  font-weight: bold;
}
.app-c4-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  background: #000080;
  padding: 5px;
  width: 100%;
  box-sizing: border-box;
}
.app-c4-cell {
  border-radius: 50%;
  background: #c0c0c0;
  cursor: pointer;
  border: 1px solid #808080;
  aspect-ratio: 1;
  transition: background 0.07s;
}
.app-c4-cell[data-player="1"] { background: #ff2020; cursor: default; }
.app-c4-cell[data-player="2"] { background: #ffee00; cursor: default; }
.app-c4-cell.c4-win           { box-shadow: 0 0 0 2px #fff inset; }
.app-c4-new-btn {
  display: block;
  width: 100%;
  margin-top: 6px;
  border-top:    2px solid #ffffff;
  border-left:   2px solid #ffffff;
  border-right:  2px solid #808080;
  border-bottom: 2px solid #808080;
  background: #c0c0c0;
  font-family: 'Fixedsys', monospace;
  font-size: 12px;
  cursor: pointer;
  padding: 3px 0;
}
.app-c4-new-btn:active {
  border-top:    2px solid #808080;
  border-left:   2px solid #808080;
  border-right:  2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}

/* Snake */
.app-snake-status {
  text-align: center;
  font-family: 'Fixedsys', monospace;
  font-size: 12px;
  margin-bottom: 4px;
}
#snake-canvas {
  display: block;
  margin: 0 auto;
  border: 2px solid #808080;
  background: #000;
  cursor: pointer;
  image-rendering: pixelated;
}

/* Notepad */
.app-notepad-area {
  width: 100%;
  height: 180px;
  font-family: 'Fixedsys', monospace;
  font-size: 13px;
  background: #fff;
  color: #000;
  border-top:    2px solid #808080;
  border-left:   2px solid #808080;
  border-right:  2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  resize: none;
  padding: 4px;
  box-sizing: border-box;
}
