html {
  overflow-x: hidden;
  box-sizing: border-box;
}
*, *::before, *::after { box-sizing: inherit; }
body {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  background: #f5f0eb;
  position: relative;
  overflow-x: hidden;
  max-width: 100%;
}
@media (min-width: 501px) {
  body { padding: 0 16px; }
}
#texture-overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  background: url('assets/plastic_texture.png') repeat;
  background-size: 512px 512px;
  mix-blend-mode: overlay;
  opacity: 1;
  pointer-events: none;
  z-index: 1;
}
#console-logo {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  font-family: 'Audiowide', cursive;
  font-weight: 700;
  letter-spacing: 4px;
  line-height: 0.9;
  padding: 24px 28px 10px;
  background: linear-gradient(180deg, #ff6ec7 0%, #ff9a3c 30%, #ffe14f 55%, #44e5ff 80%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.4)) drop-shadow(0 -1px 0 rgba(255,255,255,0.08));
  text-transform: uppercase;
  width: fit-content;
}
#console-logo .logo-desktop:first-child {
  font-size: 22px;
}
#console-logo .logo-desktop:last-of-type {
  font-size: 34px;
}
#console-logo .logo-mobile {
  display: none;
}
#game-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.screen-socket {
  position: relative;
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
  padding: 4px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(0,0,0,0.2) 0%, transparent 40%),
    linear-gradient(to bottom, rgba(0,0,0,0.08), rgba(0,0,0,0.22));
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,0.35),
    inset 0 -1px 2px rgba(255,255,255,0.05),
    0 1px 0 rgba(255,255,255,0.04);
}
canvas {
  display: block;
  width: 500px;
  height: 500px;
  border-radius: 12px;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
@media (max-width: 500px) {
  #game-wrap {
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
  }
  .screen-socket {
    max-width: 100%;
    min-width: 0;
  }
  canvas {
    width: 100%;
    height: auto;
    max-width: 100%;
  }
  #console-logo {
    width: 100%;
    max-width: 100%;
    align-items: center;
    text-align: center;
    padding-top: 17px;
    padding-bottom: 17px;
    padding-left: 16px;
    padding-right: 16px;
  }
  #console-logo .logo-desktop { display: none; }
  #console-logo .logo-mobile {
    display: block;
    font-size: 13px;
    letter-spacing: 2px;
    padding: 2px 16px 4px;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.18);
  }
}
.screen-glare {
  position: absolute;
  top: 4px; left: 4px; right: 4px; bottom: 4px;
  background: url('assets/screen_glare.png') no-repeat center / cover;
  mix-blend-mode: screen;
  border-radius: 12px;
  pointer-events: none;
  opacity: 0.14;
  transform: scale(1.04);
}
#kb-left, #kb-right {
  display: none;
  align-items: center;
  justify-content: center;
  font-family: "Courier New", Courier, monospace;
  width: 160px;
  flex-shrink: 0;
}
@media (pointer: fine) and (min-width: 760px) {
  #kb-left, #kb-right { display: flex; }
}
@media (pointer: fine) and (min-width: 540px) and (max-width: 759px) {
  #game-wrap { flex-wrap: wrap; }
  #kb-below {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 32px;
    width: 100%;
    margin-top: 12px;
    font-family: "Courier New", Courier, monospace;
  }
}
.kb-cross {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 56px);
  grid-template-rows: repeat(3, 56px);
  gap: 4px;
}
.kb-cross .dpad-zone {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;
  touch-action: none;
}
.kb-key {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: none;
  border-radius: 12px;
  background: rgba(128,128,128,0.08);
  box-shadow:
    inset 1px 1px 2px rgba(255,255,255,0.15),
    inset -1px -1px 2px rgba(0,0,0,0.12),
    0 1px 1px rgba(0,0,0,0.06);
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 700;
  line-height: 1;
  gap: 2px;
  position: relative;
  z-index: 1;
  transform: translateY(-1px);
}
.kb-key::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0,0,0,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(0,0,0,0.18) 0%, transparent 50%),
    linear-gradient(to bottom, rgba(0,0,0,0.06), rgba(0,0,0,0.18));
  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.25),
    inset 0 -1px 1px rgba(255,255,255,0.04);
}
.kb-key .kb-primary { font-size: 18px; color: #555; }
.kb-key .kb-secondary { font-size: 9px; color: #bbb; }
.kb-empty { background: transparent !important; box-shadow: none !important; transform: none !important; }
.kb-empty::before { display: none !important; }
.kb-ab {
  display: grid;
  grid-template-columns: 68px 68px;
  grid-template-rows: 68px 68px;
}
.kb-ab .kb-a {
  grid-column: 1;
  grid-row: 1;
}
.kb-ab .kb-b {
  grid-column: 2;
  grid-row: 2;
}
.kb-ab .kb-key {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  font-size: 12px;
  box-shadow:
    inset 1px 2px 3px rgba(255,255,255,0.18),
    inset -1px -2px 3px rgba(0,0,0,0.15),
    0 1px 1px rgba(0,0,0,0.06);
  text-align: center;
  line-height: 1.2;
}
.kb-ab .kb-key::before {
  border-radius: 50%;
}

/* Desktop plastic buttons (same as gamepad) */
.kb-key:not(.kb-empty):has(.button-outer) {
  background-color: rgba(0, 0, 0, 0.75);
  box-shadow: -0.15em -0.15em 0.15em -0.075em rgba(5, 5, 5, 0.25),
      0.0375em 0.0375em 0.0675em 0 rgba(5, 5, 5, 0.1);
}
.kb-key:not(.kb-empty):has(.button-outer)::before {
  display: none;
}
.kb-key:not(.kb-empty):has(.button-outer)::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: calc(100% + 0.3em);
  height: calc(100% + 0.3em);
  top: -0.15em;
  left: -0.15em;
  border-radius: inherit;
  background: linear-gradient(-135deg,
      rgba(5, 5, 5, 0.5),
      transparent 20%,
      transparent 100%);
  filter: blur(0.0125em);
  opacity: 0.25;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* Desktop arrow keys (dpad): same plastic container + rim/inner shadows as other buttons */
.kb-cross .kb-key:not(.kb-empty) {
  background-color: rgba(0, 0, 0, 0.75);
  box-shadow: -0.15em -0.15em 0.15em -0.075em rgba(5, 5, 5, 0.25),
      0.0375em 0.0375em 0.0675em 0 rgba(5, 5, 5, 0.1);
}
.kb-cross .kb-key:not(.kb-empty)::before {
  display: none;
}
.kb-cross .kb-key:not(.kb-empty)::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: calc(100% + 0.3em);
  height: calc(100% + 0.3em);
  top: -0.15em;
  left: -0.15em;
  border-radius: inherit;
  background: linear-gradient(-135deg,
      rgba(5, 5, 5, 0.5),
      transparent 20%,
      transparent 100%);
  filter: blur(0.0125em);
  opacity: 0.25;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.kb-cross .kb-key:not(.kb-empty) .button-outer,
.kb-cross .kb-key:not(.kb-empty) .button-inner {
  border-radius: 12px;
}
.kb-cross .kb-key:not(.kb-empty) .button-outer {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 100ms ease;
  will-change: box-shadow;
  box-shadow: 0 0.05em 0.05em -0.01em var(--btn-rim, rgba(5, 5, 5, 1)),
      0 0.01em 0.01em -0.01em var(--btn-rim-50, rgba(5, 5, 5, 0.5)),
      0.15em 0.3em 0.1em -0.01em var(--btn-rim-25, rgba(5, 5, 5, 0.25));
}
.kb-cross .kb-key:not(.kb-empty):active .button-outer,
.kb-cross .kb-key:not(.kb-empty).pressed .button-outer {
  box-shadow: 0 0 0 0 rgba(5, 5, 5, 1), 0 0 0 0 rgba(5, 5, 5, 0.5),
      0 0 0 0 rgba(5, 5, 5, 0.25);
}
.kb-cross .kb-key:not(.kb-empty) .button-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 100ms ease, clip-path 100ms ease, transform 100ms ease;
  will-change: box-shadow, clip-path, transform;
  overflow: clip;
  clip-path: inset(0 0 0 0 round 12px);
  box-shadow:
      0 0 0 0 inset rgba(5, 5, 5, 0.1),
      -0.05em -0.05em 0.05em 0 inset rgba(5, 5, 5, 0.25),
      0 0 0 0 inset rgba(5, 5, 5, 0.1),
      0 0 0.05em 0.2em inset var(--btn-inner-highlight, rgba(255, 255, 255, 0.25)),
      0.025em 0.05em 0.1em 0 inset rgba(255, 255, 255, 1),
      0.12em 0.12em 0.12em inset rgba(255, 255, 255, 0.25),
      -0.075em -0.25em 0.25em 0.1em inset rgba(5, 5, 5, 0.25);
  background-image: linear-gradient(135deg, rgba(230, 230, 230, 1), rgba(180, 180, 180, 1));
}
.kb-cross .kb-key:not(.kb-empty):active .button-inner,
.kb-cross .kb-key:not(.kb-empty).pressed .button-inner {
  clip-path: inset(clamp(1px, 0.0625em, 2px) clamp(1px, 0.0625em, 2px) clamp(1px, 0.0625em, 2px) clamp(1px, 0.0625em, 2px) round 12px);
  box-shadow:
      0.1em 0.15em 0.05em 0 inset rgba(5, 5, 5, 0.75),
      -0.025em -0.03em 0.05em 0.025em inset rgba(5, 5, 5, 0.5),
      0.25em 0.25em 0.2em 0 inset rgba(5, 5, 5, 0.5),
      0 0 0.05em 0.5em inset rgba(255, 255, 255, 0.15),
      0 0 0 0 inset rgba(255, 255, 255, 1),
      0.12em 0.12em 0.12em inset rgba(255, 255, 255, 0.25),
      -0.075em -0.12em 0.2em 0.1em inset rgba(5, 5, 5, 0.25);
}
.kb-cross .kb-key:not(.kb-empty) .button-inner span {
  position: relative;
  z-index: 4;
  letter-spacing: -0.05em;
  font-weight: 500;
  color: rgba(0, 0, 0, 0);
  background-image: linear-gradient(135deg, rgba(25, 25, 25, 1), rgba(75, 75, 75, 1));
  -webkit-background-clip: text;
  background-clip: text;
  transition: transform 100ms ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  will-change: transform;
  text-shadow: rgba(0, 0, 0, 0.1) 0 0 0.1em;
  -webkit-user-select: none;
  user-select: none;
}
.kb-cross .kb-key:not(.kb-empty):active .button-inner span,
.kb-cross .kb-key:not(.kb-empty).pressed .button-inner span {
  transform: scale(0.975);
}
.kb-key:not(.kb-empty) .button-outer {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 100ms ease;
  will-change: box-shadow;
  box-shadow: 0 0.05em 0.05em -0.01em var(--btn-rim, rgba(5, 5, 5, 1)),
      0 0.01em 0.01em -0.01em var(--btn-rim-50, rgba(5, 5, 5, 0.5)),
      0.15em 0.3em 0.1em -0.01em var(--btn-rim-25, rgba(5, 5, 5, 0.25));
}
.kb-key:not(.kb-empty):active .button-outer,
.kb-ab .kb-key:not(.kb-empty).pressed .button-outer {
  box-shadow: 0 0 0 0 rgba(5, 5, 5, 1), 0 0 0 0 rgba(5, 5, 5, 0.5),
      0 0 0 0 rgba(5, 5, 5, 0.25);
}
.kb-key:not(.kb-empty) .button-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 100ms ease, clip-path 100ms ease, transform 100ms ease;
  will-change: box-shadow, clip-path, transform;
  overflow: clip;
  clip-path: inset(0 0 0 0 round 12px);
  box-shadow:
      0 0 0 0 inset rgba(5, 5, 5, 0.1),
      -0.05em -0.05em 0.05em 0 inset rgba(5, 5, 5, 0.25),
      0 0 0 0 inset rgba(5, 5, 5, 0.1),
      0 0 0.05em 0.2em inset var(--btn-inner-highlight, rgba(255, 255, 255, 0.25)),
      0.025em 0.05em 0.1em 0 inset rgba(255, 255, 255, 1),
      0.12em 0.12em 0.12em inset rgba(255, 255, 255, 0.25),
      -0.075em -0.25em 0.25em 0.1em inset rgba(5, 5, 5, 0.25);
  background-image: linear-gradient(135deg, rgba(230, 230, 230, 1), rgba(180, 180, 180, 1));
}
.kb-ab .kb-key:not(.kb-empty) .button-inner {
  clip-path: inset(0 0 0 0 round 999vw);
}
.kb-key:not(.kb-empty):active .button-inner {
  clip-path: inset(clamp(1px, 0.0625em, 2px) clamp(1px, 0.0625em, 2px) clamp(1px, 0.0625em, 2px) clamp(1px, 0.0625em, 2px) round 12px);
  box-shadow:
      0.1em 0.15em 0.05em 0 inset rgba(5, 5, 5, 0.75),
      -0.025em -0.03em 0.05em 0.025em inset rgba(5, 5, 5, 0.5),
      0.25em 0.25em 0.2em 0 inset rgba(5, 5, 5, 0.5),
      0 0 0.05em 0.5em inset rgba(255, 255, 255, 0.15),
      0 0 0 0 inset rgba(255, 255, 255, 1),
      0.12em 0.12em 0.12em inset rgba(255, 255, 255, 0.25),
      -0.075em -0.12em 0.2em 0.1em inset rgba(5, 5, 5, 0.25);
}
.kb-ab .kb-key:not(.kb-empty):active .button-inner,
.kb-ab .kb-key:not(.kb-empty).pressed .button-inner {
  clip-path: inset(clamp(1px, 0.0625em, 2px) clamp(1px, 0.0625em, 2px) clamp(1px, 0.0625em, 2px) clamp(1px, 0.0625em, 2px) round 999vw);
  box-shadow:
      0.1em 0.15em 0.05em 0 inset rgba(5, 5, 5, 0.75),
      -0.025em -0.03em 0.05em 0.025em inset rgba(5, 5, 5, 0.5),
      0.25em 0.25em 0.2em 0 inset rgba(5, 5, 5, 0.5),
      0 0 0.05em 0.5em inset rgba(255, 255, 255, 0.15),
      0 0 0 0 inset rgba(255, 255, 255, 1),
      0.12em 0.12em 0.12em inset rgba(255, 255, 255, 0.25),
      -0.075em -0.12em 0.2em 0.1em inset rgba(5, 5, 5, 0.25);
}
.kb-key:not(.kb-empty) .button-inner span {
  position: relative;
  z-index: 4;
  letter-spacing: -0.05em;
  font-weight: 500;
  color: rgba(0, 0, 0, 0);
  background-image: linear-gradient(135deg, rgba(25, 25, 25, 1), rgba(75, 75, 75, 1));
  -webkit-background-clip: text;
  background-clip: text;
  transition: transform 100ms ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  will-change: transform;
  text-shadow: rgba(0, 0, 0, 0.1) 0 0 0.1em;
  -webkit-user-select: none;
  user-select: none;
}
.kb-key:not(.kb-empty):active .button-inner span,
.kb-ab .kb-key:not(.kb-empty).pressed .button-inner span {
  transform: scale(0.975);
}

