/* PAGE = [INDEX] */
/* ------------------------------- */

html[data-landing-theme="dark"] {
  color-scheme: dark;
}

html[data-landing-theme="light"] {
  color-scheme: light;
}

/* index-body */
body.index-body {
  padding-top: 0;
  --landing-page-bg: #171b22;
  --landing-left-bg: #1a1f28;
  --landing-left-color: #e8e0d2;
  --landing-brand-color: #f7efdf;
  --landing-title-color: #fff8ea;
  --landing-heading-color: #f5ecdf;
  --landing-summary-color: rgb(239 234 226 / 75%);
  --landing-copy-color: rgb(239 234 226 / 68%);
  --landing-footer-color: rgb(239 234 226 / 66%);
  --landing-footer-link: #e9dcc8;
  --landing-border-color: rgb(232 224 210 / 14%);
  --landing-accent: #e8a020;
  --landing-accent-hover: #f0b34a;
  --landing-accent-rgb: 232, 160, 32;
  --landing-accent-text: #0d1520;
  --landing-accent-dim: rgba(232, 160, 32, 0.14);
  --landing-modal-bg: #1e2a3a;
  --landing-modal-surface: #253044;
  --landing-modal-text: #dde4f0;
  --landing-modal-text-sub: #8c9db8;
  --landing-modal-border: rgba(255, 255, 255, 0.11);
  --landing-right-bg: #171b22;
  --landing-toggle-bg: rgb(26 31 40 / 88%);
  --landing-toggle-color: #f4ead9;
  --landing-toggle-border: rgb(233 220 200 / 18%);
  --link-color: var(--landing-accent);
  background: var(--landing-page-bg);
}

html[data-landing-theme="light"] body.index-body {
  --landing-page-bg: #efe7da;
  --landing-left-bg: #fbf8f1;
  --landing-left-color: #2f3540;
  --landing-brand-color: #1c2027;
  --landing-title-color: #181d23;
  --landing-heading-color: #1f2530;
  --landing-summary-color: rgb(53 60 71 / 74%);
  --landing-copy-color: rgb(53 60 71 / 66%);
  --landing-footer-color: rgb(53 60 71 / 72%);
  --landing-footer-link: #222833;
  --landing-border-color: rgb(24 29 35 / 12%);
  --landing-accent: #b87200;
  --landing-accent-hover: #8a5200;
  --landing-accent-rgb: 184, 114, 0;
  --landing-accent-text: #ffffff;
  --landing-accent-dim: rgba(184, 114, 0, 0.1);
  --landing-modal-bg: #ffffff;
  --landing-modal-surface: #faf8f4;
  --landing-modal-text: #18222e;
  --landing-modal-text-sub: #4a5568;
  --landing-modal-border: rgba(0, 0, 0, 0.07);
  --landing-right-bg: #efe7da;
  --landing-toggle-bg: rgb(255 255 255 / 92%);
  --landing-toggle-color: #1c2027;
  --landing-toggle-border: rgb(24 29 35 / 12%);
  --link-color: var(--landing-accent);
}

/* -- */

/* nb##: landing 保持独立样式文件，但复用主站主题 accent，让按钮、链接和焦点态与主站一致 */
.landing-form .btn-primary,
.landing-form .btn-primary.disabled,
.landing-form .btn-primary:disabled,
.landing-form .btn-primary:not(:disabled):not(.disabled).active,
.landing-form .btn-primary:not(:disabled):not(.disabled):active,
.landing-form .show > .btn-primary.dropdown-toggle,
body.index-body .modal-content .btn-primary,
body.index-body .modal-content .btn-primary.disabled,
body.index-body .modal-content .btn-primary:disabled,
body.index-body .modal-content .btn-primary:not(:disabled):not(.disabled).active,
body.index-body .modal-content .btn-primary:not(:disabled):not(.disabled):active,
body.index-body .modal-content .show > .btn-primary.dropdown-toggle {
  color: var(--landing-accent-text);
  border-color: var(--landing-accent);
  background-color: var(--landing-accent);
}

.landing-form .btn-primary:hover,
body.index-body .modal-content .btn-primary:hover {
  color: var(--landing-accent-text);
  border-color: var(--landing-accent-hover);
  background-color: var(--landing-accent-hover);
}

