/* Self-hosted fonts (Latin subset only — covers German incl. äöüß). No
   runtime CDN calls: swapped out from Google Fonts' <link> at build time. */
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/chakra-petch-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/chakra-petch-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/chakra-petch-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Share Tech Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/share-tech-mono-400.woff2') format('woff2');
}

:root {
  --bg-0: #101019;
  --bg-1: #1B1B2A;
  --bg-2: #171726;
  --bg-3: #202033;
  --bg-panel: rgba(33, 33, 50, .82);
  --border-muted: rgba(140, 140, 175, .35);
  --text: #E6E6F2;
  --text-muted: #A6A6C0;
  --text-dim: #7B7B99;
  --text-dim2: #9797B4;
  --text-soft: #C9C9DC;
  --purple: #A700FF;
  --yellow: #FFEA00;
  --teal: #00FFB3;
  --pink: #FF007A;
  --currency: #FF6A00;

  --font-display: 'Chakra Petch', system-ui, sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  /* Without this, Chrome's scroll anchoring keeps a page pinned to the
     bottom edge as content grows while already scrolled there — exactly
     what an auto-growing textarea does on every keystroke once you've
     scrolled to the end of a long form, reading as the page lurching
     down while typing. Nothing here relies on that "stick to bottom"
     behavior (no chat/log-style auto-follow UI), so it's safe to disable
     site-wide. */
  overflow-anchor: none;
}
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-display);
}

a {
  color: var(--purple);
  text-decoration: none;
}
a:hover {
  color: var(--yellow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 20px;
  background: transparent;
  border-radius: 2px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.btn-primary {
  border: 2px solid var(--purple);
  color: var(--purple);
  box-shadow: 0 0 12px rgba(167, 0, 255, .3), inset 0 0 12px rgba(167, 0, 255, .07);
  text-shadow: 0 0 8px rgba(167, 0, 255, .5);
}
.btn-primary:hover {
  background: rgba(167, 0, 255, .12);
}

.btn-secondary {
  border: 2px solid var(--teal);
  color: var(--teal);
  box-shadow: 0 0 12px rgba(0, 255, 179, .3), inset 0 0 12px rgba(0, 255, 179, .07);
  text-shadow: 0 0 8px rgba(0, 255, 179, .5);
}
.btn-secondary:hover {
  background: rgba(0, 255, 179, .12);
}

/* Dedicated color for the ¤ currency symbol, wherever a price is shown
   (ACP + frontend). Always applied via format_price() in inc/view.php —
   never hand-rolled per page — unless explicitly told otherwise. */
.currency-symbol {
  color: var(--currency);
}

/* Self-hosted Remix Icon sprite (assets/icons/sprite.svg). Usage:
   <svg class="icon"><use href="/assets/icons/sprite.svg#ri-edit-line"></use></svg> */
.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  fill: currentColor;
  vertical-align: -0.15em;
}

/* Player-only "please use a phone" gate — never shown on ACP pages, the
   GM can use those on desktop. See inc/desktop_gate.php. */
.desktop-gate {
  display: none;
}
@media (min-width: 701px) {
  .desktop-gate {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1000;
    width: 100%;
    height: 100%;
    object-fit: fill;
  }
}

.flash-message {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 2px;
  font-size: 14px;
  line-height: 1.5;
  font-family: var(--font-display);
}
.flash-message-success {
  border: 1px solid rgba(0, 255, 179, .4);
  background: rgba(0, 255, 179, .07);
  color: var(--teal);
}
.flash-message-error {
  border: 1px solid rgba(255, 0, 122, .4);
  background: rgba(255, 0, 122, .07);
  color: var(--pink);
}

/* Generic modal overlay, used wherever the app needs a modal (join-session
   prompt now, more later per the original product brief). */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 8, 14, .75);
}
.modal-overlay[hidden] {
  display: none;
}
.modal-card {
  width: 100%;
  max-width: 360px;
  background: var(--bg-1);
  border: 1px solid var(--border-muted);
  border-left: 3px solid var(--teal);
  border-radius: 2px;
  padding: 22px 20px;
  box-shadow: 0 0 40px rgba(0, 0, 0, .6);
}
.modal-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
}
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.modal-form label span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.modal-form input {
  height: 46px;
  padding: 0 12px;
  background: rgba(16, 16, 25, .6);
  border: 1px solid var(--border-muted);
  border-radius: 2px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.modal-form input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}
.modal-actions {
  display: flex;
  gap: 10px;
}
.modal-actions .main-btn {
  flex: 1;
}
