#calm-reader .rf-toolbar{padding:5px 8px;gap:2px;align-items:center;flex-wrap:wrap;max-width:calc(100vw - 24px);box-shadow:0 3px 13px #14213026;background:var(--cr-bg,#fff);border:1px solid var(--cr-line,#ddd);border-radius:5px;}
#calm-reader .rf-toolbar button{display:inline-flex;align-items:center;justify-content:center;min-height:34px;min-width:31px;padding:4px 7px;font-size:17px;line-height:1.2;color:var(--cr-ink,#303740);border-radius:3px;white-space:nowrap;}
#calm-reader .rf-toolbar button span{margin:0;color:inherit;}
#calm-reader .rf-toolbar button[aria-pressed=true],#calm-reader .rf-toolbar button[aria-expanded=true]{background:var(--cr-soft,#e9edf1);color:var(--cr-accent,#496b91);}
#calm-reader .rf-toolbar input{width:58px;height:31px;border:1px solid var(--cr-line,#d8dce0);background:var(--cr-bg,#fff);color:var(--cr-ink);border-radius:3px;font-size:17px;text-align:center;padding:2px;}
.rf-divider{height:22px;width:1px;background:var(--cr-line,#ddd);margin:0 4px;}
#calm-reader .rf-toolbar svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;}
.rf-color-icon{font-size:21px;border-bottom:2px solid currentColor;line-height:24px;}
#calm-reader .rf-popup{display:block;width:330px;max-width:calc(100vw - 24px);padding:14px;z-index:25;border-radius:4px;}
#calm-reader .rf-popup[hidden]{display:none!important;}
.rf-popup h3{font-size:14px;font-weight:600;margin:0 0 10px;color:var(--cr-muted,#666);}
.rf-popup h3:not(:first-child){margin-top:20px;}
.rf-font-colors,.rf-backgrounds{display:grid;grid-template-columns:repeat(9,1fr);gap:5px;}
#calm-reader .rf-popup .rf-font-colors button,#calm-reader .rf-popup .rf-backgrounds button{border:1px solid #dcdfe4;border-radius:2px;min-width:0;height:29px;padding:0;line-height:1;font-size:18px;}
#calm-reader .rf-popup button[aria-pressed=true]{outline:2px solid #567bff;outline-offset:1px;}
#calm-reader .rf-popup button:focus-visible,#calm-reader .rf-toolbar :focus-visible{outline:2px solid #567bff;outline-offset:2px;}
.rf-no-color{background-image:linear-gradient(135deg,transparent 47%,#d3d9e8 48%,#d3d9e8 52%,transparent 53%)!important;}
#calm-reader .rf-popup .rf-clear{border:1px solid var(--cr-line,#ddd);border-radius:3px;width:100%;margin-top:17px;padding:8px;font-size:14px;}
#calm-reader .rf-popup .rf-undo{font-size:12px;padding:8px 4px 0;color:var(--cr-muted);}
#calm-reader .rf-popup .rf-option{display:block;width:100%;text-align:left;padding:8px 5px;font-size:15px;}
.rf-link-form label{display:block;margin-bottom:10px;font-size:14px;}.rf-link-form input{box-sizing:border-box;width:100%;padding:9px;border:1px solid var(--cr-line,#ddd);border-radius:3px;background:var(--cr-bg);color:var(--cr-ink);}.rf-link-form>div{display:flex;justify-content:space-between;margin-top:12px;}.rf-link-form p{font-size:12px;color:#b54242;}
.rf-code{padding:1px 3px;border-radius:2px;--rf-code-bg:#eef0f2;}[data-cr-paper=night] .rf-code{--rf-code-bg:#383d42;}
@media(max-width:650px){#calm-reader .rf-toolbar button{font-size:14px;min-width:27px;padding:4px 5px;}.rf-divider{margin:0 1px;}#calm-reader .rf-toolbar input{width:45px;font-size:15px;}#calm-reader .rf-toolbar{max-width:calc(100vw - 24px);}}
#calm-reader .rf-popup:has(.rf-block-menu){width:246px;padding:8px 10px;max-height:calc(100dvh - 100px);overflow:auto;}
#calm-reader .rf-popup .rf-block-menu .rf-option{display:flex;align-items:center;gap:15px;font-size:14px;min-height:36px;padding:6px 9px;}.rf-block-menu .rf-option>span{width:24px;text-align:center;font-size:17px;color:var(--cr-text);}.rf-block-menu .rf-option i{margin-left:auto;font-style:normal;color:var(--cr-muted);}.rf-more-headings{padding-left:38px;}#calm-reader .rf-popup .rf-block-separator{border-top:1px solid var(--cr-line);border-radius:0;margin-top:5px;padding-top:10px;}
#calm-reader .cr-prose h1{font-size:1.5em;line-height:1.45;margin:1.3em 0 .7em;}#calm-reader .cr-prose h5{font-size:.95em;font-weight:650;margin:1.2em 0 .6em;}#calm-reader .cr-prose h6{font-size:.9em;font-weight:650;margin:1.2em 0 .6em;}
#calm-reader .cr-prose .rf-block-callout{background:color-mix(in srgb,var(--cr-accent) 8%,var(--cr-bg));border-left:3px solid var(--cr-accent);padding:10px 14px;margin:14px 0;border-radius:2px;}
#calm-reader .cr-prose .rf-block-quote{border-left:3px solid var(--cr-line);padding:5px 14px;margin:14px 0;}.rf-block-pre{white-space:pre-wrap;overflow-wrap:anywhere;}#calm-reader .cr-prose .rf-block-pre code{font-family:ui-monospace,SFMono-Regular,monospace;font-size:.88em;background:none;}
#calm-reader .cr-prose .rf-block-todo{padding-left:0;list-style:none;}#calm-reader .rf-block-todo li{display:flex;align-items:flex-start;gap:10px;}#calm-reader .rf-block-todo input{width:16px;height:16px;margin:9px 0 0;flex:0 0 16px;accent-color:var(--cr-accent);}
.rf-block-details{border:1px solid var(--cr-line);padding:6px 12px;margin:14px 0;border-radius:3px;}.rf-block-details>summary{cursor:pointer;font-size:.9em;color:var(--cr-muted);}.rf-block-details>[data-rf-block-body]{padding-top:8px;}.rf-block-details:not([open])>[data-rf-block-body]{display:none;}
#calm-reader .cr-toc .cr-level-5{padding-left:32px;font-size:12px;}#calm-reader .cr-toc .cr-level-6{padding-left:39px;font-size:12px;}

/* Use one control scale; chevrons have their own box rather than a text baseline. */
#calm-reader #cr-format-top.rf-toolbar{padding:6px;gap:2px 3px;align-items:center;border-radius:4px;line-height:1;font-size:14px}
#calm-reader #cr-format-top.rf-toolbar button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;gap:6px;height:32px;min-height:32px;min-width:32px;margin:0;padding:0 7px;font-size:14px;line-height:1;font-weight:400;color:var(--cr-text,#303740)}
#calm-reader #cr-format-top.rf-toolbar button.rf-icon-button{width:32px;padding:0}
#calm-reader #cr-format-top.rf-toolbar button span{margin:0;line-height:1;flex:0 0 auto}
#calm-reader #cr-format-top.rf-toolbar .rf-icon{display:block;width:20px;height:20px;flex:0 0 20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#calm-reader #cr-format-top.rf-toolbar .rf-chevron{display:block;width:12px;height:12px;flex:0 0 12px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#calm-reader #cr-format-top.rf-toolbar .rf-color-icon{display:inline-flex;align-items:center;justify-content:center;width:20px;height:24px;border-bottom:2px solid currentColor;line-height:1;font-size:14px}
#calm-reader #cr-format-top.rf-toolbar .rf-paragraph-label{max-width:5em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:0 1 auto}
#calm-reader #cr-format-top.rf-toolbar input{box-sizing:border-box;width:50px;height:32px;min-height:32px;margin:0 2px;padding:2px;font-size:14px;line-height:1.2;border-radius:3px;align-self:center;color:var(--cr-text,#303740)}
#calm-reader #cr-format-top.rf-toolbar .rf-divider{display:block;flex:0 0 1px;width:1px;height:20px;margin:0 4px;align-self:center}

/* Letter-shaped controls need a smaller ink area than pictograms beside CJK labels. */
#calm-reader #cr-format-top.rf-toolbar button:is([data-rf="bold"],[data-rf="italic"],[data-rf="strike"],[data-rf="underline"],[data-rf="colors"]) .rf-icon{width:16px;height:16px;flex-basis:16px}
#calm-reader #cr-format-top.rf-toolbar .rf-color-icon{width:16px;height:18px;border-bottom-width:1.5px}
