/* ==========================================================================
   1. Design tokens and document defaults
   ========================================================================== */

:root {
  --desktop: #0c4a6e;
  --win-gray: #c0c0c0;
  --win-light: #ffffff;
  --win-mid: #808080;
  --win-dark: #000000;
  --title-blue: #000080;
  --title-blue-light: #1084d0;
  --text: #101010;
  --taskbar-height: 42px;
  font-family: "MS Sans Serif", Tahoma, Geneva, sans-serif;
  color: var(--text);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}


/* Classic Windows 95 scrollbars for pages, windows and internal lists. */
* {
  scrollbar-color: #808080 #dfdfdf;
  scrollbar-width: auto;
}

*::-webkit-scrollbar {
  width: 17px;
  height: 17px;
}

*::-webkit-scrollbar-track,
*::-webkit-scrollbar-track-piece {
  background:
    conic-gradient(#fff 25%, #c0c0c0 0 50%, #fff 0 75%, #c0c0c0 0)
    0 0 / 2px 2px;
  box-shadow: inset 1px 1px #808080, inset -1px -1px #fff;
}

*::-webkit-scrollbar-thumb {
  min-width: 28px;
  min-height: 28px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  background: #c0c0c0;
  box-shadow: inset 1px 1px #dfdfdf, inset -1px -1px #808080;
}

*::-webkit-scrollbar-button:single-button {
  display: block;
  width: 17px;
  height: 17px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  background-color: #c0c0c0;
  background-repeat: no-repeat;
  background-position: center;
}

*::-webkit-scrollbar-button:single-button:vertical:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M4 1 0 5h8z' fill='%23000'/%3E%3C/svg%3E");
}

*::-webkit-scrollbar-button:single-button:vertical:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M0 2h8L4 6z' fill='%23000'/%3E%3C/svg%3E");
}

*::-webkit-scrollbar-button:single-button:horizontal:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M1 4 5 0v8z' fill='%23000'/%3E%3C/svg%3E");
}

*::-webkit-scrollbar-button:single-button:horizontal:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M2 0l4 4-4 4z' fill='%23000'/%3E%3C/svg%3E");
}

*::-webkit-scrollbar-corner {
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  background: #c0c0c0;
}
html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

/* ==========================================================================
   2. Desktop and shortcuts
   ========================================================================== */

.desktop {
  position: relative;
  width: 100%;
  height: calc(100% - var(--taskbar-height));
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 13%, rgb(255 255 255 / 5%) 0 1px, transparent 2px),
    linear-gradient(135deg, transparent 0 72%, rgb(255 255 255 / 3%) 72% 72.2%, transparent 72.2%),
    var(--desktop);
  background-size: 30px 30px, 100% 100%, auto;
}

.desktop::after {
  content: "";
  position: absolute;
  right: 3vw;
  bottom: 4vh;
  width: min(31vw, 440px);
  aspect-ratio: 1.7;
  opacity: 0.08;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 48%, #fff 48% 51%, transparent 51%),
    linear-gradient(transparent 48%, #fff 48% 51%, transparent 51%);
  transform: perspective(380px) rotateY(-16deg) rotateZ(-7deg);
  filter: blur(0.4px);
}

.desktop-heading {
  position: absolute;
  top: 30px;
  right: 38px;
  z-index: 0;
  max-width: min(56vw, 690px);
  color: #fff;
  text-align: right;
  text-shadow: 3px 3px 0 rgb(0 0 0 / 26%);
}

.desktop-heading h1 {
  margin: 0;
  font-size: clamp(27px, 4.2vw, 60px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.desktop-heading p {
  margin: 10px 0 0;
  font-size: clamp(13px, 1.25vw, 18px);
  letter-spacing: 0.02em;
}

.desktop-icons {
  position: absolute;
  inset: 22px auto auto 18px;
  z-index: 2;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(5, auto);
  gap: 14px;
  width: 190px;
}

.desktop-icon {
  display: grid;
  justify-items: center;
  gap: 5px;
  width: 88px;
  padding: 3px;
  border: 1px solid transparent;
  color: #fff;
  background: transparent;
  text-shadow: 1px 1px #000;
  cursor: default;
}

.desktop-link {
  text-decoration: none;
}

.desktop-icon:hover,
.desktop-icon:focus-visible {
  border-color: rgb(255 255 255 / 55%);
  outline: 1px dotted #fff;
  outline-offset: -3px;
  background: rgb(0 0 128 / 28%);
}

.desktop-icon > span:last-child {
  padding: 1px 3px;
  font-size: 12px;
  line-height: 1.15;
  text-align: center;
}

.pixel-icon {
  position: relative;
  display: block;
  width: 40px;
  height: 40px;
  filter: drop-shadow(2px 2px 0 rgb(0 0 0 / 32%));
}

.pixel-svg-icon,
.desktop-image-icon {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(2px 2px 0 rgb(0 0 0 / 34%));
}

.pixel-svg-icon {
  image-rendering: pixelated;
}

.shell-icon {
  width: 46px;
  height: 40px;
}

.app-square-icon {
  width: 42px;
  height: 42px;
}

.computer-image-icon {
  width: 48px;
  height: 48px;
}

.cs-ico-icon {
  width: 32px;
  height: 32px;
}

.calendar-icon,
.folder-icon {
  width: 42px;
  height: 42px;
}

.computer-screen {
  position: absolute;
  inset: 3px 5px 13px;
  border: 4px ridge #dfdfdf;
  background: linear-gradient(135deg, #001c55, #0b8fc2);
  box-shadow: inset 0 0 0 2px #050505;
}

.computer-screen::after {
  content: "C:\\>_";
  position: absolute;
  top: 8px;
  left: 6px;
  color: #fff;
  font: 7px monospace;
}

.computer-base {
  position: absolute;
  right: 8px;
  bottom: 4px;
  left: 8px;
  height: 10px;
  border: 3px outset #ddd;
  background: #aaa;
}

.gamepad-body {
  position: absolute;
  top: 10px;
  left: 3px;
  width: 42px;
  height: 28px;
  border: 3px outset #ddd;
  border-radius: 11px 11px 16px 16px;
  background: #b8b8b8;
  transform: rotate(-4deg);
}

.gamepad-cross {
  position: absolute;
  top: 14px;
  left: 10px;
  z-index: 1;
  color: #111;
  font: 700 20px/1 monospace;
}

.gamepad-buttons {
  position: absolute;
  top: 15px;
  right: 8px;
  z-index: 1;
  color: #b50000;
  font: 700 18px/1 monospace;
  letter-spacing: 2px;
}

.target-icon {
  border: 3px outset #ddd;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #efefef 0 5px, #d00000 6px 10px);
}

.target-icon::before,
.target-icon::after {
  content: "";
  position: absolute;
  background: #111;
}

.target-icon::before {
  top: -3px;
  left: 21px;
  width: 2px;
  height: 48px;
}

.target-icon::after {
  top: 21px;
  left: -3px;
  width: 48px;
  height: 2px;
}

.info-icon {
  display: grid;
  place-items: center;
  border: 2px outset #e4e4e4;
  border-radius: 50%;
  color: #000080;
  background: #fff;
  font-family: Georgia, serif;
  font-size: 29px;
  font-weight: 900;
}

/* ==========================================================================
   3. Shared Windows 95 window chrome
   ========================================================================== */

.window {
  position: absolute;
  top: var(--window-y);
  left: var(--window-x);
  z-index: 10;
  display: none;
  flex-direction: column;
  width: min(var(--window-width), calc(100vw - 32px));
  max-height: calc(100% - 28px);
  padding: 3px;
  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);
  background: var(--win-gray);
  box-shadow: 2px 2px 0 rgb(0 0 0 / 42%), 12px 14px 24px rgb(0 0 0 / 17%);
}

/* Initial positions belong to presentation, not the HTML structure. */
#welcome-window {
  --window-x: 23vw;
  --window-y: 18vh;
  --window-width: 560px;
}
#mario-window {
  --window-x: 8vw;
  --window-y: 7vh;
  --window-width: 920px;
}
#cs-window {
  --window-x: 22vw;
  --window-y: 5px;
  --window-width: 820px;
  height: calc(100% - 10px);
  max-height: calc(100% - 10px);
}
#crepe-window {
  --window-x: 24vw;
  --window-y: 8vh;
  --window-width: 720px;
}
#yarg-window {
  --window-x: 20vw;
  --window-y: 9vh;
  --window-width: 690px;
}
#media-player-window {
  --window-x: 16vw;
  --window-y: 7vh;
  --window-width: 820px;
}
#steam-window {
  --window-x: 9vw;
  --window-y: 5vh;
  --window-width: 980px;
}
#about-window {
  --window-x: 27vw;
  --window-y: 5vh;
  --window-width: 670px;
}
#calendar-window {
  --window-x: 17vw;
  --window-y: 6vh;
  --window-width: 760px;
}
#unreal-window {
  --window-x: 10vw;
  --window-y: 4vh;
  --window-width: 900px;
}
#chat-window {
  --window-x: 18vw;
  --window-y: 8vh;
  --window-width: 650px;
}
#downloads-window {
  --window-x: 31vw;
  --window-y: 23vh;
  --window-width: 510px;
}

