:root {
  --desktop: #d7e7f6;
  --win-gray: #d4d0c8;
  --win-light: #ffffff;
  --win-mid: #808080;
  --win-dark: #404040;
  --win-blue: #000080;
  --win-blue-2: #1084d0;
  --link: #0000ee;
  --text: #111;
}

@font-face {
  font-family: "Tahoma";
  src: url("fonts/tahoma.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "ByteBounce";
  src: url("fonts/ByteBounce.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;

  size-adjust: 125%;
  ascent-override: 85%;
  descent-override: 20%;
  line-gap-override: 5%;
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-color: var(--win-mid) var(--win-gray);
}

body {
  --site-font: Tahoma, "MS Sans Serif", Geneva, sans-serif;

  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: #87c9f4;
  font-family: var(--site-font);
  font-size: 14px;
}

#hill-background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}
/* Space between the about/sidebar section and interests/status section */
.main-grid + .mid-grid {
  margin-top: 28px;
}
/* Slight haze so the background does not fight the windows. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: rgba(215, 231, 246, 0.1);
}
body.bytebounce-font {
  --site-font: "ByteBounce", Tahoma, "MS Sans Serif", Geneva, sans-serif;
  font-size: 16px;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

button,
input,
textarea,
select {
  font: inherit;
}

.site-shell {
  width: min(1180px, calc(100% - 80px));
  margin: 22px auto 36px;
}

.window {
  background: var(--win-gray);
  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 #000;
}

.window + .window {
  margin-top: 14px;
}

.titlebar {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 4px 3px 7px;
  color: white;
  font-weight: 700;
  letter-spacing: 0.2px;
  background: linear-gradient(90deg, var(--win-blue), var(--win-blue-2));
}

body.bytebounce-font .titlebar {
  font-size: 15px;
  letter-spacing: 0;
}

.titlebar .title {
  flex: 1;
}

.titlebar .icon {
  width: 18px;
  text-align: center;
}

.controls {
  display: flex;
  gap: 3px;
}

.win-btn {
  width: 22px;
  height: 21px;
  display: grid;
  place-items: center;
  padding: 0;
  background: var(--win-gray);
  color: #111;
  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;
  cursor: default;
}

.win-btn:active,
.button:active,
.tab[aria-selected="true"] {
  border-top-color: var(--win-dark);
  border-left-color: var(--win-dark);
  border-right-color: var(--win-light);
  border-bottom-color: var(--win-light);
}

.window-body {
  padding: 12px;
}

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

.header-window .window-body {
  padding: 10px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  font-size: 38px;
  line-height: 1;
}

.brand-copy h1 {
  margin: 0 0 4px;
  font-size: 22px;
}

body.bytebounce-font .brand-copy h1 {
  font-size: 26px;
}

.brand-copy p {
  margin: 0;
  color: #333;
}

.navbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.button,
.nav-link,
.tab,
.arrow-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 12px;
  color: #111;
  text-decoration: none;
  background: var(--win-gray);
  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);
}

.nav-link[aria-current="page"] {
  outline: 1px dotted #111;
  outline-offset: -5px;
  font-weight: 700;
}

/* Tahoma / ByteBounce font flipper */
.font-flipper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 7px;
}

.font-flipper-label {
  font-size: 11px;
}

.font-flipper-button {
  min-width: 96px;
  min-height: 26px;
  padding: 2px 7px;
  cursor: pointer;
}

body.bytebounce-font .font-flipper-button {
  font-family: "ByteBounce", Tahoma, sans-serif;
}

body.bytebounce-font .footer,
body.bytebounce-font .font-flipper-label {
  font-size: 14px;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(280px, 0.95fr);
  gap: 38px;
  margin-top: 14px;
}

.stack {
  display: grid;
  gap: 24px;
  align-content: start;
}
.stack > .window {
  height: 100%;
}
.stack > .window .window-body,
.stack > .window .small-scroll {
  height: calc(100% - 28px);
}
.stack .window-body {
  max-height: 180px;
  overflow-y: auto;
}
.small-scroll {
  max-height: 220px;
  overflow-y: auto;
  padding: 10px;
}
::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

::-webkit-scrollbar-track {
  background: var(--win-gray);
  border-left: 1px solid var(--win-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--win-gray);
  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);
}

::-webkit-scrollbar-button {
  display: block;
  width: 16px;
  height: 16px;
  background: var(--win-gray);
}
.about-box {
  min-height: 365px;
  position: relative;
}

