html, body {
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #fff;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  touch-action: none;
}


/* Durante a inicialização, apenas o modal de carregamento pode aparecer. */
body.i9-loading-active #unity-container,
body.i9-loading-active #i9-background-theme-toggle,
body.i9-loading-active #devtools-warning {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#unity-container {
  position: absolute;
  background: #fff;
  box-sizing: border-box;
}

#unity-container.unity-desktop {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  overflow: hidden;
  border: 1px solid rgba(31, 57, 82, .10);
  border-radius: 14px;
  box-shadow: 0 22px 64px rgba(38, 70, 104, .15);
}

#unity-container.unity-mobile {
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  height: calc(var(--unity-vh, 1vh) * 100);
  transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

#unity-canvas {
  display: block;
  background: #808080;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.unity-mobile #unity-canvas {
  max-width: 100vw;
  max-height: calc(var(--unity-vh, 1vh) * 100);
}

#unity-loading-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 20;
}

#unity-logo {
  width: 300px;
  height: 118px;
  background: url('unity-logo-dark.png') no-repeat center;
  background-size: contain;
}

#unity-progress-bar-empty {
  width: 141px;
  height: 18px;
  margin-top: 10px;
  margin-left: auto;
  margin-right: auto;
  background: url('progress-bar-empty-dark.png') no-repeat center;
}

#unity-progress-bar-full {
  width: 0%;
  height: 18px;
  margin-top: 10px;
  background: url('progress-bar-full-dark.png') no-repeat center;
}

#unity-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 38px;
  box-sizing: border-box;
  border-top: 1px solid rgba(31, 57, 82, .08);
  background: #fff;
}

.unity-mobile #unity-footer {
  display: none;
}

#unity-webgl-logo {
  display: none !important;
}

#unity-build-title {
  float: none;
  width: 100%;
  margin: 0;
  padding: 0 18px;
  box-sizing: border-box;
  overflow: hidden;
  color: #202a33;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 560;
  line-height: 38px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#unity-fullscreen-button {
  float: right;
  width: 38px;
  height: 38px;
  background: url('fullscreen-button.png') no-repeat center;
}

#unity-mobile-warning {
  position: fixed;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .94);
  color: #263238;
  border: 1px solid rgba(0, 0, 0, .08);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.3;
  text-align: center;
  z-index: 30;
  display: none;
  pointer-events: none;
}

#unity-orientation-warning {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(255, 255, 255, .96);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

body.i9-mobile-device.i9-wrong-orientation #unity-orientation-warning {
  display: flex;
}

body.i9-desktop-device #unity-orientation-warning {
  display: none !important;
}

#unity-orientation-card {
  width: min(420px, calc(100vw - 48px));
  border-radius: 26px;
  padding: 30px 26px 26px;
  text-align: center;
  background: #fff;
  box-shadow: 0 22px 70px rgba(4, 60, 96, .18);
  border: 1px solid rgba(4, 114, 185, .10);
}

#unity-rotate-phone {
  width: 78px;
  height: 118px;
  margin: 0 auto 18px;
  border: 7px solid #0472B9;
  border-radius: 20px;
  position: relative;
  animation: i9RotatePhone 1.7s ease-in-out infinite;
  box-shadow: 0 10px 24px rgba(4, 114, 185, .22);
}

#unity-rotate-phone::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 18px;
  height: 4px;
  border-radius: 5px;
  background: #0472B9;
  transform: translateX(-50%);
}

#unity-rotate-phone-screen {
  position: absolute;
  inset: 13px 9px 20px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(4, 114, 185, .12), rgba(4, 114, 185, .28));
}

#unity-orientation-title {
  color: #063b5f;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 900;
  margin-bottom: 10px;
}

#unity-orientation-description {
  color: #34495e;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
}

@keyframes i9RotatePhone {
  0%, 100% { transform: rotate(0deg) scale(1); }
  45%, 55% { transform: rotate(90deg) scale(1.03); }
}

body.i9-mobile-device.i9-wrong-orientation #unity-canvas {
  opacity: .2;
}

#unity-mobile-start-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(245, 249, 252, .98));
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

body.i9-mobile-waiting-start #unity-mobile-start-modal {
  display: flex;
}

#unity-mobile-start-card {
  width: min(420px, calc(100vw - 48px));
  border-radius: 22px;
  padding: 24px 22px 20px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 22px 70px rgba(4, 60, 96, .18);
  text-align: center;
}

#unity-mobile-start-title {
  color: #063b5f;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 10px;
}