.landing-form .btn-primary.focus,
.landing-form .btn-primary:focus,
body.index-body .modal-content .btn-primary.focus,
body.index-body .modal-content .btn-primary:focus {
  box-shadow: 0 0 0 3px var(--landing-accent-dim);
}

.landing-form .btn-outline-primary,
.landing-form .btn-outline-primary.disabled,
.landing-form .btn-outline-primary:disabled {
  color: var(--landing-accent);
  border-color: rgba(var(--landing-accent-rgb), 0.32);
}

.landing-form .btn-outline-primary:hover,
.landing-form .btn-outline-primary:not(:disabled):not(.disabled).active,
.landing-form .btn-outline-primary:not(:disabled):not(.disabled):active {
  color: var(--landing-accent-text);
  border-color: var(--landing-accent);
  background-color: var(--landing-accent);
}

.landing-form .btn-link,
.landing-form a {
  color: var(--link-color);
}

.landing-form .btn-link:hover,
.landing-form a:hover {
  color: var(--landing-accent-hover);
  text-decoration: none;
}

.landing-form .form-control:focus,
.landing-form .form-select:focus {
  border-color: rgba(var(--landing-accent-rgb), 0.36);
  box-shadow: 0 0 0 3px var(--landing-accent-dim);
}

body.index-body .modal-content {
  color: var(--landing-modal-text);
  background-color: var(--landing-modal-bg);
  border: 1px solid var(--landing-modal-border);
  border-radius: 0;
  box-shadow: 0 1rem 3rem rgb(0 0 0 / 34%);
}

body.index-body .modal-header,
body.index-body .modal-footer {
  border-color: var(--landing-modal-border) !important;
}

body.index-body .modal-title {
  color: var(--landing-modal-text);
}

body.index-body .modal-body,
body.index-body .modal-footer,
body.index-body .modal-content label,
body.index-body .modal-content .list-group-item,
body.index-body .modal-content .badge,
body.index-body .modal-content .text-muted {
  color: var(--landing-modal-text);
}

body.index-body .modal-content .form-text,
body.index-body .modal-content .text-body-secondary {
  color: var(--landing-modal-text-sub) !important;
}

body.index-body .modal-content .form-control,
body.index-body .modal-content .form-select {
  color: var(--landing-modal-text);
  background-color: var(--landing-modal-surface) !important;
  border-color: var(--landing-modal-border);
}

body.index-body .modal-content .form-control::placeholder,
body.index-body .modal-content .form-select::placeholder {
  color: var(--landing-modal-text-sub);
}

body.index-body .modal-content .form-control:focus,
body.index-body .modal-content .form-select:focus {
  border-color: rgba(var(--landing-accent-rgb), 0.36);
  box-shadow: 0 0 0 3px var(--landing-accent-dim);
}

body.index-body .modal-content .btn-light {
  color: var(--landing-modal-text);
  border-color: var(--landing-modal-border);
  background-color: var(--landing-modal-surface);
}

body.index-body .modal-content .btn-light:hover {
  color: var(--landing-accent);
  border-color: rgba(var(--landing-accent-rgb), 0.24);
  background-color: var(--landing-accent-dim);
}

body.index-body .modal-content .list-group-item {
  background-color: transparent;
  border-color: var(--landing-modal-border);
}

body.index-body .modal-content .list-group-item:hover {
  background-color: var(--landing-accent-dim);
}

body.index-body .modal-content .form-check-input {
  accent-color: var(--landing-accent);
}

body.index-body .modal-content .badge.bg-light.text-primary {
  color: var(--landing-accent) !important;
  background-color: var(--landing-accent-dim) !important;
}

body.index-body .modal-content .badge.bg-secondary {
  color: var(--landing-modal-text-sub) !important;
  background-color: var(--landing-modal-surface) !important;
  border: 1px solid var(--landing-modal-border);
}

html[data-landing-theme="dark"] body.index-body .modal-content .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* nb##: 默认 landing 左侧改为轻量内容面板，底部复用系统 footer links，并把页面专属样式收口到独立 landing.css */
.landing-row {
  min-height: 100vh;
  min-height: 100dvh;
}

