/* Cookie consent bar + site legal footer */
.pdcCookieBar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12000;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(8, 4, 26, 0.96);
  border-top: 2px solid rgba(122, 238, 255, 0.35);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.pdcCookieBar__inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}

.pdcCookieBar__text {
  margin: 0;
  flex: 1 1 220px;
}

.pdcCookieBar__text a {
  color: #7ae;
  text-decoration: underline;
}

.pdcCookieBar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.pdcCookieBar__btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
}

.pdcCookieBar__btn--ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.25);
}

.pdcCookieBar__btn--primary {
  background: #7c5cff;
  color: #fff;
  border-color: #9b84ff;
}

.pdcCookieBar__btn:focus-visible {
  outline: 2px solid #7ae;
  outline-offset: 2px;
}

html.pdcCookieBarOpen body {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.pdcSiteLegal {
  position: relative;
  margin: 32px 0 0;
  padding: 20px 12px calc(20px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-family: Inter, system-ui, sans-serif;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(8, 4, 26, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

html.pdcLegalPage .pdcSiteLegal {
  margin-top: 40px;
}

.pdcSettingsLegal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 12px;
}

.pdcSettingsLegal a {
  color: rgba(122, 238, 255, 0.9);
  text-decoration: none;
}

.pdcSettingsLegal a:hover {
  text-decoration: underline;
}

.pdcSiteLegal a {
  color: rgba(122, 238, 255, 0.85);
  text-decoration: none;
}

.pdcSiteLegal a:hover {
  text-decoration: underline;
}

.pdcSiteLegal__sep {
  margin: 0 0.35em;
  opacity: 0.45;
}

html.pdcLegalPage {
  background: #0a0f2c;
  color: #e8ecff;
}

html.pdcLegalPage body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

.pdcLegalWrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 24px 18px 48px;
}

.pdcLegalWrap:has(.pdcAboutContent) {
  max-width: 44rem;
}

.pdcLegalWrap h1 {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(11px, 2.8vw, 14px);
  line-height: 1.5;
  color: #7ae;
  margin: 0 0 8px;
}

.pdcLegalWrap .pdcLegalUpdated {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 24px;
}

.pdcLegalWrap h2 {
  font-size: 1.05rem;
  margin: 28px 0 10px;
  color: #f0d878;
}

.pdcLegalWrap p,
.pdcLegalWrap li {
  color: rgba(255, 255, 255, 0.82);
}

.pdcLegalWrap ul {
  padding-left: 1.25em;
}

.pdcLegalWrap a {
  color: #7ae;
}

.pdcLegalNav {
  margin-bottom: 24px;
  font-size: 14px;
}

.pdcLegalNav a {
  color: #7ae;
}

.pdcLegalTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 12px 0 20px;
}

.pdcLegalTable th,
.pdcLegalTable td {
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.pdcLegalTable th {
  background: rgba(124, 92, 255, 0.15);
  color: #e8ecff;
}

/* Ko-fi tip box: warm gold + coral (generosity, value, action — not cool purple). */
.pdcDonateStub {
  --pdc-donate-coral: #ff5e5b;
  --pdc-donate-coral-deep: #d94a47;
  --pdc-donate-gold: #ffc857;
  --pdc-donate-gold-soft: #ffe8b8;
  margin: 28px 0;
  padding: 20px 18px;
  border: 2px solid rgb(255 196 120 / 0.5);
  border-radius: 10px;
  background:
    linear-gradient(
      155deg,
      rgb(255 148 72 / 0.16) 0%,
      rgb(255 94 91 / 0.12) 48%,
      rgb(232 184 74 / 0.1) 100%
    );
  box-shadow:
    0 0 28px rgb(255 120 60 / 0.14),
    inset 0 1px 0 rgb(255 228 180 / 0.18);
}

.pdcDonateStub a:not(.pdcDonateKofiBtn) {
  color: #ffb89a;
}

.pdcDonateStub a:not(.pdcDonateKofiBtn):hover {
  color: var(--pdc-donate-gold-soft);
}

.pdcDonateStub__badge {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2a1208;
  background: linear-gradient(180deg, var(--pdc-donate-gold) 0%, #e8a830 100%);
  border-radius: 4px;
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.2);
}

.pdcDonateStub__title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: var(--pdc-donate-gold);
  text-shadow: 0 0 18px rgb(255 200 87 / 0.35);
}

.pdcDonateStub__note {
  font-size: 14px;
  color: rgb(255 220 190 / 0.72);
  margin-bottom: 0;
}

.pdcDonateStub__actions {
  margin: 16px 0;
}

.pdcDonateKofiBtn {
  display: inline-block;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(180deg, #ff7a5e 0%, var(--pdc-donate-coral) 42%, var(--pdc-donate-coral-deep) 100%);
  border: 2px solid #ffc4b8;
  border-radius: 10px;
  box-shadow:
    0 3px 0 rgb(160 45 40 / 0.85),
    0 0 22px rgb(255 94 91 / 0.38);
  transition:
    filter 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.pdcDonateKofiBtn:hover {
  filter: brightness(1.08) saturate(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 4px 0 rgb(160 45 40 / 0.85),
    0 0 28px rgb(255 94 91 / 0.48);
}

.pdcDonateKofiBtn:active {
  transform: translateY(1px);
  box-shadow:
    0 1px 0 rgb(160 45 40 / 0.85),
    0 0 16px rgb(255 94 91 / 0.32);
}

.pdcDonateKofiBtn:focus-visible {
  outline: 2px solid var(--pdc-donate-gold);
  outline-offset: 3px;
}

/* About modal (in-app; content from about.html) */
.pdcAboutModal[hidden] {
  display: none !important;
}

.pdcAboutModal {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: grid;
  grid-template: 1fr / 1fr;
  padding:
    max(6px, env(safe-area-inset-top, 0px))
    max(6px, env(safe-area-inset-right, 0px))
    max(6px, env(safe-area-inset-bottom, 0px))
    max(6px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.pdcAboutModal__scrim {
  grid-area: 1 / 1;
  margin: 0;
  padding: 0;
  border: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: rgba(8, 4, 26, 0.55);
  -webkit-backdrop-filter: blur(8px) saturate(1.05);
  backdrop-filter: blur(8px) saturate(1.05);
  cursor: pointer;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .pdcAboutModal__scrim {
    background: rgba(8, 4, 26, 0.72);
  }
}

/* Layout box matches scaled panel footprint (JS sets --pdc-about-modal-scale). */
.pdcAboutModal__scaleSlot {
  grid-area: 1 / 1;
  place-self: center;
  position: relative;
  z-index: 1;
  width: calc(var(--pdc-about-design-w, 32rem) * var(--pdc-about-modal-scale, 1));
  height: calc(var(--pdc-about-modal-h, 640px) * var(--pdc-about-modal-scale, 1));
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.22s ease-out,
    transform 0.22s ease-out;
}

.pdcAboutModal.is-open .pdcAboutModal__scaleSlot {
  opacity: 1;
  transform: none;
}

.pdcAboutModal__scaleSlot > .pdcAboutModal__panel {
  pointer-events: auto;
}

.pdcAboutModal__panel {
  --pdc-about-design-w: min(680px, calc(100vw - 24px));
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--pdc-about-design-w);
  max-width: none;
  max-height: min(92vh, 880px);
  margin-left: calc(var(--pdc-about-design-w) / -2);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background: linear-gradient(165deg, #12183a 0%, #0a0f2c 55%, #08061a 100%);
  border: 2px solid rgb(255 80 170 / 0.95);
  border-radius: 12px;
  box-shadow:
    0 0 0 2px #000,
    0 0 10px rgb(255 45 149 / 0.55),
    0 0 22px rgb(255 80 180 / 0.45),
    0 0 38px rgb(255 45 149 / 0.28),
    0 16px 48px rgba(0, 0, 0, 0.55),
    inset 0 0 24px rgb(255 45 149 / 0.06);
  transform: scale(var(--pdc-about-modal-scale, 1));
  transform-origin: top center;
  overflow: hidden;
}

/* About / tip page + modal content */
.pdcAboutContent__a11yTitle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pdcAboutHero {
  margin: 0 0 5px;
  padding: 0 0 5px;
  border-bottom: none;
}

.pdcAboutHero::after {
  content: "";
  display: block;
  margin: 0 5px;
  border-bottom: 1px solid rgba(122, 238, 255, 0.16);
}

.pdcLegalWrap .pdcAboutHero__title {
  margin: 0 0 14px;
  font-family: Inter, system-ui, sans-serif;
  font-size: clamp(1.35rem, 4.2vw, 1.65rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #f4f6ff;
}

.pdcAboutHero__body {
  font-size: clamp(calc(15px - 1pt), calc(3.8vw - 1pt), calc(17px - 1pt));
  line-height: 1.62;
  color: rgba(255, 255, 255, 0.9);
}

.pdcAboutHero__body p {
  margin: 0 0 0.95em;
  max-width: 38em;
}

.pdcAboutHero__body p:last-child {
  margin-bottom: 5px;
}

.pdcAboutTipCard {
  --pdc-about-tip-coral: #ff5e5b;
  --pdc-about-tip-coral-deep: #d94a47;
  --pdc-about-tip-gold: #ffc857;
  --pdc-about-tip-gold-soft: #ffe8b8;
  --pdc-about-tip-green: #39ff7a;
  --pdc-about-tip-green-mid: #8bac0f;
  --pdc-about-tip-green-deep: #0f380f;
  --pdc-about-tip-green-bg: #1a3d1a;
  margin: 0 0 5px;
  padding: 20px 18px 18px;
  border-radius: 12px;
  border: 2px solid rgb(57 255 122 / 0.55);
  background:
    linear-gradient(
      165deg,
      rgb(48 98 48 / 0.45) 0%,
      rgb(26 61 26 / 0.92) 42%,
      rgb(15 56 15 / 0.98) 100%
    );
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 0.5),
    0 0 20px rgb(57 255 122 / 0.14),
    inset 0 1px 0 rgb(155 188 15 / 0.12);
}

.pdcLegalWrap .pdcAboutTipCard__title {
  margin: 0 0 12px;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(calc(9px + 1pt), calc(2.35vw + 1pt), calc(11px + 1pt));
  line-height: 1.65;
  letter-spacing: 0.02em;
  color: var(--pdc-about-tip-gold);
  text-shadow: 0 0 20px rgb(255 200 87 / 0.32);
}

.pdcAboutTipCard__body {
  margin: 0 0 0.85em;
  font-size: clamp(calc(15px - 1pt), calc(3.7vw - 1pt), calc(16px - 1pt));
  line-height: 1.58;
  color: rgba(255, 248, 240, 0.92);
  max-width: 36em;
}

.pdcAboutTipCard__body:last-of-type {
  margin-bottom: 1.1em;
}

.pdcAboutTipCard__actions {
  margin: 0 0 8px;
  text-align: center;
}

.pdcAboutInsertCoinBtn {
  display: inline-block;
  min-width: min(100%, 220px);
  padding: 14px 26px;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(calc(10px - 1pt), calc(2.6vw - 1pt), calc(12px - 1pt));
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  color: #000 !important;
  background: linear-gradient(180deg, #ffe566 0%, var(--pdc-about-tip-gold) 38%, #e8a830 100%);
  border: 3px solid #000;
  border-radius: 8px;
  box-shadow:
    0 4px 0 #000,
    0 0 18px rgb(57 255 122 / 0.2);
  transition:
    transform 0.14s ease,
    filter 0.14s ease,
    box-shadow 0.14s ease;
}

.pdcAboutInsertCoinBtn:hover {
  color: #000 !important;
  filter: brightness(1.06) saturate(1.05);
  transform: translateY(-2px);
  box-shadow:
    0 6px 0 #000,
    0 0 12px rgb(255 230 120 / 0.85),
    0 0 28px rgb(255 200 87 / 0.65),
    0 0 44px rgb(255 180 60 / 0.4);
}

.pdcAboutInsertCoinBtn:active {
  color: #000 !important;
  transform: translateY(2px);
  box-shadow:
    0 1px 0 #000,
    0 0 12px rgb(57 255 122 / 0.18);
}

.pdcAboutInsertCoinBtn:focus-visible {
  outline: 2px solid #7ae;
  outline-offset: 3px;
  box-shadow:
    0 4px 0 #000,
    0 0 12px rgb(255 230 120 / 0.75),
    0 0 24px rgb(255 200 87 / 0.55);
}

.pdcAboutTipCard__kicker {
  margin: 0 0 10px;
  font-size: calc(13px - 1pt + 2pt);
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  color: rgb(255 220 190 / 0.72);
}

.pdcAboutTipCard__payNote {
  margin: 0 auto;
  font-size: calc(12px - 1pt + 2pt);
  line-height: 1.5;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  max-width: 36em;
}

.pdcAboutPlayTipActions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.pdcAboutPlayTipBtn {
  cursor: pointer;
  width: min(100%, 320px);
  border: 3px solid #000;
  font: inherit;
}

.pdcAboutPlayTipBtn:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.pdcAboutPlayTipLoading,
.pdcAboutPlayTipEmpty {
  text-align: center;
  margin-bottom: 0 !important;
}

.pdcAboutPlayTipStatus {
  margin: 12px auto 0;
  font-size: calc(13px - 1pt + 2pt);
  line-height: 1.5;
  text-align: center;
  color: rgb(180 255 210 / 0.92);
  max-width: 36em;
}

.pdcAboutPlayTipStatus--error {
  color: #ffb4b4;
}

.pdcAboutHelp {
  margin: 5px 0 0;
  padding: 5px 0 0;
  border-top: none;
}

.pdcAboutHelp::before {
  content: "";
  display: block;
  margin: 0 5px 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pdcLegalWrap .pdcAboutHelp__title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
}

.pdcAboutHelp__list {
  margin: 0;
  padding: 0 0 0 1.15em;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.pdcAboutHelp__list li {
  margin-bottom: 0.45em;
}

.pdcAboutHelp__list a {
  color: #7ae;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pdcAboutHelp__list a:hover {
  color: #b8f0ff;
}


.pdcAboutModal__head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(122, 238, 255, 0.2);
}

.pdcAboutModal__head--compact {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 4;
  align-items: flex-end;
  min-height: 0;
  padding: 0;
  border-bottom: 0;
  pointer-events: none;
}

.pdcAboutModal__intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.pdcAboutModal__portrait {
  display: block;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border: 2px solid rgba(122, 238, 255, 0.5);
  border-radius: 6px;
  box-shadow:
    0 0 0 2px #000,
    0 0 16px rgba(124, 92, 255, 0.35);
}

.pdcAboutModal__title {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(9px, 2.4vw, 11px);
  line-height: 1.5;
  color: #7ae;
  letter-spacing: 0.04em;
  text-align: center;
}

.pdcAboutModal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 2px solid #ffe566;
  border-radius: 6px;
  background: rgba(12, 10, 28, 0.88);
  color: #ffe566;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  box-shadow:
    0 0 0 1px #000,
    0 0 10px rgb(255 230 120 / 0.45);
}

.pdcAboutModal__close:hover {
  color: #fff6b8;
  border-color: #fff6b8;
  background: rgb(255 230 120 / 0.14);
  box-shadow:
    0 0 0 1px #000,
    0 0 14px rgb(255 230 120 / 0.7),
    0 0 24px rgb(255 200 87 / 0.45);
}

.pdcAboutModal__close:focus-visible {
  outline: 2px solid #ffe566;
  outline-offset: 2px;
  color: #fff6b8;
  border-color: #fff6b8;
}

.pdcAboutModal__body {
  flex: 1 1 auto;
  min-height: 0;
  max-width: none;
  margin: 0;
  padding: 52px 22px 22px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  font-size: 15px;
  line-height: 1.55;
}

.pdcAboutModal__body.pdcLegalWrap {
  max-width: none;
  padding: 52px 22px 22px;
}

.pdcAboutModal__body .pdcAboutContent {
  margin: 0;
}

.pdcAboutModal__body .pdcAboutHero {
  margin-top: -30px;
  margin-bottom: 5px;
  padding-bottom: 5px;
}

.pdcAboutModal__body .pdcAboutHero__title {
  margin-top: 0;
}

.pdcAboutModal__body .pdcAboutTipCard {
  margin-bottom: 5px;
}

.pdcAboutModal__body .pdcAboutHelp {
  margin-top: 5px;
  padding-top: 5px;
}

@media (max-width: 520px) {
  .pdcAboutModal__body,
  .pdcAboutModal__body.pdcLegalWrap {
    padding: 48px 16px 18px;
  }

  .pdcAboutModal__close {
    top: 8px;
    right: 8px;
  }
}

.pdcAboutModal__loading {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

html.pdcAboutModalOpen {
  overflow: hidden;
}

html.pdcAboutModalOpen body {
  overflow: hidden;
}

/* First-visit locale defaults banner (top strip; avoids cookie bar overlap) */
.pdcLocaleBanner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 13000;
  padding: 8px 12px calc(8px + env(safe-area-inset-top, 0px));
  background: rgba(8, 4, 26, 0.94);
  border-bottom: 2px solid rgba(122, 238, 255, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.pdcLocaleBanner__inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
}

.pdcLocaleBanner__text {
  margin: 0;
  flex: 1 1 200px;
}

.pdcLocaleBanner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.pdcLocaleBanner__btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
}

.pdcLocaleBanner__btn--ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.25);
}

.pdcLocaleBanner__btn--primary {
  background: #7c5cff;
  color: #fff;
  border-color: #9b84ff;
}

.pdcLocaleBanner__btn:focus-visible {
  outline: 2px solid #7ae;
  outline-offset: 2px;
}

html.pdcLocaleBannerOpen body {
  padding-top: calc(52px + env(safe-area-inset-top, 0px));
}