#unity-mobile-start-description {
  color: #34495e;
  font-size: 15px;
  line-height: 1.45;
  margin-bottom: 18px;
}

#unity-mobile-start-fullscreen,
#unity-mobile-start-windowed {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
}

#unity-mobile-start-fullscreen {
  background: #0472B9;
  color: #fff;
  box-shadow: 0 8px 18px rgba(4, 114, 185, .28);
}

#unity-mobile-start-windowed {
  margin-top: 10px;
  background: transparent;
  color: #0472B9;
}

#i9-virtual-keyboard {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  justify-content: center;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(245, 247, 250, .96);
  box-shadow: 0 -14px 45px rgba(0, 0, 0, .16);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  transform: translateY(115%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .24s ease, opacity .18s ease, visibility 0s linear .24s;
  will-change: transform, opacity;
}

#i9-virtual-keyboard[aria-hidden='false'] {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform .24s ease, opacity .18s ease;
}

.i9-vkey-panel {
  width: min(1120px, 100%);
}

.i9-vkey-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.i9-vkey-title {
  color: #34495e;
  font-size: 13px;
  font-weight: 800;
}

.i9-vkey-close {
  border: 0;
  border-radius: 10px;
  padding: 8px 14px;
  background: #0472B9;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.i9-vkey-preview {
  min-height: 38px;
  margin-bottom: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.16);
  background: #fff;
  color: #263238;
  font-size: 18px;
  line-height: 22px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.i9-vkey-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.i9-vkey-key {
  min-width: 54px;
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #222;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 2px 0 rgba(0,0,0,.10), 0 5px 14px rgba(0,0,0,.08);
  transition: transform .08s ease, filter .08s ease;
}

.i9-vkey-key:active {
  transform: translateY(2px) scale(.96);
  filter: brightness(.96);
}

.i9-vkey-action {
  min-width: 72px;
  background: #d6dbe1;
  font-size: 18px;
  font-weight: 800;
}

.i9-vkey-active {
  background: #0472B9;
  color: #fff;
}

.i9-vkey-space {
  flex: 1 1 300px;
  max-width: 420px;
  font-size: 16px;
}

.i9-vkey-wide {
  min-width: 86px;
  font-size: 18px;
}

body.i9-virtual-keyboard-open #unity-canvas {
  transform: translateY(-8px);
}

canvas, #gameContainer {
  height: 300px;
  width: 533px;
}

@media only screen and (min-width: 1024px) {
  canvas, #gameContainer {
    height: 480px;
    width: 853px;
  }
}

@media only screen and (min-width: 1440px) {
  canvas, #gameContainer {
    height: 720px;
    width: 1280px;
  }
}

@media only screen and (max-width: 1023px), (pointer: coarse) {
  canvas, #gameContainer {
    width: 100%;
    height: 100%;
  }

  #unity-logo {
    width: min(300px, 70vw);
  }

  .i9-vkey-key {
    min-width: 38px;
    height: 42px;
    font-size: 18px;
    border-radius: 9px;
  }

  .i9-vkey-action {
    min-width: 54px;
    font-size: 16px;
  }

  .i9-vkey-row {
    gap: 5px;
    margin-bottom: 6px;
  }
}


#unity-mobile-fullscreen-toggle {
  display: none;
}

.unity-mobile #unity-mobile-fullscreen-toggle {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top));
  right: calc(8px + env(safe-area-inset-right));
  z-index: 75;
  display: block;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background-color: rgba(255, 255, 255, .88);
  background-repeat: no-repeat;
  background-image:
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor);
  background-size:
    7px 2px,
    2px 7px,
    7px 2px,
    2px 7px,
    7px 2px,
    2px 7px,
    7px 2px,
    2px 7px;
  background-position:
    left 10px top 10px,
    left 10px top 10px,
    right 10px top 10px,
    right 10px top 10px,
    left 10px bottom 10px,
    left 10px bottom 10px,
    right 10px bottom 10px,
    right 10px bottom 10px;
  color: #063b5f;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .16);
  -webkit-tap-highlight-color: transparent;
}

.unity-mobile #unity-mobile-fullscreen-toggle::before,
.unity-mobile #unity-mobile-fullscreen-toggle::after {
  content: none;
}

.unity-mobile #unity-mobile-fullscreen-toggle.i9-is-fullscreen {
  background-position:
    left 11px top 17px,
    left 17px top 11px,
    right 11px top 17px,
    right 17px top 11px,
    left 11px bottom 17px,
    left 17px bottom 11px,
    right 11px bottom 17px,
    right 17px bottom 11px;
}