#suggestions-window {
  --window-x: 24vw;
  --window-y: 10vh;
  --window-width: 660px;
}

.ideas-box-desktop-icon {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.suggestions-content {
  padding: 18px;
  background: #f5f0ff;
}

.suggestions-header {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 3px double #55127d;
}

.suggestions-header > img {
  width: 104px;
  height: 100px;
  object-fit: contain;
  image-rendering: pixelated;
}

.suggestions-header h2,
.suggestions-header p {
  margin: 0 0 7px;
}

.suggestions-form {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px 12px;
  align-items: start;
  padding: 14px;
  border: 2px inset #fff;
  background: #ddd;
}

.suggestions-form > label:not(.suggestion-honeypot) {
  padding-top: 7px;
  font-weight: 700;
}

.suggestions-form textarea {
  min-height: 120px;
  resize: vertical;
}

.suggestions-form input,
.suggestions-form textarea {
  width: 100%;
  padding: 7px;
  border: 2px inset #fff;
  background: #fff;
}

.suggestion-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.suggestions-privacy,
.suggestions-actions,
.suggestions-form .form-message {
  grid-column: 2;
}

.suggestions-privacy {
  margin: 0;
  color: #444;
  font-size: 12px;
}

.suggestions-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 740px) {
  .suggestions-header,
  .suggestions-form {
    grid-template-columns: 1fr;
  }

  .suggestions-header > img {
    width: 80px;
    height: 76px;
  }

  .suggestions-privacy,
  .suggestions-actions,
  .suggestions-form .form-message {
    grid-column: 1;
  }
}

.window.is-open {
  display: flex;
}

.window.is-active .titlebar {
  background: linear-gradient(90deg, var(--title-blue), var(--title-blue-light));
}

