/* The illustrated frame and its safe-area geometry stay frozen. */
.rc-anchor { position:absolute; top:43%; left:50%; width:1px; height:1px; scroll-margin-top:12px; }
.tc-codex-panel { overflow:hidden; }
.rc-workspace { display:flex; flex-direction:column; height:100%; min-height:0; color:#f2e8ce; font-family:"Noto Sans TC","Microsoft JhengHei",sans-serif; font-size:clamp(11px,.8vw,22px); padding:4px 6px; box-sizing:border-box; pointer-events:auto; }
.rc-tools { display:flex; flex:0 0 auto; align-items:center; gap:6px; padding:0 0 6px; border-bottom:1px solid #b28e5266; }
.rc-search-label { flex:1; min-width:0; }
.rc-tools input,.rc-tools button,.rc-dialog button,.rc-dialog select { font:inherit; border:1px solid #ab8b56; background:#14304ada; color:#fff1d1; border-radius:3px; min-height:32px; padding:5px 9px; box-sizing:border-box; }
.rc-tools input { width:100%; }
.rc-tools input::placeholder { color:#c3cbd4; }
.rc-tools button,.rc-dialog button { cursor:pointer; }
.rc-workspace :is(button,input,summary,a):focus-visible,.rc-dialog :is(button,select):focus-visible { outline:2px solid #f9dda4; outline-offset:2px; }
.rc-scroll { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#ba9855 #14304a70; padding:0 5px 0 0; }
.rc-scroll:focus-visible { outline:1px solid #e0c07b; outline-offset:-1px; }
.rc-workspace .tc-codex-panel__page { min-height:0; padding:0; }
.rc-category-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 0; }
.rc-category-heading h2 { font-family:"Noto Serif TC","PMingLiU",serif; font-size:1.1em; margin:0; color:#ffe6a8; }
.rc-category-heading span { color:#bacde0; font-size:.9em; }
.rc-results { list-style:none; padding:0; margin:0; }
.rc-results li { margin:0 0 5px; }
.rc-entry { border-bottom:1px solid #bca36c55; }
.rc-entry summary { cursor:pointer; display:flex; align-items:center; gap:10px; padding:7px 5px; list-style:none; }
.rc-entry summary::-webkit-details-marker { display:none; }
.rc-entry summary img { width:40px; height:40px; object-fit:contain; flex-shrink:0; }
.rc-entry summary > span:not(.rc-open-icon) { min-width:0; flex:1; }
.rc-entry strong { display:block; font-size:1.06em; color:#ffebb3; }
.rc-entry small { display:block; color:#bfcfe1; font-size:.95em; margin-top:3px; line-height:1.5; }
.rc-open-icon { color:#dac185; }
.rc-entry[open] summary { background:#26466670; }
.rc-entry-body { padding:0 12px 9px 55px; line-height:1.8; overflow-wrap:anywhere; }
.rc-entry-body p { margin:4px 0 8px; }
.rc-workspace a { color:#f3d795; text-underline-offset:3px; }
.rc-empty { padding:14px 4px; line-height:1.8; }
.rc-empty p { margin:5px 0; color:#c3d0e0; }
.rc-footnote { flex:0 0 auto; color:#b8c8d9; font-size:.8em; padding-top:5px; text-align:right; }
.rc-workspace [hidden] { display:none!important; }
.rc-dialog { width:min(1000px,calc(100% - 28px)); max-width:none; height:min(760px,calc(100dvh - 32px)); max-height:none; border:1px solid #cfaf65; border-radius:8px; background:#112a43; color:#f3e6c8; padding:16px; box-sizing:border-box; overflow:hidden; }
.rc-dialog::backdrop { background:#040f1bd9; }
.rc-dialog[open] { display:flex; flex-direction:column; gap:12px; pointer-events:auto; }
.rc-dialog > header { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.rc-dialog h2 { font-size:20px; margin:0; }
.rc-category-picker { display:flex; align-items:center; gap:10px; }
.rc-category-picker select { flex:1; }
.rc-dialog-host { flex:1; min-height:0; }
.rc-dialog .rc-workspace { font-size:15px; padding:0; }
.rc-dialog [data-codex-expand] { display:none; }
.rc-dialog .rc-tools button,.rc-dialog .rc-tools input,.rc-dialog button,.rc-dialog select { min-height:40px; }
@media(max-width:600px) {
  .tc-codex-panel > .rc-workspace { padding:3px; }
  .tc-codex-panel.rc-enhanced > .rc-workspace .rc-search-label,.tc-codex-panel.rc-enhanced > .rc-workspace [data-codex-reset],.tc-codex-panel.rc-enhanced > .rc-workspace .rc-scroll,.tc-codex-panel.rc-enhanced > .rc-workspace .rc-footnote { display:none; }
  .tc-codex-panel.rc-enhanced > .rc-workspace .rc-tools { flex:1; border:0; padding:0; justify-content:center; }
  .tc-codex-panel > .rc-workspace [data-codex-expand] { min-height:36px; font-size:12px; }
  .rc-dialog { padding:12px; gap:9px; }
  .rc-dialog h2 { font-size:17px; }
  .rc-entry-body { padding-left:10px; }
}
@media(prefers-reduced-motion:reduce) { .rc-scroll { scroll-behavior:auto; } }