body.i9-mobile-waiting-start #unity-mobile-fullscreen-toggle,
body.i9-wrong-orientation #unity-mobile-fullscreen-toggle,
body.i9-fullscreen-return-visible #unity-mobile-fullscreen-toggle {
  display: none;
}

#i9-mobile-debug-log[aria-hidden='true'] {
  display: none;
}

#i9-mobile-debug-log[aria-hidden='false'] {
  position: fixed;
  left: 8px;
  top: 8px;
  width: min(420px, calc(100vw - 16px));
  max-height: 34vh;
  z-index: 120;
  display: block;
  border-radius: 12px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(4,114,185,.22);
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

#i9-mobile-debug-title {
  padding: 6px 8px;
  background: #0472B9;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

#i9-mobile-debug-content {
  margin: 0;
  padding: 7px 8px;
  max-height: calc(34vh - 28px);
  overflow: auto;
  color: #263238;
  font-size: 10px;
  line-height: 1.35;
  white-space: pre-wrap;
}

/* I9 mobile fullscreen return prompt */
#unity-fullscreen-return-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

body.i9-fullscreen-return-visible #unity-fullscreen-return-overlay {
  display: flex;
}

#unity-fullscreen-return-card {
  width: min(380px, calc(100vw - 44px));
  border-radius: 24px;
  padding: 22px 20px 18px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(4, 60, 96, .20);
  text-align: center;
  border: 1px solid rgba(4, 114, 185, .12);
}

#unity-fullscreen-return-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 114, 185, .10);
  color: #0472B9;
  font-size: 31px;
  font-weight: 900;
}

#unity-fullscreen-return-title {
  color: #063b5f;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 900;
  margin-bottom: 8px;
}

#unity-fullscreen-return-description {
  color: #34495e;
  font-size: 15px;
  line-height: 1.35;
  margin-bottom: 14px;
}

#unity-fullscreen-return-button {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  background: #0472B9;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(4, 114, 185, .28);
}

/* I9 virtual keyboard improvements */
.i9-vkey-top {
  gap: 10px;
}

.i9-vkey-title {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
  color: #063b5f;
}

.i9-vkey-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.i9-vkey-top-button {
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  background: #e8edf2;
  color: #263238;
  font-size: 13px;
  font-weight: 900;
}

.i9-vkey-top-button-active {
  background: #0472B9;
  color: #fff;
}

.i9-vkey-close {
  background: #0472B9;
  color: #fff;
}

.i9-vkey-preview {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 0;
  font-weight: 600;
}

.i9-vkey-preview-text {
  white-space: pre;
}

.i9-vkey-preview-selected {
  white-space: pre;
  background: rgba(4, 114, 185, .18);
  color: #063b5f;
  border-radius: 4px;
}

.i9-vkey-caret {
  width: 2px;
  height: 24px;
  margin: 0 1px;
  border-radius: 2px;
  background: #0472B9;
  animation: i9CaretBlink 1s steps(1) infinite;
  flex: 0 0 auto;
}

@keyframes i9CaretBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.i9-vkey-key-pop {
  animation: i9KeyPop .12s ease-out;
}

@keyframes i9KeyPop {
  0% { transform: translateY(0) scale(1); }
  55% { transform: translateY(2px) scale(.94); }
  100% { transform: translateY(0) scale(1); }
}

.i9-vkey-space {
  font-size: 15px;
  font-weight: 900;
}

#i9-virtual-keyboard.i9-vkey-transparent[aria-hidden='false'] {
  background: rgba(245, 247, 250, .24);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, .08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#i9-virtual-keyboard.i9-vkey-transparent .i9-vkey-panel {
  opacity: .34;
  transition: opacity .12s ease;
}

#i9-virtual-keyboard.i9-vkey-transparent .i9-vkey-panel:active,
#i9-virtual-keyboard.i9-vkey-transparent .i9-vkey-panel:hover {
  opacity: .58;
}

