:root {
  --ink: #262238;
  --muted: #706a80;
  --soft: #9d95aa;
  --line: #efeaf4;
  --paper: #fffdf9;
  --card: rgba(255, 255, 255, .92);
  --violet: #7c3aed;
  --violet-2: #a855f7;
  --rose: #ec4899;
  --gold: #d79b2b;
  --success: #15803d;
  --danger: #b91c1c;
  --shadow: 0 24px 70px rgba(61, 42, 82, .11);
  --shadow-soft: 0 14px 34px rgba(61, 42, 82, .08);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: #fffaf6; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 50% -12%, rgba(204, 164, 255, .48), transparent 34rem),
    radial-gradient(circle at 88% 18%, rgba(255, 206, 231, .36), transparent 18rem),
    radial-gradient(circle at 12% 36%, rgba(222, 238, 255, .42), transparent 22rem),
    linear-gradient(180deg, #fff 0%, #fffaf5 58%, #f8fbff 100%);
}

button, input, select, textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .72;
}

.page-shell {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 28px 28px 42px;
}

.site-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
  min-height: 44px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.brand-symbol {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  background: linear-gradient(135deg, var(--violet), var(--rose));
  box-shadow: 0 12px 24px rgba(124, 58, 237, .22);
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 12px 24px rgba(124, 58, 237, .12);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 38px;
}

.nav-links a {
  color: #5f596c;
  font-size: 14px;
  text-decoration: none;
}

.nav-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.pill, .back-link, .text-btn, .secondary-cta {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 8px 18px rgba(62, 46, 78, .05);
}

.pill {
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 800;
}

.pill-gold {
  color: #986610;
  border-color: #f3dfb4;
  background: #fff7df;
}

.back-link {
  margin-top: 34px;
  padding: 10px 17px;
  font-weight: 800;
}

.back-link:before {
  content: "< ";
}

.hero-section {
  max-width: 840px;
  margin: 126px auto 118px;
  text-align: center;
}

.eyebrow, .section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #756f82;
  font-size: 15px;
  font-weight: 700;
}

.eyebrow:before, .section-kicker:before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--violet), var(--rose));
  box-shadow: 0 0 0 5px rgba(124, 58, 237, .1);
}

.hero-section h1 {
  margin: 22px 0 22px;
  font-size: clamp(44px, 7vw, 76px);
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: 0;
  background: linear-gradient(92deg, #8b5cf6 10%, #c05cc6 52%, #ec6f9e 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy {
  max-width: 760px;
  margin: 0 auto;
  color: #696377;
  font-size: 19px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  margin-top: 34px;
  color: var(--soft);
  font-size: 14px;
}

.primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 38px;
  border-radius: 999px;
  color: #fff;
  font-size: 17px;
  font-weight: 950;
  background: linear-gradient(135deg, #9b5cf6 0%, #7c3aed 62%, #6d28d9 100%);
  box-shadow: 0 22px 42px rgba(124, 58, 237, .28), inset 0 -2px 0 rgba(27, 14, 54, .16);
}

.primary-cta.full {
  width: 100%;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: 30px;
  line-height: 1.18;
}

.text-btn, .secondary-cta {
  padding: 11px 17px;
  font-weight: 850;
}

.tools-section {
  margin-bottom: 58px;
}

.tools-grid {
  display: grid;
  gap: 18px;
}

.tools-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tool-card {
  position: relative;
  min-height: 238px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.tool-card:after {
  content: "";
  position: absolute;
  inset: auto -28px -54px auto;
  width: 126px;
  height: 126px;
  border-radius: 999px;
  background: rgba(124, 58, 237, .08);
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, .22);
  box-shadow: var(--shadow);
}

.tool-card.featured {
  min-height: 270px;
  padding: 26px;
}

.tool-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 21px;
  color: #fff;
  font-size: 24px;
  font-weight: 950;
  background: linear-gradient(135deg, #f6d6ff, #8b5cf6);
  overflow: hidden;
}

.tool-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-body {
  position: relative;
  z-index: 1;
  flex: 1;
}

.tool-body h3 {
  margin: 0 0 9px;
  font-size: 20px;
}

.tool-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.72;
}

.tool-action {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  padding: 10px 15px;
  border-radius: 999px;
  color: var(--violet);
  font-size: 14px;
  font-weight: 900;
  background: #f6f0ff;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 9px;
  margin-bottom: 16px;
}

.category-tab {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #6d6679;
  background: rgba(255, 255, 255, .82);
  font-size: 13px;
  font-weight: 800;
}

.category-tab.active {
  color: #fff;
  border-color: transparent;
  background: var(--violet);
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
  gap: 28px;
  margin-top: 20px;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
  gap: 28px;
  margin-top: 36px;
}

.result-summary,
.form-panel,
.result-detail {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--shadow-soft);
}

.result-summary {
  padding: 34px;
  height: max-content;
  position: sticky;
  top: 24px;
}

.result-summary h1 {
  margin: 14px 0 14px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.12;
}

.result-summary p,
.unlock-panel p,
.panel-title p {
  color: var(--muted);
  line-height: 1.78;
}

.form-panel,
.result-detail {
  padding: 30px;
}

.panel-title {
  margin-bottom: 24px;
}

.form-tool-name {
  margin-bottom: 10px;
  color: var(--violet);
  font-size: 17px;
  font-weight: 950;
}

.panel-title h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.form-fields {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: #413a51;
  font-size: 14px;
  font-weight: 900;
}

.field input,
.field select,
.field textarea,
.code-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: #fffdfa;
  outline: none;
  padding: 14px 16px;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.field textarea {
  min-height: 128px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.code-row input:focus {
  border-color: rgba(124, 58, 237, .42);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, .08);
}

.image-field {
  gap: 12px;
}

.image-uploader {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 148px;
  padding: 18px;
  border: 1px dashed rgba(124, 58, 237, .42);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(246, 240, 255, .88), rgba(255, 253, 250, .96));
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.image-uploader:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 58, 237, .72);
  box-shadow: 0 16px 34px rgba(61, 42, 82, .08);
}

.image-uploader input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.image-uploader-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  background: linear-gradient(135deg, var(--violet-2), var(--violet));
  box-shadow: 0 14px 24px rgba(124, 58, 237, .22);
}

.image-uploader b {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
}

.image-uploader p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.image-uploader small {
  color: var(--soft);
  font-size: 12px;
}