@media (max-width: 576px) {
  .landing-row {
    margin-right: -15px;
    margin-left: -15px;
  }
}

.landing-left,
.landing-right {
  padding: 0;
}

.landing-left {
  position: relative;
  overflow: hidden;
  color: var(--landing-left-color);
  background: var(--landing-left-bg);
}

.landing-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.13;
  transform: scale(1.03);
}

.landing-left-panel {
  position: relative;
  z-index: 1;
  min-height: 100%;
  padding: 2.75rem 1.5rem 1.75rem;
}

.landing-brand {
  min-height: 40px;
  color: var(--landing-brand-color);
}

.landing-brand img {
  display: block;
  max-width: 320px;
  max-height: 58px;
}

.landing-kicker {
  color: var(--landing-accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  font-weight: 700;
}

.landing-title {
  margin: 0 0 1rem;
  color: var(--landing-title-color);
  font-size: clamp(2rem, 3.7vw, 2.9rem);
  font-weight: 800;
  line-height: 1.08;
}

.landing-subtitle {
  margin: 0;
  color: var(--landing-heading-color);
  font-size: 1.34rem;
  font-weight: 700;
  line-height: 1.6;
}

.landing-summary {
  color: var(--landing-summary-color);
  font-size: 1rem;
  line-height: 1.95;
}

.landing-summary-rich {
  margin-top: 1.65rem;
}

.landing-feature-block {
  padding-top: 2.25rem;
}

.landing-feature-item strong {
  color: var(--landing-heading-color);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
}

.landing-feature-copy {
  color: var(--landing-copy-color);
  font-size: 0.94rem;
  line-height: 1.8;
}

.landing-feature-marker {
  display: inline-block;
  flex: 0 0 auto;
  color: var(--landing-accent);
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
}

.landing-theme-toggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 1055;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--landing-toggle-border);
  border-radius: 999px;
  background: var(--landing-toggle-bg);
  color: var(--landing-toggle-color);
  box-shadow: 0 0.5rem 1rem rgb(0 0 0 / 12%);
  backdrop-filter: blur(8px);
}

.landing-theme-toggle:hover {
  color: var(--landing-accent);
  border-color: var(--landing-accent);
}

.landing-theme-toggle svg {
  display: block;
  width: 15px;
  height: 15px;
}

html[data-landing-theme="dark"] .landing-theme-icon--moon,
html[data-landing-theme="light"] .landing-theme-icon--sun {
  display: none;
}

.landing-left-footer {
  padding-top: 1.5rem;
  border-top: 1px solid var(--landing-border-color);
}

.landing-left-footer .container,
.landing-left-footer .container-fluid {
  max-width: none;
  padding-right: 0;
  padding-left: 0;
}

.landing-left-footer .footer {
  margin: 0;
  align-items: center;
  flex-wrap: nowrap;
  color: var(--landing-footer-color);
  column-gap: 1rem;
  font-size: 0.88rem;
}

.landing-left-footer .footer .dropdown {
  order: 2;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  margin-inline-start: auto;
  text-align: end;
}

.landing-left-footer .footer a,
.landing-left-footer .language-dropdown {
  color: var(--landing-footer-link);
}

.landing-left-footer .footer a:hover,
.landing-left-footer .language-dropdown:hover {
  color: var(--landing-accent);
}

.landing-left-footer .links {
  order: 1;
  display: flex;
  flex: 1 1 auto;
  width: auto;
  max-width: none;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin-top: 0;
  justify-content: flex-start;
  text-align: start;
}