.window.theme-orange .titlebar {
  background: linear-gradient(90deg, #8a2e00, #df6f0d 58%, #ffad30);
}

.window.theme-purple .titlebar {
  background: linear-gradient(90deg, #2c0758, #6f218e 58%, #bd4bd2);
}

.window.theme-deep-purple .titlebar {
  background: linear-gradient(90deg, #170046, #4b168c 60%, #7e35b2);
}

.window.theme-cyan .titlebar {
  background: linear-gradient(90deg, #004e64, #007f8b 58%, #20a7aa);
}

.window.theme-navy .titlebar {
  background: linear-gradient(90deg, #001437, #002d68 60%, #176aa0);
}

.titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 26px;
  padding: 2px 3px 2px 5px;
  color: #fff;
  background: var(--win-mid);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  user-select: none;
  cursor: move;
}

.titlebar-title {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.titlebar-mini-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 5px;
  color: #111;
  border: 1px solid #fff;
  background: #f7d52c;
  font-size: 12px;
}

.window-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
}

.window-controls button,
.win-button {
  min-width: 22px;
  height: 21px;
  padding: 0 5px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  background: var(--win-gray);
  font-weight: 700;
  line-height: 14px;
  cursor: pointer;
}

.window-controls button:active,
.win-button:active,
.start-button:active,
.task-button.is-active {
  border-top-color: #000;
  border-left-color: #000;
  border-right-color: #fff;
  border-bottom-color: #fff;
}

.window-menu {
  display: flex;
  gap: 20px;
  padding: 5px 9px;
  font-size: 13px;
}

.window-content {
  min-height: 0;
  overflow: auto;
  border-top: 2px solid var(--win-mid);
  border-left: 2px solid var(--win-mid);
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: #fff;
}

.welcome-content {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  padding: 26px;
}

.welcome-logo,
.about-mark {
  display: block;
  width: 78px;
  height: 78px;
  border: 4px outset #dfdfdf;
  object-fit: cover;
}

.eyebrow {
  margin: 0 0 4px;
  color: #000080;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.window h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.window p {
  line-height: 1.45;
}

.system-note {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  padding: 8px 10px;
  border: 1px dotted #555;
  background: #ffffdf;
}

.system-note p {
  margin: 0;
  font-size: 13px;
}

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

.welcome-wifi[hidden] {
  display: none;
}

.welcome-wifi > div {
  min-width: 0;
  padding: 8px 10px;
  border: 2px inset #fff;
  background: #d8eaff;
}

.welcome-wifi span,
.welcome-wifi strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.welcome-wifi span {
  color: #414141;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.welcome-wifi strong {
  margin-top: 2px;
  color: #000080;
  font: 700 13px "Courier New", monospace;
}

.window-status {
  display: flex;
  gap: 4px;
  padding-top: 3px;
  font-size: 11px;
}

.window-status span {
  flex: 1;
  padding: 3px 5px;
  border-top: 1px solid var(--win-mid);
  border-left: 1px solid var(--win-mid);
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
}

/* ==========================================================================
   4. Application-specific views
   ========================================================================== */

/* Mario Kart */
.mario-content {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  background: #efefdf;
}

.help-sidebar {
  padding: 12px 7px;
  border-right: 2px groove #fff;
  background: #d6d6c7;
}

.help-sidebar-title {
  margin: 0 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.help-topic {
  width: 100%;
  padding: 7px 6px;
  border: 0;
  background: transparent;
  text-align: left;
}

.help-topic.active {
  color: #fff;
  background: #000080;
}

.help-panel[hidden] {
  display: none;
}

.controller-help {
  min-width: 0;
  padding: 18px 20px 20px;
}

.help-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid #000080;
}

.help-book {
  display: grid;
  place-items: center;
  width: 42px;
  height: 46px;
  color: #fff;
  border: 3px outset #ddd;
  background: #000080;
  font: 700 27px Georgia, serif;
}

.help-header h2 {
  margin-bottom: 9px;
}

.controller-diagram {
  margin: 10px -4px 2px;
  border: 1px dotted #86866f;
  background:
    linear-gradient(90deg, rgb(0 0 128 / 4%) 1px, transparent 1px),
    linear-gradient(rgb(0 0 128 / 4%) 1px, transparent 1px),
    #ffffef;
  background-size: 12px 12px;
}

.controller-diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

.controller-pixel-art {
  image-rendering: pixelated;
  filter: drop-shadow(6px 7px 0 rgb(17 24 39 / 35%));
}

.callout-lines path {
  fill: none;
  stroke: #000080;
  stroke-width: 3;
  stroke-dasharray: 5 4;
}

.callout-labels .callout-key {
  fill: #000080;
  font-size: 16px;
  font-weight: 800;
}

.callout-labels .callout-action {
  fill: #111;
  font-size: 14px;
  font-weight: 700;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
  margin-top: 12px;
}

.control-grid > div {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px;
  border: 1px solid #aaa;
  background: #fff;
  font-size: 12px;
}

kbd {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  height: 28px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #333;
  border-bottom: 2px solid #333;
  background: #d5d5d5;
  font: 700 13px monospace;
}

.fine-print {
  margin-bottom: 0;
  color: #555;
  font-size: 11px;
}

.lakitu-gif {
  width: 70px;
  height: 78px;
  border: 2px outset #ddd;
  object-fit: cover;
  image-rendering: pixelated;
}

.help-copy {
  padding-top: 14px;
}

.help-copy > p:first-child {
  margin-top: 0;
}

.retro-tip {
  display: grid;
  grid-template-columns: minmax(110px, auto) 1fr;
  gap: 8px 14px;
  align-items: center;
  margin: 14px 0;
  padding: 10px 12px;
  border-top: 2px solid #555;
  border-left: 2px solid #555;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: #ffffdf;
  line-height: 1.4;
}

.important-tip {
  background: #fff1a8;
}

.retro-tip kbd,
.item-defense kbd,
.drift-steps kbd {
  display: inline-grid;
  width: 28px;
  vertical-align: middle;
}

.timing-grid,
.boost-levels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.timing-grid > div {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 2px outset #ddd;
  background: #fff;
  font-size: 12px;
  line-height: 1.35;
}

.timing-grid strong {
  color: #000080;
}

.drift-book {
  background: #8a2e00;
}

.drift-steps {
  margin: 4px 0 16px;
  padding-left: 27px;
}

.drift-steps li {
  margin-bottom: 11px;
  line-height: 1.45;
}

.boost-levels > div {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 1px 8px;
  align-items: center;
  padding: 8px;
  border: 2px outset #ddd;
  background: #fff;
}

.boost-levels span {
  grid-row: 1 / 3;
  width: 20px;
  height: 34px;
  border: 1px solid #111;
  box-shadow: 2px 2px 0 #777;
}

.boost-levels small {
  color: #555;
}

.boost-blue span {
  background: #168cff;
}
.boost-orange span {
  background: #ff7917;
}
.boost-purple span {
  background: #b030d0;
}

.item-book {
  background: #086b22;
}

.item-defense {
  margin: 13px 0;
  padding: 10px 12px;
  border: 2px solid #7d6200;
  background: #fff1a8;
}

.item-defense p {
  margin: 5px 0 0;
  font-size: 12px;
}

.item-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.item-list > div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 3px;
  align-items: center;
  padding: 8px;
  border: 1px solid #999;
  background: #fff;
  font-size: 11px;
  line-height: 1.35;
}

.item-list b {
  display: block;
  color: #000080;
  font-size: 12px;
}

.item-copy {
  display: grid;
  gap: 3px;
}

.item-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border: 2px inset #dfdfdf;
  background: #111;
  image-rendering: pixelated;
}

.item-art > img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: cover;
}

.item-art.triple > img {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 1px solid #333;
}

.item-art.triple > img:nth-child(1) {
  left: 1px;
  top: 16px;
}

.item-art.triple > img:nth-child(2) {
  left: 9px;
  top: 2px;
}

.item-art.triple > img:nth-child(3) {
  right: 1px;
  top: 16px;
}

.rules-content {
  padding: 22px 24px;
  font-family: "Courier New", monospace;
}

.under-construction {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: -22px -24px 23px;
  padding: 12px 16px;
  color: #000;
  border-bottom: 2px solid #000;
  background: repeating-linear-gradient(135deg, #f8d528 0 14px, #1c1c1c 14px 28px);
}

.under-construction > span {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  height: 34px;
  border: 2px solid #111;
  background: #f8d528;
  font-size: 25px;
}

.under-construction div {
  padding: 5px 8px;
  background: #f8d528;
}

.under-construction small {
  display: block;
  margin-top: 2px;
}

.rules-content h2 {
  display: inline-block;
  padding-bottom: 3px;
  border-bottom: 4px double #000;
}

.rules-content li {
  margin-bottom: 10px;
  line-height: 1.4;
}
/* Counter-Strike */
.cs-final-rules {
  padding-left: 28px;
}
.cs-final-rules > li {
  margin-bottom: 18px;
}
.cs-final-rules h3 {
  margin: 0 0 5px;
  font-size: 16px;
  text-transform: uppercase;
}
.cs-final-rules p {
  margin: 5px 0;
}
.cs-final-rules ul {
  margin: 7px 0;
}

.cs-registration {
  margin-top: 20px;
  padding: 10px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #555;
  border-bottom: 2px solid #555;
  background: #d8d8d8;
  font-family: Arial, sans-serif;
}

.cs-registration-heading,
.cs-participants-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.cs-registration h3 {
  margin: 0;
  font-size: 16px;
}

.cs-live-badge {
  padding: 3px 6px;
  color: #003d00;
  border: 1px solid #555;
  background: #8fff8f;
  font-size: 10px;
  font-weight: 700;
}

.cs-registration-form {
  display: grid;
  grid-template-columns: auto minmax(120px, .7fr) auto minmax(190px, 1.3fr) auto;
  gap: 4px 8px;
  align-items: center;
  margin: 8px 0 12px;
  padding: 8px;
  border-top: 2px solid #555;
  border-left: 2px solid #555;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: #eee;
}

.cs-registration-form > label {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.cs-registration-form > label[for="cs-name"] {
  grid-column: 1;
  grid-row: 1;
}
.cs-registration-form > #cs-name {
  grid-column: 2;
  grid-row: 1;
}
.cs-registration-form > label[for="cs-skill"] {
  grid-column: 3;
  grid-row: 1;
}
.cs-registration-form > .cs-skill-row {
  grid-column: 4;
  grid-row: 1;
}

.cs-skill-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
}

.cs-skill-row input {
  width: 100%;
  accent-color: #000080;
}

.cs-skill-row output {
  padding: 5px;
  border: 2px inset #fff;
  background: #fff;
  text-align: center;
  font-weight: 700;
}