#clipping {
  position: relative;
  z-index: 2;
  max-width: 500px;
  margin: 6rem auto 3rem;
  padding: 2rem 2rem 1.5rem;
  background: url('assets/paper_texture.png') repeat;
  background-size: 300px;
  box-shadow:
    2px 3px 12px rgba(0,0,0,0.25),
    0 0 0 1px rgba(0,0,0,0.04);
  transform: rotate(-2.5deg) translateY(40px);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

#clipping::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(245, 235, 215, 0.35);
  pointer-events: none;
}

#headline {
  text-align: left;
  margin: 0 0 0.25rem;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1.2;
  color: #000;
  letter-spacing: -0.02em;
}

#clipping-rule {
  border: none;
  border-top: 1px solid #999;
  margin: 0 0 0.75rem;
}

#article {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #2a2a2a;
  column-count: 2;
  column-gap: 1.5rem;
  column-rule: 1px solid #bbb;
  text-align: justify;
  hyphens: auto;
}

#article p {
  margin: 0 0 0.65em;
  text-indent: 1em;
}
#article p:first-child {
  text-indent: 0;
}
#article p:first-child::first-letter {
  font-family: "Playfair Display", serif;
  font-size: 2.4em;
  float: left;
  line-height: 0.8;
  margin: 0.05em 0.08em 0 -0.02em;
  font-weight: 900;
  color: #111;
}

