.records-home, #records .records-text {
  width:auto; margin:0; padding:6px 0; color:var(--accent-ink); background:transparent;
  text-decoration:underline; text-underline-offset:3px; font:inherit;
}
#t-records {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  width:auto; min-width:44px; min-height:44px; padding:8px; flex:none; margin:0 0 0 auto;
  color:#fff; background:transparent; border:1px solid #ffffff52; border-radius:12px;
  font-size:13px;
}
#t-records svg { width:18px; height:18px; flex:none; }
#t-records:not(.hidden) + #t-home { margin-left:0; }
#records {
  width:min(580px,calc(100% - var(--safe-left) - var(--safe-right) - 24px));
  max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom) - 24px);
  padding:clamp(16px,4vw,28px); border:1px solid var(--line); border-radius:22px;
  color:var(--ink); overflow:auto; overscroll-behavior:contain;
}
#records::backdrop { background:#17142c85; }
.records-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.records-header h2 { margin:0; font-size:clamp(20px,5vw,26px); }
#records-close { width:44px; min-height:44px; margin:0; padding:0; background:#f1edf9; font-size:25px; }
.records-copy, .records-meta { color:var(--muted); margin:10px 0; font-size:14px; }
.records-confirmed h3 { margin:0 0 6px; font-size:17px; }
.records-confirmed { margin:17px 0; }
.record-list { display:grid; gap:8px; list-style:none; padding:0; margin:0; }
.record-line { padding:10px 12px; border-radius:12px; background:#f5f2fa; overflow-wrap:anywhere; }
.records-confirmed .record-line { background:#edf8f2; }
.record-line small { display:block; color:var(--muted); margin:2px 0 6px; }
.record-line p { margin:3px 0; white-space:pre-wrap; }
.record-line .record-translation { color:#4b4160; }
#records-transcript { padding-block:10px; border-top:1px solid var(--line); }
#records-transcript summary { cursor:pointer; font-weight:650; min-height:32px; }
.records-actions { display:grid; gap:8px; margin-top:10px; }
#records .records-actions button, #records-library button { margin:0; white-space:normal; line-height:1.3; }
#records-library button { text-align:start; }
.records-manage { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 14px; margin-top:10px; }
#records .records-text { min-height:38px; text-align:start; }
.records-status { font-size:14px; margin:8px 0 0; color:#51417b; }
.records-status:empty, .records-copy:empty { display:none; }
@media (max-width:450px) {
  #t-records span { display:none; }
  #records { inset:auto var(--safe-right) var(--safe-bottom) var(--safe-left); margin:0 auto; border-radius:22px 22px 0 0; }
}
