.rule-properties{display:grid;gap:12px;margin:28px 0;padding:20px 0;border-top:1px solid #e1dbce;border-bottom:1px solid #e1dbce}.rule-properties>div{display:grid;grid-template-columns:145px 1fr;align-items:start;gap:14px}.rule-properties dt{color:#7a7a75}.rule-properties dt span{margin-left:9px}.rule-properties dd{display:flex;flex-wrap:wrap;gap:8px;margin:0}.rule-property{display:inline-block;padding:3px 8px;border-radius:6px;font:14px/1.4 var(--font-reading,"Source Sans 3","Segoe UI",Arial,sans-serif)}.rule-property--edition{color:#294d78;background:#dce9f8}.rule-property--source{color:#725625;background:#f3e3bc}.rule-property--source:nth-child(even){color:#70462b;background:#f3ddd0}.rule-detail__body h1,.rule-detail__body h2,.rule-detail__body h3{font-family:Georgia,serif;font-weight:400}.rule-detail__body table{width:100%;border-collapse:collapse}.rule-detail__body th,.rule-detail__body td{padding:8px 10px;border:1px solid #ddd6c8;text-align:left}.rule-detail__body aside,.rule-detail__body .callout{padding:16px;border:1px solid #dfd7c8;border-radius:9px;background:#fffaf0}.rule-detail__body img{max-width:100%;height:auto}@media(max-width:560px){.rule-properties>div{grid-template-columns:1fr}}
.equipment-properties { display: grid; gap: 12px; margin: 20px 0 32px; }
.equipment-properties:has(>[data-equipment-property="uses"])>.inline-rule-editor__property-row{order:10}
.equipment-properties:has(>[data-equipment-property="uses"])>[data-equipment-property]:is([data-equipment-property="edition"],[data-equipment-property="source"],[data-equipment-property="creature"],[data-equipment-property="trait_action"],[data-equipment-property="action_type"],[data-equipment-property="action_target"]){order:0}
.equipment-properties>[data-equipment-property="uses"]{order:1!important}
.equipment-properties>[data-equipment-property="granted_spells"]{order:2!important}
.equipment-properties .inline-rule-editor__property-row { position: relative; display: grid; grid-template-columns: 24px 145px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 38px; }
.equipment-properties .pill-picker { display: contents; }
.equipment-properties label { font-size: 14px; font-weight: 400; text-transform: none; letter-spacing: normal; }
.equipment-properties .rule-property-static-icon { display: grid; place-items: center; height: 38px; color: var(--text-muted); }
.equipment-properties .equipment-property-label { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.4; }
.rule-property-text { font: 16px/1.45 var(--font-reading, "Source Sans 3", "Segoe UI", Arial, sans-serif); }
.equipment-properties .equipment-property-value { position: relative; min-width: 0; padding: 0 6px; font-family: var(--font-reading, "Source Sans 3", "Segoe UI", Arial, sans-serif); font-size: 15px; line-height: 1.35; }
.equipment-properties .equipment-property-value:has(.rule-property) { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.equipment-properties input.equipment-property-input { width: 100%; height: 38px; margin: 0; padding: 4px 0; border: 0; border-radius: 3px; box-shadow: none; background: transparent; color: inherit; font: inherit; appearance: textfield; }
.equipment-properties input.equipment-property-input::-webkit-inner-spin-button,
.equipment-properties input.equipment-property-input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.equipment-properties input.equipment-property-input:focus { outline: 2px solid #d3e5ef; outline-offset: 1px; }
.equipment-properties .equipment-property-toggle{display:flex;align-items:center;gap:8px;margin:0;font:inherit;color:inherit}
.equipment-properties .equipment-property-toggle input[type=checkbox]{flex:none;margin:0}
.equipment-container-properties{display:contents}
.equipment-container-properties [hidden]{display:none!important}
.equipment-properties select.equipment-property-select{width:100%;max-width:100%;height:38px;margin:0;padding:4px 0;border:0;border-radius:3px;background:transparent;color:inherit;font:inherit}
.equipment-properties input:not([type="hidden"]):not([type="checkbox"]) { box-sizing: border-box; max-width: 100%; min-width: 0; }
.equipment-properties .pill-picker__menu, .equipment-properties .pill-picker__editor { position: absolute; z-index: 90; top: 42px; left: 177px; width: calc(100% - 177px); }
@media (max-width: 560px) {
  .equipment-properties .inline-rule-editor__property-row { grid-template-columns: 24px minmax(0, 1fr); }
  .equipment-properties .inline-rule-editor__property-row > div, .equipment-properties .inline-rule-editor__property-row > span:last-child, .equipment-properties .pill-picker__control { grid-column: 2; }
  .equipment-properties .pill-picker__menu, .equipment-properties .pill-picker__editor { left: 32px; width: calc(100% - 32px); }
}

.equipment-properties .rule-reference-picker { position: relative; display: contents; }
.equipment-properties .rule-reference-picker > label { display: flex; height: 38px; align-items: center; color: var(--text-muted); font-size: 14px; }
.rule-reference-picker__control { display: flex; min-height: 38px; flex-wrap: wrap; align-items: center; gap: 5px; padding: 4px 6px; border: 1px solid transparent; border-radius: 7px; background: transparent; }
.rule-reference-picker__control:hover, .rule-reference-picker__control:focus-within { border-color: var(--line-main); background: var(--surface-input); }
.rule-reference-picker__selected { display: contents; }
.rule-reference-picker__control input { min-width: 120px; flex: 1; margin: 0; padding: 4px; border: 0; outline: 0; background: transparent; font-size: 13px; }
.rule-reference-picker__pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 5px 3px 7px; border: 0; border-radius: 6px; font-size: 12px; line-height: 1.2; }
.rule-reference-picker__pill{flex:none;white-space:nowrap}
.rule-reference-picker__pill>span{white-space:nowrap;flex:none}
.spell-grant-settings{display:inline-block;flex:none;margin-left:4px;white-space:normal}
.uses-resource-conversions>summary{cursor:pointer;font:400 13px/1.4 var(--font-reading,sans-serif);color:#293a50}
.uses-resource-conversions[open]>label{margin-top:14px!important}
.uses-resource-conversions>p{font:400 13px/1.4 var(--font-reading,sans-serif);margin:10px 0 0}
.spell-grant-settings [data-recovery-row]{display:grid;gap:14px;padding:10px 0;border-bottom:1px solid #ddd6c8;margin-bottom:10px}
.spell-grant-settings [data-feature-uses-target="resourceSettings"]{display:grid;gap:14px}
.spell-grant-settings [data-feature-uses-target="resourceSettings"]>p{margin:0}
.rule-reference-picker__pill .spell-grant-settings button{font:400 13px/1.4 var(--font-reading,sans-serif)!important;color:#293a50}
.spell-grant-settings [data-level-row]{display:grid;gap:8px;padding:10px 0;border-bottom:1px solid #ddd6c8;margin-bottom:10px}
.spell-grant-settings [data-feature-uses-target="thresholds"]>p{font:400 13px/1.4 var(--font-reading,sans-serif);margin:0 0 10px}
.spell-grant-settings>summary{display:block;cursor:pointer;list-style:none;padding:3px 5px;line-height:1}
.spell-grant-settings>summary::-webkit-details-marker{display:none}
.spell-grant-settings:not([open])>div{display:none!important}
.spell-grant-settings [hidden]{display:none!important}
.spell-grant-settings>div{position:fixed;z-index:999;box-sizing:border-box;width:350px;max-width:calc(100vw - 24px);max-height:70vh;overflow:auto;padding:16px;border:1px solid #ddd6c8;border-radius:9px;background:#fff;box-shadow:0 8px 24px #0003;color:#293a50;display:grid;gap:14px;white-space:normal}
.rule-reference-picker__pill .spell-grant-settings label,.rule-detail .rule-reference-picker__pill .spell-grant-settings label,.character-granted-choices .spell-grant-settings label{display:grid;grid-template-columns:minmax(0,1fr) 140px;align-items:center;height:auto;gap:12px;margin:0;padding:0;font:400 13px/1.4 var(--font-reading,sans-serif);white-space:normal;color:#293a50}
.rule-page-canvas .equipment-properties .rule-reference-picker__pill .spell-grant-settings :is(input,select),.rule-detail .rule-reference-picker__pill .spell-grant-settings :is(input,select),.character-granted-choices .spell-grant-settings :is(input,select){box-sizing:border-box;width:140px;height:32px;min-width:0;margin:0;padding:5px 7px;border:1px solid #ddd6c8;border-radius:5px;background:#fff;color:#293a50;font:13px var(--font-reading,sans-serif);text-align:left}
.rule-page-canvas .equipment-properties .rule-reference-picker__pill .spell-grant-settings input[type=checkbox],.rule-detail .rule-reference-picker__pill .spell-grant-settings input[type=checkbox],.character-granted-choices .spell-grant-settings input[type=checkbox]{width:18px;height:18px;justify-self:start}
.rule-reference-picker__pill label { display: inline-flex; height: auto; align-items: center; color: inherit; font: inherit; }
.rule-reference-picker__pill input { box-sizing: border-box; width: 27px; height: 19px; margin: 0; padding: 0 2px; border: 1px solid rgba(41,77,120,.38); border-radius: 4px; background: #dce9f8; color: inherit; font: inherit; text-align: center; appearance: textfield; }
.rule-reference-picker__pill input::-webkit-inner-spin-button, .rule-reference-picker__pill input::-webkit-outer-spin-button { appearance: none; }
.rule-reference-picker__pill button { padding: 0 2px; border: 0; background: transparent; color: inherit; font: 16px/1 inherit; cursor: pointer; }
.rule-reference-picker__menu { position: absolute; z-index: 90; top: 46px; left: 177px; width: calc(100% - 177px); max-height: 260px; overflow: auto; padding: 12px; border: 1px solid #d8d1c5; border-radius: 9px; background: #fff; box-shadow: 0 14px 38px rgba(31,42,58,.18); }
.rule-reference-picker__menu p { margin: 3px 7px 8px; color: #7b7a75; font-size: 13px; }
.rule-reference-picker__option { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 4px; border: 0; border-radius: 6px; background: transparent; text-align: left; cursor: pointer; }
.rule-reference-picker__option:hover, .rule-reference-picker__option.is-selected { background: #f2f0eb; }
.rule-reference-picker__option span { padding: 4px 8px; border-radius: 6px; }
.rule-reference-picker__option b { color: var(--navy, #102a50); }
.granted-trait-links { display: flex; flex-wrap: wrap; gap: 6px; }
.granted-trait-links a { text-decoration: none; }

.equipment-properties .movement-picker { position: relative; display: contents; }
.equipment-properties .movement-picker > label { display: flex; height: 38px; align-items: center; color: var(--text-muted); font-size: 14px; }
.movement-picker__control { display: flex; min-height: 38px; flex-wrap: wrap; align-items: center; gap: 5px; padding: 4px 6px; border: 1px solid transparent; border-radius: 7px; background: transparent; }
.movement-picker__control:hover, .movement-picker__control:focus-within { border-color: var(--line-main); background: var(--surface-input); }
.movement-picker__selected { display: contents; }
.movement-picker__add { padding: 4px; border: 0; background: transparent; color: var(--text-muted); font: inherit; cursor: pointer; }
.movement-picker__pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 5px 3px 7px; border-radius: 6px; font-size: 12px; line-height: 1.2; }
.movement-picker__pill input { box-sizing: border-box; width: 36px; height: 19px; margin: 0; padding: 0 2px; border: 1px solid rgba(41,77,120,.38); border-radius: 4px; background: #dce9f8; color: inherit; font: inherit; text-align: center; appearance: textfield; }
.movement-picker__pill input::-webkit-inner-spin-button, .movement-picker__pill input::-webkit-outer-spin-button { appearance: none; }
.movement-picker__pill button { padding: 0 2px; border: 0; background: transparent; color: inherit; font: 16px/1 inherit; cursor: pointer; }
.movement-picker__menu { position: absolute; z-index: 90; top: 46px; left: 177px; width: calc(100% - 177px); max-height: 260px; overflow: auto; padding: 12px; border: 1px solid #d8d1c5; border-radius: 9px; background: #fff; box-shadow: 0 14px 38px rgba(31,42,58,.18); }
.movement-picker__menu p { margin: 3px 7px 8px; color: #7b7a75; font-size: 13px; }
.movement-picker__option { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 4px; border: 0; border-radius: 6px; background: transparent; text-align: left; cursor: pointer; }
.movement-picker__option:hover { background: #f2f0eb; }
.movement-picker__option span { padding: 4px 8px; border-radius: 6px; }
.movement-property-pills { display: flex; flex-wrap: wrap; gap: 5px; }

/* Keep value-bearing pills aligned with compact Edition and Source pills. */
.rule-page-canvas .equipment-properties :is(.rule-reference-picker__pill, .movement-picker__pill) {
  gap: 4px;
  padding: 3px 7px;
  border: 1px solid rgba(87,75,57,.1);
  border-radius: 5px;
  box-shadow: inset 0 1px rgba(255,255,255,.35);
  font-family: var(--font-reading,"Source Sans 3","Segoe UI",Arial,sans-serif) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
}
.rule-page-canvas .equipment-properties :is(.rule-reference-picker__pill, .movement-picker__pill) input {
  width: 30px;
  height: 19px;
  font-size: 12px !important;
  line-height: 1 !important;
}
.rule-page-canvas .equipment-properties :is(.rule-reference-picker__pill, .movement-picker__pill) button {
  font-size: 14px;
  line-height: 1;
}

@media (max-width: 680px) { .rule-reference-picker__menu, .movement-picker__menu { left: 32px; width: calc(100% - 32px); } }
.rule-properties-disclosure{margin:4px 0 24px;scroll-margin-top:100px}
.rule-detail__summary:empty{display:none}
.rule-detail .rule-properties-disclosure>summary{width:fit-content;padding:8px 0;color:var(--text-muted,#697283);cursor:pointer;font:400 14px/1.4 var(--font-reading,"Source Sans 3","Segoe UI",Arial,sans-serif)}
.rule-properties-disclosure:not([open]) .rule-properties-label--expanded,.rule-properties-disclosure[open] .rule-properties-label--collapsed{display:none}
.rule-detail .rule-properties-disclosure>summary{display:flex;align-items:center;gap:6px;list-style:none}
.rule-detail .rule-properties-disclosure>summary::-webkit-details-marker{display:none}
.rule-detail .rule-properties-disclosure>summary::marker{content:""}
.rule-detail .rule-properties-disclosure>summary::before{content:"";display:block;flex:none;width:0;height:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:8px solid currentColor;transform-origin:4px 5px}
.rule-detail .rule-properties-disclosure[open]>summary::before{transform:rotate(90deg)}
.rule-properties-disclosure>summary:focus-visible,.rule-properties-button:focus-visible{outline:2px solid #b48a36;outline-offset:4px;border-radius:4px}
.rule-properties-disclosure[open]>summary{margin-bottom:12px}
.rule-properties-button{border:1px solid transparent;border-radius:8px;padding:8px 12px;background:#f5f2eb;color:#31465f;font:600 13px/1.4 system-ui,sans-serif;cursor:pointer}
.rule-properties-disclosure[hidden]{display:none}
.rule-detail .rule-properties-button,.rule-detail .rule-properties-button:hover,.rule-detail .rule-properties-button:focus{border:0;background:transparent;box-shadow:none;color:var(--text-muted,#697283);outline:none}
.rule-detail .rule-properties-button:focus-visible{outline:1px dotted currentColor;outline-offset:2px}
.rule-detail .rule-modal__open-full,.rule-detail .inline-rule-editor__status,.rule-detail .rule-properties-button{font:600 13px/1.4 var(--font-reading,"Source Sans 3","Segoe UI",Arial,sans-serif);color:var(--text-muted,#697283);letter-spacing:normal;text-decoration:none}
.rule-detail .inline-rule-editor__status[data-state="saving"],.rule-detail .inline-rule-editor__status[data-state="pending"]{color:var(--accent-gold)}
.rule-detail .inline-rule-editor__status[data-state="error"]{color:#a63d35}

/* Keep wide tables inside the callout, including nested callouts and previews. */
/* Full-page content uses the same reading face and plain table rows as the modal. */
html body .rule-page-canvas .rule-detail__body,
html body .rule-page-canvas .rule-detail__body table,
html body .rule-page-canvas .rule-detail__body table :is(th,td,p,span,strong,b,em,i,a){
  font-family:var(--font-body,"Inter",ui-sans-serif,sans-serif)!important;
}
html body .rule-page-canvas .rule-detail__body table{
  background:#fff!important;
}
html body .rule-page-canvas .rule-detail__body table tr:not([class*="table-color--"])>td:not([class*="table-color--"]){
  background:#fff!important;
  border-color:#ddd6c8!important;
}
html body .rule-page-canvas .rule-detail__body table:not(:has(>thead)) tr:nth-child(odd):not(:first-child):not([class*="table-color--"])>td:not([class*="table-color--"]),
html body .rule-page-canvas .rule-detail__body table:has(>thead)>tbody>tr:nth-child(even):not([class*="table-color--"])>td:not([class*="table-color--"]){
  background:rgb(232,242,251)!important;
}
html body .rule-page-canvas .rule-detail__body a{
  font-family:inherit!important;
  font-size:inherit;
  color:#2b5e85;
  text-decoration:underline;
}
:is(.rule-detail__body,.page-preview__content) :is(aside,.callout):has(table){
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
  overflow-x:auto;
  overscroll-behavior-x:contain;
}
