styles.css 83 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873
  1. :root {
  2. --bg-color: #ffffff;
  3. --editor-bg: #f6f8fa;
  4. --preview-bg: #ffffff; /* Preview background for light mode */
  5. --text-color: #24292e;
  6. --text-secondary: #57606a;
  7. --font-mono: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
  8. --color-danger-fg: #d73a49;
  9. --preview-text-color: #24292e; /* Text color for preview in light mode */
  10. --border-color: #e1e4e8;
  11. --header-bg: #f6f8fa;
  12. --button-bg: #f6f8fa;
  13. --button-hover: #e1e4e8;
  14. --button-active: #d1d5da;
  15. --scrollbar-thumb: #c1c1c1;
  16. --scrollbar-track: #f1f1f1;
  17. --accent-color: #0366d6;
  18. --table-bg: #ffffff; /* Table background for light mode */
  19. --code-bg: #f6f8fa; /* Code block background for light mode */
  20. --skeleton-bg: #e2e8f0;
  21. --skeleton-glow: rgba(255, 255, 255, 0.65);
  22. /* Find & Replace Panel custom properties (PERF-010 consolidated) */
  23. --fr-bg: rgba(255, 255, 255, 0.95);
  24. --fr-border: #d0d7de;
  25. --fr-shadow: 0 8px 24px rgba(140, 149, 159, 0.2);
  26. --fr-btn-active: #0969da;
  27. --fr-btn-active-bg: #ddf4ff;
  28. --fr-match-highlight: #ffdf5d;
  29. --fr-match-active: #ff9b30;
  30. --fr-match-text-color: #24292e;
  31. --fr-match-active-text-color: #24292e;
  32. --fr-error-bg: #ffebe9;
  33. --fr-error-border: #ff8577;
  34. --fr-text-danger: #cf222e;
  35. }
  36. [data-theme="dark"] {
  37. --bg-color: #0d1117;
  38. --editor-bg: #161b22;
  39. --preview-bg: #0d1117; /* Preview background for dark mode */
  40. --text-color: #c9d1d9;
  41. --text-secondary: #8b949e;
  42. --color-danger-fg: #f85149;
  43. --preview-text-color: #c9d1d9; /* Text color for preview in dark mode */
  44. --border-color: #30363d;
  45. --header-bg: #161b22;
  46. --button-bg: #21262d;
  47. --button-hover: #30363d;
  48. --button-active: #3b434b;
  49. --scrollbar-thumb: #484f58;
  50. --scrollbar-track: #21262d;
  51. --accent-color: #58a6ff;
  52. --table-bg: #161b22; /* Table background for dark mode */
  53. --code-bg: #161b22; /* Code block background for dark mode */
  54. --skeleton-bg: #2d3139;
  55. --skeleton-glow: rgba(255, 255, 255, 0.08);
  56. /* Find & Replace Panel custom properties for dark mode */
  57. --fr-bg: rgba(28, 33, 40, 0.98);
  58. --fr-border: #444c56;
  59. --fr-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  60. --fr-btn-active: #2f81f7;
  61. --fr-btn-active-bg: rgba(56, 139, 253, 0.15);
  62. --fr-match-highlight: rgba(187, 128, 9, 0.4);
  63. --fr-match-active: #ad6200;
  64. --fr-match-text-color: #c9d1d9;
  65. --fr-match-active-text-color: #ffffff;
  66. --fr-error-bg: rgba(248, 81, 73, 0.1);
  67. --fr-error-border: rgba(248, 81, 73, 0.4);
  68. --fr-text-danger: #ff7b72;
  69. }
  70. * {
  71. box-sizing: border-box;
  72. margin: 0;
  73. padding: 0;
  74. }
  75. @media (min-width: 768px) {
  76. html,
  77. body {
  78. height: 100%;
  79. overflow: hidden;
  80. }
  81. }
  82. body {
  83. background-color: var(--bg-color);
  84. color: var(--text-color);
  85. /* PERF-021: Removed background-color transition to avoid full-viewport repaint on theme toggle */
  86. transition: color 0.15s ease;
  87. min-height: 100vh;
  88. font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Hiragino Kaku Gothic ProN", Meiryo, "Malgun Gothic", "Apple SD Gothic Neo", "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  89. }
  90. .app-header {
  91. background-color: var(--header-bg);
  92. border-bottom: 1px solid var(--border-color);
  93. padding: 0.35rem 0.75rem;
  94. transition: background-color 0.3s ease;
  95. position: relative;
  96. z-index: 100;
  97. flex-shrink: 0;
  98. }
  99. .app-container {
  100. height: 100vh;
  101. display: flex;
  102. flex-direction: column;
  103. overflow: hidden;
  104. }
  105. .content-container {
  106. display: flex;
  107. flex: 1;
  108. overflow: hidden;
  109. }
  110. .editor-pane, .preview-pane {
  111. flex: 1;
  112. padding: 20px;
  113. overflow-y: auto;
  114. position: relative;
  115. /* PERF-025: Shortened transition and scoped to background-color only */
  116. transition: background-color 0.15s ease;
  117. }
  118. .editor-pane {
  119. background-color: var(--editor-bg);
  120. border-right: 1px solid var(--border-color);
  121. padding-right: 0px;
  122. --line-number-gutter: 0px;
  123. }
  124. .preview-pane {
  125. background-color: var(--preview-bg); /* Using the new variable for preview background */
  126. }
  127. /* Custom scrollbar */
  128. .editor-pane::-webkit-scrollbar,
  129. .preview-pane::-webkit-scrollbar,
  130. #markdown-editor::-webkit-scrollbar {
  131. width: 8px;
  132. height: 8px;
  133. }
  134. .editor-pane::-webkit-scrollbar-track,
  135. .preview-pane::-webkit-scrollbar-track,
  136. #markdown-editor::-webkit-scrollbar-track {
  137. background: var(--scrollbar-track);
  138. }
  139. .editor-pane::-webkit-scrollbar-thumb,
  140. .preview-pane::-webkit-scrollbar-thumb,
  141. #markdown-editor::-webkit-scrollbar-thumb {
  142. background: var(--scrollbar-thumb);
  143. border-radius: 4px;
  144. }
  145. .editor-pane::-webkit-scrollbar-thumb:hover,
  146. .preview-pane::-webkit-scrollbar-thumb:hover,
  147. #markdown-editor::-webkit-scrollbar-thumb:hover {
  148. background: var(--button-active);
  149. }
  150. #markdown-editor {
  151. width: 100%;
  152. height: 100%;
  153. border: none;
  154. background-color: transparent;
  155. color: var(--text-color);
  156. resize: none;
  157. font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  158. font-size: 14px;
  159. line-height: 1.5;
  160. padding: 10px;
  161. padding-left: calc(10px + var(--line-number-gutter));
  162. transition: background-color 0.3s ease, color 0.3s ease;
  163. overflow-y: auto;
  164. position: relative;
  165. z-index: 3;
  166. }
  167. #markdown-editor:focus {
  168. outline: none;
  169. }
  170. .preview-pane {
  171. padding: 20px;
  172. }
  173. .markdown-body {
  174. padding: 20px;
  175. width: 100%;
  176. background-color: var(--preview-bg); /* Ensuring the markdown content matches preview background */
  177. color: var(--preview-text-color); /* Using specific text color for preview content */
  178. }
  179. .markdown-body a.reference-link {
  180. font-size: 0.75em;
  181. letter-spacing: -0.02em;
  182. line-height: 1;
  183. vertical-align: super;
  184. position: relative;
  185. top: 0.08em;
  186. }
  187. /* Style tables in light mode */
  188. .markdown-body table {
  189. background-color: var(--table-bg);
  190. border-color: var(--border-color);
  191. }
  192. .markdown-body table tr {
  193. background-color: var(--table-bg);
  194. border-top: 1px solid var(--border-color);
  195. }
  196. .markdown-body table tr:nth-child(2n) {
  197. background-color: var(--bg-color);
  198. }
  199. /* Style code blocks in light mode */
  200. .markdown-body pre {
  201. background-color: var(--code-bg);
  202. border-radius: 6px;
  203. }
  204. .markdown-body code {
  205. background-color: var(--code-bg);
  206. border-radius: 3px;
  207. padding: 0.2em 0.4em;
  208. }
  209. .markdown-body img.emoji-inline {
  210. width: 1em;
  211. height: 1em;
  212. vertical-align: -0.1em;
  213. }
  214. .markdown-body ul,
  215. .markdown-body ol {
  216. padding-left: 2em;
  217. margin: 0.4em 0;
  218. }
  219. .markdown-body ul ul,
  220. .markdown-body ul ol,
  221. .markdown-body ol ul,
  222. .markdown-body ol ol {
  223. margin-top: 0.2em;
  224. margin-bottom: 0.2em;
  225. }
  226. .markdown-body ul.contains-task-list,
  227. .markdown-body li.task-list-item {
  228. list-style: none;
  229. }
  230. .markdown-body ul.contains-task-list {
  231. padding-left: 2em;
  232. }
  233. .markdown-body li.task-list-item input[type="checkbox"] {
  234. margin: 0 0.5em 0.2em 0;
  235. vertical-align: middle;
  236. pointer-events: none;
  237. }
  238. .markdown-body li.task-list-item::marker {
  239. content: "";
  240. }
  241. .markdown-body li:has(> input[type="checkbox"]) {
  242. list-style: none;
  243. }
  244. .markdown-body li:has(> input[type="checkbox"])::marker {
  245. content: "";
  246. }
  247. .markdown-body ul:has(> li > input[type="checkbox"]) {
  248. list-style: none;
  249. padding-left: 2em;
  250. }
  251. .markdown-body .footnotes {
  252. margin-top: 1.5rem;
  253. font-size: 0.9em;
  254. }
  255. .markdown-body .footnotes ol {
  256. padding-left: 1.5em;
  257. }
  258. .markdown-body .footnotes ol > li::marker {
  259. content: "[" counter(list-item) "] ";
  260. font-weight: 600;
  261. }
  262. .markdown-body .footnotes li > p {
  263. margin: 0.2em 0;
  264. }
  265. .markdown-body .footnote-ref a,
  266. .markdown-body .footnote-backref {
  267. text-decoration: none;
  268. }
  269. .markdown-body .footnote-backref {
  270. margin-left: 0.4em;
  271. }
  272. .markdown-body .markdown-alert {
  273. padding: 0.5rem 1rem;
  274. margin-bottom: 16px;
  275. border-left: 0.25em solid;
  276. border-radius: 0.375rem;
  277. }
  278. .markdown-body .markdown-alert > :last-child {
  279. margin-bottom: 0;
  280. }
  281. .markdown-body .markdown-alert-title {
  282. margin: 0 0 8px;
  283. font-weight: 600;
  284. line-height: 1.25;
  285. display: flex;
  286. align-items: center;
  287. gap: 8px;
  288. }
  289. .markdown-body .markdown-alert-icon {
  290. display: inline-flex;
  291. width: 16px;
  292. height: 16px;
  293. }
  294. .markdown-body .markdown-alert-icon svg {
  295. width: 16px;
  296. height: 16px;
  297. fill: currentColor;
  298. }
  299. .markdown-body .markdown-alert-note {
  300. color: #0969da;
  301. border-left-color: #0969da;
  302. background-color: #ddf4ff;
  303. }
  304. .markdown-body .markdown-alert-tip {
  305. color: #1a7f37;
  306. border-left-color: #1a7f37;
  307. background-color: #dafbe1;
  308. }
  309. .markdown-body .markdown-alert-important {
  310. color: #8250df;
  311. border-left-color: #8250df;
  312. background-color: #fbefff;
  313. }
  314. .markdown-body .markdown-alert-warning {
  315. color: #9a6700;
  316. border-left-color: #9a6700;
  317. background-color: #fff8c5;
  318. }
  319. .markdown-body .markdown-alert-caution {
  320. color: #cf222e;
  321. border-left-color: #cf222e;
  322. background-color: #ffebe9;
  323. }
  324. .markdown-body .markdown-alert > *:not(.markdown-alert-title) {
  325. color: var(--preview-text-color);
  326. }
  327. [data-theme="dark"] .markdown-body .markdown-alert-note {
  328. color: #4493f8;
  329. background-color: rgba(31, 111, 235, 0.15);
  330. border-left-color: #4493f8;
  331. }
  332. [data-theme="dark"] .markdown-body .markdown-alert-tip {
  333. color: #3fb950;
  334. background-color: rgba(35, 134, 54, 0.15);
  335. border-left-color: #3fb950;
  336. }
  337. [data-theme="dark"] .markdown-body .markdown-alert-important {
  338. color: #ab7df8;
  339. background-color: rgba(137, 87, 229, 0.15);
  340. border-left-color: #ab7df8;
  341. }
  342. [data-theme="dark"] .markdown-body .markdown-alert-warning {
  343. color: #d29922;
  344. background-color: rgba(210, 153, 34, 0.18);
  345. border-left-color: #d29922;
  346. }
  347. [data-theme="dark"] .markdown-body .markdown-alert-caution {
  348. color: #f85149;
  349. background-color: rgba(248, 81, 73, 0.18);
  350. border-left-color: #f85149;
  351. }
  352. .toolbar {
  353. display: flex;
  354. gap: 8px;
  355. align-items: center;
  356. }
  357. .toolbar-group {
  358. display: inline-flex;
  359. align-items: center;
  360. gap: 6px;
  361. }
  362. .toolbar-divider {
  363. width: 1px;
  364. height: 20px;
  365. background-color: var(--border-color);
  366. opacity: 0.7;
  367. }
  368. .tool-button {
  369. background-color: var(--button-bg);
  370. border: 1px solid var(--border-color);
  371. color: var(--text-color);
  372. border-radius: 5px;
  373. padding: 4px 8px;
  374. font-size: 13px;
  375. cursor: pointer;
  376. display: inline-flex;
  377. align-items: center;
  378. justify-content: center;
  379. gap: 4px;
  380. /* PERF-016: Specific transition properties instead of 'all' to avoid animating layout-triggering properties */
  381. transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  382. }
  383. .tool-button:hover {
  384. background-color: var(--button-hover);
  385. }
  386. .tool-button:active {
  387. background-color: var(--button-active);
  388. }
  389. .tool-button:disabled,
  390. .tool-button[aria-disabled="true"] {
  391. cursor: not-allowed;
  392. opacity: 0.5;
  393. }
  394. .tool-button i {
  395. font-size: 15px;
  396. }
  397. .tool-button.is-active,
  398. .tool-button.is-active:hover {
  399. border-color: var(--accent-color);
  400. color: var(--accent-color);
  401. background-color: rgba(3, 102, 214, 0.08);
  402. }
  403. .btn-text {
  404. display: none;
  405. }
  406. .toolbar .tool-button {
  407. height: 28px;
  408. min-width: 28px;
  409. }
  410. .toolbar .tool-button.sync-active {
  411. border-color: var(--accent-color);
  412. color: var(--accent-color);
  413. }
  414. .file-input {
  415. display: none;
  416. }
  417. /* Drag overlay: full-screen drop target shown when user drags a file over the window */
  418. .drag-overlay {
  419. display: none;
  420. position: fixed;
  421. inset: 0;
  422. z-index: 9999;
  423. background-color: rgba(0, 0, 0, 0.45);
  424. pointer-events: none;
  425. align-items: center;
  426. justify-content: center;
  427. }
  428. .drag-overlay.active {
  429. display: flex;
  430. pointer-events: auto;
  431. }
  432. .drag-overlay-inner {
  433. border: 3px dashed var(--accent-color);
  434. border-radius: 12px;
  435. padding: 48px 64px;
  436. text-align: center;
  437. color: #ffffff;
  438. background-color: rgba(3, 102, 214, 0.15);
  439. animation: overlayPulse 1.4s ease-in-out infinite;
  440. }
  441. .drag-overlay-icon {
  442. display: block;
  443. font-size: 3rem;
  444. margin-bottom: 12px;
  445. color: var(--accent-color);
  446. }
  447. .drag-overlay-text {
  448. font-size: 1.4rem;
  449. font-weight: 600;
  450. margin-bottom: 4px;
  451. }
  452. .drag-overlay-sub {
  453. font-size: 0.85rem;
  454. opacity: 0.75;
  455. margin-bottom: 0;
  456. }
  457. @keyframes overlayPulse {
  458. 0%, 100% { transform: scale(1); }
  459. 50% { transform: scale(1.015); }
  460. }
  461. /* Editor drop hint: subtle text at bottom of editor pane, shown only when empty */
  462. .drop-hint {
  463. position: absolute;
  464. bottom: 14px;
  465. left: 0;
  466. right: 0;
  467. text-align: center;
  468. font-size: 0.75rem;
  469. color: var(--text-color);
  470. opacity: 0.35;
  471. pointer-events: none;
  472. user-select: none;
  473. z-index: 3;
  474. }
  475. .editor-pane:has(#markdown-editor:not(:placeholder-shown)) .drop-hint {
  476. display: none;
  477. }
  478. .line-numbers {
  479. position: absolute;
  480. top: 20px;
  481. bottom: 20px;
  482. left: 20px;
  483. width: var(--line-number-gutter);
  484. padding: 10px 8px 10px 0;
  485. font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  486. font-size: 14px;
  487. line-height: 1.5;
  488. text-align: right;
  489. color: var(--text-secondary);
  490. background-color: var(--editor-bg);
  491. border-right: 1px solid var(--border-color);
  492. box-sizing: border-box;
  493. overflow: hidden;
  494. pointer-events: none;
  495. user-select: none;
  496. z-index: 2;
  497. font-variant-numeric: tabular-nums;
  498. }
  499. .line-numbers .line-number {
  500. display: block;
  501. height: auto;
  502. }
  503. .editor-highlight-layer {
  504. position: absolute;
  505. inset: 20px 0 20px calc(20px + var(--line-number-gutter));
  506. padding: 10px;
  507. font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  508. font-size: 14px;
  509. line-height: 1.5;
  510. white-space: pre-wrap;
  511. word-wrap: break-word;
  512. color: transparent;
  513. pointer-events: none;
  514. overflow: auto;
  515. background-color: var(--editor-bg);
  516. border-radius: 4px;
  517. z-index: 1;
  518. }
  519. .editor-highlight-layer::-webkit-scrollbar {
  520. width: 8px;
  521. height: 8px;
  522. }
  523. .editor-highlight-layer::-webkit-scrollbar-thumb {
  524. background: transparent;
  525. }
  526. .editor-highlight-layer::-webkit-scrollbar-track {
  527. background: transparent;
  528. }
  529. .find-highlight {
  530. background-color: var(--fr-match-highlight, rgba(255, 223, 93, 0.4)) !important;
  531. border-radius: 2px;
  532. color: transparent !important;
  533. padding: 0 !important;
  534. margin: 0 !important;
  535. }
  536. .find-highlight.active {
  537. background-color: var(--fr-match-active, #ff9b30) !important;
  538. color: transparent !important;
  539. padding: 0 !important;
  540. margin: 0 !important;
  541. outline: 1px solid var(--accent-color, #0366d6) !important;
  542. outline-offset: -1px;
  543. }
  544. .preview-find-highlight {
  545. background-color: var(--fr-match-highlight, rgba(255, 223, 93, 0.4)) !important;
  546. color: var(--fr-match-text-color, inherit) !important;
  547. border-radius: 2px;
  548. padding: 0 1px !important;
  549. margin: 0 !important;
  550. }
  551. .preview-find-highlight.active {
  552. background-color: var(--fr-match-active, #ff9b30) !important;
  553. color: var(--fr-match-active-text-color, inherit) !important;
  554. outline: 1px solid var(--accent-color, #0366d6) !important;
  555. outline-offset: -1px;
  556. }
  557. /* Dropdown improvements */
  558. .dropdown-menu {
  559. background-color: var(--bg-color);
  560. border-color: var(--border-color);
  561. }
  562. .dropdown-item {
  563. color: var(--text-color);
  564. }
  565. .dropdown-item:hover, .dropdown-item:focus {
  566. background-color: var(--button-hover);
  567. color: var(--text-color);
  568. }
  569. /* Markdown formatting toolbar */
  570. .markdown-format-toolbar {
  571. display: flex;
  572. align-items: center;
  573. height: 34px;
  574. padding: 0 6px;
  575. background-color: var(--header-bg);
  576. border-bottom: 1px solid var(--border-color);
  577. overflow-x: auto;
  578. overflow-y: hidden;
  579. flex-shrink: 0;
  580. scrollbar-width: none;
  581. -ms-overflow-style: none;
  582. }
  583. .markdown-format-toolbar::-webkit-scrollbar {
  584. display: none;
  585. }
  586. .markdown-toolbar-group {
  587. display: flex;
  588. align-items: center;
  589. gap: 2px;
  590. height: 100%;
  591. padding: 0 6px;
  592. border-right: 1px solid var(--border-color);
  593. flex-shrink: 0;
  594. }
  595. .markdown-toolbar-group:first-child {
  596. padding-left: 0;
  597. }
  598. .markdown-toolbar-group:last-child {
  599. border-right: none;
  600. padding-right: 0;
  601. }
  602. .markdown-tool-btn {
  603. display: inline-flex;
  604. align-items: center;
  605. justify-content: center;
  606. width: 26px;
  607. height: 26px;
  608. border: 1px solid transparent;
  609. border-radius: 4px;
  610. background: transparent;
  611. color: var(--text-color);
  612. cursor: pointer;
  613. font-size: 14px;
  614. line-height: 1;
  615. padding: 0;
  616. transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  617. }
  618. .markdown-tool-btn:hover,
  619. .markdown-tool-btn:focus-visible {
  620. background-color: var(--button-hover);
  621. border-color: var(--border-color);
  622. color: var(--accent-color);
  623. }
  624. .markdown-tool-btn:active {
  625. background-color: var(--button-active);
  626. }
  627. .markdown-tool-btn:disabled,
  628. .markdown-tool-btn.disabled {
  629. opacity: 0.4;
  630. cursor: not-allowed;
  631. pointer-events: none;
  632. }
  633. .markdown-tool-btn i {
  634. font-size: 15px;
  635. }
  636. .markdown-tool-btn[data-md-action="reference"] i::before {
  637. content: "[ ]";
  638. font-style: normal;
  639. font-size: 12px;
  640. letter-spacing: -0.12em;
  641. }
  642. .markdown-tool-btn.text-tool {
  643. width: auto;
  644. min-width: 26px;
  645. padding: 0 5px;
  646. font-weight: 600;
  647. font-family: Georgia, "Times New Roman", serif;
  648. }
  649. .heading-group .markdown-tool-btn {
  650. min-width: 30px;
  651. }
  652. /* Loading indicators */
  653. .loading {
  654. opacity: 0.6;
  655. pointer-events: none;
  656. }
  657. /* Focus outline for accessibility */
  658. button:focus,
  659. a:focus {
  660. outline: 2px solid var(--accent-color);
  661. outline-offset: 2px;
  662. }
  663. /* Animation for copied message */
  664. @keyframes fadeIn {
  665. from { opacity: 0; }
  666. to { opacity: 1; }
  667. }
  668. /* Tooltip styles */
  669. .tooltip {
  670. position: absolute;
  671. background: var(--button-bg);
  672. border: 1px solid var(--border-color);
  673. padding: 5px 8px;
  674. border-radius: 4px;
  675. font-size: 12px;
  676. z-index: 1000;
  677. animation: fadeIn 0.2s ease;
  678. }
  679. /* Styles for GitHub markdown preview light mode */
  680. .markdown-body {
  681. color-scheme: light;
  682. --color-prettylights-syntax-comment: #6a737d;
  683. --color-prettylights-syntax-constant: #005cc5;
  684. --color-prettylights-syntax-entity: #6f42c1;
  685. --color-prettylights-syntax-storage-modifier-import: #24292e;
  686. --color-prettylights-syntax-entity-tag: #22863a;
  687. --color-prettylights-syntax-keyword: #cf222e;
  688. --color-prettylights-syntax-string: #032f62;
  689. --color-prettylights-syntax-variable: #e36209;
  690. --color-prettylights-syntax-brackethighlighter-unmatched: #b31d28;
  691. --color-prettylights-syntax-invalid-illegal-text: #fafbfc;
  692. --color-prettylights-syntax-invalid-illegal-bg: #b31d28;
  693. --color-prettylights-syntax-carriage-return-text: #fafbfc;
  694. --color-prettylights-syntax-carriage-return-bg: #d73a49;
  695. --color-prettylights-syntax-string-regexp: #22863a;
  696. --color-prettylights-syntax-markup-list: #735c0f;
  697. --color-prettylights-syntax-markup-heading: #005cc5;
  698. --color-prettylights-syntax-markup-italic: #24292e;
  699. --color-prettylights-syntax-markup-bold: #24292e;
  700. --color-prettylights-syntax-markup-deleted-text: #b31d28;
  701. --color-prettylights-syntax-markup-deleted-bg: #ffeef0;
  702. --color-prettylights-syntax-markup-inserted-text: #22863a;
  703. --color-prettylights-syntax-markup-inserted-bg: #f0fff4;
  704. --color-prettylights-syntax-markup-changed-text: #e36209;
  705. --color-prettylights-syntax-markup-changed-bg: #ffebda;
  706. --color-prettylights-syntax-markup-ignored-text: #f6f8fa;
  707. --color-prettylights-syntax-markup-ignored-bg: #005cc5;
  708. --color-prettylights-syntax-meta-diff-range: #6f42c1;
  709. --color-prettylights-syntax-brackethighlighter-angle: #586069;
  710. --color-prettylights-syntax-sublimelinter-gutter-mark: #e1e4e8;
  711. --color-prettylights-syntax-constant-other-reference-link: #032f62;
  712. --color-fg-default: #24292e;
  713. --color-fg-muted: #586069;
  714. --color-fg-subtle: #6a737d;
  715. --color-canvas-default: #ffffff;
  716. --color-canvas-subtle: #f6f8fa;
  717. --color-border-default: #e1e4e8;
  718. --color-border-muted: #eaecef;
  719. --color-neutral-muted: rgba(175,184,193,0.2);
  720. --color-accent-fg: #0366d6;
  721. --color-accent-emphasis: #0366d6;
  722. --color-attention-subtle: #fff5b1;
  723. --color-danger-fg: #d73a49;
  724. }
  725. /* Styles for GitHub markdown preview dark mode */
  726. [data-theme="dark"] .markdown-body {
  727. color-scheme: dark;
  728. --color-prettylights-syntax-comment: #8b949e;
  729. --color-prettylights-syntax-constant: #79c0ff;
  730. --color-prettylights-syntax-entity: #d2a8ff;
  731. --color-prettylights-syntax-storage-modifier-import: #c9d1d9;
  732. --color-prettylights-syntax-entity-tag: #7ee787;
  733. --color-prettylights-syntax-keyword: #ff7b72;
  734. --color-prettylights-syntax-string: #a5d6ff;
  735. --color-prettylights-syntax-variable: #ffa657;
  736. --color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
  737. --color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
  738. --color-prettylights-syntax-invalid-illegal-bg: #8e1519;
  739. --color-prettylights-syntax-carriage-return-text: #f0f6fc;
  740. --color-prettylights-syntax-carriage-return-bg: #b62324;
  741. --color-prettylights-syntax-string-regexp: #7ee787;
  742. --color-prettylights-syntax-markup-list: #f2cc60;
  743. --color-prettylights-syntax-markup-heading: #1f6feb;
  744. --color-prettylights-syntax-markup-italic: #c9d1d9;
  745. --color-prettylights-syntax-markup-bold: #c9d1d9;
  746. --color-prettylights-syntax-markup-deleted-text: #ffdcd7;
  747. --color-prettylights-syntax-markup-deleted-bg: #67060c;
  748. --color-prettylights-syntax-markup-inserted-text: #aff5b4;
  749. --color-prettylights-syntax-markup-inserted-bg: #033a16;
  750. --color-prettylights-syntax-markup-changed-text: #ffdfb6;
  751. --color-prettylights-syntax-markup-changed-bg: #5a1e02;
  752. --color-prettylights-syntax-markup-ignored-text: #c9d1d9;
  753. --color-prettylights-syntax-markup-ignored-bg: #1158c7;
  754. --color-prettylights-syntax-meta-diff-range: #d2a8ff;
  755. --color-prettylights-syntax-brackethighlighter-angle: #8b949e;
  756. --color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
  757. --color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
  758. --color-fg-default: #c9d1d9;
  759. --color-fg-muted: #8b949e;
  760. --color-fg-subtle: #484f58;
  761. --color-canvas-default: #0d1117;
  762. --color-canvas-subtle: #161b22;
  763. --color-border-default: #30363d;
  764. --color-border-muted: #21262d;
  765. --color-neutral-muted: rgba(110,118,129,0.4);
  766. --color-accent-fg: #58a6ff;
  767. --color-accent-emphasis: #1f6feb;
  768. --color-attention-subtle: rgba(187,128,9,0.15);
  769. --color-danger-fg: #f85149;
  770. }
  771. /* Override specific styles for dark mode tables and code */
  772. [data-theme="dark"] .markdown-body table tr {
  773. background-color: var(--table-bg);
  774. }
  775. [data-theme="dark"] .markdown-body table tr:nth-child(2n) {
  776. background-color: #1c2128; /* Slightly lighter than base dark background */
  777. }
  778. [data-theme="dark"] .markdown-body pre {
  779. background-color: var(--code-bg);
  780. }
  781. [data-theme="dark"] .markdown-body code {
  782. background-color: var(--code-bg);
  783. }
  784. /* Syntax Highlighting Mapping to GitHub Variables */
  785. .hljs {
  786. color: var(--color-fg-default);
  787. }
  788. .hljs-doctag,
  789. .hljs-keyword,
  790. .hljs-meta .hljs-keyword,
  791. .hljs-template-tag,
  792. .hljs-template-variable,
  793. .hljs-type,
  794. .hljs-variable.language_ {
  795. color: var(--color-prettylights-syntax-keyword);
  796. }
  797. .hljs-title,
  798. .hljs-title.class_,
  799. .hljs-title.class_.inherited__,
  800. .hljs-title.function_ {
  801. color: var(--color-prettylights-syntax-entity);
  802. }
  803. .hljs-attr,
  804. .hljs-attribute,
  805. .hljs-literal,
  806. .hljs-meta,
  807. .hljs-number,
  808. .hljs-operator,
  809. .hljs-variable,
  810. .hljs-selector-attr,
  811. .hljs-selector-class,
  812. .hljs-selector-id {
  813. color: var(--color-prettylights-syntax-constant);
  814. }
  815. .hljs-regexp,
  816. .hljs-string,
  817. .hljs-meta .hljs-string {
  818. color: var(--color-prettylights-syntax-string);
  819. }
  820. .hljs-built_in,
  821. .hljs-symbol {
  822. color: var(--color-prettylights-syntax-variable);
  823. }
  824. .hljs-comment,
  825. .hljs-code,
  826. .hljs-formula {
  827. color: var(--color-prettylights-syntax-comment);
  828. }
  829. .hljs-name,
  830. .hljs-quote,
  831. .hljs-selector-tag,
  832. .hljs-selector-pseudo {
  833. color: var(--color-prettylights-syntax-entity-tag);
  834. }
  835. .hljs-subst {
  836. color: var(--color-fg-default);
  837. }
  838. .hljs-section {
  839. color: var(--color-prettylights-syntax-markup-heading);
  840. font-weight: bold;
  841. }
  842. .hljs-bullet {
  843. color: var(--color-prettylights-syntax-constant);
  844. }
  845. .hljs-emphasis {
  846. color: var(--color-fg-default);
  847. font-style: italic;
  848. }
  849. .hljs-strong {
  850. color: var(--color-fg-default);
  851. font-weight: bold;
  852. }
  853. .hljs-addition {
  854. color: var(--color-prettylights-syntax-markup-inserted-text);
  855. background-color: var(--color-prettylights-syntax-markup-inserted-bg);
  856. }
  857. .hljs-deletion {
  858. color: var(--color-prettylights-syntax-markup-deleted-text);
  859. background-color: var(--color-prettylights-syntax-markup-deleted-bg);
  860. }
  861. .stats-container {
  862. font-size: 0.8rem;
  863. color: var(--text-color);
  864. }
  865. .stat-item {
  866. align-items: center;
  867. }
  868. .stat-item i {
  869. font-size: 0.9rem;
  870. opacity: 0.8;
  871. }
  872. #importDropdown,
  873. #exportDropdown,
  874. #languageDropdown {
  875. font-size: 0.8rem;
  876. }
  877. #importDropdown i,
  878. #exportDropdown i,
  879. #languageDropdown i {
  880. font-size: 0.9rem;
  881. }
  882. /* Ensure desktop dropdown menu options match the stats-container font size */
  883. [aria-labelledby="importDropdown"] .dropdown-item,
  884. [aria-labelledby="exportDropdown"] .dropdown-item,
  885. [aria-labelledby="languageDropdown"] .dropdown-item {
  886. font-size: 0.8rem;
  887. }
  888. /* Ensure mobile menu import, export, and language dropdown triggers/options match the mobile stats-container font size */
  889. #mobile-import-button,
  890. #mobile-import-github-button,
  891. #mobile-export-md,
  892. #mobile-export-html,
  893. #mobile-export-pdf,
  894. #mobileLanguageDropdown {
  895. font-size: 0.9rem !important;
  896. }
  897. [aria-labelledby="mobileLanguageDropdown"] .dropdown-item {
  898. font-size: 0.9rem;
  899. }
  900. .editor-pane {
  901. overflow: hidden;
  902. }
  903. /* Mobile Menu Styles */
  904. .mobile-menu {
  905. display: none;
  906. position: relative;
  907. z-index: 1001;
  908. }
  909. /* slide‑in panel */
  910. .mobile-menu-panel {
  911. position: fixed;
  912. top: 0;
  913. right: -300px;
  914. width: 280px;
  915. height: 100vh;
  916. background-color: var(--bg-color);
  917. box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
  918. transition: right 0.3s ease;
  919. overflow-y: auto;
  920. padding: 1rem;
  921. display: flex;
  922. flex-direction: column;
  923. z-index: 1002;
  924. }
  925. .mobile-menu-panel.active {
  926. right: 0;
  927. }
  928. /* translucent overlay behind panel */
  929. .mobile-menu-overlay {
  930. position: fixed;
  931. top: 0;
  932. left: 0;
  933. width: 100%;
  934. height: 100vh;
  935. background-color: rgba(0, 0, 0, 0.5);
  936. opacity: 0;
  937. visibility: hidden;
  938. pointer-events: none;
  939. transition: opacity 0.3s ease, visibility 0.3s ease;
  940. z-index: 1000;
  941. }
  942. .mobile-menu-overlay.active {
  943. opacity: 1;
  944. visibility: visible;
  945. pointer-events: auto;
  946. }
  947. /* header inside mobile menu */
  948. .mobile-menu-header {
  949. display: flex;
  950. justify-content: space-between;
  951. align-items: center;
  952. margin-bottom: 1rem;
  953. }
  954. .mobile-menu-header h5 {
  955. margin: 0;
  956. font-size: 1.25rem;
  957. color: var(--text-color);
  958. }
  959. /* stats section in mobile menu */
  960. .mobile-stats-container {
  961. border-bottom: 1px solid var(--border-color);
  962. padding-bottom: 0.75rem;
  963. margin-bottom: 1rem;
  964. }
  965. .mobile-stats-container .stat-item {
  966. font-size: 0.9rem;
  967. color: var(--text-color);
  968. display: flex;
  969. align-items: center;
  970. }
  971. .mobile-stats-container .stat-item i {
  972. margin-right: 0.5em;
  973. opacity: 0.8;
  974. }
  975. /* menu buttons list */
  976. .mobile-menu-items {
  977. display: flex;
  978. flex-direction: column;
  979. gap: 0.5rem;
  980. flex-grow: 1;
  981. }
  982. /* each menu item */
  983. .mobile-menu-item {
  984. background-color: var(--button-bg);
  985. border: 1px solid var(--border-color);
  986. color: var(--text-color);
  987. border-radius: 6px;
  988. padding: 0.6rem 1rem;
  989. font-size: 1rem;
  990. text-align: left;
  991. display: flex;
  992. align-items: center;
  993. gap: 0.5rem;
  994. transition: background-color 0.2s ease;
  995. cursor: pointer;
  996. }
  997. .mobile-menu-item:hover {
  998. background-color: var(--button-hover);
  999. }
  1000. .mobile-menu-item:active {
  1001. background-color: var(--button-active);
  1002. }
  1003. /* close button override */
  1004. #close-mobile-menu.tool-button {
  1005. padding: 0.25rem 0.5rem;
  1006. font-size: 1rem;
  1007. }
  1008. /* Mobile document tabs section */
  1009. .mobile-tabs-section {
  1010. border-bottom: 1px solid var(--border-color);
  1011. padding-bottom: 0.75rem;
  1012. }
  1013. .mobile-tabs-header {
  1014. display: flex;
  1015. align-items: center;
  1016. justify-content: space-between;
  1017. margin-bottom: 0.5rem;
  1018. }
  1019. .mobile-tabs-label {
  1020. font-size: 0.85rem;
  1021. font-weight: 600;
  1022. color: var(--text-color);
  1023. opacity: 0.8;
  1024. text-transform: uppercase;
  1025. letter-spacing: 0.04em;
  1026. }
  1027. .mobile-new-tab-btn {
  1028. background: none;
  1029. border: 1px solid var(--border-color);
  1030. border-radius: 4px;
  1031. color: var(--text-color);
  1032. padding: 2px 7px;
  1033. font-size: 0.9rem;
  1034. cursor: pointer;
  1035. display: flex;
  1036. align-items: center;
  1037. transition: background-color 0.15s ease;
  1038. }
  1039. .mobile-new-tab-btn:hover {
  1040. background-color: var(--button-hover);
  1041. }
  1042. .mobile-tab-list {
  1043. display: flex;
  1044. flex-direction: column;
  1045. gap: 4px;
  1046. max-height: 180px;
  1047. overflow-y: auto;
  1048. }
  1049. .mobile-tab-item {
  1050. display: flex;
  1051. align-items: center;
  1052. justify-content: space-between;
  1053. background-color: var(--button-bg);
  1054. border: 1px solid var(--border-color);
  1055. border-radius: 6px;
  1056. padding: 0.45rem 0.75rem;
  1057. font-size: 0.9rem;
  1058. color: var(--text-color);
  1059. cursor: pointer;
  1060. transition: background-color 0.15s ease;
  1061. gap: 0.5rem;
  1062. }
  1063. .mobile-tab-item:hover {
  1064. background-color: var(--button-hover);
  1065. }
  1066. .mobile-tab-item.active {
  1067. border-color: var(--accent-color);
  1068. color: var(--accent-color);
  1069. background-color: var(--bg-color);
  1070. }
  1071. .mobile-tab-title {
  1072. flex: 1;
  1073. white-space: nowrap;
  1074. overflow: hidden;
  1075. text-overflow: ellipsis;
  1076. min-width: 0;
  1077. }
  1078. .mobile-tab-item .tab-menu-btn {
  1079. opacity: 0.6;
  1080. }
  1081. .mobile-tab-item:hover .tab-menu-btn,
  1082. .mobile-tab-item.active .tab-menu-btn {
  1083. opacity: 0.8;
  1084. }
  1085. #mobile-tab-reset-btn {
  1086. margin-left: 0;
  1087. height: auto;
  1088. padding: 0.45rem 0.75rem;
  1089. justify-content: center;
  1090. font-size: 0.9rem;
  1091. }
  1092. /* ==========================================
  1093. NAVBAR RESPONSIVE BREAKPOINTS
  1094. >= 1080px : full desktop navbar
  1095. < 1080px : mobile hamburger + stacked panes
  1096. ========================================== */
  1097. /* Mobile / tablet (< 1080px): switch to hamburger, stack panes */
  1098. @media (max-width: 1079px) {
  1099. /* Override Bootstrap d-md-flex / d-md-none so the breakpoint is 1080px */
  1100. .stats-container,
  1101. .toolbar {
  1102. display: none !important;
  1103. }
  1104. /* Expand touch target sizes to meet WCAG mobile guidelines */
  1105. .markdown-tool-btn {
  1106. width: 36px !important;
  1107. height: 36px !important;
  1108. font-size: 16px !important;
  1109. }
  1110. .markdown-format-toolbar {
  1111. height: 44px !important;
  1112. }
  1113. .tab-close-btn {
  1114. width: 28px !important;
  1115. height: 28px !important;
  1116. font-size: 14px !important;
  1117. }
  1118. .tab-menu-btn {
  1119. width: 28px !important;
  1120. height: 28px !important;
  1121. font-size: 14px !important;
  1122. }
  1123. .mobile-menu {
  1124. display: block !important;
  1125. }
  1126. /* Stack editor and preview vertically */
  1127. .content-container {
  1128. flex-direction: column;
  1129. }
  1130. .editor-pane,
  1131. .preview-pane {
  1132. flex: none;
  1133. height: 50%;
  1134. border-right: none;
  1135. }
  1136. .editor-pane {
  1137. border-bottom: 1px solid var(--border-color);
  1138. }
  1139. /* Hide drag-resize divider (touch devices don't use it) */
  1140. .resize-divider {
  1141. display: none;
  1142. }
  1143. /* Single-pane view modes: occupy full height */
  1144. .content-container.view-editor-only .editor-pane,
  1145. .content-container.view-preview-only .preview-pane {
  1146. height: 100%;
  1147. }
  1148. .content-container.view-split .editor-pane,
  1149. .content-container.view-split .preview-pane {
  1150. height: 50%;
  1151. }
  1152. }
  1153. .github-link {
  1154. color: var(--text-color);
  1155. text-decoration: none;
  1156. display: flex;
  1157. align-items: center;
  1158. justify-content: center;
  1159. transition: transform 0.2s ease, color 0.2s ease;
  1160. margin-right: 2rem;
  1161. }
  1162. .github-link:hover {
  1163. color: var(--accent-color);
  1164. transform: scale(1.1);
  1165. }
  1166. .github-link i {
  1167. font-size: 1.25rem;
  1168. }
  1169. /* ========================================
  1170. HEADER LAYOUT
  1171. ======================================== */
  1172. .header-container {
  1173. position: relative;
  1174. min-height: 30px;
  1175. }
  1176. .app-header h1 {
  1177. font-size: 1.05rem;
  1178. line-height: 1.1;
  1179. }
  1180. .header-left {
  1181. flex: 1 0 auto;
  1182. justify-content: flex-start;
  1183. white-space: nowrap;
  1184. }
  1185. .header-right {
  1186. flex: 1 0 auto;
  1187. justify-content: flex-end;
  1188. white-space: nowrap;
  1189. }
  1190. /* Pane View States */
  1191. .content-container.view-editor-only .preview-pane {
  1192. display: none;
  1193. }
  1194. .content-container.view-editor-only .editor-pane {
  1195. flex: 1;
  1196. border-right: none;
  1197. }
  1198. .content-container.view-preview-only .editor-pane {
  1199. display: none;
  1200. }
  1201. .content-container.view-preview-only .preview-pane {
  1202. flex: 1;
  1203. }
  1204. .content-container.view-split .editor-pane,
  1205. .content-container.view-split .preview-pane {
  1206. flex: 1;
  1207. }
  1208. /* Compact desktop (< 1280px): compact toolbar */
  1209. @media (max-width: 1280px) {
  1210. /* Compact toolbar at medium widths */
  1211. .toolbar {
  1212. gap: 4px;
  1213. }
  1214. }
  1215. /* ========================================
  1216. RESIZE DIVIDER - Story 1.3
  1217. ======================================== */
  1218. .resize-divider {
  1219. width: 8px;
  1220. background-color: transparent;
  1221. cursor: col-resize;
  1222. display: flex;
  1223. align-items: center;
  1224. justify-content: center;
  1225. flex-shrink: 0;
  1226. position: relative;
  1227. z-index: 10;
  1228. transition: background-color 0.2s ease;
  1229. }
  1230. .resize-divider:hover {
  1231. background-color: var(--button-hover);
  1232. }
  1233. .resize-divider.dragging {
  1234. background-color: var(--accent-color);
  1235. }
  1236. .resize-divider-handle {
  1237. width: 2px;
  1238. height: 40px;
  1239. background-color: var(--border-color);
  1240. border-radius: 2px;
  1241. transition: background-color 0.2s ease, width 0.2s ease;
  1242. }
  1243. .resize-divider:hover .resize-divider-handle,
  1244. .resize-divider.dragging .resize-divider-handle {
  1245. background-color: var(--accent-color);
  1246. width: 3px;
  1247. }
  1248. /* Hide divider in single-pane modes */
  1249. .content-container.view-editor-only .resize-divider,
  1250. .content-container.view-preview-only .resize-divider {
  1251. display: none;
  1252. }
  1253. /* Prevent text selection during drag */
  1254. .resizing {
  1255. user-select: none;
  1256. cursor: col-resize !important;
  1257. }
  1258. .resizing * {
  1259. cursor: col-resize !important;
  1260. }
  1261. .resizing #markdown-preview,
  1262. .resizing #markdown-editor,
  1263. .resizing .line-numbers {
  1264. pointer-events: none !important;
  1265. }
  1266. /* ========================================
  1267. MOBILE VIEW MODE CONTROLS - Story 1.4
  1268. ======================================== */
  1269. .mobile-view-mode-group {
  1270. display: flex;
  1271. gap: 0;
  1272. border-bottom: 1px solid var(--border-color);
  1273. padding-bottom: 0.75rem;
  1274. }
  1275. .mobile-view-mode-btn {
  1276. flex: 1;
  1277. background-color: var(--button-bg);
  1278. border: 1px solid var(--border-color);
  1279. color: var(--text-color);
  1280. padding: 8px 12px;
  1281. font-size: 14px;
  1282. cursor: pointer;
  1283. display: flex;
  1284. flex-direction: column;
  1285. align-items: center;
  1286. justify-content: center;
  1287. gap: 4px;
  1288. transition: all 0.2s ease;
  1289. }
  1290. .mobile-view-mode-btn:first-child {
  1291. border-radius: 6px 0 0 6px;
  1292. }
  1293. .mobile-view-mode-btn:last-child {
  1294. border-radius: 0 6px 6px 0;
  1295. }
  1296. .mobile-view-mode-btn:not(:last-child) {
  1297. border-right: none;
  1298. }
  1299. .mobile-view-mode-btn:hover,
  1300. .mobile-view-mode-btn:active {
  1301. background-color: var(--button-hover);
  1302. }
  1303. .mobile-view-mode-btn.active {
  1304. background-color: var(--button-bg);
  1305. border-color: var(--accent-color);
  1306. color: var(--accent-color);
  1307. border-width: 2px;
  1308. padding: 7px 11px;
  1309. }
  1310. .mobile-view-mode-btn.active:not(:last-child) {
  1311. border-right: 2px solid var(--accent-color);
  1312. }
  1313. .mobile-view-mode-btn i {
  1314. font-size: 18px;
  1315. }
  1316. .mobile-view-mode-btn span {
  1317. font-size: 12px;
  1318. }
  1319. /* ========================================
  1320. RESPONSIVE VIEW MODE FIXES - Story 1.5
  1321. ======================================== */
  1322. /* ========================================
  1323. PDF EXPORT TABLE FIX - Rowspan/Colspan
  1324. ======================================== */
  1325. /* Fix for html2canvas not properly rendering rowspan/colspan cells.
  1326. Apply backgrounds to cells instead of rows to prevent row backgrounds
  1327. from painting over rowspan cells during canvas capture. */
  1328. .pdf-export table tr {
  1329. background-color: transparent !important;
  1330. }
  1331. .pdf-export table th,
  1332. .pdf-export table td {
  1333. background-color: var(--table-bg, #ffffff);
  1334. position: relative;
  1335. }
  1336. .pdf-export table tr:nth-child(2n) th,
  1337. .pdf-export table tr:nth-child(2n) td {
  1338. background-color: var(--bg-color, #f6f8fa);
  1339. }
  1340. /* Ensure rowspan cells render correctly */
  1341. .pdf-export table th[rowspan],
  1342. .pdf-export table td[rowspan] {
  1343. vertical-align: middle;
  1344. background-color: var(--table-bg, #ffffff) !important;
  1345. }
  1346. /* Ensure colspan cells render correctly */
  1347. .pdf-export table th[colspan],
  1348. .pdf-export table td[colspan] {
  1349. text-align: center;
  1350. }
  1351. /* Dark mode PDF export table fix */
  1352. [data-theme="dark"] .pdf-export table th,
  1353. [data-theme="dark"] .pdf-export table td {
  1354. background-color: var(--table-bg, #161b22);
  1355. }
  1356. [data-theme="dark"] .pdf-export table tr:nth-child(2n) th,
  1357. [data-theme="dark"] .pdf-export table tr:nth-child(2n) td {
  1358. background-color: #1c2128;
  1359. }
  1360. [data-theme="dark"] .pdf-export table th[rowspan],
  1361. [data-theme="dark"] .pdf-export table td[rowspan] {
  1362. background-color: var(--table-bg, #161b22) !important;
  1363. }
  1364. /* ========================================
  1365. MERMAID DIAGRAM TOOLBAR
  1366. ======================================== */
  1367. .mermaid-container {
  1368. position: relative;
  1369. }
  1370. .mermaid-toolbar {
  1371. position: absolute;
  1372. top: 8px;
  1373. right: 8px;
  1374. display: flex;
  1375. gap: 4px;
  1376. opacity: 0;
  1377. transition: opacity 0.2s ease;
  1378. z-index: 10;
  1379. }
  1380. .mermaid-container:hover .mermaid-toolbar {
  1381. opacity: 1;
  1382. }
  1383. .mermaid-toolbar-btn {
  1384. background-color: var(--button-bg);
  1385. border: 1px solid var(--border-color);
  1386. color: var(--text-color);
  1387. border-radius: 4px;
  1388. padding: 4px 7px;
  1389. font-size: 13px;
  1390. cursor: pointer;
  1391. display: flex;
  1392. align-items: center;
  1393. gap: 3px;
  1394. transition: background-color 0.2s ease, color 0.2s ease;
  1395. white-space: nowrap;
  1396. }
  1397. .mermaid-toolbar-btn:hover {
  1398. background-color: var(--button-hover);
  1399. color: var(--accent-color);
  1400. }
  1401. .mermaid-toolbar-btn:active {
  1402. background-color: var(--button-active);
  1403. }
  1404. .mermaid-toolbar-btn i {
  1405. font-size: 14px;
  1406. }
  1407. /* ========================================
  1408. MERMAID ZOOM MODAL
  1409. ======================================== */
  1410. #mermaid-zoom-modal {
  1411. display: none;
  1412. position: fixed;
  1413. inset: 0;
  1414. z-index: 2000;
  1415. background-color: rgba(0, 0, 0, 0.75);
  1416. align-items: center;
  1417. justify-content: center;
  1418. }
  1419. #mermaid-zoom-modal.active {
  1420. display: flex;
  1421. }
  1422. .mermaid-modal-content {
  1423. background-color: var(--bg-color);
  1424. border: 1px solid var(--border-color);
  1425. border-radius: 8px;
  1426. padding: 16px;
  1427. width: 85vw;
  1428. height: 85vh;
  1429. max-width: 85vw;
  1430. max-height: 85vh;
  1431. display: flex;
  1432. flex-direction: column;
  1433. gap: 12px;
  1434. }
  1435. @media (max-width: 576px) {
  1436. .mermaid-modal-content {
  1437. width: 95vw;
  1438. height: 90vh;
  1439. max-width: 95vw;
  1440. max-height: 90vh;
  1441. padding: 10px;
  1442. }
  1443. }
  1444. .mermaid-modal-header {
  1445. display: flex;
  1446. justify-content: space-between;
  1447. align-items: center;
  1448. }
  1449. .mermaid-modal-header span {
  1450. font-weight: 600;
  1451. font-size: 15px;
  1452. color: var(--text-color);
  1453. }
  1454. .mermaid-modal-close {
  1455. background: none;
  1456. border: none;
  1457. color: var(--text-color);
  1458. font-size: 1.2rem;
  1459. cursor: pointer;
  1460. padding: 2px 6px;
  1461. border-radius: 4px;
  1462. display: flex;
  1463. align-items: center;
  1464. transition: background-color 0.2s ease;
  1465. }
  1466. .mermaid-modal-close:hover {
  1467. background-color: var(--button-hover);
  1468. }
  1469. .mermaid-modal-diagram {
  1470. overflow: auto;
  1471. flex: 1;
  1472. display: flex;
  1473. align-items: center;
  1474. justify-content: center;
  1475. min-height: 200px;
  1476. cursor: grab;
  1477. }
  1478. .mermaid-modal-diagram.dragging {
  1479. cursor: grabbing;
  1480. }
  1481. .mermaid-modal-diagram svg {
  1482. transform-origin: center;
  1483. transition: transform 0.1s ease;
  1484. max-width: none;
  1485. }
  1486. .mermaid-modal-controls {
  1487. display: flex;
  1488. justify-content: center;
  1489. gap: 8px;
  1490. flex-wrap: wrap;
  1491. }
  1492. .mermaid-modal-controls .mermaid-toolbar-btn {
  1493. opacity: 1;
  1494. }
  1495. /* ========================================
  1496. DOCUMENT TABS & SESSION MANAGEMENT
  1497. ======================================== */
  1498. .tab-bar {
  1499. display: flex;
  1500. align-items: center;
  1501. background-color: var(--header-bg);
  1502. border-bottom: 1px solid var(--border-color);
  1503. height: 32px;
  1504. overflow: visible; /* ← was: overflow: hidden */
  1505. flex-shrink: 0;
  1506. padding: 0 4px;
  1507. gap: 0;
  1508. user-select: none;
  1509. position: relative;
  1510. z-index: 10;
  1511. }
  1512. .tab-list {
  1513. display: flex;
  1514. align-items: flex-end;
  1515. overflow-x: auto;
  1516. overflow-y: visible; /* ← was: overflow-y: hidden */
  1517. flex: 1;
  1518. height: 100%;
  1519. scrollbar-width: none;
  1520. -ms-overflow-style: none;
  1521. }
  1522. .tab-list::-webkit-scrollbar {
  1523. display: none;
  1524. }
  1525. .tab-item {
  1526. display: flex;
  1527. align-items: center;
  1528. gap: 6px;
  1529. height: 32px;
  1530. padding: 0 8px 0 10px;
  1531. min-width: 100px;
  1532. max-width: 180px;
  1533. background-color: var(--button-bg);
  1534. border: 1px solid var(--border-color);
  1535. border-bottom: 1px solid transparent;
  1536. border-radius: 6px 6px 0 0;
  1537. cursor: pointer;
  1538. font-size: 13px;
  1539. color: var(--text-color);
  1540. white-space: nowrap;
  1541. /* overflow: hidden; <-- REMOVE THIS */
  1542. position: relative;
  1543. transition: background-color 0.15s ease, color 0.15s ease;
  1544. flex-shrink: 0;
  1545. margin-right: 2px;
  1546. opacity: 0.7;
  1547. }
  1548. .tab-item:hover {
  1549. background-color: var(--button-hover);
  1550. opacity: 0.9;
  1551. }
  1552. .tab-item.active {
  1553. background-color: var(--bg-color);
  1554. border-color: var(--border-color);
  1555. color: var(--accent-color);
  1556. border-bottom: 1px solid var(--bg-color);
  1557. opacity: 1;
  1558. z-index: 2;
  1559. }
  1560. .tab-item.unsaved::after {
  1561. content: '';
  1562. display: inline-block;
  1563. width: 6px;
  1564. height: 6px;
  1565. background-color: var(--accent-color);
  1566. border-radius: 50%;
  1567. flex-shrink: 0;
  1568. margin-left: 2px;
  1569. }
  1570. .tab-title {
  1571. overflow: hidden;
  1572. text-overflow: ellipsis;
  1573. white-space: nowrap;
  1574. flex: 1;
  1575. min-width: 0;
  1576. }
  1577. .tab-close-btn {
  1578. display: flex;
  1579. align-items: center;
  1580. justify-content: center;
  1581. width: 16px;
  1582. height: 16px;
  1583. border-radius: 3px;
  1584. background: none;
  1585. border: none;
  1586. color: var(--text-color);
  1587. cursor: pointer;
  1588. padding: 0;
  1589. font-size: 11px;
  1590. opacity: 0;
  1591. flex-shrink: 0;
  1592. transition: background-color 0.15s ease, opacity 0.15s ease;
  1593. }
  1594. .tab-item:hover .tab-close-btn,
  1595. .tab-item.active .tab-close-btn {
  1596. opacity: 0.6;
  1597. }
  1598. .tab-close-btn:hover {
  1599. background-color: var(--button-active);
  1600. opacity: 1 !important;
  1601. color: var(--color-danger-fg, #d73a49);
  1602. }
  1603. .tab-new-btn {
  1604. display: flex;
  1605. align-items: center;
  1606. gap: 4px;
  1607. height: 24px;
  1608. padding: 0 8px;
  1609. border-radius: 5px;
  1610. background: none;
  1611. border: 1px solid var(--border-color);
  1612. color: var(--text-color);
  1613. cursor: pointer;
  1614. font-size: 12px;
  1615. flex-shrink: 0;
  1616. margin-left: 6px;
  1617. align-self: center;
  1618. transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  1619. }
  1620. .tab-new-btn:hover {
  1621. background-color: rgba(46, 160, 67, 0.1);
  1622. border-color: var(--accent-color, #2ea043);
  1623. color: var(--accent-color, #2ea043);
  1624. }
  1625. .tab-new-btn:active {
  1626. background-color: rgba(46, 160, 67, 0.2);
  1627. }
  1628. /* Drag-and-drop visual feedback */
  1629. .tab-item.dragging {
  1630. opacity: 0.4;
  1631. }
  1632. .tab-item.drag-over {
  1633. border-left: 2px solid var(--accent-color);
  1634. }
  1635. /* Tab enter animation */
  1636. @keyframes tabSlideIn {
  1637. from { opacity: 0; transform: translateY(4px); }
  1638. to { opacity: 0.7; transform: translateY(0); }
  1639. }
  1640. .tab-item {
  1641. animation: tabSlideIn 0.12s ease forwards;
  1642. }
  1643. .tab-item.active {
  1644. animation: none;
  1645. }
  1646. /* Hide tab bar on very small screens — single-file use */
  1647. @media (max-width: 480px) {
  1648. .tab-bar {
  1649. display: none;
  1650. }
  1651. }
  1652. /* ========================================
  1653. TAB OVERFLOW — Scroll Buttons & Fade Indicators
  1654. ======================================== */
  1655. .tab-scroll-btn {
  1656. display: none;
  1657. align-items: center;
  1658. justify-content: center;
  1659. width: 24px;
  1660. height: 24px;
  1661. border-radius: 4px;
  1662. background: none;
  1663. border: 1px solid transparent;
  1664. color: var(--text-color);
  1665. cursor: pointer;
  1666. font-size: 14px;
  1667. flex-shrink: 0;
  1668. padding: 0;
  1669. transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  1670. z-index: 2;
  1671. opacity: 0.6;
  1672. }
  1673. .tab-scroll-btn:hover {
  1674. background-color: var(--button-hover);
  1675. border-color: var(--border-color);
  1676. opacity: 1;
  1677. }
  1678. .tab-scroll-btn:active {
  1679. background-color: var(--button-active);
  1680. }
  1681. /* Show scroll buttons only when overflow exists */
  1682. .tab-bar.has-overflow-left .tab-scroll-left,
  1683. .tab-bar.has-overflow-right .tab-scroll-right {
  1684. display: flex;
  1685. }
  1686. /* Overflow fade indicators — subtle gradient at clipped edges */
  1687. .tab-list::before,
  1688. .tab-list::after {
  1689. content: '';
  1690. position: sticky;
  1691. top: 0;
  1692. bottom: 0;
  1693. width: 0;
  1694. flex-shrink: 0;
  1695. pointer-events: none;
  1696. z-index: 3;
  1697. transition: box-shadow 0.2s ease;
  1698. }
  1699. .tab-list::before {
  1700. left: 0;
  1701. }
  1702. .tab-list::after {
  1703. right: 0;
  1704. }
  1705. .tab-bar.has-overflow-left .tab-list::before {
  1706. box-shadow: 8px 0 12px -4px rgba(0, 0, 0, 0.12);
  1707. }
  1708. .tab-bar.has-overflow-right .tab-list::after {
  1709. box-shadow: -8px 0 12px -4px rgba(0, 0, 0, 0.12);
  1710. }
  1711. [data-theme="dark"] .tab-bar.has-overflow-left .tab-list::before {
  1712. box-shadow: 8px 0 12px -4px rgba(0, 0, 0, 0.35);
  1713. }
  1714. [data-theme="dark"] .tab-bar.has-overflow-right .tab-list::after {
  1715. box-shadow: -8px 0 12px -4px rgba(0, 0, 0, 0.35);
  1716. }
  1717. /* ========================================
  1718. THREE-DOT TAB MENU
  1719. ======================================== */
  1720. .tab-menu-btn {
  1721. display: flex;
  1722. align-items: center;
  1723. justify-content: center;
  1724. width: 22px;
  1725. height: 22px;
  1726. border-radius: 3px;
  1727. background: none;
  1728. border: none;
  1729. color: var(--text-color);
  1730. cursor: pointer;
  1731. padding: 0;
  1732. font-size: 14px;
  1733. font-weight: bold;
  1734. letter-spacing: 1px;
  1735. opacity: 0.65;
  1736. flex-shrink: 0;
  1737. transition: background-color 0.15s ease, opacity 0.15s ease;
  1738. position: relative;
  1739. }
  1740. /* Touch Hitbox Expansion for Tab Menu Button */
  1741. .tab-menu-btn::before {
  1742. content: '';
  1743. position: absolute;
  1744. top: 50%;
  1745. left: 50%;
  1746. transform: translate(-50%, -50%);
  1747. width: 48px;
  1748. height: 48px;
  1749. }
  1750. /* Touch-optimized styling for coarser pointers (e.g., smartphones & tablets) */
  1751. @media (pointer: coarse) {
  1752. .tab-bar {
  1753. height: 40px !important;
  1754. }
  1755. .tab-item {
  1756. height: 40px !important;
  1757. font-size: 14px !important;
  1758. padding: 0 10px 0 12px !important;
  1759. gap: 8px !important;
  1760. }
  1761. .tab-new-btn,
  1762. .tab-reset-btn {
  1763. height: 32px !important;
  1764. font-size: 14px !important;
  1765. padding: 0 12px !important;
  1766. }
  1767. .tab-scroll-btn {
  1768. width: 32px !important;
  1769. height: 32px !important;
  1770. font-size: 18px !important;
  1771. }
  1772. .tab-menu-btn {
  1773. width: 30px !important;
  1774. height: 30px !important;
  1775. font-size: 18px !important;
  1776. }
  1777. .tab-close-btn {
  1778. width: 20px !important;
  1779. height: 20px !important;
  1780. font-size: 13px !important;
  1781. opacity: 0.8 !important;
  1782. }
  1783. }
  1784. .tab-item:hover .tab-menu-btn,
  1785. .tab-item.active .tab-menu-btn {
  1786. opacity: 0.65;
  1787. }
  1788. .tab-menu-btn:hover {
  1789. background-color: var(--button-active);
  1790. opacity: 1 !important;
  1791. }
  1792. .tab-menu-dropdown {
  1793. display: none;
  1794. position: fixed;
  1795. min-width: 130px;
  1796. background-color: var(--header-bg);
  1797. border: 1px solid var(--border-color);
  1798. border-radius: 6px;
  1799. box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  1800. z-index: 99999;
  1801. overflow: hidden;
  1802. flex-direction: column;
  1803. }
  1804. .tab-menu-dropdown.open {
  1805. display: flex;
  1806. }
  1807. .tab-menu-item {
  1808. display: flex;
  1809. align-items: center;
  1810. gap: 7px;
  1811. padding: 7px 12px;
  1812. background: none;
  1813. border: none;
  1814. color: var(--text-color);
  1815. font-size: 12px;
  1816. cursor: pointer;
  1817. text-align: left;
  1818. transition: background-color 0.12s ease;
  1819. white-space: nowrap;
  1820. }
  1821. .tab-menu-item:hover {
  1822. background-color: var(--button-hover);
  1823. }
  1824. .tab-menu-item-danger {
  1825. color: var(--color-danger-fg, #d73a49);
  1826. }
  1827. .tab-menu-item-danger:hover {
  1828. background-color: rgba(215, 58, 73, 0.1);
  1829. }
  1830. /* ========================================
  1831. RESET BUTTON
  1832. ======================================== */
  1833. .tab-reset-btn {
  1834. display: flex;
  1835. align-items: center;
  1836. gap: 4px;
  1837. height: 24px;
  1838. padding: 0 8px;
  1839. border-radius: 5px;
  1840. background: none;
  1841. border: 1px solid var(--border-color);
  1842. color: var(--text-color);
  1843. cursor: pointer;
  1844. font-size: 12px;
  1845. flex-shrink: 0;
  1846. margin-left: 6px;
  1847. transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  1848. }
  1849. .tab-reset-btn:hover {
  1850. background-color: rgba(215, 58, 73, 0.1);
  1851. border-color: var(--color-danger-fg, #d73a49);
  1852. color: var(--color-danger-fg, #d73a49);
  1853. }
  1854. /* ========================================
  1855. RESET & RENAME CONFIRMATION MODALS
  1856. ======================================== */
  1857. .reset-modal-overlay {
  1858. position: fixed;
  1859. inset: 0;
  1860. background: rgba(0, 0, 0, 0.45);
  1861. z-index: 2000;
  1862. display: flex;
  1863. align-items: center;
  1864. justify-content: center;
  1865. }
  1866. .reset-modal-overlay.modal-overlay {
  1867. opacity: 0;
  1868. visibility: hidden;
  1869. transition: opacity 0.2s ease, visibility 0.2s ease;
  1870. }
  1871. .reset-modal-overlay.modal-overlay.is-visible {
  1872. opacity: 1;
  1873. visibility: visible;
  1874. }
  1875. .reset-modal-box {
  1876. background: var(--header-bg);
  1877. border: 1px solid var(--border-color);
  1878. border-radius: 10px;
  1879. padding: 24px 28px;
  1880. min-width: 280px;
  1881. max-width: 360px;
  1882. box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  1883. display: flex;
  1884. flex-direction: column;
  1885. gap: 16px;
  1886. }
  1887. .modal-box {
  1888. max-height: min(85vh, 760px);
  1889. opacity: 0;
  1890. transform: translateY(8px);
  1891. transition: transform 0.2s ease, opacity 0.2s ease;
  1892. }
  1893. .reset-modal-overlay.modal-overlay.is-visible .modal-box {
  1894. opacity: 1;
  1895. transform: translateY(0);
  1896. }
  1897. .modal-header {
  1898. display: flex;
  1899. align-items: center;
  1900. justify-content: space-between;
  1901. gap: 12px;
  1902. }
  1903. .modal-header .reset-modal-message {
  1904. text-align: left;
  1905. flex: 1;
  1906. }
  1907. .modal-close-btn {
  1908. border: 1px solid var(--border-color);
  1909. background: var(--button-bg);
  1910. color: var(--text-color);
  1911. border-radius: 6px;
  1912. width: 28px;
  1913. height: 28px;
  1914. display: inline-flex;
  1915. align-items: center;
  1916. justify-content: center;
  1917. cursor: pointer;
  1918. transition: background-color 0.15s ease;
  1919. }
  1920. .modal-close-btn:hover {
  1921. background-color: var(--button-hover);
  1922. }
  1923. .modal-body {
  1924. display: flex;
  1925. flex-direction: column;
  1926. gap: 16px;
  1927. max-height: min(60vh, 520px);
  1928. overflow: auto;
  1929. padding-right: 4px;
  1930. }
  1931. .modal-section {
  1932. display: flex;
  1933. flex-direction: column;
  1934. gap: 8px;
  1935. }
  1936. .modal-section-title {
  1937. margin: 0;
  1938. font-size: 0.95rem;
  1939. font-weight: 600;
  1940. }
  1941. .modal-list {
  1942. margin: 0;
  1943. padding-left: 1.1rem;
  1944. display: flex;
  1945. flex-direction: column;
  1946. gap: 6px;
  1947. font-size: 0.85rem;
  1948. }
  1949. .modal-list a {
  1950. color: var(--accent-color);
  1951. text-decoration: none;
  1952. }
  1953. .modal-list a:hover {
  1954. text-decoration: underline;
  1955. }
  1956. .modal-subtext {
  1957. margin: 0;
  1958. font-size: 12px;
  1959. color: var(--text-secondary, #57606a);
  1960. line-height: 1.4;
  1961. }
  1962. .find-replace-meta {
  1963. display: flex;
  1964. align-items: center;
  1965. justify-content: space-between;
  1966. gap: 12px;
  1967. }
  1968. .find-match-count {
  1969. font-size: 12px;
  1970. color: var(--text-secondary, #57606a);
  1971. }
  1972. .find-replace-nav {
  1973. display: inline-flex;
  1974. gap: 6px;
  1975. }
  1976. .find-nav-btn {
  1977. width: 28px;
  1978. height: 28px;
  1979. padding: 0;
  1980. }
  1981. .about-header {
  1982. display: flex;
  1983. align-items: center;
  1984. gap: 16px;
  1985. flex-wrap: wrap;
  1986. }
  1987. .about-logo {
  1988. width: 64px;
  1989. height: 64px;
  1990. border-radius: 12px;
  1991. border: 1px solid var(--border-color);
  1992. object-fit: cover;
  1993. }
  1994. .about-details {
  1995. display: flex;
  1996. flex-direction: column;
  1997. gap: 6px;
  1998. }
  1999. .about-title {
  2000. margin: 0;
  2001. font-size: 1.05rem;
  2002. font-weight: 600;
  2003. }
  2004. .about-description {
  2005. margin: 0;
  2006. font-size: 0.85rem;
  2007. color: var(--text-secondary, #57606a);
  2008. }
  2009. .about-meta {
  2010. margin: 0;
  2011. font-size: 0.78rem;
  2012. color: var(--text-secondary, #57606a);
  2013. }
  2014. .modal-body kbd {
  2015. padding: 2px 6px;
  2016. border-radius: 4px;
  2017. background-color: var(--button-bg);
  2018. border: 1px solid var(--border-color);
  2019. font-size: 0.75rem;
  2020. font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  2021. }
  2022. .reset-modal-box--wide {
  2023. width: min(92vw, 640px);
  2024. max-width: 640px;
  2025. }
  2026. .reset-modal-message {
  2027. margin: 0;
  2028. font-size: 14px;
  2029. color: var(--text-color);
  2030. font-weight: 500;
  2031. text-align: center;
  2032. }
  2033. .reset-modal-actions {
  2034. display: flex;
  2035. gap: 10px;
  2036. justify-content: flex-end;
  2037. }
  2038. .reset-modal-btn {
  2039. padding: 6px 16px;
  2040. border-radius: 6px;
  2041. border: 1px solid var(--border-color);
  2042. background: var(--button-bg);
  2043. color: var(--text-color);
  2044. font-size: 13px;
  2045. cursor: pointer;
  2046. transition: background-color 0.15s ease;
  2047. }
  2048. .reset-modal-btn:hover {
  2049. background-color: var(--button-hover);
  2050. }
  2051. .reset-modal-confirm {
  2052. background-color: var(--color-danger-fg, #d73a49);
  2053. border-color: var(--color-danger-fg, #d73a49);
  2054. color: #fff;
  2055. }
  2056. .reset-modal-confirm:hover {
  2057. background-color: #b02a37;
  2058. border-color: #b02a37;
  2059. }
  2060. /* ========================================
  2061. PDF EXPORT PROGRESS MODAL
  2062. ======================================== */
  2063. .pdf-progress-overlay {
  2064. position: fixed;
  2065. inset: 0;
  2066. z-index: 2600;
  2067. display: flex;
  2068. align-items: center;
  2069. justify-content: center;
  2070. background: rgba(0, 0, 0, 0.45);
  2071. padding: 20px;
  2072. }
  2073. .pdf-progress-modal {
  2074. width: min(92vw, 420px);
  2075. background: var(--header-bg);
  2076. border: 1px solid var(--border-color);
  2077. border-radius: 8px;
  2078. box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  2079. color: var(--text-color);
  2080. display: flex;
  2081. flex-direction: column;
  2082. gap: 16px;
  2083. padding: 20px;
  2084. }
  2085. .pdf-progress-header {
  2086. display: flex;
  2087. align-items: center;
  2088. justify-content: space-between;
  2089. gap: 12px;
  2090. }
  2091. .pdf-progress-title {
  2092. margin: 0;
  2093. font-size: 15px;
  2094. font-weight: 600;
  2095. }
  2096. .pdf-progress-percent {
  2097. font-size: 28px;
  2098. font-weight: 600;
  2099. line-height: 1;
  2100. }
  2101. .pdf-progress-track {
  2102. width: 100%;
  2103. height: 10px;
  2104. background: var(--button-bg);
  2105. border: 1px solid var(--border-color);
  2106. border-radius: 999px;
  2107. overflow: hidden;
  2108. }
  2109. .pdf-progress-fill {
  2110. width: 0%;
  2111. height: 100%;
  2112. background: var(--accent-color);
  2113. border-radius: inherit;
  2114. transition: width 0.18s ease;
  2115. }
  2116. .pdf-progress-details {
  2117. display: flex;
  2118. flex-direction: column;
  2119. gap: 6px;
  2120. font-size: 12px;
  2121. color: var(--text-secondary);
  2122. }
  2123. .pdf-progress-detail {
  2124. display: flex;
  2125. justify-content: space-between;
  2126. gap: 12px;
  2127. }
  2128. .pdf-progress-detail strong {
  2129. color: var(--text-color);
  2130. font-weight: 600;
  2131. }
  2132. .pdf-progress-actions {
  2133. display: flex;
  2134. justify-content: flex-end;
  2135. }
  2136. .tool-button.pdf-export-loading,
  2137. .mobile-menu-item.pdf-export-loading {
  2138. pointer-events: none;
  2139. }
  2140. /* ========================================
  2141. RESET MODAL FORM FIELDS
  2142. ======================================== */
  2143. .reset-modal-field {
  2144. display: flex;
  2145. flex-direction: column;
  2146. gap: 6px;
  2147. text-align: left;
  2148. }
  2149. .reset-modal-field-group {
  2150. display: flex;
  2151. flex-direction: column;
  2152. gap: 12px;
  2153. }
  2154. .reset-modal-label {
  2155. font-size: 12px;
  2156. color: var(--text-secondary, #57606a);
  2157. font-weight: 600;
  2158. }
  2159. .reset-modal-toggle-group {
  2160. display: flex;
  2161. flex-direction: column;
  2162. gap: 8px;
  2163. }
  2164. .reset-modal-option {
  2165. display: flex;
  2166. align-items: center;
  2167. gap: 8px;
  2168. font-size: 13px;
  2169. color: var(--text-color);
  2170. }
  2171. .reset-modal-option input {
  2172. margin: 0;
  2173. }
  2174. /* ========================================
  2175. RENAME MODAL INPUT
  2176. ======================================== */
  2177. .rename-modal-input {
  2178. width: 100%;
  2179. padding: 7px 10px;
  2180. border-radius: 6px;
  2181. border: 1px solid var(--border-color);
  2182. background: var(--bg-color);
  2183. color: var(--text-color);
  2184. font-size: 13px;
  2185. outline: none;
  2186. box-sizing: border-box;
  2187. }
  2188. .rename-modal-input:focus {
  2189. border-color: var(--accent-color);
  2190. }
  2191. /* ========================================
  2192. TOOLBAR POPUP PANELS
  2193. ======================================== */
  2194. .reset-modal-box--xl {
  2195. width: min(94vw, 980px);
  2196. max-width: 980px;
  2197. }
  2198. .modal-empty {
  2199. margin: 0;
  2200. font-size: 12px;
  2201. color: var(--text-secondary, #57606a);
  2202. text-align: center;
  2203. }
  2204. .emoji-grid {
  2205. display: grid;
  2206. grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  2207. gap: 12px;
  2208. max-height: min(52vh, 440px);
  2209. overflow: auto;
  2210. padding: 4px;
  2211. }
  2212. .symbol-grid {
  2213. display: flex;
  2214. flex-direction: column;
  2215. gap: 16px;
  2216. max-height: min(52vh, 440px);
  2217. overflow: auto;
  2218. padding: 4px 2px;
  2219. }
  2220. .symbol-section-title {
  2221. margin: 0;
  2222. font-size: 11px;
  2223. text-transform: uppercase;
  2224. letter-spacing: 0.08em;
  2225. color: var(--text-secondary, #57606a);
  2226. }
  2227. .symbol-section-grid {
  2228. display: grid;
  2229. grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  2230. gap: 12px;
  2231. }
  2232. .alert-grid {
  2233. display: grid;
  2234. grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  2235. gap: 12px;
  2236. max-height: min(45vh, 360px);
  2237. overflow: auto;
  2238. padding: 2px;
  2239. }
  2240. .emoji-item,
  2241. .symbol-item,
  2242. .alert-option {
  2243. display: flex;
  2244. flex-direction: column;
  2245. gap: 8px;
  2246. align-items: center;
  2247. border: 1px solid var(--border-color);
  2248. border-radius: 10px;
  2249. padding: 10px;
  2250. background: var(--bg-color);
  2251. color: var(--text-color);
  2252. cursor: pointer;
  2253. transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  2254. }
  2255. .emoji-item:focus-visible,
  2256. .symbol-item:focus-visible,
  2257. .alert-option:focus-visible {
  2258. outline: 2px solid var(--accent-color);
  2259. outline-offset: 2px;
  2260. }
  2261. .emoji-item.is-selected,
  2262. .symbol-item.is-selected,
  2263. .alert-option.is-selected {
  2264. border-color: var(--accent-color);
  2265. box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2);
  2266. background-color: rgba(88, 166, 255, 0.08);
  2267. }
  2268. .emoji-preview {
  2269. width: 36px;
  2270. height: 36px;
  2271. display: flex;
  2272. align-items: center;
  2273. justify-content: center;
  2274. }
  2275. .emoji-preview img {
  2276. width: 32px;
  2277. height: 32px;
  2278. }
  2279. .emoji-shortcode {
  2280. display: flex;
  2281. align-items: center;
  2282. gap: 6px;
  2283. font-size: 12px;
  2284. color: var(--text-secondary, #57606a);
  2285. text-align: center;
  2286. }
  2287. .emoji-copy-btn,
  2288. .symbol-copy-btn {
  2289. border: none;
  2290. background: transparent;
  2291. color: var(--text-secondary, #57606a);
  2292. cursor: pointer;
  2293. padding: 2px;
  2294. border-radius: 4px;
  2295. }
  2296. .emoji-copy-btn:hover,
  2297. .symbol-copy-btn:hover {
  2298. color: var(--text-color);
  2299. background: var(--button-hover);
  2300. }
  2301. .emoji-copy-btn.is-copied,
  2302. .symbol-copy-btn.is-copied {
  2303. color: var(--accent-color);
  2304. }
  2305. .symbol-preview {
  2306. font-size: 28px;
  2307. line-height: 1;
  2308. }
  2309. .symbol-code {
  2310. display: flex;
  2311. align-items: center;
  2312. gap: 6px;
  2313. font-size: 12px;
  2314. color: var(--text-secondary, #57606a);
  2315. }
  2316. .alert-option {
  2317. align-items: stretch;
  2318. text-align: left;
  2319. padding: 12px;
  2320. }
  2321. .alert-preview {
  2322. margin: 0;
  2323. }
  2324. .alert-preview .markdown-alert {
  2325. padding: 0.5rem 0.9rem;
  2326. border-left: 0.25em solid;
  2327. border-radius: 0.375rem;
  2328. }
  2329. .alert-preview .markdown-alert-title {
  2330. margin: 0 0 6px;
  2331. font-weight: 600;
  2332. line-height: 1.25;
  2333. display: flex;
  2334. align-items: center;
  2335. gap: 8px;
  2336. }
  2337. .alert-preview .markdown-alert-icon {
  2338. display: inline-flex;
  2339. width: 16px;
  2340. height: 16px;
  2341. }
  2342. .alert-preview .markdown-alert-icon svg {
  2343. width: 16px;
  2344. height: 16px;
  2345. fill: currentColor;
  2346. }
  2347. .alert-preview .markdown-alert > *:not(.markdown-alert-title) {
  2348. color: var(--text-color);
  2349. }
  2350. .alert-preview .markdown-alert-note {
  2351. color: #0969da;
  2352. border-left-color: #0969da;
  2353. background-color: #ddf4ff;
  2354. }
  2355. .alert-preview .markdown-alert-tip {
  2356. color: #1a7f37;
  2357. border-left-color: #1a7f37;
  2358. background-color: #dafbe1;
  2359. }
  2360. .alert-preview .markdown-alert-important {
  2361. color: #8250df;
  2362. border-left-color: #8250df;
  2363. background-color: #fbefff;
  2364. }
  2365. .alert-preview .markdown-alert-warning {
  2366. color: #9a6700;
  2367. border-left-color: #9a6700;
  2368. background-color: #fff8c5;
  2369. }
  2370. .alert-preview .markdown-alert-caution {
  2371. color: #cf222e;
  2372. border-left-color: #cf222e;
  2373. background-color: #ffebe9;
  2374. }
  2375. [data-theme="dark"] .alert-preview .markdown-alert-note {
  2376. color: #4493f8;
  2377. border-left-color: #4493f8;
  2378. background-color: rgba(31, 111, 235, 0.15);
  2379. }
  2380. [data-theme="dark"] .alert-preview .markdown-alert-tip {
  2381. color: #3fb950;
  2382. border-left-color: #3fb950;
  2383. background-color: rgba(35, 134, 54, 0.15);
  2384. }
  2385. [data-theme="dark"] .alert-preview .markdown-alert-important {
  2386. color: #ab7df8;
  2387. border-left-color: #ab7df8;
  2388. background-color: rgba(137, 87, 229, 0.15);
  2389. }
  2390. [data-theme="dark"] .alert-preview .markdown-alert-warning {
  2391. color: #d29922;
  2392. border-left-color: #d29922;
  2393. background-color: rgba(210, 153, 34, 0.18);
  2394. }
  2395. [data-theme="dark"] .alert-preview .markdown-alert-caution {
  2396. color: #f85149;
  2397. border-left-color: #f85149;
  2398. background-color: rgba(248, 81, 73, 0.18);
  2399. }
  2400. .github-import-error {
  2401. margin: 0;
  2402. font-size: 12px;
  2403. color: var(--color-danger-fg, #d73a49);
  2404. text-align: left;
  2405. line-height: 1.5;
  2406. }
  2407. .github-import-error.is-info {
  2408. color: var(--text-secondary, #57606a);
  2409. }
  2410. #github-import-modal .reset-modal-box {
  2411. width: 60vw;
  2412. max-width: 60vw;
  2413. min-width: 340px;
  2414. padding: 30px 34px;
  2415. gap: 16px;
  2416. box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
  2417. }
  2418. #github-import-modal .reset-modal-message {
  2419. font-size: 18px;
  2420. line-height: 1.35;
  2421. text-align: left;
  2422. }
  2423. #github-import-url,
  2424. #github-import-file-select {
  2425. min-height: 46px;
  2426. padding: 10px 12px;
  2427. font-size: 15px;
  2428. }
  2429. #github-import-file-select {
  2430. min-height: 180px;
  2431. }
  2432. .github-import-tree {
  2433. max-height: 420px;
  2434. overflow: auto;
  2435. border: 1px solid var(--border-color);
  2436. border-radius: 10px;
  2437. padding: 12px;
  2438. background: var(--bg-color);
  2439. }
  2440. .github-import-selection-toolbar {
  2441. display: flex;
  2442. align-items: center;
  2443. justify-content: space-between;
  2444. gap: 12px;
  2445. padding: 10px 12px;
  2446. border: 1px solid var(--border-color);
  2447. border-radius: 8px;
  2448. background: var(--button-bg);
  2449. }
  2450. .github-import-selected-count {
  2451. font-size: 14px;
  2452. font-weight: 600;
  2453. color: var(--text-color);
  2454. }
  2455. .github-import-tree ul {
  2456. list-style: none;
  2457. margin: 0;
  2458. padding-left: 18px;
  2459. }
  2460. .github-import-tree > ul {
  2461. padding-left: 4px;
  2462. }
  2463. .github-import-tree li {
  2464. margin: 2px 0;
  2465. }
  2466. .github-tree-folder-label {
  2467. display: inline-block;
  2468. font-size: 14px;
  2469. color: var(--text-secondary, #57606a);
  2470. margin-bottom: 4px;
  2471. }
  2472. .github-tree-file-btn {
  2473. border: 0;
  2474. background: transparent;
  2475. color: var(--text-color);
  2476. cursor: pointer;
  2477. padding: 6px 8px;
  2478. border-radius: 6px;
  2479. text-align: left;
  2480. width: 100%;
  2481. font-size: 14px;
  2482. }
  2483. .github-tree-file-btn:hover,
  2484. .github-tree-file-btn:focus-visible {
  2485. background: var(--button-hover);
  2486. outline: none;
  2487. }
  2488. .github-tree-file-btn.is-selected {
  2489. background: rgba(56, 139, 253, 0.14);
  2490. color: var(--accent-color);
  2491. }
  2492. #github-import-modal .reset-modal-actions {
  2493. gap: 12px;
  2494. }
  2495. #github-import-modal .reset-modal-btn {
  2496. min-height: 42px;
  2497. padding: 9px 18px;
  2498. font-size: 14px;
  2499. }
  2500. @media (max-width: 576px) {
  2501. #github-import-modal .reset-modal-box {
  2502. width: 95vw;
  2503. max-width: 95vw;
  2504. min-width: 0;
  2505. padding: 20px;
  2506. gap: 14px;
  2507. }
  2508. .github-import-selection-toolbar {
  2509. flex-direction: column;
  2510. align-items: stretch;
  2511. }
  2512. #github-import-modal .reset-modal-message {
  2513. font-size: 16px;
  2514. }
  2515. #github-import-modal .reset-modal-actions {
  2516. flex-direction: column-reverse;
  2517. }
  2518. #github-import-modal .reset-modal-btn {
  2519. width: 100%;
  2520. }
  2521. }
  2522. .frontmatter-table {
  2523. border-collapse: collapse;
  2524. margin-bottom: 1.5em;
  2525. font-size: 0.9em;
  2526. width: auto;
  2527. max-width: 100%;
  2528. }
  2529. .frontmatter-table th,
  2530. .frontmatter-table td {
  2531. border: 1px solid var(--border-color);
  2532. padding: 6px 13px;
  2533. vertical-align: top;
  2534. color: var(--text-color);
  2535. }
  2536. .frontmatter-table tr:nth-child(odd) th,
  2537. .frontmatter-table tr:nth-child(odd) td {
  2538. background-color: var(--table-bg);
  2539. }
  2540. .frontmatter-table tr:nth-child(even) th,
  2541. .frontmatter-table tr:nth-child(even) td {
  2542. background-color: var(--editor-bg);
  2543. }
  2544. .frontmatter-table th {
  2545. font-weight: 600;
  2546. text-align: right;
  2547. white-space: nowrap;
  2548. vertical-align: middle;
  2549. }
  2550. .frontmatter-table td {
  2551. text-align: left;
  2552. }
  2553. .fm-complex {
  2554. margin: 0;
  2555. padding: 4px 6px;
  2556. font-size: 0.8em;
  2557. font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  2558. white-space: pre-wrap;
  2559. word-break: break-word;
  2560. background: transparent;
  2561. border: none;
  2562. color: var(--text-color);
  2563. }
  2564. .fm-tag {
  2565. display: inline-block;
  2566. padding: 2px 8px;
  2567. margin: 2px 3px 2px 0;
  2568. border: 1px solid var(--border-color);
  2569. border-radius: 2em;
  2570. font-size: 0.8em;
  2571. font-weight: 500;
  2572. color: var(--accent-color);
  2573. background-color: var(--button-bg);
  2574. white-space: nowrap;
  2575. }
  2576. /* ========================================
  2577. RTL SUPPORT
  2578. ======================================== */
  2579. [dir="rtl"] body {
  2580. direction: rtl;
  2581. }
  2582. [dir="rtl"] .editor-pane {
  2583. padding-left: 0px;
  2584. padding-right: 20px;
  2585. border-right: none;
  2586. border-left: 1px solid var(--border-color);
  2587. }
  2588. [dir="rtl"] #markdown-editor,
  2589. [dir="rtl"] .markdown-body {
  2590. direction: rtl;
  2591. text-align: right;
  2592. }
  2593. [dir="rtl"] .markdown-body pre,
  2594. [dir="rtl"] .markdown-body code,
  2595. [dir="rtl"] .fm-complex {
  2596. direction: ltr;
  2597. text-align: left;
  2598. }
  2599. [dir="rtl"] .line-numbers {
  2600. left: auto;
  2601. right: 20px;
  2602. padding: 10px 0 10px 8px;
  2603. text-align: left;
  2604. border-right: none;
  2605. border-left: 1px solid var(--border-color);
  2606. }
  2607. [dir="rtl"] #markdown-editor {
  2608. padding-left: 10px;
  2609. padding-right: calc(10px + var(--line-number-gutter));
  2610. }
  2611. [dir="rtl"] .editor-highlight-layer {
  2612. inset: 20px calc(20px + var(--line-number-gutter)) 20px 0;
  2613. }
  2614. [dir="rtl"] .mobile-menu-item,
  2615. [dir="rtl"] .tab-menu-item,
  2616. [dir="rtl"] .modal-header .reset-modal-message,
  2617. [dir="rtl"] .reset-modal-field,
  2618. [dir="rtl"] .alert-option,
  2619. [dir="rtl"] .github-import-error,
  2620. [dir="rtl"] #github-import-modal .reset-modal-message,
  2621. [dir="rtl"] .github-tree-file-btn,
  2622. [dir="rtl"] .frontmatter-table td {
  2623. text-align: right;
  2624. }
  2625. [dir="rtl"] .github-import-tree ul {
  2626. padding-left: 0;
  2627. padding-right: 18px;
  2628. }
  2629. [dir="rtl"] .github-import-tree > ul {
  2630. padding-right: 4px;
  2631. }
  2632. [dir="rtl"] .markdown-body .markdown-alert,
  2633. [dir="rtl"] .alert-preview .markdown-alert {
  2634. border-left: 0;
  2635. border-right: 0.25em solid currentColor;
  2636. }
  2637. /* ============================================
  2638. SHARE MODAL
  2639. ============================================ */
  2640. .share-modal-description {
  2641. font-size: 13px;
  2642. color: var(--text-secondary, #57606a);
  2643. margin: 0;
  2644. }
  2645. .share-mode-cards {
  2646. display: flex;
  2647. flex-direction: column;
  2648. gap: 8px;
  2649. }
  2650. .share-mode-card {
  2651. display: flex;
  2652. align-items: center;
  2653. gap: 12px;
  2654. padding: 12px 14px;
  2655. border-radius: 8px;
  2656. border: 1px solid var(--border-color);
  2657. background: var(--bg-color);
  2658. cursor: pointer;
  2659. transition: border-color 0.15s ease, background-color 0.15s ease;
  2660. user-select: none;
  2661. }
  2662. .share-mode-card:hover {
  2663. border-color: var(--accent-color);
  2664. background: var(--button-hover);
  2665. }
  2666. .share-mode-card.is-selected {
  2667. border-color: var(--accent-color);
  2668. background: color-mix(in srgb, var(--accent-color) 8%, transparent);
  2669. }
  2670. .share-mode-card input[type="radio"] {
  2671. display: none;
  2672. }
  2673. .share-card-icon {
  2674. font-size: 18px;
  2675. width: 28px;
  2676. text-align: center;
  2677. color: var(--text-secondary, #57606a);
  2678. flex-shrink: 0;
  2679. }
  2680. .share-mode-card.is-selected .share-card-icon {
  2681. color: var(--accent-color);
  2682. }
  2683. .share-card-body {
  2684. display: flex;
  2685. flex-direction: column;
  2686. gap: 2px;
  2687. flex: 1;
  2688. min-width: 0;
  2689. }
  2690. .share-card-title {
  2691. font-size: 13px;
  2692. font-weight: 600;
  2693. color: var(--text-color);
  2694. }
  2695. .share-card-desc {
  2696. font-size: 12px;
  2697. color: var(--text-secondary, #57606a);
  2698. }
  2699. .share-card-check {
  2700. width: 18px;
  2701. text-align: center;
  2702. color: var(--accent-color);
  2703. opacity: 0;
  2704. transition: opacity 0.15s ease;
  2705. flex-shrink: 0;
  2706. }
  2707. .share-mode-card.is-selected .share-card-check {
  2708. opacity: 1;
  2709. }
  2710. .share-url-row {
  2711. display: flex;
  2712. gap: 8px;
  2713. align-items: center;
  2714. }
  2715. .share-url-input {
  2716. flex: 1;
  2717. font-size: 12px;
  2718. font-family: var(--font-mono, monospace);
  2719. color: var(--text-secondary, #57606a);
  2720. overflow: hidden;
  2721. text-overflow: ellipsis;
  2722. white-space: nowrap;
  2723. }
  2724. .share-copy-btn {
  2725. flex-shrink: 0;
  2726. padding: 6px 10px;
  2727. }
  2728. .share-copy-btn:disabled {
  2729. opacity: 0.5;
  2730. cursor: not-allowed;
  2731. }
  2732. .share-modal-notice {
  2733. font-size: 11px;
  2734. color: var(--text-secondary, #57606a);
  2735. margin: 0;
  2736. display: flex;
  2737. align-items: center;
  2738. gap: 5px;
  2739. }
  2740. /* ==========================================================================
  2741. Multilingual & CJK Optimization styles added by Aegis SEO agency
  2742. ========================================================================== */
  2743. .lang-select-item {
  2744. display: flex !important;
  2745. align-items: center;
  2746. gap: 8px;
  2747. cursor: pointer;
  2748. transition: background-color 0.2s ease, padding-left 0.2s ease;
  2749. }
  2750. .lang-select-item:hover {
  2751. padding-left: 12px;
  2752. }
  2753. .lang-select-item.active {
  2754. background-color: var(--accent-color) !important;
  2755. color: #ffffff !important;
  2756. font-weight: 600;
  2757. }
  2758. /* Adjust CJK text layout for maximum readability inside the preview pane */
  2759. html[lang="zh"] .markdown-body,
  2760. html[lang="ja"] .markdown-body,
  2761. html[lang="ko"] .markdown-body {
  2762. line-height: 1.75 !important;
  2763. letter-spacing: 0.03em;
  2764. word-break: keep-all;
  2765. overflow-wrap: break-word;
  2766. text-align: justify;
  2767. }
  2768. /* Specific heading spacing improvements for CJK characters */
  2769. html[lang="zh"] .markdown-body h1, html[lang="zh"] .markdown-body h2, html[lang="zh"] .markdown-body h3,
  2770. html[lang="ja"] .markdown-body h1, html[lang="ja"] .markdown-body h2, html[lang="ja"] .markdown-body h3,
  2771. html[lang="ko"] .markdown-body h1, html[lang="ko"] .markdown-body h2, html[lang="ko"] .markdown-body h3 {
  2772. font-weight: 700;
  2773. letter-spacing: 0.02em;
  2774. margin-top: 1.4em;
  2775. margin-bottom: 0.6em;
  2776. }
  2777. /* Smooth fade and scale transition for dropdown active states */
  2778. .dropdown-menu {
  2779. opacity: 0;
  2780. transform: translateY(8px) scale(0.98);
  2781. display: block;
  2782. visibility: hidden;
  2783. transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
  2784. }
  2785. .dropdown-menu.show {
  2786. opacity: 1;
  2787. transform: translateY(0) scale(1);
  2788. visibility: visible;
  2789. }
  2790. /* ========================================
  2791. FIND & REPLACE FLOATING PANEL DESIGN
  2792. ======================================== */
  2793. .find-replace-panel {
  2794. position: fixed;
  2795. top: 100px;
  2796. right: 20px;
  2797. width: 340px;
  2798. background-color: var(--fr-bg);
  2799. border: 1px solid var(--fr-border);
  2800. border-radius: 12px;
  2801. box-shadow: var(--fr-shadow);
  2802. z-index: 1050;
  2803. display: flex;
  2804. flex-direction: column;
  2805. backdrop-filter: blur(10px);
  2806. -webkit-backdrop-filter: blur(10px);
  2807. transition: opacity 0.2s ease, transform 0.2s ease;
  2808. user-select: none;
  2809. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  2810. }
  2811. .find-replace-panel.docked {
  2812. position: relative;
  2813. top: 0 !important;
  2814. right: 0 !important;
  2815. height: 100%;
  2816. border-radius: 0;
  2817. border-top: none;
  2818. border-bottom: none;
  2819. border-right: none;
  2820. border-left: 1px solid var(--fr-border);
  2821. box-shadow: none;
  2822. backdrop-filter: none;
  2823. z-index: 10;
  2824. flex-shrink: 0;
  2825. }
  2826. .find-replace-panel.docked #find-replace-reset,
  2827. .find-replace-panel.docked #find-replace-reset-footer {
  2828. display: none !important;
  2829. }
  2830. .find-replace-header {
  2831. display: flex;
  2832. align-items: center;
  2833. justify-content: space-between;
  2834. padding: 8px 12px;
  2835. border-bottom: 1px solid var(--fr-border);
  2836. cursor: move;
  2837. background-color: var(--header-bg);
  2838. border-top-left-radius: 11px;
  2839. border-top-right-radius: 11px;
  2840. }
  2841. .find-replace-panel.docked .find-replace-header {
  2842. cursor: default;
  2843. border-top-left-radius: 0;
  2844. border-top-right-radius: 0;
  2845. }
  2846. .find-replace-title {
  2847. font-size: 13px;
  2848. font-weight: 600;
  2849. color: var(--text-color);
  2850. }
  2851. .find-replace-header-actions {
  2852. display: flex;
  2853. gap: 4px;
  2854. }
  2855. .panel-icon-btn {
  2856. background: none;
  2857. border: none;
  2858. color: var(--text-color);
  2859. font-size: 12px;
  2860. cursor: pointer;
  2861. padding: 2px 6px;
  2862. border-radius: 4px;
  2863. display: flex;
  2864. align-items: center;
  2865. justify-content: center;
  2866. transition: background-color 0.15s ease;
  2867. }
  2868. .panel-icon-btn:hover {
  2869. background-color: var(--button-hover);
  2870. }
  2871. .find-replace-body {
  2872. padding: 12px;
  2873. display: flex;
  2874. flex-direction: column;
  2875. gap: 8px;
  2876. }
  2877. .find-replace-field-row {
  2878. display: flex;
  2879. flex-direction: column;
  2880. position: relative;
  2881. }
  2882. .find-input-container, .replace-input-container {
  2883. display: flex;
  2884. align-items: center;
  2885. border: 1px solid var(--fr-border);
  2886. border-radius: 6px;
  2887. background-color: var(--bg-color);
  2888. padding: 2px 4px;
  2889. width: 100%;
  2890. }
  2891. .find-input-container:focus-within, .replace-input-container:focus-within {
  2892. border-color: var(--accent-color);
  2893. box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15);
  2894. }
  2895. .find-input-field {
  2896. flex: 1;
  2897. border: none;
  2898. background: transparent;
  2899. color: var(--text-color);
  2900. font-size: 13px;
  2901. padding: 4px 6px;
  2902. outline: none;
  2903. width: 50%;
  2904. }
  2905. .find-options-group {
  2906. display: flex;
  2907. gap: 2px;
  2908. }
  2909. .find-option-btn {
  2910. background: none;
  2911. border: none;
  2912. color: var(--text-secondary);
  2913. font-size: 11px;
  2914. font-weight: 600;
  2915. cursor: pointer;
  2916. padding: 2px 5px;
  2917. border-radius: 4px;
  2918. transition: background-color 0.12s ease, color 0.12s ease;
  2919. min-width: 22px;
  2920. height: 22px;
  2921. display: inline-flex;
  2922. align-items: center;
  2923. justify-content: center;
  2924. }
  2925. .find-option-btn:hover {
  2926. background-color: var(--button-hover);
  2927. color: var(--text-color);
  2928. }
  2929. .find-option-btn.active {
  2930. background-color: var(--fr-btn-active-bg);
  2931. color: var(--fr-btn-active);
  2932. }
  2933. .find-error-drawer {
  2934. background-color: var(--fr-error-bg);
  2935. border: 1px solid var(--fr-error-border);
  2936. border-radius: 6px;
  2937. padding: 6px 10px;
  2938. font-size: 11px;
  2939. color: var(--fr-text-danger);
  2940. line-height: 1.3;
  2941. }
  2942. .find-replace-meta-row {
  2943. display: flex;
  2944. align-items: center;
  2945. justify-content: space-between;
  2946. padding: 2px 4px;
  2947. }
  2948. .find-match-count {
  2949. font-size: 12px;
  2950. color: var(--text-secondary);
  2951. }
  2952. .find-nav-group {
  2953. display: flex;
  2954. gap: 4px;
  2955. }
  2956. .find-nav-arrow-btn {
  2957. background: none;
  2958. border: 1px solid var(--fr-border);
  2959. color: var(--text-color);
  2960. font-size: 12px;
  2961. cursor: pointer;
  2962. padding: 2px 8px;
  2963. border-radius: 4px;
  2964. transition: background-color 0.15s ease;
  2965. display: flex;
  2966. align-items: center;
  2967. justify-content: center;
  2968. }
  2969. .find-nav-arrow-btn:hover:not(:disabled) {
  2970. background-color: var(--button-hover);
  2971. }
  2972. .find-nav-arrow-btn:disabled {
  2973. opacity: 0.4;
  2974. cursor: not-allowed;
  2975. }
  2976. .find-drawer-toggle-row {
  2977. border-top: 1px solid var(--fr-border);
  2978. margin-top: 4px;
  2979. padding-top: 6px;
  2980. }
  2981. .drawer-toggle-btn {
  2982. background: none;
  2983. border: none;
  2984. color: var(--text-secondary);
  2985. font-size: 12px;
  2986. cursor: pointer;
  2987. display: flex;
  2988. align-items: center;
  2989. padding: 2px 4px;
  2990. border-radius: 4px;
  2991. transition: color 0.15s ease;
  2992. }
  2993. .drawer-toggle-btn:hover {
  2994. color: var(--text-color);
  2995. }
  2996. .find-replace-drawer-content {
  2997. display: flex;
  2998. flex-direction: column;
  2999. gap: 8px;
  3000. padding: 4px 6px;
  3001. border-top: 1px dashed var(--fr-border);
  3002. margin-top: 2px;
  3003. padding-top: 8px;
  3004. }
  3005. .drawer-field {
  3006. display: flex;
  3007. flex-direction: column;
  3008. gap: 4px;
  3009. }
  3010. .drawer-field.check-field {
  3011. flex-direction: row;
  3012. align-items: center;
  3013. gap: 6px;
  3014. padding: 2px 0;
  3015. }
  3016. .drawer-label {
  3017. font-size: 11px;
  3018. font-weight: 600;
  3019. color: var(--text-secondary);
  3020. }
  3021. .drawer-select {
  3022. width: 100%;
  3023. padding: 4px 6px;
  3024. border-radius: 4px;
  3025. border: 1px solid var(--fr-border);
  3026. background-color: var(--bg-color);
  3027. color: var(--text-color);
  3028. font-size: 12px;
  3029. outline: none;
  3030. }
  3031. .drawer-checkbox {
  3032. margin: 0;
  3033. cursor: pointer;
  3034. }
  3035. .drawer-label-checkbox {
  3036. font-size: 12px;
  3037. color: var(--text-color);
  3038. cursor: pointer;
  3039. }
  3040. .find-replace-actions-footer {
  3041. display: flex;
  3042. gap: 6px;
  3043. padding: 8px 12px 12px 12px;
  3044. border-top: 1px solid var(--fr-border);
  3045. background-color: var(--header-bg);
  3046. border-bottom-left-radius: 11px;
  3047. border-bottom-right-radius: 11px;
  3048. }
  3049. .find-replace-panel.docked .find-replace-actions-footer {
  3050. border-bottom-left-radius: 0;
  3051. border-bottom-right-radius: 0;
  3052. }
  3053. .fr-action-btn {
  3054. flex: 1;
  3055. padding: 6px 8px;
  3056. font-size: 12px;
  3057. font-weight: 500;
  3058. border-radius: 6px;
  3059. border: 1px solid var(--fr-border);
  3060. background-color: var(--button-bg);
  3061. color: var(--text-color);
  3062. cursor: pointer;
  3063. transition: background-color 0.15s ease, border-color 0.15s ease;
  3064. text-align: center;
  3065. }
  3066. .fr-action-btn:hover:not(:disabled) {
  3067. background-color: var(--button-hover);
  3068. }
  3069. .fr-action-btn:disabled {
  3070. opacity: 0.5;
  3071. cursor: not-allowed;
  3072. }
  3073. .fr-action-btn.secondary {
  3074. max-width: 60px;
  3075. }
  3076. /* ========================================
  3077. DIFF PREVIEW CONTAINER
  3078. ======================================== */
  3079. .diff-preview-body {
  3080. padding: 16px;
  3081. display: flex;
  3082. flex-direction: column;
  3083. gap: 12px;
  3084. }
  3085. .diff-container {
  3086. border: 1px solid var(--fr-border);
  3087. border-radius: 8px;
  3088. background-color: var(--bg-color);
  3089. max-height: 400px;
  3090. overflow: auto;
  3091. font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  3092. font-size: 12px;
  3093. line-height: 1.5;
  3094. }
  3095. .diff-line {
  3096. display: flex;
  3097. padding: 1px 8px;
  3098. }
  3099. .diff-line.addition {
  3100. background-color: rgba(46, 160, 67, 0.15);
  3101. color: #3fb950;
  3102. }
  3103. .diff-line.deletion {
  3104. background-color: rgba(248, 81, 73, 0.15);
  3105. color: #f85149;
  3106. }
  3107. .diff-line.context {
  3108. color: var(--text-secondary);
  3109. }
  3110. .diff-line-num {
  3111. width: 40px;
  3112. flex-shrink: 0;
  3113. text-align: right;
  3114. padding-right: 12px;
  3115. border-right: 1px solid var(--fr-border);
  3116. user-select: none;
  3117. opacity: 0.5;
  3118. }
  3119. .diff-line-content {
  3120. padding-left: 12px;
  3121. white-space: pre-wrap;
  3122. word-break: break-all;
  3123. }
  3124. /* ========================================
  3125. DOCK LAYOUT CODES
  3126. ======================================== */
  3127. .content-container {
  3128. display: flex;
  3129. flex: 1;
  3130. overflow: hidden;
  3131. position: relative;
  3132. }
  3133. .editor-dock-wrapper {
  3134. display: flex;
  3135. flex: 1;
  3136. overflow: hidden;
  3137. position: relative;
  3138. }
  3139. .editor-pane-inner {
  3140. display: flex;
  3141. flex-direction: column;
  3142. flex: 1;
  3143. position: relative;
  3144. overflow: hidden;
  3145. }
  3146. /* ========================================
  3147. MOBILE & TABLET FIND PANEL RESPONSIVE FIXES
  3148. ======================================== */
  3149. @media (max-width: 1079px) {
  3150. #find-replace-dock {
  3151. display: none !important;
  3152. }
  3153. }
  3154. @media (max-width: 768px) {
  3155. /* Prevent full screen expansion of floating panel on small mobile viewports */
  3156. .find-replace-panel {
  3157. width: calc(100% - 24px) !important;
  3158. right: 12px !important;
  3159. left: 12px !important;
  3160. top: 80px !important;
  3161. }
  3162. }
  3163. /* ========================================
  3164. SKELETON LOADING SHIMMER SYSTEM
  3165. ======================================== */
  3166. .skeleton-placeholder {
  3167. display: block;
  3168. background-color: var(--skeleton-bg);
  3169. border-radius: 6px;
  3170. position: relative;
  3171. overflow: hidden;
  3172. /* PERF-017: Removed skeleton-pulse; shimmer-only is sufficient and halves GPU compositing layers */
  3173. /* animation: skeleton-pulse 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate; */
  3174. }
  3175. .skeleton-placeholder::after {
  3176. content: "";
  3177. position: absolute;
  3178. top: 0;
  3179. right: 0;
  3180. bottom: 0;
  3181. left: 0;
  3182. transform: translateX(-100%);
  3183. background-image: linear-gradient(
  3184. 90deg,
  3185. rgba(255, 255, 255, 0) 0%,
  3186. var(--skeleton-glow) 50%,
  3187. rgba(255, 255, 255, 0) 100%
  3188. );
  3189. animation: skeleton-shimmer 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  3190. }
  3191. @keyframes skeleton-shimmer {
  3192. 100% {
  3193. transform: translateX(100%);
  3194. }
  3195. }
  3196. @keyframes skeleton-pulse {
  3197. 0%, 100% {
  3198. opacity: 1;
  3199. }
  3200. 50% {
  3201. opacity: 0.82;
  3202. }
  3203. }
  3204. .skeleton-circle {
  3205. width: 32px;
  3206. height: 32px;
  3207. border-radius: 50%;
  3208. margin: 0 auto;
  3209. }
  3210. .skeleton-text {
  3211. height: 12px;
  3212. width: 80%;
  3213. margin: 4px auto;
  3214. border-radius: 3px;
  3215. }
  3216. .skeleton-tree-folder {
  3217. height: 16px;
  3218. width: 140px;
  3219. margin: 6px 0;
  3220. display: inline-block;
  3221. }
  3222. .skeleton-tree-file {
  3223. height: 14px;
  3224. width: 180px;
  3225. margin: 4px 0 4px 12px;
  3226. display: inline-block;
  3227. }
  3228. /* Screen reader accessibility utility */
  3229. .visually-hidden {
  3230. position: absolute !important;
  3231. width: 1px !important;
  3232. height: 1px !important;
  3233. padding: 0 !important;
  3234. margin: -1px !important;
  3235. overflow: hidden !important;
  3236. clip: rect(0, 0, 0, 0) !important;
  3237. clip-path: inset(50%) !important;
  3238. white-space: nowrap !important;
  3239. border: 0 !important;
  3240. }
  3241. /* Article skeleton layout structures */
  3242. .skeleton-title {
  3243. height: 28px;
  3244. width: 35%;
  3245. margin-bottom: 24px;
  3246. border-radius: 8px;
  3247. }
  3248. .skeleton-subtitle {
  3249. height: 20px;
  3250. width: 20%;
  3251. margin-bottom: 18px;
  3252. margin-top: 32px;
  3253. border-radius: 6px;
  3254. }
  3255. .skeleton-line {
  3256. height: 14px;
  3257. margin-bottom: 12px;
  3258. border-radius: 6px;
  3259. }
  3260. /* Symmetrical dynamic widths */
  3261. .skeleton-w90 { width: 90%; }
  3262. .skeleton-w92 { width: 92%; }
  3263. .skeleton-w88 { width: 88%; }
  3264. .skeleton-w85 { width: 85%; }
  3265. .skeleton-w60 { width: 60%; }
  3266. .skeleton-w45 { width: 45%; }
  3267. /* Editor pane skeleton overlay */
  3268. .editor-skeleton {
  3269. position: absolute;
  3270. top: 0;
  3271. left: 0;
  3272. right: 0;
  3273. bottom: 0;
  3274. padding: 30px 24px 24px calc(24px + var(--line-number-gutter));
  3275. z-index: 10;
  3276. pointer-events: none;
  3277. background: var(--editor-bg);
  3278. box-sizing: border-box;
  3279. overflow: hidden;
  3280. transition: opacity 0.3s ease;
  3281. }
  3282. .editor-pane:not(.is-loading) .editor-skeleton {
  3283. display: none;
  3284. }
  3285. .editor-pane.is-loading textarea {
  3286. opacity: 0; /* Completely hide editor content while initial bootstrap skeleton runs */
  3287. }
  3288. /* Preview pane skeleton container */
  3289. .skeleton-preview-container {
  3290. display: block;
  3291. width: 100%;
  3292. box-sizing: border-box;
  3293. padding: 10px 4px;
  3294. background: transparent;
  3295. transition: opacity 0.3s ease;
  3296. }
  3297. /* Mermaid compilation loading states */
  3298. .mermaid-container.is-loading {
  3299. min-height: 180px;
  3300. background-color: var(--skeleton-bg);
  3301. border-radius: 8px;
  3302. border: 1px solid var(--border-color);
  3303. position: relative;
  3304. overflow: hidden;
  3305. animation: skeleton-pulse 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
  3306. }
  3307. .mermaid-container.is-loading .mermaid {
  3308. opacity: 0; /* Hide raw chart source code during compile */
  3309. }
  3310. .mermaid-container.is-loading::after {
  3311. content: "";
  3312. position: absolute;
  3313. inset: 0;
  3314. transform: translateX(-100%);
  3315. background-image: linear-gradient(
  3316. 90deg,
  3317. rgba(255, 255, 255, 0) 0%,
  3318. var(--skeleton-glow) 50%,
  3319. rgba(255, 255, 255, 0) 100%
  3320. );
  3321. animation: skeleton-shimmer 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  3322. }
  3323. /* Accessibility: respect user's motion preferences */
  3324. @media (prefers-reduced-motion: reduce) {
  3325. .skeleton-placeholder,
  3326. .skeleton-placeholder::after,
  3327. .mermaid-container.is-loading,
  3328. .mermaid-container.is-loading::after {
  3329. animation: none;
  3330. }
  3331. .drag-overlay-inner {
  3332. animation: none;
  3333. }
  3334. .tab-item-new {
  3335. animation: none;
  3336. }
  3337. body,
  3338. .app-header,
  3339. .editor-pane,
  3340. .preview-pane,
  3341. .tool-button,
  3342. .markdown-tool-btn {
  3343. transition: none;
  3344. }
  3345. }