/* HypoStore design system fonts */
@font-face { font-family: 'Glacial Indifference'; src: url('../assets/fonts/GlacialIndifference-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Glacial Indifference'; src: url('../assets/fonts/GlacialIndifference-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('../assets/fonts/PlayfairDisplay-Italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --frame-scale: 1;
  --frame-h: 844px;   /* logical frame height: 844 on desktop, the phone's own height on mobile */
  --fit: 1;           /* scale for 390×844 minigame screens on short phones */
  --hs-ink: #272727;
  --hs-rose: #D4B3B3;
  --hs-berry: #C96F88;
  --hs-night: #4E6390;
  --hs-page: #2B3654;
}

html, body { height: 100%; }
html {
  /* no pinch or double-tap zoom; panning inside scrollable panels still works */
  touch-action: pan-x pan-y;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--hs-page);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  -webkit-touch-callout: none;
}

a { color: var(--hs-ink); }
a:hover { color: var(--hs-berry); }

/* Game frame: 390 wide, scaled to the window (see src/main.js). */
.stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
}
/* Desktop only: the Advent Calendar logo above the game (height set by src/main.js) */
.desk-logo {
  display: block;
  height: var(--logo-h, 0px);
  width: auto;
  margin: 0 auto var(--logo-gap, 0px);
  justify-self: center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.is-mobile .desk-logo, .no-logo .desk-logo { display: none; }
.frame {
  width: calc(390px * var(--frame-scale));
  height: calc(var(--frame-h) * var(--frame-scale));
  overflow: hidden;
}
#app {
  width: 390px;
  height: var(--frame-h);
  transform: scale(var(--frame-scale));
  transform-origin: 0 0;
}
/* the game's root element is drawn at 390×844; let it follow the frame height */
#app > .game-root { height: 100% !important; }

/* Phones: fill the screen edge to edge */
.is-mobile .stage {
  place-items: start start;
  top: env(safe-area-inset-top, 0px);
  bottom: env(safe-area-inset-bottom, 0px);
}
.is-mobile body { background: #4E6390; }

/* Minigames are laid out for 844 high: on shorter phones, shrink them to fit */
.is-mobile .fit-game {
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: 390px;
  height: 844px;
  transform: translateX(-50%) scale(var(--fit));
  transform-origin: top center;
  box-shadow: 0 0 0 100vmax #272727;
}
/* The big map: keep the dialog within the screen height */
.is-mobile .map-canvas {
  height: min(560px, calc(var(--frame-h) - 240px)) !important;
  width: auto !important;
  aspect-ratio: 150 / 280;
}

.noscript {
  color: #fff;
  font-family: 'Glacial Indifference', system-ui, sans-serif;
  text-align: center;
  padding: 32px;
}