.image-preview {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 92px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fffdfa;
}

.image-preview.is-empty {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  color: var(--soft);
  font-size: 14px;
  border-style: dashed;
}

.image-preview img {
  width: 76px;
  height: 76px;
  border-radius: 16px;
  object-fit: cover;
}

.image-preview b,
.image-preview span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-preview b {
  font-size: 14px;
}

.image-preview span {
  margin-top: 4px;
  color: var(--soft);
  font-size: 12px;
}

.form-panel .primary-cta {
  margin-top: 22px;
}

.result-status {
  width: max-content;
  margin: 22px 0;
  padding: 10px 14px;
  border-radius: 999px;
  color: #8a5d12;
  background: #fff7db;
  font-weight: 900;
}

.result-status.unlocked {
  color: var(--success);
  background: #eaf8ef;
}

.unlock-panel {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.unlock-panel .secondary-cta {
  width: 100%;
}

.result-detail {
  display: grid;
  gap: 16px;
}

.history-page {
  margin-top: 36px;
}

.history-heading h1 {
  margin: 8px 0 0;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.15;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.history-card {
  display: grid;
  gap: 12px;
  min-height: 210px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease;
}

.history-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.history-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.history-ok,
.history-lock {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
}

.history-ok {
  color: var(--success);
  background: #eaf8ef;
}

.history-lock {
  color: #8a5d12;
  background: #fff7db;
}

.history-card h3 {
  margin: 0;
  font-size: 20px;
}

.history-card p {
  display: -webkit-box;
  min-height: 52px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.72;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.history-card time {
  color: var(--soft);
  font-size: 12px;
}

.result-block {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  overflow: hidden;
}

.result-block.locked-preview .result-text {
  max-height: 106px;
  overflow: hidden;
  filter: blur(2px);
  opacity: .58;
}

.result-block.locked-preview:after {
  content: "解锁后查看完整内容";
  position: absolute;
  inset: auto 18px 18px 18px;
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: rgba(124, 58, 237, .9);
}

.result-title {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 950;
}

.result-text {
  white-space: pre-wrap;
  color: #554d64;
  font-size: 15px;
  line-height: 1.86;
}

.mask {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
  background: rgba(36, 29, 46, .42);
  backdrop-filter: blur(8px);
}

.modal {
  position: relative;
  width: min(100%, 440px);
  padding: 26px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, .75);
  background: #fffdfa;
  box-shadow: 0 30px 80px rgba(31, 23, 39, .28);
}

.modal-close {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 34px;
  height: 34px;
  border-radius: 99px;
  color: #6d6679;
  background: #f6f1fa;
  font-size: 22px;
}

.modal-title {
  margin-bottom: 6px;
  font-size: 24px;
  font-weight: 950;
}

.modal-sub {
  margin: 0 0 20px;
  color: var(--muted);
  line-height: 1.68;
}

.native-pay-modal {
  align-items: center;
}

.personal-pay-modal {
  align-items: center;
}

.personal-pay-amount {
  margin: 8px 0 14px;
  font-size: 34px;
  font-weight: 950;
  color: var(--accent);
  text-align: center;
}

.personal-pay-qrcode {
  display: grid;
  place-items: center;
  margin: 10px auto 18px;
  width: min(78vw, 304px);
  max-width: 100%;
  min-height: min(78vw, 304px);
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  overflow: visible;
}

.personal-pay-qrcode img {
  display: block;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
  object-fit: contain;
}

.wechat-pay-qr-box {
  gap: 10px;
  -webkit-touch-callout: default;
  -webkit-user-select: auto;
  user-select: auto;
  touch-action: auto;
}

.wechat-pay-qr-image {
  border-radius: 0;
  background: #fff;
  -webkit-touch-callout: default;
  -webkit-user-select: auto;
  user-select: auto;
  pointer-events: auto;
}

.wechat-pay-qr-tip {
  color: #8a5618;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.wechat-pay-preview-btn {
  width: 100%;
  max-width: 240px;
  min-height: 42px;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), #9a421d);
  box-shadow: 0 10px 24px rgba(154, 66, 29, .18);
}

.native-pay-qrcode {
  display: grid;
  place-items: center;
  margin: 10px auto 18px;
  width: 268px;
  max-width: 100%;
  aspect-ratio: 1;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
}

.native-pay-qrcode img {
  width: 240px;
  max-width: calc(100% - 28px);
  aspect-ratio: 1;
  object-fit: contain;
}

.native-pay-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.point-balance-line {
  margin: 0 0 10px;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(189, 134, 36, .09);
  color: #8a5618;
  font-size: 13px;
  line-height: 1.5;
}

.point-recharge-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.native-pay-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.native-pay-order {
  margin: 14px 0 0;
  color: var(--soft);
  font-size: 12px;
  text-align: center;
  word-break: break-all;
}

.recommended-products {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--shadow-soft);
}

.recommended-products-body {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.shop-product-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(139, 98, 48, .18);
  border-radius: 16px;
  background: rgba(255, 252, 245, .78);
}

.shop-product-main {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
}

.shop-product-image,
.shop-buy-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: #fff;
}

.shop-product-image {
  width: 96px;
  aspect-ratio: 1;
}

.shop-product-image img,
.shop-buy-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-product-info {
  min-width: 0;
}

.shop-product-info h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.shop-recommend-text {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(191, 139, 55, .1);
  color: #6f4b1d;
  font-size: 13px;
  line-height: 1.55;
}

.shop-product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.shop-product-foot b {
  flex: 0 0 auto;
  color: var(--danger);
  font-size: 18px;
}

.shop-product-actions {
  display: flex;
  min-width: 0;
  gap: 6px;
  margin-left: auto;
}

.shop-product-actions .secondary-cta,
.shop-product-actions .primary-cta {
  display: inline-flex;
  height: 38px;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.shop-product-actions .secondary-cta {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255, 252, 245, .96);
}

.shop-product-actions .primary-cta {
  border-color: #99491f;
  color: #fff;
  background: #99491f;
}

.shop-recommend-loading,
.shop-recommend-empty {
  padding: 20px 10px;
  color: var(--muted);
  text-align: center;
}

.shop-buy-modal,
.shop-pay-modal {
  align-items: flex-end;
}

.shop-buy-panel,
.shop-pay-card {
  width: min(560px, 100%);
}

.shop-buy-product {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  margin: 12px 0 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 252, 245, .8);
}

