.party-character-select{width:100%;min-height:38px;border:1px solid #ded3b6;border-radius:5px;color:#9a8049;background:#fcfaf4;font-size:10px;margin:0 0 8px;padding:8px;cursor:pointer}.party-character-select:hover{background:#f5efdf}.party-member-summary .party-character-meta{color:#a58c53;font-size:9px}.party-character-editor-actions{display:flex;align-items:center;gap:13px;flex-wrap:wrap;margin-bottom:18px}.party-character-reference{background:#f8f7f2;border:1px solid #e8e2d3;border-radius:6px;padding:15px 16px;margin-bottom:22px;color:#7b827f}.party-reference-title{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:11px}.party-reference-title strong{color:#5f6e75;font-size:13px}.party-reference-title>span{font-size:9px;color:#a58e58}.party-reference-title a{margin-left:auto;color:#9c8555;text-decoration:none}.party-reference-stats{display:flex;flex-wrap:wrap;gap:10px 19px;margin:12px 0;font-size:9px;line-height:1.8}.party-reference-stats b{display:block;font:17px Georgia,serif;color:#7d775f;margin-top:3px}.party-character-reference p{font-size:10px;line-height:1.9;margin:6px 0 0;color:#8c969c}.character-picker-dialog{width:min(940px,calc(100% - 28px))}.character-picker-controls{padding:20px 27px 14px;background:white;border-bottom:1px solid #e8ecee}.character-picker-controls .field>label{font-size:11px}.character-picker-controls .field input,.character-picker-controls .field select{font-size:13px}.character-filter-row{display:grid;grid-template-columns:1fr 1fr .75fr;gap:12px;margin-top:16px}.character-result-line{display:flex;align-items:center;justify-content:space-between;margin-top:15px;color:#97a1a7;font-size:10px}.character-result-line .text-button{font-size:10px;min-height:30px}.character-picker-controls>.field-help{margin-top:6px;font-size:10px;line-height:1.9;color:#8d999f}.character-results{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-content:start;gap:11px;max-height:min(48vh,450px);min-height:100px;overflow:auto;padding:20px 27px;background:#f6f8f9;scrollbar-gutter:stable}.character-choice{display:flex;align-items:center;gap:10px;text-align:left;border:1px solid #e0e5e7;border-radius:7px;padding:14px 11px;background:#fff;min-width:0;min-height:86px;cursor:pointer;position:relative}.character-choice:hover{border-color:var(--character-color);background:#fdfcf8}.character-choice.is-selected{border-color:#b6a16e;background:#fcfaf4}.character-choice:disabled{opacity:.5;cursor:not-allowed}.character-choice:focus-visible,.party-character-select:focus-visible{outline:2px solid #b49a61;outline-offset:2px}.character-monogram{display:grid;place-items:center;flex-shrink:0;width:37px;height:43px;border-radius:5px;background:color-mix(in srgb,var(--character-color) 9%,white);color:var(--character-color);font:20px Georgia,serif}.character-monogram small{font:8px 'Noto Sans JP',sans-serif;margin-top:-4px}.character-choice-info{display:flex;flex-direction:column;gap:5px;min-width:0;align-self:flex-start}.character-choice-info strong{font-size:12px;line-height:1.65;font-weight:600;color:#536a78;overflow-wrap:anywhere}.character-choice-info>small{font-size:8px;line-height:1.7;color:#93a0a8}.character-rarity{font:9px Arial,sans-serif;letter-spacing:1.5px;color:#b79b5e}.character-choice-state{position:absolute;right:9px;bottom:7px;font-size:7px;color:#9a8a61}.character-source{display:flex;justify-content:space-between;gap:15px;padding:13px 27px;color:#a0a8ad;font-size:9px;line-height:1.8;background:#fff;border-top:1px solid #e2e8ec}.character-source a{color:#9e8753;text-decoration:none}.character-empty{grid-column:1/-1;text-align:center;padding:34px 15px;font-size:12px;color:#94a1a8;line-height:2}
@media(max-width:800px){.character-results{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.character-picker-controls{padding:17px 18px 12px}.character-filter-row{grid-template-columns:1fr 1fr;gap:14px 10px}.character-filter-row>.field:last-child{grid-column:1/-1}.character-picker-controls .field input,.character-picker-controls .field select{font-size:16px}.character-picker-controls .field>label{font-size:10px}.character-results{grid-template-columns:1fr;max-height:40vh;padding:15px 18px;gap:10px}.character-choice{min-height:83px;padding:13px 15px;gap:13px}.character-choice-info strong{font-size:13px}.character-choice-info>small{font-size:10px}.character-choice-state{font-size:9px;right:14px;bottom:11px}.character-source{padding:12px 18px;flex-direction:column;gap:3px}.party-character-select{min-height:39px;font-size:10px}.party-reference-stats{gap:10px 14px}.party-character-reference{padding:13px}.party-character-reference p{font-size:10px}.party-reference-title>span{font-size:9px}}
.character-picker-dialog[open]{display:flex;flex-direction:column;overflow:hidden}.character-picker-dialog>.dialog-header,.character-picker-controls,.character-source{flex-shrink:0}.character-results{flex:1 1 auto;min-height:100px}.character-choice-info>small,.character-result-line,.character-picker-controls>.field-help,.character-picker-controls .field>label,.character-source,.character-empty{color:#607582}.character-choice-state,.character-source a,.character-rarity,.party-reference-title>span,.party-member-summary .party-character-meta{color:#8b713f}

/* Fixed portrait boxes preserve layout while local images load or fall back. */
.character-portrait{--portrait-color:var(--character-color,var(--member-color,#8b969d));position:relative;display:block;flex-shrink:0;overflow:hidden;border-radius:7px;border:1px solid color-mix(in srgb,var(--portrait-color) 24%,white);background:color-mix(in srgb,var(--portrait-color) 12%,white);color:var(--portrait-color)}
.character-portrait-fallback{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;font:23px Georgia,serif;line-height:1.15}
.character-portrait-fallback small{font:9px 'Noto Sans JP',sans-serif;margin-top:4px}
.character-portrait img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;background:linear-gradient(145deg,color-mix(in srgb,var(--portrait-color) 17%,white),#fff);pointer-events:none}
.character-portrait img[hidden]{display:none}
.character-choice-portrait{width:58px;height:64px;align-self:center}
.party-avatar.character-portrait{width:50px;height:54px}
.party-reference-portrait{width:44px;height:48px;--portrait-color:#af9864}
.party-reference-title .party-reference-portrait{display:block}
.party-result-identity{display:flex;align-items:center;gap:10px;min-width:0}
.party-result-identity>div{min-width:0}
.party-result-portrait{width:40px;height:44px}
.party-result-head h3{overflow-wrap:anywhere}
.character-source{display:block}
.character-source>div{display:flex;justify-content:space-between;gap:8px 15px;flex-wrap:wrap}
.character-source>div+div{margin-top:4px;font-size:8px}
@media(max-width:650px){.party-avatar.character-portrait{width:38px;height:44px}.party-member-top{gap:7px}.party-member-name{max-width:100%}.party-avatar .character-portrait-fallback{font-size:20px}.party-avatar .character-portrait-fallback small{font-size:7px}.party-result-portrait{width:36px;height:40px}}
@media(max-width:520px){.character-choice-portrait{width:56px;height:62px}.character-source>div{display:block}.character-source a{display:block;margin-top:2px}}
