/* 輕鬆點天堂 — 登入頁更新公告（方案 B：桌機右側輕奢常駐卡 ＋ 手機頂部單行膠囊與彈窗）
 * 品牌色票依 lineage-art 規範：午夜深墨藍黑 #0B0D19 / #0D0F1B × 香檳金雙細框 #DFC07D × 象牙暖白 #F5EFE2 */

/* ---- 共用微細節 ---- */
#pn-stage {
  display: contents;
}
#pn-card,
#pn-pill,
#pn-modal {
  font-family: "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  box-sizing: border-box;
}
#pn-card.hidden,
#pn-pill.hidden,
#pn-modal.hidden {
  display: none !important;
}

/* ---- 方案 B：電腦版寬螢幕（>= 980px 且非手機模式）左右並排 ---- */
@media (min-width: 980px) {
  html:not(.wp-mobile) #scr-login.screen {
    --login-scale: clamp(0.85, 35vmin / 190px, 1.48);
  }
  html:not(.wp-mobile) #pn-stage {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(28px, 4.2vw, 58px);
    width: 100%;
    max-width: 1120px;
    padding: clamp(16px, 3vh, 36px) 28px 0;
    min-height: 0;
    box-sizing: border-box;
  }
  html:not(.wp-mobile) #pn-stage #login-stack {
    flex: 0 0 auto;
    width: auto;
    padding: 0;
  }
  html:not(.wp-mobile) #pn-pill {
    display: none !important;
  }
  html:not(.wp-mobile) #pn-card {
    display: flex;
    flex-direction: column;
    flex: 0 0 clamp(324px, 30vw, 388px);
    max-height: min(536px, 78vh);
    padding: 18px 18px 14px;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(20, 25, 40, 0.94), rgba(11, 13, 25, 0.96));
    border: 1px solid rgba(223, 192, 125, 0.68);
    box-shadow:
      0 18px 46px rgba(0, 0, 0, 0.72),
      inset 0 0 0 3px rgba(11, 13, 25, 0.92),
      inset 0 0 0 4px rgba(223, 192, 125, 0.24),
      inset 0 1px 0 rgba(253, 222, 157, 0.22);
    color: #f5efe2;
    position: relative;
    z-index: 2;
  }
}

/* 桌機窄視窗（< 980px）與手機模式一律隱藏右側卡，改顯膠囊 */
@media (max-width: 979px) {
  #pn-card {
    display: none !important;
  }
}
html.wp-mobile #pn-card {
  display: none !important;
}

/* ---- 桌機右側卡片內部樣式 ---- */
.pn-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.pn-hd-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: #f3dca0;
}
.pn-hd-title .pn-star {
  color: #dfc07d;
  font-size: 13px;
}
.pn-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #fdde9d;
  background: rgba(199, 164, 91, 0.16);
  border: 1px solid rgba(223, 192, 125, 0.45);
  white-space: nowrap;
}
.pn-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fdde9d;
  box-shadow: 0 0 7px rgba(253, 222, 157, 0.9);
  flex-shrink: 0;
}
.pn-dot.seen {
  display: none;
}
.pn-divider {
  height: 1px;
  margin: 11px 0 10px;
  background: linear-gradient(90deg, transparent, rgba(223, 192, 125, 0.65), transparent);
  flex-shrink: 0;
}
.pn-list {
  list-style: none;
  margin: 0;
  padding: 0 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(223, 192, 125, 0.35) transparent;
}
.pn-list::-webkit-scrollbar,
.pn-dlg-body::-webkit-scrollbar {
  width: 4px;
}
.pn-list::-webkit-scrollbar-track,
.pn-dlg-body::-webkit-scrollbar-track {
  background: transparent;
}
.pn-list::-webkit-scrollbar-thumb,
.pn-dlg-body::-webkit-scrollbar-thumb {
  background: rgba(223, 192, 125, 0.35);
  border-radius: 4px;
}
.pn-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(223, 192, 125, 0.12);
}
.pn-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.pn-item-top {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.pn-kind {
  flex-shrink: 0;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
}
.pn-kind-add {
  color: #fdde9d;
  background: rgba(199, 164, 91, 0.2);
  border: 1px solid rgba(223, 192, 125, 0.45);
}
.pn-kind-opt {
  color: #a9d4ff;
  background: rgba(94, 156, 228, 0.16);
  border: 1px solid rgba(130, 185, 245, 0.38);
}
.pn-kind-fix {
  color: #9de8c2;
  background: rgba(74, 184, 130, 0.16);
  border: 1px solid rgba(118, 214, 165, 0.38);
}
.pn-item-t {
  font-size: 13px;
  font-weight: 700;
  color: #f5efe2;
  line-height: 1.35;
}
.pn-item-d {
  font-size: 12px;
  color: #b8b3a8;
  line-height: 1.5;
  padding-left: 2px;
}
.pn-note {
  margin-top: 8px;
  padding: 7px 9px;
  border-radius: 6px;
  background: rgba(223, 192, 125, 0.08);
  border: 1px solid rgba(223, 192, 125, 0.22);
  font-size: 11.5px;
  color: #e6d3a3;
  line-height: 1.45;
  flex-shrink: 0;
}
.pn-ft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(223, 192, 125, 0.18);
  flex-shrink: 0;
}
.pn-link-btn,
.pn-ext-link {
  background: transparent;
  border: 0;
  padding: 2px 4px;
  font-size: 12px;
  font-weight: 600;
  color: #dfc07d;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.4px;
  transition: color 0.15s ease;
}
.pn-link-btn:hover,
.pn-ext-link:hover {
  color: #fdde9d;
}
.pn-ext-link {
  color: #b8b3a8;
  font-weight: 500;
}

