/* Scoped reading feedback and scratch-paper surfaces. */
.rt-window,.rp-dialog,.rp-page,.rp-list{--rt-bg:var(--surface,#fff);--rt-text:var(--text,#26342d);--rt-muted:var(--muted,#7b867e);--rt-line:var(--line,#dce4dd);--rt-green:#0e6b5c;color:var(--rt-text);font:14px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;box-sizing:border-box}
:is(.rt-window,.rp-dialog,.rp-page,.rp-list) *{box-sizing:border-box}:is(.rt-window,.rp-dialog,.rp-page,.rp-list) [hidden]{display:none!important}:is(.rt-window,.rp-dialog,.rp-page,.rp-list) button{font:inherit;cursor:pointer}:is(.rt-window,.rp-dialog,.rp-page,.rp-list) :is(button,a,select,input,textarea):focus-visible{outline:2px solid #0e6b5c;outline-offset:3px}.rt-button,.rp-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;border:1px solid var(--rt-line,#dce4dd);border-radius:8px;padding:7px 13px;background:var(--rt-bg,#fff);color:inherit;text-decoration:none}.rt-button:disabled,.rp-button:disabled{opacity:.45;cursor:default}.rt-primary,.rp-primary{background:#0e6b5c;border-color:#0e6b5c;color:white}.rt-icon{display:inline-flex;align-items:center;justify-content:center;width:38px;min-width:38px;height:38px;border:0;border-radius:8px;background:none;color:inherit}.rt-icon:hover{background:#7c9c8119}.rt-icon svg{width:19px;height:19px;pointer-events:none}.rt-muted,.rp-muted{color:var(--rt-muted,#7b867e);font-size:12px}.rp-error{color:#b43838;font-size:12px;line-height:1.8;white-space:pre-wrap}.rp-notice{color:var(--rt-muted);font-size:11px;line-height:1.8}.rp-dialog{width:min(600px,calc(100vw - 32px));max-width:600px;max-height:90dvh;padding:0;border:1px solid var(--rt-line);border-radius:15px;background:var(--rt-bg);box-shadow:0 20px 75px #183a242b;overflow:auto}.rp-dialog::backdrop{background:#15281d66;backdrop-filter:blur(3px)}.rp-head{display:flex;align-items:center;gap:12px;padding:20px 24px 14px}.rp-head h2{font-size:19px;font-weight:600;flex:1;margin:0}.rp-body{padding:0 24px 22px;overflow-wrap:anywhere}.rp-footer{position:sticky;bottom:0;background:var(--rt-bg);display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:14px 24px;border-top:1px solid var(--rt-line);z-index:1}.rp-footer .rp-left{margin-right:auto}.rp-form-field{display:flex;flex-direction:column;gap:7px;margin:16px 0;font-size:12px}.rp-form-field :is(input:not([type=radio]):not([type=checkbox]),textarea,select),.rp-filter{font:inherit;background:var(--rt-bg);color:inherit;border:1px solid var(--rt-line);padding:9px 11px;border-radius:7px;width:100%}.rp-form-field textarea{resize:vertical;line-height:1.8;min-height:90px}.rp-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.rp-options label{padding:11px 9px;display:flex;align-items:center;gap:7px;border:1px solid var(--rt-line);border-radius:7px;cursor:pointer}.rp-options input{width:16px;height:16px;flex:none;accent-color:#0e6b5c;margin:0}.rp-options label:has(:checked){color:#0e6b5c;background:#719b7610;border-color:#83a58a}.rp-context{padding:14px 16px;background:#7d9b7b10;border-radius:9px;margin:0 0 20px}.rp-context p{font-size:11px;color:var(--rt-muted);margin:0 0 8px}.rp-context blockquote{margin:0;font-size:14px;line-height:1.9;white-space:pre-wrap}.rp-context .katex-display{overflow:auto}.rp-attachment{display:block;max-width:100%;max-height:230px;object-fit:contain;margin:12px 0;border-radius:6px}.rp-upload{font-size:12px;display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:12px 0}.rp-badge{display:inline-block;padding:4px 9px;border-radius:6px;font-size:11px;background:#7d9b7b13;color:var(--rt-muted)}.rp-badge.pending{background:#b3972817;color:#9c761f}.rp-badge.processing{background:#4478c51c;color:#557cb2}.rp-badge.solved{background:#17806318;color:#0e6b5c}.rp-badge.rejected{color:#947474}.rp-badge.duplicate{color:#8c72a5}.rp-result{background:#719b7613;padding:15px;border-radius:8px;line-height:1.9;margin-top:20px;white-space:pre-wrap}.rp-timeline{padding-left:15px;border-left:1px solid var(--rt-line);margin:23px 0 0 4px}.rp-event{position:relative;margin-bottom:20px;font-size:12px}.rp-event:before{content:"";position:absolute;left:-19px;top:5px;width:7px;height:7px;background:#93af9a;border-radius:50%}.rp-event p{margin:5px 0;white-space:pre-wrap}.rp-event small{color:var(--rt-muted);font-size:11px}.rp-page{max-width:1050px;margin:auto;padding:34px 28px 70px}.rp-page h1{font-size:26px;font-weight:600;margin:0 0 8px}.rp-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:22px 0}.rp-filter{width:auto;min-width:130px;font-size:12px}.rp-item{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;padding:20px 0;border:0;border-bottom:1px solid var(--rt-line);background:none;color:inherit;text-align:left}.rp-item strong{display:block;font-size:14px;font-weight:500;line-height:1.8;margin:7px 0;overflow-wrap:anywhere}.rp-item small{display:block;font-size:11px;color:var(--rt-muted)}.rp-empty{padding:45px 15px;text-align:center;color:var(--rt-muted);font-size:13px}.rp-more{display:flex;justify-content:center;padding:20px}.rp-table-wrap{overflow:auto;border:1px solid var(--rt-line);border-radius:9px;background:var(--rt-bg)}.rp-table{width:100%;min-width:650px;border-collapse:collapse;font-size:12px}.rp-table th,.rp-table td{padding:15px;text-align:left;border-bottom:1px solid var(--rt-line)}.rp-table th{font-size:11px;color:var(--rt-muted);font-weight:500}.rp-table td:first-child{max-width:360px}.rp-table strong{font-weight:500;display:block;overflow-wrap:anywhere;line-height:1.8}.rp-table small{font-size:11px;color:var(--rt-muted)}
.rt-window{position:fixed;z-index:25;left:var(--rt-x);top:var(--rt-y);width:var(--rt-w);height:var(--rt-h);min-width:0;display:flex;flex-direction:column;border:1px solid var(--rt-line);border-radius:14px;overflow:hidden;background:var(--rt-bg);box-shadow:0 15px 55px #203b2d30;overscroll-behavior:contain}.rt-head{position:relative;display:flex;align-items:center;gap:4px;padding:4px 8px;background:var(--rt-bg);touch-action:none;cursor:grab;user-select:none;flex:none;border-bottom:1px solid var(--rt-line)}.rt-head:before{content:"";position:absolute;top:4px;left:calc(50% - 13px);width:26px;height:3px;background:#a5b5a344;border-radius:4px}.rt-heading{flex:none;min-width:0;padding:8px 4px;white-space:nowrap}.rt-heading strong{display:block;font-size:14px;font-weight:600}.rt-tools{position:relative;flex:1;min-width:0;height:52px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;background:var(--rt-bg);touch-action:pan-x;cursor:default}.rt-tools::-webkit-scrollbar{display:none}.rt-viewport{min-height:0;flex:1;overflow:auto;position:relative;overscroll-behavior:contain;background:var(--rt-bg);padding:0;scrollbar-width:thin;scrollbar-color:#aab3b9 transparent}.rt-host{position:relative;width:100%;min-height:250px}.rt-host .ink-native-bar{position:static!important;width:100%!important;max-width:none!important;margin:0!important;box-shadow:none!important;border:0!important}.rt-tools .ink-native-bar{position:static!important;width:100%!important;max-width:100%!important;transform:none!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;overflow-x:auto!important}.rt-tools .ink-native-bar .ink-status{display:none}.rt-tools .ink-native-bar{display:flex;flex-wrap:nowrap;width:max-content!important;min-width:100%;max-width:none!important;overflow:visible!important}.rt-tools .ink-native-leading,.rt-tools .ink-native-slots,.rt-tools .ink-native-trailing{flex:none;overflow:visible}.rt-tools .ink-native-trailing{margin-left:auto}.rt-host.ink-paper-sized{width:100%!important;max-width:100%!important}.rt-native-host{height:100%;min-height:100%}.rt-tools .bs-native-tools{height:52px;min-height:52px}.rt-host .bs-native-paper{min-height:100%;height:100%}.rt-grip{position:absolute;bottom:0;right:0;width:35px;height:28px;border:0;background:transparent;color:var(--rt-muted);cursor:nwse-resize;touch-action:none}.rt-grip svg{pointer-events:none;width:17px;height:17px}.rt-load{padding:30px 14px;text-align:center;font-size:12px;color:var(--rt-muted)}.rt-canvas-empty{padding:22px;text-align:center}.rt-window .ink-paper-settings{z-index:90}.rt-notification{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:150;background:#244737;color:white;padding:11px 17px;border-radius:8px;max-width:calc(100vw - 32px);font-size:12px}.rt-button :is(svg){width:17px;height:17px}.rt-scratch-launch{white-space:nowrap}
@media(max-width:760px){.rp-dialog{position:fixed;inset:auto 0 0;width:100%;max-width:100%;max-height:92dvh;margin:0;border:0;border-radius:18px 18px 0 0;padding-bottom:env(safe-area-inset-bottom)}.rp-head{padding:18px 20px 13px}.rp-head h2{font-size:18px}.rp-body{padding:0 20px 18px}.rp-footer{padding:13px 20px}.rp-footer .rp-button{min-height:44px}.rp-form-field :is(input,textarea,select){font-size:16px}.rp-options label{font-size:11px;min-height:44px}.rp-page{padding:27px 20px 60px}.rp-page h1{font-size:23px}.rt-head{padding:4px}.rt-heading strong{font-size:13px}.rt-head .rt-icon{width:36px;min-width:36px;height:36px}.rt-scratch-launch{font-size:12px!important}.rt-grip{width:38px;height:28px}}

.rt-window .ink-native-status{display:none}.rt-tools .ink-native-bar{gap:2px;height:52px;padding:0 4px}.rt-tools .ink-native-leading,.rt-tools .ink-native-trailing{min-width:0}.rt-tools .ink-native-leading{justify-content:flex-start}

/* WKWebView keeps the layout viewport tall while the software keyboard is open. */
.rp-dialog{position:fixed;inset:auto;margin:0;left:var(--rp-cx,50%);top:var(--rp-cy,50%);transform:translate(-50%,-50%);max-height:calc(var(--rp-h,100dvh) - 32px)}
@media(max-width:760px){.rp-dialog{left:var(--rp-x,0px);top:calc(var(--rp-y,0px) + var(--rp-h,100dvh));width:var(--rp-w,100vw);max-height:calc(var(--rp-h,100dvh) - 8px);transform:translateY(-100%)}}

#bkMorePanel .rt-menu-links{flex-wrap:wrap}

/* Keep the paper flush with the floating window. */
.rt-viewport::-webkit-scrollbar{width:4px;height:4px}
.rt-viewport::-webkit-scrollbar-track,.rt-viewport::-webkit-scrollbar-corner{background:transparent}
.rt-viewport::-webkit-scrollbar-thumb{background:#aab3b9;border-radius:4px}
@supports selector(::-webkit-scrollbar){.rt-viewport{scrollbar-width:auto;scrollbar-color:auto}}
.rt-host .ink-write-sheet{box-shadow:none}
.rt-host .ink-write-sheet:last-child{margin-bottom:0}
