:root {
  --desktop-blue: #008080;
  --win-face: #c0c0c0;
  --win-light: #ffffff;
  --win-mid: #dfdfdf;
  --win-shadow: #808080;
  --win-dark: #000000;
  --title-start: #000080;
  --title-end: #1084d0;
  --hot-pink: #ff00ff;
  --link-blue: #0000ee;
  --visited: #551a8b;
  --warning: #ffff00;
  --ok-green: #00a000;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--desktop-blue);
}

body {
  min-height: 100vh;
  margin: 0;
  color: #000;
  font-family: "MS Sans Serif", "Microsoft Sans Serif", Tahoma, Geneva, sans-serif;
  font-size: 13px;
  letter-spacing: 0;
  background-color: var(--desktop-blue);
  background-image:
    url("clouds.jpg"),
    radial-gradient(ellipse at 20% 18%, rgba(255, 255, 255, 0.9) 0 12%, transparent 13%),
    radial-gradient(ellipse at 70% 28%, rgba(255, 255, 255, 0.75) 0 11%, transparent 12%),
    linear-gradient(#7ec8ff, #b7e5ff 46%, #3aa0de 47%, #008080);
  background-repeat: repeat;
  cursor: default;
}

a {
  color: var(--link-blue);
  text-decoration: underline;
}

a:visited {
  color: var(--visited);
}

button,
input,
textarea {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 999;
  padding: 6px 10px;
  color: #000;
  background: var(--warning);
  border: 2px outset var(--win-face);
}

.skip-link:focus {
  top: 8px;
}

.desktop {
  position: relative;
  width: min(1180px, calc(100vw - 20px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 8px 68px;
}

.marquee-window {
  position: sticky;
  top: 0;
  z-index: 80;
  margin-bottom: 14px;
}

.window {
  background: var(--win-face);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  box-shadow: 1px 1px 0 var(--win-shadow);
}

.window[hidden] {
  display: none;
}

.window.is-maximized {
  position: fixed;
  inset: 8px 8px 42px 8px;
  z-index: 120;
  overflow: auto;
}

.window-inner {
  border-top: 1px solid var(--win-mid);
  border-left: 1px solid var(--win-mid);
  border-right: 1px solid var(--win-shadow);
  border-bottom: 1px solid var(--win-shadow);
}

.title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 22px;
  padding: 2px 3px 2px 6px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(90deg, var(--title-start), var(--title-end));
  user-select: none;
}

.title-text {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  margin: 0;
  gap: 5px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.title-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 1px solid #fff;
  background:
    linear-gradient(90deg, #ff0 0 50%, #f00 50%),
    linear-gradient(#00f, #00f);
}

.title-buttons {
  display: inline-flex;
  gap: 2px;
}

.win-button,
.button95 {
  min-width: 22px;
  min-height: 20px;
  padding: 1px 6px;
  color: #000;
  background: var(--win-face);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
  line-height: 1;
}

.win-button {
  width: 18px;
  height: 16px;
  min-width: 18px;
  min-height: 16px;
  padding: 0;
  font-size: 11px;
  font-weight: 700;
}

.win-button:active,
.button95:active {
  border-top-color: var(--win-dark);
  border-left-color: var(--win-dark);
  border-right-color: var(--win-light);
  border-bottom-color: var(--win-light);
  padding-top: 2px;
  padding-left: 7px;
}

.win-button:active {
  padding: 1px 0 0 1px;
}

.window-body {
  padding: 10px;
}

.sunken {
  background: #fff;
  border-top: 2px solid var(--win-shadow);
  border-left: 2px solid var(--win-shadow);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
}

.ticker {
  height: 28px;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-track {
  display: inline-block;
  min-width: 100%;
  padding: 6px 0;
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
  animation: ticker-scroll 28s linear infinite;
}

@keyframes ticker-scroll {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}

.desktop-icons {
  position: absolute;
  left: 10px;
  top: 70px;
  z-index: 20;
  width: 96px;
}

.desktop-icon {
  position: absolute;
  width: 76px;
  min-height: 76px;
  padding: 4px;
  color: #fff;
  text-align: center;
  text-shadow: 1px 1px #000;
  border: 1px dotted transparent;
  background: transparent;
  user-select: none;
  touch-action: none;
}

.desktop-icon:focus,
.desktop-icon.dragging {
  border-color: #fff;
  outline: 1px dotted #000;
  background: rgba(0, 0, 128, 0.35);
}

.icon-art {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: 0 auto 4px;
  color: #000;
  font-family: "Courier New", monospace;
  font-size: 18px;
  font-weight: 700;
  text-shadow: none;
  background: #ffffcc;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
}

.icon-art.mtg {
  color: #fff;
  background: linear-gradient(135deg, #2b1510, #b61f1f 48%, #f0c15a);
}

.icon-art.training {
  color: #fff;
  background: linear-gradient(135deg, #111, #666);
}

.icon-art.contact {
  background: linear-gradient(#fff, #d7ecff);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
  gap: 14px;
  margin-left: 104px;
}

.column {
  display: grid;
  gap: 14px;
  align-content: start;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 12px;
}

.brand-logo {
  margin: 0 0 8px;
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(28px, 6vw, 58px);
  line-height: 0.9;
  text-transform: uppercase;
  color: var(--hot-pink);
  text-shadow: 2px 2px 0 #ffff00, 4px 4px 0 #000;
}

.under-construction {
  display: inline-block;
  margin: 8px 0;
  padding: 4px 8px;
  font-weight: 700;
  background: repeating-linear-gradient(45deg, #ffff00 0 8px, #000 8px 16px);
  color: #000;
  border: 2px outset var(--win-face);
}

.under-construction span {
  display: inline-block;
  padding: 2px 5px;
  background: #ffff00;
}

.portrait-frame {
  align-self: start;
  padding: 8px;
  background: #000;
  color: #0f0;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  text-align: center;
}

.ascii-face {
  display: block;
  margin: 0 auto 6px;
  white-space: pre;
  line-height: 1.05;
}

.divider {
  height: 2px;
  margin: 10px 0;
  background: var(--win-shadow);
  border-bottom: 1px solid var(--win-light);
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.fact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fact-list > div {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px dotted var(--win-shadow);
}

.fact-list strong {
  color: #800000;
}

.fact-list dt,
.fact-list dd {
  margin: 0;
}

.odometer {
  display: inline-flex;
  gap: 2px;
  padding: 5px;
  background: #000;
  border: 2px inset var(--win-face);
}

.digit {
  width: 20px;
  padding: 3px 0;
  color: #f33;
  font-family: "Courier New", Courier, monospace;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  background: linear-gradient(#151515, #000 45%, #222 46%, #050505);
  border: 1px solid #333;
}

.counter-note,
.small-print {
  margin: 8px 0 0;
  font-size: 11px;
}

.midi-display {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.speaker {
  width: 50px;
  height: 50px;
  background:
    radial-gradient(circle at center, #111 0 30%, transparent 31%),
    repeating-linear-gradient(45deg, #909090 0 4px, #bcbcbc 4px 8px);
  border: 2px inset var(--win-face);
}

.eq-bars {
  display: flex;
  align-items: end;
  height: 30px;
  gap: 3px;
  padding: 4px;
  background: #000;
  border: 2px inset var(--win-face);
}

.eq-bars span {
  width: 10px;
  background: #00ff00;
  animation: equalize 900ms steps(4, end) infinite;
}

.eq-bars span:nth-child(2) { animation-delay: 120ms; }
.eq-bars span:nth-child(3) { animation-delay: 240ms; }
.eq-bars span:nth-child(4) { animation-delay: 360ms; }
.eq-bars span:nth-child(5) { animation-delay: 480ms; }

@keyframes equalize {
  0%, 100% { height: 8px; }
  40% { height: 22px; }
  70% { height: 14px; }
}

.player-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.track-progress {
  height: 12px;
  margin-top: 5px;
  overflow: hidden;
  background: #fff;
}

.track-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: repeating-linear-gradient(90deg, #000080 0 6px, #1084d0 6px 12px);
}

.guestbook-form {
  display: grid;
  gap: 8px;
}

.field-row {
  display: grid;
  gap: 4px;
}

.field-row label {
  font-weight: 700;
}

.field-row input,
.field-row textarea {
  width: 100%;
  padding: 5px;
  border: 2px inset var(--win-face);
  border-radius: 0;
  background: #fff;
}

.field-row textarea {
  min-height: 104px;
  resize: vertical;
  font-family: "Courier New", Courier, monospace;
}

.guestbook-status {
  min-height: 18px;
  margin: 0;
  color: #004000;
  font-weight: 700;
}

.guestbook-entries {
  display: grid;
  gap: 6px;
  max-height: 220px;
  margin-top: 10px;
  padding: 8px;
  overflow: auto;
}

.guestbook-entry {
  padding-bottom: 6px;
  border-bottom: 1px dotted var(--win-shadow);
}

.guestbook-entry strong {
  display: inline-block;
  color: #000080;
}

.guestbook-entry time {
  float: right;
  color: #555;
  font-size: 11px;
}

.guestbook-entry p {
  clear: both;
  margin: 4px 0 0;
  font-family: "Courier New", Courier, monospace;
}

.list-box {
  margin: 0;
  padding: 8px 8px 8px 28px;
  background: #fff;
  border: 2px inset var(--win-face);
}

.list-box li {
  margin: 4px 0;
}

.webring {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 8px;
  background: #000;
  color: #fff;
  font-family: "Courier New", Courier, monospace;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.badge88 {
  display: inline-grid;
  place-items: center;
  width: 88px;
  height: 31px;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  background: #fff;
  border: 1px solid #000;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #555;
}

.badge-notepad {
  background: linear-gradient(90deg, #fff 0 22px, #87ceeb 22px);
}

.badge-netscape {
  color: #fff;
  background: linear-gradient(90deg, #0033cc 0 28px, #00a6a6 28px);
}

.badge-github {
  color: #fff;
  background: linear-gradient(90deg, #111 0 30px, #444 30px);
}

.status-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 3px 4px;
  background: var(--win-face);
  border-top: 2px solid var(--win-light);
}

.start-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 72px;
  font-weight: 700;
}

.start-flag {
  width: 16px;
  height: 14px;
  background:
    linear-gradient(90deg, #f00 0 50%, #0a0 50%),
    linear-gradient(#00f, #ff0);
  border: 1px solid #000;
}

.task-tray {
  display: flex;
  gap: 4px;
  flex: 1;
  min-width: 0;
  padding: 4px 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.task-button {
  max-width: 160px;
  min-height: 20px;
  padding: 1px 8px;
  overflow: hidden;
  color: #000;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--win-face);
  border-top: 2px solid var(--win-light);
  border-left: 2px solid var(--win-light);
  border-right: 2px solid var(--win-dark);
  border-bottom: 2px solid var(--win-dark);
}

.task-button:disabled {
  color: #333;
  border-top-color: var(--win-shadow);
  border-left-color: var(--win-shadow);
  border-right-color: var(--win-light);
  border-bottom-color: var(--win-light);
}

.start-menu {
  position: fixed;
  left: 4px;
  bottom: 35px;
  z-index: 150;
  display: grid;
  width: 220px;
  padding: 4px;
}

.start-menu[hidden] {
  display: none;
}

.start-menu button {
  padding: 7px 9px;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
}

.start-menu button:hover,
.start-menu button:focus {
  color: #fff;
  background: #000080;
  outline: none;
}

.clock {
  width: 88px;
  padding: 4px 6px;
  text-align: center;
}

@media (max-width: 820px) {
  .desktop {
    width: 100%;
    padding: 10px 8px 68px;
  }

  .desktop-icons {
    position: relative;
    top: auto;
    left: auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(62px, 1fr));
    width: 100%;
    min-height: 86px;
    margin-bottom: 12px;
  }

  .desktop-icon {
    position: relative;
    inset: auto !important;
    width: auto;
  }

  .main-grid {
    grid-template-columns: 1fr;
    margin-left: 0;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .portrait-frame {
    width: min(260px, 100%);
  }
}

@media (max-width: 480px) {
  body {
    font-size: 12px;
  }

  .quick-links {
    grid-template-columns: 1fr;
  }

  .fact-list > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .desktop-icons {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
  }

  .title-text {
    max-width: calc(100vw - 108px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track,
  .eq-bars span {
    animation: none;
  }
}

/* Nannerb2: early ChrisSpace profile skin */
.chrisspace-page {
  min-height: 100vh;
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 2px, transparent 2px 8px),
    linear-gradient(#cfe3ff, #ffffff 170px, #d6e9ff);
}

.chrisspace-page a {
  color: #003399;
  font-weight: 700;
}

.ms-topbar {
  background: #003399;
  border-bottom: 4px solid #ff6600;
}

.ms-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(960px, calc(100vw - 16px));
  margin: 0 auto;
  padding: 6px 0;
}

.ms-logo {
  color: #fff !important;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
  text-decoration: none;
}

.ms-topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ms-topbar nav a {
  color: #fff;
  font-size: 11px;
  text-decoration: none;
}

.ms-ad-banner {
  display: flex;
  justify-content: center;
  gap: 18px;
  width: min(960px, calc(100vw - 16px));
  margin: 8px auto;
  padding: 8px;
  color: #003399;
  font-weight: 700;
  text-align: center;
  background: #ffffcc;
  border: 1px solid #ff9900;
}

.ms-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 12px;
  width: min(960px, calc(100vw - 16px));
  margin: 0 auto 20px;
}

.ms-left,
.ms-right {
  display: grid;
  gap: 10px;
  align-content: start;
}

.ms-card {
  background: #fff;
  border: 2px solid #6699cc;
}

.ms-card h1,
.ms-card h2,
.ms-card h3 {
  margin: 0;
}

.ms-card h1 {
  padding: 7px;
  color: #003399;
  font-size: 20px;
}

.ms-card h2 {
  padding: 5px 7px;
  color: #fff;
  font-size: 13px;
  background: #ff6600;
}

.ms-card h3 {
  padding: 7px 7px 0;
  color: #ff6600;
  font-size: 13px;
}

.ms-card p,
.ms-card ul,
.ms-card table,
.ms-card form,
.ms-contact-grid,
.ms-friends,
.ms-app-badges {
  margin: 7px;
}

.ms-mood {
  padding: 4px;
  background: #e6f0ff;
  border-top: 1px solid #6699cc;
  border-bottom: 1px solid #6699cc;
}

.ms-profile-photo {
  display: grid;
  place-items: center;
  min-height: 210px;
  margin: 7px;
  color: #00ff00;
  background: #000;
  border: 1px solid #333;
}

.ms-profile-photo pre {
  margin: 0;
  font-family: "Courier New", Courier, monospace;
  font-size: 18px;
  line-height: 1.05;
}

.ms-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #6699cc;
}

.ms-contact-grid a {
  padding: 7px 5px;
  text-align: center;
  text-decoration: none;
  border: 1px solid #c7dcf2;
}

.ms-details table,
.ms-interests table {
  width: calc(100% - 14px);
  border-collapse: collapse;
}

.ms-details th,
.ms-interests th {
  width: 92px;
  padding: 5px;
  color: #336699;
  text-align: left;
  vertical-align: top;
  background: #d6e9ff;
}

.ms-details td,
.ms-interests td {
  padding: 5px;
  background: #f1f7ff;
}

.ms-headline {
  padding-bottom: 8px;
}

.ms-headline h2 {
  margin: 7px;
  color: #003399;
  font-size: 18px;
  background: transparent;
}

.ms-url {
  color: #555;
  font-family: "Courier New", Courier, monospace;
}

.ms-glitter {
  color: #ff00ff;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  text-shadow: 1px 1px #ffff00, 2px 2px #00ffff;
  animation: glitter-flash 900ms steps(2, end) infinite;
}

@keyframes glitter-flash {
  0%, 100% { background: #fff; }
  50% { background: #ffffcc; }
}

.ms-app-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ms-app-badges span {
  padding: 3px 7px;
  color: #fff;
  font-weight: 700;
  background: #003399;
  border: 2px outset #6699cc;
}

.ms-friend-count {
  color: #cc0000;
  font-weight: 700;
}

.ms-friends {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ms-friends article {
  text-align: center;
}

.ms-friends div {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(135deg, #003399, #66ccff);
  border: 2px solid #fff;
  outline: 1px solid #6699cc;
}

.ms-friends strong {
  display: block;
  margin-top: 4px;
  color: #003399;
  font-size: 11px;
}

.ms-memes {
  background: #fff8fb;
  border-color: #ff66cc;
}

.ms-memes h2 {
  background: #ff66cc;
}

.ms-comment {
  margin: 7px;
  padding: 7px;
  background: #f1f7ff;
  border: 1px solid #c7dcf2;
}

.ms-comment strong {
  color: #ff6600;
}

.ms-comment-form {
  display: grid;
  gap: 5px;
}

.ms-comment-form input,
.ms-comment-form textarea {
  width: 100%;
  padding: 5px;
  border: 1px solid #6699cc;
}

.ms-comment-form textarea {
  min-height: 70px;
}

.ms-comment-form button,
.ms-player button {
  padding: 4px 8px;
  color: #fff;
  font-weight: 700;
  background: #ff6600;
  border: 2px outset #ffcc99;
}

.chrisspace-page .guestbook-entries {
  margin: 7px;
  padding: 7px;
  background: #fff;
  border: 1px solid #6699cc;
}

.chrisspace-page .guestbook-entry {
  padding: 6px 0;
}

.ms-footer {
  width: min(960px, calc(100vw - 16px));
  margin: 0 auto 24px;
  padding: 10px;
  text-align: center;
  background: #fff;
  border: 1px solid #6699cc;
}

@media (max-width: 760px) {
  .ms-topbar-inner,
  .ms-ad-banner {
    display: grid;
    gap: 6px;
  }

  .ms-shell {
    grid-template-columns: 1fr;
  }

  .ms-friends {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ms-glitter {
    animation: none;
  }
}
