/**
 * 启动页静态层样式（index.html #boot-shell-host）。
 * 放在 public，由 <link> 先于 bundle 加载，避免首屏内联与主样式表重复维护困难。
 */

/* 与 Tailwind Preflight + styles.css @layer base 对齐（bundle 注入前即生效） */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f7f7f7;
}

html.dark body {
  background-color: #000000;
}

/* 启动层移除后、业务树首帧之前，避免 #root 透成白底 */
#root {
  min-height: 100dvh;
  background-color: #f7f7f7;
}

html.dark #root {
  background-color: #000000;
}

/* —— 启动层 —— */
#boot-shell-host {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
}

#boot-shell-host .hidden {
  display: none !important;
}

#boot-shell-host p {
  margin: 0;
}

@keyframes boot-shell-spin {
  to {
    transform: rotate(360deg);
  }
}

.boot-shell-spinner {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  color: #cca150;
  animation: boot-shell-spin 1s linear infinite;
}

.boot-shell-spinner-track {
  opacity: 0.25;
}

.boot-shell-spinner-path {
  opacity: 0.75;
}

.boot-shell-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.boot-shell-deco {
  position: absolute;
  top: 10%;
  left: 3%;
  width: 33%;
  max-width: 123px;
  opacity: 0.5;
  pointer-events: none;
}

.boot-shell-column {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.5rem
    max(2rem, env(safe-area-inset-bottom));
}

.boot-shell-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: min(18vh, 5.5rem);
}

.boot-shell-logo-wrap {
  width: min(131px, 42vw);
}

.boot-shell-logo {
  display: block;
  width: 100%;
  height: auto;
}

#boot-shell-host h1.boot-shell-title {
  margin: 0;
  margin-top: 1.5rem;
  text-align: center;
  font-size: clamp(1.5rem, 6.5vw, 2.25rem);
  font-weight: 400;
  line-height: 1.3;
  color: #333;
}

.boot-shell-loading {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.boot-shell-loading-text {
  font-size: 0.875rem;
  color: rgba(51, 51, 51, 0.7);
}

.boot-shell-error {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
}

.boot-shell-error-message {
  margin-top: 1.5rem;
  max-width: 280px;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.625;
  color: rgba(51, 51, 51, 0.85);
}

.boot-shell-pill-wrap {
  position: relative;
  margin-top: 1.5rem;
}

.boot-shell-pill-wrap--tight {
  margin-top: 0.25rem;
}

.boot-shell-pill-shadow {
  position: absolute;
  inset: 0;
  transform: translateY(2px);
  border-radius: 50px;
  background: #cca150;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.36);
}

.boot-shell-btn-retry {
  position: relative;
  display: flex;
  height: 2.75rem;
  min-width: 132px;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  border: none;
  background: #fff;
  padding: 0 2rem;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 2px;
  color: #cca150;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.boot-shell-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.5rem;
}

.boot-shell-hashtags {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: clamp(1rem, 4.5vw, 1.25rem);
  font-weight: 400;
  letter-spacing: 2px;
  color: #cca150;
}

.boot-shell-hashtag-mark {
  font-weight: 600;
}

.boot-shell-rule {
  height: 1px;
  width: 140px;
  max-width: 80%;
  background: linear-gradient(to right, transparent, #808080, transparent);
}

.boot-shell-footer-tip {
  text-align: center;
  font-size: clamp(1rem, 4.5vw, 1.25rem);
  letter-spacing: 2px;
  color: #333;
}

.boot-shell-domain-pill {
  position: relative;
  display: flex;
  height: 2.75rem;
  min-width: 132px;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  background: #fff;
  padding: 0 1.5rem;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.18);
}

.boot-shell-domain-text {
  font-family: ui-serif, Georgia, serif;
  font-size: 20px;
  letter-spacing: 2px;
  color: #cca150;
}

/* 启动页脚内环境角标（bundle 前 #boot-shell-host .boot-shell-footer，由 Vite 替换 <!--__H5_ENV_BADGE__-->） */
#boot-shell-host .h5-env-badge {
  margin: 0;
  margin-top: 0.5rem;
  max-width: 100%;
  text-align: center;
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: rgba(51, 51, 51, 0.7);
  pointer-events: none;
  user-select: none;
}
