/* 桌宠工厂 · 日系清新风（Ma 留白 / 发丝边框 / 植物线描 / 极简暖中性色）
   全部选择器以 #love-mi-pet-factory-app 或 .pf- 前缀限定，不影响其他功能。 */

#love-mi-pet-factory-app {
    --pf-bg: #fafaf8;
    --pf-card: #ffffff;
    --pf-ink: #4a5568;
    --pf-ink-soft: #6b7280;
    --pf-ink-faint: #b0b8c4;
    --pf-line: #d4d4cf;
    --pf-line-30: rgba(212, 212, 207, 0.3);
    --pf-line-50: rgba(212, 212, 207, 0.5);
    --pf-sky: #64b5f6;
    --pf-mint: #98d8c8;
    --pf-pink: #ffb7c5;
    --pf-shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.03);
    --pf-shadow-hover: 0 2px 8px rgba(0, 0, 0, 0.05);
    --pf-ease: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --pf-safe-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
    --pf-safe-bottom: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
    --pf-safe-left: var(--safe-area-inset-left, env(safe-area-inset-left, 0px));
    --pf-safe-right: var(--safe-area-inset-right, env(safe-area-inset-right, 0px));
    --pf-topbar-h: 58px;
    position: absolute;
    inset: 0;
    z-index: 6810;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--pf-ink);
    background: var(--pf-bg);
    font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    font-weight: 300;
    letter-spacing: 0.02em;
    line-height: 1.6;
    isolation: isolate;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

#love-mi-pet-factory-app[hidden] {
    display: none !important;
}

#love-mi-pet-factory-app *,
#love-mi-pet-factory-app *::before,
#love-mi-pet-factory-app *::after {
    box-sizing: border-box;
}

#love-mi-pet-factory-app button {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

#love-mi-pet-factory-app button:disabled {
    cursor: default;
    opacity: 0.45;
}

#love-mi-pet-factory-app h1,
#love-mi-pet-factory-app h2,
#love-mi-pet-factory-app p {
    margin: 0;
    font-weight: 300;
}

/* ============================ 顶栏 ============================ */

.pf-topbar {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 10px;
    min-height: calc(var(--pf-topbar-h) + var(--pf-safe-top));
    padding: var(--pf-safe-top) max(16px, var(--pf-safe-right)) 0 max(16px, var(--pf-safe-left));
    background: linear-gradient(180deg, rgba(250, 250, 248, 0.98), rgba(250, 250, 248, 0.92));
    border-bottom: 1px solid var(--pf-line-30);
}

.pf-back {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--pf-line-50);
    border-radius: 50%;
    background: transparent;
    transition: border-color var(--pf-ease), color var(--pf-ease), background-color var(--pf-ease);
}

.pf-back:hover,
.pf-back:focus-visible {
    border-color: rgba(100, 181, 246, 0.4);
    color: var(--pf-sky);
    outline: none;
}

.pf-back svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pf-topbar-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    text-align: center;
}

.pf-topbar-kicker {
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--pf-ink-faint);
    line-height: 1.2;
}

.pf-topbar-title {
    font-size: 17px;
    letter-spacing: 0.12em;
    line-height: 1.4;
    color: var(--pf-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-topbar-spacer {
    width: 40px;
}

/* ============================ 主区 ============================ */

.pf-main {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    /* 隐形滚动条：仍可滚动，只是不占位、不露出滑轨 */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pf-main::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.pf-view {
    padding: 22px max(20px, var(--pf-safe-right)) calc(34px + var(--pf-safe-bottom)) max(20px, var(--pf-safe-left));
}

.pf-view[hidden] {
    display: none !important;
}

#love-mi-pet-factory-app[data-pf-active-view="matting"] .pf-main {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pf-view[data-pf-view="matting"] {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
}

/* ============================ 植物线描 ============================ */

.pf-leaf {
    width: 88px;
    height: 58px;
    fill: none;
    stroke: var(--pf-line);
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
}

.pf-leaf--intro {
    position: absolute;
    top: -6px;
    right: -4px;
    width: 104px;
    height: 70px;
    transform: rotate(8deg);
}

/* ============================ 首页 ============================ */

.pf-home-intro {
    position: relative;
    padding: 18px 0 30px;
}

.pf-home-line {
    font-size: 19px;
    letter-spacing: 0.08em;
    line-height: 1.7;
    max-width: 78%;
}

.pf-home-sub {
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--pf-ink-soft);
    letter-spacing: 0.06em;
}

.pf-section {
    position: relative;
    padding: 6px 0 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: opacity var(--pf-ease);
}

.pf-section.is-disabled > .pf-field,
.pf-section.is-disabled > .pf-switch-row {
    opacity: 0.45;
    pointer-events: none;
}

.pf-section-kicker {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    letter-spacing: 0.24em;
    color: var(--pf-ink-faint);
}

.pf-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    text-align: left;
    border: 1px solid var(--pf-line-30);
    border-radius: 12px;
    background: var(--pf-card);
    box-shadow: var(--pf-shadow-soft);
    transition: border-color var(--pf-ease), box-shadow var(--pf-ease), transform var(--pf-ease);
}

.pf-row:hover,
.pf-row:focus-visible {
    border-color: var(--pf-line-50);
    box-shadow: var(--pf-shadow-hover);
    outline: none;
}

.pf-row--inline {
    padding: 11px 14px;
}

.pf-row--persona .pf-row-value {
    white-space: normal;
    line-height: 1.6;
}

.pf-row-copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pf-row-label {
    font-size: 15px;
    letter-spacing: 0.06em;
    color: var(--pf-ink);
}

.pf-row-value {
    font-size: 12px;
    color: var(--pf-ink-soft);
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-row-tail {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--pf-ink-faint);
}

.pf-row-note {
    margin: -2px 4px 8px;
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--pf-ink-faint);
}

.pf-chevron {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pf-dot-status {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pf-line);
}

.pf-dot-status.is-ok {
    background: var(--pf-mint);
}

.pf-dot-status.is-warn {
    background: var(--pf-pink);
}

.pf-dot-status.is-idle {
    background: var(--pf-line-50);
}

/* 子开关（如「记忆注入」）：缩进一层，随父开关禁用 */
.pf-switch-row--sub {
    padding-left: 14px;
    border-left: 2px solid var(--pf-line-30);
}

.pf-card {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 52px 20px 18px;
    text-align: left;
    border: 1px solid var(--pf-line-30);
    border-radius: 12px;
    background: var(--pf-card);
    transition: border-color var(--pf-ease), box-shadow var(--pf-ease), transform var(--pf-ease);
}

.pf-card:hover,
.pf-card:focus-visible {
    border-color: var(--pf-line-50);
    box-shadow: var(--pf-shadow-hover);
    transform: translateY(-1px);
    outline: none;
}

.pf-card--mint {
    border-color: rgba(152, 216, 200, 0.25);
}

.pf-card--pink {
    border-color: rgba(255, 183, 197, 0.25);
}

.pf-card .pf-chevron {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pf-ink-faint);
}

.pf-card-title {
    font-size: 17px;
    letter-spacing: 0.1em;
}

.pf-card-note {
    font-size: 12.5px;
    color: var(--pf-ink-soft);
    line-height: 1.7;
}

.pf-card-meta {
    margin-top: 6px;
    font-size: 11px;
    letter-spacing: 0.05em;
    color: var(--pf-ink-faint);
}

.pf-footnote,
.pf-empty-copy {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.8;
    color: var(--pf-ink-faint);
    text-align: center;
}

.pf-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--pf-ink-soft);
    border: 1px solid var(--pf-line-50);
    border-radius: 999px;
    vertical-align: middle;
}

/* 功能权限：已接线 / 待后续阶段 */
.pf-badge--live {
    color: #5aa98b;
    border-color: rgba(90, 169, 139, 0.45);
}

.pf-badge--pending {
    color: #b8a06a;
    border-color: rgba(184, 160, 106, 0.45);
}

/* 悬浮桌宠诊断行 */
.pf-diag-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.pf-diag-dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: #c9c9c4;
}

.pf-diag-dot.is-ok { background: #7fcfae; }
.pf-diag-dot.is-bad { background: #e8a0a0; }
.pf-diag-dot.is-unknown { background: #d8cfa6; }

/* ============================ 通用按钮 ============================ */

.pf-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 18px;
    font-size: 13px;
    letter-spacing: 0.08em;
    border: 1px solid rgba(212, 212, 207, 0.4);
    border-radius: 10px;
    background: transparent;
    color: #7a8a9e;
    transition: border-color var(--pf-ease), color var(--pf-ease), background-color var(--pf-ease), box-shadow var(--pf-ease);
}

.pf-button:hover,
.pf-button:focus-visible {
    border-color: rgba(100, 181, 246, 0.4);
    color: var(--pf-sky);
    outline: none;
}

.pf-button--primary {
    background: rgba(100, 181, 246, 0.9);
    border-color: rgba(100, 181, 246, 0.3);
    color: #fff;
}

.pf-button--primary:hover,
.pf-button--primary:focus-visible {
    background: rgba(100, 181, 246, 1);
    color: #fff;
}

.pf-button--secondary {
    color: #7a8a9e;
}

.pf-button--whisper {
    color: var(--pf-ink-faint);
    border-color: rgba(212, 212, 207, 0.2);
}

.pf-button--tiny {
    min-height: 30px;
    padding: 0 12px;
    font-size: 12px;
}

/* inline-flex 会盖过 hidden 属性的 UA 样式，这里统一让 hidden 生效 */
.pf-button[hidden] {
    display: none !important;
}

/* ============================ 数据备份 ============================ */

.pf-backup-overview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--pf-line-30);
    border-radius: 12px;
    background: var(--pf-line-30);
    box-shadow: var(--pf-shadow-soft);
}

.pf-backup-stat {
    min-width: 0;
    padding: 15px 14px;
    background: var(--pf-card);
    text-align: center;
}

.pf-backup-stat strong {
    display: block;
    margin-bottom: 3px;
    color: var(--pf-ink);
    font-size: 21px;
    font-weight: 400;
    line-height: 1.2;
}

.pf-backup-stat span {
    display: block;
    color: var(--pf-ink-faint);
    font-size: 10.5px;
    letter-spacing: 0.08em;
}

