.hf-context-panel, .hf-story-map-panel, .hf-selection-card { padding: 12px 14px; border: 1px solid #dbe2ec; border-radius: 8px; background: #fff; }
.hf-context-panel { border-color: #ef9dc7; background: #fff8fc; }
.hf-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.hf-section-heading h3, .hf-section-heading p { margin: 0; }
.hf-section-heading h3 { color: #202635; font-size: 13px; font-weight: 700; line-height: 1.3; }
.hf-section-heading h3 strong { color: inherit; }
.hf-section-heading p { margin-top: 3px; color: #7c8798; font-size: 9px; line-height: 1.45; }
.hf-section-heading > span, .hf-section-heading div > span { color: #75839a; font-size: 9px; font-weight: 700; }
.hf-story-badge { flex: 0 0 auto; max-width: 105px; overflow: hidden; padding: 4px 7px; border-radius: 999px; color: #275a91 !important; background: #e9f2fc; font-size: 8px !important; text-overflow: ellipsis; white-space: nowrap; }
.hf-relationship-visual { display: grid; grid-template-columns: auto 18px auto 18px minmax(0, 1fr); align-items: center; gap: 4px; padding: 8px; border-radius: 6px; color: #586980; background: #f7f9fc; font-size: 8px; }
.hf-relationship-visual i { height: 1px; background: #9db0c5; }
.hf-relationship-visual strong { color: #a70f62; }
.hf-relationship-visual b { min-width: 0; overflow: hidden; color: #203047; text-overflow: ellipsis; white-space: nowrap; }

.hf-page-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 9px; overflow: hidden; border: 1px solid #d8e0ea; border-radius: 999px; }
.hf-page-tabs button { min-width: 0; min-height: 30px; padding: 6px 3px; border: 0; border-right: 1px solid #d8e0ea; color: #586980; background: #fff; font: inherit; font-size: 8px; font-weight: 650; }
.hf-page-tabs button:last-child { border-right: 0; }
.hf-page-tabs button:hover, .hf-page-tabs button.is-active { color: #fff; background: #ec168c; }
.hf-page-preview { display: grid; grid-template-rows: auto 74px auto; overflow: hidden; border: 1px solid #dce4ed; border-radius: 7px; background: #f4f7fb; box-shadow: 0 7px 18px rgba(25, 42, 64, .07); }
.hf-story-region { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 1px 8px; min-height: 46px; padding: 7px 10px; border: 0; border-left: 3px solid transparent; color: #52637a; background: #fff; text-align: left; }
.hf-story-region--header { border-bottom: 1px dashed #b9c7d7; }
.hf-story-region--footer { border-top: 1px dashed #b9c7d7; }
.hf-story-region span { grid-row: 1 / 3; align-self: center; font-size: 8px; font-weight: 700; }
.hf-story-region strong, .hf-story-region small { justify-self: end; }
.hf-story-region strong { color: #7f8ca0; font-size: 9px; }
.hf-story-region small { color: #8c98a8; font-size: 7px; }
.hf-story-region.is-present { border-left-color: #ec168c; background: #fff4fa; }
.hf-story-region.is-present strong { color: #a70f62; }
.hf-story-region.is-active { color: #fff; background: #ec168c; }
.hf-story-region.is-active strong, .hf-story-region.is-active small { color: #fff; }
.hf-story-region:hover { background: #fff0f7; }
.hf-page-body { display: grid; align-content: center; gap: 7px; padding: 11px 20px; background: repeating-linear-gradient(#f5f7fa 0 23px, #fff 23px 24px); }
.hf-page-body i { height: 3px; background: #c1ccda; }
.hf-page-body i:nth-child(2), .hf-page-body i:nth-child(5) { width: 72%; }
.hf-page-body i:nth-child(3) { width: 88%; }
.hf-map-hint { margin: 8px 0 0; color: #78869a; font-size: 8px; line-height: 1.4; }

.hf-selection-card { min-height: 88px; }
.hf-selection-card:not(.is-empty) { border-color: #f06aaa; box-shadow: 0 10px 30px rgba(26, 40, 61, .08); }
.hf-selection-empty { display: flex; align-items: center; gap: 10px; min-height: 60px; }
.hf-selection-empty > span { position: relative; width: 40px; height: 46px; flex: 0 0 40px; border: 1px solid #b7c4d4; border-radius: 4px; background: #f7f9fc; }
.hf-selection-empty > span::before, .hf-selection-empty > span::after { content: ""; position: absolute; left: 6px; right: 6px; height: 5px; border-block: 1px dashed #ec168c; }
.hf-selection-empty > span::before { top: 6px; }.hf-selection-empty > span::after { bottom: 6px; }
.hf-selection-empty div { display: grid; gap: 2px; }
.hf-selection-empty strong { font-size: 11px; }.hf-selection-empty small { color: #77859a; font-size: 9px; line-height: 1.4; }
.hf-section-heading--selected { align-items: center; }
.hf-section-heading--selected h3 { margin-top: 2px; font-size: 15px; }
.hf-property-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid #e0e6ef; border-radius: 6px; background: #e0e6ef; }
.hf-property-grid div { display: grid; gap: 2px; padding: 7px 9px; background: #f9fbfd; }
.hf-property-grid span { color: #78869a; font-size: 8px; }.hf-property-grid strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.hf-controls { display: grid; gap: 9px; margin-top: 11px; padding-top: 11px; border-top: 1px solid #e4e9f0; }
.hf-distance-control { display: grid; gap: 5px; }.hf-distance-control > span { display: grid; grid-template-columns: 1fr 48px; align-items: center; gap: 8px; }
.hf-distance-control input { accent-color: #ec168c; }.hf-distance-control output { color: #17283e; font-size: 8px; font-weight: 700; }
.hf-link-control { display: flex; align-items: flex-start; gap: 8px; padding: 8px 9px; border: 1px solid #dce3ec; border-radius: 6px; background: #f9fbfd; }
.hf-link-control input { margin-top: 2px; accent-color: #ec168c; }.hf-link-control span { display: grid; gap: 2px; }.hf-link-control strong { font-size: 9px; }.hf-link-control small { color: #78869a; font-size: 8px; line-height: 1.4; }
.hf-link-control:has(input:disabled) { opacity: .55; }
.hf-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }.hf-actions .btn { min-width: 0; padding-inline: 9px; font-size: 9px; }

@media (max-width: 620px) { .hf-property-grid, .hf-actions { grid-template-columns: 1fr; } }
