:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  color: #e8edf2;
  background: #0e131b;
  font-synthesis: none;
  --muted: #9ba8ba;
  --line: #2b3442;
  --accent: #ffc175;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
[hidden] { display: none !important; }
#brand-shell {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: #0e131b;
}
#brand-shell:fullscreen { width: 100vw; height: 100vh; }
.tool-button {
  flex: 0 0 auto;
  border: 1px solid #465269;
  border-radius: 5px;
  padding: 6px 12px;
  background: #222d3d;
  color: #e7edf5;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.tool-button:hover { border-color: var(--accent); color: var(--accent); }
#unity-container {
  min-width: 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  container-type: size;
  background: #0e131b;
}
#unity-canvas {
  display: block;
  width: min(100cqw, calc(100cqh * 16 / 9));
  height: min(100cqh, calc(100cqw * 9 / 16));
  aspect-ratio: 16 / 9;
  background: #231f20;
  outline: none;
}
#loading-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-color: #101722;
  background-image: linear-gradient(#1e293b66 1px, transparent 1px), linear-gradient(90deg, #1e293b66 1px, transparent 1px);
  background-size: 32px 32px;
  padding: 24px;
}
.loading-panel { width: min(390px, 100%); text-align: center; }
.loading-panel h1 { margin: 10px 0 15px; font-size: clamp(24px, 4vw, 36px); letter-spacing: 5px; }
.loading-eyebrow { margin: 20px 0 0; color: var(--accent); font-size: 12px; letter-spacing: 3px; }
#loading-label { margin: 0 0 22px; color: #b0bdce; font-size: 13px; }
#unity-progress-bar-empty { overflow: hidden; height: 9px; border: 1px solid #465063; padding: 2px; background: #0d131d; }
#unity-progress-bar-full { width: 0; height: 100%; background: var(--accent); transition: width 120ms linear; }
.loading-note { margin: 16px 0 0; color: #8594a7; font-size: 11px; }
#retry-load { margin-top: 18px; }
.ram-symbol { display: flex; gap: 8px; width: fit-content; padding: 8px 9px 13px; margin: auto; border: 2px solid var(--accent); box-shadow: 0 8px 0 -4px #8e6940; }
.ram-symbol i { display: block; width: 18px; height: 21px; background: #344858; border: 1px solid #758590; }
.brand-footer { background: #151c27; border-top: 1px solid var(--line); padding: 9px max(18px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); }
.footer-line .tool-button { padding: 3px 9px; }
.footer-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px 20px; font-size: 11px; line-height: 1.6; }
.free-pledge { color: #d7dfe8; white-space: nowrap; }
.free-pledge > span { color: #f59686; margin-right: 5px; }
.more-games { color: #b1bece; }
.more-games strong { color: var(--accent); font-weight: 600; }
.reuse-notice { color: var(--muted); white-space: nowrap; }
#localization-notice { margin-top: 5px; font-size: 11px; color: var(--muted); }
#localization-notice summary { width: fit-content; cursor: pointer; line-height: 1.6; }
#localization-notice summary:hover { color: #e8edf2; }
.notice-content { max-height: min(32vh, 280px); overflow-y: auto; padding: 3px 12px 0 0; line-height: 1.85; }
.notice-content p { margin: 9px 0; }
.notice-content strong { color: #c5d0df; font-weight: 500; }
.notice-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
noscript { position: absolute; inset: 40% 10% auto; z-index: 2; padding: 20px; text-align: center; color: #fff; background: #4b2020; }
@media (max-width: 850px) {
  #page-fullscreen { margin-left: auto; }
  .reuse-notice { display: none; }
}
@media (max-width: 550px) {
  .tool-button { padding: 5px 7px; font-size: 11px; }
  .brand-footer { padding: 7px 10px max(6px, env(safe-area-inset-bottom)); }
  .footer-line { justify-content: center; gap: 1px 14px; font-size: 10px; }
  #localization-notice { margin-top: 3px; font-size: 10px; }
  #localization-notice > summary { margin: auto; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .brand-footer { padding-top: 4px; padding-bottom: 4px; }
  .footer-line { line-height: 1.35; }
  #localization-notice { margin-top: 2px; }
  .ram-symbol { display: none; }
  .loading-eyebrow { margin-top: 0; }
  .loading-panel h1 { margin: 6px 0; }
  #loading-label { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  #unity-progress-bar-full { transition: none; }
}