.pf-backup-size {
    color: var(--pf-ink-soft);
    font-size: 11.5px;
    text-align: center;
}

.pf-backup-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pf-backup-actions .pf-button {
    width: 100%;
    min-height: 44px;
    padding-inline: 10px;
}

.pf-backup-status {
    position: relative;
    min-height: 39px;
    padding: 9px 12px;
    color: var(--pf-ink-faint);
    border: 1px solid var(--pf-line-30);
    border-radius: 10px;
    font-size: 11px;
    line-height: 1.7;
    text-align: center;
}

.pf-backup-status.is-ok {
    color: #4f967b;
    border-color: rgba(90, 169, 139, 0.28);
    background: rgba(152, 216, 200, 0.08);
}

.pf-backup-status.is-warn {
    color: #b1717d;
    border-color: rgba(229, 127, 147, 0.25);
    background: rgba(255, 183, 197, 0.07);
}

.pf-backup-status.is-busy::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--pf-sky);
    animation: pf-backup-pulse 1.1s ease-in-out infinite;
}

.pf-backup-scope {
    overflow: hidden;
    border: 1px solid var(--pf-line-30);
    border-radius: 12px;
    background: var(--pf-card);
}

.pf-backup-scope p {
    padding: 12px 14px;
    color: var(--pf-ink-soft);
    font-size: 11.5px;
    line-height: 1.75;
}

.pf-backup-scope p + p {
    border-top: 1px solid var(--pf-line-30);
}

.pf-backup-scope strong {
    margin-right: 5px;
    color: var(--pf-ink);
    font-weight: 400;
    letter-spacing: 0.05em;
}

@keyframes pf-backup-pulse {
    0%, 100% { opacity: 0.35; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1); }
}

/* ============================ 抠图操作台 ============================ */

.pf-matting {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.pf-matting-stage {
    flex: 0 0 66%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 10px max(16px, var(--pf-safe-right)) 8px max(16px, var(--pf-safe-left));
    border-bottom: 1px solid var(--pf-line-30);
}

.pf-stage-tabs {
    flex: 0 0 auto;
    display: flex;
    gap: 18px;
    padding: 0 4px 6px;
}

.pf-tab {
    padding: 4px 0;
    font-size: 12.5px;
    letter-spacing: 0.1em;
    color: var(--pf-ink-faint);
    border: 0;
    border-bottom: 1px solid transparent;
    background: transparent;
    transition: color var(--pf-ease), border-color var(--pf-ease);
}

.pf-tab.is-active {
    color: var(--pf-ink);
    border-bottom-color: var(--pf-sky);
}

.pf-tab span {
    margin-left: 4px;
    color: var(--pf-mint);
}

.pf-stage-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.pf-stage-empty {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 18px;
    text-align: center;
}

.pf-stage-empty-title {
    font-size: 15px;
    letter-spacing: 0.1em;
}

.pf-stage-empty-copy {
    max-width: 280px;
    font-size: 12px;
    line-height: 1.8;
    color: var(--pf-ink-soft);
}

.pf-result {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 8px;
}

.pf-result-frame {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 180px;
    border: 1px solid var(--pf-line-30);
    border-radius: 12px;
    background: var(--pf-card);
    overflow: hidden;
    transition: border-color var(--pf-ease);
}

[data-pf-chroma-bg="magenta"] {
    border-color: rgba(255, 0, 255, 0.18);
}

[data-pf-chroma-bg="green"] {
    border-color: rgba(0, 200, 0, 0.18);
}

.pf-result-frame:not(.is-pending) {
    min-height: 0;
}

.pf-result-img {
    display: block;
    width: 100%;
    max-height: 46vh;
    object-fit: contain;
    cursor: zoom-in;
}

.pf-result-loading,
.pf-result-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 36px 20px;
    font-size: 12.5px;
    color: var(--pf-ink-soft);
    text-align: center;
}

.pf-result-error {
    color: #c98b98;
}

.pf-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 3px;
    border-radius: 50%;
    background: var(--pf-mint);
    animation: pf-breathe 1.6s ease-in-out infinite;
}

.pf-dot:nth-child(2) { animation-delay: 0.25s; background: var(--pf-sky); }
.pf-dot:nth-child(3) { animation-delay: 0.5s; background: var(--pf-pink); }

@keyframes pf-breathe {
    0%, 100% { opacity: 0.25; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-3px); }
}

.pf-result-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 4px;
}

.pf-result-spec {
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--pf-ink);
}

.pf-result-summary {
    font-size: 12px;
    line-height: 1.7;
    color: var(--pf-ink-soft);
}

.pf-result-provider {
    font-size: 10.5px;
    letter-spacing: 0.06em;
    color: var(--pf-ink-faint);
}

.pf-prompt-details {
    border: 1px solid var(--pf-line-30);
    border-radius: 12px;
    background: var(--pf-card);
}

.pf-prompt-details summary {
    padding: 10px 14px;
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--pf-ink-soft);
    cursor: pointer;
    list-style: none;
}

.pf-prompt-details summary::-webkit-details-marker {
    display: none;
}

.pf-prompt-details summary::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 10px;
    border-right: 1px solid var(--pf-ink-faint);
    border-bottom: 1px solid var(--pf-ink-faint);
    transform: rotate(-45deg);
    transition: transform var(--pf-ease);
}

.pf-prompt-details[open] summary::before {
    transform: rotate(45deg);
}

.pf-prompt-editor {
    display: block;
    width: 100%;
    padding: 10px 14px 14px;
    font: inherit;
    font-size: 12px;
    line-height: 1.7;
    color: var(--pf-ink);
    background: transparent;
    border: 0;
    border-top: 1px solid var(--pf-line-30);
    resize: vertical;
    outline: none;
}

.pf-result-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 0 2px;
}

.pf-confirmed-badge {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    font-size: 12.5px;
    letter-spacing: 0.08em;
    color: var(--pf-mint);
    border: 1px solid rgba(152, 216, 200, 0.3);
    border-radius: 10px;
}

.pf-thumbs {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    padding: 8px 2px 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.pf-thumbs::-webkit-scrollbar {
    display: none;
}

.pf-thumbs[hidden] {
    display: none;
}

.pf-thumb {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--pf-line-30);
    border-radius: 10px;
    background: var(--pf-card);
    overflow: hidden;
    transition: border-color var(--pf-ease);
}

.pf-thumb.is-active {
    border-color: var(--pf-sky);
}

.pf-thumb.is-confirmed {
    box-shadow: inset 0 0 0 1px rgba(152, 216, 200, 0.5);
}

.pf-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pf-thumb-status {
    font-size: 9.5px;
    color: var(--pf-ink-faint);
    text-align: center;
    line-height: 1.3;
    padding: 4px;
}

.pf-library {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 8px;
}

.pf-library-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--pf-line-30);
    border-radius: 12px;
    background: var(--pf-card);
}

.pf-library-thumb {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 1px solid var(--pf-line-30);
    border-radius: 10px;
    background: var(--pf-bg);
    overflow: hidden;
}

.pf-library-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pf-library-copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pf-library-title {
    font-size: 12.5px;
    letter-spacing: 0.05em;
}

.pf-library-time {
    font-size: 10.5px;
    color: var(--pf-ink-faint);
}

/* 下区：对话与参考图 */

.pf-matting-composer {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px max(16px, var(--pf-safe-right)) calc(10px + var(--pf-safe-bottom)) max(16px, var(--pf-safe-left));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(250, 250, 248, 0));
}

.pf-chip-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pf-chip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.pf-chip-row[hidden] {
    display: none;
}

.pf-chip-label {
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--pf-ink-faint);
    margin-right: 2px;
}

.pf-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 12px;
    font-size: 12px;
    letter-spacing: 0.06em;
    color: #7a8a9e;
    border: 1px solid rgba(212, 212, 207, 0.4);
    border-radius: 999px;
    background: transparent;
    transition: border-color var(--pf-ease), color var(--pf-ease), background-color var(--pf-ease);
}

.pf-chip--small {
    min-width: 34px;
    padding: 0 10px;
    justify-content: center;
}

.pf-chip.is-active {
    color: var(--pf-sky);
    border-color: rgba(100, 181, 246, 0.45);
    background: rgba(100, 181, 246, 0.06);
}

.pf-chip-hint {
    font-size: 10.5px;
    color: var(--pf-ink-faint);
}

.pf-chip.is-muted {
    color: var(--pf-ink-faint);
    border-style: dashed;
}

.pf-chip-icon {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pf-chip.is-active .pf-chip-icon {
    color: var(--pf-mint);
}

.pf-swatch {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.pf-select {
    min-height: 28px;
    padding: 0 10px;
    font: inherit;
    font-size: 12px;
    color: var(--pf-ink);
    border: 1px solid rgba(212, 212, 207, 0.4);
    border-radius: 999px;
    background: var(--pf-card);
    outline: none;
}

.pf-refs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pf-refs[hidden] {
    display: none;
}

.pf-ref {
    position: relative;
    width: 46px;
    height: 46px;
    border: 1px solid var(--pf-line-30);
    border-radius: 10px;
    overflow: hidden;
    background: var(--pf-card);
}

.pf-ref img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.pf-ref--master {
    border-color: rgba(152, 216, 200, 0.7);
    box-shadow: 0 0 0 2px rgba(152, 216, 200, 0.18);
}

.pf-ref-tag {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1px 0;
    font-size: 9px;
    letter-spacing: 0.12em;
    text-align: center;
    color: #fff;
    background: rgba(152, 216, 200, 0.85);
}

.pf-result-lock {
    color: var(--pf-mint);
}

.pf-library-item.is-canonical {
    border-color: rgba(152, 216, 200, 0.45);
}

.pf-library-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.pf-library-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    font-size: 10.5px;
    letter-spacing: 0.08em;
    color: var(--pf-mint);
    border: 1px solid rgba(152, 216, 200, 0.4);
    border-radius: 999px;
}

.pf-library-badge--soft {
    color: var(--pf-ink-faint);
    border-color: var(--pf-line-50);
}

.pf-ref-remove {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 18px;
    height: 18px;
    padding: 0;
    font-size: 13px;
    line-height: 1;
    color: #fff;
    border: 0;
    border-radius: 0 9px 0 9px;
    background: rgba(74, 85, 104, 0.55);
}

.pf-ref-count {
    font-size: 10.5px;
    color: var(--pf-ink-faint);
    letter-spacing: 0.08em;
}

.pf-compose-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: auto;
}

