.biography-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; margin:32px 0; }
.biography-card { padding:28px; border-radius:24px; background:linear-gradient(130deg,#fff5f9,#f1fbfa); }
.biography-card h2 { color:#8a6377; font-size:18px; margin-bottom:16px; }
.biography-card p { font-size:21px; line-height:1.6; overflow-wrap:anywhere; }
@media(max-width:700px) { .biography-grid { grid-template-columns:1fr; } }
.biography-editor .biography-card { display:flex; flex-direction:column; gap:12px; }
.biography-editor [hidden],.biography-picker[hidden],.biography-picker [hidden] { display:none; }
.biography-editor header { display:flex; justify-content:space-between; align-items:start; gap:16px; }
.biography-editor label { color:#79586b; font-weight:600; }
.biography-editor textarea { width:100%; min-height:130px; resize:vertical; }
.biography-editor small { color:#796e77; font-size:12px; }
.biography-editor [data-remove-topic] { background:transparent; border:0; padding:0; color:#a72560; font:inherit; font-size:13px; cursor:pointer; }
.biography-picker { border:1px dashed #decbd6; border-radius:18px; padding:20px; }
.biography-picker summary { cursor:pointer; color:#a72560; font-weight:600; }
.biography-picker > div { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
.biography-picker button { padding:10px 14px; min-height:44px; border:1px solid #e8dbe3; border-radius:20px; color:#55414e; background:white; font:inherit; cursor:pointer; }
.biography-editor__status { font-size:13px; color:#796474; }
@media(min-width:701px) { .biography-grid:not(.biography-editor) .biography-card:nth-child(5n+1) { grid-column:1/-1; } }

.biography-grid { gap:14px 24px; margin-top:24px; }
.biography-card { position:relative; padding:20px 20px 20px 90px; border:1px solid #ece7f0; border-radius:18px; background:linear-gradient(120deg,#fff,#fbfaff); }
.biography-card h2,.biography-editor label { color:#3d365c; font-size:16px; margin-bottom:8px; }
.biography-card p { font-size:14px; line-height:1.65; color:#625575; }
.biography-card__icon { position:absolute; top:20px; left:18px; display:grid; place-items:center; width:54px; height:54px; border:1px solid #f4cddd; border-radius:50%; background:linear-gradient(135deg,#fff0f5,#ffdeeb); font-size:29px; color:#e52777; }
.biography-card:nth-child(3n+2) .biography-card__icon { border-color:#c7eee5; background:linear-gradient(135deg,#ebfff8,#cdefe4); }.biography-card:nth-child(3n) .biography-card__icon { border-color:#e6d5f2; background:linear-gradient(135deg,#faf2ff,#e8d9f4); }
.biography-card__tools { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; flex-shrink:0; }
.biography-card__tools button,.biography-editor [data-done-topic] { padding:3px 6px; border:0; background:transparent; color:#97728e; font:inherit; font-size:12px; cursor:pointer; }
.biography-editor [data-done-topic] { border:1px solid #dec7dc; border-radius:8px; padding:8px 14px; margin-top:10px; }
.biography-editor [data-topic-preview] { white-space:pre-line; margin:0; }
.biography-editor [data-topic-length] { display:block; text-align:right; margin-top:6px; }
.biography-editor [data-topic-input] { margin-left:-70px; padding-top:10px; }
.biography-picker { border-color:#25b8b2; color:#1ba5a0; background:#fcffff; }.biography-picker summary { color:#1ba5a0; }
@media(min-width:701px) { .biography-grid:not(.biography-editor) .biography-card:nth-child(5n+1) { grid-column:auto; } }
@media(max-width:600px) { .biography-card { padding:16px 14px 16px 74px; }.biography-card__icon { width:44px; height:44px; left:14px; top:16px; font-size:25px; }.biography-editor header { flex-wrap:wrap; gap:8px; }.biography-card__tools { justify-content:flex-start; }.biography-editor [data-topic-input] { margin-left:-60px; } }

/* The topic picker is a dialog on desktop and a bottom sheet on phones. */
button.biography-picker { width:100%; min-height:56px; font:inherit; cursor:pointer; }
.biography-dialog { box-sizing:border-box; width:min(680px,calc(100% - 32px)); max-width:none; max-height:calc(100dvh - 32px); padding:32px; border:0; border-radius:24px; color:#34344f; background:#fff; overflow:auto; }
.biography-dialog::backdrop { background:rgb(20 20 30 / 55%); }
.biography-dialog h2 { margin:0 36px 24px 0; font-size:26px; }
.biography-dialog p,.biography-dialog label { display:block; margin:18px 0 12px; font-size:15px; color:#62617e; }
.biography-dialog__close { position:absolute; top:16px; right:18px; width:36px; height:36px; border:0; background:transparent; color:#777991; font-size:30px; cursor:pointer; }
.biography-dialog__topics { display:flex; flex-wrap:wrap; gap:10px; }
.biography-dialog__topics button { flex:1 1 130px; min-height:48px; padding:10px 14px; border:1px solid #dcdce8; border-radius:16px; background:white; color:#62617e; font:inherit; font-size:14px; cursor:pointer; }
.biography-dialog__topics button[hidden] { display:none; }
.biography-dialog__topics button[aria-pressed=true] { border-color:#ff297a; color:#ff297a; background:#fff0f6; }
.biography-dialog textarea,.biography-editor textarea { box-sizing:border-box; max-width:100%; }
.biography-dialog textarea { width:100%; min-height:120px; padding:14px; border:1px solid #dcdce8; border-radius:16px; font:inherit; resize:vertical; }
.biography-dialog small { display:block; margin:6px 0 20px; text-align:right; color:#62617e; }
.biography-dialog__actions { display:flex; gap:16px; }
.biography-dialog__actions button { flex:1; width:0; min-height:48px; border:1px solid #ff297a; border-radius:18px; background:white; color:#ff297a; font:inherit; cursor:pointer; }
.biography-dialog__actions .btn { background:#ff297a; color:white; }
.biography-dialog__actions button:disabled { opacity:.5; cursor:default; }
@media(max-width:600px) {
 .biography-dialog { width:100%; max-height:calc(100dvh - 16px); margin:auto 0 0; padding:28px 20px 24px; border-radius:24px 24px 0 0; }
 .biography-dialog h2 { font-size:24px; margin-bottom:18px; }
 .biography-dialog__topics { max-height:180px; overflow:auto; }
 .biography-dialog__topics button { flex-basis:110px; font-size:13px; }
 .biography-dialog__actions { gap:12px; }
}
.biography-dialog__actions button { box-sizing:border-box; padding:12px; }

.biography-dialog__close { display:grid; place-items:center; padding:0; line-height:1; }
@media(max-width:600px) {
 .biography-dialog::before { content:""; display:block; width:42px; height:4px; margin:-14px auto 18px; border-radius:4px; background:#a6a2b5; }
 .biography-dialog__topics { flex-wrap:nowrap; max-height:none; overflow-x:auto; overflow-y:hidden; padding-bottom:8px; scroll-snap-type:x proximity; }
 .biography-dialog__topics button { flex:0 0 130px; scroll-snap-align:start; }
}
