﻿/**
 * [INPUT]: 依赖 account-detail.ts / shrine-collection.ts 输出的新版页面语义、lore-ui.css 令牌与 app-assets 同源插画
 * [OUTPUT]: 提供新版书斋首页、轶闻、祈愿与樗蒲的截图级布局、云纹纸面、状态层级、互斥视图和移动端交互反馈
 * [POS]: public 的现代功能页覆盖层，最后加载以修正旧视口压缩规则；明确排除行商、拍卖与期物业务样式
 * [PROTOCOL]: 变更时更新此头部，然后检查 CLAUDE.md
 */
/* ── 现代阅微画布：冷淡紫灰底 + 一枚蓝色行动色 ─────────────── */
html[data-ui-mode="new"], html[data-ui-mode="new"] body {
  --modern-canvas: #eef0ff;
  --modern-paper: #fbfaff;
  --modern-paper-soft: rgba(251, 250, 255, .82);
  --modern-ink: #20212b;
  --modern-muted: #777a8e;
  --modern-line: rgba(100, 105, 145, .16);
  --modern-blue: #1765d4;
  --modern-green: #4a9b62;
  --modern-gold: #bb8d2f;
  background: var(--modern-canvas);
  color: var(--modern-ink);
}
html[data-ui-mode="new"] body {
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(238, 240, 255, .86), rgba(238, 240, 255, .86)),
    url("/assets/app-assets/shrine_bg_0.webp") center / cover fixed;
}
html[data-ui-mode="new"] .container {
  width: min(100%, 720px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 16px calc(88px + env(safe-area-inset-bottom));
  display: block;
}
html[data-ui-mode="new"] .account-app-header {
  min-height: 84px;
  height: auto;
  padding: 16px 2px 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
}
html[data-ui-mode="new"] .account-app-back,
html[data-ui-mode="new"] .account-app-help,
html[data-ui-mode="new"] .account-app-community-link {
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
html[data-ui-mode="new"] .account-app-community-link {
  width: 42px;
  height: 42px;
  grid-column: 3;
  grid-row: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
}
html[data-ui-mode="new"] .account-app-avatar {
  width: 40px;
  height: 40px;
  display: block;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(42, 49, 87, .14);
}
html[data-ui-mode="new"] .account-app-identity .user-name {
  display: block;
  overflow: hidden;
  color: var(--modern-ink);
  font-size: clamp(24px, 6vw, 30px);
  letter-spacing: .04em;
  text-overflow: ellipsis;
}
html[data-ui-mode="new"] .account-app-identity .modern-shrine-title {
  display: inline;
  color: var(--modern-ink);
  font-size: inherit;
  font-weight: 750;
}
html[data-ui-mode="new"] .account-app-identity .user-current-title,
html[data-ui-mode="new"] .account-app-identity .user-account-name,
html[data-ui-mode="new"] .account-app-identity .user-title-level,
html[data-ui-mode="new"] .account-app-resources,
html[data-ui-mode="new"] .account-app-help {
  display: none;
}
html[data-ui-mode="new"] .section-card.lore-section {
  display: none;
}
/* ── 首页：只保留截图中的七条主路径，补充入口收进轻量行 ─────── */
html[data-ui-mode="new"] .shrine-section {
  width: 100%;
  min-height: 0;
  padding: 0;
  display: block;
  overflow: visible;
}
html[data-ui-mode="new"] .shrine-view-panel[data-shrine-view-panel="team"]:not([hidden]) {
  min-height: 0;
  height: auto;
  display: block;
  overflow: visible;
}
html[data-ui-mode="new"] .shrine-board {
  min-height: 0;
  height: auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
  overflow: visible;
}
html[data-ui-mode="new"] .shrine-column {
  min-height: 0;
  display: contents;
}
/* 入口图卡：行商由 account-detail-merchant.css 独立承载，故不纳入此规则。 */
html[data-ui-mode="new"] .shrine-module.shrine-home-primary:not(.shrine-merchant-entry):not(.shrine-collection) {
  min-width: 0;
  min-height: 0;
  height: auto;
  padding: 9px 11px 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: rgba(226, 228, 246, .88);
  box-shadow: 0 8px 22px rgba(75, 81, 132, .08);
  color: var(--modern-ink);
  transform: translateZ(0);
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out), background-color 180ms var(--ease-out);
}
html[data-ui-mode="new"] .shrine-module.shrine-home-primary:not(.shrine-merchant-entry):not(.shrine-collection)::after {
  display: none;
}
html[data-ui-mode="new"] .shrine-module-art {
  width: 100%;
  min-height: 0;
  aspect-ratio: 2.2 / 1;
  flex: 0 0 auto;
  display: block;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 17px;
  background-color: #f3f0e8;
  background-position: center;
  background-size: cover;
  box-shadow: 0 4px 12px rgba(61, 66, 104, .13);
}
html[data-ui-mode="new"] .shrine-lore .shrine-module-art { background-image: url("/assets/app-assets/shrine_2.webp"); }
html[data-ui-mode="new"] .shrine-auction .shrine-module-art { background-image: url("/assets/app-assets/shrine_auction.webp"); }
html[data-ui-mode="new"] .shrine-gambling .shrine-module-art { background-image: url("/assets/app-assets/shrine_chupu.webp"); }
html[data-ui-mode="new"] .shrine-treasure-card .shrine-module-art { background-image: url("/assets/app-assets/shrine_duobao.webp"); }
html[data-ui-mode="new"] .shrine-wish .shrine-module-art { background-image: url("/assets/app-assets/shrine_sunrise.webp"); }
html[data-ui-mode="new"] .shrine-module.shrine-home-primary .shrine-module-heading {
  min-width: 0;
  margin: 10px 3px 0;
  position: static;
  inset: auto;
  order: 1;
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--modern-ink);
}
html[data-ui-mode="new"] .shrine-module.shrine-home-primary .shrine-module-icon {
  display: none;
}
html[data-ui-mode="new"] .shrine-module.shrine-home-primary .shrine-module-title {
  min-width: 0;
  overflow: hidden;
  color: var(--modern-ink);
  font-size: 21px;
  font-weight: 750;
  letter-spacing: .03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-ui-mode="new"] .shrine-module.shrine-home-primary .shrine-module-trailing {
  margin-left: auto;
  color: var(--modern-muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
html[data-ui-mode="new"] .shrine-module.shrine-home-primary .shrine-module-divider {
  display: none;
}
html[data-ui-mode="new"] .shrine-module.shrine-home-primary .shrine-module-body {
  min-width: 0;
  max-width: none;
  margin: 3px 3px 0;
  position: static;
  order: 2;
  overflow: hidden;
  color: var(--modern-muted);
  font-size: 14px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-ui-mode="new"] .shrine-module-progress {
  height: 7px;
  margin: 10px 3px 0;
  position: relative;
  display: block;
  overflow: visible;
  order: 3;
  border-radius: 99px;
  background: rgba(115, 120, 160, .18);
}
html[data-ui-mode="new"] .shrine-module-progress i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--modern-blue);
  transition: width 240ms var(--ease-out);
}
html[data-ui-mode="new"] .shrine-lore .shrine-module-progress i { background: #5d6478; }
html[data-ui-mode="new"] .shrine-gambling .shrine-module-progress i { background: #3e83e9; }
html[data-ui-mode="new"] .shrine-treasure-card .shrine-module-progress i { background: #1bb5a9; }
html[data-ui-mode="new"] .shrine-module-progress b {
  width: 7px;
  height: 7px;
  position: absolute;
  top: 0;
  right: -1px;
  border: 2px solid rgba(255, 255, 255, .88);
  border-radius: 50%;
  background: var(--modern-blue);
  box-shadow: 0 1px 4px rgba(61, 66, 104, .18);
}
/* 藏品卡保留四格物件，同时让同源背景图成为卡片的主视觉。 */
html[data-ui-mode="new"] .shrine-module.shrine-collection {
  min-height: 190px;
  padding: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: #e9e8f5 url("/assets/app-assets/shrine_trinkets.webp") center / cover;
  box-shadow: 0 8px 22px rgba(75, 81, 132, .08);
}
html[data-ui-mode="new"] .shrine-collection-grid {
  width: 100%;
  height: 100%;
  min-height: 170px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
html[data-ui-mode="new"] .shrine-collection-cell {
  min-width: 0;
  min-height: 120px;
  padding: 10px 5px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1px solid rgba(150, 140, 127, .18);
  border-radius: 13px;
  background: rgba(255, 251, 239, .86);
  color: #373746;
  font-size: 13px;
  font-weight: 700;
}
html[data-ui-mode="new"] .shrine-collection-cell:nth-child(2n),
html[data-ui-mode="new"] .shrine-collection-cell:nth-child(n + 3) {
  border-left: 1px solid rgba(150, 140, 127, .18);
  border-top: 0;
}
html[data-ui-mode="new"] .shrine-collection-icon { width: 35px; height: 35px; }
html[data-ui-mode="new"] .shrine-collection-name { font-size: 13px; }
/* 传承/里程碑不是首页主路径，保留为低噪音补充入口。 */
html[data-ui-mode="new"] .shrine-secondary-links {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
html[data-ui-mode="new"] .shrine-secondary-links .shrine-module {
  min-height: 66px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  overflow: hidden;
  border: 1px solid rgba(105, 112, 155, .13);
  border-radius: 16px;
  background: rgba(255, 255, 255, .62);
  color: var(--modern-ink);
  text-align: left;
}
html[data-ui-mode="new"] .shrine-secondary-links .shrine-module-art,
html[data-ui-mode="new"] .shrine-secondary-links .shrine-module-divider { display: none; }
html[data-ui-mode="new"] .shrine-secondary-links .shrine-module-heading { min-width: 0; margin: 0; position: static; inset: auto; display: flex; gap: 7px; }
html[data-ui-mode="new"] .shrine-secondary-links .shrine-module-icon { width: 22px; height: 22px; }
html[data-ui-mode="new"] .shrine-secondary-links .shrine-module-title { font-size: 15px; }
html[data-ui-mode="new"] .shrine-secondary-links .shrine-module-body { grid-column: 2; min-width: 0; margin: -2px 0 0; overflow: hidden; color: var(--modern-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
html[data-ui-mode="new"] .shrine-settings-entry {
  margin-top: 12px;
}
html[data-ui-mode="new"] .shrine-settings-entry button {
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(105, 112, 155, .13);
  border-radius: 17px;
  background: rgba(255, 255, 255, .58);
  color: var(--modern-ink);
  text-align: left;
}
html[data-ui-mode="new"] .shrine-settings-entry img { width: 25px; height: 25px; }
html[data-ui-mode="new"] .shrine-settings-entry span { min-width: 0; display: grid; gap: 2px; }
html[data-ui-mode="new"] .shrine-settings-entry strong { font-size: 15px; }
html[data-ui-mode="new"] .shrine-settings-entry small { overflow: hidden; color: var(--modern-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
html[data-ui-mode="new"] .shrine-settings-entry b { color: #777b90; font-size: 25px; font-weight: 400; }
html[data-ui-mode="new"] .shrine-bottom-nav {
  width: 188px;
  height: 50px;
  position: fixed;
  z-index: 22;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  box-shadow: 0 10px 28px rgba(65, 70, 120, .16);
  backdrop-filter: blur(18px);
}
html[data-ui-mode="new"] .shrine-bottom-nav button {
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
}
html[data-ui-mode="new"] .shrine-bottom-nav button.is-active { background: rgba(237, 238, 255, .92); }
html[data-ui-mode="new"] .shrine-bottom-nav img { width: 21px; height: 21px; }
html[data-ui-mode="new"] .shrine-bottom-nav span { display: none; }
/* ── 轶闻 / 祈愿 / 樗蒲：独立 App sheet，避免通用工作台串味 ───── */
html[data-ui-mode="new"] .shrine-modal-lore,
html[data-ui-mode="new"] .shrine-modal-wish,
html[data-ui-mode="new"] .shrine-modal-gambling {
  padding: 0;
  align-items: end;
  background: rgba(23, 24, 36, .52);
  backdrop-filter: blur(4px);
}
html[data-ui-mode="new"] .shrine-modal-lore .shrine-modal-sheet,
html[data-ui-mode="new"] .shrine-modal-wish .shrine-modal-sheet,
html[data-ui-mode="new"] .shrine-modal-gambling .shrine-modal-sheet {
  width: min(100%, 720px);
  height: min(1080px, calc(100dvh - 8px));
  max-height: min(1080px, calc(100dvh - 8px));
  border: 0;
  border-radius: 31px 31px 0 0;
  background-color: var(--modern-paper);
  background-image: linear-gradient(rgba(251, 250, 255, .84), rgba(251, 250, 255, .84)), url("/assets/app-assets/shrine_bg_0.webp");
  background-position: center;
  background-size: cover;
  background-blend-mode: screen;
  box-shadow: 0 -10px 40px rgba(31, 34, 55, .22);
  transform-origin: center bottom;
}
html[data-ui-mode="new"] .shrine-modal-lore .shrine-modal-heading,
html[data-ui-mode="new"] .shrine-modal-wish .shrine-modal-heading,
html[data-ui-mode="new"] .shrine-modal-gambling .shrine-modal-heading {
  min-height: 27px;
  height: 27px;
  padding: 0;
  position: relative;
  border: 0;
}
html[data-ui-mode="new"] .shrine-modal-lore .shrine-modal-heading::before,
html[data-ui-mode="new"] .shrine-modal-wish .shrine-modal-heading::before,
html[data-ui-mode="new"] .shrine-modal-gambling .shrine-modal-heading::before {
  content: "";
  width: 76px;
  height: 7px;
  position: absolute;
  top: 9px;
  left: 50%;
  border-radius: 99px;
  background: rgba(65, 68, 82, .35);
  transform: translateX(-50%);
}
html[data-ui-mode="new"] .shrine-modal-lore .shrine-modal-heading h3,
html[data-ui-mode="new"] .shrine-modal-wish .shrine-modal-heading h3,
html[data-ui-mode="new"] .shrine-modal-gambling .shrine-modal-heading h3 {
  width: 1px;
  height: 1px;
  margin: -1px;
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
html[data-ui-mode="new"] .shrine-modal-lore .shrine-modal-content,
html[data-ui-mode="new"] .shrine-modal-wish .shrine-modal-content,
html[data-ui-mode="new"] .shrine-modal-gambling .shrine-modal-content {
  min-height: 0;
  padding: 0;
  overflow: auto;
  scrollbar-width: thin;
}
html[data-ui-mode="new"] .shrine-modal-lore .shrine-modal-footer,
html[data-ui-mode="new"] .shrine-modal-wish .shrine-modal-footer,
html[data-ui-mode="new"] .shrine-modal-gambling .shrine-modal-footer {
  padding: 10px 24px max(24px, env(safe-area-inset-bottom));
  border: 0;
  background: transparent;
}
html[data-ui-mode="new"] .shrine-modal-lore .shrine-close,
html[data-ui-mode="new"] .shrine-modal-wish .shrine-close,
html[data-ui-mode="new"] .shrine-modal-gambling .shrine-close {
  min-height: 54px;
  border: 0;
  border-radius: 19px;
  background: #191b26;
  color: #fff;
  font-size: 18px;
}
/* ── 轶闻页 ─────────────────────────────────────────────── */
html[data-ui-mode="new"] .lore-app-page {
  min-height: 100%;
  padding: 17px 30px 25px;
  display: flex;
  flex-direction: column;
  color: var(--modern-ink);
}
html[data-ui-mode="new"] .lore-app-topline {
  min-height: 58px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}
html[data-ui-mode="new"] .lore-app-topline > div { display: grid; gap: 4px; }
html[data-ui-mode="new"] .lore-app-topline span { color: #686b7d; font-size: 16px; }
html[data-ui-mode="new"] .lore-app-topline strong { color: #171923; font: 750 28px/1.1 var(--font-display); }
html[data-ui-mode="new"] .lore-app-topline time { color: var(--modern-blue); font: 700 22px/1.1 var(--font-display); white-space: nowrap; }
html[data-ui-mode="new"] .lore-app-art {
  min-height: 220px;
  margin: 8px 0 0;
  position: relative;
  display: grid;
  place-items: center;
}
html[data-ui-mode="new"] .lore-app-art::before {
  content: "";
  width: min(280px, 66vw);
  aspect-ratio: 1;
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 248, 213, .7), rgba(255, 248, 213, 0) 68%);
  filter: blur(3px);
}
html[data-ui-mode="new"] .lore-app-art img {
  width: min(190px, 48vw);
  max-height: 220px;
  position: relative;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 14px 11px rgba(49, 47, 39, .18));
}
html[data-ui-mode="new"] .lore-app-art-mark { display: none; }
html[data-ui-mode="new"] .lore-app-story { margin-top: 7px; text-align: center; }
html[data-ui-mode="new"] .lore-app-story h3 { margin: 0; color: var(--modern-green); font: 750 clamp(25px, 7vw, 34px)/1.18 var(--font-display); }
html[data-ui-mode="new"] .lore-app-category { margin: 11px 0 0; color: #8f8d97; font: 20px/1.35 var(--font-display); }
html[data-ui-mode="new"] .lore-app-content { min-height: 0; margin: 24px 0 0; padding: 0; color: #292a33; font: 18px/1.82 var(--font-display); text-align: left; white-space: pre-wrap; overflow: visible; display: block; -webkit-line-clamp: unset; overflow-wrap: anywhere; }
html[data-ui-mode="new"] .lore-app-story.is-error h3 { color: #b33b33; }
html[data-ui-mode="new"] .lore-app-story.is-error .lore-app-content { color: #b33b33; }
html[data-ui-mode="new"] .lore-app-rewards {
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}
html[data-ui-mode="new"] .lore-app-rewards li {
  min-height: 38px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 2px solid currentColor;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(61, 66, 104, .12);
  font-family: var(--font-display);
}
html[data-ui-mode="new"] .lore-app-rewards li.is-exp { color: #a37b1f; background: rgba(245, 222, 157, .68); }
html[data-ui-mode="new"] .lore-app-rewards li.is-gem { color: #547cae; background: rgba(172, 204, 243, .62); }
html[data-ui-mode="new"] .lore-app-rewards li.is-prop { color: #8b7863; background: rgba(230, 218, 202, .7); }
html[data-ui-mode="new"] .lore-app-rewards span { font-size: 15px; }
html[data-ui-mode="new"] .lore-app-rewards strong { font-size: 18px; }
html[data-ui-mode="new"] .lore-app-rewards small { font-size: 13px; }
html[data-ui-mode="new"] .lore-app-claim {
  width: 100%;
  min-height: 50px;
  margin-top: 24px;
  border-radius: 17px;
  background: var(--modern-blue);
}
html[data-ui-mode="new"] .lore-app-page.is-claimed .lore-app-claim { display: none; }
/* ── 祈愿页：说明、圆形祈愿门、彩筹、双按钮、可展开记录 ─────── */
html[data-ui-mode="new"] .wish-app-page {
  min-height: 100%;
  padding: 17px 30px 28px;
  color: var(--modern-ink);
}
html[data-ui-mode="new"] .wish-app-intro p {
  max-width: 500px;
  margin: 0 0 0 auto;
  color: #434550;
  font: 18px/1.72 var(--font-display);
}
html[data-ui-mode="new"] .wish-app-intro-meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
html[data-ui-mode="new"] .wish-app-status { color: var(--modern-muted); font-size: 13px; }
html[data-ui-mode="new"] .wish-app-intro-meta .mini-link { min-height: 30px; padding-inline: 9px; font-size: 12px; }
html[data-ui-mode="new"] .wish-app-oracle {
  min-height: 300px;
  margin: 9px 0 0;
  display: grid;
  place-items: center;
}
html[data-ui-mode="new"] .wish-app-oracle-ring {
  width: min(300px, 68vw);
  aspect-ratio: 1;
  position: relative;
  display: block;
  overflow: hidden;
  border: 6px solid #aa8847;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 80%, rgba(172, 133, 112, .95) 0 18%, transparent 18.5%),
    linear-gradient(180deg, #d9c58d 0%, #d5c18b 58%, #cab38a 100%);
  box-shadow: inset 0 0 28px rgba(255, 250, 223, .55), 0 9px 16px rgba(85, 68, 41, .16);
}
html[data-ui-mode="new"] .wish-app-oracle-ring::before,
html[data-ui-mode="new"] .wish-app-oracle-ring::after {
  content: "";
  position: absolute;
  bottom: -7%;
  width: 58%;
  height: 30%;
  border-radius: 50% 50% 0 0;
  background: rgba(250, 246, 234, .86);
}
html[data-ui-mode="new"] .wish-app-oracle-ring::before { left: -9%; transform: rotate(-10deg); }
html[data-ui-mode="new"] .wish-app-oracle-ring::after { right: -9%; transform: rotate(10deg); }
html[data-ui-mode="new"] .wish-app-oracle-gate {
  width: 38%;
  height: 55%;
  position: absolute;
  left: 31%;
  bottom: 14%;
  z-index: 1;
  border: 9px solid rgba(250, 246, 234, .9);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  box-shadow: inset 0 0 16px rgba(119, 88, 72, .2);
}
html[data-ui-mode="new"] .wish-app-oracle-cloud {
  width: 25px;
  height: 13px;
  position: absolute;
  z-index: 2;
  border-radius: 50%;
  background: rgba(255, 255, 255, .86);
}
html[data-ui-mode="new"] .wish-app-oracle-cloud::after { content: ""; width: 17px; height: 17px; position: absolute; left: 8px; bottom: 2px; border-radius: 50%; background: inherit; }
html[data-ui-mode="new"] .wish-app-oracle-cloud-left { top: 40%; left: 18%; transform: rotate(-8deg); }
html[data-ui-mode="new"] .wish-app-oracle-cloud-right { top: 50%; right: 16%; transform: rotate(9deg) scale(.82); }
html[data-ui-mode="new"] .wish-app-balance {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #20212b;
  font-family: var(--font-display);
}
html[data-ui-mode="new"] .wish-token-mark { width: 29px; display: grid; gap: 3px; }
html[data-ui-mode="new"] .wish-token-mark i { width: 24px; height: 4px; display: block; border-radius: 99px; }
html[data-ui-mode="new"] .wish-token-mark i:nth-child(1) { background: #d45151; }
html[data-ui-mode="new"] .wish-token-mark i:nth-child(2) { background: #4d85c5; }
html[data-ui-mode="new"] .wish-token-mark i:nth-child(3) { background: #d5a338; }
html[data-ui-mode="new"] .wish-app-balance strong { font-size: 26px; font-weight: 500; }
html[data-ui-mode="new"] .wish-app-balance > span:last-child { color: var(--modern-muted); font-size: 15px; }
html[data-ui-mode="new"] .wish-app-actions {
  margin-top: 27px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
html[data-ui-mode="new"] .wish-app-actions .wish-btn {
  min-height: 56px;
  border-radius: 18px;
  font-family: var(--font-display);
  font-size: 18px;
}
html[data-ui-mode="new"] .wish-app-actions .wish-btn:disabled {
  color: #aaaab4;
  border-color: transparent;
  background: rgba(216, 216, 226, .72);
  opacity: 1;
}
html[data-ui-mode="new"] .wish-note { margin-top: 10px; color: #a24b4b; font: 14px/1.5 var(--font-display); text-align: center; }
html[data-ui-mode="new"] .wish-app-result { min-height: 58px; margin-top: 14px; border: 0; background: transparent; }
html[data-ui-mode="new"] .wish-app-result .wish-empty { color: #9999a5; font: 15px/1.5 var(--font-display); text-align: center; }
html[data-ui-mode="new"] .wish-app-summary {
  margin-top: 8px;
  padding: 10px 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--modern-line);
  border-bottom: 1px solid var(--modern-line);
  color: var(--modern-muted);
  font: 13px/1.35 var(--font-display);
  text-align: center;
}
html[data-ui-mode="new"] .wish-app-summary span + span { border-left: 1px solid var(--modern-line); }
html[data-ui-mode="new"] .wish-app-summary strong { color: var(--modern-ink); font-size: 16px; }
html[data-ui-mode="new"] .wish-analysis { margin-top: 12px; border-color: var(--modern-line); background: rgba(255, 255, 255, .48); }
html[data-ui-mode="new"] .wish-analysis summary { min-height: 48px; padding: 8px 12px; }
html[data-ui-mode="new"] .wish-analysis .disclosure-content { padding: 12px; }
/* ── 樗蒲页：规则、榜单、奖池、投注次数、骰面、结算操作 ─────── */
html[data-ui-mode="new"] .gambling-app-page {
  min-height: 100%;
  padding: 17px 30px 28px;
  color: var(--modern-ink);
}
html[data-ui-mode="new"] .gambling-app-intro p {
  max-width: 500px;
  margin: 0 0 0 auto;
  color: #434550;
  font: 18px/1.72 var(--font-display);
}
html[data-ui-mode="new"] .gambling-app-status {
  display: block;
  margin-top: 9px;
  color: var(--modern-muted);
  font: 14px/1.4 var(--font-display);
  text-align: right;
}
html[data-ui-mode="new"] .gambling-app-error { margin-top: 12px; color: #b33b33; font: 14px/1.6 var(--font-display); }
html[data-ui-mode="new"] .gambling-rank-card {
  margin-top: 22px;
  padding: 0 4px 9px;
  border: 1px solid var(--modern-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .34);
}
html[data-ui-mode="new"] .gambling-rank-heading {
  min-height: 45px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--modern-line);
  font-family: var(--font-display);
}
html[data-ui-mode="new"] .gambling-rank-heading strong { font-size: 19px; }
html[data-ui-mode="new"] .gambling-rank-heading small { color: var(--modern-muted); font-size: 12px; }
html[data-ui-mode="new"] .gambling-rank-card .gamble-leaderboard { padding: 10px 8px 3px; border: 0; }
html[data-ui-mode="new"] .gambling-rank-card .gamble-rank-item { grid-template-columns: 43px minmax(82px, auto) minmax(0, 1fr) max-content; min-height: 38px; gap: 7px; align-items: center; font-size: 15px; }
html[data-ui-mode="new"] .gambling-rank-card .gamble-rank-title { font-weight: 700; }
html[data-ui-mode="new"] .gambling-rank-card .gamble-rank-name { font-weight: 650; }
html[data-ui-mode="new"] .gambling-rank-card .gamble-rank-reward { font-size: 12px; }
html[data-ui-mode="new"] .gambling-rank-card .gamble-rank-item::before { content: ""; width: 24px; height: 24px; grid-column: 1; grid-row: 1; border: 2px solid #d6ac35; border-radius: 50%; background: rgba(248, 223, 143, .58); }
html[data-ui-mode="new"] .gambling-rank-card .gamble-rank-item.is-rank-2::before { border-color: #a9a9b5; background: rgba(218, 218, 229, .7); }
html[data-ui-mode="new"] .gambling-rank-card .gamble-rank-item.is-rank-3::before { border-color: #ad8765; background: rgba(226, 203, 184, .7); }
html[data-ui-mode="new"] .gambling-rank-card .gamble-rank-title { grid-column: 1; position: relative; z-index: 1; font-size: 11px; text-align: center; }
html[data-ui-mode="new"] .gambling-pot {
  margin-top: 23px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: var(--modern-blue);
  font-family: var(--font-display);
}
html[data-ui-mode="new"] .gambling-pot > span { font-size: 20px; font-weight: 700; }
html[data-ui-mode="new"] .gambling-pot strong { color: #292a34; font-size: 27px; font-weight: 500; }
html[data-ui-mode="new"] .gambling-pot strong i { margin-right: 7px; color: #d8ab36; font-style: normal; }
html[data-ui-mode="new"] .gambling-pot strong small { margin-left: 4px; color: var(--modern-muted); font-size: 13px; }
html[data-ui-mode="new"] .gambling-app-count { margin: 7px 0 0; color: #6f7180; font: 16px/1.5 var(--font-display); }
html[data-ui-mode="new"] .gambling-dice-panel {
  margin-top: 23px;
  padding: 14px 4px 4px;
  border-top: 1px solid var(--modern-line);
}
html[data-ui-mode="new"] .gambling-dice-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-family: var(--font-display); }
html[data-ui-mode="new"] .gambling-dice-heading span { font-size: 19px; font-weight: 700; }
html[data-ui-mode="new"] .gambling-dice-heading small { color: var(--modern-muted); font-size: 12px; text-align: right; }
html[data-ui-mode="new"] .gambling-dice-panel .dice-row { width: min(100%, 390px); margin: 20px auto 0; gap: 7px; }
html[data-ui-mode="new"] .gambling-dice-panel .gamble-die { aspect-ratio: 1 / 2.15; border: 0; border-radius: 0; background: transparent; transform: rotate(-4deg); }
html[data-ui-mode="new"] .gambling-dice-panel .gamble-die:nth-child(2) { transform: rotate(5deg); }
html[data-ui-mode="new"] .gambling-dice-panel .gamble-die:nth-child(3) { transform: rotate(-2deg); }
html[data-ui-mode="new"] .gambling-dice-panel .gamble-die:nth-child(4) { transform: rotate(3deg); }
html[data-ui-mode="new"] .gambling-dice-panel .gamble-die:nth-child(5) { transform: rotate(-6deg); }
html[data-ui-mode="new"] .gambling-dice-panel .gamble-die img { width: 100%; height: 100%; object-fit: contain; filter: none; }
html[data-ui-mode="new"] .gambling-dice-empty { min-height: 108px; display: grid; place-items: center; color: #9a9aa5; font: 15px/1.5 var(--font-display); }
html[data-ui-mode="new"] .gambling-dice-panel .gamble-score { margin-top: 12px; color: #a05454; font: 24px/1.2 var(--font-display); text-align: center; }
html[data-ui-mode="new"] .gambling-dice-panel .gamble-empty { margin-top: 17px; color: #9697a2; font: 15px/1.5 var(--font-display); text-align: center; }
html[data-ui-mode="new"] .gambling-app-action { margin-top: 24px; }
html[data-ui-mode="new"] .gambling-app-action .gamble-placement { margin-top: 0; }
html[data-ui-mode="new"] .gambling-app-action .btn { min-height: 54px; border: 0; border-radius: 18px; background: var(--modern-blue); color: #fff; font-family: var(--font-display); font-size: 18px; }
/* 触感与降级：仅在可悬停设备上抬升，避免手机 hover 残留。 */
@media (hover: hover) and (pointer: fine) {
  html[data-ui-mode="new"] .shrine-module.shrine-home-primary:not(.shrine-merchant-entry):hover,
  html[data-ui-mode="new"] .shrine-secondary-links .shrine-module:hover,
  html[data-ui-mode="new"] .shrine-settings-entry button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 27px rgba(75, 81, 132, .13);
  }
}
html[data-ui-mode="new"] .shrine-module.shrine-home-primary:active,
html[data-ui-mode="new"] .shrine-secondary-links .shrine-module:active,
html[data-ui-mode="new"] .shrine-settings-entry button:active,
html[data-ui-mode="new"] .shrine-bottom-nav button:active {
  transform: scale(.985);
}
@media (max-width: 520px) {
  html[data-ui-mode="new"] .container { padding-inline: 12px; }
  html[data-ui-mode="new"] .account-app-header { min-height: 75px; padding-top: 11px; padding-bottom: 9px; }
  html[data-ui-mode="new"] .shrine-board { gap: 12px; }
  html[data-ui-mode="new"] .shrine-module.shrine-home-primary:not(.shrine-merchant-entry):not(.shrine-collection) { padding: 8px 9px 10px; border-radius: 19px; }
  html[data-ui-mode="new"] .shrine-module-art { border-radius: 15px; }
  html[data-ui-mode="new"] .shrine-module.shrine-home-primary .shrine-module-title { font-size: 19px; }
  html[data-ui-mode="new"] .shrine-module.shrine-home-primary .shrine-module-body { font-size: 13px; }
  html[data-ui-mode="new"] .shrine-module.shrine-collection { min-height: 164px; padding: 8px; border-radius: 19px; }
  html[data-ui-mode="new"] .shrine-collection-grid { min-height: 148px; gap: 5px; }
  html[data-ui-mode="new"] .shrine-collection-cell { min-height: 105px; padding: 6px 3px; border-radius: 11px; }
  html[data-ui-mode="new"] .shrine-collection-icon { width: 28px; height: 28px; }
  html[data-ui-mode="new"] .shrine-collection-name { font-size: 11px; }
  html[data-ui-mode="new"] .lore-app-page,
  html[data-ui-mode="new"] .wish-app-page,
  html[data-ui-mode="new"] .gambling-app-page { padding-inline: 20px; }
  html[data-ui-mode="new"] .lore-app-topline strong { font-size: 25px; }
  html[data-ui-mode="new"] .lore-app-topline time { font-size: 19px; }
  html[data-ui-mode="new"] .lore-app-art { min-height: 190px; }
  html[data-ui-mode="new"] .lore-app-content,
  html[data-ui-mode="new"] .wish-app-intro p,
  html[data-ui-mode="new"] .gambling-app-intro p { font-size: 16px; line-height: 1.7; }
  html[data-ui-mode="new"] .wish-app-oracle { min-height: 240px; }
  html[data-ui-mode="new"] .wish-app-actions { margin-top: 19px; gap: 8px; }
  html[data-ui-mode="new"] .wish-app-actions .wish-btn { min-height: 50px; font-size: 16px; }
  html[data-ui-mode="new"] .gambling-rank-card .gamble-rank-item { grid-template-columns: 37px minmax(70px, auto) minmax(0, 1fr) max-content; font-size: 13px; }
  html[data-ui-mode="new"] .gambling-pot > span { font-size: 18px; }
  html[data-ui-mode="new"] .gambling-pot strong { font-size: 24px; }
}
@media (max-width: 380px) {
  html[data-ui-mode="new"] .container { padding-inline: 10px; }
  html[data-ui-mode="new"] .account-app-header { min-height: 68px; }
  html[data-ui-mode="new"] .account-app-community-link,
  html[data-ui-mode="new"] .account-app-avatar { width: 36px; height: 36px; }
  html[data-ui-mode="new"] .account-app-identity .user-name { font-size: 23px; }
  html[data-ui-mode="new"] .shrine-secondary-links { gap: 7px; }
  html[data-ui-mode="new"] .shrine-secondary-links .shrine-module { padding-inline: 8px; }
  html[data-ui-mode="new"] .lore-app-page,
  html[data-ui-mode="new"] .wish-app-page,
  html[data-ui-mode="new"] .gambling-app-page { padding-inline: 15px; }
  html[data-ui-mode="new"] .lore-app-topline time { font-size: 17px; }
  html[data-ui-mode="new"] .lore-app-content { font-size: 15px; line-height: 1.72; }
  html[data-ui-mode="new"] .wish-app-intro p,
  html[data-ui-mode="new"] .gambling-app-intro p { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-ui-mode="new"] .shrine-module.shrine-home-primary,
  html[data-ui-mode="new"] .shrine-secondary-links .shrine-module,
  html[data-ui-mode="new"] .shrine-settings-entry button,
  html[data-ui-mode="new"] .shrine-module-progress i { transition: none; }
  html[data-ui-mode="new"] .shrine-module.shrine-home-primary:active,
  html[data-ui-mode="new"] .shrine-secondary-links .shrine-module:active,
  html[data-ui-mode="new"] .shrine-settings-entry button:active { transform: none; }
}