.pf-icon-button {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(212, 212, 207, 0.4);
    border-radius: 50%;
    background: transparent;
    color: #7a8a9e;
    transition: border-color var(--pf-ease), color var(--pf-ease);
}

.pf-icon-button:hover,
.pf-icon-button:focus-visible {
    border-color: rgba(152, 216, 200, 0.5);
    color: var(--pf-mint);
    outline: none;
}

.pf-icon-button svg,
.pf-send svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pf-textarea {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 40px;
    max-height: 120px;
    padding: 9px 0 8px;
    font: inherit;
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--pf-ink);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--pf-line);
    border-radius: 0;
    resize: none;
    outline: none;
    transition: border-color var(--pf-ease);
}

.pf-textarea::placeholder {
    color: rgba(176, 184, 196, 0.7);
}

.pf-textarea:focus {
    border-bottom-color: rgba(152, 216, 200, 0.7);
}

.pf-send {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(100, 181, 246, 0.3);
    border-radius: 50%;
    background: rgba(100, 181, 246, 0.9);
    color: #fff;
    transition: background-color var(--pf-ease), opacity var(--pf-ease);
}

.pf-send:hover,
.pf-send:focus-visible {
    background: rgba(100, 181, 246, 1);
    outline: none;
}

/* ============================ 桌宠内核设置 ============================ */

.pf-core-preview {
    padding: 6px 0 26px;
}

.pf-preview-box {
    position: relative;
    min-height: 200px;
    display: grid;
    place-items: center;
    border: 1px solid var(--pf-line-30);
    border-radius: 12px;
    background:
        radial-gradient(circle at 50% 100%, rgba(152, 216, 200, 0.08), transparent 60%),
        var(--pf-card);
    overflow: hidden;
}

.pf-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 26px 20px;
    text-align: center;
}

.pf-preview-placeholder p {
    font-size: 13.5px;
    letter-spacing: 0.08em;
}

.pf-preview-placeholder span {
    font-size: 11.5px;
    color: var(--pf-ink-faint);
}

.pf-preview-stage {
    width: 100%;
    display: grid;
    place-items: center;
    padding: 18px 20px 8px;
    background-image:
        linear-gradient(45deg, rgba(212, 212, 207, 0.18) 25%, transparent 25%, transparent 75%, rgba(212, 212, 207, 0.18) 75%),
        linear-gradient(45deg, rgba(212, 212, 207, 0.18) 25%, transparent 25%, transparent 75%, rgba(212, 212, 207, 0.18) 75%);
    background-size: 18px 18px;
    background-position: 0 0, 9px 9px;
}

.pf-preview-sprite {
    max-width: 62%;
    max-height: 180px;
    object-fit: contain;
    animation: pf-float 3.6s ease-in-out infinite;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.04));
}

@keyframes pf-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.pf-preview-caption {
    padding: 0 16px 14px;
    font-size: 11px;
    color: var(--pf-ink-faint);
    text-align: center;
}

.pf-avatar {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--pf-line-30);
    border-radius: 50%;
    background: var(--pf-bg);
    overflow: hidden;
}

.pf-avatar--small {
    width: 34px;
    height: 34px;
}

.pf-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pf-avatar i {
    font-style: normal;
    font-size: 15px;
    color: var(--pf-ink-soft);
}

.lmp-scope .lmp-cancel-reply {
    pointer-events: auto;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 11px;
    margin-left: 6px;
    padding: 6px;
    cursor: pointer;
    text-decoration: underline;
}

.pf-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid var(--pf-line-30);
    border-radius: 12px;
    background: var(--pf-card);
}

.pf-field-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.pf-field-label {
    font-size: 14px;
    letter-spacing: 0.06em;
}

.pf-field-hint {
    font-size: 11px;
    color: var(--pf-ink-faint);
    white-space: nowrap;
}

.pf-field-note {
    font-size: 11px;
    color: var(--pf-ink-faint);
    line-height: 1.7;
}

/* 折叠区块（基础反应） */
.pf-details {
    padding: 0 16px;
    border: 1px solid var(--pf-line-30);
    border-radius: 12px;
    background: var(--pf-card);
}

.pf-details-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
    list-style: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.pf-details-summary::-webkit-details-marker {
    display: none;
}

.pf-details-summary::after {
    content: '';
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    margin-left: 4px;
    border-right: 1.5px solid var(--pf-ink-faint);
    border-bottom: 1.5px solid var(--pf-ink-faint);
    transform: rotate(45deg);
    transition: transform var(--pf-ease);
}

.pf-details[open] > .pf-details-summary::after {
    transform: rotate(-135deg);
}

.pf-details > .pf-field-note {
    margin: -4px 0 10px;
}

.pf-l0-item {
    padding: 10px 0 12px;
    border-top: 1px dashed var(--pf-line-30);
}

.pf-l0-item .pf-button[hidden] {
    display: none;
}

.pf-l0-item .pf-field-head {
    margin-bottom: 6px;
}

.pf-l0-label {
    font-size: 13px;
    color: var(--pf-ink);
}

.pf-l0-label small {
    margin-left: 6px;
    font-size: 11px;
    color: var(--pf-ink-faint);
}

.pf-lines-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid var(--pf-line-30);
    border-radius: 10px;
    background: var(--pf-bg);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.6;
    color: var(--pf-ink);
    resize: vertical;
    min-height: 56px;
}

.pf-lines-input:focus {
    outline: none;
    border-color: var(--pf-mint);
}

.pf-lines-input::placeholder {
    color: var(--pf-ink-faint);
}

/* 开关下的子设置（语音语种 / 翻译显示） */
.pf-subfields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: -4px 0 0 14px;
    padding: 10px 0 0 14px;
    border-left: 2px solid rgba(152, 216, 200, 0.55);
}

.pf-subfields[hidden] {
    display: none;
}

/* 功能权限里的子菜单（操控手机 → 操控程度）：与权限开关行同一条竖线 */
.pf-subfields--permission {
    margin-top: 0;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-left-color: var(--pf-line-30);
}

.pf-switch-row.is-disabled {
    opacity: 0.5;
}

.pf-stepper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pf-stepper.is-disabled {
    opacity: 0.45;
}

.pf-stepper-button {
    min-width: 34px;
    height: 32px;
    padding: 0 8px;
    font-size: 13px;
    color: #7a8a9e;
    border: 1px solid rgba(212, 212, 207, 0.4);
    border-radius: 8px;
    background: transparent;
    transition: border-color var(--pf-ease), color var(--pf-ease);
}

.pf-stepper-button:hover,
.pf-stepper-button:focus-visible {
    border-color: rgba(100, 181, 246, 0.4);
    color: var(--pf-sky);
    outline: none;
}

.pf-stepper-input {
    width: 54px;
    height: 32px;
    padding: 0;
    font: inherit;
    font-size: 15px;
    text-align: center;
    color: var(--pf-ink);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--pf-line);
    border-radius: 0;
    outline: none;
    -moz-appearance: textfield;
}

.pf-stepper-input::-webkit-outer-spin-button,
.pf-stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pf-stepper-unit {
    font-size: 11.5px;
    color: var(--pf-ink-faint);
}

.pf-switch-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border: 1px solid var(--pf-line-30);
    border-radius: 12px;
    background: var(--pf-card);
    cursor: pointer;
    transition: border-color var(--pf-ease);
}

.pf-switch-row:hover {
    border-color: var(--pf-line-50);
}

.pf-switch-copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pf-switch-label {
    font-size: 14px;
    letter-spacing: 0.06em;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.pf-switch-note {
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--pf-ink-faint);
}

.pf-switch {
    position: relative;
    flex: 0 0 auto;
    width: 44px;
    height: 24px;
}

.pf-switch input {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.pf-switch i {
    position: absolute;
    inset: 0;
    border: 1px solid var(--pf-line);
    border-radius: 999px;
    background: transparent;
    transition: background-color var(--pf-ease), border-color var(--pf-ease);
}

.pf-switch i::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--pf-line);
    transition: transform var(--pf-ease), background-color var(--pf-ease);
}

.pf-switch input:checked + i {
    border-color: rgba(152, 216, 200, 0.6);
    background: rgba(152, 216, 200, 0.16);
}

.pf-switch input:checked + i::after {
    transform: translateX(20px);
    background: var(--pf-mint);
}

.pf-switch input:disabled + i {
    opacity: 0.5;
}

/* ============================ 底部选择面板 ============================ */

.pf-sheet-layer {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: flex-end;
}

.pf-sheet-layer[hidden] {
    display: none !important;
}

.pf-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(74, 85, 104, 0.18);
    opacity: 0;
    transition: opacity var(--pf-ease);
}

.pf-sheet {
    position: relative;
    width: 100%;
    max-height: 78%;
    display: flex;
    flex-direction: column;
    padding: 10px 18px calc(16px + var(--pf-safe-bottom));
    border: 1px solid var(--pf-line-30);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    background: var(--pf-bg);
    transform: translateY(100%);
    transition: transform var(--pf-ease);
}

.pf-sheet-layer.is-open .pf-sheet-backdrop {
    opacity: 1;
}

.pf-sheet-layer.is-open .pf-sheet {
    transform: translateY(0);
}

.pf-sheet-handle {
    width: 36px;
    height: 3px;
    margin: 0 auto 12px;
    border-radius: 999px;
    background: var(--pf-line-50);
}

.pf-sheet-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 2px 12px;
}

.pf-sheet-title {
    font-size: 15px;
    letter-spacing: 0.12em;
}

.pf-sheet-note {
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--pf-ink-faint);
}

.pf-sheet-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
}

.pf-sheet-empty {
    padding: 24px 12px;
    font-size: 12.5px;
    color: var(--pf-ink-faint);
    text-align: center;
}

.pf-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    text-align: left;
    border: 1px solid var(--pf-line-30);
    border-radius: 12px;
    background: var(--pf-card);
    transition: border-color var(--pf-ease), background-color var(--pf-ease);
}

.pf-option:hover,
.pf-option:focus-visible {
    border-color: var(--pf-line-50);
    outline: none;
}

.pf-option.is-selected {
    border-color: rgba(100, 181, 246, 0.45);
    background: rgba(100, 181, 246, 0.05);
}