.landing-left-footer .links .pl10 {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.landing-left-footer .dropdown-menu {
  min-width: 14rem;
  border: 1px solid var(--landing-border-color);
  border-radius: 0;
}

.landing-left-footer .dropdown-item {
  font-size: 0.85rem;
}

.landing-right {
  background: var(--landing-right-bg);
  padding: 2rem 1.25rem 2.5rem;
}

.landing-form {
  max-width: 34rem;
  margin: 0 auto;
}

.landing-right-panel {
  width: 100%;
}

@media (max-width: 991.98px) {
  /* nb##: 堆叠态 landing 改成上下两屏，每个原左右区块各自占满一整屏，轻扫即可切换屏幕 */
  body.index-body {
    overflow: hidden;
  }

  .main-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .landing-row {
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  .landing-left,
  .landing-right {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .landing-left {
    box-shadow: none;
  }

  .landing-left-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    padding: calc(1rem + env(safe-area-inset-top, 0px)) 1.25rem 1.25rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .landing-right {
    padding: 0;
  }

  .landing-right-panel {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: calc(1rem + env(safe-area-inset-top, 0px)) 1rem 1.25rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .landing-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .landing-brand {
    position: relative;
    z-index: 2;
    align-self: flex-start;
    margin-bottom: 1rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    max-width: calc(100vw - 5.75rem);
  }

  .landing-brand img {
    max-width: clamp(128px, 36vw, 184px);
    max-height: 36px;
  }

  .landing-title {
    font-size: clamp(1.7rem, 4.9vw, 2.3rem);
  }

  .landing-subtitle {
    font-size: 1.08rem;
    line-height: 1.45;
  }

  .landing-summary {
    font-size: 0.94rem;
    line-height: 1.72;
  }

  .landing-summary-rich {
    margin-top: 1rem;
  }

  .landing-feature-block {
    padding-top: 1.25rem;
  }

  .landing-feature-item strong {
    font-size: 0.96rem;
    line-height: 1.35;
  }

  .landing-feature-copy {
    font-size: 0.84rem;
    line-height: 1.45;
  }

  .landing-left-footer {
    padding-top: 1rem;
  }

  .landing-left-footer .footer {
    column-gap: 0.75rem;
    font-size: 0.8rem;
  }
}

@media (min-width: 576px) {
  .landing-left-footer .links {
    flex-wrap: nowrap;
  }
}

@media (max-width: 767.98px) {
  .landing-theme-toggle {
    top: calc(env(safe-area-inset-top, 0px) + 1rem);
    right: 1rem;
  }

  .landing-left-panel {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .landing-right-panel {
    padding-right: 0.85rem;
    padding-left: 0.85rem;
  }

  .landing-brand {
    max-width: calc(100vw - 5.25rem);
  }

  .landing-brand img {
    max-width: min(42vw, 160px);
    max-height: 32px;
  }

  .landing-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .landing-subtitle {
    font-size: 0.98rem;
  }

  .landing-summary {
    font-size: 0.88rem;
    line-height: 1.58;
  }

  .landing-feature-block {
    padding-top: 1rem;
  }

  .landing-feature-item strong {
    font-size: 0.9rem;
  }

  .landing-feature-copy {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .landing-left-footer .footer {
    align-items: flex-start;
    flex-wrap: wrap;
    font-size: 0.75rem;
  }

  .landing-left-footer .footer .dropdown,
  .landing-left-footer .links {
    width: 100%;
  }

  .landing-left-footer .footer .dropdown {
    margin-inline-start: 0;
    text-align: start;
  }

  .landing-left-footer .links {
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
  }
}

@media (min-width: 992px) {
  /* nb##: 桌面端 landing 左侧扩到 3/5，给标题与摘要更多横向空间，右侧表单保留 2/5 */
  .landing-left {
    flex: 0 0 60%;
    width: 60%;
    max-width: 60%;
  }

  .landing-right {
    flex: 0 0 40%;
    width: 40%;
    max-width: 40%;
  }

  .landing-left {
    box-shadow: 2px 0 18px rgb(0 0 0 / 20%);
  }

  .landing-left-panel {
    padding: 3.5rem 3.5rem 2rem;
  }

  .landing-right {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 3rem 2.25rem;
  }
}

/* -- */

/* nb##: public landing 不再加载 common.css，这里补 landing/auth/footer/cookie banner 仍会实际使用到的公共样式子集 */
.main-wrapper {
  width: 100%;
  min-width: 260px;
}

.main-icon,
.main-icon * {
  color: var(--landing-accent) !important;
  fill: var(--landing-accent) !important;
}

.loader {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 0;
}

.loader::after {
  content: '';
  display: block;
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 100%;
  border-top: 1px solid var(--landing-accent);
  border-bottom: 1px solid rgb(255 255 255 / 28%);
  border-left: 1px solid var(--landing-accent);
  border-right: 1px solid rgb(255 255 255 / 28%);
  opacity: 0.7;
  animation: landing-rotate 0.6s linear infinite;
}

html[data-landing-theme="light"] .loader::after {
  border-bottom-color: rgb(24 29 35 / 18%);
  border-right-color: rgb(24 29 35 / 18%);
}

.loader.loader_large::after {
  width: 40px;
  height: 40px;
}

.loader.loader_medium::after {
  width: 25px;
  height: 25px;
}

.loader.loader_small::after {
  width: 10px;
  height: 10px;
}

.loader.loader_green::after {
  opacity: 1;
  border-top-color: #42a26e;
  border-left-color: #42a26e;
}

@keyframes landing-rotate {
  0% {
    transform: rotateZ(-360deg);
  }

  100% {
    transform: rotateZ(0deg);
  }
}

.form-group {
  margin-bottom: 15px;
}

.mb0 {
  margin-bottom: 0 !important;
}

.mr5 {
  margin-right: 5px !important;
}

.mr10 {
  margin-right: 10px !important;
}

.ml10 {
  margin-left: 10px !important;
}

.mt10 {
  margin-top: 10px !important;
}

.mt15 {
  margin-top: 15px !important;
}

.mt20 {
  margin-top: 20px !important;
}

.mb20 {
  margin-bottom: 20px !important;
}

.mt30 {
  margin-top: 30px !important;
}

.mtb10 {
  margin-top: 10px !important;
  margin-bottom: 10px !important;
}

.pl10 {
  padding-left: 10px !important;
}

.pr5 {
  padding-right: 5px !important;
}

.plr10 {
  padding-left: 10px !important;
  padding-right: 10px !important;
}

.pt5 {
  padding-top: 5px !important;
}

.pb0 {
  padding-bottom: 0 !important;
}

.pt10 {
  padding-top: 10px !important;
}

.pb10 {
  padding-bottom: 10px !important;
}

.pt30 {
  padding-top: 30px !important;
}

.ptb10 {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

.x-hidden {
  display: none;
}

.footer {
  border-top: 1px solid var(--landing-border-color);
  padding-top: 10px;
  padding-bottom: 10px;
  margin-top: 25px;
  margin-bottom: 25px;
}

@media (min-width: 768px) {
  .footer .links {
    text-align: right;
  }
}

.language-dropdown {
  padding: 8px 12px;
  border-radius: 4px;
}

.language-dropdown:hover {
  background: rgb(255 255 255 / 8%);
}

html[data-landing-theme="light"] .language-dropdown:hover {
  background: rgb(24 29 35 / 6%);
}

.sg-popup-layer,
.cc-window.cc-banner,
.cc-window.cc-floating {
  --sg-popup-offset: 16px;
  --sg-popup-offset-mobile: 10px;
  --sg-popup-width: min(560px, calc(100vw - 32px));
  --sg-popup-width-mobile: calc(100vw - 20px);
  --sg-popup-max-width: 560px;
  position: fixed !important;
  left: var(--sg-popup-offset) !important;
  right: auto !important;
  top: auto !important;
  bottom: var(--sg-popup-offset) !important;
  inset: auto auto var(--sg-popup-offset) var(--sg-popup-offset) !important;
  width: var(--sg-popup-width) !important;
  max-width: var(--sg-popup-max-width) !important;
  margin: 0 !important;
  transform: none !important;
  z-index: 1080 !important;
}

.sg-popup-layer--bottom-left,
.sg-popup-layer[data-popup-position="bottom-left"] {
  left: var(--sg-popup-offset) !important;
  right: auto !important;
  top: auto !important;
  bottom: var(--sg-popup-offset) !important;
  inset: auto auto var(--sg-popup-offset) var(--sg-popup-offset) !important;
  transform: none !important;
}

.sg-popup-layer--bottom-right,
.sg-popup-layer[data-popup-position="bottom-right"] {
  left: auto !important;
  right: var(--sg-popup-offset) !important;
  top: auto !important;
  bottom: var(--sg-popup-offset) !important;
  inset: auto var(--sg-popup-offset) var(--sg-popup-offset) auto !important;
  transform: none !important;
}

.sg-popup-layer--top-left,
.sg-popup-layer[data-popup-position="top-left"] {
  left: var(--sg-popup-offset) !important;
  right: auto !important;
  top: var(--sg-popup-offset) !important;
  bottom: auto !important;
  inset: var(--sg-popup-offset) auto auto var(--sg-popup-offset) !important;
  transform: none !important;
}

.sg-popup-layer--top-right,
.sg-popup-layer[data-popup-position="top-right"] {
  left: auto !important;
  right: var(--sg-popup-offset) !important;
  top: var(--sg-popup-offset) !important;
  bottom: auto !important;
  inset: var(--sg-popup-offset) var(--sg-popup-offset) auto auto !important;
  transform: none !important;
}

.sg-popup-layer--bottom-center,
.sg-popup-layer[data-popup-position="bottom-center"] {
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: var(--sg-popup-offset) !important;
  inset: auto auto var(--sg-popup-offset) 50% !important;
  transform: translateX(-50%) !important;
}

@media (max-width: 576px) {
  .sg-popup-layer,
  .cc-window.cc-banner,
  .cc-window.cc-floating {
    left: var(--sg-popup-offset-mobile) !important;
    right: auto !important;
    top: auto !important;
    bottom: var(--sg-popup-offset-mobile) !important;
    inset: auto auto var(--sg-popup-offset-mobile) var(--sg-popup-offset-mobile) !important;
    width: var(--sg-popup-width-mobile) !important;
    max-width: var(--sg-popup-width-mobile) !important;
    transform: none !important;
  }

  .sg-popup-layer--bottom-right,
  .sg-popup-layer[data-popup-position="bottom-right"] {
    left: auto !important;
    right: var(--sg-popup-offset-mobile) !important;
    inset: auto var(--sg-popup-offset-mobile) var(--sg-popup-offset-mobile) auto !important;
  }

  .sg-popup-layer--top-left,
  .sg-popup-layer[data-popup-position="top-left"] {
    left: var(--sg-popup-offset-mobile) !important;
    right: auto !important;
    top: var(--sg-popup-offset-mobile) !important;
    bottom: auto !important;
    inset: var(--sg-popup-offset-mobile) auto auto var(--sg-popup-offset-mobile) !important;
  }

  .sg-popup-layer--top-right,
  .sg-popup-layer[data-popup-position="top-right"] {
    left: auto !important;
    right: var(--sg-popup-offset-mobile) !important;
    top: var(--sg-popup-offset-mobile) !important;
    bottom: auto !important;
    inset: var(--sg-popup-offset-mobile) var(--sg-popup-offset-mobile) auto auto !important;
  }

  .sg-popup-layer--bottom-center,
  .sg-popup-layer[data-popup-position="bottom-center"] {
    left: var(--sg-popup-offset-mobile) !important;
    right: auto !important;
    top: auto !important;
    bottom: var(--sg-popup-offset-mobile) !important;
    inset: auto auto var(--sg-popup-offset-mobile) var(--sg-popup-offset-mobile) !important;
    transform: none !important;
  }
}

#cookie-banner {
  /* nb##: landing/public 页也需要随 PWA 安装横幅动态上抬，避免遮挡 cookie 提示 */
  position: fixed !important;
  left: 16px !important;
  right: auto !important;
  top: auto !important;
  bottom: calc(16px + var(--sg-pwa-install-banner-offset, 0px)) !important;
  inset: auto auto calc(16px + var(--sg-pwa-install-banner-offset, 0px)) 16px !important;
  width: min(560px, calc(100vw - 32px)) !important;
  max-width: 560px !important;
  margin: 0 !important;
  transform: none !important;
  z-index: 1080 !important;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

#cookie-banner .cookie-banner__text {
  font-size: 14px;
  line-height: 1.6;
}

#cookie-banner a {
  color: inherit;
  text-decoration: underline;
}

#cookie-banner .banner-btns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 2px;
  width: 100% !important;
  max-width: 100% !important;
}

#cookie-banner .banner-btns[class*="col-"] {
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
}

#cookie-banner .banner-btns .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  text-align: center;
  line-height: 1.25;
  white-space: normal;
  border-radius: 12px;
  padding: 8px 12px;
  border-width: 1px;
  border-style: solid;
}

#cookie-banner .banner-btns .btn-settings,
#cookie-banner .banner-btns .btn-reject {
  background: rgb(255 255 255 / 12%) !important;
  border-color: rgb(255 255 255 / 36%) !important;
  color: #fff !important;
}

#cookie-banner .banner-btns .btn-settings:hover,
#cookie-banner .banner-btns .btn-settings:focus,
#cookie-banner .banner-btns .btn-reject:hover,
#cookie-banner .banner-btns .btn-reject:focus {
  background: rgb(255 255 255 / 20%) !important;
  border-color: rgb(255 255 255 / 45%) !important;
  color: #fff !important;
}