.shop-buy-cover {
  width: 84px;
  aspect-ratio: 1;
}

.shop-buy-product h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.shop-buy-product p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.shop-buy-product b {
  color: var(--danger);
  font-size: 18px;
}

.shop-rich-detail {
  max-height: min(42vh, 420px);
  overflow: auto;
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .82);
  color: var(--text);
  line-height: 1.75;
  font-size: 14px;
}

.shop-rich-detail p {
  margin: 0 0 10px;
}

.shop-rich-detail h2,
.shop-rich-detail h3 {
  margin: 14px 0 8px;
  line-height: 1.35;
}

.shop-rich-detail ul {
  margin: 8px 0 12px;
  padding-left: 20px;
}

.shop-rich-detail blockquote {
  margin: 10px 0;
  padding: 8px 12px;
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  background: rgba(184, 134, 11, .08);
}

.shop-rich-detail img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 12px auto;
  border-radius: 14px;
}

.shop-product-detail-page,
.shop-checkout-page {
  max-width: 980px;
  margin: 0 auto;
}

.shop-product-detail-page {
  padding-bottom: 96px;
}

.shop-product-detail-page > .back-link,
.shop-checkout-page > .back-link {
  margin: 0 0 16px;
}

.shop-product-detail-hero {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr);
  gap: 26px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 252, 245, .9);
  box-shadow: var(--shadow-soft);
}

.shop-product-detail-image {
  display: flex;
  min-height: 300px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
}

.shop-product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-product-detail-summary h1 {
  margin: 8px 0 12px;
  font-size: 28px;
  line-height: 1.35;
}

.shop-product-detail-summary p {
  margin: 0 0 16px;
  color: var(--muted);
}

.shop-product-detail-summary b {
  display: block;
  margin-bottom: 18px;
  color: var(--danger);
  font-size: 28px;
}

.shop-product-detail-content {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 252, 245, .9);
  box-shadow: var(--shadow-soft);
}

.shop-product-detail-content h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.shop-product-detail-content .shop-rich-detail {
  max-height: none;
  margin: 0;
}

.shop-product-buy-float {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  width: min(calc(100vw - 32px), 520px);
  transform: translateX(-50%);
  box-shadow: 0 10px 28px rgba(91, 47, 16, .26);
}

.shop-back-to-top {
  position: fixed;
  z-index: 31;
  right: max(14px, calc((100vw - 980px) / 2));
  bottom: max(82px, calc(env(safe-area-inset-bottom) + 68px));
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 252, 245, .94);
  box-shadow: var(--shadow-soft);
  font-size: 22px;
  cursor: pointer;
}

.shop-checkout-product {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 252, 245, .84);
}

.shop-checkout-product h2 {
  margin: 0 0 8px;
  font-size: 17px;
}

.shop-checkout-product b {
  color: var(--danger);
  font-size: 18px;
}

.shop-checkout-panel {
  max-width: 760px;
}

.shop-address-panel {
  display: grid;
  gap: 10px;
  margin: 8px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 252, 245, .7);
}

.shop-address-head,
.shop-address-head > div,
.shop-area-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shop-address-head {
  justify-content: space-between;
}

.shop-address-head b {
  font-size: 16px;
}

.shop-area-input input {
  min-width: 0;
  flex: 1;
}

.shop-area-input .secondary-cta {
  flex: 0 0 auto;
  white-space: nowrap;
}

.shop-orders-page {
  max-width: 980px;
  margin: 0 auto;
}

.shop-orders-list {
  display: grid;
  gap: 14px;
}

.shop-order-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow-soft);
}

.shop-order-head,
.shop-order-foot,
.shop-order-detail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shop-order-head b {
  display: block;
  font-size: 15px;
}

.shop-order-head span,
.shop-order-foot span {
  color: var(--muted);
  font-size: 12px;
}

.shop-order-head em {
  flex-shrink: 0;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--accent);
  background: rgba(244, 215, 122, .25);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.shop-order-items {
  margin: 12px 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
}

.shop-order-detail-box {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 252, 245, .78);
}

.shop-order-detail-total {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--danger);
  font-weight: 900;
  text-align: right;
}

.shop-logistics-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(248, 251, 255, .86);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.shop-logistics-list strong {
  color: var(--ink);
}

.shop-logistics-list time {
  display: block;
  color: var(--soft);
  font-size: 12px;
}

.shop-logistics-list p {
  margin: 3px 0 0;
  color: var(--muted);
}

.poster-modal {
  align-items: center;
}

.poster-preview-modal {
  width: min(100%, 520px);
}

.poster-preview-image {
  display: grid;
  place-items: center;
  max-height: min(58vh, 620px);
  margin: 10px 0 18px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8f4fb;
}

.poster-preview-image img {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  object-fit: contain;
}

.poster-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.share-reward-note {
  margin: 12px 0 14px;
  color: #7a6d55;
  font-size: 13px;
  line-height: 1.7;
  background: #fff8df;
  border: 1px solid #f1dfaa;
  border-radius: 14px;
  padding: 10px 12px;
}

.code-row {
  display: flex;
  gap: 10px;
}

.profile-mini-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(124, 58, 237, .12);
  border-radius: 22px;
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--shadow-soft);
}

.profile-service-panel {
  margin-top: 14px;
}

.profile-referral-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 252, 245, .92);
  box-shadow: var(--shadow-soft);
}

.profile-referral-heading,
.profile-referral-row,
.profile-referral-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-referral-heading h2 {
  margin: 4px 0 0;
  font-size: 20px;
}

.profile-referral-heading > b {
  color: var(--accent);
  font-size: 20px;
}

.profile-referral-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-referral-metrics span {
  display: grid;
  gap: 4px;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.62);
}

.profile-referral-metrics b {
  color: var(--ink);
  font-size: 17px;
}

.profile-referral-list {
  border-top: 1px solid var(--line);
}

.profile-referral-row {
  min-height: 56px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.profile-referral-row div {
  display: grid;
  gap: 4px;
}

.profile-referral-row small,
.profile-referral-empty,
.profile-referral-pagination span {
  color: var(--muted);
  font-size: 12px;
}

.profile-referral-row > span {
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}

.profile-referral-empty {
  margin: 14px 0 2px;
  line-height: 1.7;
}

.profile-referral-pagination button {
  min-width: 62px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255,255,255,.72);
}