.pf-option-copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pf-option-label {
    font-size: 14px;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-option-note {
    font-size: 11.5px;
    color: var(--pf-ink-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-option-check {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border: 1px solid var(--pf-line);
    border-radius: 50%;
    position: relative;
    transition: border-color var(--pf-ease), background-color var(--pf-ease);
}

.pf-option.is-selected .pf-option-check {
    border-color: var(--pf-sky);
    background: var(--pf-sky);
}

.pf-option.is-selected .pf-option-check::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border-right: 1.4px solid #fff;
    border-bottom: 1.4px solid #fff;
    transform: rotate(45deg);
}

.pf-sheet-cancel {
    margin-top: 10px;
    width: 100%;
}

/* ============================ 大图预览 ============================ */

.pf-lightbox {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 16px calc(24px + var(--pf-safe-bottom));
    background: rgba(250, 250, 248, 0.96);
    opacity: 0;
    transition: opacity var(--pf-ease);
    cursor: zoom-out;
}

.pf-lightbox[hidden] {
    display: none !important;
}

.pf-lightbox.is-open {
    opacity: 1;
}

.pf-lightbox img {
    max-width: 100%;
    max-height: 80%;
    object-fit: contain;
    border: 1px solid var(--pf-line-30);
    border-radius: 12px;
    background: #fff;
}

.pf-lightbox-caption {
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--pf-ink-soft);
    text-align: center;
}

/* ============================ 状态提示 ============================ */

.pf-status {
    position: absolute;
    left: 50%;
    bottom: calc(28px + var(--pf-safe-bottom));
    z-index: 60;
    max-width: 82%;
    padding: 8px 16px;
    font-size: 12.5px;
    color: var(--pf-ink);
    border: 1px solid var(--pf-line-50);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    transform: translate(-50%, 8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--pf-ease), transform var(--pf-ease);
}

.pf-status.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ============================ 打包安装 ============================ */

.pf-card--sky {
    border-color: rgba(100, 181, 246, 0.2);
}

.pf-pick {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--pf-line-30);
    border-radius: 12px;
    background: var(--pf-card);
    transition: opacity var(--pf-ease), border-color var(--pf-ease);
}

.pf-pick.is-off {
    opacity: 0.5;
}

.pf-pick.is-remote {
    position: relative;
    border-color: rgba(255, 183, 197, 0.9);
}

.pf-pick.is-remote > .pf-badge--warn {
    position: absolute;
    top: -8px;
    left: 12px;
    margin: 0;
    background: #fff;
}

.pf-badge--warn {
    color: #d97b8c;
    border-color: rgba(255, 183, 197, 0.9);
}

.pf-pick--master {
    border-color: rgba(152, 216, 200, 0.45);
}

.pf-pick-thumb {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 1px solid var(--pf-line-30);
    border-radius: 10px;
    background: var(--pf-bg);
    overflow: hidden;
}

.pf-pick-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pf-pick-copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pf-pick-title {
    font-size: 14px;
    letter-spacing: 0.06em;
}

.pf-pick-title small {
    font-size: 11px;
    color: var(--pf-ink-faint);
    margin-left: 4px;
}

.pf-pick-note {
    font-size: 11px;
    color: var(--pf-ink-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-select--block {
    width: 100%;
    border-radius: 8px;
}

.pf-switch--small {
    width: 38px;
    height: 22px;
}

.pf-switch--small i::after {
    width: 14px;
    height: 14px;
}

.pf-switch--small input:checked + i::after {
    transform: translateX(16px);
}

.pf-range {
    width: 100%;
    height: 26px;
    margin: 0;
    accent-color: var(--pf-sky);
    background: transparent;
}

.pf-preview-box--player {
    padding: 0;
}

.pf-preview-canvas {
    display: block;
    max-width: 100%;
}

.pf-state-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 4px 12px 0;
}

.pf-warnings {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 183, 197, 0.35);
    border-radius: 12px;
    background: rgba(255, 183, 197, 0.06);
}

.pf-warnings p {
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--pf-ink-soft);
}

.pf-field--inline {
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.pf-text-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 6px 0;
    font: inherit;
    font-size: 14px;
    color: var(--pf-ink);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--pf-line);
    border-radius: 0;
    outline: none;
    transition: border-color var(--pf-ease);
}

.pf-text-input:focus {
    border-bottom-color: rgba(100, 181, 246, 0.6);
}

.pf-library-thumb--static {
    display: grid;
    place-items: center;
}

/* 质量门 */

.pf-quality {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--pf-line-30);
    border-radius: 12px;
    background: var(--pf-card);
}

.pf-quality-title {
    font-size: 13px;
    letter-spacing: 0.12em;
    color: var(--pf-ink);
}

.pf-quality-state {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pf-quality-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pf-quality-name {
    font-size: 12.5px;
    letter-spacing: 0.05em;
}

.pf-quality-name small {
    margin-left: 6px;
    font-size: 10.5px;
    color: var(--pf-ink-faint);
}

.pf-quality-fps {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pf-quality-fps .pf-stepper-button {
    min-width: 28px;
    height: 26px;
    font-size: 12px;
}

.pf-quality-fps-value {
    min-width: 46px;
    font-size: 11.5px;
    text-align: center;
    color: var(--pf-ink-soft);
}

.pf-quality-frames {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
}

.pf-quality-frame {
    position: relative;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid var(--pf-line-30);
    border-radius: 8px;
    background:
        linear-gradient(45deg, rgba(212, 212, 207, 0.18) 25%, transparent 25%, transparent 75%, rgba(212, 212, 207, 0.18) 75%),
        linear-gradient(45deg, rgba(212, 212, 207, 0.18) 25%, transparent 25%, transparent 75%, rgba(212, 212, 207, 0.18) 75%);
    background-size: 10px 10px;
    background-position: 0 0, 5px 5px;
    overflow: hidden;
    transition: border-color var(--pf-ease), opacity var(--pf-ease);
}

.pf-quality-frame img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.pf-quality-frame.is-off {
    opacity: 0.35;
    border-color: rgba(255, 183, 197, 0.6);
}

.pf-quality-frame.is-off::after {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    top: 50%;
    border-top: 1px solid rgba(201, 139, 152, 0.8);
    transform: rotate(-30deg);
}

.pf-quality-frame:disabled {
    opacity: 0.8;
    cursor: default;
}

.pf-quality-frame-index {
    position: absolute;
    right: 3px;
    bottom: 1px;
    font-size: 9px;
    color: var(--pf-ink-faint);
}

/* ============================ 一键出全套 ============================ */

.pf-batch {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 2px 10px;
}

.pf-batch-intro,
.pf-batch-warn,
.pf-batch-estimate {
    font-size: 12px;
    line-height: 1.7;
    color: var(--pf-ink-soft);
}

.pf-batch-warn {
    padding: 8px 12px;
    color: #c98b98;
    border: 1px solid rgba(255, 183, 197, 0.35);
    border-radius: 10px;
    background: rgba(255, 183, 197, 0.06);
}

.pf-batch-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.pf-batch-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    font-size: 12px;
    letter-spacing: 0.06em;
    color: #7a8a9e;
    border: 1px solid rgba(212, 212, 207, 0.4);
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    transition: border-color var(--pf-ease), color var(--pf-ease), background-color var(--pf-ease);
}

.pf-batch-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pf-batch-item.is-on {
    color: var(--pf-sky);
    border-color: rgba(100, 181, 246, 0.45);
    background: rgba(100, 181, 246, 0.06);
}

.pf-batch-item.is-locked {
    cursor: default;
    opacity: 0.8;
}

.pf-batch-price {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--pf-ink-soft);
}

.pf-batch-price input {
    width: 110px;
    padding: 4px 0;
    font: inherit;
    font-size: 13px;
    color: var(--pf-ink);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--pf-line);
    border-radius: 0;
    outline: none;
}

.pf-batch-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.pf-batch-title {
    font-size: 14px;
    letter-spacing: 0.1em;
}

.pf-batch-progress {
    font-size: 11.5px;
    color: var(--pf-ink-faint);
}

.pf-batch-bar {
    height: 3px;
    border-radius: 999px;
    background: var(--pf-line-30);
    overflow: hidden;
}

.pf-batch-bar i {
    display: block;
    height: 100%;
    background: var(--pf-mint);
    transition: width var(--pf-ease);
}

.pf-batch-jobs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pf-batch-job {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--pf-line-30);
    border-radius: 12px;
    background: var(--pf-card);
}

.pf-batch-job.is-error {
    border-color: rgba(255, 183, 197, 0.45);
}

.pf-batch-job.is-done {
    border-color: rgba(152, 216, 200, 0.35);
}

.pf-batch-job-thumb {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--pf-line-30);
    border-radius: 10px;
    background: var(--pf-bg);
    overflow: hidden;
}

.pf-batch-job-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pf-batch-job-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pf-line);
}

.pf-batch-job-dot--running {
    background: var(--pf-sky);
    animation: pf-breathe 1.2s ease-in-out infinite;
}

.pf-batch-job-dot--error {
    background: var(--pf-pink);
}

.pf-batch-job-copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pf-batch-job-name {
    font-size: 13px;
    letter-spacing: 0.05em;
}

.pf-batch-job-name small {
    font-size: 10.5px;
    color: var(--pf-ink-faint);
    margin-left: 4px;
}