.cs-skill-label {
  grid-column: 4;
  grid-row: 2;
  min-height: 14px;
  margin: -1px 0 0;
  color: #000080;
  font-size: 11px;
  font-weight: 700;
}

.cs-registration-form .win-button {
  grid-column: 5;
  grid-row: 1;
  min-width: 88px;
  height: 29px;
  justify-self: stretch;
}

.form-message {
  grid-column: 1 / -1;
  min-height: 17px;
  margin: 0;
  font-size: 12px;
}

.form-message.success {
  color: #075b07;
  font-weight: 700;
}

.form-message.error {
  color: #a00000;
  font-weight: 700;
}

.cs-participants-heading {
  margin-bottom: 6px;
}

.cs-participants-heading small {
  color: #555;
}

.cs-participant-list {
  max-height: 250px;
  overflow: auto;
  border-top: 2px solid #555;
  border-left: 2px solid #555;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: #fff;
}

.cs-participant-row {
  display: grid;
  grid-template-columns: 34px minmax(110px, 0.8fr) minmax(170px, 1.3fr) minmax(120px, 0.9fr);
  gap: 8px;
  padding: 7px 8px;
  border-bottom: 1px solid #bbb;
  font-size: 12px;
}

.cs-participant-row:nth-child(even) {
  background: #eee;
}

.cs-participant-rating {
  color: #000080;
}

.cs-participant-team {
  padding: 2px 5px;
  color: #fff;
  background: #6b1687;
  font-weight: 700;
  text-align: center;
}

.cs-participant-team.is-unassigned {
  color: #555;
  background: #ddd;
  font-weight: 400;
}

.cs-team-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 7px;
  margin: 7px 0 10px;
}
.cs-team-card {
  padding: 7px;
  border: 2px outset #fff;
  background: #ececec;
  font-size: 12px;
}
.cs-team-card h4 {
  margin: 0 0 5px;
  color: #000080;
}
.cs-team-card ol {
  margin: 0;
  padding-left: 24px;
}
.cs-team-card li {
  margin: 2px 0;
}
.cs-team-card .cs-team-leader {
  color: #6b1687;
  font-weight: 700;
}
.cs-reserve-heading {
  display: block;
  margin-top: 7px;
  color: #555;
  font-size: 11px;
  text-transform: uppercase;
}
.cs-reserve-list {
  margin: 3px 0 0;
  padding-left: 20px;
  color: #555;
}
.cs-team-card p {
  margin: 0;
  color: #555;
}

/* Crêpe-O-Mat */
.crepe-content {
  display: grid;
  grid-template-columns: minmax(150px, 42%) 1fr;
  gap: 20px;
  align-items: center;
  padding: 22px;
  background: #fff8df;
}

.crepe-spin-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.crepe-spin-button img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  filter: drop-shadow(4px 5px 0 rgb(84 40 13 / 18%));
}

.crepe-spin-button.is-spinning img {
  animation: crepe-spin-360 650ms ease-in-out;
}

@keyframes crepe-spin-360 {
  to {
    transform: rotate(360deg);
  }
}

.locked-message {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 14px 0 18px;
  padding: 10px;
  border: 2px solid #9b4f00;
  background: #ffe69a;
}

.locked-message > span {
  font-size: 25px;
}

.locked-message p {
  margin: 0;
  font-size: 13px;
}

.locked-message.is-enabled {
  border-color: #176317;
  background: #c9f7c9;
}

.fake-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
}

.win-input {
  width: 100%;
  height: 29px;
  padding: 4px 7px;
  border-top: 2px solid #555;
  border-left: 2px solid #555;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: #eee;
}

.order-button {
  width: 100%;
  margin-top: 10px;
}

.order-button:disabled,
.toolbar-row .win-button:disabled {
  color: #777;
  text-shadow: 1px 1px #fff;
  cursor: not-allowed;
}

.crepe-ingredients {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0 8px;
  padding: 10px;
  border: 2px groove #fff;
  background: #fff3c9;
}

.crepe-ingredients legend {
  padding: 0 5px;
  font-size: 12px;
  font-weight: 700;
}

.crepe-ingredients label {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 25px;
  padding: 3px 5px;
  border: 1px solid #c79b55;
  background: #fffaf0;
  font-size: 12px;
}

.crepe-ingredients input {
  width: 17px;
  height: 17px;
  accent-color: #c65600;
}

.ingredient-unavailable {
  color: #777;
  text-decoration: line-through;
  cursor: not-allowed;
}

.ingredient-unavailable small {
  margin-left: auto;
  padding: 1px 4px;
  color: #fff;
  background: #a00000;
  text-decoration: none;
  font-weight: 700;
}

.crepe-selection {
  min-height: 30px;
  margin: 5px 0;
  color: #6a3400;
  font-size: 11px;
  line-height: 1.35;
}

