@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(./KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(./KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(./KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(./KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(./KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(./KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(./KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(./KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(./KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(./KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(./KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(./KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(./KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(./KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(./KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(./KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(./KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(./KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(./KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(./KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(./KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(./KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(./KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(./KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(./KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(./KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(./KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(./KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(./KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(./KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(./KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(./KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(./KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(./KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(./KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(./KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(./KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(./KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(./KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(./KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(./KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(./KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(./KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(./KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(./KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(./KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(./KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(./KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(./KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(./KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(./KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,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) format("woff2"),url(./KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(./KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(./KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(./KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(./KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(./KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(./KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(./KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font:normal 1.21em KaTeX_Main,math,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.19.0"}.katex .katex-mathml{border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.katex-newline{display:block}.katex .katex-base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .katex-base,.katex .katex-strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .katex-vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .katex-thinbox{display:inline-flex;flex-direction:row;max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .katex-hdashline,.katex .katex-hline,.katex .katex-overline .overline-line,.katex .katex-rule,.katex .katex-underline .underline-line,.katex .mfrac .frac-line{min-height:1px}.katex .mspace{display:inline-block}.katex .katex-smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.katex-inner,.katex .llap>.katex-inner,.katex .rlap>.katex-inner{position:absolute}.katex .clap>.katex-fix,.katex .llap>.katex-fix,.katex .rlap>.katex-fix{display:inline-block}.katex .llap>.katex-inner{right:0}.katex .clap>.katex-inner,.katex .rlap>.katex-inner{left:0}.katex .clap>.katex-inner>span{margin-left:-50%;margin-right:50%}.katex .katex-rule{border:0 solid;display:inline-block;position:relative}.katex .katex-hline,.katex .katex-overline .overline-line,.katex .katex-underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .katex-hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.katex-root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .katex-sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .katex-sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .katex-sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .katex-sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .katex-sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .katex-sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .katex-sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .katex-sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .katex-sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .katex-sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .katex-sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .katex-sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .katex-sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .katex-sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .katex-sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .katex-sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .katex-sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .katex-sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .katex-sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .katex-sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .katex-sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .katex-sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .katex-sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .katex-sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .katex-sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .katex-sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .katex-sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .katex-sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .katex-sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .katex-sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .katex-sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .katex-sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .katex-sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .katex-sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .katex-sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .katex-sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .katex-sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .katex-sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .katex-sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .katex-sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .katex-sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .katex-sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .katex-sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .katex-sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .katex-sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .katex-sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .katex-sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .katex-sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .katex-sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .katex-sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .katex-sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .katex-sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .katex-sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .katex-sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .katex-sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .katex-sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .katex-sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .katex-sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .katex-sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .katex-sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .katex-sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .katex-sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .katex-sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .katex-sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .katex-sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .katex-sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .katex-sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .katex-sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .katex-sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .katex-sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .katex-sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .katex-sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .katex-sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .katex-sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .katex-sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .katex-sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .katex-sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .katex-sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .katex-sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .katex-sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .katex-sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .katex-sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .katex-sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .katex-sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .katex-sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .katex-sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .katex-sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .katex-sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .katex-sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .katex-sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .katex-sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .katex-sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .katex-sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .katex-sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .katex-sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .katex-sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .katex-sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .katex-sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .katex-sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .katex-sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .katex-sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .katex-sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .katex-sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .katex-sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .katex-sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .katex-sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .katex-sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .katex-sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .katex-sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .katex-sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .katex-sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .katex-sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .katex-sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .katex-sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .katex-sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .katex-sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .katex-sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .katex-sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .katex-sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .katex-sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .katex-sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .katex-accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .katex-accent .accent-body{position:relative}.katex .katex-accent .accent-body:not(.accent-full){width:0}.katex .katex-overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .katex-stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .katex-stretchy:after,.katex .katex-stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .katex-sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .reflectbox{display:inline-block;transform:scaleX(-1)}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.katex-tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.katex-tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}
:root {
  --bg: #ffffff;
  --sidebar-bg: #f7f7f5;
  --text: #37352f;
  --text-soft: #787774;
  --text-faint: #a5a4a0;
  --hover: rgba(55, 53, 47, 0.06);
  --active: rgba(55, 53, 47, 0.1);
  --border: rgba(55, 53, 47, 0.12);
  --accent: #2383e2;
  --danger: #eb5757;
  --callout-bg: #f1f1ef;
  --code-bg: #f7f6f3;
  --mark: rgba(255, 212, 0, 0.45);
  --shadow: 0 0 0 1px rgba(15, 15, 15, 0.05), 0 3px 6px rgba(15, 15, 15, 0.1), 0 9px 24px rgba(15, 15, 15, 0.2);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191919;
    --sidebar-bg: #202020;
    --text: rgba(255, 255, 255, 0.86);
    --text-soft: rgba(255, 255, 255, 0.5);
    --text-faint: rgba(255, 255, 255, 0.3);
    --hover: rgba(255, 255, 255, 0.055);
    --active: rgba(255, 255, 255, 0.1);
    --border: rgba(255, 255, 255, 0.1);
    --callout-bg: #252525;
    --code-bg: #202020;
    --mark: rgba(255, 212, 0, 0.3);
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 3px 6px rgba(0, 0, 0, 0.4), 0 9px 24px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

kbd {
  font-family: var(--font);
  font-size: 11px;
  color: var(--text-faint);
  margin-left: auto;
}

.app {
  display: flex;
  height: 100%;
}

/* ---------- 사이드바 ---------- */
.sidebar {
  position: relative;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: var(--text-soft);
  user-select: none;
}

.sidebar-drag {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 8px;
  -webkit-app-region: drag;
}

.platform-darwin .sidebar-drag {
  height: 44px;
}

.sidebar-close {
  -webkit-app-region: no-drag;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 18px;
  line-height: 1;
  color: var(--text-faint);
  opacity: 0;
  transition: opacity 0.15s;
}

.sidebar:hover .sidebar-close,
.sidebar-close:focus-visible {
  opacity: 1;
}

.sidebar-close:hover {
  background: var(--hover);
}

.sidebar-closed.platform-darwin .topbar {
  padding-left: 84px;
}

.topbar-btn.sidebar-open {
  font-size: 18px;
  line-height: 1;
  padding: 2px 8px 5px;
}

.sidebar-actions {
  padding: 0 6px 8px;
}

.side-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 10px;
  border-radius: 6px;
  text-align: left;
}

.side-item:hover,
.tree-row:hover {
  background: var(--hover);
}

.side-icon {
  width: 18px;
  text-align: center;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 6px 8px;
}

.side-section {
  margin-bottom: 10px;
}

.side-label-row {
  display: flex;
  align-items: center;
  border-radius: 6px;
}

.side-label-row:hover {
  background: var(--hover);
}

.side-label {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-faint);
  text-align: left;
}

.side-caret {
  font-size: 8px;
  opacity: 0;
  transition: transform 0.12s, opacity 0.12s;
}

.side-caret.open {
  transform: rotate(90deg);
}

.side-label-row:hover .side-caret,
.side-label:focus-visible .side-caret {
  opacity: 1;
}

.side-label-actions {
  display: none;
  padding-right: 6px;
}

.side-label-row:hover .side-label-actions {
  display: flex;
}

.side-label-actions button {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  color: var(--text-soft);
}

.side-label-actions button:hover {
  background: var(--active);
}

.side-more {
  width: 100%;
  text-align: left;
  padding: 4px 10px 4px 34px;
  font-size: 13px;
  color: var(--text-faint);
  border-radius: 6px;
}

.side-more:hover {
  background: var(--hover);
}

.tree-row:focus-visible,
.sidebar-resizer:focus-visible {
  outline: 2px solid rgba(35, 131, 226, 0.6);
  outline-offset: -2px;
}

.tree-row[data-drop='inside'] {
  background: rgba(35, 131, 226, 0.15);
}

.tree-row[data-drop='before'] {
  box-shadow: inset 0 2px 0 rgba(35, 131, 226, 0.8);
}

.tree-row[data-drop='after'] {
  box-shadow: inset 0 -2px 0 rgba(35, 131, 226, 0.8);
}

.tree-rename {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid rgba(35, 131, 226, 0.6);
  border-radius: 4px;
  padding: 2px 6px;
  outline: none;
}

.menu-footer {
  padding: 4px 8px 2px;
  font-size: 12px;
  color: var(--text-faint);
}

.page-item-menu {
  width: 260px;
}

.tree-row {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding-right: 6px;
  border-radius: 6px;
  cursor: pointer;
}

.tree-row.active {
  background: var(--active);
  color: var(--text);
  font-weight: 500;
}

.tree-arrow {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 9px;
  color: var(--text-faint);
  transition: transform 0.12s;
  flex-shrink: 0;
}

.tree-arrow:hover,
.tree-actions button:hover {
  background: var(--active);
}

.tree-arrow.open {
  transform: rotate(90deg);
}

.tree-arrow.leaf {
  opacity: 0.45;
}

.tree-icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.tree-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.untitled {
  color: var(--text-faint);
}

.tree-actions {
  display: none;
  gap: 2px;
}

.tree-row:hover .tree-actions {
  display: flex;
}

.tree-actions button {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  color: var(--text-soft);
}

.tree-empty {
  padding: 4px 16px;
  font-size: 13px;
  color: var(--text-faint);
}

.sidebar-footer {
  padding: 6px;
  border-top: 1px solid var(--border);
}

/* ---------- 본문 ---------- */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 14px;
  -webkit-app-region: drag;
}

.topbar button {
  -webkit-app-region: no-drag;
}

.nav-buttons button {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 20px;
  line-height: 1;
  color: var(--text-soft);
}

.nav-buttons button:hover:not(:disabled),
.crumb:hover,
.topbar-btn:hover {
  background: var(--hover);
}

.nav-buttons button:disabled {
  opacity: 0.3;
  cursor: default;
}

.breadcrumbs {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
}

.crumb-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
}

.crumb {
  padding: 2px 6px;
  border-radius: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.crumb-sep {
  color: var(--text-faint);
  margin: 0 2px;
}

.topbar-btn {
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--text-soft);
}

.scroll {
  flex: 1;
  overflow-y: auto;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 56px 0;
}

.page.full-width {
  max-width: none;
  padding-left: 96px;
  padding-right: 96px;
}

.page.small-text .page-blocks,
.page.small-text .row-props {
  font-size: 14px;
}

.page.font-serif {
  font-family: 'Lyon-Text', Georgia, 'Nanum Myeongjo', 'AppleMyungjo', serif;
}

.page.font-mono {
  font-family: var(--mono);
}

.page-header {
  margin-bottom: 8px;
}

.page-icon {
  font-size: 64px;
  line-height: 1.1;
  border-radius: 8px;
  padding: 4px;
  margin-left: -4px;
}

.page-icon:hover,
.add-icon:hover {
  background: var(--hover);
}

.add-icon {
  font-size: 14px;
  color: var(--text-faint);
  padding: 4px 8px;
  border-radius: 6px;
  margin-left: -8px;
  opacity: 0;
  transition: opacity 0.15s;
}

.page-header:hover .add-icon {
  opacity: 1;
}

.page-title {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
  margin: 8px 0 12px;
  outline: none;
}

.page-bottom {
  min-height: 40vh;
  cursor: text;
  padding: 8px 0;
}

.page-empty-hint {
  color: var(--text-faint);
}

.empty-state {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
}

/* ---------- 블록 ---------- */
.block-line {
  position: relative;
  display: flex;
  align-items: flex-start;
  border-radius: 4px;
  outline: none;
}

.block-line:focus-visible {
  background: rgba(35, 131, 226, 0.14);
}

.block-line[data-drop='before']::before,
.block-line[data-drop='after']::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(35, 131, 226, 0.6);
  border-radius: 2px;
  pointer-events: none;
}

.block-line[data-drop='before']::before {
  top: -2px;
}

.block-line[data-drop='after']::after {
  bottom: -2px;
}

.block-gutter {
  position: absolute;
  left: -50px;
  top: 3px;
  display: flex;
  opacity: 0;
  transition: opacity 0.1s;
  user-select: none;
}

.block-line:hover > .block-gutter {
  opacity: 1;
}

.gutter-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  color: var(--text-faint);
  font-size: 15px;
  line-height: 24px;
}

.gutter-btn:hover {
  background: var(--hover);
}

.handle {
  cursor: grab;
  font-size: 12px;
  letter-spacing: -2px;
}

.block-children {
  padding-left: 26px;
}

.block-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  padding: 3px 2px;
}

.editable {
  flex: 1;
  min-width: 0;
  line-height: 1.5;
  min-height: 1.5em;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
  caret-color: var(--text);
}

.editable:empty:focus::before,
.editable[data-always]:empty::before {
  content: attr(data-placeholder);
  color: var(--text-faint);
  pointer-events: none;
}

.marker {
  flex-shrink: 0;
  width: 24px;
  margin-right: 2px;
  display: flex;
  justify-content: center;
  line-height: 1.5;
  user-select: none;
}

.bullet-marker {
  font-size: 1.2em;
  line-height: 1.25;
}

.number-marker {
  font-variant-numeric: tabular-nums;
}

.todo-check {
  width: 16px;
  height: 16px;
  margin: 4px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.editable.checked {
  color: var(--text-faint);
  text-decoration: line-through;
}

.toggle-arrow {
  height: 24px;
  border-radius: 4px;
  font-size: 10px;
  transition: transform 0.12s;
}

.toggle-arrow:hover {
  background: var(--hover);
}

.toggle-arrow.open {
  transform: rotate(90deg);
}

.type-h1 {
  font-size: 1.875em;
  font-weight: 700;
  margin-top: 1.2em;
}

.type-h2 {
  font-size: 1.5em;
  font-weight: 650;
  margin-top: 1em;
}

.type-h3 {
  font-size: 1.25em;
  font-weight: 600;
  margin-top: 0.8em;
}

.type-h1 .editable,
.type-h2 .editable,
.type-h3 .editable {
  line-height: 1.3;
}

.type-quote {
  border-left: 3px solid currentColor;
  padding-left: 14px;
  margin: 4px 0;
}

.type-callout {
  background: var(--callout-bg);
  border-radius: 6px;
  padding: 14px 14px 14px 10px;
  margin: 4px 0;
}

.callout-icon {
  font-size: 1.2em;
  border-radius: 4px;
}

.callout-icon:hover {
  background: var(--hover);
}

.divider {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin: 14px 2px;
}

.block-divider .block-line {
  cursor: default;
}

.page-link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 2px;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1.5;
}

.page-link:hover {
  background: var(--hover);
}

.page-link-title {
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

.code-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  background: var(--code-bg);
  border-radius: 6px;
  padding: 8px 0 14px;
  margin: 4px 0;
}

/* 언어 버튼(왼쪽)과 줄바꿈·복사 버튼(오른쪽, 마우스를 올리면 보임) */
.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 4px;
}

.code-lang {
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-soft);
  font-size: 12px;
}

.code-lang:hover {
  background: var(--active);
}

.code-caret {
  font-size: 9px;
}

.code-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.12s;
}

.code-wrap:hover .code-actions,
.code-actions:focus-within {
  opacity: 1;
}

.code-actions button {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--border);
  color: var(--text-soft);
  font-size: 12px;
}

.code-actions button:hover {
  background: var(--hover);
}

.code-actions button.on {
  color: var(--accent);
}

.code-scroll {
  overflow-x: auto;
  padding: 0 14px;
}

/* 강조한 글자(pre)가 크기를 정하고, 같은 자리에 투명한 textarea를 겹친다 */
.code-layer {
  position: relative;
  display: inline-block;
  min-width: 100%;
  vertical-align: top;
}

.code-wrap.wrap .code-layer {
  display: block;
}

.code-highlight,
.code-input {
  margin: 0;
  padding: 0;
  border: none;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.55;
  tab-size: 2;
  white-space: pre;
  overflow-wrap: normal;
}

.code-wrap.wrap .code-highlight,
.code-wrap.wrap .code-input {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.code-highlight {
  color: var(--text);
  pointer-events: none;
}

.code-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  resize: none;
  outline: none;
  overflow: hidden;
  background: transparent;
  color: var(--text);
}

/* 강조가 그려지면 textarea 글자는 숨기고 커서만 보인다 */
.code-input.overlay {
  color: transparent;
  caret-color: var(--text);
}

.code-input::placeholder {
  color: var(--text-faint);
}

.code-input::selection {
  background: rgba(35, 131, 226, 0.28);
  color: transparent;
}

.code-lang-menu {
  width: 240px;
}

.code-lang-list {
  max-height: 320px;
  overflow-y: auto;
}

.code-lang-list .menu-item {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.code-check {
  color: var(--text-soft);
}

/* Prism 토큰 색 (Notion 코드 블록과 비슷한 밝은·어두운 색) */
.code-highlight .token.comment,
.code-highlight .token.prolog,
.code-highlight .token.doctype,
.code-highlight .token.cdata {
  color: #8e908c;
}
.code-highlight .token.punctuation {
  color: #6f6e69;
}
.code-highlight .token.property,
.code-highlight .token.tag,
.code-highlight .token.boolean,
.code-highlight .token.number,
.code-highlight .token.constant,
.code-highlight .token.symbol,
.code-highlight .token.deleted {
  color: #c4554d;
}
.code-highlight .token.selector,
.code-highlight .token.attr-name,
.code-highlight .token.string,
.code-highlight .token.char,
.code-highlight .token.builtin,
.code-highlight .token.inserted {
  color: #448361;
}
.code-highlight .token.operator,
.code-highlight .token.entity,
.code-highlight .token.url {
  color: #9a6e3a;
}
.code-highlight .token.atrule,
.code-highlight .token.attr-value,
.code-highlight .token.keyword {
  color: #337ea9;
}
.code-highlight .token.function,
.code-highlight .token.class-name {
  color: #d9730d;
}
.code-highlight .token.regex,
.code-highlight .token.important,
.code-highlight .token.variable {
  color: #9065b0;
}
.code-highlight .token.bold,
.code-highlight .token.important {
  font-weight: bold;
}
.code-highlight .token.italic {
  font-style: italic;
}

@media (prefers-color-scheme: dark) {
  .code-highlight .token.comment,
  .code-highlight .token.prolog,
  .code-highlight .token.doctype,
  .code-highlight .token.cdata {
    color: #7f848e;
  }
  .code-highlight .token.punctuation {
    color: #abb2bf;
  }
  .code-highlight .token.property,
  .code-highlight .token.tag,
  .code-highlight .token.boolean,
  .code-highlight .token.number,
  .code-highlight .token.constant,
  .code-highlight .token.symbol,
  .code-highlight .token.deleted {
    color: #e06c75;
  }
  .code-highlight .token.selector,
  .code-highlight .token.attr-name,
  .code-highlight .token.string,
  .code-highlight .token.char,
  .code-highlight .token.builtin,
  .code-highlight .token.inserted {
    color: #98c379;
  }
  .code-highlight .token.operator,
  .code-highlight .token.entity,
  .code-highlight .token.url {
    color: #56b6c2;
  }
  .code-highlight .token.atrule,
  .code-highlight .token.attr-value,
  .code-highlight .token.keyword {
    color: #c678dd;
  }
  .code-highlight .token.function,
  .code-highlight .token.class-name {
    color: #61afef;
  }
  .code-highlight .token.regex,
  .code-highlight .token.important,
  .code-highlight .token.variable {
    color: #d19a66;
  }
}

.block.flash > .block-line {
  animation: flash 1.6s ease-out;
}

@keyframes flash {
  0% {
    background: var(--mark);
  }
  100% {
    background: transparent;
  }
}

/* ---------- 떠 있는 메뉴 ---------- */
.popover {
  position: fixed;
  z-index: 100;
  min-width: 200px;
  max-width: 320px;
  background: var(--bg);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 6px;
  font-size: 14px;
}

.menu-label {
  font-size: 12px;
  color: var(--text-faint);
  padding: 4px 8px 6px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 4px;
  text-align: left;
}

.menu-item:hover {
  background: var(--hover);
}

.menu-item.danger {
  color: var(--danger);
}

.menu-item.indent {
  padding-left: 18px;
}

.menu-item.subtle {
  color: var(--text-soft);
  justify-content: center;
}

.menu-empty {
  padding: 10px 8px;
  color: var(--text-faint);
}

.slash-menu {
  width: 300px;
}

.slash-list {
  max-height: 320px;
  overflow-y: auto;
}

.slash-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 5px 8px;
  border-radius: 4px;
  text-align: left;
}

.slash-item[data-active='true'] {
  background: var(--hover);
}

.slash-icon {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  flex-shrink: 0;
  background: var(--bg);
}

.slash-icon.small {
  width: 22px;
  height: 22px;
  font-size: 11px;
}

.slash-text {
  display: flex;
  flex-direction: column;
}

.slash-hint {
  font-size: 12px;
  color: var(--text-faint);
}

.icon-picker {
  width: 296px;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.icon-cell {
  height: 32px;
  font-size: 20px;
  border-radius: 4px;
}

.icon-cell:hover {
  background: var(--hover);
}

/* ---------- 모달 ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 15, 15, 0.4);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 12vh;
}

.modal {
  width: min(620px, calc(100vw - 32px));
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal-title {
  padding: 16px 18px 8px;
  font-weight: 600;
}

.search-input {
  border: none;
  border-bottom: 1px solid var(--border);
  outline: none;
  padding: 16px 18px;
  font: inherit;
  font-size: 17px;
  background: transparent;
  color: var(--text);
}

.search-section {
  padding: 10px 18px 4px;
  font-size: 12px;
  color: var(--text-faint);
}

.search-results,
.trash-list {
  overflow-y: auto;
  padding: 4px 8px 10px;
}

.search-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  text-align: left;
}

.search-item[data-active='true'] {
  background: var(--hover);
}

.search-icon {
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.search-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.search-title {
  font-weight: 500;
}

.search-snippet {
  font-size: 13px;
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

mark {
  background: var(--mark);
  color: inherit;
  border-radius: 2px;
}

.trash-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
}

.trash-row:hover {
  background: var(--hover);
}

.trash-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trash-time {
  color: var(--text-faint);
  font-size: 12px;
}

.btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 13px;
}

.btn:hover {
  background: var(--hover);
}

.btn.danger {
  color: var(--danger);
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  padding: 8px 16px;
  margin-top: 8px;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  max-width: 80vw;
}

/* ---------- 사이드바 너비 조절 ---------- */
.sidebar-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 5;
}

.sidebar-resizer:hover {
  background: linear-gradient(to right, transparent 2px, var(--border) 2px, var(--border) 4px, transparent 4px);
}

body.resizing {
  cursor: col-resize;
  user-select: none;
}

/* ---------- 공용 메뉴 요소 ---------- */
.menu-item[data-active='true'] {
  background: var(--hover);
}

.menu-sep {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.menu-input {
  width: 100%;
  margin-bottom: 6px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--hover);
  color: var(--text);
  font: inherit;
  outline: none;
}

.check-mark {
  margin-left: auto;
  color: var(--text-soft);
}

.type-icon {
  display: inline-block;
  min-width: 18px;
  text-align: center;
  color: var(--text-soft);
  font-size: 12px;
}

.toggle-row {
  justify-content: space-between;
  cursor: pointer;
}

.switch {
  appearance: none;
  width: 30px;
  height: 18px;
  border-radius: 9px;
  background: var(--active);
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
  margin: 0;
}

.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}

.switch:checked {
  background: var(--accent);
}

.switch:checked::after {
  transform: translateX(12px);
}

.page-menu {
  width: 240px;
}

.font-choices {
  display: flex;
  gap: 4px;
  padding: 0 4px 6px;
}

.font-choice {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0;
  border-radius: 6px;
}

.font-choice:hover,
.font-choice[data-active='true'] {
  background: var(--hover);
}

.font-choice[data-active='true'] .font-sample {
  color: var(--accent);
}

.font-sample {
  font-size: 22px;
}

.font-label {
  font-size: 11px;
  color: var(--text-soft);
  font-family: var(--font);
}

.font-choice.font-serif .font-sample {
  font-family: Georgia, serif;
}

.font-choice.font-mono .font-sample {
  font-family: var(--mono);
}

.topbar-btn.more {
  font-size: 18px;
  line-height: 1;
  padding: 2px 8px 6px;
}

/* ---------- 선택 옵션 색 (Notion과 같은 10가지) ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  max-width: 100%;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--chip-bg);
  color: var(--chip-fg, var(--text));
}

.chip-remove {
  font-size: 13px;
  opacity: 0.6;
  padding: 0 2px;
}

.color-default { --chip-bg: rgba(206, 205, 202, 0.5); }
.color-gray { --chip-bg: rgb(227, 226, 224); }
.color-brown { --chip-bg: rgb(238, 224, 218); }
.color-orange { --chip-bg: rgb(250, 222, 201); }
.color-yellow { --chip-bg: rgb(253, 236, 200); }
.color-green { --chip-bg: rgb(219, 237, 219); }
.color-blue { --chip-bg: rgb(211, 229, 239); }
.color-purple { --chip-bg: rgb(232, 222, 238); }
.color-pink { --chip-bg: rgb(245, 224, 233); }
.color-red { --chip-bg: rgb(255, 226, 221); }

@media (prefers-color-scheme: dark) {
  .color-default { --chip-bg: rgba(255, 255, 255, 0.1); }
  .color-gray { --chip-bg: rgb(71, 76, 80); }
  .color-brown { --chip-bg: rgb(92, 71, 61); }
  .color-orange { --chip-bg: rgb(136, 72, 15); }
  .color-yellow { --chip-bg: rgb(146, 118, 63); }
  .color-green { --chip-bg: rgb(36, 61, 48); }
  .color-blue { --chip-bg: rgb(20, 58, 78); }
  .color-purple { --chip-bg: rgb(60, 45, 73); }
  .color-pink { --chip-bg: rgb(78, 44, 60); }
  .color-red { --chip-bg: rgb(82, 46, 42); }
}

/* ---------- 데이터베이스 ---------- */
.block-database > .block-line {
  display: block;
}

.block-database > .block-line > .block-gutter {
  top: 8px;
}

.database {
  width: 100%;
  margin: 10px 0 14px;
  font-size: 14px;
}

.db-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
}

.db-name {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  padding: 2px 0;
}

.db-name::placeholder {
  color: var(--text-faint);
}

.db-toolbar {
  display: flex;
  gap: 4px;
}

.db-tool {
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--text-soft);
}

.db-tool:hover {
  background: var(--hover);
}

.db-tool.primary {
  background: var(--accent);
  color: #fff;
}

.db-tool.primary:hover {
  background: #0077d4;
}

.db-scroll {
  overflow-x: auto;
  border-top: 1px solid var(--border);
}

.db-table {
  min-width: 100%;
}

.db-row {
  display: flex;
  border-bottom: 1px solid var(--border);
  min-height: 34px;
}

.db-gutter {
  width: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.db-row:hover > .db-gutter {
  opacity: 1;
}

.db-cell {
  position: relative;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  min-width: 0;
}

.db-head {
  color: var(--text-soft);
}

.db-th {
  display: flex;
}

.db-th-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  text-align: left;
}

.db-th-btn:hover,
.db-add-col:hover,
.db-new-row:hover {
  background: var(--hover);
}

.db-th-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-resizer {
  position: absolute;
  right: -3px;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  z-index: 2;
}

.col-resizer:hover {
  background: rgba(35, 131, 226, 0.5);
}

.db-add-col {
  border-right: none;
  color: var(--text-faint);
  font-size: 16px;
}

.db-new-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 8px 6px 34px;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border);
}

.db-footer {
  padding: 6px 8px 0 34px;
  color: var(--text-faint);
  font-size: 12px;
}

.cell {
  position: relative;
  height: 100%;
  min-height: 34px;
  padding: 7px 8px;
  cursor: default;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 20px;
}

.cell.table:hover {
  background: var(--hover);
}

.cell-select {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  white-space: normal;
}

.cell-checkbox {
  display: flex;
  align-items: center;
}

.cell-number.table {
  text-align: right;
}

.cell-title {
  font-weight: 500;
}

.cell-icon {
  margin-right: 4px;
}

.cell-empty {
  color: var(--text-faint);
}

.cell a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--text-faint);
}

.open-row {
  position: absolute;
  right: 6px;
  top: 6px;
  display: none;
  padding: 0 6px;
  font-size: 12px;
  line-height: 22px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-soft);
}

.cell:hover .open-row {
  display: block;
}

.cell-editing {
  padding: 0;
  overflow: visible;
}

.cell-input {
  width: 100%;
  height: 100%;
  min-height: 34px;
  border: none;
  outline: 2px solid rgba(35, 131, 226, 0.6);
  outline-offset: -2px;
  border-radius: 2px;
  padding: 7px 8px;
  font: inherit;
  background: var(--bg);
  color: var(--text);
}

.cell-editing.property .cell-input {
  min-height: 30px;
}

.select-editor {
  width: 280px;
}

.select-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  padding: 6px;
  margin-bottom: 4px;
  border-radius: 6px;
  background: var(--hover);
}

.select-input {
  flex: 1;
  min-width: 80px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
}

.property-menu {
  width: 260px;
}

/* ---------- 데이터베이스 행 페이지의 속성 ---------- */
.row-props {
  margin: 4px 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.row-prop {
  display: flex;
  align-items: flex-start;
  min-height: 34px;
}

.row-prop-name {
  width: 160px;
  flex-shrink: 0;
  padding: 7px 6px;
  color: var(--text-soft);
}

.row-prop-value {
  flex: 1;
  min-width: 0;
}

.cell.property {
  border-radius: 4px;
}

.cell.property:hover {
  background: var(--hover);
}

/* ---------- 글자 서식 (Notion 색 팔레트) ---------- */
.editable strong {
  font-weight: 650;
}

.editable a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--text-faint);
  text-underline-offset: 2px;
  cursor: text;
}

.inline-code {
  font-family: var(--mono);
  font-size: 0.85em;
  color: #eb5757;
  background: rgba(135, 131, 120, 0.15);
  border-radius: 4px;
  padding: 0.15em 0.35em;
}

.fg-gray { color: #787774; }
.fg-brown { color: #9f6b53; }
.fg-orange { color: #d9730d; }
.fg-yellow { color: #cb912f; }
.fg-green { color: #448361; }
.fg-blue { color: #337ea9; }
.fg-purple { color: #9065b0; }
.fg-pink { color: #c14c8a; }
.fg-red { color: #d44c47; }
.bg-gray { background: #f1f1ef; }
.bg-brown { background: #f4eeee; }
.bg-orange { background: #fbecdd; }
.bg-yellow { background: #fbf3db; }
.bg-green { background: #edf3ec; }
.bg-blue { background: #e7f3f8; }
.bg-purple { background: #f6f3f9; }
.bg-pink { background: #faf1f5; }
.bg-red { background: #fdebec; }

@media (prefers-color-scheme: dark) {
  .fg-gray { color: #9b9b9b; }
  .fg-brown { color: #ba856f; }
  .fg-orange { color: #c77d48; }
  .fg-yellow { color: #ca9849; }
  .fg-green { color: #529e72; }
  .fg-blue { color: #5e87c9; }
  .fg-purple { color: #9d68d3; }
  .fg-pink { color: #d15796; }
  .fg-red { color: #df5452; }
  .bg-gray { background: #2f2f2f; }
  .bg-brown { background: #4a3228; }
  .bg-orange { background: #5c3b23; }
  .bg-yellow { background: #564328; }
  .bg-green { background: #243d30; }
  .bg-blue { background: #143a4e; }
  .bg-purple { background: #3c2d49; }
  .bg-pink { background: #4e2c3c; }
  .bg-red { background: #522e2a; }
  .inline-code { color: #ff7369; }
}

/* ---------- 서식 도구 막대 ---------- */
.format-toolbar {
  position: fixed;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: var(--bg);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 14px;
}

.format-toolbar.mode-color {
  padding: 6px;
}

.fmt-btn {
  min-width: 30px;
  height: 28px;
  padding: 0 6px;
  border-radius: 4px;
  color: var(--text);
}

.fmt-btn:hover {
  background: var(--hover);
}

.fmt-btn.on {
  color: var(--accent);
  background: rgba(35, 131, 226, 0.1);
}

.fmt-btn code {
  font-family: var(--mono);
  font-size: 12px;
}

.fmt-color {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.fmt-sep {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 3px;
}

.color-row {
  display: grid;
  grid-template-columns: repeat(10, 28px);
  gap: 2px;
  margin-bottom: 4px;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.color-swatch span {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.color-swatch:hover,
.color-swatch.on {
  background: var(--hover);
}

.link-input-row {
  display: flex;
  gap: 4px;
  align-items: center;
}

.link-input {
  width: 300px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  font: inherit;
  background: var(--hover);
  color: var(--text);
  outline: none;
}

.link-input.invalid {
  border-color: var(--danger);
}

/* ---------- 블록 선택·블록 색 ---------- */
.block.selected > .block-line {
  background: rgba(35, 131, 226, 0.14);
}

.block.selected > .block-line ::selection {
  background: transparent;
}

.block-body.block-bg {
  border-radius: 4px;
  padding-left: 6px;
  padding-right: 6px;
}

.block-menu {
  width: 260px;
}

.block-menu-list {
  max-height: 340px;
  overflow-y: auto;
}

.color-chip {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
}

/* ---------- 슬래시 메뉴 섹션, 고급 블록 ---------- */
.slash-group + .slash-group {
  margin-top: 4px;
}

.type-h4 {
  font-size: 1.1em;
  font-weight: 600;
  margin-top: 0.6em;
}

.type-h1 > .toggle-arrow,
.type-h2 > .toggle-arrow,
.type-h3 > .toggle-arrow,
.type-h4 > .toggle-arrow {
  align-self: center;
  font-size: 10px;
}

.equation-block {
  flex: 1;
  min-width: 0;
  margin: 4px 0;
}

.equation-view {
  padding: 10px 8px;
  border-radius: 4px;
  text-align: center;
  cursor: pointer;
  overflow-x: auto;
}

.equation-view:hover,
.equation-block.editing .equation-view {
  background: var(--hover);
}

.equation-empty {
  color: var(--text-faint);
  font-size: 14px;
}

.equation-editor {
  margin-top: 4px;
}

.equation-input {
  width: 100%;
  font-family: var(--mono);
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  resize: vertical;
}

.equation-help {
  font-size: 12px;
  color: var(--text-faint);
  padding: 2px 4px;
}

.inline-eq {
  display: inline-block;
  padding: 0 2px;
  border-radius: 3px;
  cursor: pointer;
}

.inline-eq:hover {
  background: var(--hover);
}

.inline-eq-editor {
  width: 340px;
}

.inline-eq-preview {
  padding: 8px 4px;
  min-height: 28px;
}

.toc-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

.toc-item {
  text-align: left;
  padding: 3px 6px;
  border-radius: 4px;
  color: var(--text-soft);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}

.toc-item:hover {
  background: var(--hover);
}

.toc-empty {
  color: var(--text-faint);
  font-size: 14px;
  padding: 4px 6px;
}

.breadcrumb-block {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 14px;
  color: var(--text-soft);
  padding: 4px 0;
}

.link-page .link-arrow {
  font-size: 11px;
  color: var(--text-faint);
  margin-left: -4px;
}

.link-page.missing {
  color: var(--text-faint);
  cursor: default;
}

.page-picker {
  width: 300px;
}

/* ---------- 간단한 표, 다단 열 ---------- */
.block-table > .block-line,
.block-columns > .block-line {
  display: flex;
}

.table-block {
  position: relative;
  flex: 1;
  min-width: 0;
  margin: 6px 0;
  padding-bottom: 22px;
}

.table-scroll {
  display: flex;
  overflow-x: auto;
  /* 위쪽 열 손잡이가 잘리지 않게 여백을 둔다. 행 손잡이는 칸 안쪽에 있어 왼쪽 여백이 필요 없다
     (왼쪽으로 넓히면 블록의 ⋮⋮ 손잡이를 덮는다). */
  padding: 14px 0 0 2px;
}

.simple-table {
  border-collapse: collapse;
  table-layout: fixed;
}

.simple-table td {
  position: relative;
  border: 1px solid var(--border);
  vertical-align: top;
  padding: 0;
}

.simple-table td.th {
  background: var(--callout-bg);
  font-weight: 600;
}

.table-cell {
  min-height: 32px;
  padding: 6px 8px;
  line-height: 1.45;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 15px;
}

.table-cell:focus {
  box-shadow: inset 0 0 0 2px rgba(35, 131, 226, 0.55);
}

.col-handle,
.row-handle {
  position: absolute;
  opacity: 0;
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-faint);
  background: var(--bg);
  border: 1px solid var(--border);
  line-height: 1;
  transition: opacity 0.1s;
}

.col-handle {
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 6px;
}

.row-handle {
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 1px;
  letter-spacing: -2px;
}

.simple-table td:hover > .col-handle,
.simple-table td:hover > .row-handle,
.col-handle:focus-visible,
.row-handle:focus-visible {
  opacity: 1;
}

.simple-table .col-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 2;
}

.simple-table .col-resizer:hover {
  background: rgba(35, 131, 226, 0.5);
}

.table-add-col,
.table-add-row {
  color: var(--text-faint);
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.1s;
}

.table-add-col {
  width: 18px;
  margin-left: 4px;
  align-self: stretch;
}

.table-add-row {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 18px;
  width: 100%;
}

.table-block:hover .table-add-col,
.table-block:hover .table-add-row {
  opacity: 1;
}

.table-add-col:hover,
.table-add-row:hover {
  background: var(--hover);
}

.columns-block {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: stretch;
}

.column {
  min-width: 0;
}

.column-gap {
  width: 26px;
  flex-shrink: 0;
  cursor: col-resize;
  position: relative;
}

.column-gap:hover::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 12px;
  width: 2px;
  background: rgba(35, 131, 226, 0.5);
  border-radius: 1px;
}

/* 열 안의 블록은 손잡이를 열 안쪽에 둔다 */
.column .block-gutter {
  left: -46px;
}

/* ---------- 멘션·이모지 ---------- */
.mention {
  display: inline-block;
  padding: 0 1px;
  border-radius: 3px;
  cursor: pointer;
}

.mention:hover {
  background: var(--hover);
}

.mention-menu,
.emoji-suggest {
  width: 320px;
}

.slash-item.compact {
  padding: 4px 8px;
  gap: 8px;
}

.mention-icon,
.emoji-glyph {
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  font-size: 16px;
}

.mention-hint {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
}

.emoji-picker {
  width: 360px;
}

.emoji-scroll {
  max-height: 300px;
  overflow-y: auto;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
}

.emoji-cell {
  height: 32px;
  font-size: 20px;
  border-radius: 4px;
}

.emoji-cell:hover {
  background: var(--hover);
}

.date-editor {
  width: 220px;
}

/* ---------- 미디어 블록: 이미지·동영상·오디오·파일 ---------- */

.media-block {
  flex: 1;
  min-width: 0;
  margin: 4px 0;
}

.media-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--text-soft);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.media-empty:hover {
  background: var(--active);
}

.media-empty.error {
  color: var(--danger);
}

.media-empty-icon {
  font-size: 18px;
}

.media-empty-hint {
  margin-left: auto;
  color: var(--text-faint);
  font-size: 12px;
}

.media-frame {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  line-height: 0;
}

.media-frame img,
.media-frame video {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 2px;
}

/* 너비를 정하지 않은 이미지는 원래 크기(본문 너비까지) */
.media-frame:not([style]) {
  width: fit-content;
}

.media-frame:not([style]) img {
  width: auto;
}

.media-broken {
  padding: 24px;
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.media-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: col-resize;
  opacity: 0;
  transition: opacity 0.12s;
}

.media-handle::after {
  content: '';
  width: 6px;
  height: min(48px, 50%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(15, 15, 15, 0.6);
}

.media-handle.left {
  left: 0;
}

.media-handle.right {
  right: 0;
}

.media-tools {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 2px;
  line-height: normal;
  opacity: 0;
  transition: opacity 0.12s;
}

.media-tools button {
  min-width: 26px;
  height: 26px;
  border: none;
  border-radius: 4px;
  background: rgba(15, 15, 15, 0.6);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}

.media-tools button:hover {
  background: rgba(15, 15, 15, 0.8);
}

.media-frame:hover .media-handle,
.media-frame:hover .media-tools,
.media-frame.resizing .media-handle {
  opacity: 1;
}

.media-audio {
  display: block;
  width: 100%;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 6px;
  border: none;
  border-radius: 4px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.file-row:hover {
  background: var(--hover);
}

.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  flex-shrink: 0;
  color: var(--text-faint);
  font-size: 12px;
}

/* 캡션: 있거나 편집 중일 때, 또는 블록에 마우스를 올렸을 때만 보인다 */
.media-caption {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 2px 2px;
  border: none;
  outline: none;
  background: none;
  color: var(--text-soft);
  font: inherit;
  font-size: 14px;
  visibility: hidden;
}

.media-caption.shown,
.media-caption:focus,
.block-line:hover .media-caption {
  visibility: visible;
}

.media-image .media-caption,
.media-video .media-caption {
  text-align: center;
}

.media-picker {
  width: 420px;
  max-width: calc(100vw - 16px);
  padding: 0;
}

.media-tabs {
  display: flex;
  gap: 4px;
  padding: 4px 8px 0;
  border-bottom: 1px solid var(--border);
}

.media-tabs button {
  padding: 8px 6px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-soft);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.media-tabs button[aria-selected='true'] {
  border-bottom-color: var(--text);
  color: var(--text);
}

.media-pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}

.media-pane .menu-input {
  margin: 0;
}

.media-primary {
  align-self: center;
  width: 100%;
  max-width: 300px;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.media-primary:hover {
  filter: brightness(1.08);
}

.media-note {
  color: var(--text-faint);
  font-size: 12px;
  text-align: center;
}

.media-note.error {
  color: var(--danger);
}

/* ---------- 즐겨찾기 버튼, 알림, 복원 배너 ---------- */

.topbar-btn.favorite {
  font-size: 16px;
  line-height: 1;
}

.topbar-btn.favorite.on {
  color: #e9b230;
}

.toast.notice {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: default;
}

.toast-action {
  color: #6cb6ff;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
}

.restore-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(35, 131, 226, 0.1);
  color: var(--text);
  font-size: 14px;
}

.restore-banner > span {
  flex: 1;
}

.restore-banner-close {
  color: var(--text-soft);
}

/* ---------- 버전 기록 (전체 화면) ---------- */

.history {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  background: var(--bg);
}

.history-side {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  padding: 16px 12px 0;
}

.history-kicker {
  color: var(--text-soft);
  font-size: 12px;
}

.history-page {
  margin: 2px 0 8px;
  font-size: 16px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-group {
  position: relative;
  margin-bottom: 8px;
}

.history-group-btn {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--hover);
  color: var(--text-soft);
  font-size: 12px;
}

.history-group-menu {
  position: absolute;
  top: 26px;
  left: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  min-width: 140px;
  padding: 4px;
  border-radius: 8px;
  background: var(--bg);
  box-shadow: var(--shadow);
}

.history-group-menu button {
  padding: 6px 8px;
  border-radius: 4px;
  text-align: left;
  font-size: 14px;
}

.history-group-menu button:hover {
  background: var(--hover);
}

.history-list {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 12px;
}

.history-row {
  position: relative;
  padding: 10px 40px 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.history-row:hover,
.history-row[aria-selected='true'] {
  background: var(--hover);
}

.history-time {
  font-size: 14px;
}

.history-sub {
  color: var(--text-soft);
  font-size: 12px;
}

.history-bookmark {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-faint);
  visibility: hidden;
}

.history-row:hover .history-bookmark,
.history-row[aria-selected='true'] .history-bookmark,
.history-bookmark.on {
  visibility: visible;
}

.history-bookmark.on {
  color: #e9b230;
}

.history-main {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.history-head {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

.history-head .btn.primary {
  margin-top: 0;
  padding: 5px 12px;
}

.history-head .btn.primary:disabled {
  opacity: 0.45;
  cursor: default;
}

.history-title {
  white-space: nowrap;
  font-size: 14px;
}

.history-badge {
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--hover);
  color: var(--text-soft);
  font-size: 11px;
}

.history-slider {
  flex: 1;
  min-width: 80px;
  accent-color: var(--accent);
}

.history-close {
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--text-soft);
}

.history-close:hover {
  background: var(--hover);
}

.history-preview {
  flex: 1;
  overflow-y: auto;
  padding: 48px 24px 120px;
}

.history-nav {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 16px;
  border-radius: 20px;
  background: var(--bg);
  box-shadow: var(--shadow);
  font-size: 14px;
}

.history-nav button {
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-soft);
}

.history-nav button:hover {
  background: var(--hover);
}

.history-confirm-backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 12vh;
  background: rgba(15, 15, 15, 0.25);
}

.history-confirm {
  width: min(440px, calc(100% - 32px));
  padding: 20px;
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--shadow);
  font-size: 14px;
}

.history-confirm-title {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 700;
}

.history-confirm-list {
  margin: 10px 0;
  padding-left: 18px;
  color: var(--text-soft);
}

.history-confirm-note {
  color: var(--text-soft);
  font-size: 12px;
}

.history-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.history-confirm-actions .btn.primary {
  margin-top: 0;
  padding: 5px 12px;
}

/* ---------- 읽기 전용 페이지 (버전·휴지통·백업 미리 보기) ---------- */

.ro-page {
  max-width: 720px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.5;
}

.ro-title {
  margin-bottom: 12px;
  padding: 2px 6px;
  font-size: 32px;
  font-weight: 700;
}

.ro-title-icon {
  margin-right: 8px;
}

.ro-block {
  padding: 2px 6px;
  border-radius: 4px;
}

.ro-changed {
  background: rgba(35, 131, 226, 0.12);
  box-shadow: inset 2px 0 0 var(--accent);
}

.ro-line {
  display: flex;
  gap: 6px;
  min-height: 1.5em;
}

.ro-marker {
  flex-shrink: 0;
  min-width: 1.2em;
  color: var(--text-soft);
}

.ro-children {
  padding-left: 24px;
}

.ro-h1 .ro-line { font-size: 1.875em; font-weight: 700; }
.ro-h2 .ro-line { font-size: 1.5em; font-weight: 700; }
.ro-h3 .ro-line { font-size: 1.25em; font-weight: 700; }
.ro-h4 .ro-line { font-size: 1.1em; font-weight: 700; }

.ro-quote .ro-line {
  padding-left: 12px;
  border-left: 3px solid currentColor;
}

.ro-callout .ro-line {
  padding: 12px;
  border-radius: 4px;
  background: var(--callout-bg);
}

.ro-code {
  padding: 12px;
  border-radius: 4px;
  background: var(--code-bg);
  font-family: var(--mono);
  font-size: 14px;
  white-space: pre-wrap;
}

.ro-page-title {
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}

.ro-faint,
.recovery-faint {
  color: var(--text-faint);
  font-size: 13px;
}

.ro-image {
  display: block;
  max-width: 100%;
  margin: 0 auto;
}

.ro-caption {
  color: var(--text-soft);
  font-size: 14px;
  text-align: center;
}

.ro-media-empty {
  padding: 10px;
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--text-soft);
  font-size: 14px;
}

.ro-table {
  border-collapse: collapse;
  font-size: 14px;
}

.ro-table td {
  min-width: 80px;
  padding: 4px 8px;
  border: 1px solid var(--border);
}

.ro-columns {
  display: flex;
  gap: 24px;
}

.ro-column {
  min-width: 0;
}

.ro-db-name {
  font-weight: 600;
}

.ro-db-row {
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

/* ---------- 휴지통 미리 보기, 설정, 백업 복구 ---------- */

.trash-modal .trash-title {
  text-align: left;
  color: inherit;
}

.trash-modal .trash-title:hover {
  text-decoration: underline;
}

.trash-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 12px;
}

.trash-preview {
  width: min(900px, calc(100vw - 32px));
  max-height: 80vh;
}

.trash-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--danger);
  color: #fff;
  font-size: 14px;
}

.trash-banner > span {
  flex: 1;
}

.trash-banner .btn {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  margin-top: 0;
  padding: 4px 10px;
}

.trash-banner .btn.primary {
  background: rgba(255, 255, 255, 0.2);
}

.trash-preview-body {
  overflow-y: auto;
  padding: 32px 24px;
}

.settings-modal {
  padding-bottom: 12px;
}

.settings-section {
  margin: 12px 16px 4px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  font-size: 14px;
}

.settings-row > span {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.settings-row small {
  color: var(--text-soft);
  font-size: 12px;
}

.settings-row select {
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.settings-backups {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px;
}

.settings-backups > span {
  flex: 1 1 100%;
}

.recovery-modal {
  flex-direction: row;
  width: min(1000px, calc(100vw - 32px));
  height: 72vh;
  max-height: none;
}

.recovery-side {
  width: 280px;
  flex-shrink: 0;
  overflow-y: auto;
  padding-bottom: 12px;
  border-right: 1px solid var(--border);
}

.recovery-row,
.recovery-back {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: calc(100% - 12px);
  margin: 0 6px;
  padding: 6px 10px;
  border-radius: 6px;
  text-align: left;
  font-size: 14px;
}

.recovery-row:hover,
.recovery-row[aria-selected='true'],
.recovery-back:hover {
  background: var(--hover);
}

.recovery-back {
  color: var(--text-soft);
  font-size: 13px;
}

.recovery-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.recovery-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.recovery-head > span {
  flex: 1;
}

.recovery-head .btn.primary {
  margin-top: 0;
  padding: 5px 12px;
}

.recovery-head .btn.primary:disabled {
  opacity: 0.45;
}

.recovery-error {
  padding: 8px 14px;
  color: var(--danger);
  font-size: 13px;
}

.recovery-preview {
  flex: 1;
  overflow-y: auto;
  padding: 32px 24px;
}

/* 데스크톱: 아래에 깔린 상단 막대의 창 끌기 영역이 덮는 화면의 클릭을 가로채지 않게 한다.
   (Electron은 가려진 요소의 drag 영역도 적용하므로, 덮는 화면을 no-drag로 빼야 한다) */
.history,
.modal-backdrop {
  -webkit-app-region: no-drag;
}

/* 버전 기록 머리는 창을 끌 수 있게 두고, 버튼·막대만 뺀다 */
.history-head {
  -webkit-app-region: drag;
}

.history-head button,
.history-head input {
  -webkit-app-region: no-drag;
}

/* macOS 창 버튼(신호등)과 겹치지 않게 */
.history.mac .history-side {
  padding-top: 40px;
  -webkit-app-region: drag;
}

.history.mac .history-side > * {
  -webkit-app-region: no-drag;
}

/* ---------- 로그인 (웹) ---------- */

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--sidebar-bg);
  /* 데스크톱 앱(서버 화면)에서 제목 막대가 없으므로 빈 곳을 끌어 창을 옮긴다. 브라우저는 무시한다. */
  -webkit-app-region: drag;
}
.login-card {
  -webkit-app-region: no-drag;
}

.login-card {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 32px 28px;
  border-radius: 12px;
  background: var(--bg);
  box-shadow: var(--shadow);
  text-align: center;
}

.login-logo {
  font-size: 36px;
}

.login-title {
  margin: 0;
  font-size: 22px;
}

.login-sub {
  margin: 0 0 6px;
  color: var(--text-soft);
  font-size: 14px;
}

.login-input {
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.login-error {
  color: var(--danger);
  font-size: 13px;
}

.login-btn {
  margin-top: 4px;
}

.login-btn:disabled {
  opacity: 0.5;
}

.settings-account {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 16px;
}

.settings-account .settings-backups {
  padding: 4px 0;
}

.settings-ok {
  color: #448361;
  font-size: 13px;
}

.settings-app {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  font-size: 14px;
}

.settings-app > span {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.settings-app small {
  color: var(--text-soft);
  font-size: 12px;
}

.login-sso {
  display: block;
  text-align: center;
  text-decoration: none;
}