.about-copy {
  max-width: 65ch;
  line-height: 1.55;
}

.pixel-mascot {
  position: absolute;
  right: 22px;
  bottom: 22px;
  font-size: 76px;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.28));
}

.speech {
  position: absolute;
  right: 108px;
  bottom: 33px;
  width: 150px;
  padding: 10px;
  background: #fff0c8;
  border: 2px solid #5b4b2a;
  text-align: center;
}

.speech::after {
  content: "";
  position: absolute;
  right: -14px;
  bottom: 16px;
  border: 7px solid transparent;
  border-left-color: #5b4b2a;
}

.update-list {
  margin: 0;
  padding-left: 18px;
}

.update-list li + li {
  margin-top: 8px;
}

.small-scroll {
  max-height: 145px;
  overflow: auto;
  padding: 10px;
}

.mid-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
  align-items: stretch;
}

.mid-grid > .window {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-top: 0;
}

.mid-grid > .window > .window-body {
  flex: 1;
}
.mid-grid + .window {
  margin-top: 14px;
}
.status-list {
  list-style: none;
  margin: 0;
  padding: 0;
  line-height: 1.8;
}

.status-list li::before {
  display: inline-block;
  width: 1.4em;
}

.status-list .ok::before {
  content: "✓";
  color: green;
  font-weight: 700;
}

.status-list .warn::before {
  content: "⚠";
  color: #b8860b;
}

.status-list .off::before {
  content: "□";
}

.player {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}

.track-meta strong {
  display: block;
  font-size: 16px;
}

.track-meta span {
  color: #333;
}

.player-controls {
  display: flex;
  gap: 6px;
}

.player-controls button {
  min-width: 42px;
}

.progress-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.feature-image {
  margin-bottom: 18px;
}

.section-label {
  margin: 18px 0 12px;
}

.examples-downward {
  gap: 18px;
  margin-bottom: 18px;
}
input[type="range"] {
  width: 100%;
}
.commissions-examples {
  padding: 0 14px 14px;
}
.social-row {
  display: flex;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
  margin: 18px 0 8px;
}
.social-row-wide {
  gap: 52px;
}
.social-link {
  display: grid;
  justify-items: center;
  gap: 5px;
  text-decoration: none;
}

.social-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--win-gray);
  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);
  font-size: 21px;
}

.footer {
  text-align: center;
  font-size: 12px;
  margin-top: 14px;
}

.commission-intro {
  display: grid;
  grid-template-columns: 82px 1fr auto;
  gap: 16px;
  align-items: start;
}

.big-icon {
  font-size: 56px;
}

.commission-list {
  margin: 8px 0 0;
  padding-left: 20px;
  line-height: 1.65;
}

.feature-image {
  min-height: 300px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 62%, rgba(255, 255, 255, 0.2), transparent 40%),
    linear-gradient(#cf8fa7 0 35%, #6d6c9d 35% 58%, #28344d 58% 100%);
  color: white;
  text-align: center;
  position: relative;
}

.feature-image::before {
  content: "☾";
  position: absolute;
  top: 30px;
  font-size: 52px;
}

.feature-image::after {
  content: "city lights • rooftop cat • sunset commission";
  position: absolute;
  bottom: 20px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 10px;
}

.section-label::before,
.section-label::after {
  content: "";
  height: 1px;
  background: #777;
  flex: 1;
}

.examples-downward {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.example-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 12px;
  background: var(--win-gray);
}

.example-tile {
  position: relative;
  min-height: 230px;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid var(--win-light);
  border-bottom: 2px solid var(--win-light);
}

.example-tile img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: contain;
  background: #fff;
}

.example-fallback {
  display: none;
  min-height: 230px;
  padding: 20px;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  line-height: 1.5;
  background:
    repeating-linear-gradient(
      45deg,
      #fff,
      #fff 10px,
      #eeeeee 10px,
      #eeeeee 20px
    );
}

.example-fallback strong {
  display: block;
  font-size: 18px;
}