.crepe-public-orders {
  grid-column: 1 / -1;
  padding-top: 12px;
  border-top: 2px groove #fff;
}
.crepe-public-orders-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.crepe-public-orders-heading h3 {
  margin: 0 0 7px;
}
.crepe-public-orders-heading small {
  color: #6a3400;
}
.crepe-public-order-list {
  display: grid;
  gap: 5px;
  max-height: 210px;
  overflow: auto;
  border: 2px inset #fff;
  background: #fff;
}
.crepe-public-order {
  display: grid;
  grid-template-columns: minmax(100px, .7fr) minmax(180px, 1.5fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border-bottom: 1px solid #c7aa7d;
  font-size: 12px;
}
.crepe-public-order.is-done {
  background: #d8ffd8;
}
.crepe-public-order-status {
  padding: 3px 6px;
  color: #fff;
  background: #a44d00;
  font-weight: 700;
  text-align: center;
}
.crepe-public-order.is-done .crepe-public-order-status {
  background: #176d17;
}

/* LAN Messenger */
.messenger-desktop-icon {
  height: 40px;
  image-rendering: pixelated;
}

.messenger-content {
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto;
  height: min(430px, calc(100vh - 150px));
  min-height: 340px;
  padding: 8px;
  background: #c0c0c0;
}

.messenger-contact {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 2px outset #fff;
  background: linear-gradient(90deg, #dceaff, #fff);
}

.messenger-contact img {
  width: 42px;
  height: 42px;
  image-rendering: pixelated;
}

.messenger-contact strong,
.messenger-contact span {
  display: block;
}

.messenger-contact strong {
  color: #000080;
}

.messenger-contact span {
  margin-top: 3px;
  color: #555;
  font-size: 12px;
}

.messenger-contact i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border: 1px solid #075b07;
  background: #2ed62e;
}

.messenger-history {
  min-height: 0;
  margin: 7px 0;
  padding: 4px 6px;
  overflow: auto;
  border: 2px inset #fff;
  background: #fff;
  font-family: "Courier New", monospace;
  font-size: 13px;
}

.messenger-empty {
  margin: 8px;
  color: #666;
  text-align: center;
}

.messenger-message {
  display: grid;
  grid-template-columns: 42px auto minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
  padding: 2px 4px;
}

.messenger-message.is-own {
  background: #fffde2;
}

.messenger-message strong {
  color: #000080;
  white-space: nowrap;
}

.messenger-message time {
  color: #666;
  font-size: 10px;
  white-space: nowrap;
}

.messenger-message p {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.messenger-day {
  margin: 5px 0 3px;
  padding: 2px 6px;
  color: #fff;
  background: #808080;
  font: 700 10px Arial, sans-serif;
  text-align: center;
}

.messenger-compose {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 6px 8px;
  align-items: start;
  padding: 9px;
  border: 2px outset #fff;
  background: #dedede;
}

.messenger-compose label {
  padding-top: 6px;
  font-size: 12px;
  font-weight: 700;
}

.messenger-compose textarea {
  width: 100%;
  min-height: 46px;
  padding: 6px;
  resize: vertical;
  border: 2px inset #fff;
  background: #fff;
  font: inherit;
}

.messenger-compose-footer {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.messenger-compose-footer small {
  color: #555;
}

.messenger-compose-footer .win-button {
  position: relative;
  z-index: 1;
  min-width: 92px;
  height: 30px;
}

.messenger-compose .form-message {
  margin-top: -22px;
  padding-right: 105px;
  pointer-events: none;
}

/* Clippy */
.clippy-assistant {
  position: fixed;
  right: 16px;
  bottom: 46px;
  z-index: 9000;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: min(660px, calc(100vw - 24px));
}

.clippy-assistant[hidden] {
  display: none;
}

.clippy-bubble {
  position: relative;
  width: min(360px, calc(100vw - 298px));
  padding: 12px 27px 11px 13px;
  border: 2px solid #111;
  border-radius: 8px;
  background: #ffffd7;
  box-shadow: 3px 3px 0 rgb(0 0 0 / 35%);
  font-family: Arial, sans-serif;
}

.clippy-bubble::after {
  position: absolute;
  right: -13px;
  bottom: 22px;
  width: 20px;
  height: 20px;
  border-top: 2px solid #111;
  border-right: 2px solid #111;
  background: #ffffd7;
  content: '';
  transform: rotate(45deg);
}

.clippy-bubble p {
  margin: 2px 0 7px;
  font-size: 13px;
  line-height: 1.35;
}

.clippy-bubble cite {
  display: block;
  margin-bottom: 7px;
  color: #000080;
  font-size: 11px;
  font-weight: 700;
}

.clippy-bubble small {
  color: #666;
  font-size: 10px;
}

.clippy-close {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
  width: 19px;
  height: 19px;
  padding: 0;
  border: 1px solid #777;
  background: #c0c0c0;
  font-weight: 700;
  line-height: 15px;
}

.clippy-character {
  flex: 0 0 auto;
  width: 264px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(3px 3px 0 rgb(0 0 0 / 28%));
}

.clippy-character:hover,
.clippy-character:focus-visible {
  transform: translateY(-3px);
}

.clippy-character img {
  display: block;
  width: 264px;
  height: auto;
  image-rendering: pixelated;
}

@media (max-width: 600px) {
  .crepe-public-order {
    grid-template-columns: 1fr;
  }
  .crepe-public-order-status {
    justify-self: start;
  }
  .messenger-content {
    height: calc(100vh - 190px);
    min-height: 360px;
  }
  .messenger-compose {
    grid-template-columns: 1fr;
  }
  .messenger-compose label {
    padding-top: 0;
  }
  .messenger-compose-footer {
    grid-column: 1;
  }
  .messenger-compose .form-message {
    margin-top: 0;
    padding-right: 0;
  }
  .clippy-assistant {
    right: 8px;
    bottom: 42px;
  }
  .clippy-bubble {
    width: min(210px, calc(100vw - 199px));
    padding: 10px 25px 9px 10px;
  }
  .clippy-bubble small {
    display: none;
  }
  .clippy-character, .clippy-character img {
    width: 180px;
  }
}

/* YARG, Gameserver and Windows Media Player */
.media-app-content {
  display: grid;
  grid-template-columns: 165px minmax(0, 1fr);
  min-height: 360px;
  background: #f3f3f3;
}

.media-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 14px;
  color: #fff;
  border-right: 2px groove #fff;
  text-align: center;
}

.yarg-brand {
  background: linear-gradient(180deg, #071524, #143957 62%, #0e7794);
}

.steam-brand {
  background: linear-gradient(180deg, #08172d, #123f68 64%, #1885ad);
}

.media-brand img {
  display: block;
  width: 112px;
  height: 112px;
  margin-bottom: 14px;
  border: 3px outset #ddd;
  object-fit: cover;
}

.media-brand strong {
  font-size: 24px;
}

.media-brand small {
  margin-top: 5px;
  color: #cae5f5;
  line-height: 1.3;
}

.media-main {
  min-width: 0;
  padding: 18px;
}

.media-player-desktop-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
}

.win-media-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 4px;
  padding: 5px;
  background: #c0c0c0;
}

.win-media-player {
  min-width: 0;
  padding: 4px;
  border: 2px inset #fff;
  background: #bdbdbd;
}

.win-media-screen {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 3px inset #ddd;
  color: #ddd;
  background: #000;
}

.win-media-screen video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.win-media-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: #ddd;
  background: #000;
  text-align: center;
  font-size: 13px;
}

.win-media-empty[hidden] {
  display: none;
}

.win-media-track {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 4px 5px;
  font-size: 11px;
}

.win-media-track input,
.media-volume input {
  width: 100%;
  accent-color: #000080;
}

.win-media-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 2px outset #fff;
  background: #c0c0c0;
}

.win-media-controls button {
  min-width: 36px;
  height: 34px;
  padding: 3px;
  border: 2px outset #fff;
  background: #c0c0c0;
  font-family: Arial, sans-serif;
  font-weight: 900;
}

.win-media-controls button:active {
  border-style: inset;
}
.win-media-controls button:disabled {
  color: #777;
  text-shadow: 1px 1px #fff;
}
.control-separator {
  align-self: stretch;
  margin: 0 4px;
  border-left: 2px groove #fff;
}
.control-spacer {
  flex: 1;
}
.media-volume {
  display: grid;
  grid-template-columns: auto 86px;
  gap: 5px;
  align-items: center;
}

.win-media-playlist {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 6px;
  border: 2px inset #fff;
  background: #dfdfdf;
}

.playlist-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.playlist-heading small {
  display: block;
  margin-top: 2px;
  color: #555;
  font-size: 10px;
}
.playlist-heading .win-button {
  min-width: 34px;
  padding: 3px 7px;
}
.media-current-title {
  min-height: 44px;
  padding: 7px;
  border: 2px inset #fff;
  color: #fff;
  background: #000080;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.media-file-list {
  min-height: 190px;
  max-height: 260px;
  overflow: auto;
  margin-top: 5px;
  border: 2px inset #fff;
  background: #fff;
}
.media-file-button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  width: 100%;
  min-height: 34px;
  padding: 5px;
  border: 0;
  border-bottom: 1px solid #bbb;
  background: #fff;
  text-align: left;
  font: inherit;
}
.media-file-button:hover {
  background: #e8e8ff;
}
.media-file-button.active {
  color: #fff;
  background: #000080;
}
.media-file-button span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-format-note {
  margin: auto 0 0;
  padding-top: 8px;
  color: #555;
  font-size: 10px;
  text-align: center;
}