#article p.real-world {
  column-span: all;
  text-indent: 0;
  margin-top: 0.75em;
  padding-top: 0.6em;
  border-top: 1px dashed #999;
  font-style: italic;
  color: #555;
  font-size: 0.82rem;
}
@media (max-width: 500px) {
  #article {
    column-count: 1;
    column-rule: none;
  }
}
#gamepad {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 1rem 1.2rem 1.4rem;
  pointer-events: none;
  z-index: 100;
  display: none;
  touch-action: none;
}
@media (pointer: coarse) {
  #game-wrap { flex-direction: column; align-items: center; }
  #gamepad {
    display: flex;
    position: static;
    width: 100%;
    padding-top: 1rem;
  }
  #gamepad .gp-ab {
    position: relative;
    width: 126px;
    height: 126px;
  }
  #gamepad .gp-ab .gp-b,
  #gamepad .gp-ab .gp-a {
    width: 58px;
    height: 58px;
    font-size: 1.15rem;
  }
  #gamepad .gp-ab .gp-b {
    position: absolute;
    bottom: 0;
    left: 0;
  }
  #gamepad .gp-ab .gp-a {
    position: absolute;
    top: 0;
    right: 0;
  }
  #gamepad .gp-dpad .gp-btn,
  #gamepad .gp-dpad .gp-center {
    width: 46px;
    height: 46px;
  }
}
.gp-dpad, .gp-ab {
  pointer-events: auto;
}
.gp-dpad {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.gp-dpad .dpad-zone {
  position: absolute;
  inset: 0;
  z-index: 1;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.gp-mid-row {
  display: flex;
  align-items: center;
  gap: 2px;
}
.gp-center {
  width: 42px;
  height: 42px;
}
.gp-dpad .gp-btn,
.gp-dpad .gp-center {
  pointer-events: none;
}

/* D-pad plastic button (same press effect as A/B) */
.gp-dpad .gp-btn {
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.75);
  box-shadow: -0.15em -0.15em 0.15em -0.075em rgba(5, 5, 5, 0.25),
      0.0375em 0.0375em 0.0675em 0 rgba(5, 5, 5, 0.1);
  padding: 0;
}
.gp-dpad .gp-btn::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: calc(100% + 0.3em);
  height: calc(100% + 0.3em);
  top: -0.15em;
  left: -0.15em;
  border-radius: inherit;
  background: linear-gradient(-135deg,
      rgba(5, 5, 5, 0.5),
      transparent 20%,
      transparent 100%);
  filter: blur(0.0125em);
  opacity: 0.25;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.gp-dpad .gp-btn .button-outer {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 100ms ease;
  will-change: box-shadow;
  box-shadow: 0 0.05em 0.05em -0.01em var(--btn-rim, rgba(5, 5, 5, 1)),
      0 0.01em 0.01em -0.01em var(--btn-rim-50, rgba(5, 5, 5, 0.5)),
      0.15em 0.3em 0.1em -0.01em var(--btn-rim-25, rgba(5, 5, 5, 0.25));
}
.gp-dpad .gp-btn.pressed .button-outer {
  box-shadow: 0 0 0 0 rgba(5, 5, 5, 1), 0 0 0 0 rgba(5, 5, 5, 0.5),
      0 0 0 0 rgba(5, 5, 5, 0.25);
}
.gp-dpad .gp-btn .button-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 100ms ease, clip-path 100ms ease, transform 100ms ease;
  will-change: box-shadow, clip-path, transform;
  overflow: clip;
  clip-path: inset(0 0 0 0 round 8px);
  box-shadow:
      0 0 0 0 inset rgba(5, 5, 5, 0.1),
      -0.05em -0.05em 0.05em 0 inset rgba(5, 5, 5, 0.25),
      0 0 0 0 inset rgba(5, 5, 5, 0.1),
      0 0 0.05em 0.2em inset var(--btn-inner-highlight, rgba(255, 255, 255, 0.25)),
      0.025em 0.05em 0.1em 0 inset rgba(255, 255, 255, 1),
      0.12em 0.12em 0.12em inset rgba(255, 255, 255, 0.25),
      -0.075em -0.25em 0.25em 0.1em inset rgba(5, 5, 5, 0.25);
  background-image: linear-gradient(135deg, rgba(230, 230, 230, 1), rgba(180, 180, 180, 1));
}
.gp-dpad .gp-btn.pressed .button-inner {
  clip-path: inset(clamp(1px, 0.0625em, 2px) clamp(1px, 0.0625em, 2px) clamp(1px, 0.0625em, 2px) clamp(1px, 0.0625em, 2px) round 8px);
  box-shadow:
      0.1em 0.15em 0.05em 0 inset rgba(5, 5, 5, 0.75),
      -0.025em -0.03em 0.05em 0.025em inset rgba(5, 5, 5, 0.5),
      0.25em 0.25em 0.2em 0 inset rgba(5, 5, 5, 0.5),
      0 0 0.05em 0.5em inset rgba(255, 255, 255, 0.15),
      0 0 0 0 inset rgba(255, 255, 255, 1),
      0.12em 0.12em 0.12em inset rgba(255, 255, 255, 0.25),
      -0.075em -0.12em 0.2em 0.1em inset rgba(5, 5, 5, 0.25);
}
.gp-dpad .gp-btn .button-inner span {
  position: relative;
  z-index: 4;
  letter-spacing: -0.05em;
  font-weight: 500;
  color: rgba(0, 0, 0, 0);
  background-image: linear-gradient(135deg, rgba(25, 25, 25, 1), rgba(75, 75, 75, 1));
  -webkit-background-clip: text;
  background-clip: text;
  transition: transform 100ms ease;
  display: block;
  will-change: transform;
  text-shadow: rgba(0, 0, 0, 0.1) 0 0 0.1em;
  -webkit-user-select: none;
  user-select: none;
}
.gp-dpad .gp-btn.pressed .button-inner span {
  transform: scale(0.975);
}