.pf-batch-job-status {
    font-size: 11px;
    color: var(--pf-ink-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-batch-job-actions {
    flex: 0 0 auto;
    display: flex;
    gap: 6px;
}

/* ============================ 微信聊天窗口：桌宠聊两句回流卡 ============================ */

.chat-system-message--pet-chat {
    display: flex;
    justify-content: center;
    padding: 4px 12px;
}

.pet-chat-card {
    width: min(92%, 340px);
    border: 1px solid rgba(212, 212, 207, 0.7);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    overflow: hidden;
}

.pet-chat-card__summary {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "icon title badge" "icon meta badge";
    align-items: center;
    column-gap: 10px;
    row-gap: 2px;
    padding: 10px 12px;
    list-style: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.pet-chat-card__summary::-webkit-details-marker { display: none; }

.pet-chat-card__icon { grid-area: icon; font-size: 18px; line-height: 1; }
.pet-chat-card__title { grid-area: title; font-size: 13px; color: #4a5568; letter-spacing: 0.02em; }
.pet-chat-card__meta { grid-area: meta; font-size: 11px; color: #9aa3b2; }

.pet-chat-card__badge {
    grid-area: badge;
    padding: 2px 8px;
    font-size: 10px;
    letter-spacing: 0.06em;
    color: #8a94a6;
    border: 1px solid rgba(212, 212, 207, 0.8);
    border-radius: 999px;
    white-space: nowrap;
}

.pet-chat-card[open] .pet-chat-card__summary {
    border-bottom: 1px dashed rgba(212, 212, 207, 0.8);
}

.pet-chat-card__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px 12px;
    max-height: 320px;
    overflow-y: auto;
    scrollbar-width: none;
}

.pet-chat-card__body::-webkit-scrollbar { display: none; }

.pet-chat-card__row {
    display: flex;
    gap: 8px;
    font-size: 12.5px;
    line-height: 1.55;
    color: #4a5568;
}

.pet-chat-card__who {
    flex: 0 0 auto;
    min-width: 2.5em;
    max-width: 6em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #98d8c8;
    font-weight: 500;
}

.pet-chat-card__row--user .pet-chat-card__who { color: #64b5f6; }

.pet-chat-card__text {
    flex: 1 1 auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.pet-chat-card__zh {
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
    color: #8a94a6;
}

.pet-chat-card__empty { font-size: 12px; color: #b0b8c4; }

/* 「回流保留语音」：桌宠那句渲染成微信同款语音条（台词变体） + 独立「保存语音」按钮 */
.pet-chat-card__row--voice {
    align-items: flex-start;
}

.pet-chat-card__voice {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.pet-chat-card__voice .chat-message-bubble--voice.pet-chat-card__voice-bubble {
    max-width: 100%;
    margin: 0;
    font-size: 12.5px;
}

.pet-chat-card__voice .chat-voice-line-badge {
    background: rgba(152, 216, 200, 0.22);
    color: #3f8f7f;
}

.pet-chat-card__save {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border: 1px solid rgba(100, 181, 246, 0.45);
    border-radius: 999px;
    background: rgba(100, 181, 246, 0.1);
    color: #4a90d9;
    font-size: 11px;
    line-height: 1.4;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.pet-chat-card__save::before {
    content: "⤓";
    font-size: 12px;
    line-height: 1;
}

.pet-chat-card__save:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ============================ 内核设置 · 消息设置 / 记忆设置扩展 ============================ */

.pf-details--message > .pf-details-summary .pf-field-hint {
    text-align: right;
}

.pf-details-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 2px 0 14px;
    border-top: 1px dashed var(--pf-line-30);
}

.pf-details-body > .pf-field {
    padding-top: 10px;
}

.pf-details-body .pf-switch-row {
    padding: 11px 12px;
}

/* 滑动条（字体大小） */
.pf-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pf-slider {
    flex: 1 1 auto;
    min-width: 0;
    height: 24px;
    margin: 0;
    accent-color: #98d8c8;
    cursor: pointer;
}

.pf-slider-value {
    flex: 0 0 auto;
    min-width: 42px;
    font-size: 12.5px;
    text-align: right;
    color: var(--pf-ink);
    font-variant-numeric: tabular-nums;
}

/* 颜色选择 */
.pf-color-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pf-color-input {
    appearance: none;
    -webkit-appearance: none;
    width: 40px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--pf-line-30);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
}

.pf-color-input::-webkit-color-swatch-wrapper {
    padding: 3px;
}

.pf-color-input::-webkit-color-swatch {
    border: 0;
    border-radius: 7px;
}

.pf-color-value {
    font-size: 12px;
    color: var(--pf-ink-faint);
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

/* 字体行：下拉 + 上传 / 删除 */
.pf-font-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pf-font-row .pf-select {
    flex: 1 1 auto;
    min-width: 0;
}

.pf-font-sample {
    margin-top: 6px;
    padding: 6px 10px;
    border: 1px dashed var(--pf-line-30);
    border-radius: 10px;
    font-size: 14px;
    color: var(--pf-ink);
    background: var(--pf-bg);
}

/* 气泡预览框：与主屏舞台同一 .lmp-scope 作用域 */
.pf-bubble-preview {
    position: relative;
    min-height: 132px;
    padding: 14px 12px;
    border: 1px solid var(--pf-line-30);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0)),
        repeating-linear-gradient(45deg, rgba(212, 212, 207, 0.12) 0 8px, transparent 8px 16px),
        var(--pf-bg);
    overflow: hidden;
}

.pf-bubble-preview .lmp-bubbles {
    position: static;
    margin: 0 auto;
    transform: none !important;
    max-width: min(var(--lmp-bubble-max-width), 100%);
    pointer-events: auto;
}

.pf-bubble-preview .lmp-bubble {
    pointer-events: auto;
}

.pf-bubble-preview-caption {
    margin: 8px 0 0;
    font-size: 11px;
    color: var(--pf-ink-faint);
    text-align: center;
}

/* 美化编辑框 */
.pf-css-editor {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 180px;
    padding: 10px 12px;
    border: 1px solid var(--pf-line-30);
    border-radius: 12px;
    background: #fbfbf9;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.6;
    color: var(--pf-ink);
    resize: vertical;
    tab-size: 2;
    -webkit-text-size-adjust: 100%;
}

.pf-css-editor:focus {
    outline: none;
    border-color: var(--pf-mint);
}

.pf-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pf-editor-actions .pf-button {
    flex: 0 0 auto;
}

.pf-editor-status {
    min-height: 16px;
    font-size: 11px;
    color: var(--pf-ink-faint);
}

.pf-editor-status.is-error {
    color: #d9776f;
}

/* 变量参考 */
.pf-var-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 220px;
    overflow: auto;
    padding: 6px 0;
}

.pf-var-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    padding: 6px 10px;
    border: 1px solid var(--pf-line-30);
    border-radius: 10px;
    background: var(--pf-card);
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.pf-var-item:active {
    border-color: var(--pf-mint);
}

.pf-var-name {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 11.5px;
    color: var(--pf-sky);
}

.pf-var-note {
    font-size: 11px;
    color: var(--pf-ink-faint);
}

.pf-var-example {
    flex-basis: 100%;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 10.5px;
    color: var(--pf-ink-faint);
    word-break: break-all;
}

/* 方案库 */
.pf-scheme-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pf-scheme {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 6px 8px 6px 12px;
    border: 1px solid var(--pf-line-30);
    border-radius: 999px;
    background: var(--pf-card);
    font-size: 12.5px;
    color: var(--pf-ink);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color var(--pf-ease), background-color var(--pf-ease);
}

.pf-scheme.is-active {
    border-color: rgba(152, 216, 200, 0.8);
    background: rgba(152, 216, 200, 0.16);
}

.pf-scheme-name {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-scheme-delete {
    appearance: none;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--pf-ink-faint);
    font-size: 14px;
    line-height: 20px;
    cursor: pointer;
}

.pf-scheme-delete:hover {
    color: #d9776f;
    background: rgba(217, 119, 111, 0.12);
}

/* 聊几句摘要列表 */
.pf-summary-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 260px;
    overflow: auto;
}

.pf-summary-item {
    padding: 8px 10px;
    border: 1px solid var(--pf-line-30);
    border-radius: 10px;
    background: var(--pf-card);
}

.pf-summary-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 11px;
    color: var(--pf-ink-faint);
}

.pf-summary-text {
    font-size: 12px;
    line-height: 1.6;
    color: var(--pf-ink);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 96px;
    overflow: auto;
}

.pf-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

/* ============================ 感知与守护（Phase 5） ============================ */

.pf-inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.pf-inline-form .pf-text-input {
    flex: 1;
    min-width: 0;
    font-size: 12px;
}

.pf-sense-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.pf-sense-item.is-allowed {
    border-color: rgba(232, 196, 120, 0.55);
    background: rgba(255, 249, 232, 0.6);
}

.pf-sense-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--pf-mist, #f4f6f8);
}

.pf-sense-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.pf-sense-icon i {
    font-style: normal;
    font-size: 15px;
    color: var(--pf-ink-faint);
}

.pf-library-badge--warn {
    color: #b8862e;
    border-color: rgba(232, 196, 120, 0.6);
}

.pf-field.is-disabled {
    opacity: 0.55;
}

.pf-guide-steps {
    margin: 6px 0 0;
    padding-left: 18px;
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--pf-ink-soft, #6b7280);
}

.pf-guide-steps li + li {
    margin-top: 2px;
}

/* ============================ 异常报告（卡片式，布局参考柔和界面风；配色沿用工厂变量） ============================ */

.pf-report {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 0 28px;
}

.pf-rp-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 18px 16px;
    border: 0;
    border-radius: 22px;
    background: var(--pf-card);
    box-shadow: 0 10px 28px rgba(74, 85, 104, 0.06), 0 1px 2px rgba(74, 85, 104, 0.04);
    transition: box-shadow var(--pf-ease), transform var(--pf-ease);
}

.pf-rp-card:hover {
    box-shadow: 0 14px 34px rgba(74, 85, 104, 0.09), 0 1px 2px rgba(74, 85, 104, 0.04);
}

.pf-rp-card--soft {
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 6px 18px rgba(74, 85, 104, 0.04);
}

.pf-rp-card--hero {
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.10), rgba(152, 216, 200, 0.14) 60%, rgba(255, 183, 197, 0.12));
    box-shadow: 0 12px 30px rgba(100, 181, 246, 0.10);
}

.pf-rp-hero-status {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.pf-rp-hero-status > .pf-diag-dot {
    width: 12px;
    height: 12px;
    margin-top: 5px;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.7);
}

.pf-rp-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.pf-rp-head-copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pf-rp-title {
    margin: 0;
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--pf-ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pf-rp-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--pf-sky);
    background: rgba(100, 181, 246, 0.12);
    border-radius: 999px;
}

.pf-rp-note {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--pf-ink-soft);
}

.pf-rp-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pf-rp-body > .pf-guide-steps {
    margin: 0;
    font-size: 12px;
    line-height: 1.75;
}

.pf-rp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 4px;
}

.pf-rp-actions .pf-button {
    border-radius: 999px;
    border-color: transparent;
    background: rgba(74, 85, 104, 0.05);
    box-shadow: none;
}