@media (max-width: 720px) {
  .win-media-content {
    grid-template-columns: 1fr;
  }
  .win-media-screen {
    aspect-ratio: 16 / 9;
  }
  .win-media-playlist {
    max-height: 250px;
  }
  .media-file-list {
    min-height: 100px;
    max-height: 150px;
  }
  .win-media-controls {
    flex-wrap: wrap;
  }
  .control-spacer {
    display: none;
  }
  .media-volume {
    margin-left: auto;
  }
}

@media (max-width: 460px) {
  .win-media-controls button {
    min-width: 32px;
  }
  .control-separator {
    display: none;
  }
  .media-volume {
    grid-template-columns: auto 70px;
    width: 100%;
    margin-top: 4px;
  }
}

/* Unreal Tournament 2004 */
.unreal-icon {
  width: 46px;
  height: 42px;
}

.gameserver-desktop-icon {
  width: 46px;
  height: 42px;
}

.unreal-content {
  padding: 18px;
  color: #171717;
  background:
    linear-gradient(rgb(255 255 255 / 90%), rgb(255 255 255 / 90%)),
    repeating-linear-gradient(0deg, #d4d4d4 0 1px, transparent 1px 4px);
}

.unreal-content h3 {
  margin: 0 0 9px;
  font-size: 17px;
}

.unreal-content p {
  margin-top: 0;
}

.unreal-header {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin: -18px -18px 16px;
  padding: 17px 20px;
  color: #fff;
  border-bottom: 3px ridge #ddd;
  background: linear-gradient(120deg, #061029, #17387a 58%, #9d5700);
}

.unreal-header > img {
  display: block;
  width: 145px;
  max-height: 110px;
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(3px 3px 0 rgb(0 0 0 / 55%));
}

.unreal-header .eyebrow {
  color: #ffd66b;
}

.unreal-header h2 {
  color: #fff;
  text-shadow: 2px 2px #000;
}

.unreal-header p:last-child {
  margin-bottom: 0;
}

.unreal-quick-guide,
.unreal-node-note,
.unreal-tips {
  padding: 13px 15px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #666;
  border-bottom: 2px solid #666;
  background: #dcdcdc;
}

.unreal-quick-guide ol,
.unreal-node-note ul {
  margin: 0;
  padding-left: 24px;
}

.unreal-quick-guide li,
.unreal-node-note li {
  margin: 6px 0;
  line-height: 1.4;
}

.unreal-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.85fr);
  gap: 14px;
  margin: 15px 0;
}

.unreal-figure {
  margin: 0;
  padding: 6px;
  border-top: 2px solid #555;
  border-left: 2px solid #555;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: #111;
}

.unreal-figure img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.unreal-figure figcaption {
  padding: 7px 5px 3px;
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
}

.torlan-guide {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(340px, 1.2fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px groove #fff;
}

.torlan-copy p {
  font-size: 13px;
}

.torlan-map img {
  height: auto;
  max-height: 430px;
  object-fit: contain;
  background: #000;
}

.unreal-warning {
  margin-top: 12px;
}

.unreal-tips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 18px;
  margin-top: 16px;
}

.unreal-tips h3 {
  grid-column: 1 / -1;
}

.unreal-tips > div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px dotted #666;
  font-size: 12px;
  line-height: 1.35;
}

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 2px groove #fff;
}

.api-badge {
  padding: 4px 8px;
  border: 1px solid #555;
  font: 700 11px "Courier New", monospace;
}

.api-badge.pending {
  color: #5c3500;
  background: #ffdf69;
}

.retro-table {
  overflow: hidden;
  border-top: 2px solid #555;
  border-left: 2px solid #555;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: #fff;
  font-size: 12px;
}

.retro-table > div {
  display: grid;
  grid-template-columns: 34px minmax(120px, 1.5fr) minmax(110px, 1fr) 70px;
}

.retro-table > div:nth-child(odd):not(.retro-table-head) {
  background: #efefff;
}

.retro-table span {
  min-width: 0;
  overflow: hidden;
  padding: 7px 6px;
  border-right: 1px solid #aaa;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.retro-table-head {
  color: #fff;
  background: #000080;
  font-weight: 700;
}

.server-table > div {
  grid-template-columns: minmax(140px, 1.6fr) minmax(110px, 1fr) 65px 65px;
}

.status-wait {
  color: #8b3f00;
  font-weight: 700;
}

.api-note,
.server-hint {
  margin: 16px 0 0;
  padding: 9px;
  border: 1px dotted #666;
  background: #ffffda;
  font-size: 12px;
}

.api-note code {
  color: #000080;
  font-weight: 700;
}

.amp-content {
  padding: 14px;
  color: #e8f1ff;
  background: #142238;
}

.amp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -14px -14px 12px;
  padding: 12px 14px;
  border-bottom: 2px groove #fff;
  background: #c0c0c0;
}

.amp-heading {
  display: flex;
  align-items: center;
  min-width: 0;
  color: #111;
}

.amp-heading img {
  width: 46px;
  height: 46px;
  margin-right: 11px;
  border: 2px inset #ddd;
  object-fit: cover;
  image-rendering: pixelated;
}

.amp-heading h2,
.amp-heading p {
  margin: 0;
}

.amp-refresh-controls {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: #111;
  white-space: nowrap;
}

.amp-refresh-controls small {
  font-size: 10px;
  font-weight: 700;
}

.amp-notice {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 10px 0 13px;
  padding: 8px 10px;
  color: #111;
  border: 2px outset #eee;
  background: #d6e9c6;
  font-size: 11px;
  line-height: 1.35;
}

.amp-notice strong {
  flex: 0 0 auto;
  padding: 3px 6px;
  color: #fff;
  background: #16702c;
  font: 700 10px "Courier New", monospace;
}

.amp-notice.demo {
  background: #fff0a8;
}

.amp-notice.demo strong {
  background: #9a4300;
}

.amp-notice.error {
  background: #ffd4d4;
}

.amp-notice.error strong {
  background: #9b0000;
}

.amp-server-groups {
  display: block;
}

.manual-service-panel {
  margin: 0 0 10px;
}

.manual-service-panel[hidden] {
  display: none;
}

.manual-service-panel h3,
.amp-server-group h3 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.manual-service-public-list {
  display: grid;
  gap: 4px;
}

.manual-service-public-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 7px 9px;
  border-top: 1px solid #6f839e;
  border-left: 1px solid #6f839e;
  border-right: 2px solid #07101d;
  border-bottom: 2px solid #07101d;
  background: linear-gradient(90deg, #263b57, #1d304a);
}

.manual-service-public-card > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 28px;
  color: #fff;
  border: 2px outset #9dacbf;
  background: linear-gradient(135deg, #13509b, #43a8dc);
  font: 700 10px "Courier New", monospace;
  text-shadow: 1px 1px #000;
}

.manual-service-public-card strong,
.manual-service-public-card small {
  display: block;
}

.manual-service-public-card strong {
  color: #fff;
  font-size: 12px;
}

.manual-service-public-card small {
  margin-top: 2px;
  color: #b9cae0;
  font-size: 9px;
}

.amp-server-group {
  min-width: 0;
}

.amp-server-list {
  display: grid;
  gap: 4px;
}

