/* W Combinator web shell. Self-contained (no web fonts, no CDNs). Colours = WC.Core.Palette. */
:root {
  --ink: #1B1F2A;
  --ink-2: #262B3B;
  --paper: #FFF8EC;
  --orange: #F2562B;
  --orange-hi: #FF7A45;
  --orange-lo: #E2451D;
  --fog: #DDE3F0;
  --warm: #F6C9B5;
  --danger: #E5484D;
  --sa-t: env(safe-area-inset-top, 0px);
  --sa-r: env(safe-area-inset-right, 0px);
  --sa-b: env(safe-area-inset-bottom, 0px);
  --sa-l: env(safe-area-inset-left, 0px);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Ubuntu", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  overflow: hidden; overscroll-behavior: none;
  background: var(--ink); color: var(--paper);
  font-family: var(--font);
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
body { position: fixed; inset: 0; }

#wc-root { position: fixed; inset: 0; overflow: hidden; background: var(--ink); }

#unity-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  background: var(--ink); outline: none; touch-action: none;
}

[hidden] { display: none !important; }

.wc-layer {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(16px + var(--sa-t)) calc(16px + var(--sa-r)) calc(16px + var(--sa-b)) calc(16px + var(--sa-l));
  box-sizing: border-box; text-align: center;
  transition: opacity 0.45s ease;
}
.wc-layer.wc-fade { opacity: 0; pointer-events: none; }
.wc-scrim { background: rgba(17, 20, 30, 0.58); }
.wc-center { position: relative; display: flex; flex-direction: column; align-items: center; max-width: 34em; }

/* ------------------------------------------------------------------ loader */
#wc-loader {
  background: linear-gradient(180deg, #1B1F2A 0%, #23233A 48%, #3A2A4A 100%);
  z-index: 30;
}
.wc-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.wc-sun {
  position: absolute; left: 50%; bottom: -34vmin; width: 120vmin; height: 70vmin; transform: translateX(-12%);
  background: radial-gradient(closest-side, rgba(255, 158, 90, 0.55), rgba(255, 120, 80, 0.18) 55%, rgba(255, 120, 80, 0) 100%);
}
.wc-skyline {
  position: absolute; left: 0; right: 0; bottom: 0; height: min(34vh, 300px);
  background: url("skyline.svg") center bottom / cover no-repeat;
  opacity: 0.95;
}
.wc-fog {
  position: absolute; left: -20%; width: 140%; height: 22vh; bottom: min(18vh, 150px);
  background: radial-gradient(50% 50% at 50% 50%, rgba(221, 227, 240, 0.16), rgba(221, 227, 240, 0) 70%);
  filter: blur(6px);
  animation: wc-drift 26s linear infinite alternate;
}
.wc-fog-b { bottom: min(9vh, 80px); height: 16vh; opacity: 0.8; animation-duration: 34s; animation-direction: alternate-reverse; }
@keyframes wc-drift { from { transform: translateX(-8%); } to { transform: translateX(8%); } }

.wc-mark { width: 96px; height: 96px; filter: drop-shadow(0 10px 24px rgba(242, 86, 43, 0.35)); animation: wc-bob 3.2s ease-in-out infinite; }
.wc-mark-w { stroke-dasharray: 190; stroke-dashoffset: 190; animation: wc-draw 1.1s 0.15s cubic-bezier(.6,.05,.3,1) forwards; }
@keyframes wc-draw { to { stroke-dashoffset: 0; } }
@keyframes wc-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.wc-title { margin: 18px 0 2px; font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -0.01em; color: var(--paper); }
.wc-tagline { margin: 4px 0 0; font-size: 16px; color: var(--warm); opacity: 0.95; }
/* studio credit (Nimble Fox): small, quiet, under the tagline; a link only when STUDIO_URL is set */
.wc-studio { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 12px 0 0;
  font-size: 13px; font-weight: 700; letter-spacing: 0.02em; color: rgba(255, 248, 236, 0.74); }
.wc-studio a { display: inline-flex; align-items: center; gap: 7px; color: inherit; text-decoration: none;
  padding: 3px 9px 3px 5px; margin: -3px -9px -3px -5px; border-radius: 99px; transition: background 0.15s ease, color 0.15s ease; }