@media only screen and (orientation: landscape) and (max-height: 520px) {
  #i9-virtual-keyboard[aria-hidden='false'] {
    padding-top: 6px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }

  .i9-vkey-preview {
    min-height: 32px;
    margin-bottom: 5px;
    font-size: 15px;
    line-height: 18px;
    padding: 5px 10px;
  }

  .i9-vkey-caret {
    height: 19px;
  }

  .i9-vkey-key {
    min-width: 40px;
    height: 36px;
    font-size: 17px;
  }

  .i9-vkey-action {
    min-width: 50px;
    font-size: 14px;
  }

  .i9-vkey-row {
    gap: 5px;
    margin-bottom: 5px;
  }

  .i9-vkey-top {
    margin-bottom: 4px;
  }

  .i9-vkey-title,
  .i9-vkey-top-button {
    font-size: 12px;
  }

  .i9-vkey-top-button {
    padding: 7px 10px;
  }
}


/* I9 virtual keyboard selection/caret touch support */
.i9-vkey-preview {
  cursor: text;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.i9-vkey-preview-char {
  display: inline-block;
  min-width: .34em;
  white-space: pre;
}

.i9-vkey-preview-placeholder {
  color: rgba(38, 50, 56, .45);
  font-weight: 600;
  margin-left: 2px;
}

.i9-vkey-preview-selected {
  display: inline-block;
  min-width: .34em;
  padding: 0 1px;
  margin: 0 -1px;
  background: rgba(4, 114, 185, .24);
  color: #063b5f;
  border-radius: 4px;
}

/* =========================================================
   I9 - Loading adaptativo e tema do fundo
   ========================================================= */
:root {
  --i9-accent: #2677ee;
  --i9-accent-soft: #76a9f7;
  --i9-ink: #18324d;
  --i9-muted: #6b7c90;
  --i9-surface: rgba(255, 255, 255, .88);
}

body {
  background:
    radial-gradient(circle at 12% 14%, rgba(89, 154, 255, .12), transparent 32%),
    radial-gradient(circle at 86% 82%, rgba(86, 203, 181, .10), transparent 30%),
    linear-gradient(145deg, #fbfdff 0%, #f5f9ff 48%, #fbfffe 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}


#unity-container {
  z-index: 10;
}

#unity-canvas {
  opacity: 0;
  transition: opacity .42s ease;
  box-shadow: 0 18px 55px rgba(34, 83, 135, .10);
}

body.i9-unity-ready #unity-canvas {
  opacity: 1;
}


/* Botão de tema do fundo. O app/canvas não recebe filtros nem mudança de cor. */
#i9-background-theme-toggle {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 260;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 15px 0 11px;
  border: 1px solid rgba(39, 75, 109, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 10px 30px rgba(38, 70, 104, .12);
  color: #29425a;
  font: 650 13px/1 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s ease, background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}

#i9-background-theme-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(38, 119, 238, .26);
  box-shadow: 0 13px 34px rgba(38, 70, 104, .16);
}

#i9-background-theme-toggle:active {
  transform: translateY(0) scale(.97);
}

#i9-background-theme-toggle:focus-visible {
  outline: 3px solid rgba(38, 119, 238, .24);
  outline-offset: 3px;
}

.i9-theme-toggle-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.i9-theme-icon {
  position: absolute;
  inset: 0;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity .22s ease, transform .28s cubic-bezier(.2, .8, .2, 1);
}

.i9-theme-icon-moon {
  fill: currentColor;
  stroke: none;
  opacity: 1;
  transform: rotate(0) scale(1);
}

.i9-theme-icon-sun {
  opacity: 0;
  transform: rotate(-35deg) scale(.72);
}

body.i9-page-dark #i9-background-theme-toggle {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(29, 39, 52, .92);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .30);
  color: #eef5ff;
}

body.i9-page-dark .i9-theme-icon-moon {
  opacity: 0;
  transform: rotate(28deg) scale(.72);
}

body.i9-page-dark .i9-theme-icon-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}

body.i9-browser-fullscreen #i9-background-theme-toggle,
:fullscreen #i9-background-theme-toggle,
:-webkit-full-screen #i9-background-theme-toggle {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.i9-page-dark {
  background:
    radial-gradient(circle at 14% 12%, rgba(52, 109, 169, .20), transparent 34%),
    radial-gradient(circle at 86% 84%, rgba(45, 132, 117, .13), transparent 32%),
    linear-gradient(145deg, #18212c 0%, #111923 54%, #172128 100%);
}

#i9-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: clamp(20px, 4vw, 48px);
  background: #ffffff;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .42s ease, visibility 0s linear 0s;
}

#i9-loading-overlay.i9-loading-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .42s ease, visibility 0s linear .42s;
}

#i9-loading-content {
  width: min(620px, 100%);
  box-sizing: border-box;
  padding: 18px 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
  transform: translateY(0) scale(1);
}

