/* palworldcard.com reskin — fonts, brand accents, polish
   Layered after the compiled app CSS; palette remap handled separately. */

@font-face {
  font-family: 'Gilland';
  src: url('/play-app/assets/fonts/Gilland-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gilland';
  src: url('/play-app/assets/fonts/Gilland-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/play-app/assets/fonts/montserrat-var-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/play-app/assets/fonts/montserrat-var-latin-ext.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --font-display: 'Gilland', 'Montserrat', system-ui, sans-serif;
  --font-body: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pwc-teal: #00b4d8;
  --pwc-teal-light: #48cae4;
  --pwc-teal-dark: #0077b6;
  --pwc-pink: #ff69b4;
  --pwc-pink-light: #ff9ecd;
  --pwc-gradient: linear-gradient(135deg, var(--pwc-teal) 0%, var(--pwc-pink) 100%);
}

::selection {
  background: rgba(0, 180, 216, 0.35);
  color: #f2f7fb;
}

/* Slim branded scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: #2c4a5e #0a141d;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: #0a141d; }
*::-webkit-scrollbar-thumb {
  background: #2c4a5e;
  border-radius: 8px;
  border: 2px solid #0a141d;
}
*::-webkit-scrollbar-thumb:hover { background: var(--pwc-teal-dark); }

/* Brand gradient underline on the header wordmark */
a[aria-label*="Play Hub" i] span:last-child,
a[aria-label*="home" i] span span:last-child {
  background: var(--pwc-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Focus visibility in brand color */
:focus-visible {
  outline: 2px solid var(--pwc-teal);
  outline-offset: 2px;
}

/* Smooth micro-interactions on interactive surfaces */
button, a {
  transition-property: color, background-color, border-color, box-shadow, transform;
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
button:active { transform: translateY(1px); }

/* ==========================================================================
   HEADER — responsive navigation
   pwc-rebrand.css forces `header nav { display:flex !important }` and hides
   the app's own hamburger, because that hamburger's panel only listed routes
   this mirror never had. On a phone the result was the desktop nav wrapping
   onto three lines and eating ~40% of the viewport before any content.
   Below the lg breakpoint the nav now collapses and the panel built in
   pwc-nav-extras.js takes over; from lg up nothing changes.
   This file loads after the compiled CSS, so these !important rules win.
   ========================================================================== */

.pwc-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;               /* 44px keeps it a comfortable touch target */
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--pwc-border, #dce9ef);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--pwc-text, #2c3e50);
  cursor: pointer;
}
.pwc-burger:hover { border-color: var(--pwc-teal, #00b4d8); }
.pwc-burger[aria-expanded="true"] .pwc-burger-top { display: none; }
.pwc-burger[aria-expanded="true"] .pwc-burger-bot { display: none; }

.pwc-mobile-scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(6, 16, 24, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.pwc-mobile-scrim[data-open="1"] { opacity: 1; pointer-events: auto; }

.pwc-mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  width: min(19rem, 82vw);
  height: 100dvh;
  padding: 4.75rem 0.9rem 1.4rem;
  overflow-y: auto;
  background: var(--pwc-surface, #fff);
  border-left: 1px solid var(--pwc-border, #dce9ef);
  box-shadow: -18px 0 44px rgba(6, 16, 24, 0.18);
  transform: translateX(100%);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.pwc-mobile-nav[data-open="1"] { transform: translateX(0); }
.pwc-mobile-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--pwc-border, #dce9ef);
  border-radius: 0.5rem;
  background: transparent;
  color: var(--pwc-text, #2c3e50);
  cursor: pointer;
}
.pwc-mobile-close:hover { border-color: var(--pwc-teal, #00b4d8); }
.pwc-mobile-nav a {
  display: block;
  padding: 0.85rem 0.85rem;   /* >=44px tall */
  border-radius: 0.55rem;
  font-family: var(--font-display), system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--pwc-text, #2c3e50);
  text-decoration: none;
}
.pwc-mobile-nav a:hover { background: var(--pwc-bg, #f6f9fb); }
.pwc-mobile-nav a[aria-current="page"] {
  background: rgba(0, 180, 216, 0.10);
  color: #0077b6;
}
.pwc-mobile-nav .pwc-mobile-ext {
  margin-top: 0.5rem;
  border-top: 1px solid var(--pwc-border, #dce9ef);
  border-radius: 0;
  padding-top: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pwc-text-secondary, #5a6c7d);
}

@media (max-width: 1023px) {
  /* Collapse the desktop nav and stop the header wrapping. */
  header nav { display: none !important; }
  header:has(nav) > div { flex-wrap: nowrap !important; row-gap: 0 !important; }
  /* pwc-rebrand.css kills the app's own hamburger with
     `header button[aria-label="Open menu"]{display:none!important}` because
     its panel lists unmirrored routes. Ours carries the same (correct) label,
     so it was caught by that rule too. Out-specify it rather than weaken the
     original - the app's hamburger must stay hidden. */
  header button.pwc-burger[aria-expanded] { display: inline-flex !important; }
  /* The 308px wordmark is wider than a phone; scale it to fit the bar. */
  header .pwc-header-logo img,
  header a[aria-label*="home" i] img {
    width: clamp(150px, 46vw, 220px) !important;
    height: auto !important;
  }
  /* The standalone pages carry a "back to play" chevron for the case where
     there was no menu at all. The panel lists Play, so it is now duplicate
     chrome competing for a narrow bar. */
  header a[aria-label="Back to play"] { display: none !important; }
  /* Scroll lock for the open panel. Scoped to the mobile query on purpose so
     it cannot strand a desktop layout unscrollable if the class lingers. */
  html.pwc-menu-open, html.pwc-menu-open body { overflow: hidden; }
}

@media (min-width: 1024px) {
  /* Desktop keeps the horizontal bar; the panel must never be reachable. */
  header button.pwc-burger[aria-expanded],
  .pwc-burger, .pwc-mobile-nav, .pwc-mobile-scrim { display: none !important; }
}

/* In-game board: the playmat art and its scrim are rendered by the board
   itself (two aria-hidden layers inside [data-board-root]), so there is no
   background to set here. This rule used to duplicate them as a workaround
   while the in-app layer pointed at a root-relative URL that 404'd under the
   /play-app base path; that path is fixed in rebrand_patch.py now, and
   keeping both meant two stacked tints over the same image.
   Only the base colour stays, as a flat backdrop before the art decodes. */
main div.fixed.h-\[100dvh\] {
  background-color: #0b1620;
}
