/* 星语者 · PWA 安装引导样式
 * 独立文件：不动 app.css / free.css 等既有样式，降低与并行改动冲突的风险。
 * 配色沿用品牌：底 #1B1830 / 金 #B8894A / 米 #E8CD98
 */

.pw-panel {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(12, 10, 20, .68);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s;
}

.pw-panel.pw-on {
  opacity: 1;
  visibility: visible;
}

.pw-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 26px 22px 22px;
  border-radius: 18px;
  background: #1B1830;
  border: 1px solid rgba(184, 137, 74, .32);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .5);
  color: #F3EFE6;
  transform: translateY(10px) scale(.98);
  transition: transform .22s ease;
}

.pw-panel.pw-on .pw-card {
  transform: none;
}

.pw-x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(243, 239, 230, .55);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.pw-x:hover {
  background: rgba(255, 255, 255, .08);
  color: #F3EFE6;
}

.pw-icon {
  text-align: center;
  margin-bottom: 12px;
}

.pw-icon img {
  border-radius: 13px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}

.pw-title {
  text-align: center;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .5px;
  line-height: 1.35;
  margin-bottom: 7px;
}

.pw-sub {
  text-align: center;
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(243, 239, 230, .8);
  margin-bottom: 18px;
}

/* 「桌面上已有旧图标的话先删掉再重加」——只在占星师侧出现 */
.pw-note {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(184, 137, 74, .14);
  border: 1px solid rgba(184, 137, 74, .3);
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(243, 239, 230, .82);
}

.pw-note b {
  color: #E8CD98;
}

/* 手把手步骤的最后一行：装完点开是什么 */
.pw-step.pw-done {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(184, 137, 74, .32);
  color: #E8CD98;
  font-weight: 700;
}

.pw-step.pw-done b {
  background: rgba(184, 137, 74, .32);
}

.pw-hint {
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(243, 239, 230, .72);
  text-align: center;
}

.pw-ico {
  display: inline-block;
  padding: 0 5px;
  border-radius: 5px;
  background: rgba(184, 137, 74, .18);
  color: #E8CD98;
  font-size: 12px;
}

.pw-btn {
  display: block;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.pw-primary {
  background: linear-gradient(135deg, #B8894A, #D4A860);
  color: #1B1830;
}

/* 复制网址：最后一道兜底，任何平台都要能点到 */
.pw-copy {
  margin-top: 9px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(184, 137, 74, .34);
  color: #E8CD98;
  font-size: 14px;
  font-weight: 600;
}

.pw-copy:hover {
  background: rgba(184, 137, 74, .16);
}

/* 复制失败时把网址亮出来（可手动选中复制） */
.pw-url {
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  border: 1px dashed rgba(184, 137, 74, .4);
  color: #E8CD98;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
  user-select: all;
}

/* 「已经装在这台设备上」——结论式提示，不用再让人找安装入口 */
.pw-hint.pw-ok {
  text-align: left;
  padding: 11px 12px;
  border-radius: 10px;
  background: rgba(184, 137, 74, .12);
  border: 1px solid rgba(184, 137, 74, .28);
  color: rgba(243, 239, 230, .86);
  line-height: 1.75;
}

/* iOS 图文步骤 */
.pw-manual {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.pw-manual[hidden] {
  display: none !important;
}

.pw-step {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(243, 239, 230, .82);
  margin-bottom: 9px;
}

.pw-step b {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(184, 137, 74, .22);
  color: #E8CD98;
  font-size: 12px;
  text-align: center;
  line-height: 20px;
}

/* 底部安装横幅
   🔴 2026-10-16：用户要求「提示条要清晰醒目」。
   原来的问题是「不够抢眼 + 文案没说清装完打开什么」——
   深底细金边、标题只有 14px、副标题 11.5px 且透明度 .55，在深色页面上几乎沉下去。
   现在：加粗金色左边条（一眼看出是提示条）+ 更大字号 + 副标题提对比度 +
   按钮加金色投影；文案改成「装完点开是什么」（见 pwa-install.js 的 COPY）。 */
.pw-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 99998;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 13px 13px 15px;
  border-radius: 14px;
  background: #1B1830;
  border: 1px solid rgba(184, 137, 74, .6);
  border-left: 4px solid #D4A860;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .55),
              0 0 0 1px rgba(184, 137, 74, .16),
              0 0 26px rgba(184, 137, 74, .2);
  transform: translateY(150%);
  opacity: 0;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), opacity .3s;
}

.pw-bar.pw-bar-on {
  transform: none;
  opacity: 1;
}

.pw-bar img {
  flex: 0 0 auto;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .45);
}

.pw-bar-tx {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #F3EFE6;
}

.pw-bar-tx b {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1.3;
}

.pw-bar-tx span {
  font-size: 12.5px;
  line-height: 1.35;
  color: #E8CD98;
}

.pw-bar-go {
  flex: 0 0 auto;
  padding: 11px 17px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #B8894A, #E0B76C);
  color: #1B1830;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(184, 137, 74, .45);
}

.pw-bar-go:active {
  transform: translateY(1px);
}

.pw-bar-x {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(243, 239, 230, .5);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.pw-bar-x:hover {
  background: rgba(255, 255, 255, .09);
  color: #F3EFE6;
}

/* 桌面端横幅限宽居中，别横跨整个屏幕 */
@media (min-width: 720px) {
  .pw-bar {
    left: 50%;
    right: auto;
    width: 380px;
    transform: translate(-50%, 150%);
  }

  .pw-bar.pw-bar-on {
    transform: translate(-50%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pw-panel,
  .pw-card,
  .pw-bar {
    transition: none;
  }
}
