.hp-fact-sheet-editor,
.hp-fact-sheet-viewer {
    display: grid;
    gap: var(--hp-space-4, 16px);
}

details.card > summary.card-header {
    list-style: none;
}

details.card > summary.card-header::-webkit-details-marker { display: none; }

details.card > summary.card-header::after {
    content: '+';
    margin-left: auto;
    font-size: 1.25rem;
}

details.card[open] > summary.card-header::after { content: '−'; }

.hp-fact-sheet-editor__header,
.hp-fact-sheet-viewer__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.hp-fact-sheet-editor__status {
    color: var(--hp-color-text-muted, #64748b);
    font-size: .85rem;
}

.hp-fact-sheet-editor__section,
.hp-fact-sheet__section {
    border: 1px solid var(--hp-color-border, #d8e1df);
    border-radius: var(--hp-radius-md, 10px);
    padding: 14px;
    background: var(--hp-color-surface, #fff);
}

.hp-fact-sheet-editor__section label,
.hp-fact-sheet__section h3 {
    display: block;
    margin: 0 0 8px;
    color: var(--hp-color-text, #172b26);
    font-weight: 700;
}

.hp-fact-sheet-editor__section textarea {
    width: 100%;
    min-height: 92px;
    resize: vertical;
}

.hp-fact-sheet-editor__media {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.hp-fact-sheet__section p {
    margin: 0;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.hp-fact-sheet__photo {
    border: 0;
    padding: 0;
    margin-top: 12px;
    background: transparent;
    cursor: zoom-in;
}

.hp-fact-sheet__photos,
.hp-fact-sheet-editor__photos {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.hp-fact-sheet-editor__photo {
    position: relative;
    display: grid;
    gap: 5px;
    width: 126px;
}

.hp-fact-sheet-editor__photo img {
    width: 126px;
    height: 84px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--hp-color-border, #d8e1df);
}

.hp-fact-sheet-editor__photo small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hp-fact-sheet__photo img {
    display: block;
    width: 160px;
    max-width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.hp-fact-sheet-dialog {
    border: 0;
    padding: 0;
    width: min(720px, calc(100% - 24px));
    max-height: min(88vh, 900px);
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(15, 35, 30, .28);
}

.hp-fact-sheet-dialog::backdrop { background: rgba(15, 35, 30, .58); }

.hp-fact-sheet-dialog__body {
    padding: clamp(16px, 3vw, 28px);
    max-height: min(88vh, 900px);
    overflow-y: auto;
}

.hp-fact-sheet-dialog__actions,
.hp-fact-sheet-editor__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.hp-fact-sheet__empty { color: var(--hp-color-text-muted, #64748b); }

.hp-fact-sheet__translation-warning {
    margin: 12px 0;
    padding: 10px 12px;
    border-left: 4px solid #b45309;
    background: #fff7ed;
    color: #7c2d12;
    border-radius: 6px;
}

.hp-btn--attention {
    border-color: #b45309 !important;
    background: #fff7ed !important;
    color: #9a3412 !important;
}

@media (max-width: 430px) {
    .hp-fact-sheet-dialog { width: calc(100% - 16px); max-height: 94vh; }
    .hp-fact-sheet-dialog__body { padding: 14px; max-height: 94vh; }
    .hp-fact-sheet-dialog__actions > button,
    .hp-fact-sheet-editor__actions > button { width: 100%; }
}
