.pfm { margin-top: 18px; }
.pfm-controls { display: flex; align-items: end; gap: 9px; flex-wrap: wrap; margin-bottom: 12px; }
.pfm-controls label { display: grid; gap: 4px; color: var(--text-faint); font-family: var(--cinzel); font-size: .58rem; letter-spacing: .13em; text-transform: uppercase; }
.pfm-controls input, .pfm-controls select { min-height: 39px; min-width: 190px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-3); color: var(--text); font-family: var(--crimson); font-size: .92rem; outline: none; }
.pfm-controls input { min-width: min(330px, 78vw); }
.pfm-controls input:focus, .pfm-controls select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-faint); }
.pfm-legend { display: flex; gap: 13px; flex-wrap: wrap; margin: 0 0 13px; color: var(--text-faint); font-size: .76rem; }
.pfm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pfm-legend i { width: 24px; height: 0; border-top: 2px solid var(--gold); }
.pfm-legend .correspondence { border-top-style: dashed; }
.pfm-legend .typology { border-top: 3px double var(--gold); }
.pfm-selected { display: none; margin: 11px 0 15px; padding: 13px 15px; border-left: 3px solid var(--gold); background: var(--gold-faint); }
.pfm-selected.open { display: grid; grid-template-columns: minmax(160px, .5fr) minmax(240px, 1.5fr); gap: 7px 18px; }
.pfm-selected strong { color: var(--gold-bright); font-family: var(--cinzel); font-size: .8rem; font-weight: 500; line-height: 1.35; }
.pfm-selected p { margin: 0; color: var(--text-dim); font-size: .86rem; line-height: 1.45; }
.pfm-selected .pfm-fathers { grid-column: 2; color: var(--text-faint); font-style: italic; }
.pfm-selected .pfm-sources { grid-column: 2; display: flex; gap: 8px; flex-wrap: wrap; }
.pfm-selected .pfm-sources a { color: var(--gold); font-size: .77rem; text-decoration: none; }
.pfm-count { margin-bottom: 8px; color: var(--text-faint); font-size: .8rem; }
.pfm-map { display: grid; gap: 4px; }
.pfm-group { margin: 14px 0 3px; padding-bottom: 5px; border-bottom: 1px solid var(--gold-border); color: var(--gold); font-family: var(--cinzel); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; }
.pfm-row { --pfm-color: var(--gold); width: 100%; display: grid; grid-template-columns: minmax(150px, 1fr) minmax(170px, .78fr) minmax(150px, 1fr); align-items: stretch; padding: 0; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.pfm-row:hover, .pfm-row:focus-visible, .pfm-row.selected { border-color: var(--gold-border); background: rgba(201,162,77,.045); outline: none; }
.pfm-node { min-width: 0; padding: 9px 11px; background: var(--bg-3); }
.pfm-node small { display: block; margin-bottom: 2px; color: var(--text-faint); font-family: var(--cinzel); font-size: .52rem; letter-spacing: .12em; text-transform: uppercase; }
.pfm-node b { display: block; overflow: hidden; color: var(--text); font-size: .82rem; font-weight: 600; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.pfm-bridge { position: relative; display: grid; place-items: center; min-width: 0; padding: 7px 10px; color: var(--text-dim); font-size: .72rem; text-align: center; }
.pfm-bridge::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; border-top: 2px solid var(--pfm-color); opacity: .65; }
.pfm-row[data-method="correspondence"] .pfm-bridge::before { border-top-style: dashed; }
.pfm-row[data-method="typology"] .pfm-bridge::before { border-top: 3px double var(--pfm-color); }
.pfm-bridge span { position: relative; z-index: 1; max-width: 150px; padding: 2px 7px; border-radius: 999px; background: var(--bg-2); color: var(--text-dim); font-family: var(--cinzel); font-size: .51rem; letter-spacing: .07em; line-height: 1.3; text-transform: uppercase; }
.pfm-empty { padding: 24px 0; color: var(--text-dim); font-style: italic; }
.pfm-sources-note { margin-top: 15px; border-top: 1px solid var(--border); padding-top: 11px; }
.pfm-sources-note summary { color: var(--gold); cursor: pointer; font-family: var(--cinzel); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; }
.pfm-source-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 6px 15px; margin-top: 10px; }
.pfm-source-list a { color: var(--text-dim); font-size: .82rem; text-decoration: none; }
.pfm-source-list a:hover { color: var(--gold); }
.prophecy-catalog-divider { margin: 30px 0 12px; padding-top: 22px; border-top: 1px solid var(--gold-border); }
.prophecy-catalog-divider h3 { margin: 0 0 5px; color: var(--gold-bright); font-family: var(--cinzel); font-size: .94rem; font-weight: 500; }
.prophecy-catalog-divider p { margin: 0 0 12px; color: var(--text-dim); font-size: .87rem; }

@media (max-width: 720px) {
  .pfm-controls label, .pfm-controls input, .pfm-controls select { width: 100%; min-width: 0; }
  .pfm-row { grid-template-columns: 1fr; }
  .pfm-node b { white-space: normal; }
  .pfm-bridge { min-height: 42px; }
  .pfm-bridge::before { top: 0; bottom: 0; left: 50%; right: auto; border-top: 0!important; border-left: 2px solid var(--pfm-color); }
  .pfm-row[data-method="correspondence"] .pfm-bridge::before { border-left-style: dashed; }
  .pfm-row[data-method="typology"] .pfm-bridge::before { border-left: 3px double var(--pfm-color); }
  .pfm-selected.open { grid-template-columns: 1fr; }
  .pfm-selected .pfm-fathers, .pfm-selected .pfm-sources { grid-column: 1; }
}