.wc-studio a:hover, .wc-studio a:focus-visible { color: var(--paper); background: rgba(255, 255, 255, 0.08); outline: none; }
.wc-fox { width: 18px; height: 18px; flex: none; filter: drop-shadow(0 2px 4px rgba(242, 86, 43, 0.3)); }

.wc-progress { width: min(320px, 72vw); margin-top: 28px; }
.wc-track { position: relative; height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35); }
.wc-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; border-radius: 99px;
  background: linear-gradient(90deg, var(--orange-lo), var(--orange) 60%, var(--orange-hi));
  transition: width 0.35s ease-out; overflow: hidden; }
.wc-fill.wc-snap { transition: none; }
.wc-fill::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.35) 45%, transparent 60%);
  transform: translateX(-100%); animation: wc-shine 1.6s ease-in-out infinite; }
@keyframes wc-shine { to { transform: translateX(160%); } }
.wc-progress-row { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; color: rgba(255, 248, 236, 0.72);
  font-variant-numeric: tabular-nums; }

.wc-tip { min-height: 2.6em; margin: 22px 0 0; max-width: 30em; font-size: 15px; line-height: 1.3; color: rgba(255, 248, 236, 0.86);
  transition: opacity 0.35s ease; }
.wc-tip.wc-out { opacity: 0; }
.wc-tip b { color: var(--orange-hi); font-weight: 700; }

.wc-legal { position: absolute; left: 0; right: 0; bottom: calc(10px + var(--sa-b)); margin: 0; font-size: 11px; color: rgba(255, 248, 236, 0.5); }

/* ------------------------------------------------------------------ buttons / cards */
.wc-btn {
  font: inherit; font-weight: 700; font-size: 16px; border: 0; border-radius: 99px; padding: 12px 22px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform 0.09s ease, filter 0.15s ease, background 0.15s ease;
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
.wc-btn:active { transform: scale(0.94); }
.wc-btn:focus-visible { outline: 3px solid var(--fog); outline-offset: 3px; }
.wc-btn svg { width: 1.25em; height: 1.25em; }
.wc-btn-primary { color: #fff; background: linear-gradient(180deg, var(--orange-hi), var(--orange-lo));
  box-shadow: 0 8px 22px rgba(242, 86, 43, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.wc-btn-primary:hover { filter: brightness(1.06); }
.wc-btn-ghost { color: var(--paper); background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.28); }
.wc-btn-ghost:hover { background: rgba(255, 255, 255, 0.2); }
.wc-btn-big { font-size: 22px; padding: 18px 34px; min-width: 240px; }
.wc-btn-small { font-size: 13px; padding: 7px 14px; margin-top: 8px; }
.wc-hint { margin: 16px 0 0; font-size: 14px; color: rgba(255, 248, 236, 0.75); display: flex; align-items: center; gap: 8px; }
.wc-hint svg { width: 18px; height: 18px; }

#wc-start { z-index: 25; }
#wc-start .wc-btn-big { animation: wc-pulse 2.2s ease-in-out infinite; }
@keyframes wc-pulse { 0%, 100% { box-shadow: 0 8px 22px rgba(242, 86, 43, 0.45), 0 0 0 0 rgba(242, 86, 43, 0.45); }
  50% { box-shadow: 0 8px 22px rgba(242, 86, 43, 0.45), 0 0 0 14px rgba(242, 86, 43, 0); } }

.wc-card {
  background: rgba(30, 34, 48, 0.94); border-radius: 22px; padding: 26px 26px 22px; max-width: min(420px, 88vw);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.wc-card h2 { margin: 6px 0 6px; font-size: 21px; color: var(--paper); }
.wc-card p { margin: 0 0 16px; font-size: 15px; line-height: 1.35; color: rgba(255, 248, 236, 0.8); }

#wc-rotate { z-index: 26; }
.wc-rotate-icon { width: 64px; height: 64px; color: var(--orange-hi); animation: wc-rot 2.4s ease-in-out infinite; }
@keyframes wc-rot { 0%, 20% { transform: rotate(0deg); } 55%, 80% { transform: rotate(-90deg); } 100% { transform: rotate(0deg); } }

#wc-error { z-index: 40; }
.wc-error-card { text-align: left; max-height: calc(100% - 20px); overflow: auto; -webkit-user-select: text; user-select: text; touch-action: pan-y; }
.wc-error-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--danger); color: #fff; font-weight: 900; font-size: 28px;
  display: flex; align-items: center; justify-content: center; }
#wc-error-advice { margin: 0 0 16px; padding-left: 20px; color: rgba(255, 248, 236, 0.86); font-size: 14px; line-height: 1.4; }
#wc-error-advice li { margin: 2px 0; }
.wc-row { display: flex; flex-wrap: wrap; gap: 10px; }
#wc-error-details { margin-top: 14px; font-size: 13px; color: rgba(255, 248, 236, 0.7); }
#wc-error-details summary { cursor: pointer; }
#wc-error-log { white-space: pre-wrap; word-break: break-word; max-height: 30vh; overflow: auto; font-size: 11px; line-height: 1.35;
  background: rgba(0, 0, 0, 0.3); border-radius: 10px; padding: 10px; margin: 8px 0 0; font-family: ui-monospace, Menlo, Consolas, monospace; }