.amp-server-card {
  display: grid;
  grid-template-columns: minmax(210px, 1.25fr) minmax(360px, 2fr) auto;
  gap: 9px;
  align-items: center;
  padding: 6px 8px;
  border-top: 1px solid #526985;
  border-left: 1px solid #526985;
  border-right: 2px solid #07101d;
  border-bottom: 2px solid #07101d;
  background: #223249;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 3%);
}

.amp-server-card-header {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.amp-game-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 24px;
  color: #fff;
  border: 2px outset #9dacbf;
  background: linear-gradient(135deg, #593516, #d48724 48%, #173961 49%);
  font: 700 9px "Courier New", monospace;
  text-shadow: 1px 1px #000;
}

.amp-server-title {
  min-width: 0;
}

.amp-server-title strong,
.amp-server-title small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.amp-server-title strong {
  color: #fff;
  font-size: 12px;
}

.amp-server-title small {
  margin-top: 2px;
  color: #aebed2;
  font-size: 9px;
}

.amp-server-join {
  padding: 5px 7px;
  color: #061323;
  border: 2px outset #e7e7e7;
  background: #c0c0c0;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.amp-server-join:active {
  border-style: inset;
}

.amp-server-join.disabled {
  color: #777;
  pointer-events: none;
}

.amp-server-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin-top: 0;
}

.amp-server-stats div {
  min-width: 0;
  padding: 5px;
  text-align: center;
  border-top: 1px solid #0c1929;
  border-left: 1px solid #0c1929;
  border-right: 1px solid #3b4e68;
  border-bottom: 1px solid #3b4e68;
  background: #1b2a3e;
}

.amp-server-stats strong,
.amp-server-stats span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.amp-server-stats strong {
  color: #fff;
  font-size: 11px;
}

.amp-server-stats span {
  margin-top: 3px;
  color: #9daec3;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.amp-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.amp-state::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d6a43a;
  box-shadow: 0 0 0 1px #07101d;
  content: "";
}

.amp-state.online::before {
  background: #48d05d;
}

.amp-state.offline::before {
  background: #d45252;
}

.placeholder-box {
  margin: 20px 0;
  padding: 10px 14px;
  border: 2px dashed #777;
  background: #efefef;
}

.placeholder-box p {
  margin: 3px 0;
}

.cursor-line {
  margin-bottom: 0;
  color: #006400;
  font-weight: 700;
}

.blink {
  animation: blink 0.85s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Information and credits */
.about-content {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 25px;
}

.credits-content {
  padding: 20px 22px;
  background: #f8f3ff;
}

.credits-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 3px double #531075;
}

.credits-header p {
  margin: 0;
}

.credit-list {
  display: grid;
  gap: 7px;
  margin: 17px 0;
}

.credit-list > div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  padding: 8px 10px;
  border-left: 6px solid #6f218e;
  background: #fff;
  box-shadow: 1px 1px 0 #bbb;
  font-size: 12px;
  line-height: 1.4;
}

.credit-list > div:nth-child(even) {
  border-left-color: #dc6c0b;
}

.credits-content blockquote {
  margin: 14px 0;
  padding: 10px 14px;
  color: #fff;
  border: 2px outset #ddd;
  background: linear-gradient(90deg, #4a126d, #c65811);
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}

.thanks {
  margin-bottom: 0;
  color: #3a164d;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.legacy-credits {
  margin: 15px 0;
  padding: 10px;
  border: 2px inset #fff;
  background: #e5e5e5;
}

.legacy-credits h3,
.legacy-credits > p {
  margin: 0 0 7px;
}

.legacy-credits > p {
  color: #444;
  font-size: 11px;
}

.legacy-credit-list {
  display: grid;
  gap: 4px;
}

.legacy-credit-list > div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 5px 7px;
  border: 1px solid #aaa;
  background: #fff;
  font-size: 11px;
}

.legacy-credit-list > div > button:last-child,
.legacy-easter-viewer button {
  min-width: 28px;
  padding: 3px 7px;
  border: 2px outset #fff;
  background: #c0c0c0;
}

.legacy-alias {
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.legacy-alias:focus-visible {
  outline: 1px dotted #000;
  outline-offset: 2px;
}

.legacy-easter-viewer {
  margin-top: 8px;
  padding: 5px;
  border: 2px inset #fff;
  background: #111;
}

.legacy-easter-viewer[hidden] {
  display: none;
}

.legacy-easter-viewer > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  color: #fff;
}

.legacy-easter-viewer img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  image-rendering: auto;
}

.about-content h2,
.about-content p {
  margin: 0 0 5px;
}

.muted {
  color: #555;
  font-size: 12px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  padding: 9px 8px 6px;
}

.win-button {
  min-width: 76px;
  height: 27px;
}

.win-button:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -5px;
}

/* ==========================================================================
   5. Taskbar, start menu and dialogs
   ========================================================================== */

.taskbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 4px;
  height: var(--taskbar-height);
  padding: 4px;
  border-top: 2px solid #fff;
  background: var(--win-gray);
}

.start-button,
.task-button {
  height: 32px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  background: var(--win-gray);
  cursor: pointer;
}

.start-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px 0 6px;
  font-size: 14px;
}

.start-flag {
  display: grid;
  grid-template-columns: repeat(2, 8px);
  grid-template-rows: repeat(2, 8px);
  gap: 1px;
  transform: skewY(-6deg);
}

.start-flag i:nth-child(1) {
  background: #e22;
}
.start-flag i:nth-child(2) {
  background: #15a13b;
}
.start-flag i:nth-child(3) {
  background: #147ac5;
}
.start-flag i:nth-child(4) {
  background: #e4c51d;
}

.task-divider {
  width: 2px;
  height: 32px;
  margin: 0 2px;
  border-left: 1px solid #777;
  border-right: 1px solid #fff;
}

.task-buttons {
  display: flex;
  flex: 1;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.task-button {
  width: min(190px, 23vw);
  overflow: hidden;
  padding: 0 9px;
  white-space: nowrap;
  text-align: left;
  text-overflow: ellipsis;
  font-size: 12px;
}

.tray {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  border-top: 2px solid #777;
  border-left: 2px solid #777;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  font-size: 12px;
}

.tray-network {
  color: #000080;
  font-weight: 900;
}

.start-menu {
  position: fixed;
  bottom: var(--taskbar-height);
  left: 3px;
  z-index: 1100;
  display: grid;
  grid-template-columns: 40px 278px;
  min-height: 384px;
  padding: 3px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  background: var(--win-gray);
  box-shadow: 4px 4px 0 rgb(0 0 0 / 30%);
}

.start-menu[hidden],
.shutdown-dialog[hidden],
.sound-dialog[hidden] {
  display: none;
}

.start-menu-rail {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  padding: 10px 8px;
  color: #fff;
  background: linear-gradient(180deg, #00006b, #061d91 60%, #184fb0);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.start-menu-items {
  display: flex;
  flex-direction: column;
  padding: 4px;
}

.start-menu-items button {
  flex: 1;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

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

.start-menu-items button span {
  display: inline-block;
  width: 28px;
  font-size: 18px;
  text-align: center;
}

.start-menu-image-icon {
  width: 22px;
  height: 22px;
  margin-right: 6px;
  object-fit: contain;
  image-rendering: pixelated;
  vertical-align: middle;
}

.start-menu-items hr {
  width: 100%;
  margin: 3px 0;
  border-top: 1px solid #777;
  border-bottom: 1px solid #fff;
}

.shutdown-dialog {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 46%);
}

.sound-dialog {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 28%);
}

.sound-dialog .window {
  position: static;
  width: min(470px, calc(100vw - 28px));
}

.titlebar-image-icon {
  width: 17px;
  height: 17px;
  margin-right: 5px;
  object-fit: contain;
  image-rendering: pixelated;
  vertical-align: middle;
}

[data-program][hidden] {
  display: none !important;
}

.task-button {
  display: flex;
  align-items: center;
  gap: 5px;
}

.task-button-icon {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  object-fit: contain;
  image-rendering: pixelated;
}

.task-button > span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Calendar and downloads */
.calendar-content {
  padding: 18px;
  background: #f4f4ed;
}

.calendar-header {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 16px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 3px double #005f6d;
}

.calendar-header > img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  image-rendering: pixelated;
}