.pf-rp-actions .pf-button:hover,
.pf-rp-actions .pf-button:focus-visible {
    background: rgba(100, 181, 246, 0.12);
    transform: translateY(-1px);
}

.pf-rp-actions .pf-button--primary {
    background: rgba(100, 181, 246, 0.9);
    box-shadow: 0 6px 16px rgba(100, 181, 246, 0.28);
}

.pf-rp-actions .pf-button--primary:hover,
.pf-rp-actions .pf-button--primary:focus-visible {
    background: rgba(100, 181, 246, 1);
}

.pf-rp-actions .pf-button--whisper {
    background: transparent;
}

.pf-rp-actions .pf-button[disabled] {
    opacity: 0.4;
    pointer-events: none;
}

/* 概览数字格 */
.pf-rp-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.pf-rp-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 6px 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 4px 12px rgba(74, 85, 104, 0.05);
}

.pf-rp-tile-num {
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
    color: var(--pf-ink);
    font-variant-numeric: tabular-nums;
}

.pf-rp-tile-num--small {
    font-size: 14px;
    line-height: 20px;
}

.pf-rp-tile.is-bad .pf-rp-tile-num {
    color: #d98b8b;
}

.pf-rp-tile-label {
    font-size: 10.5px;
    letter-spacing: 0.08em;
    color: var(--pf-ink-faint);
}

/* 诊断行：点 + 标签 + 值 */
.pf-rp-rows {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pf-rp-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 14px;
    transition: background-color var(--pf-ease);
}

.pf-rp-row:hover {
    background: rgba(74, 85, 104, 0.035);
}

.pf-rp-row > .pf-diag-dot {
    margin-top: 5px;
}

.pf-rp-row-copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pf-rp-row-label {
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--pf-ink);
}

.pf-rp-row-value {
    font-size: 11.5px;
    line-height: 1.65;
    color: var(--pf-ink-soft);
    word-break: break-word;
}

.pf-rp-switch {
    border-radius: 16px;
}

.pf-rp-empty {
    margin: 0;
    padding: 12px 14px;
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--pf-ink-faint);
    text-align: center;
    background: rgba(74, 85, 104, 0.035);
    border-radius: 14px;
}

/* API 记录诊断 */
.pf-rp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pf-rp-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--pf-ink-soft);
    background: rgba(74, 85, 104, 0.05);
    border-radius: 999px;
}

.pf-rp-chip.is-ok {
    color: #4f9f80;
    background: rgba(152, 216, 200, 0.22);
}

.pf-rp-chip.is-bad {
    color: #c97b7b;
    background: rgba(255, 183, 197, 0.26);
}

.pf-rp-log {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pf-rp-log-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(74, 85, 104, 0.035);
    border-left: 3px solid transparent;
}

.pf-rp-log-item.is-ok {
    border-left-color: rgba(127, 207, 174, 0.8);
}

.pf-rp-log-item.is-failed {
    background: rgba(255, 183, 197, 0.12);
    border-left-color: rgba(232, 160, 160, 0.9);
}

.pf-rp-log-item.is-aborted {
    border-left-color: rgba(216, 207, 166, 0.9);
}

.pf-rp-log-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: var(--pf-ink-soft);
}

.pf-rp-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    border-radius: 999px;
    color: #fff;
    background: var(--pf-ink-faint);
}

.pf-rp-pill.is-ok { background: #7fcfae; }
.pf-rp-pill.is-failed { background: #e8a0a0; }
.pf-rp-pill.is-aborted { background: #d8cfa6; }

.pf-rp-log-time {
    font-variant-numeric: tabular-nums;
    color: var(--pf-ink);
}

.pf-rp-log-kind {
    color: var(--pf-ink-soft);
}

.pf-rp-log-stage {
    margin-left: auto;
    color: #c97b7b;
    letter-spacing: 0.04em;
}

.pf-rp-log-item.is-aborted .pf-rp-log-stage,
.pf-rp-log-item.is-aborted .pf-rp-log-reason {
    color: var(--pf-ink-soft);
}

.pf-rp-log-line {
    margin: 0;
    display: flex;
    gap: 8px;
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--pf-ink-soft);
    word-break: break-word;
}

.pf-rp-log-line.is-warn {
    color: #b56b6b;
}

.pf-rp-log-key {
    flex: 0 0 auto;
    color: var(--pf-ink-faint);
    letter-spacing: 0.1em;
}

.pf-rp-log-say {
    margin: 2px 0 0;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--pf-ink);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
}

.pf-rp-log-reason {
    margin: 2px 0 0;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.65;
    color: #b56b6b;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    word-break: break-word;
}

.pf-rp-log-raw {
    margin: 0;
    padding: 8px 10px;
    max-height: 120px;
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10.5px;
    line-height: 1.55;
    color: var(--pf-ink-soft);
    background: rgba(74, 85, 104, 0.06);
    border-radius: 12px;
    white-space: pre-wrap;
    word-break: break-all;
}

@media (max-width: 380px) {
    .pf-rp-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ============================ 主屏幕桌宠（运行时） ============================ */

.lmp-stage {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 2;
}

/* 「love咪 全程」：挂在 #app 顶层、各 .page 之外，须高于各全屏子层（≤100280）、低于悬浮球根层（100350） */
.lmp-stage--app {
    z-index: 100340;
}

.lmp-stage[hidden] {
    display: none;
}

.lmp-pet {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: auto;
    touch-action: none;
    cursor: grab;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    will-change: transform;
}

.lmp-pet:active {
    cursor: grabbing;
}

.lmp-canvas {
    display: block;
    pointer-events: none;
}

/* 气泡外观变量：由「内核设置 → 消息设置」改写（字体 / 字号 / 颜色），也可在「气泡美化」CSS 里整体覆盖。
   主屏桌宠舞台与工厂预览框都带 .lmp-scope，因此所见即所得。 */
.lmp-scope {
    --lmp-bubble-font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    --lmp-bubble-size: 12.5px;
    --lmp-bubble-weight: 300;
    --lmp-bubble-color: #4a5568;
    --lmp-bubble-line-height: 1.5;
    --lmp-bubble-bg: rgba(255, 255, 255, 0.96);
    --lmp-bubble-border: 1px solid rgba(212, 212, 207, 0.6);
    --lmp-bubble-radius: 12px;
    --lmp-bubble-padding: 6px 12px;
    --lmp-bubble-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    --lmp-bubble-max-width: 260px;
    --lmp-bubble-gap: 6px;
    --lmp-trans-color: #8a94a6;
    --lmp-trans-border: 1px dashed rgba(212, 212, 207, 0.8);
    --lmp-trans-toggle-color: #64b5f6;
    --lmp-thinking-color: #8a94a6;
    --lmp-thinking-bg: rgba(255, 255, 255, 0.9);
    --lmp-dot-color: #98d8c8;
    --lmp-local-color: #6b7280;
    --lmp-local-bg: rgba(250, 250, 250, 0.94);
}

/* 气泡栈：整体挂在头顶，新气泡在下、旧的往上顶；最多 3 个（运行时控制） */
.lmp-bubbles {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--lmp-bubble-gap);
    width: max-content;
    max-width: min(var(--lmp-bubble-max-width), calc(100% - 12px));
    pointer-events: none;
    will-change: transform;
}

.lmp-bubbles:empty,
.lmp-bubbles.is-suppressed {
    visibility: hidden;
}

.lmp-bubble {
    position: relative;
    max-width: 100%;
    padding: var(--lmp-bubble-padding);
    font-family: var(--lmp-bubble-font);
    font-size: var(--lmp-bubble-size);
    font-weight: var(--lmp-bubble-weight);
    line-height: var(--lmp-bubble-line-height);
    color: var(--lmp-bubble-color);
    background: var(--lmp-bubble-bg);
    border: var(--lmp-bubble-border);
    border-radius: var(--lmp-bubble-radius);
    box-shadow: var(--lmp-bubble-shadow);
    opacity: 0;
    transform: translate3d(0, 0, 0);
    transition: opacity 320ms ease;
    pointer-events: none;
    white-space: pre-wrap;
    word-break: break-word;
    will-change: transform, opacity;
}

.lmp-bubble.is-visible {
    opacity: 1;
}

.lmp-bubble[hidden] {
    display: none;
}

/* 「正在回复……」：点点 + 文案，比正文淡一些 */
.lmp-bubble.is-thinking {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--lmp-thinking-color);
    background: var(--lmp-thinking-bg);
    border-style: dashed;
}

.lmp-bubble-thinking-label {
    font-size: 0.92em;
}

/* 本地提示（排队 / 失败 / 未配置）：比人格回复淡一档 */
.lmp-bubble.is-local {
    color: var(--lmp-local-color);
    background: var(--lmp-local-bg);
}

/* 双语气泡：原文 + 「译」按钮 / 展开的中文译文 */
.lmp-bubble.has-toggle {
    pointer-events: auto;
    cursor: pointer;
}

.lmp-bubble-main {
    display: block;
}

.lmp-bubble-trans-toggle {
    appearance: none;
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
    padding: 0 6px;
    height: 16px;
    line-height: 16px;
    font-family: inherit;
    font-size: 10px;
    font-weight: 400;
    color: var(--lmp-trans-toggle-color);
    background: color-mix(in srgb, var(--lmp-trans-toggle-color) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--lmp-trans-toggle-color) 45%, transparent);
    border-radius: 999px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

@supports not (background: color-mix(in srgb, red 10%, transparent)) {
    .lmp-bubble-trans-toggle {
        background: rgba(100, 181, 246, 0.12);
        border-color: rgba(100, 181, 246, 0.45);
    }
}

.lmp-bubble.is-expanded .lmp-bubble-trans-toggle {
    color: #b0b8c4;
    background: transparent;
    border-color: rgba(212, 212, 207, 0.7);
}

.lmp-bubble-trans {
    display: block;
    margin-top: 5px;
    padding-top: 5px;
    border-top: var(--lmp-trans-border);
    font-size: 0.92em;
    color: var(--lmp-trans-color);
}

.lmp-bubble-trans[hidden] {
    display: none;
}

.lmp-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    height: 12px;
}

.lmp-dots i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--lmp-dot-color);
    animation: lmp-dot-bounce 1.1s ease-in-out infinite;
}