/* ---- 手機模式 & 桌機窄窗：頂部香檳金單行微膠囊 ---- */
#pn-pill {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(370px, calc(100vw - 24px));
  padding: 7px 12px 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(223, 192, 125, 0.56);
  background: linear-gradient(180deg, rgba(20, 25, 40, 0.92), rgba(11, 13, 25, 0.94));
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(253, 222, 157, 0.16);
  color: #f5efe2;
  font-size: 12px;
  line-height: 1.25;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
#pn-pill:active {
  transform: translateX(-50%) scale(0.98);
}
.pn-pill-tag {
  flex-shrink: 0;
  color: #fdde9d;
  font-weight: 700;
  letter-spacing: 0.4px;
}
.pn-pill-sep {
  flex-shrink: 0;
  color: rgba(223, 192, 125, 0.45);
}
.pn-pill-txt {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #efe7d6;
}
.pn-pill-go {
  flex-shrink: 0;
  color: #dfc07d;
  font-weight: 700;
  margin-left: 2px;
}
html.wp-mobile.orient-landscape #pn-pill {
  top: calc(env(safe-area-inset-top, 0px) + 6px);
  padding: 5px 11px;
  font-size: 11.5px;
}

/* ---- 完整更新公告彈窗（桌機＆手機共用） ---- */
#pn-modal {
  position: fixed;
  inset: 0;
  z-index: 990;
  background: rgba(5, 7, 15, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 16px)) 16px max(16px, env(safe-area-inset-bottom, 16px));
}
.pn-dlg {
  width: min(460px, 100%);
  max-height: min(620px, 84dvh);
  display: flex;
  flex-direction: column;
  padding: 18px 18px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #141928, #0b0d19);
  border: 1px solid rgba(223, 192, 125, 0.78);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.82),
    inset 0 0 0 3px #0b0d19,
    inset 0 0 0 4px rgba(223, 192, 125, 0.28);
  color: #f5efe2;
}
.pn-dlg-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pn-dlg-x {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(223, 192, 125, 0.35);
  background: rgba(24, 30, 48, 0.8);
  color: #dfc07d;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.pn-dlg-x:hover {
  border-color: #fdde9d;
  color: #fdde9d;
}
.pn-dlg-body {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  padding-right: 3px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pn-entry {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pn-entry + .pn-entry {
  padding-top: 12px;
  border-top: 1px solid rgba(223, 192, 125, 0.22);
}
.pn-entry-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pn-entry-date {
  font-size: 12px;
  color: #b8b3a8;
}
.pn-entry-title {
  font-size: 14px;
  font-weight: 700;
  color: #f3dca0;
  line-height: 1.4;
}
.pn-dlg-ft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(223, 192, 125, 0.2);
}
.pn-dlg-ok {
  height: 34px;
  padding: 0 20px;
  border-radius: 6px;
  border: 1px solid #fdde9d;
  background: linear-gradient(180deg, #c7a45b, #8f6e31 60%, #684f22);
  color: #fffdf5;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
}
.pn-dlg-ok:hover {
  filter: brightness(1.08);
}