.calendar-header p,
.calendar-header h2 {
  margin-top: 0;
}

.calendar-header p:last-child {
  margin-bottom: 0;
}

.calendar-export-button {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 10px;
  color: #000;
  text-decoration: none;
  white-space: nowrap;
}

.calendar-export-button:active {
  border-top-color: #000;
  border-left-color: #000;
  border-right-color: #fff;
  border-bottom-color: #fff;
}

.schedule-days {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.schedule-day {
  border-top: 2px solid #555;
  border-left: 2px solid #555;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: #fff;
}

.schedule-day h3 {
  margin: 0;
  padding: 7px 9px;
  color: #fff;
  background: #000080;
  font-size: 14px;
}

.schedule-entry {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid #ccc;
  font-size: 11px;
}

.schedule-entry:last-child {
  border-bottom: 0;
}

.schedule-entry time {
  color: #7d2d00;
  font-family: "Courier New", monospace;
  font-weight: 700;
}

.schedule-entry strong,
.schedule-entry small {
  display: block;
}

.schedule-entry small {
  margin-top: 3px;
  color: #555;
  line-height: 1.3;
}

.loading-message {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px dotted #555;
  background: #ffffdf;
}

.downloads-content {
  display: grid;
  grid-template-columns: 125px 1fr;
  gap: 20px;
  align-items: center;
  padding: 24px;
  background: #f4f4f4;
}

.downloads-content > img {
  width: 120px;
  height: 110px;
  object-fit: contain;
  image-rendering: pixelated;
}

.downloads-content .win-button {
  margin-top: 8px;
}

.shutdown-dialog .window {
  position: static;
  width: min(390px, calc(100vw - 28px));
}

.shutdown-content {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 20px 24px;
}

.shutdown-content > span {
  font-size: 35px;
}

.shutdown-content p {
  margin: 0;
}

/* ==========================================================================
   6. Responsive and accessibility adjustments
   ========================================================================== */

@media (max-width: 740px) {
  .desktop-heading {
    top: 18px;
    right: 18px;
    left: 116px;
    max-width: none;
  }

  .desktop-heading p {
    max-width: 250px;
    margin-left: auto;
  }

  .desktop-icons {
    top: 14px;
    left: 6px;
    gap: 10px;
  }

  .window {
    top: 82px !important;
    left: 8px !important;
    width: calc(100vw - 16px);
    max-height: calc(100% - 90px);
  }

  #cs-window {
    height: calc(100% - 90px);
  }

  .welcome-content {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .welcome-logo {
    width: 58px;
    height: 58px;
  }

  .mario-content {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  .help-sidebar {
    display: flex;
    gap: 3px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px;
    min-height: 47px;
    border-right: 0;
    border-bottom: 2px groove #fff;
  }

  .help-sidebar-title {
    display: none;
  }

  .help-topic {
    flex: 0 0 auto;
    width: auto;
    min-height: 32px;
    padding: 6px 8px;
    white-space: nowrap;
  }

  .controller-help {
    overflow: auto;
    padding: 13px;
  }

  .timing-grid,
  .boost-levels,
  .item-list,
  .schedule-days {
    grid-template-columns: 1fr;
  }

  .retro-tip {
    grid-template-columns: 1fr;
  }

  .calendar-header {
    grid-template-columns: 54px 1fr;
  }

  .calendar-header > img {
    width: 50px;
    height: 50px;
  }

  .downloads-content {
    grid-template-columns: 80px 1fr;
    gap: 12px;
    padding: 16px;
  }

  .downloads-content > img {
    width: 76px;
    height: 70px;
  }

  .control-grid {
    grid-template-columns: 1fr;
  }

  .cs-registration-form {
    grid-template-columns: 1fr;
  }

  .cs-registration-form > label[for="cs-name"],
  .cs-registration-form > #cs-name,
  .cs-registration-form > label[for="cs-skill"],
  .cs-registration-form > .cs-skill-row,
  .cs-skill-label,
  .cs-registration-form .win-button {
    grid-column: 1;
    grid-row: auto;
  }

  .cs-participant-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .cs-participant-rating {
    grid-column: 2;
  }

  .crepe-content,
  .media-app-content {
    grid-template-columns: 1fr;
  }

  .amp-toolbar {
    align-items: flex-start;
  }

  .amp-heading img {
    width: 38px;
    height: 38px;
  }

  .amp-heading h2 {
    font-size: 17px;
  }

  .amp-server-groups {
    display: block;
  }

  .amp-server-card {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 8px;
  }

  .amp-server-card-header {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .amp-server-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .amp-server-join {
    text-align: center;
  }

  .unreal-content {
    padding: 12px;
  }

  .unreal-header {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    margin: -12px -12px 12px;
    padding: 12px;
  }

  .unreal-header > img {
    width: 80px;
  }

  .unreal-header h2 {
    font-size: 18px;
  }

  .unreal-header p:last-child {
    grid-column: 1 / -1;
  }

  .unreal-card-grid,
  .torlan-guide,
  .unreal-tips {
    grid-template-columns: 1fr;
  }

  .unreal-figure img {
    height: auto;
    max-height: 330px;
  }

  .unreal-tips h3 {
    grid-column: 1;
  }

  .crepe-content {
    padding: 16px;
  }

  .crepe-spin-button img {
    max-height: 150px;
  }

  .crepe-ingredients {
    grid-template-columns: 1fr;
  }

  .media-brand {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 4px 12px;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 2px groove #fff;
    text-align: left;
  }

  .media-brand img {
    grid-row: 1 / 3;
    width: 60px;
    height: 60px;
    margin: 0;
  }

  .media-brand strong {
    align-self: end;
    font-size: 20px;
  }

  .media-brand small {
    align-self: start;
    margin: 0;
  }

  .media-main {
    padding: 13px;
  }

  .retro-table {
    overflow-x: auto;
  }

  .retro-table > div {
    min-width: 510px;
  }

  .credits-header {
    grid-template-columns: 1fr;
  }

  .credits-header .about-mark {
    width: 58px;
    height: 58px;
  }

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

  .start-menu {
    grid-template-columns: 36px minmax(0, 1fr);
    width: min(324px, calc(100vw - 6px));
  }

  .task-button {
    width: 110px;
  }

  .tray-network {
    display: none;
  }
}

@media (max-height: 620px) {
  .desktop-icons {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, 88px);
    grid-template-rows: none;
  }

  .desktop-heading {
    opacity: 0.6;
  }
}

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