.fi-dialog { max-width: 600px; overflow: hidden; font-size: var(--type-body-size); line-height: var(--type-body-line); }
.fi-dialog[open] { display: flex; flex-direction: column; }
.fi-dialog .fm-dialog-head { flex: none; }
.fi-dialog .fm-dialog-body { min-height: 0; overflow: auto; padding: 16px 24px 20px; }
.fi-dialog .fm-form-actions { position: sticky; bottom: -20px; z-index: 1; background: #fff; margin-top: 16px; padding-top: 12px; padding-bottom: 12px; }
.fi-source { border: 1px solid #e7e1ee; background: #faf8fd; border-radius: 10px; padding: 14px 16px; overflow-wrap: anywhere; }
.fi-source strong { display: block; margin: 4px 0; color: var(--type-ink,#252332); font-size: var(--type-section-size); line-height: var(--type-section-line); font-weight: 600; }
.fi-kind,.fi-source small,.fi-hint,.fi-plan-heading small,.fi-optional { color: var(--type-muted,#706a7b); font-size: var(--type-caption-size); line-height: var(--type-caption-line); }
.fi-source p { margin: 8px 0 0; max-height: 88px; overflow-y: auto; color: #5f586c; }
.fi-modes { display: flex; gap: 4px; padding: 4px; margin: 18px 0; background: #f3f0f7; border-radius: 8px; }
.fi-modes button { flex: 1; border-radius: 6px; padding: 8px 12px; color: #706a7b; font-size: var(--type-body-size); line-height: var(--type-body-line); }
.fi-modes button[aria-selected="true"] { color: #8050ba; background: #fff; box-shadow: 0 1px 3px #30203d12; font-weight: 600; }
.fi-field { display: block; margin: 16px 0 8px; color: #302b3b; font-size: var(--type-body-size); line-height: var(--type-body-line); }
.fi-field select,.fi-field input,.fi-field textarea { width: 100%; box-sizing: border-box; border: 1px solid #ded7e7; background: #fff; border-radius: 8px; margin-top: 7px; padding: 10px 12px; color: #302b3b; font: inherit; }
.fi-field select:disabled { background: #f7f5f9; opacity: 1; }
.fi-field textarea { resize: vertical; min-height: 72px; }
.fi-number { position: relative; display: block; }
.fi-number input { padding-right: 32px; }
.fi-number > span { position: absolute; right: 13px; top: 18px; color: #82798e; }
.fi-optional { margin-left: 5px; }
.fi-hint { margin: 8px 0; }
.fi-error { color: #b23c54; margin: 12px 0; font-size: var(--type-body-size); line-height: var(--type-body-line); }
.fi-error:empty { display: none; }
.fi-next { margin: 20px 0; }
.fi-next h3,.fi-success h3,.fi-origin > h3,.fi-plan-group > header h3,.fi-plan-card h3 { font-size: var(--type-section-size); line-height: var(--type-section-line); font-weight: 600; color: #302b3b; margin: 0; }
.fi-next p { margin: 10px 0; color: #706a7b; }
.fi-success { text-align: center; padding: 16px 0; }
.fi-success > span { display: inline-grid; place-items: center; width: 40px; height: 40px; background: #efe8f8; border-radius: 50%; color: #8050ba; margin-bottom: 14px; font-size: var(--type-page-size); line-height: var(--type-page-line); }
.fi-success p { margin: 10px 0; }
.fi-overview { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fi-overview p,.fi-plan-intro p { margin: 6px 0 0; color: var(--type-muted,#706a7b); }
.fi-plan-page { container-type: inline-size; }
.fi-plan-intro { margin-bottom: 24px; }
.fi-plan-intro h2,.fi-overview h2 { margin: 0; font-size: var(--type-section-size); line-height: var(--type-section-line); font-weight: 600; }
.fi-plan-group { margin: 24px 0; }
.fi-plan-group > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.fi-plan-group > header > span { color: var(--type-muted,#706a7b); font-size: var(--type-caption-size); line-height: var(--type-caption-line); }
.fi-plan-card { border: 1px solid #e7e1ee; border-radius: 10px; padding: 16px; margin-bottom: 10px; background: #fff; }
.fi-plan-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.fi-plan-heading > div { min-width: 0; overflow-wrap: anywhere; }
.fi-plan-heading h3 { margin-top: 4px; }
.fi-plan-heading > .fm-badge { flex: none; }
.fi-plan-card p { margin: 10px 0 0; font-size: var(--type-body-size); line-height: var(--type-body-line); }
.fi-plan-card .fi-plan-note { color: var(--type-muted,#706a7b); white-space: pre-wrap; overflow-wrap: anywhere; }
.fi-plan-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 16px; }
.fi-plan-actions > :first-child { margin-right: auto; }
.fi-plan-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; border: 1px dashed #e0d9e8; border-radius: 10px; padding: 20px 16px; color: var(--type-muted,#706a7b); font-size: var(--type-body-size); line-height: var(--type-body-line); }
.fi-plan-empty button { margin-left: auto; white-space: nowrap; }
.fi-origin .fi-source { margin: 12px 0; }
.fi-archived summary { cursor: pointer; padding: 10px 0; color: var(--type-muted,#706a7b); }
#fi-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 9999; max-width: min(520px,90vw); padding: 11px 16px; background: #332c42; color: white; border-radius: 9px; box-shadow: 0 6px 25px #30203d26; font-size: var(--type-body-size); line-height: var(--type-body-line); }
.fi-dialog button:focus-visible,.fi-plan-page button:focus-visible,.fi-field :is(input,select,textarea):focus-visible { outline: 2px solid #9270c8; outline-offset: 3px; }
@media(max-width:600px) { .fi-dialog .fm-dialog-body { padding: 16px; } .fi-overview { flex-wrap: wrap; } }