.lmp-dots i:nth-child(2) { animation-delay: 0.18s; }
.lmp-dots i:nth-child(3) { animation-delay: 0.36s; }

@keyframes lmp-dot-bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
    40% { transform: translateY(-3px); opacity: 1; }
}

/* 长按菜单：仿 iOS 悬浮球（AssistiveTouch）快捷菜单 —— 方正毛玻璃面板 + 图标栅格。
   配色变量由运行时按菜单底下画面的亮度写入（浅底 → 深面板白字；深底 → 浅面板深字），
   这里的默认值只是采样失败时的兜底（等同浅色画面）。 */
.lmp-menu {
    --lmp-menu-bg: rgba(30, 30, 34, 0.84);
    --lmp-menu-bg-solid: rgba(30, 30, 34, 0.97);
    --lmp-menu-fg: #fff;
    --lmp-menu-fg-soft: rgba(255, 255, 255, 0.62);
    --lmp-menu-icon-bg: rgba(255, 255, 255, 0.12);
    --lmp-menu-press: rgba(255, 255, 255, 0.18);
    --lmp-menu-border: rgba(255, 255, 255, 0.1);
    --lmp-menu-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    --lmp-menu-cell: 68px;
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    grid-template-columns: repeat(3, var(--lmp-menu-cell));
    gap: 4px;
    padding: 10px;
    box-sizing: content-box;
    color: var(--lmp-menu-fg);
    background: var(--lmp-menu-bg-solid);
    border: 1px solid var(--lmp-menu-border);
    border-radius: 26px;
    box-shadow: var(--lmp-menu-shadow);
    pointer-events: auto;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 3;
    will-change: transform;
    animation: lmp-pop 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
    transition: background-color 180ms ease, color 180ms ease;
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .lmp-menu {
        background: var(--lmp-menu-bg);
        -webkit-backdrop-filter: blur(22px) saturate(1.5);
        backdrop-filter: blur(22px) saturate(1.5);
    }
}

.lmp-menu[data-lmp-cols="2"] {
    grid-template-columns: repeat(2, var(--lmp-menu-cell));
}

.lmp-menu[hidden] {
    display: none;
}

@keyframes lmp-pop {
    from { opacity: 0; transform: scale(0.94); }
    to { opacity: 1; }
}

.lmp-menu-item {
    appearance: none;
    border: 0;
    margin: 0;
    background: transparent;
    width: var(--lmp-menu-cell);
    height: var(--lmp-menu-cell);
    padding: 6px 2px 5px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    color: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    transition: background-color 120ms ease, transform 120ms ease;
}

.lmp-menu-item[hidden] {
    display: none;
}

.lmp-menu-item:active {
    background: var(--lmp-menu-press);
    transform: scale(0.94);
}

.lmp-menu-icon-wrap {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--lmp-menu-icon-bg);
    color: inherit;
    flex: 0 0 auto;
}

.lmp-menu-icon {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lmp-menu-label {
    display: block;
    max-width: 100%;
    font-size: 11px;
    line-height: 1.15;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}

/* 语音关着：图标淡一档，一眼看出当前状态 */
.lmp-menu-item.is-off .lmp-menu-icon-wrap {
    color: var(--lmp-menu-fg-soft);
}

/* 「先躲起来」这类退出项整体淡一档 */
.lmp-menu-item--quiet {
    color: var(--lmp-menu-fg-soft);
}

/* 气泡输入框：压在脚底基线上方，桌宠自动上抬 */
.lmp-composer {
    position: absolute;
    margin: 0;
    left: 10px;
    right: 10px;
    bottom: 88px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 6px 6px 12px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(212, 212, 207, 0.7);
    border-radius: 22px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    pointer-events: auto;
    z-index: 3;
    animation: lmp-pop 180ms ease-out;
}

.lmp-composer[hidden] {
    display: none;
}

.lmp-composer-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    /* iOS Safari 聚焦小于 16px 的输入框会自动缩放，打乱桌宠与键盘的可视区域。 */
    font-size: 16px;
    color: #4a5568;
    padding: 6px 0;
}

.lmp-composer-input::placeholder {
    color: #b0b8c4;
}

.lmp-composer-send,
.lmp-composer-close {
    appearance: none;
    border: 0;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.lmp-composer-send {
    background: #64b5f6;
    color: #fff;
}

.lmp-composer-send svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lmp-composer-close {
    background: transparent;
    color: #b0b8c4;
    font-size: 18px;
    line-height: 1;
}

/* ============================ 桌宠内核设置 · 柔和界面风（.claude/柔和界面风.md） ============================
   根节点带 .pf-soft（内核设置枢纽与五个子界面激活时由 showView 加上）。要点：border-0、rounded-2xl/3xl（18～24px）、
   shadow-lg 带透明度、浅底 bg-slate-50 / gray-50、低饱和主色、胶囊按钮、圆形图标底、卡片间距宽松；禁止硬边框与硬阴影。
   配色沿用工厂变量（sky / mint / pink / ink），只改形体与层次，不引入新色相。 */

#love-mi-pet-factory-app.pf-soft {
    --pf-soft-radius: 22px;
    --pf-soft-radius-sm: 16px;
    --pf-soft-field: #f4f6f8;
    --pf-soft-shadow: 0 10px 28px rgba(74, 85, 104, 0.06), 0 1px 2px rgba(74, 85, 104, 0.04);
    --pf-soft-shadow-hover: 0 14px 34px rgba(74, 85, 104, 0.09), 0 1px 2px rgba(74, 85, 104, 0.04);
    --pf-soft-shadow-sky: 0 10px 24px rgba(100, 181, 246, 0.22);
}

.pf-soft .pf-view {
    padding-top: 18px;
}

.pf-soft .pf-section {
    gap: 12px;
    padding: 4px 0 26px;
}

.pf-soft .pf-section-kicker {
    margin-bottom: 2px;
    padding-left: 4px;
}

/* 卡片类容器：行 / 字段 / 开关行 / 折叠区 / 展示框 → 无边框 + 大圆角 + 柔和阴影 */
.pf-soft .pf-row,
.pf-soft .pf-field,
.pf-soft .pf-switch-row,
.pf-soft .pf-details,
.pf-soft .pf-preview-box {
    border: 0;
    border-radius: var(--pf-soft-radius);
    background: var(--pf-card);
    box-shadow: var(--pf-soft-shadow);
    transition: box-shadow var(--pf-ease), transform var(--pf-ease);
}

.pf-soft .pf-row,
.pf-soft .pf-switch-row {
    padding: 15px 18px;
}

.pf-soft .pf-field {
    padding: 16px 18px;
    gap: 10px;
}

.pf-soft .pf-details {
    padding: 0 18px;
}

.pf-soft .pf-row:hover,
.pf-soft .pf-row:focus-visible,
.pf-soft .pf-switch-row:hover {
    box-shadow: var(--pf-soft-shadow-hover);
    transform: translateY(-1px);
}

.pf-soft .pf-row--inline {
    padding: 12px 14px;
    background: var(--pf-soft-field);
    box-shadow: none;
    border-radius: var(--pf-soft-radius-sm);
}

.pf-soft .pf-row--inline:hover {
    transform: none;
    box-shadow: none;
    background: #eef2f5;
}

.pf-soft .pf-switch-row--sub {
    margin-left: 12px;
    padding-left: 16px;
    border-left: 0;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 6px 18px rgba(74, 85, 104, 0.04);
}

.pf-soft .pf-switch-row.is-disabled,
.pf-soft .pf-switch-row.is-disabled:hover {
    transform: none;
}

.pf-soft .pf-section.is-disabled > .pf-field,
.pf-soft .pf-section.is-disabled > .pf-switch-row {
    box-shadow: none;
    background: rgba(255, 255, 255, 0.6);
}

/* 成品桌宠展示框 */
.pf-soft .pf-core-preview {
    padding: 2px 0 24px;
}

.pf-soft .pf-preview-box {
    background:
        radial-gradient(circle at 50% 100%, rgba(152, 216, 200, 0.14), transparent 62%),
        linear-gradient(180deg, #ffffff, #fbfcfd);
}

.pf-soft .pf-preview-stage {
    background-image: none;
}

/* 枢纽菜单卡片：圆形图标底 + 标题 + 一行说明 + 现状摘要 */
.pf-core-menu {
    gap: 12px;
}

.pf-core-card {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 44px 16px 16px;
    text-align: left;
    border: 0;
    border-radius: var(--pf-soft-radius, 22px);
    background: var(--pf-card);
    box-shadow: var(--pf-soft-shadow, 0 10px 28px rgba(74, 85, 104, 0.06));
    transition: box-shadow var(--pf-ease), transform var(--pf-ease);
}

.pf-core-card:hover,
.pf-core-card:focus-visible {
    box-shadow: var(--pf-soft-shadow-hover, 0 14px 34px rgba(74, 85, 104, 0.09));
    transform: translateY(-2px);
    outline: none;
}

.pf-core-card > .pf-chevron {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pf-ink-faint);
}

.pf-core-icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(74, 85, 104, 0.06);
    color: var(--pf-ink-soft);
}