#i9-loading-overlay.i9-loading-playing #i9-loading-content {
  animation: i9LoadingContentEnter .62s cubic-bezier(.2, .8, .2, 1) both;
}

#i9-loading-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto 24px;
}

#i9-loading-brand::after {
  content: '';
  width: min(390px, 82%);
  height: 1px;
  margin-top: 21px;
  background: linear-gradient(90deg, transparent, rgba(0, 164, 164, .22), transparent);
  transform: scaleX(0);
  transform-origin: center;
}

#i9-loading-overlay.i9-loading-playing #i9-loading-brand::after {
  animation: i9BrandDividerReveal .72s 1.42s cubic-bezier(.2, .8, .2, 1) both;
}

.i9-loading-logo-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: clamp(8px, 2.4vw, 16px);
}

.i9-loading-brand-symbol {
  width: clamp(88px, 21vw, 126px);
  height: auto;
  flex: 0 0 auto;
  overflow: visible;
  filter: drop-shadow(0 10px 18px rgba(0, 164, 164, .13));
}

.i9-logo-path {
  fill: none;
  stroke: #00a4a4;
  stroke-width: 17;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}


.i9-logo-center,
.i9-logo-side-dot {
  fill: #00a4a4;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(.2);
}

#i9-loading-overlay.i9-loading-playing .i9-logo-path-outer {
  animation: i9LogoPathDraw .92s .12s cubic-bezier(.65, 0, .35, 1) both;
}


#i9-loading-overlay.i9-loading-playing .i9-logo-center {
  animation: i9LogoDotPop .46s .90s cubic-bezier(.18, .89, .32, 1.35) both;
}

#i9-loading-overlay.i9-loading-playing .i9-logo-side-dot {
  animation: i9LogoDotPop .46s .28s cubic-bezier(.18, .89, .32, 1.35) both;
}

.i9-loading-wordmark {
  display: flex;
  align-items: baseline;
  justify-content: center;
  min-width: 0;
  color: #737373;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  font-size: clamp(42px, 10vw, 68px);
  font-weight: 700;
  line-height: .92;
  letter-spacing: -.045em;
  white-space: nowrap;
}

.i9-logo-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(15px) scale(.92);
  filter: blur(5px);
  transform-origin: center bottom;
}

.i9-logo-letter-i {
  margin-right: .01em;
}

#i9-loading-overlay.i9-loading-playing .i9-logo-letter {
  animation: i9LogoLetterReveal .5s cubic-bezier(.2, .82, .2, 1) both;
  animation-delay: calc(.52s + var(--letter-index) * .075s);
}

.i9-loading-tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .38em;
  margin-top: 16px;
  color: #009d9d;
  font-family: "Cascadia Mono", "Lucida Console", ui-monospace, monospace;
  font-size: clamp(12px, 3vw, 17px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .005em;
}

.i9-tagline-piece {
  display: inline-block;
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  transform: translateY(6px);
}

.i9-tagline-arrow {
  font-weight: 900;
}

#i9-loading-overlay.i9-loading-playing .i9-tagline-piece {
  animation: i9TaglineReveal .5s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(1.02s + var(--tag-index) * .11s);
}

#i9-loading-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--i9-ink);
  opacity: 1;
}

.i9-loading-title-label {
  color: #009d9d;
  font-size: 11px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.i9-loading-product-name {
  display: block;
  max-width: 100%;
  color: #18324d;
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.15;
  font-weight: 820;
  letter-spacing: -.035em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

#i9-loading-overlay.i9-loading-playing #i9-loading-title {
  animation: i9LoadingTextEnter .5s 1.54s cubic-bezier(.2, .8, .2, 1) both;
}

#i9-loading-status {
  min-height: 22px;
  margin-top: 10px;
  color: var(--i9-muted);
  font-size: 14px;
  line-height: 1.5;
}

#i9-loading-overlay.i9-loading-playing #i9-loading-status {
  animation: i9LoadingTextEnter .5s 1.66s cubic-bezier(.2, .8, .2, 1) both;
}

#i9-loading-progress-track {
  position: relative;
  width: min(520px, 100%);
  height: 7px;
  margin: 26px auto 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 164, 164, .10);
}

#i9-loading-progress-fill {
  position: relative;
  width: 0%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(90deg, #16b7ad, #00a4a4 60%, #008e99);
  box-shadow: 0 0 16px rgba(0, 164, 164, .22);
  transition: width .28s ease;
}