#cookie-banner .banner-btns .btn-accept {
  background: var(--landing-accent) !important;
  border-color: var(--landing-accent) !important;
  color: #fff !important;
}

#cookie-banner .banner-btns .btn-accept:hover,
#cookie-banner .banner-btns .btn-accept:focus {
  filter: brightness(0.95);
  color: #fff !important;
}

@media (max-width: 576px) {
  #cookie-banner {
    left: 10px !important;
    right: auto !important;
    top: auto !important;
    bottom: calc(10px + var(--sg-pwa-install-banner-offset, 0px)) !important;
    inset: auto auto calc(10px + var(--sg-pwa-install-banner-offset, 0px)) 10px !important;
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    transform: none !important;
  }

  #cookie-banner .banner-btns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  #cookie-banner .banner-btns .btn {
    width: 100%;
    max-width: 92px;
    justify-self: center;
    padding: 6px;
    font-size: 10px;
    line-height: 1.15;
    white-space: nowrap;
  }
}

.pwa_install_banner {
  display: none;
  position: fixed;
  inset: auto 0 0 0;
  z-index: 999999;
  margin: 0;
  padding: 0;
  background: var(--landing-right-bg);
  border-top: 1px solid var(--landing-border-color);
  box-shadow: 0 -4px 18px rgb(0 0 0 / 18%);
}