.example-fallback code {
  display: block;
  margin-top: 8px;
  padding: 5px 7px;
  background: #ffffe1;
  border: 1px solid var(--win-mid);
  font-family: "Courier New", monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.example-tile.image-missing img {
  display: none;
}

.example-tile.image-missing .example-fallback {
  display: grid;
}

.gallery-window {
  margin-top: 14px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 14px;
}

.tab {
  min-height: 31px;
  cursor: pointer;
}

.gallery-layout {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 22px;
  align-items: start;
}

.preview-pane {
  padding: 16px;
  background: #eee;
}

.preview-card {
  padding: 10px;
  background: var(--win-gray);
}

.preview-page {
  background: white;
  padding: 14px;
  min-height: 310px;
}

.preview-page h2 {
  margin-top: 0;
  border-bottom: 1px solid #888;
}

fieldset {
  border: 2px groove #ddd;
}

.gallery-description {
  line-height: 1.55;
}

.feature-checks {
  list-style: none;
  padding: 0;
}

.feature-checks li::before {
  content: "✓ ";
  color: green;
  font-weight: 700;
}

.code-box {
  padding: 10px;
  font-family: "Courier New", monospace;
  white-space: pre-line;
  background: #efefef;
}

.gallery-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

.arrow-button {
  font-size: 25px;
  width: 54px;
}

.gallery-status {
  text-align: center;
}

/* OC gallery */
.oc-gallery-layout {
  padding: 16px;
}

.oc-preview-page {
  min-height: 430px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 18px;
  text-align: center;
  overflow: hidden;
}

.oc-image {
  display: block;
  width: 100%;
  height: 330px;
  object-fit: contain;
  image-rendering: auto;
}

.oc-image-fallback {
  width: min(100%, 300px);
  min-height: 260px;
  padding: 24px;
  display: grid;
  place-items: center;
  border: 2px dashed #808080;
  background: #fff;
  color: #555;
  font-size: 1.25rem;
}

.oc-description-pane {
  display: grid;
  align-content: start;
  gap: 12px;
}

.oc-field {
  padding: 10px;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  background: #fff;
}

.oc-about-field {
  grid-template-columns: 92px 1fr;
  min-height: 150px;
}

.oc-about-field p {
  margin: 0;
  white-space: pre-line;
}

.file-hint {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #808080;
  background: #ffffe1;
}

.file-hint code {
  font-family: "Courier New", monospace;
}

.tab:disabled {
  color: #777;
  text-shadow: 1px 1px #fff;
}

/* Replaceable artwork/icon slots -------------------------------------------
   Every emoji-style icon is paired with an image path. If the image does not
   exist or fails to load, JavaScript hides it and leaves the emoji fallback.
   See README.md or README.txt for the complete filename list. */
.art-slot {
  display: inline-grid;
  place-items: center;
  width: 1.35em;
  height: 1.35em;
  flex: 0 0 auto;
  vertical-align: -0.2em;
}

.art-slot > img,
.art-slot > .art-fallback {
  grid-area: 1 / 1;
}

.art-slot > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
}

.art-slot > .art-fallback {
  display: none;
  line-height: 1;
  text-align: center;
}

.art-slot.is-fallback > img {
  display: none;
}

.art-slot.is-fallback > .art-fallback {
  display: inline;
}

.icon .art-slot {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.nav-link .art-slot {
  width: 22px;
  height: 22px;
}

.social-icon .art-slot {
  width: 28px;
  height: 28px;
}

.brand-mark .art-slot,
.art-slot.art-xl {
  width: 48px;
  height: 48px;
}

.pixel-mascot .art-slot,
.art-slot.art-mascot {
  width: 104px;
  height: 104px;
}

.art-slot.art-button {
  width: 24px;
  height: 24px;
}

.art-slot.art-feature {
  width: 150px;
  height: 150px;
}

.art-slot.art-example {
  width: 72px;
  height: 72px;
  margin: 4px;
}

.big-icon .art-slot {
  width: 64px;
  height: 64px;
}

/* Allows Juno to use full custom art instead of the circular emoji button. */
.social-icon:has(.art-slot img:not([hidden])) {
  overflow: hidden;
}

@media (max-width: 900px) {
  .example-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .navbar {
    grid-template-columns: 1fr 1fr;
  }

  .main-grid,
  .mid-grid,
  .gallery-layout,
  .commission-intro {
    grid-template-columns: 1fr;
  }

  .about-box {
    min-height: 430px;
  }

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

@media (max-width: 760px) {
  .oc-preview-page {
    min-height: 340px;
  }

  .oc-image {
    height: 250px;
  }

  .oc-field,
  .oc-about-field {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .example-gallery {
    grid-template-columns: 1fr;
  }

  .font-flipper {
    justify-content: stretch;
  }

  .font-flipper-button {
    flex: 1;
  }
}