/* 薪酬测算 · 全屏沉浸页 */
:root {
  --st-header-h: 48px;
  --st-bottom-h: 36px;
  --st-safe-bottom: env(safe-area-inset-bottom, 0px);
}

.salary-tool-shell {
  margin: 0;
  background: #f8fafc;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  /* 减少移动端聚焦输入时的布局抖动 */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.salary-tool-shell .top-bar,
.salary-tool-shell .site-header,
.salary-tool-shell .site-footer,
.salary-tool-shell .float-cta {
  display: none !important;
}

/* 顶栏 */
.st-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  height: var(--st-header-h);
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-inline: 0.75rem;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.st-back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1c2434;
  text-decoration: none;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  min-width: 72px;
}
.st-back:hover { background: #f1f5f9; text-decoration: none; color: #1a5fd4; }

.st-title {
  flex: 1;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1c2434;
  line-height: 1.2;
  padding: 0 0.25rem;
}
.st-title small {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: #64748b;
  margin-top: 1px;
}

.st-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 72px;
  justify-content: flex-end;
}

.st-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.st-btn-primary {
  background: linear-gradient(135deg, #2d8cff, #1a5fd4);
  color: #fff;
  box-shadow: 0 2px 8px rgba(45, 140, 255, 0.35);
}
.st-btn-ghost {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* 主区域 = 几乎全屏 iframe */
.st-main {
  position: fixed;
  top: calc(var(--st-header-h) + env(safe-area-inset-top, 0px));
  left: 0;
  right: 0;
  bottom: calc(var(--st-bottom-h) + var(--st-safe-bottom));
  background: #fff;
}

.st-iframe-wrap {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}
.st-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* 底部快捷栏（手机）— 四格压缩 */
.st-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  height: calc(var(--st-bottom-h) + var(--st-safe-bottom));
  padding-bottom: var(--st-safe-bottom);
  background: #fff;
  border-top: 1px solid #e2e8f0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
  padding-inline: 0.15rem;
  box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.04);
}
.st-bottom-bar--compact .st-bottom-item {
  font-size: 0.54rem;
  padding: 0.12rem 0.08rem;
  gap: 0;
}
.st-bottom-bar--compact .st-bottom-item span.icon {
  font-size: 0.82rem;
}
.st-bottom-bar--compact .st-bottom-item.st-cta {
  font-size: 0.58rem;
  font-weight: 700;
  margin: 0.1rem 0.06rem;
  padding: 0.2rem 0.1rem;
}

.st-bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  text-decoration: none;
  color: #64748b;
  font-size: 0.58rem;
  padding: 0.15rem 0.1rem;
  border-radius: 8px;
  min-width: 0;
  width: 100%;
}
.st-bottom-item span.icon { font-size: 1rem; line-height: 1; }
.st-bottom-item.active,
.st-bottom-item:hover {
  color: #1a5fd4;
  text-decoration: none;
}
.st-bottom-item.st-cta {
  background: linear-gradient(135deg, #c9a962, #b8956a);
  color: #fff;
  border-radius: 8px;
  margin: 0.15rem 0.1rem;
  font-size: 0.78rem;
  font-weight: 800;
  max-width: none;
  padding: 0.35rem 0.2rem;
}
.st-bottom-item.st-cta:hover { color: #fff; }
button.st-bottom-item {
  background: transparent;
  font-family: inherit;
  width: auto;
}

/* 桌面端：略放宽，可隐藏底栏 */
@media (min-width: 900px) {
  .st-main {
    bottom: 0;
    top: calc(var(--st-header-h) + env(safe-area-inset-top, 0px));
  }
  .st-bottom-bar { display: none; }
  .st-header { padding-inline: 1.25rem; }
  .st-title { font-size: 1.05rem; }
  .st-btn { font-size: 0.85rem; padding: 0.5rem 1rem; }
}

/* 加载态 */
.st-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.9rem;
  z-index: 1;
  transition: opacity 0.3s;
}
.st-loading.hide {
  opacity: 0;
  pointer-events: none;
}
.st-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: #2d8cff;
  border-radius: 50%;
  animation: st-spin 0.7s linear infinite;
}
@keyframes st-spin { to { transform: rotate(360deg); } }

