/* The standalone game's styles are confined to its own document. */
:root { color-scheme: dark; --bottom-inset: 0px; font-family: 'Nunito', sans-serif; }
* { box-sizing: border-box; }
html, body, #cult, #world, #overlay { margin: 0; width: 100%; height: 100%; overflow: hidden; }
html, body { background: #000; color: #f0e9d1; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#cult, #world, #overlay { position: absolute; inset: 0; }
#world canvas { display: block; outline: none; touch-action: none; }
#overlay { pointer-events: none; }
.cf-cooking-root { position: absolute; inset: 0; pointer-events: none; z-index: 35; }
.cf-cooking-root > * { pointer-events: auto; }
button { font-family: inherit; cursor: pointer; pointer-events: auto; }
[hidden] { display: none !important; }
.cf-back { position: absolute; top: max(24px, env(safe-area-inset-top, 0px)); left: 28px; z-index: 3; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid #c2d1ad45; border-radius: 6px; background: #16261ee6; color: #eee5c9; font-size: 12px; font-weight: 700; }
.cf-back:hover { background: #2b4332; border-color: #e4dccb; }
button:focus-visible { outline: 2px solid #f4dfae; outline-offset: 4px; }
.cf-loader { position: absolute; z-index: 100; inset: 0; display: grid; place-items: center; background: #000; pointer-events: auto; }
.cf-loading-symbol { width: min(512px, 42vw); aspect-ratio: 1; background: #671607; -webkit-mask: url('assets/hud/loading-symbols.png') left center / 200% 100% no-repeat; mask: url('assets/hud/loading-symbols.png') left center / 200% 100% no-repeat; opacity: .7; }
.cf-loading-throbber { position: absolute; width: clamp(86px, 8vw, 152px); aspect-ratio: 1; left: max(28px, env(safe-area-inset-left)); bottom: calc(var(--bottom-inset) + 36px); }
.cf-loading-throbber::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(#ff0700, #e70000 35%, #4b0000 80%, #170000 97%, #000 98%); -webkit-mask: radial-gradient(transparent 62%, #000 63%); mask: radial-gradient(transparent 62%, #000 63%); animation: cf-loading-spin 1.5s linear infinite; }
.cf-loading-throbber img { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); height: auto; object-fit: contain; }
.cf-loading-outline { width: 68%; animation: cf-crown-reveal .45s .9s ease-out both; }
.cf-loading-crown { width: 62%; }
.cf-loading-throbber .cf-loading-eye { top: 55.5%; width: 25%; }
.cf-loading { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.cf-loader[data-error='true'] .cf-loading { top: 45%; left: 12%; width: 76%; height: auto; clip-path: none; margin: 0; color: #f4edd7; text-align: center; font-size: 16px; }
.cf-loader[data-error='true'] .cf-loading-symbol { opacity: .15; }
.cf-intro-title { position: absolute; z-index: 15; inset: 0; display: grid; place-items: center; margin: 0; padding: 0 16px; color: transparent; background: linear-gradient(95deg, #ff1842 12%, #fff1ba 32%, #fff1ba 69%, #ff1842 88%); -webkit-background-clip: text; background-clip: text; font: 400 clamp(24px, 8.3vw, 164px)/1 'Cult Display', Georgia, serif; letter-spacing: .025em; white-space: nowrap; text-align: center; animation: cf-intro-show 2.8s ease both; }
#overlay:not([data-state='ready']) .cf-intro-title { animation-play-state: paused; }
body[data-intro='active'] #overlay > :not(.cf-loader):not(.cf-intro-title) { visibility: hidden; }
@keyframes cf-loading-spin { to { transform: rotate(360deg); } }
@keyframes cf-crown-reveal { from { transform: translate(-50%, -50%) scale(.6); } to { transform: translate(-50%, -50%) scale(1); } }
@keyframes cf-intro-show { 0% { opacity: 0; } 15%, 64% { opacity: 1; } 100% { opacity: 0; } }
.cf-retry { position: absolute; top: 57%; left: 50%; transform: translateX(-50%); min-height: 44px; padding: 8px 16px; border: 1px solid #c4b99e70; border-radius: 5px; background: #17231dde; color: #f5e9cd; }
.cf-save-state { position: absolute; z-index: 5; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottom-inset) + 132px); padding: 7px 12px; background: #100b0de8; max-width: min(440px,calc(100% - 48px)); display: flex; flex-wrap: wrap; gap: 5px 10px; align-items: center; color: #ece5c5; text-shadow: 0 1px 3px #000; font: 12px/1.4 'CultiVis Fira',sans-serif; }
.cf-save-state button { min-height: 36px; padding: 4px 9px; border: 1px solid #82765b; color: #f5edd5; background: #16100de8; }
.cf-save-state[data-type='error'],.cf-save-state[data-type='conflict'] { color: #ffc8ad; }
body[data-follower-mode]:not([data-follower-mode='camp']) .cf-save-state,
body[data-build-mode='menu'] .cf-save-state,
body[data-build-mode='placement'] .cf-save-state { visibility: hidden; }
.cf-stick { display: none; position: absolute; z-index: 4; left: 22px; bottom: calc(var(--bottom-inset) + 20px); width: 100px; height: 100px; padding: 0; border: 1px solid #e2d2ae6b; border-radius: 50%; background: #14231dc9; box-shadow: inset 0 0 0 12px #e4d9af0a, 0 3px 14px #10191a2b; touch-action: none; cursor: grab; -webkit-tap-highlight-color: transparent; }
.cf-stick svg { display: block; width: 100%; height: 100%; fill: none; stroke: #e9dcb291; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.cf-stick-thumb { position: absolute; top: 50%; left: 50%; margin: -19px 0 0 -19px; width: 38px; height: 38px; border: 1px solid #f3dca184; border-radius: 50%; background: #d3bc8066; box-shadow: inset 0 1px 6px #fff4c43b; pointer-events: none; will-change: transform; }
.cf-stick-active { border-color: #f2d48f; cursor: grabbing; }
.cf-stick-active .cf-stick-thumb { background: #e6ca8799; }
@media (max-width: 600px) {
  .cf-back { top: max(18px, env(safe-area-inset-top, 0px)); left: 16px; }
  .cf-loading-symbol { width: min(360px, 70vw); }
}
@media (max-width: 1024px), (any-pointer: coarse) {
  .cf-stick { display: block; }
}
@media (max-height: 540px) and (min-aspect-ratio: 1/1) { .cf-loading-symbol { width: 58vh; } .cf-back { top: 10px; } }
@media (prefers-reduced-motion: reduce) { .cf-loading-throbber::before, .cf-loading-outline { animation: none; } .cf-intro-title { animation-duration: 1s; } }
