.avatar { object-fit:cover; }
.header-spacer { width:68px; flex-shrink:0; }
.app-header>.in-app-back { width:68px; flex-shrink:0; justify-content:flex-start; }
.in-app-back { display:flex; align-items:center; justify-content:center; width:44px; height:44px; padding:8px; color:var(--accent,#858585); flex-shrink:0; }
.in-app-back>.icon { width:25px; height:25px; stroke-width:1.8; }
.in-app-backbar { flex-shrink:0; padding:0 10px; min-height:44px; }
.wa-chat-header>.in-app-back { width:30px; padding:0; color:var(--wa-link); }
.tochat-header>.in-app-back { width:40px; padding:6px; color:inherit; }
.wa-chat-header { padding-left:12px; }
.roles-page { padding:23px 18px 25px; }
.roles-heading { margin:0 6px 28px; }
.roles-heading h1 { margin:0 0 7px; font-size:36px; font-weight:800; letter-spacing:-1px; color:#080808; }
.roles-heading p { margin:0; font-size:12px; color:#999999; }
.role-section-title { margin:0; font-size:17px; font-weight:700; color:#111; }
.role-row { display:flex; width:100%; height:var(--soft-role-height); align-items:center; gap:13px; padding:16px; border:0; border-radius:28px; background:#fff; text-align:left; list-style:none; cursor:pointer; }
.role-row>.avatar { width:52px; height:52px; border-radius:50%; }
.role-row>span { flex:1; min-width:0; }
.role-row b { display:block; color:#111; font-size:17px; font-weight:700; overflow-wrap:anywhere; }
.role-row small { display:block; font-size:10px; color:#969696; margin-top:7px; line-height:1.5; }
.role-row>.icon { width:16px; height:16px; color:#b4b4b4; }
.role-row.pinned { border-color:#d7d7d7; background:linear-gradient(120deg,#f3f3f3,#fff); }
.role-row em { font-style:normal; font-size:10px; padding:4px 7px; background:#ebebeb; color:#828282; border-radius:6px; }
.role-section-line { display:flex; align-items:baseline; justify-content:space-between; margin:28px 5px 12px; }
.role-section-line>span { font-size:10px; color:#999999; margin-right:0; letter-spacing:.5px; }
.role-group { display:flex; flex-direction:column; gap:9px; }
.role-add { display:flex; align-items:center; gap:7px; width:100%; margin:12px 0 25px; padding:0; min-height:42px; border:0; color:#111; font-size:12px; }
.role-add>.icon { width:18px; height:18px; }
.role-add>small { margin-left:auto; color:#999999; font-size:10px; }
.role-note { margin:10px 5px 22px; color:#a0a0a0; font-size:10px; line-height:1.8; text-align:center; }
.tomo-role { background:#fff; border:0; }
.tomo-role b em { margin-left:7px; font-weight:400; }
.role-avatar-editor { text-align:center; margin:24px 0 15px; }
.role-avatar-editor>button { position:relative; padding:0; }
.role-avatar-editor .avatar { width:86px; height:86px; border-radius:50%; }
.role-avatar-editor button>span { position:absolute; right:-4px; bottom:-4px; width:28px; height:28px; display:grid; place-items:center; background:#111; color:#fff; border:3px solid #f3f3f3; border-radius:50%; }
.role-avatar-editor .icon { width:14px; height:14px; }
.role-avatar-editor>p { font-size:11px; color:#8f8f8f; }
.role-editor input[readonly] { color:#909090; background:#efefef; cursor:default; }
.role-worldbook { display:flex; align-items:center; width:100%; gap:8px; padding:14px 0; font-size:12px; color:#858585; text-align:left; }
.role-worldbook>.icon { width:18px; height:18px; }
.role-worldbook>.icon:last-child { margin-left:auto; }


.role-section-line.first { margin-top:0; }
.role-item { background:#fff; border:0; border-radius:28px; box-shadow:0 5px 24px #00000002; overflow:hidden; }
.role-row::-webkit-details-marker { display:none; }
.role-details { padding:0 18px 18px; font-size:12px; color:#747479; line-height:1.8; }
.role-details p { margin:0 0 12px; white-space:pre-wrap; }
.role-relation { font-size:10px; color:#999; }
.role-detail-pills { display:flex; gap:7px; margin:12px 0; }
.role-detail-pills button,.role-edit-pill { border:0; background:#f0f0f2; color:#111; border-radius:24px; padding:9px 13px; font-size:12px; }
.role-edit-pill { display:inline-block; margin-top:5px; }
.role-add>span { display:flex; align-items:center; background:#eaeaec; border-radius:24px; padding:11px 18px 11px 31px; }
.role-add>.icon { position:absolute; margin-left:11px; color:#111; }
.tomo-heading { margin:25px 5px 12px; }

.role-form-section { padding-top:16px; margin:0 0 24px; }
.role-form-section h3 { font-size:18px; margin:0 0 18px; color:#222; }
.role-editor .character-form label { line-height:1.6; }
.character-form label>small { color:#999; font-size:10px; font-weight:400; }
.character-form .play-switch { display:flex; flex-direction:row; align-items:center; justify-content:space-between; padding:10px 0; }
.play-switch input { width:19px; height:19px; accent-color:#111; }
.active-hour-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.role-optional { background:#fff; border-radius:22px; padding:14px; margin:8px 0 18px; }
.role-optional>summary { font-size:13px; font-weight:600; cursor:pointer; padding:5px 0; }
.role-optional>div { padding-top:18px; }
.import-entry-preview>details { background:#fff; padding:14px; border-radius:18px; margin:10px 0; }
.import-entry-preview>details>summary { font-size:13px; cursor:pointer; margin-bottom:10px; }
.import-entry-preview>p { font-size:11px; color:#999; }
.chat-error { padding:12px; margin:12px 0; color:#666; font-size:12px; border-radius:18px; background:#fff; }
.chat-error button { margin-left:10px; text-decoration:underline; }

.prompt-preview { max-height:220px; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; font:11px/1.7 inherit; color:#777; }