#i9-loading-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .58), transparent);
  transform: translateX(-160%);
  animation: i9ProgressShimmer 1.8s 1.7s ease-in-out infinite;
}

#i9-loading-progress-row {
  display: flex;
  justify-content: space-between;
  width: min(520px, 100%);
  gap: 16px;
  margin: 9px auto 0;
  color: #8190a1;
  font-size: 12px;
  font-weight: 650;
}

#i9-loading-percentage {
  color: #009d9d;
  font-variant-numeric: tabular-nums;
}

@keyframes i9LoadingContentEnter {
  from { opacity: 0; transform: translateY(14px) scale(.975); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes i9LogoPathDraw {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}

@keyframes i9LogoDotPop {
  0%   { opacity: 0; transform: scale(.2); }
  68%  { opacity: 1; transform: scale(1.14); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes i9LogoLetterReveal {
  from { opacity: 0; transform: translateY(15px) scale(.92); filter: blur(5px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes i9TaglineReveal {
  from { opacity: 0; clip-path: inset(0 100% 0 0); transform: translateY(6px); }
  to   { opacity: 1; clip-path: inset(0 0 0 0); transform: translateY(0); }
}

@keyframes i9LoadingTextEnter {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes i9BrandDividerReveal {
  from { opacity: 0; transform: scaleX(0); }
  to   { opacity: 1; transform: scaleX(1); }
}

@keyframes i9ProgressShimmer {
  0%, 25% { transform: translateX(-160%); }
  75%, 100% { transform: translateX(330%); }
}

@media (max-width: 560px) {
  #i9-loading-overlay {
    padding: 18px;
  }

  #i9-loading-content {
    width: 100%;
    padding: 14px 8px;
  }

  .i9-loading-logo-row {
    gap: 5px;
  }

  .i9-loading-brand-symbol {
    width: clamp(76px, 23vw, 100px);
  }

  .i9-loading-wordmark {
    font-size: clamp(35px, 12vw, 54px);
  }

  .i9-loading-tagline {
    max-width: 320px;
    margin-top: 13px;
    gap: .3em;
  }

  #i9-loading-brand::after {
    margin-top: 18px;
  }
}

@media (max-width: 390px) {
  .i9-loading-brand-symbol {
    width: 74px;
  }

  .i9-loading-wordmark {
    font-size: 35px;
  }

  .i9-loading-tagline {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #i9-loading-content,
  #i9-loading-brand::after,
  .i9-logo-path,
  .i9-logo-center,
  .i9-logo-side-dot,
  .i9-logo-letter,
  .i9-tagline-piece,
  #i9-loading-title,
  #i9-loading-status,
  #i9-loading-progress-fill::after {
    animation: none !important;
  }

  #i9-loading-brand::after {
    opacity: 1;
    transform: scaleX(1);
  }

  .i9-logo-path {
    stroke-dashoffset: 0;
  }

  .i9-logo-center,
  .i9-logo-side-dot,
  .i9-logo-letter,
  .i9-tagline-piece,
  #i9-loading-title,
  #i9-loading-status {
    opacity: 1;
    transform: none;
    filter: none;
    clip-path: none;
  }
}

/* O carregamento permanece branco mesmo quando o fundo do app está no modo escuro. */
body.i9-page-dark #i9-loading-overlay {
  background: #ffffff;
}

body.i9-page-dark #i9-loading-content {
  background: transparent;
  box-shadow: none;
}

body.i9-page-dark .i9-loading-wordmark {
  color: #737373;
}

body.i9-page-dark .i9-loading-product-name {
  color: #18324d;
}

body.i9-page-dark #i9-loading-status,
body.i9-page-dark #i9-loading-progress-row {
  color: #6b7c90;
}

body.i9-page-dark #i9-loading-progress-track {
  background: rgba(0, 164, 164, .10);
}

/* No mobile, o botão de tema não é exibido. O controle de tela cheia ocupa a posição principal. */
@media (max-width: 900px), (pointer: coarse) {
  #i9-background-theme-toggle {
    display: none !important;
  }

  .unity-mobile #unity-mobile-fullscreen-toggle {
    top: calc(10px + env(safe-area-inset-top, 0px));
    right: calc(10px + env(safe-area-inset-right, 0px));
    z-index: 261;
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 540px),
       (pointer: coarse) and (orientation: landscape) and (max-height: 540px) {
  .unity-mobile #unity-mobile-fullscreen-toggle {
    top: calc(6px + env(safe-area-inset-top, 0px));
  }
}