.kb-cross .dpad-zone {
  cursor: pointer;
}
.gp-btn {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  transition: background 0.1s;
}
.gp-btn:active {
  background: rgba(255,255,255,0.4);
}
.gp-dpad .gp-btn:active,
.gp-dpad .gp-btn.pressed,
.gp-a:active,
.gp-b:active {
  background-color: rgba(0, 0, 0, 0.75);
}
.gp-ab {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 8px;
}
.gp-a, .gp-b {
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  border-radius: 999vw;
  font-size: 1.1rem;
  position: relative;
  background-color: rgba(0, 0, 0, 0.75);
  box-shadow: -0.15em -0.15em 0.15em -0.075em rgba(5, 5, 5, 0.25),
      0.0375em 0.0375em 0.0675em 0 rgba(5, 5, 5, 0.1);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gp-a::after,
.gp-b::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: calc(100% + 0.3em);
  height: calc(100% + 0.3em);
  top: -0.15em;
  left: -0.15em;
  border-radius: inherit;
  background: linear-gradient(-135deg,
      rgba(5, 5, 5, 0.5),
      transparent 20%,
      transparent 100%);
  filter: blur(0.0125em);
  opacity: 0.25;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.gp-a .button-outer,
.gp-b .button-outer {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 100ms ease;
  will-change: box-shadow;
  box-shadow: 0 0.05em 0.05em -0.01em var(--btn-rim, rgba(5, 5, 5, 1)),
      0 0.01em 0.01em -0.01em var(--btn-rim-50, rgba(5, 5, 5, 0.5)),
      0.15em 0.3em 0.1em -0.01em var(--btn-rim-25, rgba(5, 5, 5, 0.25));
}
.gp-a.pressed .button-outer,
.gp-b.pressed .button-outer {
  box-shadow: 0 0 0 0 rgba(5, 5, 5, 1), 0 0 0 0 rgba(5, 5, 5, 0.5),
      0 0 0 0 rgba(5, 5, 5, 0.25);
}
.gp-a .button-inner,
.gp-b .button-inner {
  --inset: 0.035em;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 100ms ease, clip-path 100ms ease,
      background-image 100ms ease, transform 100ms ease;
  will-change: box-shadow, clip-path, background-image, transform;
  overflow: clip;
  clip-path: inset(0 0 0 0 round 999vw);
  box-shadow:
      0 0 0 0 inset rgba(5, 5, 5, 0.1),
      -0.05em -0.05em 0.05em 0 inset rgba(5, 5, 5, 0.25),
      0 0 0 0 inset rgba(5, 5, 5, 0.1),
      0 0 0.05em 0.2em inset var(--btn-inner-highlight, rgba(255, 255, 255, 0.25)),
      0.025em 0.05em 0.1em 0 inset rgba(255, 255, 255, 1),
      0.12em 0.12em 0.12em inset rgba(255, 255, 255, 0.25),
      -0.075em -0.25em 0.25em 0.1em inset rgba(5, 5, 5, 0.25);
}
.gp-a.pressed .button-inner,
.gp-b.pressed .button-inner {
  clip-path: inset(clamp(1px, 0.0625em, 2px) clamp(1px, 0.0625em, 2px) clamp(1px, 0.0625em, 2px) clamp(1px, 0.0625em, 2px) round 999vw);
  box-shadow:
      0.1em 0.15em 0.05em 0 inset rgba(5, 5, 5, 0.75),
      -0.025em -0.03em 0.05em 0.025em inset rgba(5, 5, 5, 0.5),
      0.25em 0.25em 0.2em 0 inset rgba(5, 5, 5, 0.5),
      0 0 0.05em 0.5em inset rgba(255, 255, 255, 0.15),
      0 0 0 0 inset rgba(255, 255, 255, 1),
      0.12em 0.12em 0.12em inset rgba(255, 255, 255, 0.25),
      -0.075em -0.12em 0.2em 0.1em inset rgba(5, 5, 5, 0.25);
}
.gp-a .button-inner span,
.gp-b .button-inner span {
  position: relative;
  z-index: 4;
  letter-spacing: -0.05em;
  font-weight: 500;
  color: rgba(0, 0, 0, 0);
  background-image: linear-gradient(135deg, rgba(25, 25, 25, 1), rgba(75, 75, 75, 1));
  -webkit-background-clip: text;
  background-clip: text;
  transition: transform 100ms ease;
  display: block;
  will-change: transform;
  text-shadow: rgba(0, 0, 0, 0.1) 0 0 0.1em;
  -webkit-user-select: none;
  user-select: none;
}
.gp-a.pressed .button-inner span,
.gp-b.pressed .button-inner span {
  transform: scale(0.975);
}
.gp-a .button-inner {
  background-image: linear-gradient(135deg, rgba(200, 240, 210, 1), rgba(120, 200, 140, 1));
}
.gp-b .button-inner {
  background-image: linear-gradient(135deg, rgba(240, 200, 200, 1), rgba(200, 120, 120, 1));
}
#site-footer {
  position: relative;
  z-index: 2;
  text-align: left;
  padding: 24px 16px 12px;
  font-size: 11px;
  color: #777;
  font-family: Georgia, 'Times New Roman', serif;
}
