.topbar .topbar-case-note-btn { display:none; width:40px; height:40px; padding:0; margin-left:auto; flex:0 0 40px; align-self:center; align-items:center; justify-content:center; border:1px solid rgba(255,253,247,.48); border-radius:50%; color:#fffdf7; background:var(--cinnabar,#b94132); box-shadow:0 2px 8px rgba(var(--accent-rgb,185,65,50),.3); cursor:pointer; }
.topbar-case-note-btn svg { width:19px; height:19px; }
body.paipan-case-note-supported .topbar #paipan-ai-btn { margin-left:8px; }
.topbar-case-note-btn:active { transform:scale(.96); }
.record-case-note-overlay[hidden] { display:none; }
.record-case-note-overlay { position:fixed; inset:0; z-index:9100; display:flex; align-items:flex-end; justify-content:center; }
.record-case-note-backdrop { position:absolute; inset:0; width:100%; height:100%; margin:0; padding:0; border:0; border-radius:0; background:rgba(23,25,22,.46); }
.record-case-note-sheet { position:relative; box-sizing:border-box; display:flex; flex-direction:column; width:100%; max-width:600px; max-height:90vh; max-height:90dvh; overflow:hidden; padding:0 22px calc(22px + env(safe-area-inset-bottom,0px)); border:1px solid var(--line,#ddd6c7); border-bottom:0; border-radius:22px 22px 0 0; background:var(--surface,#fffdf7); color:var(--ink,#24241f); box-shadow:0 -8px 32px rgba(0,0,0,.14); }
.record-case-note-sheet.is-opening { animation:record-note-rise .24s ease-out; }
.record-case-note-grabber { position:relative; flex:0 0 36px; width:100%; cursor:ns-resize; touch-action:none; }
.record-case-note-grabber::before { content:""; position:absolute; width:34px; height:4px; top:10px; left:calc(50% - 17px); border-radius:4px; background:var(--line,#ddd6c7); }
.record-case-note-grabber:focus-visible { outline:2px solid var(--cinnabar,#b94132); outline-offset:-3px; border-radius:8px; }
.record-case-note-head { display:flex; flex-shrink:0; justify-content:center; padding:0 30px; margin-bottom:14px; }
.record-case-note-close { position:absolute; top:8px; right:12px; z-index:1; display:grid; place-items:center; width:30px; height:30px; padding:0; border:0; border-radius:50%; background:var(--bg,#eeeae0); color:var(--muted,#747469); font-size:23px; cursor:pointer; }
#record-case-note-form { display:flex; flex-direction:column; flex:1; min-height:0; }
.record-case-note-tabs { box-sizing:border-box; display:grid; width:100%; max-width:280px; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; padding:3px; border-radius:10px; background:var(--bg,#eeeae0); box-shadow:inset 0 1px 3px rgba(0,0,0,.06); }
.record-case-note-tabs button { min-height:28px; padding:4px; border:0; border-radius:7px; background:transparent; color:var(--muted,#747469); font:inherit; font-size:13px; line-height:20px; white-space:nowrap; cursor:pointer; }
.record-case-note-tabs button[aria-selected="true"] { background:var(--cinnabar,#b94132); color:#fffdf7; box-shadow:0 2px 6px rgba(var(--accent-rgb,185,65,50),.2); }
.record-case-note-tabs button[hidden] { display:none; }
.record-case-note-fields { display:flex; flex-direction:column; flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; }
.record-case-note-sheet label { display:block; flex-shrink:0; margin:14px 0 8px; font-size:14px; font-weight:600; }
.record-case-note-fields label:first-child { margin-top:0; }
.record-case-note-sheet input,.record-case-note-sheet textarea { box-sizing:border-box; display:block; width:100%; margin:0; padding:12px; border:1px solid var(--line,#ddd6c7); border-radius:11px; outline:none; color:var(--ink,#24241f); background:var(--bg,#eeeae0); font:inherit; font-size:16px; line-height:1.55; }
.record-case-note-sheet input { flex-shrink:0; }
.record-case-note-sheet textarea { flex:1 0 120px; min-height:120px; resize:none; }
.record-case-note-sheet input:focus,.record-case-note-sheet textarea:focus { border-color:var(--cinnabar,#b94132); }
.record-case-note-error { flex-shrink:0; margin:8px 0 0; color:var(--cinnabar,#b94132); font-size:13px; }
.record-case-note-error:empty { display:none; }
.record-case-note-save { display:block; flex-shrink:0; width:100%; min-height:44px; margin-top:14px; padding:10px 16px; border:0; border-radius:11px; background:var(--cinnabar,#b94132); color:#fffdf7; font:inherit; font-weight:600; cursor:pointer; }
.record-case-note-save:disabled { opacity:.6; cursor:wait; }
@keyframes record-note-rise { from { transform:translateY(100%); } to { transform:translateY(0); } }
@media (max-width:760px) { .topbar .topbar-case-note-btn { width:36px; height:36px; flex-basis:36px; } }
@media (max-width:480px) { .record-case-note-sheet { padding-left:18px; padding-right:18px; } }
@media (prefers-reduced-motion:reduce) { .record-case-note-sheet.is-opening { animation:none; } }
