/* s5c: 付费墙 DESIGN 10.7。从 fx/fc-ui 迁出并收口；fc 内禁止强制优先级。
   渐隐唯一允许：linear-gradient(transparent, var(--l0))。点数包卡复用 pricing.css。 */

/* —— 正文前 1/3 渐隐 80px —— */
.fx-reading.partial .txt {
  position: relative;
  max-height: 15em;
  overflow: hidden;
  -webkit-mask: none;
  mask: none;
}
.fx-reading.partial .txt::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background: linear-gradient(transparent, var(--l0));
  pointer-events: none;
}
.fc-out.fc-fade {
  position: relative;
  max-height: 15em;
  overflow: hidden;
  -webkit-mask: none;
  mask: none;
}
.fc-out.fc-fade::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background: linear-gradient(transparent, var(--l0));
  pointer-events: none;
}

/* —— 付费卡 —— */
.fx-paywall,
.fc-paywall {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 0 16px;
  margin: 16px 0 0;
  padding: 24px;
  border-radius: var(--r-16);
  text-align: left;
  border: 0;
  color: var(--ink);
  background-color: var(--l1);
  background-image: var(--dp-card), var(--dp-grain);
  box-shadow: var(--dp-up);
  overflow: visible;
}
.fx-paywall::after,
.fc-paywall::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 1px;
  background: var(--dp-hair);
  opacity: 0.55;
  pointer-events: none;
}
.fx-paywall > *,
.fc-paywall > * {
  grid-column: 2;
}
.fx-paywall .fx-lock,
.fc-paywall .fx-lock {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 24px;
  height: 24px;
  color: var(--gold-text);
  margin-top: 2px;
}
.fx-paywall .fx-lock svg,
.fc-paywall .fx-lock svg {
  display: block;
  width: 24px;
  height: 24px;
}
.fx-paywall .fx-pw-title,
.fc-paywall .fx-pw-title {
  margin: 0 0 8px;
  font: 600 18px / 1.6 var(--f-head);
  color: var(--ink);
  letter-spacing: 0;
}
.fx-paywall .bal,
.fc-paywall .bal {
  margin: 0 0 16px;
  font: 400 14px / 1.6 var(--f-body);
  color: var(--ink2);
}
.fx-paywall .bal.low,
.fc-paywall .bal.low {
  color: var(--seal);
}
.fx-pwb {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  margin: 0;
}
.fx-pwb .fc-btn {
  min-height: 44px;
}
.fx-reading.partial + .fx-paywall {
  margin-top: 16px;
}
.fc-ask .res > .fx-paywall,
.fc-ask .res > .fx-err {
  margin-top: 24px;
}

/* 小云：卡角半身，不贴按钮 */
.fx-paywall:has(> .fc-y.peek),
.fc-paywall:has(> .fc-y.peek) {
  padding-right: 224px;
}
.fx-paywall > .fc-y.peek,
.fc-paywall > .fc-y.peek {
  position: absolute;
  right: 24px;
  bottom: 0;
  width: 200px;
  height: 133px;
  background-position: center bottom;
  grid-column: auto;
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 760px) {
  .fx-paywall,
  .fc-paywall {
    padding: 16px;
    gap: 0 8px;
  }
  .fx-pwb {
    flex-direction: column;
    align-items: stretch;
  }
  .fx-pwb .fc-btn {
    width: 100%;
  }
  .fx-paywall:has(> .fc-y.peek),
  .fc-paywall:has(> .fc-y.peek) {
    padding-right: 16px;
    padding-bottom: 120px;
  }
  .fx-paywall > .fc-y.peek,
  .fc-paywall > .fc-y.peek {
    width: 150px;
    height: 100px;
    right: 50%;
    transform: translateX(50%);
  }
}

/* —— 点数包抽屉 / 弹窗（§10.15） —— */
.fc-pw-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.fc-pw-root[hidden] {
  display: none;
}
.fc-pw-scrim {
  position: absolute;
  inset: 0;
  background: rgba(18, 17, 20, 0.48);
}
.fc-pw-panel {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  padding: 24px;
  border-radius: var(--r-16) var(--r-16) 0 0;
  background-color: var(--l1);
  background-image: var(--dp-card), var(--dp-grain);
  box-shadow: 0 8px 24px rgba(18, 17, 20, 0.12);
  color: var(--ink);
  transform: translateY(0);
  transition: transform var(--dur-slow, 240ms) var(--ease, ease);
}
:is(html[data-theme="night"], html[data-tone="dark"]) .fc-pw-panel {
  background-color: var(--l2);
  box-shadow: 0 8px 24px rgba(18, 17, 20, 0.4);
}
.fc-pw-handle {
  display: block;
  width: 32px;
  height: 4px;
  margin: 0 auto 16px;
  border-radius: 2px;
  background: var(--line2);
}
.fc-pw-panel h3 {
  margin: 0 0 16px;
  font: 600 22px / 1.3 var(--f-head);
  text-align: center;
  color: var(--ink);
}
.fc-pw-panel .fx-packs {
  grid-template-columns: 1fr;
  padding-top: 0;
  gap: 12px;
}
.fc-pw-panel .fx-pack {
  padding: 24px 16px;
  transform: none;
}
.fc-pw-panel .fx-pack.rec {
  transform: none;
}
.fc-pw-panel .fx-pack:not(.rec)::before {
  display: none;
}
.fc-pw-close {
  display: block;
  margin: 16px 0 0 auto;
  min-height: 44px;
}
@media (min-width: 761px) {
  .fc-pw-root {
    align-items: center;
  }
  .fc-pw-panel {
    border-radius: var(--r-16);
  }
  .fc-pw-handle {
    display: none;
  }
}
