/* ============================================
   site-wide styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,600;1,400&display=swap');

@font-face {
  font-family: 'Basiic';
  src: url('fonts/basiic.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 40px 20px;
  min-height: 100vh;
  font-family: 'Basiic', 'EB Garamond', Georgia, serif;
  font-size: 13px;
  color: #e8e2d8;
  background-image: url('images/backdrop.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  cursor: url('images/cursor.cur'), none;
}

/* headings/section titles keep the original serif typeface -
   the new Virale font is used for everything else */
.box-title,
h1, h2, h3, h4, h5, h6 {
  font-family: 'EB Garamond', Georgia, serif;
}

/* once the animated cursor script takes over, hide the native
   cursor everywhere (including on links/buttons) so only the
   custom animated cursor shows */
html.custom-cursor-active,
html.custom-cursor-active * {
  cursor: none !important;
}

#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 9999;
  image-rendering: pixelated;
  display: none;
}

a {
  color: #d98b4a;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  color: #f0a860;
}

/* ============================================
   page frame
   ============================================ */

.page-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  max-width: 768px;
  width: 100%;
}

/* about.html has no sidebar - nav + blinkies move into a top bar instead,
   so the page can be much wider and the journal can take center stage */
.page-wrap.wide {
  max-width: 1050px;
}

.main-content.full {
  width: 100%;
}

.about-topbar {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.about-topbar .nav-grid {
  flex-shrink: 0;
}

.about-topbar .social-box {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px;
}

.about-topbar .social-box img {
  width: 90px;
  height: auto;
  display: block;
  transition: filter 0.15s ease;
}

.about-topbar .social-box a:hover img {
  filter: brightness(1.25);
}

.about-topbar .blinkie-box {
  flex: 1;
  min-width: 260px;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.about-topbar .blinkie-box img {
  max-width: 130px;
}

.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* vertical barbed-wire divider sitting in the gap between the
   sidebar and the main content, tiled top to bottom */

.wire-divider {
  width: 20px;
  height: 400px; /* fallback until JS sizes it to match the shorter column */
  flex-shrink: 0;
  margin: 0 -14px; /* cancels the page-wrap gap on both sides so the
                       boxes sit flush against the wire */
  background-image: url('images/barbed-divider.png');
  background-repeat: repeat-y;
  background-position: top center;
  background-size: 20px auto;
}

/* ============================================
   sidebar (profile pic + nav) - top right
   ============================================ */

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

/* row holding the player+nav column and the updates box beside it.
   gap is 0 so the two boxes sit flush against each other; "order" is
   used (rather than reordering the markup) to put the updates box
   on the left visually while keeping the original reading order */
.player-nav-row {
  display: flex;
  gap: 0;
  align-items: flex-start;
}

.player-nav-col {
  width: 160px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  order: 2;
}

.sidebar-updates-box {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  order: 1;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.72);
}

#container {
  overflow-y: auto;
  overflow-x: hidden;
  height: 9em;
  padding: 0.6rem;
  border: 3px dotted #000;
}



.profile-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.tv-decor {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: flex-start;
}

.tv-frame-img {
  width: 100%;
  display: block;
}

.tv-screen {
  position: absolute;
  left: 9.86%;
  top: 10.96%;
  width: 78.75%;
  height: 58.34%;
  overflow: hidden;
  background: #000;
}

.tv-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-box {
  width: 160px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.profile-box img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: block;
}

.nav-grid {
  display: grid;
  gap: 6px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px;
}



.nav-grid a:hover {
  background: rgba(217, 139, 74, 0.25);
  color: #f0a860;
  text-decoration: none;
}

.nav-grid a.current {
  color: #d98b4a;
  border-color: rgba(217, 139, 74, 0.4);
}

/* nav + attached image box, grouped so there's no gap between them */

.nav-textbox-group {
  display: flex;
  flex-direction: column;
  width: 160px;
  align-self: flex-end;
}