.profile-referral-pagination button:disabled {
  opacity: .45;
}

.profile-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.code-row input {
  flex: 1;
}

.code-row button {
  min-width: 86px;
  border-radius: 16px;
  color: var(--violet);
  background: #f3eafe;
  font-weight: 900;
}

.code-row button:disabled {
  color: #9a88b8;
  background: #eee8f7;
  cursor: not-allowed;
  opacity: .86;
  box-shadow: none;
}

.code-row button.is-sent {
  min-width: 126px;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px 64px;
  gap: 8px;
  align-items: center;
}

.captcha-row input {
  min-width: 0;
}

.captcha-row img {
  width: 112px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  object-fit: cover;
}

.captcha-row button {
  height: 42px;
  border-radius: 14px;
  color: var(--violet);
  background: #f3eafe;
  font-size: 12px;
  font-weight: 900;
}

.form-error {
  min-height: 20px;
  margin-top: 12px;
  color: var(--danger);
  font-size: 13px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 60;
  transform: translate(-50%, 20px);
  padding: 12px 17px;
  border-radius: 999px;
  color: #fff;
  background: rgba(38, 34, 56, .9);
  box-shadow: 0 14px 30px rgba(31, 23, 39, .22);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.loading-state,
.empty-state {
  width: 100%;
  padding: 44px 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, .8);
  box-shadow: var(--shadow-soft);
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid rgba(239, 234, 244, .8);
  color: var(--soft);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 1080px) {
  .tools-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .result-layout { grid-template-columns: 1fr; }
  .history-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-summary { position: static; }
}

@media (max-width: 760px) {
  body {
    background:
      radial-gradient(circle at 50% -8%, rgba(204, 164, 255, .5), transparent 24rem),
      linear-gradient(180deg, #fff 0%, #fffaf6 70%, #f8fbff 100%);
  }

  .page-shell {
    padding: 16px 14px 28px;
  }

  .site-nav {
    grid-template-columns: 1fr auto;
    min-height: 40px;
  }

  .brand-symbol {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 14px;
  }

  .brand-logo {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }

  .nav-links {
    display: none;
  }

  .nav-actions {
    gap: 8px;
  }

  .pill {
    padding: 7px 12px;
    font-size: 13px;
  }

  .pill-gold {
    display: none;
  }

  .back-link {
    margin-top: 20px;
  }

  .hero-section {
    margin: 58px auto 44px;
  }

  .eyebrow {
    font-size: 13px;
  }

  .hero-section h1 {
    margin: 14px 0 14px;
    font-size: clamp(34px, 12vw, 46px);
  }

  .hero-copy {
    font-size: 15px;
    line-height: 1.75;
  }

  .hero-actions {
    margin-top: 22px;
  }

  .primary-cta {
    width: 100%;
    min-height: 52px;
    padding: 0 22px;
    font-size: 16px;
  }

  .section-heading {
    display: block;
    margin-bottom: 16px;
  }

  .section-heading h2 {
    font-size: 24px;
  }

  .text-btn {
    display: none;
  }

  .tools-section {
    margin-bottom: 34px;
  }

  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .tool-card,
  .tool-card.featured {
    min-height: 178px;
    padding: 16px;
    border-radius: 22px;
    gap: 12px;
  }

  .tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 19px;
  }

  .tool-body h3 {
    font-size: 16px;
    margin-bottom: 6px;
  }

  .tool-body p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .tool-action {
    padding: 8px 11px;
    font-size: 12px;
  }

  .category-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    margin: 14px -14px 0;
    padding: 0 14px 4px;
  }

  .category-tab {
    white-space: nowrap;
  }

  .form-layout,
  .result-layout {
    gap: 16px;
    margin-top: 18px;
  }

  .history-page {
    margin-top: 18px;
  }

  .history-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .history-card {
    min-height: auto;
    padding: 18px;
    border-radius: 22px;
  }

  .result-summary,
  .form-panel,
  .result-detail {
    border-radius: 24px;
  }

  .result-summary {
    padding: 22px;
  }

  .result-summary h1 {
    font-size: 32px;
  }

  .form-panel,
  .result-detail {
    padding: 18px;
  }

  .image-uploader {
    grid-template-columns: 48px minmax(0, 1fr);
    min-height: 132px;
    padding: 15px;
    border-radius: 20px;
  }

  .image-uploader-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    font-size: 28px;
  }

  .image-uploader b {
    font-size: 16px;
  }

  .image-uploader p {
    font-size: 13px;
  }

  .image-preview {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .image-preview img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
  }

  .panel-title h2 {
    font-size: 22px;
  }

  .field input,
  .field select,
  .field textarea,
  .code-row input {
    border-radius: 16px;
    padding: 13px 14px;
  }

  .result-block {
    padding: 18px;
    border-radius: 20px;
  }

  .result-text {
    font-size: 14px;
  }

  .mask {
    padding: 12px;
  }

  .modal {
    padding: 22px;
    border-radius: 26px;
  }

  .site-footer {
    flex-direction: column;
    gap: 8px;
    margin-top: 34px;
  }
}

@media (max-width: 390px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
}

/* H5 theme pack: 1 典籍国学、2 星盘观测、4 翡翠罗盘 */
body.theme-imperial-archive,
body.theme-observatory-master,
body.theme-jade-compass {
  --radius-lg: 18px;
  --radius-md: 12px;
}