html[data-landing-theme="light"] .pwa_install_banner {
  background: #ffffff;
}

/* nb##: public landing 在 PWA standalone 下把横向留白收成约 15px，避免 .row 两侧残留过大空白 BEGIN */
@media (max-width: 767.98px) {
  html.sg-pwa-standalone .container,
  html.sg-pwa-standalone .container-sm,
  html.sg-pwa-standalone .container-md,
  html.sg-pwa-standalone .container-lg,
  html.sg-pwa-standalone .container-xl,
  html.sg-pwa-standalone .container-xxl,
  html.sg-pwa-standalone .container-fluid {
    width: 100%;
    max-width: none !important;
    padding-left: max(15px, env(safe-area-inset-left, 0px));
    padding-right: max(15px, env(safe-area-inset-right, 0px));
  }
}

@media (min-width: 768px) {
  html.sg-pwa-standalone .container,
  html.sg-pwa-standalone .container-sm,
  html.sg-pwa-standalone .container-md,
  html.sg-pwa-standalone .container-lg,
  html.sg-pwa-standalone .container-xl,
  html.sg-pwa-standalone .container-xxl,
  html.sg-pwa-standalone .container-fluid {
    width: 100%;
    max-width: none !important;
    padding-left: max(15px, env(safe-area-inset-left, 0px));
    padding-right: max(15px, env(safe-area-inset-right, 0px));
  }
}
/* nb##: END */

.pwa_install_banner .inner {
  display: flex;
  align-items: center;
  padding: 12px 15px calc(8px + env(safe-area-inset-bottom, 0px));
}

.pwa_install_banner .inner .close {
  width: 32px;
  height: 32px;
  line-height: 32px;
  color: var(--landing-copy-color);
}

.pwa_install_banner .inner .logo {
  width: 48px;
}

.pwa_install_banner .inner .logo img {
  width: 42px;
  border-radius: 2px;
}

.pwa_install_banner .inner .name {
  padding-left: 10px;
}

.pwa_install_banner .inner .name span {
  display: block;
}

.pwa_install_banner .inner .name span.title {
  font-size: 1.125rem;
  line-height: 1;
  font-weight: 600;
}

.pwa_install_banner .inner .cta {
  margin-left: auto;
}

.pwa_install_banner.is-active {
  display: block;
}