/* ------------------------------------------------------------------ fullscreen button / toast */
/* Top-LEFT: the game's HUD owns the top-right (cash, share, settings) and the bottom corners (minimap, phone button).
   Desktop only; it fades out after 3 s and comes back when the pointer nears the corner. */
.wc-fab {
  position: absolute; z-index: 35; top: calc(8px + var(--sa-t)); left: calc(8px + var(--sa-l));
  width: 34px; height: 34px; border-radius: 10px; border: 0; padding: 7px; cursor: pointer;
  color: #fff; background: rgba(17, 20, 30, 0.45); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  opacity: 0.55; transition: opacity 0.2s ease, transform 0.09s ease;
}
.wc-fab:hover, .wc-fab:focus-visible { opacity: 1; }
.wc-fab:active { transform: scale(0.92); }
.wc-fab svg { width: 100%; height: 100%; }
.wc-fab .wc-fs-exit, .wc-is-fs .wc-fab .wc-fs-enter { display: none; }
.wc-is-fs .wc-fab .wc-fs-exit { display: block; }
.wc-fab.wc-idle { opacity: 0; pointer-events: none; }

.wc-audio-unlock {
  position: absolute; z-index: 24; left: 50%; bottom: calc(8px + var(--sa-b)); transform: translateX(-50%);
  font-size: 12px; padding: 8px 14px; max-width: calc(100% - 32px); white-space: nowrap;
  background: rgba(27, 31, 42, 0.92);
}
.wc-audio-unlock:active { transform: translateX(-50%) scale(0.96); }

#wc-toast {
  position: absolute; z-index: 45; left: 50%; bottom: calc(22px + var(--sa-b)); transform: translate(-50%, 20px);
  max-width: min(520px, 90vw); padding: 10px 18px; border-radius: 14px; font-size: 14px; line-height: 1.3;
  background: rgba(17, 20, 30, 0.9); color: var(--paper); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease;
}
#wc-toast.wc-show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#wc-toast a { color: var(--orange-hi); font-weight: 700; }

#wc-safe-probe { position: fixed; left: 0; top: 0; width: 0; height: 0; visibility: hidden; pointer-events: none;
  padding: var(--sa-t) var(--sa-r) var(--sa-b) var(--sa-l); }
.wc-noscript { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; font-size: 18px; }

/* ------------------------------------------------------------------ small / landscape phones */
@media (max-height: 500px) {
  .wc-mark { width: 60px; height: 60px; }
  .wc-title { margin-top: 10px; font-size: 26px; }
  .wc-tagline { display: none; }
  .wc-studio { margin-top: 6px; font-size: 12px; }
  .wc-progress { margin-top: 16px; }
  .wc-tip { margin-top: 12px; font-size: 14px; min-height: 2.4em; }
  .wc-btn-big { font-size: 19px; padding: 14px 28px; }
  .wc-card { padding: 18px 20px 16px; }
  .wc-legal { bottom: calc(6px + var(--sa-b)); }
}
@media (max-width: 420px) {
  .wc-title { font-size: 28px; }
  .wc-tip { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .wc-mark, .wc-fog, .wc-fill::after, #wc-start .wc-btn-big, .wc-rotate-icon { animation: none; }
  .wc-mark-w { animation: none; stroke-dashoffset: 0; }
}