.sidebar-textbox {
  height: 500px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: none;
  background-color: rgba(0, 0, 0, 0.72);
  background-image: url('images/veins.png');
  background-size: cover;
  background-position: center;
  background-blend-mode: multiply;
}

/* ============================================
   about page: bigger player, blinkie strip,
   sidebar flush against the main content
   ============================================ */

.page-wrap.flush {
  gap: 0;
}

.player-blinkie-group {
  display: flex;
  flex-direction: column;
}

.player-box.large {
  padding: 12px;
  gap: 12px;
}

.player-box.large .player-art {
  width: 64px;
  height: 64px;
}

.player-box.large .track-name {
  font-size: 13px;
}

.player-box.large .play-btn {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.blinkie-box {
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: none;
  padding: 8px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.blinkie-box img {
  max-width: 100%;
  display: block;
  image-rendering: pixelated;
}

.blinkie-box a {
  display: block;
  line-height: 0;
}

.blinkie-box a img {
  transition: filter 0.15s ease;
}

.blinkie-box a:hover img {
  filter: brightness(1.25);
}

.social-blinkies {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.social-blinkies a {
  display: block;
  line-height: 0;
}

.social-blinkies a img {
  width: 150px;
  height: auto;
  transition: filter 0.15s ease;
}

.social-blinkies a:hover img {
  filter: brightness(1.25);
}

/* ============================================
   corner decoration link (top right)
   ============================================ */

.corner-link {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  z-index: 5;
  pointer-events: auto;
}

.corner-link img {
  width: 100%;
  display: block;
  opacity: 0.88;
  filter: drop-shadow(0 0 0 rgba(240, 168, 96, 0));
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.corner-link:hover img {
  opacity: 1;
  filter: drop-shadow(0 0 14px rgba(240, 168, 96, 0.8)) brightness(1.15);
}

.corner-link-left {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 420px;
  z-index: 5;
  pointer-events: auto;
}

.corner-link-left img {
  width: 100%;
  display: block;
  opacity: 0.88;
  filter: drop-shadow(0 0 0 rgba(120, 190, 230, 0));
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.corner-link-left:hover img {
  opacity: 1;
  filter: drop-shadow(0 0 14px rgba(120, 190, 230, 0.8)) brightness(1.15);
}

.player-box {
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-art {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.player-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.player-art img.playing {
  animation: spin 4s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.player-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.track-name {
  font-size: 11px;
  color: #e8e2d8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.play-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(217, 139, 74, 0.5);
  background: rgba(217, 139, 74, 0.15);
  color: #f0a860;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.play-btn:hover {
  background: rgba(217, 139, 74, 0.3);
}

/* mobile-only "video games" link shown next to the about-page player;
   hidden on desktop, where the regular nav-grid box is used instead */
.player-videogames-link {
  display: none;
}

/* ============================================
   content boxes
   ============================================ */

.box {
  position: relative;
  background: rgba(0, 0, 0, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.box-title {
  background: rgba(20, 20, 20, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 7px 12px;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  font-size: 14px;
  color: #d98b4a;
  position: relative;
  overflow: hidden;
}

.box-title span.label {
  position: relative;
  z-index: 2;
}

.header-flame {
  position: relative;
  z-index: 2;
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-left: 6px;
  vertical-align: middle;
  object-fit: contain;
}

.box-body {
  padding: 12px 14px;
  line-height: 1.6;
  position: relative;
}

.box-body.scrollable {
  max-height: 420px;
  overflow-y: auto;
}

.box-body.scrollable::-webkit-scrollbar {
  width: 8px;
}

.box-body.scrollable::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.box-body.scrollable::-webkit-scrollbar-thumb {
  background: rgba(217, 139, 74, 0.4);
  border-radius: 4px;
}

.box-body.scrollable::-webkit-scrollbar-thumb:hover {
  background: rgba(217, 139, 74, 0.6);
}

.box-body.scrollable {
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 139, 74, 0.4) rgba(255, 255, 255, 0.05);
}

.box-body p {
  margin: 0 0 10px 0;
}

.box-body p:last-child {
  margin-bottom: 0;
}

.box-body em {
  color: #f0a860;
}

.title-box .box-title {
  border-bottom: none;
}

/* thin strip box housing webring/stamp images */

.stamps-box {
  padding: 8px 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.stamps-box img {
  display: block;
  height: 31px;
  width: auto;
  image-rendering: pixelated;
}

.box-body.roomy {
  padding: 24px 28px;
  line-height: 1.9;
  min-height: 600px;
}

/* links box with chain banner */

.links-box {
  margin-top: 0;
  background: transparent;
  border: none;
}

.links-banner-wrap {
  height: 30px;
  background-image: url('images/chain_banner.png');
  background-repeat: repeat-x;
  background-position: center;
  background-size: auto 24px;
}

.box-body.compact {
  padding: 10px 14px;
  line-height: 1.5;
}

/* decorative blood-splat overlays, randomly placed on box corners */

.splat {
  position: absolute;
  pointer-events: none;
  opacity: 0.4;
  z-index: 1;
  width: 70px;
}

.splat.top-right {
  top: -14px;
  right: -10px;
}

.splat.top-left {
  top: -18px;
  left: -8px;
  transform: scaleX(-1);
}

.splat.corner-small {
  width: 46px;
  top: -8px;
  right: 10px;
  opacity: 0.4;
}

/* ============================================
   photos page: video game collection
   ============================================ */

.console-section {
  padding: 16px 14px;
}

.console-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.console-logo-plate {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.console-logo-plate img {
  display: block;
  max-width: 200px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.55)) drop-shadow(0 0 16px rgba(255, 255, 255, 0.25));
}

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

.game-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.console-divider {
  height: 26px;
  background-image: url('images/console-divider.png');
  background-repeat: repeat-x;
  background-position: center;
  background-size: auto 22px;
}

/* ============================================
   about-me journal (replaces the old plain text box)
   ============================================ */

.journal-spotlight {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 30px 0;
}

/* moody grunge texture behind the journal - visible but subdued */
.journal-backdrop {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 115%;
  max-width: 1050px;
  transform: translate(-50%, -50%);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}

.journal-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 850px;
  margin: 0 auto;
}

.journal-img {
  display: block;
  width: 100%;
  height: auto;
}

/* the clipped postcard on the left-hand page: short structured facts */
.journal-note {
  position: absolute;
  left: 5.4%;
  top: 12.7%;
  width: 44%;
  height: 56.9%;
  padding: 4% 6%;
  overflow-y: auto;
  color: #2a1c10;
  font-size: 0.9em;
  line-height: 1.4;
  scrollbar-color: rgba(90, 60, 30, 0.5) transparent;
}

.journal-note p {
  margin: 0 0 0.6em 0;
}

.journal-note .about-title {
  color: #6b3a12;
}

/* the blank right-hand page: a longer scrolling write-up */
.journal-page-scroll {
  position: absolute;
  left: 52.1%;
  top: 6.1%;
  width: 43.2%;
  height: 90.3%;
  padding: 4%;
  overflow-y: auto;
  color: #2a1c10;
  font-size: 0.9em;
  line-height: 1.5;
  scrollbar-color: rgba(90, 60, 30, 0.5) transparent;
}

.journal-page-scroll p {
  margin: 0 0 0.8em 0;
}

/* ============================================
   misc small elements
   ============================================ */

.about-title,
.entry-date {
  color: #f0a860;
  font-weight: 600;
}

.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.photo-grid img {
  width: 100%;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-note {
  text-align: center;
  font-size: 11px;
  color: #cfc6b8;
  opacity: 0.7;
  margin-top: 4px;
}

/* ============================================
   home page: PSP console with an embedded
   video on its screen, below the stamps box,
   aligned right
   ============================================ */

.psp-embed-wrap {
  position: relative;
  align-self: flex-start;
  width: 210px;
  margin-top: -55px;
  filter: brightness(0.7) saturate(0.85);
}

.psp-embed-img {
  width: 100%;
  display: block;
}

.psp-embed-screen {
  position: absolute;
  left: 22%;
  top: 32.1%;
  width: 54.9%;
  height: 31.5%;
  overflow: hidden;
  background: #000;
  z-index: 1;
}

.psp-embed-screen iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.psp-video-link {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.psp-video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.psp-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ============================================
   entrance gate
   ============================================ */

body.entrance-body {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000;
  background-image: url('images/entrance-backdrop.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  padding: 20px;
}

.entrance-wrap {
  position: relative;
  width: min(46vw, 560px);
}

.entrance-bg {
  width: 100%;
  display: block;
  pointer-events: none;
  user-select: none;
}

.entrance-hotspot {
  position: absolute;
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.entrance-hotspot img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: brightness(1) drop-shadow(0 0 0 rgba(240, 168, 96, 0));
  transition: filter 0.25s ease;
}

.entrance-hotspot.yes:hover img,
.entrance-hotspot.yes:focus-visible img {
  filter: brightness(1.4) drop-shadow(0 0 18px rgba(240, 168, 96, 0.9));
}

.entrance-hotspot.no:hover img,
.entrance-hotspot.no:focus-visible img {
  filter: brightness(1.4) drop-shadow(0 0 18px rgba(120, 190, 230, 0.9));
}

/* ============================================
   falling blood drops
   ============================================ */

.blood-drops {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.blood-drop {
  position: absolute;
  top: -60px;
  opacity: 0;
  animation-name: blood-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}

@keyframes blood-fall {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0;
  }
  8% {
    opacity: 0.55;
  }
  92% {
    opacity: 0.55;
  }
  100% {
    transform: translate(var(--drift, 20px), 112vh) rotate(180deg);
    opacity: 0;
  }
}

/* ============================================
   CD player widget (98.css-style)
   ============================================ */

/* the widget is natively 260px wide; this scales the whole thing down
   so its footprint matches the 160px player/nav column on the home page */
.cd-player-wrap {
  width: 160px;
}

.cd-player-wrap .player {
  zoom: 0.6;
}

/* about.html and photos.html have a full-width (308px) sidebar slot for
   the player, so it's shown at its native size there instead */
.cd-player-wrap.large {
  width: 100%;
}

.cd-player-wrap.large .player {
  zoom: 1;
}

/* the collection page player, a bit smaller than the about-page one */
.cd-player-wrap.collection {
  width: 100%;
}

.cd-player-wrap.collection .player {
  zoom: 0.8;
}

.cd-player-wrap .title-bar {
  background: linear-gradient(90deg, #1a0900, #7a3a10, #d98b4a);
}

.cd-player-wrap .player {
  width: fit-content;
  border: black solid 1px;
  border-width: 1px 0px 0px 1px;
  margin-left: auto;
  margin-right: auto;
}

.cd-player-wrap .controlimg:hover {
  cursor: help;
}

/* styling to get the windows 98 effect, from 98.css [https://jdan.github.io/98.css/] */
.cd-player-wrap input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
}

.cd-player-wrap input[type="range"]:focus {
  outline: none;
}

.cd-player-wrap input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 21px;
  width: 11px;
  background: svg-load("https://raw.githubusercontent.com/jdan/98.css/main/icon/indicator-horizontal.svg");
  transform: translateY(-8px);
  box-shadow: none;
  border: none;
}

.cd-player-wrap input[type="range"].has-box-indicator::-webkit-slider-thumb {
  background: svg-load("https://raw.githubusercontent.com/jdan/98.css/main/icon/indicator-rectangle-horizontal.svg");
  transform: translateY(-10px);
}

.cd-player-wrap input[type="range"]::-moz-range-thumb {
  background: url("https://raw.githubusercontent.com/jdan/98.css/main/icon/indicator-horizontal.svg");
  border: 0;
  border-radius: 0;
  height: 21px;
  transform: translateY(2px);
  width: 11px;
}

.cd-player-wrap input[type="range"].has-box-indicator::-moz-range-thumb {
  background: svg-load("https://raw.githubusercontent.com/jdan/98.css/main/icon/indicator-rectangle-horizontal.svg");
  transform: translateY(0px);
}

.cd-player-wrap input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 2px;
  box-sizing: border-box;
  background: black;
  border-right: 1px solid grey;
  border-bottom: 1px solid grey;
  box-shadow: 1px 0 0 white, 1px 1px 0 white, 0 1px 0 white, -1px 0 0 darkgrey,
    -1px -1px 0 darkgrey, 0 -1px 0 darkgrey, -1px 1px 0 white, 1px -1px darkgrey;
}

.cd-player-wrap input[type="range"]::-moz-range-track {
  width: 100%;
  height: 2px;
  box-sizing: border-box;
  background: black;
  border-right: 1px solid grey;
  border-bottom: 1px solid grey;
  box-shadow: 1px 0 0 white, 1px 1px 0 white, 0 1px 0 white, -1px 0 0 darkgrey,
    -1px -1px 0 darkgrey, 0 -1px 0 darkgrey, -1px 1px 0 white, 1px -1px darkgrey;
}

.cd-player-wrap button,
.cd-player-wrap input,
.cd-player-wrap label,
.cd-player-wrap option,
.cd-player-wrap select,
.cd-player-wrap table,
.cd-player-wrap textarea,
.cd-player-wrap ul.tree-view {
  -webkit-font-smoothing: none;
  font-family: "Pixelated MS Sans Serif", Arial;
  font-size: 11px;
}

.cd-player-wrap u {
  border-bottom: .5px solid #222;
  text-decoration: none;
}

.cd-player-wrap button,
.cd-player-wrap input[type=reset],
.cd-player-wrap input[type=submit] {
  border: none;
  border-radius: 0;
  box-sizing: border-box;
  color: transparent;
  min-height: 23px;
  min-width: 75px;
  padding: 0 12px;
  text-shadow: 0 0 #222;
}

.cd-player-wrap .vertical-bar,
.cd-player-wrap button,
.cd-player-wrap input[type=reset],
.cd-player-wrap input[type=submit] {
  background: silver;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf;
}

.cd-player-wrap .vertical-bar {
  height: 20px;
  width: 4px;
}

.cd-player-wrap button:not(:disabled):active,
.cd-player-wrap input[type=reset]:not(:disabled):active,
.cd-player-wrap input[type=submit]:not(:disabled):active {
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
  text-shadow: 1px 1px #222;
}

.cd-player-wrap button:focus,
.cd-player-wrap input[type=reset]:focus,
.cd-player-wrap input[type=submit]:focus {
  outline: 1px dotted #000;
  outline-offset: -4px;
}

.cd-player-wrap button::-moz-focus-inner,
.cd-player-wrap input[type=reset]::-moz-focus-inner,
.cd-player-wrap input[type=submit]::-moz-focus-inner {
  border: 0;
}

.cd-player-wrap :disabled,
.cd-player-wrap :disabled + label,
.cd-player-wrap input[readonly],
.cd-player-wrap input[readonly] + label {
  color: grey;
}

.cd-player-wrap :disabled + label,
.cd-player-wrap button:disabled,
.cd-player-wrap input[type=reset]:disabled,
.cd-player-wrap input[type=submit]:disabled {
  text-shadow: 1px 1px 0 #fff;
}

.cd-player-wrap .title-bar-controls button {
  border: none;
  border-radius: 0;
  box-sizing: border-box;
  color: transparent;
  min-height: 23px;
  min-width: 75px;
  padding: 0 12px;
  text-shadow: 0 0 #222;
  background: silver;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf;
}

.cd-player-wrap .title-bar-controls button:not(:disabled):active {
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
  text-shadow: 1px 1px #222;
}

.cd-player-wrap .title-bar-controls button:focus {
  outline: 1px dotted #000;
  outline-offset: -4px;
}

.cd-player-wrap .title-bar-controls button::-moz-focus-inner {
  border: 0;
}

@font-face {
  font-family: "Pixelated MS Sans Serif";
  src: url("https://files.catbox.moe/1za99g.woff") format("woff");
  src: url("https://files.catbox.moe/8fwbkl.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Pixelated MS Sans Serif";
  src: url("https://files.catbox.moe/z7csle.woff") format("woff");
  src: url("https://files.catbox.moe/moqhx6.woff2") format("woff2");
  font-weight: bold;
  font-style: normal;
}

.cd-player-wrap .window,
.cd-player-wrap .title-bar {
  font-family: "Pixelated MS Sans Serif", Arial;
  -webkit-font-smoothing: none;
  font-size: 11px;
}

.cd-player-wrap .window {
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px #808080, inset 2px 2px #ffffff;
  background: #c0c0c0;
  padding: 3px;
  width: 260px;
}

.cd-player-wrap .title-bar {
  padding: 3px 2px 3px 3px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cd-player-wrap .title-bar-text {
  font-weight: bold;
  color: white;
  letter-spacing: 0;
  margin-right: 24px;
}

.cd-player-wrap .title-bar-controls {
  display: flex;
}

.cd-player-wrap .title-bar-controls button {
  padding: 0;
  display: block;
  min-width: 16px;
  min-height: 14px;
}

.cd-player-wrap .title-bar-controls button:active {
  padding: 0;
}

.cd-player-wrap .title-bar-controls button:focus {
  outline: none;
}

.cd-player-wrap .title-bar-controls button[aria-label=Minimize] {
  background-image: url("https://raw.githubusercontent.com/jdan/98.css/main/icon/minimize.svg");
  background-position: bottom 3px left 4px;
  background-repeat: no-repeat;
}

.cd-player-wrap .title-bar-controls button[aria-label=Maximize] {
  background-image: url("https://raw.githubusercontent.com/jdan/98.css/4a2282dd9170cabf730fb5803d1153d86b2e94e3/icon/maximize.svg");
  background-position: top 2px left 3px;
  background-repeat: no-repeat;
}

.cd-player-wrap .title-bar-controls button[aria-label=Close] {
  background-image: url("https://raw.githubusercontent.com/jdan/98.css/main/icon/close.svg");
  background-position: top 3px left 4px;
  background-repeat: no-repeat;
  margin-left: 2px;
}

.cd-player-wrap .window-body {
  margin: 0px;
  height: 98px;
}

.cd-player-wrap .flex {
  display: flex;
}

.cd-player-wrap .titlebaricon {
  height: 14px;
  width: 14px;
}

.cd-player-wrap .songtitlewindow {
  background-color: #fff;
  box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
}

#musicplayer {
  border: 2px solid silver;
  border-width: 2px 0px 0px 0px;
  width: 160px;
}

#imagestyle {
  background: silver;
  border: 2px solid silver;
  width: 95px;
  height: 95px;
  box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
}

.cd-player-wrap .ic {
  width: 90px;
  position: relative;
  bottom: 1px;
  right: 1px;
  overflow: hidden;
  padding: 2px;
  border: 2px solid transparent;
}

.cd-player-wrap .songtitlearrow {
  background-size: 100%;
  background-repeat: no-repeat;
  background-image: url(https://files.catbox.moe/f5e8np.png);
  height: 21px;
  width: 21px;
  position: relative;
  top: 2px;
  left: -2px;
  border: 0px solid transparent;
  border-width: 0px 0px 0px 0px;
}

.cd-player-wrap .songtitle {
  padding: 5px;
  border-bottom: 0px;
  display: block;
  font-family: "Pixelated MS Sans Serif";
  color: #000;
}

.cd-player-wrap .controls {
  font-size: 18px !important;
  text-align: center;
  width: 100%;
  position: relative;
  bottom: 10px;
}

.cd-player-wrap .controls td {
  padding: 8px 5px 0px 5px;
}

.cd-player-wrap button {
  min-width: 40px;
}

.cd-player-wrap .seeking {
  background-color: #c0c0c0;
  display: flex;
  justify-content: space-evenly;
  padding: 14px;
}

.cd-player-wrap .current-time {
  padding-right: 5px;
}

.cd-player-wrap .total-duration {
  padding-left: 5px;
}

.cd-player-wrap .controlimg {
  height: 15px;
  width: 15px;
}

/* ============================================
   mobile responsiveness
   ============================================ */

@media (max-width: 700px) {

  body {
    padding: 16px 10px;
    font-size: 14px;
  }

  .page-wrap,
  .page-wrap.flush {
    flex-direction: column;
    max-width: 100%;
    gap: 10px;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }

  /* the vertical wire divider only makes sense between two side-by-side
     columns, so hide it once the layout stacks */
  .wire-divider {
    display: none;
  }

  .tv-decor {
    display: none;
  }

  .profile-row {
    flex-shrink: 0;
  }

  .profile-box {
    width: 70px;
    flex-shrink: 0;
    align-self: flex-start;
    display: block;
  }

  .profile-box img {
    width: 70px;
    height: 70px;
  }

  .player-box {
    flex: 1;
    min-width: 0;
  }

  .player-nav-row {
    flex-direction: column;
    flex-basis: 100%;
    width: 100%;
    gap: 8px;
    align-items: flex-start;
  }

  .player-nav-col,
  .sidebar-updates-box {
    order: 0;
  }

  .player-nav-col {
    width: 100%;
  }

  .nav-textbox-group,
  .player-blinkie-group {
    width: 100%;
  }

  .sidebar-textbox {
    height: auto;
    padding: 10px;
  }

  .sidebar-textbox img {
    height: 24px;
    width: auto;
    margin: 2px;
  }

  .blinkie-box img {
    max-width: 45%;
  }

  .box-body.roomy {
    min-height: 0;
    padding: 16px 14px;
  }

  /* shrink the big decorative corner links so they don't swallow the screen */
  .corner-link {
    width: 140px;
  }

  .corner-link-left {
    width: 160px;
  }

  /* entrance gate needs to be wide enough to tap on a phone */
  .entrance-wrap {
    width: min(90vw, 420px);
  }

  /* fewer columns so game covers stay a readable size */
  .game-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .console-logo-plate img {
    max-width: 140px;
  }

  /* mobile only: PSP sits at the bottom right instead of the left */
  .psp-embed-wrap {
    align-self: flex-end;
  }
}

@media (max-width: 420px) {
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .corner-link {
    width: 110px;
  }

  .corner-link-left {
    width: 130px;
  }

  .psp-embed-wrap {
    width: 120px;
  }
}

/* ============================================
   about page, mobile only: drop the "home"
   button (the blue frost corner link still
   goes home) and move "video games" up next
   to the music player instead of its own box
   ============================================ */

@media (max-width: 700px) {

  /* this selector only ever matches the nav-grid on about.html,
     since it's the only page where a .nav-grid directly follows
     a .player-blinkie-group */
  .player-blinkie-group + .nav-grid {
    display: none;
  }

  .player-box.large {
    flex-wrap: wrap;
  }

  .player-videogames-link {
    display: block;
    margin-top: 6px;
    padding: 6px 0;
    font-size: 11px;
    letter-spacing: 0.03em;
    text-align: center;
    color: #f0a860;
    background: none;
    border: none;
  }

  .player-videogames-link:hover {
    color: #d98b4a;
    text-decoration: underline;
  }
}