body.theme-imperial-archive {
  --ink: #22180f;
  --muted: #6f604d;
  --soft: #9a8870;
  --line: rgba(139, 98, 48, .2);
  --paper: #fbf3e3;
  --card: rgba(255, 250, 239, .91);
  --violet: #9b6a23;
  --violet-2: #b98232;
  --rose: #a73522;
  --gold: #b78533;
  --success: #2f7a45;
  --shadow: 0 24px 60px rgba(75, 49, 22, .14);
  --shadow-soft: 0 12px 28px rgba(75, 49, 22, .1);
  background:
    linear-gradient(90deg, rgba(116, 75, 32, .055) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(180deg, rgba(116, 75, 32, .04) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(180deg, #fff8ea 0%, #f7ebd1 54%, #efe1c2 100%);
}

body.theme-observatory-master {
  --ink: #f7e7b6;
  --muted: #a8b5c8;
  --soft: #6f83a1;
  --line: rgba(207, 166, 90, .32);
  --paper: #071326;
  --card: rgba(8, 23, 43, .88);
  --violet: #cfa65a;
  --violet-2: #f2c56f;
  --rose: #67d6ff;
  --gold: #d9b168;
  --success: #75d7a4;
  --shadow: 0 24px 64px rgba(0, 4, 16, .36);
  --shadow-soft: 0 16px 34px rgba(0, 4, 16, .28);
  background:
    radial-gradient(circle at 18% 18%, rgba(242, 197, 111, .12) 1px, transparent 2px) 0 0 / 46px 46px,
    linear-gradient(112deg, transparent 0 47%, rgba(207, 166, 90, .12) 48% 49%, transparent 50% 100%),
    linear-gradient(180deg, #071226 0%, #06182d 52%, #03101f 100%);
}

body.theme-jade-compass {
  --ink: #f4df9b;
  --muted: #b4c3aa;
  --soft: #77917e;
  --line: rgba(216, 176, 87, .34);
  --paper: #061d18;
  --card: rgba(8, 48, 38, .87);
  --violet: #d8b057;
  --violet-2: #f0cb70;
  --rose: #78caa0;
  --gold: #e0b85d;
  --success: #8ee0ad;
  --shadow: 0 24px 64px rgba(0, 22, 15, .36);
  --shadow-soft: 0 16px 34px rgba(0, 22, 15, .28);
  background:
    repeating-linear-gradient(90deg, rgba(216, 176, 87, .05) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(0deg, rgba(216, 176, 87, .04) 0 1px, transparent 1px 42px),
    linear-gradient(180deg, #083026 0%, #061f19 56%, #041711 100%);
}

.theme-imperial-archive .page-shell,
.theme-observatory-master .page-shell,
.theme-jade-compass .page-shell {
  position: relative;
  isolation: isolate;
}

.theme-imperial-archive .page-shell:before,
.theme-observatory-master .page-shell:before,
.theme-jade-compass .page-shell:before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.theme-imperial-archive .page-shell:before {
  background:
    linear-gradient(135deg, transparent 0 64%, rgba(139, 98, 48, .08) 64.2% 64.8%, transparent 65%),
    repeating-linear-gradient(90deg, transparent 0 64px, rgba(139, 98, 48, .045) 64px 66px, transparent 66px 132px);
}

.theme-observatory-master .page-shell:before {
  background:
    repeating-radial-gradient(circle at 82% 10%, rgba(207, 166, 90, .22) 0 1px, transparent 1px 18px),
    linear-gradient(28deg, transparent 0 46%, rgba(103, 214, 255, .12) 46.2% 46.8%, transparent 47% 100%);
}

.theme-jade-compass .page-shell:before {
  background:
    repeating-radial-gradient(circle at 88% 12%, rgba(216, 176, 87, .2) 0 1px, transparent 1px 16px),
    linear-gradient(144deg, transparent 0 54%, rgba(216, 176, 87, .11) 54.2% 54.8%, transparent 55% 100%);
}

.theme-imperial-archive .brand-symbol,
.theme-observatory-master .brand-symbol,
.theme-jade-compass .brand-symbol {
  border-radius: 10px;
  color: var(--paper);
  background: var(--gold);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .18);
}

.theme-imperial-archive .brand-symbol {
  color: #fff6df;
  background: #a73522;
}

.theme-observatory-master .brand-symbol {
  color: #071326;
  background: linear-gradient(135deg, #f2c56f, #a87529);
}

.theme-jade-compass .brand-symbol {
  color: #082219;
  background: linear-gradient(135deg, #f0cb70, #9d7227);
}

.theme-imperial-archive .brand-mark,
.theme-imperial-archive .nav-links a,
.theme-imperial-archive .pill,
.theme-imperial-archive .back-link,
.theme-imperial-archive .secondary-cta,
.theme-imperial-archive .text-btn {
  color: #2a1a0f;
}

.theme-observatory-master .brand-mark,
.theme-observatory-master .nav-links a,
.theme-observatory-master .pill,
.theme-observatory-master .back-link,
.theme-observatory-master .secondary-cta,
.theme-observatory-master .text-btn,
.theme-jade-compass .brand-mark,
.theme-jade-compass .nav-links a,
.theme-jade-compass .pill,
.theme-jade-compass .back-link,
.theme-jade-compass .secondary-cta,
.theme-jade-compass .text-btn {
  color: var(--ink);
}

.theme-imperial-archive .pill,
.theme-imperial-archive .back-link,
.theme-imperial-archive .secondary-cta,
.theme-imperial-archive .text-btn,
.theme-imperial-archive .category-tab {
  background: rgba(255, 247, 229, .88);
  border-color: rgba(139, 98, 48, .22);
}

.theme-observatory-master .pill,
.theme-observatory-master .back-link,
.theme-observatory-master .secondary-cta,
.theme-observatory-master .text-btn,
.theme-observatory-master .category-tab,
.theme-jade-compass .pill,
.theme-jade-compass .back-link,
.theme-jade-compass .secondary-cta,
.theme-jade-compass .text-btn,
.theme-jade-compass .category-tab {
  background: rgba(255, 255, 255, .06);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), var(--shadow-soft);
}

.theme-imperial-archive .eyebrow,
.theme-imperial-archive .section-kicker,
.theme-observatory-master .eyebrow,
.theme-observatory-master .section-kicker,
.theme-jade-compass .eyebrow,
.theme-jade-compass .section-kicker {
  color: var(--muted);
}

.theme-imperial-archive .eyebrow:before,
.theme-imperial-archive .section-kicker:before {
  border-radius: 2px;
  background: #a73522;
  box-shadow: 0 0 0 4px rgba(167, 53, 34, .12);
}

.theme-observatory-master .eyebrow:before,
.theme-observatory-master .section-kicker:before,
.theme-jade-compass .eyebrow:before,
.theme-jade-compass .section-kicker:before {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(216, 176, 87, .13);
}

.theme-imperial-archive .hero-section h1 {
  color: #2b1b0e;
  background: none;
  font-family: "STKaiti", "KaiTi", "FangSong", "Microsoft YaHei", serif;
}

.theme-observatory-master .hero-section h1 {
  color: transparent;
  background: linear-gradient(96deg, #fff0bd 0%, #d9b168 48%, #83d9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.theme-jade-compass .hero-section h1 {
  color: transparent;
  background: linear-gradient(96deg, #f9df8a 0%, #d8b057 46%, #9ae0b4 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.theme-imperial-archive .hero-copy,
.theme-imperial-archive .tool-body p,
.theme-imperial-archive .result-summary p,
.theme-imperial-archive .unlock-panel p,
.theme-imperial-archive .panel-title p,
.theme-imperial-archive .result-text {
  color: #6a5842;
}

.theme-observatory-master .hero-copy,
.theme-observatory-master .tool-body p,
.theme-observatory-master .result-summary p,
.theme-observatory-master .unlock-panel p,
.theme-observatory-master .panel-title p,
.theme-observatory-master .result-text,
.theme-jade-compass .hero-copy,
.theme-jade-compass .tool-body p,
.theme-jade-compass .result-summary p,
.theme-jade-compass .unlock-panel p,
.theme-jade-compass .panel-title p,
.theme-jade-compass .result-text {
  color: var(--muted);
}

.theme-imperial-archive .primary-cta {
  color: #fff8e8;
  background: linear-gradient(135deg, #ba842c 0%, #9b5d20 52%, #7a371f 100%);
  box-shadow: 0 18px 34px rgba(111, 68, 22, .24), inset 0 0 0 1px rgba(255, 241, 201, .18);
}

.theme-observatory-master .primary-cta {
  color: #081326;
  background: linear-gradient(135deg, #f2d38b 0%, #d1a04f 56%, #9c6728 100%);
  box-shadow: 0 20px 40px rgba(207, 166, 90, .24), inset 0 0 0 1px rgba(255, 244, 204, .28);
}

.theme-jade-compass .primary-cta {
  color: #061d18;
  background: linear-gradient(135deg, #f3d780 0%, #d8b057 54%, #9d7227 100%);
  box-shadow: 0 20px 40px rgba(216, 176, 87, .23), inset 0 0 0 1px rgba(255, 244, 204, .26);
}

.theme-imperial-archive .tool-card,
.theme-imperial-archive .result-summary,
.theme-imperial-archive .form-panel,
.theme-imperial-archive .result-detail,
.theme-imperial-archive .history-card,
.theme-imperial-archive .result-block,
.theme-imperial-archive .modal,
.theme-imperial-archive .loading-state,
.theme-imperial-archive .empty-state {
  border-radius: var(--radius-lg);
  border-color: rgba(139, 98, 48, .22);
  background:
    linear-gradient(90deg, rgba(139, 98, 48, .05) 1px, transparent 1px) 0 0 / 22px 22px,
    rgba(255, 250, 239, .94);
  box-shadow: var(--shadow-soft);
}

.theme-observatory-master .tool-card,
.theme-observatory-master .result-summary,
.theme-observatory-master .form-panel,
.theme-observatory-master .result-detail,
.theme-observatory-master .history-card,
.theme-observatory-master .result-block,
.theme-observatory-master .modal,
.theme-observatory-master .loading-state,
.theme-observatory-master .empty-state,
.theme-jade-compass .tool-card,
.theme-jade-compass .result-summary,
.theme-jade-compass .form-panel,
.theme-jade-compass .result-detail,
.theme-jade-compass .history-card,
.theme-jade-compass .result-block,
.theme-jade-compass .modal,
.theme-jade-compass .loading-state,
.theme-jade-compass .empty-state {
  border-radius: var(--radius-lg);
  border-color: var(--line);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.theme-observatory-master .tool-card,
.theme-observatory-master .result-block {
  background:
    linear-gradient(118deg, rgba(207, 166, 90, .12), transparent 34%),
    rgba(8, 23, 43, .9);
}

.theme-jade-compass .tool-card,
.theme-jade-compass .result-block {
  background:
    linear-gradient(118deg, rgba(216, 176, 87, .12), transparent 34%),
    rgba(8, 48, 38, .9);
}

.theme-imperial-archive .tool-card:after,
.theme-observatory-master .tool-card:after,
.theme-jade-compass .tool-card:after {
  inset: auto 12px 12px auto;
  width: 88px;
  height: 88px;
  border-radius: 0;
  opacity: .25;
  background:
    linear-gradient(90deg, currentColor 1px, transparent 1px) 0 0 / 11px 11px,
    linear-gradient(0deg, currentColor 1px, transparent 1px) 0 0 / 11px 11px;
}

.theme-imperial-archive .tool-card:after { color: #b78533; }
.theme-observatory-master .tool-card:after { color: #d9b168; opacity: .18; }
.theme-jade-compass .tool-card:after { color: #d8b057; opacity: .18; }

.theme-imperial-archive .tool-body h3,
.theme-imperial-archive .panel-title h2,
.theme-imperial-archive .result-summary h1,
.theme-imperial-archive .result-title,
.theme-imperial-archive .history-card h3 {
  color: #25170d;
}

.theme-observatory-master .tool-body h3,
.theme-observatory-master .panel-title h2,
.theme-observatory-master .result-summary h1,
.theme-observatory-master .result-title,
.theme-observatory-master .history-card h3,
.theme-jade-compass .tool-body h3,
.theme-jade-compass .panel-title h2,
.theme-jade-compass .result-summary h1,
.theme-jade-compass .result-title,
.theme-jade-compass .history-card h3 {
  color: var(--ink);
}

.theme-imperial-archive .category-tab.active,
.theme-observatory-master .category-tab.active,
.theme-jade-compass .category-tab.active {
  color: var(--paper);
  border-color: transparent;
  background: var(--gold);
}

.theme-observatory-master .category-tab.active,
.theme-jade-compass .category-tab.active {
  color: #071326;
}

.theme-imperial-archive .tool-action {
  color: #8f4e1c;
  background: #f5e3bd;
}

.theme-observatory-master .tool-action,
.theme-jade-compass .tool-action {
  color: #061326;
  background: var(--gold);
}

.tool-icon {
  position: relative;
  border: 1px solid transparent;
}

.tool-icon .icon-orbit,
.tool-icon .icon-glyph {
  position: relative;
  z-index: 1;
}

.tool-icon .icon-orbit {
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  pointer-events: none;
}

.tool-icon .icon-glyph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-weight: 950;
}

.theme-imperial-archive .tool-icon {
  border-radius: 12px;
  color: #8d3b20;
  border-color: rgba(167, 53, 34, .32);
  background:
    linear-gradient(90deg, rgba(167, 53, 34, .08) 1px, transparent 1px) 0 0 / 9px 9px,
    #f8ead0;
  box-shadow: inset 0 0 0 2px rgba(255, 250, 239, .72);
}

.theme-imperial-archive .tool-icon .icon-orbit {
  border: 1px solid rgba(167, 53, 34, .22);
  border-radius: 4px;
}

.theme-observatory-master .tool-icon {
  color: #f9d98b;
  border-color: rgba(207, 166, 90, .58);
  background:
    conic-gradient(from 20deg, rgba(207, 166, 90, .36), rgba(103, 214, 255, .16), rgba(207, 166, 90, .36)),
    #0b1a2e;
}

.theme-observatory-master .tool-icon .icon-orbit {
  border: 1px solid rgba(249, 217, 139, .5);
  box-shadow: inset 0 0 0 7px rgba(207, 166, 90, .08);
}

.theme-jade-compass .tool-icon {
  color: #f4d77a;
  border-color: rgba(216, 176, 87, .58);
  background:
    repeating-conic-gradient(from 0deg, rgba(216, 176, 87, .3) 0 8deg, rgba(120, 202, 160, .14) 8deg 16deg),
    #0b382d;
}

.theme-jade-compass .tool-icon .icon-orbit {
  border: 1px solid rgba(244, 215, 122, .48);
  box-shadow: inset 0 0 0 6px rgba(216, 176, 87, .08);
}

.tool-icon-palm-gold,
.tool-icon-face-gold {
  background:
    radial-gradient(circle at 36% 28%, rgba(255,255,255,.92), transparent 0 6px),
    linear-gradient(145deg, #f9e1a4, #9b6221 72%) !important;
  box-shadow: inset 0 0 0 1px rgba(132,83,28,.24), 0 10px 24px rgba(132,83,28,.2) !important;
}

.tool-icon-palm-star,
.tool-icon-face-star {
  background:
    radial-gradient(circle at 68% 24%, rgba(246,213,123,.95), transparent 0 5px),
    radial-gradient(circle at 32% 70%, rgba(94,234,212,.32), transparent 0 12px),
    linear-gradient(145deg, #171f48, #5c3577) !important;
  box-shadow: inset 0 0 0 1px rgba(222,196,124,.32), 0 12px 28px rgba(23,31,72,.24) !important;
}

.tool-icon-palm-jade,
.tool-icon-face-jade {
  background:
    radial-gradient(circle at 36% 30%, rgba(255,255,255,.88), transparent 0 7px),
    linear-gradient(145deg, #b7ead4, #0f7c67 74%) !important;
  box-shadow: inset 0 0 0 1px rgba(15,124,103,.25), 0 12px 26px rgba(15,124,103,.2) !important;
}

.theme-imperial-archive .field input,
.theme-imperial-archive .field select,
.theme-imperial-archive .field textarea,
.theme-imperial-archive .code-row input,
.theme-imperial-archive .image-preview {
  color: #22180f;
  background: #fff9ec;
  border-color: rgba(139, 98, 48, .24);
}

.theme-observatory-master .field input,
.theme-observatory-master .field select,
.theme-observatory-master .field textarea,
.theme-observatory-master .code-row input,
.theme-observatory-master .image-preview,
.theme-jade-compass .field input,
.theme-jade-compass .field select,
.theme-jade-compass .field textarea,
.theme-jade-compass .code-row input,
.theme-jade-compass .image-preview {
  color: var(--ink);
  background: rgba(255, 255, 255, .06);
  border-color: var(--line);
}

.theme-observatory-master .field span,
.theme-jade-compass .field span {
  color: var(--ink);
}

.theme-observatory-master .field input::placeholder,
.theme-observatory-master .field textarea::placeholder,
.theme-jade-compass .field input::placeholder,
.theme-jade-compass .field textarea::placeholder {
  color: rgba(218, 226, 236, .42);
}

.theme-imperial-archive .image-uploader {
  background: #fff5df;
  border-color: rgba(139, 98, 48, .35);
}

.theme-observatory-master .image-uploader,
.theme-jade-compass .image-uploader {
  background: rgba(255, 255, 255, .05);
  border-color: var(--line);
}

.theme-imperial-archive .image-uploader-icon {
  background: linear-gradient(135deg, #ba842c, #8d3b20);
}

.theme-observatory-master .image-uploader-icon,
.theme-jade-compass .image-uploader-icon {
  color: #071326;
  background: var(--gold);
}

.theme-observatory-master .modal-close,
.theme-jade-compass .modal-close {
  color: var(--ink);
  background: rgba(255, 255, 255, .08);
}

.theme-observatory-master .poster-preview-image,
.theme-jade-compass .poster-preview-image {
  background: rgba(255, 255, 255, .05);
  border-color: var(--line);
}

.theme-imperial-archive .site-footer {
  border-color: rgba(139, 98, 48, .18);
  color: #907b60;
}

.theme-observatory-master .site-footer,
.theme-jade-compass .site-footer {
  border-color: var(--line);
  color: var(--soft);
}

@media (max-width: 760px) {
  body.theme-imperial-archive {
    background:
      linear-gradient(90deg, rgba(116, 75, 32, .055) 1px, transparent 1px) 0 0 / 24px 24px,
      linear-gradient(180deg, #fff8ea 0%, #f7ebd1 70%, #efe1c2 100%);
  }

  body.theme-observatory-master {
    background:
      radial-gradient(circle at 18% 18%, rgba(242, 197, 111, .13) 1px, transparent 2px) 0 0 / 42px 42px,
      linear-gradient(180deg, #071226 0%, #06182d 70%, #03101f 100%);
  }

  body.theme-jade-compass {
    background:
      repeating-linear-gradient(90deg, rgba(216, 176, 87, .05) 0 1px, transparent 1px 36px),
      linear-gradient(180deg, #083026 0%, #061f19 70%, #041711 100%);
  }

  .theme-imperial-archive .hero-section,
  .theme-observatory-master .hero-section,
  .theme-jade-compass .hero-section {
    margin-top: 52px;
  }
}

/* 照片测算入口与按分享类型定向的落地页 */
.image-entry-hero {
  max-width: 960px;
  margin: 54px auto 58px;
}

.image-entry-heading {
  max-width: 620px;
  margin: 0 auto 26px;
  text-align: center;
}

.image-entry-heading h1 {
  margin: 12px 0 10px;
  color: #2d1d10;
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: 42px;
  line-height: 1.16;
  letter-spacing: 0;
}

.image-entry-heading p {
  margin: 0;
  color: #776854;
  font-size: 16px;
  line-height: 1.7;
}

.image-entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.image-entry-card {
  overflow: hidden;
  border: 1px solid rgba(182, 138, 68, .3);
  border-radius: 8px;
  background: rgba(255, 251, 240, .92);
  box-shadow: 0 16px 34px rgba(86, 54, 20, .11);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.image-entry-card:hover {
  border-color: rgba(156, 59, 34, .72);
  box-shadow: 0 20px 38px rgba(86, 54, 20, .17);
  transform: translateY(-3px);
}

.image-entry-card-image,
.share-target-example {
  position: relative;
  overflow: hidden;
  background: #ecdec4;
}

.image-entry-card-image img,
.share-target-example img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.image-entry-card-image span,
.share-target-example span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 8px;
  border-radius: 4px;
  color: #fff6e7;
  background: rgba(69, 47, 26, .8);
  font-size: 12px;
  font-weight: 700;
}

.image-entry-card-body {
  padding: 17px 18px 18px;
}

.image-entry-card-body h2,
.share-target-card-copy h2 {
  margin: 0 0 7px;
  color: #2d1d10;
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: 0;
}

.image-entry-card-body p,
.share-target-card-copy p {
  min-height: 40px;
  margin: 0;
  color: #776854;
  font-size: 14px;
  line-height: 1.55;
}

.image-entry-card-cta {
  width: 100%;
  margin-top: 15px;
  padding: 11px 14px;
  border-radius: 5px;
  color: #fff8ed;
  background: #9d3d25;
  font-weight: 800;
}

.share-target-landing {
  width: min(100%, 540px);
  margin: 30px auto 54px;
  padding: 26px;
  border: 1px solid rgba(182, 138, 68, .31);
  border-radius: 8px;
  background: rgba(255, 251, 240, .94);
  box-shadow: 0 18px 42px rgba(86, 54, 20, .12);
}

.share-target-tip {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid rgba(191, 142, 67, .35);
  border-radius: 6px;
  color: #70563d;
  background: rgba(255, 248, 232, .88);
  font-size: 13px;
  line-height: 1.55;
}

.share-target-tip strong,
.share-target-tip b {
  color: #9a3b24;
}

.share-target-tip-mark {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 6px;
  color: #fff7e9;
  background: #a84328;
  font-size: 13px;
  font-weight: 800;
}

.share-target-kicker {
  margin-top: 22px;
  color: #a6462a;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
}

.share-target-title {
  overflow: hidden;
  margin: 8px 0 8px;
  color: #2c1d10;
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: 32px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-target-copy {
  margin: 0;
  color: #776854;
  font-size: 14px;
  line-height: 1.65;
}

.share-target-example,
.share-target-glyph {
  margin-top: 18px;
  border: 1px solid rgba(182, 138, 68, .3);
  border-radius: 7px;
}

.share-target-example img {
  aspect-ratio: 4 / 3;
}

.share-target-glyph {
  display: grid;
  min-height: 170px;
  place-items: center;
  background: #f9edd8;
}

.share-target-glyph .tool-icon {
  transform: scale(1.45);
}

.share-target-card-copy {
  padding: 15px 2px 0;
}

.share-target-cta {
  width: 100%;
  min-height: 52px;
  margin-top: 17px;
  border-radius: 6px;
  background: #9d3d25;
  box-shadow: 0 12px 24px rgba(122, 55, 28, .23);
}

.share-target-privacy {
  margin: 10px 0 0;
  color: #947f62;
  text-align: center;
  font-size: 12px;
}

@media (max-width: 760px) {
  .image-entry-hero {
    margin: 34px auto 38px;
  }

  .image-entry-heading {
    margin-bottom: 18px;
  }

  .image-entry-heading h1 {
    margin: 9px 0 8px;
    font-size: 28px;
  }

  .image-entry-heading p {
    font-size: 14px;
  }

  .image-entry-grid {
    gap: 12px;
  }

  .image-entry-card-body {
    padding: 13px;
  }

  .image-entry-card-body h2 {
    font-size: 19px;
  }

  .image-entry-card-body p {
    min-height: 56px;
    font-size: 12px;
  }

  .image-entry-card-cta {
    margin-top: 10px;
    padding: 10px 7px;
    font-size: 12px;
  }

  .share-target-landing {
    margin: 20px auto 34px;
    padding: 18px 14px 20px;
  }

  .share-target-title {
    font-size: 24px;
  }

  .share-target-example img {
    aspect-ratio: 1 / 1;
  }
}

.profile-service-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 64px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 250, 239, .82);
  text-align: left;
  cursor: pointer;
}

.profile-service-copy {
  display: grid;
  gap: 4px;
}

.profile-service-copy b {
  font-size: 16px;
}

.profile-service-copy small {
  color: var(--muted);
  font-size: 13px;
}

.profile-service-arrow {
  color: var(--soft);
  font-size: 18px;
  line-height: 1;
}

.shop-page {
  max-width: 980px;
  margin: 0 auto;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.shop-browse-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .86);
  box-shadow: var(--shadow-soft);
}

.shop-browse-image {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #fff;
}

.shop-browse-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-browse-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.shop-browse-info h2 {
  margin: 2px 0 7px;
  font-size: 17px;
  line-height: 1.35;
}

.shop-browse-info p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.shop-browse-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  margin-top: auto;
}

.shop-browse-foot b {
  color: var(--danger);
  font-size: 18px;
}

@media (max-width: 760px) {
  .shop-grid {
    grid-template-columns: 1fr;
  }

  .shop-browse-card {
    grid-template-columns: 102px minmax(0, 1fr);
    gap: 12px;
  }

  .shop-product-detail-hero {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 14px;
    border-radius: 8px;
  }

  .shop-product-detail-image {
    min-height: 0;
    aspect-ratio: 1;
    border-radius: 6px;
  }

  .shop-product-detail-summary h1 {
    font-size: 22px;
  }

  .shop-product-detail-content,
  .shop-checkout-product,
  .shop-address-panel {
    border-radius: 8px;
  }

  .shop-product-detail-content {
    padding: 15px;
  }

  .shop-address-head,
  .shop-area-input {
    align-items: stretch;
    flex-direction: column;
  }

  .shop-address-head > div {
    width: 100%;
  }

  .shop-address-head .text-btn,
  .shop-area-input .secondary-cta {
    flex: 1;
  }
}
