/* Shared authored panels/node frames; each affinity supplies its own glyphs. */
.passive-panel { width:min(1520px,calc(100vw - 32px));--ui-window-height:calc(100dvh - 32px);padding:26px 28px 28px; }
dialog.passive-panel { inset:16px;margin:0 auto; }
.passive-affinities { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:10px 0 14px;flex:none; }
.passive-affinity.ui-button { display:flex;align-items:center;gap:12px;height:57px;padding:5px 18px;border:6px solid transparent;border-radius:0;border-image:var(--ui-frame-utility-image) var(--ui-frame-utility-slice) fill / 6px / 0 stretch; }
.passive-affinity img { width:38px;height:38px;object-fit:contain;flex:none; }
.passive-affinity span { font-family:var(--ui-font-heading);font-size:19px; }
.passive-affinity small { margin-left:auto;color:var(--ui-muted);font-size:10px;letter-spacing:.07em; }
.passive-affinity[aria-selected="true"] { color:var(--ui-heading);background:var(--campaign-action-primary-background);filter:brightness(1.18); }
.passive-content { position:relative; }
.passive-layout { height:100%;display:grid;grid-template-columns:214px minmax(0,1fr);gap:18px; }
.passive-sidebar { padding:0 14px 10px 0;border-right:1px solid var(--ui-line); }
.passive-identity { text-align:center;display:grid;justify-items:center;gap:0; }
.passive-identity>img { width:98px;height:98px;object-fit:contain; }
.passive-identity h3 { margin:0;font:25px var(--ui-font-heading);color:var(--ui-heading); }
.passive-identity>span { font-size:12px;color:var(--ui-muted);margin-top:5px;font-variant-numeric:tabular-nums; }
.passive-sidebar h4,.passive-selectors h4 { font-size:10px;font-weight:500;text-transform:uppercase;letter-spacing:.16em;color:var(--ui-muted);margin:20px 0 9px; }
.passive-selectors { position:absolute;top:0;left:0;z-index:2;width:176px; }
.passive-selectors>div:first-child h4 { margin-top:0; }
.passive-selectors .passive-role { min-height:40px;font-size:12px;gap:8px; }
.passive-selectors .passive-role img { width:28px;height:28px; }
.passive-role-options { display:flex;flex-direction:column;gap:5px; }
.passive-role.ui-button { display:flex;align-items:center;gap:12px;padding:2px 10px;min-height:47px;transition:filter .18s ease,background-color .18s ease; }
.passive-role img { width:32px;height:32px;object-fit:contain; }
.passive-role[aria-pressed="true"] { filter:brightness(1.24);color:var(--ui-heading);background:var(--campaign-action-primary-background); }
.passive-bonuses { min-height:116px; }
.passive-bonus { display:grid;grid-template-columns:22px 1fr auto;gap:6px;align-items:center;margin:8px 0;font-size:11px; }
.passive-bonus img { width:22px;height:22px;object-fit:contain; }
.passive-bonus { background:none; }
.passive-bonus-label { color:var(--ui-muted); }
.passive-bonus strong { font-weight:500;color:inherit;font-variant-numeric:tabular-nums; }
.passive-map { position:relative;display:flex;flex-direction:column;min-width:0;min-height:0; }
.passive-viewport { position:relative;display:grid;place-items:center;flex:1;min-height:0;min-width:0;overflow:clip; }
.passive-sizer { position:relative;width:900px;height:850px; }
.passive-canvas { position:absolute;left:0;top:0;width:900px;height:850px;transform-origin:top left;isolation:isolate; }
.passive-canvas { --passive-minor-frame:url('/assets/passives/divine-minor-frame-v1.png');--passive-major-frame:url('/assets/passives/divine-major-frame-v1.png');--passive-ultimate-frame:url('/assets/passives/divine-ultimate-frame-v1.png'); }
.passive-lines { position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none; }
.passive-lines path { fill:none;stroke:#8b789557;stroke-width:2;transition:stroke .18s ease; }
.passive-lines path.chosen { stroke:#dac492; }
.passive-node { position:absolute;display:grid;place-items:center;transform:translate(-50%,-50%);width:30px;height:30px;padding:0;border:0;border-radius:0;background:var(--passive-minor-frame) center/contain no-repeat;isolation:isolate;transition:filter .18s ease,opacity .18s ease; }
.passive-node.major { width:52px;height:52px;background-image:var(--passive-major-frame); }
.passive-node>img { width:66%;height:66%;object-fit:contain;pointer-events:none; }
.passive-node.major>img { width:48%;height:48%; }
.passive-node.unwritten { opacity:.55;filter:saturate(.5); }
.passive-node:not(.unwritten):hover { filter:brightness(1.35) drop-shadow(0 0 5px #e8ce9355); }
.passive-node.chosen { filter:brightness(1.23) drop-shadow(0 0 7px #dfc58b99); }
.passive-node:focus-visible { outline:1px solid var(--ui-focus);outline-offset:4px; }
.passive-root { position:absolute;width:58px;height:58px;transform:translate(-50%,-50%);display:grid;place-items:center;background:var(--passive-major-frame) center/contain no-repeat; }
.passive-root img { width:29px;height:29px;object-fit:contain; }
.passive-ultimates { position:absolute;top:8px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:26px; }
.passive-ultimate { position:relative;display:grid;place-items:center;flex:none;width:84px;height:84px;padding:0;border:0;border-radius:0;background:var(--passive-ultimate-frame) center/contain no-repeat; }
.passive-ultimate:disabled { opacity:.72; }
.passive-ultimate { transition:filter .18s ease,opacity .18s ease; }
.passive-ultimate[aria-disabled="true"] { opacity:.5;filter:saturate(.5); }
.passive-ultimate:not(:disabled):hover { filter:brightness(1.35) drop-shadow(0 0 5px #e8ce9355); }
.passive-ultimate.chosen { filter:brightness(1.25) drop-shadow(0 0 9px #dfc58bcc); }
.passive-ultimate:focus-visible { outline:1px solid var(--ui-focus);outline-offset:4px; }
.passive-ultimate>img { width:30px;height:30px;object-fit:contain;pointer-events:none; }
.passive-footer { display:flex;align-items:center;justify-content:space-between;gap:16px;padding-top:10px;margin-top:10px;border-top:1px solid var(--ui-line);font-size:11px;min-height:41px; }
#passive-points { color:var(--ui-heading);font-variant-numeric:tabular-nums; }
.passive-empty { height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--ui-muted); }
.passive-empty>img { width:150px;height:150px;object-fit:contain;opacity:.7; }
.passive-empty h3 { font:28px var(--ui-font-heading);color:var(--ui-heading);margin:8px 0; }
.passive-empty p { font-size:12px; }
@media(max-width:900px) {
  .passive-layout { grid-template-columns:168px minmax(0,1fr);gap:12px; }
  .passive-affinity small { display:none; }
  .passive-sidebar { padding-right:10px; }
  .passive-panel .panel-header { flex-wrap:wrap; }
  .passive-panel .panel-header .menu-nav { flex-wrap:wrap; }
  .passive-selectors { position:static;display:flex;gap:10px;width:auto;flex-wrap:wrap;padding-bottom:8px; }
  .passive-selectors>div { min-width:0;flex:1 1 100%; }
  .passive-role-options { flex-direction:row;flex-wrap:wrap; }
  .passive-role.ui-button { flex:1 1 96px;gap:5px;padding-inline:5px; }
}
@media(max-width:600px) {
  .passive-panel { width:calc(100vw - 12px);--ui-window-height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);padding:8px; }
  dialog.passive-panel { inset:6px; }
  .passive-affinities { gap:4px;margin-bottom:8px; }
  .passive-affinity.ui-button { padding:3px;gap:4px;height:45px;justify-content:center; }
  .passive-affinity img { width:22px;height:22px; }
  .passive-affinity span { font-size:13px; }
  .passive-layout { grid-template-columns:minmax(0,1fr);gap:8px; }
  .passive-sidebar { display:none; }
  .passive-identity,.passive-sidebar h4,.passive-bonuses { display:none; }
  .passive-role-options { flex-direction:row; }
  .passive-role.ui-button { flex:1;gap:5px;min-height:38px;padding:2px 5px;font-size:11px; }
  .passive-role img { width:23px;height:23px; }
  .passive-selectors { position:static;display:flex;gap:10px;width:auto;flex-wrap:wrap;padding-bottom:8px; }
  .passive-selectors h4 { margin:0 0 4px; }
  .passive-selectors .passive-role { min-height:34px;font-size:11px; }
  .passive-footer { flex-wrap:wrap;gap:5px;margin-top:6px; }
  .passive-footer .skill-edit-controls { gap:8px; }
}
@media(prefers-reduced-motion:reduce) { .passive-role,.passive-node,.passive-lines path { transition:none; } }