.pf-core-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pf-core-icon--sky { background: rgba(100, 181, 246, 0.14); color: #4f9fe0; }
.pf-core-icon--mint { background: rgba(152, 216, 200, 0.22); color: #4faa8e; }
.pf-core-icon--pink { background: rgba(255, 183, 197, 0.24); color: #d9788e; }
.pf-core-icon--lilac { background: rgba(196, 181, 253, 0.24); color: #8b78d6; }
.pf-core-icon--amber { background: rgba(253, 224, 150, 0.30); color: #b8902e; }

.pf-core-card-copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pf-core-card-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 15.5px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--pf-ink);
}

.pf-core-card-note {
    font-size: 12px;
    line-height: 1.6;
    color: var(--pf-ink-soft);
}

.pf-core-card-meta {
    margin-top: 2px;
    font-size: 11px;
    letter-spacing: 0.03em;
    color: var(--pf-ink-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 子界面页首说明 / 人格门 */
.pf-page-intro {
    margin: 0 4px 16px;
    font-size: 12.5px;
    line-height: 1.75;
    color: var(--pf-ink-soft);
}

.pf-page-gate {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 18px;
    padding: 18px 18px 16px;
    border-radius: var(--pf-soft-radius, 22px);
    background: linear-gradient(135deg, rgba(255, 183, 197, 0.16), rgba(100, 181, 246, 0.10));
    box-shadow: 0 10px 26px rgba(255, 183, 197, 0.16);
}

.pf-page-gate-title {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--pf-ink);
}

.pf-page-gate-note {
    font-size: 12px;
    line-height: 1.7;
    color: var(--pf-ink-soft);
}

.pf-page-gate .pf-button {
    margin-top: 6px;
}

/* 无障碍权限卡（功能权限页首） */
.pf-access-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
    padding: 18px 18px 16px;
    border-radius: var(--pf-soft-radius, 22px);
    background: linear-gradient(135deg, rgba(253, 224, 150, 0.22), rgba(255, 255, 255, 0.9) 70%);
    box-shadow: 0 10px 26px rgba(184, 144, 46, 0.10);
}

.pf-access-card.is-ok {
    background: linear-gradient(135deg, rgba(152, 216, 200, 0.22), rgba(255, 255, 255, 0.9) 70%);
    box-shadow: 0 10px 26px rgba(90, 169, 139, 0.10);
}

.pf-access-head {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pf-access-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--pf-ink);
}

.pf-access-note {
    font-size: 12px;
    line-height: 1.6;
    color: var(--pf-ink-soft);
}

.pf-access-card .pf-row-note {
    margin: 0 2px;
}

/* 开关行内的跳转链接（如「读屏参数与自主浏览 →」） */
.pf-link-button {
    align-self: flex-start;
    margin-top: 4px;
    padding: 0;
    font-size: 11.5px;
    letter-spacing: 0.04em;
    color: var(--pf-sky);
    background: transparent;
    border: 0;
}

.pf-link-button:hover,
.pf-link-button:focus-visible {
    text-decoration: underline;
    outline: none;
}

/* 消息设置子界面正文 */
.pf-message-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 按钮：胶囊化、去边框、浅底。
   带 #love-mi-pet-factory-app 前缀是为了压过顶部的 `#love-mi-pet-factory-app button { font: inherit; color: inherit }` 重置，
   否则字号与文字色会退回继承值。 */
#love-mi-pet-factory-app.pf-soft .pf-button {
    border: 0;
    border-radius: 999px;
    font-size: 13px;
    background: rgba(74, 85, 104, 0.05);
    color: var(--pf-ink-soft);
    box-shadow: none;
    transition: background-color var(--pf-ease), color var(--pf-ease), box-shadow var(--pf-ease), transform var(--pf-ease);
}

#love-mi-pet-factory-app.pf-soft .pf-button--tiny {
    font-size: 12px;
}

#love-mi-pet-factory-app.pf-soft .pf-button:hover,
#love-mi-pet-factory-app.pf-soft .pf-button:focus-visible {
    background: rgba(100, 181, 246, 0.12);
    color: var(--pf-sky);
    transform: translateY(-1px);
}

#love-mi-pet-factory-app.pf-soft .pf-button--primary {
    background: var(--pf-sky);
    color: #fff;
    box-shadow: var(--pf-soft-shadow-sky);
}

#love-mi-pet-factory-app.pf-soft .pf-button--primary:hover,
#love-mi-pet-factory-app.pf-soft .pf-button--primary:focus-visible {
    background: #58acef;
    color: #fff;
    box-shadow: 0 14px 30px rgba(100, 181, 246, 0.3);
}

#love-mi-pet-factory-app.pf-soft .pf-button--secondary {
    background: rgba(152, 216, 200, 0.16);
    color: #4faa8e;
}

#love-mi-pet-factory-app.pf-soft .pf-button--secondary:hover,
#love-mi-pet-factory-app.pf-soft .pf-button--secondary:focus-visible {
    background: rgba(152, 216, 200, 0.28);
    color: #3d947a;
}

#love-mi-pet-factory-app.pf-soft .pf-button--whisper {
    background: rgba(74, 85, 104, 0.035);
    color: var(--pf-ink-faint);
}

#love-mi-pet-factory-app.pf-soft .pf-button--whisper:hover,
#love-mi-pet-factory-app.pf-soft .pf-button--whisper:focus-visible {
    background: rgba(74, 85, 104, 0.07);
    color: var(--pf-ink-soft);
}

#love-mi-pet-factory-app.pf-soft .pf-button:disabled {
    transform: none;
}

#love-mi-pet-factory-app.pf-soft .pf-link-button {
    font-size: 11.5px;
    color: var(--pf-sky);
}

/* 芯片 / 下拉 / 步进 / 输入：浅底、无边框 */
#love-mi-pet-factory-app.pf-soft .pf-chip {
    border: 0;
    background: var(--pf-soft-field);
    color: var(--pf-ink-soft);
    font-size: 12px;
    min-height: 30px;
    padding: 0 14px;
}

#love-mi-pet-factory-app.pf-soft .pf-chip.is-active {
    background: rgba(100, 181, 246, 0.14);
    color: #3f8fd2;
    box-shadow: 0 6px 14px rgba(100, 181, 246, 0.14);
}

#love-mi-pet-factory-app.pf-soft .pf-chip.is-muted {
    border: 0;
    background: rgba(74, 85, 104, 0.04);
}

.pf-soft .pf-select {
    border: 0;
    border-radius: 12px;
    background: var(--pf-soft-field);
    min-height: 34px;
    padding: 0 12px;
}

#love-mi-pet-factory-app.pf-soft .pf-stepper-button {
    border: 0;
    border-radius: 10px;
    font-size: 13px;
    background: var(--pf-soft-field);
    color: var(--pf-ink-soft);
}

#love-mi-pet-factory-app.pf-soft .pf-stepper-button:hover,
#love-mi-pet-factory-app.pf-soft .pf-stepper-button:focus-visible {
    background: rgba(100, 181, 246, 0.14);
    color: var(--pf-sky);
}

/* 字段头：标签不换行，右侧提示可折行；行内字段（标签 + 下拉）同理 */
.pf-soft .pf-field-head .pf-field-label,
.pf-soft .pf-field--inline > .pf-field-label {
    flex: 0 0 auto;
    white-space: nowrap;
}

.pf-soft .pf-field--inline > .pf-select {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
}

.pf-soft .pf-field-hint {
    white-space: normal;
    text-align: right;
}

.pf-soft .pf-stepper-input {
    border: 0;
    border-radius: 10px;
    background: var(--pf-soft-field);
}

.pf-soft .pf-stepper-input:focus {
    background: rgba(100, 181, 246, 0.10);
}

.pf-soft .pf-text-input {
    padding: 8px 12px;
    border: 0;
    border-radius: 12px;
    background: var(--pf-soft-field);
}

.pf-soft .pf-text-input:focus {
    background: rgba(100, 181, 246, 0.10);
}

.pf-soft .pf-lines-input,
.pf-soft .pf-css-editor,
.pf-soft .pf-font-sample {
    border: 0;
    border-radius: 14px;
    background: var(--pf-soft-field);
}

.pf-soft .pf-lines-input:focus,
.pf-soft .pf-css-editor:focus {
    background: #eef4f9;
}

.pf-soft .pf-color-input {
    border: 0;
    background: var(--pf-soft-field);
    border-radius: 12px;
}

.pf-soft .pf-var-item,
.pf-soft .pf-summary-item {
    border: 0;
    border-radius: 14px;
    background: var(--pf-soft-field);
}

.pf-soft .pf-scheme {
    border: 0;
    background: var(--pf-soft-field);
}

.pf-soft .pf-scheme.is-active {
    background: rgba(152, 216, 200, 0.22);
}

/* 守护名单 / 白名单条目 */
.pf-soft .pf-library-item {
    border: 0;
    border-radius: var(--pf-soft-radius-sm);
    background: var(--pf-soft-field);
}

.pf-soft .pf-sense-item.is-allowed {
    background: rgba(253, 224, 150, 0.22);
}

.pf-soft .pf-library-thumb {
    border: 0;
    border-radius: 14px;
    background: var(--pf-card);
}

.pf-soft .pf-library-badge {
    border: 0;
    background: rgba(152, 216, 200, 0.18);
}

.pf-soft .pf-library-badge--warn {
    background: rgba(253, 224, 150, 0.32);
}

/* 开关本体：填充底而非描边 */
.pf-soft .pf-switch i {
    border: 0;
    background: rgba(74, 85, 104, 0.10);
}

.pf-soft .pf-switch i::after {
    background: #fff;
    box-shadow: 0 1px 3px rgba(74, 85, 104, 0.18);
}

.pf-soft .pf-switch input:checked + i {
    background: var(--pf-mint);
}

.pf-soft .pf-switch input:checked + i::after {
    background: #fff;
}

/* 角标：浅底胶囊 */
.pf-soft .pf-badge {
    border: 0;
    background: rgba(74, 85, 104, 0.06);
}

.pf-soft .pf-badge--live {
    background: rgba(90, 169, 139, 0.12);
}

.pf-soft .pf-badge--pending {
    background: rgba(184, 160, 106, 0.14);
}

/* 子设置竖线 → 淡色圆角底 */
.pf-soft .pf-subfields {
    margin-left: 0;
    padding: 12px 12px 12px 14px;
    border-left: 0;
    border-radius: var(--pf-soft-radius-sm);
    background: rgba(152, 216, 200, 0.08);
}

.pf-soft .pf-subfields--permission {
    background: rgba(74, 85, 104, 0.035);
}

.pf-soft .pf-subfields > .pf-field,
.pf-soft .pf-subfields > .pf-switch-row {
    box-shadow: none;
    background: var(--pf-card);
}

.pf-soft .pf-footnote {
    margin-top: 2px;
}

/* ============================ 小屏与横屏 ============================ */

@media (max-height: 640px) {
    #love-mi-pet-factory-app {
        --pf-topbar-h: 52px;
    }
    .pf-home-intro {
        padding: 10px 0 20px;
    }
    .pf-section {
        padding-bottom: 20px;
    }
    .pf-matting-stage {
        flex-basis: 60%;
    }
}

@media (orientation: landscape) and (max-height: 520px) {
    .pf-matting {
        flex-direction: row;
    }
    .pf-matting-stage {
        flex: 0 0 58%;
        border-bottom: 0;
        border-right: 1px solid var(--pf-line-30);
    }
}

@media (prefers-reduced-motion: reduce) {
    #love-mi-pet-factory-app * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
